summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-06 10:46:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-06 12:14:48 +0100
commitb8b7f8a8f8d97088181d287bb75e74facece16c6 (patch)
tree9afb0a1a6b1416696e4b6d3c288af1ab736e615c /vbahelper
parenta0a57a35673ddee39b7b0a78a39cfec0eb50e91c (diff)
use more Color in vbahelper
Change-Id: I9d153b184a394ac21d504cb503731f8c5c8ec1de Reviewed-on: https://gerrit.libreoffice.org/50797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacolorformat.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx1
3 files changed, 3 insertions, 2 deletions
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 0db919760dc6..8ea64d041ee5 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -424,7 +424,7 @@ void SAL_CALL ScVbaControl::setTag( const OUString& aTag )
::sal_Int32 SAL_CALL ScVbaControl::getForeColor()
{
- sal_Int32 nForeColor = -1;
+ Color nForeColor;
m_xProps->getPropertyValue( "TextColor" ) >>= nForeColor;
return OORGBToXLRGB( nForeColor );
}
diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx
index 39ec1c090d93..a052f90c1385 100644
--- a/vbahelper/source/vbahelper/vbacolorformat.cxx
+++ b/vbahelper/source/vbahelper/vbacolorformat.cxx
@@ -77,7 +77,7 @@ ScVbaColorFormat::getRGB()
default:
throw uno::RuntimeException( "Second parameter of ColorFormat is wrong." );
}
- nRGB = OORGBToXLRGB( nRGB );
+ nRGB = OORGBToXLRGB( Color(nRGB) );
return nRGB;
}
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index b7432c59935c..77174c82fb93 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -304,6 +304,7 @@ OORGBToXLRGB( sal_Int32 nCol )
sal_Int32 nRGB = ( nAutoBits | (nBlue << 16) | (nGreen << 8) | nRed );
return nRGB;
}
+
sal_Int32
XLRGBToOORGB( sal_Int32 nCol )
{