Firist off, Juan... Are you OK? No scratches or any broken skin?
Now... one thing to learn, kind readers: this was NOT a seedy, hard-core, red-light district. Juan was walking down Las Ramblas, which is a nice, wide, pedestrian way down which one can find creatures from all walks of life at almost any time.
I know Las Ramblas, and what Juan did takes guts... especially after 4 PM, when all students, kids and bureaucrats are off to their homes. That's when the ordinary traffic in Las Ramblas turns downright weird... because (if you're going Southbound, to the sea) to the West or right of Las Ramblas, there's an old neighborhood in which nobody should venture at any time, the "Barrio Chino." On the opposite side, there's the nice, old historical Barcelona, with cafés, stores and plazas. Las Ramblas divides both faces of the city, and it's a kind of "no man's land" after dusk.
I am sure the incident took the wind off your sails, Juan, but I'm also sure you won't give up photographing BCN just on account of a disturbed woman. Now, I worry about the police officer... and she should be better informed. If I were you, I don't know what I'd do to tell her there was nothing untoward in what you were doing... Let's hope she learned something after your experience.
Take care and have an Estrella to wash it off! Saludos!