diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-05-26 11:32:25 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2014-05-29 22:34:36 +0300 |
commit | 1e3c5480cd28afa1a3d80b2c9a96d4497389bf06 (patch) | |
tree | 2a56a28b123d51edbad6125cdea78c090b47e828 /svx | |
parent | fd21291c60cb9e6bde10c9d230abfc4258b65dae (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
previous commit 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.
(cherry picked from commit 426033250db0b9b6344980655ca0be59efe6a6a5)
Change-Id: I2db25a7fb537ce10dfec7b1c2d049dd77d9f8f6b
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/tbxcustomshapes.cxx | 6 |
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 ); } } |