Ferran Valls i Taberner, Barcelona