LibreOffice Module vcl (master) 1
Functions
vcl::CommandInfoProvider Namespace Reference

Functions

static Reference< container::XNameAccess > GetCommandDescription ()
 
static Reference< ui::XModuleUIConfigurationManagerSupplier > GetModuleConfigurationSupplier ()
 
static Reference< ui::XAcceleratorConfiguration > GetGlobalAcceleratorConfiguration ()
 
static Reference< ui::XAcceleratorConfiguration > GetDocumentAcceleratorConfiguration (const Reference< frame::XFrame > &rxFrame)
 
static Reference< ui::XAcceleratorConfiguration > GetModuleAcceleratorConfiguration (const Reference< frame::XFrame > &rxFrame)
 
static vcl::KeyCode AWTKey2VCLKey (const awt::KeyEvent &aAWTKey)
 
static OUString RetrieveShortcutsFromConfiguration (const Reference< ui::XAcceleratorConfiguration > &rxConfiguration, const OUString &rsCommandName)
 
static vcl::KeyCode RetrieveKeyCodeShortcutsFromConfiguration (const Reference< ui::XAcceleratorConfiguration > &rxConfiguration, const OUString &rsCommandName)
 
static bool ResourceHasKey (const OUString &rsResourceName, const OUString &rsCommandName, const OUString &rsModuleName)
 
Sequence< beans::PropertyValue > GetCommandProperties (const OUString &rsCommandName, const OUString &rsModuleName)
 Return a label for the given command. More...
 
static OUString GetCommandProperty (const OUString &rsProperty, const Sequence< beans::PropertyValue > &rProperties)
 
