diff options
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.cxx | 19 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.hxx | 2 |
2 files changed, 12 insertions, 9 deletions
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index d3382478b766..5e8194fd7214 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -96,7 +96,7 @@ void ConditionColorWrapper::dispose() void ConditionColorWrapper::operator()(const OUString& /*rCommand*/, const NamedColor& rNamedColor) { - mxControl->ApplyCommand(mnSlotId, rNamedColor.first); + mxControl->ApplyCommand(mnSlotId, rNamedColor); } // = Condition @@ -161,9 +161,11 @@ Condition::Condition( vcl::Window* _pParent, IConditionalFormatAction& _rAction, m_nFontDialogId = m_pActions->GetItemId(".uno:FontDialog"); m_pBtnUpdaterBackgroundColor.reset( new svx::ToolboxButtonColorUpdater( - SID_BACKGROUND_COLOR, m_nBackgroundColorId, m_pActions ) ); + SID_BACKGROUND_COLOR, m_nBackgroundColorId, m_pActions, false, + m_pActions->GetItemText( m_nBackgroundColorId ) ) ); m_pBtnUpdaterFontColor.reset( new svx::ToolboxButtonColorUpdater( - SID_ATTR_CHAR_COLOR2, m_nFontColorId, m_pActions ) ); + SID_ATTR_CHAR_COLOR2, m_nFontColorId, m_pActions, false, + m_pActions->GetItemText( m_nFontColorId ) ) ); Show(); @@ -238,7 +240,8 @@ IMPL_LINK(Condition, DropdownClick, ToolBox*, pToolBox, void) IMPL_LINK_NOARG( Condition, OnFormatAction, ToolBox*, void ) { - ApplyCommand(mapToolbarItemToSlotId(m_pActions->GetCurItemId()),COL_AUTO); + ApplyCommand(mapToolbarItemToSlotId(m_pActions->GetCurItemId()), + NamedColor(COL_AUTO, "#" + COL_AUTO.AsRGBHexString())); } IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton, void ) @@ -253,14 +256,14 @@ IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton, void ) m_rAction.deleteCondition( getConditionIndex() ); } -void Condition::ApplyCommand( sal_uInt16 _nCommandId, const ::Color& _rColor) +void Condition::ApplyCommand( sal_uInt16 _nCommandId, const NamedColor& rNamedColor ) { if ( _nCommandId == SID_ATTR_CHAR_COLOR2 ) - m_pBtnUpdaterFontColor->Update( _rColor ); + m_pBtnUpdaterFontColor->Update( rNamedColor ); else if ( _nCommandId == SID_BACKGROUND_COLOR ) - m_pBtnUpdaterBackgroundColor->Update( _rColor ); + m_pBtnUpdaterBackgroundColor->Update( rNamedColor ); - m_rAction.applyCommand( m_nCondIndex, _nCommandId, _rColor ); + m_rAction.applyCommand( m_nCondIndex, _nCommandId, rNamedColor.first ); } void Condition::setImageList(sal_Int16 /*_eBitmapSet*/) diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx index 04e228707b22..ceca03281ecc 100644 --- a/reportdesign/source/ui/dlg/Condition.hxx +++ b/reportdesign/source/ui/dlg/Condition.hxx @@ -162,7 +162,7 @@ namespace rptui /** forward to the parent class */ - void ApplyCommand(sal_uInt16 _nCommandId, const ::Color& _aColor ); + void ApplyCommand( sal_uInt16 _nCommandId, const NamedColor& rNamedColor ); ::rptui::OReportController& getController() const { return m_rController; } |