#i124191# fix horizontal scroll events on Mac

A problem with horizontal scrolling was reported on Mac. Reviewing the relevant
code identified some problems. The patch to fix them was confirmed to also fix
the reported problem.

Found-by: erben.fr@gmail.com
Tested-by: cemonadresse@orange.fr
Tested-by: TrolliusX@t-online.de
Tested-by: thorsten.wagner.4@gmail.com
Tested-by: jsc@apache.org

Merged from AOO trunk revision 1596491


git-svn-id: https://svn.apache.org/repos/asf/openoffice/branches/AOO410@1602354 13f79535-47bb-0310-9956-ffa450edef68