LibreOffice Module svx (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
sdr::properties::TextProperties Class Reference

#include <textproperties.hxx>

Inheritance diagram for sdr::properties::TextProperties:
[legend]
Collaboration diagram for sdr::properties::TextProperties:
[legend]

Public Member Functions

 TextProperties (SdrObject &rObj)
 
 TextProperties (const TextProperties &rProps, SdrObject &rObj)
 
virtual ~TextProperties () override
 
virtual std::unique_ptr< BasePropertiesClone (SdrObject &rObj) const override
 
virtual void SetStyleSheet (SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast) override
 
virtual void ForceDefaultAttributes () override
 
virtual void ForceStyleToHardAttributes () override
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override
 
void SetObjectItemNoBroadcast (const SfxPoolItem &rItem)
 
virtual sal_uInt32 getVersion () const override
 
void increaseVersion ()
 
- Public Member Functions inherited from sdr::properties::AttributeProperties
 AttributeProperties (SdrObject &rObj)
 
 AttributeProperties (const AttributeProperties &rProps, SdrObject &rObj)
 
virtual std::unique_ptr< BasePropertiesClone (SdrObject &rObj) const override
 
virtual const SfxItemSetGetObjectItemSet () const override
 
virtual ~AttributeProperties () override
 
virtual void SetStyleSheet (SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast) override
 
virtual SfxStyleSheetGetStyleSheet () const override
 
virtual void ForceStyleToHardAttributes () override
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override
 
virtual bool isUsedByModel () const override
 
- Public Member Functions inherited from sdr::properties::DefaultProperties
 DefaultProperties (SdrObject &rObj)
 
 DefaultProperties (const DefaultProperties &rProps, SdrObject &rObj)
 
virtual ~DefaultProperties () override
 
void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
virtual std::unique_ptr< BasePropertiesClone (SdrObject &rObj) const override
 
virtual const SfxItemSetGetObjectItemSet () const override
 
virtual void SetObjectItem (const SfxPoolItem &rItem) override
 
virtual void SetObjectItemDirect (const SfxPoolItem &rItem) override
 
virtual void ClearObjectItem (const sal_uInt16 nWhich=0) override
 
virtual void ClearObjectItemDirect (const sal_uInt16 nWhich) override
 
virtual void SetObjectItemSet (const SfxItemSet &rSet) override
 
virtual void SetStyleSheet (SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast) override
 
virtual SfxStyleSheetGetStyleSheet () const override
 
virtual void ForceDefaultAttributes ()
 
- Public Member Functions inherited from sdr::properties::BaseProperties
 BaseProperties (SdrObject &rObj)
 
virtual ~BaseProperties ()
 
virtual SfxItemSet CreateObjectSpecificItemSet (SfxItemPool &pPool)=0
 
virtual std::unique_ptr< BasePropertiesClone (SdrObject &rObj) const =0
 
virtual const SfxItemSetGetObjectItemSet () const =0
 
virtual const SfxItemSetGetMergedItemSet () const
 
virtual void SetObjectItemSet (const SfxItemSet &rSet)=0
 
virtual void SetMergedItemSet (const SfxItemSet &rSet, bool bClearAllItems=false)
 
virtual void SetObjectItem (const SfxPoolItem &rItem)=0
 
virtual void SetObjectItemDirect (const SfxPoolItem &rItem)=0
 
virtual void ClearObjectItem (const sal_uInt16 nWhich=0)=0
 
virtual void SetMergedItem (const SfxPoolItem &rItem)
 
virtual void ClearMergedItem (const sal_uInt16 nWhich)
 
virtual void ClearObjectItemDirect (const sal_uInt16 nWhich)=0
 
virtual void SetStyleSheet (SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast)=0
 
virtual SfxStyleSheetGetStyleSheet () const =0
 
virtual void ForceStyleToHardAttributes ()
 
void SetMergedItemSetAndBroadcast (const SfxItemSet &rSet, bool bClearAllItems=false)
 
const SfxPoolItemGetItem (const sal_uInt16 nWhich) const
 
template<class T >
const T & GetItem (TypedWhichId< T > nWhich) const
 
void BroadcastItemChange (const ItemChangeBroadcaster &rChange)
 
virtual sal_uInt32 getVersion () const
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint)
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 
virtual bool IsSdrView () const
 

Protected Member Functions

virtual SfxItemSet CreateObjectSpecificItemSet (SfxItemPool &rPool) override
 
