No. I guess this is kind of Dream Interpretation. You had this education as a kid, to not swear. Maybe, you thought that swearing might result in bad things in life and this was saved into your subconscious. When you swear in dreams, your subconscious gets this old thought and still thinks that it's not ok to swear. And this reflects on your dreams.