OUString GetLabelForCommand (const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
 Return a label for the given command. More...
 
OUString GetMenuLabelForCommand (const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
 
OUString GetPopupLabelForCommand (const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
 
OUString GetTooltipLabelForCommand (const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
 
OUString GetTooltipForCommand (const OUString &rsCommandName, const css::uno::Sequence< css::beans::PropertyValue > &rProperties, const Reference< frame::XFrame > &rxFrame)
 
OUString GetCommandShortcut (const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame)
 
vcl::KeyCode GetCommandKeyCodeShortcut (const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame)
 
OUString GetRealCommandForCommand (const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
 
Reference< graphic::XGraphic > GetXGraphicForCommand (const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame, vcl::ImageType eImageType)
 
Image GetImageForCommand (const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame, vcl::ImageType eImageType)
 
sal_Int32 GetPropertiesForCommand (const OUString &rsCommandName, const OUString &rsModuleName)
 
bool IsRotated (const OUString &rsCommandName, const OUString &rsModuleName)
 
bool IsMirrored (const OUString &rsCommandName, const OUString &rsModuleName)
 
bool IsExperimental (const OUString &rsCommandName, const OUString &rModuleName)
 Returns whether the command is experimental. More...
 
OUString GetModuleIdentifier (const Reference< frame::XFrame > &rxFrame)
 
VCL_DLLPUBLIC OUString GetTooltipForCommand (const OUString &rsCommandName, const css::uno::Sequence< css::beans::PropertyValue > &rProperties, const css::uno::Reference< css::frame::XFrame > &rxFrame)
 Return a tooltip for the given command. More...
 
VCL_DLLPUBLIC OUString GetCommandShortcut (const OUString &rCommandName, const css::uno::Reference< css::frame::XFrame > &rxFrame)
 Returns the shortcut for a command in human-readable form. More...
 
VCL_DLLPUBLIC KeyCode GetCommandKeyCodeShortcut (const OUString &rCommandName, const css::uno::Reference< css::frame::XFrame > &rxFrame)
 
VCL_DLLPUBLIC css::uno::Reference< css::graphic::XGraphic > GetXGraphicForCommand (const OUString &rsCommandName, const css::uno::Reference< css::frame::XFrame > &rxFrame, vcl::ImageType eImageType=vcl::ImageType::Small)
 
VCL_DLLPUBLIC Image GetImageForCommand (const OUString &rsCommandName, const css::uno::Reference< css::frame::XFrame > &rxFrame, vcl::ImageType eImageType=vcl::ImageType::Small)
 
VCL_DLLPUBLIC OUString GetModuleIdentifier (const css::uno::Reference< css::frame::XFrame > &rxFrame)
 

Function Documentation

◆ AWTKey2VCLKey()

static vcl::KeyCode vcl::CommandInfoProvider::AWTKey2VCLKey ( const awt::KeyEvent &  aAWTKey)
static

◆ GetCommandDescription()

static Reference< container::XNameAccess > vcl::CommandInfoProvider::GetCommandDescription ( )
static

◆ GetCommandKeyCodeShortcut() [1/2]

VCL_DLLPUBLIC KeyCode vcl::CommandInfoProvider::GetCommandKeyCodeShortcut ( const OUString &  rCommandName,
const css::uno::Reference< css::frame::XFrame > &  rxFrame 
)

◆ GetCommandKeyCodeShortcut() [2/2]

vcl::KeyCode vcl::CommandInfoProvider::GetCommandKeyCodeShortcut ( const OUString &  rsCommandName,
const Reference< frame::XFrame > &  rxFrame 
)

◆ GetCommandProperties()

VCL_DLLPUBLIC css::uno::Sequence< css::beans::PropertyValue > vcl::CommandInfoProvider::GetCommandProperties ( const OUString &  rsCommandName,
const OUString &  rsModuleName 
)

Return a label for the given command.

Parameters
rsCommandNameThe command name is expected to start with .uno:
rsModuleNameThe current application module.
Returns
The command properties.

Definition at line 211 of file commandinfoprovider.cxx.

References aProperties, Exception, and GetCommandDescription().

Referenced by GetPropertiesForCommand(), and ToolBox::InsertItem().

◆ GetCommandProperty()

static OUString vcl::CommandInfoProvider::GetCommandProperty ( const OUString &  rsProperty,
const Sequence< beans::PropertyValue > &  rProperties 
)
static

◆ GetCommandShortcut() [1/2]

VCL_DLLPUBLIC OUString vcl::CommandInfoProvider::GetCommandShortcut ( const OUString &  rCommandName,
const css::uno::Reference< css::frame::XFrame > &  rxFrame 
)

Returns the shortcut for a command in human-readable form.

◆ GetCommandShortcut() [2/2]

OUString vcl::CommandInfoProvider::GetCommandShortcut ( const OUString &  rsCommandName,
const Reference< frame::XFrame > &  rxFrame 
)

◆ GetDocumentAcceleratorConfiguration()

static Reference< ui::XAcceleratorConfiguration > vcl::CommandInfoProvider::GetDocumentAcceleratorConfiguration ( const Reference< frame::XFrame > &  rxFrame)
static

Definition at line 85 of file commandinfoprovider.cxx.

References xController.

Referenced by GetCommandKeyCodeShortcut(), and GetCommandShortcut().

◆ GetGlobalAcceleratorConfiguration()

static Reference< ui::XAcceleratorConfiguration > vcl::CommandInfoProvider::GetGlobalAcceleratorConfiguration ( )
static

◆ GetImageForCommand() [1/2]

VCL_DLLPUBLIC Image vcl::CommandInfoProvider::GetImageForCommand ( const OUString &  rsCommandName,
const css::uno::Reference< css::frame::XFrame > &  rxFrame,
vcl::ImageType  eImageType = vcl::ImageType::Small 
)

◆ GetImageForCommand() [2/2]

Image vcl::CommandInfoProvider::GetImageForCommand ( const OUString &  rsCommandName,
const Reference< frame::XFrame > &  rxFrame,
vcl::ImageType  eImageType 
)

Definition at line 398 of file commandinfoprovider.cxx.

References GetXGraphicForCommand().

Referenced by CreateNotebookBarToolBox(), and ToolBox::InsertItem().

◆ GetLabelForCommand()

VCL_DLLPUBLIC OUString vcl::CommandInfoProvider::GetLabelForCommand ( const css::uno::Sequence< css::beans::PropertyValue > &  rProperties)

Return a label for the given command.

Parameters
rPropertiesThe properties from GetCommandProperties.
Returns
The command label.

Definition at line 245 of file commandinfoprovider.cxx.

References GetCommandProperty().

Referenced by ToolBox::InsertItem().

◆ GetMenuLabelForCommand()

VCL_DLLPUBLIC OUString vcl::CommandInfoProvider::GetMenuLabelForCommand ( const css::uno::Sequence< css::beans::PropertyValue > &  rProperties)

Definition at line 250 of file commandinfoprovider.cxx.

References GetCommandProperty().

◆ GetModuleAcceleratorConfiguration()

static Reference< ui::XAcceleratorConfiguration > vcl::CommandInfoProvider::GetModuleAcceleratorConfiguration ( const Reference< frame::XFrame > &  rxFrame)
static

◆ GetModuleConfigurationSupplier()

static Reference< ui::XModuleUIConfigurationManagerSupplier > vcl::CommandInfoProvider::GetModuleConfigurationSupplier ( )
static

◆ GetModuleIdentifier() [1/2]

VCL_DLLPUBLIC OUString vcl::CommandInfoProvider::GetModuleIdentifier ( const css::uno::Reference< css::frame::XFrame > &  rxFrame)

◆ GetModuleIdentifier() [2/2]

OUString vcl::CommandInfoProvider::GetModuleIdentifier ( const Reference< frame::XFrame > &  rxFrame)

◆ GetPopupLabelForCommand()

VCL_DLLPUBLIC OUString vcl::CommandInfoProvider::GetPopupLabelForCommand ( const css::uno::Sequence< css::beans::PropertyValue > &  rProperties)

Definition at line 257 of file commandinfoprovider.cxx.

References GetCommandProperty().

Referenced by GetTooltipForCommand().

◆ GetPropertiesForCommand()

VCL_DLLPUBLIC sal_Int32 vcl::CommandInfoProvider::GetPropertiesForCommand ( const OUString &  rsCommandName,
const OUString &  rsModuleName 
)

Definition at line 405 of file commandinfoprovider.cxx.

References aProperties, GetCommandProperties(), and nValue.

◆ GetRealCommandForCommand()

VCL_DLLPUBLIC OUString vcl::CommandInfoProvider::GetRealCommandForCommand ( const css::uno::Sequence< css::beans::PropertyValue > &  rProperties)

Definition at line 335 of file commandinfoprovider.cxx.

References GetCommandProperty().

Referenced by GetTooltipForCommand().

◆ GetTooltipForCommand() [1/2]

VCL_DLLPUBLIC OUString vcl::CommandInfoProvider::GetTooltipForCommand ( const OUString &  rsCommandName,
const css::uno::Sequence< css::beans::PropertyValue > &  rProperties,
const css::uno::Reference< css::frame::XFrame > &  rxFrame 
)

Return a tooltip for the given command.

Falls back to label if command has no tooltip.

Parameters
rsCommandNameThe command name is expected to start with .uno:
rPropertiesThe properties from GetCommandProperties.
rxFrameThe frame is used to identify the module and document.
Returns
The returned label contains the keyboard accelerator, if one is defined and bIncludeShortcut is true.

◆ GetTooltipForCommand() [2/2]

OUString vcl::CommandInfoProvider::GetTooltipForCommand ( const OUString &  rsCommandName,
const css::uno::Sequence< css::beans::PropertyValue > &  rProperties,
const Reference< frame::XFrame > &  rxFrame 
)

◆ GetTooltipLabelForCommand()

VCL_DLLPUBLIC OUString vcl::CommandInfoProvider::GetTooltipLabelForCommand ( const css::uno::Sequence< css::beans::PropertyValue > &  rProperties)

Definition at line 265 of file commandinfoprovider.cxx.

References GetCommandProperty().

◆ GetXGraphicForCommand() [1/2]

VCL_DLLPUBLIC css::uno::Reference< css::graphic::XGraphic > vcl::CommandInfoProvider::GetXGraphicForCommand ( const OUString &  rsCommandName,
const css::uno::Reference< css::frame::XFrame > &  rxFrame,
vcl::ImageType  eImageType = vcl::ImageType::Small 
)

◆ GetXGraphicForCommand() [2/2]

Reference< graphic::XGraphic > vcl::CommandInfoProvider::GetXGraphicForCommand ( const OUString &  rsCommandName,
const Reference< frame::XFrame > &  rxFrame,
vcl::ImageType  eImageType 
)

◆ IsExperimental()

VCL_DLLPUBLIC bool vcl::CommandInfoProvider::IsExperimental ( const OUString &  rsCommandName,
const OUString &  rModuleName 
)

Returns whether the command is experimental.

Definition at line 430 of file commandinfoprovider.cxx.

References aProperties, Exception, and GetCommandDescription().

◆ IsMirrored()

VCL_DLLPUBLIC bool vcl::CommandInfoProvider::IsMirrored ( const OUString &  rsCommandName,
const OUString &  rsModuleName 
)

Definition at line 425 of file commandinfoprovider.cxx.

References ResourceHasKey().

Referenced by ToolBox::statusChanged().

◆ IsRotated()

VCL_DLLPUBLIC bool vcl::CommandInfoProvider::IsRotated ( const OUString &  rsCommandName,
const OUString &  rsModuleName 
)

Definition at line 420 of file commandinfoprovider.cxx.

References ResourceHasKey().

Referenced by ToolBox::statusChanged().

◆ ResourceHasKey()

static bool vcl::CommandInfoProvider::ResourceHasKey ( const OUString &  rsResourceName,
const OUString &  rsCommandName,
const OUString &  rsModuleName 
)
static

Definition at line 188 of file commandinfoprovider.cxx.

References Exception, comphelper::findValue(), and GetCommandDescription().

Referenced by IsMirrored(), and IsRotated().

◆ RetrieveKeyCodeShortcutsFromConfiguration()

static vcl::KeyCode vcl::CommandInfoProvider::RetrieveKeyCodeShortcutsFromConfiguration ( const Reference< ui::XAcceleratorConfiguration > &  rxConfiguration,
const OUString &  rsCommandName 
)
static

Definition at line 161 of file commandinfoprovider.cxx.

References AWTKey2VCLKey().

Referenced by GetCommandKeyCodeShortcut().

◆ RetrieveShortcutsFromConfiguration()

static OUString vcl::CommandInfoProvider::RetrieveShortcutsFromConfiguration ( const Reference< ui::XAcceleratorConfiguration > &  rxConfiguration,
const OUString &  rsCommandName 
)
static

Definition at line 134 of file commandinfoprovider.cxx.

References AWTKey2VCLKey(), and vcl::KeyCode::GetName().

Referenced by GetCommandShortcut().