LibreOffice Module sw (master)  1
swatrset.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <memory>
21 
22 #include <cellatr.hxx>
23 #include <charfmt.hxx>
24 #include <fchrfmt.hxx>
25 #include <doc.hxx>
26 #include <IDocumentListsAccess.hxx>
27 #include <editeng/editeng.hxx>
28 #include <fmtanchr.hxx>
29 #include <fmtpdsc.hxx>
30 #include <fmtautofmt.hxx>
31 #include <hintids.hxx>
32 #include <list.hxx>
33 #include <node.hxx>
34 #include <numrule.hxx>
35 #include <pagedesc.hxx>
36 #include <paratr.hxx>
37 #include <o3tl/unit_conversion.hxx>
38 #include <osl/diagnose.h>
39 #include <svl/whiter.hxx>
40 
41 #include <svx/svdpool.hxx>
42 #include <svx/sxenditm.hxx>
43 #include <svx/sdsxyitm.hxx>
44 
46  : SfxItemPool( "SWG",
48  aSlotTab, &aAttrTab ),
49  m_pDoc( pD )
50 {
51  // create secondary pools immediately
53 }
54 
56 {
57  // cleanup secondary pools first
59 }
60 
62 {
63  const SfxItemPool* pCheckAlreadySet = GetSecondaryPool();
64 
65  if(pCheckAlreadySet)
66  {
67  OSL_ENSURE(false, "SwAttrPool already has a secondary pool (!)");
68  return;
69  }
70 
71  // create SfxItemPool and EditEngine pool and add these in a chain. These
72  // belong us and will be removed/destroyed in removeAndDeleteSecondaryPools() used from
73  // the destructor
74  SfxItemPool *pSdrPool = new SdrItemPool(this);
75 
76  // #75371# change DefaultItems for the SdrEdgeObj distance items
77  // to TWIPS.
78  constexpr tools::Long nDefEdgeDist
80 
81  pSdrPool->SetPoolDefaultItem(SdrEdgeNode1HorzDistItem(nDefEdgeDist));
82  pSdrPool->SetPoolDefaultItem(SdrEdgeNode1VertDistItem(nDefEdgeDist));
83  pSdrPool->SetPoolDefaultItem(SdrEdgeNode2HorzDistItem(nDefEdgeDist));
84  pSdrPool->SetPoolDefaultItem(SdrEdgeNode2VertDistItem(nDefEdgeDist));
85 
86  // #i33700# // Set shadow distance defaults as PoolDefaultItems
87  constexpr tools::Long nDefShadowDist
89  pSdrPool->SetPoolDefaultItem(makeSdrShadowXDistItem(nDefShadowDist));
90  pSdrPool->SetPoolDefaultItem(makeSdrShadowYDistItem(nDefShadowDist));
91 
92  SfxItemPool *pEEgPool = EditEngine::CreatePool();
93 
94  pSdrPool->SetSecondaryPool(pEEgPool);
95 
96  if(!GetFrozenIdRanges())
97  {
99  }
100  else
101  {
102  pSdrPool->FreezeIdRanges();
103  }
104 }
105 
107 {
108  SfxItemPool *pSdrPool = GetSecondaryPool();
109 
110  if(!pSdrPool)
111  {
112  OSL_ENSURE(false, "SwAttrPool has no secondary pool, it's missing (!)");
113  return;
114  }
115 
116  SfxItemPool *pEEgPool = pSdrPool->GetSecondaryPool();
117 
118  if(!pEEgPool)
119  {
120  OSL_ENSURE(false, "i don't accept additional pools");
121  return;
122  }
123 
124  // first delete the items, then break the linking
125  pSdrPool->Delete();
126 
127  SetSecondaryPool(nullptr);
128  pSdrPool->SetSecondaryPool(nullptr);
129 
130  // final cleanup of secondary pool(s)
131  SfxItemPool::Free(pSdrPool);
132  SfxItemPool::Free(pEEgPool);
133 }
134 
135 SwAttrSet::SwAttrSet( SwAttrPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2 )
136  : SfxItemSet( rPool, {{nWh1, nWh2}} ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
137 {
138 }
139 
140 SwAttrSet::SwAttrSet( SwAttrPool& rPool, const sal_uInt16* nWhichPairTable )
141  : SfxItemSet( rPool, nWhichPairTable ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
142 {
143 }
144 
146  : SfxItemSet( rSet ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
147 {
148 }
149 
150 std::unique_ptr<SfxItemSet> SwAttrSet::Clone( bool bItems, SfxItemPool *pToPool ) const
151 {
152  if ( pToPool && pToPool != GetPool() )
153  {
154  SwAttrPool* pAttrPool = dynamic_cast< SwAttrPool* >(pToPool);
155  std::unique_ptr<SfxItemSet> pTmpSet;
156  if ( !pAttrPool )
157  pTmpSet = SfxItemSet::Clone( bItems, pToPool );
158  else
159  {
160  pTmpSet.reset(new SwAttrSet( *pAttrPool, GetRanges() ));
161  if ( bItems )
162  {
163  SfxWhichIter aIter(*pTmpSet);
164  sal_uInt16 nWhich = aIter.FirstWhich();
165  while ( nWhich )
166  {
167  const SfxPoolItem* pItem;
168  if ( SfxItemState::SET == GetItemState( nWhich, false, &pItem ) )
169  pTmpSet->Put( *pItem );
170  nWhich = aIter.NextWhich();
171  }
172  }
173  }
174  return pTmpSet;
175  }
176  else
177  return std::unique_ptr<SfxItemSet>(
178  bItems
179  ? new SwAttrSet( *this )
180  : new SwAttrSet( *GetPool(), GetRanges() ));
181 }
182 
183 bool SwAttrSet::Put_BC( const SfxPoolItem& rAttr,
184  SwAttrSet* pOld, SwAttrSet* pNew )
185 {
186  m_pNewSet = pNew;
187  m_pOldSet = pOld;
188  bool bRet = nullptr != SfxItemSet::Put( rAttr );
189  m_pOldSet = m_pNewSet = nullptr;
190  return bRet;
191 }
192 
193 bool SwAttrSet::Put_BC( const SfxItemSet& rSet,
194  SwAttrSet* pOld, SwAttrSet* pNew )
195 {
196  m_pNewSet = pNew;
197  m_pOldSet = pOld;
198  bool bRet = SfxItemSet::Put( rSet );
199  m_pOldSet = m_pNewSet = nullptr;
200  return bRet;
201 }
202 
203 sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich,
204  SwAttrSet* pOld, SwAttrSet* pNew )
205 {
206  m_pNewSet = pNew;
207  m_pOldSet = pOld;
208  sal_uInt16 nRet = SfxItemSet::ClearItem( nWhich );
209  m_pOldSet = m_pNewSet = nullptr;
210  return nRet;
211 }
212 
213 sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
214  SwAttrSet* pOld, SwAttrSet* pNew )
215 {
216  OSL_ENSURE( nWhich1 <= nWhich2, "no valid range" );
217  m_pNewSet = pNew;
218  m_pOldSet = pOld;
219  sal_uInt16 nRet = 0;
220  for( ; nWhich1 <= nWhich2; ++nWhich1 )
221  nRet = nRet + SfxItemSet::ClearItem( nWhich1 );
222  m_pOldSet = m_pNewSet = nullptr;
223  return nRet;
224 }
225 
227  SwAttrSet* pOld, SwAttrSet* pNew )
228 {
229  m_pNewSet = pNew;
230  m_pOldSet = pOld;
231  SfxItemSet::Intersect( rSet );
232  m_pOldSet = m_pNewSet = nullptr;
233  return pNew ? pNew->Count() : ( pOld ? pOld->Count() : 0 );
234 }
235 
237 void SwAttrSet::Changed( const SfxPoolItem& rOld, const SfxPoolItem& rNew )
238 {
239  if( m_pOldSet )
240  m_pOldSet->PutChgd( rOld );
241  if( m_pNewSet )
242  m_pNewSet->PutChgd( rNew );
243 }
244 
254 {
255  bool bSet = false;
256 
257  const SfxPoolItem* pItem;
258  if( SfxItemState::SET == GetItemState( RES_PAGEDESC, false, &pItem ) &&
259  pItem->StaticWhichCast(RES_PAGEDESC).GetDefinedIn() != pModify )
260  {
261  const_cast<SwFormatPageDesc&>(pItem->StaticWhichCast(RES_PAGEDESC)).ChgDefinedIn( pModify );
262  bSet = true;
263  }
264 
265  if(SfxItemState::SET == GetItemState( RES_PARATR_DROP, false, &pItem ))
266  {
267  auto pDropDefiner = dynamic_cast<const sw::FormatDropDefiner*>(pModify);
268  SwFormatDrop& rFormatDrop = const_cast<SwFormatDrop&>(pItem->StaticWhichCast(RES_PARATR_DROP));
269  // If CharFormat is set and it is set in different attribute pools then
270  // the CharFormat has to be copied.
271  SwCharFormat* pCharFormat = rFormatDrop.GetCharFormat();
272  if(pCharFormat && GetPool() != pCharFormat->GetAttrSet().GetPool())
273  {
274  pCharFormat = GetDoc()->CopyCharFormat(*pCharFormat);
275  rFormatDrop.SetCharFormat(pCharFormat);
276  }
277  rFormatDrop.ChgDefinedIn(pDropDefiner);
278  bSet = true;
279  }
280 
281  if( SfxItemState::SET == GetItemState( RES_BOXATR_FORMULA, false, &pItem ) &&
282  pItem->StaticWhichCast(RES_BOXATR_FORMULA).GetDefinedIn() != pModify )
283  {
284  const_cast<SwTableBoxFormula&>(pItem->StaticWhichCast(RES_BOXATR_FORMULA)).ChgDefinedIn( pModify );
285  bSet = true;
286  }
287 
288  return bSet;
289 }
290 
292 {
293  // copy attributes across multiple documents if needed
294  SwContentNode* pCNd = dynamic_cast<SwContentNode*>( &rMod );
295  SwFormat* pFormat = dynamic_cast<SwFormat*>( &rMod );
296 
297  if( pCNd || pFormat )
298  {
299  if( Count() )
300  {
301  // #i92811#
302  std::unique_ptr<SfxStringItem> pNewListIdItem;
303 
304  const SfxPoolItem* pItem;
305  const SwDoc *pSrcDoc = GetDoc();
306  SwDoc *pDstDoc = pCNd ? &pCNd->GetDoc() : pFormat->GetDoc();
307 
308  // Does the NumRule has to be copied?
309  if( pSrcDoc != pDstDoc &&
310  SfxItemState::SET == GetItemState( RES_PARATR_NUMRULE, false, &pItem ) )
311  {
312  const OUString& rNm = pItem->StaticWhichCast(RES_PARATR_NUMRULE).GetValue();
313  if( !rNm.isEmpty() )
314  {
315  SwNumRule* pDestRule = pDstDoc->FindNumRulePtr( rNm );
316  if( pDestRule )
317  pDestRule->SetInvalidRule( true );
318  else
319  pDstDoc->MakeNumRule( rNm, pSrcDoc->FindNumRulePtr( rNm ) );
320  }
321  }
322 
323  // copy list and if needed also the corresponding list style
324  // for text nodes
325  if ( pSrcDoc != pDstDoc &&
326  pCNd && pCNd->IsTextNode() &&
327  GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SfxItemState::SET )
328  {
329  auto pStrItem = dynamic_cast<const SfxStringItem*>(pItem);
330  assert(pStrItem);
331  const OUString& sListId = pStrItem->GetValue();
332  if ( !sListId.isEmpty() &&
333  !pDstDoc->getIDocumentListsAccess().getListByName( sListId ) )
334  {
335  const SwList* pList = pSrcDoc->getIDocumentListsAccess().getListByName( sListId );
336  // copy list style, if needed
337  const OUString& sDefaultListStyleName =
338  pList->GetDefaultListStyleName();
339  // #i92811#
340  const SwNumRule* pDstDocNumRule =
341  pDstDoc->FindNumRulePtr( sDefaultListStyleName );
342  if ( !pDstDocNumRule )
343  {
344  pDstDoc->MakeNumRule( sDefaultListStyleName,
345  pSrcDoc->FindNumRulePtr( sDefaultListStyleName ) );
346  }
347  else
348  {
349  const SwNumRule* pSrcDocNumRule =
350  pSrcDoc->FindNumRulePtr( sDefaultListStyleName );
351  // If list id of text node equals the list style's
352  // default list id in the source document, the same
353  // should be hold in the destination document.
354  // Thus, create new list id item.
355  if (pSrcDocNumRule && sListId == pSrcDocNumRule->GetDefaultListId())
356  {
357  pNewListIdItem.reset(new SfxStringItem (
359  pDstDocNumRule->GetDefaultListId() ));
360  }
361  }
362  // check again, if list exist, because <SwDoc::MakeNumRule(..)>
363  // could have also created it.
364  if ( pNewListIdItem == nullptr &&
365  !pDstDoc->getIDocumentListsAccess().getListByName( sListId ) )
366  {
367  // copy list
368  pDstDoc->getIDocumentListsAccess().createList( sListId, sDefaultListStyleName );
369  }
370  }
371  }
372 
373  std::unique_ptr< SfxItemSet > tmpSet;
374 
375  if( pSrcDoc != pDstDoc && SfxItemState::SET == GetItemState(
376  RES_PAGEDESC, false, &pItem ))
377  {
378  const SwPageDesc* pPgDesc = pItem->StaticWhichCast(RES_PAGEDESC).GetPageDesc();
379  if( pPgDesc )
380  {
381  tmpSet.reset(new SfxItemSet(*this));
382 
383  SwPageDesc* pDstPgDesc = pDstDoc->FindPageDesc(pPgDesc->GetName());
384  if( !pDstPgDesc )
385  {
386  pDstPgDesc = pDstDoc->MakePageDesc(pPgDesc->GetName());
387  pDstDoc->CopyPageDesc( *pPgDesc, *pDstPgDesc );
388  }
389  SwFormatPageDesc aDesc( pDstPgDesc );
390  aDesc.SetNumOffset( pItem->StaticWhichCast(RES_PAGEDESC).GetNumOffset() );
391  tmpSet->Put( aDesc );
392  }
393  }
394 
395  if( pSrcDoc != pDstDoc && SfxItemState::SET == GetItemState( RES_ANCHOR, false, &pItem )
396  && pItem->StaticWhichCast(RES_ANCHOR).GetContentAnchor() != nullptr )
397  {
398  if( !tmpSet )
399  tmpSet.reset( new SfxItemSet( *this ));
400  // Anchors at any node position cannot be copied to another document, because the SwPosition
401  // would still point to the old document. It needs to be fixed up explicitly.
402  tmpSet->ClearItem( RES_ANCHOR );
403  }
404 
405  if (pSrcDoc != pDstDoc &&
406  SfxItemState::SET == GetItemState(RES_PARATR_LIST_AUTOFMT, false, &pItem))
407  {
408  SfxItemSet const& rAutoStyle(*pItem->StaticWhichCast(RES_PARATR_LIST_AUTOFMT).GetStyleHandle());
409  std::shared_ptr<SfxItemSet> const pNewSet(
410  rAutoStyle.SfxItemSet::Clone(true, &pDstDoc->GetAttrPool()));
411 
412  // fix up character style, it contains pointers to pSrcDoc
413  if (SfxItemState::SET == pNewSet->GetItemState(RES_TXTATR_CHARFMT, false, &pItem))
414  {
415  const auto& rChar(pItem->StaticWhichCast(RES_TXTATR_CHARFMT));
416  SwCharFormat *const pCopy(pDstDoc->CopyCharFormat(*rChar.GetCharFormat()));
417  const_cast<SwFormatCharFormat&>(rChar).SetCharFormat(pCopy);
418  }
419 
421  // TODO: for ODF export we'd need to add it to the autostyle pool
422  item.SetStyleHandle(pNewSet);
423  if (!tmpSet)
424  {
425  tmpSet.reset(new SfxItemSet(*this));
426  }
427  tmpSet->Put(item);
428  }
429 
430  if( tmpSet )
431  {
432  if( pCNd )
433  {
434  // #i92811#
435  if ( pNewListIdItem != nullptr )
436  {
437  tmpSet->Put( *pNewListIdItem );
438  }
439  pCNd->SetAttr( *tmpSet );
440  }
441  else
442  {
443  pFormat->SetFormatAttr( *tmpSet );
444  }
445  }
446  else if( pCNd )
447  {
448  // #i92811#
449  if ( pNewListIdItem != nullptr )
450  {
451  SfxItemSet aTmpSet( *this );
452  aTmpSet.Put( *pNewListIdItem );
453  pCNd->SetAttr( aTmpSet );
454  }
455  else
456  {
457  pCNd->SetAttr( *this );
458  }
459  }
460  else
461  {
462  pFormat->SetFormatAttr( *this );
463  }
464  }
465  }
466 #if OSL_DEBUG_LEVEL > 0
467  else
468  OSL_FAIL("neither Format nor ContentNode - no Attributes copied");
469 #endif
470 }
471 
473 bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId )
474 {
475  while( *pRange )
476  {
477  if( *pRange <= nId && nId <= *(pRange+1) )
478  return true;
479  pRange += 2;
480  }
481  return false;
482 }
483 
484 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist)
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
SW_DLLPUBLIC const OUString & GetDefaultListStyleName() const
Definition: list.cxx:251
virtual void Changed(const SfxPoolItem &rOld, const SfxPoolItem &rNew) override
Notification callback.
Definition: swatrset.cxx:237
SfxItemSet(const SfxItemSet &)
SwAttrPool(SwDoc *pDoc)
Definition: swatrset.cxx:45
virtual SwList * createList(const OUString &rListId, const OUString &rDefaultListStyleName)=0
long Long
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
const OUString & GetDefaultListId() const
Definition: numrule.hxx:195
Definition: list.hxx:35
void SetStyleHandle(const std::shared_ptr< SfxItemSet > &pHandle)
Definition: fmtautofmt.hxx:48
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
Definition: doc.hxx:187
sal_uInt16 FirstWhich()
void Delete()
void FreezeIdRanges()
sal_uInt16 NextWhich()
const OUString & GetName() const
Definition: pagedesc.hxx:197
void PutChgd(const SfxPoolItem &rI)
Definition: swatrset.hxx:169
bool Put_BC(const SfxPoolItem &rAttr, SwAttrSet *pOld, SwAttrSet *pNew)
Definition: swatrset.cxx:183
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
const sal_uInt16 * GetFrozenIdRanges() const
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr sal_uInt16 POOLATTR_BEGIN(HINT_BEGIN)
void removeAndDeleteSecondaryPools()
Definition: swatrset.cxx:106
bool IsInRange(const sal_uInt16 *pRange, const sal_uInt16 nId)
check if ID is in range of attribute set IDs
Definition: swatrset.cxx:473
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
void Intersect(const SfxItemSet &rSet)
SwAttrPool * GetPool() const
Definition: swatrset.hxx:190
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const override
Definition: swatrset.cxx:150
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
Definition: docdesc.cxx:860
Base class for various Writer styles.
Definition: format.hxx:46
SwAttrSet * m_pNewSet
Definition: swatrset.hxx:164
void CopyToModify(sw::BroadcastingModify &rMod) const
Definition: swatrset.cxx:291
SwNumRule * FindNumRulePtr(const OUString &rName) const
Definition: docnum.cxx:2415
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
T & StaticWhichCast(TypedWhichId< T > nId)
SwDoc & GetDoc()
Definition: node.hxx:212
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
Definition: docdesc.cxx:678
sal_uInt16 Count() const
void createAndAddSecondaryPools()
Definition: swatrset.cxx:61
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:123
int Intersect_BC(const SfxItemSet &rSet, SwAttrSet *pOld, SwAttrSet *pNew)
Definition: swatrset.cxx:226
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END)
static SfxItemPool * CreatePool()
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:450
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.
Definition: docfmt.cxx:1416
static void Free(SfxItemPool *pPool)
void SetInvalidRule(bool bFlag)
Definition: number.cxx:927
virtual bool SetAttr(const SfxPoolItem &)
made virtual
Definition: node.cxx:1558
SfxItemInfo aSlotTab[]
Definition: init.cxx:268
virtual ~SwAttrPool() override
Definition: swatrset.cxx:55
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
Definition: docfmt.cxx:1156
SwDfltAttrTab aAttrTab
bool SetModifyAtAttr(const sw::BroadcastingModify *pModify)
special treatment for some attributes
Definition: swatrset.cxx:253
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(151)
const SwDoc * GetDoc() const
Definition: swatrset.hxx:204
void ChgDefinedIn(const sw::FormatDropDefiner *pDefiner)
Get and set Modify pointer.
Definition: paratr.hxx:121
sal_uInt16 MakeNumRule(const OUString &rName, const SwNumRule *pCpy=nullptr, bool bBroadcast=false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode=SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
Definition: docnum.cxx:2449
SwAttrSet * m_pOldSet
Definition: swatrset.hxx:164
SwAttrSet(SwAttrPool &, sal_uInt16 nWhich1, sal_uInt16 nWhich2)
Definition: swatrset.cxx:135
const sal_uInt16 * GetRanges() const
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
const SwCharFormat * GetCharFormat() const
Definition: paratr.hxx:114
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
Definition: fmtpdsc.hxx:65
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:120
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps...
Definition: paratr.hxx:62
IDocumentListsAccess const & getIDocumentListsAccess() const
Definition: doc.cxx:293
bool IsTextNode() const
Definition: node.hxx:640
sal_uInt16 ClearItem_BC(sal_uInt16 nWhich, SwAttrSet *pOld, SwAttrSet *pNew)
Definition: swatrset.cxx:203
constexpr TypedWhichId< SfxStringItem > RES_PARATR_LIST_ID(RES_PARATR_LIST_BEGIN)
void SetSecondaryPool(SfxItemPool *pPool)
void SetCharFormat(SwCharFormat *pNew)
Definition: paratr.cxx:64
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1320
void SetPoolDefaultItem(const SfxPoolItem &)