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