summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbcontrl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-06 11:11:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-06 12:52:32 +0100
commit4a0ca3a2ec5290419617b6dace216e981b03254e (patch)
tree464ac48c91ac5610436f7c50790ed9b08d912405 /svx/source/tbxctrls/tbcontrl.cxx
parentb8b7f8a8f8d97088181d287bb75e74facece16c6 (diff)
use more Color in svx
Change-Id: I78ea8db0d9c882cdc3813ff4fac0cdce9caf6ad1 Reviewed-on: https://gerrit.libreoffice.org/50801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/tbxctrls/tbcontrl.cxx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index e839dbed3d56..14d6441feee9 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1553,7 +1553,7 @@ void SvxColorWindow::statusChanged( const css::frame::FeatureStateEvent& rEvent
{
sal_Int32 nValue;
if (rEvent.State >>= nValue)
- aColor = nValue;
+ aColor = Color(nValue);
}
SelectEntry(aColor);
@@ -1631,9 +1631,8 @@ bool BorderColorStatus::statusChanged( const css::frame::FeatureStateEvent& rEve
if ( rEvent.FeatureURL.Complete == ".uno:FrameLineColor" )
{
- sal_Int32 nValue;
- if ( rEvent.IsEnabled && ( rEvent.State >>= nValue ) )
- aColor = nValue;
+ if ( rEvent.IsEnabled )
+ rEvent.State >>= aColor;
maColor = aColor;
return true;
@@ -1642,7 +1641,7 @@ bool BorderColorStatus::statusChanged( const css::frame::FeatureStateEvent& rEve
{
css::table::BorderLine2 aTable;
if ( rEvent.IsEnabled && ( rEvent.State >>= aTable ) )
- aColor = aTable.Color;
+ aColor = Color(aTable.Color);
if ( rEvent.FeatureURL.Complete == ".uno:BorderTLBR" )
{
@@ -2902,9 +2901,7 @@ void SvxColorToolBoxControl::statusChanged( const css::frame::FeatureStateEvent&
}
else if ( rEvent.IsEnabled )
{
- sal_Int32 nValue;
- if ( rEvent.State >>= nValue )
- aColor = nValue;
+ rEvent.State >>= aColor;
}
m_xBtnUpdater->Update( aColor );
if (m_xPaletteManager)
@@ -2940,7 +2937,7 @@ void SvxColorToolBoxControl::execute(sal_Int16 /*nSelectModifier*/)
Color aColor = m_xPaletteManager->GetLastColor();
auto aArgs( comphelper::InitPropertySequence( {
- { m_aCommandURL.copy(5), css::uno::makeAny( m_xPaletteManager->GetLastColor().GetColor() ) }
+ { m_aCommandURL.copy(5), css::uno::makeAny( m_xPaletteManager->GetLastColor() ) }
} ) );
dispatchCommand( aCommand, aArgs );