LibreOffice Module sw (master) 1
colfrm.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/ulspitem.hxx>
23#include <osl/diagnose.h>
24#include <fmtclds.hxx>
25#include <fmtfordr.hxx>
26#include <frmfmt.hxx>
27#include <frmatr.hxx>
28#include <frmtool.hxx>
29#include <colfrm.hxx>
30#include <pagefrm.hxx>
31#include <bodyfrm.hxx>
32#include <rootfrm.hxx>
33#include <sectfrm.hxx>
34#include <calbck.hxx>
35#include <ftnfrm.hxx>
36#include <IDocumentState.hxx>
38#include <IDocumentUndoRedo.hxx>
39
41 SwFootnoteBossFrame( pFormat, pSib )
42{
44 SwBodyFrame* pColBody = new SwBodyFrame( pFormat->GetDoc()->GetDfltFrameFormat(), pSib );
45 pColBody->InsertBehind( this, nullptr ); // ColumnFrames now with BodyFrame
47}
48
50{
51 SwFrameFormat *pFormat = GetFormat();
52 SwDoc *pDoc;
53 if ( !(pDoc = pFormat->GetDoc())->IsInDtor() && pFormat->HasOnlyOneListener() )
54 {
55 //I'm the only one, delete the format.
56 //Get default format before, so the base class can cope with it.
57 pDoc->GetDfltFrameFormat()->Add( this );
58 // tdf#134009, like #i32968# avoid SwUndoFrameFormatDelete creation,
59 // the format is owned by the SwColumnFrame, see lcl_AddColumns()
60 ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
61 pDoc->DelFrameFormat( pFormat );
62 }
63
65}
66
68{
69}
70
72{
73 (void)xmlTextWriterStartElement(writer, reinterpret_cast<const xmlChar*>("column"));
74 dumpAsXmlAttributes(writer);
75
76 (void)xmlTextWriterStartElement(writer, BAD_CAST("infos"));
77 dumpInfosAsXml(writer);
78 (void)xmlTextWriterEndElement(writer);
79 dumpChildrenAsXml(writer);
80
81 (void)xmlTextWriterEndElement(writer);
82}
83
84static void lcl_RemoveColumns( SwLayoutFrame *pCont, sal_uInt16 nCnt )
85{
86 OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrame(),
87 "no columns to remove." );
88
89 SwColumnFrame *pColumn = static_cast<SwColumnFrame*>(pCont->Lower());
90 sw_RemoveFootnotes( pColumn, true, true );
91 while ( pColumn->GetNext() )
92 {
93 OSL_ENSURE( pColumn->GetNext()->IsColumnFrame(),
94 "neighbor of ColumnFrame is no ColumnFrame." );
95 pColumn = static_cast<SwColumnFrame*>(pColumn->GetNext());
96 }
97 for ( sal_uInt16 i = 0; i < nCnt; ++i )
98 {
99 SwColumnFrame *pTmp = static_cast<SwColumnFrame*>(pColumn->GetPrev());
100 pColumn->Cut();
101 SwFrame::DestroyFrame(pColumn); //format is going to be destroyed in the DTor if needed.
102 pColumn = pTmp;
103 }
104}
105
106static SwLayoutFrame * lcl_FindColumns( SwLayoutFrame *pLay, sal_uInt16 nCount )
107{
108 SwFrame *pCol = pLay->Lower();
109 if ( pLay->IsPageFrame() )
110 pCol = static_cast<SwPageFrame*>(pLay)->FindBodyCont()->Lower();
111
112 if ( pCol && pCol->IsColumnFrame() )
113 {
114 SwFrame *pTmp = pCol;
115 sal_uInt16 i;
116 for ( i = 0; pTmp; pTmp = pTmp->GetNext(), ++i )
117 /* do nothing */;
118 return i == nCount ? static_cast<SwLayoutFrame*>(pCol) : nullptr;
119 }
120 return nullptr;
121}
122
123static bool lcl_AddColumns( SwLayoutFrame *pCont, sal_uInt16 nCount )
124{
125 SwDoc *pDoc = pCont->GetFormat()->GetDoc();
126 const bool bMod = pDoc->getIDocumentState().IsModified();
127
128 //Formats should be shared whenever possible. If a neighbour already has
129 //the same column settings we can add them to the same format.
130 //The neighbour can be searched using the format, however the owner of the
131 //attribute depends on the frame type.
132 SwLayoutFrame *pAttrOwner = pCont;
133 if ( pCont->IsBodyFrame() )
134 pAttrOwner = pCont->FindPageFrame();
135 SwLayoutFrame *pNeighbourCol = nullptr;
136 SwIterator<SwLayoutFrame,SwFormat> aIter( *pAttrOwner->GetFormat() );
137 SwLayoutFrame *pNeighbour = aIter.First();
138
139 sal_uInt16 nAdd = 0;
140 SwFrame *pCol = pCont->Lower();
141 if ( pCol && pCol->IsColumnFrame() )
142 for ( nAdd = 1; pCol; pCol = pCol->GetNext(), ++nAdd )
143 /* do nothing */;
144 while ( pNeighbour )
145 {
146 if ( nullptr != (pNeighbourCol = lcl_FindColumns( pNeighbour, nCount+nAdd )) &&
147 pNeighbourCol != pCont )
148 break;
149 pNeighbourCol = nullptr;
150 pNeighbour = aIter.Next();
151 }
152
153 bool bRet;
154 SwTwips nMax = pCont->IsPageBodyFrame() ?
156 if ( pNeighbourCol )
157 {
158 bRet = false;
159 SwFrame *pTmp = pCont->Lower();
160 while ( pTmp )
161 {
162 pTmp = pTmp->GetNext();
163 pNeighbourCol = static_cast<SwLayoutFrame*>(pNeighbourCol->GetNext());
164 }
165 for ( sal_uInt16 i = 0; i < nCount; ++i )
166 {
167 SwColumnFrame *pTmpCol = new SwColumnFrame( pNeighbourCol->GetFormat(), pCont );
168 pTmpCol->SetMaxFootnoteHeight( nMax );
169 pTmpCol->InsertBefore( pCont, nullptr );
170 pNeighbourCol = static_cast<SwLayoutFrame*>(pNeighbourCol->GetNext());
171 }
172 }
173 else
174 {
175 bRet = true;
176 // tdf#103359, like #i32968# Inserting columns in the section causes MakeFrameFormat to put
177 // nCount objects of type SwUndoFrameFormat on the undo stack. We don't want them.
178 ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
179 for ( sal_uInt16 i = 0; i < nCount; ++i )
180 {
181 SwFrameFormat *pFormat = pDoc->MakeFrameFormat(OUString(), pDoc->GetDfltFrameFormat());
182 SwColumnFrame *pTmp = new SwColumnFrame( pFormat, pCont );
183 pTmp->SetMaxFootnoteHeight( nMax );
184 pTmp->Paste( pCont );
185 }
186 }
187
188 if ( !bMod )
190 return bRet;
191}
192
203void SwLayoutFrame::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
204 const bool bChgFootnote )
205{
206 if ( rOld.GetNumCols() <= 1 && rNew.GetNumCols() <= 1 && !bChgFootnote )
207 return;
208 // #i97379#
209 // If current lower is a no text frame, then columns are not allowed
210 if ( Lower() && Lower()->IsNoTextFrame() &&
211 rNew.GetNumCols() > 1 )
212 {
213 return;
214 }
215
216 sal_uInt16 nNewNum, nOldNum = 1;
217 if( Lower() && Lower()->IsColumnFrame() )
218 {
219 SwFrame* pCol = Lower();
220 while( nullptr != (pCol=pCol->GetNext()) )
221 ++nOldNum;
222 }
223 nNewNum = rNew.GetNumCols();
224 if( !nNewNum )
225 ++nNewNum;
226 bool bAtEnd;
227 if( IsSctFrame() )
228 bAtEnd = static_cast<SwSectionFrame*>(this)->IsAnyNoteAtEnd();
229 else
230 bAtEnd = false;
231
232 //Setting the column width is only needed for new formats.
233 bool bAdjustAttributes = nOldNum != rOld.GetNumCols();
234
235 //The content is saved and restored if the column count is different.
236 SwFrame *pSave = nullptr;
237 if( nOldNum != nNewNum || bChgFootnote )
238 {
239 SwDoc *pDoc = GetFormat()->GetDoc();
240 OSL_ENSURE( pDoc, "FrameFormat doesn't return a document." );
241 // SaveContent would also suck up the content of the footnote container
242 // and store it within the normal text flow.
243 if( IsPageBodyFrame() )
245 pSave = ::SaveContent( this );
246
247 //If columns exist, they get deleted if a column count of 0 or 1 is requested.
248 if ( nNewNum == 1 && !bAtEnd )
249 {
250 ::lcl_RemoveColumns( this, nOldNum );
251 if ( IsBodyFrame() )
253 else
255 if ( pSave )
256 ::RestoreContent( pSave, this, nullptr );
257 return;
258 }
259 if ( nOldNum == 1 )
260 {
261 if ( IsBodyFrame() )
263 else
265 if( !Lower() || !Lower()->IsColumnFrame() )
266 --nOldNum;
267 }
268 if ( nOldNum > nNewNum )
269 {
270 ::lcl_RemoveColumns( this, nOldNum - nNewNum );
271 bAdjustAttributes = true;
272 }
273 else if( nOldNum < nNewNum )
274 {
275 sal_uInt16 nAdd = nNewNum - nOldNum;
276 bAdjustAttributes = lcl_AddColumns( this, nAdd );
277 }
278 }
279
280 if ( !bAdjustAttributes )
281 {
282 if ( rOld.GetLineWidth() != rNew.GetLineWidth() ||
283 rOld.GetWishWidth() != rNew.GetWishWidth() ||
284 rOld.IsOrtho() != rNew.IsOrtho() )
285 bAdjustAttributes = true;
286 else
287 {
288 const size_t nCount = std::min( rNew.GetColumns().size(), rOld.GetColumns().size() );
289 for ( size_t i = 0; i < nCount; ++i )
290 if ( !(rOld.GetColumns()[i] == rNew.GetColumns()[i]) )
291 {
292 bAdjustAttributes = true;
293 break;
294 }
295 }
296 }
297
298 //The columns can now be easily adjusted.
299 AdjustColumns( &rNew, bAdjustAttributes );
300
301 //Don't restore the content before. An earlier restore would trigger useless
302 //actions during setup.
303 if ( pSave )
304 {
305 OSL_ENSURE( Lower() && Lower()->IsLayoutFrame() &&
306 static_cast<SwLayoutFrame*>(Lower())->Lower() &&
307 static_cast<SwLayoutFrame*>(Lower())->Lower()->IsLayoutFrame(),
308 "no column body." ); // ColumnFrames contain BodyFrames
309 ::RestoreContent( pSave, static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(Lower())->Lower()), nullptr );
310 }
311}
312
313void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttributes )
314{
315 if( !Lower()->GetNext() )
316 {
318 return;
319 }
320
321 const bool bVert = IsVertical();
322
324
325 //If we have a pointer or we have to configure an attribute, we set the
326 //column widths in any case. Otherwise we check if a configuration is needed.
327 if ( !pAttr )
328 {
329 pAttr = &GetFormat()->GetCol();
330 if ( !bAdjustAttributes )
331 {
332 tools::Long nAvail = (getFramePrintArea().*fnRect->fnGetWidth)();
333 for ( SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(Lower());
334 pCol;
335 pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()) )
336 nAvail -= (pCol->getFrameArea().*fnRect->fnGetWidth)();
337 if ( !nAvail )
338 return;
339 }
340 }
341
342 //The columns can now be easily adjusted.
343 //The widths get counted so we can give the reminder to the last one.
344 SwTwips nAvail = (getFramePrintArea().*fnRect->fnGetWidth)();
345 const bool bLine = pAttr->GetLineAdj() != COLADJ_NONE;
346 const sal_uInt16 nMin = bLine ? sal_uInt16( 20 + ( pAttr->GetLineWidth() / 2) ) : 0;
347
348 const bool bR2L = IsRightToLeft();
349 SwFrame *pCol = bR2L ? GetLastLower() : Lower();
350
351 // #i27399#
352 // bOrtho means we have to adjust the column frames manually. Otherwise
353 // we may use the values returned by CalcColWidth:
354 const bool bOrtho = pAttr->IsOrtho() && pAttr->GetNumCols() > 0;
355 tools::Long nGutter = 0;
356
357 for ( sal_uInt16 i = 0; i < pAttr->GetNumCols() && pCol; ++i ) //i118878, value returned by GetNumCols() can't be trusted
358 {
359 if( !bOrtho )
360 {
361 const SwTwips nWidth = i == (pAttr->GetNumCols() - 1) ?
362 nAvail :
363 pAttr->CalcColWidth( i, sal_uInt16( (getFramePrintArea().*fnRect->fnGetWidth)() ) );
364
365 const Size aColSz = bVert ?
366 Size( getFramePrintArea().Width(), nWidth ) :
367 Size( nWidth, getFramePrintArea().Height() );
368
369 pCol->ChgSize( aColSz );
370
371 // With this, the ColumnBodyFrames from page columns gets adjusted and
372 // their bFixHeight flag is set so they won't shrink/grow.
373 // Don't use the flag with frame columns because BodyFrames in frame
374 // columns can grow/shrink.
375 if( IsBodyFrame() )
376 static_cast<SwLayoutFrame*>(pCol)->Lower()->ChgSize( aColSz );
377
378 nAvail -= nWidth;
379 }
380
381 if ( bOrtho || bAdjustAttributes )
382 {
383 const SwColumn *pC = &pAttr->GetColumns()[i];
384 const SwAttrSet* pSet = pCol->GetAttrSet();
385 SvxLRSpaceItem aLR( pSet->GetLRSpace() );
386
387 //In order to have enough space for the separation lines, we have to
388 //take them into account here. Every time two columns meet we
389 //calculate a clearance of 20 + half the pen width on the left or
390 //right side, respectively.
391 const sal_uInt16 nLeft = pC->GetLeft();
392 const sal_uInt16 nRight = pC->GetRight();
393
394 aLR.SetLeft ( nLeft );
395 aLR.SetRight( nRight );
396
397 if ( bLine )
398 {
399 if ( i == 0 )
400 {
401 aLR.SetRight( std::max( nRight, nMin ) );
402 }
403 else if ( i == pAttr->GetNumCols() - 1 )
404 {
405 aLR.SetLeft ( std::max( nLeft, nMin ) );
406 }
407 else
408 {
409 aLR.SetLeft ( std::max( nLeft, nMin ) );
410 aLR.SetRight( std::max( nRight, nMin ) );
411 }
412 }
413
414 if ( bAdjustAttributes )
415 {
416 SvxULSpaceItem aUL( pSet->GetULSpace() );
417 aUL.SetUpper(0);
418 aUL.SetLower(0);
419
420 static_cast<SwLayoutFrame*>(pCol)->GetFormat()->SetFormatAttr( aLR );
421 static_cast<SwLayoutFrame*>(pCol)->GetFormat()->SetFormatAttr( aUL );
422 }
423
424 nGutter += aLR.GetLeft() + aLR.GetRight();
425 }
426
427 pCol = bR2L ? pCol->GetPrev() : pCol->GetNext();
428 }
429
430 if( !bOrtho )
431 return;
432
433 tools::Long nInnerWidth = ( nAvail - nGutter ) / pAttr->GetNumCols();
434 pCol = Lower();
435 for( sal_uInt16 i = 0; i < pAttr->GetNumCols() && pCol; pCol = pCol->GetNext(), ++i ) //i118878, value returned by GetNumCols() can't be trusted
436 {
437 SwTwips nWidth;
438 if ( i == pAttr->GetNumCols() - 1 )
439 nWidth = nAvail;
440 else
441 {
442 SvxLRSpaceItem aLR( pCol->GetAttrSet()->GetLRSpace() );
443 nWidth = nInnerWidth + aLR.GetLeft() + aLR.GetRight();
444 }
445 if( nWidth < 0 )
446 nWidth = 0;
447
448 const Size aColSz = bVert ?
449 Size( getFramePrintArea().Width(), nWidth ) :
450 Size( nWidth, getFramePrintArea().Height() );
451
452 pCol->ChgSize( aColSz );
453
454 if( IsBodyFrame() )
455 static_cast<SwLayoutFrame*>(pCol)->Lower()->ChgSize( aColSz );
456
457 nAvail -= nWidth;
458 }
459}
460
461/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual void ResetModified()=0
virtual bool IsModified() const =0
Changes of document?
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
tools::Long GetRight() const
tools::Long GetLeft() const
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
const SvxLRSpaceItem & GetLRSpace(bool=true) const
Definition: frmatr.hxx:56
const SvxULSpaceItem & GetULSpace(bool=true) const
Definition: frmatr.hxx:58
Container of body content (i.e.
Definition: bodyfrm.hxx:29
virtual void DestroyImpl() override
Definition: colfrm.cxx:49
void dumpAsXml(xmlTextWriterPtr writer=nullptr) const override
Definition: colfrm.cxx:71
SwColumnFrame(SwFrameFormat *, SwFrame *)
Definition: colfrm.cxx:40
virtual ~SwColumnFrame() override
Definition: colfrm.cxx:67
ColumnDescriptor.
Definition: fmtclds.hxx:34
sal_uInt16 GetLeft() const
Definition: fmtclds.hxx:51
sal_uInt16 GetRight() const
Definition: fmtclds.hxx:52
Definition: doc.hxx:197
SwFrameFormat * MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast=false, bool bAuto=true)
Definition: docfmt.cxx:829
IDocumentState const & getIDocumentState() const
Definition: doc.cxx:408
const SwFrameFormat * GetColumnContFormat() const
Definition: doc.hxx:766
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:158
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:419
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
Definition: docfmt.cxx:705
const SwFrameFormat * GetDfltFrameFormat() const
Definition: doc.hxx:762
SwTwips GetMaxFootnoteHeight() const
Definition: ftnboss.hxx:97
void SetMaxFootnoteHeight(const SwTwips nNewMax)
Definition: ftnboss.hxx:78
sal_uInt16 GetWishWidth() const
Definition: fmtclds.hxx:122
sal_uInt16 CalcColWidth(sal_uInt16 nCol, sal_uInt16 nAct) const
Calculates current width of column nCol.
Definition: atrfrm.cxx:991
bool IsOrtho() const
Definition: fmtclds.hxx:121
const SwColumns & GetColumns() const
Definition: fmtclds.hxx:112
sal_uLong GetLineWidth() const
Definition: fmtclds.hxx:117
sal_uInt16 GetNumCols() const
Definition: fmtclds.hxx:114
SwColLineAdj GetLineAdj() const
Definition: fmtclds.hxx:120
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:139
const SwFormatCol & GetCol(bool=true) const
Definition: fmtclds.hxx:168
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:447
const SwRect & getFramePrintArea() const
Definition: frame.hxx:180
Style of a layout element.
Definition: frmfmt.hxx:72
Base class of the Writer layout elements.
Definition: frame.hxx:315
void InsertBehind(SwLayoutFrame *pParent, SwFrame *pBefore)
Insert SwFrame into existing structure.
Definition: wsfrm.cxx:877
SwFrame * GetNext()
Definition: frame.hxx:682
bool IsPageFrame() const
Definition: frame.hxx:1184
bool IsColumnFrame() const
Definition: frame.hxx:1188
SwFrameType mnFrameType
Definition: frame.hxx:414
bool IsVertLRBT() const
Definition: frame.hxx:989
bool IsRightToLeft() const
Definition: frame.hxx:993
void InsertBefore(SwLayoutFrame *pParent, SwFrame *pBehind)
Insert SwFrame into existing structure.
Definition: wsfrm.cxx:841
bool IsPageBodyFrame() const
Definition: layfrm.hxx:215
const SwAttrSet * GetAttrSet() const
WARNING: this may not return correct RES_PAGEDESC/RES_BREAK items for SwTextFrame,...
Definition: findfrm.cxx:762
void dumpInfosAsXml(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:171
SwLayoutFrame * GetUpper()
Definition: frame.hxx:684
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:188
bool IsVertical() const
Definition: frame.hxx:979
bool IsNoTextFrame() const
Definition: frame.hxx:1244
SwFrame * GetPrev()
Definition: frame.hxx:683
bool IsSctFrame() const
Definition: frame.hxx:1220
bool IsVertLR() const
Definition: frame.hxx:985
SwPageFrame * FindPageFrame()
Definition: frame.hxx:686
virtual Size ChgSize(const Size &aNewSize)
Definition: wsfrm.cxx:742
static void DestroyFrame(SwFrame *const pFrame)
this is the only way to delete a SwFrame instance
Definition: ssfrm.cxx:390
void dumpChildrenAsXml(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:246
bool IsLayoutFrame() const
Definition: frame.hxx:1176
bool IsBodyFrame() const
Definition: frame.hxx:1212
TElementType * Next()
Definition: calbck.hxx:380
TElementType * First()
Definition: calbck.hxx:372
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
Definition: layfrm.hxx:36
void SetFrameFormat(SwFrameFormat *)
Definition: ssfrm.cxx:411
void AdjustColumns(const SwFormatCol *pCol, bool bAdjustAttributes)
Definition: colfrm.cxx:313
virtual const SwFrameFormat * GetFormat() const
Definition: ssfrm.cxx:401
virtual void DestroyImpl() override
Definition: ssfrm.cxx:487
friend void RestoreContent(SwFrame *, SwLayoutFrame *, SwFrame *pSibling)
Definition: frmtool.cxx:3035
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr) override
Definition: wsfrm.cxx:1350
const SwFrame * GetLastLower() const
Definition: findfrm.cxx:1917
friend SwFrame * SaveContent(SwLayoutFrame *, SwFrame *)
Definition: frmtool.cxx:2873
void ChgColumns(const SwFormatCol &rOld, const SwFormatCol &rNew, const bool bChgFootnote=false)
add or remove columns from a layoutframe.
Definition: colfrm.cxx:203
const SwFrame * Lower() const
Definition: layfrm.hxx:101
virtual void Cut() override
Definition: wsfrm.cxx:1447
A page of the document layout.
Definition: pagefrm.hxx:60
void RemoveFootnotes(SwPageFrame *pPage=nullptr, bool bPageOnly=false, bool bEndNotes=false)
Remove all footnotes (but no references)
Definition: ftnfrm.cxx:974
static SwLayoutFrame * lcl_FindColumns(SwLayoutFrame *pLay, sal_uInt16 nCount)
Definition: colfrm.cxx:106
static void lcl_RemoveColumns(SwLayoutFrame *pCont, sal_uInt16 nCnt)
Definition: colfrm.cxx:84
static bool lcl_AddColumns(SwLayoutFrame *pCont, sal_uInt16 nCount)
Definition: colfrm.cxx:123
int nCount
struct _xmlTextWriter * xmlTextWriterPtr
@ COLADJ_NONE
Definition: fmtclds.hxx:61
@ ATT_LEFT_TO_RIGHT
Definition: fmtfordr.hxx:31
SwRectFn fnRectVert
Definition: frame.hxx:1353
SwRectFn fnRectVertL2RB2T
Definition: frame.hxx:1353
SwRectFn fnRectHori
Definition: newfrm.cxx:287
SwRectFn fnRectVertL2R
Definition: frame.hxx:1353
void sw_RemoveFootnotes(SwFootnoteBossFrame *pBoss, bool bPageOnly, bool bEndNotes)
remove all footnotes (not the references) and all footnote pages
Definition: ftnfrm.cxx:920
const long LONG_MAX
int i
long Long
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
Definition: nodeoffset.hxx:35
SwRectGet fnGetWidth
Definition: frame.hxx:1300
tools::Long SwTwips
Definition: swtypes.hxx:51