Usually the ships dock in Livorno for excursions to Florence..that time is about 2 hours each way...with a driver (PRIVATE) who will take you direct...if you do ship tours it will take longer for pit-stops..:-0
Barcelona dock is about 5 minutes by bus,20 minutes to walk, eadsy but over a LONG bridge and there are cruise ship buses in the port..they say CRUISE on them, charge about 3 Euro per person round trip, don't loose the ticket they give you, it's for your return to the dock.. you can get the hop on hop off bus on the Las Ramblas for buses to take you to all the "sites" not sure what they charge now .GOOGLE hop on hop off buses in Barcelona..
for a driver in Livorno to Florence email:
http://www.papillonservice.com