LibreOffice Module sw (master) 1
|
#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< SwTextBlocks > | GetGroupDoc (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< SwTextBlocks > | GetGlosDoc (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 |
Definition at line 47 of file glosdoc.hxx.
SwGlossaries::SwGlossaries | ( | ) |
Definition at line 328 of file glosdoc.cxx.
References UpdateGlosPath().
SwGlossaries::~SwGlossaries | ( | ) |
Definition at line 264 of file glosdoc.cxx.
References InvalidateUNOOjects().
bool SwGlossaries::DelGroupDoc | ( | std::u16string_view | rName | ) |
Definition at line 247 of file glosdoc.cxx.
References aName, o3tl::getToken(), GLOS_DELIM, m_PathArr, RemoveFileFromList(), o3tl::toInt32(), and SWUnoHelper::UCB_DeleteFile().
Referenced by SwGlossaryHdl::DelGroup(), and SwXAutoTextContainer::removeByName().
SwDocShellRef SwGlossaries::EditGroupDoc | ( | const OUString & | rGrpName, |
const OUString & | rShortName, | ||
bool | bShow = true |
||
) |
Definition at line 196 of file glshell.cxx.
References SfxFrame::Appear(), VclPtr< class reference_type >::Create(), SfxObjectShell::DoInitNew(), FN_PARAM_ADDPRINTER, SfxViewFrame::GetFrame(), GetGroupDoc(), SfxViewFrame::LoadDocument(), SfxViewFrame::LoadHiddenDocument(), SwGlosDocShell::SetGroupName(), SwWebGlosDocShell::SetGroupName(), SwGlosDocShell::SetLongName(), SwWebGlosDocShell::SetLongName(), SwGlosDocShell::SetShortName(), SwWebGlosDocShell::SetShortName(), SFX_INTERFACE_SFXDOCSH, and SwResId().
Referenced by SwXAutoTextEntry::GetBodyText(), and SwGlossaryHdl::GlossaryDlg().
bool SwGlossaries::FindGroupName | ( | OUString & | rGroup | ) |
Definition at line 104 of file glosdoc.cxx.
References GetAppCmpStrIgnore(), GetGroupCnt(), GetGroupName(), o3tl::getToken(), GLOS_DELIM, i, m_PathArr, nCount, o3tl::toUInt32(), and SWUnoHelper::UCB_IsCaseSensitiveFileName().
Referenced by SwGlossaryHdl::FindGroupName(), and GetGroupTitle().
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.
_rGroupAccessName | the name to access the group |
_rGroupName | the name of the glossaries group, as to be passed to the entry |
_rEntryName | the 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().
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.
_rGroupName | the 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().
OUString SwGlossaries::GetCompleteGroupName | ( | std::u16string_view | GroupName | ) |
Definition at line 476 of file glosdoc.cxx.
References GetGroupCnt(), GetGroupName(), o3tl::getToken(), GLOS_DELIM, i, nCount, and nIndex.
Referenced by GetAutoTextGroup(), SwXAutoTextContainer::hasByName(), and SwXAutoTextContainer::removeByName().
|
static |
Definition at line 91 of file glosdoc.cxx.
Referenced by GetAutoTextEntry(), SwGlossaryDlg::GetCurrGroup(), and GetNameList().
|
static |
Definition at line 419 of file glosdoc.cxx.
Referenced by GetNameList(), and SwGlossaryList::Update().
|
private |
Definition at line 270 of file glosdoc.cxx.
References o3tl::getToken(), GLOS_DELIM, ErrorHandler::HandleError(), FStatHelper::IsDocument(), m_PathArr, and o3tl::toInt32().
Referenced by GetGroupDoc(), and NewGroupDoc().
size_t SwGlossaries::GetGroupCnt | ( | ) |
Definition at line 98 of file glosdoc.cxx.
References GetNameList().
Referenced by FindGroupName(), SwXAutoTextContainer::getByIndex(), GetCompleteGroupName(), SwXAutoTextContainer::getCount(), SwXAutoTextContainer::getElementNames(), and SwGlossaryHdl::GetGroupCnt().
std::unique_ptr< SwTextBlocks > SwGlossaries::GetGroupDoc | ( | const OUString & | rName, |
bool | bCreate = false |
||
) |
Definition at line 158 of file glosdoc.cxx.
References GetGlosDoc(), and m_GlosArr.
Referenced by SwXAutoTextEntry::applyTo(), SwGlossaryHdl::CopyOrMove(), SwGlossaryHdl::CopyToClipboard(), SwGlossaryHdl::DelGlossary(), EditGroupDoc(), SwGlossaryHdl::ExpandGlossary(), GetAutoTextEntry(), SwXAutoTextGroup::getByIndex(), SwXAutoTextGroup::getCount(), SwXAutoTextGroup::getElementNames(), SwGlossaryHdl::GetGlossaryShortName(), SwGlossaryHdl::GetGroupName(), GetGroupTitle(), SwGlossaryHdl::GetMacros(), SwXAutoTextGroup::getPropertyValue(), SwXAutoTextGroup::getTitles(), SwXAutoTextGroup::hasByName(), SwXAutoTextGroup::hasElements(), SwGlossaryHdl::HasShortName(), IMPL_LINK(), SwGlossaryHdl::ImportGlossaries(), SwGlossaryHdl::InsertGlossary(), SwXAutoTextGroup::insertNewByName(), SwGlossaryHdl::IsOld(), SwGlossaryHdl::IsReadOnly(), SwGlossaryHdl::NewGlossary(), SwXAutoTextGroup::removeByName(), SwGlossaryHdl::Rename(), SwXAutoTextGroup::renameByName(), SwGlossaryHdl::RenameGroup(), SwGlossaryHdl::SetCurGroup(), SwGlossaryHdl::SetMacros(), and SwXAutoTextGroup::setPropertyValue().
OUString const & SwGlossaries::GetGroupName | ( | size_t | nGroupId | ) |
Definition at line 136 of file glosdoc.cxx.
References m_GlosArr.
Referenced by FindGroupName(), SwXAutoTextContainer::getByIndex(), GetCompleteGroupName(), SwXAutoTextContainer::getElementNames(), and SwGlossaryHdl::GetGroupName().
OUString SwGlossaries::GetGroupTitle | ( | const OUString & | rGroupName | ) |
Definition at line 143 of file glosdoc.cxx.
References FindGroupName(), GetGroupDoc(), and GLOS_DELIM.
Referenced by SwXAutoTextGroup::setName().
|
private |
Definition at line 302 of file glosdoc.cxx.
References GetDefName(), GetExtension(), GLOS_DELIM, i, m_GlosArr, m_PathArr, sName, and SWUnoHelper::UCB_GetFileListOfFolder().
Referenced by GetGroupCnt(), NewGroupDoc(), RenameGroupDoc(), and UpdateGlosPath().
|
inline |
Definition at line 124 of file glosdoc.hxx.
Referenced by IMPL_LINK_NOARG(), and SwGlossaryHdl::SetCurGroup().
|
private |
Definition at line 500 of file glosdoc.cxx.
References m_aGlossaryEntries, and m_aGlossaryGroups.
Referenced by ~SwGlossaries().
|
inline |
bool SwGlossaries::NewGroupDoc | ( | OUString & | rGroupName, |
const OUString & | rTitle | ||
) |
Definition at line 175 of file glosdoc.cxx.
References GetGlosDoc(), GetNameList(), o3tl::getToken(), GLOS_DELIM, m_PathArr, and o3tl::toInt32().
Referenced by SwXAutoTextContainer::insertNewByName(), and SwGlossaryHdl::NewGroup().
|
private |
Definition at line 424 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 | ||
) |
Definition at line 195 of file glosdoc.cxx.
References GetNameList(), o3tl::getToken(), GLOS_DELIM, FStatHelper::IsDocument(), m_GlosArr, m_PathArr, RemoveFileFromList(), SwTextBlocks::SetName(), o3tl::toInt32(), and SWUnoHelper::UCB_MoveFile().
Referenced by SwGlossaryHdl::RenameGroup(), and SwXAutoTextGroup::setName().
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().
void SwGlossaries::UpdateGlosPath | ( | bool | bFull | ) |
Definition at line 348 of file glosdoc.cxx.
References ERR_AUTOPATH_ERROR, SvtPathOptions::GetAutoTextPath(), URIHelper::GetMaybeFileHdl(), GetNameList(), ErrorHandler::HandleError(), FStatHelper::IsFolder(), lcl_makePath(), m_aInvalidPaths, m_aPath, m_bError, m_GlosArr, m_PathArr, nIndex, URIHelper::SmartRel2Abs(), and SVT_SEARCHPATH_DELIMITER.
Referenced by SwTextShell::ExecGlossary(), IMPL_LINK_NOARG(), and SwGlossaries().
|
private |
Definition at line 50 of file glosdoc.hxx.
Referenced by GetAutoTextEntry(), InvalidateUNOOjects(), and RemoveFileFromList().
|
private |
Definition at line 49 of file glosdoc.hxx.
Referenced by GetAutoTextGroup(), InvalidateUNOOjects(), and RemoveFileFromList().
|
private |
Definition at line 53 of file glosdoc.hxx.
Referenced by ShowError(), and UpdateGlosPath().
|
private |
Definition at line 52 of file glosdoc.hxx.
Referenced by UpdateGlosPath().
|
private |
Definition at line 56 of file glosdoc.hxx.
Referenced by UpdateGlosPath().
|
private |
Definition at line 55 of file glosdoc.hxx.
Referenced by GetGroupDoc(), GetGroupName(), GetNameList(), RemoveFileFromList(), RenameGroupDoc(), and UpdateGlosPath().
|
private |
Definition at line 54 of file glosdoc.hxx.
Referenced by DelGroupDoc(), FindGroupName(), GetGlosDoc(), GetNameList(), NewGroupDoc(), RenameGroupDoc(), and UpdateGlosPath().