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

#include <glosdoc.hxx>

Collaboration diagram for SwGlossaries:
[legend]

Public Member Functions

 SwGlossaries ()
 
 ~SwGlossaries ()
 
css::uno::Reference< css::text::XAutoTextGroup > GetAutoTextGroup (const OUString &_rGroupName)
 returns the cached AutoTextGroup (if any) for the given group name The group is created if it does not yet exist More...
 
css::uno::Reference< css::text::XAutoTextEntry > GetAutoTextEntry (const OUString &_rCompleteGroupName, const OUString &_rGroupName, const OUString &_rEntryName)
 returns the cached AutoTextEntry (if any) for the given group/with the given name The entry is created if it does not yet exist More...
 
size_t GetGroupCnt ()
 
OUString const & GetGroupName (size_t)
 
OUString GetGroupTitle (const OUString &rGroupName)
 
bool FindGroupName (OUString &rGroup)
 
std::unique_ptr< SwTextBlocksGetGroupDoc (const OUString &rName, bool bCreate=false)
 
OUString GetCompleteGroupName (const OUString &GroupName)
 
bool NewGroupDoc (OUString &rGroupName, const OUString &rTitle)
 
bool RenameGroupDoc (const OUString &sOldGroup, OUString &sNewGroup, const OUString &rNewTitle)
 
bool DelGroupDoc (const OUString &)
 
SwDocShellRef EditGroupDoc (const OUString &rGrpName, const OUString &rShortName, bool bShow=true)
 
void UpdateGlosPath (bool bFull)
 
void ShowError ()
 
bool IsGlosPathErr () const
 
std::vector< OUString > const & GetPathArray () const
 

Static Public Member Functions

static OUString GetDefName ()
 
static OUString GetExtension ()
 

Private Member Functions

SAL_DLLPRIVATE std::unique_ptr< SwTextBlocksGetGlosDoc (const OUString &rName, bool bCreate=true) const
 
SAL_DLLPRIVATE std::vector< OUString > & GetNameList ()
 
SAL_DLLPRIVATE void RemoveFileFromList (const OUString &rGroup)
 
SAL_DLLPRIVATE void InvalidateUNOOjects ()
 

Private Attributes

UnoAutoTextGroups m_aGlossaryGroups
 
UnoAutoTextEntries m_aGlossaryEntries
 
OUString m_aPath
 
std::vector< OUString > m_aInvalidPaths
 
std::vector< OUString > m_PathArr
 
std::vector< OUString > m_GlosArr
 
bool m_bError
 

Detailed Description

Definition at line 43 of file glosdoc.hxx.

Constructor & Destructor Documentation

SwGlossaries::SwGlossaries ( )

Definition at line 329 of file glosdoc.cxx.

References UpdateGlosPath().

SwGlossaries::~SwGlossaries ( )

Definition at line 265 of file glosdoc.cxx.

References InvalidateUNOOjects().

Member Function Documentation

bool SwGlossaries::DelGroupDoc ( const OUString &  rName)
SwDocShellRef SwGlossaries::EditGroupDoc ( const OUString &  rGrpName,
const OUString &  rShortName,
bool  bShow = true 
)
bool SwGlossaries::FindGroupName ( OUString &  rGroup)
Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry ( const OUString &  _rCompleteGroupName,
const OUString &  _rGroupName,
const OUString &  _rEntryName 
)

returns the cached AutoTextEntry (if any) for the given group/with the given name The entry is created if it does not yet exist

If <arg>_bCreate</arg> is <TRUE>, the SolarMutex must be locked when calling into this method.

Parameters
_rGroupAccessNamethe name to access the group
_rGroupNamethe name of the glossaries group, as to be passed to the entry
_rEntryNamethe name of the auto text entry

Definition at line 574 of file glosdoc.cxx.

References GetDefName(), GetGroupDoc(), SwXAutoTextEntry::getUnoTunnelId(), m_aGlossaryEntries, and USHRT_MAX.

Referenced by SwXAutoTextGroup::getByName(), and SwXAutoTextGroup::insertNewByName().

Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup ( const OUString &  _rGroupName)

returns the cached AutoTextGroup (if any) for the given group name The group is created if it does not yet exist

If <arg>_bCreate</arg> is <TRUE>, the SolarMutex must be locked when calling into this method.

