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