summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-05-26 11:32:25 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2014-05-27 17:23:36 +0300
commit426033250db0b9b6344980655ca0be59efe6a6a5 (patch)
tree4f3ecec5e563fcbe2c5e52d095c0f2cab646a0c1 /reportdesign
parent209eea5457fc40d9f013fb1c041f184b8dd4676a (diff)
reportdesign: Fix applying the last used color
The last used color is stored inside SvxColorToolBoxControl, so we must call its Select method to do that. (This also fixes using the last shape, See commit ce842113ae728e8995c7c5398204a20d0707e843 for a fix of exactly the same problem in chart2.) For the font color, there was also another problem: The SID used for that button is SID_ATTR_CHAR_COLOR2. The problem is that SvxColorToolBoxControl::Select actually calls for that SID the ".uno:CharColorExt" command instead of ".uno:FontColor" (which activates in writer the format paintbrush mode). Given that since commit 584b415924bba22db23a4258062e54973de0ed7c this command also receives the last used color as argument, the easiest solution is to register ".uno:CharColorExt" here as well. Change-Id: I2db25a7fb537ce10dfec7b1c2d049dd77d9f8f6b
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/inc/toolboxcontroller.hxx1
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx6
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx2
3 files changed, 9 insertions, 0 deletions
diff --git a/reportdesign/source/ui/inc/toolboxcontroller.hxx b/reportdesign/source/ui/inc/toolboxcontroller.hxx
index a4a668c1994f..b005b42d193e 100644
--- a/reportdesign/source/ui/inc/toolboxcontroller.hxx
+++ b/reportdesign/source/ui/inc/toolboxcontroller.hxx
@@ -71,6 +71,7 @@ namespace rptui
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
// XToolbarController
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XSubToolbarController
virtual sal_Bool SAL_CALL opensSubToolbar( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index 2bdbd25a9c45..66335da45a22 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -276,6 +276,12 @@ Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw
return xRet;
}
+void SAL_CALL OToolboxController::execute( sal_Int16 KeyModifier ) throw (uno::RuntimeException, std::exception)
+{
+ if ( m_pToolbarController.is() )
+ m_pToolbarController.getRef()->execute( KeyModifier );
+}
+
sal_Bool SAL_CALL OToolboxController::opensSubToolbar() throw (uno::RuntimeException, std::exception)
{
return ( m_nSlotId == SID_DRAWTBX_CS_BASIC ||
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index c4f709aeb508..1b391814587a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1462,6 +1462,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
break;
case SID_ATTR_CHAR_COLOR:
case SID_ATTR_CHAR_COLOR2:
+ case SID_ATTR_CHAR_COLOR_EXT:
{
const SequenceAsHashMap aMap(aArgs);
const util::Color aColor = aMap.getUnpackedValueOrDefault(PROPERTY_FONTCOLOR,util::Color());
@@ -1857,6 +1858,7 @@ void OReportController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:Underline", SID_ATTR_CHAR_UNDERLINE, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:BackColor", SID_ATTR_CHAR_COLOR_BACKGROUND, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:BackgroundColor", SID_BACKGROUND_COLOR, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:CharColorExt", SID_ATTR_CHAR_COLOR_EXT);
implDescribeSupportedFeature( ".uno:Color", SID_ATTR_CHAR_COLOR);
implDescribeSupportedFeature( ".uno:FontColor", SID_ATTR_CHAR_COLOR2, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:FontDialog", SID_CHAR_DLG, CommandGroup::FORMAT );