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>

Public Member Functions

 SwGlossaries ()
 
 ~SwGlossaries ()
 
css::uno::Reference< css::text::XAutoTextGroup > GetAutoTextGroup (std::u16string_view _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 (std::u16string_view GroupName)
 
bool NewGroupDoc (OUString &rGroupName, const OUString &rTitle)
 
bool RenameGroupDoc (const OUString &sOldGroup, OUString &sNewGroup, const OUString &rNewTitle)
 
bool DelGroupDoc (std::u16string_view)
 
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 47 of file glosdoc.hxx.

Constructor & Destructor Documentation

◆ SwGlossaries()

SwGlossaries::SwGlossaries ( )

Definition at line 328 of file glosdoc.cxx.

References UpdateGlosPath().

◆ ~SwGlossaries()

SwGlossaries::~SwGlossaries ( )

Definition at line 264 of file glosdoc.cxx.

References InvalidateUNOOjects().

Member Function Documentation

◆ DelGroupDoc()

bool SwGlossaries::DelGroupDoc ( std::u16string_view  rName)

◆ EditGroupDoc()

SwDocShellRef SwGlossaries::EditGroupDoc ( const OUString &  rGrpName,
const OUString &  rShortName,
bool  bShow = true 
)

◆ FindGroupName()

bool SwGlossaries::FindGroupName ( OUString &  rGroup)

◆ GetAutoTextEntry()

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

@precond 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 571 of file glosdoc.cxx.

References GetDefName(), GetGroupDoc(), and m_aGlossaryEntries.

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

◆ GetAutoTextGroup()

Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup ( std::u16string_view  _rGroupName)

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

@precond 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 521 of file glosdoc.cxx.

References GetCompleteGroupName(), and m_aGlossaryGroups.

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

◆ GetCompleteGroupName()

OUString SwGlossaries::GetCompleteGroupName ( std::u16string_view  GroupName)

◆ GetDefName()

OUString SwGlossaries::GetDefName ( )
static

Definition at line 91 of file glosdoc.cxx.

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

◆ GetExtension()

OUString SwGlossaries::GetExtension ( )
static

Definition at line 419 of file glosdoc.cxx.

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

◆ GetGlosDoc()

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

◆ GetGroupCnt()

size_t SwGlossaries::GetGroupCnt ( )

◆ GetGroupDoc()

std::unique_ptr< SwTextBlocks > SwGlossaries::GetGroupDoc ( const OUString &  rName,
bool  bCreate = false 
)

◆ GetGroupName()

OUString const & SwGlossaries::GetGroupName ( size_t  nGroupId)

◆ GetGroupTitle()

OUString SwGlossaries::GetGroupTitle ( const OUString &  rGroupName)

Definition at line 143 of file glosdoc.cxx.

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

Referenced by SwXAutoTextGroup::setName().

◆ GetNameList()

std::vector< OUString > & SwGlossaries::GetNameList ( )
private

◆ GetPathArray()

std::vector< OUString > const & SwGlossaries::GetPathArray ( ) const
inline

Definition at line 124 of file glosdoc.hxx.

Referenced by IMPL_LINK_NOARG(), and SwGlossaryHdl::SetCurGroup().

◆ InvalidateUNOOjects()

void SwGlossaries::InvalidateUNOOjects ( )
private

Definition at line 500 of file glosdoc.cxx.

References m_aGlossaryEntries, and m_aGlossaryGroups.

Referenced by ~SwGlossaries().

◆ IsGlosPathErr()

bool SwGlossaries::IsGlosPathErr ( ) const
inline

Definition at line 123 of file glosdoc.hxx.

References m_bError.

Referenced by IMPL_LINK_NOARG().

◆ NewGroupDoc()

bool SwGlossaries::NewGroupDoc ( OUString &  rGroupName,
const OUString &  rTitle 
)

◆ RemoveFileFromList()

void SwGlossaries::RemoveFileFromList ( const OUString &  rGroup)
private

Definition at line 424 of file glosdoc.cxx.

References m_aGlossaryEntries, m_aGlossaryGroups, and m_GlosArr.

Referenced by DelGroupDoc(), and RenameGroupDoc().

◆ RenameGroupDoc()

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

◆ ShowError()

void SwGlossaries::ShowError ( )

Definition at line 412 of file glosdoc.cxx.

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

Referenced by IMPL_LINK_NOARG().

◆ UpdateGlosPath()

void SwGlossaries::UpdateGlosPath ( bool  bFull)

Member Data Documentation

◆ m_aGlossaryEntries

UnoAutoTextEntries SwGlossaries::m_aGlossaryEntries
private

Definition at line 50 of file glosdoc.hxx.

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

◆ m_aGlossaryGroups

UnoAutoTextGroups SwGlossaries::m_aGlossaryGroups
private

Definition at line 49 of file glosdoc.hxx.

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

◆ m_aInvalidPaths

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

Definition at line 53 of file glosdoc.hxx.

Referenced by ShowError(), and UpdateGlosPath().

◆ m_aPath

OUString SwGlossaries::m_aPath
private

Definition at line 52 of file glosdoc.hxx.

Referenced by UpdateGlosPath().

◆ m_bError

bool SwGlossaries::m_bError
private

Definition at line 56 of file glosdoc.hxx.

Referenced by UpdateGlosPath().

◆ m_GlosArr

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

◆ m_PathArr

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

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