In Barcelona you can tip if you were particularly satisfied with the service provided, but you don't have to. At least it is not expected and also the local people hardly do it. In restaurants, 5-10% is enough for excellent service if you really want to tip, in taxis you just round up to minimize the change.