summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/tpcolor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/tpcolor.cxx')
-rw-r--r--cui/source/tabpages/tpcolor.cxx178
1 files changed, 113 insertions, 65 deletions
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index e6eadad2075b..ccfe75232bef 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -34,6 +34,10 @@
#include <svx/dialmgr.hxx>
#include <svx/strings.hrc>
#include <officecfg/Office/Common.hxx>
+#include <osl/diagnose.h>
+#include <comphelper/dispatchcommand.hxx>
+#include <comphelper/lok.hxx>
+#include <comphelper/propertyvalue.hxx>
using namespace com::sun::star;
@@ -45,7 +49,6 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController*
, aXFillAttr( rInAttrs.GetPool() )
, rXFSet( aXFillAttr.GetItemSet() )
, eCM( ColorModel::RGB )
- , m_context(comphelper::getProcessComponentContext())
, m_xValSetColorList(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin", true)))
, m_xValSetRecentList(new SvxColorValueSet(nullptr))
, m_xSelectPalette(m_xBuilder->weld_combo_box("paletteselector"))
@@ -74,6 +77,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController*
, m_xBtnAdd(m_xBuilder->weld_button("add"))
, m_xBtnDelete(m_xBuilder->weld_button("delete"))
, m_xBtnWorkOn(m_xBuilder->weld_button("edit"))
+ , m_xMoreColors(m_xBuilder->weld_button("btnMoreColors"))
, m_xCtlPreviewOld(new weld::CustomWeld(*m_xBuilder, "oldpreview", m_aCtlPreviewOld))
, m_xCtlPreviewNew(new weld::CustomWeld(*m_xBuilder, "newpreview", m_aCtlPreviewNew))
, m_xValSetColorListWin(new weld::CustomWeld(*m_xBuilder, "colorset", *m_xValSetColorList))
@@ -113,7 +117,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController*
m_xMcustom->connect_value_changed(aMetricSpinLink);
m_xKcustom->connect_value_changed(aMetricSpinLink);
- Link<weld::ToggleButton&,void> aLink2 = LINK( this, SvxColorTabPage, SelectColorModeHdl_Impl );
+ Link<weld::Toggleable&,void> aLink2 = LINK( this, SvxColorTabPage, SelectColorModeHdl_Impl );
m_xRbRGB->connect_toggled(aLink2);
m_xRbCMYK->connect_toggled(aLink2);
SetColorModel( eCM );
@@ -125,22 +129,32 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController*
// disable modify buttons
// Color palettes can't be modified
m_xBtnDelete->set_sensitive(false);
- m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) );
+ m_xBtnDelete->set_tooltip_text( CuiResId(RID_CUISTR_DELETEUSERCOLOR1) );
+
+ m_xMoreColors->connect_clicked(LINK(this, SvxColorTabPage, OnMoreColorsClick));
// disable preset color values
m_xRGBpreset->set_sensitive(false);
m_xCMYKpreset->set_sensitive(false);
// ValueSet
- m_xValSetColorList->SetStyle(m_xValSetColorList->GetStyle() | WB_ITEMBORDER);
+ m_xValSetColorList->SetStyle(m_xValSetColorList->GetStyle() |
+ WB_FLATVALUESET | WB_ITEMBORDER | WB_NO_DIRECTSELECT | WB_TABSTOP);
m_xValSetColorList->Show();
- m_xValSetRecentList->SetStyle(m_xValSetRecentList->GetStyle() | WB_ITEMBORDER);
+ m_xValSetRecentList->SetStyle(m_xValSetRecentList->GetStyle() |
+ WB_FLATVALUESET | WB_ITEMBORDER | WB_NO_DIRECTSELECT | WB_TABSTOP);
m_xValSetRecentList->Show();
maPaletteManager.ReloadRecentColorSet(*m_xValSetRecentList);
aSize = m_xValSetRecentList->layoutAllVisible(maPaletteManager.GetRecentColorCount());
m_xValSetRecentList->set_size_request(aSize.Width(), aSize.Height());
+
+ // it is not possible to install color palette extensions in Online or mobile apps
+ if(comphelper::LibreOfficeKit::isActive())
+ {
+ m_xMoreColors->hide();
+ }
}
SvxColorTabPage::~SvxColorTabPage()
@@ -189,14 +203,15 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
if( !pColorList.is() )
return;
- const SfxPoolItem* pPoolItem = nullptr;
- if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) )
+ if( const XFillColorItem* pFillColorItem = rOutAttrs.GetItemIfSet( GetWhich( XATTR_FILLCOLOR ) ) )
{
SetColorModel( ColorModel::RGB );
ChangeColorModel();
- const Color aColor = static_cast<const XFillColorItem*>(pPoolItem)->GetColorValue();
- ChangeColor( aColor );
+ const Color aColor = pFillColorItem->GetColorValue();
+ NamedColor aNamedColor;
+ aNamedColor.m_aColor = aColor;
+ ChangeColor(aNamedColor);
sal_Int32 nPos = FindInPalette( aColor );
if ( nPos != -1 )
@@ -223,13 +238,16 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet )
{
Color aColor = m_xValSetColorList->GetItemColor( m_xValSetColorList->GetSelectedItemId() );
OUString sColorName;
- if ( aCurrentColor == aColor )
+ if (m_aCurrentColor.m_aColor == aColor)
sColorName = m_xValSetColorList->GetItemText( m_xValSetColorList->GetSelectedItemId() );
else
- sColorName = "#" + aCurrentColor.AsRGBHexString().toAsciiUpperCase();
- maPaletteManager.AddRecentColor( aCurrentColor, sColorName );
- rSet->Put( XFillColorItem( sColorName, aCurrentColor ) );
- rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
+ sColorName = "#" + m_aCurrentColor.m_aColor.AsRGBHexString().toAsciiUpperCase();
+
+ maPaletteManager.AddRecentColor(m_aCurrentColor.m_aColor, sColorName);
+ XFillColorItem aColorItem(sColorName, m_aCurrentColor.m_aColor);
+ aColorItem.setComplexColor(m_aCurrentColor.getComplexColor());
+ rSet->Put(aColorItem);
+ rSet->Put(XFillStyleItem(drawing::FillStyle_SOLID));
return true;
}
@@ -248,7 +266,7 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
if ( nState >= SfxItemState::DEFAULT )
{
XFillColorItem aColorItem( rSet->Get( XATTR_FILLCOLOR ) );
- aPreviousColor = aColorItem.GetColorValue();
+ m_aPreviousColor = aColorItem.GetColorValue();
aNewColor = aColorItem.GetColorValue();
}
@@ -258,7 +276,9 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
SetColorModel( eCM );
ChangeColorModel();
- ChangeColor(aNewColor);
+ NamedColor aColor;
+ aColor.m_aColor = aNewColor;
+ ChangeColor(aColor);
UpdateModified();
}
@@ -272,12 +292,12 @@ std::unique_ptr<SfxTabPage> SvxColorTabPage::Create(weld::Container* pPage, weld
IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, weld::SpinButton&, void)
{
// read current MtrFields, if cmyk, then k-value as transparency
- aCurrentColor = Color(static_cast<sal_uInt8>(PercentToColor_Impl(m_xRcustom->get_value())),
+ m_aCurrentColor.m_aColor = Color(static_cast<sal_uInt8>(PercentToColor_Impl(m_xRcustom->get_value())),
static_cast<sal_uInt8>(PercentToColor_Impl(m_xGcustom->get_value())),
static_cast<sal_uInt8>(PercentToColor_Impl(m_xBcustom->get_value())));
UpdateColorValues();
- rXFSet.Put( XFillColorItem( OUString(), aCurrentColor ) );
+ rXFSet.Put( XFillColorItem( OUString(), m_aCurrentColor.m_aColor ) );
m_aCtlPreviewNew.SetAttributes( aXFillAttr.GetItemSet() );
m_aCtlPreviewNew.Invalidate();
@@ -286,13 +306,13 @@ IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, weld::SpinButton&, void)
IMPL_LINK_NOARG(SvxColorTabPage, MetricSpinValueHdl_Impl, weld::MetricSpinButton&, void)
{
// read current MtrFields, if cmyk, then k-value as transparency
- aCurrentColor = Color(ColorTransparency, static_cast<sal_uInt8>(PercentToColor_Impl(m_xKcustom->get_value(FieldUnit::NONE))),
+ m_aCurrentColor.m_aColor = Color(ColorTransparency, static_cast<sal_uInt8>(PercentToColor_Impl(m_xKcustom->get_value(FieldUnit::NONE))),
static_cast<sal_uInt8>(PercentToColor_Impl(m_xCcustom->get_value(FieldUnit::NONE))),
static_cast<sal_uInt8>(PercentToColor_Impl(m_xYcustom->get_value(FieldUnit::NONE))),
static_cast<sal_uInt8>(PercentToColor_Impl(m_xMcustom->get_value(FieldUnit::NONE))));
- ConvertColorValues (aCurrentColor, ColorModel::RGB);
+ ConvertColorValues (m_aCurrentColor.m_aColor, ColorModel::RGB);
- rXFSet.Put( XFillColorItem( OUString(), aCurrentColor ) );
+ rXFSet.Put( XFillColorItem( OUString(), m_aCurrentColor.m_aColor ) );
m_aCtlPreviewNew.SetAttributes( aXFillAttr.GetItemSet() );
m_aCtlPreviewNew.Invalidate();
@@ -300,10 +320,10 @@ IMPL_LINK_NOARG(SvxColorTabPage, MetricSpinValueHdl_Impl, weld::MetricSpinButton
IMPL_LINK_NOARG(SvxColorTabPage, ModifiedHdl_Impl, weld::Entry&, void)
{
- aCurrentColor = m_xHexcustom->GetColor();
+ m_aCurrentColor.m_aColor = m_xHexcustom->GetColor();
UpdateColorValues();
- rXFSet.Put( XFillColorItem( OUString(), aCurrentColor ) );
+ rXFSet.Put( XFillColorItem( OUString(), m_aCurrentColor.m_aColor ) );
m_aCtlPreviewNew.SetAttributes( aXFillAttr.GetItemSet() );
m_aCtlPreviewNew.Invalidate();
@@ -312,7 +332,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ModifiedHdl_Impl, weld::Entry&, void)
IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
{
OUString aNewName( SvxResId( RID_SVXSTR_COLOR ) );
- OUString aDesc( CuiResId( RID_SVXSTR_DESC_COLOR ) );
+ OUString aDesc( CuiResId( RID_CUISTR_DESC_COLOR ) );
OUString aName;
tools::Long j = 1;
@@ -330,7 +350,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
while (pDlg->Execute() == RET_OK)
{
- pDlg->GetName( aName );
+ aName = pDlg->GetName();
bValidColorName = (FindInCustomColors(aName) == -1);
if (bValidColorName)
@@ -351,22 +371,22 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
{
m_xSelectPalette->set_active(0);
SelectPaletteLBHdl(*m_xSelectPalette);
- std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(m_context));
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
css::uno::Sequence< sal_Int32 > aCustomColorList(officecfg::Office::Common::UserColors::CustomColor::get());
css::uno::Sequence< OUString > aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get());
sal_Int32 nSize = aCustomColorList.getLength();
aCustomColorList.realloc( nSize + 1 );
aCustomColorNameList.realloc( nSize + 1 );
- aCustomColorList[nSize] = sal_Int32(aCurrentColor);
- aCustomColorNameList[nSize] = aName;
+ aCustomColorList.getArray()[nSize] = sal_Int32(m_aCurrentColor.m_aColor);
+ aCustomColorNameList.getArray()[nSize] = aName;
officecfg::Office::Common::UserColors::CustomColor::set(aCustomColorList, batch);
officecfg::Office::Common::UserColors::CustomColorName::set(aCustomColorNameList, batch);
batch->commit();
sal_uInt16 nId = m_xValSetColorList->GetItemId(nSize - 1);
- m_xValSetColorList->InsertItem( nId + 1 , aCurrentColor, aName );
+ m_xValSetColorList->InsertItem( nId + 1 , m_aCurrentColor.m_aColor, aName );
m_xValSetColorList->SelectItem( nId + 1 );
m_xBtnDelete->set_sensitive(false);
- m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) );
+ m_xBtnDelete->set_tooltip_text( CuiResId(RID_CUISTR_DELETEUSERCOLOR2) );
ImpColorCountChanged();
}
@@ -377,13 +397,13 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickWorkOnHdl_Impl, weld::Button&, void)
{
SvColorDialog aColorDlg;
- aColorDlg.SetColor (aCurrentColor);
+ aColorDlg.SetColor (m_aCurrentColor.m_aColor);
aColorDlg.SetMode( svtools::ColorPickerMode::Modify );
if (aColorDlg.Execute(GetFrameWeld()) == RET_OK)
{
Color aPreviewColor = aColorDlg.GetColor();
- aCurrentColor = aPreviewColor;
+ m_aCurrentColor.m_aColor = aPreviewColor;
UpdateColorValues( false );
// fill ItemSet and pass it on to XOut
rXFSet.Put( XFillColorItem( OUString(), aPreviewColor ) );
@@ -401,14 +421,16 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl, weld::Button&, void)
if (m_xSelectPalette->get_active() != 0 || nPos == VALUESET_ITEM_NOTFOUND)
return;
- std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(m_context));
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
css::uno::Sequence< sal_Int32 > aCustomColorList(officecfg::Office::Common::UserColors::CustomColor::get());
+ auto aCustomColorListRange = asNonConstRange(aCustomColorList);
css::uno::Sequence< OUString > aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get());
+ auto aCustomColorNameListRange = asNonConstRange(aCustomColorNameList);
sal_Int32 nSize = aCustomColorList.getLength() - 1;
for(sal_Int32 nIndex = static_cast<sal_Int32>(nPos);nIndex < nSize;nIndex++)
{
- aCustomColorList[nIndex] = aCustomColorList[nIndex+1];
- aCustomColorNameList[nIndex] = aCustomColorNameList[nIndex+1];
+ aCustomColorListRange[nIndex] = aCustomColorList[nIndex+1];
+ aCustomColorNameListRange[nIndex] = aCustomColorNameList[nIndex+1];
}
aCustomColorList.realloc(nSize);
aCustomColorNameList.realloc(nSize);
@@ -425,7 +447,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl, weld::Button&, void)
else
{
m_xBtnDelete->set_sensitive(false);
- m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) );
+ m_xBtnDelete->set_tooltip_text( CuiResId(RID_CUISTR_DELETEUSERCOLOR2) );
}
}
@@ -461,7 +483,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, weld::ComboBox&, void)
if (nPos != 0)
{
m_xBtnDelete->set_sensitive(false);
- m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) );
+ m_xBtnDelete->set_tooltip_text( CuiResId(RID_CUISTR_DELETEUSERCOLOR1) );
}
m_xValSetColorList->Resize();
@@ -478,7 +500,22 @@ IMPL_LINK(SvxColorTabPage, SelectValSetHdl_Impl, ValueSet*, pValSet, void)
rXFSet.Put( XFillColorItem( OUString(), aColor ) );
m_aCtlPreviewNew.SetAttributes( aXFillAttr.GetItemSet() );
m_aCtlPreviewNew.Invalidate();
- ChangeColor(aColor, false);
+
+ NamedColor aNamedColor;
+ aNamedColor.m_aColor = aColor;
+
+ if (pValSet == m_xValSetColorList.get() && maPaletteManager.IsThemePaletteSelected())
+ {
+ sal_uInt16 nThemeIndex;
+ sal_uInt16 nEffectIndex;
+ if (PaletteManager::GetThemeAndEffectIndex(nPos, nThemeIndex, nEffectIndex))
+ {
+ aNamedColor.m_nThemeIndex = nThemeIndex;
+ maPaletteManager.GetLumModOff(nThemeIndex, nEffectIndex, aNamedColor.m_nLumMod, aNamedColor.m_nLumOff);
+ }
+ }
+
+ ChangeColor(aNamedColor, false);
if (pValSet == m_xValSetColorList.get())
{
@@ -491,14 +528,14 @@ IMPL_LINK(SvxColorTabPage, SelectValSetHdl_Impl, ValueSet*, pValSet, void)
else
{
m_xBtnDelete->set_sensitive(false);
- m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) );
+ m_xBtnDelete->set_tooltip_text( CuiResId(RID_CUISTR_DELETEUSERCOLOR1) );
}
}
if (pValSet == m_xValSetRecentList.get())
{
m_xValSetColorList->SetNoSelection();
m_xBtnDelete->set_sensitive(false);
- m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) );
+ m_xBtnDelete->set_tooltip_text( CuiResId(RID_CUISTR_DELETEUSERCOLOR2) );
}
}
@@ -523,7 +560,7 @@ void SvxColorTabPage::ConvertColorValues (Color& rColor, ColorModel eModell)
}
}
-IMPL_LINK_NOARG(SvxColorTabPage, SelectColorModeHdl_Impl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(SvxColorTabPage, SelectColorModeHdl_Impl, weld::Toggleable&, void)
{
if (m_xRbRGB->get_active())
eCM = ColorModel::RGB;
@@ -533,13 +570,24 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectColorModeHdl_Impl, weld::ToggleButton&, v
UpdateColorValues();
}
-void SvxColorTabPage::ChangeColor(const Color &rNewColor, bool bUpdatePreset )
+
+IMPL_STATIC_LINK_NOARG(SvxColorTabPage, OnMoreColorsClick, weld::Button&, void)
+{
+ css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue(
+ "AdditionsTag", OUString("Color Palette")) };
+ comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs);
+}
+
+void SvxColorTabPage::ChangeColor(const NamedColor &rNewColor, bool bUpdatePreset )
{
- aPreviousColor = rNewColor;
- aCurrentColor = rNewColor;
+ m_aPreviousColor = rNewColor.m_aColor;
+ m_aCurrentColor = rNewColor;
UpdateColorValues( bUpdatePreset );
// fill ItemSet and pass it on to XOut
- rXFSet.Put( XFillColorItem( OUString(), aCurrentColor ) );
+ XFillColorItem aItem(OUString(), m_aCurrentColor.m_aColor);
+ aItem.setComplexColor(m_aCurrentColor.getComplexColor());
+ rXFSet.Put(aItem);
+
m_aCtlPreviewNew.SetAttributes(aXFillAttr.GetItemSet());
m_aCtlPreviewNew.Invalidate();
}
@@ -580,42 +628,42 @@ void SvxColorTabPage::UpdateColorValues( bool bUpdatePreset )
{
if (eCM != ColorModel::RGB)
{
- ConvertColorValues (aPreviousColor, eCM );
- ConvertColorValues (aCurrentColor, eCM);
+ ConvertColorValues (m_aPreviousColor, eCM );
+ ConvertColorValues (m_aCurrentColor.m_aColor, eCM);
- m_xCcustom->set_value( ColorToPercent_Impl( aCurrentColor.GetRed() ), FieldUnit::PERCENT );
- m_xMcustom->set_value( ColorToPercent_Impl( aCurrentColor.GetBlue() ), FieldUnit::PERCENT );
- m_xYcustom->set_value( ColorToPercent_Impl( aCurrentColor.GetGreen() ), FieldUnit::PERCENT );
- m_xKcustom->set_value( ColorToPercent_Impl( 255 - aCurrentColor.GetAlpha() ), FieldUnit::PERCENT );
+ m_xCcustom->set_value( ColorToPercent_Impl( m_aCurrentColor.m_aColor.GetRed() ), FieldUnit::PERCENT );
+ m_xMcustom->set_value( ColorToPercent_Impl( m_aCurrentColor.m_aColor.GetBlue() ), FieldUnit::PERCENT );
+ m_xYcustom->set_value( ColorToPercent_Impl( m_aCurrentColor.m_aColor.GetGreen() ), FieldUnit::PERCENT );
+ m_xKcustom->set_value( ColorToPercent_Impl( 255 - m_aCurrentColor.m_aColor.GetAlpha() ), FieldUnit::PERCENT );
if( bUpdatePreset )
{
- m_xCpreset->set_text(unicode::formatPercent(ColorToPercent_Impl(aPreviousColor.GetRed()),
+ m_xCpreset->set_text(unicode::formatPercent(ColorToPercent_Impl(m_aPreviousColor.GetRed()),
Application::GetSettings().GetUILanguageTag()));
- m_xMpreset->set_text(unicode::formatPercent(ColorToPercent_Impl(aPreviousColor.GetBlue()),
+ m_xMpreset->set_text(unicode::formatPercent(ColorToPercent_Impl(m_aPreviousColor.GetBlue()),
Application::GetSettings().GetUILanguageTag()));
- m_xYpreset->set_text(unicode::formatPercent(ColorToPercent_Impl(aPreviousColor.GetGreen()),
+ m_xYpreset->set_text(unicode::formatPercent(ColorToPercent_Impl(m_aPreviousColor.GetGreen()),
Application::GetSettings().GetUILanguageTag()));
- m_xKpreset->set_text(unicode::formatPercent(ColorToPercent_Impl(255 - aPreviousColor.GetAlpha()),
+ m_xKpreset->set_text(unicode::formatPercent(ColorToPercent_Impl(255 - m_aPreviousColor.GetAlpha()),
Application::GetSettings().GetUILanguageTag()));
}
- ConvertColorValues (aPreviousColor, ColorModel::RGB);
- ConvertColorValues (aCurrentColor, ColorModel::RGB);
+ ConvertColorValues (m_aPreviousColor, ColorModel::RGB);
+ ConvertColorValues (m_aCurrentColor.m_aColor, ColorModel::RGB);
}
else
{
- m_xRcustom->set_value( ColorToPercent_Impl( aCurrentColor.GetRed() ) );
- m_xGcustom->set_value( ColorToPercent_Impl( aCurrentColor.GetGreen() ) );
- m_xBcustom->set_value( ColorToPercent_Impl( aCurrentColor.GetBlue() ) );
- m_xHexcustom->SetColor( aCurrentColor );
+ m_xRcustom->set_value( ColorToPercent_Impl( m_aCurrentColor.m_aColor.GetRed() ) );
+ m_xGcustom->set_value( ColorToPercent_Impl( m_aCurrentColor.m_aColor.GetGreen() ) );
+ m_xBcustom->set_value( ColorToPercent_Impl( m_aCurrentColor.m_aColor.GetBlue() ) );
+ m_xHexcustom->SetColor( m_aCurrentColor.m_aColor );
if( bUpdatePreset )
{
- m_xRpreset->set_text(OUString::number(ColorToPercent_Impl(aPreviousColor.GetRed())));
- m_xGpreset->set_text(OUString::number(ColorToPercent_Impl(aPreviousColor.GetGreen())));
- m_xBpreset->set_text(OUString::number(ColorToPercent_Impl(aPreviousColor.GetBlue())));
- m_xHexpreset->SetColor( aPreviousColor );
+ m_xRpreset->set_text(OUString::number(ColorToPercent_Impl(m_aPreviousColor.GetRed())));
+ m_xGpreset->set_text(OUString::number(ColorToPercent_Impl(m_aPreviousColor.GetGreen())));
+ m_xBpreset->set_text(OUString::number(ColorToPercent_Impl(m_aPreviousColor.GetBlue())));
+ m_xHexpreset->SetColor( m_aPreviousColor );
}
}
}