summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/customshapes/tbxcustomshapes.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/customshapes/tbxcustomshapes.cxx b/svx/source/customshapes/tbxcustomshapes.cxx
index f91d2e3a4f0d..4a8fff2d7f9e 100644
--- a/svx/source/customshapes/tbxcustomshapes.cxx
+++ b/svx/source/customshapes/tbxcustomshapes.cxx
@@ -128,11 +128,13 @@ SfxPopupWindow* SvxTbxCtlCustomShapes::CreatePopupWindow()
-void SvxTbxCtlCustomShapes::Select(sal_uInt16 /*nSelectModifier*/)
+void SvxTbxCtlCustomShapes::Select(sal_uInt16 nSelectModifier)
{
if ( !m_aCommand.isEmpty() )
{
- com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aParamSeq( 0 );
+ com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aParamSeq( 1 );
+ aParamSeq[0].Name = "KeyModifier";
+ aParamSeq[0].Value <<= static_cast< sal_Int16 >( nSelectModifier );
Dispatch( m_aCommand, aParamSeq );
}
}