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 & | m_rStatGlossaries |
OUString | m_aCurGrp |
SfxViewFrame * | m_pViewFrame |
SwWrtShell * | m_pWrtShell |
std::unique_ptr< SwTextBlocks > | m_pCurGrp |
Definition at line 34 of file gloshdl.hxx.
SwGlossaryHdl::SwGlossaryHdl | ( | SfxViewFrame * | pViewFrame, |
SwWrtShell * | pSh | ||
) |
Definition at line 587 of file gloshdl.cxx.
SwGlossaryHdl::~SwGlossaryHdl | ( | ) |
Definition at line 595 of file gloshdl.cxx.
bool SwGlossaryHdl::CopyToClipboard | ( | SwWrtShell & | rSh, |
const OUString & | rShortName | ||
) |
Definition at line 655 of file gloshdl.cxx.
References SwGlossaries::GetGroupDoc(), m_aCurGrp, m_pCurGrp, and m_rStatGlossaries.
bool SwGlossaryHdl::DelGlossary | ( | const OUString & | rShortName | ) |
Definition at line 300 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 199 of file gloshdl.cxx.
References SwGlossaries::DelGroupDoc(), FindGroupName(), GLOS_DELIM, m_pCurGrp, and m_rStatGlossaries.
Referenced by SwGlossaryGroupDlg::Apply().
|
private |
Definition at line 356 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, rData, RET_OK, STARBASIC, SwEditShell::StartAllAction(), SwEditShell::StartUndo(), SwResId(), and SwWrtShell::UpdateInputFields().
Referenced by ExpandGlossary().
bool SwGlossaryHdl::ExpandGlossary | ( | weld::Window * | pParent | ) |
Definition at line 321 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 650 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 217 of file gloshdl.cxx.
References m_pCurGrp.
Referenced by GetGlossaryName(), GetGlossaryShortName(), and SwGlossaryDlg::Init().
OUString SwGlossaryHdl::GetGlossaryName | ( | sal_uInt16 | nId | ) |
Definition at line 222 of file gloshdl.cxx.
References GetGlossaryCnt(), m_pCurGrp, and nId.
Referenced by SwGlossaryDlg::Init().
OUString SwGlossaryHdl::GetGlossaryShortName | ( | const OUString & | rName | ) |
Definition at line 235 of file gloshdl.cxx.
References SwGlossaries::GetGroupDoc(), SwTextBlocks::GetLongIndex(), SwTextBlocks::GetShortName(), m_aCurGrp, m_pCurGrp, and m_rStatGlossaries.
Referenced by SwGlossaryDlg::Init().
OUString SwGlossaryHdl::GetGlossaryShortName | ( | sal_uInt16 | nId | ) |
Definition at line 228 of file gloshdl.cxx.
References GetGlossaryCnt(), m_pCurGrp, and nId.
size_t SwGlossaryHdl::GetGroupCnt | ( | ) | const |
Definition at line 138 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 143 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 558 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 68 of file gloshdl.cxx.
References SwGlossaryList::ClearGroups(), SwAbstractDialogFactory::Create(), SwAbstractDialogFactory::CreateGlossaryDlg(), VclPtr< class reference_type >::disposeAndClear(), SwGlossaries::EditGroupDoc(), GetGlossaryList(), HasGlossaryList(), m_pCurGrp, m_pViewFrame, m_pWrtShell, m_rStatGlossaries, RET_EDIT, and sName.
Referenced by SwTextShell::ExecGlossary().
bool SwGlossaryHdl::HasShortName | ( | const OUString & | rShortName | ) | const |
Definition at line 252 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 668 of file gloshdl.cxx.
References 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 489 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 642 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 625 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 263 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 166 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 600 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 173 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 94 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(), 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 537 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 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().