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 <libxml/xmlwriter.h>
21 
22 #include <editeng/pbinitem.hxx>
23 #include <editeng/ulspitem.hxx>
24 #include <editeng/boxitem.hxx>
25 #include <editeng/shaditem.hxx>
26 #include <editeng/frmdiritem.hxx>
27 #include <sal/log.hxx>
28 #include <fmtclds.hxx>
29 #include <fmtfsize.hxx>
30 #include <pagefrm.hxx>
31 #include <pagedesc.hxx>
32 #include <swtable.hxx>
33 #include <frmatr.hxx>
34 #include <frmtool.hxx>
35 #include <doc.hxx>
36 #include <node.hxx>
37 #include <strings.hrc>
40 #include <poolfmt.hxx>
41 #include <calbck.hxx>
42 #include <hints.hxx>
43 
44 SwPageDesc::SwPageDesc(const OUString& rName, SwFrameFormat *pFormat, SwDoc *const pDoc)
45  : sw::BroadcastingModify()
46  , m_StyleName( rName )
47  , m_Master( pDoc->GetAttrPool(), rName, pFormat )
48  , m_Left( pDoc->GetAttrPool(), rName, pFormat )
49  , m_FirstMaster( pDoc->GetAttrPool(), rName, pFormat )
50  , m_FirstLeft( pDoc->GetAttrPool(), rName, pFormat )
51  , m_aDepends(*this)
52  , m_pTextFormatColl(nullptr)
53  , m_pFollow( this )
54  , m_nRegHeight( 0 )
55  , m_nRegAscent( 0 )
56  , m_nVerticalAdjustment( drawing::TextVerticalAdjust_TOP )
58  , m_IsLandscape( false )
59  , m_IsHidden( false )
60  , m_pdList( nullptr )
61 {
62 }
63 
65  : sw::BroadcastingModify()
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_FootnoteInfo( 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 sw::BroadcastingModify* 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_ENVELOPE,
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 {
430  xmlTextWriterStartElement(pWriter, BAD_CAST("SwPageDesc"));
431  xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
432  xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("m_StyleName"), "%s",
433  BAD_CAST(m_StyleName.toUtf8().getStr()));
434  xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("m_pFollow"), "%p", m_pFollow);
435  xmlTextWriterWriteFormatAttribute(
436  pWriter, BAD_CAST("m_eUse"), "0x%s",
437  BAD_CAST(OString::number(static_cast<int>(m_eUse), 16).getStr()));
438 
439  xmlTextWriterStartElement(pWriter, BAD_CAST("m_Master"));
440  m_Master.dumpAsXml(pWriter);
441  xmlTextWriterEndElement(pWriter);
442 
443  xmlTextWriterStartElement(pWriter, BAD_CAST("m_Left"));
444  m_Left.dumpAsXml(pWriter);
445  xmlTextWriterEndElement(pWriter);
446 
447  xmlTextWriterStartElement(pWriter, BAD_CAST("m_FirstMaster"));
448  m_FirstMaster.dumpAsXml(pWriter);
449  xmlTextWriterEndElement(pWriter);
450 
451  xmlTextWriterStartElement(pWriter, BAD_CAST("m_FirstLeft"));
452  m_FirstLeft.dumpAsXml(pWriter);
453  xmlTextWriterEndElement(pWriter);
454 
455  xmlTextWriterEndElement(pWriter);
456 }
457 
459  : m_nMaxHeight( 0 )
460  , m_nLineWidth(10)
461  , m_eLineStyle( SvxBorderLineStyle::SOLID )
462  , m_Width( 25, 100 )
463  , m_nTopDist( 57 ) //1mm
464  , m_nBottomDist( 57 )
465 {
466  m_eAdjust = SvxFrameDirection::Horizontal_RL_TB == GetDefaultFrameDirection(GetAppLanguage()) ?
467  css::text::HorizontalAdjust_RIGHT :
468  css::text::HorizontalAdjust_LEFT;
469 }
470 
472  : m_nMaxHeight(rCpy.GetHeight())
473  , m_nLineWidth(rCpy.m_nLineWidth)
474  , m_eLineStyle(rCpy.m_eLineStyle)
475  , m_LineColor(rCpy.m_LineColor)
476  , m_Width(rCpy.GetWidth())
477  , m_eAdjust(rCpy.GetAdj())
478  , m_nTopDist(rCpy.GetTopDist())
479  , m_nBottomDist(rCpy.GetBottomDist())
480 {
481 }
482 
484 {
485  m_nMaxHeight = rCpy.GetHeight();
486  m_nLineWidth = rCpy.m_nLineWidth;
487  m_eLineStyle = rCpy.m_eLineStyle;
488  m_LineColor = rCpy.m_LineColor;
489  m_Width = rCpy.GetWidth();
490  m_eAdjust = rCpy.GetAdj();
491  m_nTopDist = rCpy.GetTopDist();
492  m_nBottomDist = rCpy.GetBottomDist();
493  return *this;
494 }
495 
497 {
498  return m_nMaxHeight == rCmp.GetHeight()
499  && m_nLineWidth == rCmp.m_nLineWidth
500  && m_eLineStyle == rCmp.m_eLineStyle
501  && m_LineColor == rCmp.m_LineColor
502  && m_Width == rCmp.GetWidth()
503  && m_eAdjust == rCmp.GetAdj()
504  && m_nTopDist == rCmp.GetTopDist()
505  && m_nBottomDist== rCmp.GetBottomDist();
506 }
507 
508 SwPageDescExt::SwPageDescExt(const SwPageDesc & rPageDesc, SwDoc *const pDoc)
509  : m_PageDesc(rPageDesc)
510  , m_pDoc(pDoc)
511 {
512  SetPageDesc(rPageDesc);
513 }
514 
516  : m_PageDesc(rSrc.m_PageDesc)
517  , m_pDoc(rSrc.m_pDoc)
518 {
519  SetPageDesc(rSrc.m_PageDesc);
520 }
521 
523 {
524 }
525 
526 OUString const & SwPageDescExt::GetName() const
527 {
528  return m_PageDesc.GetName();
529 }
530 
531 void SwPageDescExt::SetPageDesc(const SwPageDesc & rPageDesc)
532 {
533  m_PageDesc = rPageDesc;
534 
535  if (m_PageDesc.GetFollow())
537 }
538 
540 {
541  SetPageDesc(rSrc);
542 
543  return *this;
544 }
545 
547 {
548  operator=(rSrc.m_PageDesc);
549  return *this;
550 }
551 
552 SwPageDescExt::operator SwPageDesc() const
553 {
554  SwPageDesc aResult(m_PageDesc);
555 
556  SwPageDesc * pPageDesc = m_pDoc->FindPageDesc(m_sFollow);
557 
558  if ( nullptr != pPageDesc )
559  aResult.SetFollow(pPageDesc);
560 
561  return aResult;
562 }
563 
565  : m_PosIndex( m_Array.get<0>() )
566  , m_NameIndex( m_Array.get<1>() )
567 {
568 }
569 
571 {
572  for(const_iterator it = begin(); it != end(); ++it)
573  delete *it;
574 }
575 
576 SwPageDescs::iterator SwPageDescs::find_(const OUString &name) const
577 {
578  ByName::iterator it = m_NameIndex.find( name );
579  return m_Array.iterator_to( *it );
580 }
581 
582 std::pair<SwPageDescs::const_iterator,bool> SwPageDescs::push_back( const value_type& x )
583 {
584  // SwPageDesc is not already in a SwPageDescs list!
585  assert( x->m_pdList == nullptr );
586 
587  std::pair<iterator,bool> res = m_PosIndex.push_back( x );
588  if( res.second )
589  x->m_pdList = this;
590  return res;
591 }
592 
594 {
595  // SwPageDesc is not in this SwPageDescs list!
596  assert( x->m_pdList == this );
597 
598  iterator const ret = find_( x->GetName() );
599  if (ret != end())
600  m_PosIndex.erase( ret );
601  else
602  SAL_WARN( "sw", "SwPageDesc is not in SwPageDescs m_pdList!" );
603  x->m_pdList = nullptr;
604 }
605 
606 void SwPageDescs::erase( const_iterator const& position )
607 {
608  // SwPageDesc is not in this SwPageDescs list!
609  assert( (*position)->m_pdList == this );
610 
611  (*position)->m_pdList = nullptr;
612  m_PosIndex.erase( position );
613 }
614 
616 {
617  erase( begin() + index_ );
618 }
619 
621 {
622  xmlTextWriterStartElement(pWriter, BAD_CAST("SwPageDescs"));
623 
624  for (const auto& pPageDesc : m_PosIndex)
625  {
626  pPageDesc->dumpAsXml(pWriter);
627  }
628 
629  xmlTextWriterEndElement(pWriter);
630 }
631 
632 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Base class of the Writer layout elements.
Definition: frame.hxx:298
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
static const char * STR_POOLPAGE[]
Definition: pagedesc.cxx:389
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
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:434
SwTwips m_nBottomDist
distance between separator and first footnote
Definition: pagedesc.hxx:58
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:433
SwFrameFormat & GetLeft()
Definition: pagedesc.hxx:217
bool isCHRATR(const sal_uInt16 nWhich)
Definition: hintids.hxx:469
SwPageDescsBase::value_type value_type
Definition: pagedesc.hxx:411
iterator find_(const OUString &name) const
Definition: pagedesc.cxx:576
ByName & m_NameIndex
Definition: pagedesc.hxx:406
#define FRM_CNTNT
Definition: frame.hxx:102
tools::Long GetRight() const
SwTwips GetBottomDist() const
Definition: pagedesc.hxx:68
const SvxFrameDirectionItem & GetFrameDir(bool=true) const
Definition: frmatr.hxx:94
SwFrameFormat & GetFirstMaster()
Definition: pagedesc.hxx:218
Definition: doc.hxx:186
void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: pagedesc.cxx:428
TElementType * Next()
Definition: calbck.hxx:354
bool KnowsFormat(const SwFormat &rFormat) const
Definition: wsfrm.cxx:331
SwPageDescExt(const SwPageDesc &rPageDesc, SwDoc *pDoc)
Definition: pagedesc.cxx:508
WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
Definition: ww8par2.cxx:874
sal_uInt16 m_nRegAscent
For grid alignment (Registerhaltigkeit).
Definition: pagedesc.hxx:155
Dialog to specify the properties of date form field.
SwPageDesc & operator=(const SwPageDesc &)
Definition: pagedesc.cxx:91
virtual bool GetInfo(SfxPoolItem &) const override
Definition: calbck.cxx:188
SwPageDescExt & operator=(const SwPageDescExt &rSrc)
Definition: pagedesc.cxx:546
void SetFollow(const SwPageDesc *pNew)
Definition: pagedesc.hxx:292
SwTwips GetTopDist() const
Definition: pagedesc.hxx:67
const OUString & GetName() const
Definition: pagedesc.hxx:186
const SvxBoxItem & GetBox(bool=true) const
Definition: frmatr.hxx:84
UseOnPage
Definition: pagedesc.hxx:120
SvxBorderLineStyle
ByPos::iterator iterator
Definition: pagedesc.hxx:400
SAL_DLLPRIVATE SwPageDesc(const OUString &, SwFrameFormat *, SwDoc *pDc)
Definition: pagedesc.cxx:44
std::unique_ptr< SvxBrushItem > makeBackgroundBrushItem(bool=true) const
Definition: format.cxx:761
bool IsFollowNextPageOfNode(const SwNode &rNd) const
Definition: pagedesc.cxx:345
std::pair< const_iterator, bool > push_back(const value_type &x)
Definition: pagedesc.cxx:582
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:426
ByPos::const_iterator const_iterator
Definition: pagedesc.hxx:409
sw::WriterMultiListener m_aDepends
Because of grid alignment (Registerhaltigkeit).
Definition: pagedesc.hxx:151
constexpr OUStringLiteral IsHidden(u"IsHidden")
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(161)
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
special handling if the style of the grid alignment changes
Definition: pagedesc.cxx:263
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(160)
SwTwips GetHeight() const
Definition: pagedesc.hxx:61
drawing::TextVerticalAdjust m_nVerticalAdjustment
Definition: pagedesc.hxx:156
exports com.sun.star. drawing
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:670
#define SAL_N_ELEMENTS(arr)
SwFrameFormat m_FirstMaster
Definition: pagedesc.hxx:149
SwPageDesc m_PageDesc
Definition: pagedesc.hxx:357
bool IsContentNode() const
Definition: node.hxx:631
void SetPageDesc(const SwPageDesc &rPageDesc)
Definition: pagedesc.cxx:531
struct _xmlTextWriter * xmlTextWriterPtr
Style of a layout element.
Definition: frmfmt.hxx:58
void erase(const value_type &x)
Definition: pagedesc.cxx:593
int i
Color m_LineColor
color of the separator line
Definition: pagedesc.hxx:54
SwFrameType
Definition: frame.hxx:73
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:880
SwFrame * GetFrameOfModify(const SwRootFrame *pLayout, sw::BroadcastingModify const &, SwFrameType const nFrameType, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr)
SAL_DLLPRIVATE void Mirror()
Called for mirroring of Chg (doc).
Definition: pagedesc.cxx:147
SwPageFrame * FindPageFrame()
Definition: frame.hxx:663
bool IsListeningTo(const SwModify *const pDepend) const
Definition: calbck.cxx:335
void ChgFirstShare(bool bNew)
Definition: pagedesc.cxx:380
SwFrameFormat * GetLeftFormat(bool const bFirst=false)
Definition: pagedesc.cxx:361
TElementType * First()
Definition: calbck.hxx:346
tools::Long GetLeft() const
void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: pagedesc.cxx:620
size_t GetPageDescCnt() const
Definition: doc.hxx:879
const SwTextFormatColl * GetRegisterFormatColl() const
retrieve the style for the grid alignment
Definition: pagedesc.cxx:203
SwPageDescsBase m_Array
Definition: pagedesc.hxx:404
ByPos & m_PosIndex
Definition: pagedesc.hxx:405
UseOnPage m_eUse
Definition: pagedesc.hxx:157
SwPageDescsBase::size_type size_type
Definition: pagedesc.hxx:410
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
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:165
SwPageFootnoteInfo & operator=(const SwPageFootnoteInfo &)
Definition: pagedesc.cxx:483
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:119
void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: atrfrm.cxx:2832
A page of the document layout.
Definition: pagefrm.hxx:41
SwFrameFormat m_Left
Definition: pagedesc.hxx:147
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:405
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:170
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:461
void StartListening(SwModify *pDepend)
Definition: calbck.cxx:328
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:216
const SvxULSpaceItem & GetULSpace(bool=true) const
Definition: frmatr.hxx:76
Footnote information.
Definition: pagedesc.hxx:48
const Fraction & GetWidth() const
Definition: pagedesc.hxx:65
const SwFrameFormat * GetPageFormatOfNode(const SwNode &rNd, bool bCheckForThisPgDc=true) const
Definition: pagedesc.cxx:320
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
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:526
OUString m_sFollow
Definition: pagedesc.hxx:360
SwFrameFormat & GetFirstLeft()
Definition: pagedesc.hxx:219
css::text::HorizontalAdjust GetAdj() const
Definition: pagedesc.hxx:66
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:728
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:1159
bool SetName(const OUString &rNewName)
Definition: pagedesc.cxx:128
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
Fraction m_Width
percentage width of the separator line.
Definition: pagedesc.hxx:55
const SwTextFormatColl * m_pTextFormatColl
Definition: pagedesc.hxx:152
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
SvxFrameDirection GetDefaultFrameDirection(LanguageType nLanguage)
Return the AutoCollection by its Id.
Definition: poolfmt.cxx:77
const sal_uInt16 * GetRanges() const
bool IsInDtor() const
Definition: doc.hxx:400
SwFrameFormat m_FirstLeft
Definition: pagedesc.hxx:150
#define SAL_WARN(area, stream)
SvxBorderLineStyle m_eLineStyle
Style of the separator line.
Definition: pagedesc.hxx:53
bool IsTableNode() const
Definition: node.hxx:643
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:52
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:57
css::text::HorizontalAdjust m_eAdjust
line adjustment.
Definition: pagedesc.hxx:56
SwTwips m_nMaxHeight
maximum height of the footnote area.
Definition: pagedesc.hxx:51
bool operator==(const SwPageFootnoteInfo &) const
Definition: pagedesc.cxx:496
void SetRegisterFormatColl(const SwTextFormatColl *rFormat)
set the style for the grid alignment
Definition: pagedesc.cxx:191
SwFrame * GetNext()
Definition: frame.hxx:659
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