I once saw a doc about the alarming levels of rape in the U.S. military. Some of these guys were pretty high rank, so I guess they fooled everyone that they possessed self-control, (perhaps they didn't swear), but in reality they clearly lacked self-control. I only bring up this example to explain my point, I know there are many officers who don't swear and don't lack self-control, but my point is that the lack of swearing doesn't really prove anything, nor does the presence of swearing.
Obviously swearing is a big thing, but not when leading. You'll have exceptions with some of the line units of course, but that's a culture that won't change.
If I saw one of my squad leaders cursing at someone for doing something dumb, then I'd know that supposed leader just failed that Soldier. At ease those emotions, get your point across, and hold them accountable. If you can't do that without throwing a hissy fit, take off those stripes.
Rather, I'm saying that EVEN in the military, with some of the most insensitive people around, swearing indicates lack of self-control and situational awareness.