LibreOffice Module sw (master)  1
pagedesc.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 <editeng/pbinitem.hxx>
21 #include <editeng/ulspitem.hxx>
22 #include <editeng/boxitem.hxx>
23 #include <editeng/brushitem.hxx>
24 #include <editeng/shaditem.hxx>
25 #include <editeng/frmdiritem.hxx>
26 #include <sal/log.hxx>
27 #include <fmtclds.hxx>
28 #include <fmtfsize.hxx>
29 #include <pagefrm.hxx>
30 #include <pagedesc.hxx>
31 #include <swtable.hxx>
32 #include <frmatr.hxx>
33 #include <frmtool.hxx>
34 #include <doc.hxx>
35 #include <node.hxx>
36 #include <strings.hrc>
39 #include <poolfmt.hxx>
40 #include <calbck.hxx>
41 #include <hints.hxx>
42 
43 SwPageDesc::SwPageDesc(const OUString& rName, SwFrameFormat *pFormat, SwDoc *const pDoc)
44  : SwModify(nullptr)
45  , m_StyleName( rName )
46  , m_Master( pDoc->GetAttrPool(), rName, pFormat )
47  , m_Left( pDoc->GetAttrPool(), rName, pFormat )
48  , m_FirstMaster( pDoc->GetAttrPool(), rName, pFormat )
49  , m_FirstLeft( pDoc->GetAttrPool(), rName, pFormat )
50  , m_aDepends(*this)
51  , m_pTextFormatColl(nullptr)
52  , m_pFollow( this )
53  , m_nRegHeight( 0 )
54  , m_nRegAscent( 0 )
55  , m_nVerticalAdjustment( drawing::TextVerticalAdjust_TOP )
57  , m_IsLandscape( false )
58  , m_IsHidden( false )
59  , m_pdList( nullptr )
60 {
61 }
62 
64  : SwModify(nullptr)
65  , BroadcasterMixin()
66  , m_StyleName( rCpy.GetName() )
67  , m_NumType( rCpy.GetNumType() )
68  , m_Master( rCpy.GetMaster() )
69  , m_Left( rCpy.GetLeft() )
70  , m_FirstMaster( rCpy.GetFirstMaster() )
71  , m_FirstLeft( rCpy.GetFirstLeft() )
72  , m_aDepends(*this)
73  , m_pTextFormatColl(nullptr)
74  , m_pFollow( rCpy.m_pFollow )
75  , m_nRegHeight( rCpy.GetRegHeight() )
76  , m_nRegAscent( rCpy.GetRegAscent() )
77  , m_nVerticalAdjustment( rCpy.GetVerticalAdjustment() )
78  , m_eUse( rCpy.ReadUseOn() )
79  , m_IsLandscape( rCpy.GetLandscape() )
80  , m_IsHidden( rCpy.IsHidden() )
81  , m_IsFootnoteInfo( rCpy.GetFootnoteInfo() )
82  , m_pdList( nullptr )
83 {
85  {
87  m_aDepends.StartListening(const_cast<SwTextFormatColl*>(m_pTextFormatColl));
88  }
89 }
90 
92 {
93  if(this == &rSrc)
94  return *this;
95 
96  m_StyleName = rSrc.m_StyleName;
97  m_NumType = rSrc.m_NumType;
98  m_Master = rSrc.m_Master;
99  m_Left = rSrc.m_Left;
101  m_FirstLeft = rSrc.m_FirstLeft;
104  {
106  m_aDepends.StartListening(const_cast<SwTextFormatColl*>(m_pTextFormatColl));
107  }
108  else
109  m_pTextFormatColl = nullptr;
110 
111  if (rSrc.m_pFollow == &rSrc)
112  m_pFollow = this;
113  else
114  m_pFollow = rSrc.m_pFollow;
115 
116  m_nRegHeight = rSrc.m_nRegHeight;
117  m_nRegAscent = rSrc.m_nRegAscent;
119  m_eUse = rSrc.m_eUse;
121  return *this;
122 }
123 
125 {
126 }
127 
128 bool SwPageDesc::SetName( const OUString& rNewName )
129 {
130  bool renamed = true;
131  if (m_pdList) {
133  if( m_pdList->end() == it ) {
134  SAL_WARN( "sw", "SwPageDesc not found in expected m_pdList" );
135  return false;
136  }
137  renamed = m_pdList->m_PosIndex.modify( it,
138  change_name( rNewName ), change_name( m_StyleName ) );
139  }
140  else
141  m_StyleName = rNewName;
142  return renamed;
143 }
144 
148 {
149  //Only the margins are mirrored, all other values are just copied.
151  const SvxLRSpaceItem &rLR = m_Master.GetLRSpace();
152  aLR.SetLeft( rLR.GetRight() );
153  aLR.SetRight( rLR.GetLeft() );
154 
157  aSet.Put( aLR );
158  aSet.Put( m_Master.GetFrameSize() );
159  aSet.Put( m_Master.GetPaperBin() );
160  aSet.Put( m_Master.GetULSpace() );
161  aSet.Put( m_Master.GetBox() );
162  aSet.Put( *m_Master.makeBackgroundBrushItem() );
163  aSet.Put( m_Master.GetShadow() );
164  aSet.Put( m_Master.GetCol() );
165  aSet.Put( m_Master.GetFrameDir() );
166  m_Left.SetFormatAttr( aSet );
167 }
168 
170 {
171  SwFrameFormat& rFormat = GetMaster();
172 
173  // #i73790# - method renamed
174  rFormat.ResetAllFormatAttr();
175  rFormat.SetFormatAttr( SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR) );
176 }
177 
178 // gets information from Modify
179 bool SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const
180 {
181  if (!m_Master.GetInfo(rInfo))
182  return false; // found
183  if (!m_Left.GetInfo(rInfo))
184  return false ;
185  if ( !m_FirstMaster.GetInfo( rInfo ) )
186  return false;
187  return m_FirstLeft.GetInfo( rInfo );
188 }
189 
192 {
193  if(pFormat != m_pTextFormatColl)
194  {
196  m_pTextFormatColl = pFormat;
197  m_aDepends.StartListening(const_cast<SwTextFormatColl*>(m_pTextFormatColl));
198  RegisterChange();
199  }
200 }
201 
204 {
206  m_pTextFormatColl = nullptr;
207  return m_pTextFormatColl;
208 }
209 
212 {
213  // #117072# - During destruction of the document <SwDoc>
214  // the page description is modified. Thus, do nothing, if the document
215  // is in destruction respectively if no viewshell exists.
216  SwDoc* pDoc = GetMaster().GetDoc();
217  if ( !pDoc || pDoc->IsInDtor() )
218  {
219  return;
220  }
222  if ( !pSh )
223  {
224  return;
225  }
226 
227  m_nRegHeight = 0;
228  {
230  for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
231  {
232  if( pLast->IsPageFrame() )
233  static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg();
234  }
235  }
236  {
238  for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
239  {
240  if( pLast->IsPageFrame() )
241  static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg();
242  }
243  }
244  {
246  for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
247  {
248  if( pLast->IsPageFrame() )
249  static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg();
250  }
251  }
252  {
254  for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
255  {
256  if( pLast->IsPageFrame() )
257  static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg();
258  }
259  }
260 }
261 
263 void SwPageDesc::SwClientNotify(const SwModify& rModify, const SfxHint& rHint)
264 {
265  if(auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint))
266  {
267  const sal_uInt16 nWhich = pLegacyHint->m_pOld
268  ? pLegacyHint->m_pOld->Which()
269  : pLegacyHint->m_pNew
270  ? pLegacyHint->m_pNew->Which()
271  : 0;
272  NotifyClients(pLegacyHint->m_pOld, pLegacyHint->m_pNew);
273  if((RES_ATTRSET_CHG == nWhich)
274  || (RES_FMT_CHG == nWhich)
275  || isCHRATR(nWhich)
276  || (RES_PARATR_LINESPACING == nWhich))
277  RegisterChange();
278  }
279  else if (auto pModifyChangedHint = dynamic_cast<const sw::ModifyChangedHint*>(&rHint))
280  {
281  if(m_pTextFormatColl == &rModify)
282  m_pTextFormatColl = static_cast<const SwTextFormatColl*>(pModifyChangedHint->m_pNew);
283  else
284  assert(false);
285  }
286 }
287 
288 static const SwFrame* lcl_GetFrameOfNode( const SwNode& rNd )
289 {
290  const SwModify* pMod;
291  SwFrameType nFrameType = FRM_CNTNT;
292 
293  if( rNd.IsContentNode() )
294  {
295  pMod = &static_cast<const SwContentNode&>(rNd);
296  }
297  else if( rNd.IsTableNode() )
298  {
299  pMod = static_cast<const SwTableNode&>(rNd).GetTable().GetFrameFormat();
300  nFrameType = SwFrameType::Tab;
301  }
302  else
303  pMod = nullptr;
304 
305  Point aNullPt;
306  std::pair<Point, bool> const tmp(aNullPt, false);
307  return pMod ? ::GetFrameOfModify(nullptr, *pMod, nFrameType, nullptr, &tmp)
308  : nullptr;
309 }
310 
312 {
313  const SwPageDesc* pRet = nullptr;
314  const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd );
315  if (pChkFrame && nullptr != (pChkFrame = pChkFrame->FindPageFrame()))
316  pRet = static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc();
317  return pRet;
318 }
319 
321  bool bCheckForThisPgDc ) const
322 {
323  // which PageDescFormat is valid for this node?
324  const SwFrameFormat* pRet;
325  const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd );
326 
327  if( pChkFrame && nullptr != ( pChkFrame = pChkFrame->FindPageFrame() ))
328  {
329  const SwPageDesc* pPd = bCheckForThisPgDc ? this :
330  static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc();
331  pRet = &pPd->GetMaster();
332  OSL_ENSURE( static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc() == pPd, "Wrong node for detection of page format!" );
333  // this page is assigned to which format?
334  if( !pChkFrame->KnowsFormat(*pRet) )
335  {
336  pRet = &pPd->GetLeft();
337  OSL_ENSURE( pChkFrame->KnowsFormat(*pRet), "Wrong node for detection of page format!" );
338  }
339  }
340  else
341  pRet = &GetMaster();
342  return pRet;
343 }
344 
346 {
347  bool bRet = false;
348  if( GetFollow() && this != GetFollow() )
349  {
350  const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd );
351  if( pChkFrame && nullptr != ( pChkFrame = pChkFrame->FindPageFrame() ) &&
352  pChkFrame->IsPageFrame() &&
353  ( !pChkFrame->GetNext() || GetFollow() ==
354  static_cast<const SwPageFrame*>(pChkFrame->GetNext())->GetPageDesc() ))
355  // the page on which the follow points was found
356  bRet = true;
357  }
358  return bRet;
359 }
360 
362 {
363  return (UseOnPage::Left & m_eUse)
364  ? (bFirst ? &m_FirstLeft : &m_Left)
365  : nullptr;
366 }
367 
369 {
370  return (UseOnPage::Right & m_eUse)
371  ? (bFirst ? &m_FirstMaster : &m_Master)
372  : nullptr;
373 }
374 
376 {
377  return bool(m_eUse & UseOnPage::FirstShare);
378 }
379 
380 void SwPageDesc::ChgFirstShare( bool bNew )
381 {
382  if ( bNew )
384  else
386 }
387 
388 // Page styles
389 static const char* STR_POOLPAGE[] =
390 {
391  STR_POOLPAGE_STANDARD,
392  STR_POOLPAGE_FIRST,
393  STR_POOLPAGE_LEFT,
394  STR_POOLPAGE_RIGHT,
395  STR_POOLPAGE_JAKET,
396  STR_POOLPAGE_REGISTER,
397  STR_POOLPAGE_HTML,
398  STR_POOLPAGE_FOOTNOTE,
399  STR_POOLPAGE_ENDNOTE,
400  STR_POOLPAGE_LANDSCAPE
401 };
402 
403 SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName)
404 {
405  const size_t nDCount = rDoc.GetPageDescCnt();
406 
407  for( size_t i = 0; i < nDCount; i++ )
408  {
409  SwPageDesc* pDsc = &rDoc.GetPageDesc( i );
410  if(pDsc->GetName() == rName)
411  {
412  return pDsc;
413  }
414  }
415 
416  for (size_t i = 0; i < SAL_N_ELEMENTS(STR_POOLPAGE); ++i)
417  {
418  if (rName == SwResId(STR_POOLPAGE[i]))
419  {
420  return rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( static_cast< sal_uInt16 >(
421  i + RES_POOLPAGE_BEGIN) );
422  }
423  }
424 
425  return nullptr;
426 }
427 
429  : m_nMaxHeight( 0 )
430  , m_nLineWidth(10)
431  , m_eLineStyle( SvxBorderLineStyle::SOLID )
432  , m_Width( 25, 100 )
433  , m_nTopDist( 57 ) //1mm
434  , m_nBottomDist( 57 )
435 {
436  m_eAdjust = SvxFrameDirection::Horizontal_RL_TB == GetDefaultFrameDirection(GetAppLanguage()) ?
437  css::text::HorizontalAdjust_RIGHT :
438  css::text::HorizontalAdjust_LEFT;
439 }
440 
442  : m_nMaxHeight(rCpy.GetHeight())
443  , m_nLineWidth(rCpy.m_nLineWidth)
444  , m_eLineStyle(rCpy.m_eLineStyle)
445  , m_LineColor(rCpy.m_LineColor)
446  , m_Width(rCpy.GetWidth())
447  , m_eAdjust(rCpy.GetAdj())
448  , m_nTopDist(rCpy.GetTopDist())
449  , m_nBottomDist(rCpy.GetBottomDist())
450 {
451 }
452 
454 {
455  m_nMaxHeight = rCpy.GetHeight();
456  m_nLineWidth = rCpy.m_nLineWidth;
457  m_eLineStyle = rCpy.m_eLineStyle;
458  m_LineColor = rCpy.m_LineColor;
459  m_Width = rCpy.GetWidth();
460  m_eAdjust = rCpy.GetAdj();
461  m_nTopDist = rCpy.GetTopDist();
462  m_nBottomDist = rCpy.GetBottomDist();
463  return *this;
464 }
465 
467 {
468  return m_nMaxHeight == rCmp.GetHeight()
469  && m_nLineWidth == rCmp.m_nLineWidth
470  && m_eLineStyle == rCmp.m_eLineStyle
471  && m_LineColor == rCmp.m_LineColor
472  && m_Width == rCmp.GetWidth()
473  && m_eAdjust == rCmp.GetAdj()
474  && m_nTopDist == rCmp.GetTopDist()
475  && m_nBottomDist== rCmp.GetBottomDist();
476 }
477 
478 SwPageDescExt::SwPageDescExt(const SwPageDesc & rPageDesc, SwDoc *const pDoc)
479  : m_PageDesc(rPageDesc)
480  , m_pDoc(pDoc)
481 {
482  SetPageDesc(rPageDesc);
483 }
484 
486  : m_PageDesc(rSrc.m_PageDesc)
487  , m_pDoc(rSrc.m_pDoc)
488 {
489  SetPageDesc(rSrc.m_PageDesc);
490 }
491 
493 {
494 }
495 
496 OUString const & SwPageDescExt::GetName() const
497 {
498  return m_PageDesc.GetName();
499 }
500 
501 void SwPageDescExt::SetPageDesc(const SwPageDesc & rPageDesc)
502 {
503  m_PageDesc = rPageDesc;
504 
505  if (m_PageDesc.GetFollow())
507 }
508 
510 {
511  SetPageDesc(rSrc);
512 
513  return *this;
514 }
515 
517 {
518  operator=(rSrc.m_PageDesc);
519  return *this;
520 }
521 
522 SwPageDescExt::operator SwPageDesc() const
523 {
524  SwPageDesc aResult(m_PageDesc);
525 
526  SwPageDesc * pPageDesc = m_pDoc->FindPageDesc(m_sFollow);
527 
528  if ( nullptr != pPageDesc )
529  aResult.SetFollow(pPageDesc);
530 
531  return aResult;
532 }
533 
535  : m_PosIndex( m_Array.get<0>() )
536  , m_NameIndex( m_Array.get<1>() )
537 {
538 }
539 
541 {
542  for(const_iterator it = begin(); it != end(); ++it)
543  delete *it;
544 }
545 
546 SwPageDescs::iterator SwPageDescs::find_(const OUString &name) const
547 {
548  ByName::iterator it = m_NameIndex.find( name );
549  return m_Array.iterator_to( *it );
550 }
551 
552 std::pair<SwPageDescs::const_iterator,bool> SwPageDescs::push_back( const value_type& x )
553 {
554  // SwPageDesc is not already in a SwPageDescs list!
555  assert( x->m_pdList == nullptr );
556 
557  std::pair<iterator,bool> res = m_PosIndex.push_back( x );
558  if( res.second )
559  x->m_pdList = this;
560  return res;
561 }
562 
564 {
565  // SwPageDesc is not in this SwPageDescs list!
566  assert( x->m_pdList == this );
567 
568  iterator const ret = find_( x->GetName() );
569  if (ret != end())
570  m_PosIndex.erase( ret );
571  else
572  SAL_WARN( "sw", "SwPageDesc is not in SwPageDescs m_pdList!" );
573  x->m_pdList = nullptr;
574 }
575 
576 void SwPageDescs::erase( const_iterator const& position )
577 {
578  // SwPageDesc is not in this SwPageDescs list!
579  assert( (*position)->m_pdList == this );
580 
581  (*position)->m_pdList = nullptr;
582  m_PosIndex.erase( position );
583 }
584 
586 {
587  erase( begin() + index_ );
588 }
589 
590 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long GetLeft() const
Base class of the Writer layout elements.
Definition: frame.hxx:295
static const char * STR_POOLPAGE[]
Definition: pagedesc.cxx:389
const SwFormatCol & GetCol(bool=true) const
Definition: fmtclds.hxx:168
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
const_iterator end() const
Definition: pagedesc.hxx:430
SwTwips m_nBottomDist
distance between separator and first footnote
Definition: pagedesc.hxx:57
static const SwPageDesc * GetPageDescOfNode(const SwNode &rNd)
Given a SwNode return the pagedesc in use at that location.
Definition: pagedesc.cxx:311
const_iterator begin() const
Definition: pagedesc.hxx:429
SwFrameFormat & GetLeft()
Definition: pagedesc.hxx:217
bool isCHRATR(const sal_uInt16 nWhich)
Definition: hintids.hxx:342
#define RES_ATTRSET_CHG
Definition: hintids.hxx:285
SwPageDescsBase::value_type value_type
Definition: pagedesc.hxx:407
iterator find_(const OUString &name) const
Definition: pagedesc.cxx:546
ByName & m_NameIndex
Definition: pagedesc.hxx:402
#define FRM_CNTNT
Definition: frame.hxx:101
#define RES_FRAMEDIR
Definition: hintids.hxx:225
SwTwips GetBottomDist() const
Definition: pagedesc.hxx:67
const SvxFrameDirectionItem & GetFrameDir(bool=true) const
Definition: frmatr.hxx:94
SwFrameFormat & GetFirstMaster()
Definition: pagedesc.hxx:218
Definition: doc.hxx:185
TElementType * Next()
Definition: calbck.hxx:376
bool KnowsFormat(const SwFormat &rFormat) const
Definition: wsfrm.cxx:330
SwPageDescExt(const SwPageDesc &rPageDesc, SwDoc *pDoc)
Definition: pagedesc.cxx:478
WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
Definition: ww8par2.cxx:874
sal_uInt16 m_nRegAscent
For grid alignment (Registerhaltigkeit).
Definition: pagedesc.hxx:155
SwPageDesc & operator=(const SwPageDesc &)
Definition: pagedesc.cxx:91
virtual bool GetInfo(SfxPoolItem &) const override
Definition: calbck.cxx:206
SwPageDescExt & operator=(const SwPageDescExt &rSrc)
Definition: pagedesc.cxx:516
void SetFollow(const SwPageDesc *pNew)
Definition: pagedesc.hxx:290
SwTwips GetTopDist() const
Definition: pagedesc.hxx:66
const OUString & GetName() const
Definition: pagedesc.hxx:186
const SvxBoxItem & GetBox(bool=true) const
Definition: frmatr.hxx:84
UseOnPage
Definition: pagedesc.hxx:119
SvxBorderLineStyle
ByPos::iterator iterator
Definition: pagedesc.hxx:396
SAL_DLLPRIVATE SwPageDesc(const OUString &, SwFrameFormat *, SwDoc *pDc)
Definition: pagedesc.cxx:43
void SetLeft(const long nL, const sal_uInt16 nProp=100)
bool IsFollowNextPageOfNode(const SwNode &rNd) const
Definition: pagedesc.cxx:345
std::pair< const_iterator, bool > push_back(const value_type &x)
Definition: pagedesc.cxx:552
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:458
ByPos::const_iterator const_iterator
Definition: pagedesc.hxx:405
sw::WriterMultiListener m_aDepends
Because of grid alignment (Registerhaltigkeit).
Definition: pagedesc.hxx:151
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
special handling if the style of the grid alignment changes
Definition: pagedesc.cxx:263
SwTwips GetHeight() const
Definition: pagedesc.hxx:60
drawing::TextVerticalAdjust m_nVerticalAdjustment
Definition: pagedesc.hxx:156
SwAttrPool * GetPool() const
Definition: swatrset.hxx:190
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
virtual ~SwPageDesc() override
Definition: pagedesc.cxx:124
virtual sal_uInt16 ResetAllFormatAttr()
Takes all hints from Delta-Array,.
Definition: format.cxx:683
#define SAL_N_ELEMENTS(arr)
SwFrameFormat m_FirstMaster
Definition: pagedesc.hxx:149
SwPageDesc m_PageDesc
Definition: pagedesc.hxx:355
bool IsContentNode() const
Definition: node.hxx:628
void SetPageDesc(const SwPageDesc &rPageDesc)
Definition: pagedesc.cxx:501
void SetRight(const long nR, const sal_uInt16 nProp=100)
Style of a layout element.
Definition: frmfmt.hxx:57
void erase(const value_type &x)
Definition: pagedesc.cxx:563
Color m_LineColor
color of the separator line
Definition: pagedesc.hxx:53
SwFrameType
Definition: frame.hxx:72
SvxNumberType m_NumType
Definition: pagedesc.hxx:145
sal_uInt16 m_nRegHeight
Sentence spacing and fontascent of style.
Definition: pagedesc.hxx:154
const SwPageDesc & GetPageDesc(const size_t i) const
Definition: doc.hxx:876
SAL_DLLPRIVATE void Mirror()
Called for mirroring of Chg (doc).
Definition: pagedesc.cxx:147
SwPageFrame * FindPageFrame()
Definition: frame.hxx:658
bool IsListeningTo(const SwModify *const pDepend) const
Definition: calbck.cxx:342
void ChgFirstShare(bool bNew)
Definition: pagedesc.cxx:380
SwFrameFormat * GetLeftFormat(bool const bFirst=false)
Definition: pagedesc.cxx:361
TElementType * First()
Definition: calbck.hxx:345
int i
size_t GetPageDescCnt() const
Definition: doc.hxx:875
std::shared_ptr< SvxBrushItem > makeBackgroundBrushItem(bool=true) const
Definition: format.cxx:782
const SwTextFormatColl * GetRegisterFormatColl() const
retrieve the style for the grid alignment
Definition: pagedesc.cxx:203
SwPageDescsBase m_Array
Definition: pagedesc.hxx:400
ByPos & m_PosIndex
Definition: pagedesc.hxx:401
UseOnPage m_eUse
Definition: pagedesc.hxx:157
SwPageDescsBase::size_type size_type
Definition: pagedesc.hxx:406
static SwPageDesc * GetByName(SwDoc &rDoc, const OUString &rName)
Definition: pagedesc.cxx:403
bool m_IsLandscape
Definition: pagedesc.hxx:158
OUString SwResId(const char *pId)
Definition: swmodule.cxx:191
SwPageFootnoteInfo & operator=(const SwPageFootnoteInfo &)
Definition: pagedesc.cxx:453
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:119
#define RES_FMT_CHG
Definition: hintids.hxx:284
A page of the document layout.
Definition: pagefrm.hxx:40
SwFrameFormat m_Left
Definition: pagedesc.hxx:147
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:437
#define RES_LR_SPACE
Definition: hintids.hxx:196
static const SwFrame * lcl_GetFrameOfNode(const SwNode &rNd)
Definition: pagedesc.cxx:288
const SwPageDesc * GetFollow() const
Definition: pagedesc.hxx:245
void NotifyClients(const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
Definition: calbck.cxx:167
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:458
void StartListening(SwModify *pDepend)
Definition: calbck.cxx:335
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:216
const SvxULSpaceItem & GetULSpace(bool=true) const
Definition: frmatr.hxx:76
Footnote information.
Definition: pagedesc.hxx:47
const Fraction & GetWidth() const
Definition: pagedesc.hxx:64
const SwFrameFormat * GetPageFormatOfNode(const SwNode &rNd, bool bCheckForThisPgDc=true) const
Definition: pagedesc.cxx:320
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
virtual bool GetInfo(SfxPoolItem &) const override
Query information from Client.
Definition: pagedesc.cxx:179
OUString m_StyleName
Definition: pagedesc.hxx:144
OUString const & GetName() const
Definition: pagedesc.cxx:496
OUString m_sFollow
Definition: pagedesc.hxx:358
SwFrameFormat & GetFirstLeft()
Definition: pagedesc.hxx:219
css::text::HorizontalAdjust GetAdj() const
Definition: pagedesc.hxx:65
SwFrameFormat * GetRightFormat(bool const bFirst=false)
Layout uses the following methods to obtain a format in order to be able to create a page...
Definition: pagedesc.cxx:368
LanguageType GetAppLanguage()
Definition: init.cxx:765
SwPageDesc * m_pFollow
Definition: pagedesc.hxx:153
const SvxPaperBinItem & GetPaperBin(bool=true) const
Definition: frmatr.hxx:72
SwFrameFormat m_Master
Definition: pagedesc.hxx:146
bool IsPageFrame() const
Definition: frame.hxx:1154
bool SetName(const OUString &rNewName)
Definition: pagedesc.cxx:128
Fraction m_Width
percentage width of the separator line.
Definition: pagedesc.hxx:54
const SwTextFormatColl * m_pTextFormatColl
Definition: pagedesc.hxx:152
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
long GetRight() const
SvxFrameDirection GetDefaultFrameDirection(LanguageType nLanguage)
Return the AutoCollection by its Id.
Definition: poolfmt.cxx:115
const sal_uInt16 * GetRanges() const
bool IsInDtor() const
Definition: doc.hxx:397
SwFrameFormat m_FirstLeft
Definition: pagedesc.hxx:150
#define SAL_WARN(area, stream)
SvxBorderLineStyle m_eLineStyle
Style of the separator line.
Definition: pagedesc.hxx:52
bool IsTableNode() const
Definition: node.hxx:640
SAL_DLLPRIVATE void ResetAllAttr()
Definition: pagedesc.cxx:169
bool IsFirstShared() const
Definition: pagedesc.cxx:375
void RegisterChange()
notify all affected page frames
Definition: pagedesc.cxx:211
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
sal_uLong m_nLineWidth
width of separator line
Definition: pagedesc.hxx:51
SwPageDescs * m_pdList
Backref to the assigned SwPageDescs list to handle renames.
Definition: pagedesc.hxx:165
SwTwips m_nTopDist
distance between body and separator.
Definition: pagedesc.hxx:56
css::text::HorizontalAdjust m_eAdjust
line adjustment.
Definition: pagedesc.hxx:55
SwTwips m_nMaxHeight
maximum height of the footnote area.
Definition: pagedesc.hxx:50
SwFrame * GetFrameOfModify(const SwRootFrame *pLayout, SwModify const &, SwFrameType const nFrameType, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr)
#define RES_PARATR_LINESPACING
Definition: hintids.hxx:161
bool operator==(const SwPageFootnoteInfo &) const
Definition: pagedesc.cxx:466
void SetRegisterFormatColl(const SwTextFormatColl *rFormat)
set the style for the grid alignment
Definition: pagedesc.cxx:191
SwFrame * GetNext()
Definition: frame.hxx:654
const SvxLRSpaceItem & GetLRSpace(bool=true) const
Definition: frmatr.hxx:74
Base class of the Writer document model elements.
Definition: node.hxx:79
const SvxShadowItem & GetShadow(bool=true) const
Definition: frmatr.hxx:88