LibreOffice Module sw (master)  1
porrst.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 <editeng/lspcitem.hxx>
21 #include <editeng/adjustitem.hxx>
23 #include <editeng/lrspitem.hxx>
24 #include <editeng/pgrditem.hxx>
25 #include <vcl/svapp.hxx>
26 #include <viewsh.hxx>
27 #include <viewopt.hxx>
28 #include <ndtxt.hxx>
29 #include <pagefrm.hxx>
30 #include <paratr.hxx>
31 #include <SwPortionHandler.hxx>
32 #include "porrst.hxx"
33 #include "inftxt.hxx"
34 #include "txtpaint.hxx"
35 #include <swfntcch.hxx>
36 #include <tgrditem.hxx>
37 #include <pagedesc.hxx>
38 #include <frmatr.hxx>
39 #include "redlnitr.hxx"
40 #include "atrhndl.hxx"
41 #include <rootfrm.hxx>
42 
46 
47 #include <crsrsh.hxx>
48 
50 {
51  Height( rPortion.Height() );
52  SetAscent( rPortion.GetAscent() );
54 }
55 
56 void SwTmpEndPortion::Paint( const SwTextPaintInfo &rInf ) const
57 {
58  if (rInf.OnWin() && rInf.GetOpt().IsParagraph())
59  {
60  const SwFont* pOldFnt = rInf.GetFont();
61 
62  SwFont aFont(*pOldFnt);
64  const_cast<SwTextPaintInfo&>(rInf).SetFont(&aFont);
65 
66  // draw the pilcrow
67  rInf.DrawText(OUString(CH_PAR), *this);
68 
69  const_cast<SwTextPaintInfo&>(rInf).SetFont(const_cast<SwFont*>(pOldFnt));
70  }
71 }
72 
74  : SwLinePortion( rPortion )
75 {
78 }
79 
81 {
82  return TextFrameIndex(0);
83 }
84 
85 sal_uInt16 SwBreakPortion::GetViewWidth( const SwTextSizeInfo & ) const
86 { return 0; }
87 
89 { return (GetNextPortion() && GetNextPortion()->InTextGrp() ? nullptr : this); }
90 
91 void SwBreakPortion::Paint( const SwTextPaintInfo &rInf ) const
92 {
93  if( rInf.OnWin() && rInf.GetOpt().IsLineBreak() )
94  rInf.DrawLineBreak( *this );
95 }
96 
98 {
99  const SwLinePortion *pRoot = rInf.GetRoot();
100  Width( 0 );
101  Height( pRoot->Height() );
102  SetAscent( pRoot->GetAscent() );
103  if (rInf.GetIdx() + TextFrameIndex(1) == TextFrameIndex(rInf.GetText().getLength()))
104  rInf.SetNewLine( true );
105  return true;
106 }
107 
109 {
110  rPH.Text( GetLen(), GetWhichPor() );
111 }
112 
114  bool bBG, bool bGK ) :
115  nKern( nKrn ), bBackground( bBG ), bGridKern( bGK )
116 {
117  Height( rPortion.Height() );
118  SetAscent( rPortion.GetAscent() );
121  if( nKern > 0 )
122  Width( nKern );
123  rPortion.Insert( this );
124 }
125 
127  nKern( 0 ), bBackground( false ), bGridKern( true )
128 {
129  Height( rPortion.Height() );
130  SetAscent( rPortion.GetAscent() );
131 
134 }
135 
136 void SwKernPortion::Paint( const SwTextPaintInfo &rInf ) const
137 {
138  if( Width() )
139  {
140  // bBackground is set for Kerning Portions between two fields
141  if ( bBackground )
142  rInf.DrawViewOpt( *this, PortionType::Field );
143 
144  rInf.DrawBackBrush( *this );
146  rInf.DrawBorder( *this );
147 
148  // do we have to repaint a post it portion?
149  if( rInf.OnWin() && mpNextPortion && !mpNextPortion->Width() )
150  mpNextPortion->PrePaint( rInf, this );
151 
152  if( rInf.GetFont()->IsPaintBlank() )
153  {
154  SwRect aClipRect;
155  rInf.CalcRect( *this, &aClipRect );
156  SwSaveClip aClip( const_cast<OutputDevice*>(rInf.GetOut()) );
157  aClip.ChgClip( aClipRect );
158  rInf.DrawText(" ", *this, TextFrameIndex(0), TextFrameIndex(2), true );
159  }
160  }
161 }
162 
164 {
165  if ( bGridKern )
166  return;
167 
168  if( rInf.GetLast() == this )
169  rInf.SetLast( FindPrevPortion( rInf.GetRoot() ) );
170  if( nKern < 0 )
171  Width( -nKern );
172  else
173  Width( 0 );
174  rInf.GetLast()->FormatEOL( rInf );
175 }
176 
178  bLeft( true )
179 {
180  Height( rPortion.Height() );
181  SetAscent( rPortion.GetAscent() );
184 }
185 
187  : bLeft( false )
188 {
189  Height( static_cast<sal_uInt16>(rInf.GetTextFrame()->getFramePrintArea().Height()) );
190  aPos.setX( rInf.GetTextFrame()->getFrameArea().Left() +
191  rInf.GetTextFrame()->getFramePrintArea().Right() );
192  aPos.setY( rInf.GetTextFrame()->getFrameArea().Top() +
193  rInf.GetTextFrame()->getFramePrintArea().Bottom() );
195 }
196 
197 void SwArrowPortion::Paint( const SwTextPaintInfo &rInf ) const
198 {
199  const_cast<SwArrowPortion*>(this)->aPos = rInf.GetPos();
200 }
201 
203 
205 {
206  if (IsCollapse()) {
208  if ( dynamic_cast<const SwCursorShell*>( pSh ) != nullptr ) {
209  SwCursorShell *pCrSh = static_cast<SwCursorShell*>(pSh);
210  // this is called during formatting so avoid recursive layout
211  SwContentFrame const*const pCurrFrame = pCrSh->GetCurrFrame(false);
212  if (pCurrFrame==static_cast<SwContentFrame const *>(this)) {
213  // do nothing
214  } else {
215  return 1;
216  }
217  } else {
218  return 1;
219  }
220  }
221  OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::EmptyHeight with swapped frame" );
222 
223  std::unique_ptr<SwFont> pFnt;
224  const SwTextNode& rTextNode = *GetTextNodeForParaProps();
225  const IDocumentSettingAccess* pIDSA = rTextNode.getIDocumentSettingAccess();
227  if ( rTextNode.HasSwAttrSet() )
228  {
229  const SwAttrSet *pAttrSet = &( rTextNode.GetSwAttrSet() );
230  pFnt.reset(new SwFont( pAttrSet, pIDSA ));
231  }
232  else
233  {
234  SwFontAccess aFontAccess( &rTextNode.GetAnyFormatColl(), pSh);
235  pFnt.reset(new SwFont( aFontAccess.Get()->GetFont() ));
236  pFnt->CheckFontCacheId( pSh, pFnt->GetActual() );
237  }
238 
239  if ( IsVertical() )
240  pFnt->SetVertical( 2700 );
241 
242  OutputDevice* pOut = pSh ? pSh->GetOut() : nullptr;
243  if ( !pOut || !pSh->GetViewOptions()->getBrowseMode() ||
244  pSh->GetViewOptions()->IsPrtFormat() )
245  {
246  pOut = rTextNode.getIDocumentDeviceAccess().getReferenceDevice(true);
247  }
248 
249  const IDocumentRedlineAccess& rIDRA = rTextNode.getIDocumentRedlineAccess();
251  && !getRootFrame()->IsHideRedlines())
252  {
253  const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, RedlineType::Any );
254  if( SwRedlineTable::npos != nRedlPos )
255  {
256  SwAttrHandler aAttrHandler;
257  aAttrHandler.Init(rTextNode.GetSwAttrSet(),
258  *rTextNode.getIDocumentSettingAccess());
259  SwRedlineItr aRedln( rTextNode, *pFnt, aAttrHandler,
260  nRedlPos, SwRedlineItr::Mode::Show);
261  }
262  }
263 
264  SwTwips nRet;
265  if( !pOut )
266  nRet = IsVertical() ?
267  getFramePrintArea().SSize().Width() + 1 :
268  getFramePrintArea().SSize().Height() + 1;
269  else
270  {
271  pFnt->SetFntChg( true );
272  pFnt->ChgPhysFnt( pSh, *pOut );
273  nRet = pFnt->GetHeight( pSh, *pOut );
274  }
275  return nRet;
276 }
277 
279 {
280  OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::FormatEmpty with swapped frame" );
281 
282  bool bCollapse = EmptyHeight( ) == 1 && IsCollapse( );
283 
284  // sw_redlinehide: just disable FormatEmpty optimisation for now
285  if (HasFollow() || GetMergedPara() || GetTextNodeFirst()->GetpSwpHints() ||
286  nullptr != GetTextNodeForParaProps()->GetNumRule() ||
287  GetTextNodeFirst()->HasHiddenCharAttribute(true) ||
288  IsInFootnote() || ( HasPara() && GetPara()->IsPrepMustFit() ) )
289  return false;
291  const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust();
292  if( !bCollapse && ( ( ( ! IsRightToLeft() && ( SvxAdjust::Left != nAdjust ) ) ||
293  ( IsRightToLeft() && ( SvxAdjust::Right != nAdjust ) ) ) ||
294  aSet.GetRegister().GetValue() ) )
295  return false;
296  const SvxLineSpacingItem &rSpacing = aSet.GetLineSpacing();
297  if( !bCollapse && ( SvxLineSpaceRule::Min == rSpacing.GetLineSpaceRule() ||
298  SvxLineSpaceRule::Fix == rSpacing.GetLineSpaceRule() ||
299  aSet.GetLRSpace().IsAutoFirst() ) )
300  return false;
301 
302  SwTextFly aTextFly( this );
303  SwRect aRect;
304  bool bFirstFlyCheck = 0 != getFramePrintArea().Height();
305  if ( !bCollapse && bFirstFlyCheck &&
306  aTextFly.IsOn() && aTextFly.IsAnyObj( aRect ) )
307  return false;
308 
309  SwTwips nHeight = EmptyHeight();
310 
311  if (aSet.GetParaGrid().GetValue() &&
312  IsInDocBody() )
313  {
314  SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame()));
315  if ( pGrid )
316  nHeight = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
317  }
318 
319  SwRectFnSet aRectFnSet(this);
320  const SwTwips nChg = nHeight - aRectFnSet.GetHeight(getFramePrintArea());
321 
322  if( !nChg )
323  SetUndersized( false );
324  AdjustFrame( nChg );
325 
326  if( HasBlinkPor() )
327  {
328  ClearPara();
329  ResetBlinkPor();
330  }
331 
332  if (GetHasRotatedPortions())
333  {
334  ClearPara();
335  SetHasRotatedPortions(false);
336  }
337 
338  RemoveFromCache();
339  if( !IsEmpty() )
340  {
341  SetEmpty( true );
343  }
344  if( !bCollapse && !bFirstFlyCheck &&
345  aTextFly.IsOn() && aTextFly.IsAnyObj( aRect ) )
346  return false;
347 
348  // #i35635# - call method <HideAndShowObjects()>
349  // to assure that objects anchored at the empty paragraph are
350  // correctly visible resp. invisible.
352  return true;
353 }
354 
355 bool SwTextFrame::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
356 {
357  const SwFrame *pFrame = this;
358  rRegDiff = 0;
359  while( !( ( SwFrameType::Body | SwFrameType::Fly )
360  & pFrame->GetType() ) && pFrame->GetUpper() )
361  pFrame = pFrame->GetUpper();
362  if( ( SwFrameType::Body| SwFrameType::Fly ) & pFrame->GetType() )
363  {
364  SwRectFnSet aRectFnSet(pFrame);
365  rRegStart = aRectFnSet.GetPrtTop(*pFrame);
366  pFrame = pFrame->FindPageFrame();
367  if( pFrame->IsPageFrame() )
368  {
369  SwPageDesc* pDesc = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pFrame))->FindPageDesc();
370  if( pDesc )
371  {
372  rRegDiff = pDesc->GetRegHeight();
373  if( !rRegDiff )
374  {
375  const SwTextFormatColl *pFormat = pDesc->GetRegisterFormatColl();
376  if( pFormat )
377  {
378  const SvxLineSpacingItem &rSpace = pFormat->GetLineSpacing();
379  if( SvxLineSpaceRule::Fix == rSpace.GetLineSpaceRule() )
380  {
381  rRegDiff = rSpace.GetLineHeight();
382  pDesc->SetRegHeight( rRegDiff );
383  pDesc->SetRegAscent( ( 4 * rRegDiff ) / 5 );
384  }
385  else
386  {
388  SwFontAccess aFontAccess( pFormat, pSh );
389  SwFont aFnt( aFontAccess.Get()->GetFont() );
390 
391  OutputDevice *pOut = nullptr;
392  if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ||
393  pSh->GetViewOptions()->IsPrtFormat() )
395 
396  if( pSh && !pOut )
397  pOut = pSh->GetWin();
398 
399  if( !pOut )
401 
402  MapMode aOldMap( pOut->GetMapMode() );
403  pOut->SetMapMode( MapMode( MapUnit::MapTwip ) );
404 
405  aFnt.ChgFnt( pSh, *pOut );
406  rRegDiff = aFnt.GetHeight( pSh, *pOut );
407  sal_uInt16 nNetHeight = rRegDiff;
408 
409  switch( rSpace.GetLineSpaceRule() )
410  {
411  case SvxLineSpaceRule::Auto:
412  break;
413  case SvxLineSpaceRule::Min:
414  {
415  if( rRegDiff < rSpace.GetLineHeight() )
416  rRegDiff = rSpace.GetLineHeight();
417  break;
418  }
419  default:
420  OSL_FAIL( ": unknown LineSpaceRule" );
421  }
422  switch( rSpace.GetInterLineSpaceRule() )
423  {
424  case SvxInterLineSpaceRule::Off:
425  break;
426  case SvxInterLineSpaceRule::Prop:
427  {
428  long nTmp = rSpace.GetPropLineSpace();
429  if( nTmp < 50 )
430  nTmp = nTmp ? 50 : 100;
431  nTmp *= rRegDiff;
432  nTmp /= 100;
433  if( !nTmp )
434  ++nTmp;
435  rRegDiff = static_cast<sal_uInt16>(nTmp);
436  nNetHeight = rRegDiff;
437  break;
438  }
439  case SvxInterLineSpaceRule::Fix:
440  {
441  rRegDiff = rRegDiff + rSpace.GetInterLineSpace();
442  nNetHeight = rRegDiff;
443  break;
444  }
445  default: OSL_FAIL( ": unknown InterLineSpaceRule" );
446  }
447  pDesc->SetRegHeight( rRegDiff );
448  pDesc->SetRegAscent( rRegDiff - nNetHeight +
449  aFnt.GetAscent( pSh, *pOut ) );
450  pOut->SetMapMode( aOldMap );
451  }
452  }
453  }
454  const long nTmpDiff = pDesc->GetRegAscent() - rRegDiff;
455  if ( aRectFnSet.IsVert() )
456  rRegStart -= nTmpDiff;
457  else
458  rRegStart += nTmpDiff;
459  }
460  }
461  }
462  return ( 0 != rRegDiff );
463 }
464 
466 {
467 #ifdef DBG_UTIL
468  OutputDevice* pOut = const_cast<OutputDevice*>(rInf.GetOut());
470  Color aOldColor( pOut->GetFillColor() );
471  pOut->SetFillColor( aCol );
472  Point aPos( rInf.GetPos() );
473  aPos.AdjustY( -150 );
474  aPos.AdjustX( -25 );
475  SwRect aRect( aPos, Size( 100, 200 ) );
476  pOut->DrawRect( aRect.SVRect() );
477  pOut->SetFillColor( aOldColor );
478 #else
479  (void)rInf;
480 #endif
481 }
482 
484 {
485  Width( 0 );
486  rInf.GetTextFrame()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() + GetLen() );
487 
488  return false;
489 };
490 
492 {
493  if ( Width() ) // is only set during prepaint mode
494  {
495  rInf.DrawViewOpt( *this, PortionType::ControlChar );
496 
497  if ( !rInf.GetOpt().IsPagePreview() &&
498  !rInf.GetOpt().IsReadonly() &&
500  CHAR_ZWNBSP != mcChar )
501  {
502  SwFont aTmpFont( *rInf.GetFont() );
503  aTmpFont.SetEscapement( CHAR_ZWSP == mcChar ? DFLT_ESC_AUTO_SUB : -25 );
504  const sal_uInt16 nProp = 40;
505  aTmpFont.SetProportion( nProp ); // a smaller font
506  SwFontSave aFontSave( rInf, &aTmpFont );
507 
508  OUString aOutString;
509 
510  switch ( mcChar )
511  {
512  case CHAR_ZWSP :
513  aOutString = "/"; break;
514 // case CHAR_LRM :
515 // rText = sal_Unicode(0x2514); break;
516 // case CHAR_RLM :
517 // rText = sal_Unicode(0x2518); break;
518  }
519 
520  if ( !mnHalfCharWidth )
521  mnHalfCharWidth = rInf.GetTextSize( aOutString ).Width() / 2;
522 
523  Point aOldPos = rInf.GetPos();
524  Point aNewPos( aOldPos );
525  aNewPos.setX( aNewPos.X() + ( Width() / 2 ) - mnHalfCharWidth );
526  const_cast< SwTextPaintInfo& >( rInf ).SetPos( aNewPos );
527 
528  rInf.DrawText( aOutString, *this );
529 
530  const_cast< SwTextPaintInfo& >( rInf ).SetPos( aOldPos );
531  }
532  }
533 }
534 
536 {
537  const SwLinePortion* pRoot = rInf.GetRoot();
538  Width( 0 );
539  Height( pRoot->Height() );
540  SetAscent( pRoot->GetAscent() );
541 
542  return false;
543 }
544 
545 sal_uInt16 SwControlCharPortion::GetViewWidth( const SwTextSizeInfo& rInf ) const
546 {
547  if( !mnViewWidth )
548  mnViewWidth = rInf.GetTextSize(OUString(' ')).Width();
549 
550  return mnViewWidth;
551 }
552 
553 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SwLinePortion * Compress() override
Definition: porrst.cxx:88
vcl::RenderContext * GetOut() const
Definition: viewsh.hxx:341
void SetHasRotatedPortions(bool bHasRotatedPortions)
Definition: txtftn.cxx:85
bool GetValue() const
Base class of the Writer layout elements.
Definition: frame.hxx:295
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: porrst.cxx:483
const SvxLRSpaceItem & GetLRSpace(bool=true) const
Definition: frmatr.hxx:44
static Color & GetFieldShadingsColor()
Definition: viewopt.cxx:430
void DrawBackBrush(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1193
sal_uInt16 GetPropLineSpace() const
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
SwTwips EmptyHeight() const
Definition: porrst.cxx:204
bool IsPagePreview() const
Definition: viewopt.hxx:596
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:465
SwPageDesc * FindPageDesc()
Definition: pagechg.cxx:745
bool IsInDocBody() const
Definition: frame.hxx:919
SvxAdjust GetAdjust() const
SwFont & GetFont()
Definition: swfntcch.hxx:58
sal_uInt16 Height() const
Definition: possiz.hxx:44
SwFont * GetFont()
Definition: inftxt.hxx:238
sal_uInt16 mnViewWidth
Definition: porrst.hxx:134
bool IsSwapped() const
Definition: txtfrm.hxx:528
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:91
SwBreakPortion(const SwLinePortion &rPortion)
Definition: porrst.cxx:73
sal_uInt16 GetRegHeight() const
Definition: pagedesc.hxx:237
bool IsAnyObj(const SwRect &rRect) const
true when a frame or DrawObj must be taken in account.
Definition: txtfly.cxx:405
bool GetHasRotatedPortions() const
Definition: txtfrm.hxx:523
bool HasPara() const
Definition: txtfrm.hxx:812
Point aPos
Definition: porrst.hxx:88
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
Definition: doc.cxx:237
void SetCompletePaint() const
Definition: frame.hxx:970
SwArrowPortion(const SwLinePortion &rPortion)
Definition: porrst.cxx:177
bool IsInFootnote() const
Definition: frame.hxx:925
sal_uInt16 char char * pDesc
bool GetJoinBorderWithPrev() const
Definition: porlin.hxx:168
SwFrameType GetType() const
Definition: frame.hxx:498
const SwRect & getFramePrintArea() const
Definition: frame.hxx:176
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
sw::MergedPara * GetMergedPara()
Definition: txtfrm.hxx:440
The purpose of this class is to be the universal interface between formatting/text output and the pos...
Definition: txtfly.hxx:119
void SetLast(SwLinePortion *pNewLast)
Definition: inftxt.hxx:567
void DrawBorder(const SwLinePortion &rPor) const
Draw character border around a line portion.
Definition: inftxt.cxx:1340
bool HasFollow() const
Definition: flowfrm.hxx:165
virtual sal_uInt16 GetViewWidth(const SwTextSizeInfo &rInf) const override
Definition: porrst.cxx:85
SwParaPortion * GetPara()
Definition: txtcache.cxx:89
void Height(long nNew)
Definition: swrect.hxx:189
long SwTwips
Definition: swtypes.hxx:49
const SvxLineSpacingItem & GetLineSpacing(bool=true) const
Paragraph-attributes - implemented in paratr.hxx.
Definition: paratr.hxx:212
bool IsVert() const
Definition: frame.hxx:1343
void DrawText(const OUString &rText, const SwLinePortion &rPor, TextFrameIndex nIdx=TextFrameIndex(0), TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING), const bool bKern=false) const
Definition: inftxt.hxx:746
virtual TextFrameIndex GetCursorOfst(sal_uInt16 nOfst) const override
the parameter is actually SwTwips apparently?
Definition: porrst.cxx:80
void HideAndShowObjects()
Hides respectively shows objects, which are anchored at paragraph, at/as a character of the paragraph...
Definition: txtfrm.cxx:1536
bool const bGridKern
Definition: porrst.hxx:66
#define DFLT_ESC_AUTO_SUB
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
long GetPrtTop(const SwFrame &rFrame) const
Definition: frame.hxx:1385
SwPosSize GetTextSize(OutputDevice *pOut, const SwScriptInfo *pSI, const OUString &rText, TextFrameIndex nIdx, TextFrameIndex nLen) const
Definition: inftxt.cxx:384
virtual void Text(TextFrameIndex nLength, PortionType nType, sal_Int32 nHeight=0, sal_Int32 nWidth=0)=0
(empty) destructor
SvxLineSpaceRule GetLineSpaceRule() const
static bool IsShowChanges(const RedlineFlags eM)
void SetColor(const Color &rColor)
Definition: swfont.hxx:414
SwKernPortion(SwLinePortion &rPortion, short nKrn, bool bBG=false, bool bGridKern=false)
Definition: porrst.cxx:113
static OutputDevice * GetDefaultDevice()
const SwRegisterItem & GetRegister(bool=true) const
Definition: paratr.hxx:184
bool IsReadonly() const
Definition: viewopt.hxx:424
sal_uInt16 mnHalfCharWidth
Definition: porrst.hxx:135
virtual sal_uInt16 GetViewWidth(const SwTextSizeInfo &rInf) const override
Definition: porrst.cxx:545
sal_uInt16 GetLineHeight() const
void Top(const long nTop)
Definition: swrect.hxx:202
virtual void FormatEOL(SwTextFormatInfo &rInf) override
Definition: porrst.cxx:163
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:491
const SwRect & getFrameArea() const
Definition: frame.hxx:175
void setX(long nX)
bool getBrowseMode() const
Definition: viewopt.hxx:433
void ResetBlinkPor() const
Definition: txtfrm.hxx:877
Used by Attribute Iterators to organize attributes on stacks to find the valid attribute in each cate...
Definition: atrhndl.hxx:40
oslFileHandle & pOut
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: porrst.cxx:97
void Right(const long nRight)
Definition: swrect.hxx:198
void setY(long nY)
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
Definition: node.cxx:2053
void DrawRect(const tools::Rectangle &rRect)
SwFormatColl & GetAnyFormatColl() const
Definition: node.hxx:716
void SetUndersized(const bool bNew)
Definition: flowfrm.hxx:157
bool IsEmpty() const
Definition: txtfrm.hxx:511
sal_Unicode const mcChar
Definition: porrst.hxx:136
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:447
const SwViewOption & GetOpt() const
Definition: inftxt.hxx:245
virtual SwRedlineTable::size_type GetRedlinePos(const SwNode &rNode, RedlineType nType) const =0
SwTextNode const * GetTextNodeForParaProps() const
Definition: txtfrm.cxx:1290
void SetRegHeight(sal_uInt16 const nNew)
Definition: pagedesc.hxx:239
void Init(const SwAttrSet &rAttrSet, const IDocumentSettingAccess &rIDocumentSettingAccess)
Definition: atrstck.cxx:277
TextFrameIndex nLineLength
Definition: porlin.hxx:56
const IDocumentRedlineAccess & getIDocumentRedlineAccess() const
Provides access to the document redline interface.
Definition: node.cxx:2054
SvxAdjust
long AdjustY(long nVertMove)
bool IsCollapse() const
Definition: calcmove.cxx:1058
vcl::RenderContext * GetOut()
Definition: inftxt.hxx:231
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:197
void DrawLineBreak(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1031
SwPageFrame * FindPageFrame()
Definition: frame.hxx:658
void SetWhichPor(const PortionType nNew)
Definition: porlin.hxx:94
SwTextGridItem const * GetGridItem(SwPageFrame const *const)
Definition: pagechg.cxx:2514
vector_type::size_type size_type
Definition: docary.hxx:330
bool IsParagraph(bool bHard=false) const
Definition: viewopt.hxx:229
SwLayoutFrame * GetUpper()
Definition: frame.hxx:656
void SetFillColor()
const SvxAdjustItem & GetAdjust(bool=true) const
Definition: paratr.hxx:180
void CalcRect(const SwLinePortion &rPor, SwRect *pRect, SwRect *pIntersect=nullptr, const bool bInsideBox=false) const
Calculate the rectangular area where the portion takes place.
Definition: inftxt.cxx:787
const SwTextFormatColl * GetRegisterFormatColl() const
retrieve the style for the grid alignment
Definition: pagedesc.cxx:204
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:136
SwLineLayout * GetRoot()
Definition: inftxt.hxx:562
void SetEscapement(const short nNewEsc)
Definition: swfont.hxx:784
Provides access to settings of a document.
short const nKern
Definition: porrst.hxx:64
SvxInterLineSpaceRule GetInterLineSpaceRule() const
#define NON_PRINTING_CHARACTER_COLOR
Definition: txtfrm.hxx:50
#define CHAR_ZWSP
Definition: swtypes.hxx:177
TextFrameIndex GetIdx() const
Definition: inftxt.hxx:278
const IDocumentSettingAccess * getIDocumentSettingAccess() const
Provides access to the document setting interface.
Definition: node.cxx:2052
bool IsLineBreak(bool bHard=false) const
Definition: viewopt.hxx:235
void RemoveFromCache()
Removes this frame completely from the Cache.
Definition: txtcache.cxx:119
const SvxLineSpacingItem & GetLineSpacing(bool=true) const
Definition: paratr.hxx:178
bool HasSwAttrSet() const
Definition: node.hxx:444
void PrePaint(const SwTextPaintInfo &rInf, const SwLinePortion *pLast) const
Definition: porlin.cxx:79
void SSize(const Size &rNew)
Definition: swrect.hxx:176
static bool IsFieldShadings()
Definition: viewopt.hxx:632
bool FillRegister(SwTwips &rRegStart, sal_uInt16 &rRegDiff)
Determines the start position and step size of the register.
Definition: porrst.cxx:355
TextFrameIndex GetLen() const
Definition: porlin.hxx:74
A page of the document layout.
Definition: pagefrm.hxx:40
SwTextFrame * GetTextFrame()
Definition: inftxt.hxx:291
long X() const
bool IsPaintBlank() const
Definition: swfont.hxx:260
const OUString & GetText() const
Definition: inftxt.hxx:246
short GetInterLineSpace() const
bool const bBackground
Definition: porrst.hxx:65
SwLinePortion * mpNextPortion
Definition: porlin.hxx:54
virtual SwLinePortion * Compress() override
Definition: porrst.cxx:202
sal_uInt16 GetRegAscent() const
Definition: pagedesc.hxx:238
const Point & GetPos() const
Definition: inftxt.hxx:435
Base class for anything that can be part of a line in the Writer layout.
Definition: porlin.hxx:50
void Left(const long nLeft)
Definition: swrect.hxx:193
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
void Bottom(const long nBottom)
Definition: swrect.hxx:207
SwFontObj * Get()
Definition: swfntcch.cxx:56
tools::Rectangle SVRect() const
Definition: swrect.hxx:282
SwContentFrame * GetCurrFrame(const bool bCalcFrame=true) const
Get current frame in which the cursor is positioned.
Definition: crsrsh.cxx:2434
PortionType GetWhichPor() const
Definition: porlin.hxx:95
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: porrst.cxx:535
void ClearPara()
Removes the Line information from the Cache but retains the entry itself.
Definition: txtcache.cxx:103
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:426
vcl::Window * GetWin() const
Definition: viewsh.hxx:340
const SvxParaGridItem & GetParaGrid(bool=true) const
Definition: paratr.hxx:206
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:56
void AdjustFrame(const SwTwips nChgHeight, bool bHasToFit=false)
Definition: frmform.cxx:363
bool OnWin() const
Definition: inftxt.hxx:199
bool IsRightToLeft() const
Definition: frame.hxx:963
bool FormatEmpty()
Definition: porrst.cxx:278
bool IsPageFrame() const
Definition: frame.hxx:1154
SwLinePortion * FindPrevPortion(const SwLinePortion *pRoot)
Definition: porlin.cxx:211
bool InTextGrp() const
Definition: porlin.hxx:98
virtual OutputDevice * getReferenceDevice(bool bCreate) const =0
Returns the current reference device.
sal_uInt16 Width() const
Definition: possiz.hxx:46
bool IsPrtFormat() const
Definition: viewopt.hxx:502
SwLinePortion * GetLast()
Definition: inftxt.hxx:566
long GetHeight(const SwRect &rRect) const
Definition: frame.hxx:1358
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
Definition: rootfrm.hxx:416
#define CHAR_ZWNBSP
Definition: swtypes.hxx:178
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
Definition: node.hxx:723
void SetAscent(const sal_uInt16 nNewAsc)
Definition: porlin.hxx:79
bool IsVertical() const
Definition: frame.hxx:949
void SetNewLine(const bool bNew)
Definition: inftxt.hxx:584
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
SwDoc & GetDoc()
Definition: txtfrm.hxx:450
bool IsOn() const
Definition: txtfly.hxx:313
const sal_Unicode CH_PAR
Definition: swfont.hxx:45
bool HasBlinkPor() const
Definition: txtfrm.hxx:521
virtual void FormatEOL(SwTextFormatInfo &rInf)
Definition: porlin.cxx:267
sal_uInt16 GetBaseHeight() const
Definition: tgrditem.hxx:75
bool GetJoinBorderWithNext() const
Definition: porlin.hxx:169
SwLinePortion * GetNextPortion() const
Definition: porlin.hxx:72
void SetEmpty(const bool bNew)
Definition: txtfrm.hxx:239
SwViewShell * GetCurrShell() const
Definition: rootfrm.hxx:204
virtual void HandlePortion(SwPortionHandler &rPH) const override
Definition: porrst.cxx:108
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
Definition: fmtcol.cxx:74
static constexpr size_type npos
Definition: docary.hxx:331
bool IsAutoFirst() const
sal_uInt16 GetRubyHeight() const
Definition: tgrditem.hxx:78
sal_uInt16 & GetAscent()
Definition: porlin.hxx:77
virtual SwLinePortion * Insert(SwLinePortion *pPortion)
Definition: porlin.cxx:170
SwRootFrame * getRootFrame()
Definition: frame.hxx:657
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich) const
Definition: inftxt.cxx:1352
void SetRegAscent(sal_uInt16 const nNew)
Definition: pagedesc.hxx:240
void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd)
Definition: txtfrm.cxx:1442
const Color & GetFillColor() const
SwTmpEndPortion(const SwLinePortion &rPortion)
Definition: porrst.cxx:49
void ChgClip(const SwRect &rRect, const SwTextFrame *pFrame=nullptr, bool bEnlargeRect=false)
Definition: txtpaint.hxx:44
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo