Upvote:4
You will pass through customs and immigration when you first land in Canada.
There is also passport exit control when you leave Sweden.
In London there is no customs and no immigration for international-to-international transit passengers, although you will go through a security screening.