LibreOffice Module sw (master) 1
|
Represents an inserted bibliography entry, created using Insert -> Table of Contents and Index -> Bibliography Entry. More...
#include <authfld.hxx>
Public Types | |
enum | TargetType : sal_uInt16 { UseDisplayURL = 0 , UseTargetURL = 1 , None = 2 , BibliographyTableRow = 3 } |
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 SwRootFrame *pLayout, const SwForm *pTOX=nullptr) const |
Returns the line matching the source's default row in the ToX. More... | |
TargetType | GetTargetType () const |
Returns which target should be used when the entry (the standalone field, such as '[ASDF]', not in the table) is clicked. More... | |
OUString | GetAbsoluteURL () const |
Returns absolute target URL in case there is one (GetTargetType() should be checked). More... | |
OUString | GetRelativeURI () const |
Returns relative URI for the URL. More... | |
void | dumpAsXml (xmlTextWriterPtr pWriter) const override |
Public Member Functions inherited from SwField | |
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 | |
Protected Member Functions inherited from SwField | |
void | SetFormat (sal_uInt32 const nSet) |
SwField (SwFieldType *pTyp, sal_uInt32 nFormat=0, LanguageType nLang=LANGUAGE_SYSTEM, bool m_bUseFieldValueCache=true) | |
Represents an inserted bibliography entry, created using Insert -> Table of Contents and Index -> Bibliography Entry.
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 160 of file authfld.hxx.
enum SwAuthorityField::TargetType : sal_uInt16 |
Enumerator | |
---|---|
UseDisplayURL | |
UseTargetURL | |
None | |
BibliographyTableRow |
Definition at line 170 of file authfld.hxx.
SwAuthorityField::SwAuthorityField | ( | SwAuthorityFieldType * | pType, |
std::u16string_view | rFieldContents | ||
) |
Definition at line 457 of file authfld.cxx.
References SwAuthorityFieldType::AddField(), and m_xAuthEntry.
SwAuthorityField::SwAuthorityField | ( | SwAuthorityFieldType * | pType, |
SwAuthEntry * | pAuthEntry | ||
) |
Definition at line 466 of file authfld.cxx.
|
overridevirtual |
Definition at line 475 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 844 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 485 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 544 of file authfld.cxx.
References SwField::GetTyp(), and m_xAuthEntry.
|
overridevirtual |
Reimplemented from SwField.
Definition at line 700 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 520 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 480 of file authfld.cxx.
References ConditionalExpandAuthIdentifier().
OUString SwAuthorityField::GetAbsoluteURL | ( | ) | const |
Returns absolute target URL in case there is one (GetTargetType() should be checked).
If there isn't one, the result is undefined.
Definition at line 647 of file authfld.cxx.
References AUTH_FIELD_TARGET_URL, AUTH_FIELD_URL, INetURLObject::GetAbsURL(), GetAuthEntry(), SwAuthEntry::GetAuthorField(), SwDoc::GetDocShell(), SfxObjectShell::getDocumentBaseURL(), GetTargetType(), SwField::GetTyp(), INetURLObject::WasEncoded, and INetURLObject::WithCharset.
Referenced by SwWrtShell::ClickToField(), SwTextShell::Execute(), SwEnhancedPDFExportHelper::ExportAuthorityEntryLinks(), and SwTextShell::GetState().
|
inline |
Definition at line 198 of file authfld.hxx.
Referenced by GetAbsoluteURL(), SwAuthorityFieldType::GetSequencePos(), and GetTargetType().
OUString SwAuthorityField::GetAuthority | ( | const SwRootFrame * | pLayout, |
const SwForm * | pTOX = nullptr |
||
) | const |
Returns the line matching the source's default row in the ToX.
pLayout | layout to be used |
pTOX | bibliography table to take the format of the string from |
Definition at line 567 of file authfld.cxx.
References AUTH_FIELD_AUTHORITY_TYPE, AUTH_FIELD_IDENTIFIER, AUTH_FIELD_URL, AUTH_TYPE_ARTICLE, AUTH_TYPE_END, SwAuthorityFieldType::CreateTOXInternational(), SwField::ExpandField(), SwAuthorityFieldType::GetAuthTypeName(), GetFieldText(), SwForm::GetPattern(), SwAuthorityFieldType::GetPrefix(), GetRelativeURI(), SwAuthorityFieldType::GetSuffix(), SwField::GetTyp(), TOKEN_AUTHORITY, TOKEN_TAB_STOP, TOKEN_TEXT, and TOX_AUTHORITIES.
Referenced by SwWrtShell::ClickToField(), and SwEditWin::RequestHelp().
|
overridevirtual |
const OUString & SwAuthorityField::GetFieldText | ( | ToxAuthorityField | eField | ) | const |
Definition at line 550 of file authfld.cxx.
References m_xAuthEntry.
Referenced by GetAuthority(), SwTOXAuthority::GetLevel(), GetRelativeURI(), SwTOXAuthority::GetText(), SwTOXAuthority::sort_lt(), and SwFieldMgr::UpdateCurField().
OUString SwAuthorityField::GetRelativeURI | ( | ) | const |
Returns relative URI for the URL.
Definition at line 659 of file authfld.cxx.
References AUTH_FIELD_URL, sw::proofreadingiterator::get(), SwDoc::GetDocShell(), SfxObjectShell::getDocumentBaseURL(), GetFieldText(), comphelper::getProcessComponentContext(), INetURLObject::GetRelURL(), SwField::GetTyp(), and SAL_WARN.
Referenced by GetAuthority().
SwAuthorityField::TargetType SwAuthorityField::GetTargetType | ( | ) | const |
Returns which target should be used when the entry (the standalone field, such as '[ASDF]', not in the table) is clicked.
Definition at line 642 of file authfld.cxx.
References AUTH_FIELD_TARGET_TYPE, GetAuthEntry(), and toInt32().
Referenced by SwWrtShell::ClickToField(), and GetAbsoluteURL().
|
overridevirtual |
Reimplemented from SwField.
Definition at line 807 of file authfld.cxx.
References AUTH_FIELD_AUTHORITY_TYPE, AUTH_FIELD_END, SwField::GetTyp(), lcl_Find(), m_xAuthEntry, comphelper::string::padToLength(), comphelper::string::setToken(), and TOX_STYLE_DELIMITER.
|
overridevirtual |
Reimplemented from SwField.
Definition at line 777 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 555 of file authfld.cxx.
References SwAuthorityFieldType::AddField(), SwField::GetTyp(), m_xAuthEntry, and SwAuthorityFieldType::RemoveField().
|
mutableprivate |
Definition at line 163 of file authfld.hxx.
Referenced by ConditionalExpandAuthIdentifier(), dumpAsXml(), and ExpandCitation().
|
mutableprivate |
hidden redlines
Definition at line 164 of file authfld.hxx.
Referenced by ConditionalExpandAuthIdentifier(), dumpAsXml(), and ExpandCitation().
|
private |
Definition at line 162 of file authfld.hxx.
Referenced by ChgTyp(), ConditionalExpandAuthIdentifier(), Copy(), dumpAsXml(), ExpandCitation(), GetFieldText(), PutValue(), QueryValue(), SetPar1(), SwAuthorityField(), and ~SwAuthorityField().