LibreOffice Module sw (master)
1
|
#include <fldmgr.hxx>
Public Member Functions | |
SwFieldMgr (SwWrtShell *pSh=nullptr) | |
~SwFieldMgr () | |
void | SetWrtShell (SwWrtShell *pShell) |
bool | InsertField (const SwInsertField_Data &rData) |
void | UpdateCurField (sal_uInt32 nFormat, const OUString &rPar1, const OUString &rPar2, std::unique_ptr< SwField > _pField=nullptr) |
const OUString & | GetCurFieldPar1 () const |
const OUString & | GetCurFieldPar2 () const |
SwField * | GetCurField () |
void | InsertFieldType (SwFieldType const &rType) |
bool | ChooseMacro (weld::Window *pDialogParent) |
void | SetMacroPath (const OUString &rPath) |
const OUString & | GetMacroPath () const |
const OUString & | GetMacroName () const |
bool | GoNextPrev (bool bNext=true, SwFieldType *pTyp=nullptr) |
bool | GoNext () |
bool | GoPrev () |
bool | IsDBNumeric (const OUString &rDBName, const OUString &rTableQryName, bool bIsTable, const OUString &rFieldName) |
bool | CanInsertRefMark (std::u16string_view rStr) |
size_t | GetFieldTypeCount () const |
SwFieldType * | GetFieldType (SwFieldIds nResId, size_t nField=0) const |
SwFieldType * | GetFieldType (SwFieldIds nResId, const OUString &rName) const |
void | RemoveFieldType (SwFieldIds nResId, const OUString &rName) |
SwFieldTypesEnum | GetCurTypeId () const |
void | GetSubTypes (SwFieldTypesEnum nId, std::vector< OUString > &rToFill) |
sal_uInt16 | GetFormatCount (SwFieldTypesEnum nTypeId, bool bHtmlMode) const |
OUString | GetFormatStr (SwFieldTypesEnum nTypeId, sal_uInt32 nFormatId) const |
sal_uInt16 | GetFormatId (SwFieldTypesEnum nTypeId, sal_uInt32 nFormatId) const |
sal_uInt32 | GetDefaultFormat (SwFieldTypesEnum nTypeId, bool bIsText, SvNumberFormatter *pFormatter) |
void | SetEvalExpFields (bool bEval) |
void | EvalExpFields (SwWrtShell *pSh) |
Static Public Member Functions | |
static const SwFieldGroupRgn & | GetGroupRange (bool bHtmlMode, sal_uInt16 nGrpId) |
static sal_uInt16 | GetGroup (SwFieldTypesEnum nTypeId, sal_uInt16 nSubType) |
static SwFieldTypesEnum | GetTypeId (sal_uInt16 nPos) |
static const OUString & | GetTypeStr (sal_uInt16 nPos) |
static sal_uInt16 | GetPos (SwFieldTypesEnum nTypeId) |
Private Member Functions | |
SAL_DLLPRIVATE LanguageType | GetCurrLanguage () const |
SAL_DLLPRIVATE css::uno::Reference< css::text::XNumberingTypeInfo > const & | GetNumberingInfo () const |
Private Attributes | |
SwField * | m_pCurField |
SwWrtShell * | m_pWrtShell |
OUString | m_aCurPar1 |
OUString | m_aCurPar2 |
OUString | m_sCurFrame |
OUString | m_sMacroPath |
OUString | m_sMacroName |
sal_uInt32 | m_nCurFormat |
bool | m_bEvalExp |
css::uno::Reference< css::text::XNumberingTypeInfo > | m_xNumberingInfo |
Definition at line 99 of file fldmgr.hxx.
|
explicit |
Definition at line 363 of file fldmgr.cxx.
References GetCurField().
SwFieldMgr::~SwFieldMgr | ( | ) |
Definition at line 371 of file fldmgr.cxx.
bool SwFieldMgr::CanInsertRefMark | ( | std::u16string_view | rStr | ) |
Definition at line 376 of file fldmgr.cxx.
References SwCursorShell::GetCursorCnt(), SwEditShell::GetRefMark(), lcl_GetShell(), and m_pWrtShell.
Referenced by InsertField().
bool SwFieldMgr::ChooseMacro | ( | weld::Window * | pDialogParent | ) |
Definition at line 1771 of file fldmgr.cxx.
References SfxApplication::ChooseScript(), and SetMacroPath().
void SwFieldMgr::EvalExpFields | ( | SwWrtShell * | pSh | ) |
Definition at line 1690 of file fldmgr.cxx.
References SwEditShell::EndAllAction(), lcl_GetShell(), m_pWrtShell, SwEditShell::StartAllAction(), and SwEditShell::UpdateExpFields().
Referenced by SwFieldPage::InsertField().
SwField * SwFieldMgr::GetCurField | ( | ) |
Definition at line 425 of file fldmgr.cxx.
References SwCursorShell::GetCurField(), SwField::GetFormat(), SwField::GetPar1(), SwField::GetPar2(), GetRefPage, SwField::GetTypeId(), lcl_GetShell(), m_aCurPar1, m_aCurPar2, m_nCurFormat, m_pCurField, m_pWrtShell, m_sCurFrame, NextPage, PageNumber, PreviousPage, and SVX_NUM_PAGEDESC.
Referenced by SwFieldEditDlg::EnsureSelection(), SwTextShell::ExecField(), SwTextShell::Execute(), IMPL_LINK(), IMPL_LINK_NOARG(), SwFieldEditDlg::Init(), SwFieldPage::Init(), SwFieldPage::InsertField(), SwWrtShell::InsertPostIt(), SwFieldEditDlg::SwFieldEditDlg(), SwFieldMgr(), and UpdateCurField().
|
inline |
Definition at line 135 of file fldmgr.hxx.
|
inline |
Definition at line 136 of file fldmgr.hxx.
|
private |
Definition at line 1702 of file fldmgr.cxx.
References SwEditShell::GetCurLang(), SvtSysLocale::GetLanguageTag(), LanguageTag::getLanguageType(), lcl_GetShell(), and m_pWrtShell.
Referenced by GetDefaultFormat(), and InsertField().
SwFieldTypesEnum SwFieldMgr::GetCurTypeId | ( | ) | const |
Definition at line 884 of file fldmgr.cxx.
References SwField::GetTypeId(), m_pCurField, and Unknown.
Referenced by SwTextShell::Execute().
sal_uInt32 SwFieldMgr::GetDefaultFormat | ( | SwFieldTypesEnum | nTypeId, |
bool | bIsText, | ||
SvNumberFormatter * | pFormatter | ||
) |
Definition at line 1811 of file fldmgr.cxx.
References Date, GetCurrLanguage(), SvNumberFormatter::GetStandardFormat(), and Time.
Referenced by SwTextShell::ExecField().
SwFieldType * SwFieldMgr::GetFieldType | ( | SwFieldIds | nResId, |
size_t | nField = 0 |
||
) | const |
Definition at line 410 of file fldmgr.cxx.
References SwEditShell::GetFieldType(), lcl_GetShell(), and m_pWrtShell.
Referenced by SwBaseShell::Execute(), SwFieldVarPage::FillItemSet(), SwFieldRefPage::FillItemSet(), SwView::InsertCaption(), SwFieldPage::InsertField(), and SwFieldVarPage::SubTypeHdl().
SwFieldType * SwFieldMgr::GetFieldType | ( | SwFieldIds | nResId, |
const OUString & | rName | ||
) | const |
Definition at line 417 of file fldmgr.cxx.
References SwEditShell::GetFieldType(), lcl_GetShell(), and m_pWrtShell.
size_t SwFieldMgr::GetFieldTypeCount | ( | ) | const |
Definition at line 403 of file fldmgr.cxx.
References SwEditShell::GetFieldTypeCount(), lcl_GetShell(), and m_pWrtShell.
Referenced by SwView::InsertCaption().
sal_uInt16 SwFieldMgr::GetFormatCount | ( | SwFieldTypesEnum | nTypeId, |
bool | bHtmlMode | ||
) | const |
Definition at line 671 of file fldmgr.cxx.
References assert(), aTypes, Filename, FMT_DBFLD_ARY, FMT_GETVAR_ARY, FMT_NUM_ARY, FMT_SETVAR_ARY, FMT_USERVAR_ARY, GetNumberingInfo(), GetPos(), LAST, m_xNumberingInfo, nCount, nPos, Set, USHRT_MAX, VF_COUNT, VF_DB_COUNT, and VF_USR_COUNT.
Referenced by SwFieldDokPage::FillFormatLB(), SwFieldVarPage::FillFormatLB(), SwFieldRefPage::FillFormatLB(), SwFieldDokInfPage::FillSelectionLB(), SwAccessibleParagraph::GetFieldTypeNameAtIndex(), and SwFieldDBPage::Reset().
sal_uInt16 SwFieldMgr::GetFormatId | ( | SwFieldTypesEnum | nTypeId, |
sal_uInt32 | nFormatId | ||
) | const |
Definition at line 768 of file fldmgr.cxx.
References aTypes, DatabaseSetNumber, DDE, nsSwDocInfoSubType::DI_SUB_AUTHOR, nsSwDocInfoSubType::DI_SUB_DATE, nsSwDocInfoSubType::DI_SUB_TIME, DocumentInfo, DocumentStatistics, GetPos(), GetRefPage, m_xNumberingInfo, NextPage, nId, nPos, PageNumber, PreviousPage, Sequence, sId, SVX_NUM_ARABIC, SVX_NUM_CHAR_SPECIAL, SVX_NUM_CHARS_LOWER_LETTER, SVX_NUM_CHARS_LOWER_LETTER_N, SVX_NUM_CHARS_UPPER_LETTER, SVX_NUM_CHARS_UPPER_LETTER_N, SVX_NUM_PAGEDESC, SVX_NUM_ROMAN_LOWER, and SVX_NUM_ROMAN_UPPER.
Referenced by SwFieldDokPage::FillFormatLB(), SwFieldVarPage::FillFormatLB(), and SwFieldDBPage::Reset().
OUString SwFieldMgr::GetFormatStr | ( | SwFieldTypesEnum | nTypeId, |
sal_uInt32 | nFormatId | ||
) | const |
Definition at line 714 of file fldmgr.cxx.
References assert(), aTypes, Author, FF_FIXED, Filename, SvxNumberingTypeTable::FindIndex(), FMT_NUM_ARY, GetPos(), SvxNumberingTypeTable::GetString(), LAST, LINK_TOKEN, m_xNumberingInfo, n, nPos, RESARRAY_INDEX_NOTFOUND, SwResId(), and USHRT_MAX.
Referenced by SwAccessibleParagraph::GetFieldTypeNameAtIndex().
|
static |
Definition at line 493 of file fldmgr.cxx.
References Date, FixedDate, FixedTime, GetGroupRange(), GRP_DOC, GRP_VAR, i, INP_USR, Input, SwFieldGroupRgn::nEnd, nPos, SwFieldGroupRgn::nStart, Set, SetInput, Time, User, and USHRT_MAX.
Referenced by IMPL_LINK(), and SwFieldEditDlg::SwFieldEditDlg().
|
static |
Definition at line 465 of file fldmgr.cxx.
References GRP_DB_BEGIN, GRP_DB_END, GRP_DOC_BEGIN, GRP_DOC_END, GRP_FKT_BEGIN, GRP_FKT_END, GRP_REF_BEGIN, GRP_REF_END, GRP_REG_BEGIN, GRP_REG_END, GRP_VAR_BEGIN, GRP_VAR_END, GRP_WEB_DB_BEGIN, GRP_WEB_DB_END, GRP_WEB_DOC_BEGIN, GRP_WEB_DOC_END, GRP_WEB_FKT_BEGIN, GRP_WEB_FKT_END, GRP_WEB_REF_BEGIN, GRP_WEB_REF_END, GRP_WEB_REG_BEGIN, GRP_WEB_REG_END, GRP_WEB_VAR_BEGIN, and GRP_WEB_VAR_END.
Referenced by GetGroup(), SwFieldDokPage::Reset(), SwFieldDBPage::Reset(), SwFieldVarPage::Reset(), SwFieldRefPage::Reset(), and SwFieldFuncPage::Reset().
|
inline |
Definition at line 146 of file fldmgr.hxx.
|
inline |
Definition at line 145 of file fldmgr.hxx.
Referenced by SwFieldFuncPage::FillItemSet(), and SwFieldFuncPage::UpdateSubType().
|
private |
Definition at line 1839 of file fldmgr.cxx.
References comphelper::getProcessComponentContext(), and m_xNumberingInfo.
Referenced by GetFormatCount().
|
static |
Definition at line 549 of file fldmgr.cxx.
References Date, FixedDate, FixedTime, GetPackCount(), i, Set, SetInput, Time, User, UserInput, and USHRT_MAX.
Referenced by GetFormatCount(), GetFormatId(), GetFormatStr(), GetSubTypes(), SwFieldDokPage::Reset(), SwFieldDBPage::Reset(), SwFieldVarPage::Reset(), and SwFieldFuncPage::Reset().
void SwFieldMgr::GetSubTypes | ( | SwFieldTypesEnum | nId, |
std::vector< OUString > & | rToFill | ||
) |
Definition at line 568 of file fldmgr.cxx.
References ShellResource::aDocInfoLst, DatabaseName, DatabaseNextSet, DatabaseNumberSet, DatabaseSetNumber, Dde, DDE, nsSwDocInfoSubType::DI_CUSTOM, nsSwDocInfoSubType::DI_SUBTYPE_BEGIN, nsSwDocInfoSubType::DI_SUBTYPE_END, DocumentInfo, Formel, Get, SwEditShell::GetFieldType(), SwEditShell::GetFieldTypeCount(), SwFieldType::GetName(), GetPos(), GetRef, SwEditShell::GetRefMarks(), SwViewShell::GetShellRes(), nsSwGetSetExpType::GSE_SEQ, i, Input, lcl_GetShell(), m_pWrtShell, Macro, nCount, nPos, Sequence, Set, SetExp, SetRef, SwResId(), User, USHRT_MAX, and SwFieldType::Which().
Referenced by SwAccessibleParagraph::GetFieldTypeNameAtIndex(), SwFieldDokInfPage::Reset(), SwFieldVarPage::UpdateSubType(), SwFieldRefPage::UpdateSubType(), and SwFieldFuncPage::UpdateSubType().
|
static |
Definition at line 521 of file fldmgr.cxx.
References GetPackCount().
Referenced by SwFieldDokPage::Reset(), SwFieldDBPage::Reset(), SwFieldVarPage::Reset(), SwFieldRefPage::Reset(), and SwFieldFuncPage::Reset().
|
static |
Definition at line 527 of file fldmgr.cxx.
References Date, GetPackCount(), SwFieldType::GetTypeStr(), SwResId(), and Time.
Referenced by SwFieldDokPage::Reset(), SwFieldDBPage::Reset(), SwFieldVarPage::Reset(), SwFieldRefPage::Reset(), and SwFieldFuncPage::Reset().
|
inline |
Definition at line 150 of file fldmgr.hxx.
Referenced by SwFieldEditDlg::Init().
bool SwFieldMgr::GoNextPrev | ( | bool | bNext = true , |
SwFieldType * | pTyp = nullptr |
||
) |
Definition at line 850 of file fldmgr.cxx.
References Database, SwEditShell::GetFieldType(), SwField::GetTyp(), SwField::GetTypeId(), Input, lcl_GetShell(), m_pCurField, m_pWrtShell, SwCursorShell::MoveFieldType(), SetInput, UserInput, and SwFieldType::Which().
Referenced by IMPL_LINK().
|
inline |
Definition at line 151 of file fldmgr.hxx.
Referenced by SwFieldEditDlg::Init().
bool SwFieldMgr::InsertField | ( | const SwInsertField_Data & | rData | ) |
Definition at line 890 of file fldmgr.cxx.
References aEntries, Author, Authority, CanInsertRefMark(), Chapter, SwWrtShell::ChgDBData(), CombinedChars, ConditionalText, CRSR_SKIP_CHARS, sfx2::cTokenSeparator, Database, DatabaseName, DatabaseNextSet, DatabaseNumberSet, DatabaseSetNumber, Date, DATE_VAR, DATEFLD, DateTime, DB_DELIM, DbNextSet, DbNumSet, DbSetNumber, DDE, SwCursorShell::DeleteCurrent, DocInfo, DocStat, DocumentInfo, DocumentStatistics, Dropdown, SwEditShell::EndAllAction(), ExtendedUser, ExtUser, Filename, FIXEDFLD, FMT_REF_ARY, FN_NUMBER_FORMAT, Formel, Get, SwViewShell::GetAttrPool(), SwDBManager::GetColumnFormat(), SwUserFieldType::GetContent(), GetCurrLanguage(), SwEditShell::GetDBData(), SwEditShell::GetDBManager(), SfxViewFrame::GetDispatcher(), SwViewShell::GetDoc(), SvNumberFormatter::GetEntry(), GetExp, SwEditShell::GetFieldType(), SvNumberformat::GetFormatstring(), SwFEShell::GetFrameType(), SvtUserOptions::GetID(), SwEditShell::GetNumberFormatter(), SwDoc::GetNumberFormatter(), GetRef, GetRefPage, comphelper::string::getTokenCount(), SwSetExpFieldType::GetType(), SwWrtShell::GetView(), SfxViewShell::GetViewFrame(), SwViewShell::GetViewOptions(), nsSwGetSetExpType::GSE_FORMULA, nsSwGetSetExpType::GSE_SEQ, HiddenPara, HiddenParagraph, HiddenText, INP_VAR, Input, SwWrtShell::Insert(), SwEditShell::InsertFieldType(), SwEditShell::InsertURL(), Internet, SwViewOption::IsFieldName(), JumpEdit, LANGUAGE_HUNGARIAN, lcl_GetShell(), SwWrtShell::Left(), SwInsertField_Data::m_aDBColumn, SwInsertField_Data::m_aDBConnection, SwInsertField_Data::m_aDBDataSource, m_bEvalExp, SwInsertField_Data::m_bIsAutomaticLanguage, SwInsertField_Data::m_cSeparator, SwInsertField_Data::m_nFormatId, SwInsertField_Data::m_nSubType, SwInsertField_Data::m_nTypeId, SwInsertField_Data::m_pAnnotationRange, SwInsertField_Data::m_pParent, SwInsertField_Data::m_pSh, m_pWrtShell, m_sCurFrame, SwInsertField_Data::m_sPar1, SwInsertField_Data::m_sPar2, Macro, MAXLEVEL, SwDBData::nCommandType, NextPage, nIndex, nLang, nPos, nTablePos, nToken, PageNumber, ParagraphSignature, PG_NEXT, PG_PREV, PG_RANDOM, SwWrtShell::Pop(), Postit, PreviousPage, SwCursorShell::Push(), RefPageGet, RefPageSet, SwWrtShell::Right(), SAL_N_ELEMENTS, SwDBData::sCommand, Script, SwDBData::sDataSource, Sequence, Set, SwEditShell::SetAttrItem(), SwUserFieldType::SetContent(), SwSetExpFieldType::SetDelimiter(), SetExp, SwSetExpFieldType::SetOutlineLvl(), SetRef, SetRefPage, SwEditShell::SetTableBoxFormulaAttrs(), SwEditShell::SignParagraph(), SwEditShell::StartAllAction(), SwWrtShell::StartInputFieldDlg(), comphelper::string::stripStart(), nsSwExtendedSubType::SUB_INVISIBLE, nsSwExtendedSubType::SUB_OWN_FMT, SVX_NUM_CHAR_SPECIAL, DateTime::SYSTEM, TABLE, TableOfAuthorities, TemplateName, Time, TIMEFLD, type, SwEditShell::UpdateExpFields(), SwFieldType::UpdateFields(), SwEditShell::UpdateOneField(), SwEditShell::UpdateTable(), User, and xColumn.
Referenced by SwTextShell::ExecDB(), SwTextShell::ExecField(), SwTextShell::Execute(), IMPL_LINK_NOARG(), SwMailMergeLayoutPage::InsertAddressFrame(), SwFieldPage::InsertField(), SwMailMergeLayoutPage::InsertGreeting(), InsertLabEnvText(), SwWrtShell::InsertPostIt(), and lcl_InsertLabText().
void SwFieldMgr::InsertFieldType | ( | SwFieldType const & | rType | ) |
Definition at line 875 of file fldmgr.cxx.
References SwEditShell::InsertFieldType(), lcl_GetShell(), and m_pWrtShell.
Referenced by SwView::InsertCaption().
bool SwFieldMgr::IsDBNumeric | ( | const OUString & | rDBName, |
const OUString & | rTableQryName, | ||
bool | bIsTable, | ||
const OUString & | rFieldName | ||
) |
Definition at line 49 of file xfldui.cxx.
References Any, Exception, GetActiveView(), SwEditShell::GetDBManager(), SwView::GetWrtShell(), m_pWrtShell, SwDBManager::RegisterConnection(), and TOOLS_WARN_EXCEPTION.
void SwFieldMgr::RemoveFieldType | ( | SwFieldIds | nResId, |
const OUString & | rName | ||
) |
Definition at line 395 of file fldmgr.cxx.
References lcl_GetShell(), m_pWrtShell, and SwEditShell::RemoveFieldType().
|
inline |
Definition at line 198 of file fldmgr.hxx.
References m_bEvalExp.
void SwFieldMgr::SetMacroPath | ( | const OUString & | rPath | ) |
Definition at line 1788 of file fldmgr.cxx.
References m_sMacroName, m_sMacroPath, and xFactory.
Referenced by ChooseMacro(), and SwFieldFuncPage::Reset().
|
inline |
Definition at line 123 of file fldmgr.hxx.
Referenced by SwFieldPage::SetWrtShell().
void SwFieldMgr::UpdateCurField | ( | sal_uInt32 | nFormat, |
const OUString & | rPar1, | ||
const OUString & | rPar2, | ||
std::unique_ptr< SwField > | _pField = nullptr |
||
) |
Definition at line 1523 of file fldmgr.cxx.
References aEntries, AUTH_FIELD_END, AUTH_FIELD_IDENTIFIER, Authority, SwAuthorityFieldType::ChangeEntryContent(), Chapter, SwField::CopyField(), sfx2::cTokenSeparator, DB_DELIM, DDE, Dropdown, SwEditShell::EndAllAction(), GetCurField(), SwAuthorityField::GetFieldText(), GetRef, GetRefPage, comphelper::string::getTokenCount(), i, lcl_GetShell(), m_pCurField, m_pWrtShell, MAXLEVEL, NextPage, nIndex, nPos, nToken, PageNumber, PreviousPage, Script, SwEditShell::SetModified(), SwEditShell::StartAllAction(), SVX_NUM_CHAR_SPECIAL, SVX_NUM_PAGEDESC, TOX_STYLE_DELIMITER, SwFieldType::UpdateFields(), User, and UserInput.
Referenced by SwTextShell::ExecField(), SwTextShell::Execute(), IMPL_LINK_NOARG(), and SwFieldPage::InsertField().
|
private |
Definition at line 104 of file fldmgr.hxx.
Referenced by GetCurField().
|
private |
Definition at line 105 of file fldmgr.hxx.
Referenced by GetCurField().
|
private |
Definition at line 112 of file fldmgr.hxx.
Referenced by InsertField(), and SetEvalExpFields().
|
private |
Definition at line 111 of file fldmgr.hxx.
Referenced by GetCurField().
|
private |
Definition at line 102 of file fldmgr.hxx.
Referenced by GetCurField(), GetCurTypeId(), GoNextPrev(), and UpdateCurField().
|
private |
Definition at line 103 of file fldmgr.hxx.
Referenced by CanInsertRefMark(), EvalExpFields(), GetCurField(), GetCurrLanguage(), GetFieldType(), GetFieldTypeCount(), GetSubTypes(), GoNextPrev(), InsertField(), InsertFieldType(), IsDBNumeric(), RemoveFieldType(), and UpdateCurField().
|
private |
Definition at line 106 of file fldmgr.hxx.
Referenced by GetCurField(), and InsertField().
|
private |
Definition at line 109 of file fldmgr.hxx.
Referenced by SetMacroPath().
|
private |
Definition at line 108 of file fldmgr.hxx.
Referenced by SetMacroPath().
|
private |
Definition at line 116 of file fldmgr.hxx.
Referenced by GetFormatCount(), GetFormatId(), GetFormatStr(), and GetNumberingInfo().