LibreOffice Module sw (master)  1
inftxt.hxx
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 #pragma once
20 
21 #include <memory>
22 #include <com/sun/star/beans/PropertyValues.hpp>
23 
24 #include <map>
25 
26 #include <swtypes.hxx>
27 #include <swrect.hxx>
28 #include <txtfly.hxx>
29 #include <swfont.hxx>
30 #include "porlay.hxx"
31 #include <txtfrm.hxx>
32 #include <ndtxt.hxx>
34 
35 namespace com::sun::star::linguistic2 { class XHyphenatedWord; }
36 
37 class SvxBrushItem;
38 class SvxLineSpacingItem;
39 class SvxTabStop;
40 class SvxTabStopItem;
41 class SwFlyPortion;
42 class SwFormatDrop;
43 class SwLinePortion;
44 class SwTabPortion;
45 class SwViewOption;
46 class SwViewShell;
47 class SwAttrIter;
48 struct SwMultiCreator;
49 class SwMultiPortion;
50 namespace sw { class WrongListIterator; }
51 
52 #define ARROW_WIDTH 200
53 #define DIR_LEFT2RIGHT 0
54 #define DIR_BOTTOM2TOP 1
55 #define DIR_RIGHT2LEFT 2
56 #define DIR_TOP2BOTTOM 3
57 
58 // Respects the attribute LineSpace when calculating the Height/Ascent
60 {
61  friend class SwTextIter;
62 
63  std::unique_ptr<SvxTabStopItem> m_pRuler;
66  sal_uInt16 m_nDefTabStop;
69 
70  void CtorInitLineInfo( const SwAttrSet& rAttrSet,
71  const SwTextNode& rTextNode );
72 
73  SwLineInfo();
74  ~SwLineInfo();
75 public:
76  // #i24363# tab stops relative to indent - returns the tab stop following nSearchPos or NULL
77  const SvxTabStop *GetTabStop( const SwTwips nSearchPos,
78  const SwTwips nRight ) const;
79  const SvxLineSpacingItem *GetLineSpacing() const { return m_pSpace; }
80  sal_uInt16 GetDefTabStop() const { return m_nDefTabStop; }
81  void SetDefTabStop( sal_uInt16 nNew ) const
82  { const_cast<SwLineInfo*>(this)->m_nDefTabStop = nNew; }
83 
84  // vertical alignment
86  bool HasSpecialAlign( bool bVert ) const
87  { return bVert ?
89  ( SvxParaVertAlignItem::Align::Baseline != m_nVertAlign &&
90  SvxParaVertAlignItem::Align::Automatic != m_nVertAlign ); }
91 
92  sal_uInt16 NumberOfTabStops() const;
93 
94  bool IsListTabStopIncluded() const
95  {
97  }
99  {
100  return m_nListTabStopPosition;
101  }
102 };
103 
105 {
106  // Implementation in txthyph.cxx
107  friend void SetParaPortion( SwTextInfo *pInf, SwParaPortion *pRoot );
109  TextFrameIndex m_nTextStart; // TextOfst for Follows
110 
111 protected:
113  : m_pPara(nullptr)
114  , m_nTextStart(0)
115  {}
116 
117 public:
118  void CtorInitTextInfo( SwTextFrame *pFrame );
119  SwTextInfo( const SwTextInfo &rInf );
120  explicit SwTextInfo( SwTextFrame *pFrame ) { CtorInitTextInfo( pFrame ); }
122  const SwParaPortion *GetParaPortion() const { return m_pPara; }
124 };
125 
127 {
128 private:
129  typedef std::map< SwLinePortion const *, sal_uInt16 > SwTextPortionMap;
130 
131 protected:
132  // during formatting, a small database is built, mapping portion pointers
133  // to their maximum size (used for kana compression)
134  SwTextPortionMap m_aMaxWidth;
135  // for each line, an array of compression values is calculated
136  // this array is passed over to the info structure
137  std::deque<sal_uInt16>* m_pKanaComp;
138 
140 
141  // m_pOut is the output device, m_pRef is the device used for formatting
144 
145  // performance hack - this is only used by SwTextFormatInfo but
146  // because it's not even possible to dynamic_cast these things
147  // currently it has to be stored here
148  std::shared_ptr<vcl::TextLayoutCache> m_pCachedVclData;
149 
151  SwUnderlineFont *m_pUnderFnt; // Font for underlining
154  const OUString *m_pText;
157  sal_uInt16 m_nKanaIdx;
158  bool m_bOnWin : 1;
159  bool m_bNotEOL : 1;
160  bool m_bURLNotify : 1;
161  bool m_bStopUnderflow : 1; // Underflow was stopped e.g. by a FlyPortion
162  bool m_bFootnoteInside : 1; // the current line contains a footnote
163  bool m_bOtherThanFootnoteInside : 1; // the current line contains another portion than a footnote portion.
164  // needed for checking keep together of footnote portion with previous portion
165  bool m_bMulti : 1; // inside a multiportion
166  bool m_bFirstMulti : 1; // this flag is used for two purposes:
167  // - the multiportion is the first lineportion
168  // - indicates, if we are currently in second
169  // line of multi portion
170  bool m_bRuby : 1; // during the formatting of a phonetic line
171  bool m_bHanging : 1; // formatting of hanging punctuation allowed
172  bool m_bScriptSpace : 1; // space between different scripts (Asian/Latin)
173  bool m_bForbiddenChars : 1; // Forbidden start/endline characters
174  bool m_bSnapToGrid : 1; // paragraph snaps to grid
175  sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree
176 
177 protected:
178  void CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame,
179  TextFrameIndex nIdx);
180  SwTextSizeInfo();
181 public:
182  SwTextSizeInfo( const SwTextSizeInfo &rInf );
183  SwTextSizeInfo( const SwTextSizeInfo &rInf, const OUString* pText,
184  TextFrameIndex nIdx = TextFrameIndex(0) );
185  SwTextSizeInfo(SwTextFrame *pTextFrame, TextFrameIndex nIndex = TextFrameIndex(0));
186 
187  // GetMultiAttr returns the text attribute of the multiportion,
188  // if rPos is inside any multi-line part.
189  // rPos will set to the end of the multi-line part.
190  std::unique_ptr<SwMultiCreator> GetMultiCreator(TextFrameIndex &rPos, SwMultiPortion const* pM) const;
191 
192  bool OnWin() const { return m_bOnWin; }
193  void SetOnWin( const bool bNew ) { m_bOnWin = bNew; }
194  bool NotEOL() const { return m_bNotEOL; }
195  void SetNotEOL( const bool bNew ) { m_bNotEOL = bNew; }
196  bool URLNotify() const { return m_bURLNotify; }
197  bool StopUnderflow() const { return m_bStopUnderflow; }
198  void SetStopUnderflow( const bool bNew ) { m_bStopUnderflow = bNew; }
199  bool IsFootnoteInside() const { return m_bFootnoteInside; }
200  void SetFootnoteInside( const bool bNew ) { m_bFootnoteInside = bNew; }
202  void SetOtherThanFootnoteInside( const bool bNew ) { m_bOtherThanFootnoteInside = bNew; }
203  bool IsMulti() const { return m_bMulti; }
204  void SetMulti( const bool bNew ) { m_bMulti = bNew; }
205  bool IsFirstMulti() const { return m_bFirstMulti; }
206  void SetFirstMulti( const bool bNew ) { m_bFirstMulti = bNew; }
207  bool IsRuby() const { return m_bRuby; }
208  void SetRuby( const bool bNew ) { m_bRuby = bNew; }
209  bool IsHanging() const { return m_bHanging; }
210  void SetHanging( const bool bNew ) { m_bHanging = bNew; }
211  bool HasScriptSpace() const { return m_bScriptSpace; }
212  void SetScriptSpace( const bool bNew ) { m_bScriptSpace = bNew; }
213  bool HasForbiddenChars() const { return m_bForbiddenChars; }
214  void SetForbiddenChars( const bool bN ) { m_bForbiddenChars = bN; }
215  bool SnapToGrid() const { return m_bSnapToGrid; }
216  void SetSnapToGrid( const bool bN ) { m_bSnapToGrid = bN; }
217  sal_uInt8 GetDirection() const { return m_nDirection; }
218  void SetDirection( const sal_uInt8 nNew ) { m_nDirection = nNew; }
219  bool IsRotated() const { return ( 1 & m_nDirection ); }
220 
221  SwViewShell *GetVsh() { return m_pVsh; }
222  const SwViewShell *GetVsh() const { return m_pVsh; }
223 
225  const vcl::RenderContext *GetOut() const { return m_pOut; }
226  void SetOut( OutputDevice* pNewOut ) { m_pOut = pNewOut; }
227 
229  const vcl::RenderContext *GetRefDev() const { return m_pRef; }
230 
231  SwFont *GetFont() { return m_pFnt; }
232  const SwFont *GetFont() const { return m_pFnt; }
233  void SetFont( SwFont *pNew ) { m_pFnt = pNew; }
234  void SelectFont();
235  void SetUnderFnt( SwUnderlineFont* pNew ) { m_pUnderFnt = pNew; }
237 
238  const SwViewOption &GetOpt() const { return *m_pOpt; }
239  const OUString &GetText() const { return *m_pText; }
240  sal_Unicode GetChar(TextFrameIndex const nPos) const {
241  if (m_pText && nPos < TextFrameIndex(m_pText->getLength())) return (*m_pText)[sal_Int32(nPos)];
242  return 0;
243  }
244 
245  sal_uInt16 GetTextHeight() const;
246 
247  SwPosSize GetTextSize( OutputDevice* pOut, const SwScriptInfo* pSI,
248  const OUString& rText, TextFrameIndex nIdx,
249  TextFrameIndex nLen ) const;
250  SwPosSize GetTextSize() const;
251  void GetTextSize( const SwScriptInfo* pSI, TextFrameIndex nIdx,
252  TextFrameIndex nLen, const sal_uInt16 nComp,
253  sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff,
254  vcl::TextLayoutCache const* = nullptr) const;
255  inline SwPosSize GetTextSize(const SwScriptInfo* pSI, TextFrameIndex nIdx,
256  TextFrameIndex nLen) const;
257  inline SwPosSize GetTextSize( const OUString &rText ) const;
258 
259  TextFrameIndex GetTextBreak( const tools::Long nLineWidth,
260  const TextFrameIndex nMaxLen,
261  const sal_uInt16 nComp,
262  vcl::TextLayoutCache const*) const;
263  TextFrameIndex GetTextBreak( const tools::Long nLineWidth,
264  const TextFrameIndex nMaxLen,
265  const sal_uInt16 nComp,
266  TextFrameIndex& rExtraCharPos,
267  vcl::TextLayoutCache const*) const;
268 
269  sal_uInt16 GetAscent() const;
270 
271  TextFrameIndex GetIdx() const { return m_nIdx; }
272  void SetIdx(const TextFrameIndex nNew) { m_nIdx = nNew; }
273  TextFrameIndex GetLen() const { return m_nLen; }
274  void SetLen(const TextFrameIndex nNew) { m_nLen = nNew; }
275  void SetText( const OUString &rNew ){ m_pText = &rNew; }
276 
277  // No Bullets for the symbol font!
278  bool IsNoSymbol() const
279  { return RTL_TEXTENCODING_SYMBOL != m_pFnt->GetCharSet( m_pFnt->GetActual() ); }
280 
281  void NoteAnimation() const;
282 
283  // Home is where Your heart is...
285  const SwTextFrame *GetTextFrame() const { return m_pFrame; }
286 
287  bool HasHint(TextFrameIndex nPos) const;
288 
289  // If Kana Compression is enabled, a minimum and maximum portion width
290  // is calculated. We format lines with minimal size and share remaining
291  // space among compressed kanas.
292  // During formatting, the maximum values of compressible portions are
293  // stored in m_aMaxWidth and discarded after a line has been formatted.
294  void SetMaxWidthDiff( const SwLinePortion *nKey, sal_uInt16 nVal )
295  {
296  m_aMaxWidth.insert( std::make_pair( nKey, nVal ) );
297  };
298  sal_uInt16 GetMaxWidthDiff( const SwLinePortion *nKey )
299  {
300  SwTextPortionMap::iterator it = m_aMaxWidth.find( nKey );
301 
302  if( it != m_aMaxWidth.end() )
303  return it->second;
304  else
305  return 0;
306  };
308  {
309  m_aMaxWidth.clear();
310  };
312  {
313  return !m_aMaxWidth.empty();
314  };
315 
316  // Feature: Kana Compression
317 
318  sal_uInt16 GetKanaIdx() const { return m_nKanaIdx; }
319  void ResetKanaIdx(){ m_nKanaIdx = 0; }
320  void SetKanaIdx( sal_uInt16 nNew ) { m_nKanaIdx = nNew; }
321  void IncKanaIdx() { ++m_nKanaIdx; }
322  void SetKanaComp( std::deque<sal_uInt16> *pNew ){ m_pKanaComp = pNew; }
323  std::deque<sal_uInt16>* GetpKanaComp() const { return m_pKanaComp; }
324  sal_uInt16 GetKanaComp() const
325  { return ( m_pKanaComp && m_nKanaIdx < m_pKanaComp->size() )
326  ? (*m_pKanaComp)[m_nKanaIdx] : 0; }
327 
328  const std::shared_ptr<vcl::TextLayoutCache>& GetCachedVclData() const
329  {
330  return m_pCachedVclData;
331  }
332  void SetCachedVclData(std::shared_ptr<vcl::TextLayoutCache> const& pCachedVclData)
333  {
334  m_pCachedVclData = pCachedVclData;
335  }
336 };
337 
339 {
343  std::vector<tools::Long>* m_pSpaceAdd;
344  const SvxBrushItem *m_pBrushItem; // For the background
345  SwTextFly m_aTextFly; // Calculate the FlyFrame
346  Point m_aPos; // Paint position
347  SwRect m_aPaintRect; // Original paint rect (from Layout paint)
348 
349  sal_uInt16 m_nSpaceIdx;
350  void DrawText_(const OUString &rText, const SwLinePortion &rPor,
351  const TextFrameIndex nIdx, const TextFrameIndex nLen,
352  const bool bKern, const bool bWrong = false,
353  const bool bSmartTag = false,
354  const bool bGrammarCheck = false );
355 
356  SwTextPaintInfo &operator=(const SwTextPaintInfo&) = delete;
357 
358 protected:
360  : m_pWrongList(nullptr)
361  , m_pGrammarCheckList(nullptr)
362  , m_pSmartTags(nullptr)
363  , m_pSpaceAdd(nullptr)
364  , m_pBrushItem(nullptr)
365  , m_nSpaceIdx(0)
366  {}
367 
368 public:
369  SwTextPaintInfo( const SwTextPaintInfo &rInf );
370  SwTextPaintInfo( const SwTextPaintInfo &rInf, const OUString* pText );
371 
372  void CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint );
373 
374  const SvxBrushItem *GetBrushItem() const { return m_pBrushItem; }
375 
376  SwTextPaintInfo( SwTextFrame *pFrame, const SwRect &rPaint );
377 
378  SwTwips X() const { return m_aPos.X(); }
379  void X( const tools::Long nNew ) { m_aPos.setX(nNew); }
380  SwTwips Y() const { return m_aPos.Y(); }
381  void Y( const SwTwips nNew ) { m_aPos.setY(nNew); }
382 
384  const SwTextFly& GetTextFly() const { return m_aTextFly; }
385  inline void DrawText( const OUString &rText, const SwLinePortion &rPor,
386  TextFrameIndex nIdx = TextFrameIndex(0),
388  const bool bKern = false) const;
389  inline void DrawText( const SwLinePortion &rPor, TextFrameIndex nLen,
390  const bool bKern = false ) const;
391  inline void DrawMarkedText( const SwLinePortion &rPor, TextFrameIndex nLen,
392  const bool bWrong,
393  const bool bSmartTags,
394  const bool bGrammarCheck ) const;
395 
396  void DrawRect( const SwRect &rRect, bool bRetouche ) const;
397 
398  void DrawTab( const SwLinePortion &rPor ) const;
399  void DrawLineBreak( const SwLinePortion &rPor ) const;
400  void DrawRedArrow( const SwLinePortion &rPor ) const;
401  void DrawPostIts( bool bScript ) const;
402  void DrawBackground( const SwLinePortion &rPor ) const;
403  void DrawViewOpt( const SwLinePortion &rPor, PortionType nWhich ) const;
404  void DrawBackBrush( const SwLinePortion &rPor ) const;
405 
411  void DrawBorder( const SwLinePortion &rPor ) const;
412 
413  void DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const;
414 
423  void CalcRect( const SwLinePortion& rPor, SwRect* pRect,
424  SwRect* pIntersect = nullptr, const bool bInsideBox = false ) const;
425 
426  inline SwTwips GetPaintOfst() const;
427  inline void SetPaintOfst( const SwTwips nNew );
428  const Point &GetPos() const { return m_aPos; }
429  void SetPos( const Point &rNew ) { m_aPos = rNew; }
430 
431  const SwRect &GetPaintRect() const { return m_aPaintRect; }
432 
433  // STUFF FOR JUSTIFIED ALIGNMENT
434 
435  sal_uInt16 GetSpaceIdx() const { return m_nSpaceIdx; }
436  void ResetSpaceIdx(){m_nSpaceIdx = 0; }
437  void SetSpaceIdx( sal_uInt16 nNew ) { m_nSpaceIdx = nNew; }
438  void IncSpaceIdx() { ++m_nSpaceIdx; }
439  void RemoveFirstSpaceAdd() { m_pSpaceAdd->erase( m_pSpaceAdd->begin() ); }
441  { return ( m_pSpaceAdd && m_nSpaceIdx < m_pSpaceAdd->size() )
442  ? (*m_pSpaceAdd)[m_nSpaceIdx] : 0; }
443 
444  void SetpSpaceAdd( std::vector<tools::Long>* pNew ){ m_pSpaceAdd = pNew; }
445  std::vector<tools::Long>* GetpSpaceAdd() const { return m_pSpaceAdd; }
446 
447  void SetWrongList(sw::WrongListIterator *const pNew) { m_pWrongList = pNew; }
449 
450  void SetGrammarCheckList(sw::WrongListIterator *const pNew) { m_pGrammarCheckList = pNew; }
452 
453  void SetSmartTags(sw::WrongListIterator *const pNew) { m_pSmartTags = pNew; }
455 };
456 
458 {
459  // temporary arguments for hyphenation
460  css::beans::PropertyValues m_aHyphVals;
461 
462  SwLineLayout *m_pRoot; // The Root of the current line (pCurr)
463  SwLinePortion *m_pLast; // The last Portion
464  SwFlyPortion *m_pFly; // The following FlyPortion
465  SwLinePortion *m_pUnderflow; // Underflow: Last Portion
466  SwLinePortion *m_pRest; // The Rest is the start of the next Line
467 
468  SwTabPortion *m_pLastTab; // The _last_ TabPortion
469 
474  // #i34348# Changed type from sal_uInt16 to SwTwips
475  SwTwips m_nLeft; // Left margin
476  SwTwips m_nRight; // Right margin
480  sal_uInt16 m_nRealWidth; // "real" line width
481  sal_uInt16 m_nWidth; // "virtual" line width
482  sal_uInt16 m_nLineHeight; // Final height after CalcLine
483  sal_uInt16 m_nLineNetHeight; // line height without spacing
484  sal_uInt16 m_nForcedLeftMargin; // Shift of left margin due to frame
485 
486  bool m_bFull : 1; // Line is full
487  bool m_bFootnoteDone : 1; // Footnote already formatted
488  bool m_bErgoDone : 1; // ErgoDone already formatted
489  bool m_bNumDone : 1; // bNumDone already formatted
490  bool m_bArrowDone : 1; // Arrow to the left for scrolling paragraphs
491  bool m_bStop : 1; // Cancel immediately, discarding the line
492  bool m_bNewLine : 1; // Format another line
493  bool m_bShift : 1; // Position change: Repaint until further notice
494  bool m_bUnderflow : 1; // Context: Underflow() ?
495  bool m_bInterHyph : 1; // Interactive hyphenation?
496  bool m_bAutoHyph : 1; // Automatic hyphenation?
497  bool m_bDropInit : 1; // Set DropWidth
498  bool m_bQuick : 1; // FormatQuick()
499  bool m_bNoEndHyph : 1; // Switch off hyphenation at the line end (due to MaxHyphens)
500  bool m_bNoMidHyph : 1; // Switch off hyphenation before flys (due to MaxHyphens)
501  bool m_bIgnoreFly : 1; // FitToContent ignores flys
502  bool m_bFakeLineStart : 1; // String has been replaced by field portion
503  // info structure only pretends that we are at
504  // the beginning of a line
505  bool m_bTabOverflow : 1; // Tabs are expanding after the end margin
506  bool m_bTestFormat : 1; // Test formatting from WouldFit, no notification etc.
507 
508  sal_Unicode m_cTabDecimal; // the current decimal delimiter
509  sal_Unicode m_cHookChar; // For tabs in fields etc.
510  sal_uInt8 m_nMaxHyph; // Max. line count of followup hyphenations
511 
512  // Hyphenating ...
513  bool InitHyph( const bool bAuto = false );
514  bool CheckFootnotePortion_( SwLineLayout const * pCurr );
515 
516 public:
517  void CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyph = false,
518  const bool bQuick = false, const bool bTst = false );
519  SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL = false,
520  const bool bQuickL = false, const bool bTst = false);
521 
522  // For the formatting inside a double line in a line (multi-line portion)
523  // we need a modified text-format-info:
524  SwTextFormatInfo( const SwTextFormatInfo& rInf, SwLineLayout& rLay,
525  SwTwips nActWidth );
526 
527  sal_uInt16 Width() const { return m_nWidth; }
528  void Width( const sal_uInt16 nNew ) { m_nWidth = nNew; }
529  void Init();
530 
536 
537  // Returns the first changed position of the paragraph
538  inline TextFrameIndex GetReformatStart() const;
539 
540  // Margins
541  SwTwips Left() const { return m_nLeft; }
542  void Left( const SwTwips nNew ) { m_nLeft = nNew; }
543  SwTwips Right() const { return m_nRight; }
544  void Right( const SwTwips nNew ) { m_nRight = nNew; }
545  SwTwips First() const { return m_nFirst; }
546  void First( const SwTwips nNew ) { m_nFirst = nNew; }
547  void LeftMargin( const SwTwips nNew) { m_nLeftMargin = nNew; }
548  sal_uInt16 RealWidth() const { return m_nRealWidth; }
549  void RealWidth( const sal_uInt16 nNew ) { m_nRealWidth = nNew; }
550  sal_uInt16 ForcedLeftMargin() const { return m_nForcedLeftMargin; }
551  void ForcedLeftMargin( const sal_uInt16 nN ) { m_nForcedLeftMargin = nN; }
552 
553  sal_uInt8 &MaxHyph() { return m_nMaxHyph; }
554  const sal_uInt8 &MaxHyph() const { return m_nMaxHyph; }
555 
556  SwLineLayout *GetRoot() { return m_pRoot; }
557  const SwLineLayout *GetRoot() const { return m_pRoot; }
558 
559  void SetRoot( SwLineLayout *pNew ) { m_pRoot = pNew; }
561  void SetLast( SwLinePortion *pNewLast ) { m_pLast = pNewLast; }
562  bool IsFull() const { return m_bFull; }
563  void SetFull( const bool bNew ) { m_bFull = bNew; }
564  bool IsHyphForbud() const
565  { return m_pFly ? m_bNoMidHyph : m_bNoEndHyph; }
566  void ChkNoHyph( const sal_uInt8 bEnd, const sal_uInt8 bMid )
567  { m_bNoEndHyph = (m_nMaxHyph && bEnd >= m_nMaxHyph);
568  m_bNoMidHyph = (m_nMaxHyph && bMid >= m_nMaxHyph); }
569  bool IsIgnoreFly() const { return m_bIgnoreFly; }
570  void SetIgnoreFly( const bool bNew ) { m_bIgnoreFly = bNew; }
571  bool IsFakeLineStart() const { return m_bFakeLineStart; }
572  void SetFakeLineStart( const bool bNew ) { m_bFakeLineStart = bNew; }
573  bool IsStop() const { return m_bStop; }
574  void SetStop( const bool bNew ) { m_bStop = bNew; }
576  void SetRest( SwLinePortion *pNewRest ) { m_pRest = pNewRest; }
577  bool IsNewLine() const { return m_bNewLine; }
578  void SetNewLine( const bool bNew ) { m_bNewLine = bNew; }
579  bool IsShift() const { return m_bShift; }
580  void SetShift( const bool bNew ) { m_bShift = bNew; }
581  bool IsInterHyph() const { return m_bInterHyph; }
582  bool IsUnderflow() const { return m_bUnderflow; }
583  void ClrUnderflow() { m_bUnderflow = false; }
584  bool IsDropInit() const { return m_bDropInit; }
585  void SetDropInit( const bool bNew ) { m_bDropInit = bNew; }
586  bool IsQuick() const { return m_bQuick; }
587  bool IsTest() const { return m_bTestFormat; }
588 
590  void SetLineStart(TextFrameIndex const nNew) { m_nLineStart = nNew; }
591 
592  // these are used during fly calculation
593  sal_uInt16 GetLineHeight() const { return m_nLineHeight; }
594  void SetLineHeight( const sal_uInt16 nNew ) { m_nLineHeight = nNew; }
595  sal_uInt16 GetLineNetHeight() const { return m_nLineNetHeight; }
596  void SetLineNetHeight( const sal_uInt16 nNew ) { m_nLineNetHeight = nNew; }
597 
598  const SwLinePortion *GetUnderflow() const { return m_pUnderflow; }
601  { m_pUnderflow = pNew; m_bUnderflow = true; }
603  void SetSoftHyphPos(TextFrameIndex const nNew) { m_nSoftHyphPos = nNew; }
604 
605  inline void SetParaFootnote();
606 
607  // FlyFrames
608  SwFlyPortion *GetFly() { return m_pFly; }
609  void SetFly( SwFlyPortion *pNew ) { m_pFly = pNew; }
610 
611  inline const SwAttrSet& GetCharAttr() const;
612 
613  // Tabs
615  void SetLastTab( SwTabPortion *pNew ) { m_pLastTab = pNew; }
617  void SetTabDecimal( const sal_Unicode cNew ) { m_cTabDecimal = cNew;}
618 
619  void ClearHookChar() { m_cHookChar = 0; }
620  void SetHookChar( const sal_Unicode cNew ) { m_cHookChar = cNew; }
621  sal_Unicode GetHookChar() const { return m_cHookChar; }
622 
623  // Done-Flags
624  bool IsFootnoteDone() const { return m_bFootnoteDone; }
625  void SetFootnoteDone( const bool bNew ) { m_bFootnoteDone = bNew; }
626  bool IsErgoDone() const { return m_bErgoDone; }
627  void SetErgoDone( const bool bNew ) { m_bErgoDone = bNew; }
628  bool IsNumDone() const { return m_bNumDone; }
629  void SetNumDone( const bool bNew ) { m_bNumDone = bNew; }
630  bool IsArrowDone() const { return m_bArrowDone; }
631  void SetArrowDone( const bool bNew ) { m_bArrowDone = bNew; }
632 
634 
635  // For SwTextPortion::Hyphenate
636  bool ChgHyph( const bool bNew );
637 
638  // Should the hyphenate helper be discarded?
639  bool IsHyphenate() const;
641  void SetUnderScorePos(TextFrameIndex const nNew) { m_nUnderScorePos = nNew; }
642 
643  // Calls HyphenateWord() of Hyphenator
644  css::uno::Reference< css::linguistic2::XHyphenatedWord >
645  HyphWord( const OUString &rText, const sal_Int32 nMinTrail );
646  const css::beans::PropertyValues & GetHyphValues() const;
647 
648  bool CheckFootnotePortion( SwLineLayout const * pCurr )
649  { return IsFootnoteInside() && CheckFootnotePortion_( pCurr ); }
650 
651  // Dropcaps called by SwTextFormatter::CTOR
652  const SwFormatDrop *GetDropFormat() const;
653 
654  // Sets the last SwKernPortion as pLast, if it is followed by empty portions
655  bool LastKernPortion();
656 
657  // Looks for tabs, TabDec, TXTATR and BRK from nIdx until nEnd.
658  // Return: Position; sets cHookChar if necessary
660 
661  void SetTabOverflow( bool bOverflow ) { m_bTabOverflow = bOverflow; }
662  bool IsTabOverflow() const { return m_bTabOverflow; }
663 
664 };
665 
673 class SwTextSlot final
674 {
675  OUString aText;
676  std::shared_ptr<vcl::TextLayoutCache> m_pOldCachedVclData;
677  const OUString *pOldText;
680  std::unique_ptr<SwWrongList> m_pTempList;
681  std::unique_ptr<sw::WrongListIterator> m_pTempIter;
684  bool bOn;
686 
687 public:
688  // The replacement string originates either from the portion via GetExpText()
689  // or from the rCh, if it is not empty.
690  SwTextSlot( const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen,
691  bool bExgLists, OUString const & rCh = OUString() );
692  ~SwTextSlot();
693 };
694 
696 {
700 public:
701  SwFontSave( const SwTextSizeInfo &rInf, SwFont *pFnt,
702  SwAttrIter* pItr = nullptr );
703  ~SwFontSave();
704 };
705 
706 inline sal_uInt16 SwTextSizeInfo::GetAscent() const
707 {
708  assert(GetOut());
709  return const_cast<SwFont*>(GetFont())->GetAscent( m_pVsh, *GetOut() );
710 }
711 
712 inline sal_uInt16 SwTextSizeInfo::GetTextHeight() const
713 {
714  assert(GetOut());
715  return const_cast<SwFont*>(GetFont())->GetHeight( m_pVsh, *GetOut() );
716 }
717 
718 inline SwPosSize SwTextSizeInfo::GetTextSize( const OUString &rText ) const
719 {
720  return GetTextSize(m_pOut, nullptr, rText, TextFrameIndex(0), TextFrameIndex(rText.getLength()));
721 }
722 
724  TextFrameIndex const nNewIdx,
725  TextFrameIndex const nNewLen) const
726 {
727  return GetTextSize( m_pOut, pSI, *m_pText, nNewIdx, nNewLen );
728 }
729 
731 {
732  return GetParaPortion()->GetRepaint().GetOffset();
733 }
734 
735 inline void SwTextPaintInfo::SetPaintOfst( const SwTwips nNew )
736 {
737  GetParaPortion()->GetRepaint().SetOffset( nNew );
738 }
739 
740 inline void SwTextPaintInfo::DrawText( const OUString &rText,
741  const SwLinePortion &rPor,
742  const TextFrameIndex nStart, const TextFrameIndex nLength,
743  const bool bKern ) const
744 {
745  const_cast<SwTextPaintInfo*>(this)->DrawText_( rText, rPor, nStart, nLength, bKern );
746 }
747 
748 inline void SwTextPaintInfo::DrawText( const SwLinePortion &rPor,
749  const TextFrameIndex nLength, const bool bKern ) const
750 {
751  const_cast<SwTextPaintInfo*>(this)->DrawText_( *m_pText, rPor, m_nIdx, nLength, bKern );
752 }
753 
755  const TextFrameIndex nLength,
756  const bool bWrong,
757  const bool bSmartTags,
758  const bool bGrammarCheck ) const
759 {
760  const_cast<SwTextPaintInfo*>(this)->DrawText_( *m_pText, rPor, m_nIdx, nLength, false/*bKern*/, bWrong, bSmartTags, bGrammarCheck );
761 }
762 
764 {
765  return GetParaPortion()->GetReformat().Start();
766 }
767 
769 {
770  // sw_redlinehide: this is used for numbering/footnote number portions, so:
772 }
773 
775 {
776  GetTextFrame()->SetFootnote( true );
777 }
778 
779 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bOn
Definition: inftxt.hxx:684
TextFrameIndex m_nLastBookmarkPos
need to check for bookmarks at every portion
Definition: inftxt.hxx:473
std::unique_ptr< SvxTabStopItem > m_pRuler
Definition: inftxt.hxx:63
rtl_TextEncoding GetCharSet(const SwFontScript nWhich) const
Definition: swfont.hxx:291
void SetLineNetHeight(const sal_uInt16 nNew)
Definition: inftxt.hxx:596
void RemoveFirstSpaceAdd()
Definition: inftxt.hxx:439
bool LastKernPortion()
Definition: inftxt.cxx:1727
bool IsFirstMulti() const
Definition: inftxt.hxx:205
VclPtr< OutputDevice > m_pRef
Definition: inftxt.hxx:143
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:157
bool IsArrowDone() const
Definition: inftxt.hxx:630
~SwLineInfo()
Definition: inftxt.cxx:95
void SetUnderFnt(SwUnderlineFont *pNew)
Definition: inftxt.hxx:235
SwViewShell * GetVsh()
Definition: inftxt.hxx:221
void DrawBackBrush(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1156
void SetSnapToGrid(const bool bN)
Definition: inftxt.hxx:216
SwTextInfo(SwTextFrame *pFrame)
Definition: inftxt.hxx:120
void SetArrowDone(const bool bNew)
Definition: inftxt.hxx:631
std::shared_ptr< vcl::TextLayoutCache > m_pOldCachedVclData
Definition: inftxt.hxx:676
const sal_uInt8 & MaxHyph() const
Definition: inftxt.hxx:554
SwRect m_aPaintRect
Definition: inftxt.hxx:347
bool CheckFootnotePortion_(SwLineLayout const *pCurr)
Definition: inftxt.cxx:1619
bool IsQuick() const
Definition: inftxt.hxx:586
SwLinePortion * GetUnderflow()
Definition: inftxt.hxx:599
bool IsUnderflow() const
Definition: inftxt.hxx:582
const css::beans::PropertyValues & GetHyphValues() const
Definition: inftxt.cxx:1406
SwTwips GetPaintOfst() const
Definition: inftxt.hxx:730
SwFont * GetFont()
Definition: inftxt.hxx:231
bool IsDropInit() const
Definition: inftxt.hxx:584
void First(const SwTwips nNew)
Definition: inftxt.hxx:546
sal_Unicode m_cTabDecimal
Definition: inftxt.hxx:508
void SetPos(const Point &rNew)
Definition: inftxt.hxx:429
void SetFootnoteInside(const bool bNew)
Definition: inftxt.hxx:200
bool m_bForbiddenChars
Definition: inftxt.hxx:173
void Width(const sal_uInt16 nNew)
Definition: inftxt.hxx:528
TextFrameIndex m_nLen
Definition: inftxt.hxx:156
bool IsRuby() const
Definition: inftxt.hxx:207
sal_Unicode GetTabDecimal() const
Definition: inftxt.hxx:616
long Long
sal_uInt16 m_nDefTabStop
Definition: inftxt.hxx:66
void SetFakeLineStart(const bool bNew)
Definition: inftxt.hxx:572
void SetOnWin(const bool bNew)
Definition: inftxt.hxx:193
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:561
SwTabPortion * GetLastTab()
Definition: inftxt.hxx:614
TextFrameIndex GetUnderScorePos() const
Definition: inftxt.hxx:640
TextFrameIndex ScanPortionEnd(TextFrameIndex nStart, TextFrameIndex nEnd)
Definition: inftxt.cxx:1634
SwTwips Left() const
Definition: inftxt.hxx:541
void DrawBorder(const SwLinePortion &rPor) const
Draw character border around a line portion.
Definition: inftxt.cxx:1303
bool IsNumDone() const
Definition: inftxt.hxx:628
void Y(const SwTwips nNew)
Definition: inftxt.hxx:381
sal_uInt16 GetTextHeight() const
Definition: inftxt.hxx:712
bool IsErgoDone() const
Definition: inftxt.hxx:626
SwFont * m_pFnt
Definition: inftxt.hxx:150
void SetIgnoreFly(const bool bNew)
Definition: inftxt.hxx:570
SwTextSizeInfo * pInf
Definition: inftxt.hxx:697
const SvxBrushItem * m_pBrushItem
Definition: inftxt.hxx:344
bool m_bFootnoteDone
Definition: inftxt.hxx:487
void SetScriptSpace(const bool bNew)
Definition: inftxt.hxx:212
sal_uInt16 GetLineNetHeight() const
Definition: inftxt.hxx:595
void LeftMargin(const SwTwips nNew)
Definition: inftxt.hxx:547
const OUString * pOldText
Definition: inftxt.hxx:677
sw::WrongListIterator * GetGrammarCheckList() const
Definition: inftxt.hxx:451
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:740
tools::Long GetSpaceAdd() const
Definition: inftxt.hxx:440
sal_uInt16 RealWidth() const
Definition: inftxt.hxx:548
void NoteAnimation() const
Definition: inftxt.cxx:373
void DrawPostIts(bool bScript) const
Definition: inftxt.cxx:1049
Dialog to specify the properties of date form field.
void SetText(const OUString &rNew)
Definition: inftxt.hxx:275
void SetKanaComp(std::deque< sal_uInt16 > *pNew)
Definition: inftxt.hxx:322
void SetMulti(const bool bNew)
Definition: inftxt.hxx:204
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
void SetGrammarCheckList(sw::WrongListIterator *const pNew)
Definition: inftxt.hxx:450
bool HasHint(TextFrameIndex nPos) const
Definition: inftxt.cxx:474
sal_uInt16 m_nKanaIdx
Definition: inftxt.hxx:157
tools::Long m_nListTabStopPosition
Definition: inftxt.hxx:68
void DrawText_(const OUString &rText, const SwLinePortion &rPor, const TextFrameIndex nIdx, const TextFrameIndex nLen, const bool bKern, const bool bWrong=false, const bool bSmartTag=false, const bool bGrammarCheck=false)
Definition: inftxt.cxx:622
const SwViewShell * GetVsh() const
Definition: inftxt.hxx:222
void SetHanging(const bool bNew)
Definition: inftxt.hxx:210
sal_uInt8 & MaxHyph()
Definition: inftxt.hxx:553
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:247
bool IsMulti() const
Definition: inftxt.hxx:203
bool ChgHyph(const bool bNew)
Definition: inftxt.cxx:1963
void SetDefTabStop(sal_uInt16 nNew) const
Definition: inftxt.hxx:81
sal_uInt16 ForcedLeftMargin() const
Definition: inftxt.hxx:550
bool IsFull() const
Definition: inftxt.hxx:562
bool m_bHanging
Definition: inftxt.hxx:171
const SvxLineSpacingItem * GetLineSpacing() const
Definition: inftxt.hxx:79
bool m_bFakeLineStart
Definition: inftxt.hxx:502
TextFrameIndex & Start()
Definition: porlay.hxx:45
void Right(const SwTwips nNew)
Definition: inftxt.hxx:544
void SetHookChar(const sal_Unicode cNew)
Definition: inftxt.hxx:620
void Left(const SwTwips nNew)
Definition: inftxt.hxx:542
const SwFont * GetFont() const
Definition: inftxt.hxx:232
SwTwips m_nFirst
Definition: inftxt.hxx:477
void SetFull(const bool bNew)
Definition: inftxt.hxx:563
SwTwips m_nRight
Definition: inftxt.hxx:476
sal_uInt16 sal_Unicode
sw::WrongListIterator * GetSmartTags() const
Definition: inftxt.hxx:454
void SetParaFootnote()
Definition: inftxt.hxx:774
bool IsInterHyph() const
Definition: inftxt.hxx:581
void SetLastTab(SwTabPortion *pNew)
Definition: inftxt.hxx:615
bool IsTabOverflow() const
Definition: inftxt.hxx:662
void IncSpaceIdx()
Definition: inftxt.hxx:438
bool URLNotify() const
Definition: inftxt.hxx:196
bool IsFootnoteInside() const
Definition: inftxt.hxx:199
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
sal_Unicode GetChar(TextFrameIndex const nPos) const
Definition: inftxt.hxx:240
TextFrameIndex nLen
Definition: inftxt.hxx:683
bool IsHanging() const
Definition: inftxt.hxx:209
void CtorInitLineInfo(const SwAttrSet &rAttrSet, const SwTextNode &rTextNode)
Definition: inftxt.cxx:99
void SetKanaIdx(sal_uInt16 nNew)
Definition: inftxt.hxx:320
bool m_bScriptSpace
Definition: inftxt.hxx:172
void SetRoot(SwLineLayout *pNew)
Definition: inftxt.hxx:559
void DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const
Definition: inftxt.cxx:1097
bool m_bNotEOL
Definition: inftxt.hxx:159
SwLinePortion * m_pUnderflow
Definition: inftxt.hxx:465
vcl::RenderContext * GetRefDev()
Definition: inftxt.hxx:228
bool m_bListTabStopIncluded
Definition: inftxt.hxx:67
void CtorInitTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyph=false, const bool bQuick=false, const bool bTst=false)
Definition: inftxt.cxx:1432
sal_uInt8 GetDirection() const
Definition: inftxt.hxx:217
void CtorInitTextSizeInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, TextFrameIndex nIdx)
Definition: inftxt.cxx:245
bool IsNewLine() const
Definition: inftxt.hxx:577
TextFrameIndex GetLineStart() const
Definition: inftxt.hxx:589
SwFontScript GetActual() const
Definition: swfont.hxx:182
const vcl::RenderContext * GetOut() const
Definition: inftxt.hxx:225
std::deque< sal_uInt16 > * GetpKanaComp() const
Definition: inftxt.hxx:323
void SetPaintOfst(const SwTwips nNew)
Definition: inftxt.hxx:735
void SetNumDone(const bool bNew)
Definition: inftxt.hxx:629
bool IsIgnoreFly() const
Definition: inftxt.hxx:569
sal_uInt16 m_nRealWidth
Definition: inftxt.hxx:480
SwTwips Y() const
Definition: inftxt.hxx:380
SwTwips First() const
Definition: inftxt.hxx:545
void IncKanaIdx()
Definition: inftxt.hxx:321
sal_uInt16 m_nWidth
Definition: inftxt.hxx:481
std::unique_ptr< SwMultiCreator > GetMultiCreator(TextFrameIndex &rPos, SwMultiPortion const *pM) const
Definition: pormulti.cxx:907
SwTextSizeInfo * pInf
Definition: inftxt.hxx:685
bool m_bTestFormat
Definition: inftxt.hxx:506
bool HasScriptSpace() const
Definition: inftxt.hxx:211
const SwViewOption & GetOpt() const
Definition: inftxt.hxx:238
SwTextNode const * GetTextNodeForParaProps() const
Definition: txtfrm.cxx:1295
sal_uInt16 m_nLineNetHeight
Definition: inftxt.hxx:483
bool m_bStopUnderflow
Definition: inftxt.hxx:161
SwPosSize GetTextSize() const
Definition: inftxt.cxx:396
css::beans::PropertyValues m_aHyphVals
Definition: inftxt.hxx:460
TextFrameIndex m_nIdx
Definition: inftxt.hxx:155
bool IsShift() const
Definition: inftxt.hxx:579
std::vector< tools::Long > * GetpSpaceAdd() const
Definition: inftxt.hxx:445
TextFrameIndex m_nTextStart
Definition: inftxt.hxx:109
TextFrameIndex m_nUnderScorePos
enlarge repaint if underscore has been found
Definition: inftxt.hxx:472
Collection of SwLinePortion instances, representing one line of text.
Definition: porlay.hxx:78
void RealWidth(const sal_uInt16 nNew)
Definition: inftxt.hxx:549
SwTwips GetLineWidth()
Returns the distance between the current horizontal position and the end of the line.
Definition: inftxt.cxx:1755
vcl::RenderContext * GetOut()
Definition: inftxt.hxx:224
void SetFont(SwFont *pNew)
Definition: inftxt.hxx:233
void DrawLineBreak(const SwLinePortion &rPor) const
Definition: inftxt.cxx:994
SwTextFly & GetTextFly()
Definition: inftxt.hxx:383
void SetStop(const bool bNew)
Definition: inftxt.hxx:574
SwTextFly m_aTextFly
Definition: inftxt.hxx:345
SwParaPortion * GetParaPortion()
Definition: inftxt.hxx:121
bool HasForbiddenChars() const
Definition: inftxt.hxx:213
SwCharRange & GetReformat()
Definition: porlay.hxx:284
void SetUnderflow(SwLinePortion *pNew)
Definition: inftxt.hxx:600
const OUString * m_pText
Definition: inftxt.hxx:154
bool InitHyph(const bool bAuto=false)
Definition: inftxt.cxx:1413
std::unique_ptr< SwWrongList > m_pTempList
Definition: inftxt.hxx:680
SwTextSlot(const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen, bool bExgLists, OUString const &rCh=OUString())
Definition: inftxt.cxx:1795
void SelectFont()
Definition: inftxt.cxx:364
SwLineInfo()
Definition: inftxt.cxx:86
bool IsHyphForbud() const
Definition: inftxt.hxx:564
void SetMaxWidthDiff(const SwLinePortion *nKey, sal_uInt16 nVal)
Definition: inftxt.hxx:294
sw::WrongListIterator * m_pGrammarCheckList
Definition: inftxt.hxx:341
void ResetSpaceIdx()
Definition: inftxt.hxx:436
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:752
sal_uInt16 Width() const
Definition: inftxt.hxx:527
SwLineLayout * GetRoot()
Definition: inftxt.hxx:556
bool NotEOL() const
Definition: inftxt.hxx:194
const SwFormatDrop * GetDropFormat() const
Definition: inftxt.cxx:1512
SwUnderlineFont * m_pUnderFnt
Definition: inftxt.hxx:151
PortionType
Definition: txttypes.hxx:23
sal_uInt8 m_nDirection
Definition: inftxt.hxx:175
void ResetMaxWidthDiff()
Definition: inftxt.hxx:307
void SetUnderScorePos(TextFrameIndex const nNew)
Definition: inftxt.hxx:641
sal_Unicode m_cHookChar
Definition: inftxt.hxx:509
size
sw::WrongListIterator * m_pSmartTags
Definition: inftxt.hxx:342
void DrawTab(const SwLinePortion &rPor) const
Definition: inftxt.cxx:977
SwAttrIter * pIter
Definition: inftxt.hxx:699
SwTwips m_nLeft
Definition: inftxt.hxx:475
TextFrameIndex GetIdx() const
Definition: inftxt.hxx:271
bool CheckFootnotePortion(SwLineLayout const *pCurr)
Definition: inftxt.hxx:648
void DrawRect(const SwRect &rRect, bool bRetouche) const
Definition: inftxt.cxx:965
void SetTabDecimal(const sal_Unicode cNew)
Definition: inftxt.hxx:617
void ClrUnderflow()
Definition: inftxt.hxx:583
const SwLineLayout * GetRoot() const
Definition: inftxt.hxx:557
const SvxTabStop * GetTabStop(const SwTwips nSearchPos, const SwTwips nRight) const
#i24363# tab stops relative to indent
Definition: txttab.cxx:43
void SetTabOverflow(bool bOverflow)
Definition: inftxt.hxx:661
sal_uInt16 GetMaxWidthDiff(const SwLinePortion *nKey)
Definition: inftxt.hxx:298
void SetRuby(const bool bNew)
Definition: inftxt.hxx:208
sal_Unicode GetHookChar() const
Definition: inftxt.hxx:621
SwTextPaintInfo & operator=(const SwTextPaintInfo &)=delete
bool m_bFootnoteInside
Definition: inftxt.hxx:162
void X(const tools::Long nNew)
Definition: inftxt.hxx:379
bool SnapToGrid() const
Definition: inftxt.hxx:215
void CtorInitTextPaintInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint)
Definition: inftxt.cxx:480
void SetFly(SwFlyPortion *pNew)
Definition: inftxt.hxx:609
sw::WrongListIterator * GetpWrongList() const
Definition: inftxt.hxx:448
SwTextFrame * GetTextFrame()
Definition: inftxt.hxx:284
SwLineLayout * m_pRoot
Definition: inftxt.hxx:462
tools::Long SwTwips
Definition: swtypes.hxx:49
bool IsNoSymbol() const
Definition: inftxt.hxx:278
const vcl::RenderContext * GetRefDev() const
Definition: inftxt.hxx:229
SwTabPortion * m_pLastTab
Definition: inftxt.hxx:468
const OUString & GetText() const
Definition: inftxt.hxx:239
bool IsStop() const
Definition: inftxt.hxx:573
const SwAttrSet & GetCharAttr() const
Definition: inftxt.hxx:768
bool CompressLine()
Definition: inftxt.hxx:311
SwTextFrame * m_pFrame
Definition: inftxt.hxx:152
const SwLinePortion * GetUnderflow() const
Definition: inftxt.hxx:598
VclPtr< OutputDevice > m_pOut
Definition: inftxt.hxx:142
void ClearHookChar()
Definition: inftxt.hxx:619
SwUnderlineFont * GetUnderFnt() const
Definition: inftxt.hxx:236
void CtorInitTextInfo(SwTextFrame *pFrame)
Definition: inftxt.cxx:143
const Point & GetPos() const
Definition: inftxt.hxx:428
void SetForbiddenChars(const bool bN)
Definition: inftxt.hxx:214
const std::shared_ptr< vcl::TextLayoutCache > & GetCachedVclData() const
Definition: inftxt.hxx:328
bool m_bOtherThanFootnoteInside
Definition: inftxt.hxx:163
SwTwips X() const
Definition: inftxt.hxx:378
const SwTextFly & GetTextFly() const
Definition: inftxt.hxx:384
Base class for anything that can be part of a line in the Writer layout.
Definition: porlin.hxx:49
bool m_bFirstMulti
Definition: inftxt.hxx:166
TextFrameIndex GetReformatStart() const
Definition: inftxt.hxx:763
sal_uInt16 m_nLineHeight
Definition: inftxt.hxx:482
SwTwips Right() const
Definition: inftxt.hxx:543
void SetSoftHyphPos(TextFrameIndex const nNew)
Definition: inftxt.hxx:603
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
const SwViewOption * m_pOpt
Definition: inftxt.hxx:153
std::deque< sal_uInt16 > * m_pKanaComp
Definition: inftxt.hxx:137
bool IsHyphenate() const
If the Hyphenator returns ERROR or the language is set to NOLANGUAGE we do not hyphenate.
Definition: inftxt.cxx:1480
void SetLen(const TextFrameIndex nNew)
Definition: inftxt.hxx:274
OUString aText
Definition: inftxt.hxx:675
std::map< SwLinePortion const *, sal_uInt16 > SwTextPortionMap
Definition: inftxt.hxx:129
For the text replacement and restoration of SwTextSizeInfo.
Definition: inftxt.hxx:673
css::uno::Reference< css::linguistic2::XHyphenatedWord > HyphWord(const OUString &rText, const sal_Int32 nMinTrail)
Definition: txthyph.cxx:39
sal_uInt16 GetDefTabStop() const
Definition: inftxt.hxx:80
void SetFirstMulti(const bool bNew)
Definition: inftxt.hxx:206
sal_uInt16 NumberOfTabStops() const
Definition: txttab.cxx:57
void ForcedLeftMargin(const sal_uInt16 nN)
Definition: inftxt.hxx:551
sal_uInt16 GetKanaIdx() const
Definition: inftxt.hxx:318
unsigned char sal_uInt8
SwRepaint & GetRepaint()
Definition: porlay.hxx:282
const SvxLineSpacingItem * m_pSpace
Definition: inftxt.hxx:64
void SetFootnoteDone(const bool bNew)
Definition: inftxt.hxx:625
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:596
bool HasSpecialAlign(bool bVert) const
Definition: inftxt.hxx:86
std::unique_ptr< sw::WrongListIterator > m_pTempIter
Definition: inftxt.hxx:681
SwLinePortion * GetRest()
Definition: inftxt.hxx:575
sal_uInt16 m_nSpaceIdx
Definition: inftxt.hxx:349
void ChkNoHyph(const sal_uInt8 bEnd, const sal_uInt8 bMid)
Definition: inftxt.hxx:566
const SvxBrushItem * GetBrushItem() const
Definition: inftxt.hxx:374
void SetStopUnderflow(const bool bNew)
Definition: inftxt.hxx:198
friend void SetParaPortion(SwTextInfo *pInf, SwParaPortion *pRoot)
We format a row for interactive hyphenation We can assume that we've already formatted.
Definition: txthyph.cxx:120
bool OnWin() const
Definition: inftxt.hxx:192
void SetWrongList(sw::WrongListIterator *const pNew)
Definition: inftxt.hxx:447
TextFrameIndex GetLen() const
Definition: inftxt.hxx:273
void SetCachedVclData(std::shared_ptr< vcl::TextLayoutCache > const &pCachedVclData)
Definition: inftxt.hxx:332
sw::WrongListIterator * m_pWrongList
Definition: inftxt.hxx:340
void SetErgoDone(const bool bNew)
Definition: inftxt.hxx:627
void SetDirection(const sal_uInt8 nNew)
Definition: inftxt.hxx:218
void SetSpaceIdx(sal_uInt16 nNew)
Definition: inftxt.hxx:437
SwTwips m_nLeftMargin
First or left margin, depending on context.
Definition: inftxt.hxx:479
void SetShift(const bool bNew)
Definition: inftxt.hxx:580
void SetLineStart(TextFrameIndex const nNew)
Definition: inftxt.hxx:590
SwFontSave(const SwTextSizeInfo &rInf, SwFont *pFnt, SwAttrIter *pItr=nullptr)
Definition: inftxt.cxx:1912
SwParaPortion * m_pPara
Definition: inftxt.hxx:108
sw::WrongListIterator * m_pOldSmartTagList
Definition: inftxt.hxx:678
TextFrameIndex GetTextBreak(const tools::Long nLineWidth, const TextFrameIndex nMaxLen, const sal_uInt16 nComp, vcl::TextLayoutCache const *) const
Definition: inftxt.cxx:433
SwLinePortion * GetLast()
Definition: inftxt.hxx:560
void SetpSpaceAdd(std::vector< tools::Long > *pNew)
Definition: inftxt.hxx:444
SwFont * pFnt
Definition: inftxt.hxx:698
bool CheckCurrentPosBookmark()
Definition: inftxt.cxx:1978
TextFrameIndex nIdx
Definition: inftxt.hxx:682
bool m_bURLNotify
Definition: inftxt.hxx:160
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
Definition: node.hxx:718
void DrawRedArrow(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1017
SwLinePortion * m_pLast
Definition: inftxt.hxx:463
SwTextInfo()
Definition: inftxt.hxx:112
bool m_bTabOverflow
Definition: inftxt.hxx:505
void SetOut(OutputDevice *pNewOut)
Definition: inftxt.hxx:226
bool StopUnderflow() const
Definition: inftxt.hxx:197
bool IsFakeLineStart() const
Definition: inftxt.hxx:571
std::shared_ptr< vcl::TextLayoutCache > m_pCachedVclData
Definition: inftxt.hxx:148
TextFrameIndex m_nLineStart
Current line start in rText.
Definition: inftxt.hxx:471
sal_uInt8 m_nMaxHyph
Definition: inftxt.hxx:510
void SetNewLine(const bool bNew)
Definition: inftxt.hxx:578
const SwParaPortion * GetParaPortion() const
Definition: inftxt.hxx:122
void SetOtherThanFootnoteInside(const bool bNew)
Definition: inftxt.hxx:202
SwTwips GetOffset() const
Definition: porlay.hxx:70
void SetLineHeight(const sal_uInt16 nNew)
Definition: inftxt.hxx:594
bool IsOtherThanFootnoteInside() const
Definition: inftxt.hxx:201
const SwRect & GetPaintRect() const
Definition: inftxt.hxx:431
void DrawBackground(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1128
bool IsTest() const
Definition: inftxt.hxx:587
void ResetKanaIdx()
Definition: inftxt.hxx:319
void SetOffset(const SwTwips nNew)
Definition: porlay.hxx:71
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps...
Definition: paratr.hxx:62
bool IsListTabStopIncluded() const
Definition: inftxt.hxx:94
bool IsRotated() const
Definition: inftxt.hxx:219
void SetSmartTags(sw::WrongListIterator *const pNew)
Definition: inftxt.hxx:453
sal_uInt16 GetKanaComp() const
Definition: inftxt.hxx:324
SwFlyPortion * GetFly()
Definition: inftxt.hxx:608
SwTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL=false, const bool bQuickL=false, const bool bTst=false)
Definition: inftxt.cxx:1558
sal_uInt16 GetLineHeight() const
Definition: inftxt.hxx:593
void SetIdx(const TextFrameIndex nNew)
Definition: inftxt.hxx:272
SvxParaVertAlignItem::Align GetVertAlign() const
Definition: inftxt.hxx:85
sal_uInt16 m_nForcedLeftMargin
Definition: inftxt.hxx:484
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...
SwViewShell * m_pVsh
Definition: inftxt.hxx:139
void SetRest(SwLinePortion *pNewRest)
Definition: inftxt.hxx:576
SvxParaVertAlignItem::Align m_nVertAlign
Definition: inftxt.hxx:65
void SetDropInit(const bool bNew)
Definition: inftxt.hxx:585
tools::Long GetListTabStopPosition() const
Definition: inftxt.hxx:98
void DrawMarkedText(const SwLinePortion &rPor, TextFrameIndex nLen, const bool bWrong, const bool bSmartTags, const bool bGrammarCheck) const
Definition: inftxt.hxx:754
const sal_Int32 COMPLETE_STRING
Definition: swtypes.hxx:61
TextFrameIndex GetTextStart() const
Definition: inftxt.hxx:123
TextFrameIndex GetSoftHyphPos() const
Definition: inftxt.hxx:602
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich) const
Definition: inftxt.cxx:1315
bool IsFootnoteDone() const
Definition: inftxt.hxx:624
TextFrameIndex m_nSoftHyphPos
SoftHyphPos for Hyphenation.
Definition: inftxt.hxx:470
const SwTextFrame * GetTextFrame() const
Definition: inftxt.hxx:285
SwLinePortion * m_pRest
Definition: inftxt.hxx:466
SwTextPortionMap m_aMaxWidth
Definition: inftxt.hxx:134
sal_uInt16 GetAscent() const
Definition: inftxt.hxx:706
sal_uInt16 GetSpaceIdx() const
Definition: inftxt.hxx:435
bool m_bSnapToGrid
Definition: inftxt.hxx:174
std::vector< tools::Long > * m_pSpaceAdd
Definition: inftxt.hxx:343
sw::WrongListIterator * m_pOldGrammarCheckList
Definition: inftxt.hxx:679
void SetNotEOL(const bool bNew)
Definition: inftxt.hxx:195
SwFlyPortion * m_pFly
Definition: inftxt.hxx:464