diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-25 11:21:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-26 16:46:55 +0100 |
commit | b509d72a79a8c64d03ea8f91c69c58a24e0b2dc7 (patch) | |
tree | 97770ab005aac451b4c34a1fae562a3d579adb1f /include | |
parent | ea31d3cc8566eeb9d3dbf55b385d8c619daaddf9 (diff) |
tdf#126043 fetch the command properties just once
Change-Id: Iaf343e9858be36ca8772d9c12eee772d93b4c394
Reviewed-on: https://gerrit.libreoffice.org/83668
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/83763
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/commandinfoprovider.hxx | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/include/vcl/commandinfoprovider.hxx b/include/vcl/commandinfoprovider.hxx index 8b5bac1a5c31..5327434cb168 100644 --- a/include/vcl/commandinfoprovider.hxx +++ b/include/vcl/commandinfoprovider.hxx @@ -24,6 +24,10 @@ namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } } +namespace com { namespace sun { namespace star { + namespace beans { struct PropertyValue; } +} } } + namespace vcl { namespace CommandInfoProvider { /** Return a label for the given command. @@ -32,23 +36,27 @@ namespace vcl { namespace CommandInfoProvider { @param rsModuleName The current application module. @return + The command properties. + */ + VCL_DLLPUBLIC css::uno::Sequence<css::beans::PropertyValue> GetCommandProperties(const OUString& rsCommandName, const OUString& rsModuleName); + + /** Return a label for the given command. + @param rProperties + The properties from GetCommandProperties. + @return The command label. */ - VCL_DLLPUBLIC OUString GetLabelForCommand ( - const OUString& rsCommandName, - const OUString& rsModuleName); + VCL_DLLPUBLIC OUString GetLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties); - VCL_DLLPUBLIC OUString GetMenuLabelForCommand ( - const OUString& rsCommandName, - const OUString& rsModuleName); + VCL_DLLPUBLIC OUString GetMenuLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties); - VCL_DLLPUBLIC OUString GetPopupLabelForCommand ( - const OUString& rsCommandName, - const OUString& rsModuleName); + VCL_DLLPUBLIC OUString GetPopupLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties); /** Return a tooltip for the given command. Falls back to label if command has no tooltip. @param rsCommandName The command name is expected to start with .uno: + @param rProperties + The properties from GetCommandProperties. @param rxFrame The frame is used to identify the module and document. @return @@ -57,14 +65,14 @@ namespace vcl { namespace CommandInfoProvider { */ VCL_DLLPUBLIC OUString GetTooltipForCommand ( const OUString& rsCommandName, + const css::uno::Sequence<css::beans::PropertyValue>& rProperties, const css::uno::Reference<css::frame::XFrame>& rxFrame); /** Returns the shortcut for a command in human-readable form */ VCL_DLLPUBLIC OUString GetCommandShortcut (const OUString& rCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame); - VCL_DLLPUBLIC OUString GetRealCommandForCommand( const OUString& rCommandName, - const OUString& rsModuleName ); + VCL_DLLPUBLIC OUString GetRealCommandForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties); VCL_DLLPUBLIC css::uno::Reference<css::graphic::XGraphic> GetXGraphicForCommand( const OUString& rsCommandName, |