Welcome to FT!!
Since you are on two tickets, you would probably need to clear Canadian immigration/Customs, then go out and check in for your flight to BCN. Depending on the carriers in question, you may even need to change terminals.
I would definitely make a call to a Canadian Border services office to inquire, but my guess would be if they had not allowed her to enter in the past, they would not allow her to connect in this case. There are procedures that she can follow to allow her entry into Canada, but I believe they require some time to process.
Additionally, she may want to check if she can enter Spain as well.