summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-20 14:05:50 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-05-22 06:32:35 +0000
commite929194317a7debb1c5467282230cbbabe61a710 (patch)
tree89f7bfe3a00003c0fa96113b77abbf76c92f80bf /vbahelper
parentedcd1d5a9c88455fd1d52ab25815fc8d439f31ec (diff)
convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19 Reviewed-on: https://gerrit.libreoffice.org/15825 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx36
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx4
2 files changed, 20 insertions, 20 deletions
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 42fc9d34b299..56bc102c6a15 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -449,21 +449,21 @@ struct PointerStyles
// 1 -> 1 map of styles ( some dubious choices in there though )
PointerStyles styles[] = {
/// assuming pointer default is Arrow
- { msforms::fmMousePointer::fmMousePointerDefault, POINTER_ARROW },
- { msforms::fmMousePointer::fmMousePointerArrow, POINTER_ARROW },
- { msforms::fmMousePointer::fmMousePointerCross, POINTER_CROSS },
- { msforms::fmMousePointer::fmMousePointerIBeam, POINTER_TEXT },
- { msforms::fmMousePointer::fmMousePointerSizeNESW, POINTER_AUTOSCROLL_NSWE }, // #TODO not correct, need to check, need to find the right one
- { msforms::fmMousePointer::fmMousePointerSizeNS, POINTER_AUTOSCROLL_NS },
- { msforms::fmMousePointer::fmMousePointerSizeNWSE, POINTER_AUTOSCROLL_NSWE }, // #TODO not correct, need to check, need to find the right one
- { msforms::fmMousePointer::fmMousePointerSizeWE, POINTER_AUTOSCROLL_WE },
- { msforms::fmMousePointer::fmMousePointerUpArrow, POINTER_WINDOW_NSIZE },
- { msforms::fmMousePointer::fmMousePointerHourGlass, POINTER_WAIT },
- { msforms::fmMousePointer::fmMousePointerNoDrop, POINTER_NOTALLOWED },
- { msforms::fmMousePointer::fmMousePointerAppStarting, POINTER_WAIT },
- { msforms::fmMousePointer::fmMousePointerHelp, POINTER_HELP },
- { msforms::fmMousePointer::fmMousePointerSizeAll, POINTER_CROSS },
- { msforms::fmMousePointer::fmMousePointerCustom, POINTER_ARROW }, // not supported I guess
+ { msforms::fmMousePointer::fmMousePointerDefault, PointerStyle::Arrow },
+ { msforms::fmMousePointer::fmMousePointerArrow, PointerStyle::Arrow },
+ { msforms::fmMousePointer::fmMousePointerCross, PointerStyle::Cross },
+ { msforms::fmMousePointer::fmMousePointerIBeam, PointerStyle::Text },
+ { msforms::fmMousePointer::fmMousePointerSizeNESW, PointerStyle::AutoScrollNSWE }, // #TODO not correct, need to check, need to find the right one
+ { msforms::fmMousePointer::fmMousePointerSizeNS, PointerStyle::AutoScrollNS },
+ { msforms::fmMousePointer::fmMousePointerSizeNWSE, PointerStyle::AutoScrollNSWE }, // #TODO not correct, need to check, need to find the right one
+ { msforms::fmMousePointer::fmMousePointerSizeWE, PointerStyle::AutoScrollWE },
+ { msforms::fmMousePointer::fmMousePointerUpArrow, PointerStyle::WindowNSize },
+ { msforms::fmMousePointer::fmMousePointerHourGlass, PointerStyle::Wait },
+ { msforms::fmMousePointer::fmMousePointerNoDrop, PointerStyle::NotAllowed },
+ { msforms::fmMousePointer::fmMousePointerAppStarting, PointerStyle::Wait },
+ { msforms::fmMousePointer::fmMousePointerHelp, PointerStyle::Help },
+ { msforms::fmMousePointer::fmMousePointerSizeAll, PointerStyle::Cross },
+ { msforms::fmMousePointer::fmMousePointerCustom, PointerStyle::Arrow }, // not supported I guess
};
@@ -483,7 +483,7 @@ static long lcl_loPointerToMsoPointer( PointerStyle eType )
static Pointer lcl_msoPointerToLOPointer( long msoPointerStyle )
{
- Pointer aPointer( POINTER_ARROW );
+ Pointer aPointer( PointerStyle::Arrow );
for ( int i = 0, nElems = SAL_N_ELEMENTS( styles ); i < nElems; ++i )
{
if ( styles[ i ].msoPointerStyle == msoPointerStyle )
@@ -498,7 +498,7 @@ static Pointer lcl_msoPointerToLOPointer( long msoPointerStyle )
::sal_Int32 SAL_CALL
ScVbaControl::getMousePointer() throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- PointerStyle eType = POINTER_ARROW; // default ?
+ PointerStyle eType = PointerStyle::Arrow; // default ?
vcl::Window* pWindow = VCLUnoHelper::GetWindow( getWindowPeer() );
if ( pWindow )
{
@@ -513,7 +513,7 @@ ScVbaControl::setMousePointer( ::sal_Int32 _mousepointer ) throw (::com::sun::st
vcl::Window* pWindow = VCLUnoHelper::GetWindow( getWindowPeer() );
if ( pWindow )
{
- Pointer aPointer( POINTER_ARROW );
+ Pointer aPointer( PointerStyle::Arrow );
aPointer = lcl_msoPointerToLOPointer( _mousepointer );
pWindow->SetPointer( aPointer );
}
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index a4759d267019..b2192bb4d19e 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -676,10 +676,10 @@ ConcreteXShapeGeometryAttributes::~ConcreteXShapeGeometryAttributes()
{
}
-sal_Int32 getPointerStyle( const uno::Reference< frame::XModel >& xModel )
+PointerStyle getPointerStyle( const uno::Reference< frame::XModel >& xModel )
{
- sal_Int32 nPointerStyle( POINTER_ARROW );
+ PointerStyle nPointerStyle( PointerStyle::Arrow );
try
{
const uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW );