LibreOffice Module svtools (master) 1
|
Public Member Functions | |
TemplateFolderCacheImpl (bool _bAutoStoreState) | |
~TemplateFolderCacheImpl () | |
bool | needsUpdate () |
void | storeState () |
Private Member Functions | |
bool | openCacheStream (bool _bForRead) |
void | closeCacheStream () |
bool | readPreviousState () |
read the state of the dirs from the cache file More... | |
bool | readCurrentState () |
read the current state of the dirs More... | |
bool | implReadFolder (const ::rtl::Reference< TemplateContent > &_rxRoot) |
const uno::Reference< util::XOfficeInstallationDirectories > & | getOfficeInstDirs () |
Static Private Member Functions | |
static OUString | implParseSmart (const OUString &_rPath) |
static sal_Int32 | getMagicNumber () |
static void | normalize (TemplateFolderContent &_rState) |
static bool | equalStates (const TemplateFolderContent &_rLHS, const TemplateFolderContent &_rRHS) |
Private Attributes | |
TemplateFolderContent | m_aPreviousState |
TemplateFolderContent | m_aCurrentState |
std::mutex | m_aMutex |
uno::Reference< util::XOfficeInstallationDirectories > | m_xOfficeInstDirs |
std::unique_ptr< SvStream > | m_pCacheStream |
bool | m_bNeedsUpdate: 1 |
bool | m_bKnowState: 1 |
bool | m_bValidCurrentState: 1 |
bool | m_bAutoStoreState: 1 |
Definition at line 379 of file templatefoldercache.cxx.
|
explicit |
Definition at line 426 of file templatefoldercache.cxx.
svt::TemplateFolderCacheImpl::~TemplateFolderCacheImpl | ( | ) |
Definition at line 435 of file templatefoldercache.cxx.
References closeCacheStream(), m_bAutoStoreState, m_bValidCurrentState, and storeState().
|
private |
Definition at line 523 of file templatefoldercache.cxx.
References m_pCacheStream.
Referenced by needsUpdate(), openCacheStream(), and ~TemplateFolderCacheImpl().
|
staticprivate |
Definition at line 460 of file templatefoldercache.cxx.
Referenced by needsUpdate().
|
staticprivate |
Definition at line 445 of file templatefoldercache.cxx.
Referenced by readPreviousState(), and storeState().
|
private |
Definition at line 751 of file templatefoldercache.cxx.
References comphelper::getProcessComponentContext(), m_aMutex, and m_xOfficeInstDirs.
Referenced by readCurrentState(), readPreviousState(), and storeState().
|
staticprivate |
Definition at line 508 of file templatefoldercache.cxx.
References INetURLObject::GetMainURL(), INetURLObject::GetProtocol(), INetURLObject::SetSmartProtocol(), INetURLObject::SetURL(), and INetURLObject::ToIUri.
Referenced by openCacheStream().
|
private |
Definition at line 529 of file templatefoldercache.cxx.
References ucbhelper::Content::createDynamicCursor(), Exception, comphelper::getProcessComponentContext(), implReadFolder(), and TOOLS_WARN_EXCEPTION.
Referenced by implReadFolder(), and readCurrentState().
bool svt::TemplateFolderCacheImpl::needsUpdate | ( | ) |
Definition at line 723 of file templatefoldercache.cxx.
References closeCacheStream(), equalStates(), m_aCurrentState, m_aPreviousState, m_bKnowState, m_bNeedsUpdate, openCacheStream(), readCurrentState(), and readPreviousState().
|
staticprivate |
Definition at line 454 of file templatefoldercache.cxx.
Referenced by readCurrentState(), and readPreviousState().
|
private |
Definition at line 690 of file templatefoldercache.cxx.
References INetURLObject::Append(), closeCacheStream(), DBG_ASSERT, INetURLObject::GetMainURL(), INetURLObject::GetProtocol(), implParseSmart(), m_pCacheStream, INetURLObject::ToIUri, and u.
Referenced by needsUpdate(), and storeState().
|
private |
read the current state of the dirs
Definition at line 597 of file templatefoldercache.cxx.
References SvtPathOptions::ExpandMacros(), getOfficeInstDirs(), SvtPathOptions::GetTemplatePath(), implReadFolder(), m_aCurrentState, m_bValidCurrentState, nIndex, and normalize().
Referenced by needsUpdate(), and storeState().
|
private |
read the state of the dirs from the cache file
Definition at line 643 of file templatefoldercache.cxx.
References DBG_ASSERT, getMagicNumber(), getOfficeInstDirs(), m_aPreviousState, m_pCacheStream, nMagic, and normalize().
Referenced by needsUpdate().
void svt::TemplateFolderCacheImpl::storeState | ( | ) |
Definition at line 479 of file templatefoldercache.cxx.
References getMagicNumber(), getOfficeInstDirs(), m_aCurrentState, m_bValidCurrentState, m_pCacheStream, openCacheStream(), and readCurrentState().
Referenced by ~TemplateFolderCacheImpl().
|
private |
Definition at line 383 of file templatefoldercache.cxx.
Referenced by needsUpdate(), readCurrentState(), and storeState().
|
private |
Definition at line 385 of file templatefoldercache.cxx.
Referenced by getOfficeInstDirs().
|
private |
Definition at line 382 of file templatefoldercache.cxx.
Referenced by needsUpdate(), and readPreviousState().
|
private |
Definition at line 393 of file templatefoldercache.cxx.
Referenced by ~TemplateFolderCacheImpl().
|
private |
Definition at line 391 of file templatefoldercache.cxx.
Referenced by needsUpdate().
|
private |
Definition at line 390 of file templatefoldercache.cxx.
Referenced by needsUpdate().
|
private |
Definition at line 392 of file templatefoldercache.cxx.
Referenced by readCurrentState(), storeState(), and ~TemplateFolderCacheImpl().
|
private |
Definition at line 389 of file templatefoldercache.cxx.
Referenced by closeCacheStream(), openCacheStream(), readPreviousState(), and storeState().
|
private |
Definition at line 387 of file templatefoldercache.cxx.
Referenced by getOfficeInstDirs().