Peter, Praise & Gypsy,I started using friendliness as a positive counterbalance to negativity in my working life about 20 years ago and it worked like a charm then and still works in almost every unpleasant work situation I have been in since then. It didn't work in my recently ended work situation but that was a whole new kettle of fish. The offensive person was deliberately nasty, not unconsciously nasty, or just remiss, so he didn't care what I did he just chose to be nasty anyway. The best thing I could do in that case was just to cut my losses and walk away, but in almost every other situation positive, constructive niceness has won out.
It doesn't have to be super-cheesy niceness, sweetness & light, either. It works really well by just acting as if everything they say is nice and responding accordingly. And only responding to the content of their words and not the tone of words, voice, gesture etc makes a lot of difference too.
It all comes down to respect for each other in the final analysis, I think, and as long as we each demand respect for ourselves and give respect to other people there is a lot less negativity and a lot more constructive outcomes - IMHO (in my humble opinion).
Helen