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 (const OUString &rName) |
OUString | GetGlossaryShortName (sal_uInt16) |
bool | Rename (const OUString &rOldShortName, const OUString &rNewShortName, const OUString &rNewName) |
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 *pViewFrame, 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 & | rStatGlossaries |
OUString | aCurGrp |
SfxViewFrame * | pViewFrame |
SwWrtShell * | pWrtShell |
std::unique_ptr< SwTextBlocks > | pCurGrp |
Definition at line 34 of file gloshdl.hxx.
SwGlossaryHdl::SwGlossaryHdl | ( | SfxViewFrame * | pViewFrame, |
SwWrtShell * | pSh | ||
) |
Definition at line 585 of file gloshdl.cxx.
SwGlossaryHdl::~SwGlossaryHdl | ( | ) |
Definition at line 593 of file gloshdl.cxx.
bool SwGlossaryHdl::CopyToClipboard | ( | SwWrtShell & | rSh, |
const OUString & | rShortName | ||
) |
Definition at line 653 of file gloshdl.cxx.
References aCurGrp, SwGlossaries::GetGroupDoc(), pCurGrp, and rStatGlossaries.
bool SwGlossaryHdl::DelGlossary | ( | const OUString & | rShortName | ) |
Definition at line 298 of file gloshdl.cxx.
References aCurGrp, SwTextBlocks::Delete(), SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), pCurGrp, and rStatGlossaries.
Referenced by SwGlossaryDlg::DeleteEntry().
bool SwGlossaryHdl::DelGroup | ( | const OUString & | rGrpName | ) |
Definition at line 197 of file gloshdl.cxx.
References SwGlossaries::DelGroupDoc(), FindGroupName(), GLOS_DELIM, pCurGrp, and rStatGlossaries.
Referenced by SwGlossaryGroupDlg::Apply().
|
private |
Definition at line 354 of file gloshdl.cxx.
References SwInputFieldList::BuildSortLst(), SwAbstractDialogFactory::Create(), Application::CreateMessageDialog(), SwAbstractDialogFactory::CreateSwSelGlossaryDlg(), SwWrtShell::DelLeft(), SwEditShell::EndAllAction(), SwEditShell::EndUndo(), SwWrtShell::ExecMacro(), SvxAutoCorrCfg::Get(), GetAppCmpStrIgnore(), SwGlossaryList::GetBlockCount(), SwGlossaryList::GetBlockLongName(), SwGlossaryList::GetBlockShortName(), SfxViewShell::GetFrameWeld(), GetGlossaryList(), SwGlossaryList::GetGroupCount(), SwGlossaries::GetGroupDoc(), SwGlossaryList::GetGroupName(), SwGlossaryList::GetGroupTitle(), GetMacros(), SwWrtShell::GetView(), SvxMacro::HasMacro(), SwWrtShell::HasSelection(), i, SwEditShell::InsertGlossary(), INSGLOSSARY, SvxAutoCorrCfg::IsSearchInAllCategories(), SwCursorShell::IsSelection(), pGlossaryList, pWrtShell, rData, RET_OK, STARBASIC, SwEditShell::StartAllAction(), SwEditShell::StartUndo(), SwResId(), and SwWrtShell::UpdateInputFields().
Referenced by ExpandGlossary().
bool SwGlossaryHdl::ExpandGlossary | ( | weld::Window * | pParent | ) |
Definition at line 319 of file gloshdl.cxx.
References SwWrtShell::CanInsert(), SwAbstractDialogFactory::Create(), Expand(), FindGroupName(), SwGlossaries::GetGroupDoc(), SwCursorShell::GetSelText(), GLOS_DELIM, SwWrtShell::IsAddMode(), SwWrtShell::IsBlockMode(), SwWrtShell::IsEndWrd(), SwWrtShell::IsExtMode(), SwCursorShell::IsInWord(), SwCursorShell::IsSelection(), SwWrtShell::LeaveAddMode(), SwWrtShell::LeaveBlockMode(), SwWrtShell::LeaveExtMode(), SwWrtShell::PrvWrd(), pWrtShell, and rStatGlossaries.
Referenced by SwTextShell::ExecGlossary().
bool SwGlossaryHdl::FindGroupName | ( | OUString & | rGroup | ) |
Definition at line 648 of file gloshdl.cxx.
References SwGlossaries::FindGroupName(), and rStatGlossaries.
Referenced by DelGroup(), ExpandGlossary(), NewGroup(), RenameGroup(), and SetCurGroup().
sal_uInt16 SwGlossaryHdl::GetGlossaryCnt | ( | ) | const |
Definition at line 215 of file gloshdl.cxx.
References pCurGrp.
Referenced by GetGlossaryName(), GetGlossaryShortName(), and SwGlossaryDlg::Init().
OUString SwGlossaryHdl::GetGlossaryName | ( | sal_uInt16 | nId | ) |
Definition at line 220 of file gloshdl.cxx.
References GetGlossaryCnt(), and pCurGrp.
Referenced by SwGlossaryDlg::Init().
OUString SwGlossaryHdl::GetGlossaryShortName | ( | const OUString & | rName | ) |
Definition at line 233 of file gloshdl.cxx.
References aCurGrp, SwGlossaries::GetGroupDoc(), SwTextBlocks::GetLongIndex(), SwTextBlocks::GetShortName(), pCurGrp, and rStatGlossaries.
Referenced by SwGlossaryDlg::Init().
OUString SwGlossaryHdl::GetGlossaryShortName | ( | sal_uInt16 | nId | ) |
Definition at line 226 of file gloshdl.cxx.
References GetGlossaryCnt(), and pCurGrp.
size_t SwGlossaryHdl::GetGroupCnt | ( | ) | const |
Definition at line 136 of file gloshdl.cxx.
References SwGlossaries::GetGroupCnt(), and rStatGlossaries.
Referenced by SwGlossaryDlg::Init(), and SwGlossaryGroupDlg::SwGlossaryGroupDlg().
OUString SwGlossaryHdl::GetGroupName | ( | size_t | nId, |
OUString * | pTitle | ||
) |
Definition at line 141 of file gloshdl.cxx.
References SwGlossaries::GetGroupDoc(), SwGlossaries::GetGroupName(), GLOS_DELIM, and rStatGlossaries.
Referenced by SwGlossaryDlg::Init(), and SwGlossaryGroupDlg::SwGlossaryGroupDlg().
void SwGlossaryHdl::GetMacros | ( | const OUString & | rShortName, |
SvxMacro & | rStart, | ||
SvxMacro & | rEnd, | ||
SwTextBlocks * | pGlossary = nullptr |
||
) |
Definition at line 556 of file gloshdl.cxx.
References aCurGrp, SvxMacroTableDtor::Get(), SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), SwTextBlocks::GetMacroTable(), nIndex, pCurGrp, rStatGlossaries, and USHRT_MAX.
Referenced by Expand(), InsertGlossary(), and lcl_Save().
void SwGlossaryHdl::GlossaryDlg | ( | ) |
Definition at line 66 of file gloshdl.cxx.
References SwGlossaryList::ClearGroups(), SwAbstractDialogFactory::Create(), SwAbstractDialogFactory::CreateGlossaryDlg(), SwGlossaries::EditGroupDoc(), AbstractGlossaryDlg::GetCurrGrpName(), GetGlossaryList(), HasGlossaryList(), pCurGrp, pViewFrame, pWrtShell, RET_EDIT, rStatGlossaries, and sName.
Referenced by SwTextShell::ExecGlossary().
bool SwGlossaryHdl::HasShortName | ( | const OUString & | rShortName | ) | const |
Definition at line 250 of file gloshdl.cxx.
References aCurGrp, SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), pCurGrp, and rStatGlossaries.
Referenced by IMPL_LINK_NOARG().
bool SwGlossaryHdl::ImportGlossaries | ( | const OUString & | rName | ) |
Definition at line 666 of file gloshdl.cxx.
References aCurGrp, SvxAutoCorrCfg::Get(), SwGlossaries::GetGroupDoc(), SwReaderWriter::GetReader(), SfxFilterMatcher::GuessFilter(), SwReader::HasGlossaries(), SvxAutoCorrCfg::IsSaveRelFile(), pCurGrp, SwReader::ReadGlossaries(), and rStatGlossaries.
bool SwGlossaryHdl::InsertGlossary | ( | const OUString & | rName | ) |
Definition at line 487 of file gloshdl.cxx.
References aCurGrp, SwInputFieldList::BuildSortLst(), SwWrtShell::CanInsert(), SwWrtShell::DelRight(), SwEditShell::EndAllAction(), SwWrtShell::ExecMacro(), SwGlossaries::GetGroupDoc(), GetMacros(), SvxMacro::HasMacro(), SwWrtShell::HasSelection(), SwEditShell::InsertGlossary(), pCurGrp, pWrtShell, 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 640 of file gloshdl.cxx.
References aCurGrp, SwGlossaries::GetGroupDoc(), pCurGrp, and rStatGlossaries.
bool SwGlossaryHdl::IsReadOnly | ( | const OUString * | pGrpNm = nullptr | ) | const |
Definition at line 623 of file gloshdl.cxx.
References aCurGrp, SwGlossaries::GetGroupDoc(), SwTextBlocks::IsReadOnly(), pCurGrp, and 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 261 of file gloshdl.cxx.
References aCurGrp, Application::CreateMessageDialog(), SvxAutoCorrCfg::Get(), SfxViewShell::GetFrameWeld(), SwGlossaries::GetGroupDoc(), SwEditShell::GetSelectedText(), SwWrtShell::GetView(), SvxAutoCorrCfg::IsSaveRelFile(), SwEditShell::MakeGlossary(), pCurGrp, pWrtShell, rStatGlossaries, SwResId(), and ToOnlyCR.
Referenced by SwTextShell::ExecGlossary().
void SwGlossaryHdl::NewGroup | ( | OUString & | rGroupName, |
const OUString & | rTitle | ||
) |
Definition at line 164 of file gloshdl.cxx.
References FindGroupName(), GLOS_DELIM, SwGlossaries::NewGroupDoc(), and rStatGlossaries.
Referenced by SwGlossaryGroupDlg::Apply().
bool SwGlossaryHdl::Rename | ( | const OUString & | rOldShortName, |
const OUString & | rNewShortName, | ||
const OUString & | rNewName | ||
) |
Definition at line 598 of file gloshdl.cxx.
References aCurGrp, ERRCODE_NONE, SwTextBlocks::GetError(), SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), SwTextBlocks::GetLongIndex(), pCurGrp, SwTextBlocks::Rename(), rStatGlossaries, and USHRT_MAX.
void SwGlossaryHdl::RenameGroup | ( | const OUString & | rOld, |
OUString & | rNew, | ||
const OUString & | rNewTitle | ||
) |
Definition at line 171 of file gloshdl.cxx.
References FindGroupName(), SwGlossaries::GetGroupDoc(), GLOS_DELIM, SwGlossaries::RenameGroupDoc(), and rStatGlossaries.
Referenced by SwGlossaryGroupDlg::Apply().
void SwGlossaryHdl::SetCurGroup | ( | const OUString & | aGrp, |
bool | bApi = false , |
||
bool | bAlwaysCreateNew = false |
||
) |
Definition at line 92 of file gloshdl.cxx.
References aCurGrp, FindGroupName(), INetURLObject::getBase(), SwGlossaries::GetGroupDoc(), SwGlossaries::GetPathArray(), GLOS_DELIM, INetURLObject::NONE, pCurGrp, rStatGlossaries, and USHRT_MAX.
Referenced by SwGlossaryGroupDlg::Apply(), SwTextShell::ExecGlossary(), 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 535 of file gloshdl.cxx.
References aCurGrp, SwTextBlocks::GetError(), SwGlossaries::GetGroupDoc(), SwTextBlocks::GetIndex(), ErrorHandler::HandleError(), SvxMacroTableDtor::Insert(), pCurGrp, 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 39 of file gloshdl.hxx.
Referenced by GlossaryDlg().
|
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 CopyToClipboard(), DelGlossary(), DelGroup(), ExpandGlossary(), FindGroupName(), GetGlossaryShortName(), GetGroupCnt(), GetGroupName(), GetMacros(), GlossaryDlg(), HasShortName(), ImportGlossaries(), InsertGlossary(), IsOld(), IsReadOnly(), NewGlossary(), NewGroup(), Rename(), RenameGroup(), SetCurGroup(), and SetMacros().