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 
76  SwFormatFrameSize aFrameSize( ATT_FIX_SIZE );
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  pPool->SetSearchMask(eFamily);
606  SfxStyleSheetBase * pBase = pPool->Find(rName);
607 
608  if (pBase != nullptr)
609  pPool->Broadcast(SfxStyleSheetHint( nOp, *pBase ));
610  }
611  }
612 }
613 
614 void SwDoc::DelPageDesc( size_t i, bool bBroadcast )
615 {
616  OSL_ENSURE(i < m_PageDescs.size(), "PageDescs is out of range.");
617  OSL_ENSURE( i != 0, "You cannot delete the default Pagedesc.");
618  if ( i == 0 )
619  return;
620 
621  SwPageDesc &rDel = *m_PageDescs[i];
622 
623  if (bBroadcast)
624  BroadcastStyleOperation(rDel.GetName(), SfxStyleFamily::Page,
625  SfxHintId::StyleSheetErased);
626 
627  if (GetIDocumentUndoRedo().DoesUndo())
628  {
629  GetIDocumentUndoRedo().AppendUndo(
630  std::make_unique<SwUndoPageDescDelete>(rDel, this));
631  }
632 
633  PreDelPageDesc(&rDel); // #i7983#
634 
635  m_PageDescs.erase(m_PageDescs.begin() + i);
636  getIDocumentState().SetModified();
637 }
638 
639 SwPageDesc* SwDoc::MakePageDesc(const OUString &rName, const SwPageDesc *pCpy,
640  bool bRegardLanguage, bool bBroadcast)
641 {
642  SwPageDesc *pNew;
643  if( pCpy )
644  {
645  pNew = new SwPageDesc( *pCpy );
646  pNew->SetName( rName );
647  if( rName != pCpy->GetName() )
648  {
649  pNew->SetPoolFormatId( USHRT_MAX );
650  pNew->SetPoolHelpId( USHRT_MAX );
651  pNew->SetPoolHlpFileId( UCHAR_MAX );
652  }
653  }
654  else
655  {
656  pNew = new SwPageDesc( rName, GetDfltFrameFormat(), this );
657  // Set the default page format.
658  lcl_DefaultPageFormat( USHRT_MAX, pNew->GetMaster(), pNew->GetLeft(), pNew->GetFirstMaster(), pNew->GetFirstLeft() );
659 
660  SvxFrameDirection aFrameDirection = bRegardLanguage ?
662  : SvxFrameDirection::Horizontal_LR_TB;
663 
664  pNew->GetMaster().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
665  pNew->GetLeft().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
666  pNew->GetFirstMaster().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
667  pNew->GetFirstLeft().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
668  }
669 
670  std::pair<SwPageDescs::const_iterator, bool> res = m_PageDescs.push_back( pNew );
671  SAL_WARN_IF(!res.second, "sw", "MakePageDesc called with existing name" );
672 
673  if (bBroadcast)
674  BroadcastStyleOperation(rName, SfxStyleFamily::Page,
675  SfxHintId::StyleSheetCreated);
676 
677  if (GetIDocumentUndoRedo().DoesUndo())
678  {
679  GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoPageDescCreate>(pNew, this));
680  }
681 
682  getIDocumentState().SetModified();
683  return pNew;
684 }
685 
686 void SwDoc::PrtOLENotify( bool bAll )
687 {
688  SwFEShell *pShell = nullptr;
689  {
690  SwViewShell *pSh = getIDocumentLayoutAccess().GetCurrentViewShell();
691  if ( pSh )
692  {
693  for(SwViewShell& rShell : pSh->GetRingContainer())
694  {
695  if(dynamic_cast<const SwFEShell*>( &rShell) != nullptr)
696  {
697  pShell = static_cast<SwFEShell*>(&rShell);
698  break;
699  }
700  }
701  }
702  }
703  if ( !pShell )
704  {
705  // This doesn't make sense without a Shell and thus without a client, because
706  // the communication about size changes is implemented by these components.
707  // Because we don't have a Shell we remember this unfortunate situation
708  // in the document,
709  // which is made up for later on when creating the first Shell.
710  mbOLEPrtNotifyPending = true;
711  if ( bAll )
712  mbAllOLENotify = true;
713  }
714  else
715  {
716  if ( mbAllOLENotify )
717  bAll = true;
718 
719  mbOLEPrtNotifyPending = mbAllOLENotify = false;
720 
721  std::unique_ptr<SwOLENodes> pNodes = SwContentNode::CreateOLENodesArray( *GetDfltGrfFormatColl(), !bAll );
722  if ( pNodes )
723  {
724  ::StartProgress( STR_STATSTR_SWGPRTOLENOTIFY,
725  0, pNodes->size(), GetDocShell());
726  getIDocumentLayoutAccess().GetCurrentLayout()->StartAllAction();
727 
728  for( SwOLENodes::size_type i = 0; i < pNodes->size(); ++i )
729  {
730  ::SetProgressState( i, GetDocShell() );
731 
732  SwOLENode* pOLENd = (*pNodes)[i];
733  pOLENd->SetOLESizeInvalid( false );
734 
735  // At first load the Infos and see if it's not already in the exclude list.
737 
738  svt::EmbeddedObjectRef& xObj = pOLENd->GetOLEObj().GetObject();
739  if ( xObj.is() )
740  aName = SvGlobalName( xObj->getClassID() );
741  else // Not yet loaded
742  {
743  // TODO/LATER: retrieve ClassID of an unloaded object
744  // aName = ????
745  }
746 
747  bool bFound = false;
748  for ( std::vector<SvGlobalName>::size_type j = 0;
749  j < pGlobalOLEExcludeList->size() && !bFound;
750  ++j )
751  {
752  bFound = (*pGlobalOLEExcludeList)[j] == aName;
753  }
754  if ( bFound )
755  continue;
756 
757  // We don't know it, so the object has to be loaded.
758  // If it doesn't want to be informed
759  if ( xObj.is() )
760  {
761  pGlobalOLEExcludeList->push_back( aName );
762  }
763  }
764  pNodes.reset();
765  getIDocumentLayoutAccess().GetCurrentLayout()->EndAllAction();
766  ::EndProgress( GetDocShell() );
767  }
768  }
769 }
770 
771 IMPL_LINK_NOARG( SwDoc, DoUpdateModifiedOLE, Timer *, void )
772 {
773  SwFEShell* pSh = static_cast<SwFEShell*>(GetEditShell());
774  if( pSh )
775  {
776  mbOLEPrtNotifyPending = mbAllOLENotify = false;
777 
778  std::unique_ptr<SwOLENodes> pNodes = SwContentNode::CreateOLENodesArray( *GetDfltGrfFormatColl(), true );
779  if( pNodes )
780  {
781  ::StartProgress( STR_STATSTR_SWGPRTOLENOTIFY,
782  0, pNodes->size(), GetDocShell());
783  getIDocumentLayoutAccess().GetCurrentLayout()->StartAllAction();
784  SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
785 
786  for( SwOLENodes::size_type i = 0; i < pNodes->size(); ++i )
787  {
788  ::SetProgressState( i, GetDocShell() );
789 
790  SwOLENode* pOLENd = (*pNodes)[i];
791  pOLENd->SetOLESizeInvalid( false );
792 
793  // We don't know it, so the object has to be loaded.
794  // If it doesn't want to be informed
795  if( pOLENd->GetOLEObj().GetOleRef().is() ) // Broken?
796  {
797  pOLENd->ModifyNotification( &aMsgHint, &aMsgHint );
798  }
799  }
800  getIDocumentLayoutAccess().GetCurrentLayout()->EndAllAction();
801  ::EndProgress( GetDocShell() );
802  }
803  }
804 }
805 
806 static SwPageDesc* lcl_FindPageDesc( const SwPageDescs *pPageDescs,
807  size_t *pPos, const OUString &rName )
808 {
809  SwPageDesc* res = nullptr;
810  SwPageDescs::const_iterator it = pPageDescs->find( rName );
811  if( it != pPageDescs->end() )
812  {
813  res = *it;
814  if( pPos )
815  *pPos = std::distance( pPageDescs->begin(), it );
816  }
817  else if( pPos )
818  *pPos = SIZE_MAX;
819  return res;
820 }
821 
822 SwPageDesc* SwDoc::FindPageDesc( const OUString & rName, size_t* pPos ) const
823 {
824  return lcl_FindPageDesc( &m_PageDescs, pPos, rName );
825 }
826 
827 bool SwDoc::ContainsPageDesc( const SwPageDesc *pDesc, size_t* pPos ) const
828 {
829  if( pDesc == nullptr )
830  return false;
831  if( !m_PageDescs.contains( const_cast <SwPageDesc*>( pDesc ) ) ) {
832  if( pPos )
833  *pPos = SIZE_MAX;
834  return false;
835  }
836  if( ! pPos )
837  return true;
838 
840  &m_PageDescs, pPos, pDesc->GetName() );
841  SAL_WARN_IF( desc != pDesc, "sw", "SwPageDescs container is broken!" );
842  return true;
843 }
844 
845 void SwDoc::DelPageDesc( const OUString & rName, bool bBroadcast )
846 {
847  size_t nI;
848 
849  if (FindPageDesc(rName, &nI))
850  DelPageDesc(nI, bBroadcast);
851 }
852 
853 void SwDoc::ChgPageDesc( const OUString & rName, const SwPageDesc & rDesc)
854 {
855  size_t nI;
856 
857  if (FindPageDesc(rName, &nI))
858  ChgPageDesc(nI, rDesc);
859 }
860 
861 /*
862  * The HTML import cannot resist changing the page descriptions, I don't
863  * know why. This function is meant to check the page descriptors for invalid
864  * values.
865  */
867 {
868  for ( size_t i = 0; i < GetPageDescCnt(); ++i )
869  {
870  SwPageDesc& rDesc = GetPageDesc( i );
871 
872  SwFrameFormat& rMaster = rDesc.GetMaster();
873  SwFrameFormat& rLeft = rDesc.GetLeft();
874 
875  const SwFormatFrameSize& rMasterSize = rMaster.GetFrameSize();
876  const SwFormatFrameSize& rLeftSize = rLeft.GetFrameSize();
877 
878  const bool bSetSize = INVALID_TWIPS == rMasterSize.GetWidth() ||
879  INVALID_TWIPS == rMasterSize.GetHeight() ||
880  INVALID_TWIPS == rLeftSize.GetWidth() ||
881  INVALID_TWIPS == rLeftSize.GetHeight();
882 
883  if ( bSetSize )
884  lcl_DefaultPageFormat( rDesc.GetPoolFormatId(), rDesc.GetMaster(), rDesc.GetLeft(), rDesc.GetFirstMaster(), rDesc.GetFirstLeft() );
885  }
886 }
887 
888 void SwDoc::SetDefaultPageMode(bool bSquaredPageMode)
889 {
890  if( !bSquaredPageMode == !IsSquaredPageMode() )
891  return;
892 
893  const SwTextGridItem& rGrid = GetDefault( RES_TEXTGRID );
894  SwTextGridItem aNewGrid = rGrid;
895  aNewGrid.SetSquaredMode(bSquaredPageMode);
896  aNewGrid.Init();
897  SetDefault(aNewGrid);
898 
899  for ( size_t i = 0; i < GetPageDescCnt(); ++i )
900  {
901  SwPageDesc& rDesc = GetPageDesc( i );
902 
903  SwFrameFormat& rMaster = rDesc.GetMaster();
904  SwFrameFormat& rLeft = rDesc.GetLeft();
905 
906  SwTextGridItem aGrid(rMaster.GetFormatAttr(RES_TEXTGRID));
907  aGrid.SwitchPaperMode( bSquaredPageMode );
908  rMaster.SetFormatAttr(aGrid);
909  rLeft.SetFormatAttr(aGrid);
910  }
911 }
912 
914 {
915  const SwTextGridItem& rGrid = GetDefault( RES_TEXTGRID );
916  return rGrid.IsSquaredMode();
917 }
918 
919 /* 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
bool UndoWasEnabled() const
static std::unique_ptr< SwOLENodes > CreateOLENodesArray(const SwFormatColl &rColl, bool bOnlyWithInvalidSize)
Definition: node.cxx:2026
bool ContainsPageDesc(const SwPageDesc *pDesc, size_t *pPos) const
Definition: docdesc.cxx:827
#define RES_FRM_SIZE
Definition: hintids.hxx:196
SfxHintId
#define RES_COL
Definition: hintids.hxx:216
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:433
const_iterator begin() const
Definition: pagedesc.hxx:432
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:838
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:426
void SetPoolHelpId(sal_uInt16 const nId)
Definition: pagedesc.hxx:257
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:845
long GetWidth() const
#define RES_SHADOW
Definition: hintids.hxx:214
#define RES_FRAMEDIR
Definition: hintids.hxx:227
SwFrameFormat & GetFirstMaster()
Definition: pagedesc.hxx:219
css::uno::Reference< css::embed::XEmbeddedObject > const & GetOleRef()
Definition: ndole.cxx:913
Definition: doc.hxx:185
sal_uInt16 sal_Char sal_Char * pDesc
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:88
SvxFrameDirection
void Invalidate(sal_uInt16 nId)
Frame cannot be moved in Var-direction.
Definition: fmtfsize.hxx:38
#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
#define RES_UNKNOWNATR_CONTAINER
Definition: hintids.hxx:269
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
#define RES_UPDATE_ATTR
Definition: hintids.hxx:291
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:48
#define XATTR_FILL_LAST
void SetPoolFormatId(sal_uInt16 nId)
Definition: format.hxx:144
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
Definition: pagedesc.hxx:254
#define XATTR_FILL_FIRST
void PrtOLENotify(bool bAll)
Definition: docdesc.cxx:686
ByPos::const_iterator const_iterator
Definition: pagedesc.hxx:408
IMPL_LINK_NOARG(SwDoc, DoUpdateModifiedOLE, Timer *, void)
Definition: docdesc.cxx:771
svt::EmbeddedObjectRef & GetObject()
Definition: ndole.cxx:965
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
#define RES_PAPER_BIN
Definition: hintids.hxx:197
bool IsSquaredMode() const
Definition: tgrditem.hxx:104
#define RES_UL_SPACE
Definition: hintids.hxx:199
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:78
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
Definition: docdesc.cxx:822
#define RES_BACKGROUND
Definition: hintids.hxx:212
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:866
void SetRight(const long nR, const sal_uInt16 nProp=100)
Style of a layout element.
Definition: frmfmt.hxx:57
SfxBindings * GetBindings() const
const SwFrameFormat * GetFooterFormat() const
Definition: fmthdft.hxx:85
bool GetLandscape() const
Definition: pagedesc.hxx:190
int i
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
Definition: docdesc.cxx:639
sal_uInt16 GetNumberRLHidden() const
Definition: fmtftn.hxx:73
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:853
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:888
const SwFormatFootnote & GetFootnote() const
Definition: txatbase.hxx:200
#define CM_1
#define RES_LR_SPACE
Definition: hintids.hxx:198
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
bool IsSquaredPageMode() const
Definition: docdesc.cxx:913
#define RES_TEXTGRID
Definition: hintids.hxx:222
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:806
void SwitchPaperMode(bool bNew)
Definition: atrfrm.cxx:2341
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:261
SwFrameFormat & GetFirstLeft()
Definition: pagedesc.hxx:220
#define RES_HEADER_FOOTER_EAT_SPACING
Definition: hintids.hxx:228
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
void SetSearchMask(SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
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
OString const aName
SfxDispatcher * GetDispatcher() const
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_Int32 nPos
sal_uInt16 GetNumber() const
Definition: fmtftn.hxx:72
void BroadcastStyleOperation(const OUString &rName, SfxStyleFamily eFamily, SfxHintId nOp)
Definition: docdesc.cxx:596
static SwPageDesc * FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
Definition: htmlcss1.cxx:1328
const SwFrameFormat * GetHeaderFormat() const
Definition: fmthdft.hxx:54
const LocaleDataWrapper & GetLocaleData()
static SwStartNode * MakeEmptySection(const SwNodeIndex &rIdx, SwStartNodeType=SwNormalStartNode)
Create an empty section of Start- and EndNote.
Definition: nodes.cxx:1890
const SvxNumberType & GetNumType() const
Definition: pagedesc.hxx:193