summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
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
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')
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx15
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx2
3 files changed, 9 insertions, 12 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index ff8117085e58..32b3aa11edf6 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -284,7 +284,7 @@ void PaletteManager::AddRecentColor(const Color& rRecentColor, const OUString& r
css::uno::Sequence< OUString > aColorNameList(maRecentColors.size());
for (size_t i = 0; i < maRecentColors.size(); ++i)
{
- aColorList[i] = static_cast<sal_Int32>(maRecentColors[i].first.GetColor());
+ aColorList[i] = static_cast<sal_Int32>(maRecentColors[i].first);
aColorNameList[i] = maRecentColors[i].second;
}
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(m_context));
@@ -341,7 +341,7 @@ void PaletteManager::DispatchColorCommand(const OUString& aCommand, const NamedC
Sequence<PropertyValue> aArgs(1);
aArgs[0].Name = aObj.GetURLPath();
- aArgs[0].Value <<= sal_Int32(rColor.first.GetColor());
+ aArgs[0].Value <<= sal_Int32(rColor.first);
URL aTargetURL;
aTargetURL.Complete = aCommand;
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 );
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 3529584cc3ae..07d952e42368 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -93,7 +93,7 @@ namespace svx
mbWasHiContrastMode = mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode();
- if ((COL_TRANSPARENT != aColor.GetColor()) && (maBmpSize.Width() == maBmpSize.Height()))
+ if ((COL_TRANSPARENT != aColor) && (maBmpSize.Width() == maBmpSize.Height()))
pVirDev->SetLineColor(aColor);
else if( mpTbx->GetBackground().GetColor().IsDark() )
pVirDev->SetLineColor(COL_WHITE);