27 #include <editeng/editeng.hxx>
38 #include <osl/diagnose.h>
74 pSdrPool->SetSecondaryPool(pEEgPool.get());
82 pSdrPool->FreezeIdRanges();
96 :
SfxItemSet( rPool, nWh1, nWh2 ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
102 , m_pOldSet( nullptr ), m_pNewSet( nullptr )
107 :
SfxItemSet( rSet ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
113 if ( pToPool && pToPool !=
GetPool() )
116 std::unique_ptr<SfxItemSet> pTmpSet;
129 if ( SfxItemState::SET ==
GetItemState( nWhich,
false, &pItem ) )
130 pTmpSet->Put( *pItem );
138 return std::unique_ptr<SfxItemSet>(
177 OSL_ENSURE( nWhich1 <= nWhich2,
"no valid range" );
181 for( ; nWhich1 <= nWhich2; ++nWhich1 )
194 return pNew ? pNew->
Count() : ( pOld ? pOld->
Count() : 0 );
231 SwCharFormat* pCharFormat = pFormatDrop->GetCharFormat();
235 pFormatDrop->SetCharFormat(pCharFormat);
237 pFormatDrop->ChgDefinedIn(pDropDefiner);
242 if( pBoxFormula && pBoxFormula->
GetDefinedIn() != pModify )
257 if( pCNd || pFormat )
262 std::unique_ptr<SfxStringItem> pNewListIdItem;
269 if( pSrcDoc != pDstDoc &&
272 const OUString& rNm = pNumRuleItem->
GetValue();
286 if ( pSrcDoc != pDstDoc &&
290 const OUString& sListId = pStrItem->
GetValue();
291 if ( !sListId.isEmpty() &&
296 const OUString& sDefaultListStyleName =
301 if ( !pDstDocNumRule )
323 if ( pNewListIdItem ==
nullptr &&
332 std::optional< SfxItemSet > tmpSet;
334 if( pSrcDoc != pDstDoc && (pPageDescItem =
GetItemIfSet(
340 tmpSet.emplace(*
this);
350 tmpSet->Put( aDesc );
359 tmpSet.emplace( *
this );
366 if (pSrcDoc != pDstDoc &&
371 std::shared_ptr<SfxItemSet>
const pNewSet(
372 rAutoStyle.SfxItemSet::Clone(
true, &pDstDoc->
GetAttrPool()));
386 tmpSet.emplace(*
this);
396 if ( pNewListIdItem !=
nullptr )
398 tmpSet->Put( *pNewListIdItem );
410 if ( pNewListIdItem !=
nullptr )
413 aTmpSet.
Put( *pNewListIdItem );
427 #if OSL_DEBUG_LEVEL > 0
429 OSL_FAIL(
"neither Format nor ContentNode - no Attributes copied");
436 for(
const auto& rPair : pRange)
438 if( rPair.first <= nId && nId <= rPair.second )
const sw::BroadcastingModify * GetDefinedIn() const
Query / set where attribute is anchored.
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
const ::std::optional< sal_uInt16 > & GetNumOffset() const
SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
bool IsInRange(const WhichRangesContainer &pRange, const sal_uInt16 nId)
check if ID is in range of attribute set IDs
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
virtual void Changed(const SfxPoolItem &rOld, const SfxPoolItem &rNew) override
Notification callback.
SwPageDesc * GetPageDesc()
virtual SwList * createList(const OUString &rListId, const OUString &rDefaultListStyleName)=0
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
const OUString & GetDefaultListId() const
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
const WhichRangesContainer & GetRanges() const
const OUString & GetName() const
static rtl::Reference< SfxItemPool > CreatePool()
void PutChgd(const SfxPoolItem &rI)
bool Put_BC(const SfxPoolItem &rAttr, SwAttrSet *pOld, SwAttrSet *pNew)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr sal_uInt16 POOLATTR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
void Intersect(const SfxItemSet &rSet)
SwAttrPool * GetPool() const
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const override
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
void CopyToModify(sw::BroadcastingModify &rMod) const
SwNumRule * FindNumRulePtr(const OUString &rName) const
virtual SwList * getListByName(const OUString &rListId) const =0
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void ChgDefinedIn(const sw::BroadcastingModify *pNew)
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
const OUString & GetValue() const
const WhichRangesContainer & GetFrozenIdRanges() const
int Intersect_BC(const SfxItemSet &rSet, SwAttrSet *pOld, SwAttrSet *pNew)
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END)
SfxItemPool * GetSecondaryPool() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId, -HlpId can be prevented.
void SetInvalidRule(bool bFlag)
virtual bool SetAttr(const SfxPoolItem &)
made virtual
virtual ~SwAttrPool() override
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
SdrMetricItem makeSdrShadowXDistItem(tools::Long nDist)
SwCharFormat * CopyCharFormat(const SwCharFormat &)
copy the char format
bool SetModifyAtAttr(const sw::BroadcastingModify *pModify)
special treatment for some attributes
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(151)
const SwDoc * GetDoc() const
sal_uInt16 MakeNumRule(const OUString &rName, const SwNumRule *pCpy=nullptr, bool bBroadcast=false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode=SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
SwAttrSet(SwAttrPool &, sal_uInt16 nWhich1, sal_uInt16 nWhich2)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
const OUString & GetDefaultListStyleName() const
bool empty() const noexcept
IDocumentListsAccess const & getIDocumentListsAccess() const
sal_uInt16 ClearItem_BC(sal_uInt16 nWhich, SwAttrSet *pOld, SwAttrSet *pNew)
constexpr TypedWhichId< SfxStringItem > RES_PARATR_LIST_ID(RES_PARATR_LIST_BEGIN)
void SetSecondaryPool(SfxItemPool *pPool)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
const SwAttrPool & GetAttrPool() const