I would like to use a piece of software I wrote for my company in a private open source project. I have already talked to my manager about the possibilities of the company open sourcing that software. It is not decided yet, but it could well be that my company might just turn down my request, simply because all the legal issues might be too much of a hassle.
Now the thing is, it is really not much software, just about 100 lines of code, one class of a larger project I am working on in this company. So on the one hand, my company does not really lose much in terms of work donated to the public. On the other hand, I don't gain much, because it is just 100 lines of code, and I could just rewrite that class from scratch.
Now I was wondering how to go about that rewrite. Do I have any chance at all to rewrite that class without the possibility of facing charges of intellectual theft (I don't expect my company to sue me, we have a good relationship)? This probably also strongly depends on the country, which is Switzerland if that helps anyone with an answer.
Is it enough to just change names and comment text?