When any office is abolished by the repeal of any legislative act or provision, and such act or provision is not in substance re-enacted or continued in the code, such office ceases at the time the code takes effect.