LibreOffice Module sfx2 (master) 1
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
sfx2::sidebar::ResourceManager Class Reference

Read the content of the Sidebar.xcu file and provide access methods so that the sidebar can easily decide which content panels to display for a certain context. More...

#include <ResourceManager.hxx>

Classes

class  DeckContextDescriptor
 
class  PanelContextDescriptor
 

Public Types

typedef std::vector< DeckContextDescriptorDeckContextDescriptorContainer
 
typedef std::vector< PanelContextDescriptorPanelContextDescriptorContainer
 

Public Member Functions

 ResourceManager ()
 
 ~ResourceManager ()
 
std::shared_ptr< DeckDescriptorGetDeckDescriptor (std::u16string_view rsDeckId) const
 
std::shared_ptr< PanelDescriptorGetPanelDescriptor (std::u16string_view rsPanelId) const
 
void UpdateModel (const css::uno::Reference< css::frame::XModel > &xModel)
 
void InitDeckContext (const Context &rContex)
 
void SaveDecksSettings (const Context &rContext)
 
void SaveDeckSettings (const DeckDescriptor *pDeckDesc)
 
void SaveLastActiveDeck (const Context &rContext, const OUString &rActiveDeck)
 
void disposeDecks ()
 
const DeckContextDescriptorContainerGetMatchingDecks (DeckContextDescriptorContainer &rDeckDescriptors, const Context &rContext, const bool bIsDocumentReadOnly, const css::uno::Reference< css::frame::XController > &rxController)
 
const PanelContextDescriptorContainerGetMatchingPanels (PanelContextDescriptorContainer &rPanelDescriptors, const Context &rContext, std::u16string_view rsDeckId, const css::uno::Reference< css::frame::XController > &rxController)
 
const OUString & GetLastActiveDeck (const Context &rContext)
 
void SetLastActiveDeck (const Context &rContext, const OUString &rsDeckId)
 
void StorePanelExpansionState (std::u16string_view rsPanelId, const bool bExpansionState, const Context &rContext)
 Remember the expansions state per panel and context. More...
 

Private Types

typedef std::vector< std::shared_ptr< DeckDescriptor > > DeckContainer
 
typedef std::vector< std::shared_ptr< PanelDescriptor > > PanelContainer
 

Private Member Functions

void ReadDeckList ()
 
void ReadPanelList ()
 
void ReadLastActive ()
 
void ReadLegacyAddons (const css::uno::Reference< css::frame::XController > &rxController)
 
bool IsDeckEnabled (std::u16string_view rsDeckId, const Context &rContext, const css::uno::Reference< css::frame::XController > &rxController)
 
std::shared_ptr< DeckDescriptorImplGetDeckDescriptor (std::u16string_view rsDeckId) const
 
std::shared_ptr< PanelDescriptorImplGetPanelDescriptor (std::u16string_view rsPanelId) const
 

Static Private Member Functions

static void ReadContextList (const utl::OConfigurationNode &rNode, ContextList &rContextList, const OUString &rsDefaultMenuCommand)
 
static utl::OConfigurationTreeRoot GetLegacyAddonRootNode (const OUString &rsModuleName)
 
static void GetToolPanelNodeNames (std::vector< OUString > &rMatchingNames, const utl::OConfigurationTreeRoot &aRoot)
 

Private Attributes

DeckContainer maDecks
 
PanelContainer maPanels
 
std::set< OUString > maProcessedApplications
 
std::map< OUString, OUString > maLastActiveDecks
 

Detailed Description

Read the content of the Sidebar.xcu file and provide access methods so that the sidebar can easily decide which content panels to display for a certain context.

Definition at line 42 of file ResourceManager.hxx.

Member Typedef Documentation

◆ DeckContainer

typedef std::vector<std::shared_ptr<DeckDescriptor> > sfx2::sidebar::ResourceManager::DeckContainer
private

Definition at line 103 of file ResourceManager.hxx.

◆ DeckContextDescriptorContainer

Definition at line 67 of file ResourceManager.hxx.

◆ PanelContainer

typedef std::vector<std::shared_ptr<PanelDescriptor> > sfx2::sidebar::ResourceManager::PanelContainer
private

Definition at line 106 of file ResourceManager.hxx.

◆ PanelContextDescriptorContainer

Definition at line 77 of file ResourceManager.hxx.

Constructor & Destructor Documentation

◆ ResourceManager()

sfx2::sidebar::ResourceManager::ResourceManager ( )

Definition at line 102 of file ResourceManager.cxx.

References ReadDeckList(), ReadLastActive(), and ReadPanelList().

◆ ~ResourceManager()

sfx2::sidebar::ResourceManager::~ResourceManager ( )

Definition at line 109 of file ResourceManager.cxx.

Member Function Documentation

◆ disposeDecks()

void sfx2::sidebar::ResourceManager::disposeDecks ( )

Definition at line 795 of file ResourceManager.cxx.

References maDecks.

◆ GetDeckDescriptor()

std::shared_ptr< DeckDescriptor > sfx2::sidebar::ResourceManager::GetDeckDescriptor ( std::u16string_view  rsDeckId) const

◆ GetLastActiveDeck()

const OUString & sfx2::sidebar::ResourceManager::GetLastActiveDeck ( const Context rContext)

◆ GetLegacyAddonRootNode()

utl::OConfigurationTreeRoot sfx2::sidebar::ResourceManager::GetLegacyAddonRootNode ( const OUString &  rsModuleName)
staticprivate

◆ GetMatchingDecks()

const ResourceManager::DeckContextDescriptorContainer & sfx2::sidebar::ResourceManager::GetMatchingDecks ( DeckContextDescriptorContainer rDeckDescriptors,
const Context rContext,
const bool  bIsDocumentReadOnly,
const css::uno::Reference< css::frame::XController > &  rxController 
)

◆ GetMatchingPanels()

const ResourceManager::PanelContextDescriptorContainer & sfx2::sidebar::ResourceManager::GetMatchingPanels ( PanelContextDescriptorContainer rPanelDescriptors,
const Context rContext,
std::u16string_view  rsDeckId,
const css::uno::Reference< css::frame::XController > &  rxController 
)

◆ GetPanelDescriptor()

std::shared_ptr< PanelDescriptor > sfx2::sidebar::ResourceManager::GetPanelDescriptor ( std::u16string_view  rsPanelId) const

◆ GetToolPanelNodeNames()

void sfx2::sidebar::ResourceManager::GetToolPanelNodeNames ( std::vector< OUString > &  rMatchingNames,
const utl::OConfigurationTreeRoot aRoot 
)
staticprivate

Definition at line 746 of file ResourceManager.cxx.

References utl::OConfigurationNode::getNodeNames().

Referenced by ReadLegacyAddons().

◆ ImplGetDeckDescriptor()

std::shared_ptr< DeckDescriptor > sfx2::sidebar::ResourceManager::ImplGetDeckDescriptor ( std::u16string_view  rsDeckId) const
private

Definition at line 129 of file ResourceManager.cxx.

References maDecks.

Referenced by GetDeckDescriptor().

◆ ImplGetPanelDescriptor()

std::shared_ptr< PanelDescriptor > sfx2::sidebar::ResourceManager::ImplGetPanelDescriptor ( std::u16string_view  rsPanelId) const
private

Definition at line 146 of file ResourceManager.cxx.

References maPanels.

Referenced by GetPanelDescriptor().

◆ InitDeckContext()

void sfx2::sidebar::ResourceManager::InitDeckContext ( const Context rContex)

◆ IsDeckEnabled()

bool sfx2::sidebar::ResourceManager::IsDeckEnabled ( std::u16string_view  rsDeckId,
const Context rContext,
const css::uno::Reference< css::frame::XController > &  rxController 
)
private

Definition at line 755 of file ResourceManager.cxx.

References GetMatchingPanels().

Referenced by GetMatchingDecks().

◆ ReadContextList()

void sfx2::sidebar::ResourceManager::ReadContextList ( const utl::OConfigurationNode rNode,
ContextList rContextList,
const OUString &  rsDefaultMenuCommand 
)
staticprivate

◆ ReadDeckList()

void sfx2::sidebar::ResourceManager::ReadDeckList ( )
private

◆ ReadLastActive()

void sfx2::sidebar::ResourceManager::ReadLastActive ( )
private

◆ ReadLegacyAddons()

void sfx2::sidebar::ResourceManager::ReadLegacyAddons ( const css::uno::Reference< css::frame::XController > &  rxController)
private

◆ ReadPanelList()

void sfx2::sidebar::ResourceManager::ReadPanelList ( )
private

◆ SaveDeckSettings()

void sfx2::sidebar::ResourceManager::SaveDeckSettings ( const DeckDescriptor pDeckDesc)

◆ SaveDecksSettings()

void sfx2::sidebar::ResourceManager::SaveDecksSettings ( const Context rContext)

Definition at line 294 of file ResourceManager.cxx.

References GetDeckDescriptor(), maDecks, and SaveDeckSettings().

◆ SaveLastActiveDeck()

void sfx2::sidebar::ResourceManager::SaveLastActiveDeck ( const Context rContext,
const OUString &  rActiveDeck 
)

◆ SetLastActiveDeck()

void sfx2::sidebar::ResourceManager::SetLastActiveDeck ( const Context rContext,
const OUString &  rsDeckId 
)

◆ StorePanelExpansionState()

void sfx2::sidebar::ResourceManager::StorePanelExpansionState ( std::u16string_view  rsPanelId,
const bool  bExpansionState,
const Context rContext 
)

Remember the expansions state per panel and context.

Definition at line 706 of file ResourceManager.cxx.

References maPanels, and sfx2::sidebar::ContextList::Entry::mbIsInitiallyVisible.

Referenced by sfx2::sidebar::Panel::SetExpanded().

◆ UpdateModel()

void sfx2::sidebar::ResourceManager::UpdateModel ( const css::uno::Reference< css::frame::XModel > &  xModel)

Definition at line 775 of file ResourceManager.cxx.

References maDecks, and xModel.

Member Data Documentation

◆ maDecks

DeckContainer sfx2::sidebar::ResourceManager::maDecks
private

◆ maLastActiveDecks

std::map<OUString, OUString> sfx2::sidebar::ResourceManager::maLastActiveDecks
private

◆ maPanels

PanelContainer sfx2::sidebar::ResourceManager::maPanels
private

◆ maProcessedApplications

std::set<OUString> sfx2::sidebar::ResourceManager::maProcessedApplications
mutableprivate

Definition at line 108 of file ResourceManager.hxx.

Referenced by ReadLegacyAddons().


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