Upvote:0
You do not need transit visa if your D visa is in order. Both Spain and Portugal are in Schengen, so you will clear the immigration in Barcelona. Your Vueling flight from BCN to LIS would be "domestic" and you will not go through the passport control in LIS.