LibreOffice Module sw (master) 1
|
#include <gloshdl.hxx>
Public Member Functions | |
void | GlossaryDlg () |
size_t | GetGroupCnt () const |
OUString | GetGroupName (size_t, OUString *pTitle) |
void | NewGroup (OUString &rGroupName, const OUString &rTitle) |
bool | DelGroup (const OUString &) |
void | RenameGroup (const OUString &rOld, OUString &rNew, const OUString &rNewTitle) |
void | SetCurGroup (const OUString &aGrp, bool bApi=false, bool bAlwaysCreateNew=false) |
sal_uInt16 | GetGlossaryCnt () const |
OUString | GetGlossaryName (sal_uInt16) |
OUString | GetGlossaryShortName (std::u16string_view aName) |
OUString | GetGlossaryShortName (sal_uInt16) |
bool | Rename (const OUString &rOldShortName, const OUString &rNewShortName, const OUString &rNewName) |
bool | CopyOrMove (const OUString &rSourceGroupName, OUString &rSourceShortName, const OUString &rDestGroupName, const OUString &rLongName, bool bMove) |
bool | HasShortName (const OUString &rShortName) const |
bool | NewGlossary (const OUString &rName, const OUString &rShortName, bool bApiCall=false, bool bNoAttr=false) |
bool | DelGlossary (const OUString &) |
bool | CopyToClipboard (SwWrtShell &rSh, const OUString &rShortName) |
bool | ExpandGlossary (weld::Window *pParent) |
bool | InsertGlossary (const OUString &rName) |
void | SetMacros (const OUString &rName, const SvxMacro *pStart, const SvxMacro *pEnd, SwTextBlocks *pGlossary=nullptr) |
void | GetMacros (const OUString &rShortName, SvxMacro &rStart, SvxMacro &rEnd, SwTextBlocks *pGlossary=nullptr) |
bool | IsReadOnly (const OUString *=nullptr) const |
bool | IsOld () const |
bool | FindGroupName (OUString &rGroup) |
bool | ImportGlossaries (const OUString &rName) |
SwGlossaryHdl (SfxViewFrame &rViewFrame, SwWrtShell *) | |
~SwGlossaryHdl () | |
Private Member Functions | |
SAL_DLLPRIVATE bool | Expand (weld::Window *pParent, const OUString &rShortName, SwGlossaries *pGlossaries, std::unique_ptr< SwTextBlocks > pGlossary) |
Private Attributes | |
SwGlossaries & | m_rStatGlossaries |
OUString | m_aCurGrp |
SfxViewFrame & | m_rViewFrame |
SwWrtShell * | m_pWrtShell |
std::unique_ptr< SwTextBlocks > | m_pCurGrp |
Definition at line 34 of file gloshdl.hxx.
SwGlossaryHdl::SwGlossaryHdl | ( | SfxViewFrame & | rViewFrame, |
SwWrtShell * | pSh | ||
) |
Definition at line 610 of file gloshdl.cxx.
SwGlossaryHdl::~SwGlossaryHdl | ( | ) |
Definition at line 618 of file gloshdl.cxx.
bool SwGlossaryHdl::CopyOrMove | ( | const OUString & | rSourceGroupName, |
OUString & | rSourceShortName, | ||
const OUString & | rDestGroupName, | ||
const OUString & | rLongName, | ||
bool | bMove | ||
) |
Definition at line 199 of file gloshdl.cxx.
References ERRCODE_NONE, SwGlossaries::GetGroupDoc(), and m_rStatGlossaries.
Referenced by SwGlossaryDropTarget::ExecuteDrop().
bool SwGlossaryHdl::CopyToClipboard | ( | SwWrtShell & | rSh, |
const OUString & | rShortName | ||
) |
Definition at line 678 of file gloshdl.cxx.
References SwGlossaries::GetGroupDoc(), m_aCurGrp, m_pCurGrp, and m_rStatGlossaries.
bool SwGlossaryHdl::DelGlossary | ( | const OUString & | rShortName | ) |
Definition at line 323 of file gloshdl.cxx.
References SwTextBlocks::Delete(), SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), m_aCurGrp, m_pCurGrp, and m_rStatGlossaries.
Referenced by SwGlossaryDlg::DeleteEntry().
bool SwGlossaryHdl::DelGroup | ( | const OUString & | rGrpName | ) |
Definition at line 222 of file gloshdl.cxx.
References SwGlossaries::DelGroupDoc(), FindGroupName(), GLOS_DELIM, m_pCurGrp, and m_rStatGlossaries.
Referenced by SwGlossaryGroupDlg::Apply().
|
private |
Definition at line 379 of file gloshdl.cxx.
References SwInputFieldList::BuildSortLst(), SwAbstractDialogFactory::Create(), Application::CreateMessageDialog(), SwAbstractDialogFactory::CreateSwSelGlossaryDlg(), SwWrtShell::DelLeft(), VclPtr< class reference_type >::disposeAndClear(), SwEditShell::EndAllAction(), SwEditShell::EndUndo(), SwWrtShell::ExecMacro(), SvxAutoCorrCfg::Get(), GetAppCmpStrIgnore(), SwGlossaryList::GetBlockCount(), SwGlossaryList::GetBlockLongName(), SwGlossaryList::GetBlockShortName(), SfxViewShell::GetFrameWeld(), GetGlossaryList(), SwGlossaryList::GetGroupCount(), SwGlossaryList::GetGroupName(), SwGlossaryList::GetGroupTitle(), GetMacros(), SwWrtShell::GetView(), SvxMacro::HasMacro(), SwWrtShell::HasSelection(), i, SwEditShell::InsertGlossary(), INSGLOSSARY, SvxAutoCorrCfg::IsSearchInAllCategories(), SwCursorShell::IsSelection(), m_pWrtShell, pGlossaries, pGlossaryList, RET_OK, STARBASIC, SwEditShell::StartAllAction(), SwEditShell::StartUndo(), SwResId(), and SwWrtShell::UpdateInputFields().
Referenced by ExpandGlossary().
bool SwGlossaryHdl::ExpandGlossary | ( | weld::Window * | pParent | ) |
Definition at line 344 of file gloshdl.cxx.
References SwWrtShell::CanInsert(), SwAbstractDialogFactory::Create(), Expand(), FindGroupName(), SwAbstractDialogFactory::GetGlossaryCurrGroupFunc(), SwGlossaries::GetGroupDoc(), SwCursorShell::GetSelText(), GLOS_DELIM, SwWrtShell::IsAddMode(), SwWrtShell::IsBlockMode(), SwWrtShell::IsEndWrd(), SwWrtShell::IsExtMode(), SwCursorShell::IsInWord(), SwCursorShell::IsSelection(), SwWrtShell::LeaveAddMode(), SwWrtShell::LeaveBlockMode(), SwWrtShell::LeaveExtMode(), m_pWrtShell, m_rStatGlossaries, and SwWrtShell::PrvWrd().
Referenced by SwTextShell::ExecGlossary().
bool SwGlossaryHdl::FindGroupName | ( | OUString & | rGroup | ) |
Definition at line 673 of file gloshdl.cxx.
References SwGlossaries::FindGroupName(), and m_rStatGlossaries.
Referenced by DelGroup(), ExpandGlossary(), NewGroup(), RenameGroup(), and SetCurGroup().
sal_uInt16 SwGlossaryHdl::GetGlossaryCnt | ( | ) | const |
Definition at line 240 of file gloshdl.cxx.
References m_pCurGrp.
Referenced by GetGlossaryName(), GetGlossaryShortName(), and SwGlossaryDlg::Init().
OUString SwGlossaryHdl::GetGlossaryName | ( | sal_uInt16 | nId | ) |
Definition at line 245 of file gloshdl.cxx.
References GetGlossaryCnt(), m_pCurGrp, and nId.
Referenced by SwGlossaryDlg::Init().
OUString SwGlossaryHdl::GetGlossaryShortName | ( | sal_uInt16 | nId | ) |
Definition at line 251 of file gloshdl.cxx.
References GetGlossaryCnt(), m_pCurGrp, and nId.
OUString SwGlossaryHdl::GetGlossaryShortName | ( | std::u16string_view | aName | ) |
Definition at line 258 of file gloshdl.cxx.
References aName, SwGlossaries::GetGroupDoc(), SwTextBlocks::GetLongIndex(), SwTextBlocks::GetShortName(), m_aCurGrp, m_pCurGrp, and m_rStatGlossaries.
Referenced by SwGlossaryDlg::Init().
size_t SwGlossaryHdl::GetGroupCnt | ( | ) | const |
Definition at line 139 of file gloshdl.cxx.
References SwGlossaries::GetGroupCnt(), and m_rStatGlossaries.
Referenced by SwGlossaryDlg::Init(), and SwGlossaryGroupDlg::SwGlossaryGroupDlg().
OUString SwGlossaryHdl::GetGroupName | ( | size_t | nId, |
OUString * | pTitle | ||
) |
Definition at line 144 of file gloshdl.cxx.
References SwGlossaries::GetGroupDoc(), SwGlossaries::GetGroupName(), GLOS_DELIM, m_rStatGlossaries, and nId.
Referenced by SwGlossaryDlg::Init(), and SwGlossaryGroupDlg::SwGlossaryGroupDlg().
void SwGlossaryHdl::GetMacros | ( | const OUString & | rShortName, |
SvxMacro & | rStart, | ||
SvxMacro & | rEnd, | ||
SwTextBlocks * | pGlossary = nullptr |
||
) |
Definition at line 581 of file gloshdl.cxx.
References SvxMacroTableDtor::Get(), SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), SwTextBlocks::GetMacroTable(), m_aCurGrp, m_pCurGrp, m_rStatGlossaries, and nIndex.
Referenced by Expand(), InsertGlossary(), and lcl_Save().
void SwGlossaryHdl::GlossaryDlg | ( | ) |
Definition at line 69 of file gloshdl.cxx.
References SwGlossaryList::ClearGroups(), SwAbstractDialogFactory::Create(), SwAbstractDialogFactory::CreateGlossaryDlg(), VclPtr< class reference_type >::disposeAndClear(), SwGlossaries::EditGroupDoc(), GetGlossaryList(), HasGlossaryList(), m_pCurGrp, m_pWrtShell, m_rStatGlossaries, m_rViewFrame, RET_EDIT, and sName.
Referenced by SwTextShell::ExecGlossary().
bool SwGlossaryHdl::HasShortName | ( | const OUString & | rShortName | ) | const |
Definition at line 275 of file gloshdl.cxx.
References SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), m_aCurGrp, m_pCurGrp, and m_rStatGlossaries.
Referenced by IMPL_LINK_NOARG().
bool SwGlossaryHdl::ImportGlossaries | ( | const OUString & | rName | ) |
Definition at line 691 of file gloshdl.cxx.
References ERRCODE_NONE, SvxAutoCorrCfg::Get(), SwGlossaries::GetGroupDoc(), SwReaderWriter::GetReader(), SfxFilterMatcher::GuessFilter(), SwReader::HasGlossaries(), SvxAutoCorrCfg::IsSaveRelFile(), m_aCurGrp, m_pCurGrp, m_rStatGlossaries, SwReader::ReadGlossaries(), SfxMedium::SetFilter(), and SfxMedium::UseInteractionHandler().
bool SwGlossaryHdl::InsertGlossary | ( | const OUString & | rName | ) |
Definition at line 512 of file gloshdl.cxx.
References SwInputFieldList::BuildSortLst(), SwWrtShell::CanInsert(), SwWrtShell::DelRight(), SwEditShell::EndAllAction(), SwWrtShell::ExecMacro(), SwGlossaries::GetGroupDoc(), GetMacros(), SvxMacro::HasMacro(), SwWrtShell::HasSelection(), SwEditShell::InsertGlossary(), m_aCurGrp, m_pCurGrp, m_pWrtShell, m_rStatGlossaries, STARBASIC, SwEditShell::StartAllAction(), and SwWrtShell::UpdateInputFields().
Referenced by SwGlossaryDlg::Apply(), SwTextShell::ExecGlossary(), IMPL_STATIC_LINK(), and SwEditWin::KeyInput().
bool SwGlossaryHdl::IsOld | ( | ) | const |
Definition at line 665 of file gloshdl.cxx.
References SwGlossaries::GetGroupDoc(), m_aCurGrp, m_pCurGrp, and m_rStatGlossaries.
bool SwGlossaryHdl::IsReadOnly | ( | const OUString * | pGrpNm = nullptr | ) | const |
Definition at line 648 of file gloshdl.cxx.
References SwGlossaries::GetGroupDoc(), SwTextBlocks::IsReadOnly(), m_aCurGrp, m_pCurGrp, and m_rStatGlossaries.
Referenced by SwGlossaryDlg::Init(), and SwGlossaryGroupDlg::IsDeleteAllowed().
bool SwGlossaryHdl::NewGlossary | ( | const OUString & | rName, |
const OUString & | rShortName, | ||
bool | bApiCall = false , |
||
bool | bNoAttr = false |
||
) |
Definition at line 286 of file gloshdl.cxx.
References Application::CreateMessageDialog(), SvxAutoCorrCfg::Get(), SfxViewShell::GetFrameWeld(), SwGlossaries::GetGroupDoc(), SwEditShell::GetSelectedText(), SwWrtShell::GetView(), SvxAutoCorrCfg::IsSaveRelFile(), m_aCurGrp, m_pCurGrp, m_pWrtShell, m_rStatGlossaries, SwEditShell::MakeGlossary(), SwResId(), and ToOnlyCR.
Referenced by SwTextShell::ExecGlossary().
void SwGlossaryHdl::NewGroup | ( | OUString & | rGroupName, |
const OUString & | rTitle | ||
) |
Definition at line 167 of file gloshdl.cxx.
References FindGroupName(), GLOS_DELIM, m_rStatGlossaries, and SwGlossaries::NewGroupDoc().
Referenced by SwGlossaryGroupDlg::Apply().
bool SwGlossaryHdl::Rename | ( | const OUString & | rOldShortName, |
const OUString & | rNewShortName, | ||
const OUString & | rNewName | ||
) |
Definition at line 623 of file gloshdl.cxx.
References ERRCODE_NONE, SwTextBlocks::GetError(), SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), SwTextBlocks::GetLongIndex(), m_aCurGrp, m_pCurGrp, m_rStatGlossaries, and SwTextBlocks::Rename().
void SwGlossaryHdl::RenameGroup | ( | const OUString & | rOld, |
OUString & | rNew, | ||
const OUString & | rNewTitle | ||
) |
Definition at line 174 of file gloshdl.cxx.
References FindGroupName(), SwGlossaries::GetGroupDoc(), GLOS_DELIM, m_rStatGlossaries, and SwGlossaries::RenameGroupDoc().
Referenced by SwGlossaryGroupDlg::Apply().
void SwGlossaryHdl::SetCurGroup | ( | const OUString & | aGrp, |
bool | bApi = false , |
||
bool | bAlwaysCreateNew = false |
||
) |
Definition at line 95 of file gloshdl.cxx.
References FindGroupName(), INetURLObject::getBase(), SwGlossaries::GetGroupDoc(), INetURLObject::GetMainURL(), SwGlossaries::GetPathArray(), o3tl::getToken(), GLOS_DELIM, m_aCurGrp, m_pCurGrp, m_rStatGlossaries, INetURLObject::NONE, INetURLObject::removeSegment(), and o3tl::toInt32().
Referenced by SwGlossaryGroupDlg::Apply(), SwTextShell::ExecGlossary(), SwGlossaryDropTarget::ExecuteDrop(), IMPL_STATIC_LINK(), SwGlossaryDlg::Init(), SwEditWin::KeyInput(), and lcl_InsertBCText().
void SwGlossaryHdl::SetMacros | ( | const OUString & | rName, |
const SvxMacro * | pStart, | ||
const SvxMacro * | pEnd, | ||
SwTextBlocks * | pGlossary = nullptr |
||
) |
Definition at line 560 of file gloshdl.cxx.
References SwTextBlocks::GetError(), SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), ErrorHandler::HandleError(), SvxMacroTableDtor::Insert(), m_aCurGrp, m_pCurGrp, m_rStatGlossaries, and SwTextBlocks::SetMacroTable().
Referenced by lcl_Save().
|
private |
Definition at line 38 of file gloshdl.hxx.
Referenced by CopyToClipboard(), DelGlossary(), GetGlossaryShortName(), GetMacros(), HasShortName(), ImportGlossaries(), InsertGlossary(), IsOld(), IsReadOnly(), NewGlossary(), Rename(), SetCurGroup(), and SetMacros().
|
private |
Definition at line 42 of file gloshdl.hxx.
Referenced by CopyToClipboard(), DelGlossary(), DelGroup(), GetGlossaryCnt(), GetGlossaryName(), GetGlossaryShortName(), GetMacros(), GlossaryDlg(), HasShortName(), ImportGlossaries(), InsertGlossary(), IsOld(), IsReadOnly(), NewGlossary(), Rename(), SetCurGroup(), and SetMacros().
|
private |
Definition at line 40 of file gloshdl.hxx.
Referenced by Expand(), ExpandGlossary(), GlossaryDlg(), InsertGlossary(), and NewGlossary().
|
private |
Definition at line 37 of file gloshdl.hxx.
Referenced by CopyOrMove(), CopyToClipboard(), DelGlossary(), DelGroup(), ExpandGlossary(), FindGroupName(), GetGlossaryShortName(), GetGroupCnt(), GetGroupName(), GetMacros(), GlossaryDlg(), HasShortName(), ImportGlossaries(), InsertGlossary(), IsOld(), IsReadOnly(), NewGlossary(), NewGroup(), Rename(), RenameGroup(), SetCurGroup(), and SetMacros().
|
private |
Definition at line 39 of file gloshdl.hxx.
Referenced by GlossaryDlg().