LibreOffice Module sw (master) 1
|
invariant for SwAuthorityField is that it is always registered at its SwAuthorityFieldType via AddField()/RemoveField() & therefore has m_nHandle set - but it's possible that multiple SwAuthorityField have the same m_nHandle & so the number of instances is an upper bound on SwAuthorityField::m_DataArr.size() - it's not clear to me if more than one one of the instances with the same m_nHandle is actually in the document, they're all cloned via CopyField()... More...
#include <authfld.hxx>
Public Member Functions | |
OUString | ConditionalExpandAuthIdentifier (SwRootFrame const *pLayout) const |
For internal use only, in general continue using ExpandField() instead. More... | |
OUString | ExpandCitation (ToxAuthorityField eField, SwRootFrame const *pLayout) const |
SwAuthorityField (SwAuthorityFieldType *pType, std::u16string_view rFieldContents) | |
SwAuthorityField (SwAuthorityFieldType *pType, SwAuthEntry *pAuthEntry) | |
virtual | ~SwAuthorityField () override |
const OUString & | GetFieldText (ToxAuthorityField eField) const |
virtual void | SetPar1 (const OUString &rStr) override |
virtual SwFieldType * | ChgTyp (SwFieldType *) override |
Set new type (used for copying among documents). More... | |
virtual bool | QueryValue (css::uno::Any &rVal, sal_uInt16 nWhichId) const override |
virtual bool | PutValue (const css::uno::Any &rVal, sal_uInt16 nWhichId) override |
SwAuthEntry * | GetAuthEntry () const |
virtual OUString | GetDescription () const override |
OUString | GetAuthority (const SwTextAttr *pTextAttr, const SwRootFrame *pLayout) const |
Returns the line matching the source's default row in the ToX. More... | |
bool | HasURL () const |
OUString | GetAbsoluteURL () const |
void | dumpAsXml (xmlTextWriterPtr pWriter) const override |
![]() | |
virtual | ~SwField () |
SwField (SwField const &)=default | |
SwField (SwField &&)=default | |
SwField & | operator= (SwField const &)=default |
SwField & | operator= (SwField &&)=default |
SwFieldType * | GetTyp () const |
virtual SwFieldType * | ChgTyp (SwFieldType *) |
Set new type (used for copying among documents). More... | |
OUString | ExpandField (bool bCached, SwRootFrame const *pLayout) const |
expand the field. More... | |
virtual OUString | GetFieldName () const |
get name or content More... | |
std::unique_ptr< SwField > | CopyField () const |
SwFieldIds | Which () const |
ResId. More... | |
SwFieldTypesEnum | GetTypeId () const |
virtual sal_uInt16 | GetSubType () const |
virtual void | SetSubType (sal_uInt16) |
LanguageType | GetLanguage () const |
Language at field position. More... | |
virtual void | SetLanguage (LanguageType nLng) |
sal_uInt32 | GetFormat () const |
Query parameters for dialog and for BASIC. More... | |
virtual OUString | GetPar1 () const |
virtual OUString | GetPar2 () const |
virtual OUString | GetFormula () const |
void | ChangeFormat (sal_uInt32 n) |
virtual void | SetPar1 (const OUString &rStr) |
virtual void | SetPar2 (const OUString &rStr) |
virtual bool | QueryValue (css::uno::Any &rVal, sal_uInt16 nWhichId) const |
virtual bool | PutValue (const css::uno::Any &rVal, sal_uInt16 nWhichId) |
bool | HasClickHdl () const |
Does the field possess an action on its ClickHandler? (e.g. INetFields, ...). More... | |
bool | IsFixed () const |
bool | IsAutomaticLanguage () const |
void | SetAutomaticLanguage (bool const bSet) |
virtual OUString | GetDescription () const |
bool | IsClickable () const |
Is this field clickable? More... | |
virtual void | dumpAsXml (xmlTextWriterPtr pWriter) const |
const OUString & | GetTitle () const |
void | SetTitle (const OUString &rTitle) |
Private Member Functions | |
virtual OUString | ExpandImpl (SwRootFrame const *pLayout) const override |
virtual std::unique_ptr< SwField > | Copy () const override |
Private Attributes | |
rtl::Reference< SwAuthEntry > | m_xAuthEntry |
sal_IntPtr | m_nTempSequencePos |
sal_IntPtr | m_nTempSequencePosRLHidden |
hidden redlines More... | |
Additional Inherited Members | |
![]() | |
void | SetFormat (sal_uInt32 const nSet) |
SwField (SwFieldType *pTyp, sal_uInt32 nFormat=0, LanguageType nLang=LANGUAGE_SYSTEM, bool m_bUseFieldValueCache=true) | |
invariant for SwAuthorityField is that it is always registered at its SwAuthorityFieldType via AddField()/RemoveField() & therefore has m_nHandle set - but it's possible that multiple SwAuthorityField have the same m_nHandle & so the number of instances is an upper bound on SwAuthorityField::m_DataArr.size() - it's not clear to me if more than one one of the instances with the same m_nHandle is actually in the document, they're all cloned via CopyField()...
Definition at line 154 of file authfld.hxx.
SwAuthorityField::SwAuthorityField | ( | SwAuthorityFieldType * | pType, |
std::u16string_view | rFieldContents | ||
) |
Definition at line 452 of file authfld.cxx.
References SwAuthorityFieldType::AddField(), and m_xAuthEntry.
SwAuthorityField::SwAuthorityField | ( | SwAuthorityFieldType * | pType, |
SwAuthEntry * | pAuthEntry | ||
) |
Definition at line 461 of file authfld.cxx.
|
overridevirtual |
Definition at line 470 of file authfld.cxx.
References SwField::GetTyp(), and m_xAuthEntry.
|
overridevirtual |
Set new type (used for copying among documents).
Set a new type.
This is needed/used for copying between documents. Needs to be always of the same type.
pNewType | The new type. |
Reimplemented from SwField.
Definition at line 768 of file authfld.cxx.
References SwField::ChgTyp(), SwField::GetTyp(), m_xAuthEntry, and SwAuthorityFieldType::RemoveField().
OUString SwAuthorityField::ConditionalExpandAuthIdentifier | ( | SwRootFrame const * | pLayout | ) | const |
For internal use only, in general continue using ExpandField() instead.
Definition at line 480 of file authfld.cxx.
References AUTH_FIELD_IDENTIFIER, AUTH_FIELD_TITLE, SwAuthorityFieldType::GetDoc(), SwDoc::getIDocumentFieldsAccess(), SwAuthorityFieldType::GetPrefix(), SwAuthorityFieldType::GetSequencePos(), SwAuthorityFieldType::GetSuffix(), SwField::GetTyp(), IDocumentFieldsAccess::IsExpFieldsLocked(), SwRootFrame::IsHideRedlines(), SwAuthorityFieldType::IsSequence(), m_nTempSequencePos, m_nTempSequencePosRLHidden, m_xAuthEntry, o3tl::starts_with(), o3tl::trim(), and u.
Referenced by SwField::ExpandField(), and ExpandImpl().
|
overrideprivatevirtual |
Implements SwField.
Definition at line 539 of file authfld.cxx.
References SwField::GetTyp(), and m_xAuthEntry.
|
overridevirtual |
Reimplemented from SwField.
Definition at line 626 of file authfld.cxx.
References SwField::dumpAsXml(), m_nTempSequencePos, m_nTempSequencePosRLHidden, and m_xAuthEntry.
OUString SwAuthorityField::ExpandCitation | ( | ToxAuthorityField | eField, |
SwRootFrame const * | pLayout | ||
) | const |
Definition at line 515 of file authfld.cxx.
References SwAuthorityFieldType::GetDoc(), SwDoc::getIDocumentFieldsAccess(), SwAuthorityFieldType::GetSequencePos(), SwField::GetTyp(), IDocumentFieldsAccess::IsExpFieldsLocked(), SwRootFrame::IsHideRedlines(), SwAuthorityFieldType::IsSequence(), m_nTempSequencePos, m_nTempSequencePosRLHidden, and m_xAuthEntry.
|
overrideprivatevirtual |
Implements SwField.
Definition at line 475 of file authfld.cxx.
References ConditionalExpandAuthIdentifier().
OUString SwAuthorityField::GetAbsoluteURL | ( | ) | const |
Definition at line 616 of file authfld.cxx.
References AUTH_FIELD_URL, INetURLObject::GetAbsURL(), GetAuthEntry(), SwAuthEntry::GetAuthorField(), SwDoc::GetDocShell(), SfxObjectShell::getDocumentBaseURL(), SwField::GetTyp(), INetURLObject::WasEncoded, and INetURLObject::WithCharset.
|
inline |
Definition at line 182 of file authfld.hxx.
Referenced by SwTextShell::Execute(), SwEnhancedPDFExportHelper::ExportAuthorityEntryLinks(), GetAbsoluteURL(), SwAuthorityFieldType::GetSequencePos(), and HasURL().
OUString SwAuthorityField::GetAuthority | ( | const SwTextAttr * | pTextAttr, |
const SwRootFrame * | pLayout | ||
) | const |
Returns the line matching the source's default row in the ToX.
Definition at line 562 of file authfld.cxx.
References SwTextAttr::GetFormatField(), SwTOXAuthority::GetLevel(), SwForm::GetPattern(), SwTOXAuthority::GetText(), SwTextField::GetTextNode(), SwField::GetTyp(), SwTOXSortTabBase::InitText(), TOKEN_AUTHORITY, TOKEN_TEXT, and TOX_AUTHORITIES.
Referenced by SwEditWin::RequestHelp().
|
overridevirtual |
const OUString & SwAuthorityField::GetFieldText | ( | ToxAuthorityField | eField | ) | const |
Definition at line 545 of file authfld.cxx.
References m_xAuthEntry.
Referenced by SwTOXAuthority::GetLevel(), SwTOXAuthority::GetText(), SwTOXAuthority::sort_lt(), and SwFieldMgr::UpdateCurField().
bool SwAuthorityField::HasURL | ( | ) | const |
Definition at line 610 of file authfld.cxx.
References AUTH_FIELD_URL, GetAuthEntry(), and SwAuthEntry::GetAuthorField().
Referenced by SwTextShell::GetState(), and SwField::HasClickHdl().
|
overridevirtual |
Reimplemented from SwField.
Definition at line 731 of file authfld.cxx.
References AUTH_FIELD_AUTHORITY_TYPE, AUTH_FIELD_LOCAL_URL, SwField::GetTyp(), lcl_Find(), m_xAuthEntry, comphelper::string::padToLength(), comphelper::string::setToken(), and TOX_STYLE_DELIMITER.
|
overridevirtual |
Reimplemented from SwField.
Definition at line 701 of file authfld.cxx.
References aFieldNames, AUTH_FIELD_AUTHORITY_TYPE, AUTH_FIELD_END, SwField::GetTyp(), i, m_xAuthEntry, and pValues.
|
overridevirtual |
Reimplemented from SwField.
Definition at line 550 of file authfld.cxx.
References SwAuthorityFieldType::AddField(), SwField::GetTyp(), m_xAuthEntry, and SwAuthorityFieldType::RemoveField().
|
mutableprivate |
Definition at line 157 of file authfld.hxx.
Referenced by ConditionalExpandAuthIdentifier(), dumpAsXml(), and ExpandCitation().
|
mutableprivate |
hidden redlines
Definition at line 158 of file authfld.hxx.
Referenced by ConditionalExpandAuthIdentifier(), dumpAsXml(), and ExpandCitation().
|
private |
Definition at line 156 of file authfld.hxx.
Referenced by ChgTyp(), ConditionalExpandAuthIdentifier(), Copy(), dumpAsXml(), ExpandCitation(), GetFieldText(), PutValue(), QueryValue(), SetPar1(), SwAuthorityField(), and ~SwAuthorityField().