LibreOffice Module editeng (master) 1
editdoc.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
20#pragma once
21
22#include "editattr.hxx"
23#include "edtspell.hxx"
24#include "eerdll2.hxx"
25#include <editeng/svxfont.hxx>
26#include <svl/itemset.hxx>
27#include <svl/style.hxx>
28#include <svl/itempool.hxx>
30#include <tools/lineend.hxx>
32
33#include <cstddef>
34#include <memory>
35#include <string_view>
36#include <vector>
37
38class ImpEditEngine;
39class SvxTabStop;
40enum class TextRotation;
41
42
43#define CHARPOSGROW 16
44#define DEFTAB 720
45
46void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent = true, SvtScriptType nScriptType = SvtScriptType::NONE );
47sal_uInt16 GetScriptItemId( sal_uInt16 nItemId, SvtScriptType nScriptType );
48bool IsScriptItemValid( sal_uInt16 nItemId, short nScriptType );
49
50EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_Int32 nS, sal_Int32 nE );
51
52class ContentNode;
53class EditDoc;
54
55struct EPaM
56{
57 sal_Int32 nPara;
58 sal_Int32 nIndex;
59
60 EPaM() : nPara(0), nIndex(0) {}
61 EPaM( sal_Int32 nP, sal_Int32 nI ) : nPara(nP), nIndex(nI) {}
62 EPaM( const EPaM& r) : nPara(r.nPara), nIndex(r.nIndex) {}
63 EPaM& operator = ( const EPaM& r ) { nPara = r.nPara; nIndex = r.nIndex; return *this; }
64 inline bool operator == ( const EPaM& r ) const;
65 inline bool operator < ( const EPaM& r ) const;
66};
67
68inline bool EPaM::operator < ( const EPaM& r ) const
69{
70 return ( nPara < r.nPara ) || ( ( nPara == r.nPara ) && nIndex < r.nIndex );
71}
72
73inline bool EPaM::operator == ( const EPaM& r ) const
74{
75 return ( nPara == r.nPara ) && ( nIndex == r.nIndex );
76}
77
79{
81 sal_Int32 nStartPos;
82 sal_Int32 nEndPos;
83
84 ScriptTypePosInfo( short Type, sal_Int32 Start, sal_Int32 End )
87 , nEndPos(End)
88 {
89 }
90};
91
92typedef std::vector<ScriptTypePosInfo> ScriptTypePosInfos;
93
95{
97 sal_Int32 nStartPos;
98 sal_Int32 nEndPos;
99
100 WritingDirectionInfo( sal_uInt8 Type, sal_Int32 Start, sal_Int32 End )
101 : nType(Type)
103 , nEndPos(End)
104 {
105 }
106};
107
108
109typedef std::vector<WritingDirectionInfo> WritingDirectionInfos;
110
112{
113private:
114 typedef std::vector<std::unique_ptr<EditCharAttrib> > CharAttribsType;
115
118
119public:
120 ContentAttribsInfo( SfxItemSet aParaAttribs );
121
124
125 void RemoveAllCharAttribsFromPool(SfxItemPool& rPool) const;
127};
128
129
130
131typedef std::vector<Color> SvxColorList;
132
133
134
135
137{
138private:
139 typedef std::vector<const SfxPoolItem*> DummyItemList;
141 sal_Int32 CurrentItem;
142
143public:
144 ItemList();
145 const SfxPoolItem* First();
146 const SfxPoolItem* Next();
147 sal_Int32 Count() const { return aItemPool.size(); };
148 void Insert( const SfxPoolItem* pItem );
149 void Clear() { aItemPool.clear(); };
150};
151
152
153
155{
156private:
159
160public:
161 ContentAttribs( SfxItemPool& rItemPool );
162
163 void dumpAsXml(xmlTextWriterPtr pWriter) const;
164
165 SvxTabStop FindTabStop( sal_Int32 nCurPos, sal_uInt16 nDefTab );
167 const SfxItemSet& GetItems() const { return aAttribSet; }
168 const SfxStyleSheet* GetStyleSheet() const { return pStyle; }
170 void SetStyleSheet( SfxStyleSheet* pS );
171
172 const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
173 template<class T>
174 const T& GetItem( TypedWhichId<T> nWhich ) const
175 {
176 return static_cast<const T&>(GetItem(sal_uInt16(nWhich)));
177 }
178 bool HasItem( sal_uInt16 nWhich ) const;
179};
180
181
182
184{
185public:
186 typedef std::vector<std::unique_ptr<EditCharAttrib> > AttribsType;
187
188private:
190 SvxFont aDefFont; // faster than ever from the pool!
192
193public:
196
197 void dumpAsXml(xmlTextWriterPtr pWriter) const;
198
199 void DeleteEmptyAttribs( SfxItemPool& rItemPool );
200
201 const EditCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_Int32 nPos ) const;
202 EditCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_Int32 nPos );
203 const EditCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_Int32 nFromPos ) const;
204 EditCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_Int32 nPos );
205 const EditCharAttrib* FindFeature( sal_Int32 nPos ) const;
206
207
208 void ResortAttribs();
209 void OptimizeRanges( SfxItemPool& rItemPool );
210
211 sal_Int32 Count() const;
212
213 void InsertAttrib( EditCharAttrib* pAttrib );
214
216
217 bool HasEmptyAttribs() const { return bHasEmptyAttribs; }
218 void SetHasEmptyAttribs(bool b);
219 bool HasBoundingAttrib( sal_Int32 nBound ) const;
220 bool HasAttrib( sal_Int32 nStartPos, sal_Int32 nEndPos ) const;
221
223 const AttribsType& GetAttribs() const { return aAttribs;}
224
225 void Remove(const EditCharAttrib* p);
226 void Remove(sal_Int32 nPos);
227
228#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
229 static void DbgCheckAttribs(CharAttribList const& rAttribs);
230#endif
231};
232
233
234
236{
237private:
238 OUString maString;
241 std::unique_ptr<WrongList> mpWrongList;
242
243 void UnExpandPosition( sal_Int32 &rStartPos, bool bBiasStart );
244
245public:
246 ContentNode( SfxItemPool& rItemPool );
247 ContentNode( const OUString& rStr, const ContentAttribs& rContentAttribs );
248 ~ContentNode();
249 ContentNode(const ContentNode&) = delete;
251
252 void dumpAsXml(xmlTextWriterPtr pWriter) const;
253
258
259 void ExpandAttribs( sal_Int32 nIndex, sal_Int32 nNewChars, SfxItemPool& rItemPool );
260 void CollapseAttribs( sal_Int32 nIndex, sal_Int32 nDelChars, SfxItemPool& rItemPool );
261 void AppendAttribs( ContentNode* pNextNode );
262 void CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, bool bKeepEndingAttribs );
263
264 void SetStyleSheet( SfxStyleSheet* pS, bool bRecalcFont = true );
265 void SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle );
267
268 void CreateDefFont();
269
270 void EnsureWrongList();
272 const WrongList* GetWrongList() const;
273 void SetWrongList( WrongList* p );
274
275 void CreateWrongList();
276 void DestroyWrongList();
277
278 bool IsFeature( sal_Int32 nPos ) const;
279
280 sal_Int32 Len() const;
281 const OUString& GetString() const { return maString;}
282
284 sal_Int32 GetExpandedLen() const;
286 OUString GetExpandedText(sal_Int32 nStartPos = 0, sal_Int32 nEndPos = -1) const;
288 void UnExpandPositions( sal_Int32 &rStartPos, sal_Int32 &rEndPos );
289
290 void SetChar(sal_Int32 nPos, sal_Unicode c);
291 void Insert(std::u16string_view rStr, sal_Int32 nPos);
292 void Append(std::u16string_view rStr);
293 void Erase(sal_Int32 nPos);
294 void Erase(sal_Int32 nPos, sal_Int32 nCount);
295 OUString Copy(sal_Int32 nPos) const;
296 OUString Copy(sal_Int32 nPos, sal_Int32 nCount) const;
297 sal_Unicode GetChar(sal_Int32 nPos) const;
298};
299
300
301
303{
304private:
306 sal_Int32 nIndex;
307
308public:
309 EditPaM();
310 EditPaM(ContentNode* p, sal_Int32 n);
311
312 const ContentNode* GetNode() const { return pNode;}
314 void SetNode(ContentNode* p);
315
316 sal_Int32 GetIndex() const { return nIndex; }
317 void SetIndex( sal_Int32 n ) { nIndex = n; }
318
319 bool DbgIsBuggy( EditDoc const & rDoc ) const;
320
321 friend bool operator == ( const EditPaM& r1, const EditPaM& r2 );
322 friend bool operator != ( const EditPaM& r1, const EditPaM& r2 );
323 bool operator !() const { return !pNode && !nIndex; }
324};
325
326enum class PortionKind
327{
328 TEXT = 0,
329 TAB = 1,
330 LINEBREAK = 2,
331 FIELD = 3,
332 HYPHENATOR = 4
333};
334
335enum class DeleteMode {
337};
338
340 Normal = 0x00,
341 Kana = 0x01,
342 PunctuationLeft = 0x02,
343 PunctuationRight = 0x04,
344};
345namespace o3tl {
346 template<> struct typed_flags<AsianCompressionFlags> : is_typed_flags<AsianCompressionFlags, 0x07> {};
347}
348
349
350
351// struct ExtraPortionInfos
352
354{
357
359
361
365
366 std::unique_ptr<sal_Int32[]> pOrgDXArray;
367 std::vector< sal_Int32 > lineBreaksList;
368
369
372
373 void SaveOrgDXArray( const sal_Int32* pDXArray, sal_Int32 nLen );
374};
375
376
377
379{
380private:
381 std::unique_ptr<ExtraPortionInfo> xExtraInfos;
382 sal_Int32 nLen;
387
388
389public:
390 TextPortion( sal_Int32 nL )
391 : nLen( nL )
392 , aOutSz( -1, -1 )
394 , nRightToLeftLevel( 0 )
395 , nExtraValue( 0 )
396 {
397 }
398
400 : nLen( r.nLen )
401 , aOutSz( r.aOutSz )
402 , nKind( r.nKind )
405 {
406 }
407
408
409 sal_Int32 GetLen() const { return nLen; }
410 void SetLen( sal_Int32 nL ) { nLen = nL; }
411
413 {
414 aOutSz.setWidth(nWidth);
415 }
416
417 void setHeight(tools::Long nHeight)
418 {
419 aOutSz.setHeight(nHeight);
420 }
421
422 void adjustSize(tools::Long nDeltaX, tools::Long nDeltaY)
423 {
424 if (nDeltaX != 0)
425 aOutSz.AdjustWidth(nDeltaX);
426 if (nDeltaY != 0)
427 aOutSz.AdjustHeight(nDeltaY);
428 }
429
430 void SetSize(const Size& rSize)
431 {
432 aOutSz = rSize;
433 }
434
435 const Size& GetSize() const { return aOutSz; }
436
437 void SetKind(PortionKind n) { nKind = n; }
438 PortionKind GetKind() const { return nKind; }
439
442 bool IsRightToLeft() const { return (nRightToLeftLevel&1); }
443
446
447 ExtraPortionInfo* GetExtraInfos() const { return xExtraInfos.get(); }
449};
450
451
452
454{
455 typedef std::vector<std::unique_ptr<TextPortion> > PortionsType;
457
458public:
461
462 void Reset();
463 sal_Int32 FindPortion(
464 sal_Int32 nCharPos, sal_Int32& rPortionStart, bool bPreferStartingPortion = false) const;
465 sal_Int32 GetStartPos(sal_Int32 nPortion);
466 void DeleteFromPortion(sal_Int32 nDelFrom);
467 sal_Int32 Count() const;
468 const TextPortion& operator[](sal_Int32 nPos) const;
469 TextPortion& operator[](sal_Int32 nPos);
470
471 void Append(TextPortion* p);
472 void Insert(sal_Int32 nPos, TextPortion* p);
473 void Remove(sal_Int32 nPos);
474 sal_Int32 GetPos(const TextPortion* p) const;
475};
476
477class ParaPortion;
478
479
480
482{
483public:
484 typedef std::vector<sal_Int32> CharPosArrayType;
485
486private:
488 std::vector<sal_Bool> aKashidaPositions;
489 sal_Int32 nTxtWidth;
490 sal_Int32 nStartPosX;
491 sal_Int32 nStart; // could be replaced by nStartPortion
492 sal_Int32 nEnd; // could be replaced by nEndPortion
493 sal_Int32 nStartPortion;
494 sal_Int32 nEndPortion;
495 sal_uInt16 nHeight; // Total height of the line
496 sal_uInt16 nTxtHeight; // Pure Text height
497 sal_uInt16 nMaxAscent;
499 bool bInvalid:1; // for skillful formatting
500
501public:
502 EditLine();
503 EditLine( const EditLine& );
504 ~EditLine();
505
506 bool IsIn( sal_Int32 nIndex ) const
507 { return ( (nIndex >= nStart ) && ( nIndex < nEnd ) ); }
508
509 bool IsIn( sal_Int32 nIndex, bool bInclEnd ) const
510 { return ( ( nIndex >= nStart ) && ( bInclEnd ? ( nIndex <= nEnd ) : ( nIndex < nEnd ) ) ); }
511
512 void SetStart( sal_Int32 n ) { nStart = n; }
513 sal_Int32 GetStart() const { return nStart; }
514 sal_Int32& GetStart() { return nStart; }
515
516 void SetEnd( sal_Int32 n ) { nEnd = n; }
517 sal_Int32 GetEnd() const { return nEnd; }
518 sal_Int32& GetEnd() { return nEnd; }
519
520 void SetStartPortion( sal_Int32 n ) { nStartPortion = n; }
521 sal_Int32 GetStartPortion() const { return nStartPortion; }
522 sal_Int32& GetStartPortion() { return nStartPortion; }
523
524 void SetEndPortion( sal_Int32 n ) { nEndPortion = n; }
525 sal_Int32 GetEndPortion() const { return nEndPortion; }
526 sal_Int32& GetEndPortion() { return nEndPortion; }
527
528 void SetHeight( sal_uInt16 nH, sal_uInt16 nTxtH = 0 );
529 sal_uInt16 GetHeight() const { return nHeight; }
530 sal_uInt16 GetTxtHeight() const { return nTxtHeight; }
531
532 void SetTextWidth( sal_Int32 n ) { nTxtWidth = n; }
533 sal_Int32 GetTextWidth() const { return nTxtWidth; }
534
535 void SetMaxAscent( sal_uInt16 n ) { nMaxAscent = n; }
536 sal_uInt16 GetMaxAscent() const { return nMaxAscent; }
537
540
541 sal_Int32 GetLen() const { return nEnd - nStart; }
542
543 sal_Int32 GetStartPosX() const { return nStartPosX; }
544 void SetStartPosX( sal_Int32 start );
545 Size CalcTextSize( ParaPortion& rParaPortion );
546
547 bool IsInvalid() const { return bInvalid; }
548 bool IsValid() const { return !bInvalid; }
549 void SetInvalid() { bInvalid = true; }
550 void SetValid() { bInvalid = false; }
551
552 bool IsEmpty() const { return nEnd <= nStart; }
553
556
557 std::vector<sal_Bool>& GetKashidaArray() { return aKashidaPositions; }
558 const std::vector<sal_Bool>& GetKashidaArray() const { return aKashidaPositions; }
559
560 EditLine* Clone() const;
561
562 EditLine& operator = ( const EditLine& rLine );
563 friend bool operator == ( const EditLine& r1, const EditLine& r2 );
564};
565
566
567
569{
570 typedef std::vector<std::unique_ptr<EditLine> > LinesType;
572
573public:
574 EditLineList();
576
577 void Reset();
578 void DeleteFromLine(sal_Int32 nDelFrom);
579 sal_Int32 FindLine(sal_Int32 nChar, bool bInclEnd);
580 sal_Int32 Count() const;
581 const EditLine& operator[](sal_Int32 nPos) const;
582 EditLine& operator[](sal_Int32 nPos);
583
584 void Append(EditLine* p);
585 void Insert(sal_Int32 nPos, EditLine* p);
586};
587
588
589
591{
592 friend class ImpEditEngine; // to adjust the height
593private:
598
601
603 sal_Int32 nFirstLineOffset; // For Writer-LineSpacing-Interpretation
604 sal_Int32 nBulletX;
605 sal_Int32 nInvalidDiff;
606
607 bool bInvalid : 1;
608 bool bSimple : 1; // only linear Tap
609 bool bVisible : 1; // Belongs to the node!
611
612 ParaPortion( const ParaPortion& ) = delete;
613
614public:
616 ~ParaPortion();
617
618 sal_Int32 GetLineNumber( sal_Int32 nIndex ) const;
619
621 const EditLineList& GetLines() const { return aLineList; }
622
623 bool IsInvalid() const { return bInvalid; }
624 bool IsSimpleInvalid() const { return bSimple; }
625 void SetValid() { bInvalid = false; bSimple = true;}
626
627 bool MustRepaint() const { return bForceRepaint; }
628 void SetMustRepaint( bool bRP ) { bForceRepaint = bRP; }
629
630 sal_Int32 GetBulletX() const { return nBulletX; }
631 void SetBulletX( sal_Int32 n ) { nBulletX = n; }
632
633 void MarkInvalid( sal_Int32 nStart, sal_Int32 nDiff);
634 void MarkSelectionInvalid( sal_Int32 nStart );
635
636 void SetVisible( bool bVisible );
637 bool IsVisible() const { return bVisible; }
638
639 bool IsEmpty() { return GetTextPortions().Count() == 1 && GetTextPortions()[0].GetLen() == 0; }
640
641 tools::Long GetHeight() const { return ( bVisible ? nHeight : 0 ); }
642 sal_Int32 GetFirstLineOffset() const { return ( bVisible ? nFirstLineOffset : 0 ); }
644
645 ContentNode* GetNode() const { return pNode; }
648
649 sal_Int32 GetInvalidPosStart() const { return nInvalidPosStart; }
650 short GetInvalidDiff() const { return nInvalidDiff; }
651
652 void CorrectValuesBehindLastFormattedLine( sal_Int32 nLastFormattedLine );
653#if OSL_DEBUG_LEVEL > 0
654 static bool DbgCheckTextPortions(ParaPortion const&);
655#endif
656};
657
658
659
661{
662 mutable sal_Int32 nLastCache;
663 std::vector<std::unique_ptr<ParaPortion>> maPortions;
664public:
667
668 void Reset();
669 tools::Long GetYOffset(const ParaPortion* pPPortion) const;
670 sal_Int32 FindParagraph(tools::Long nYOffset) const;
671
672 const ParaPortion* SafeGetObject(sal_Int32 nPos) const;
673 ParaPortion* SafeGetObject(sal_Int32 nPos);
674
675 sal_Int32 GetPos(const ParaPortion* p) const;
676 ParaPortion* operator[](sal_Int32 nPos);
677 const ParaPortion* operator[](sal_Int32 nPos) const;
678
679 std::unique_ptr<ParaPortion> Release(sal_Int32 nPos);
680 void Remove(sal_Int32 nPos);
681 void Insert(sal_Int32 nPos, std::unique_ptr<ParaPortion> p);
682 void Append(std::unique_ptr<ParaPortion> p);
683 sal_Int32 Count() const;
684
685#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
686 // temporary:
687 static void DbgCheck(ParaPortionList const&, EditDoc const& rDoc);
688#endif
689};
690
691
692
694{
695private:
698
699public:
700 EditSelection(); // No constructor and destructor
701 // are automatically executed correctly!
702 EditSelection( const EditPaM& rStartAndAnd );
703 EditSelection( const EditPaM& rStart, const EditPaM& rEnd );
704
705 EditPaM& Min() { return aStartPaM; }
706 EditPaM& Max() { return aEndPaM; }
707
708 const EditPaM& Min() const { return aStartPaM; }
709 const EditPaM& Max() const { return aEndPaM; }
710
711 bool HasRange() const { return aStartPaM != aEndPaM; }
712 bool IsInvalid() const { return !aStartPaM || !aEndPaM; }
713 bool DbgIsBuggy( EditDoc const & rDoc ) const;
714
715 void Adjust( const EditDoc& rNodes );
716
717 EditSelection& operator = ( const EditPaM& r );
718 bool operator == ( const EditSelection& r ) const
719 { return ( aStartPaM == r.aStartPaM ) && ( aEndPaM == r.aEndPaM ); }
720 bool operator != ( const EditSelection& r ) const { return !( r == *this ); }
721};
722
723
724
726{
727private:
730
731public:
732 DeletedNodeInfo( ContentNode* pNode, sal_Int32 nPos )
733 : mpInvalidNode(pNode)
735 {
736 }
737
738 ContentNode* GetNode() const { return mpInvalidNode; }
739 sal_Int32 GetPosition() const { return nInvalidParagraph; }
740};
741
742
743
745{
746private:
747 mutable sal_Int32 nLastCache;
748 std::vector<std::unique_ptr<ContentNode> > maContents;
749
752
753 SvxFont maDefFont; //faster than ever from the pool!!
754 sal_uInt16 nDefTab;
758
759 bool bModified:1;
761
762private:
763 void ImplDestroyContents();
764
765public:
767 ~EditDoc();
768
769 void dumpAsXml(xmlTextWriterPtr pWriter) const;
770 void ClearSpellErrors();
771
772 bool IsModified() const { return bModified; }
773 void SetModified( bool b );
774
776
777 void SetModifyHdl( const Link<LinkParamNone*,void>& rLink ) { aModifyHdl = rLink; }
778
779 void CreateDefFont( bool bUseStyles );
780 const SvxFont& GetDefFont() const { return maDefFont; }
781
782 void SetDefTab( sal_uInt16 nTab ) { nDefTab = nTab ? nTab : DEFTAB; }
783 sal_uInt16 GetDefTab() const { return nDefTab; }
784
785 void SetVertical( bool bVertical ) { bIsVertical = bVertical; }
786 bool IsEffectivelyVertical() const;
787 bool IsTopToBottom() const;
788 bool GetVertical() const;
789 void SetRotation( TextRotation nRotation ) { mnRotation = nRotation; }
791
792 void SetFixedCellHeight( bool bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; }
793 bool IsFixedCellHeight() const { return bIsFixedCellHeight; }
794
795 EditPaM Clear();
797 void RemoveChars( EditPaM aPaM, sal_Int32 nChars );
798 EditPaM InsertText( EditPaM aPaM, std::u16string_view rStr );
799 EditPaM InsertParaBreak( EditPaM aPaM, bool bKeepEndingAttribs );
800 EditPaM InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem );
802
803 OUString GetText( LineEnd eEnd ) const;
804 sal_Int32 GetTextLen() const;
805
806 OUString GetParaAsString( sal_Int32 nNode ) const;
807 static OUString GetParaAsString(const ContentNode* pNode, sal_Int32 nStartPos = 0, sal_Int32 nEndPos = -1);
808
809 EditPaM GetStartPaM() const;
810 EditPaM GetEndPaM() const;
811
813 const SfxItemPool& GetItemPool() const { return *pItemPool; }
814
815 void RemoveItemsFromPool(const ContentNode& rNode);
816
817 void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd );
818 void InsertAttrib( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, const SfxPoolItem& rPoolItem );
819 void InsertAttribInSelection( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, const SfxPoolItem& rPoolItem );
820 bool RemoveAttribs( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt16 nWhich );
821 bool RemoveAttribs( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich );
822 static void FindAttribs( ContentNode* pNode, sal_Int32 nStartPos, sal_Int32 nEndPos, SfxItemSet& rCurSet );
823
824 sal_Int32 GetPos(const ContentNode* pNode) const;
825 const ContentNode* GetObject(sal_Int32 nPos) const;
826 ContentNode* GetObject(sal_Int32 nPos);
827 sal_Int32 Count() const;
828 const ContentNode* operator[](sal_Int32 nPos) const;
829 ContentNode* operator[](sal_Int32 nPos);
830 void Insert(sal_Int32 nPos, ContentNode* p);
832 void Remove(sal_Int32 nPos);
834 void Release(sal_Int32 nPos);
835
836 static OUString GetSepStr( LineEnd eEnd );
837};
838
839inline EditCharAttrib* GetAttrib(CharAttribList::AttribsType& rAttribs, std::size_t nAttr)
840{
841 return (nAttr < rAttribs.size()) ? rAttribs[nAttr].get() : nullptr;
842}
843
844#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
846#endif
847
848class EditEngineItemPool final : public SfxItemPool
849{
850private:
851 std::shared_ptr<DefItems> m_xDefItems;
852public:
854private:
855 virtual ~EditEngineItemPool() override;
856};
857
858/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool HasEmptyAttribs() const
Definition: editdoc.hxx:217
void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: editdoc.cxx:3031
AttribsType & GetAttribs()
Definition: editdoc.hxx:222
const EditCharAttrib * FindFeature(sal_Int32 nPos) const
Definition: editdoc.cxx:2975
static void DbgCheckAttribs(CharAttribList const &rAttribs)
Definition: editdoc.cxx:3014
bool HasAttrib(sal_Int32 nStartPos, sal_Int32 nEndPos) const
Definition: editdoc.cxx:2887
bool HasBoundingAttrib(sal_Int32 nBound) const
Definition: editdoc.cxx:2930
EditCharAttrib * FindEmptyAttrib(sal_uInt16 nWhich, sal_Int32 nPos)
Definition: editdoc.cxx:2947
void InsertAttrib(EditCharAttrib *pAttrib)
Definition: editdoc.cxx:2760
sal_Int32 Count() const
Definition: editdoc.cxx:2840
bool bHasEmptyAttribs
Definition: editdoc.hxx:191
void OptimizeRanges(SfxItemPool &rItemPool)
Definition: editdoc.cxx:2808
void ResortAttribs()
Definition: editdoc.cxx:2799
std::vector< std::unique_ptr< EditCharAttrib > > AttribsType
Definition: editdoc.hxx:186
SvxFont aDefFont
Definition: editdoc.hxx:190
SvxFont & GetDefFont()
Definition: editdoc.hxx:215
const EditCharAttrib * FindNextAttrib(sal_uInt16 nWhich, sal_Int32 nFromPos) const
Definition: editdoc.cxx:2875
void Remove(const EditCharAttrib *p)
Definition: editdoc.cxx:2910
void SetHasEmptyAttribs(bool b)
Definition: editdoc.cxx:2925
const AttribsType & GetAttribs() const
Definition: editdoc.hxx:223
const EditCharAttrib * FindAttrib(sal_uInt16 nWhich, sal_Int32 nPos) const
Definition: editdoc.cxx:2845
AttribsType aAttribs
Definition: editdoc.hxx:189
void DeleteEmptyAttribs(SfxItemPool &rItemPool)
Definition: editdoc.cxx:3006
SfxItemSet aPrevParaAttribs
Definition: editdoc.hxx:116
CharAttribsType aPrevCharAttribs
Definition: editdoc.hxx:117
ContentAttribsInfo(SfxItemSet aParaAttribs)
Definition: editdoc.cxx:807
void RemoveAllCharAttribsFromPool(SfxItemPool &rPool) const
Definition: editdoc.cxx:812
std::vector< std::unique_ptr< EditCharAttrib > > CharAttribsType
Definition: editdoc.hxx:114
const SfxItemSet & GetPrevParaAttribs() const
Definition: editdoc.hxx:122
const CharAttribsType & GetPrevCharAttribs() const
Definition: editdoc.hxx:123
void AppendCharAttrib(EditCharAttrib *pNew)
Definition: editdoc.cxx:818
SfxItemSetFixed< EE_PARA_START, EE_CHAR_END > aAttribSet
Definition: editdoc.hxx:158
SvxTabStop FindTabStop(sal_Int32 nCurPos, sal_uInt16 nDefTab)
Definition: editdoc.cxx:1821
bool HasItem(sal_uInt16 nWhich) const
Definition: editdoc.cxx:1872
SfxItemSet & GetItems()
Definition: editdoc.hxx:166
const SfxPoolItem & GetItem(sal_uInt16 nWhich) const
Definition: editdoc.cxx:1862
SfxStyleSheet * GetStyleSheet()
Definition: editdoc.hxx:169
SfxStyleSheet * pStyle
Definition: editdoc.hxx:157
const SfxStyleSheet * GetStyleSheet() const
Definition: editdoc.hxx:168
void SetStyleSheet(SfxStyleSheet *pS)
Definition: editdoc.cxx:1842
void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: editdoc.cxx:1883
ContentAttribs(SfxItemPool &rItemPool)
Definition: editdoc.cxx:1814
const SfxItemSet & GetItems() const
Definition: editdoc.hxx:167
const T & GetItem(TypedWhichId< T > nWhich) const
Definition: editdoc.hxx:174
ContentNode(SfxItemPool &rItemPool)
Definition: editdoc.cxx:1199
void CollapseAttribs(sal_Int32 nIndex, sal_Int32 nDelChars, SfxItemPool &rItemPool)
Definition: editdoc.cxx:1354
void EnsureWrongList()
Definition: editdoc.cxx:1771
OUString maString
Definition: editdoc.hxx:238
void SetChar(sal_Int32 nPos, sal_Unicode c)
Definition: editdoc.cxx:1731
void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: editdoc.cxx:1804
CharAttribList & GetCharAttribs()
Definition: editdoc.hxx:256
sal_Unicode GetChar(sal_Int32 nPos) const
Definition: editdoc.cxx:1766
void UnExpandPosition(sal_Int32 &rStartPos, bool bBiasStart)
Definition: editdoc.cxx:1682
ContentAttribs aContentAttribs
Definition: editdoc.hxx:239
bool IsFeature(sal_Int32 nPos) const
Definition: editdoc.cxx:1610
const OUString & GetString() const
Definition: editdoc.hxx:281
ContentAttribs & GetContentAttribs()
Definition: editdoc.hxx:254
const ContentAttribs & GetContentAttribs() const
Definition: editdoc.hxx:255
WrongList * GetWrongList()
Definition: editdoc.cxx:1777
const CharAttribList & GetCharAttribs() const
Definition: editdoc.hxx:257
void CopyAndCutAttribs(ContentNode *pPrevNode, SfxItemPool &rPool, bool bKeepEndingAttribs)
Definition: editdoc.cxx:1450
void CreateDefFont()
Definition: editdoc.cxx:1579
ContentNode(const ContentNode &)=delete
void Insert(std::u16string_view rStr, sal_Int32 nPos)
Definition: editdoc.cxx:1736
void Erase(sal_Int32 nPos)
Definition: editdoc.cxx:1746
void UnExpandPositions(sal_Int32 &rStartPos, sal_Int32 &rEndPos)
re-write offsets in the expanded text to string offsets
Definition: editdoc.cxx:1725
void ExpandAttribs(sal_Int32 nIndex, sal_Int32 nNewChars, SfxItemPool &rItemPool)
Definition: editdoc.cxx:1212
void AppendAttribs(ContentNode *pNextNode)
Definition: editdoc.cxx:1509
void Append(std::u16string_view rStr)
Definition: editdoc.cxx:1741
OUString Copy(sal_Int32 nPos) const
Definition: editdoc.cxx:1756
ContentNode & operator=(const ContentNode &)=delete
CharAttribList aCharAttribList
Definition: editdoc.hxx:240
OUString GetExpandedText(sal_Int32 nStartPos=0, sal_Int32 nEndPos=-1) const
return content including expanded fields
Definition: editdoc.cxx:1639
void SetWrongList(WrongList *p)
Definition: editdoc.cxx:1787
std::unique_ptr< WrongList > mpWrongList
Definition: editdoc.hxx:241
sal_Int32 GetExpandedLen() const
return length including expanded fields
Definition: editdoc.cxx:1620
SfxStyleSheet * GetStyleSheet()
Definition: editdoc.hxx:266
sal_Int32 Len() const
Definition: editdoc.cxx:1615
void SetStyleSheet(SfxStyleSheet *pS, bool bRecalcFont=true)
Definition: editdoc.cxx:1603
void CreateWrongList()
Definition: editdoc.cxx:1792
void DestroyWrongList()
Definition: editdoc.cxx:1799
sal_Int32 GetPosition() const
Definition: editdoc.hxx:739
DeletedNodeInfo(ContentNode *pNode, sal_Int32 nPos)
Definition: editdoc.hxx:732
sal_Int32 nInvalidParagraph
Definition: editdoc.hxx:729
ContentNode * GetNode() const
Definition: editdoc.hxx:738
ContentNode * mpInvalidNode
Definition: editdoc.hxx:728
void ImplDestroyContents()
Definition: editdoc.cxx:1960
bool bModified
Definition: editdoc.hxx:759
EditPaM GetEndPaM() const
Definition: editdoc.cxx:2204
void Insert(sal_Int32 nPos, ContentNode *p)
Definition: editdoc.cxx:2111
bool IsEffectivelyVertical() const
Definition: editdoc.cxx:2069
void SetModified(bool b)
Definition: editdoc.cxx:2240
void InsertAttrib(const SfxPoolItem &rItem, ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd)
Definition: editdoc.cxx:2552
void RemoveItemsFromPool(const ContentNode &rNode)
Definition: editdoc.cxx:1966
bool IsTopToBottom() const
Definition: editdoc.cxx:2075
const SvxFont & GetDefFont() const
Definition: editdoc.hxx:780
sal_Int32 GetPos(const ContentNode *pNode) const
Definition: editdoc.cxx:2086
static void FindAttribs(ContentNode *pNode, sal_Int32 nStartPos, sal_Int32 nEndPos, SfxItemSet &rCurSet)
Definition: editdoc.cxx:2606
void RemoveChars(EditPaM aPaM, sal_Int32 nChars)
Definition: editdoc.cxx:2366
SfxItemPool & GetItemPool()
Definition: editdoc.hxx:812
std::vector< std::unique_ptr< ContentNode > > maContents
Definition: editdoc.hxx:748
bool IsFixedCellHeight() const
Definition: editdoc.hxx:793
EditPaM Clear()
Definition: editdoc.cxx:2221
~EditDoc()
Definition: editdoc.cxx:1932
void SetModifyHdl(const Link< LinkParamNone *, void > &rLink)
Definition: editdoc.hxx:777
bool bIsVertical
Definition: editdoc.hxx:755
void Remove(sal_Int32 nPos)
deletes
Definition: editdoc.cxx:2121
OUString GetParaAsString(sal_Int32 nNode) const
Definition: editdoc.cxx:2187
OUString GetText(LineEnd eEnd) const
Definition: editdoc.cxx:2163
const SfxItemPool & GetItemPool() const
Definition: editdoc.hxx:813
const ContentNode * GetObject(sal_Int32 nPos) const
Definition: editdoc.cxx:2091
bool RemoveAttribs(ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt16 nWhich)
Definition: editdoc.cxx:2421
bool bDisableAttributeExpanding
Definition: editdoc.hxx:760
void SetDefTab(sal_uInt16 nTab)
Definition: editdoc.hxx:782
void SetRotation(TextRotation nRotation)
Definition: editdoc.hxx:789
sal_Int32 nLastCache
Definition: editdoc.hxx:747
TextRotation mnRotation
Definition: editdoc.hxx:756
sal_Int32 Count() const
Definition: editdoc.cxx:2143
void InsertAttribInSelection(ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd, const SfxPoolItem &rPoolItem)
Definition: editdoc.cxx:2375
sal_uInt16 nDefTab
Definition: editdoc.hxx:754
void SetVertical(bool bVertical)
Definition: editdoc.hxx:785
EditPaM ConnectParagraphs(ContentNode *pLeft, ContentNode *pRight)
Definition: editdoc.cxx:2347
bool bIsFixedCellHeight
Definition: editdoc.hxx:757
static OUString GetSepStr(LineEnd eEnd)
Definition: editdoc.cxx:2154
void DisableAttributeExpanding()
Definition: editdoc.hxx:775
void CreateDefFont(bool bUseStyles)
Definition: editdoc.cxx:2053
sal_uInt16 GetDefTab() const
Definition: editdoc.hxx:783
Link< LinkParamNone *, void > aModifyHdl
Definition: editdoc.hxx:751
TextRotation GetRotation() const
Definition: editdoc.hxx:790
void ClearSpellErrors()
Definition: editdoc.cxx:2235
EditPaM InsertText(EditPaM aPaM, std::u16string_view rStr)
Definition: editdoc.cxx:2271
void Release(sal_Int32 nPos)
does not delete
Definition: editdoc.cxx:2131
EditPaM RemoveText()
Definition: editdoc.cxx:2249
EditPaM InsertParaBreak(EditPaM aPaM, bool bKeepEndingAttribs)
Definition: editdoc.cxx:2287
void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: editdoc.cxx:2712
SvxFont maDefFont
Definition: editdoc.hxx:753
EditPaM InsertFeature(EditPaM aPaM, const SfxPoolItem &rItem)
Definition: editdoc.cxx:2329
bool GetVertical() const
Definition: editdoc.cxx:2081
sal_Int32 GetTextLen() const
Definition: editdoc.cxx:2210
bool IsModified() const
Definition: editdoc.hxx:772
const ContentNode * operator[](sal_Int32 nPos) const
Definition: editdoc.cxx:2101
void SetFixedCellHeight(bool bUseFixedCellHeight)
Definition: editdoc.hxx:792
EditDoc(SfxItemPool *pItemPool)
Definition: editdoc.cxx:1919
rtl::Reference< SfxItemPool > pItemPool
Definition: editdoc.hxx:750
EditPaM GetStartPaM() const
Definition: editdoc.cxx:2198
virtual ~EditEngineItemPool() override
Definition: editdoc.cxx:3048
std::shared_ptr< DefItems > m_xDefItems
Definition: editdoc.hxx:851
sal_Int32 FindLine(sal_Int32 nChar, bool bInclEnd)
Definition: editdoc.cxx:1076
LinesType maLines
Definition: editdoc.hxx:571
void Append(EditLine *p)
Definition: editdoc.cxx:1108
sal_Int32 Count() const
Definition: editdoc.cxx:1093
std::vector< std::unique_ptr< EditLine > > LinesType
Definition: editdoc.hxx:570
void DeleteFromLine(sal_Int32 nDelFrom)
Definition: editdoc.cxx:1068
void Insert(sal_Int32 nPos, EditLine *p)
Definition: editdoc.cxx:1113
const EditLine & operator[](sal_Int32 nPos) const
Definition: editdoc.cxx:1098
void Reset()
Definition: editdoc.cxx:1063
void SetInvalid()
Definition: editdoc.hxx:549
const std::vector< sal_Bool > & GetKashidaArray() const
Definition: editdoc.hxx:558
bool IsIn(sal_Int32 nIndex) const
Definition: editdoc.hxx:506
void SetTextWidth(sal_Int32 n)
Definition: editdoc.hxx:532
bool IsIn(sal_Int32 nIndex, bool bInclEnd) const
Definition: editdoc.hxx:509
sal_uInt16 nHeight
Definition: editdoc.hxx:495
void SetValid()
Definition: editdoc.hxx:550
CharPosArrayType & GetCharPosArray()
Definition: editdoc.hxx:554
sal_Int32 GetStartPortion() const
Definition: editdoc.hxx:521
const CharPosArrayType & GetCharPosArray() const
Definition: editdoc.hxx:555
sal_Int32 & GetStart()
Definition: editdoc.hxx:514
bool IsInvalid() const
Definition: editdoc.hxx:547
sal_uInt16 GetHeight() const
Definition: editdoc.hxx:529
void SetEnd(sal_Int32 n)
Definition: editdoc.hxx:516
void SetEndPortion(sal_Int32 n)
Definition: editdoc.hxx:524
sal_Int32 GetEndPortion() const
Definition: editdoc.hxx:525
CharPosArrayType aPositions
Definition: editdoc.hxx:487
std::vector< sal_Bool > & GetKashidaArray()
Definition: editdoc.hxx:557
void SetStartPortion(sal_Int32 n)
Definition: editdoc.hxx:520
void SetStartPosX(sal_Int32 start)
Definition: editdoc.cxx:1011
sal_Int32 nEnd
Definition: editdoc.hxx:492
bool bInvalid
Definition: editdoc.hxx:499
EditLine & operator=(const EditLine &rLine)
Definition: editdoc.cxx:995
sal_Int32 GetLen() const
Definition: editdoc.hxx:541
sal_uInt16 nTxtHeight
Definition: editdoc.hxx:496
std::vector< sal_Int32 > CharPosArrayType
Definition: editdoc.hxx:484
sal_uInt16 GetTxtHeight() const
Definition: editdoc.hxx:530
sal_Int32 nStart
Definition: editdoc.hxx:491
std::vector< sal_Bool > aKashidaPositions
Definition: editdoc.hxx:488
sal_Int32 GetStart() const
Definition: editdoc.hxx:513
~EditLine()
Definition: editdoc.cxx:956
sal_uInt16 GetMaxAscent() const
Definition: editdoc.hxx:536
sal_Int32 nEndPortion
Definition: editdoc.hxx:494
sal_Int32 nStartPosX
Definition: editdoc.hxx:490
sal_uInt16 nMaxAscent
Definition: editdoc.hxx:497
EditLine()
Definition: editdoc.cxx:925
bool bHangingPunctuation
Definition: editdoc.hxx:498
Size CalcTextSize(ParaPortion &rParaPortion)
Definition: editdoc.cxx:1019
friend bool operator==(const EditLine &r1, const EditLine &r2)
Definition: editdoc.cxx:978
sal_Int32 GetStartPosX() const
Definition: editdoc.hxx:543
bool IsEmpty() const
Definition: editdoc.hxx:552
sal_Int32 & GetEndPortion()
Definition: editdoc.hxx:526
void SetMaxAscent(sal_uInt16 n)
Definition: editdoc.hxx:535
sal_Int32 GetTextWidth() const
Definition: editdoc.hxx:533
void SetStart(sal_Int32 n)
Definition: editdoc.hxx:512
bool IsValid() const
Definition: editdoc.hxx:548
void SetHangingPunctuation(bool b)
Definition: editdoc.hxx:538
sal_Int32 & GetEnd()
Definition: editdoc.hxx:518
sal_Int32 & GetStartPortion()
Definition: editdoc.hxx:522
sal_Int32 nTxtWidth
Definition: editdoc.hxx:489
EditLine * Clone() const
Definition: editdoc.cxx:961
void SetHeight(sal_uInt16 nH, sal_uInt16 nTxtH=0)
Definition: editdoc.cxx:1005
sal_Int32 nStartPortion
Definition: editdoc.hxx:493
bool IsHangingPunctuation() const
Definition: editdoc.hxx:539
sal_Int32 GetEnd() const
Definition: editdoc.hxx:517
friend bool operator==(const EditPaM &r1, const EditPaM &r2)
Definition: editdoc.cxx:1188
friend bool operator!=(const EditPaM &r1, const EditPaM &r2)
Definition: editdoc.cxx:1194
sal_Int32 nIndex
Definition: editdoc.hxx:306
void SetIndex(sal_Int32 n)
Definition: editdoc.hxx:317
void SetNode(ContentNode *p)
Definition: editdoc.cxx:1122
bool operator!() const
Definition: editdoc.hxx:323
ContentNode * pNode
Definition: editdoc.hxx:305
const ContentNode * GetNode() const
Definition: editdoc.hxx:312
sal_Int32 GetIndex() const
Definition: editdoc.hxx:316
bool DbgIsBuggy(EditDoc const &rDoc) const
Definition: editdoc.cxx:1127
ContentNode * GetNode()
Definition: editdoc.hxx:313
EditPaM aEndPaM
Definition: editdoc.hxx:697
EditPaM aStartPaM
Definition: editdoc.hxx:696
const EditPaM & Min() const
Definition: editdoc.hxx:708
EditSelection & operator=(const EditPaM &r)
Definition: editdoc.cxx:1155
bool IsInvalid() const
Definition: editdoc.hxx:712
EditPaM & Min()
Definition: editdoc.hxx:705
bool DbgIsBuggy(EditDoc const &rDoc) const
Definition: editdoc.cxx:1134
bool HasRange() const
Definition: editdoc.hxx:711
EditPaM & Max()
Definition: editdoc.hxx:706
bool operator!=(const EditSelection &r) const
Definition: editdoc.hxx:720
void Adjust(const EditDoc &rNodes)
Definition: editdoc.cxx:1162
bool operator==(const EditSelection &r) const
Definition: editdoc.hxx:718
const EditPaM & Max() const
Definition: editdoc.hxx:709
void Insert(const SfxPoolItem *pItem)
Definition: editdoc.cxx:1912
DummyItemList aItemPool
Definition: editdoc.hxx:140
sal_Int32 CurrentItem
Definition: editdoc.hxx:141
const SfxPoolItem * Next()
Definition: editdoc.cxx:1902
void Clear()
Definition: editdoc.hxx:149
sal_Int32 Count() const
Definition: editdoc.hxx:147
const SfxPoolItem * First()
Definition: editdoc.cxx:1896
std::vector< const SfxPoolItem * > DummyItemList
Definition: editdoc.hxx:139
sal_Int32 nLastCache
Definition: editdoc.hxx:662
sal_Int32 GetPos(const ParaPortion *p) const
Definition: editdoc.cxx:689
sal_Int32 Count() const
Definition: editdoc.cxx:741
std::vector< std::unique_ptr< ParaPortion > > maPortions
Definition: editdoc.hxx:663
tools::Long GetYOffset(const ParaPortion *pPPortion) const
Definition: editdoc.cxx:757
static void DbgCheck(ParaPortionList const &, EditDoc const &rDoc)
Definition: editdoc.cxx:795
void Insert(sal_Int32 nPos, std::unique_ptr< ParaPortion > p)
Definition: editdoc.cxx:726
void Append(std::unique_ptr< ParaPortion > p)
Definition: editdoc.cxx:736
void Remove(sal_Int32 nPos)
Definition: editdoc.cxx:716
std::unique_ptr< ParaPortion > Release(sal_Int32 nPos)
Definition: editdoc.cxx:704
const ParaPortion * SafeGetObject(sal_Int32 nPos) const
Definition: editdoc.cxx:783
ParaPortion * operator[](sal_Int32 nPos)
Definition: editdoc.cxx:694
sal_Int32 FindParagraph(tools::Long nYOffset) const
Definition: editdoc.cxx:771
WritingDirectionInfos aWritingDirectionInfos
Definition: editdoc.hxx:600
ParaPortion(const ParaPortion &)=delete
bool IsInvalid() const
Definition: editdoc.hxx:623
TextPortionList & GetTextPortions()
Definition: editdoc.hxx:646
sal_Int32 nFirstLineOffset
Definition: editdoc.hxx:603
void MarkInvalid(sal_Int32 nStart, sal_Int32 nDiff)
Definition: editdoc.cxx:527
bool IsEmpty()
Definition: editdoc.hxx:639
ContentNode * pNode
Definition: editdoc.hxx:596
short GetInvalidDiff() const
Definition: editdoc.hxx:650
sal_Int32 nInvalidDiff
Definition: editdoc.hxx:605
tools::Long GetHeight() const
Definition: editdoc.hxx:641
void SetValid()
Definition: editdoc.hxx:625
void ResetHeight()
Definition: editdoc.hxx:643
sal_Int32 nInvalidPosStart
Definition: editdoc.hxx:602
bool bInvalid
Definition: editdoc.hxx:607
bool bSimple
Definition: editdoc.hxx:608
void SetBulletX(sal_Int32 n)
Definition: editdoc.hxx:631
static bool DbgCheckTextPortions(ParaPortion const &)
Definition: editdbg.cxx:506
void SetMustRepaint(bool bRP)
Definition: editdoc.hxx:628
bool IsSimpleInvalid() const
Definition: editdoc.hxx:624
ScriptTypePosInfos aScriptInfos
Definition: editdoc.hxx:599
sal_Int32 GetFirstLineOffset() const
Definition: editdoc.hxx:642
sal_Int32 GetLineNumber(sal_Int32 nIndex) const
Definition: editdoc.cxx:580
tools::Long nHeight
Definition: editdoc.hxx:597
sal_Int32 GetBulletX() const
Definition: editdoc.hxx:630
ContentNode * GetNode() const
Definition: editdoc.hxx:645
sal_Int32 GetInvalidPosStart() const
Definition: editdoc.hxx:649
sal_Int32 nBulletX
Definition: editdoc.hxx:604
EditLineList & GetLines()
Definition: editdoc.hxx:620
void CorrectValuesBehindLastFormattedLine(sal_Int32 nLastFormattedLine)
Definition: editdoc.cxx:601
bool IsVisible() const
Definition: editdoc.hxx:637
bool bForceRepaint
Definition: editdoc.hxx:610
TextPortionList aTextPortionList
Definition: editdoc.hxx:595
bool MustRepaint() const
Definition: editdoc.hxx:627
void SetVisible(bool bVisible)
Definition: editdoc.cxx:596
bool bVisible
Definition: editdoc.hxx:609
void MarkSelectionInvalid(sal_Int32 nStart)
Definition: editdoc.cxx:563
EditLineList aLineList
Definition: editdoc.hxx:594
const EditLineList & GetLines() const
Definition: editdoc.hxx:621
const TextPortionList & GetTextPortions() const
Definition: editdoc.hxx:647
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
void Append(TextPortion *p)
Definition: editdoc.cxx:407
std::vector< std::unique_ptr< TextPortion > > PortionsType
Definition: editdoc.hxx:455
sal_Int32 GetPos(const TextPortion *p) const
Definition: editdoc.cxx:437
sal_Int32 GetStartPos(sal_Int32 nPortion)
Definition: editdoc.cxx:472
sal_Int32 Count() const
Definition: editdoc.cxx:392
void DeleteFromPortion(sal_Int32 nDelFrom)
Definition: editdoc.cxx:384
const TextPortion & operator[](sal_Int32 nPos) const
Definition: editdoc.cxx:397
PortionsType maPortions
Definition: editdoc.hxx:456
void Remove(sal_Int32 nPos)
Definition: editdoc.cxx:417
sal_Int32 FindPortion(sal_Int32 nCharPos, sal_Int32 &rPortionStart, bool bPreferStartingPortion=false) const
Definition: editdoc.cxx:448
void Insert(sal_Int32 nPos, TextPortion *p)
Definition: editdoc.cxx:412
void SetKind(PortionKind n)
Definition: editdoc.hxx:437
TextPortion(sal_Int32 nL)
Definition: editdoc.hxx:390
TextPortion(const TextPortion &r)
Definition: editdoc.hxx:399
PortionKind nKind
Definition: editdoc.hxx:384
sal_uInt8 nRightToLeftLevel
Definition: editdoc.hxx:385
void SetRightToLeftLevel(sal_uInt8 n)
Definition: editdoc.hxx:440
Size aOutSz
Definition: editdoc.hxx:383
std::unique_ptr< ExtraPortionInfo > xExtraInfos
Definition: editdoc.hxx:381
void SetLen(sal_Int32 nL)
Definition: editdoc.hxx:410
void adjustSize(tools::Long nDeltaX, tools::Long nDeltaY)
Definition: editdoc.hxx:422
sal_Int32 GetLen() const
Definition: editdoc.hxx:409
sal_Int32 nLen
Definition: editdoc.hxx:382
PortionKind GetKind() const
Definition: editdoc.hxx:438
void setHeight(tools::Long nHeight)
Definition: editdoc.hxx:417
sal_uInt8 GetRightToLeftLevel() const
Definition: editdoc.hxx:441
void setWidth(tools::Long nWidth)
Definition: editdoc.hxx:412
sal_Unicode GetExtraValue() const
Definition: editdoc.hxx:444
void SetSize(const Size &rSize)
Definition: editdoc.hxx:430
void SetExtraValue(sal_Unicode n)
Definition: editdoc.hxx:445
void SetExtraInfos(ExtraPortionInfo *p)
Definition: editdoc.hxx:448
bool IsRightToLeft() const
Definition: editdoc.hxx:442
ExtraPortionInfo * GetExtraInfos() const
Definition: editdoc.hxx:447
sal_Unicode nExtraValue
Definition: editdoc.hxx:386
const Size & GetSize() const
Definition: editdoc.hxx:435
Keeps track of misspelled ranges in paragraph.
Definition: edtspell.hxx:55
bool IsScriptItemValid(sal_uInt16 nItemId, short nScriptType)
Definition: editdoc.cxx:103
std::vector< Color > SvxColorList
Definition: editdoc.hxx:131
AsianCompressionFlags
Definition: editdoc.hxx:339
DeleteMode
Definition: editdoc.hxx:335
EditCharAttrib * MakeCharAttrib(SfxItemPool &rPool, const SfxPoolItem &rAttr, sal_Int32 nS, sal_Int32 nE)
Definition: editdoc.cxx:219
#define DEFTAB
Definition: editdoc.hxx:44
sal_uInt16 GetScriptItemId(sal_uInt16 nItemId, SvtScriptType nScriptType)
Definition: editdoc.cxx:73
std::vector< ScriptTypePosInfo > ScriptTypePosInfos
Definition: editdoc.hxx:92
EditCharAttrib * GetAttrib(CharAttribList::AttribsType &rAttribs, std::size_t nAttr)
Definition: editdoc.hxx:839
PortionKind
Definition: editdoc.hxx:327
std::vector< WritingDirectionInfo > WritingDirectionInfos
Definition: editdoc.hxx:109
void CheckOrderedList(const CharAttribList::AttribsType &rAttribs)
Definition: editdbg.cxx:519
void CreateFont(SvxFont &rFont, const SfxItemSet &rSet, bool bSearchInParent=true, SvtScriptType nScriptType=SvtScriptType::NONE)
Definition: editdoc.cxx:1975
TextRotation
Definition: editobj.hxx:55
struct _xmlTextWriter * xmlTextWriterPtr
sal_Int32 nIndex
void * p
sal_Int64 n
SvtScriptType
LineEnd
sal_uInt16 nPos
Type
long Long
Definition: editdoc.hxx:56
EPaM()
Definition: editdoc.hxx:60
bool operator==(const EPaM &r) const
Definition: editdoc.hxx:73
EPaM & operator=(const EPaM &r)
Definition: editdoc.hxx:63
sal_Int32 nIndex
Definition: editdoc.hxx:58
bool operator<(const EPaM &r) const
Definition: editdoc.hxx:68
sal_Int32 nPara
Definition: editdoc.hxx:57
EPaM(const EPaM &r)
Definition: editdoc.hxx:62
EPaM(sal_Int32 nP, sal_Int32 nI)
Definition: editdoc.hxx:61
tools::Long nWidthFullCompression
Definition: editdoc.hxx:356
std::vector< sal_Int32 > lineBreaksList
Definition: editdoc.hxx:367
tools::Long nOrgWidth
Definition: editdoc.hxx:355
void SaveOrgDXArray(const sal_Int32 *pDXArray, sal_Int32 nLen)
Definition: editdoc.cxx:498
bool bFirstCharIsRightPunktuation
Definition: editdoc.hxx:363
AsianCompressionFlags nAsianCompressionTypes
Definition: editdoc.hxx:362
tools::Long nPortionOffsetX
Definition: editdoc.hxx:358
sal_uInt16 nMaxCompression100thPercent
Definition: editdoc.hxx:360
std::unique_ptr< sal_Int32[]> pOrgDXArray
Definition: editdoc.hxx:366
sal_Int32 nStartPos
Definition: editdoc.hxx:81
sal_Int32 nEndPos
Definition: editdoc.hxx:82
ScriptTypePosInfo(short Type, sal_Int32 Start, sal_Int32 End)
Definition: editdoc.hxx:84
sal_Int32 nEndPos
Definition: editdoc.hxx:98
WritingDirectionInfo(sal_uInt8 Type, sal_Int32 Start, sal_Int32 End)
Definition: editdoc.hxx:100
sal_Int32 nStartPos
Definition: editdoc.hxx:97
TEXT
unsigned char sal_uInt8
sal_uInt16 sal_Unicode