LibreOffice Module editeng (master) 1
editeng.cxx
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#include <memory>
21#include <utility>
22
23#include <comphelper/lok.hxx>
25#include <config_global.h>
26#include <o3tl/safeint.hxx>
27#include <vcl/svapp.hxx>
28#include <vcl/weld.hxx>
29#include <vcl/window.hxx>
30
31#include <tools/stream.hxx>
32
33#include <editeng/svxfont.hxx>
34#include "impedit.hxx"
35#include <editeng/editeng.hxx>
36#include <editeng/editview.hxx>
37#include <editeng/editstat.hxx>
38#include <editeng/eerdll.hxx>
39#include <editeng/editrids.hrc>
40#include <editeng/flditem.hxx>
41#include <editeng/txtrange.hxx>
42#include <editeng/cmapitem.hxx>
43
46#include <editeng/colritem.hxx>
49#include <editeng/fhgtitem.hxx>
50#include <editeng/fontitem.hxx>
51#include <editeng/kernitem.hxx>
52#include <editeng/lrspitem.hxx>
53#include <editeng/postitem.hxx>
54#include <editeng/shdditem.hxx>
55#include <editeng/udlnitem.hxx>
56#include <editeng/wghtitem.hxx>
57#include <editeng/wrlmitem.hxx>
58#include <editeng/langitem.hxx>
62
63#include <sot/exchange.hxx>
64#include <sot/formats.hxx>
65
66#include <editeng/numitem.hxx>
67#include <rtl/strbuf.hxx>
68#include <sal/log.hxx>
69#include <vcl/help.hxx>
70#include <vcl/transfer.hxx>
71#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
72#include <com/sun/star/frame/Desktop.hpp>
73
74#if OSL_DEBUG_LEVEL > 1
76#endif
78
79using namespace ::com::sun::star;
80using namespace ::com::sun::star::uno;
81using namespace ::com::sun::star::linguistic2;
82
83
84#if (OSL_DEBUG_LEVEL > 1) || defined ( DBG_UTIL )
85static bool bDebugPaint = false;
86#endif
87
88
90
92{
93 pImpEditEngine.reset( new ImpEditEngine( this, pItemPool ) );
94}
95
97{
98}
99
100void EditEngine::EnableUndo( bool bEnable )
101{
102 pImpEditEngine->EnableUndo( bEnable );
103}
104
106{
107 return pImpEditEngine->IsUndoEnabled();
108}
109
111{
112 return pImpEditEngine->IsInUndo();
113}
114
116{
117 return pImpEditEngine->GetUndoManager();
118}
119
121{
122 return pImpEditEngine->SetUndoManager(pNew);
123}
124
125void EditEngine::UndoActionStart( sal_uInt16 nId )
126{
127 DBG_ASSERT( !pImpEditEngine->IsInUndo(), "Calling UndoActionStart in Undomode!" );
128 if ( !pImpEditEngine->IsInUndo() )
129 pImpEditEngine->UndoActionStart( nId );
130}
131
132void EditEngine::UndoActionStart(sal_uInt16 nId, const ESelection& rSel)
133{
134 pImpEditEngine->UndoActionStart(nId, rSel);
135}
136
138{
139 DBG_ASSERT( !pImpEditEngine->IsInUndo(), "Calling UndoActionEnd in Undomode!" );
140 if ( !pImpEditEngine->IsInUndo() )
141 pImpEditEngine->UndoActionEnd();
142}
143
145{
146 return pImpEditEngine->mbLastTryMerge;
147}
148
150{
151 pImpEditEngine->SetRefDevice( pRefDev );
152}
153
155{
156 return pImpEditEngine->GetRefDevice();
157}
158
159void EditEngine::SetRefMapMode( const MapMode& rMapMode )
160{
161 pImpEditEngine->SetRefMapMode( rMapMode );
162}
163
165{
166 return pImpEditEngine->GetRefMapMode();
167}
168
170{
171 pImpEditEngine->SetBackgroundColor( rColor );
172}
173
175{
176 return pImpEditEngine->GetBackgroundColor();
177}
178
180{
181 return pImpEditEngine->GetAutoColor();
182}
183
185{
186 pImpEditEngine->EnableAutoColor( b );
187}
188
190{
191 pImpEditEngine->ForceAutoColor( b );
192}
193
195{
196 return pImpEditEngine->IsForceAutoColor();
197}
198
200{
201 return pImpEditEngine->GetEmptyItemSet();
202}
203
204void EditEngine::Draw( OutputDevice& rOutDev, const tools::Rectangle& rOutRect )
205{
206 Draw( rOutDev, rOutRect, Point( 0, 0 ) );
207}
208
209void EditEngine::Draw( OutputDevice& rOutDev, const Point& rStartPos, Degree10 nOrientation )
210{
211 // Create with 2 points, as with positive points it will end up with
212 // LONGMAX as Size, Bottom and Right in the range > LONGMAX.
213 tools::Rectangle aBigRect( -0x3FFFFFFF, -0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF );
214 if( rOutDev.GetConnectMetaFile() )
215 rOutDev.Push();
216 Point aStartPos( rStartPos );
217 if ( IsEffectivelyVertical() )
218 {
219 aStartPos.AdjustX(GetPaperSize().Width() );
220 rStartPos.RotateAround(aStartPos, nOrientation);
221 }
222 pImpEditEngine->Paint(rOutDev, aBigRect, aStartPos, false, nOrientation);
223 if( rOutDev.GetConnectMetaFile() )
224 rOutDev.Pop();
225}
226
227void EditEngine::Draw( OutputDevice& rOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos )
228{
229 Draw( rOutDev, rOutRect, rStartDocPos, true );
230}
231
232void EditEngine::Draw( OutputDevice& rOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos, bool bClip )
233{
234#if defined( DBG_UTIL ) || (OSL_DEBUG_LEVEL > 1)
235 if ( bDebugPaint )
236 DumpData(this, false);
237#endif
238
239 // Align to the pixel boundary, so that it becomes exactly the same
240 // as Paint ()
241 tools::Rectangle aOutRect( rOutDev.LogicToPixel( rOutRect ) );
242 aOutRect = rOutDev.PixelToLogic( aOutRect );
243
244 Point aStartPos;
245 if ( !IsEffectivelyVertical() )
246 {
247 aStartPos.setX( aOutRect.Left() - rStartDocPos.X() );
248 aStartPos.setY( aOutRect.Top() - rStartDocPos.Y() );
249 }
250 else
251 {
252 aStartPos.setX( aOutRect.Right() + rStartDocPos.Y() );
253 aStartPos.setY( aOutRect.Top() - rStartDocPos.X() );
254 }
255
256 bool bClipRegion = rOutDev.IsClipRegion();
257 bool bMetafile = rOutDev.GetConnectMetaFile();
258 vcl::Region aOldRegion = rOutDev.GetClipRegion();
259
260 // If one existed => intersection!
261 // Use Push/pop for creating the Meta file
262 if ( bMetafile )
263 rOutDev.Push();
264
265 // Always use the Intersect method, it is a must for Metafile!
266 if ( bClip )
267 {
268 // Clip only if necessary...
269 if ( rStartDocPos.X() || rStartDocPos.Y() ||
270 ( rOutRect.GetHeight() < static_cast<tools::Long>(GetTextHeight()) ) ||
271 ( rOutRect.GetWidth() < static_cast<tools::Long>(CalcTextWidth()) ) )
272 {
273 // Some printer drivers cause problems if characters graze the
274 // ClipRegion, therefore rather add a pixel more ...
275 tools::Rectangle aClipRect( aOutRect );
276 if ( rOutDev.GetOutDevType() == OUTDEV_PRINTER )
277 {
278 Size aPixSz( 1, 0 );
279 aPixSz = rOutDev.PixelToLogic( aPixSz );
280 aClipRect.AdjustRight(aPixSz.Width() );
281 aClipRect.AdjustBottom(aPixSz.Width() );
282 }
283 rOutDev.IntersectClipRegion( aClipRect );
284 }
285 }
286
287 pImpEditEngine->Paint( rOutDev, aOutRect, aStartPos );
288
289 if ( bMetafile )
290 rOutDev.Pop();
291 else if ( bClipRegion )
292 rOutDev.SetClipRegion( aOldRegion );
293 else
294 rOutDev.SetClipRegion();
295}
296
297void EditEngine::InsertView(EditView* pEditView, size_t nIndex)
298{
299
300 if ( nIndex > pImpEditEngine->GetEditViews().size() )
301 nIndex = pImpEditEngine->GetEditViews().size();
302
303 ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
304 rViews.insert(rViews.begin()+nIndex, pEditView);
305
306 EditSelection aStartSel = pImpEditEngine->GetEditDoc().GetStartPaM();
307 pEditView->pImpEditView->SetEditSelection( aStartSel );
308 if ( !pImpEditEngine->GetActiveView() )
309 pImpEditEngine->SetActiveView( pEditView );
310
311 pEditView->pImpEditView->AddDragAndDropListeners();
312}
313
315{
316
317 pView->HideCursor();
318 EditView* pRemoved = nullptr;
319 ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
320 ImpEditEngine::ViewsType::iterator it = std::find(rViews.begin(), rViews.end(), pView);
321
322 DBG_ASSERT( it != rViews.end(), "RemoveView with invalid index" );
323 if (it != rViews.end())
324 {
325 pRemoved = *it;
326 rViews.erase(it);
327 if ( pImpEditEngine->GetActiveView() == pView )
328 {
329 pImpEditEngine->SetActiveView( nullptr );
330 pImpEditEngine->GetSelEngine().SetCurView( nullptr );
331 }
332 pView->pImpEditView->RemoveDragAndDropListeners();
333
334 }
335 return pRemoved;
336}
337
338void EditEngine::RemoveView(size_t nIndex)
339{
340 ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
341 if (nIndex >= rViews.size())
342 return;
343
344 EditView* pView = rViews[nIndex];
345 if ( pView )
346 RemoveView( pView );
347}
348
349EditView* EditEngine::GetView(size_t nIndex) const
350{
351 return pImpEditEngine->GetEditViews()[nIndex];
352}
353
355{
356 return pImpEditEngine->GetEditViews().size();
357}
358
359bool EditEngine::HasView( EditView* pView ) const
360{
361 ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
362 return std::find(rViews.begin(), rViews.end(), pView) != rViews.end();
363}
364
366{
367 return pImpEditEngine->GetActiveView();
368}
369
371{
372 pImpEditEngine->SetActiveView(pView);
373}
374
375void EditEngine::SetDefTab( sal_uInt16 nDefTab )
376{
377 pImpEditEngine->GetEditDoc().SetDefTab( nDefTab );
378 if ( pImpEditEngine->IsFormatted() )
379 {
380 pImpEditEngine->FormatFullDoc();
381 pImpEditEngine->UpdateViews();
382 }
383}
384
385void EditEngine::SetPaperSize( const Size& rNewSize )
386{
387
388 Size aOldSize( pImpEditEngine->GetPaperSize() );
389 pImpEditEngine->SetValidPaperSize( rNewSize );
390 Size aNewSize( pImpEditEngine->GetPaperSize() );
391
392 bool bAutoPageSize = pImpEditEngine->GetStatus().AutoPageSize();
393 if ( !(bAutoPageSize || ( aNewSize.Width() != aOldSize.Width() )) )
394 return;
395
396 for (EditView* pView : pImpEditEngine->aEditViews)
397 {
398 if ( bAutoPageSize )
399 pView->pImpEditView->RecalcOutputArea();
400 else if ( pView->pImpEditView->DoAutoSize() )
401 {
402 pView->pImpEditView->ResetOutputArea( tools::Rectangle(
403 pView->pImpEditView->GetOutputArea().TopLeft(), aNewSize ) );
404 }
405 }
406
407 if ( bAutoPageSize || pImpEditEngine->IsFormatted() )
408 {
409 // Changing the width has no effect for AutoPageSize, as this is
410 // determined by the text width.
411 // Optimization first after Vobis delivery was enabled ...
412 pImpEditEngine->FormatFullDoc();
413
414 pImpEditEngine->UpdateViews( pImpEditEngine->GetActiveView() );
415
416 if ( pImpEditEngine->IsUpdateLayout() && pImpEditEngine->GetActiveView() )
417 pImpEditEngine->pActiveView->ShowCursor( false, false );
418 }
419}
420
422{
423 return pImpEditEngine->GetPaperSize();
424}
425
426void EditEngine::SetVertical(bool bVertical)
427{
428 pImpEditEngine->SetVertical(bVertical);
429}
430
432{
433 pImpEditEngine->SetRotation(nRotation);
434}
435
437{
438 return pImpEditEngine->GetRotation();
439}
440
442{
443 return pImpEditEngine->IsEffectivelyVertical();
444}
445
447{
448 return pImpEditEngine->IsTopToBottom();
449}
450
452{
453 return pImpEditEngine->GetVertical();
454}
455
456void EditEngine::SetTextColumns(sal_Int16 nColumns, sal_Int32 nSpacing)
457{
458 pImpEditEngine->SetTextColumns(nColumns, nSpacing);
459}
460
461void EditEngine::SetFixedCellHeight( bool bUseFixedCellHeight )
462{
463 pImpEditEngine->SetFixedCellHeight( bUseFixedCellHeight );
464}
465
467{
468 pImpEditEngine->SetDefaultHorizontalTextDirection( eHTextDir );
469}
470
472{
473 return pImpEditEngine->GetDefaultHorizontalTextDirection();
474}
475
477{
478 EditSelection aSel( pImpEditEngine->CreateSel( rSelection ) );
479 return pImpEditEngine->GetItemScriptType( aSel );
480}
481
483{
484 return pImpEditEngine->GetLanguage(rPaM);
485}
486
487editeng::LanguageSpan EditEngine::GetLanguage( sal_Int32 nPara, sal_Int32 nPos ) const
488{
489 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
490 DBG_ASSERT( pNode, "GetLanguage - nPara is invalid!" );
491 return pNode ? pImpEditEngine->GetLanguage( EditPaM( pNode, nPos ) ) : editeng::LanguageSpan{};
492}
493
494
495void EditEngine::TransliterateText( const ESelection& rSelection, TransliterationFlags nTransliterationMode )
496{
497 pImpEditEngine->TransliterateText( pImpEditEngine->CreateSel( rSelection ), nTransliterationMode );
498}
499
501{
502 return pImpEditEngine->TransliterateText(rSelection, nTransliterationMode);
503}
504
506{
507 pImpEditEngine->SetAsianCompressionMode( n );
508}
509
511{
512 pImpEditEngine->SetKernAsianPunctuation( b );
513}
514
516{
517 pImpEditEngine->SetAddExtLeading( b );
518}
519
521{
522 SetPolygon( rPolyPolygon, nullptr );
523}
524
525void EditEngine::SetPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon)
526{
527 bool bSimple(false);
528
529 if(pLinePolyPolygon && 1 == rPolyPolygon.count())
530 {
531 if(rPolyPolygon.getB2DPolygon(0).isClosed())
532 {
533 // open polygon
534 bSimple = true;
535 }
536 }
537
538 TextRanger* pRanger = new TextRanger( rPolyPolygon, pLinePolyPolygon, 30, 2, 2, bSimple, true );
539 pImpEditEngine->SetTextRanger( std::unique_ptr<TextRanger>(pRanger) );
540 pImpEditEngine->SetPaperSize( pRanger->GetBoundRect().GetSize() );
541}
542
544{
545 pImpEditEngine->SetTextRanger( nullptr );
546}
547
549{
550 return pImpEditEngine->GetMinAutoPaperSize();
551}
552
554{
555 pImpEditEngine->SetMinAutoPaperSize( rSz );
556}
557
559{
560 return pImpEditEngine->GetMaxAutoPaperSize();
561}
562
564{
565 pImpEditEngine->SetMaxAutoPaperSize( rSz );
566}
567
569{
570 pImpEditEngine->SetMinColumnWrapHeight(nVal);
571}
572
573OUString EditEngine::GetText( LineEnd eEnd ) const
574{
575 return pImpEditEngine->GetEditDoc().GetText( eEnd );
576}
577
578OUString EditEngine::GetText( const ESelection& rESelection ) const
579{
580 EditSelection aSel( pImpEditEngine->CreateSel( rESelection ) );
581 return pImpEditEngine->GetSelected( aSel );
582}
583
584sal_Int32 EditEngine::GetTextLen() const
585{
586 return pImpEditEngine->GetEditDoc().GetTextLen();
587}
588
590{
591 return pImpEditEngine->aEditDoc.Count();
592}
593
594sal_Int32 EditEngine::GetLineCount( sal_Int32 nParagraph ) const
595{
596 if ( !pImpEditEngine->IsFormatted() )
597 pImpEditEngine->FormatDoc();
598 return pImpEditEngine->GetLineCount( nParagraph );
599}
600
601sal_Int32 EditEngine::GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const
602{
603 if ( !pImpEditEngine->IsFormatted() )
604 pImpEditEngine->FormatDoc();
605 return pImpEditEngine->GetLineLen( nParagraph, nLine );
606}
607
608void EditEngine::GetLineBoundaries( /*out*/sal_Int32& rStart, /*out*/sal_Int32& rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const
609{
610 if ( !pImpEditEngine->IsFormatted() )
611 pImpEditEngine->FormatDoc();
612 return pImpEditEngine->GetLineBoundaries( rStart, rEnd, nParagraph, nLine );
613}
614
615sal_Int32 EditEngine::GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const
616{
617 if ( !pImpEditEngine->IsFormatted() )
618 pImpEditEngine->FormatDoc();
619 return pImpEditEngine->GetLineNumberAtIndex( nPara, nIndex );
620}
621
622sal_uInt32 EditEngine::GetLineHeight( sal_Int32 nParagraph )
623{
624 // If someone calls GetLineHeight() with an empty Engine.
625 if ( !pImpEditEngine->IsFormatted() )
626 pImpEditEngine->FormatDoc();
627 return pImpEditEngine->GetLineHeight( nParagraph, 0 );
628}
629
631{
632 if ( !pImpEditEngine->IsFormatted() )
633 pImpEditEngine->FormatDoc();
634
635 Point aPnt = GetDocPosTopLeft( nPara );
636
638 {
639 sal_Int32 nTextHeight = pImpEditEngine->GetTextHeight();
640 sal_Int32 nParaWidth = pImpEditEngine->CalcParaWidth( nPara, true );
641 sal_Int32 nParaHeight = pImpEditEngine->GetParaHeight( nPara );
642
643 return tools::Rectangle( nTextHeight - aPnt.Y() - nParaHeight, 0, nTextHeight - aPnt.Y(), nParaWidth );
644 }
645 else
646 {
647 sal_Int32 nParaWidth = pImpEditEngine->CalcParaWidth( nPara, true );
648 sal_Int32 nParaHeight = pImpEditEngine->GetParaHeight( nPara );
649
650 return tools::Rectangle( 0, aPnt.Y(), nParaWidth, aPnt.Y() + nParaHeight );
651 }
652}
653
654sal_uInt32 EditEngine::GetTextHeight( sal_Int32 nParagraph ) const
655{
656 if ( !pImpEditEngine->IsFormatted() )
657 pImpEditEngine->FormatDoc();
658
659 sal_uInt32 nHeight = pImpEditEngine->GetParaHeight( nParagraph );
660 return nHeight;
661}
662
663OUString EditEngine::GetWord( sal_Int32 nPara, sal_Int32 nIndex )
664{
665 ESelection aESel( nPara, nIndex, nPara, nIndex );
666 EditSelection aSel( pImpEditEngine->CreateSel( aESel ) );
667 aSel = pImpEditEngine->SelectWord( aSel );
668 return pImpEditEngine->GetSelected( aSel );
669}
670
671ESelection EditEngine::GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const
672{
673 // ImpEditEngine-Iteration-Methods should be const!
674 EditEngine* pE = const_cast<EditEngine*>(this);
675
676 EditSelection aSel( pE->pImpEditEngine->CreateSel( rSelection ) );
677 aSel = pE->pImpEditEngine->SelectWord( aSel, nWordType );
678 return pE->pImpEditEngine->CreateESel( aSel );
679}
680
682{
683 pImpEditEngine->CursorMoved(pPrevNode);
684}
685
687{
688 pImpEditEngine->CheckIdleFormatter();
689}
690
692{
693 return pImpEditEngine->aIdleFormatter.IsActive();
694}
695
697{
698 return pImpEditEngine->FindParaPortion(pNode);
699}
700
702{
703 return pImpEditEngine->FindParaPortion(pNode);
704}
705
707{
708 return pImpEditEngine->GetPrevVisPortion(pCurPortion);
709}
710
712{
713 return pImpEditEngine->GetItemScriptType(rSel);
714}
715
716void EditEngine::RemoveParaPortion(sal_Int32 nNode)
717{
718 pImpEditEngine->GetParaPortions().Remove(nNode);
719}
720
722{
723 pImpEditEngine->SetCallParaInsertedOrDeleted(b);
724}
725
727{
728 return pImpEditEngine->IsCallParaInsertedOrDeleted();
729}
730
732{
733 pImpEditEngine->aDeletedNodes.push_back(std::unique_ptr<DeletedNodeInfo>(pInfo));
734}
735
737{
738 pImpEditEngine->UpdateSelections();
739}
740
741void EditEngine::InsertContent(ContentNode* pNode, sal_Int32 nPos)
742{
743 pImpEditEngine->InsertContent(pNode, nPos);
744}
745
746EditPaM EditEngine::SplitContent(sal_Int32 nNode, sal_Int32 nSepPos)
747{
748 return pImpEditEngine->SplitContent(nNode, nSepPos);
749}
750
751EditPaM EditEngine::ConnectContents(sal_Int32 nLeftNode, bool bBackward)
752{
753 return pImpEditEngine->ConnectContents(nLeftNode, bBackward);
754}
755
756void EditEngine::InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem)
757{
758 pImpEditEngine->ImpInsertFeature(rEditSelection, rItem);
759}
760
761EditSelection EditEngine::MoveParagraphs(const Range& rParagraphs, sal_Int32 nNewPos)
762{
763 return pImpEditEngine->MoveParagraphs(rParagraphs, nNewPos, nullptr);
764}
765
766void EditEngine::RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich, bool bRemoveFeatures)
767{
768 pImpEditEngine->RemoveCharAttribs(nPara, nWhich, bRemoveFeatures);
769}
770
771void EditEngine::RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich)
772{
773 const EERemoveParaAttribsMode eMode = bRemoveParaAttribs?
776 pImpEditEngine->RemoveCharAttribs(rSel, eMode, nWhich);
777}
778
779void EditEngine::RemoveCharAttribs(const EditSelection& rSel, EERemoveParaAttribsMode eMode, sal_uInt16 nWhich)
780{
781 pImpEditEngine->RemoveCharAttribs(rSel, eMode, nWhich);
782}
783
785{
786 return pImpEditEngine->GetEditViews();
787}
788
790{
791 return pImpEditEngine->GetEditViews();
792}
793
795{
796 pImpEditEngine->SetUndoMode(b);
797}
798
799void EditEngine::FormatAndLayout(EditView* pCurView, bool bCalledFromUndo)
800{
801 pImpEditEngine->FormatAndLayout(pCurView, bCalledFromUndo);
802}
803
805{
806 pImpEditEngine->Undo(pView);
807}
808
810{
811 pImpEditEngine->Redo(pView);
812}
813
814uno::Reference<datatransfer::XTransferable> EditEngine::CreateTransferable(const EditSelection& rSelection)
815{
816 return pImpEditEngine->CreateTransferable(rSelection);
817}
818
820{
821 pImpEditEngine->ParaAttribsToCharAttribs(pNode);
822}
823
825{
826 return pImpEditEngine->CreateEditPaM(rEPaM);
827}
828
830 ContentNode* pLeft, ContentNode* pRight, bool bBackward)
831{
832 return pImpEditEngine->ImpConnectParagraphs(pLeft, pRight, bBackward);
833}
834
836{
837 return pImpEditEngine->InsertField(rEditSelection, rFld);
838}
839
840EditPaM EditEngine::InsertText(const EditSelection& aCurEditSelection, const OUString& rStr)
841{
842 return pImpEditEngine->InsertText(aCurEditSelection, rStr);
843}
844
846{
847 return pImpEditEngine->InsertText(rTextObject, rSel);
848}
849
851 uno::Reference<datatransfer::XTransferable > const & rxDataObj,
852 const OUString& rBaseURL, const EditPaM& rPaM, bool bUseSpecial)
853{
854 return pImpEditEngine->PasteText(rxDataObj, rBaseURL, rPaM, bUseSpecial);
855}
856
858{
859 return pImpEditEngine->EndOfWord(rPaM);
860}
861
862EditPaM EditEngine::GetPaM(const Point& aDocPos, bool bSmart)
863{
864 return pImpEditEngine->GetPaM(aDocPos, bSmart);
865}
866
868 const EditSelection& rCurSelection, sal_Int16 nWordType)
869{
870 return pImpEditEngine->SelectWord(rCurSelection, nWordType);
871}
872
874 const ParaPortion* pParaPortion, const EditLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart) const
875{
876 return pImpEditEngine->GetXPos(pParaPortion, pLine, nIndex, bPreferPortionStart);
877}
878
880 const ParaPortion* pParaPortion, const EditLine* pLine) const
881{
882 return pImpEditEngine->GetLineXPosStartEnd(pParaPortion, pLine);
883}
884
886{
887 return pImpEditEngine->IsFormatted();
888}
889
890EditPaM EditEngine::CursorLeft(const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode)
891{
892 return pImpEditEngine->CursorLeft(rPaM, nCharacterIteratorMode);
893}
894
895EditPaM EditEngine::CursorRight(const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode)
896{
897 return pImpEditEngine->CursorRight(rPaM, nCharacterIteratorMode);
898}
899
901{
902 return pImpEditEngine->GetStatus();
903}
904
906{
907 return pImpEditEngine->GetEditDoc();
908}
909
911{
912 return pImpEditEngine->GetEditDoc();
913}
914
916{
917 pImpEditEngine->GetEditDoc().dumpAsXml(pWriter);
918}
919
921{
922 return pImpEditEngine->GetParaPortions();
923}
924
926{
927 return pImpEditEngine->GetParaPortions();
928}
929
930void EditEngine::SeekCursor(ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont)
931{
932 pImpEditEngine->SeekCursor(pNode, nPos, rFont);
933}
934
936{
937 return pImpEditEngine->ImpDeleteSelection(rSel);
938}
939
941{
942 return pImpEditEngine->CreateESel(rSel);
943}
944
946{
947 return pImpEditEngine->CreateSel(rSel);
948}
949
950const SfxItemSet& EditEngine::GetBaseParaAttribs(sal_Int32 nPara) const
951{
952 return pImpEditEngine->GetParaAttribs(nPara);
953}
954
955void EditEngine::SetParaAttribsOnly(sal_Int32 nPara, const SfxItemSet& rSet)
956{
957 pImpEditEngine->SetParaAttribs(nPara, rSet);
958}
959
960void EditEngine::SetAttribs(const EditSelection& rSel, const SfxItemSet& rSet, SetAttribsMode nSpecial)
961{
962 pImpEditEngine->SetAttribs(rSel, rSet, nSpecial);
963}
964
965OUString EditEngine::GetSelected(const EditSelection& rSel) const
966{
967 return pImpEditEngine->GetSelected(rSel);
968}
969
971{
972 return pImpEditEngine->DeleteSelected(rSel);
973}
974
976{
977 pImpEditEngine->aBeginPasteOrDropHdl.Call(rInfos);
978}
979
981{
982 pImpEditEngine->aEndPasteOrDropHdl.Call(rInfos);
983}
984
986{
987 return pImpEditEngine->ImplHasText();
988}
989
991{
992 return pImpEditEngine->aSelEngine;
993}
994
996{
997 pImpEditEngine->bInSelection = b;
998}
999
1000bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, vcl::Window const * pFrameWin )
1001{
1002 DBG_ASSERT( pEditView, "no View - no cookie !" );
1003
1004 bool bDone = true;
1005
1006 bool bModified = false;
1007 bool bMoved = false;
1008 bool bAllowIdle = true;
1009 bool bReadOnly = pEditView->IsReadOnly();
1010
1011 GetCursorFlags nNewCursorFlags = GetCursorFlags::NONE;
1012 bool bSetCursorFlags = true;
1013
1014 EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
1015 DBG_ASSERT( !aCurSel.IsInvalid(), "Blinde Selection in EditEngine::PostKeyEvent" );
1016
1017 OUString aAutoText( pImpEditEngine->GetAutoCompleteText() );
1018 if (!pImpEditEngine->GetAutoCompleteText().isEmpty())
1019 pImpEditEngine->SetAutoCompleteText(OUString(), true);
1020
1021 sal_uInt16 nCode = rKeyEvent.GetKeyCode().GetCode();
1022 KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
1023 if ( eFunc != KeyFuncType::DONTKNOW )
1024 {
1025 switch ( eFunc )
1026 {
1027 case KeyFuncType::UNDO:
1028 {
1029 if ( !bReadOnly )
1030 pEditView->Undo();
1031 return true;
1032 }
1033 case KeyFuncType::REDO:
1034 {
1035 if ( !bReadOnly )
1036 pEditView->Redo();
1037 return true;
1038 }
1039
1040 default: // is then possible edited below.
1041 eFunc = KeyFuncType::DONTKNOW;
1042 }
1043 }
1044
1045 if ( eFunc == KeyFuncType::DONTKNOW )
1046 {
1047 switch ( nCode )
1048 {
1049#if defined( DBG_UTIL ) || (OSL_DEBUG_LEVEL > 1)
1050 case KEY_F1:
1051 {
1052 if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() )
1053 {
1054 sal_Int32 nParas = GetParagraphCount();
1055 Point aPos;
1056 Point aViewStart( pEditView->GetOutputArea().TopLeft() );
1057 tools::Long n20 = 40 * pImpEditEngine->nOnePixelInRef;
1058 for ( sal_Int32 n = 0; n < nParas; n++ )
1059 {
1060 tools::Long nH = GetTextHeight( n );
1061 Point P1( aViewStart.X() + n20 + n20*(n%2), aViewStart.Y() + aPos.Y() );
1062 Point P2( P1 );
1063 P2.AdjustX(n20 );
1064 P2.AdjustY(nH );
1065 pEditView->GetWindow()->GetOutDev()->SetLineColor();
1066 pEditView->GetWindow()->GetOutDev()->SetFillColor( (n%2) ? COL_YELLOW : COL_LIGHTGREEN );
1067 pEditView->GetWindow()->GetOutDev()->DrawRect( tools::Rectangle( P1, P2 ) );
1068 aPos.AdjustY(nH );
1069 }
1070 }
1071 bDone = false;
1072 }
1073 break;
1074 case KEY_F11:
1075 {
1076 if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() )
1077 {
1079 OStringBuffer aInfo("DebugPaint: ");
1080 aInfo.append(bDebugPaint ? "On" : "Off");
1081 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pEditView->GetWindow()->GetFrameWeld(),
1082 VclMessageType::Info, VclButtonsType::Ok,
1083 OStringToOUString(aInfo, RTL_TEXTENCODING_ASCII_US)));
1084 xInfoBox->run();
1085
1086 }
1087 bDone = false;
1088 }
1089 break;
1090 case KEY_F12:
1091 {
1092 if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() )
1093 DumpData(this, true);
1094 bDone = false;
1095 }
1096 break;
1097#endif
1098 case KEY_UP:
1099 case KEY_DOWN:
1100 case KEY_LEFT:
1101 case KEY_RIGHT:
1102 case KEY_HOME:
1103 case KEY_END:
1104 case KEY_PAGEUP:
1105 case KEY_PAGEDOWN:
1106 case css::awt::Key::MOVE_WORD_FORWARD:
1107 case css::awt::Key::SELECT_WORD_FORWARD:
1108 case css::awt::Key::MOVE_WORD_BACKWARD:
1109 case css::awt::Key::SELECT_WORD_BACKWARD:
1110 case css::awt::Key::MOVE_TO_BEGIN_OF_LINE:
1111 case css::awt::Key::MOVE_TO_END_OF_LINE:
1112 case css::awt::Key::SELECT_TO_BEGIN_OF_LINE:
1113 case css::awt::Key::SELECT_TO_END_OF_LINE:
1114 case css::awt::Key::MOVE_TO_BEGIN_OF_PARAGRAPH:
1115 case css::awt::Key::MOVE_TO_END_OF_PARAGRAPH:
1116 case css::awt::Key::SELECT_TO_BEGIN_OF_PARAGRAPH:
1117 case css::awt::Key::SELECT_TO_END_OF_PARAGRAPH:
1118 case css::awt::Key::MOVE_TO_BEGIN_OF_DOCUMENT:
1119 case css::awt::Key::MOVE_TO_END_OF_DOCUMENT:
1120 case css::awt::Key::SELECT_TO_BEGIN_OF_DOCUMENT:
1121 case css::awt::Key::SELECT_TO_END_OF_DOCUMENT:
1122 {
1123 if ( !rKeyEvent.GetKeyCode().IsMod2() || ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) )
1124 {
1125 if ( ImpEditEngine::DoVisualCursorTraveling() && ( ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) /* || ( nCode == KEY_HOME ) || ( nCode == KEY_END ) */ ) )
1126 bSetCursorFlags = false; // Will be manipulated within visual cursor move
1127
1128 aCurSel = pImpEditEngine->MoveCursor( rKeyEvent, pEditView );
1129
1130 if ( aCurSel.HasRange() ) {
1131 Reference<css::datatransfer::clipboard::XClipboard> aSelection(GetSystemPrimarySelection());
1132 pEditView->pImpEditView->CutCopy( aSelection, false );
1133 }
1134
1135 bMoved = true;
1136 if ( nCode == KEY_HOME )
1137 nNewCursorFlags |= GetCursorFlags::StartOfLine;
1138 else if ( nCode == KEY_END )
1139 nNewCursorFlags |= GetCursorFlags::EndOfLine;
1140
1141 }
1142#if OSL_DEBUG_LEVEL > 1
1143 GetLanguage( pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ), aCurSel.Max().GetIndex() );
1144#endif
1145 }
1146 break;
1147 case KEY_BACKSPACE:
1148 case KEY_DELETE:
1149 case css::awt::Key::DELETE_WORD_BACKWARD:
1150 case css::awt::Key::DELETE_WORD_FORWARD:
1151 case css::awt::Key::DELETE_TO_BEGIN_OF_PARAGRAPH:
1152 case css::awt::Key::DELETE_TO_END_OF_PARAGRAPH:
1153 {
1154 if ( !bReadOnly && !rKeyEvent.GetKeyCode().IsMod2() )
1155 {
1156 // check if we are behind a bullet and using the backspace key
1157 ContentNode *pNode = aCurSel.Min().GetNode();
1158 const SvxNumberFormat *pFmt = pImpEditEngine->GetNumberFormat( pNode );
1159 if (pFmt && nCode == KEY_BACKSPACE &&
1160 !aCurSel.HasRange() && aCurSel.Min().GetIndex() == 0)
1161 {
1162 // if the bullet is still visible, just make it invisible.
1163 // Otherwise continue as usual.
1164
1165
1166 sal_Int32 nPara = pImpEditEngine->GetEditDoc().GetPos( pNode );
1167 SfxBoolItem aBulletState( pImpEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE ) );
1168
1169 if ( aBulletState.GetValue() )
1170 {
1171
1172 aBulletState.SetValue( false );
1173 SfxItemSet aSet( pImpEditEngine->GetParaAttribs( nPara ) );
1174 aSet.Put( aBulletState );
1175 pImpEditEngine->SetParaAttribs( nPara, aSet );
1176
1177 // have this and the following paragraphs formatted and repainted.
1178 // (not painting a numbering in the list may cause the following
1179 // numberings to have different numbers than before and thus the
1180 // length may have changed as well )
1181 pImpEditEngine->FormatAndLayout( pImpEditEngine->GetActiveView() );
1182
1183 break;
1184 }
1185 }
1186
1187 sal_uInt8 nDel = 0;
1189 switch( nCode )
1190 {
1191 case css::awt::Key::DELETE_WORD_BACKWARD:
1192 nMode = DeleteMode::RestOfWord;
1193 nDel = DEL_LEFT;
1194 break;
1195 case css::awt::Key::DELETE_WORD_FORWARD:
1196 nMode = DeleteMode::RestOfWord;
1197 nDel = DEL_RIGHT;
1198 break;
1199 case css::awt::Key::DELETE_TO_BEGIN_OF_PARAGRAPH:
1201 nDel = DEL_LEFT;
1202 break;
1203 case css::awt::Key::DELETE_TO_END_OF_PARAGRAPH:
1205 nDel = DEL_RIGHT;
1206 break;
1207 default:
1208 nDel = ( nCode == KEY_DELETE ) ? DEL_RIGHT : DEL_LEFT;
1210 if ( ( nMode == DeleteMode::RestOfWord ) && rKeyEvent.GetKeyCode().IsShift() )
1212 break;
1213 }
1214
1215 pEditView->pImpEditView->DrawSelectionXOR();
1216 pImpEditEngine->UndoActionStart( EDITUNDO_DELETE );
1217 aCurSel = pImpEditEngine->DeleteLeftOrRight( aCurSel, nDel, nMode );
1218 pImpEditEngine->UndoActionEnd();
1219 bModified = true;
1220 bAllowIdle = false;
1221 }
1222 }
1223 break;
1224 case KEY_TAB:
1225 {
1226 if ( !bReadOnly && !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
1227 {
1228 bool bShift = rKeyEvent.GetKeyCode().IsShift();
1229 if ( !bShift )
1230 {
1231 bool bSel = pEditView->HasSelection();
1232 if ( bSel )
1233 pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
1234 if ( pImpEditEngine->GetStatus().DoAutoCorrect() )
1235 aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin );
1236 aCurSel = pImpEditEngine->InsertTab( aCurSel );
1237 if ( bSel )
1238 pImpEditEngine->UndoActionEnd();
1239 bModified = true;
1240 }
1241 }
1242 else
1243 bDone = false;
1244 }
1245 break;
1246 case KEY_RETURN:
1247 {
1248 if ( !bReadOnly )
1249 {
1250 pEditView->pImpEditView->DrawSelectionXOR();
1251 if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
1252 {
1253 pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
1254 if ( rKeyEvent.GetKeyCode().IsShift() )
1255 {
1256 aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin );
1257 aCurSel = pImpEditEngine->InsertLineBreak( aCurSel );
1258 }
1259 else
1260 {
1261 if (aAutoText.isEmpty())
1262 {
1263 if ( pImpEditEngine->GetStatus().DoAutoCorrect() )
1264 aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin );
1265 aCurSel = pImpEditEngine->InsertParaBreak( aCurSel );
1266 }
1267 else
1268 {
1269 DBG_ASSERT( !aCurSel.HasRange(), "Selection on complete?!" );
1270 EditPaM aStart( pImpEditEngine->WordLeft( aCurSel.Max() ) );
1271 aCurSel = pImpEditEngine->InsertText(
1272 EditSelection( aStart, aCurSel.Max() ), aAutoText );
1273 pImpEditEngine->SetAutoCompleteText( OUString(), true );
1274 }
1275 }
1276 pImpEditEngine->UndoActionEnd();
1277 bModified = true;
1278 }
1279 }
1280 }
1281 break;
1282 case KEY_INSERT:
1283 {
1284 if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
1285 pEditView->SetInsertMode( !pEditView->IsInsertMode() );
1286 }
1287 break;
1288 default:
1289 {
1290 #if (OSL_DEBUG_LEVEL > 1) && defined(DBG_UTIL)
1291 if ( ( nCode == KEY_W ) && rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() )
1292 {
1293 SfxItemSet aAttribs = pEditView->GetAttribs();
1294 const SvxFrameDirectionItem& rCurrentWritingMode = (const SvxFrameDirectionItem&)aAttribs.Get( EE_PARA_WRITINGDIR );
1296 if ( rCurrentWritingMode.GetValue() != SvxFrameDirection::Horizontal_RL_TB )
1298 aAttribs.Put( aNewItem );
1299 pEditView->SetAttribs( aAttribs );
1300 }
1301 #endif
1302 if ( !bReadOnly && IsSimpleCharInput( rKeyEvent ) )
1303 {
1304 sal_Unicode nCharCode = rKeyEvent.GetCharCode();
1305 pEditView->pImpEditView->DrawSelectionXOR();
1306 // Autocorrection?
1307 if ( ( pImpEditEngine->GetStatus().DoAutoCorrect() ) &&
1308 ( SvxAutoCorrect::IsAutoCorrectChar( nCharCode ) ||
1309 pImpEditEngine->IsNbspRunNext() ) )
1310 {
1311 aCurSel = pImpEditEngine->AutoCorrect(
1312 aCurSel, nCharCode, !pEditView->IsInsertMode(), pFrameWin );
1313 }
1314 else
1315 {
1316 aCurSel = pImpEditEngine->InsertTextUserInput( aCurSel, nCharCode, !pEditView->IsInsertMode() );
1317 }
1318 // AutoComplete ???
1319 if ( pImpEditEngine->GetStatus().DoAutoComplete() && ( nCharCode != ' ' ) )
1320 {
1321 // Only at end of word...
1322 sal_Int32 nIndex = aCurSel.Max().GetIndex();
1323 if ( ( nIndex >= aCurSel.Max().GetNode()->Len() ) ||
1324 ( pImpEditEngine->aWordDelimiters.indexOf( aCurSel.Max().GetNode()->GetChar( nIndex ) ) != -1 ) )
1325 {
1326 EditPaM aStart( pImpEditEngine->WordLeft( aCurSel.Max() ) );
1327 OUString aWord = pImpEditEngine->GetSelected( EditSelection( aStart, aCurSel.Max() ) );
1328 if ( aWord.getLength() >= 3 )
1329 {
1330 OUString aComplete;
1331
1332 LanguageType eLang = pImpEditEngine->GetLanguage( EditPaM( aStart.GetNode(), aStart.GetIndex()+1)).nLang;
1333 LanguageTag aLanguageTag( eLang);
1334
1335 if (!pImpEditEngine->xLocaleDataWrapper.isInitialized())
1336 pImpEditEngine->xLocaleDataWrapper.init( SvtSysLocale().GetLocaleData().getComponentContext(), aLanguageTag);
1337 else
1338 pImpEditEngine->xLocaleDataWrapper.changeLocale( aLanguageTag);
1339
1340 if (!pImpEditEngine->xTransliterationWrapper.isInitialized())
1341 pImpEditEngine->xTransliterationWrapper.init( SvtSysLocale().GetLocaleData().getComponentContext(), eLang);
1342 else
1343 pImpEditEngine->xTransliterationWrapper.changeLocale( eLang);
1344
1345 const ::utl::TransliterationWrapper* pTransliteration = pImpEditEngine->xTransliterationWrapper.get();
1346 Sequence< i18n::CalendarItem2 > xItem = pImpEditEngine->xLocaleDataWrapper->getDefaultCalendarDays();
1347 sal_Int32 nCount = xItem.getLength();
1348 const i18n::CalendarItem2* pArr = xItem.getConstArray();
1349 for( sal_Int32 n = 0; n <= nCount; ++n )
1350 {
1351 const OUString& rDay = pArr[n].FullName;
1352 if( pTransliteration->isMatch( aWord, rDay) )
1353 {
1354 aComplete = rDay;
1355 break;
1356 }
1357 }
1358
1359 if ( aComplete.isEmpty() )
1360 {
1361 xItem = pImpEditEngine->xLocaleDataWrapper->getDefaultCalendarMonths();
1362 sal_Int32 nMonthCount = xItem.getLength();
1363 const i18n::CalendarItem2* pMonthArr = xItem.getConstArray();
1364 for( sal_Int32 n = 0; n <= nMonthCount; ++n )
1365 {
1366 const OUString& rMon = pMonthArr[n].FullName;
1367 if( pTransliteration->isMatch( aWord, rMon) )
1368 {
1369 aComplete = rMon;
1370 break;
1371 }
1372 }
1373 }
1374
1375 if( !aComplete.isEmpty() && ( ( aWord.getLength() + 1 ) < aComplete.getLength() ) )
1376 {
1377 pImpEditEngine->SetAutoCompleteText( aComplete, false );
1378 Point aPos = pImpEditEngine->PaMtoEditCursor( aCurSel.Max() ).TopLeft();
1379 aPos = pEditView->pImpEditView->GetWindowPos( aPos );
1380 aPos = pEditView->pImpEditView->GetWindow()->LogicToPixel( aPos );
1381 aPos = pEditView->GetWindow()->OutputToScreenPixel( aPos );
1382 aPos.AdjustY( -3 );
1383 Help::ShowQuickHelp( pEditView->GetWindow(), tools::Rectangle( aPos, Size( 1, 1 ) ), aComplete, QuickHelpFlags::Bottom|QuickHelpFlags::Left );
1384 }
1385 }
1386 }
1387 }
1388 bModified = true;
1389 }
1390 else
1391 bDone = false;
1392 }
1393 }
1394 }
1395
1396 pEditView->pImpEditView->SetEditSelection( aCurSel );
1398 {
1399 pEditView->pImpEditView->DrawSelectionXOR();
1400 }
1401 pImpEditEngine->UpdateSelections();
1402
1403 if ( ( !IsEffectivelyVertical() && ( nCode != KEY_UP ) && ( nCode != KEY_DOWN ) ) ||
1404 ( IsEffectivelyVertical() && ( nCode != KEY_LEFT ) && ( nCode != KEY_RIGHT ) ))
1405 {
1406 pEditView->pImpEditView->nTravelXPos = TRAVEL_X_DONTKNOW;
1407 }
1408
1409 if ( /* ( nCode != KEY_HOME ) && ( nCode != KEY_END ) && */
1410 ( !IsEffectivelyVertical() && ( nCode != KEY_LEFT ) && ( nCode != KEY_RIGHT ) ) ||
1411 ( IsEffectivelyVertical() && ( nCode != KEY_UP ) && ( nCode != KEY_DOWN ) ))
1412 {
1413 pEditView->pImpEditView->SetCursorBidiLevel( CURSOR_BIDILEVEL_DONTKNOW );
1414 }
1415
1416 if ( bSetCursorFlags )
1417 pEditView->pImpEditView->nExtraCursorFlags = nNewCursorFlags;
1418
1419 if ( bModified )
1420 {
1421 DBG_ASSERT( !bReadOnly, "ReadOnly but modified???" );
1422 // Idle-Formatter only when AnyInput.
1423 if ( bAllowIdle && pImpEditEngine->GetStatus().UseIdleFormatter()
1424 && Application::AnyInput( VclInputFlags::KEYBOARD) )
1425 pImpEditEngine->IdleFormatAndLayout( pEditView );
1426 else
1427 pImpEditEngine->FormatAndLayout( pEditView );
1428 }
1429 else if ( bMoved )
1430 {
1431 bool bGotoCursor = pEditView->pImpEditView->DoAutoScroll();
1432 pEditView->pImpEditView->ShowCursor( bGotoCursor, true );
1433 pImpEditEngine->CallStatusHdl();
1434 }
1435
1436 return bDone;
1437}
1438
1440{
1441
1442 if ( !pImpEditEngine->IsFormatted() )
1443 pImpEditEngine->FormatDoc();
1444
1445 sal_uInt32 nHeight = !IsEffectivelyVertical() ? pImpEditEngine->GetTextHeight() : pImpEditEngine->CalcTextWidth( true );
1446 return nHeight;
1447}
1448
1450{
1451
1452 if ( !pImpEditEngine->IsFormatted() )
1453 pImpEditEngine->FormatDoc();
1454
1455 if ( IsEffectivelyVertical() )
1456 return pImpEditEngine->CalcTextWidth( true );
1457
1458 return pImpEditEngine->GetTextHeightNTP();
1459}
1460
1462{
1463
1464 if ( !pImpEditEngine->IsFormatted() )
1465 pImpEditEngine->FormatDoc();
1466
1467 sal_uInt32 nWidth = !IsEffectivelyVertical() ? pImpEditEngine->CalcTextWidth( true ) : pImpEditEngine->GetTextHeight();
1468 return nWidth;
1469}
1470
1471bool EditEngine::SetUpdateLayout(bool bUpdate, bool bRestoring)
1472{
1473 bool bPrevUpdateLayout = pImpEditEngine->SetUpdateLayout( bUpdate );
1474 if (pImpEditEngine->pActiveView)
1475 {
1476 // Not an activation if we are restoring the previous update mode.
1477 pImpEditEngine->pActiveView->ShowCursor(false, false, /*bActivate=*/!bRestoring);
1478 }
1479 return bPrevUpdateLayout;
1480}
1481
1483{
1484 return pImpEditEngine->IsUpdateLayout();
1485}
1486
1488{
1489 pImpEditEngine->Clear();
1490}
1491
1492void EditEngine::SetText( const OUString& rText )
1493{
1494 pImpEditEngine->SetText( rText );
1495 if ( !rText.isEmpty() && pImpEditEngine->IsUpdateLayout() )
1496 pImpEditEngine->FormatAndLayout();
1497}
1498
1499ErrCode EditEngine::Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ )
1500{
1501 bool bUndoEnabled = pImpEditEngine->IsUndoEnabled();
1502 pImpEditEngine->EnableUndo( false );
1503 pImpEditEngine->SetText( OUString() );
1504 EditPaM aPaM( pImpEditEngine->GetEditDoc().GetStartPaM() );
1505 pImpEditEngine->Read( rInput, rBaseURL, eFormat, EditSelection( aPaM, aPaM ), pHTTPHeaderAttrs );
1506 pImpEditEngine->EnableUndo( bUndoEnabled );
1507 return rInput.GetError();
1508}
1509
1510void EditEngine::Write( SvStream& rOutput, EETextFormat eFormat )
1511{
1512 EditPaM aStartPaM( pImpEditEngine->GetEditDoc().GetStartPaM() );
1513 EditPaM aEndPaM( pImpEditEngine->GetEditDoc().GetEndPaM() );
1514 pImpEditEngine->Write( rOutput, eFormat, EditSelection( aStartPaM, aEndPaM ) );
1515}
1516
1517std::unique_ptr<EditTextObject> EditEngine::CreateTextObject()
1518{
1519 return pImpEditEngine->CreateTextObject();
1520}
1521
1522std::unique_ptr<EditTextObject> EditEngine::CreateTextObject( const ESelection& rESelection )
1523{
1524 EditSelection aSel( pImpEditEngine->CreateSel( rESelection ) );
1525 return pImpEditEngine->CreateTextObject( aSel );
1526}
1527
1528std::unique_ptr<EditTextObject> EditEngine::GetEmptyTextObject() const
1529{
1530 return pImpEditEngine->GetEmptyTextObject();
1531}
1532
1533
1534void EditEngine::SetText( const EditTextObject& rTextObject )
1535{
1536 pImpEditEngine->SetText( rTextObject );
1537 pImpEditEngine->FormatAndLayout();
1538}
1539
1540void EditEngine::ShowParagraph( sal_Int32 nParagraph, bool bShow )
1541{
1542 pImpEditEngine->ShowParagraph( nParagraph, bShow );
1543}
1544
1546{
1547 pImpEditEngine->SetNotifyHdl( rLink );
1548}
1549
1551{
1552 return pImpEditEngine->GetNotifyHdl();
1553}
1554
1556{
1557 pImpEditEngine->SetStatusEventHdl( rLink );
1558}
1559
1561{
1562 return pImpEditEngine->GetStatusEventHdl();
1563}
1564
1566{
1567 pImpEditEngine->aHtmlImportHdl = rLink;
1568}
1569
1571{
1572 return pImpEditEngine->aHtmlImportHdl;
1573}
1574
1576{
1577 pImpEditEngine->aRtfImportHdl = rLink;
1578}
1579
1581{
1582 return pImpEditEngine->aRtfImportHdl;
1583}
1584
1586{
1587 pImpEditEngine->aBeginMovingParagraphsHdl = rLink;
1588}
1589
1591{
1592 pImpEditEngine->aEndMovingParagraphsHdl = rLink;
1593}
1594
1596{
1597
1598 pImpEditEngine->aBeginPasteOrDropHdl = rLink;
1599}
1600
1602{
1603 pImpEditEngine->aEndPasteOrDropHdl = rLink;
1604}
1605
1606std::unique_ptr<EditTextObject> EditEngine::CreateTextObject( sal_Int32 nPara, sal_Int32 nParas )
1607{
1608 DBG_ASSERT( 0 <= nPara && nPara < pImpEditEngine->GetEditDoc().Count(), "CreateTextObject: Startpara out of Range" );
1609 DBG_ASSERT( nParas <= pImpEditEngine->GetEditDoc().Count() - nPara, "CreateTextObject: Endpara out of Range" );
1610
1611 ContentNode* pStartNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
1612 ContentNode* pEndNode = pImpEditEngine->GetEditDoc().GetObject( nPara+nParas-1 );
1613 DBG_ASSERT( pStartNode, "Start-Paragraph does not exist: CreateTextObject" );
1614 DBG_ASSERT( pEndNode, "End-Paragraph does not exist: CreateTextObject" );
1615
1616 if ( pStartNode && pEndNode )
1617 {
1618 EditSelection aTmpSel;
1619 aTmpSel.Min() = EditPaM( pStartNode, 0 );
1620 aTmpSel.Max() = EditPaM( pEndNode, pEndNode->Len() );
1621 return pImpEditEngine->CreateTextObject( aTmpSel );
1622 }
1623 return nullptr;
1624}
1625
1626void EditEngine::RemoveParagraph( sal_Int32 nPara )
1627{
1628 DBG_ASSERT( pImpEditEngine->GetEditDoc().Count() > 1, "The first paragraph should not be deleted!" );
1629 if( pImpEditEngine->GetEditDoc().Count() <= 1 )
1630 return;
1631
1632 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
1633 const ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SafeGetObject( nPara );
1634 DBG_ASSERT( pPortion && pNode, "Paragraph not found: RemoveParagraph" );
1635 if ( pNode && pPortion )
1636 {
1637 // No Undo encapsulation needed.
1638 pImpEditEngine->ImpRemoveParagraph( nPara );
1639 pImpEditEngine->InvalidateFromParagraph( nPara );
1640 pImpEditEngine->UpdateSelections();
1641 if (pImpEditEngine->IsUpdateLayout())
1642 pImpEditEngine->FormatAndLayout();
1643 }
1644}
1645
1646sal_Int32 EditEngine::GetTextLen( sal_Int32 nPara ) const
1647{
1648 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
1649 DBG_ASSERT( pNode, "Paragraph not found: GetTextLen" );
1650 if ( pNode )
1651 return pNode->Len();
1652 return 0;
1653}
1654
1655OUString EditEngine::GetText( sal_Int32 nPara ) const
1656{
1657 OUString aStr;
1658 if ( 0 <= nPara && nPara < pImpEditEngine->GetEditDoc().Count() )
1659 aStr = pImpEditEngine->GetEditDoc().GetParaAsString( nPara );
1660 return aStr;
1661}
1662
1664{
1665 pImpEditEngine->SetModifyHdl( rLink );
1666}
1667
1669{
1670 pImpEditEngine->SetModifyFlag( false );
1671}
1672
1674{
1675 pImpEditEngine->SetModifyFlag( true );
1676}
1677
1679{
1680 return pImpEditEngine->IsModified();
1681}
1682
1684{
1685 return ( pImpEditEngine->IsInSelectionMode() ||
1686 pImpEditEngine->GetSelEngine().IsInSelection() );
1687}
1688
1689void EditEngine::InsertParagraph( sal_Int32 nPara, const EditTextObject& rTxtObj, bool bAppend )
1690{
1691 if ( nPara > GetParagraphCount() )
1692 {
1693 SAL_WARN_IF( nPara != EE_PARA_APPEND, "editeng", "Paragraph number too large, but not EE_PARA_APPEND!" );
1694 nPara = GetParagraphCount();
1695 }
1696
1697 pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
1698
1699 // No Undo compounding needed.
1700 EditPaM aPaM( pImpEditEngine->InsertParagraph( nPara ) );
1701 // When InsertParagraph from the outside, no hard attributes
1702 // should be taken over!
1703 pImpEditEngine->RemoveCharAttribs( nPara );
1704 pImpEditEngine->InsertText( rTxtObj, EditSelection( aPaM, aPaM ) );
1705
1706 if ( bAppend && nPara )
1707 pImpEditEngine->ConnectContents( nPara-1, /*bBackwards=*/false );
1708
1709 pImpEditEngine->UndoActionEnd();
1710
1711 if (pImpEditEngine->IsUpdateLayout())
1712 pImpEditEngine->FormatAndLayout();
1713}
1714
1715void EditEngine::InsertParagraph(sal_Int32 nPara, const OUString& rTxt)
1716{
1717 if ( nPara > GetParagraphCount() )
1718 {
1719 SAL_WARN_IF( nPara != EE_PARA_APPEND, "editeng", "Paragraph number too large, but not EE_PARA_APPEND!" );
1720 nPara = GetParagraphCount();
1721 }
1722
1723 pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
1724 EditPaM aPaM( pImpEditEngine->InsertParagraph( nPara ) );
1725 // When InsertParagraph from the outside, no hard attributes
1726 // should be taken over!
1727 pImpEditEngine->RemoveCharAttribs( nPara );
1728 pImpEditEngine->UndoActionEnd();
1729 pImpEditEngine->ImpInsertText( EditSelection( aPaM, aPaM ), rTxt );
1730 if (pImpEditEngine->IsUpdateLayout())
1731 pImpEditEngine->FormatAndLayout();
1732}
1733
1734void EditEngine::SetText(sal_Int32 nPara, const OUString& rTxt)
1735{
1736 std::optional<EditSelection> pSel = pImpEditEngine->SelectParagraph( nPara );
1737 if ( pSel )
1738 {
1739 pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
1740 pImpEditEngine->ImpInsertText( *pSel, rTxt );
1741 pImpEditEngine->UndoActionEnd();
1742 if (pImpEditEngine->IsUpdateLayout())
1743 pImpEditEngine->FormatAndLayout();
1744 }
1745}
1746
1747void EditEngine::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet )
1748{
1749 pImpEditEngine->SetParaAttribs( nPara, rSet );
1750 if ( pImpEditEngine->IsUpdateLayout() )
1751 pImpEditEngine->FormatAndLayout();
1752}
1753
1754const SfxItemSet& EditEngine::GetParaAttribs( sal_Int32 nPara ) const
1755{
1756 return pImpEditEngine->GetParaAttribs( nPara );
1757}
1758
1759bool EditEngine::HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const
1760{
1761 return pImpEditEngine->HasParaAttrib( nPara, nWhich );
1762}
1763
1764const SfxPoolItem& EditEngine::GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const
1765{
1766 return pImpEditEngine->GetParaAttrib( nPara, nWhich );
1767}
1768
1769void EditEngine::SetCharAttribs(sal_Int32 nPara, const SfxItemSet& rSet)
1770{
1771 EditSelection aSel(pImpEditEngine->ConvertSelection(nPara, 0, nPara, GetTextLen(nPara)));
1772 // This is called by sd::View::OnBeginPasteOrDrop(), updating the cursor position on undo is not
1773 // wanted.
1774 pImpEditEngine->SetAttribs(aSel, rSet, /*nSpecial=*/SetAttribsMode::NONE, /*bSetSelection=*/false);
1775 if (pImpEditEngine->IsUpdateLayout())
1776 pImpEditEngine->FormatAndLayout();
1777}
1778
1779void EditEngine::GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const
1780{
1781 pImpEditEngine->GetCharAttribs( nPara, rLst );
1782}
1783
1785{
1787 ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
1788 return pImpEditEngine->GetAttribs( aSel, nOnlyHardAttrib );
1789}
1790
1791SfxItemSet EditEngine::GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags ) const
1792{
1793 return pImpEditEngine->GetAttribs( nPara, nStart, nEnd, nFlags );
1794}
1795
1796void EditEngine::RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich )
1797{
1798 const EERemoveParaAttribsMode eMode = bRemoveParaAttribs?
1801
1802 pImpEditEngine->UndoActionStart( EDITUNDO_RESETATTRIBS );
1803 EditSelection aSel( pImpEditEngine->ConvertSelection( rSelection.nStartPara, rSelection.nStartPos, rSelection.nEndPara, rSelection.nEndPos ) );
1804 pImpEditEngine->RemoveCharAttribs( aSel, eMode, nWhich );
1805 pImpEditEngine->UndoActionEnd();
1806 if (pImpEditEngine->IsUpdateLayout())
1807 pImpEditEngine->FormatAndLayout();
1808}
1809
1811{
1812 return GetStandardSvxFont( nPara );
1813}
1814
1816{
1817 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
1818 return pNode->GetCharAttribs().GetDefFont();
1819}
1820
1822{
1824 tools::Rectangle aBigRect( Point( 0, 0 ), Size( 0x7FFFFFFF, 0x7FFFFFFF ) );
1825 if ( IsEffectivelyVertical() )
1826 {
1827 if( IsTopToBottom() )
1828 {
1829 aBigRect.SetRight( 0 );
1830 aBigRect.SetLeft( -0x7FFFFFFF );
1831 }
1832 else
1833 {
1834 aBigRect.SetTop( -0x7FFFFFFF );
1835 aBigRect.SetBottom( 0 );
1836 }
1837 }
1838 pImpEditEngine->Paint(*aTmpDev, aBigRect, Point(), true);
1839}
1840
1841void EditEngine::GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList )
1842{
1843 if ( !pImpEditEngine->IsFormatted() )
1844 pImpEditEngine->FormatFullDoc();
1845
1846 const ParaPortion* pParaPortion = pImpEditEngine->GetParaPortions().SafeGetObject( nPara );
1847 if ( pParaPortion )
1848 {
1849 sal_Int32 nEnd = 0;
1850 sal_Int32 nTextPortions = pParaPortion->GetTextPortions().Count();
1851 for ( sal_Int32 n = 0; n < nTextPortions; n++ )
1852 {
1853 nEnd = nEnd + pParaPortion->GetTextPortions()[n].GetLen();
1854 rList.push_back( nEnd );
1855 }
1856 }
1857}
1858
1860{
1861 pImpEditEngine->SetFlatMode( bFlat );
1862}
1863
1865{
1866 return !( pImpEditEngine->aStatus.UseCharAttribs() );
1867}
1868
1870{
1871 if (bValue == pImpEditEngine->aStatus.IsSingleLine())
1872 return;
1873
1874 if (bValue)
1875 pImpEditEngine->aStatus.TurnOnFlags(EEControlBits::SINGLELINE);
1876 else
1877 pImpEditEngine->aStatus.TurnOffFlags(EEControlBits::SINGLELINE);
1878}
1879
1881{
1882
1883 if ( nWord == pImpEditEngine->aStatus.GetControlWord() )
1884 return;
1885
1886 EEControlBits nPrev = pImpEditEngine->aStatus.GetControlWord();
1887 pImpEditEngine->aStatus.GetControlWord() = nWord;
1888
1889 EEControlBits nChanges = nPrev ^ nWord;
1890 if ( pImpEditEngine->IsFormatted() )
1891 {
1892 // possibly reformat:
1893 if ( ( nChanges & EEControlBits::USECHARATTRIBS ) ||
1894 ( nChanges & EEControlBits::ONECHARPERLINE ) ||
1895 ( nChanges & EEControlBits::STRETCHING ) ||
1896 ( nChanges & EEControlBits::OUTLINER ) ||
1897 ( nChanges & EEControlBits::NOCOLORS ) ||
1898 ( nChanges & EEControlBits::OUTLINER2 ) )
1899 {
1900 if ( nChanges & EEControlBits::USECHARATTRIBS )
1901 {
1902 pImpEditEngine->GetEditDoc().CreateDefFont( true );
1903 }
1904
1905 pImpEditEngine->FormatFullDoc();
1906 pImpEditEngine->UpdateViews( pImpEditEngine->GetActiveView() );
1907 }
1908 }
1909
1910 bool bSpellingChanged = bool(nChanges & EEControlBits::ONLINESPELLING);
1911
1912 if ( !bSpellingChanged )
1913 return;
1914
1915 pImpEditEngine->StopOnlineSpellTimer();
1917 {
1918 // Create WrongList, start timer...
1919 sal_Int32 nNodes = pImpEditEngine->GetEditDoc().Count();
1920 for ( sal_Int32 n = 0; n < nNodes; n++ )
1921 {
1922 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n );
1923 pNode->CreateWrongList();
1924 }
1925 if (pImpEditEngine->IsFormatted())
1926 pImpEditEngine->StartOnlineSpellTimer();
1927 }
1928 else
1929 {
1930 tools::Long nY = 0;
1931 sal_Int32 nNodes = pImpEditEngine->GetEditDoc().Count();
1932 for ( sal_Int32 n = 0; n < nNodes; n++ )
1933 {
1934 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n );
1935 const ParaPortion* pPortion = pImpEditEngine->GetParaPortions()[n];
1936 bool bWrongs = false;
1937 if (pNode->GetWrongList() != nullptr)
1938 bWrongs = !pNode->GetWrongList()->empty();
1939 pNode->DestroyWrongList();
1940 if ( bWrongs )
1941 {
1942 pImpEditEngine->aInvalidRect.SetLeft( 0 );
1943 pImpEditEngine->aInvalidRect.SetRight( pImpEditEngine->GetPaperSize().Width() );
1944 pImpEditEngine->aInvalidRect.SetTop( nY+1 );
1945 pImpEditEngine->aInvalidRect.SetBottom( nY+pPortion->GetHeight()-1 );
1946 pImpEditEngine->UpdateViews( pImpEditEngine->pActiveView );
1947 }
1948 nY += pPortion->GetHeight();
1949 }
1950 }
1951}
1952
1954{
1955 return pImpEditEngine->aStatus.GetControlWord();
1956}
1957
1959{
1960
1961 tools::Long nX = 0;
1962 const ParaPortion* pPPortion = pImpEditEngine->GetParaPortions().SafeGetObject( nParagraph );
1963 if ( pPPortion )
1964 {
1965 DBG_ASSERT( pImpEditEngine->IsFormatted() || !pImpEditEngine->IsFormatting(), "GetFirstLineStartX: Doc not formatted - unable to format!" );
1966 if ( !pImpEditEngine->IsFormatted() )
1967 pImpEditEngine->FormatDoc();
1968 const EditLine& rFirstLine = pPPortion->GetLines()[0];
1969 nX = rFirstLine.GetStartPosX();
1970 }
1971 return nX;
1972}
1973
1974Point EditEngine::GetDocPos( const Point& rPaperPos ) const
1975{
1976 Point aDocPos( rPaperPos );
1977 if ( IsEffectivelyVertical() )
1978 {
1979 if ( IsTopToBottom() )
1980 {
1981 aDocPos.setX( rPaperPos.Y() );
1982 aDocPos.setY( GetPaperSize().Width() - rPaperPos.X() );
1983 }
1984 else
1985 {
1986 aDocPos.setX( rPaperPos.Y() );
1987 aDocPos.setY( rPaperPos.X() );
1988 }
1989 }
1990 return aDocPos;
1991}
1992
1994{
1995 const ParaPortion* pPPortion = pImpEditEngine->GetParaPortions().SafeGetObject( nParagraph );
1996 DBG_ASSERT( pPPortion, "Paragraph not found: GetWindowPosTopLeft" );
1997 Point aPoint;
1998 if ( pPPortion )
1999 {
2000
2001 // If someone calls GetLineHeight() with an empty Engine.
2002 DBG_ASSERT( pImpEditEngine->IsFormatted() || !pImpEditEngine->IsFormatting(), "GetDocPosTopLeft: Doc not formatted - unable to format!" );
2003 if ( !pImpEditEngine->IsFormatted() )
2004 pImpEditEngine->FormatAndLayout();
2005 if ( pPPortion->GetLines().Count() )
2006 {
2007 // Correct it if large Bullet.
2008 const EditLine& rFirstLine = pPPortion->GetLines()[0];
2009 aPoint.setX( rFirstLine.GetStartPosX() );
2010 }
2011 else
2012 {
2013 const SvxLRSpaceItem& rLRItem = pImpEditEngine->GetLRSpaceItem( pPPortion->GetNode() );
2014 sal_Int32 nSpaceBefore = 0;
2015 pImpEditEngine->GetSpaceBeforeAndMinLabelWidth( pPPortion->GetNode(), &nSpaceBefore );
2016 short nX = static_cast<short>(rLRItem.GetTextLeft()
2017 + rLRItem.GetTextFirstLineOffset()
2018 + nSpaceBefore);
2019
2020 aPoint.setX(pImpEditEngine->scaleXSpacingValue(nX));
2021 }
2022 aPoint.setY( pImpEditEngine->GetParaPortions().GetYOffset( pPPortion ) );
2023 }
2024 return aPoint;
2025}
2026
2028{
2029 // derived objects may override this function to give access to
2030 // bullet information (see Outliner)
2031 return nullptr;
2032}
2033
2034bool EditEngine::IsRightToLeft( sal_Int32 nPara ) const
2035{
2036 return pImpEditEngine->IsRightToLeft( nPara );
2037}
2038
2039bool EditEngine::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder )
2040{
2041
2042 if ( !pImpEditEngine->IsFormatted() )
2043 pImpEditEngine->FormatDoc();
2044
2045 // take unrotated positions for calculation here
2046 Point aDocPos = GetDocPos( rPaperPos );
2047
2048 if ( ( aDocPos.Y() > 0 ) && ( o3tl::make_unsigned(aDocPos.Y()) < pImpEditEngine->GetTextHeight() ) )
2049 return pImpEditEngine->IsTextPos(aDocPos, nBorder);
2050 return false;
2051}
2052
2054{
2055 pImpEditEngine->SetEditTextObjectPool( pPool );
2056}
2057
2059{
2060 return pImpEditEngine->GetEditTextObjectPool();
2061}
2062
2063void EditEngine::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
2064{
2065
2067 ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
2068
2069 pImpEditEngine->SetAttribs( aSel, rSet );
2070}
2071
2073{
2074 DBG_ASSERT( rSel.nStartPara < pImpEditEngine->GetEditDoc().Count(), "MarkInvalid: Start out of Range!" );
2075 DBG_ASSERT( rSel.nEndPara < pImpEditEngine->GetEditDoc().Count(), "MarkInvalid: End out of Range!" );
2076 for ( sal_Int32 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
2077 {
2078 ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SafeGetObject( nPara );
2079 if ( pPortion )
2080 pPortion->MarkSelectionInvalid( 0 );
2081 }
2082}
2083
2084void EditEngine::QuickInsertText(const OUString& rText, const ESelection& rSel)
2085{
2086
2088 ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
2089
2090 pImpEditEngine->ImpInsertText( aSel, rText );
2091}
2092
2094{
2095
2097 ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
2098
2099 pImpEditEngine->ImpDeleteSelection( aSel );
2100}
2101
2103{
2104 ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SafeGetObject( nPara );
2105 if ( pPortion )
2106 pPortion->SetMustRepaint( true );
2107}
2108
2110{
2111
2113 ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
2114
2115 pImpEditEngine->InsertLineBreak( aSel );
2116}
2117
2119{
2120
2122 ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
2123
2124 pImpEditEngine->ImpInsertFeature( aSel, rFld );
2125}
2126
2128{
2129 if ( bFull )
2130 pImpEditEngine->FormatFullDoc();
2131 else
2132 pImpEditEngine->FormatDoc();
2133
2134 // Don't pass active view, maybe selection is not updated yet...
2135 pImpEditEngine->UpdateViews();
2136}
2137
2139{
2140 pImpEditEngine->SetStyleSheet(aSel, pStyle);
2141}
2142
2143void EditEngine::SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle )
2144{
2145 pImpEditEngine->SetStyleSheet( nPara, pStyle );
2146}
2147
2148const SfxStyleSheet* EditEngine::GetStyleSheet( sal_Int32 nPara ) const
2149{
2150 return pImpEditEngine->GetStyleSheet( nPara );
2151}
2152
2154{
2155 return pImpEditEngine->GetStyleSheet( nPara );
2156}
2157
2159{
2160 pImpEditEngine->SetStyleSheetPool( pSPool );
2161}
2162
2164{
2165 return pImpEditEngine->GetStyleSheetPool();
2166}
2167
2168void EditEngine::SetWordDelimiters( const OUString& rDelimiters )
2169{
2170 pImpEditEngine->aWordDelimiters = rDelimiters;
2171 if (pImpEditEngine->aWordDelimiters.indexOf(CH_FEATURE) == -1)
2172 pImpEditEngine->aWordDelimiters += OUStringChar(CH_FEATURE);
2173}
2174
2175const OUString& EditEngine::GetWordDelimiters() const
2176{
2177 return pImpEditEngine->aWordDelimiters;
2178}
2179
2181{
2182 pImpEditEngine->EraseVirtualDevice();
2183}
2184
2185void EditEngine::SetSpeller( Reference< XSpellChecker1 > const &xSpeller )
2186{
2187 pImpEditEngine->SetSpeller( xSpeller );
2188}
2189
2190Reference< XSpellChecker1 > const & EditEngine::GetSpeller()
2191{
2192 return pImpEditEngine->GetSpeller();
2193}
2194
2195void EditEngine::SetHyphenator( Reference< XHyphenator > const & xHyph )
2196{
2197 pImpEditEngine->SetHyphenator( xHyph );
2198}
2199
2200void EditEngine::GetAllMisspellRanges( std::vector<editeng::MisspellRanges>& rRanges ) const
2201{
2202 pImpEditEngine->GetAllMisspellRanges(rRanges);
2203}
2204
2205void EditEngine::SetAllMisspellRanges( const std::vector<editeng::MisspellRanges>& rRanges )
2206{
2207 pImpEditEngine->SetAllMisspellRanges(rRanges);
2208}
2209
2210void EditEngine::SetForbiddenCharsTable(const std::shared_ptr<SvxForbiddenCharactersTable>& xForbiddenChars)
2211{
2212 ImpEditEngine::SetForbiddenCharsTable( xForbiddenChars );
2213}
2214
2216{
2217 pImpEditEngine->SetDefaultLanguage( eLang );
2218}
2219
2221{
2222 return pImpEditEngine->GetDefaultLanguage();
2223}
2224
2226{
2227 return false;
2228}
2229
2231{
2232 if ( !pImpEditEngine->GetSpeller().is() )
2234
2235 return pImpEditEngine->HasSpellErrors();
2236}
2237
2239{
2240 pImpEditEngine->ClearSpellErrors();
2241}
2242
2244{
2245 return pImpEditEngine->SpellSentence( rView, rToFill );
2246}
2247
2249{
2250 pImpEditEngine->PutSpellingToSentenceStart( rEditView );
2251}
2252
2253void EditEngine::ApplyChangedSentence(EditView const & rEditView, const svx::SpellPortions& rNewPortions, bool bRecheck )
2254{
2255 pImpEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck );
2256}
2257
2259{
2260 return pImpEditEngine->HasConvertibleTextPortion( nLang );
2261}
2262
2264{
2265 return false;
2266}
2267
2268bool EditEngine::HasText( const SvxSearchItem& rSearchItem )
2269{
2270 return pImpEditEngine->HasText( rSearchItem );
2271}
2272
2273void EditEngine::setGlobalScale(double fFontScaleX, double fFontScaleY, double fSpacingScaleX, double fSpacingScaleY)
2274{
2275 pImpEditEngine->setScale(fFontScaleX, fFontScaleY, fSpacingScaleX, fSpacingScaleY);
2276}
2277
2278void EditEngine::getGlobalSpacingScale(double& rX, double& rY) const
2279{
2280 pImpEditEngine->getSpacingScale(rX, rY);
2281}
2282
2284{
2285 double x = 0.0;
2286 double y = 0.0;
2287 pImpEditEngine->getSpacingScale(x, y);
2288 return {x, y};
2289}
2290
2291void EditEngine::getGlobalFontScale(double& rX, double& rY) const
2292{
2293 pImpEditEngine->getFontScale(rX, rY);
2294}
2295
2297{
2298 double x = 0.0;
2299 double y = 0.0;
2300 pImpEditEngine->getFontScale(x, y);
2301 return {x, y};
2302}
2303
2305{
2306 pImpEditEngine->setRoundToNearestPt(bRound);
2307}
2308
2310{
2311 sal_Int32 nTextPortions = 0;
2312 sal_Int32 nParas = pImpEditEngine->GetEditDoc().Count();
2313 for ( sal_Int32 nPara = 0; nPara < nParas; nPara++ )
2314 {
2315 ParaPortion* pParaPortion = pImpEditEngine->GetParaPortions()[nPara];
2316 nTextPortions = nTextPortions + pParaPortion->GetTextPortions().Count();
2317 }
2318 return nTextPortions >= pImpEditEngine->GetBigTextObjectStart();
2319}
2320
2321sal_uInt16 EditEngine::GetFieldCount( sal_Int32 nPara ) const
2322{
2323 sal_uInt16 nFields = 0;
2324 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
2325 if ( pNode )
2326 {
2327 for (auto const& attrib : pNode->GetCharAttribs().GetAttribs())
2328 {
2329 if (attrib->Which() == EE_FEATURE_FIELD)
2330 ++nFields;
2331 }
2332 }
2333
2334 return nFields;
2335}
2336
2337EFieldInfo EditEngine::GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const
2338{
2339 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
2340 if ( pNode )
2341 {
2342 sal_uInt16 nCurrentField = 0;
2343 for (auto const& attrib : pNode->GetCharAttribs().GetAttribs())
2344 {
2345 const EditCharAttrib& rAttr = *attrib;
2346 if (rAttr.Which() == EE_FEATURE_FIELD)
2347 {
2348 if ( nCurrentField == nField )
2349 {
2350 const SvxFieldItem* p = static_cast<const SvxFieldItem*>(rAttr.GetItem());
2351 EFieldInfo aInfo(*p, nPara, rAttr.GetStart());
2352 aInfo.aCurrentText = static_cast<const EditCharAttribField&>(rAttr).GetFieldValue();
2353 return aInfo;
2354 }
2355
2356 ++nCurrentField;
2357 }
2358 }
2359 }
2360 return EFieldInfo();
2361}
2362
2363
2365{
2366 bool bChanges = pImpEditEngine->UpdateFields();
2367 if ( bChanges && pImpEditEngine->IsUpdateLayout())
2368 pImpEditEngine->FormatAndLayout();
2369 return bChanges;
2370}
2371
2373{
2374 return pImpEditEngine->UpdateFields();
2375}
2376
2377void EditEngine::RemoveFields( const std::function<bool ( const SvxFieldData* )>& isFieldData )
2378{
2379 pImpEditEngine->UpdateFields();
2380
2381 sal_Int32 nParas = pImpEditEngine->GetEditDoc().Count();
2382 for ( sal_Int32 nPara = 0; nPara < nParas; nPara++ )
2383 {
2384 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
2385 const CharAttribList::AttribsType& rAttrs = pNode->GetCharAttribs().GetAttribs();
2386 for (size_t nAttr = rAttrs.size(); nAttr; )
2387 {
2388 const EditCharAttrib& rAttr = *rAttrs[--nAttr];
2389 if (rAttr.Which() == EE_FEATURE_FIELD)
2390 {
2391 const SvxFieldData* pFldData = static_cast<const SvxFieldItem*>(rAttr.GetItem())->GetField();
2392 if ( pFldData && ( isFieldData( pFldData ) ) )
2393 {
2394 DBG_ASSERT( dynamic_cast<const SvxFieldItem*>(rAttr.GetItem()), "no field item..." );
2395 EditSelection aSel( EditPaM(pNode, rAttr.GetStart()), EditPaM(pNode, rAttr.GetEnd()) );
2396 OUString aFieldText = static_cast<const EditCharAttribField&>(rAttr).GetFieldValue();
2397 pImpEditEngine->ImpInsertText( aSel, aFieldText );
2398 }
2399 }
2400 }
2401 }
2402}
2403
2405{
2406 sal_Int32 nNodes = pImpEditEngine->GetEditDoc().Count();
2407 for ( sal_Int32 n = 0; n < nNodes; n++ )
2408 {
2409 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n );
2410 if ( pNode->GetWrongList() && !pNode->GetWrongList()->empty() )
2411 return true;
2412 }
2413 return false;
2414}
2415
2417{
2418 if ( pImpEditEngine->GetStatus().DoOnlineSpelling() )
2419 {
2420 if( !pImpEditEngine->IsFormatted() )
2421 pImpEditEngine->FormatAndLayout();
2422
2423 pImpEditEngine->StopOnlineSpellTimer();
2424 pImpEditEngine->DoOnlineSpelling( nullptr, true, false );
2425 }
2426}
2427
2429{
2430 return pImpEditEngine->GetParaPortions().FindParagraph( nDocPosY );
2431}
2432
2434{
2435 EPosition aPos;
2436 // From the point of the API, this is const...
2437 EditPaM aPaM = const_cast<EditEngine*>(this)->pImpEditEngine->GetPaM( rDocPos, false );
2438 if ( aPaM.GetNode() )
2439 {
2440 aPos.nPara = pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
2441 aPos.nIndex = aPaM.GetIndex();
2442 }
2443 return aPos;
2444}
2445
2447{
2448 tools::Rectangle aBounds;
2449 ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( rPos.nPara );
2450
2451 // Check against index, not paragraph
2452 if ( pNode && ( rPos.nIndex < pNode->Len() ) )
2453 {
2454 aBounds = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex ), GetCursorFlags::TextOnly );
2456 if ( aR2.Right() > aBounds.Right() )
2457 aBounds.SetRight( aR2.Right() );
2458 }
2459 return aBounds;
2460}
2461
2463{
2464
2465 // This only works if not already in the format ...
2466 if ( !pImpEditEngine->IsFormatted() )
2467 pImpEditEngine->FormatDoc();
2468
2470 aInfos.bValid = pImpEditEngine->IsFormatted();
2471 if ( pImpEditEngine->IsFormatted() )
2472 {
2473 const ParaPortion* pParaPortion = pImpEditEngine->GetParaPortions()[nPara];
2474 const EditLine* pLine = (pParaPortion && pParaPortion->GetLines().Count()) ?
2475 &pParaPortion->GetLines()[0] : nullptr;
2476 DBG_ASSERT( pParaPortion && pLine, "GetParagraphInfos - Paragraph out of range" );
2477 if ( pParaPortion && pLine )
2478 {
2479 aInfos.nFirstLineHeight = pLine->GetHeight();
2480 aInfos.nFirstLineTextHeight = pLine->GetTxtHeight();
2481 aInfos.nFirstLineMaxAscent = pLine->GetMaxAscent();
2482 }
2483 }
2484 return aInfos;
2485}
2486
2487css::uno::Reference< css::datatransfer::XTransferable >
2489{
2490 EditSelection aSel( pImpEditEngine->CreateSel( rSelection ) );
2491 return pImpEditEngine->CreateTransferable( aSel );
2492}
2493
2494
2495// ====================== Virtual Methods ========================
2496
2497void EditEngine::DrawingText( const Point&, const OUString&, sal_Int32, sal_Int32,
2499 const SvxFont&, sal_Int32 /*nPara*/, sal_uInt8 /*nRightToLeft*/,
2500 const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool,
2501 const css::lang::Locale*, const Color&, const Color&)
2502
2503{
2504}
2505
2506void EditEngine::DrawingTab( const Point& /*rStartPos*/, tools::Long /*nWidth*/,
2507 const OUString& /*rChar*/, const SvxFont& /*rFont*/,
2508 sal_Int32 /*nPara*/, sal_uInt8 /*nRightToLeft*/, bool /*bEndOfLine*/,
2509 bool /*bEndOfParagraph*/, const Color& /*rOverlineColor*/,
2510 const Color& /*rTextLineColor*/)
2511{
2512}
2513
2515{
2516}
2517
2518void EditEngine::ParagraphInserted( sal_Int32 nPara )
2519{
2520
2521 if ( GetNotifyHdl().IsSet() )
2522 {
2524 aNotify.nParagraph = nPara;
2525 pImpEditEngine->GetNotifyHdl().Call( aNotify );
2526 }
2527}
2528
2529void EditEngine::ParagraphDeleted( sal_Int32 nPara )
2530{
2531
2532 if ( GetNotifyHdl().IsSet() )
2533 {
2535 aNotify.nParagraph = nPara;
2536 pImpEditEngine->GetNotifyHdl().Call( aNotify );
2537 }
2538}
2539void EditEngine::ParagraphConnected( sal_Int32 /*nLeftParagraph*/, sal_Int32 /*nRightParagraph*/ )
2540{
2541}
2542
2543void EditEngine::ParaAttribsChanged( sal_Int32 /* nParagraph */ )
2544{
2545}
2546
2548{
2549}
2550
2552{
2553 if ( GetNotifyHdl().IsSet() )
2554 {
2556 aNotify.nParagraph = nPara;
2557 pImpEditEngine->GetNotifyHdl().Call( aNotify );
2558 }
2559
2560 for (EditView* pView : pImpEditEngine->aEditViews)
2561 pView->pImpEditView->ScrollStateChange();
2562}
2563
2564OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const
2565{
2566 OUString aComment;
2567 switch ( nId )
2568 {
2572 case EDITUNDO_DELETE:
2573 case EDITUNDO_CUT:
2574 aComment = EditResId(RID_EDITUNDO_DEL);
2575 break;
2577 case EDITUNDO_MOVEPARAS:
2579 aComment = EditResId(RID_EDITUNDO_MOVE);
2580 break;
2582 case EDITUNDO_SPLITPARA:
2584 case EDITUNDO_PASTE:
2585 case EDITUNDO_INSERT:
2586 case EDITUNDO_READ:
2587 aComment = EditResId(RID_EDITUNDO_INSERT);
2588 break;
2590 aComment = EditResId(RID_EDITUNDO_REPLACE);
2591 break;
2592 case EDITUNDO_ATTRIBS:
2594 aComment = EditResId(RID_EDITUNDO_SETATTRIBS);
2595 break;
2597 aComment = EditResId(RID_EDITUNDO_RESETATTRIBS);
2598 break;
2600 aComment = EditResId(RID_EDITUNDO_SETSTYLE);
2601 break;
2603 aComment = EditResId(RID_EDITUNDO_TRANSLITERATE);
2604 break;
2607 aComment = EditResId(RID_EDITUNDO_INDENT);
2608 break;
2609 }
2610 return aComment;
2611}
2612
2614{
2615 return tools::Rectangle( Point(), Point() );
2616}
2617
2618OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, std::optional<Color>&, std::optional<Color>&, std::optional<FontLineStyle>& )
2619{
2620 return OUString(' ');
2621}
2622
2624{
2625 return false;
2626}
2627
2628
2629// ====================== Static Methods =======================
2630
2632{
2633 return new EditEngineItemPool();
2634}
2635
2636
2638namespace
2639{
2640class TerminateListener : public ::cppu::WeakImplHelper< css::frame::XTerminateListener >
2641{
2642 void SAL_CALL queryTermination( const lang::EventObject& ) override
2643 {}
2644 void SAL_CALL notifyTermination( const lang::EventObject& ) override
2645 {
2646 pGlobalPool.clear();
2647 }
2648 virtual void SAL_CALL disposing( const ::css::lang::EventObject& ) override
2649 {}
2650};
2651};
2652
2654{
2655 if ( !pGlobalPool )
2656 {
2658#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
2659 // TerminateListener option not available, force it to leak
2660 pGlobalPool->acquire();
2661#else
2662 uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(comphelper::getProcessComponentContext());
2663 uno::Reference< frame::XTerminateListener > xListener( new TerminateListener );
2664 xDesktop->addTerminateListener( xListener );
2665#endif
2666 }
2667 return *pGlobalPool;
2668}
2669
2671{
2672 SvxFont aSvxFont( rFont );
2673 SetFontInfoInItemSet( rSet, aSvxFont );
2674
2675}
2676
2678{
2680 rSet.Put( SvxFontItem( rFont.GetFamilyType(), rFont.GetFamilyName(), OUString(), rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) );
2699}
2700
2702{
2703 SvxFont aFont;
2704 CreateFont( aFont, rItemSet, true, nScriptType );
2705#if HAVE_P1155R3
2706 return aFont;
2707#else
2708 return std::move(aFont);
2709#endif
2710}
2711
2713{
2714 SvxFont aFont;
2715 CreateFont( aFont, rItemSet );
2716 return aFont;
2717}
2718
2720{
2721 bool bDoesMove = false;
2722
2723 switch ( rKeyEvent.GetKeyCode().GetCode() )
2724 {
2725 case KEY_UP:
2726 case KEY_DOWN:
2727 case KEY_LEFT:
2728 case KEY_RIGHT:
2729 case KEY_HOME:
2730 case KEY_END:
2731 case KEY_PAGEUP:
2732 case KEY_PAGEDOWN:
2733 {
2734 if ( !rKeyEvent.GetKeyCode().IsMod2() )
2735 bDoesMove = true;
2736 }
2737 break;
2738 }
2739 return bDoesMove;
2740}
2741
2743{
2744 bool bDoesChange = false;
2745
2746 KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
2747 if ( eFunc != KeyFuncType::DONTKNOW )
2748 {
2749 switch ( eFunc )
2750 {
2751 case KeyFuncType::UNDO:
2752 case KeyFuncType::REDO:
2753 case KeyFuncType::CUT:
2754 case KeyFuncType::PASTE: bDoesChange = true;
2755 break;
2756 default: // is then possibly edited below.
2757 eFunc = KeyFuncType::DONTKNOW;
2758 }
2759 }
2760 if ( eFunc == KeyFuncType::DONTKNOW )
2761 {
2762 switch ( rKeyEvent.GetKeyCode().GetCode() )
2763 {
2764 case KEY_DELETE:
2765 case KEY_BACKSPACE: bDoesChange = true;
2766 break;
2767 case KEY_RETURN:
2768 case KEY_TAB:
2769 {
2770 if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
2771 bDoesChange = true;
2772 }
2773 break;
2774 default:
2775 {
2776 bDoesChange = IsSimpleCharInput( rKeyEvent );
2777 }
2778 }
2779 }
2780 return bDoesChange;
2781}
2782
2784{
2785 return EditEngine::IsPrintable( rKeyEvent.GetCharCode() ) &&
2786 ( KEY_MOD2 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) ) &&
2787 ( KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) );
2788}
2789
2790bool EditEngine::HasValidData( const css::uno::Reference< css::datatransfer::XTransferable >& rTransferable )
2791{
2792 bool bValidData = false;
2793
2795 return true;
2796
2797 if ( rTransferable.is() )
2798 {
2799 // Every application that copies rtf or any other text format also copies plain text into the clipboard...
2800 datatransfer::DataFlavor aFlavor;
2801 SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor );
2802 bValidData = rTransferable->isDataFlavorSupported( aFlavor );
2803 }
2804
2805 return bValidData;
2806}
2807
2810{
2811 pImpEditEngine->SetBeginDropHdl( rLink );
2812}
2813
2815{
2816 return pImpEditEngine->GetBeginDropHdl();
2817}
2818
2821{
2822 pImpEditEngine->SetEndDropHdl( rLink );
2823}
2824
2826{
2827 return pImpEditEngine->GetEndDropHdl();
2828}
2829
2831{
2832 pImpEditEngine->SetFirstWordCapitalization( bCapitalize );
2833}
2834
2836{
2837 pImpEditEngine->SetReplaceLeadingSingleQuotationMark( bReplace );
2838}
2839
2841{
2842 return pImpEditEngine->aHtmlImportHdl.IsSet();
2843}
2844
2846{
2847 return pImpEditEngine->aRtfImportHdl.IsSet();
2848}
2849
2851{
2852 return pImpEditEngine->GetStatus().DoImportRTFStyleSheets();
2853}
2854
2856{
2857 pImpEditEngine->aHtmlImportHdl.Call(rInfo);
2858}
2859
2861{
2862 pImpEditEngine->aRtfImportHdl.Call(rInfo);
2863}
2864
2866{
2867 return pImpEditEngine->ImpInsertParaBreak(rEditSelection);
2868}
2869
2871{
2872 return pImpEditEngine->InsertLineBreak(rEditSelection);
2873}
2874
2876 return pImpEditEngine->GetOverflowingParaNum();
2877}
2878
2880 return pImpEditEngine->GetOverflowingLineNum();
2881}
2882
2884 pImpEditEngine->ClearOverflowingParaNum();
2885}
2886
2888 pImpEditEngine->CheckPageOverflow();
2889 return pImpEditEngine->IsPageOverflow();
2890}
2891
2893 pImpEditEngine->GetEditDoc().DisableAttributeExpanding();
2894}
2895
2897{
2898 pImpEditEngine->EnableSkipOutsideFormat(set);
2899}
2900
2902{
2903 pImpEditEngine->SetLOKSpecialPaperSize(rSize);
2904}
2905
2907{
2908 return pImpEditEngine->GetLOKSpecialPaperSize();
2909}
2910
2912{
2913}
2914
2915
2916EFieldInfo::EFieldInfo( const SvxFieldItem& rFieldItem, sal_Int32 nPara, sal_Int32 nPos ) :
2917 pFieldItem( new SvxFieldItem( rFieldItem ) ),
2918 aPosition( nPara, nPos )
2919{
2920}
2921
2923{
2924}
2925
2927{
2928 *this = rFldInfo;
2929}
2930
2932{
2933 if( this == &rFldInfo )
2934 return *this;
2935
2936 pFieldItem.reset( rFldInfo.pFieldItem ? new SvxFieldItem( *rFldInfo.pFieldItem ) : nullptr );
2937 aCurrentText = rFldInfo.aCurrentText;
2938 aPosition = rFldInfo.aPosition;
2939
2940 return *this;
2941}
2942
2943/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Sequence< double > P1
Sequence< double > P2
CharCompressType
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static bool AnyInput(VclInputFlags nType=VCL_INPUT_ANY)
AttribsType & GetAttribs()
Definition: editdoc.hxx:222
std::vector< std::unique_ptr< EditCharAttrib > > AttribsType
Definition: editdoc.hxx:186
SvxFont & GetDefFont()
Definition: editdoc.hxx:215
CharAttribList & GetCharAttribs()
Definition: editdoc.hxx:256
sal_Unicode GetChar(sal_Int32 nPos) const
Definition: editdoc.cxx:1766
WrongList * GetWrongList()
Definition: editdoc.cxx:1777
sal_Int32 Len() const
Definition: editdoc.cxx:1615
void CreateWrongList()
Definition: editdoc.cxx:1792
void DestroyWrongList()
Definition: editdoc.cxx:1799
sal_Int32 & GetStart()
Definition: editattr.hxx:87
const SfxPoolItem * GetItem() const
Definition: editattr.hxx:85
sal_uInt16 Which() const
Definition: editattr.hxx:84
sal_Int32 & GetEnd()
Definition: editattr.hxx:88
Point GetDocPos(const Point &rPaperPos) const
Definition: editeng.cxx:1974
void EraseVirtualDevice()
Definition: editeng.cxx:2180
const SfxItemSet & GetBaseParaAttribs(sal_Int32 nPara) const
Definition: editeng.cxx:950
void RemoveParagraph(sal_Int32 nPara)
Definition: editeng.cxx:1626
Color const & GetBackgroundColor() const
Definition: editeng.cxx:174
ViewsType & GetEditViews()
Definition: editeng.cxx:784
void setRoundFontSizeToPt(bool bRound) const
Definition: editeng.cxx:2304
EDITENG_DLLPRIVATE tools::Long GetXPos(const ParaPortion *pParaPortion, const EditLine *pLine, sal_Int32 nIndex, bool bPreferPortionStart=false) const
Definition: editeng.cxx:873
void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList)
Definition: editeng.cxx:1841
bool HasConvertibleTextPortion(LanguageType nLang)
Definition: editeng.cxx:2258
void SetMaxAutoPaperSize(const Size &rSz)
Definition: editeng.cxx:563
void SetPolygon(const basegfx::B2DPolyPolygon &rPolyPolygon)
Definition: editeng.cxx:520
OUString GetWord(sal_Int32 nPara, sal_Int32 nIndex)
Definition: editeng.cxx:663
bool IsTextPos(const Point &rPaperPos, sal_uInt16 nBorder)
Definition: editeng.cxx:2039
EDITENG_DLLPRIVATE InternalEditStatus & GetInternalEditStatus()
Definition: editeng.cxx:900
virtual void PaintingFirstLine(sal_Int32 nPara, const Point &rStartPos, const Point &rOrigin, Degree10 nOrientation, OutputDevice &rOutDev)
Definition: editeng.cxx:2514
void QuickFormatDoc(bool bFull=false)
Definition: editeng.cxx:2127
ESelection CreateESelection(const EditSelection &rSel) const
Definition: editeng.cxx:940
static bool IsPrintable(sal_Unicode c)
OUString GetText(LineEnd eEnd=LINEEND_LF) const
Definition: editeng.cxx:573
void RemoveParaPortion(sal_Int32 nNode)
Definition: editeng.cxx:716
const Size & GetMinAutoPaperSize() const
Definition: editeng.cxx:548
void SetWordDelimiters(const OUString &rDelimiters)
Definition: editeng.cxx:2168
void ClearSpellErrors()
Definition: editeng.cxx:2238
virtual OUString CalcFieldValue(const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rTxtColor, std::optional< Color > &rFldColor, std::optional< FontLineStyle > &rFldLineStyle)
Definition: editeng.cxx:2618
EditSelection MoveParagraphs(const Range &rParagraphs, sal_Int32 nNewPos)
Definition: editeng.cxx:761
void Clear()
Definition: editeng.cxx:1487
void QuickMarkInvalid(const ESelection &rSel)
Definition: editeng.cxx:2072
void GetAllMisspellRanges(std::vector< editeng::MisspellRanges > &rRanges) const
Definition: editeng.cxx:2200
TextRotation GetRotation() const
Definition: editeng.cxx:436
EditPaM CursorRight(const EditPaM &rPaM, sal_uInt16 nCharacterIteratorMode=css::i18n::CharacterIteratorMode::SKIPCELL)
Definition: editeng.cxx:895
void PutSpellingToSentenceStart(EditView const &rEditView)
Definition: editeng.cxx:2248
EDITENG_DLLPRIVATE const ParaPortion * GetPrevVisPortion(const ParaPortion *pCurPortion) const
Definition: editeng.cxx:706
virtual OUString GetUndoComment(sal_uInt16 nUndoId) const
Definition: editeng.cxx:2564
void CallHtmlImportHandler(HtmlImportInfo &rInfo)
Definition: editeng.cxx:2855
EditPaM DeleteSelection(const EditSelection &rSel)
Definition: editeng.cxx:935
std::unique_ptr< EditTextObject > CreateTextObject()
Definition: editeng.cxx:1517
void SetBeginDropHdl(const Link< EditView *, void > &rLink)
sets a link that is called at the beginning of a drag operation at an edit view
Definition: editeng.cxx:2809
void SetText(const OUString &rStr)
Definition: editeng.cxx:1492
void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich=0, bool bRemoveFeatures=false)
Definition: editeng.cxx:766
bool IsRtfImportHandlerSet() const
Definition: editeng.cxx:2845
EditEngine(const EditEngine &)=delete
EDITENG_DLLPRIVATE const EditSelectionEngine & GetSelectionEngine() const
Definition: editeng.cxx:990
bool IsHtmlImportHandlerSet() const
Definition: editeng.cxx:2840
static void DumpData(const EditEngine *pEE, bool bInfoBox)
Definition: editdbg.cxx:331
void SetCharAttribs(sal_Int32 nPara, const SfxItemSet &rSet)
Set attributes from rSet an all characters of nPara.
Definition: editeng.cxx:1769
const Size & GetMaxAutoPaperSize() const
Definition: editeng.cxx:558
EDITENG_DLLPRIVATE void HandleEndPasteOrDrop(PasteOrDropInfos &rInfos)
Definition: editeng.cxx:980
void SetAddExtLeading(bool b)
Definition: editeng.cxx:515
EditPaM CursorLeft(const EditPaM &rPaM, sal_uInt16 nCharacterIteratorMode=css::i18n::CharacterIteratorMode::SKIPCELL)
Definition: editeng.cxx:890
void EnableAutoColor(bool b)
Definition: editeng.cxx:184
EDITENG_DLLPRIVATE css::uno::Reference< css::datatransfer::XTransferable > CreateTransferable(const EditSelection &rSelection)
Definition: editeng.cxx:814
virtual void DrawingText(const Point &rStartPos, const OUString &rText, sal_Int32 nTextStart, sal_Int32 nTextLen, o3tl::span< const sal_Int32 > pDXArray, o3tl::span< const sal_Bool > pKashidaArray, const SvxFont &rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector *pWrongSpellVector, const SvxFieldData *pFieldData, bool bEndOfLine, bool bEndOfParagraph, const css::lang::Locale *pLocale, const Color &rOverlineColor, const Color &rTextLineColor)
Definition: editeng.cxx:2497
EditPaM InsertField(const EditSelection &rEditSelection, const SvxFieldItem &rFld)
Definition: editeng.cxx:835
SfxItemPool * GetEditTextObjectPool() const
Definition: editeng.cxx:2058
bool SetUpdateLayout(bool bUpdate, bool bRestoring=false)
Change the update mode per bUpdate and potentially trigger FormatAndUpdate.
Definition: editeng.cxx:1471
virtual void StyleSheetChanged(SfxStyleSheet *pStyle)
Definition: editeng.cxx:2547
ErrCode Read(SvStream &rInput, const OUString &rBaseURL, EETextFormat, SvKeyValueIterator *pHTTPHeaderAttrs=nullptr)
Definition: editeng.cxx:1499
EPosition FindDocPosition(const Point &rDocPos) const
Definition: editeng.cxx:2433
void Redo(EditView *pView)
Definition: editeng.cxx:809
basegfx::B2DTuple getGlobalFontScale() const
Definition: editeng.cxx:2296
bool HasView(EditView *pView) const
Definition: editeng.cxx:359
void SetEditTextObjectPool(SfxItemPool *pPool)
Definition: editeng.cxx:2053
bool UpdateFieldsOnly()
Definition: editeng.cxx:2372
void ShowParagraph(sal_Int32 nParagraph, bool bShow)
Definition: editeng.cxx:1540
virtual ~EditEngine()
Definition: editeng.cxx:96
sal_Int32 FindParagraph(tools::Long nDocPosY)
Definition: editeng.cxx:2428
editeng::LanguageSpan GetLanguage(const EditPaM &rPaM) const
Definition: editeng.cxx:482
EEControlBits GetControlWord() const
Definition: editeng.cxx:1953
EditPaM DeleteSelected(const EditSelection &rSel)
Definition: editeng.cxx:970
virtual const SvxNumberFormat * GetNumberFormat(sal_Int32 nPara) const
Definition: editeng.cxx:2027
void QuickInsertLineBreak(const ESelection &rSel)
Definition: editeng.cxx:2109
sal_Int32 GetParagraphCount() const
Definition: editeng.cxx:589
tools::Long GetFirstLineStartX(sal_Int32 nParagraph)
Definition: editeng.cxx:1958
MapMode const & GetRefMapMode() const
Definition: editeng.cxx:164
OutputDevice * GetRefDevice() const
Definition: editeng.cxx:154
bool IsTopToBottom() const
Definition: editeng.cxx:446
void SetSingleLine(bool bValue)
Definition: editeng.cxx:1869
EDITENG_DLLPRIVATE void SetInSelectionMode(bool b)
Definition: editeng.cxx:995
void EnableUndo(bool bEnable)
Definition: editeng.cxx:100
const Size & GetPaperSize() const
Definition: editeng.cxx:421
void DisableAttributeExpanding()
Definition: editeng.cxx:2892
void EnableSkipOutsideFormat(bool set)
Definition: editeng.cxx:2896
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
Definition: editeng.cxx:1796
virtual void ParagraphDeleted(sal_Int32 nDeletedParagraph)
Definition: editeng.cxx:2529
Link< EENotify &, void > const & GetNotifyHdl() const
Definition: editeng.cxx:1550
bool IsFlatMode() const
Definition: editeng.cxx:1864
void SetParaAttribsOnly(sal_Int32 nPara, const SfxItemSet &rSet)
Definition: editeng.cxx:955
EditPaM ConnectContents(sal_Int32 nLeftNode, bool bBackward)
Definition: editeng.cxx:751
void SeekCursor(ContentNode *pNode, sal_Int32 nPos, SvxFont &rFont)
Definition: editeng.cxx:930
void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)
Definition: editeng.cxx:2118
void SetKernAsianPunctuation(bool bEnabled)
Definition: editeng.cxx:510
EditView * RemoveView(EditView *pEditView)
Definition: editeng.cxx:314
sal_uInt32 GetTextHeight() const
Definition: editeng.cxx:1439
void SetHyphenator(css::uno::Reference< css::linguistic2::XHyphenator > const &xHyph)
Definition: editeng.cxx:2195
void Undo(EditView *pView)
Definition: editeng.cxx:804
void QuickDelete(const ESelection &rSel)
Definition: editeng.cxx:2093
bool IsUndoEnabled() const
Definition: editeng.cxx:105
EditView * GetView(size_t nIndex=0) const
Definition: editeng.cxx:349
SfxItemSet GetAttribs(sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags=GetAttribsFlags::ALL) const
Definition: editeng.cxx:1791
ParagraphInfos GetParagraphInfos(sal_Int32 nPara)
Definition: editeng.cxx:2462
void StripPortions()
Definition: editeng.cxx:1821
bool GetVertical() const
Definition: editeng.cxx:451
EFieldInfo GetFieldInfo(sal_Int32 nPara, sal_uInt16 nField) const
Definition: editeng.cxx:2337
size_t GetViewCount() const
Definition: editeng.cxx:354
sal_Int32 GetTextLen() const
Definition: editeng.cxx:584
void AppendDeletedNodeInfo(DeletedNodeInfo *pInfo)
Definition: editeng.cxx:731
void SetAsianCompressionMode(CharCompressType nCompression)
Definition: editeng.cxx:505
void SetRefMapMode(const MapMode &rMapMode)
Definition: editeng.cxx:159
void SetBeginPasteOrDropHdl(const Link< PasteOrDropInfos &, void > &rLink)
Definition: editeng.cxx:1595
EditSelection CreateSelection(const ESelection &rSel)
Definition: editeng.cxx:945
void ClearModifyFlag()
Definition: editeng.cxx:1668
bool IsInUndo() const
Definition: editeng.cxx:110
void InsertParagraph(sal_Int32 nPara, const EditTextObject &rTxtObj, const bool bAppend=false)
Definition: editeng.cxx:1689
EditView * GetActiveView() const
Definition: editeng.cxx:365
vcl::Font GetStandardFont(sal_Int32 nPara)
Definition: editeng.cxx:1810
virtual void ParaAttribsChanged(sal_Int32 nParagraph)
Definition: editeng.cxx:2543
void SetVertical(bool bVertical)
Definition: editeng.cxx:426
bool IsEffectivelyVertical() const
Definition: editeng.cxx:441
void SetAllMisspellRanges(const std::vector< editeng::MisspellRanges > &rRanges)
Definition: editeng.cxx:2205
void SetDefaultHorizontalTextDirection(EEHorizontalTextDirection eHTextDir)
Definition: editeng.cxx:466
void SetEndDropHdl(const Link< EditView *, void > &rLink)
sets a link that is called at the end of a drag operation at an edit view
Definition: editeng.cxx:2820
virtual tools::Rectangle GetBulletArea(sal_Int32 nPara)
Definition: editeng.cxx:2613
void SetEndMovingParagraphsHdl(const Link< MoveParagraphsInfo &, void > &rLink)
Definition: editeng.cxx:1590
css::uno::Reference< css::linguistic2::XSpellChecker1 > const & GetSpeller()
Definition: editeng.cxx:2190
void ClearOverflowingParaNum()
Definition: editeng.cxx:2883
void SetHtmlImportHdl(const Link< HtmlImportInfo &, void > &rLink)
Definition: editeng.cxx:1565
virtual void ParagraphConnected(sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph)
Definition: editeng.cxx:2539
EditSelection InsertText(css::uno::Reference< css::datatransfer::XTransferable > const &rxDataObj, const OUString &rBaseURL, const EditPaM &rPaM, bool bUseSpecial)
bool ShouldCreateBigTextObject() const
Definition: editeng.cxx:2309
void SetRotation(TextRotation nRotation)
Definition: editeng.cxx:431
virtual bool SpellNextDocument()
Definition: editeng.cxx:2225
const Link< RtfImportInfo &, void > & GetRtfImportHdl() const
Definition: editeng.cxx:1580
bool HasParaAttrib(sal_Int32 nPara, sal_uInt16 nWhich) const
Definition: editeng.cxx:1759
EDITENG_DLLPRIVATE bool IsIdleFormatterActive() const
Definition: editeng.cxx:691
void SetStyleSheet(const EditSelection &aSel, SfxStyleSheet *pStyle)
Definition: editeng.cxx:2138
void SetRtfImportHdl(const Link< RtfImportInfo &, void > &rLink)
Definition: editeng.cxx:1575
static void SetForbiddenCharsTable(const std::shared_ptr< SvxForbiddenCharactersTable > &xForbiddenChars)
Definition: editeng.cxx:2210
tools::Rectangle GetCharacterBounds(const EPosition &rPos) const
Definition: editeng.cxx:2446
sal_Int32 GetLineNumberAtIndex(sal_Int32 nPara, sal_Int32 nIndex) const
Definition: editeng.cxx:615
static rtl::Reference< SfxItemPool > CreatePool()
Definition: editeng.cxx:2631
virtual bool FieldClicked(const SvxFieldItem &rField)
Definition: editeng.cxx:2623
static SfxItemPool & GetGlobalItemPool()
Definition: editeng.cxx:2653
bool IsModified() const
Definition: editeng.cxx:1678
tools::Rectangle GetParaBounds(sal_Int32 nPara)
Definition: editeng.cxx:630
void CompleteOnlineSpelling()
Definition: editeng.cxx:2416
void SetBeginMovingParagraphsHdl(const Link< MoveParagraphsInfo &, void > &rLink)
Definition: editeng.cxx:1585
void SetMinAutoPaperSize(const Size &rSz)
Definition: editeng.cxx:553
void SetMinColumnWrapHeight(tools::Long nVal)
Definition: editeng.cxx:568
EDITENG_DLLPRIVATE ParaPortion * FindParaPortion(ContentNode const *pNode)
Definition: editeng.cxx:696
void SetRefDevice(OutputDevice *pRefDef)
Definition: editeng.cxx:149
Link< EditView *, void > const & GetEndDropHdl() const
Definition: editeng.cxx:2825
sal_Int32 GetLineLen(sal_Int32 nParagraph, sal_Int32 nLine) const
Definition: editeng.cxx:601
void InsertContent(ContentNode *pNode, sal_Int32 nPos)
Definition: editeng.cxx:741
bool HasTriedMergeOnLastAddUndo() const
returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo This is currently u...
Definition: editeng.cxx:144
SvtScriptType GetScriptType(const ESelection &rSelection) const
Definition: editeng.cxx:476
void SetUndoMode(bool b)
Definition: editeng.cxx:794
bool IsRightToLeft(sal_Int32 nPara) const
Definition: editeng.cxx:2034
bool IsImportRTFStyleSheetsSet() const
Definition: editeng.cxx:2850
void ClearPolygon()
Definition: editeng.cxx:543
sal_uInt32 CalcTextWidth()
Definition: editeng.cxx:1461
static bool DoesKeyMoveCursor(const KeyEvent &rKeyEvent)
Definition: editeng.cxx:2719
const SfxPoolItem & GetParaAttrib(sal_Int32 nPara, sal_uInt16 nWhich) const
Definition: editeng.cxx:1764
bool UpdateFields()
Definition: editeng.cxx:2364
SfxUndoManager * SetUndoManager(SfxUndoManager *pNew)
Definition: editeng.cxx:120
EDITENG_DLLPRIVATE void HandleBeginPasteOrDrop(PasteOrDropInfos &rInfos)
Definition: editeng.cxx:975
void InsertFeature(const EditSelection &rEditSelection, const SfxPoolItem &rItem)
Definition: editeng.cxx:756
void RemoveFields(const std::function< bool(const SvxFieldData *)> &isFieldData=[](const SvxFieldData *){return true;})
Definition: editeng.cxx:2377
void SetTextColumns(sal_Int16 nColumns, sal_Int32 nSpacing)
Definition: editeng.cxx:456
EditPaM CreateEditPaM(const EPaM &rEPaM)
Definition: editeng.cxx:824
bool IsUpdateLayout() const
Definition: editeng.cxx:1482
Link< EditView *, void > const & GetBeginDropHdl() const
Definition: editeng.cxx:2814
void SetFlatMode(bool bFlat)
Definition: editeng.cxx:1859
const SfxItemSet & GetEmptyItemSet() const
Definition: editeng.cxx:199
EDITENG_DLLPRIVATE void CheckIdleFormatter()
Definition: editeng.cxx:686
void GetLineBoundaries(sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine) const
Definition: editeng.cxx:608
std::unique_ptr< EditTextObject > GetEmptyTextObject() const
Definition: editeng.cxx:1528
sal_uInt32 GetLineHeight(sal_Int32 nParagraph)
Definition: editeng.cxx:622
virtual void ParagraphInserted(sal_Int32 nNewParagraph)
Definition: editeng.cxx:2518
EESpellState HasSpellErrors()
Definition: editeng.cxx:2230
OUString GetSelected(const EditSelection &rSel) const
Definition: editeng.cxx:965
std::vector< EditView * > ViewsType
void ForceAutoColor(bool b)
Definition: editeng.cxx:189
void SetControlWord(EEControlBits nWord)
Definition: editeng.cxx:1880
SfxStyleSheetPool * GetStyleSheetPool()
Definition: editeng.cxx:2163
sal_Int32 GetLineCount(sal_Int32 nParagraph) const
Definition: editeng.cxx:594
void ApplyChangedSentence(EditView const &rEditView, const svx::SpellPortions &rNewPortions, bool bRecheck)
Definition: editeng.cxx:2253
void Draw(OutputDevice &rOutDev, const tools::Rectangle &rOutRect)
Definition: editeng.cxx:204
void QuickMarkToBeRepainted(sal_Int32 nPara)
Definition: editeng.cxx:2102
sal_uInt32 GetTextHeightNTP() const
Definition: editeng.cxx:1449
bool IsCallParaInsertedOrDeleted() const
Definition: editeng.cxx:726
EDITENG_DLLPRIVATE void CursorMoved(const ContentNode *pPrevNode)
Definition: editeng.cxx:681
void SetDefaultLanguage(LanguageType eLang)
Definition: editeng.cxx:2215
ParaPortionList & GetParaPortions()
Definition: editeng.cxx:920
bool IsFormatted() const
Definition: editeng.cxx:885
sal_uInt16 GetFieldCount(sal_Int32 nPara) const
Definition: editeng.cxx:2321
EDITENG_DLLPRIVATE bool PostKeyEvent(const KeyEvent &rKeyEvent, EditView *pView, vcl::Window const *pFrameWin)
Definition: editeng.cxx:1000
bool IsPageOverflow()
Definition: editeng.cxx:2887
void SetStatusEventHdl(const Link< EditStatus &, void > &rLink)
Definition: editeng.cxx:1555
EditPaM SplitContent(sal_Int32 nNode, sal_Int32 nSepPos)
Definition: editeng.cxx:746
void SetPaperSize(const Size &rSize)
Definition: editeng.cxx:385
void SetStyleSheetPool(SfxStyleSheetPool *pSPool)
Definition: editeng.cxx:2158
void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)
Definition: editeng.cxx:2063
void CallRtfImportHandler(RtfImportInfo &rInfo)
Definition: editeng.cxx:2860
sal_Int32 GetOverflowingParaNum() const
Definition: editeng.cxx:2875
void QuickInsertText(const OUString &rText, const ESelection &rSel)
Definition: editeng.cxx:2084
void UndoActionStart(sal_uInt16 nId)
Definition: editeng.cxx:125
const Link< HtmlImportInfo &, void > & GetHtmlImportHdl() const
Definition: editeng.cxx:1570
void FormatAndLayout(EditView *pCurView, bool bCalledFromUndo=false)
Definition: editeng.cxx:799
Color GetAutoColor() const
Definition: editeng.cxx:179
void SetLOKSpecialPaperSize(const Size &rSize)
Definition: editeng.cxx:2901
bool HasOnlineSpellErrors() const
Definition: editeng.cxx:2404
void SetBackgroundColor(const Color &rColor)
Definition: editeng.cxx:169
EditPaM InsertParaBreak(const EditSelection &rEditSelection)
Definition: editeng.cxx:2865
EDITENG_DLLPRIVATE EditPaM GetPaM(const Point &aDocPos, bool bSmart=true)
Definition: editeng.cxx:862
static bool IsSimpleCharInput(const KeyEvent &rKeyEvent)
Definition: editeng.cxx:2783
EDITENG_DLLPRIVATE EditPaM EndOfWord(const EditPaM &rPaM)
Definition: editeng.cxx:857
virtual void DrawingTab(const Point &rStartPos, tools::Long nWidth, const OUString &rChar, const SvxFont &rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, bool bEndOfLine, bool bEndOfParagraph, const Color &rOverlineColor, const Color &rTextLineColor)
Definition: editeng.cxx:2506
static vcl::Font CreateFontFromItemSet(const SfxItemSet &rItemSet, SvtScriptType nScriptType)
Definition: editeng.cxx:2701
void SetNotifyHdl(const Link< EENotify &, void > &rLink)
Definition: editeng.cxx:1545
void SetDefTab(sal_uInt16 nDefTab)
Definition: editeng.cxx:375
void SetSpeller(css::uno::Reference< css::linguistic2::XSpellChecker1 > const &xSpeller)
Definition: editeng.cxx:2185
std::unique_ptr< ImpEditEngine > pImpEditEngine
LanguageType GetDefaultLanguage() const
Definition: editeng.cxx:2220
void InsertView(EditView *pEditView, size_t nIndex=EE_APPEND)
Definition: editeng.cxx:297
static SvxFont CreateSvxFontFromItemSet(const SfxItemSet &rItemSet)
Definition: editeng.cxx:2712
void UndoActionEnd()
Definition: editeng.cxx:137
virtual bool ConvertNextDocument()
Definition: editeng.cxx:2263
EDITENG_DLLPRIVATE bool HasText() const
Definition: editeng.cxx:985
const OUString & GetWordDelimiters() const
Definition: editeng.cxx:2175
void SetFixedCellHeight(bool bUseFixedCellHeight)
Definition: editeng.cxx:461
bool SpellSentence(EditView const &rEditView, svx::SpellPortions &rToFill)
Definition: editeng.cxx:2243
void SetEndPasteOrDropHdl(const Link< PasteOrDropInfos &, void > &rLink)
Definition: editeng.cxx:1601
sal_Int32 GetOverflowingLineNum() const
Definition: editeng.cxx:2879
SvxFont GetStandardSvxFont(sal_Int32 nPara)
Definition: editeng.cxx:1815
EDITENG_DLLPRIVATE EditSelection SelectWord(const EditSelection &rCurSelection, sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES)
Definition: editeng.cxx:867
void ParagraphHeightChanged(sal_Int32 nPara)
Definition: editeng.cxx:2551
void SetModified()
Definition: editeng.cxx:1673
static bool HasValidData(const css::uno::Reference< css::datatransfer::XTransferable > &rTransferable)
Definition: editeng.cxx:2790
const Size & GetLOKSpecialPaperSize() const
Definition: editeng.cxx:2906
const SfxStyleSheet * GetStyleSheet(sal_Int32 nPara) const
Definition: editeng.cxx:2148
void SetModifyHdl(const Link< LinkParamNone *, void > &rLink)
Definition: editeng.cxx:1663
void Write(SvStream &rOutput, EETextFormat)
Definition: editeng.cxx:1510
void setGlobalScale(double fFontScaleX, double fFontScaleY, double fSpacingScaleX, double fSpacingScaleY)
Definition: editeng.cxx:2273
void dumpAsXmlEditDoc(xmlTextWriterPtr pWriter) const
Definition: editeng.cxx:915
void ParaAttribsToCharAttribs(ContentNode *pNode)
Definition: editeng.cxx:819
EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const
Definition: editeng.cxx:471
void SetFirstWordCapitalization(bool bCapitalize)
specifies if auto-correction should capitalize the first word or not (default is on)
Definition: editeng.cxx:2830
void SetCallParaInsertedOrDeleted(bool b)
Definition: editeng.cxx:721
void SetAttribs(const EditSelection &rSel, const SfxItemSet &rSet, SetAttribsMode nSpecial=SetAttribsMode::NONE)
Definition: editeng.cxx:960
bool IsForceAutoColor() const
Definition: editeng.cxx:194
void TransliterateText(const ESelection &rSelection, TransliterationFlags nTransliterationMode)
Definition: editeng.cxx:495
basegfx::B2DTuple getGlobalSpacingScale() const
Definition: editeng.cxx:2283
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet)
Definition: editeng.cxx:1747
void SetActiveView(EditView *pView)
Definition: editeng.cxx:370
void GetCharAttribs(sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const
Definition: editeng.cxx:1779
SfxUndoManager & GetUndoManager()
Definition: editeng.cxx:115
Link< EditStatus &, void > const & GetStatusEventHdl() const
Definition: editeng.cxx:1560
static void SetFontInfoInItemSet(SfxItemSet &rItemSet, const vcl::Font &rFont)
Definition: editeng.cxx:2670
const SfxItemSet & GetParaAttribs(sal_Int32 nPara) const
Definition: editeng.cxx:1754
void SetReplaceLeadingSingleQuotationMark(bool bReplace)
specifies if auto-correction should replace a leading single quotation mark (apostrophe) or not (defa...
Definition: editeng.cxx:2835
static bool DoesKeyChangeText(const KeyEvent &rKeyEvent)
Definition: editeng.cxx:2742
EditPaM InsertLineBreak(const EditSelection &rEditSelection)
Definition: editeng.cxx:2870
EditPaM ConnectParagraphs(ContentNode *pLeft, ContentNode *pRight, bool bBackward)
Definition: editeng.cxx:829
Point GetDocPosTopLeft(sal_Int32 nParagraph)
Definition: editeng.cxx:1993
void UpdateSelections()
Definition: editeng.cxx:736
EditDoc & GetEditDoc()
Definition: editeng.cxx:905
EDITENG_DLLPRIVATE Range GetLineXPosStartEnd(const ParaPortion *pParaPortion, const EditLine *pLine) const
Definition: editeng.cxx:879
bool IsInSelectionMode() const
Definition: editeng.cxx:1683
sal_Int32 Count() const
Definition: editdoc.cxx:1093
sal_uInt16 GetHeight() const
Definition: editdoc.hxx:529
sal_uInt16 GetTxtHeight() const
Definition: editdoc.hxx:530
sal_uInt16 GetMaxAscent() const
Definition: editdoc.hxx:536
sal_Int32 GetStartPosX() const
Definition: editdoc.hxx:543
const ContentNode * GetNode() const
Definition: editdoc.hxx:312
sal_Int32 GetIndex() const
Definition: editdoc.hxx:316
bool IsInvalid() const
Definition: editdoc.hxx:712
EditPaM & Min()
Definition: editdoc.hxx:705
bool HasRange() const
Definition: editdoc.hxx:711
EditPaM & Max()
Definition: editdoc.hxx:706
bool IsReadOnly() const
Definition: editview.cxx:251
void HideCursor(bool bDeactivate=false)
Definition: editview.cxx:532
bool IsInsertMode() const
Definition: editview.cxx:816
bool HasSelection() const
Definition: editview.cxx:314
void Undo()
Definition: editview.cxx:622
void Redo()
Definition: editview.cxx:627
SfxItemSet GetAttribs()
Definition: editview.cxx:616
vcl::Window * GetWindow() const
Definition: editview.cxx:357
const tools::Rectangle & GetOutputArea() const
Definition: editview.cxx:421
void SetInsertMode(bool bInsert)
Definition: editview.cxx:821
void SetAttribs(const SfxItemSet &rSet)
Definition: editview.cxx:560
std::unique_ptr< ImpEditView > pImpEditView
Definition: editview.hxx:167
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
EditEngine::ViewsType ViewsType
Definition: impedit.hxx:490
static void SetForbiddenCharsTable(const std::shared_ptr< SvxForbiddenCharactersTable > &xForbiddenChars)
Definition: impedit2.cxx:4460
static bool DoVisualCursorTraveling()
Definition: impedit2.cxx:4478
sal_Unicode GetCharCode() const
const vcl::KeyCode & GetKeyCode() const
GDIMetaFile * GetConnectMetaFile() const
vcl::Region GetClipRegion() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
bool IsClipRegion() const
void SetLineColor()
void SetClipRegion()
void SetFillColor()
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
OutDevType GetOutDevType() const
void IntersectClipRegion(const tools::Rectangle &rRect)
TextPortionList & GetTextPortions()
Definition: editdoc.hxx:646
tools::Long GetHeight() const
Definition: editdoc.hxx:641
void SetMustRepaint(bool bRP)
Definition: editdoc.hxx:628
ContentNode * GetNode() const
Definition: editdoc.hxx:645
EditLineList & GetLines()
Definition: editdoc.hxx:620
void MarkSelectionInvalid(sal_Int32 nStart)
Definition: editdoc.cxx:563
constexpr tools::Long Y() const
void setX(tools::Long nX)
void RotateAround(tools::Long &rX, tools::Long &rY, Degree10 nOrientation) const
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
void SetValue(bool const bTheValue)
bool GetValue() const
EnumT GetValue() const
void SetValue(EnumT nTheValue)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static bool GetFormatDataFlavor(SotClipboardFormatId nFormat, css::datatransfer::DataFlavor &rFlavor)
ErrCode GetError() const
static bool IsAutoCorrectChar(sal_Unicode cChar)
Definition: svxacorr.cxx:247
SvxColorItem item describes a color.
Definition: colritem.hxx:32
This item stores a field (SvxFieldData).
Definition: flditem.hxx:70
This item describes a Font.
Definition: fontitem.hxx:30
sal_uInt8 GetPropr() const
Definition: svxfont.hxx:57
SvxCaseMap GetCaseMap() const
Definition: svxfont.hxx:62
short GetEscapement() const
Definition: svxfont.hxx:52
short GetTextFirstLineOffset() const
Definition: lrspitem.hxx:346
tools::Long GetTextLeft() const
Definition: frmitems.cxx:567
sal_Int32 Count() const
Definition: editdoc.cxx:392
const tools::Rectangle & GetBoundRect() const
Definition: txtrange.hxx:74
bool empty() const
Definition: edtspell.cxx:444
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
sal_uInt32 count() const
bool isClosed() const
constexpr tools::Long GetWidth() const
constexpr void SetLeft(tools::Long v)
constexpr void SetTop(tools::Long v)
constexpr tools::Long Top() const
constexpr Point TopLeft() const
constexpr void SetRight(tools::Long v)
constexpr Size GetSize() const
constexpr tools::Long Right() const
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
constexpr void SetBottom(tools::Long v)
constexpr tools::Long GetHeight() const
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
constexpr tools::Long Left() const
FontFamily GetFamilyType()
bool IsKerning() const
FontStrikeout GetStrikeout() const
bool IsShadow() const
FontLineStyle GetOverline() const
FontRelief GetRelief() const
FontEmphasisMark GetEmphasisMark() const
FontItalic GetItalic()
const OUString & GetFamilyName() const
const Size & GetFontSize() const
LanguageType GetLanguage() const
const Color & GetColor() const
FontPitch GetPitch()
FontWeight GetWeight()
FontLineStyle GetUnderline() const
rtl_TextEncoding GetCharSet() const
bool IsOutline() const
bool IsWordLineMode() const
short GetFixKerning() const
const Color & GetFillColor() const
bool IsMod1() const
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
KeyFuncType GetFunction() const
bool IsShift() const
bool IsMod2() const
Point OutputToScreenPixel(const Point &rPos) const
::OutputDevice const * GetOutDev() const
weld::Window * GetFrameWeld() const
constexpr ::Color COL_YELLOW(0xFF, 0xFF, 0x00)
constexpr ::Color COL_LIGHTGREEN(0x00, 0xFF, 0x00)
int nCount
FormulaCommand pE
#define DBG_ASSERT(sCon, aError)
float y
float x
#define CH_FEATURE
Definition: editattr.hxx:55
#define EDITUNDO_PARAATTRIBS
Definition: editdata.hxx:74
@ EE_NOTIFY_PARAGRAPHREMOVED
A paragraph was removed from the EditEngine.
Definition: editdata.hxx:312
@ EE_NOTIFY_PARAGRAPHINSERTED
A paragraph was inserted into the EditEngine.
Definition: editdata.hxx:309
@ EE_NOTIFY_TextHeightChanged
The height of at least one paragraph has changed.
Definition: editdata.hxx:318
#define EDITUNDO_INSERTFEATURE
Definition: editdata.hxx:65
#define EDITUNDO_MOVEPARAS
Definition: editdata.hxx:73
#define EDITUNDO_REPLACEALL
Definition: editdata.hxx:79
#define EDITUNDO_DRAGANDDROP
Definition: editdata.hxx:76
EETextFormat
Definition: editdata.hxx:35
EESpellState
Definition: editdata.hxx:40
#define EDITUNDO_INDENTBLOCK
Definition: editdata.hxx:81
#define EDITUNDO_CUT
Definition: editdata.hxx:70
#define EDITUNDO_RESETATTRIBS
Definition: editdata.hxx:80
#define EDITUNDO_READ
Definition: editdata.hxx:77
EERemoveParaAttribsMode
Definition: editdata.hxx:46
#define EDITUNDO_ATTRIBS
Definition: editdata.hxx:75
#define EDITUNDO_MOVEPARAGRAPHS
Definition: editdata.hxx:64
#define EDITUNDO_DELCONTENT
Definition: editdata.hxx:68
#define EDITUNDO_INSERT
Definition: editdata.hxx:72
#define EDITUNDO_INSERTCHARS
Definition: editdata.hxx:67
#define EDITUNDO_PASTE
Definition: editdata.hxx:71
#define EDITUNDO_REMOVECHARS
Definition: editdata.hxx:62
#define EDITUNDO_SPLITPARA
Definition: editdata.hxx:66
#define EE_PARA_APPEND
Definition: editdata.hxx:49
#define EDITUNDO_STYLESHEET
Definition: editdata.hxx:78
#define EDITUNDO_DELETE
Definition: editdata.hxx:69
#define EDITUNDO_UNINDENTBLOCK
Definition: editdata.hxx:82
#define EDITUNDO_TRANSLITERATE
Definition: editdata.hxx:84
#define EDITUNDO_CONNECTPARAS
Definition: editdata.hxx:63
EEHorizontalTextDirection
Definition: editdata.hxx:36
void CreateFont(SvxFont &rFont, const SfxItemSet &rSet, bool bSearchInParent, SvtScriptType nScriptType)
Definition: editdoc.cxx:1975
DeleteMode
Definition: editdoc.hxx:335
static rtl::Reference< SfxItemPool > pGlobalPool
Definition: editeng.cxx:89
static bool bDebugPaint
Definition: editeng.cxx:85
TextRotation
Definition: editobj.hxx:55
EEControlBits
Definition: editstat.hxx:28
constexpr TypedWhichId< SvxContourItem > EE_CHAR_OUTLINE(EE_CHAR_START+8)
constexpr TypedWhichId< SvxKerningItem > EE_CHAR_KERNING(EE_CHAR_START+12)
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
constexpr TypedWhichId< SfxBoolItem > EE_PARA_BULLETSTATE(EE_PARA_START+9)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxAutoKernItem > EE_CHAR_PAIRKERNING(EE_CHAR_START+11)
constexpr TypedWhichId< SvxShadowedItem > EE_CHAR_SHADOW(EE_CHAR_START+9)
constexpr TypedWhichId< SvxOverlineItem > EE_CHAR_OVERLINE(EE_CHAR_START+29)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< SvxCrossedOutItem > EE_CHAR_STRIKEOUT(EE_CHAR_START+6)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
constexpr TypedWhichId< SvxEmphasisMarkItem > EE_CHAR_EMPHASISMARK(EE_CHAR_START+25)
constexpr TypedWhichId< SvxEscapementItem > EE_CHAR_ESCAPEMENT(EE_CHAR_START+10)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
constexpr TypedWhichId< SvxCaseMapItem > EE_CHAR_CASEMAP(EE_CHAR_START+30)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_BKGCOLOR(EE_CHAR_START+32)
constexpr TypedWhichId< SvxCharScaleWidthItem > EE_CHAR_FONTWIDTH(EE_CHAR_START+3)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
constexpr TypedWhichId< SvxWordLineModeItem > EE_CHAR_WLM(EE_CHAR_START+13)
constexpr TypedWhichId< SvxCharReliefItem > EE_CHAR_RELIEF(EE_CHAR_START+26)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
OUString EditResId(TranslateId aId)
Definition: eerdll.cxx:192
struct _xmlTextWriter * xmlTextWriterPtr
bool bReadOnly
@ Horizontal_RL_TB
Horizontal, from right to left, from top to bottom (typical for arabic/hebrew languages).
@ Horizontal_LR_TB
Horizontal, from left to right, from top to bottom (typical for western languages).
#define TRAVEL_X_DONTKNOW
Definition: impedit.hxx:85
#define DEL_RIGHT
Definition: impedit.hxx:84
GetCursorFlags
Definition: impedit.hxx:93
#define CURSOR_BIDILEVEL_DONTKNOW
Definition: impedit.hxx:86
#define DEL_LEFT
Definition: impedit.hxx:83
GetAttribsFlags
values for: SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd,...
EditEngineAttribs
values for: SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEn...
sal_Int32 nIndex
Mode eMode
void * p
sal_Int64 n
KeyFuncType
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_MOD2
constexpr sal_uInt16 KEY_MOD1
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_F1
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_F12
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_F11
constexpr sal_uInt16 KEY_W
constexpr sal_uInt16 KEY_INSERT
constexpr sal_uInt16 KEY_BACKSPACE
constexpr sal_uInt16 KEY_END
SvtScriptType
LineEnd
sal_uInt16 nPos
#define SAL_WARN_IF(condition, area, stream)
aStr
std::vector< WrongSpellClass > WrongSpellVector
Definition: eedata.hxx:42
tools::Long const nBorder
void set(css::uno::UnoInterfaceReference const &value)
Reference< XComponentContext > getProcessComponentContext()
Reference< XComponentContext > getComponentContext(Reference< XMultiServiceFactory > const &factory)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
std::vector< SpellPortion > SpellPortions
Definition: outliner.hxx:87
long Long
const LocaleDataWrapper & GetLocaleData()
sal_Int16 nId
OUTDEV_PRINTER
Sequence< Property > aInfos
static SfxItemSet & rSet
sal_Int32 nParagraph
Definition: editdata.hxx:336
std::unique_ptr< SvxFieldItem > pFieldItem
Definition: editdata.hxx:202
EFieldInfo & operator=(const EFieldInfo &)
Definition: editeng.cxx:2931
EPosition aPosition
Definition: editdata.hxx:204
OUString aCurrentText
Definition: editdata.hxx:203
Definition: editdoc.hxx:56
sal_Int32 nIndex
Definition: editdata.hxx:91
sal_Int32 nPara
Definition: editdata.hxx:90
sal_Int32 nStartPara
Definition: editdata.hxx:113
sal_Int32 nEndPos
Definition: editdata.hxx:116
sal_Int32 nStartPos
Definition: editdata.hxx:114
sal_Int32 nEndPara
Definition: editdata.hxx:115
css::uno::Reference< css::datatransfer::clipboard::XClipboard > VCL_DLLPUBLIC GetSystemPrimarySelection()
TransliterationFlags
unsigned char sal_uInt8
sal_uInt16 sal_Unicode
Count