Tin cans were invented in modern times (19th century), so I think it's less clear cut than that.
Mid-1800s isn't really 'modern'... no matter which re-enactment society you belong to!
There has always been a use for coarse language, something in between "suitable for polite company" and "so outrageous it's illegal".
Yes, but it wasn't really a concept at this point.
Slang was a 'thing', and from that evolved many terms we now consider coarse, but in those days 'coarse language' was more about how you spoke and your social status of which it was indicative, rather than which words you selected. The actual words we now consider verboten were in common and pretty polite usage, some (the lovely F-bomb) even appearing in fairly formal print.
So it'd be harsh language, but not particularly unbecoming even in those days.
I'm sure early-mid 19th century military personel could express frustration in coarse terms that wouldn't get them convicted of blasphemy or some sort of outraging public decency charge.
Yes, that what the minced oath was for.
So instead of taking the Lord's actual name in vain, one would instead curse something
of God... often slightly avoiding even naming Him directly. 'Ods Nails, or Jesus wept, stuff like that.
Even if they did appreciate having better food on campaign because of the preservation properties on having canned food, that wouldn't rule out being irritated by the inconvenience of opening a can with a knife or chisel.
They probably wouldn't be that irritated, as they'd not known any other way of opening the can until the openers appeared.