29 #include <osl/diagnose.h>
40 sal_uInt16 nFormatWhich ) :
41 m_aFormatName( OUString::createFromAscii(pFormatNm) ),
42 m_aSet( rPool, pWhichRanges ),
43 m_nWhichId( nFormatWhich ),
44 m_nPoolFormatId( USHRT_MAX ),
45 m_nPoolHelpId( USHRT_MAX ),
46 m_nPoolHlpFileId( UCHAR_MAX )
54 pDrvdFrame->
Add(
this);
61 sal_uInt16 nFormatWhich ) :
62 m_aFormatName( rFormatNm ),
63 m_aSet( rPool, pWhichRanges ),
64 m_nWhichId( nFormatWhich ),
65 m_nPoolFormatId( USHRT_MAX ),
66 m_nPoolHelpId( USHRT_MAX ),
67 m_nPoolHlpFileId( UCHAR_MAX )
75 pDrvdFrame->
Add(
this);
81 sw::BorderCacheOwner(),
82 m_aFormatName( rFormat.m_aFormatName ),
84 m_nWhichId( rFormat.m_nWhichId ),
85 m_nPoolFormatId( rFormat.GetPoolFormatId() ),
86 m_nPoolHelpId( rFormat.GetPoolHelpId() ),
87 m_nPoolHlpFileId( rFormat.GetPoolHlpFileId() )
146 OSL_ENSURE( !
IsDefault(),
"SetName: Defaultformat" );
200 if( pChgSet != &rFormat.
m_aSet )
216 SAL_WARN(
"sw.core",
"~SwFormat: format still has clients on death, but parent format is missing: " <<
GetName());
221 pClient->CheckRegistrationFormat(*
this);
227 if (rHint.
GetId() != SfxHintId::SwLegacyModify)
231 std::unique_ptr<SwAttrSetChg> pOldClientChg, pNewClientChg;
232 auto pDependsHint = std::make_unique<sw::LegacyModifyHint>(pLegacy->m_pOld, pLegacy->m_pNew);
233 const sal_uInt16 nWhich = pLegacy->
GetWhich();
269 auto pOldAttrSetChg =
static_cast<const SwAttrSetChg*
>(pLegacy->m_pOld);
270 auto pNewAttrSetChg =
static_cast<const SwAttrSetChg*
>(pLegacy->m_pNew);
271 if (pOldAttrSetChg && pNewAttrSetChg && pOldAttrSetChg->GetTheChgdSet() != &
m_aSet)
276 if(pNewClientChg->Count())
279 pOldClientChg->GetChgSet()->Differentiate(
m_aSet);
283 pDependsHint.reset(
nullptr);
294 auto pOldFormatChg =
static_cast<const SwFormatChg*
>(pLegacy->m_pOld);
295 auto pNewFormatChg =
static_cast<const SwFormatChg*
>(pLegacy->m_pNew);
296 if(pOldFormatChg && pNewFormatChg && pOldFormatChg->pChangedFormat !=
this && pNewFormatChg->pChangedFormat ==
GetRegisteredIn())
309 pDependsHint.reset(
nullptr);
324 while ( pFormat !=
nullptr )
326 if ( pFormat ==
this )
339 if ( (pDerFrom ==
DerivedFrom()) || (pDerFrom ==
this) )
351 pDerFrom->
Add(
this );
372 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)");
373 static std::unique_ptr<SvxBrushItem> aSvxBrushItem;
380 return *aSvxBrushItem;
391 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)");
395 if(aFill && aFill->isUsed())
400 static std::unique_ptr<SvxBrushItem> aSvxBrushItem;
404 *ppItem = aSvxBrushItem.get();
406 return SfxItemState::SET;
414 return SfxItemState::DEFAULT;
428 if(aFill && aFill->isUsed())
434 return SfxItemState::SET;
438 return SfxItemState::DEFAULT;
444 rItem.reset(pItem->
Clone());
450 const sal_uInt16 nWhich = rAttr.
Which();
459 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)");
494 const sal_uInt16 nFormatWhich =
Which();
554 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)");
588 const sal_uInt16 nFormatWhich =
Which();
624 if( !nWhich2 || nWhich2 < nWhich1 )
627 for( sal_uInt16
n = nWhich1;
n < nWhich2; ++
n )
629 for( sal_uInt16
n = nWhich1;
n < nWhich2 &&
IsInCache(); ++
n )
634 return 0 != (( nWhich2 == nWhich1 )
726 rVal <<= uno::Sequence<beans::PropertyValue>();
742 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)");
const SwAttrSet * GetChgSet() const
What has changed.
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
void Add(SwClient *pDepend)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhich() const
const SvxBrushItem & GetBackground(bool=true) const
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(162)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_REMOVE_UNO_OBJECT(181)
std::unique_ptr< SvxBrushItem > getSvxBrushItemFromSourceSet(const SfxItemSet &rSourceSet, sal_uInt16 nBackgroundID, bool bSearchInParents, bool bXMLImportHack)
void CheckTextFormatCollForDeletionOfAssignmentToOutlineStyle(SwFormat *pFormat, const SwNumRuleItem *pNewNumRuleItem)
Checks, if assignment of paragraph style to list level of outline style has to be deleted...
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
Handle the background jobs of a Writer document.
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
const WhichRangesContainer & GetRanges() const
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(160)
Dialog to specify the properties of date form field.
virtual SvxBrushItem * Clone(SfxItemPool *pPool=nullptr) const override
bool HasWriterListeners() const
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(156)
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void StartListeningToSameModifyAs(const SwClient &)
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
bool Put_BC(const SfxPoolItem &rAttr, SwAttrSet *pOld, SwAttrSet *pNew)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
constexpr TypedWhichId< SwFrameFormat > RES_FRMFMT(155)
void Intersect(const SfxItemSet &rSet)
SwAttrPool * GetPool() const
void ClientNotifyAttrChg(SwModify &rModify, const SwAttrSet &aSet, SwAttrSet &aOld, SwAttrSet &aNew)
void CopyToModify(sw::BroadcastingModify &rMod) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
T & StaticWhichCast(TypedWhichId< T > nId)
Document fields related interfaces.
constexpr TypedWhichId< SwGrfFormatColl > RES_GRFFMTCOLL(158)
void InvalidateInSwCache(const sal_uInt16)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(163)
Provides access to settings of a document.
void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem &rBrush, SfxItemSet &rToSet)
constexpr TypedWhichId< SwTextFormatColl > RES_TXTFMTCOLL(157)
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const
int Intersect_BC(const SfxItemSet &rSet, SwAttrSet *pOld, SwAttrSet *pNew)
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
void SetParent(const SfxItemSet *pNew)
bool IsModifyLocked() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
void Differentiate(const SfxItemSet &rSet)
bool SetModifyAtAttr(const sw::BroadcastingModify *pModify)
special treatment for some attributes
::sw::DocumentSettingManager & GetDocumentSettingManager()
const SwModify * GetRegisteredIn() const
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
constexpr TypedWhichId< SwStringMsgPoolItem > RES_NAME_CHANGED(187)
Provides access to the layout of a document.
void CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet &rSet)
#define SAL_WARN(area, stream)
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Give access to the data-provider for chart.
sal_uInt16 ClearItem_BC(sal_uInt16 nWhich, SwAttrSet *pOld, SwAttrSet *pNew)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_OBJECTDYING(RES_MSG_BEGIN)
IDocumentTimerAccess const & getIDocumentTimerAccess() const