[Libreoffice-commits] core.git: Branch 'feature/cib_contract3756' - framework/source
Serge Krot (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 27 11:17:53 UTC 2019
framework/source/uielement/complextoolbarcontroller.cxx | 18 ++++++++++++++-
framework/source/uielement/generictoolbarcontroller.cxx | 19 ++++++++++++++++
2 files changed, 36 insertions(+), 1 deletion(-)
New commits:
commit 092273919e1adec93617b08ebf1d44088301365c
Author: Serge Krot <Serge.Krot at cib.de>
AuthorDate: Fri Sep 27 10:18:40 2019 +0200
Commit: Serge Krot (CIB) <Serge.Krot at cib.de>
CommitDate: Fri Sep 27 13:16:54 2019 +0200
Add ability to set tooltip text for toolbar controls
Change-Id: I994b9cee248900786e0d386bd648bd1d64aeeff7
Reviewed-on: https://gerrit.libreoffice.org/79676
Reviewed-by: Serge Krot (CIB) <Serge.Krot at cib.de>
Tested-by: Serge Krot (CIB) <Serge.Krot at cib.de>
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
old mode 100644
new mode 100755
index 0ad8f8e01723..51ede7a9a9b4
--- 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
old mode 100644
new mode 100755
index 0049006c9099..c49e73369adc
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -182,6 +182,7 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event )
OUString aStrValue;
ItemStatus aItemState;
Visibility aItemVisibility;
+ ControlCommand aControlCommand;
if (( Event.State >>= bValue ) && !m_bEnumCommand )
{
@@ -244,6 +245,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 );
More information about the Libreoffice-commits
mailing list