A good obedience trainer will be able to solve the problem for you. The city we live in has an obedience class as part of their recreation & parks program. The fee is cheap and it's a 6 week class.
We took both our our dogs through the class. One graduated at the top of her class. The other graduted towards the bottom but as I worked with her,she got better. The one technique they taught in class seemed to work best for stopping a barking/whining problem. The trainer took a metal lunch pail and put a few small rocks in it. She taped it closed. Anytime a dog does something you don't want them to do, you say their name sternly along with a firm 'No" and then throw the lunch pail down to the ground. It took about a week of doing this to get our dogs to stop barking at other dogs in the campground.
This may work for your dog.