LibreOffice Module sw (master)  1
widorp.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 <layfrm.hxx>
21 #include <ftnboss.hxx>
22 #include <ndtxt.hxx>
23 #include <paratr.hxx>
24 #include <editeng/orphitem.hxx>
25 #include <editeng/widwitem.hxx>
26 #include <editeng/keepitem.hxx>
27 #include <editeng/spltitem.hxx>
28 #include <frmatr.hxx>
29 #include <txtftn.hxx>
30 #include <fmtftn.hxx>
31 #include <rowfrm.hxx>
32 
33 #include "widorp.hxx"
34 #include <txtfrm.hxx>
35 #include "itrtxt.hxx"
36 #include <sectfrm.hxx>
37 #include <ftnfrm.hxx>
38 #include <pagefrm.hxx>
39 
40 #undef WIDOWTWIPS
41 
42 namespace
43 {
44 
45 // A Follow on the same page as its master is nasty.
46 bool IsNastyFollow( const SwTextFrame *pFrame )
47 {
48  OSL_ENSURE( !pFrame->IsFollow() || !pFrame->GetPrev() ||
49  static_cast<const SwTextFrame*>(pFrame->GetPrev())->GetFollow() == pFrame,
50  "IsNastyFollow: What is going on here?" );
51  return pFrame->IsFollow() && pFrame->GetPrev();
52 }
53 
54 }
55 
57  : m_nRstHeight(nRst), m_pFrame(pNewFrame)
58 {
60  SwRectFnSet aRectFnSet(m_pFrame);
61  m_nOrigin = aRectFnSet.GetPrtTop(*m_pFrame);
62  m_bKeep = !m_pFrame->IsMoveable() || IsNastyFollow( m_pFrame );
63  if( !m_bKeep && m_pFrame->IsInSct() )
64  {
65  const SwSectionFrame* const pSct = m_pFrame->FindSctFrame();
66  m_bKeep = pSct->Lower()->IsColumnFrame() && !pSct->MoveAllowed( m_pFrame );
67  }
70  m_bBreak = false;
71 
73  {
76  aRectFnSet.GetHeight(m_pFrame->getFrameArea());
77  if( m_nRstHeight < 0 )
78  m_nRstHeight = 0;
79  }
80 }
81 
102 bool SwTextFrameBreak::IsInside( SwTextMargin const &rLine ) const
103 {
104  bool bFit = false;
105 
107  SwRectFnSet aRectFnSet(m_pFrame);
108  // nOrigin is an absolute value, rLine refers to the swapped situation.
109 
110  SwTwips nTmpY;
111  if ( m_pFrame->IsVertical() )
112  nTmpY = m_pFrame->SwitchHorizontalToVertical( rLine.Y() + rLine.GetLineHeight() );
113  else
114  nTmpY = rLine.Y() + rLine.GetLineHeight();
115 
116  SwTwips nLineHeight = aRectFnSet.YDiff( nTmpY , m_nOrigin );
117 
118  // Calculate extra space for bottom border.
119  nLineHeight += aRectFnSet.GetBottomMargin(*m_pFrame);
120 
121  if( m_nRstHeight )
122  bFit = m_nRstHeight >= nLineHeight;
123  else
124  {
125  // The Frame has a height to fit on the page.
126  SwTwips nHeight =
127  aRectFnSet.YDiff( aRectFnSet.GetPrtBottom(*m_pFrame->GetUpper()), m_nOrigin );
128  SwTwips nDiff = nHeight - nLineHeight;
129 
130  // Hide whitespace may require not to insert a new page.
131  SwPageFrame* pPageFrame = m_pFrame->FindPageFrame();
132  if (!pPageFrame->CheckPageHeightValidForHideWhitespace(nDiff))
133  nDiff = 0;
134 
135  // If everything is inside the existing frame the result is true;
136  bFit = nDiff >= 0;
137 
138  if (!bFit && rLine.MaybeHasHints() && m_pFrame->GetFollow()
139  // if using same footnote container as the follow, pointless to try?
141  {
142  // possibly a footnote that is anchored beyond the end of this
143  // (the last) line is in the way, try to remove it and check again
144  m_pFrame->RemoveFootnote(rLine.GetEnd());
145  nHeight = aRectFnSet.YDiff( aRectFnSet.GetPrtBottom(*m_pFrame->GetUpper()), m_nOrigin );
146  bFit = nHeight >= nLineHeight;
147  }
148  if ( !bFit )
149  {
150  if ( rLine.GetNext() &&
152  {
153  // add additional space taken as lower space as last content in a table
154  // for all text lines except the last one.
156  bFit = nHeight >= nLineHeight;
157  }
158  }
159  if( !bFit )
160  {
161  // The LineHeight exceeds the current Frame height.
162  // Call a test Grow to detect if the Frame could
163  // grow the requested area.
164  nHeight += m_pFrame->GrowTst( LONG_MAX );
165 
166  // The Grow() returns the height by which the Upper of the TextFrame
167  // would let the TextFrame grow.
168  // The TextFrame itself can grow as much as it wants.
169  bFit = nHeight >= nLineHeight;
170  }
171  }
172 
173  return bFit;
174 }
175 
177 {
179 
180  // bKeep is stronger than IsBreakNow()
181  // Is there enough space ?
182  if( m_bKeep || IsInside( rLine ) )
183  m_bBreak = false;
184  else
185  {
186  /* This class assumes that the SwTextMargin is processed from Top to
187  * Bottom. Because of performance reasons we stop splitting in the
188  * following cases:
189  * If only one line does not fit.
190  * Special case: with DummyPortions there is LineNr == 1, though we
191  * want to split.
192  */
193  // Include DropLines
194 
195  bool bFirstLine = 1 == rLine.GetLineNr() && !rLine.GetPrev();
196  m_bBreak = true;
197  if( ( bFirstLine && m_pFrame->GetIndPrev() )
198  || ( rLine.GetLineNr() <= rLine.GetDropLines() ) )
199  {
200  m_bKeep = true;
201  m_bBreak = false;
202  }
203  else if(bFirstLine && m_pFrame->IsInFootnote() && !m_pFrame->FindFootnoteFrame()->GetPrev())
204  {
206  if( !pTmp || !pTmp->Lower() )
207  m_bBreak = false;
208  }
209  }
210 
211  return m_bBreak;
212 }
213 
215 {
216  // Consider bottom margin
217  SwRectFnSet aRectFnSet(m_pFrame);
218 
219  m_nRstHeight = aRectFnSet.GetBottomMargin(*m_pFrame);
220 
221  if ( aRectFnSet.IsVert() )
222  {
223  if ( m_pFrame->IsVertLR() )
224  m_nRstHeight = aRectFnSet.YDiff( m_pFrame->SwitchHorizontalToVertical( rLine.Y() ) , m_nOrigin );
225  else
227  }
228  else
229  m_nRstHeight += rLine.Y() - m_nOrigin;
230 }
231 
233  bool bChkKeep )
234  : SwTextFrameBreak( pNewFrame, nRst ), nWidLines( 0 ), nOrphLines( 0 )
235 {
237 
238  if( m_bKeep )
239  {
240  // If paragraph should not be split but is larger than
241  // the page, then bKeep is overruled.
242  if( bChkKeep && !m_pFrame->GetPrev() && !m_pFrame->IsInFootnote() &&
243  m_pFrame->IsMoveable() &&
245  m_bKeep = false;
246  // Even if Keep is set, Orphans has to be respected.
247  // e.g. if there are chained frames where a Follow in the last frame
248  // receives a Keep, because it is not (forward) movable -
249  // nevertheless the paragraph can request lines from the Master
250  // because of the Orphan rule.
251  if( m_pFrame->IsFollow() )
253  }
254  else
255  {
257  const SvxOrphansItem &rOrph = rSet.GetOrphans();
258  if ( rOrph.GetValue() > 1 )
259  nOrphLines = rOrph.GetValue();
260  if ( m_pFrame->IsFollow() )
261  nWidLines = rSet.GetWidows().GetValue();
262 
263  }
264 
265  if ( m_bKeep || nWidLines || nOrphLines )
266  {
267  bool bResetFlags = false;
268 
269  if ( m_pFrame->IsInTab() )
270  {
271  // For compatibility reasons, we disable Keep/Widows/Orphans
272  // inside splittable row frames:
274  {
275  const SwFrame* pTmpFrame = m_pFrame->GetUpper();
276  while ( !pTmpFrame->IsRowFrame() )
277  pTmpFrame = pTmpFrame->GetUpper();
278  if ( static_cast<const SwRowFrame*>(pTmpFrame)->IsRowSplitAllowed() )
279  bResetFlags = true;
280  }
281  }
282 
283  if( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() )
284  {
285  // Inside of footnotes there are good reasons to turn off the Keep attribute
286  // as well as Widows/Orphans.
288  const bool bFt = !pFootnote->GetAttr()->GetFootnote().IsEndNote();
289  if( !pFootnote->GetPrev() &&
290  pFootnote->FindFootnoteBossFrame( bFt ) != pFootnote->GetRef()->FindFootnoteBossFrame( bFt )
292  {
293  bResetFlags = true;
294  }
295  }
296 
297  if ( bResetFlags )
298  {
299  m_bKeep = false;
300  nOrphLines = 0;
301  nWidLines = 0;
302  }
303  }
304 }
305 
312  bool bHasToFit )
313 {
314  // i#16128 - Why member <pFrame> _*and*_ parameter <pFrame>??
315  // Thus, assertion on situation, that these are different to figure out why.
316  OSL_ENSURE( m_pFrame == pFrame, "<WidowsAndOrphans::FindBreak> - pFrame != pFrame" );
317 
319 
320  bool bRet = true;
321  sal_uInt16 nOldOrphans = nOrphLines;
322  if( bHasToFit )
323  nOrphLines = 0;
324  rLine.Bottom();
325 
326  if( !IsBreakNowWidAndOrp( rLine ) )
327  bRet = false;
328  if( !FindWidows( pFrame, rLine ) )
329  {
330  bool bBack = false;
331 
332  while( IsBreakNowWidAndOrp( rLine ) )
333  {
334  if( rLine.PrevLine() )
335  bBack = true;
336  else
337  break;
338  }
339  // Usually Orphans are not taken into account for HasToFit.
340  // But if Dummy-Lines are concerned and the Orphans rule is violated
341  // we make an exception: We leave behind one Dummyline and take
342  // the whole text to the next page/column.
343  if( rLine.GetLineNr() <= nOldOrphans &&
344  rLine.GetInfo().GetParaPortion()->IsDummy() &&
345  ( ( bHasToFit && bRet ) || IsBreakNow( rLine ) ) )
346  rLine.Top();
347 
348  rLine.TruncLines( true );
349  bRet = bBack;
350  }
351  nOrphLines = nOldOrphans;
352 
353  return bRet;
354 }
355 
363 {
364  OSL_ENSURE( ! pFrame->IsVertical() || ! pFrame->IsSwapped(),
365  "WidowsAndOrphans::FindWidows with swapped frame" );
366 
367  if( !nWidLines || !pFrame->IsFollow() )
368  return false;
369 
370  rLine.Bottom();
371 
372  // We can still cut something off
373  SwTextFrame *pMaster = pFrame->FindMaster();
374  OSL_ENSURE(pMaster, "+WidowsAndOrphans::FindWidows: Widows in a master?");
375  if( !pMaster )
376  return false;
377 
378  // If the first line of the Follow does not fit, the master
379  // probably is full of Dummies. In this case a PrepareHint::Widows would be fatal.
380  if( pMaster->GetOffset() == pFrame->GetOffset() )
381  return false;
382 
383  // Remaining height of the master
384  SwRectFnSet aRectFnSet(pFrame);
385 
386  const SwTwips nDocPrtTop = aRectFnSet.GetPrtTop(*pFrame);
387  SwTwips nOldHeight;
388  SwTwips nTmpY = rLine.Y() + rLine.GetLineHeight();
389 
390  if ( aRectFnSet.IsVert() )
391  {
392  nTmpY = pFrame->SwitchHorizontalToVertical( nTmpY );
393  nOldHeight = -aRectFnSet.GetHeight(pFrame->getFramePrintArea());
394  }
395  else
396  nOldHeight = aRectFnSet.GetHeight(pFrame->getFramePrintArea());
397 
398  const SwTwips nChg = aRectFnSet.YDiff( nTmpY, nDocPrtTop + nOldHeight );
399 
400  // below the Widows-threshold...
401  if( rLine.GetLineNr() >= nWidLines )
402  {
403  // Follow to Master I
404  // If the Follow *grows*, there is the chance for the Master to
405  // receive lines, that it was forced to hand over to the Follow lately:
406  // Prepare(Need); check that below nChg!
407  // (0W, 2O, 2M, 2F) + 1F = 3M, 2F
408  if( rLine.GetLineNr() > nWidLines && pFrame->IsJustWidow() )
409  {
410  // If the Master is locked, it has probably just donated a line
411  // to us, we don't return that just because we turned it into
412  // multiple lines (e.g. via frames).
413  if( !pMaster->IsLocked() && pMaster->GetUpper() )
414  {
415  const SwTwips nTmpRstHeight = aRectFnSet.BottomDist( pMaster->getFrameArea(),
416  aRectFnSet.GetPrtBottom(*pMaster->GetUpper()) );
417  if ( nTmpRstHeight >=
418  SwTwips(rLine.GetInfo().GetParaPortion()->Height() ) )
419  {
421  pMaster->InvalidateSize_();
422  pMaster->InvalidatePage();
423  }
424  }
425 
426  pFrame->SetJustWidow( false );
427  }
428  return false;
429  }
430 
431  // Follow to Master II
432  // If the Follow *shrinks*, maybe the Master can absorb the whole Orphan.
433  // (0W, 2O, 2M, 1F) - 1F = 3M, 0F -> PrepareHint::AdjustSizeWithoutFormatting
434  // (0W, 2O, 3M, 2F) - 1F = 2M, 2F -> PrepareHint::Widows
435 
436  if( 0 > nChg && !pMaster->IsLocked() && pMaster->GetUpper() )
437  {
438  SwTwips nTmpRstHeight = aRectFnSet.BottomDist( pMaster->getFrameArea(),
439  aRectFnSet.GetPrtBottom(*pMaster->GetUpper()) );
440  if( nTmpRstHeight >= SwTwips(rLine.GetInfo().GetParaPortion()->Height() ) )
441  {
443  pMaster->InvalidateSize_();
444  pMaster->InvalidatePage();
445  pFrame->SetJustWidow( false );
446  return false;
447  }
448  }
449 
450  // Master to Follow
451  // If the Follow contains fewer lines than Widows after formatting,
452  // we still can move over some lines from the Master. If this triggers
453  // the Orphans rule of the Master, the Master frame must be Grow()n
454  // in its CalcPreps(), such that it won't fit onto its page anymore.
455  // But if the Master Frame can still lose a few lines, we need to
456  // do a Shrink() in the CalcPreps(); the Follow with the Widows then
457  // moves onto the page of the Master, but remains unsplit, so that
458  // it (finally) moves onto the next page. So much for the theory!
459  //
460  // We only request one line at a time for now, because a Master's line
461  // could result in multiple lines for us.
462  // Therefore, the CalcFollow() remains in control until the Follow got all
463  // necessary lines.
464  sal_uInt16 nNeed = 1; // was: nWidLines - rLine.GetLineNr();
465 
466  // Special case: Master cannot give lines to follow
467  // i#91421
468  if ( !pMaster->GetIndPrev() )
469  {
470  pMaster->ChgThisLines();
471  sal_uLong nLines = pMaster->GetThisLines();
472  if(nLines == 0 && pMaster->HasPara())
473  {
474  const SwParaPortion *pMasterPara = pMaster->GetPara();
475  if(pMasterPara && pMasterPara->GetNext())
476  nLines = 2;
477  }
478  if( nLines <= nNeed )
479  return false;
480  }
481 
482  pMaster->Prepare( PrepareHint::Widows, static_cast<void*>(&nNeed) );
483  return true;
484 }
485 
486 bool WidowsAndOrphans::WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTst )
487 {
488  // Here it does not matter, if pFrame is swapped or not.
489  // IsInside() takes care of itself
490 
491  // We expect that rLine is set to the last line
492  OSL_ENSURE( !rLine.GetNext(), "WouldFit: aLine::Bottom missed!" );
493  sal_uInt16 nLineCnt = rLine.GetLineNr();
494 
495  // First satisfy the Orphans-rule and the wish for initials ...
496  const sal_uInt16 nMinLines = std::max( GetOrphansLines(), rLine.GetDropLines() );
497  if ( nLineCnt < nMinLines )
498  return false;
499 
500  rLine.Top();
501  SwTwips nLineSum = rLine.GetLineHeight();
502 
503  while( nMinLines > rLine.GetLineNr() )
504  {
505  if( !rLine.NextLine() )
506  return false;
507  nLineSum += rLine.GetLineHeight();
508  }
509 
510  // We do not fit
511  if( !IsInside( rLine ) )
512  return false;
513 
514  // Check the Widows-rule
515  if( !nWidLines && !m_pFrame->IsFollow() )
516  {
517  // Usually we only have to check for Widows if we are a Follow.
518  // On WouldFit the rule has to be checked for the Master too,
519  // because we are just in the middle of calculating the break.
520  // In Ctor of WidowsAndOrphans the nWidLines are only calced for
521  // Follows from the AttrSet - so we catch up now:
523  nWidLines = rSet.GetWidows().GetValue();
524  }
525 
526  // After Orphans/Initials, do enough lines remain for Widows?
527  // If we are currently doing a test formatting, we may not
528  // consider the widows rule for two reasons:
529  // 1. The columns may have different widths.
530  // Widow lines would have wrong width.
531  // 2. Test formatting is only done up to the given space.
532  // we do not have any lines for widows at all.
533  if( bTst || nLineCnt - nMinLines >= nWidLines )
534  {
535  if( rMaxHeight >= nLineSum )
536  {
537  rMaxHeight -= nLineSum;
538  return true;
539  }
540  }
541  return false;
542 }
543 
544 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool FindWidows(SwTextFrame *pFrame, SwTextMargin &rLine)
FindWidows positions the SwTextMargin of the Master to the line where to break by examining and forma...
Definition: widorp.cxx:362
Base class of the Writer layout elements.
Definition: frame.hxx:295
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
bool FindBreak(SwTextFrame *pFrame, SwTextMargin &rLine, bool bHasToFit)
The Find*-Methods do not only search, but adjust the SwTextMargin to the line where the paragraph sho...
Definition: widorp.cxx:311
long BottomDist(const SwRect &rRect, long nPos) const
Definition: frame.hxx:1390
bool MoveAllowed(const SwFrame *) const
Definition: sectfrm.cxx:2388
bool IsFollow() const
Definition: flowfrm.hxx:166
void SetRstHeight(const SwTextMargin &rLine)
Definition: widorp.cxx:214
sal_uInt16 GetLineNr() const
Definition: itrtxt.hxx:87
bool MaybeHasHints() const
Definition: itratr.cxx:122
bool IsInSct() const
Definition: frame.hxx:943
sal_uInt16 Height() const
Definition: possiz.hxx:44
SwLineLayout * GetNext()
Definition: porlay.hxx:143
bool IsSwapped() const
Definition: txtfrm.hxx:528
const SwLineLayout * NextLine()
Definition: itrtxt.cxx:122
bool HasPara() const
Definition: txtfrm.hxx:812
bool IsInFootnote() const
Definition: frame.hxx:925
void SwitchHorizontalToVertical(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from horizontal to vertical layout...
Definition: txtfrm.cxx:471
sal_uIntPtr sal_uLong
const SwRect & getFramePrintArea() const
Definition: frame.hxx:176
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true) override
SwContentFrame: the shortcut for the Frames If the void* casts wrongly, it's its own fault! The void*...
Definition: txtfrm.cxx:2709
void InvalidateSize_()
Definition: frame.hxx:749
SwParaPortion * GetPara()
Definition: txtcache.cxx:89
const SvxOrphansItem & GetOrphans(bool=true) const
Definition: paratr.hxx:188
long SwTwips
Definition: swtypes.hxx:49
bool IsVert() const
Definition: frame.hxx:1343
bool WouldFit(SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTest)
Definition: widorp.cxx:486
bool IsEndNote() const
Definition: fmtftn.hxx:74
long GetPrtTop(const SwFrame &rFrame) const
Definition: frame.hxx:1385
SwTwips Y() const
Definition: itrtxt.hxx:90
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:229
sal_uInt16 GetOrphansLines() const
Definition: widorp.hxx:61
void SetJustWidow(const bool bNew)
Definition: txtfrm.hxx:238
bool IsBreakNowWidAndOrp(SwTextMargin &rLine)
Definition: widorp.hxx:69
SwTwips GetFootnoteFrameHeight() const
Definition: txtfrm.hxx:836
long YDiff(long n1, long n2) const
Definition: frame.hxx:1399
long GetPrtBottom(const SwFrame &rFrame) const
Definition: frame.hxx:1386
bool IsMoveable(const SwLayoutFrame *_pLayoutFrame=nullptr) const
determine, if frame is moveable in given environment
Definition: findfrm.cxx:1359
const SwRect & getFrameArea() const
Definition: frame.hxx:175
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:661
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:817
bool IsInTab() const
Definition: frame.hxx:931
SwTwips m_nOrigin
Definition: widorp.hxx:30
const SvxFormatSplitItem & GetSplit(bool=true) const
Definition: paratr.hxx:182
long GetBottomMargin(const SwFrame &rFrame) const
Definition: frame.hxx:1380
const SvxFormatKeepItem & GetKeep(bool=true) const
Definition: frmatr.hxx:56
SwLayoutFrame * GetNextCellLeaf()
Definition: findfrm.cxx:1511
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:848
TextFrameIndex GetOffset() const
Definition: txtfrm.hxx:428
SwTwips m_nRstHeight
Definition: widorp.hxx:29
bool IsColumnFrame() const
Definition: frame.hxx:1158
SwFootnoteFrame * FindFootnoteFrame()
Definition: frame.hxx:1083
void swap(cow_wrapper< T, P > &a, cow_wrapper< T, P > &b)
SwTextNode const * GetTextNodeForParaProps() const
Definition: txtfrm.cxx:1290
void Bottom()
Definition: itrtxt.cxx:183
bool IsDummy() const
Definition: porlay.hxx:135
bool CheckPageHeightValidForHideWhitespace(SwTwips nDiff)
Is bottom-of-page-frame - bottom-of-text-frame difference valid in case whitespace is hidden...
Definition: pagechg.cxx:2484
SwFrame * GetIndPrev() const
Definition: frame.hxx:702
SwTwips CalcAddLowerSpaceAsLastInTableCell(const SwBorderAttrs *_pAttrs=nullptr) const
calculation of the additional space to be considered, if flow frame is the last inside a table cell ...
Definition: flowfrm.cxx:1703
bool IsInside(SwTextMargin const &rLine) const
BP 18.6.93: Widows.
Definition: widorp.cxx:102
void Top()
Definition: itrtxt.hxx:99
SwFrame * GetIndNext()
Definition: frame.hxx:705
SwPageFrame * FindPageFrame()
Definition: frame.hxx:658
SwParaPortion * GetParaPortion()
Definition: inftxt.hxx:128
const SwFrame * Lower() const
Definition: layfrm.hxx:101
void InvalidatePage(const SwPageFrame *pPage=nullptr) const
Invalidates the page in which the Frame is currently placed.
Definition: wsfrm.cxx:597
SwLayoutFrame * GetUpper()
Definition: frame.hxx:656
bool IsRowFrame() const
Definition: frame.hxx:1198
const SwLineLayout * GetPrev()
Definition: itrtxt.cxx:81
SwFootnoteBossFrame * FindFootnoteBossFrame(bool bFootnotes=false)
Definition: findfrm.cxx:435
SwFrame * GetPrev()
Definition: frame.hxx:655
const SwRowFrame * IsInFollowFlowRow() const
Definition: findfrm.cxx:1774
const SvxWidowsItem & GetWidows(bool=true) const
Definition: paratr.hxx:186
sal_uInt16 GetLineHeight() const
Definition: itrtxt.hxx:116
void TruncLines(bool bNoteFollow=false)
Definition: itrtxt.cxx:321
bool IsLocked() const
Definition: txtfrm.hxx:507
A page of the document layout.
Definition: pagefrm.hxx:40
const SwFormatFootnote & GetFootnote() const
Definition: txatbase.hxx:200
const long LONG_MAX
SwSectionFrame * FindSctFrame()
Definition: frame.hxx:1091
SwLayoutFrame * FindBodyCont()
Searches the first ContentFrame in BodyText below the page.
Definition: findfrm.cxx:42
SwTextFrameBreak(SwTextFrame *pFrame, const SwTwips nRst=0)
Definition: widorp.cxx:56
sal_uInt16 nOrphLines
Definition: widorp.hxx:55
bool IsBreakNow(SwTextMargin &rLine)
Definition: widorp.cxx:176
bool IsVertLR() const
Definition: frame.hxx:955
SwTextFrame * FindMaster() const
Definition: flowfrm.cxx:679
sal_uInt16 nWidLines
Definition: widorp.hxx:55
SwTextSizeInfo & GetInfo()
Definition: itrtxt.hxx:216
WidowsAndOrphans(SwTextFrame *pFrame, const SwTwips nRst=0, bool bCheckKeep=true)
Definition: widorp.cxx:232
const SwContentFrame * GetRef() const
Definition: ftnfrm.cxx:2886
const SwTextFootnote * GetAttr() const
Definition: ftnfrm.hxx:107
const SwLineLayout * PrevLine()
Definition: itrtxt.cxx:168
long GetHeight(const SwRect &rRect) const
Definition: frame.hxx:1358
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
Definition: node.hxx:723
const SwLineLayout * GetNext() const
Definition: itrtxt.hxx:84
bool IsVertical() const
Definition: frame.hxx:949
SwTextFrame * m_pFrame
Definition: widorp.hxx:32
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
Definition: layfrm.hxx:35
TextFrameIndex GetEnd() const
Definition: itrtxt.hxx:89
sal_uInt16 GetDropLines() const
Definition: itrtxt.hxx:202
void RemoveFootnote(TextFrameIndex nStart, TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING))
Footnote.
Definition: txtftn.cxx:394
bool IsJustWidow() const
Definition: txtfrm.hxx:510
void ChgThisLines()
Definition: txtfrm.cxx:3752