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) 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
 
- Public Member Functions inherited from sdr::properties::AttributeProperties
 AttributeProperties (SdrObject &rObj)
 
 AttributeProperties (const AttributeProperties &rProps, SdrObject &rObj)
 
virtual const SfxItemSetGetObjectItemSet () const override
 
virtual ~AttributeProperties () override
 
virtual SfxStyleSheetGetStyleSheet () const 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 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
 
- Public Member Functions inherited from sdr::properties::BaseProperties
 BaseProperties (SdrObject &rObj)
 
virtual ~BaseProperties ()
 
virtual const SfxItemSetGetMergedItemSet () const
 
virtual void SetMergedItemSet (const SfxItemSet &rSet, bool bClearAllItems=false)
 
virtual void SetMergedItem (const SfxPoolItem &rItem)
 
virtual void ClearMergedItem (const sal_uInt16 nWhich)
 
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)
 
- 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
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 

Protected Member Functions

virtual std::unique_ptr< SfxItemSetCreateObjectSpecificItemSet (SfxItemPool &rPool) override
 
virtual void ItemChange (const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
 
virtual void ItemSetChanged (const SfxItemSet &rSet) override
 
virtual const svx::ITextProvidergetTextProvider () const
 Get the TextProvider related to our SdrObject. More...
 
- Protected Member Functions inherited from sdr::properties::DefaultProperties
virtual bool AllowItemChange (const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) const override
 
virtual void PostItemChange (const sal_uInt16 nWhich) override
 
bool HasSfxItemSet () const
 
- Protected Member Functions inherited from sdr::properties::BaseProperties
virtual void applyDefaultStyleSheetFromSdrModel ()
 
const SdrObjectGetSdrObject () const
 
SdrObjectGetSdrObject ()
 
- Protected Member Functions inherited from svl::StyleSheetUser
 ~StyleSheetUser ()
 

Private Attributes

sal_uInt32 maVersion
 

Additional Inherited Members

- Protected Attributes inherited from sdr::properties::AttributeProperties
SfxStyleSheetmpStyleSheet
 
- Protected Attributes inherited from sdr::properties::DefaultProperties
std::unique_ptr< SfxItemSetmpItemSet
 

Detailed Description

Definition at line 31 of file textproperties.hxx.

Constructor & Destructor Documentation

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

Definition at line 65 of file textproperties.cxx.

Referenced by Clone().

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

Definition at line 71 of file textproperties.cxx.

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

Definition at line 77 of file textproperties.cxx.

Member Function Documentation

std::unique_ptr< BaseProperties > sdr::properties::TextProperties::Clone ( SdrObject rObj) const
overridevirtual
std::unique_ptr< SfxItemSet > sdr::properties::TextProperties::CreateObjectSpecificItemSet ( SfxItemPool rPool)
overrideprotectedvirtual
void sdr::properties::TextProperties::ForceDefaultAttributes ( )
overridevirtual
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 385 of file textproperties.cxx.

References EE_CHAR_COLOR, EE_FEATURE_FIELD, sdr::properties::AttributeProperties::ForceStyleToHardAttributes(), EditEngine::GetCharAttribs(), SvxFieldItem::GetField(), SfxStyleSheetBase::GetItemSet(), sdr::properties::AttributeProperties::GetObjectItemSet(), SdrText::GetOutlinerParaObject(), SdrObject::getSdrModelFromSdrObject(), sdr::properties::BaseProperties::GetSdrObject(), EditEngine::GetTextLen(), getTextProvider(), SdrTextObj::IsLinkedText(), SdrTextObj::IsTextEditActive(), ItemSetChanged(), sdr::properties::DefaultProperties::mpItemSet, SdrTextObj::NbcSetOutlinerParaObjectForText(), ESelection::nEndPos, ESelection::nStartPos, EditEngine::QuickSetAttribs(), and SdrMakeOutliner().

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

Get the TextProvider related to our SdrObject.

Reimplemented in sdr::properties::CellProperties.

Definition at line 232 of file textproperties.cxx.

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

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

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

Reimplemented from sdr::properties::BaseProperties.

Definition at line 608 of file textproperties.cxx.

References maVersion.

void sdr::properties::TextProperties::ItemChange ( const sal_uInt16  nWhich,
const SfxPoolItem pNewItem = nullptr 
)
overrideprotectedvirtual
void sdr::properties::TextProperties::ItemSetChanged ( const SfxItemSet rSet)
overrideprotectedvirtual
void sdr::properties::TextProperties::Notify ( SfxBroadcaster rBC,
const SfxHint rHint 
)
overridevirtual
void sdr::properties::TextProperties::SetObjectItemNoBroadcast ( const SfxPoolItem rItem)
void sdr::properties::TextProperties::SetStyleSheet ( SfxStyleSheet pNewStyleSheet,
bool  bDontRemoveHardAttr 
)
overridevirtual

Reimplemented from sdr::properties::AttributeProperties.

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

Definition at line 237 of file textproperties.cxx.

References Outliner::Clear(), Outliner::CreateParaObject(), DBG_ASSERT, Default, EE_ITEMS_END, EE_ITEMS_START, Outliner::GetDepth(), SfxStyleSheetBase::GetItemSet(), 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(), OBJ_OUTLINETEXT, Outliner::RemoveCharAttribs(), Outliner::SetParaAttribs(), Outliner::SetStyleSheet(), sdr::properties::AttributeProperties::SetStyleSheet(), and Outliner::SetText().

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

Member Data Documentation

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

Definition at line 35 of file textproperties.hxx.

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


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