Complex sentence: He returned to Vienna in 1797, and in 1799 became professor of historical painting at the Vienna Academy, and, in 1820, its director, the office he held until his death.
Split into simpler sentences: He returned to Vienna in 1797, and in 1799 became professor of historical painting at the Vienna Academy. In 1820, he became its director, the office he held until his death.