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