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