I am willing to apply for advertised PhD position in Sweden. Whom should I address my cover letter?
Officially, in Sweden, it's normally the department that hires students. In practice, it's likely going to be the professor that acquired the funding who is going to evaluate candidates and make a decision. Even more in practice, your average Swedish professor won't care the least bit who you address in the letter.
If you feel you need to put in a name, put in the name of the hiring professor. If you get it wrong, it likely won't matter in the least.