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 <optional>
23 #include <com/sun/star/beans/PropertyValues.hpp>
24 
25 #include <map>
26 
27 #include <swtypes.hxx>
28 #include <swrect.hxx>
29 #include <txtfly.hxx>
30 #include <swfont.hxx>
31 #include "porlay.hxx"
32 #include <txtfrm.hxx>
33 #include <ndtxt.hxx>
35 
36 namespace com::sun::star::linguistic2 { class XHyphenatedWord; }
37 
38 class SvxBrushItem;
39 class SvxLineSpacingItem;
40 class SvxTabStop;
41 class SvxTabStopItem;
42 class SwFlyPortion;
43 class SwFormatDrop;
44 class SwLinePortion;
45 class SwTabPortion;
46 class SwViewOption;
47 class SwViewShell;
48 class SwAttrIter;
49 struct SwMultiCreator;
50 class SwMultiPortion;
51 namespace sw { class WrongListIterator; }
52 
53 #define ARROW_WIDTH 200
54 #define DIR_LEFT2RIGHT 0
55 #define DIR_BOTTOM2TOP 1
56 #define DIR_RIGHT2LEFT 2
57 #define DIR_TOP2BOTTOM 3
58 
59 // Respects the attribute LineSpace when calculating the Height/Ascent
61 {
62  friend class SwTextIter;
63 
64  std::optional<SvxTabStopItem> m_oRuler;
67  sal_uInt16 m_nDefTabStop;
70 
71  void CtorInitLineInfo( const SwAttrSet& rAttrSet,
72  const SwTextNode& rTextNode );
73 
74  SwLineInfo();
75  ~SwLineInfo();
76 public:
77  // #i24363# tab stops relative to indent - returns the tab stop following nSearchPos or NULL
78  const SvxTabStop* GetTabStop(const SwTwips nSearchPos, 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<const vcl::text::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::optional<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::text::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::text::TextLayoutCache const*) const;
263  TextFrameIndex GetTextBreak( const tools::Long nLineWidth,
264  const TextFrameIndex nMaxLen,
265  const sal_uInt16 nComp,
266  TextFrameIndex& rExtraCharPos,
267  vcl::text::TextLayoutCache const*) const;
268 
269  sal_uInt16 GetAscent() const;
270  sal_uInt16 GetHangingBaseline() const;
271 
272  TextFrameIndex GetIdx() const { return m_nIdx; }
273  void SetIdx(const TextFrameIndex nNew) { m_nIdx = nNew; }
274  TextFrameIndex GetLen() const { return m_nLen; }
275  void SetLen(const TextFrameIndex nNew) { m_nLen = nNew; }
276  void SetText( const OUString &rNew ){ m_pText = &rNew; }
277 
278  // No Bullets for the symbol font!
279  bool IsNoSymbol() const
280  { return RTL_TEXTENCODING_SYMBOL != m_pFnt->GetCharSet( m_pFnt->GetActual() ); }
281 
282  void NoteAnimation() const;
283 
284  // Home is where Your heart is...
286  const SwTextFrame *GetTextFrame() const { return m_pFrame; }
287 
288  bool HasHint(TextFrameIndex nPos) const;
289 
290  // If Kana Compression is enabled, a minimum and maximum portion width
291  // is calculated. We format lines with minimal size and share remaining
292  // space among compressed kanas.
293  // During formatting, the maximum values of compressible portions are
294  // stored in m_aMaxWidth and discarded after a line has been formatted.
295  void SetMaxWidthDiff( const SwLinePortion *nKey, sal_uInt16 nVal )
296  {
297  m_aMaxWidth.insert( std::make_pair( nKey, nVal ) );
298  };
299  sal_uInt16 GetMaxWidthDiff( const SwLinePortion *nKey )
300  {
301  SwTextPortionMap::iterator it = m_aMaxWidth.find( nKey );
302 
303  if( it != m_aMaxWidth.end() )
304  return it->second;
305  else
306  return 0;
307  };
309  {
310  m_aMaxWidth.clear();
311  };
313  {
314  return !m_aMaxWidth.empty();
315  };
316 
317  // Feature: Kana Compression
318 
319  sal_uInt16 GetKanaIdx() const { return m_nKanaIdx; }
320  void ResetKanaIdx(){ m_nKanaIdx = 0; }
321  void SetKanaIdx( sal_uInt16 nNew ) { m_nKanaIdx = nNew; }
322  void IncKanaIdx() { ++m_nKanaIdx; }
323  void SetKanaComp( std::deque<sal_uInt16> *pNew ){ m_pKanaComp = pNew; }
324  std::deque<sal_uInt16>* GetpKanaComp() const { return m_pKanaComp; }
325  sal_uInt16 GetKanaComp() const
326  { return ( m_pKanaComp && m_nKanaIdx < m_pKanaComp->size() )
327  ? (*m_pKanaComp)[m_nKanaIdx] : 0; }
328 
329  const std::shared_ptr<const vcl::text::TextLayoutCache>& GetCachedVclData() const
330  {
331  return m_pCachedVclData;
332  }
333  void SetCachedVclData(std::shared_ptr<const vcl::text::TextLayoutCache> const& pCachedVclData)
334  {
335  m_pCachedVclData = pCachedVclData;
336  }
337 };
338 
340 {
344  std::vector<tools::Long>* m_pSpaceAdd;
345  const SvxBrushItem *m_pBrushItem; // For the background
346  SwTextFly m_aTextFly; // Calculate the FlyFrame
347  Point m_aPos; // Paint position
348  SwRect m_aPaintRect; // Original paint rect (from Layout paint)
349 
350  sal_uInt16 m_nSpaceIdx;
351  void DrawText_(const OUString &rText, const SwLinePortion &rPor,
352  const TextFrameIndex nIdx, const TextFrameIndex nLen,
353  const bool bKern, const bool bWrong = false,
354  const bool bSmartTag = false,
355  const bool bGrammarCheck = false );
356 
357  SwTextPaintInfo &operator=(const SwTextPaintInfo&) = delete;
358 
359 protected:
361  : m_pWrongList(nullptr)
362  , m_pGrammarCheckList(nullptr)
363  , m_pSmartTags(nullptr)
364  , m_pSpaceAdd(nullptr)
365  , m_pBrushItem(nullptr)
366  , m_nSpaceIdx(0)
367  {}
368 
369 public:
370  SwTextPaintInfo( const SwTextPaintInfo &rInf );
371  SwTextPaintInfo( const SwTextPaintInfo &rInf, const OUString* pText );
372 
373  void CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint );
374 
375  const SvxBrushItem *GetBrushItem() const { return m_pBrushItem; }
376 
377  SwTextPaintInfo( SwTextFrame *pFrame, const SwRect &rPaint );
378 
379  SwTwips X() const { return m_aPos.X(); }
380  void X( const tools::Long nNew ) { m_aPos.setX(nNew); }
381  SwTwips Y() const { return m_aPos.Y(); }
382  void Y( const SwTwips nNew ) { m_aPos.setY(nNew); }
383 
385  const SwTextFly& GetTextFly() const { return m_aTextFly; }
386  inline void DrawText( const OUString &rText, const SwLinePortion &rPor,
387  TextFrameIndex nIdx = TextFrameIndex(0),
389  const bool bKern = false) const;
390  inline void DrawText( const SwLinePortion &rPor, TextFrameIndex nLen,
391  const bool bKern = false ) const;
392  inline void DrawMarkedText( const SwLinePortion &rPor, TextFrameIndex nLen,
393  const bool bWrong,
394  const bool bSmartTags,
395  const bool bGrammarCheck ) const;
396 
397  void DrawRect( const SwRect &rRect, bool bRetouche ) const;
398 
399  void DrawTab( const SwLinePortion &rPor ) const;
400  void DrawLineBreak( const SwLinePortion &rPor ) const;
401  void DrawRedArrow( const SwLinePortion &rPor ) const;
402  void DrawPostIts( bool bScript ) const;
403  void DrawBackground( const SwLinePortion &rPor, const Color *pColor=nullptr ) const;
404  void DrawViewOpt( const SwLinePortion &rPor, PortionType nWhich, const Color *pColor=nullptr ) const;
405  void DrawBackBrush( const SwLinePortion &rPor ) const;
406 
412  void DrawBorder( const SwLinePortion &rPor ) const;
413 
414  void DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const;
415 
424  void CalcRect( const SwLinePortion& rPor, SwRect* pRect,
425  SwRect* pIntersect = nullptr, const bool bInsideBox = false ) const;
426 
427  inline SwTwips GetPaintOfst() const;
428  inline void SetPaintOfst( const SwTwips nNew );
429  const Point &GetPos() const { return m_aPos; }
430  void SetPos( const Point &rNew ) { m_aPos = rNew; }
431 
432  const SwRect &GetPaintRect() const { return m_aPaintRect; }
433 
434  // STUFF FOR JUSTIFIED ALIGNMENT
435 
436  sal_uInt16 GetSpaceIdx() const { return m_nSpaceIdx; }
437  void ResetSpaceIdx(){m_nSpaceIdx = 0; }
438  void SetSpaceIdx( sal_uInt16 nNew ) { m_nSpaceIdx = nNew; }
439  void IncSpaceIdx() { ++m_nSpaceIdx; }
440  void RemoveFirstSpaceAdd() { m_pSpaceAdd->erase( m_pSpaceAdd->begin() ); }
442  { return ( m_pSpaceAdd && m_nSpaceIdx < m_pSpaceAdd->size() )
443  ? (*m_pSpaceAdd)[m_nSpaceIdx] : 0; }
444 
445  void SetpSpaceAdd( std::vector<tools::Long>* pNew ){ m_pSpaceAdd = pNew; }
446  std::vector<tools::Long>* GetpSpaceAdd() const { return m_pSpaceAdd; }
447 
448  void SetWrongList(sw::WrongListIterator *const pNew) { m_pWrongList = pNew; }
450 
451  void SetGrammarCheckList(sw::WrongListIterator *const pNew) { m_pGrammarCheckList = pNew; }
453 
454  void SetSmartTags(sw::WrongListIterator *const pNew) { m_pSmartTags = pNew; }
456 };
457 
459 {
460  // temporary arguments for hyphenation
461  css::beans::PropertyValues m_aHyphVals;
462 
463  SwLineLayout *m_pRoot; // The Root of the current line (pCurr)
464  SwLinePortion *m_pLast; // The last Portion
465  SwFlyPortion *m_pFly; // The following FlyPortion
466  SwLinePortion *m_pUnderflow; // Underflow: Last Portion
467  SwLinePortion *m_pRest; // The Rest is the start of the next Line
468 
469  SwTabPortion *m_pLastTab; // The _last_ TabPortion
470 
475  // #i34348# Changed type from sal_uInt16 to SwTwips
476  SwTwips m_nLeft; // Left margin
477  SwTwips m_nRight; // Right margin
481  sal_uInt16 m_nRealWidth; // "real" line width
482  sal_uInt16 m_nWidth; // "virtual" line width
483  sal_uInt16 m_nLineHeight; // Final height after CalcLine
484  sal_uInt16 m_nLineNetHeight; // line height without spacing
485  sal_uInt16 m_nForcedLeftMargin; // Shift of left margin due to frame
486 
487  bool m_bFull : 1; // Line is full
488  bool m_bFootnoteDone : 1; // Footnote already formatted
489  bool m_bErgoDone : 1; // ErgoDone already formatted
490  bool m_bNumDone : 1; // bNumDone already formatted
491  bool m_bArrowDone : 1; // Arrow to the left for scrolling paragraphs
492  bool m_bStop : 1; // Cancel immediately, discarding the line
493  bool m_bNewLine : 1; // Format another line
494  bool m_bShift : 1; // Position change: Repaint until further notice
495  bool m_bUnderflow : 1; // Context: Underflow() ?
496  bool m_bInterHyph : 1; // Interactive hyphenation?
497  bool m_bAutoHyph : 1; // Automatic hyphenation?
498  bool m_bDropInit : 1; // Set DropWidth
499  bool m_bQuick : 1; // FormatQuick()
500  bool m_bNoEndHyph : 1; // Switch off hyphenation at the line end (due to MaxHyphens)
501  bool m_bNoMidHyph : 1; // Switch off hyphenation before flys (due to MaxHyphens)
502  bool m_bIgnoreFly : 1; // FitToContent ignores flys
503  bool m_bFakeLineStart : 1; // String has been replaced by field portion
504  // info structure only pretends that we are at
505  // the beginning of a line
506  bool m_bTabOverflow : 1; // Tabs are expanding after the end margin
507  bool m_bTestFormat : 1; // Test formatting from WouldFit, no notification etc.
508 
509  sal_Unicode m_cTabDecimal; // the current decimal delimiter
510  sal_Unicode m_cHookChar; // For tabs in fields etc.
511  sal_uInt8 m_nMaxHyph; // Max. line count of followup hyphenations
512 
513  // Hyphenating ...
514  bool InitHyph( const bool bAuto = false );
515  bool CheckFootnotePortion_( SwLineLayout const * pCurr );
516 
517 public:
518  void CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyph = false,
519  const bool bQuick = false, const bool bTst = false );
520  SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL = false,
521  const bool bQuickL = false, const bool bTst = false);
522 
523  // For the formatting inside a double line in a line (multi-line portion)
524  // we need a modified text-format-info:
525  SwTextFormatInfo( const SwTextFormatInfo& rInf, SwLineLayout& rLay,
526  SwTwips nActWidth );
527 
528  sal_uInt16 Width() const { return m_nWidth; }
529  void Width( const sal_uInt16 nNew ) { m_nWidth = nNew; }
530  void Init();
531 
537 
538  // Returns the first changed position of the paragraph
539  inline TextFrameIndex GetReformatStart() const;
540 
541  // Margins
542  SwTwips Left() const { return m_nLeft; }
543  void Left( const SwTwips nNew ) { m_nLeft = nNew; }
544  SwTwips Right() const { return m_nRight; }
545  void Right( const SwTwips nNew ) { m_nRight = nNew; }
546  SwTwips First() const { return m_nFirst; }
547  void First( const SwTwips nNew ) { m_nFirst = nNew; }
548  void LeftMargin( const SwTwips nNew) { m_nLeftMargin = nNew; }
549  sal_uInt16 RealWidth() const { return m_nRealWidth; }
550  void RealWidth( const sal_uInt16 nNew ) { m_nRealWidth = nNew; }
551  sal_uInt16 ForcedLeftMargin() const { return m_nForcedLeftMargin; }
552  void ForcedLeftMargin( const sal_uInt16 nN ) { m_nForcedLeftMargin = nN; }
553 
554  sal_uInt8 &MaxHyph() { return m_nMaxHyph; }
555  const sal_uInt8 &MaxHyph() const { return m_nMaxHyph; }
556 
557  SwLineLayout *GetRoot() { return m_pRoot; }
558  const SwLineLayout *GetRoot() const { return m_pRoot; }
559 
560  void SetRoot( SwLineLayout *pNew ) { m_pRoot = pNew; }
562  void SetLast( SwLinePortion *pNewLast ) { m_pLast = pNewLast; }
563  bool IsFull() const { return m_bFull; }
564  void SetFull( const bool bNew ) { m_bFull = bNew; }
565  bool IsHyphForbud() const
566  { return m_pFly ? m_bNoMidHyph : m_bNoEndHyph; }
567  void ChkNoHyph( const sal_uInt8 bEnd, const sal_uInt8 bMid )
568  { m_bNoEndHyph = (m_nMaxHyph && bEnd >= m_nMaxHyph);
569  m_bNoMidHyph = (m_nMaxHyph && bMid >= m_nMaxHyph); }
570  bool IsIgnoreFly() const { return m_bIgnoreFly; }
571  void SetIgnoreFly( const bool bNew ) { m_bIgnoreFly = bNew; }
572  bool IsFakeLineStart() const { return m_bFakeLineStart; }
573  void SetFakeLineStart( const bool bNew ) { m_bFakeLineStart = bNew; }
574  bool IsStop() const { return m_bStop; }
575  void SetStop( const bool bNew ) { m_bStop = bNew; }
577  void SetRest( SwLinePortion *pNewRest ) { m_pRest = pNewRest; }
578  bool IsNewLine() const { return m_bNewLine; }
579  void SetNewLine( const bool bNew ) { m_bNewLine = bNew; }
580  bool IsShift() const { return m_bShift; }
581  void SetShift( const bool bNew ) { m_bShift = bNew; }
582  bool IsInterHyph() const { return m_bInterHyph; }
583  bool IsUnderflow() const { return m_bUnderflow; }
584  void ClrUnderflow() { m_bUnderflow = false; }
585  bool IsDropInit() const { return m_bDropInit; }
586  void SetDropInit( const bool bNew ) { m_bDropInit = bNew; }
587  bool IsQuick() const { return m_bQuick; }
588  bool IsTest() const { return m_bTestFormat; }
589 
591  void SetLineStart(TextFrameIndex const nNew) { m_nLineStart = nNew; }
592 
593  // these are used during fly calculation
594  sal_uInt16 GetLineHeight() const { return m_nLineHeight; }
595  void SetLineHeight( const sal_uInt16 nNew ) { m_nLineHeight = nNew; }
596  sal_uInt16 GetLineNetHeight() const { return m_nLineNetHeight; }
597  void SetLineNetHeight( const sal_uInt16 nNew ) { m_nLineNetHeight = nNew; }
598 
599  const SwLinePortion *GetUnderflow() const { return m_pUnderflow; }
602  { m_pUnderflow = pNew; m_bUnderflow = true; }
604  void SetSoftHyphPos(TextFrameIndex const nNew) { m_nSoftHyphPos = nNew; }
605 
606  inline void SetParaFootnote();
607 
608  // FlyFrames
609  SwFlyPortion *GetFly() { return m_pFly; }
610  void SetFly( SwFlyPortion *pNew ) { m_pFly = pNew; }
611 
612  inline const SwAttrSet& GetCharAttr() const;
613 
614  // Tabs
616  void SetLastTab( SwTabPortion *pNew ) { m_pLastTab = pNew; }
618  void SetTabDecimal( const sal_Unicode cNew ) { m_cTabDecimal = cNew;}
619 
620  void ClearHookChar() { m_cHookChar = 0; }
621  void SetHookChar( const sal_Unicode cNew ) { m_cHookChar = cNew; }
622  sal_Unicode GetHookChar() const { return m_cHookChar; }
623 
624  // Done-Flags
625  bool IsFootnoteDone() const { return m_bFootnoteDone; }
626  void SetFootnoteDone( const bool bNew ) { m_bFootnoteDone = bNew; }
627  bool IsErgoDone() const { return m_bErgoDone; }
628  void SetErgoDone( const bool bNew ) { m_bErgoDone = bNew; }
629  bool IsNumDone() const { return m_bNumDone; }
630  void SetNumDone( const bool bNew ) { m_bNumDone = bNew; }
631  bool IsArrowDone() const { return m_bArrowDone; }
632  void SetArrowDone( const bool bNew ) { m_bArrowDone = bNew; }
633 
635 
636  // For SwTextPortion::Hyphenate
637  bool ChgHyph( const bool bNew );
638 
639  // Should the hyphenate helper be discarded?
640  bool IsHyphenate() const;
642  void SetUnderScorePos(TextFrameIndex const nNew) { m_nUnderScorePos = nNew; }
643 
644  // Calls HyphenateWord() of Hyphenator
645  css::uno::Reference< css::linguistic2::XHyphenatedWord >
646  HyphWord( const OUString &rText, const sal_Int32 nMinTrail );
647  const css::beans::PropertyValues & GetHyphValues() const;
648 
649  bool CheckFootnotePortion( SwLineLayout const * pCurr )
650  { return IsFootnoteInside() && CheckFootnotePortion_( pCurr ); }
651 
652  // Dropcaps called by SwTextFormatter::CTOR
653  const SwFormatDrop *GetDropFormat() const;
654 
655  // Sets the last SwKernPortion as pLast, if it is followed by empty portions
656  bool LastKernPortion();
657 
658  // Looks for tabs, TabDec, TXTATR and BRK from nIdx until nEnd.
659  // Return: Position; sets cHookChar if necessary
661 
662  void SetTabOverflow( bool bOverflow ) { m_bTabOverflow = bOverflow; }
663  bool IsTabOverflow() const { return m_bTabOverflow; }
664 
665 };
666 
674 class SwTextSlot final
675 {
676  OUString aText;
677  std::shared_ptr<const vcl::text::TextLayoutCache> m_pOldCachedVclData;
678  const OUString *pOldText;
681  std::unique_ptr<SwWrongList> m_pTempList;
682  std::unique_ptr<sw::WrongListIterator> m_pTempIter;
685  bool bOn;
687 
688 public:
689  // The replacement string originates either from the portion via GetExpText()
690  // or from the rCh, if it is not empty.
691  SwTextSlot( const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen,
692  bool bExgLists, OUString const & rCh = OUString() );
693  ~SwTextSlot();
694 };
695 
697 {
701 public:
702  SwFontSave( const SwTextSizeInfo &rInf, SwFont *pFnt,
703  SwAttrIter* pItr = nullptr );
704  ~SwFontSave();
705 };
706 
707 inline sal_uInt16 SwTextSizeInfo::GetAscent() const
708 {
709  assert(GetOut());
710  return const_cast<SwFont*>(GetFont())->GetAscent( m_pVsh, *GetOut() );
711 }
712 
713 inline sal_uInt16 SwTextSizeInfo::GetTextHeight() const
714 {
715  assert(GetOut());
716  return const_cast<SwFont*>(GetFont())->GetHeight( m_pVsh, *GetOut() );
717 }
718 
719 inline sal_uInt16 SwTextSizeInfo::GetHangingBaseline() const
720 {
721  assert(GetOut());
722  return const_cast<SwFont*>(GetFont())->GetHangingBaseline( m_pVsh, *GetOut() );
723 }
724 
725 inline SwPosSize SwTextSizeInfo::GetTextSize( const OUString &rText ) const
726 {
727  return GetTextSize(m_pOut, nullptr, rText, TextFrameIndex(0), TextFrameIndex(rText.getLength()));
728 }
729 
731  TextFrameIndex const nNewIdx,
732  TextFrameIndex const nNewLen) const
733 {
734  return GetTextSize( m_pOut, pSI, *m_pText, nNewIdx, nNewLen );
735 }
736 
738 {
739  return GetParaPortion()->GetRepaint().GetOffset();
740 }
741 
742 inline void SwTextPaintInfo::SetPaintOfst( const SwTwips nNew )
743 {
744  GetParaPortion()->GetRepaint().SetOffset( nNew );
745 }
746 
747 inline void SwTextPaintInfo::DrawText( const OUString &rText,
748  const SwLinePortion &rPor,
749  const TextFrameIndex nStart, const TextFrameIndex nLength,
750  const bool bKern ) const
751 {
752  const_cast<SwTextPaintInfo*>(this)->DrawText_( rText, rPor, nStart, nLength, bKern );
753 }
754 
755 inline void SwTextPaintInfo::DrawText( const SwLinePortion &rPor,
756  const TextFrameIndex nLength, const bool bKern ) const
757 {
758  const_cast<SwTextPaintInfo*>(this)->DrawText_( *m_pText, rPor, m_nIdx, nLength, bKern );
759 }
760 
762  const TextFrameIndex nLength,
763  const bool bWrong,
764  const bool bSmartTags,
765  const bool bGrammarCheck ) const
766 {
767  const_cast<SwTextPaintInfo*>(this)->DrawText_( *m_pText, rPor, m_nIdx, nLength, false/*bKern*/, bWrong, bSmartTags, bGrammarCheck );
768 }
769 
771 {
772  return GetParaPortion()->GetReformat().Start();
773 }
774 
776 {
777  // sw_redlinehide: this is used for numbering/footnote number portions, so:
779 }
780 
782 {
783  GetTextFrame()->SetFootnote( true );
784 }
785 
786 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bOn
Definition: inftxt.hxx:685
TextFrameIndex m_nLastBookmarkPos
need to check for bookmarks at every portion
Definition: inftxt.hxx:474
rtl_TextEncoding GetCharSet(const SwFontScript nWhich) const
Definition: swfont.hxx:295
void SetLineNetHeight(const sal_uInt16 nNew)
Definition: inftxt.hxx:597
void RemoveFirstSpaceAdd()
Definition: inftxt.hxx:440
bool LastKernPortion()
Definition: inftxt.cxx:1719
bool IsFirstMulti() const
Definition: inftxt.hxx:205
VclPtr< OutputDevice > m_pRef
Definition: inftxt.hxx:143
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:162
bool IsArrowDone() const
Definition: inftxt.hxx:631
~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:1142
void SetSnapToGrid(const bool bN)
Definition: inftxt.hxx:216
SwTextInfo(SwTextFrame *pFrame)
Definition: inftxt.hxx:120
void SetArrowDone(const bool bNew)
Definition: inftxt.hxx:632
const sal_uInt8 & MaxHyph() const
Definition: inftxt.hxx:555
SwRect m_aPaintRect
Definition: inftxt.hxx:348
sal_uInt16 GetHangingBaseline() const
Definition: inftxt.hxx:719
bool CheckFootnotePortion_(SwLineLayout const *pCurr)
Definition: inftxt.cxx:1611
bool IsQuick() const
Definition: inftxt.hxx:587
SwLinePortion * GetUnderflow()
Definition: inftxt.hxx:600
bool IsUnderflow() const
Definition: inftxt.hxx:583
const css::beans::PropertyValues & GetHyphValues() const
Definition: inftxt.cxx:1396
SwTwips GetPaintOfst() const
Definition: inftxt.hxx:737
SwFont * GetFont()
Definition: inftxt.hxx:231
bool IsDropInit() const
Definition: inftxt.hxx:585
void First(const SwTwips nNew)
Definition: inftxt.hxx:547
sal_Unicode m_cTabDecimal
Definition: inftxt.hxx:509
void SetPos(const Point &rNew)
Definition: inftxt.hxx:430
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:529
TextFrameIndex m_nLen
Definition: inftxt.hxx:156
bool IsRuby() const
Definition: inftxt.hxx:207
sal_Unicode GetTabDecimal() const
Definition: inftxt.hxx:617
long Long
sal_uInt16 m_nDefTabStop
Definition: inftxt.hxx:67
void SetFakeLineStart(const bool bNew)
Definition: inftxt.hxx:573
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:121
void SetLast(SwLinePortion *pNewLast)
Definition: inftxt.hxx:562
SwTabPortion * GetLastTab()
Definition: inftxt.hxx:615
TextFrameIndex GetUnderScorePos() const
Definition: inftxt.hxx:641
TextFrameIndex ScanPortionEnd(TextFrameIndex nStart, TextFrameIndex nEnd)
Definition: inftxt.cxx:1626
SwTwips Left() const
Definition: inftxt.hxx:542
void DrawBorder(const SwLinePortion &rPor) const
Draw character border around a line portion.
Definition: inftxt.cxx:1292
bool IsNumDone() const
Definition: inftxt.hxx:629
void Y(const SwTwips nNew)
Definition: inftxt.hxx:382
sal_uInt16 GetTextHeight() const
Definition: inftxt.hxx:713
bool IsErgoDone() const
Definition: inftxt.hxx:627
SwFont * m_pFnt
Definition: inftxt.hxx:150
void SetIgnoreFly(const bool bNew)
Definition: inftxt.hxx:571
SwTextSizeInfo * pInf
Definition: inftxt.hxx:698
const SvxBrushItem * m_pBrushItem
Definition: inftxt.hxx:345
bool m_bFootnoteDone
Definition: inftxt.hxx:488
void SetScriptSpace(const bool bNew)
Definition: inftxt.hxx:212
sal_uInt16 GetLineNetHeight() const
Definition: inftxt.hxx:596
void LeftMargin(const SwTwips nNew)
Definition: inftxt.hxx:548
const OUString * pOldText
Definition: inftxt.hxx:678
sw::WrongListIterator * GetGrammarCheckList() const
Definition: inftxt.hxx:452
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:747
tools::Long GetSpaceAdd() const
Definition: inftxt.hxx:441
sal_uInt16 RealWidth() const
Definition: inftxt.hxx:549
void NoteAnimation() const
Definition: inftxt.cxx:373
void DrawPostIts(bool bScript) const
Definition: inftxt.cxx:1040
Dialog to specify the properties of date form field.
void SetText(const OUString &rNew)
Definition: inftxt.hxx:276
void SetKanaComp(std::deque< sal_uInt16 > *pNew)
Definition: inftxt.hxx:323
void SetMulti(const bool bNew)
Definition: inftxt.hxx:204
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
void SetGrammarCheckList(sw::WrongListIterator *const pNew)
Definition: inftxt.hxx:451
bool HasHint(TextFrameIndex nPos) const
Definition: inftxt.cxx:474
sal_uInt16 m_nKanaIdx
Definition: inftxt.hxx:157
tools::Long m_nListTabStopPosition
Definition: inftxt.hxx:69
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:589
const SwViewShell * GetVsh() const
Definition: inftxt.hxx:222
void SetHanging(const bool bNew)
Definition: inftxt.hxx:210
sal_uInt8 & MaxHyph()
Definition: inftxt.hxx:554
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:250
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:551
bool IsFull() const
Definition: inftxt.hxx:563
bool m_bHanging
Definition: inftxt.hxx:171
const SvxLineSpacingItem * GetLineSpacing() const
Definition: inftxt.hxx:79
bool m_bFakeLineStart
Definition: inftxt.hxx:503
TextFrameIndex & Start()
Definition: porlay.hxx:45
void Right(const SwTwips nNew)
Definition: inftxt.hxx:545
void SetHookChar(const sal_Unicode cNew)
Definition: inftxt.hxx:621
void Left(const SwTwips nNew)
Definition: inftxt.hxx:543
const SwFont * GetFont() const
Definition: inftxt.hxx:232
SwTwips m_nFirst
Definition: inftxt.hxx:478
void SetFull(const bool bNew)
Definition: inftxt.hxx:564
SwTwips m_nRight
Definition: inftxt.hxx:477
sal_uInt16 sal_Unicode
sw::WrongListIterator * GetSmartTags() const
Definition: inftxt.hxx:455
void SetParaFootnote()
Definition: inftxt.hxx:781
bool IsInterHyph() const
Definition: inftxt.hxx:582
void SetLastTab(SwTabPortion *pNew)
Definition: inftxt.hxx:616
bool IsTabOverflow() const
Definition: inftxt.hxx:663
void IncSpaceIdx()
Definition: inftxt.hxx:439
bool URLNotify() const
Definition: inftxt.hxx:196
bool IsFootnoteInside() const
Definition: inftxt.hxx:199
sal_Unicode GetChar(TextFrameIndex const nPos) const
Definition: inftxt.hxx:240
TextFrameIndex nLen
Definition: inftxt.hxx:684
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:321
bool m_bScriptSpace
Definition: inftxt.hxx:172
void SetRoot(SwLineLayout *pNew)
Definition: inftxt.hxx:560
void DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const
Definition: inftxt.cxx:1087
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich, const Color *pColor=nullptr) const
Definition: inftxt.cxx:1304
bool m_bNotEOL
Definition: inftxt.hxx:159
SwLinePortion * m_pUnderflow
Definition: inftxt.hxx:466
vcl::RenderContext * GetRefDev()
Definition: inftxt.hxx:228
bool m_bListTabStopIncluded
Definition: inftxt.hxx:68
void CtorInitTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyph=false, const bool bQuick=false, const bool bTst=false)
Definition: inftxt.cxx:1422
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:578
TextFrameIndex GetLineStart() const
Definition: inftxt.hxx:590
SwFontScript GetActual() const
Definition: swfont.hxx:184
const vcl::RenderContext * GetOut() const
Definition: inftxt.hxx:225
std::deque< sal_uInt16 > * GetpKanaComp() const
Definition: inftxt.hxx:324
void SetPaintOfst(const SwTwips nNew)
Definition: inftxt.hxx:742
void SetNumDone(const bool bNew)
Definition: inftxt.hxx:630
bool IsIgnoreFly() const
Definition: inftxt.hxx:570
void DrawBackground(const SwLinePortion &rPor, const Color *pColor=nullptr) const
Definition: inftxt.cxx:1118
sal_uInt16 m_nRealWidth
Definition: inftxt.hxx:481
SwTwips Y() const
Definition: inftxt.hxx:381
SwTwips First() const
Definition: inftxt.hxx:546
void IncKanaIdx()
Definition: inftxt.hxx:322
sal_uInt16 m_nWidth
Definition: inftxt.hxx:482
SwTextSizeInfo * pInf
Definition: inftxt.hxx:686
bool m_bTestFormat
Definition: inftxt.hxx:507
bool HasScriptSpace() const
Definition: inftxt.hxx:211
const SwViewOption & GetOpt() const
Definition: inftxt.hxx:238
SwTextNode const * GetTextNodeForParaProps() const
Definition: txtfrm.cxx:1306
sal_uInt16 m_nLineNetHeight
Definition: inftxt.hxx:484
bool m_bStopUnderflow
Definition: inftxt.hxx:161
SwPosSize GetTextSize() const
Definition: inftxt.cxx:396
css::beans::PropertyValues m_aHyphVals
Definition: inftxt.hxx:461
TextFrameIndex m_nIdx
Definition: inftxt.hxx:155
bool IsShift() const
Definition: inftxt.hxx:580
std::vector< tools::Long > * GetpSpaceAdd() const
Definition: inftxt.hxx:446
TextFrameIndex m_nTextStart
Definition: inftxt.hxx:109
TextFrameIndex m_nUnderScorePos
enlarge repaint if underscore has been found
Definition: inftxt.hxx:473
Collection of SwLinePortion instances, representing one line of text.
Definition: porlay.hxx:78
void RealWidth(const sal_uInt16 nNew)
Definition: inftxt.hxx:550
SwTwips GetLineWidth()
Returns the distance between the current horizontal position and the end of the line.
Definition: inftxt.cxx:1747
vcl::RenderContext * GetOut()
Definition: inftxt.hxx:224
void SetFont(SwFont *pNew)
Definition: inftxt.hxx:233
void DrawLineBreak(const SwLinePortion &rPor) const
Definition: inftxt.cxx:961
SwTextFly & GetTextFly()
Definition: inftxt.hxx:384
void SetStop(const bool bNew)
Definition: inftxt.hxx:575
SwTextFly m_aTextFly
Definition: inftxt.hxx:346
SwParaPortion * GetParaPortion()
Definition: inftxt.hxx:121
bool HasForbiddenChars() const
Definition: inftxt.hxx:213
SwCharRange & GetReformat()
Definition: porlay.hxx:287
void SetUnderflow(SwLinePortion *pNew)
Definition: inftxt.hxx:601
const OUString * m_pText
Definition: inftxt.hxx:154
bool InitHyph(const bool bAuto=false)
Definition: inftxt.cxx:1403
std::unique_ptr< SwWrongList > m_pTempList
Definition: inftxt.hxx:681
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:565
void SetCachedVclData(std::shared_ptr< const vcl::text::TextLayoutCache > const &pCachedVclData)
Definition: inftxt.hxx:333
void SetMaxWidthDiff(const SwLinePortion *nKey, sal_uInt16 nVal)
Definition: inftxt.hxx:295
sw::WrongListIterator * m_pGrammarCheckList
Definition: inftxt.hxx:342
void ResetSpaceIdx()
Definition: inftxt.hxx:437
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:719
sal_uInt16 Width() const
Definition: inftxt.hxx:528
SwLineLayout * GetRoot()
Definition: inftxt.hxx:557
bool NotEOL() const
Definition: inftxt.hxx:194
const SwFormatDrop * GetDropFormat() const
Definition: inftxt.cxx:1504
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:308
void SetUnderScorePos(TextFrameIndex const nNew)
Definition: inftxt.hxx:642
sal_Unicode m_cHookChar
Definition: inftxt.hxx:510
size
sw::WrongListIterator * m_pSmartTags
Definition: inftxt.hxx:343
void DrawTab(const SwLinePortion &rPor) const
Definition: inftxt.cxx:944
SwAttrIter * pIter
Definition: inftxt.hxx:700
SwTwips m_nLeft
Definition: inftxt.hxx:476
TextFrameIndex GetIdx() const
Definition: inftxt.hxx:272
bool CheckFootnotePortion(SwLineLayout const *pCurr)
Definition: inftxt.hxx:649
void DrawRect(const SwRect &rRect, bool bRetouche) const
Definition: inftxt.cxx:932
void SetTabDecimal(const sal_Unicode cNew)
Definition: inftxt.hxx:618
void ClrUnderflow()
Definition: inftxt.hxx:584
const SwLineLayout * GetRoot() const
Definition: inftxt.hxx:558
void SetTabOverflow(bool bOverflow)
Definition: inftxt.hxx:662
sal_uInt16 GetMaxWidthDiff(const SwLinePortion *nKey)
Definition: inftxt.hxx:299
void SetRuby(const bool bNew)
Definition: inftxt.hxx:208
sal_Unicode GetHookChar() const
Definition: inftxt.hxx:622
SwTextPaintInfo & operator=(const SwTextPaintInfo &)=delete
bool m_bFootnoteInside
Definition: inftxt.hxx:162
void X(const tools::Long nNew)
Definition: inftxt.hxx:380
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:610
sw::WrongListIterator * GetpWrongList() const
Definition: inftxt.hxx:449
SwTextFrame * GetTextFrame()
Definition: inftxt.hxx:285
SwLineLayout * m_pRoot
Definition: inftxt.hxx:463
tools::Long SwTwips
Definition: swtypes.hxx:51
bool IsNoSymbol() const
Definition: inftxt.hxx:279
const vcl::RenderContext * GetRefDev() const
Definition: inftxt.hxx:229
SwTabPortion * m_pLastTab
Definition: inftxt.hxx:469
const OUString & GetText() const
Definition: inftxt.hxx:239
bool IsStop() const
Definition: inftxt.hxx:574
const SwAttrSet & GetCharAttr() const
Definition: inftxt.hxx:775
bool CompressLine()
Definition: inftxt.hxx:312
SwTextFrame * m_pFrame
Definition: inftxt.hxx:152
const SwLinePortion * GetUnderflow() const
Definition: inftxt.hxx:599
VclPtr< OutputDevice > m_pOut
Definition: inftxt.hxx:142
void ClearHookChar()
Definition: inftxt.hxx:620
std::shared_ptr< const vcl::text::TextLayoutCache > m_pCachedVclData
Definition: inftxt.hxx:148
SwUnderlineFont * GetUnderFnt() const
Definition: inftxt.hxx:236
void CtorInitTextInfo(SwTextFrame *pFrame)
Definition: inftxt.cxx:143
const Point & GetPos() const
Definition: inftxt.hxx:429
void SetForbiddenChars(const bool bN)
Definition: inftxt.hxx:214
bool m_bOtherThanFootnoteInside
Definition: inftxt.hxx:163
SwTwips X() const
Definition: inftxt.hxx:379
const SwTextFly & GetTextFly() const
Definition: inftxt.hxx:385
Base class for anything that can be part of a line in the Writer layout.
Definition: porlin.hxx:51
bool m_bFirstMulti
Definition: inftxt.hxx:166
TextFrameIndex GetReformatStart() const
Definition: inftxt.hxx:770
sal_uInt16 m_nLineHeight
Definition: inftxt.hxx:483
SwTwips Right() const
Definition: inftxt.hxx:544
void SetSoftHyphPos(TextFrameIndex const nNew)
Definition: inftxt.hxx:604
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:1470
void SetLen(const TextFrameIndex nNew)
Definition: inftxt.hxx:275
OUString aText
Definition: inftxt.hxx:676
std::map< SwLinePortion const *, sal_uInt16 > SwTextPortionMap
Definition: inftxt.hxx:129
For the text replacement and restoration of SwTextSizeInfo.
Definition: inftxt.hxx:674
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:65
void ForcedLeftMargin(const sal_uInt16 nN)
Definition: inftxt.hxx:552
sal_uInt16 GetKanaIdx() const
Definition: inftxt.hxx:319
unsigned char sal_uInt8
SwRepaint & GetRepaint()
Definition: porlay.hxx:285
const SvxLineSpacingItem * m_pSpace
Definition: inftxt.hxx:65
void SetFootnoteDone(const bool bNew)
Definition: inftxt.hxx:626
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:603
bool HasSpecialAlign(bool bVert) const
Definition: inftxt.hxx:86
std::unique_ptr< sw::WrongListIterator > m_pTempIter
Definition: inftxt.hxx:682
SwLinePortion * GetRest()
Definition: inftxt.hxx:576
sal_uInt16 m_nSpaceIdx
Definition: inftxt.hxx:350
void ChkNoHyph(const sal_uInt8 bEnd, const sal_uInt8 bMid)
Definition: inftxt.hxx:567
const SvxBrushItem * GetBrushItem() const
Definition: inftxt.hxx:375
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
std::optional< SvxTabStopItem > m_oRuler
Definition: inftxt.hxx:64
void SetWrongList(sw::WrongListIterator *const pNew)
Definition: inftxt.hxx:448
TextFrameIndex GetLen() const
Definition: inftxt.hxx:274
sw::WrongListIterator * m_pWrongList
Definition: inftxt.hxx:341
void SetErgoDone(const bool bNew)
Definition: inftxt.hxx:628
void SetDirection(const sal_uInt8 nNew)
Definition: inftxt.hxx:218
void SetSpaceIdx(sal_uInt16 nNew)
Definition: inftxt.hxx:438
SwTwips m_nLeftMargin
First or left margin, depending on context.
Definition: inftxt.hxx:480
void SetShift(const bool bNew)
Definition: inftxt.hxx:581
void SetLineStart(TextFrameIndex const nNew)
Definition: inftxt.hxx:591
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:679
SwLinePortion * GetLast()
Definition: inftxt.hxx:561
void SetpSpaceAdd(std::vector< tools::Long > *pNew)
Definition: inftxt.hxx:445
SwFont * pFnt
Definition: inftxt.hxx:699
bool CheckCurrentPosBookmark()
Definition: inftxt.cxx:1978
TextFrameIndex nIdx
Definition: inftxt.hxx:683
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:724
const SvxTabStop * GetTabStop(const SwTwips nSearchPos, SwTwips &nRight) const
#i24363# tab stops relative to indent
Definition: txttab.cxx:43
void DrawRedArrow(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1008
constexpr sal_Int32 COMPLETE_STRING
Definition: swtypes.hxx:57
SwLinePortion * m_pLast
Definition: inftxt.hxx:464
SwTextInfo()
Definition: inftxt.hxx:112
bool m_bTabOverflow
Definition: inftxt.hxx:506
void SetOut(OutputDevice *pNewOut)
Definition: inftxt.hxx:226
bool StopUnderflow() const
Definition: inftxt.hxx:197
bool IsFakeLineStart() const
Definition: inftxt.hxx:572
TextFrameIndex m_nLineStart
Current line start in rText.
Definition: inftxt.hxx:472
sal_uInt8 m_nMaxHyph
Definition: inftxt.hxx:511
TextFrameIndex GetTextBreak(const tools::Long nLineWidth, const TextFrameIndex nMaxLen, const sal_uInt16 nComp, vcl::text::TextLayoutCache const *) const
Definition: inftxt.cxx:433
void SetNewLine(const bool bNew)
Definition: inftxt.hxx:579
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:595
bool IsOtherThanFootnoteInside() const
Definition: inftxt.hxx:201
const SwRect & GetPaintRect() const
Definition: inftxt.hxx:432
std::optional< SwMultiCreator > GetMultiCreator(TextFrameIndex &rPos, SwMultiPortion const *pM) const
Definition: pormulti.cxx:934
bool IsTest() const
Definition: inftxt.hxx:588
void ResetKanaIdx()
Definition: inftxt.hxx:320
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:454
sal_uInt16 GetKanaComp() const
Definition: inftxt.hxx:325
SwFlyPortion * GetFly()
Definition: inftxt.hxx:609
SwTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL=false, const bool bQuickL=false, const bool bTst=false)
Definition: inftxt.cxx:1550
sal_uInt16 GetLineHeight() const
Definition: inftxt.hxx:594
void SetIdx(const TextFrameIndex nNew)
Definition: inftxt.hxx:273
SvxParaVertAlignItem::Align GetVertAlign() const
Definition: inftxt.hxx:85
sal_uInt16 m_nForcedLeftMargin
Definition: inftxt.hxx:485
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:577
std::shared_ptr< const vcl::text::TextLayoutCache > m_pOldCachedVclData
Definition: inftxt.hxx:677
SvxParaVertAlignItem::Align m_nVertAlign
Definition: inftxt.hxx:66
void SetDropInit(const bool bNew)
Definition: inftxt.hxx:586
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:761
TextFrameIndex GetTextStart() const
Definition: inftxt.hxx:123
TextFrameIndex GetSoftHyphPos() const
Definition: inftxt.hxx:603
bool IsFootnoteDone() const
Definition: inftxt.hxx:625
const std::shared_ptr< const vcl::text::TextLayoutCache > & GetCachedVclData() const
Definition: inftxt.hxx:329
TextFrameIndex m_nSoftHyphPos
SoftHyphPos for Hyphenation.
Definition: inftxt.hxx:471
const SwTextFrame * GetTextFrame() const
Definition: inftxt.hxx:286
SwLinePortion * m_pRest
Definition: inftxt.hxx:467
SwTextPortionMap m_aMaxWidth
Definition: inftxt.hxx:134
sal_uInt16 GetAscent() const
Definition: inftxt.hxx:707
sal_uInt16 GetSpaceIdx() const
Definition: inftxt.hxx:436
bool m_bSnapToGrid
Definition: inftxt.hxx:174
std::vector< tools::Long > * m_pSpaceAdd
Definition: inftxt.hxx:344
sw::WrongListIterator * m_pOldGrammarCheckList
Definition: inftxt.hxx:680
void SetNotEOL(const bool bNew)
Definition: inftxt.hxx:195
SwFlyPortion * m_pFly
Definition: inftxt.hxx:465