Not the best time to see the Med. There are lots of storm fronts usually around March to April, May can still be doubtful too.
June is nice, and things stay pleasant right through to November.
A lot of UK operators' Med cruises are fly cruise from the UK and cruise from Palma, Mallorca. Thomson, Ocean Village, Island Cruises etc. Don't think that any of these will sell a cruise only without the flight.
MSC and Costa cruise to and from Italy.
Louis cruise from Greece and Cyprus, so that's not much help either.
There's a Spanish cruise operator whose name escapes me............I'm sure that they cruise from Barcelona, otherwise there are ferries from Barcelona to the Balearics (Mallorca, Ibiza etc)
easyCruise go from Cannes, St Tropez, Nice, Monaco, Genoa, Portofono.....so that's France and Italy, still not Barcelona. They are a no-frills operation, but could be fun.
Princess? I think they only start around May/June (see above comments about weather)
Oh yes it's come to me at last: the name of that Spanish cruise firm: I think its Pullmantur
Why Barcelona in particular ??????