29#include <osl/diagnose.h>
41 sal_uInt16 nFormatWhich ) :
42 m_aFormatName( OUString::createFromAscii(pFormatNm) ),
43 m_aSet( rPool, pWhichRanges ),
44 m_nWhichId( nFormatWhich ),
45 m_nPoolFormatId( USHRT_MAX ),
46 m_nPoolHelpId( USHRT_MAX ),
47 m_nPoolHlpFileId( UCHAR_MAX )
55 pDrvdFrame->Add(
this);
62 sal_uInt16 nFormatWhich ) :
63 m_aFormatName(
std::move(aFormatNm) ),
64 m_aSet( rPool, pWhichRanges ),
65 m_nWhichId( nFormatWhich ),
66 m_nPoolFormatId( USHRT_MAX ),
67 m_nPoolHelpId( USHRT_MAX ),
68 m_nPoolHlpFileId( UCHAR_MAX )
76 pDrvdFrame->Add(
this);
82 sw::BorderCacheOwner(),
83 m_aFormatName( rFormat.m_aFormatName ),
85 m_nWhichId( rFormat.m_nWhichId ),
86 m_nPoolFormatId( rFormat.GetPoolFormatId() ),
87 m_nPoolHelpId( rFormat.GetPoolHelpId() ),
88 m_nPoolHlpFileId( rFormat.GetPoolHlpFileId() )
131 if(GetRegisteredIn() != rFormat.GetRegisteredIn())
133 StartListeningToSameModifyAs(rFormat);
147 OSL_ENSURE( !
IsDefault(),
"SetName: Defaultformat" );
199 if( pChgSet != &rFormat.
m_aSet )
207 if(!HasWriterListeners())
215 SAL_WARN(
"sw.core",
"~SwFormat: format still has clients on death, but parent format is missing: " <<
GetName());
220 pClient->CheckRegistrationFormat(*
this);
221 assert(!HasWriterListeners());
226 if (rHint.
GetId() != SfxHintId::SwLegacyModify)
230 std::optional<SwAttrSetChg> oOldClientChg, oNewClientChg;
231 std::optional<sw::LegacyModifyHint> oDependsHint(std::in_place, pLegacy->m_pOld, pLegacy->m_pNew);
232 const sal_uInt16 nWhich = pLegacy->GetWhich();
248 if(GetRegisteredIn() && GetRegisteredIn() == pFormat)
250 if(pFormat->GetRegisteredIn())
268 auto pOldAttrSetChg =
static_cast<const SwAttrSetChg*
>(pLegacy->m_pOld);
269 auto pNewAttrSetChg =
static_cast<const SwAttrSetChg*
>(pLegacy->m_pNew);
270 if (pOldAttrSetChg && pNewAttrSetChg && pOldAttrSetChg->GetTheChgdSet() != &
m_aSet)
273 oNewClientChg.emplace(*pNewAttrSetChg);
275 if(oNewClientChg->Count())
277 oOldClientChg.emplace(*pOldAttrSetChg);
278 oOldClientChg->GetChgSet()->Differentiate(
m_aSet);
279 oDependsHint.emplace(&*oOldClientChg, &*oNewClientChg);
282 oDependsHint.reset();
293 auto pOldFormatChg =
static_cast<const SwFormatChg*
>(pLegacy->m_pOld);
294 auto pNewFormatChg =
static_cast<const SwFormatChg*
>(pLegacy->m_pNew);
295 if(pOldFormatChg && pNewFormatChg && pOldFormatChg->pChangedFormat !=
this && pNewFormatChg->pChangedFormat == GetRegisteredIn())
308 oDependsHint.reset();
323 while ( pFormat !=
nullptr )
325 if ( pFormat ==
this )
338 if ( (pDerFrom ==
DerivedFrom()) || (pDerFrom ==
this) )
350 pDerFrom->Add(
this );
371 SAL_INFO(
"sw.core",
"Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes or makeBackgroundBrushItem (simple fallback is in place and used)");
372 static std::unique_ptr<SvxBrushItem> aSvxBrushItem;
379 return *aSvxBrushItem;
390 SAL_INFO(
"sw.core",
"Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes or SwFormat::GetBackgroundStat (simple fallback is in place and used)");
394 if(aFill && aFill->isUsed())
399 static std::unique_ptr<SvxBrushItem> aSvxBrushItem;
403 *ppItem = aSvxBrushItem.get();
405 return SfxItemState::SET;
413 return SfxItemState::DEFAULT;
427 if(aFill && aFill->isUsed())
433 return SfxItemState::SET;
437 return SfxItemState::DEFAULT;
443 rItem.reset(pItem->
Clone());
449 const sal_uInt16 nWhich = rAttr.
Which();
458 SAL_INFO(
"sw.core",
"Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
493 const sal_uInt16 nFormatWhich =
Which();
494 if( IsModifyLocked() ||
495 ( !HasWriterListeners() &&
553 SAL_INFO(
"sw.core",
"Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
587 const sal_uInt16 nFormatWhich =
Which();
588 if ( IsModifyLocked() ||
589 ( !HasWriterListeners() &&
623 if( !nWhich2 || nWhich2 < nWhich1 )
626 for( sal_uInt16
n = nWhich1;
n < nWhich2; ++
n )
628 for( sal_uInt16
n = nWhich1;
n < nWhich2 &&
IsInCache(); ++
n )
632 if( IsModifyLocked() )
633 return 0 != (( nWhich2 == nWhich1 )
655 if( IsModifyLocked() )
675 if( IsModifyLocked() )
725 rVal <<= uno::Sequence<beans::PropertyValue>();
741 SAL_INFO(
"sw.core",
"Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
Give access to the data-provider for chart.
Document fields related interfaces.
Provides access to the layout of a document.
Provides access to settings of a document.
Handle the background jobs of a Writer document.
const WhichRangesContainer & GetRanges() const
void SetParent(const SfxItemSet *pNew)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void Intersect(const SfxItemSet &rSet)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void Differentiate(const SfxItemSet &rSet)
T & StaticWhichCast(TypedWhichId< T > nId)
virtual SvxBrushItem * Clone(SfxItemPool *pPool=nullptr) const override
const SwAttrSet * GetChgSet() const
What has changed.
SwAttrPool * GetPool() const
const SvxBrushItem & GetBackground(bool=true) const
void CopyToModify(sw::BroadcastingModify &rMod) const
sal_uInt16 ClearItem_BC(sal_uInt16 nWhich, SwAttrSet *pOld, SwAttrSet *pNew)
bool Put_BC(const SfxPoolItem &rAttr, SwAttrSet *pOld, SwAttrSet *pNew)
bool SetModifyAtAttr(const sw::BroadcastingModify *pModify)
special treatment for some attributes
int Intersect_BC(const SfxItemSet &rSet, SwAttrSet *pOld, SwAttrSet *pNew)
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const
void CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet &rSet)
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
::sw::DocumentSettingManager & GetDocumentSettingManager()
IDocumentTimerAccess const & getIDocumentTimerAccess() const
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
void InvalidateInSwCache(const sal_uInt16)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_REMOVE_UNO_OBJECT(181)
constexpr TypedWhichId< SwGrfFormatColl > RES_GRFFMTCOLL(164)
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(166)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(169)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SwTextFormatColl > RES_TXTFMTCOLL(163)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_OBJECTDYING(RES_FORMAT_MSG_BEGIN)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
constexpr TypedWhichId< SwFrameFormat > RES_FRMFMT(161)
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(168)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
void CheckTextFormatCollForDeletionOfAssignmentToOutlineStyle(SwFormat *pFormat, const SwNumRuleItem *pNewNumRuleItem)
Checks, if assignment of paragraph style to list level of outline style has to be deleted,...
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
Dialog to specify the properties of date form field.
void ClientNotifyAttrChg(SwModify &rModify, const SwAttrSet &aSet, SwAttrSet &aOld, SwAttrSet &aNew)
SVXCORE_DLLPUBLIC std::unique_ptr< SvxBrushItem > getSvxBrushItemFromSourceSet(const SfxItemSet &rSourceSet, sal_uInt16 nBackgroundID, bool bSearchInParents=true, bool bXMLImportHack=false)
SVXCORE_DLLPUBLIC void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem &rBrush, SfxItemSet &rToSet)