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
419 void DrawCSDFHighlighting(const SwLinePortion &rPor) const;
420
429 void CalcRect( const SwLinePortion& rPor, SwRect* pRect,
430 SwRect* pIntersect = nullptr, const bool bInsideBox = false ) const;
431
432 inline SwTwips GetPaintOfst() const;
433 inline void SetPaintOfst( const SwTwips nNew );
434 const Point &GetPos() const { return m_aPos; }
435 void SetPos( const Point &rNew ) { m_aPos = rNew; }
436
437 const SwRect &GetPaintRect() const { return m_aPaintRect; }
438
439 // STUFF FOR JUSTIFIED ALIGNMENT
440
441 sal_uInt16 GetSpaceIdx() const { return m_nSpaceIdx; }
443 void SetSpaceIdx( sal_uInt16 nNew ) { m_nSpaceIdx = nNew; }
445 void RemoveFirstSpaceAdd() { m_pSpaceAdd->erase( m_pSpaceAdd->begin() ); }
447 { return ( m_pSpaceAdd && m_nSpaceIdx < m_pSpaceAdd->size() )
448 ? (*m_pSpaceAdd)[m_nSpaceIdx] : 0; }
449
450 void SetpSpaceAdd( std::vector<tools::Long>* pNew ){ m_pSpaceAdd = pNew; }
451 std::vector<tools::Long>* GetpSpaceAdd() const { return m_pSpaceAdd; }
452
453 void SetWrongList(sw::WrongListIterator *const pNew) { m_pWrongList = pNew; }
455
458
459 void SetSmartTags(sw::WrongListIterator *const pNew) { m_pSmartTags = pNew; }
461};
462
464{
465 // temporary arguments for hyphenation
466 css::beans::PropertyValues m_aHyphVals;
467
468 SwLineLayout *m_pRoot; // The Root of the current line (pCurr)
469 SwLinePortion *m_pLast; // The last Portion
470 SwFlyPortion *m_pFly; // The following FlyPortion
471 SwLinePortion *m_pUnderflow; // Underflow: Last Portion
472 SwLinePortion *m_pRest; // The Rest is the start of the next Line
473
474 SwTabPortion *m_pLastTab; // The _last_ TabPortion
475
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
522public:
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:
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
560 const sal_uInt8 &MaxHyph() const { return m_nMaxHyph; }
561
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
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
626 void SetHookChar( const sal_Unicode cNew ) { m_cHookChar = cNew; }
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
640
641 // For SwTextPortion::Hyphenate
642 bool ChgHyph( const bool bNew );
643
644 // Should the hyphenate helper be discarded?
645 bool IsHyphenate() const;
648
649 // Calls HyphenateWord() of Hyphenator
650 css::uno::Reference< css::linguistic2::XHyphenatedWord >
651 HyphWord( const OUString &rText, const sal_Int32 nMinTrail );
652 const css::beans::PropertyValues & GetHyphValues() const;
653
654 bool CheckFootnotePortion( SwLineLayout const * pCurr )
655 { return IsFootnoteInside() && CheckFootnotePortion_( pCurr ); }
656
657 // Dropcaps called by SwTextFormatter::CTOR
658 const SwFormatDrop *GetDropFormat() const;
659
660 // Sets the last SwKernPortion as pLast, if it is followed by empty portions
661 bool LastKernPortion();
662
663 // Looks for tabs, TabDec, TXTATR and BRK from nIdx until nEnd.
664 // Return: Position; sets cHookChar if necessary
666
667 void SetTabOverflow( bool bOverflow ) { m_bTabOverflow = bOverflow; }
668 bool IsTabOverflow() const { return m_bTabOverflow; }
669
670};
671
679class SwTextSlot final
680{
681 OUString aText;
682 std::shared_ptr<const vcl::text::TextLayoutCache> m_pOldCachedVclData;
683 const OUString *pOldText;
686 std::unique_ptr<SwWrongList> m_pTempList;
687 std::unique_ptr<sw::WrongListIterator> m_pTempIter;
691 bool bOn;
693
694public:
695 // The replacement string originates either from the portion via GetExpText()
696 // or from the rCh, if it is not empty.
697 SwTextSlot( const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen,
698 bool bExgLists, OUString const & rCh = OUString() );
699 ~SwTextSlot();
700};
701
703{
707public:
708 SwFontSave( const SwTextSizeInfo &rInf, SwFont *pFnt,
709 SwAttrIter* pItr = nullptr );
710 ~SwFontSave();
711};
712
713inline sal_uInt16 SwTextSizeInfo::GetAscent() const
714{
715 assert(GetOut());
716 return const_cast<SwFont*>(GetFont())->GetAscent( m_pVsh, *GetOut() );
717}
718
719inline sal_uInt16 SwTextSizeInfo::GetTextHeight() const
720{
721 assert(GetOut());
722 return const_cast<SwFont*>(GetFont())->GetHeight( m_pVsh, *GetOut() );
723}
724
725inline sal_uInt16 SwTextSizeInfo::GetHangingBaseline() const
726{
727 assert(GetOut());
728 return const_cast<SwFont*>(GetFont())->GetHangingBaseline( m_pVsh, *GetOut() );
729}
730
731inline SwPosSize SwTextSizeInfo::GetTextSize( const OUString &rText ) const
732{
733 return GetTextSize(m_pOut, nullptr, rText, TextFrameIndex(0), TextFrameIndex(rText.getLength()));
734}
735
737 TextFrameIndex const nNewIdx,
738 TextFrameIndex const nNewLen) const
739{
740 return GetTextSize( m_pOut, pSI, *m_pText, nNewIdx, nNewLen );
741}
742
744{
745 return GetParaPortion()->GetRepaint().GetOffset();
746}
747
748inline void SwTextPaintInfo::SetPaintOfst( const SwTwips nNew )
749{
751}
752
753inline void SwTextPaintInfo::DrawText( const OUString &rText,
754 const SwLinePortion &rPor,
755 const TextFrameIndex nStart, const TextFrameIndex nLength,
756 const bool bKern ) const
757{
758 const_cast<SwTextPaintInfo*>(this)->DrawText_( rText, rPor, nStart, nLength, bKern );
759}
760
762 const TextFrameIndex nLength, const bool bKern ) const
763{
764 const_cast<SwTextPaintInfo*>(this)->DrawText_( *m_pText, rPor, m_nIdx, nLength, bKern );
765}
766
768 const TextFrameIndex nLength,
769 const bool bWrong,
770 const bool bSmartTags,
771 const bool bGrammarCheck ) const
772{
773 const_cast<SwTextPaintInfo*>(this)->DrawText_( *m_pText, rPor, m_nIdx, nLength, false/*bKern*/, bWrong, bSmartTags, bGrammarCheck );
774}
775
777{
778 return GetParaPortion()->GetReformat().Start();
779}
780
782{
783 // sw_redlinehide: this is used for numbering/footnote number portions, so:
785}
786
788{
789 GetTextFrame()->SetFootnote( true );
790}
791
792/* 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...
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
TextFrameIndex & Start()
Definition: porlay.hxx:45
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
Definition: node.hxx:727
SwTextSizeInfo * pInf
Definition: inftxt.hxx:704
SwAttrIter * pIter
Definition: inftxt.hxx:706
SwFont * pFnt
Definition: inftxt.hxx:705
SwFontSave(const SwTextSizeInfo &rInf, SwFont *pFnt, SwAttrIter *pItr=nullptr)
Definition: inftxt.cxx:2106
To take Asian or other languages into consideration, an SwFont object consists of 3 SwSubFonts (Latin...
Definition: swfont.hxx:135
rtl_TextEncoding GetCharSet(const SwFontScript nWhich) const
Definition: swfont.hxx:298
SwFontScript GetActual() const
Definition: swfont.hxx:187
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps.
Definition: paratr.hxx:72
SwLineInfo()
Definition: inftxt.cxx:96
void SetDefTabStop(sal_uInt16 nNew) const
Definition: inftxt.hxx:81
void CtorInitLineInfo(const SwAttrSet &rAttrSet, const SwTextNode &rTextNode)
Definition: inftxt.cxx:109
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:105
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:125
void SetArrowDone(const bool bNew)
Definition: inftxt.hxx:637
TextFrameIndex m_nLastBookmarkPos
need to check for bookmarks at every portion
Definition: inftxt.hxx:479
SwLinePortion * GetLast()
Definition: inftxt.hxx:566
sal_uInt16 m_nLineHeight
Definition: inftxt.hxx:488
bool IsIgnoreFly() const
Definition: inftxt.hxx:575
void SetStop(const bool bNew)
Definition: inftxt.hxx:580
const SwLineLayout * GetRoot() const
Definition: inftxt.hxx:563
SwTabPortion * GetLastTab()
Definition: inftxt.hxx:620
void SetParaFootnote()
Definition: inftxt.hxx:787
void SetFly(SwFlyPortion *pNew)
Definition: inftxt.hxx:615
void SetErgoDone(const bool bNew)
Definition: inftxt.hxx:633
sal_Unicode m_cHookChar
Definition: inftxt.hxx:515
void CtorInitTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyph=false, const bool bQuick=false, const bool bTst=false)
Definition: inftxt.cxx:1610
void ChkNoHyph(const sal_uInt8 bEnd, const sal_uInt8 bMid)
Definition: inftxt.hxx:572
bool IsFakeLineStart() const
Definition: inftxt.hxx:577
void SetUnderScorePos(TextFrameIndex const nNew)
Definition: inftxt.hxx:647
void ClrUnderflow()
Definition: inftxt.hxx:589
SwLineLayout * GetRoot()
Definition: inftxt.hxx:562
bool IsInterHyph() const
Definition: inftxt.hxx:587
const SwFormatDrop * GetDropFormat() const
Definition: inftxt.cxx:1692
void SetRoot(SwLineLayout *pNew)
Definition: inftxt.hxx:565
css::uno::Reference< css::linguistic2::XHyphenatedWord > HyphWord(const OUString &rText, const sal_Int32 nMinTrail)
Definition: txthyph.cxx:39
SwLineLayout * m_pRoot
Definition: inftxt.hxx:468
SwLinePortion * m_pUnderflow
Definition: inftxt.hxx:471
void SetRest(SwLinePortion *pNewRest)
Definition: inftxt.hxx:582
sal_uInt16 ForcedLeftMargin() const
Definition: inftxt.hxx:556
bool CheckFootnotePortion(SwLineLayout const *pCurr)
Definition: inftxt.hxx:654
void SetShift(const bool bNew)
Definition: inftxt.hxx:586
bool IsDropInit() const
Definition: inftxt.hxx:590
void SetLineStart(TextFrameIndex const nNew)
Definition: inftxt.hxx:596
bool InitHyph(const bool bAuto=false)
Definition: inftxt.cxx:1586
bool IsTest() const
Definition: inftxt.hxx:593
void SetDropInit(const bool bNew)
Definition: inftxt.hxx:591
sal_uInt16 RealWidth() const
Definition: inftxt.hxx:554
void SetTabOverflow(bool bOverflow)
Definition: inftxt.hxx:667
bool m_bFootnoteDone
Definition: inftxt.hxx:493
TextFrameIndex GetLineStart() const
Definition: inftxt.hxx:595
sal_uInt16 m_nRealWidth
Definition: inftxt.hxx:486
bool m_bTestFormat
Definition: inftxt.hxx:512
sal_uInt16 m_nLineNetHeight
Definition: inftxt.hxx:489
void SetLineNetHeight(const sal_uInt16 nNew)
Definition: inftxt.hxx:602
SwTwips Right() const
Definition: inftxt.hxx:549
bool IsUnderflow() const
Definition: inftxt.hxx:588
bool CheckFootnotePortion_(SwLineLayout const *pCurr)
Definition: inftxt.cxx:1799
const SwLinePortion * GetUnderflow() const
Definition: inftxt.hxx:604
bool LastKernPortion()
Definition: inftxt.cxx:1907
sal_Unicode GetHookChar() const
Definition: inftxt.hxx:627
void SetLineHeight(const sal_uInt16 nNew)
Definition: inftxt.hxx:600
TextFrameIndex m_nUnderScorePos
enlarge repaint if underscore has been found
Definition: inftxt.hxx:478
bool IsShift() const
Definition: inftxt.hxx:585
bool IsNumDone() const
Definition: inftxt.hxx:634
bool IsErgoDone() const
Definition: inftxt.hxx:632
TextFrameIndex ScanPortionEnd(TextFrameIndex nStart, TextFrameIndex nEnd)
Definition: inftxt.cxx:1814
TextFrameIndex m_nSoftHyphPos
SoftHyphPos for Hyphenation.
Definition: inftxt.hxx:476
bool m_bTabOverflow
Definition: inftxt.hxx:511
sal_uInt16 GetLineNetHeight() const
Definition: inftxt.hxx:601
bool IsQuick() const
Definition: inftxt.hxx:592
sal_Unicode m_cTabDecimal
Definition: inftxt.hxx:514
SwTabPortion * m_pLastTab
Definition: inftxt.hxx:474
SwTwips Left() const
Definition: inftxt.hxx:547
sal_uInt16 GetLineHeight() const
Definition: inftxt.hxx:599
void RealWidth(const sal_uInt16 nNew)
Definition: inftxt.hxx:555
sal_uInt8 & MaxHyph()
Definition: inftxt.hxx:559
void SetLast(SwLinePortion *pNewLast)
Definition: inftxt.hxx:567
SwLinePortion * m_pRest
Definition: inftxt.hxx:472
void SetIgnoreFly(const bool bNew)
Definition: inftxt.hxx:576
bool IsFull() const
Definition: inftxt.hxx:568
SwLinePortion * GetRest()
Definition: inftxt.hxx:581
const sal_uInt8 & MaxHyph() const
Definition: inftxt.hxx:560
sal_uInt16 m_nForcedLeftMargin
Definition: inftxt.hxx:490
const SwAttrSet & GetCharAttr() const
Definition: inftxt.hxx:781
void Left(const SwTwips nNew)
Definition: inftxt.hxx:548
SwTwips m_nLeftMargin
First or left margin, depending on context.
Definition: inftxt.hxx:485
bool IsNewLine() const
Definition: inftxt.hxx:583
sal_uInt8 m_nMaxHyph
Definition: inftxt.hxx:516
bool IsFootnoteDone() const
Definition: inftxt.hxx:630
sal_uInt16 Width() const
Definition: inftxt.hxx:533
SwTwips m_nLeft
Definition: inftxt.hxx:481
void ClearHookChar()
Definition: inftxt.hxx:625
TextFrameIndex m_nLineStart
Current line start in rText.
Definition: inftxt.hxx:477
SwLinePortion * GetUnderflow()
Definition: inftxt.hxx:605
SwFlyPortion * GetFly()
Definition: inftxt.hxx:614
TextFrameIndex GetSoftHyphPos() const
Definition: inftxt.hxx:608
sal_Unicode GetTabDecimal() const
Definition: inftxt.hxx:622
void SetNumDone(const bool bNew)
Definition: inftxt.hxx:635
void SetNewLine(const bool bNew)
Definition: inftxt.hxx:584
void SetTabDecimal(const sal_Unicode cNew)
Definition: inftxt.hxx:623
void Width(const sal_uInt16 nNew)
Definition: inftxt.hxx:534
void SetLastTab(SwTabPortion *pNew)
Definition: inftxt.hxx:621
bool IsArrowDone() const
Definition: inftxt.hxx:636
void SetFakeLineStart(const bool bNew)
Definition: inftxt.hxx:578
bool IsHyphenate() const
If the Hyphenator returns ERROR or the language is set to NOLANGUAGE we do not hyphenate.
Definition: inftxt.cxx:1658
bool CheckCurrentPosBookmark()
Definition: inftxt.cxx:2172
SwTwips m_nFirst
Definition: inftxt.hxx:483
TextFrameIndex GetUnderScorePos() const
Definition: inftxt.hxx:646
void SetFootnoteDone(const bool bNew)
Definition: inftxt.hxx:631
void Right(const SwTwips nNew)
Definition: inftxt.hxx:550
SwTwips m_nRight
Definition: inftxt.hxx:482
bool IsTabOverflow() const
Definition: inftxt.hxx:668
void First(const SwTwips nNew)
Definition: inftxt.hxx:552
SwTwips GetLineWidth()
Returns the distance between the current horizontal position and the end of the line.
Definition: inftxt.cxx:1935
SwTwips First() const
Definition: inftxt.hxx:551
void SetHookChar(const sal_Unicode cNew)
Definition: inftxt.hxx:626
bool m_bFakeLineStart
Definition: inftxt.hxx:508
void ForcedLeftMargin(const sal_uInt16 nN)
Definition: inftxt.hxx:557
const css::beans::PropertyValues & GetHyphValues() const
Definition: inftxt.cxx:1579
bool IsStop() const
Definition: inftxt.hxx:579
bool IsHyphForbud() const
Definition: inftxt.hxx:570
SwTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL=false, const bool bQuickL=false, const bool bTst=false)
Definition: inftxt.cxx:1738
void SetUnderflow(SwLinePortion *pNew)
Definition: inftxt.hxx:606
TextFrameIndex GetReformatStart() const
Definition: inftxt.hxx:776
void LeftMargin(const SwTwips nNew)
Definition: inftxt.hxx:553
SwLinePortion * m_pLast
Definition: inftxt.hxx:469
void SetFull(const bool bNew)
Definition: inftxt.hxx:569
void SetSoftHyphPos(TextFrameIndex const nNew)
Definition: inftxt.hxx:609
bool ChgHyph(const bool bNew)
Definition: inftxt.cxx:2157
css::beans::PropertyValues m_aHyphVals
Definition: inftxt.hxx:466
sal_uInt16 m_nWidth
Definition: inftxt.hxx:487
SwFlyPortion * m_pFly
Definition: inftxt.hxx:470
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:168
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:617
SwTextNode const * GetTextNodeForParaProps() const
Definition: txtfrm.cxx:1390
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:153
SwParaPortion * m_pPara
Definition: inftxt.hxx:108
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
void DrawCSDFHighlighting(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1336
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:450
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:767
void SetPaintOfst(const SwTwips nNew)
Definition: inftxt.hxx:748
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:603
sw::WrongListIterator * GetpWrongList() const
Definition: inftxt.hxx:454
void DrawTab(const SwLinePortion &rPor) const
Definition: inftxt.cxx:960
void DrawText(const OUString &rText, const SwLinePortion &rPor, TextFrameIndex nIdx=TextFrameIndex(0), TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING), const bool bKern=false) const
Definition: inftxt.hxx:753
const SwRect & GetPaintRect() const
Definition: inftxt.hxx:437
std::vector< tools::Long > * GetpSpaceAdd() const
Definition: inftxt.hxx:451
void DrawBackground(const SwLinePortion &rPor, const Color *pColor=nullptr) const
Definition: inftxt.cxx:1134
sal_uInt16 GetSpaceIdx() const
Definition: inftxt.hxx:441
void SetSmartTags(sw::WrongListIterator *const pNew)
Definition: inftxt.hxx:459
const SwTextFly & GetTextFly() const
Definition: inftxt.hxx:388
void RemoveFirstSpaceAdd()
Definition: inftxt.hxx:445
SwTextFly & GetTextFly()
Definition: inftxt.hxx:387
SwTwips X() const
Definition: inftxt.hxx:382
void SetPos(const Point &rNew)
Definition: inftxt.hxx:435
SwTwips GetPaintOfst() const
Definition: inftxt.hxx:743
const Point & GetPos() const
Definition: inftxt.hxx:434
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:735
SwRect m_aPaintRect
Definition: inftxt.hxx:351
void DrawRect(const SwRect &rRect, bool bRetouche) const
Definition: inftxt.cxx:948
void DrawBackBrush(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1158
void SetWrongList(sw::WrongListIterator *const pNew)
Definition: inftxt.hxx:453
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:456
sw::WrongListIterator * GetGrammarCheckList() const
Definition: inftxt.hxx:457
void DrawPostIts(bool bScript) const
Definition: inftxt.cxx:1056
void SetSpaceIdx(sal_uInt16 nNew)
Definition: inftxt.hxx:443
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich, const Color *pColor=nullptr) const
Definition: inftxt.cxx:1470
void DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const
Definition: inftxt.cxx:1103
void DrawRedArrow(const SwLinePortion &rPor) const
Definition: inftxt.cxx:1024
void X(const tools::Long nNew)
Definition: inftxt.hxx:383
sal_uInt16 m_nSpaceIdx
Definition: inftxt.hxx:353
void IncSpaceIdx()
Definition: inftxt.hxx:444
sw::WrongListIterator * m_pGrammarCheckList
Definition: inftxt.hxx:345
void ResetSpaceIdx()
Definition: inftxt.hxx:442
tools::Long GetSpaceAdd() const
Definition: inftxt.hxx:446
sw::WrongListIterator * m_pWrongList
Definition: inftxt.hxx:344
void DrawBorder(const SwLinePortion &rPor) const
Draw character border around a line portion.
Definition: inftxt.cxx:1291
void DrawLineBreak(const SwLinePortion &rPor) const
Definition: inftxt.cxx:977
void CtorInitTextPaintInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint)
Definition: inftxt.cxx:494
sw::WrongListIterator * GetSmartTags() const
Definition: inftxt.hxx:460
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:257
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:725
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:447
sal_uInt16 GetTextHeight() const
Definition: inftxt.hxx:719
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:386
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:713
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:377
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:409
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:488
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:680
bool bOn
Definition: inftxt.hxx:691
TextFrameIndex nLen
Definition: inftxt.hxx:689
sw::WrongListIterator * m_pOldSmartTagList
Definition: inftxt.hxx:684
TextFrameIndex nMeasureLen
Definition: inftxt.hxx:690
SwTextSlot(const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen, bool bExgLists, OUString const &rCh=OUString())
Definition: inftxt.cxx:1983
OUString aText
Definition: inftxt.hxx:681
SwTextSizeInfo * pInf
Definition: inftxt.hxx:692
std::unique_ptr< SwWrongList > m_pTempList
Definition: inftxt.hxx:686
sw::WrongListIterator * m_pOldGrammarCheckList
Definition: inftxt.hxx:685
const OUString * pOldText
Definition: inftxt.hxx:683
std::unique_ptr< sw::WrongListIterator > m_pTempIter
Definition: inftxt.hxx:687
TextFrameIndex nIdx
Definition: inftxt.hxx:688
std::shared_ptr< const vcl::text::TextLayoutCache > m_pOldCachedVclData
Definition: inftxt.hxx:682
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