38 const OUString& rName )
41 if ( rName.getLength() == 0 )
58 assert(pTextField !=
nullptr);
65 if ( pPostItField->GetName().isEmpty()
66 || pPostItField->GetName() !=
GetName() )
84 std::vector<SwFormatField*> vFields;
86 auto ppFound = std::find_if(vFields.begin(), vFields.end(), [&
sName](
SwFormatField* pF)
88 auto pPF = dynamic_cast<const SwPostItField*>(pF->GetField());
89 return pPF && pPF->GetName() == sName;
91 return ppFound != vFields.end() ? *ppFound :
nullptr;
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
virtual void SetModified()=0
Must be called manually at changes of format.
IDocumentState const & getIDocumentState() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Instances of SwFields and those derived from it occur 0 to n times.
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
PaM is Point and Mark: a selection of the document model.
const SwFormatField & GetFormatField() const
SwTextNode is a paragraph in the document model.
SwTextField * GetFieldTextAttrAt(const sal_Int32 nIndex, ::sw::GetTextAttrMode const eMode=::sw::GetTextAttrMode::Expand) const
AnnotationMark(const SwPaM &rPaM, const OUString &rName)
virtual void InitDoc(SwDoc &io_Doc, sw::mark::InsertMode eMode, SwPosition const *pSepPos) override
virtual ~AnnotationMark() override
const SwFormatField * GetAnnotationFormatField() const
const OUString & GetName() const override
SwPosition & GetMarkEnd() const override
void SetName(const OUString &rName)
SwPosition & GetMarkPos() const override
static OUString GenerateNewName(std::u16string_view rPrefix)
Marks a position in the document model.
SwDoc & GetDoc() const
Returns the document this position is in.