39 #include <osl/diagnose.h>
48 if(!bDontRemoveHardAttr)
70 OSL_ENSURE(
false,
"ImpSetParentAtSfxItemSet called without SfxItemSet/SfxStyleSheet (!)");
138 mpStyleSheet(nullptr)
149 mpStyleSheet(nullptr)
153 if(pTargetStyleSheet)
176 pTargetStyleSheet =
nullptr;
190 if(
nullptr != pTargetStyleSheetPool)
196 pTargetStyleSheetPool->Find(
198 SfxStyleFamily::All));
203 if(!pTargetStyleSheet)
292 std::unique_ptr<SfxPoolItem> pResultItem;
300 pResultItem =
static_cast<const XFillBitmapItem*
>(pNewItem)->checkForUniqueItem( &rModel );
305 pResultItem =
static_cast<const XLineDashItem*
>(pNewItem)->checkForUniqueItem( &rModel );
310 pResultItem =
static_cast<const XLineStartItem*
>(pNewItem)->checkForUniqueItem( &rModel );
315 pResultItem =
static_cast<const XLineEndItem*
>(pNewItem)->checkForUniqueItem( &rModel );
320 pResultItem =
static_cast<const XFillGradientItem*
>(pNewItem)->checkForUniqueItem( &rModel );
331 pResultItem =
static_cast<const XFillHatchItem*
>(pNewItem)->checkForUniqueItem( &rModel );
397 sal_uInt16 nWhich(aIter.FirstWhich());
405 if(SfxItemState::SET ==
mxItemSet->GetItemState(nWhich,
true, &pItem))
407 aDestItemSet.
Put(*pItem);
410 nWhich = aIter.NextWhich();
414 mxItemSet.emplace(std::move(aDestItemSet));
425 bool bHintUsed(
false);
434 switch(pStyleHint->
GetId())
436 case SfxHintId::StyleSheetCreated :
441 case SfxHintId::StyleSheetModified :
442 case SfxHintId::StyleSheetChanged :
447 case SfxHintId::StyleSheetErased :
448 case SfxHintId::StyleSheetInDestruction :
461 pNewStSh =
static_cast<SfxStyleSheet*
>(rModel.GetStyleSheetPool()->Find(
462 pStyleSheet->GetParent(), pStyleSheet->GetFamily()));
467 pNewStSh = rModel.GetDefaultStyleSheet();
518 if (pPage && pPage->IsInserted())
virtual SfxStyleSheet * GetStyleSheet() const override
constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_LAST(SDRATTR_TEXTCOLUMNS_SPACING)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)
bool HasSfxItemSet() const
static constexpr auto Items
virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool &pPool) override
virtual ~AttributeProperties() override
bool IsInDestruction() const
virtual bool isUsedByModel() const override
virtual const SfxItemSet & GetObjectItemSet() const override
virtual void SetBoundRectDirty()
constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_FIRST(SDRATTR_SOFTEDGE_LAST+1)
virtual const SfxItemSet & GetObjectItemSet() const override
virtual SfxItemSet & GetItemSet()
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr sal_uInt16 SDRATTR_MISC_LAST(SDRATTR_TEXT_CHAINNEXTNAME)
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
SfxStyleSheetBase * GetStyleSheet() const
const OUString & GetName() const
void ImpRemoveStyleSheet()
void ImpAddStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
SdrPage * getSdrPageFromSdrObject() const
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
SfxStyleSheetBasePool * GetPool()
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)
#define DBG_ASSERT(sCon, aError)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
virtual void applyDefaultStyleSheetFromSdrModel()
void BroadcastObjectChange() const
SdrModel & getSdrModelFromSdrObject() const
virtual std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
SfxItemState GetItemState(bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
void SetParent(const SfxItemSet *pNew)
virtual const tools::Rectangle & GetLastBoundRect() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr sal_uInt16 SDRATTR_SHADOW_LAST(SDRATTR_SHADOWBLUR)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
virtual void ForceStyleToHardAttributes() override
SfxStyleSheet * mpStyleSheet
SfxStyleSheetBasePool * GetStyleSheetPool() const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
std::optional< SfxItemSet > mxItemSet
const SdrObject & GetSdrObject() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
void ImpSetParentAtSfxItemSet(bool bDontRemoveHardAttr)
virtual void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
virtual void SetChanged()
constexpr sal_uInt16 SDRATTR_MISC_FIRST(SDRATTR_CAPTION_LAST+1)
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
AttributeProperties(SdrObject &rObj)
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast) override