LibreOffice Module sw (master)  1
docdesc.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 <cmdid.h>
21 #include <init.hxx>
22 #include <editeng/lrspitem.hxx>
23 #include <editeng/ulspitem.hxx>
24 #include <editeng/paperinf.hxx>
25 #include <editeng/frmdiritem.hxx>
26 #include <sfx2/bindings.hxx>
27 #include <sfx2/dispatch.hxx>
28 #include <tools/globname.hxx>
29 #include <sal/log.hxx>
31 #include <fmtfsize.hxx>
32 #include <fmthdft.hxx>
33 #include <fmtcntnt.hxx>
34 #include <ftninfo.hxx>
35 #include <fesh.hxx>
36 #include <ndole.hxx>
37 #include <mdiexp.hxx>
38 #include <doc.hxx>
39 #include <IDocumentUndoRedo.hxx>
42 #include <IDocumentState.hxx>
44 #include <rootfrm.hxx>
45 #include <poolfmt.hxx>
46 #include <docsh.hxx>
47 #include <ftnidx.hxx>
48 #include <fmtftn.hxx>
49 #include <txtftn.hxx>
50 #include <fldbas.hxx>
51 #include <GetMetricVal.hxx>
52 #include <strings.hrc>
53 #include <hints.hxx>
54 #include <SwUndoPageDesc.hxx>
55 #include <pagedeschint.hxx>
56 #include <tgrditem.hxx>
57 #include <unotools/configmgr.hxx>
58 #include <unotools/syslocale.hxx>
59 #include <svx/swframetypes.hxx>
60 #include <svx/svxids.hrc>
61 #include <com/sun/star/embed/XEmbeddedObject.hpp>
62 
63 using namespace com::sun::star;
64 
65 static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId,
66  SwFrameFormat &rFormat1,
67  SwFrameFormat &rFormat2,
68  SwFrameFormat &rFormat3,
69  SwFrameFormat &rFormat4)
70 {
71  // --> #i41075# Printer on demand
72  // This function does not require a printer anymore.
73  // The default page size is obtained from the application
74  //locale
75 
77  const Size aPhysSize = SvxPaperInfo::GetDefaultPaperSize();
78  aFrameSize.SetSize( aPhysSize );
79 
80  // Prepare for default margins.
81  // Margins have a default minimum size.
82  // If the printer forces a larger margins, that's ok too.
83  // The HTML page desc had A4 as page size always.
84  // This has been changed to take the page size from the printer.
85  // Unfortunately, the margins of the HTML page desc are smaller than
86  // the margins used here in general, so one extra case is required.
87  // In the long term, this needs to be changed to always keep the
88  // margins from the page desc.
89  sal_Int32 nMinTop, nMinBottom, nMinLeft, nMinRight;
90  if( RES_POOLPAGE_HTML == nPoolFormatId )
91  {
92  nMinRight = nMinTop = nMinBottom = GetMetricVal( CM_1 );
93  nMinLeft = nMinRight * 2;
94  }
95  else if (!utl::ConfigManager::IsFuzzing() && MeasurementSystem::Metric == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() )
96  {
97  nMinTop = nMinBottom = nMinLeft = nMinRight = 1134; // 2 centimeters
98  }
99  else
100  {
101  nMinTop = nMinBottom = 1440; // as in MS Word: 1 Inch
102  nMinLeft = nMinRight = 1800; // 1,25 Inch
103  }
104 
105  // set margins
108 
109  aUL.SetUpper( static_cast<sal_uInt16>(nMinTop) );
110  aUL.SetLower( static_cast<sal_uInt16>(nMinBottom) );
111  aLR.SetRight( nMinRight );
112  aLR.SetLeft( nMinLeft );
113 
114  rFormat1.SetFormatAttr( aFrameSize );
115  rFormat1.SetFormatAttr( aLR );
116  rFormat1.SetFormatAttr( aUL );
117 
118  rFormat2.SetFormatAttr( aFrameSize );
119  rFormat2.SetFormatAttr( aLR );
120  rFormat2.SetFormatAttr( aUL );
121 
122  rFormat3.SetFormatAttr( aFrameSize );
123  rFormat3.SetFormatAttr( aLR );
124  rFormat3.SetFormatAttr( aUL );
125 
126  rFormat4.SetFormatAttr( aFrameSize );
127  rFormat4.SetFormatAttr( aLR );
128  rFormat4.SetFormatAttr( aUL );
129 }
130 
131 static void lcl_DescSetAttr( const SwFrameFormat &rSource, SwFrameFormat &rDest,
132  const bool bPage = true )
133 {
134  // We should actually use ItemSet's Intersect here, but that doesn't work
135  // correctly if we have different WhichRanges.
136 
137  // Take over the attributes which are of interest.
138  sal_uInt16 const aIdArr[] = {
139  RES_FRM_SIZE, RES_UL_SPACE, // [83..86
140  RES_BACKGROUND, RES_SHADOW, // [99..101
141  RES_COL, RES_COL, // [103
142  RES_TEXTGRID, RES_TEXTGRID, // [109
143  RES_FRAMEDIR, RES_FRAMEDIR, // [114
146 
147  // take over DrawingLayer FillStyles
149 
150  0};
151 
152  const SfxPoolItem* pItem;
153  for( sal_uInt16 n = 0; aIdArr[ n ]; n += 2 )
154  {
155  for( sal_uInt16 nId = aIdArr[ n ]; nId <= aIdArr[ n+1]; ++nId )
156  {
157  // #i45539#
158  // bPage == true:
159  // All in aIdArr except from RES_HEADER_FOOTER_EAT_SPACING
160  // bPage == false:
161  // All in aIdArr except from RES_COL and RES_PAPER_BIN:
162  bool bExecuteId(true);
163 
164  if(bPage)
165  {
166  // When Page
167  switch(nId)
168  {
169  // All in aIdArr except from RES_HEADER_FOOTER_EAT_SPACING
171  // take out SvxBrushItem; it's the result of the fallback
172  // at SwFormat::GetItemState and not really in state SfxItemState::SET
173  case RES_BACKGROUND:
174  bExecuteId = false;
175  break;
176  default:
177  break;
178  }
179  }
180  else
181  {
182  // When not Page
183  switch(nId)
184  {
185  // When not Page: All in aIdArr except from RES_COL and RES_PAPER_BIN:
186  case RES_COL:
187  case RES_PAPER_BIN:
188  bExecuteId = false;
189  break;
190  default:
191  break;
192  }
193  }
194 
195  if(bExecuteId)
196  {
197  if (SfxItemState::SET == rSource.GetItemState(nId, false, &pItem))
198  {
199  rDest.SetFormatAttr(*pItem);
200  }
201  else
202  {
203  rDest.ResetFormatAttr(nId);
204  }
205  }
206  }
207  }
208 
209  // Transmit pool and help IDs too
210  rDest.SetPoolFormatId( rSource.GetPoolFormatId() );
211  rDest.SetPoolHelpId( rSource.GetPoolHelpId() );
212  rDest.SetPoolHlpFileId( rSource.GetPoolHlpFileId() );
213 }
214 
215 namespace
216 {
217  SwFrameFormat& getFrameFormat(SwPageDesc &rDesc, bool bLeft, bool bFirst)
218  {
219  if (bFirst)
220  {
221  if (bLeft)
222  return rDesc.GetFirstLeft();
223  return rDesc.GetFirstMaster();
224  }
225  return rDesc.GetLeft();
226  }
227 
228  const SwFrameFormat& getConstFrameFormat(const SwPageDesc &rDesc, bool bLeft, bool bFirst)
229  {
230  return getFrameFormat(const_cast<SwPageDesc&>(rDesc), bLeft, bFirst);
231  }
232 }
233 
234 void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader &rHead, SwPageDesc &rDesc, bool bLeft, bool bFirst)
235 {
236  assert(bLeft || bFirst);
237  SwFrameFormat& rDescFrameFormat = getFrameFormat(rDesc, bLeft, bFirst);
238  if (bFirst && bLeft)
239  {
240  // special case: always shared with something
241  rDescFrameFormat.SetFormatAttr( rChged.IsFirstShared()
242  ? rDesc.GetLeft().GetHeader()
243  : rDesc.GetFirstMaster().GetHeader());
244  }
245  else if ((bFirst ? rChged.IsFirstShared() : rChged.IsHeaderShared())
246  || !rHead.IsActive())
247  {
248  // Left or first shares the header with the Master.
249  rDescFrameFormat.SetFormatAttr( rDesc.GetMaster().GetHeader() );
250  }
251  else if ( rHead.IsActive() )
252  { // Left or first gets its own header if the Format doesn't already have one.
253  // If it already has one and it points to the same Section as the
254  // Right one, it needs to get an own Header.
255  // The content is evidently copied.
256  const SwFormatHeader &rFormatHead = rDescFrameFormat.GetHeader();
257  if ( !rFormatHead.IsActive() )
258  {
259  SwFormatHeader aHead( getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::HEADERL, nullptr ) );
260  rDescFrameFormat.SetFormatAttr( aHead );
261  // take over additional attributes (margins, borders ...)
262  ::lcl_DescSetAttr( *rHead.GetHeaderFormat(), *aHead.GetHeaderFormat(), false);
263  }
264  else
265  {
266  const SwFrameFormat *pRight = rHead.GetHeaderFormat();
267  const SwFormatContent &aRCnt = pRight->GetContent();
268  const SwFormatContent &aCnt = rFormatHead.GetHeaderFormat()->GetContent();
269 
270  if (!aCnt.GetContentIdx())
271  {
272  const SwFrameFormat& rChgedFrameFormat = getConstFrameFormat(rChged, bLeft, bFirst);
273  rDescFrameFormat.SetFormatAttr( rChgedFrameFormat.GetHeader() );
274  }
275  else if ((*aRCnt.GetContentIdx() == *aCnt.GetContentIdx()) ||
276  // The ContentIdx is _always_ different when called from
277  // SwDocStyleSheet::SetItemSet, because it deep-copies the
278  // PageDesc. So check if it was previously shared.
279  (bFirst ? rDesc.IsFirstShared() : rDesc.IsHeaderShared()))
280  {
281  SwFrameFormat *pFormat = new SwFrameFormat( GetAttrPool(),
282  bFirst ? "First header" : "Left header",
283  GetDfltFrameFormat() );
284  ::lcl_DescSetAttr( *pRight, *pFormat, false );
285  // The section which the right header attribute is pointing
286  // is copied, and the Index to the StartNode is set to
287  // the left or first header attribute.
288  SwNodeIndex aTmp( GetNodes().GetEndOfAutotext() );
290  SwNodeRange aRange( aRCnt.GetContentIdx()->GetNode(), 0,
291  *aRCnt.GetContentIdx()->GetNode().EndOfSectionNode() );
292  aTmp = *pSttNd->EndOfSectionNode();
293  GetNodes().Copy_( aRange, aTmp, false );
294  aTmp = *pSttNd;
295  GetDocumentContentOperationsManager().CopyFlyInFlyImpl(aRange, nullptr, aTmp);
296 
297  pFormat->SetFormatAttr( SwFormatContent( pSttNd ) );
298  rDescFrameFormat.SetFormatAttr( SwFormatHeader( pFormat ) );
299  }
300  else
301  ::lcl_DescSetAttr( *pRight,
302  *const_cast<SwFrameFormat*>(rFormatHead.GetHeaderFormat()), false );
303  }
304  }
305 }
306 
307 void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFormatFooter &rFoot, SwPageDesc &rDesc, bool bLeft, bool bFirst)
308 {
309  assert(bLeft || bFirst);
310  SwFrameFormat& rDescFrameFormat = getFrameFormat(rDesc, bLeft, bFirst);
311  if (bFirst && bLeft)
312  {
313  // special case: always shared with something
314  rDescFrameFormat.SetFormatAttr( rChged.IsFirstShared()
315  ? rDesc.GetLeft().GetFooter()
316  : rDesc.GetFirstMaster().GetFooter());
317  }
318  else if ((bFirst ? rChged.IsFirstShared() : rChged.IsFooterShared())
319  || !rFoot.IsActive())
320  {
321  // Left or first shares the Header with the Master.
322  rDescFrameFormat.SetFormatAttr( rDesc.GetMaster().GetFooter() );
323  }
324  else if ( rFoot.IsActive() )
325  { // Left or first gets its own Footer if the Format does not already have one.
326  // If the Format already has a Footer and it points to the same section as the Right one,
327  // it needs to get an own one.
328  // The content is evidently copied.
329  const SwFormatFooter &rFormatFoot = rDescFrameFormat.GetFooter();
330  if ( !rFormatFoot.IsActive() )
331  {
332  SwFormatFooter aFoot( getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::FOOTER, nullptr ) );
333  rDescFrameFormat.SetFormatAttr( aFoot );
334  // Take over additional attributes (margins, borders ...).
335  ::lcl_DescSetAttr( *rFoot.GetFooterFormat(), *aFoot.GetFooterFormat(), false);
336  }
337  else
338  {
339  const SwFrameFormat *pRight = rFoot.GetFooterFormat();
340  const SwFormatContent &aRCnt = pRight->GetContent();
341  const SwFormatContent &aLCnt = rFormatFoot.GetFooterFormat()->GetContent();
342  if( !aLCnt.GetContentIdx() )
343  {
344  const SwFrameFormat& rChgedFrameFormat = getConstFrameFormat(rChged, bLeft, bFirst);
345  rDescFrameFormat.SetFormatAttr( rChgedFrameFormat.GetFooter() );
346  }
347  else if ((*aRCnt.GetContentIdx() == *aLCnt.GetContentIdx()) ||
348  // The ContentIdx is _always_ different when called from
349  // SwDocStyleSheet::SetItemSet, because it deep-copies the
350  // PageDesc. So check if it was previously shared.
351  (bFirst ? rDesc.IsFirstShared() : rDesc.IsFooterShared()))
352  {
353  SwFrameFormat *pFormat = new SwFrameFormat( GetAttrPool(),
354  bFirst ? "First footer" : "Left footer",
355  GetDfltFrameFormat() );
356  ::lcl_DescSetAttr( *pRight, *pFormat, false );
357  // The section to which the right footer attribute is pointing
358  // is copied, and the Index to the StartNode is set to
359  // the left footer attribute.
360  SwNodeIndex aTmp( GetNodes().GetEndOfAutotext() );
362  SwNodeRange aRange( aRCnt.GetContentIdx()->GetNode(), 0,
363  *aRCnt.GetContentIdx()->GetNode().EndOfSectionNode() );
364  aTmp = *pSttNd->EndOfSectionNode();
365  GetNodes().Copy_( aRange, aTmp, false );
366  aTmp = *pSttNd;
367  GetDocumentContentOperationsManager().CopyFlyInFlyImpl(aRange, nullptr, aTmp);
368 
369  pFormat->SetFormatAttr( SwFormatContent( pSttNd ) );
370  rDescFrameFormat.SetFormatAttr( SwFormatFooter( pFormat ) );
371  }
372  else
373  ::lcl_DescSetAttr( *pRight,
374  *const_cast<SwFrameFormat*>(rFormatFoot.GetFooterFormat()), false );
375  }
376  }
377 }
378 
379 void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged )
380 {
381  assert(i < m_PageDescs.size() && "PageDescs is out of range.");
382 
383  SwPageDesc& rDesc = *m_PageDescs[i];
384  SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout();
385 
386  if (GetIDocumentUndoRedo().DoesUndo())
387  {
388  GetIDocumentUndoRedo().AppendUndo(
389  std::make_unique<SwUndoPageDesc>(rDesc, rChged, this));
390  }
391  ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
392 
393  // Mirror at first if needed.
394  if ( rChged.GetUseOn() == UseOnPage::Mirror )
395  const_cast<SwPageDesc&>(rChged).Mirror();
396  else
397  {
398  // Or else transfer values from Master to Left
399  ::lcl_DescSetAttr(rChged.GetMaster(),
400  const_cast<SwPageDesc&>(rChged).GetLeft());
401  }
402  ::lcl_DescSetAttr(rChged.GetMaster(),
403  const_cast<SwPageDesc&>(rChged).GetFirstMaster());
404  ::lcl_DescSetAttr(rChged.GetLeft(),
405  const_cast<SwPageDesc&>(rChged).GetFirstLeft());
406 
407  // Take over NumType.
408  if( rChged.GetNumType().GetNumberingType() != rDesc.GetNumType().GetNumberingType() )
409  {
410  rDesc.SetNumType( rChged.GetNumType() );
411  // Notify page number fields that NumFormat has changed
412  getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::PageNumber )->UpdateFields();
413  getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::RefPageGet )->UpdateFields();
414 
415  // If the numbering scheme has changed we could have QuoVadis/ErgoSum texts
416  // that refer to a changed page, so we invalidate foot notes.
417  SwFootnoteIdxs& rFootnoteIdxs = GetFootnoteIdxs();
418  for( SwFootnoteIdxs::size_type nPos = 0; nPos < rFootnoteIdxs.size(); ++nPos )
419  {
420  SwTextFootnote *pTextFootnote = rFootnoteIdxs[ nPos ];
421  const SwFormatFootnote &rFootnote = pTextFootnote->GetFootnote();
422  pTextFootnote->SetNumber(rFootnote.GetNumber(), rFootnote.GetNumberRLHidden(), rFootnote.GetNumStr());
423  }
424  }
425 
426  // Take over orientation
427  rDesc.SetLandscape( rChged.GetLandscape() );
428 
429  // #i46909# no undo if header or footer changed
430  bool bHeaderFooterChanged = false;
431 
432  // Synch header.
433  const SwFormatHeader &rHead = rChged.GetMaster().GetHeader();
434  if (undoGuard.UndoWasEnabled())
435  {
436  // #i46909# no undo if header or footer changed
437  // Did something change in the nodes?
438  const SwFormatHeader &rOldHead = rDesc.GetMaster().GetHeader();
439  bHeaderFooterChanged |=
440  ( rHead.IsActive() != rOldHead.IsActive() ||
441  rChged.IsHeaderShared() != rDesc.IsHeaderShared() ||
442  rChged.IsFirstShared() != rDesc.IsFirstShared() );
443  }
444  rDesc.GetMaster().SetFormatAttr( rHead );
445  CopyMasterHeader(rChged, rHead, rDesc, true, false); // Copy left header
446  CopyMasterHeader(rChged, rHead, rDesc, false, true); // Copy first master
447  CopyMasterHeader(rChged, rHead, rDesc, true, true); // Copy first left
448  rDesc.ChgHeaderShare( rChged.IsHeaderShared() );
449 
450  // Synch Footer.
451  const SwFormatFooter &rFoot = rChged.GetMaster().GetFooter();
452  if (undoGuard.UndoWasEnabled())
453  {
454  // #i46909# no undo if header or footer changed
455  // Did something change in the Nodes?
456  const SwFormatFooter &rOldFoot = rDesc.GetMaster().GetFooter();
457  bHeaderFooterChanged |=
458  ( rFoot.IsActive() != rOldFoot.IsActive() ||
459  rChged.IsFooterShared() != rDesc.IsFooterShared() );
460  }
461  rDesc.GetMaster().SetFormatAttr( rFoot );
462  CopyMasterFooter(rChged, rFoot, rDesc, true, false); // Copy left footer
463  CopyMasterFooter(rChged, rFoot, rDesc, false, true); // Copy first master
464  CopyMasterFooter(rChged, rFoot, rDesc, true, true); // Copy first left
465  rDesc.ChgFooterShare( rChged.IsFooterShared() );
466  // there is just one first shared flag for both header and footer?
467  rDesc.ChgFirstShare( rChged.IsFirstShared() );
468 
469  if ( rDesc.GetName() != rChged.GetName() )
470  rDesc.SetName( rChged.GetName() );
471 
472  // A RegisterChange is triggered, if necessary
473  rDesc.SetRegisterFormatColl( rChged.GetRegisterFormatColl() );
474 
475  // If UseOn or the Follow change, the paragraphs need to know about it.
476  bool bUseOn = false;
477  bool bFollow = false;
478  if (rDesc.GetUseOn() != rChged.GetUseOn())
479  {
480  rDesc.SetUseOn( rChged.GetUseOn() );
481  bUseOn = true;
482  }
483  if (rDesc.GetFollow() != rChged.GetFollow())
484  {
485  if (rChged.GetFollow() == &rChged)
486  {
487  if (rDesc.GetFollow() != &rDesc)
488  {
489  rDesc.SetFollow( &rDesc );
490  bFollow = true;
491  }
492  }
493  else
494  {
495  rDesc.SetFollow( rChged.m_pFollow );
496  bFollow = true;
497  }
498  }
499 
500  if ( (bUseOn || bFollow) && pTmpRoot)
501  // Inform layout!
502  {
503  for( auto aLayout : GetAllLayouts() )
504  aLayout->AllCheckPageDescs();
505  }
506 
507  // Take over the page attributes.
508  ::lcl_DescSetAttr( rChged.GetMaster(), rDesc.GetMaster() );
509  ::lcl_DescSetAttr( rChged.GetLeft(), rDesc.GetLeft() );
510  ::lcl_DescSetAttr( rChged.GetFirstMaster(), rDesc.GetFirstMaster() );
511  ::lcl_DescSetAttr( rChged.GetFirstLeft(), rDesc.GetFirstLeft() );
512 
513  // If the FootnoteInfo changes, the pages are triggered.
514  if( !(rDesc.GetFootnoteInfo() == rChged.GetFootnoteInfo()) )
515  {
516  rDesc.SetFootnoteInfo( rChged.GetFootnoteInfo() );
517  sw::PageFootnoteHint aHint;
518  rDesc.GetMaster().CallSwClientNotify(aHint);
519  rDesc.GetLeft().CallSwClientNotify(aHint);
520  rDesc.GetFirstMaster().CallSwClientNotify(aHint);
521  rDesc.GetFirstLeft().CallSwClientNotify(aHint);
522  }
523  getIDocumentState().SetModified();
524 
525  // #i46909# no undo if header or footer changed
526  if( bHeaderFooterChanged )
527  {
528  GetIDocumentUndoRedo().DelAllUndoObj();
529  }
530 
531  SfxBindings* pBindings =
532  ( GetDocShell() && GetDocShell()->GetDispatcher() ) ? GetDocShell()->GetDispatcher()->GetBindings() : nullptr;
533  if ( pBindings )
534  {
535  pBindings->Invalidate( SID_ATTR_PAGE_COLUMN );
536  pBindings->Invalidate( SID_ATTR_PAGE );
537  pBindings->Invalidate( SID_ATTR_PAGE_SIZE );
538  pBindings->Invalidate( SID_ATTR_PAGE_ULSPACE );
539  pBindings->Invalidate( SID_ATTR_PAGE_LRSPACE );
540  }
541 
542  //h/f of first-left page must not be unique but same as first master or left
543  assert((rDesc.IsFirstShared())
544  ? rDesc.GetFirstLeft().GetHeader().GetHeaderFormat() == rDesc.GetLeft().GetHeader().GetHeaderFormat()
545  : rDesc.GetFirstLeft().GetHeader().GetHeaderFormat() == rDesc.GetFirstMaster().GetHeader().GetHeaderFormat());
546  assert((rDesc.IsFirstShared())
547  ? rDesc.GetFirstLeft().GetFooter().GetFooterFormat() == rDesc.GetLeft().GetFooter().GetFooterFormat()
548  : rDesc.GetFirstLeft().GetFooter().GetFooterFormat() == rDesc.GetFirstMaster().GetFooter().GetFooterFormat());
549 }
550 
552 // #i7983#
554 {
555  if (nullptr == pDel)
556  return;
557 
558  // mba: test iteration as clients are removed while iteration
559  SwPageDescHint aHint( m_PageDescs[0] );
560  pDel->CallSwClientNotify( aHint );
561 
562  bool bHasLayout = getIDocumentLayoutAccess().HasLayout();
563  if ( mpFootnoteInfo->DependsOn( pDel ) )
564  {
565  mpFootnoteInfo->ChgPageDesc( m_PageDescs[0] );
566  if ( bHasLayout )
567  {
568  for( auto aLayout : GetAllLayouts() )
569  aLayout->CheckFootnotePageDescs(false);
570  }
571  }
572  else if ( mpEndNoteInfo->DependsOn( pDel ) )
573  {
574  mpEndNoteInfo->ChgPageDesc( m_PageDescs[0] );
575  if ( bHasLayout )
576  {
577  for( auto aLayout : GetAllLayouts() )
578  aLayout->CheckFootnotePageDescs(true);
579  }
580  }
581 
582  for (SwPageDesc* pPageDesc : m_PageDescs)
583  {
584  if (pPageDesc->GetFollow() == pDel)
585  {
586  pPageDesc->SetFollow(nullptr);
587  if( bHasLayout )
588  {
589  for( auto aLayout : GetAllLayouts() )
590  aLayout->AllCheckPageDescs();
591  }
592  }
593  }
594 }
595 
596 void SwDoc::BroadcastStyleOperation(const OUString& rName, SfxStyleFamily eFamily,
597  SfxHintId nOp)
598 {
599  if (mpDocShell)
600  {
601  SfxStyleSheetBasePool * pPool = mpDocShell->GetStyleSheetPool();
602 
603  if (pPool)
604  {
605  SfxStyleSheetBase* pBase = pPool->Find(rName, eFamily);
606 
607  if (pBase != nullptr)
608  pPool->Broadcast(SfxStyleSheetHint( nOp, *pBase ));
609  }
610  }
611 }
612 
613 void SwDoc::DelPageDesc( size_t i, bool bBroadcast )
614 {
615  OSL_ENSURE(i < m_PageDescs.size(), "PageDescs is out of range.");
616  OSL_ENSURE( i != 0, "You cannot delete the default Pagedesc.");
617  if ( i == 0 )
618  return;
619 
620  SwPageDesc &rDel = *m_PageDescs[i];
621 
622  if (bBroadcast)
623  BroadcastStyleOperation(rDel.GetName(), SfxStyleFamily::Page,
624  SfxHintId::StyleSheetErased);
625 
626  if (GetIDocumentUndoRedo().DoesUndo())
627  {
628  GetIDocumentUndoRedo().AppendUndo(
629  std::make_unique<SwUndoPageDescDelete>(rDel, this));
630  }
631 
632  PreDelPageDesc(&rDel); // #i7983#
633 
634  m_PageDescs.erase(m_PageDescs.begin() + i);
635  getIDocumentState().SetModified();
636 }
637 
638 SwPageDesc* SwDoc::MakePageDesc(const OUString &rName, const SwPageDesc *pCpy,
639  bool bRegardLanguage, bool bBroadcast)
640 {
641  SwPageDesc *pNew;
642  if( pCpy )
643  {
644  pNew = new SwPageDesc( *pCpy );
645  pNew->SetName( rName );
646  if( rName != pCpy->GetName() )
647  {
648  pNew->SetPoolFormatId( USHRT_MAX );
649  pNew->SetPoolHelpId( USHRT_MAX );
650  pNew->SetPoolHlpFileId( UCHAR_MAX );
651  }
652  }
653  else
654  {
655  pNew = new SwPageDesc( rName, GetDfltFrameFormat(), this );
656  // Set the default page format.
657  lcl_DefaultPageFormat( USHRT_MAX, pNew->GetMaster(), pNew->GetLeft(), pNew->GetFirstMaster(), pNew->GetFirstLeft() );
658 
659  SvxFrameDirection aFrameDirection = bRegardLanguage ?
661  : SvxFrameDirection::Horizontal_LR_TB;
662 
663  pNew->GetMaster().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
664  pNew->GetLeft().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
665  pNew->GetFirstMaster().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
666  pNew->GetFirstLeft().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
667  }
668 
669  std::pair<SwPageDescs::const_iterator, bool> res = m_PageDescs.push_back( pNew );
670  SAL_WARN_IF(!res.second, "sw", "MakePageDesc called with existing name" );
671 
672  if (bBroadcast)
673  BroadcastStyleOperation(rName, SfxStyleFamily::Page,
674  SfxHintId::StyleSheetCreated);
675 
676  if (GetIDocumentUndoRedo().DoesUndo())
677  {
678  GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoPageDescCreate>(pNew, this));
679  }
680 
681  getIDocumentState().SetModified();
682  return pNew;
683 }
684 
685 void SwDoc::PrtOLENotify( bool bAll )
686 {
687  SwFEShell *pShell = nullptr;
688  {
689  SwViewShell *pSh = getIDocumentLayoutAccess().GetCurrentViewShell();
690  if ( pSh )
691  {
692  for(SwViewShell& rShell : pSh->GetRingContainer())
693  {
694  if(dynamic_cast<const SwFEShell*>( &rShell) != nullptr)
695  {
696  pShell = static_cast<SwFEShell*>(&rShell);
697  break;
698  }
699  }
700  }
701  }
702  if ( !pShell )
703  {
704  // This doesn't make sense without a Shell and thus without a client, because
705  // the communication about size changes is implemented by these components.
706  // Because we don't have a Shell we remember this unfortunate situation
707  // in the document,
708  // which is made up for later on when creating the first Shell.
709  mbOLEPrtNotifyPending = true;
710  if ( bAll )
711  mbAllOLENotify = true;
712  }
713  else
714  {
715  if ( mbAllOLENotify )
716  bAll = true;
717 
718  mbOLEPrtNotifyPending = mbAllOLENotify = false;
719 
720  std::unique_ptr<SwOLENodes> pNodes = SwContentNode::CreateOLENodesArray( *GetDfltGrfFormatColl(), !bAll );
721  if ( pNodes )
722  {
723  ::StartProgress( STR_STATSTR_SWGPRTOLENOTIFY,
724  0, pNodes->size(), GetDocShell());
725  getIDocumentLayoutAccess().GetCurrentLayout()->StartAllAction();
726 
727  for( SwOLENodes::size_type i = 0; i < pNodes->size(); ++i )
728  {
729  ::SetProgressState( i, GetDocShell() );
730 
731  SwOLENode* pOLENd = (*pNodes)[i];
732  pOLENd->SetOLESizeInvalid( false );
733 
734  // At first load the Infos and see if it's not already in the exclude list.
736 
737  svt::EmbeddedObjectRef& xObj = pOLENd->GetOLEObj().GetObject();
738  if ( xObj.is() )
739  aName = SvGlobalName( xObj->getClassID() );
740  else // Not yet loaded
741  {
742  // TODO/LATER: retrieve ClassID of an unloaded object
743  // aName = ????
744  }
745 
746  bool bFound = false;
747  for ( std::vector<SvGlobalName>::size_type j = 0;
748  j < pGlobalOLEExcludeList->size() && !bFound;
749  ++j )
750  {
751  bFound = (*pGlobalOLEExcludeList)[j] == aName;
752  }
753  if ( bFound )
754  continue;
755 
756  // We don't know it, so the object has to be loaded.
757  // If it doesn't want to be informed
758  if ( xObj.is() )
759  {
760  pGlobalOLEExcludeList->push_back( aName );
761  }
762  }
763  pNodes.reset();
764  getIDocumentLayoutAccess().GetCurrentLayout()->EndAllAction();
765  ::EndProgress( GetDocShell() );
766  }
767  }
768 }
769 
770 IMPL_LINK_NOARG( SwDoc, DoUpdateModifiedOLE, Timer *, void )
771 {
772  SwFEShell* pSh = static_cast<SwFEShell*>(GetEditShell());
773  if( pSh )
774  {
775  mbOLEPrtNotifyPending = mbAllOLENotify = false;
776 
777  std::unique_ptr<SwOLENodes> pNodes = SwContentNode::CreateOLENodesArray( *GetDfltGrfFormatColl(), true );
778  if( pNodes )
779  {
780  ::StartProgress( STR_STATSTR_SWGPRTOLENOTIFY,
781  0, pNodes->size(), GetDocShell());
782  getIDocumentLayoutAccess().GetCurrentLayout()->StartAllAction();
783  SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
784 
785  for( SwOLENodes::size_type i = 0; i < pNodes->size(); ++i )
786  {
787  ::SetProgressState( i, GetDocShell() );
788 
789  SwOLENode* pOLENd = (*pNodes)[i];
790  pOLENd->SetOLESizeInvalid( false );
791 
792  // We don't know it, so the object has to be loaded.
793  // If it doesn't want to be informed
794  if( pOLENd->GetOLEObj().GetOleRef().is() ) // Broken?
795  {
796  pOLENd->ModifyNotification( &aMsgHint, &aMsgHint );
797  }
798  }
799  getIDocumentLayoutAccess().GetCurrentLayout()->EndAllAction();
800  ::EndProgress( GetDocShell() );
801  }
802  }
803 }
804 
805 static SwPageDesc* lcl_FindPageDesc( const SwPageDescs *pPageDescs,
806  size_t *pPos, const OUString &rName )
807 {
808  SwPageDesc* res = nullptr;
809  SwPageDescs::const_iterator it = pPageDescs->find( rName );
810  if( it != pPageDescs->end() )
811  {
812  res = *it;
813  if( pPos )
814  *pPos = std::distance( pPageDescs->begin(), it );
815  }
816  else if( pPos )
817  *pPos = SIZE_MAX;
818  return res;
819 }
820 
821 SwPageDesc* SwDoc::FindPageDesc( const OUString & rName, size_t* pPos ) const
822 {
823  return lcl_FindPageDesc( &m_PageDescs, pPos, rName );
824 }
825 
826 bool SwDoc::ContainsPageDesc( const SwPageDesc *pDesc, size_t* pPos ) const
827 {
828  if( pDesc == nullptr )
829  return false;
830  if( !m_PageDescs.contains( const_cast <SwPageDesc*>( pDesc ) ) ) {
831  if( pPos )
832  *pPos = SIZE_MAX;
833  return false;
834  }
835  if( ! pPos )
836  return true;
837 
839  &m_PageDescs, pPos, pDesc->GetName() );
840  SAL_WARN_IF( desc != pDesc, "sw", "SwPageDescs container is broken!" );
841  return true;
842 }
843 
844 void SwDoc::DelPageDesc( const OUString & rName, bool bBroadcast )
845 {
846  size_t nI;
847 
848  if (FindPageDesc(rName, &nI))
849  DelPageDesc(nI, bBroadcast);
850 }
851 
852 void SwDoc::ChgPageDesc( const OUString & rName, const SwPageDesc & rDesc)
853 {
854  size_t nI;
855 
856  if (FindPageDesc(rName, &nI))
857  ChgPageDesc(nI, rDesc);
858 }
859 
860 /*
861  * The HTML import cannot resist changing the page descriptions, I don't
862  * know why. This function is meant to check the page descriptors for invalid
863  * values.
864  */
866 {
867  for ( size_t i = 0; i < GetPageDescCnt(); ++i )
868  {
869  SwPageDesc& rDesc = GetPageDesc( i );
870 
871  SwFrameFormat& rMaster = rDesc.GetMaster();
872  SwFrameFormat& rLeft = rDesc.GetLeft();
873 
874  const SwFormatFrameSize& rMasterSize = rMaster.GetFrameSize();
875  const SwFormatFrameSize& rLeftSize = rLeft.GetFrameSize();
876 
877  const bool bSetSize = INVALID_TWIPS == rMasterSize.GetWidth() ||
878  INVALID_TWIPS == rMasterSize.GetHeight() ||
879  INVALID_TWIPS == rLeftSize.GetWidth() ||
880  INVALID_TWIPS == rLeftSize.GetHeight();
881 
882  if ( bSetSize )
883  lcl_DefaultPageFormat( rDesc.GetPoolFormatId(), rDesc.GetMaster(), rDesc.GetLeft(), rDesc.GetFirstMaster(), rDesc.GetFirstLeft() );
884  }
885 }
886 
887 void SwDoc::SetDefaultPageMode(bool bSquaredPageMode)
888 {
889  if( !bSquaredPageMode == !IsSquaredPageMode() )
890  return;
891 
892  const SwTextGridItem& rGrid = GetDefault( RES_TEXTGRID );
893  SwTextGridItem aNewGrid = rGrid;
894  aNewGrid.SetSquaredMode(bSquaredPageMode);
895  aNewGrid.Init();
896  SetDefault(aNewGrid);
897 
898  for ( size_t i = 0; i < GetPageDescCnt(); ++i )
899  {
900  SwPageDesc& rDesc = GetPageDesc( i );
901 
902  SwFrameFormat& rMaster = rDesc.GetMaster();
903  SwFrameFormat& rLeft = rDesc.GetLeft();
904 
905  SwTextGridItem aGrid(rMaster.GetFormatAttr(RES_TEXTGRID));
906  aGrid.SwitchPaperMode( bSquaredPageMode );
907  rMaster.SetFormatAttr(aGrid);
908  rLeft.SetFormatAttr(aGrid);
909  }
910 }
911 
913 {
914  const SwTextGridItem& rGrid = GetDefault( RES_TEXTGRID );
915  return rGrid.IsSquaredMode();
916 }
917 
918 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxNumType GetNumberingType() const
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:682
Starts a section of nodes in the document model.
Definition: node.hxx:303
static void lcl_DescSetAttr(const SwFrameFormat &rSource, SwFrameFormat &rDest, const bool bPage=true)
Definition: docdesc.cxx:131
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
bool UndoWasEnabled() const
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN)
static std::unique_ptr< SwOLENodes > CreateOLENodesArray(const SwFormatColl &rColl, bool bOnlyWithInvalidSize)
Definition: node.cxx:2040
bool ContainsPageDesc(const SwPageDesc *pDesc, size_t *pPos) const
Definition: docdesc.cxx:826
SfxHintId
constexpr TypedWhichId< SwHeaderAndFooterEatSpacingItem > RES_HEADER_FOOTER_EAT_SPACING(121)
static void lcl_DefaultPageFormat(sal_uInt16 nPoolFormatId, SwFrameFormat &rFormat1, SwFrameFormat &rFormat2, SwFrameFormat &rFormat3, SwFrameFormat &rFormat4)
Definition: docdesc.cxx:65
const_iterator end() const
Definition: pagedesc.hxx:435
const_iterator begin() const
Definition: pagedesc.hxx:434
SwFrameFormat & GetLeft()
Definition: pagedesc.hxx:218
virtual void ModifyNotification(const SfxPoolItem *pOld, const SfxPoolItem *pNew) override
Definition: node.hxx:475
#define SID_ATTR_PAGE_COLUMN
Definition: cmdid.h:851
void SetPoolHelpId(sal_uInt16 nId)
Definition: format.hxx:148
const SwOLEObj & GetOLEObj() const
Definition: ndole.hxx:112
const SwFormatHeader & GetHeader(bool=true) const
Definition: fmthdft.hxx:97
const_iterator find(const OUString &name) const
Definition: pagedesc.hxx:428
void SetPoolHelpId(sal_uInt16 const nId)
Definition: pagedesc.hxx:257
constexpr TypedWhichId< SwFormatCol > RES_COL(109)
void CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader &rHead, SwPageDesc &pDesc, bool bLeft, bool bFirst)
Definition: docdesc.cxx:234
void DelPageDesc(const OUString &rName, bool bBroadcast=false)
Definition: docdesc.cxx:844
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
sal_uInt16 char char * pDesc
long GetWidth() const
constexpr TypedWhichId< SwUpdateAttr > RES_UPDATE_ATTR(165)
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
SwFrameFormat & GetFirstMaster()
Definition: pagedesc.hxx:219
css::uno::Reference< css::embed::XEmbeddedObject > const & GetOleRef()
Definition: ndole.cxx:912
sal_Int64 n
Definition: doc.hxx:186
sal_Int16 nId
SwNode & GetNode() const
Definition: ndindex.hxx:119
Content, content of frame (header, footer, fly).
Definition: fmtcntnt.hxx:31
void EndProgress(SwDocShell const *pDocShell)
Definition: mainwn.cxx:92
SvxFrameDirection
void Invalidate(sal_uInt16 nId)
#define INVALID_TWIPS
Definition: swtypes.hxx:52
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
UseOnPage GetUseOn() const
Definition: pagedesc.hxx:332
const OUString & GetName() const
Definition: pagedesc.hxx:187
bool IsActive() const
Definition: fmthdft.hxx:89
std::vector< SvGlobalName > * pGlobalOLEExcludeList
Definition: init.cxx:439
void SetSquaredMode(bool bNew)
Definition: tgrditem.hxx:106
const SwPageFootnoteInfo & GetFootnoteInfo() const
Definition: pagedesc.hxx:196
void SetLeft(const long nL, const sal_uInt16 nProp=100)
void StartProgress(const char *pMessResId, long nStartValue, long nEndValue, SwDocShell *pDocShell)
Definition: mainwn.cxx:52
void SetPoolFormatId(sal_uInt16 nId)
Definition: format.hxx:144
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
Definition: pagedesc.hxx:254
void PrtOLENotify(bool bAll)
Definition: docdesc.cxx:685
ByPos::const_iterator const_iterator
Definition: pagedesc.hxx:410
IMPL_LINK_NOARG(SwDoc, DoUpdateModifiedOLE, Timer *, void)
Definition: docdesc.cxx:770
svt::EmbeddedObjectRef & GetObject()
Definition: ndole.cxx:964
static bool IsFuzzing()
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:64
void SetPoolHlpFileId(sal_uInt8 nId)
Definition: format.hxx:150
bool IsSquaredMode() const
Definition: tgrditem.hxx:104
void SetPoolHlpFileId(sal_uInt8 const nId)
Definition: pagedesc.hxx:259
const OUString & GetNumStr() const
Definition: fmtftn.hxx:71
SfxStyleFamily
size_type size() const
sal_uInt16 GetPoolFormatId() const
Get and set Pool style IDs.
Definition: format.hxx:143
void SetProgressState(long nPosition, SwDocShell const *pDocShell)
Definition: mainwn.cxx:82
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
Definition: docdesc.cxx:821
static Size GetDefaultPaperSize(MapUnit eUnit=MapUnit::MapTwip)
void SetNumber(sal_uInt16 nNumber, sal_uInt16 nNumberRLHidden, const OUString &sNumStr)
Definition: atrftn.cxx:357
bool IsHeaderShared() const
Definition: pagedesc.hxx:298
void CheckDefaultPageFormat()
The html import sometimes overwrites the page sizes set in the page descriptions. ...
Definition: docdesc.cxx:865
void SetRight(const long nR, const sal_uInt16 nProp=100)
Style of a layout element.
Definition: frmfmt.hxx:57
SfxBindings * GetBindings() const
int i
const SwFrameFormat * GetFooterFormat() const
Definition: fmthdft.hxx:85
bool GetLandscape() const
Definition: pagedesc.hxx:190
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
Definition: docdesc.cxx:638
sal_uInt16 GetNumberRLHidden() const
Definition: fmtftn.hxx:73
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
sal_uInt8 GetPoolHlpFileId() const
Definition: format.hxx:149
const SwFormatFooter & GetFooter(bool=true) const
Definition: fmthdft.hxx:99
virtual void CallSwClientNotify(const SfxHint &rHint) const
Definition: calbck.cxx:369
const SwTextFormatColl * GetRegisterFormatColl() const
retrieve the style for the grid alignment
Definition: pagedesc.cxx:204
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
Definition: docdesc.cxx:852
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
Definition: format.cxx:396
Marks a node in the document model.
Definition: ndindex.hxx:31
bool IsFooterShared() const
Definition: pagedesc.hxx:302
ring_container GetRingContainer()
Definition: ring.hxx:240
void CopyMasterFooter(const SwPageDesc &rChged, const SwFormatFooter &rFoot, SwPageDesc &pDesc, bool bLeft, bool bFirst)
Definition: docdesc.cxx:307
void SetPoolFormatId(sal_uInt16 const nId)
Definition: pagedesc.hxx:255
void SetDefaultPageMode(bool bSquaredPageMode)
Definition: docdesc.cxx:887
const SwFormatFootnote & GetFootnote() const
Definition: txatbase.hxx:200
#define CM_1
Frame cannot be moved in Var-direction.
const SwPageDesc * GetFollow() const
Definition: pagedesc.hxx:246
const SwNodeIndex * GetContentIdx() const
Definition: fmtcntnt.hxx:46
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:458
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:217
void Broadcast(const SfxHint &rHint)
virtual bool ResetFormatAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
Definition: format.cxx:650
constexpr TypedWhichId< SwTextGridItem > RES_TEXTGRID(115)
bool IsSquaredPageMode() const
Definition: docdesc.cxx:912
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
sal_uInt16 GetPoolHelpId() const
Get and set Help-IDs for document templates.
Definition: format.hxx:147
#define SAL_WARN_IF(condition, area, stream)
static SwPageDesc * lcl_FindPageDesc(const SwPageDescs *pPageDescs, size_t *pPos, const OUString &rName)
Definition: docdesc.cxx:805
void SwitchPaperMode(bool bNew)
Definition: atrfrm.cxx:2343
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
SwFrameFormat & GetFirstLeft()
Definition: pagedesc.hxx:220
OUString aName
LanguageType GetAppLanguage()
Definition: init.cxx:729
SwPageDesc * m_pFollow
Definition: pagedesc.hxx:154
void SetSize(const Size &rSize)
bool SetName(const OUString &rNewName)
Definition: pagedesc.cxx:129
const SfxPoolItem & GetFormatAttr(sal_uInt16 nWhich, bool bInParents=true) const
If bInParents is FALSE, search only in this format for attribute.
Definition: format.cxx:377
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:33
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
const SwFormatContent & GetContent(bool=true) const
Definition: fmtcntnt.hxx:55
SvxFrameDirection GetDefaultFrameDirection(LanguageType nLanguage)
Return the AutoCollection by its Id.
Definition: poolfmt.cxx:77
void SetOLESizeInvalid(bool b)
Definition: ndole.hxx:134
SfxDispatcher * GetDispatcher() const
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
bool IsFirstShared() const
Definition: pagedesc.cxx:376
bool IsActive() const
Definition: fmthdft.hxx:58
std::vector< SwTextFootnote * >::size_type size_type
void PreDelPageDesc(SwPageDesc const *pDel)
All descriptors whose Follow point to the to-be-deleted have to be adapted.
Definition: docdesc.cxx:553
sal_uInt16 GetMetricVal(int n)
long GetHeight() const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
sal_uInt16 GetNumber() const
Definition: fmtftn.hxx:72
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(107)
void BroadcastStyleOperation(const OUString &rName, SfxStyleFamily eFamily, SfxHintId nOp)
Definition: docdesc.cxx:596
static SwPageDesc * FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
Definition: htmlcss1.cxx:1327
const SwFrameFormat * GetHeaderFormat() const
Definition: fmthdft.hxx:54
sal_uInt16 nPos
const LocaleDataWrapper & GetLocaleData()
static SwStartNode * MakeEmptySection(const SwNodeIndex &rIdx, SwStartNodeType=SwNormalStartNode)
Create an empty section of Start- and EndNote.
Definition: nodes.cxx:1869
const SvxNumberType & GetNumType() const
Definition: pagedesc.hxx:193