LibreOffice Module editeng (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
EditTextObjectImpl Class Referencefinal

#include <editobj2.hxx>

Inheritance diagram for EditTextObjectImpl:
[legend]
Collaboration diagram for EditTextObjectImpl:
[legend]

Public Types

typedef std::vector< std::unique_ptr< ContentInfo > > ContentInfosType
 

Public Member Functions

 EditTextObjectImpl (SfxItemPool *pPool, MapUnit eDefaultMetric, bool bVertical, TextRotation eRotation, SvtScriptType eScriptType)
 
 EditTextObjectImpl (const EditTextObjectImpl &r)
 
virtual ~EditTextObjectImpl () override
 
EditTextObjectImploperator= (const EditTextObjectImpl &)=delete
 
virtual OutlinerMode GetUserType () const override
 
virtual void SetUserType (OutlinerMode n) override
 
virtual void NormalizeString (svl::SharedStringPool &rPool) override
 Set paragraph strings to the shared string pool. More...
 
virtual std::vector< svl::SharedStringGetSharedStrings () const override
 
virtual bool IsEffectivelyVertical () const override
 
virtual bool GetVertical () const override
 
virtual bool IsTopToBottom () const override
 
virtual void SetVertical (bool bVert) override
 
virtual void SetRotation (TextRotation nRotation) override
 
virtual TextRotation GetRotation () const override
 
virtual SvtScriptType GetScriptType () const override
 
virtual std::unique_ptr< EditTextObjectClone () const override
 
ContentInfoCreateAndInsertContent ()
 
XEditAttribute CreateAttrib (const SfxPoolItem &rItem, sal_Int32 nStart, sal_Int32 nEnd)
 
void DestroyAttrib (const XEditAttribute &rAttr)
 
ContentInfosTypeGetContents ()
 
const ContentInfosTypeGetContents () const
 
SfxItemPoolGetPool ()
 
virtual const SfxItemPoolGetPool () const override
 
XParaPortionListGetPortionInfo () const
 
void SetPortionInfo (std::unique_ptr< XParaPortionList > pP)
 
virtual sal_Int32 GetParagraphCount () const override
 
virtual OUString GetText (sal_Int32 nParagraph) const override
 
virtual void ClearPortionInfo () override
 
virtual bool HasOnlineSpellErrors () const override
 
virtual void GetCharAttribs (sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const override
 
virtual bool RemoveCharAttribs (sal_uInt16 nWhich) override
 
virtual void GetAllSections (std::vector< editeng::Section > &rAttrs) const override
 Get all text sections in this content. More...
 
virtual bool IsFieldObject () const override
 
virtual const SvxFieldItemGetField () const override
 
virtual const SvxFieldDataGetFieldData (sal_Int32 nPara, size_t nPos, sal_Int32 nType) const override
 
virtual bool HasField (sal_Int32 nType=css::text::textfield::Type::UNSPECIFIED) const override
 
virtual const SfxItemSetGetParaAttribs (sal_Int32 nPara) const override
 
virtual void GetStyleSheet (sal_Int32 nPara, OUString &rName, SfxStyleFamily &eFamily) const override
 
virtual void SetStyleSheet (sal_Int32 nPara, const OUString &rName, const SfxStyleFamily &eFamily) override
 
virtual bool ChangeStyleSheets (std::u16string_view rOldName, SfxStyleFamily eOldFamily, const OUString &rNewName, SfxStyleFamily eNewFamily) override
 
virtual void ChangeStyleSheetName (SfxStyleFamily eFamily, std::u16string_view rOldName, const OUString &rNewName) override
 
virtual editeng::FieldUpdater GetFieldUpdater () override
 
bool HasMetric () const
 
MapUnit GetMetric () const
 
virtual bool operator== (const EditTextObject &rCompare) const override
 
bool Equals (const EditTextObjectImpl &rCompare, bool bComparePool) const
 
virtual bool isWrongListEqual (const EditTextObject &rCompare) const override
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
- Public Member Functions inherited from EditTextObject
virtual ~EditTextObject ()
 
virtual void NormalizeString (svl::SharedStringPool &rPool)=0
 Set paragraph strings to the shared string pool. More...
 
virtual std::vector< svl::SharedStringGetSharedStrings () const =0
 
virtual const SfxItemPoolGetPool () const =0
 
virtual OutlinerMode GetUserType () const =0
 
virtual void SetUserType (OutlinerMode n)=0
 
virtual bool IsEffectivelyVertical () const =0
 
virtual bool GetVertical () const =0
 
virtual bool IsTopToBottom () const =0
 
virtual void SetVertical (bool bVertical)=0
 
virtual void SetRotation (TextRotation nRotation)=0
 
virtual TextRotation GetRotation () const =0
 
virtual SvtScriptType GetScriptType () const =0
 
virtual std::unique_ptr< EditTextObjectClone () const =0
 
virtual sal_Int32 GetParagraphCount () const =0
 
virtual OUString GetText (sal_Int32 nPara) const =0
 
virtual void ClearPortionInfo ()=0
 
virtual bool HasOnlineSpellErrors () const =0
 
virtual void GetCharAttribs (sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const =0
 
virtual bool RemoveCharAttribs (sal_uInt16 nWhich)=0
 
virtual void GetAllSections (std::vector< editeng::Section > &rAttrs) const =0
 Get all text sections in this content. More...
 
virtual bool IsFieldObject () const =0
 
virtual const SvxFieldItemGetField () const =0
 
virtual const SvxFieldDataGetFieldData (sal_Int32 nPara, size_t nPos, sal_Int32 nType) const =0
 
virtual bool HasField (sal_Int32 nType=css::text::textfield::Type::UNSPECIFIED) const =0
 
virtual const SfxItemSetGetParaAttribs (sal_Int32 nPara) const =0
 
virtual void GetStyleSheet (sal_Int32 nPara, OUString &rName, SfxStyleFamily &eFamily) const =0
 
virtual void SetStyleSheet (sal_Int32 nPara, const OUString &rName, const SfxStyleFamily &eFamily)=0
 
virtual bool ChangeStyleSheets (std::u16string_view rOldName, SfxStyleFamily eOldFamily, const OUString &rNewName, SfxStyleFamily eNewFamily)=0
 
virtual void ChangeStyleSheetName (SfxStyleFamily eFamily, std::u16string_view rOldName, const OUString &rNewName)=0
 
virtual editeng::FieldUpdater GetFieldUpdater ()=0
 
virtual bool operator== (const EditTextObject &rCompare) const =0
 
bool Equals (const EditTextObject &rCompare) const
 Compare, ignoring SfxItemPool pointer. More...
 
virtual bool isWrongListEqual (const EditTextObject &rCompare) const =0
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const =0
 

Private Member Functions

bool ImpChangeStyleSheets (std::u16string_view rOldName, SfxStyleFamily eOldFamily, const OUString &rNewName, SfxStyleFamily eNewFamily)
 

Private Attributes

ContentInfosType maContents
 
rtl::Reference< SfxItemPoolmpPool
 
std::unique_ptr< XParaPortionListmpPortionInfo
 
OutlinerMode meUserType
 
SvtScriptType meScriptType
 
TextRotation meRotation
 
MapUnit meMetric
 
bool mbVertical
 

Detailed Description

Definition at line 172 of file editobj2.hxx.

Member Typedef Documentation

◆ ContentInfosType

typedef std::vector<std::unique_ptr<ContentInfo> > EditTextObjectImpl::ContentInfosType

Definition at line 175 of file editobj2.hxx.

Constructor & Destructor Documentation

◆ EditTextObjectImpl() [1/2]

EditTextObjectImpl::EditTextObjectImpl ( SfxItemPool pPool,
MapUnit  eDefaultMetric,
bool  bVertical,
TextRotation  eRotation,
SvtScriptType  eScriptType 
)

Definition at line 275 of file editobj.cxx.

References DontKnow.

◆ EditTextObjectImpl() [2/2]

EditTextObjectImpl::EditTextObjectImpl ( const EditTextObjectImpl r)

Definition at line 286 of file editobj.cxx.

References maContents, and mpPool.

◆ ~EditTextObjectImpl()

EditTextObjectImpl::~EditTextObjectImpl ( )
overridevirtual

Definition at line 301 of file editobj.cxx.

References ClearPortionInfo(), and maContents.

Member Function Documentation

◆ ChangeStyleSheetName()

void EditTextObjectImpl::ChangeStyleSheetName ( SfxStyleFamily  eFamily,
std::u16string_view  rOldName,
const OUString &  rNewName 
)
overridevirtual

Implements EditTextObject.

Definition at line 740 of file editobj.cxx.

References ImpChangeStyleSheets().

◆ ChangeStyleSheets()

bool EditTextObjectImpl::ChangeStyleSheets ( std::u16string_view  rOldName,
SfxStyleFamily  eOldFamily,
const OUString &  rNewName,
SfxStyleFamily  eNewFamily 
)
overridevirtual

Implements EditTextObject.

Definition at line 729 of file editobj.cxx.

References ClearPortionInfo(), and ImpChangeStyleSheets().

◆ ClearPortionInfo()

void EditTextObjectImpl::ClearPortionInfo ( )
overridevirtual

Implements EditTextObject.

Definition at line 413 of file editobj.cxx.

References mpPortionInfo.

Referenced by ChangeStyleSheets(), RemoveCharAttribs(), SetRotation(), SetVertical(), and ~EditTextObjectImpl().

◆ Clone()

std::unique_ptr< EditTextObject > EditTextObjectImpl::Clone ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 214 of file editobj.cxx.

◆ CreateAndInsertContent()

ContentInfo * EditTextObjectImpl::CreateAndInsertContent ( )

Definition at line 388 of file editobj.cxx.

References maContents, and mpPool.

◆ CreateAttrib()

XEditAttribute EditTextObjectImpl::CreateAttrib ( const SfxPoolItem rItem,
sal_Int32  nStart,
sal_Int32  nEnd 
)

Definition at line 377 of file editobj.cxx.

References MakeXEditAttribute(), and mpPool.

◆ DestroyAttrib()

void EditTextObjectImpl::DestroyAttrib ( const XEditAttribute rAttr)

Definition at line 382 of file editobj.cxx.

References XEditAttribute::GetItem(), and mpPool.

◆ dumpAsXml()

void EditTextObjectImpl::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

Implements EditTextObject.

Definition at line 224 of file editobj.cxx.

References GetParagraphCount(), i, maContents, and nCount.

◆ Equals()

bool EditTextObjectImpl::Equals ( const EditTextObjectImpl rCompare,
bool  bComparePool 
) const

Definition at line 751 of file editobj.cxx.

References maContents, mbVertical, meMetric, meRotation, meScriptType, meUserType, and mpPool.

Referenced by EditTextObject::Equals(), and operator==().

◆ GetAllSections()

void EditTextObjectImpl::GetAllSections ( std::vector< editeng::Section > &  rAttrs) const
overridevirtual

Get all text sections in this content.

Sections are non-overlapping segments of text split either by paragraph boundaries or format boundaries. Each section object contains all applied formats and/or a field item.

Implements EditTextObject.

Definition at line 583 of file editobj.cxx.

References XEditAttribute::GetEnd(), XEditAttribute::GetItem(), XEditAttribute::GetStart(), ContentInfo::GetText(), editeng::Section::maAttributes, ContentInfo::maCharAttribs, maContents, and SAL_WARN.

◆ GetCharAttribs()

void EditTextObjectImpl::GetCharAttribs ( sal_Int32  nPara,
std::vector< EECharAttrib > &  rLst 
) const
overridevirtual

◆ GetContents() [1/2]

ContentInfosType & EditTextObjectImpl::GetContents ( )
inline

◆ GetContents() [2/2]

const ContentInfosType & EditTextObjectImpl::GetContents ( ) const
inline

Definition at line 222 of file editobj2.hxx.

References maContents.

◆ GetField()

const SvxFieldItem * EditTextObjectImpl::GetField ( ) const
overridevirtual

◆ GetFieldData()

const SvxFieldData * EditTextObjectImpl::GetFieldData ( sal_Int32  nPara,
size_t  nPos,
sal_Int32  nType 
) const
overridevirtual

◆ GetFieldUpdater()

virtual editeng::FieldUpdater EditTextObjectImpl::GetFieldUpdater ( )
inlineoverridevirtual

Implements EditTextObject.

Definition at line 256 of file editobj2.hxx.

◆ GetMetric()

MapUnit EditTextObjectImpl::GetMetric ( ) const
inline

Definition at line 259 of file editobj2.hxx.

References meMetric.

Referenced by ImpEditEngine::InsertTextObject().

◆ GetParaAttribs()

const SfxItemSet & EditTextObjectImpl::GetParaAttribs ( sal_Int32  nPara) const
overridevirtual

Implements EditTextObject.

Definition at line 524 of file editobj.cxx.

References ContentInfo::GetParaAttribs(), and maContents.

◆ GetParagraphCount()

sal_Int32 EditTextObjectImpl::GetParagraphCount ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 394 of file editobj.cxx.

References EE_PARA_MAX_COUNT, maContents, and SAL_WARN.

Referenced by dumpAsXml().

◆ GetPool() [1/2]

SfxItemPool * EditTextObjectImpl::GetPool ( )
inline

Definition at line 223 of file editobj2.hxx.

References mpPool.

Referenced by editeng::FieldUpdaterImpl::updateTableFields().

◆ GetPool() [2/2]

virtual const SfxItemPool * EditTextObjectImpl::GetPool ( ) const
inlineoverridevirtual

Implements EditTextObject.

Definition at line 224 of file editobj2.hxx.

References mpPool.

◆ GetPortionInfo()

XParaPortionList * EditTextObjectImpl::GetPortionInfo ( ) const
inline

Definition at line 225 of file editobj2.hxx.

References mpPortionInfo.

Referenced by ImpEditEngine::InsertTextObject().

◆ GetRotation()

TextRotation EditTextObjectImpl::GetRotation ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 372 of file editobj.cxx.

References meRotation.

◆ GetScriptType()

virtual SvtScriptType EditTextObjectImpl::GetScriptType ( ) const
inlineoverridevirtual

Implements EditTextObject.

Definition at line 213 of file editobj2.hxx.

References meScriptType.

◆ GetSharedStrings()

std::vector< svl::SharedString > EditTextObjectImpl::GetSharedStrings ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 325 of file editobj.cxx.

References ContentInfo::GetSharedString(), and maContents.

◆ GetStyleSheet()

void EditTextObjectImpl::GetStyleSheet ( sal_Int32  nPara,
OUString &  rName,
SfxStyleFamily eFamily 
) const
overridevirtual

◆ GetText()

OUString EditTextObjectImpl::GetText ( sal_Int32  nParagraph) const
overridevirtual

Implements EditTextObject.

Definition at line 405 of file editobj.cxx.

References maContents, and o3tl::make_unsigned().

◆ GetUserType()

virtual OutlinerMode EditTextObjectImpl::GetUserType ( ) const
inlineoverridevirtual

Implements EditTextObject.

Definition at line 200 of file editobj2.hxx.

References meUserType.

◆ GetVertical()

bool EditTextObjectImpl::GetVertical ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 358 of file editobj.cxx.

References mbVertical.

◆ HasField()

bool EditTextObjectImpl::HasField ( sal_Int32  nType = css::text::textfield::Type::UNSPECIFIED) const
overridevirtual

◆ HasMetric()

bool EditTextObjectImpl::HasMetric ( ) const
inline

Definition at line 258 of file editobj2.hxx.

References meMetric.

Referenced by ImpEditEngine::InsertTextObject().

◆ HasOnlineSpellErrors()

bool EditTextObjectImpl::HasOnlineSpellErrors ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 418 of file editobj.cxx.

References maContents.

◆ ImpChangeStyleSheets()

bool EditTextObjectImpl::ImpChangeStyleSheets ( std::u16string_view  rOldName,
SfxStyleFamily  eOldFamily,
const OUString &  rNewName,
SfxStyleFamily  eNewFamily 
)
private

◆ IsEffectivelyVertical()

bool EditTextObjectImpl::IsEffectivelyVertical ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 337 of file editobj.cxx.

References mbVertical, meRotation, and NONE.

◆ IsFieldObject()

bool EditTextObjectImpl::IsFieldObject ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 442 of file editobj.cxx.

References GetField().

◆ IsTopToBottom()

bool EditTextObjectImpl::IsTopToBottom ( ) const
overridevirtual

Implements EditTextObject.

Definition at line 343 of file editobj.cxx.

References mbVertical, meRotation, NONE, and TOPTOBOTTOM.

◆ isWrongListEqual()

bool EditTextObjectImpl::isWrongListEqual ( const EditTextObject rCompare) const
overridevirtual

Implements EditTextObject.

Definition at line 770 of file editobj.cxx.

References maContents, and toImpl().

◆ NormalizeString()

void EditTextObjectImpl::NormalizeString ( svl::SharedStringPool rPool)
overridevirtual

Set paragraph strings to the shared string pool.

Parameters
rPoolshared string pool.

Implements EditTextObject.

Definition at line 316 of file editobj.cxx.

References maContents, and ContentInfo::NormalizeString().

◆ operator=()

EditTextObjectImpl & EditTextObjectImpl::operator= ( const EditTextObjectImpl )
delete

◆ operator==()

bool EditTextObjectImpl::operator== ( const EditTextObject rCompare) const
overridevirtual

Implements EditTextObject.

Definition at line 746 of file editobj.cxx.

References Equals(), and toImpl().

◆ RemoveCharAttribs()

bool EditTextObjectImpl::RemoveCharAttribs ( sal_uInt16  nWhich)
overridevirtual

◆ SetPortionInfo()

void EditTextObjectImpl::SetPortionInfo ( std::unique_ptr< XParaPortionList pP)
inline

Definition at line 226 of file editobj2.hxx.

References mpPortionInfo.

◆ SetRotation()

void EditTextObjectImpl::SetRotation ( TextRotation  nRotation)
overridevirtual

Implements EditTextObject.

Definition at line 363 of file editobj.cxx.

References ClearPortionInfo(), and meRotation.

◆ SetStyleSheet()

void EditTextObjectImpl::SetStyleSheet ( sal_Int32  nPara,
const OUString &  rName,
const SfxStyleFamily eFamily 
)
overridevirtual

◆ SetUserType()

void EditTextObjectImpl::SetUserType ( OutlinerMode  n)
overridevirtual

Implements EditTextObject.

Definition at line 311 of file editobj.cxx.

References meUserType, and n.

◆ SetVertical()

void EditTextObjectImpl::SetVertical ( bool  bVert)
overridevirtual

Implements EditTextObject.

Definition at line 349 of file editobj.cxx.

References ClearPortionInfo(), and mbVertical.

Member Data Documentation

◆ maContents

ContentInfosType EditTextObjectImpl::maContents
private

◆ mbVertical

bool EditTextObjectImpl::mbVertical
private

Definition at line 187 of file editobj2.hxx.

Referenced by Equals(), GetVertical(), IsEffectivelyVertical(), IsTopToBottom(), and SetVertical().

◆ meMetric

MapUnit EditTextObjectImpl::meMetric
private

Definition at line 185 of file editobj2.hxx.

Referenced by Equals(), GetMetric(), and HasMetric().

◆ meRotation

TextRotation EditTextObjectImpl::meRotation
private

Definition at line 184 of file editobj2.hxx.

Referenced by Equals(), GetRotation(), IsEffectivelyVertical(), IsTopToBottom(), and SetRotation().

◆ meScriptType

SvtScriptType EditTextObjectImpl::meScriptType
private

Definition at line 183 of file editobj2.hxx.

Referenced by Equals(), and GetScriptType().

◆ meUserType

OutlinerMode EditTextObjectImpl::meUserType
private

Definition at line 182 of file editobj2.hxx.

Referenced by Equals(), GetUserType(), and SetUserType().

◆ mpPool

rtl::Reference<SfxItemPool> EditTextObjectImpl::mpPool
private

◆ mpPortionInfo

std::unique_ptr<XParaPortionList> EditTextObjectImpl::mpPortionInfo
private

Definition at line 180 of file editobj2.hxx.

Referenced by ClearPortionInfo(), GetPortionInfo(), and SetPortionInfo().


The documentation for this class was generated from the following files: