[Libreoffice-commits] core.git: include/vbahelper sc/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Mar 2 07:23:59 UTC 2018


 include/vbahelper/vbahelper.hxx  |    2 ++
 sc/source/ui/vba/vbainterior.cxx |    3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 82d42fa2c05e8d53ec2c21733a2a9f53412dd2d1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Mar 1 16:49:55 2018 +0200

    add Color method version of OORGBToXLRGB
    
    Change-Id: I769ff8aed3caa74679e1b4d03e8fbc3cd5d22b1a
    Reviewed-on: https://gerrit.libreoffice.org/50587
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 3643874ef5d5..ff9eca3f232f 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include <rtl/ustring.hxx>
 #include <sal/types.h>
+#include <tools/color.hxx>
 #include <vbahelper/vbadllapi.h>
 #include <vcl/pointr.hxx>
 #include <vcl/ptrstyle.hxx>
@@ -97,6 +98,7 @@ namespace ooo
         VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< css::frame::XModel>& xModel, const OUString & aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps );
         VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell const * pView, sal_uInt16 nSlot );
         VBAHELPER_DLLPUBLIC sal_Int32 OORGBToXLRGB( sal_Int32 );
+        inline sal_Int32 OORGBToXLRGB( ::Color n ) { return OORGBToXLRGB(sal_Int32(n)); }
         VBAHELPER_DLLPUBLIC sal_Int32 XLRGBToOORGB( sal_Int32 );
         VBAHELPER_DLLPUBLIC css::uno::Any OORGBToXLRGB( const css::uno::Any& );
         VBAHELPER_DLLPUBLIC css::uno::Any XLRGBToOORGB( const css::uno::Any& );
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index b413b385a801..c40224a04f04 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -91,8 +91,7 @@ ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent,
 uno::Any
 ScVbaInterior::getColor()
 {
-    Color aBackColor( GetBackColor() );
-    return uno::makeAny( OORGBToXLRGB( aBackColor.GetColor() ) );
+    return uno::makeAny( OORGBToXLRGB( GetBackColor() ) );
 }
 
 void


More information about the Libreoffice-commits mailing list