diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2022-07-05 01:03:07 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2022-07-05 13:40:53 +0200 |
commit | b0a3245c63a2f77ce761ebd11820b341969a48b4 (patch) | |
tree | cf02464796e29e3ae8295e5c56965a5ff6194cff /framework/source | |
parent | 18dacc47b212bec440a5f729a2787aa91db89b44 (diff) |
tdf#149741 Mirror insert column icons for RTL tables
The usual approach of setting the respective property
in *Commands.xcu won't work here, as that works with
the paragraph direction, which doesn't have to be the
same as the table direction.
Change-Id: I9c4d49a5c553a8a74e7760d257167a0be42c89c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136818
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/uielement/generictoolbarcontroller.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 25f2e0157e9e..e8e49cb30933 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/frame/ControlCommand.hpp> #include <comphelper/propertyvalue.hxx> +#include <svl/imageitm.hxx> #include <vcl/commandinfoprovider.hxx> #include <vcl/svapp.hxx> #include <vcl/toolbox.hxx> @@ -218,6 +219,7 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event ) ItemStatus aItemState; Visibility aItemVisibility; ControlCommand aControlCommand; + SfxImageItem aImageItem; if (( Event.State >>= bValue ) && !m_bEnumCommand ) { @@ -293,6 +295,12 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event ) if ( m_bMadeInvisible ) m_xToolbar->ShowItem( m_nID ); } + else if ( aImageItem.PutValue( Event.State, 0 ) ) + { + m_xToolbar->SetItemImageMirrorMode( m_nID, aImageItem.IsMirrored() ); + if ( m_bMadeInvisible ) + m_xToolbar->ShowItem( m_nID ); + } else if ( m_bMadeInvisible ) m_xToolbar->ShowItem( m_nID ); |