diff options
Diffstat (limited to 'framework')
-rwxr-xr-x[-rw-r--r--] | framework/source/uielement/complextoolbarcontroller.cxx | 18 | ||||
-rwxr-xr-x[-rw-r--r--] | framework/source/uielement/generictoolbarcontroller.cxx | 20 |
2 files changed, 37 insertions, 1 deletions
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index 0ad8f8e01723..51ede7a9a9b4 100644..100755 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -175,7 +175,23 @@ void ComplexToolbarController::statusChanged( const FeatureStateEvent& Event ) } else if ( Event.State >>= aControlCommand ) { - executeControlCommand( aControlCommand ); + if (aControlCommand.Command == "SetQuickHelpText") + { + for (sal_Int32 i = 0; i < aControlCommand.Arguments.getLength(); i++) + { + if (aControlCommand.Arguments[i].Name == "HelpText") + { + OUString aHelpText; + aControlCommand.Arguments[i].Value >>= aHelpText; + m_pToolbar->SetQuickHelpText(m_nID, aHelpText); + break; + } + } + } + else + { + executeControlCommand( aControlCommand ); + } if ( m_bMadeInvisible ) m_pToolbar->ShowItem( m_nID ); } diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 62cc898f9c8f..a657efd3cc88 100644..100755 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/frame/status/Visibility.hpp> #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp> +#include <com/sun/star/frame/ControlCommand.hpp> #include <svtools/toolboxcontroller.hxx> #include <vcl/svapp.hxx> @@ -182,6 +183,7 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event ) OUString aStrValue; ItemStatus aItemState; Visibility aItemVisibility; + ControlCommand aControlCommand; if (( Event.State >>= bValue ) && !m_bEnumCommand ) { @@ -239,6 +241,24 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event ) m_pToolbar->ShowItem( m_nID, aItemVisibility.bVisible ); m_bMadeInvisible = !aItemVisibility.bVisible; } + else if ( Event.State >>= aControlCommand ) + { + if (aControlCommand.Command == "SetQuickHelpText") + { + for (sal_Int32 i = 0; i < aControlCommand.Arguments.getLength(); i++) + { + if (aControlCommand.Arguments[i].Name == "HelpText") + { + OUString aHelpText; + aControlCommand.Arguments[i].Value >>= aHelpText; + m_pToolbar->SetQuickHelpText(m_nID, aHelpText); + break; + } + } + } + if ( m_bMadeInvisible ) + m_pToolbar->ShowItem( m_nID ); + } else if ( m_bMadeInvisible ) m_pToolbar->ShowItem( m_nID ); |