Parameters
_rGroupNamethe name of the glossaries group

Definition at line 524 of file glosdoc.cxx.

References GetCompleteGroupName(), and m_aGlossaryGroups.

Referenced by SwXAutoTextContainer::getByName(), and SwXAutoTextContainer::insertNewByName().

OUString SwGlossaries::GetCompleteGroupName ( const OUString &  GroupName)
OUString SwGlossaries::GetDefName ( )
static

Definition at line 92 of file glosdoc.cxx.

Referenced by GetAutoTextEntry(), SwGlossaryDlg::GetCurrGroup(), and GetNameList().

OUString SwGlossaries::GetExtension ( )
static

Definition at line 420 of file glosdoc.cxx.

Referenced by GetNameList(), and SwGlossaryList::Update().

std::unique_ptr< SwTextBlocks > SwGlossaries::GetGlosDoc ( const OUString &  rName,
bool  bCreate = true 
) const
private

Definition at line 271 of file glosdoc.cxx.

References GLOS_DELIM, ErrorHandler::HandleError(), FStatHelper::IsDocument(), and m_PathArr.

Referenced by GetGroupDoc(), and NewGroupDoc().

size_t SwGlossaries::GetGroupCnt ( )
std::unique_ptr< SwTextBlocks > SwGlossaries::GetGroupDoc ( const OUString &  rName,
bool  bCreate = false 
)
OUString const & SwGlossaries::GetGroupName ( size_t  nGroupId)
OUString SwGlossaries::GetGroupTitle ( const OUString &  rGroupName)

Definition at line 144 of file glosdoc.cxx.

References FindGroupName(), GetGroupDoc(), and GLOS_DELIM.

Referenced by SwXAutoTextGroup::setName().

std::vector< OUString > & SwGlossaries::GetNameList ( )
private
std::vector<OUString> const& SwGlossaries::GetPathArray ( ) const
inline
void SwGlossaries::InvalidateUNOOjects ( )
private

Definition at line 501 of file glosdoc.cxx.

References m_aGlossaryEntries, and m_aGlossaryGroups.

Referenced by ~SwGlossaries().

bool SwGlossaries::IsGlosPathErr ( ) const
inline

Definition at line 119 of file glosdoc.hxx.

Referenced by IMPL_LINK_NOARG().

bool SwGlossaries::NewGroupDoc ( OUString &  rGroupName,
const OUString &  rTitle 
)
void SwGlossaries::RemoveFileFromList ( const OUString &  rGroup)
private

Definition at line 425 of file glosdoc.cxx.

References m_aGlossaryEntries, m_aGlossaryGroups, and m_GlosArr.

Referenced by DelGroupDoc(), and RenameGroupDoc().

bool SwGlossaries::RenameGroupDoc ( const OUString &  sOldGroup,
OUString &  sNewGroup,
const OUString &  rNewTitle 
)
void SwGlossaries::ShowError ( )

Definition at line 413 of file glosdoc.cxx.

References ERR_AUTOPATH_ERROR, ErrorHandler::HandleError(), lcl_makePath(), and m_aInvalidPaths.

Referenced by IMPL_LINK_NOARG().

void SwGlossaries::UpdateGlosPath ( bool  bFull)

Member Data Documentation

UnoAutoTextEntries SwGlossaries::m_aGlossaryEntries
private

Definition at line 46 of file glosdoc.hxx.

Referenced by GetAutoTextEntry(), InvalidateUNOOjects(), and RemoveFileFromList().

UnoAutoTextGroups SwGlossaries::m_aGlossaryGroups
private

Definition at line 45 of file glosdoc.hxx.

Referenced by GetAutoTextGroup(), InvalidateUNOOjects(), and RemoveFileFromList().

std::vector<OUString> SwGlossaries::m_aInvalidPaths
private

Definition at line 49 of file glosdoc.hxx.

Referenced by ShowError(), and UpdateGlosPath().

OUString SwGlossaries::m_aPath
private

Definition at line 48 of file glosdoc.hxx.

Referenced by UpdateGlosPath().

bool SwGlossaries::m_bError
private

Definition at line 52 of file glosdoc.hxx.

Referenced by UpdateGlosPath().

std::vector<OUString> SwGlossaries::m_GlosArr
private
std::vector<OUString> SwGlossaries::m_PathArr
private

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