diff options
author | Noel Power <noel.power@suse.com> | 2013-04-19 12:52:06 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-05-09 14:11:14 +0100 |
commit | 04eb03cc0b01e5dd862aa073810d3ab898661e8f (patch) | |
tree | 666637e582d8a715bfa0e65731adb5034641cef5 /scripting/source | |
parent | 063709590ea7064230eb427a26eb00ac5bbf455e (diff) |
handle various ReturnXXXX types for forms
Change-Id: Idcbfbebafb02c734b42428c5b1d6df8d0d4a23d6
Diffstat (limited to 'scripting/source')
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 97fc38d6cb52..207973c9202d 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -58,8 +58,6 @@ #include <com/sun/star/awt/XRadioButton.hpp> #include <com/sun/star/awt/XListBox.hpp> -#include <ooo/vba/msforms/ReturnInteger.hpp> - #include <sfx2/objsh.hxx> #include <basic/sbstar.hxx> #include <basic/basmgr.hxx> @@ -67,6 +65,7 @@ #include <basic/sbmod.hxx> #include <basic/sbx.hxx> #include <filter/msfilter/msvbahelper.hxx> +#include <vbahelper/vbareturntypes.hxx> // for debug #include <comphelper/anytostring.hxx> @@ -160,9 +159,8 @@ Sequence< Any > ooKeyPressedToVBAKeyPressed( const Sequence< Any >& params ) translatedParams.realloc(1); - msforms::ReturnInteger keyCode; - keyCode.Value = evt.KeyCode; - translatedParams[0] <<= keyCode; + Reference< msforms::XReturnInteger> xKeyCode = new ReturnInteger( sal_Int32( evt.KeyCode ) ); + translatedParams[0] <<= xKeyCode; return translatedParams; } @@ -176,12 +174,11 @@ Sequence< Any > ooKeyPressedToVBAKeyUpDown( const Sequence< Any >& params ) translatedParams.realloc(2); - msforms::ReturnInteger keyCode; + Reference< msforms::XReturnInteger> xKeyCode = new ReturnInteger( evt.KeyCode ); sal_Int8 shift = sal::static_int_cast<sal_Int8>( evt.Modifiers ); // #TODO check whether values from OOO conform to values generated from vba - keyCode.Value = evt.KeyCode; - translatedParams[0] <<= keyCode; + translatedParams[0] <<= xKeyCode; translatedParams[1] <<= shift; return translatedParams; } |