virtual void ItemChange (const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
 
virtual void ItemSetChanged (o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
 
virtual const svx::ITextProvidergetTextProvider () const
 Get the TextProvider related to our SdrObject. More...
 
- Protected Member Functions inherited from sdr::properties::AttributeProperties
virtual SfxItemSet CreateObjectSpecificItemSet (SfxItemPool &pPool) override
 
virtual void ItemChange (const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
 
virtual void ItemSetChanged (o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
 
virtual void applyDefaultStyleSheetFromSdrModel ()
 
- Protected Member Functions inherited from sdr::properties::DefaultProperties
virtual SfxItemSet CreateObjectSpecificItemSet (SfxItemPool &pPool) override
 
virtual bool AllowItemChange (const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) const
 
virtual void ItemChange (const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr)
 
virtual void PostItemChange (const sal_uInt16 nWhich)
 
virtual void ItemSetChanged (o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich)
 
bool HasSfxItemSet () const
 
- Protected Member Functions inherited from sdr::properties::BaseProperties
const SdrObjectGetSdrObject () const
 
SdrObjectGetSdrObject ()
 

Private Attributes

sal_uInt32 maVersion
 

Additional Inherited Members

- Protected Attributes inherited from sdr::properties::DefaultProperties
std::optional< SfxItemSetmxItemSet
 

Detailed Description

Definition at line 29 of file textproperties.hxx.

Constructor & Destructor Documentation

◆ TextProperties() [1/2]

sdr::properties::TextProperties::TextProperties ( SdrObject rObj)
explicit

Definition at line 63 of file textproperties.cxx.

Referenced by Clone().

◆ TextProperties() [2/2]

sdr::properties::TextProperties::TextProperties ( const TextProperties rProps,
SdrObject rObj 
)

Definition at line 69 of file textproperties.cxx.

◆ ~TextProperties()

sdr::properties::TextProperties::~TextProperties ( )
overridevirtual

Definition at line 75 of file textproperties.cxx.

Member Function Documentation

◆ Clone()

std::unique_ptr< BaseProperties > sdr::properties::TextProperties::Clone ( SdrObject rObj) const
overridevirtual

◆ CreateObjectSpecificItemSet()

SfxItemSet sdr::properties::TextProperties::CreateObjectSpecificItemSet ( SfxItemPool rPool)
overrideprotectedvirtual

◆ ForceDefaultAttributes()

void sdr::properties::TextProperties::ForceDefaultAttributes ( )
overridevirtual

◆ ForceStyleToHardAttributes()

void sdr::properties::TextProperties::ForceStyleToHardAttributes ( )
overridevirtual

the next code handles a special case for paragraphs that contain a url field. The color for URL fields is either the system color for urls or the char color attribute that formats the portion in which the url field is contained. When we set a char color attribute to the paragraphs item set from the styles item set, we would have this char color attribute as an attribute that is spanned over the complete paragraph after xml import due to some problems in the xml import (using a XCursor on import so it does not know the paragraphs and can't set char attributes to paragraphs ).

To avoid this, as soon as we try to set a char color attribute from the style we

  1. check if we have at least one url field in this paragraph
  2. if we found at least one url field, we span the char color attribute over all portions that are not url fields and remove the char color attribute from the paragraphs item set

Reimplemented from sdr::properties::AttributeProperties.

Definition at line 394 of file textproperties.cxx.

References SfxItemSet::ClearItem(), EE_CHAR_COLOR(), EE_FEATURE_FIELD(), sdr::properties::AttributeProperties::ForceStyleToHardAttributes(), EditEngine::GetCharAttribs(), SfxItemIter::GetCurItem(), SvxFieldItem::GetField(), SfxStyleSheetBase::GetItemSet(), SfxItemSet::GetItemState(), sdr::properties::AttributeProperties::GetObjectItemSet(), SdrText::GetOutlinerParaObject(), SfxItemSet::GetPool(), SdrObject::getSdrModelFromSdrObject(), sdr::properties::BaseProperties::GetSdrObject(), svx::ITextProvider::getText(), svx::ITextProvider::getTextCount(), EditEngine::GetTextLen(), getTextProvider(), IsInvalidItem(), SdrTextObj::IsLinkedText(), SdrTextObj::IsTextEditActive(), ItemSetChanged(), sdr::properties::DefaultProperties::mxItemSet, SdrTextObj::NbcSetOutlinerParaObjectForText(), ESelection::nEndPos, SfxItemIter::NextItem(), ESelection::nStartPos, pData, SfxItemSet::Put(), EditEngine::QuickSetAttribs(), and SdrMakeOutliner().

◆ getTextProvider()

const svx::ITextProvider & sdr::properties::TextProperties::getTextProvider ( ) const
protectedvirtual

Get the TextProvider related to our SdrObject.

Reimplemented in sdr::properties::CellProperties.

Definition at line 240 of file textproperties.cxx.

References sdr::properties::BaseProperties::GetSdrObject().

Referenced by ForceStyleToHardAttributes(), ItemChange(), ItemSetChanged(), Notify(), and SetStyleSheet().

◆ getVersion()

sal_uInt32 sdr::properties::TextProperties::getVersion ( ) const
overridevirtual

Reimplemented from sdr::properties::BaseProperties.

Definition at line 624 of file textproperties.cxx.

References maVersion.

◆ increaseVersion()

void sdr::properties::TextProperties::increaseVersion ( )
inline

Definition at line 82 of file textproperties.hxx.

References maVersion.

◆ ItemChange()

void sdr::properties::TextProperties::ItemChange ( const sal_uInt16  nWhich,
const SfxPoolItem pNewItem = nullptr 
)
overrideprotectedvirtual

◆ ItemSetChanged()

void sdr::properties::TextProperties::ItemSetChanged ( o3tl::span< const SfxPoolItem *const >  aChangedItems,
sal_uInt16  nDeletedWhich 
)
overrideprotectedvirtual

Reimplemented from sdr::properties::AttributeProperties.

Reimplemented in sdr::properties::CaptionProperties, sdr::properties::CellProperties, sdr::properties::CircleProperties, sdr::properties::ConnectorProperties, sdr::properties::CustomShapeProperties, sdr::properties::GraphicProperties, sdr::properties::MeasureProperties, and sdr::properties::RectangleProperties.

Definition at line 84 of file textproperties.cxx.

References SdrObject::ActionChanged(), Outliner::Clear(), SfxItemSet::ClearItem(), Outliner::CreateParaObject(), SdrTextObj::getActiveText(), sdr::properties::AttributeProperties::GetObjectItemSet(), SdrText::GetOutlinerParaObject(), Outliner::GetParaAttribs(), Outliner::GetParagraphCount(), sdr::properties::BaseProperties::GetSdrObject(), svx::ITextProvider::getText(), SdrTextObj::GetTextColumnsNumber(), SdrTextObj::GetTextColumnsSpacing(), svx::ITextProvider::getTextCount(), SdrTextObj::GetTextEditOutliner(), getTextProvider(), SdrTextObj::ImpGetDrawOutliner(), SdrTextObj::IsTextEditActive(), sdr::properties::AttributeProperties::ItemSetChanged(), maVersion, sdr::properties::DefaultProperties::mxItemSet, SdrTextObj::NbcSetOutlinerParaObjectForText(), SfxItemSet::Put(), SDRATTR_TEXT_CONTOURFRAME(), Outliner::SetParaAttribs(), and Outliner::SetText().

Referenced by ForceStyleToHardAttributes(), sdr::properties::ConnectorProperties::ItemSetChanged(), sdr::properties::CustomShapeProperties::ItemSetChanged(), sdr::properties::MeasureProperties::ItemSetChanged(), and sdr::properties::RectangleProperties::ItemSetChanged().

◆ Notify()

void sdr::properties::TextProperties::Notify ( SfxBroadcaster rBC,
const SfxHint rHint 
)
overridevirtual

◆ SetObjectItemNoBroadcast()

void sdr::properties::TextProperties::SetObjectItemNoBroadcast ( const SfxPoolItem rItem)

◆ SetStyleSheet()

void sdr::properties::TextProperties::SetStyleSheet ( SfxStyleSheet pNewStyleSheet,
bool  bDontRemoveHardAttr,
bool  bBroadcast 
)
overridevirtual

Reimplemented from sdr::properties::AttributeProperties.

Reimplemented in sdr::properties::CaptionProperties, sdr::properties::CircleProperties, sdr::properties::ConnectorProperties, sdr::properties::CustomShapeProperties, sdr::properties::GraphicProperties, sdr::properties::MeasureProperties, and sdr::properties::RectangleProperties.

Definition at line 245 of file textproperties.cxx.

References Outliner::Clear(), Outliner::CreateParaObject(), DBG_ASSERT, Default, EE_ITEMS_END(), EE_ITEMS_START(), SfxStyleSheetBasePool::Find(), SfxItemIter::GetCurItem(), Outliner::GetDepth(), SfxStyleSheetBase::GetItemSet(), GetName(), SdrObject::GetObjInventor(), SdrText::GetOutlinerParaObject(), Outliner::GetParaAttribs(), Outliner::GetParagraphCount(), SdrObject::getSdrModelFromSdrObject(), sdr::properties::BaseProperties::GetSdrObject(), sdr::properties::AttributeProperties::GetStyleSheet(), SdrModel::GetStyleSheetPool(), svx::ITextProvider::getText(), svx::ITextProvider::getTextCount(), SdrTextObj::GetTextKind(), getTextProvider(), SdrTextObj::ImpGetDrawOutliner(), IsInvalidItem(), SdrTextObj::IsLinkedText(), SdrTextObj::IsTextFrame(), maVersion, SdrTextObj::NbcAdjustTextFrameWidthAndHeight(), SdrTextObj::NbcSetOutlinerParaObjectForText(), SfxItemIter::NextItem(), OutlineText, Outliner::RemoveCharAttribs(), Outliner::SetParaAttribs(), Outliner::SetStyleSheet(), sdr::properties::AttributeProperties::SetStyleSheet(), and Outliner::SetText().

Referenced by sdr::properties::ConnectorProperties::SetStyleSheet(), sdr::properties::CustomShapeProperties::SetStyleSheet(), sdr::properties::MeasureProperties::SetStyleSheet(), and sdr::properties::RectangleProperties::SetStyleSheet().

Member Data Documentation

◆ maVersion

sal_uInt32 sdr::properties::TextProperties::maVersion
private

Definition at line 33 of file textproperties.hxx.

Referenced by getVersion(), increaseVersion(), ItemSetChanged(), Notify(), and SetStyleSheet().


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