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