LibreOffice Module vbahelper (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
VbaCommandBarHelper Class Reference

#include <vbacommandbarhelper.hxx>

Public Member Functions

 VbaCommandBarHelper (css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Reference< css::frame::XModel > xModel)
 
const css::uno::Reference< css::frame::XModel > & getModel () const
 
const css::uno::Reference< css::container::XNameAccess > & getPersistentWindowState () const
 
css::uno::Reference< css::container::XIndexAccess > getSettings (const OUString &sResourceUrl)
 
void removeSettings (const OUString &sResourceUrl)
 
void ApplyTempChange (const OUString &sResourceUrl, const css::uno::Reference< css::container::XIndexAccess > &xSettings)
 
css::uno::Reference< css::frame::XLayoutManager > getLayoutManager () const
 
const OUString & getModuleId () const
 
OUString findToolbarByName (const css::uno::Reference< css::container::XNameAccess > &xNameAccess, const OUString &sName)
 

Static Public Member Functions

static sal_Int32 findControlByName (const css::uno::Reference< css::container::XIndexAccess > &xIndexAccess, std::u16string_view sName, bool bMenu)
 
static OUString generateCustomURL ()
 

Private Member Functions

void Init ()
 
bool hasToolbar (const OUString &sResourceUrl, std::u16string_view sName)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > mxContext
 
css::uno::Reference< css::frame::XModel > mxModel
 
css::uno::Reference< css::ui::XUIConfigurationManager > m_xDocCfgMgr
 
css::uno::Reference< css::ui::XUIConfigurationManager > m_xAppCfgMgr
 
css::uno::Reference< css::container::XNameAccess > m_xWindowState
 
OUString maModuleId
 

Detailed Description

Definition at line 49 of file vbacommandbarhelper.hxx.

Constructor & Destructor Documentation

◆ VbaCommandBarHelper()

VbaCommandBarHelper::VbaCommandBarHelper ( css::uno::Reference< css::uno::XComponentContext >  xContext,
css::uno::Reference< css::frame::XModel >  xModel 
)
Exceptions
css::uno::RuntimeException

Definition at line 88 of file vbacommandbarhelper.cxx.

References Init(), mxContext, mxModel, and xModel.

Member Function Documentation

◆ ApplyTempChange()

void VbaCommandBarHelper::ApplyTempChange ( const OUString &  sResourceUrl,
const css::uno::Reference< css::container::XIndexAccess > &  xSettings 
)
Exceptions
css::uno::RuntimeException

Definition at line 146 of file vbacommandbarhelper.cxx.

References m_xDocCfgMgr.

◆ findControlByName()

sal_Int32 VbaCommandBarHelper::findControlByName ( const css::uno::Reference< css::container::XIndexAccess > &  xIndexAccess,
std::u16string_view  sName,
bool  bMenu 
)
static
Exceptions
css::uno::RuntimeException

Definition at line 205 of file vbacommandbarhelper.cxx.

References aBuffer, o3tl::equalsIgnoreAsciiCase(), ooo::vba::getPropertyValue(), i, index, ITEM_DESCRIPTOR_LABEL, nCount, SAL_INFO, and sName.

Referenced by ScVbaCommandBarControls::Item().

◆ findToolbarByName()

OUString VbaCommandBarHelper::findToolbarByName ( const css::uno::Reference< css::container::XNameAccess > &  xNameAccess,
const OUString &  sName 
)
Exceptions
css::uno::RuntimeException

Definition at line 180 of file vbacommandbarhelper.cxx.

References hasToolbar(), pName, and sName.

◆ generateCustomURL()

OUString VbaCommandBarHelper::generateCustomURL ( )
static

◆ getLayoutManager()

uno::Reference< frame::XLayoutManager > VbaCommandBarHelper::getLayoutManager ( ) const
Exceptions
css::uno::RuntimeException

Definition at line 158 of file vbacommandbarhelper.cxx.

References getModel(), and xFrame.

◆ getModel()

const css::uno::Reference< css::frame::XModel > & VbaCommandBarHelper::getModel ( ) const
inline

Definition at line 67 of file vbacommandbarhelper.hxx.

References mxModel.

Referenced by getLayoutManager().

◆ getModuleId()

const OUString & VbaCommandBarHelper::getModuleId ( ) const
inline

Definition at line 84 of file vbacommandbarhelper.hxx.

References maModuleId.

◆ getPersistentWindowState()

const css::uno::Reference< css::container::XNameAccess > & VbaCommandBarHelper::getPersistentWindowState ( ) const
inline
Exceptions
css::uno::RuntimeException

Definition at line 70 of file vbacommandbarhelper.hxx.

References m_xWindowState.

◆ getSettings()

css::uno::Reference< css::container::XIndexAccess > VbaCommandBarHelper::getSettings ( const OUString &  sResourceUrl)
Exceptions
css::uno::RuntimeException

Definition at line 123 of file vbacommandbarhelper.cxx.

References m_xAppCfgMgr, and m_xDocCfgMgr.

◆ hasToolbar()

bool VbaCommandBarHelper::hasToolbar ( const OUString &  sResourceUrl,
std::u16string_view  sName 
)
private
Exceptions
css::uno::RuntimeException

Definition at line 166 of file vbacommandbarhelper.cxx.

References o3tl::equalsIgnoreAsciiCase(), ITEM_DESCRIPTOR_UINAME, m_xDocCfgMgr, and sName.

Referenced by findToolbarByName().

◆ Init()

void VbaCommandBarHelper::Init ( void  )
private
Exceptions
css::uno::RuntimeException

Definition at line 93 of file vbacommandbarhelper.cxx.

References m_xAppCfgMgr, m_xDocCfgMgr, m_xWindowState, maModuleId, mxContext, and mxModel.

Referenced by VbaCommandBarHelper().

◆ removeSettings()

void VbaCommandBarHelper::removeSettings ( const OUString &  sResourceUrl)
Exceptions
css::uno::RuntimeException

Definition at line 136 of file vbacommandbarhelper.cxx.

References m_xAppCfgMgr, and m_xDocCfgMgr.

Member Data Documentation

◆ m_xAppCfgMgr

css::uno::Reference< css::ui::XUIConfigurationManager > VbaCommandBarHelper::m_xAppCfgMgr
private

Definition at line 55 of file vbacommandbarhelper.hxx.

Referenced by getSettings(), Init(), and removeSettings().

◆ m_xDocCfgMgr

css::uno::Reference< css::ui::XUIConfigurationManager > VbaCommandBarHelper::m_xDocCfgMgr
private

◆ m_xWindowState

css::uno::Reference< css::container::XNameAccess > VbaCommandBarHelper::m_xWindowState
private

Definition at line 56 of file vbacommandbarhelper.hxx.

Referenced by getPersistentWindowState(), and Init().

◆ maModuleId

OUString VbaCommandBarHelper::maModuleId
private

Definition at line 57 of file vbacommandbarhelper.hxx.

Referenced by getModuleId(), and Init().

◆ mxContext

css::uno::Reference< css::uno::XComponentContext > VbaCommandBarHelper::mxContext
private

Definition at line 52 of file vbacommandbarhelper.hxx.

Referenced by Init().

◆ mxModel

css::uno::Reference< css::frame::XModel > VbaCommandBarHelper::mxModel
private

Definition at line 53 of file vbacommandbarhelper.hxx.

Referenced by getModel(), and Init().


The documentation for this class was generated from the following files: