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 )
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( std::move(pNewListIdItem) );
410 if ( pNewListIdItem !=
nullptr )
413 aTmpSet.
Put( std::move(pNewListIdItem) );
429 std::vector<sal_uInt16> toClear;
435 toClear.emplace_back(nWhich);
438 if (!toClear.empty())
444#if OSL_DEBUG_LEVEL > 0
446 OSL_FAIL(
"neither Format nor ContentNode - no Attributes copied");
453 for(
const auto& rPair : pRange)
455 if( rPair.first <=
nId &&
nId <= rPair.second )
const OUString & GetValue() const
static rtl::Reference< SfxItemPool > CreatePool()
virtual SwList * getListByName(const OUString &rListId) const =0
virtual SwList * createList(const OUString &rListId, const OUString &rDefaultListStyleName)=0
const WhichRangesContainer & GetFrozenIdRanges() const
SfxItemPool * GetSecondaryPool() const
void SetSecondaryPool(SfxItemPool *pPool)
const WhichRangesContainer & GetRanges() const
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
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)
virtual ~SwAttrPool() override
virtual void Changed(const SfxPoolItem &rOld, const SfxPoolItem &rNew) override
Notification callback.
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const override
const SwDoc * GetDoc() const
SwAttrPool * GetPool() const
SwAttrSet(SwAttrPool &, sal_uInt16 nWhich1, sal_uInt16 nWhich2)
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)
void PutChgd(const SfxPoolItem &rI)
bool SetModifyAtAttr(const sw::BroadcastingModify *pModify)
special treatment for some attributes
int Intersect_BC(const SfxItemSet &rSet, SwAttrSet *pOld, SwAttrSet *pNew)
bool HasSwAttrSet() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
virtual bool SetAttr(const SfxPoolItem &)
made virtual
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId,...
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
SwNumRule * FindNumRulePtr(const OUString &rName) const
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
SwCharFormat * CopyCharFormat(const SwCharFormat &)
copy the char format
const SwAttrPool & GetAttrPool() const
IDocumentListsAccess const & getIDocumentListsAccess() const
sal_uInt16 MakeNumRule(const OUString &rName, const SwNumRule *pCpy=nullptr, bool bBroadcast=false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode=SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
const sw::BroadcastingModify * GetDefinedIn() const
Query / set where attribute is anchored.
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
SwPageDesc * GetPageDesc()
const ::std::optional< sal_uInt16 > & GetNumOffset() const
void ChgDefinedIn(const sw::BroadcastingModify *pNew)
const OUString & GetDefaultListStyleName() const
const OUString & GetDefaultListId() const
void SetInvalidRule(bool bFlag)
const OUString & GetName() const
constexpr TypedWhichId< SfxStringItem > RES_PARATR_LIST_ID(RES_PARATR_LIST_BEGIN)
constexpr sal_uInt16 POOLATTR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(157)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(110)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
SdrMetricItem makeSdrShadowXDistItem(tools::Long nDist)
SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist)
bool IsInRange(const WhichRangesContainer &pRange, const sal_uInt16 nId)
check if ID is in range of attribute set IDs