diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-02-17 11:11:44 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-02-21 01:39:37 +0200 |
commit | 096637c9570654437e9f5e12a614fdcefc23ae3a (patch) | |
tree | edbeb9d409ba554f14b94669e3e9522b2e12505f /include | |
parent | 33c51e8002f58847ba43bc111dabc49278e36daf (diff) |
CommandInfoProvider can be a namespace
Change-Id: I8b56423724360f49e1f361cb95056b391a9a3a42
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/commandinfoprovider.hxx | 68 |
1 files changed, 17 insertions, 51 deletions
diff --git a/include/vcl/commandinfoprovider.hxx b/include/vcl/commandinfoprovider.hxx index 2a3eaea347ad..d254ee3e0c55 100644 --- a/include/vcl/commandinfoprovider.hxx +++ b/include/vcl/commandinfoprovider.hxx @@ -20,27 +20,11 @@ #define INCLUDED_VCL_COMMANDINFOPROVIDER_HXX #include <vcl/dllapi.h> -#include <vcl/keycod.hxx> #include <vcl/image.hxx> #include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/ui/XAcceleratorConfiguration.hpp> -using namespace css; -using namespace css::uno; - - -namespace vcl { - -/** Provides information about UNO commands like tooltip text with - keyboard accelerator. -*/ -class VCL_DLLPUBLIC CommandInfoProvider -{ -public: - CommandInfoProvider(); - ~CommandInfoProvider(); +namespace vcl { namespace CommandInfoProvider { /** Return a label for the given command. @param rsCommandName @@ -48,17 +32,17 @@ public: @param rxFrame The frame is used to identify the module and document. @return - The command labe. + The command label. */ - static OUString GetLabelForCommand ( + VCL_DLLPUBLIC OUString GetLabelForCommand ( const OUString& rsCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame); - static OUString GetMenuLabelForCommand ( + VCL_DLLPUBLIC OUString GetMenuLabelForCommand ( const OUString& rsCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame); - static OUString GetPopupLabelForCommand ( + VCL_DLLPUBLIC OUString GetPopupLabelForCommand ( const OUString& rsCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame); @@ -71,61 +55,43 @@ public: The returned label contains the keyboard accelerator, if one is defined and bIncludeShortcut is true. */ - static OUString GetTooltipForCommand ( + VCL_DLLPUBLIC OUString GetTooltipForCommand ( const OUString& rsCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame); /** Returns the shortcut for a command in human-readable form */ - static OUString GetCommandShortcut (const OUString& rCommandName, + VCL_DLLPUBLIC OUString GetCommandShortcut (const OUString& rCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame); - static OUString GetRealCommandForCommand( const OUString& rCommandName, + VCL_DLLPUBLIC OUString GetRealCommandForCommand( const OUString& rCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame ); - static OUString GetCommandPropertyFromModule( const OUString& rCommandName, const OUString& rModuleName ); + VCL_DLLPUBLIC OUString GetCommandPropertyFromModule( const OUString& rCommandName, const OUString& rModuleName ); - static BitmapEx GetBitmapForCommand( + VCL_DLLPUBLIC BitmapEx GetBitmapForCommand( const OUString& rsCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame, vcl::ImageType eImageType = vcl::ImageType::Small); - static Image GetImageForCommand( + VCL_DLLPUBLIC Image GetImageForCommand( const OUString& rsCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame, vcl::ImageType eImageType = vcl::ImageType::Small); - static sal_Int32 GetPropertiesForCommand( + VCL_DLLPUBLIC sal_Int32 GetPropertiesForCommand( const OUString& rsCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame); - static bool IsRotated(const OUString& rsCommandName,const Reference<frame::XFrame>& rxFrame); - static bool IsMirrored(const OUString& rsCommandName, const Reference<frame::XFrame>& rxFrame); + VCL_DLLPUBLIC bool IsRotated(const OUString& rsCommandName,const css::uno::Reference<css::frame::XFrame>& rxFrame); + VCL_DLLPUBLIC bool IsMirrored(const OUString& rsCommandName, const css::uno::Reference<css::frame::XFrame>& rxFrame); /** Returns whether the command is experimental. */ - static bool IsExperimental( + VCL_DLLPUBLIC bool IsExperimental( const OUString& rsCommandName, const OUString& rModuleName); - /** Do not call. Should be part of a local and hidden interface. - */ - static void SetFrame (const css::uno::Reference<css::frame::XFrame>& rxFrame); - - private: - static css::uno::Reference<css::ui::XAcceleratorConfiguration> const GetDocumentAcceleratorConfiguration(const Reference<frame::XFrame>& rxFrame); - static css::uno::Reference<css::ui::XAcceleratorConfiguration> const GetModuleAcceleratorConfiguration(const Reference<frame::XFrame>& rxFrame); - static css::uno::Reference<css::ui::XAcceleratorConfiguration> const GetGlobalAcceleratorConfiguration(); - static OUString const GetModuleIdentifier(const Reference<frame::XFrame>& rxFrame); - static css::uno::Sequence<css::beans::PropertyValue> GetCommandProperties ( - const OUString& rsCommandName, const Reference<frame::XFrame>& rxFrame); - static OUString GetCommandProperty(const OUString& rsProperty, const OUString& rsCommandName,const Reference<frame::XFrame>& rxFrame); - static bool ResourceHasKey(const OUString& rsResourceName, const OUString& rsCommandName, const Reference<frame::XFrame>& rxFrame); - static OUString RetrieveShortcutsFromConfiguration( - const css::uno::Reference<css::ui::XAcceleratorConfiguration>& rxConfiguration, - const OUString& rsCommandName); - static vcl::KeyCode AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey); -}; - -} // end of namespace vcl + VCL_DLLPUBLIC OUString const GetModuleIdentifier(const css::uno::Reference<css::frame::XFrame>& rxFrame); +} } #endif // INCLUDED_VCL_COMMANDINFOPROVIDER_HXX |