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 <hintids.hxx>
21 #include <sfx2/printer.hxx>
22 #include <editeng/lspcitem.hxx>
23 #include <editeng/adjustitem.hxx>
25 #include <editeng/lrspitem.hxx>
26 #include <editeng/pgrditem.hxx>
27 #include <vcl/svapp.hxx>
28 #include <viewsh.hxx>
29 #include <viewopt.hxx>
30 #include <ndtxt.hxx>
31 #include <pagefrm.hxx>
32 #include <paratr.hxx>
33 #include <SwPortionHandler.hxx>
34 #include "porrst.hxx"
35 #include "inftxt.hxx"
36 #include "txtpaint.hxx"
37 #include <swfntcch.hxx>
38 #include <tgrditem.hxx>
39 #include <pagedesc.hxx>
40 #include <frmatr.hxx>
41 #include "redlnitr.hxx"
42 #include "porfly.hxx"
43 #include "atrhndl.hxx"
44 #include <rootfrm.hxx>
45 
49 
50 #include <crsrsh.hxx>
51 
53 {
54  Height( rPortion.Height() );
55  SetAscent( rPortion.GetAscent() );
57 }
58 
59 void SwTmpEndPortion::Paint( const SwTextPaintInfo &rInf ) const
60 {
61  if (rInf.OnWin() && rInf.GetOpt().IsParagraph())
62  {
63  const SwFont* pOldFnt = rInf.GetFont();
64 
65  SwFont aFont(*pOldFnt);
67  const_cast<SwTextPaintInfo&>(rInf).SetFont(&aFont);
68 
69  // draw the pilcrow
70  rInf.DrawText(OUString(CH_PAR), *this);
71 
72  const_cast<SwTextPaintInfo&>(rInf).SetFont(const_cast<SwFont*>(pOldFnt));
73  }
74 }
75 
77  : SwLinePortion( rPortion )
78 {
81 }
82 
84 {
85  return TextFrameIndex(0);
86 }
87 
88 sal_uInt16 SwBreakPortion::GetViewWidth( const SwTextSizeInfo & ) const
89 { return 0; }
90 
92 { return (GetNextPortion() && GetNextPortion()->InTextGrp() ? nullptr : this); }
93 
94 void SwBreakPortion::Paint( const SwTextPaintInfo &rInf ) const
95 {
96  if( rInf.OnWin() && rInf.GetOpt().IsLineBreak() )
97  rInf.DrawLineBreak( *this );
98 }
99 
101 {
102  const SwLinePortion *pRoot = rInf.GetRoot();
103  Width( 0 );
104  Height( pRoot->Height() );
105  SetAscent( pRoot->GetAscent() );
106  if (rInf.GetIdx() + TextFrameIndex(1) == TextFrameIndex(rInf.GetText().getLength()))
107  rInf.SetNewLine( true );
108  return true;
109 }
110 
112 {
113  rPH.Text( GetLen(), GetWhichPor() );
114 }
115 
117  bool bBG, bool bGK ) :
118  nKern( nKrn ), bBackground( bBG ), bGridKern( bGK )
119 {
120  Height( rPortion.Height() );
121  SetAscent( rPortion.GetAscent() );
124  if( nKern > 0 )
125  Width( nKern );
126  rPortion.Insert( this );
127 }
128 
130  nKern( 0 ), bBackground( false ), bGridKern( true )
131 {
132  Height( rPortion.Height() );
133  SetAscent( rPortion.GetAscent() );
134 
137 }
138 
139 void SwKernPortion::Paint( const SwTextPaintInfo &rInf ) const
140 {
141  if( Width() )
142  {
143  // bBackground is set for Kerning Portions between two fields
144  if ( bBackground )
145  rInf.DrawViewOpt( *this, PortionType::Field );
146 
147  rInf.DrawBackBrush( *this );
149  rInf.DrawBorder( *this );
150 
151  // do we have to repaint a post it portion?
152  if( rInf.OnWin() && mpNextPortion && !mpNextPortion->Width() )
153  mpNextPortion->PrePaint( rInf, this );
154 
155  if( rInf.GetFont()->IsPaintBlank() )
156  {
157  SwRect aClipRect;
158  rInf.CalcRect( *this, &aClipRect );
159  SwSaveClip aClip( const_cast<OutputDevice*>(rInf.GetOut()) );
160  aClip.ChgClip( aClipRect );
161  rInf.DrawText(" ", *this, TextFrameIndex(0), TextFrameIndex(2), true );
162  }
163  }
164 }
165 
167 {
168  if ( bGridKern )
169  return;
170 
171  if( rInf.GetLast() == this )
172  rInf.SetLast( FindPrevPortion( rInf.GetRoot() ) );
173  if( nKern < 0 )
174  Width( -nKern );
175  else
176  Width( 0 );
177  rInf.GetLast()->FormatEOL( rInf );
178 }
179 
181  bLeft( true )
182 {
183  Height( rPortion.Height() );
184  SetAscent( rPortion.GetAscent() );
187 }
188 
190  : bLeft( false )
191 {
192  Height( static_cast<sal_uInt16>(rInf.GetTextFrame()->getFramePrintArea().Height()) );
193  aPos.setX( rInf.GetTextFrame()->getFrameArea().Left() +
194  rInf.GetTextFrame()->getFramePrintArea().Right() );
195  aPos.setY( rInf.GetTextFrame()->getFrameArea().Top() +
196  rInf.GetTextFrame()->getFramePrintArea().Bottom() );
198 }
199 
200 void SwArrowPortion::Paint( const SwTextPaintInfo &rInf ) const
201 {
202  const_cast<SwArrowPortion*>(this)->aPos = rInf.GetPos();
203 }
204 
206 
208 {
209  if (IsCollapse()) {
211  if ( dynamic_cast<const SwCursorShell*>( pSh ) != nullptr ) {
212  SwCursorShell *pCrSh = static_cast<SwCursorShell*>(pSh);
213  // this is called during formatting so avoid recursive layout
214  SwContentFrame const*const pCurrFrame = pCrSh->GetCurrFrame(false);
215  if (pCurrFrame==static_cast<SwContentFrame const *>(this)) {
216  // do nothing
217  } else {
218  return 1;
219  }
220  } else {
221  return 1;
222  }
223  }
224  OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::EmptyHeight with swapped frame" );
225 
226  std::unique_ptr<SwFont> pFnt;
227  const SwTextNode& rTextNode = *GetTextNodeForParaProps();
228  const IDocumentSettingAccess* pIDSA = rTextNode.getIDocumentSettingAccess();
230  if ( rTextNode.HasSwAttrSet() )
231  {
232  const SwAttrSet *pAttrSet = &( rTextNode.GetSwAttrSet() );
233  pFnt.reset(new SwFont( pAttrSet, pIDSA ));
234  }
235  else
236  {
237  SwFontAccess aFontAccess( &rTextNode.GetAnyFormatColl(), pSh);
238  pFnt.reset(new SwFont( aFontAccess.Get()->GetFont() ));
239  pFnt->CheckFontCacheId( pSh, pFnt->GetActual() );
240  }
241 
242  if ( IsVertical() )
243  pFnt->SetVertical( 2700 );
244 
245  OutputDevice* pOut = pSh ? pSh->GetOut() : nullptr;
246  if ( !pOut || !pSh->GetViewOptions()->getBrowseMode() ||
247  pSh->GetViewOptions()->IsPrtFormat() )
248  {
249  pOut = rTextNode.getIDocumentDeviceAccess().getReferenceDevice(true);
250  }
251 
252  const IDocumentRedlineAccess& rIDRA = rTextNode.getIDocumentRedlineAccess();
254  && !getRootFrame()->IsHideRedlines())
255  {
256  const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, RedlineType::Any );
257  if( SwRedlineTable::npos != nRedlPos )
258  {
259  SwAttrHandler aAttrHandler;
260  aAttrHandler.Init(rTextNode.GetSwAttrSet(),
261  *rTextNode.getIDocumentSettingAccess());
262  SwRedlineItr aRedln( rTextNode, *pFnt, aAttrHandler,
263  nRedlPos, SwRedlineItr::Mode::Show);
264  }
265  }
266 
267  SwTwips nRet;
268  if( !pOut )
269  nRet = IsVertical() ?
270  getFramePrintArea().SSize().Width() + 1 :
271  getFramePrintArea().SSize().Height() + 1;
272  else
273  {
274  pFnt->SetFntChg( true );
275  pFnt->ChgPhysFnt( pSh, *pOut );
276  nRet = pFnt->GetHeight( pSh, *pOut );
277  }
278  return nRet;
279 }
280 
282 {
283  OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::FormatEmpty with swapped frame" );
284 
285  bool bCollapse = EmptyHeight( ) == 1 && IsCollapse( );
286 
287  // sw_redlinehide: just disable FormatEmpty optimisation for now
288  if (HasFollow() || GetMergedPara() || GetTextNodeFirst()->GetpSwpHints() ||
289  nullptr != GetTextNodeForParaProps()->GetNumRule() ||
290  GetTextNodeFirst()->HasHiddenCharAttribute(true) ||
291  IsInFootnote() || ( HasPara() && GetPara()->IsPrepMustFit() ) )
292  return false;
294  const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust();
295  if( !bCollapse && ( ( ( ! IsRightToLeft() && ( SvxAdjust::Left != nAdjust ) ) ||
296  ( IsRightToLeft() && ( SvxAdjust::Right != nAdjust ) ) ) ||
297  aSet.GetRegister().GetValue() ) )
298  return false;
299  const SvxLineSpacingItem &rSpacing = aSet.GetLineSpacing();
300  if( !bCollapse && ( SvxLineSpaceRule::Min == rSpacing.GetLineSpaceRule() ||
301  SvxLineSpaceRule::Fix == rSpacing.GetLineSpaceRule() ||
302  aSet.GetLRSpace().IsAutoFirst() ) )
303  return false;
304 
305  SwTextFly aTextFly( this );
306  SwRect aRect;
307  bool bFirstFlyCheck = 0 != getFramePrintArea().Height();
308  if ( !bCollapse && bFirstFlyCheck &&
309  aTextFly.IsOn() && aTextFly.IsAnyObj( aRect ) )
310  return false;
311 
312  SwTwips nHeight = EmptyHeight();
313 
314  if (aSet.GetParaGrid().GetValue() &&
315  IsInDocBody() )
316  {
317  SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame()));
318  if ( pGrid )
319  nHeight = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
320  }
321 
322  SwRectFnSet aRectFnSet(this);
323  const SwTwips nChg = nHeight - aRectFnSet.GetHeight(getFramePrintArea());
324 
325  if( !nChg )
326  SetUndersized( false );
327  AdjustFrame( nChg );
328 
329  if( HasBlinkPor() )
330  {
331  ClearPara();
332  ResetBlinkPor();
333  }
334  RemoveFromCache();
335  if( !IsEmpty() )
336  {
337  SetEmpty( true );
339  }
340  if( !bCollapse && !bFirstFlyCheck &&
341  aTextFly.IsOn() && aTextFly.IsAnyObj( aRect ) )
342  return false;
343 
344  // #i35635# - call method <HideAndShowObjects()>
345  // to assure that objects anchored at the empty paragraph are
346  // correctly visible resp. invisible.
348  return true;
349 }
350 
351 bool SwTextFrame::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
352 {
353  const SwFrame *pFrame = this;
354  rRegDiff = 0;
355  while( !( ( SwFrameType::Body | SwFrameType::Fly )
356  & pFrame->GetType() ) && pFrame->GetUpper() )
357  pFrame = pFrame->GetUpper();
358  if( ( SwFrameType::Body| SwFrameType::Fly ) & pFrame->GetType() )
359  {
360  SwRectFnSet aRectFnSet(pFrame);
361  rRegStart = aRectFnSet.GetPrtTop(*pFrame);
362  pFrame = pFrame->FindPageFrame();
363  if( pFrame->IsPageFrame() )
364  {
365  SwPageDesc* pDesc = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pFrame))->FindPageDesc();
366  if( pDesc )
367  {
368  rRegDiff = pDesc->GetRegHeight();
369  if( !rRegDiff )
370  {
371  const SwTextFormatColl *pFormat = pDesc->GetRegisterFormatColl();
372  if( pFormat )
373  {
374  const SvxLineSpacingItem &rSpace = pFormat->GetLineSpacing();
375  if( SvxLineSpaceRule::Fix == rSpace.GetLineSpaceRule() )
376  {
377  rRegDiff = rSpace.GetLineHeight();
378  pDesc->SetRegHeight( rRegDiff );
379  pDesc->SetRegAscent( ( 4 * rRegDiff ) / 5 );
380  }
381  else
382  {
384  SwFontAccess aFontAccess( pFormat, pSh );
385  SwFont aFnt( aFontAccess.Get()->GetFont() );
386 
387  OutputDevice *pOut = nullptr;
388  if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ||
389  pSh->GetViewOptions()->IsPrtFormat() )
391 
392  if( pSh && !pOut )
393  pOut = pSh->GetWin();
394 
395  if( !pOut )
397 
398  MapMode aOldMap( pOut->GetMapMode() );
399  pOut->SetMapMode( MapMode( MapUnit::MapTwip ) );
400 
401  aFnt.ChgFnt( pSh, *pOut );
402  rRegDiff = aFnt.GetHeight( pSh, *pOut );
403  sal_uInt16 nNetHeight = rRegDiff;
404 
405  switch( rSpace.GetLineSpaceRule() )
406  {
407  case SvxLineSpaceRule::Auto:
408  break;
409  case SvxLineSpaceRule::Min:
410  {
411  if( rRegDiff < rSpace.GetLineHeight() )
412  rRegDiff = rSpace.GetLineHeight();
413  break;
414  }
415  default:
416  OSL_FAIL( ": unknown LineSpaceRule" );
417  }
418  switch( rSpace.GetInterLineSpaceRule() )
419  {
420  case SvxInterLineSpaceRule::Off:
421  break;
422  case SvxInterLineSpaceRule::Prop:
423  {
424  long nTmp = rSpace.GetPropLineSpace();
425  if( nTmp < 50 )
426  nTmp = nTmp ? 50 : 100;
427  nTmp *= rRegDiff;
428  nTmp /= 100;
429  if( !nTmp )
430  ++nTmp;
431  rRegDiff = static_cast<sal_uInt16>(nTmp);
432  nNetHeight = rRegDiff;
433  break;
434  }
435  case SvxInterLineSpaceRule::Fix:
436  {
437  rRegDiff = rRegDiff + rSpace.GetInterLineSpace();
438  nNetHeight = rRegDiff;
439  break;
440  }
441  default: OSL_FAIL( ": unknown InterLineSpaceRule" );
442  }
443  pDesc->SetRegHeight( rRegDiff );
444  pDesc->SetRegAscent( rRegDiff - nNetHeight +
445  aFnt.GetAscent( pSh, *pOut ) );
446  pOut->SetMapMode( aOldMap );
447  }
448  }
449  }
450  const long nTmpDiff = pDesc->GetRegAscent() - rRegDiff;
451  if ( aRectFnSet.IsVert() )
452  rRegStart -= nTmpDiff;
453  else
454  rRegStart += nTmpDiff;
455  }
456  }
457  }
458  return ( 0 != rRegDiff );
459 }
460 
462 {
463 #ifdef DBG_UTIL
464  OutputDevice* pOut = const_cast<OutputDevice*>(rInf.GetOut());
466  Color aOldColor( pOut->GetFillColor() );
467  pOut->SetFillColor( aCol );
468  Point aPos( rInf.GetPos() );
469  aPos.AdjustY( -150 );
470  aPos.AdjustX( -25 );
471  SwRect aRect( aPos, Size( 100, 200 ) );
472  pOut->DrawRect( aRect.SVRect() );
473  pOut->SetFillColor( aOldColor );
474 #else
475  (void)rInf;
476 #endif
477 }
478 
480 {
481  Width( 0 );
482  rInf.GetTextFrame()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() + GetLen() );
483 
484  return false;
485 };
486 
488 {
489  if ( Width() ) // is only set during prepaint mode
490  {
491  rInf.DrawViewOpt( *this, PortionType::ControlChar );
492 
493  if ( !rInf.GetOpt().IsPagePreview() &&
494  !rInf.GetOpt().IsReadonly() &&
496  CHAR_ZWNBSP != mcChar )
497  {
498  SwFont aTmpFont( *rInf.GetFont() );
499  aTmpFont.SetEscapement( CHAR_ZWSP == mcChar ? DFLT_ESC_AUTO_SUB : -25 );
500  const sal_uInt16 nProp = 40;
501  aTmpFont.SetProportion( nProp ); // a smaller font
502  SwFontSave aFontSave( rInf, &aTmpFont );
503 
504  OUString aOutString;
505 
506  switch ( mcChar )
507  {
508  case CHAR_ZWSP :
509  aOutString = "/"; break;
510 // case CHAR_LRM :
511 // rText = sal_Unicode(0x2514); break;
512 // case CHAR_RLM :
513 // rText = sal_Unicode(0x2518); break;
514  }
515 
516  if ( !mnHalfCharWidth )
517  mnHalfCharWidth = rInf.GetTextSize( aOutString ).Width() / 2;
518 
519  Point aOldPos = rInf.GetPos();
520  Point aNewPos( aOldPos );
521  aNewPos.setX( aNewPos.X() + ( Width() / 2 ) - mnHalfCharWidth );
522  const_cast< SwTextPaintInfo& >( rInf ).SetPos( aNewPos );
523 
524  rInf.DrawText( aOutString, *this );
525 
526  const_cast< SwTextPaintInfo& >( rInf ).SetPos( aOldPos );
527  }
528  }
529 }
530 
532 {
533  const SwLinePortion* pRoot = rInf.GetRoot();
534  Width( 0 );
535  Height( pRoot->Height() );
536  SetAscent( pRoot->GetAscent() );
537 
538  return false;
539 }
540 
541 sal_uInt16 SwControlCharPortion::GetViewWidth( const SwTextSizeInfo& rInf ) const
542 {
543  if( !mnViewWidth )
544  mnViewWidth = rInf.GetTextSize(OUString(' ')).Width();
545 
546  return mnViewWidth;
547 }
548 
549 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SwLinePortion * Compress() override
Definition: porrst.cxx:91
vcl::RenderContext * GetOut() const
Definition: viewsh.hxx:341
bool GetValue() const
Base class of the Writer layout elements.
Definition: frame.hxx:295
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: porrst.cxx:479
const SvxLRSpaceItem & GetLRSpace(bool=true) const
Definition: frmatr.hxx:44
static Color & GetFieldShadingsColor()
Definition: viewopt.cxx:433
void DrawBackBrush(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1123
sal_uInt16 GetPropLineSpace() const
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
SwTwips EmptyHeight() const
Definition: porrst.cxx:207
bool IsPagePreview() const
Definition: viewopt.hxx:596
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:461
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:524
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:94
SwBreakPortion(const SwLinePortion &rPortion)
Definition: porrst.cxx:76
sal_uInt16 GetRegHeight() const
Definition: pagedesc.hxx:237
bool IsAnyObj(const SwRect &rRect) const
true when a frame or DrawObj must to be taken in account.
Definition: txtfly.cxx:412
bool HasPara() const
Definition: txtfrm.hxx:808
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:180
bool IsInFootnote() const
Definition: frame.hxx:925
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:438
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:1270
bool HasFollow() const
Definition: flowfrm.hxx:165
virtual sal_uInt16 GetViewWidth(const SwTextSizeInfo &rInf) const override
Definition: porrst.cxx:88
SwParaPortion * GetPara()
Definition: txtcache.cxx:89
void Height(long nNew)
Definition: swrect.hxx:189
sal_uInt16 sal_Char sal_Char * pDesc
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:83
void HideAndShowObjects()
Hides respectively shows objects, which are anchored at paragraph, at/as a character of the paragraph...
Definition: txtfrm.cxx:1546
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:386
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:116
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:541
sal_uInt16 GetLineHeight() const
void Top(const long nTop)
Definition: swrect.hxx:202
virtual void FormatEOL(SwTextFormatInfo &rInf) override
Definition: porrst.cxx:166
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: porrst.cxx:487
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:873
Used by Attribute Iterators to organize attributes on stacks to find the valid attribute in each cate...
Definition: atrhndl.hxx:40
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: porrst.cxx:100
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:509
sal_Unicode const mcChar
Definition: porrst.hxx:136
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:445
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:1300
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:200
void DrawLineBreak(const SwLinePortion &rPor) const
Definition: inftxt.cxx:961
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:717
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:139
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:81
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:351
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:205
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:2426
PortionType GetWhichPor() const
Definition: porlin.hxx:95
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: porrst.cxx:531
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:59
void AdjustFrame(const SwTwips nChgHeight, bool bHasToFit=false)
Definition: frmform.cxx:366
bool OnWin() const
Definition: inftxt.hxx:199
bool IsRightToLeft() const
Definition: frame.hxx:963
bool FormatEmpty()
Definition: porrst.cxx:281
bool IsPageFrame() const
Definition: frame.hxx:1154
SwLinePortion * FindPrevPortion(const SwLinePortion *pRoot)
Definition: porlin.cxx:213
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:448
bool IsOn() const
Definition: txtfly.hxx:313
const sal_Unicode CH_PAR
Definition: swfont.hxx:45
bool HasBlinkPor() const
Definition: txtfrm.hxx:519
virtual void FormatEOL(SwTextFormatInfo &rInf)
Definition: porlin.cxx:269
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:237
SwViewShell * GetCurrShell() const
Definition: rootfrm.hxx:204
virtual void HandlePortion(SwPortionHandler &rPH) const override
Definition: porrst.cxx:111
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:172
SwRootFrame * getRootFrame()
Definition: frame.hxx:657
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich) const
Definition: inftxt.cxx:1282
void SetRegAscent(sal_uInt16 const nNew)
Definition: pagedesc.hxx:240
void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd)
Definition: txtfrm.cxx:1452
const Color & GetFillColor() const
SwTmpEndPortion(const SwLinePortion &rPortion)
Definition: porrst.cxx:52
void ChgClip(const SwRect &rRect, const SwTextFrame *pFrame=nullptr, bool bEnlargeRect=false)
Definition: txtpaint.hxx:44
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo