LibreOffice Module framework (master) 1
|
TODO document me. More...
#include <storageholder.hxx>
Classes | |
struct | TStorageInfo |
Public Types | |
typedef ::std::vector< css::uno::Reference< css::embed::XStorage > > | TStorageList |
TODO. More... | |
typedef ::std::vector< XMLBasedAcceleratorConfiguration * > | TStorageListenerList |
typedef std::unordered_map< OUString, TStorageInfo > | TPath2StorageInfo |
TODO. More... | |
Public Member Functions | |
StorageHolder () | |
TODO. More... | |
~StorageHolder () | |
TODO. More... | |
void | forgetCachedStorages () |
TODO. More... | |
void | setRootStorage (const css::uno::Reference< css::embed::XStorage > &xRoot) |
TODO. More... | |
css::uno::Reference< css::embed::XStorage > | getRootStorage () const |
TODO. More... | |
css::uno::Reference< css::embed::XStorage > | openPath (const OUString &sPath, sal_Int32 nOpenMode) |
TODO open or get! More... | |
StorageHolder::TStorageList | getAllPathStorages (const OUString &sPath) |
TODO. More... | |
void | commitPath (const OUString &sPath) |
TODO. More... | |
void | closePath (const OUString &sPath) |
TODO. More... | |
void | notifyPath (const OUString &sPath) |
TODO. More... | |
void | addStorageListener (XMLBasedAcceleratorConfiguration *pListener, const OUString &sPath) |
TODO. More... | |
void | removeStorageListener (XMLBasedAcceleratorConfiguration *pListener, const OUString &sPath) |
TODO. More... | |
OUString | getPathOfStorage (const css::uno::Reference< css::embed::XStorage > &xStorage) |
TODO. More... | |
css::uno::Reference< css::embed::XStorage > | getParentStorage (const css::uno::Reference< css::embed::XStorage > &xChild) |
TODO. More... | |
css::uno::Reference< css::embed::XStorage > | getParentStorage (const OUString &sChildPath) |
TODO. More... | |
StorageHolder & | operator= (const StorageHolder &rCopy) |
TODO. More... | |
Static Public Member Functions | |
static css::uno::Reference< css::embed::XStorage > | openSubStorageWithFallback (const css::uno::Reference< css::embed::XStorage > &xBaseStorage, const OUString &sSubStorage, sal_Int32 eOpenMode) |
opens a sub element of the specified base storage. More... | |
Static Private Member Functions | |
static OUString | impl_st_normPath (const OUString &sPath) |
TODO. More... | |
static std::vector< OUString > | impl_st_parsePath (std::u16string_view sPath) |
TODO. More... | |
Private Attributes | |
std::mutex | m_mutex |
css::uno::Reference< css::embed::XStorage > | m_xRoot |
TODO. More... | |
TPath2StorageInfo | m_lStorages |
TODO. More... | |
TODO document me.
Definition at line 35 of file storageholder.hxx.
typedef std::unordered_map< OUString, TStorageInfo > framework::StorageHolder::TPath2StorageInfo |
TODO.
Definition at line 60 of file storageholder.hxx.
typedef ::std::vector< css::uno::Reference< css::embed::XStorage > > framework::StorageHolder::TStorageList |
TODO.
Definition at line 42 of file storageholder.hxx.
typedef ::std::vector< XMLBasedAcceleratorConfiguration* > framework::StorageHolder::TStorageListenerList |
Definition at line 44 of file storageholder.hxx.
framework::StorageHolder::StorageHolder | ( | ) |
TODO.
Definition at line 39 of file storageholder.cxx.
framework::StorageHolder::~StorageHolder | ( | ) |
TODO.
Definition at line 43 of file storageholder.cxx.
void framework::StorageHolder::addStorageListener | ( | XMLBasedAcceleratorConfiguration * | pListener, |
const OUString & | sPath | ||
) |
TODO.
Definition at line 267 of file storageholder.cxx.
References impl_st_normPath(), framework::StorageHolder::TStorageInfo::Listener, m_lStorages, and m_mutex.
Referenced by framework::PresetHandler::addStorageListener().
void framework::StorageHolder::closePath | ( | const OUString & | sPath | ) |
TODO.
Definition at line 209 of file storageholder.cxx.
References impl_st_normPath(), impl_st_parsePath(), m_lStorages, m_mutex, PATH_SEPARATOR, framework::StorageHolder::TStorageInfo::Storage, and framework::StorageHolder::TStorageInfo::UseCount.
void framework::StorageHolder::commitPath | ( | const OUString & | sPath | ) |
TODO.
Definition at line 182 of file storageholder.cxx.
References getAllPathStorages(), m_mutex, and m_xRoot.
Referenced by framework::PresetHandler::commitUserChanges().
void framework::StorageHolder::forgetCachedStorages | ( | ) |
TODO.
Definition at line 49 of file storageholder.cxx.
References m_lStorages, m_mutex, and framework::StorageHolder::TStorageInfo::Storage.
Referenced by framework::PresetHandler::forgetCachedStorages(), and framework::PresetHandler::~PresetHandler().
StorageHolder::TStorageList framework::StorageHolder::getAllPathStorages | ( | const OUString & | sPath | ) |
TODO.
Definition at line 150 of file storageholder.cxx.
References impl_st_normPath(), impl_st_parsePath(), m_lStorages, m_mutex, PATH_SEPARATOR, and framework::StorageHolder::TStorageInfo::Storage.
Referenced by commitPath().
css::uno::Reference< css::embed::XStorage > framework::StorageHolder::getParentStorage | ( | const css::uno::Reference< css::embed::XStorage > & | xChild | ) |
TODO.
Definition at line 315 of file storageholder.cxx.
References getParentStorage(), and getPathOfStorage().
Referenced by getParentStorage().
css::uno::Reference< css::embed::XStorage > framework::StorageHolder::getParentStorage | ( | const OUString & | sChildPath | ) |
TODO.
Definition at line 321 of file storageholder.cxx.
References i, impl_st_normPath(), impl_st_parsePath(), m_lStorages, m_mutex, m_xRoot, PATH_SEPARATOR, and SAL_INFO.
OUString framework::StorageHolder::getPathOfStorage | ( | const css::uno::Reference< css::embed::XStorage > & | xStorage | ) |
TODO.
Definition at line 301 of file storageholder.cxx.
References m_lStorages, m_mutex, and framework::StorageHolder::TStorageInfo::Storage.
Referenced by framework::PresetHandler::commitUserChanges(), and getParentStorage().
css::uno::Reference< css::embed::XStorage > framework::StorageHolder::getRootStorage | ( | ) | const |
|
staticprivate |
TODO.
Definition at line 411 of file storageholder.cxx.
References PATH_SEPARATOR, and PATH_SEPARATOR_UNICODE.
Referenced by addStorageListener(), closePath(), getAllPathStorages(), getParentStorage(), notifyPath(), openPath(), and removeStorageListener().
|
staticprivate |
TODO.
Definition at line 431 of file storageholder.cxx.
References o3tl::getToken(), i, and PATH_SEPARATOR_UNICODE.
Referenced by closePath(), getAllPathStorages(), getParentStorage(), and openPath().
void framework::StorageHolder::notifyPath | ( | const OUString & | sPath | ) |
TODO.
Definition at line 249 of file storageholder.cxx.
References impl_st_normPath(), framework::StorageHolder::TStorageInfo::Listener, m_lStorages, and m_mutex.
Referenced by framework::PresetHandler::commitUserChanges().
css::uno::Reference< css::embed::XStorage > framework::StorageHolder::openPath | ( | const OUString & | sPath, |
sal_Int32 | nOpenMode | ||
) |
TODO open or get!
Definition at line 73 of file storageholder.cxx.
References impl_st_normPath(), impl_st_parsePath(), m_lStorages, m_mutex, m_xRoot, openSubStorageWithFallback(), PATH_SEPARATOR, framework::StorageHolder::TStorageInfo::Storage, and framework::StorageHolder::TStorageInfo::UseCount.
Referenced by framework::PresetHandler::connectToResource().
|
static |
opens a sub element of the specified base storage.
If eOpenMode contains an ELEMENT_WRITE flag remove it and try it with the rest of eOpenMode flags again.
@descr First this method try to open the requested sub element using the given open mode. If it failed there is second step, which tries to do the same again ... but removing a might existing WRITE flag from the open mode. The user can suppress this fallback handling by setting the parameter bAllowFallback to sal_False.
xBaseStorage | the storage, where the sub element should be searched. |
sSubElement | the full name of the sub element. e.g. "default.xml" |
eOpenMode | a flag field, which set the open mode for this operation. |
Definition at line 371 of file storageholder.cxx.
References eOpenMode, and SAL_INFO.
Referenced by openPath().
StorageHolder & framework::StorageHolder::operator= | ( | const StorageHolder & | rCopy | ) |
TODO.
Definition at line 363 of file storageholder.cxx.
References m_lStorages, m_mutex, and m_xRoot.
void framework::StorageHolder::removeStorageListener | ( | XMLBasedAcceleratorConfiguration * | pListener, |
const OUString & | sPath | ||
) |
TODO.
Definition at line 284 of file storageholder.cxx.
References impl_st_normPath(), framework::StorageHolder::TStorageInfo::Listener, m_lStorages, and m_mutex.
Referenced by framework::PresetHandler::removeStorageListener().
void framework::StorageHolder::setRootStorage | ( | const css::uno::Reference< css::embed::XStorage > & | xRoot | ) |
TODO.
Definition at line 61 of file storageholder.cxx.
References m_mutex, and m_xRoot.
Referenced by framework::PresetHandler::connectToResource().
|
private |
TODO.
Definition at line 70 of file storageholder.hxx.
Referenced by addStorageListener(), closePath(), forgetCachedStorages(), getAllPathStorages(), getParentStorage(), getPathOfStorage(), notifyPath(), openPath(), operator=(), and removeStorageListener().
|
mutableprivate |
Definition at line 64 of file storageholder.hxx.
Referenced by addStorageListener(), closePath(), commitPath(), forgetCachedStorages(), getAllPathStorages(), getParentStorage(), getPathOfStorage(), getRootStorage(), notifyPath(), openPath(), operator=(), removeStorageListener(), and setRootStorage().
|
private |
TODO.
Definition at line 67 of file storageholder.hxx.
Referenced by commitPath(), getParentStorage(), getRootStorage(), openPath(), operator=(), and setRootStorage().