build fix
[LibreOffice.git] / include / editeng / editeng.hxx
blob22b47393c75b3e4307bc0958d36e19d7c98b12bc
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 // MyEDITENG, due to exported EditEng
20 #ifndef INCLUDED_EDITENG_EDITENG_HXX
21 #define INCLUDED_EDITENG_EDITENG_HXX
23 #include <rtl/ref.hxx>
24 #include <vector>
25 #include <com/sun/star/uno/Reference.h>
26 #include <com/sun/star/i18n/WordType.hpp>
27 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
29 #include <rsc/rscsfx.hxx>
30 #include <editeng/editdata.hxx>
31 #include <editeng/editstat.hxx>
32 #include <editeng/editengdllapi.h>
33 #include <i18nlangtag/lang.h>
35 #include <tools/lineend.hxx>
36 #include <tools/link.hxx>
38 #include <editeng/eedata.hxx>
39 #include <o3tl/typed_flags_set.hxx>
40 #include <svl/languageoptions.hxx>
41 #include <functional>
43 namespace com { namespace sun { namespace star {
44 namespace linguistic2 {
45 class XSpellChecker1;
46 class XHyphenator;
48 namespace datatransfer {
49 class XTransferable;
51 namespace lang {
52 struct Locale;
54 }}}
56 namespace svx {
57 struct SpellPortion;
58 typedef std::vector<SpellPortion> SpellPortions;
61 namespace svl { class IUndoManager; }
62 namespace basegfx { class B2DPolyPolygon; }
63 namespace editeng {
64 struct MisspellRanges;
67 class ImpEditEngine;
68 class EditView;
69 class OutputDevice;
70 class EditUndo;
71 class SvxFont;
72 class SfxItemPool;
73 class SfxStyleSheet;
74 class SfxStyleSheetPool;
75 class SvxSearchItem;
76 class SvxFieldItem;
77 class SvxCharSetColorItem;
78 class SfxUndoAction;
79 class MapMode;
80 class Color;
81 namespace vcl { class Font; }
82 class KeyEvent;
83 namespace tools { class PolyPolygon; }
84 class Size;
85 class Point;
86 class Rectangle;
87 class SvStream;
88 class OutputDevice;
89 namespace vcl { class Window; }
90 class SfxPoolItem;
91 class SvxNumBulletItem;
92 class SvxBulletItem;
93 class SvxLRSpaceItem;
94 class SvKeyValueIterator;
95 class SvxForbiddenCharactersTable;
96 class SvxNumberFormat;
97 class FontList;
98 class SvxFieldData;
99 class ContentNode;
100 class ParaPortion;
101 class EditSelection;
102 class EditPaM;
103 class EditLine;
104 class InternalEditStatus;
105 class EditSelectionEngine;
106 class EditDoc;
107 struct PasteOrDropInfos;
108 class Range;
109 struct EPaM;
110 class DeletedNodeInfo;
111 class ParaPortionList;
114 /** values for:
115 SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All );
117 enum EditEngineAttribs {
118 EditEngineAttribs_All, /// returns all attributes even when theire not set
119 EditEngineAttribs_HardAndPara, /// returns all attributes set on paragraph and on portions
120 EditEngineAttribs_OnlyHard /// returns only attributes hard set on portions
123 /** values for:
124 SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt8 nFlags = 0xFF ) const;
126 enum class GetAttribsFlags
128 NONE = 0x00,
129 STYLESHEET = 0x01,
130 PARAATTRIBS = 0x02,
131 CHARATTRIBS = 0x04,
132 ALL = 0x07,
134 namespace o3tl
136 template<> struct typed_flags<GetAttribsFlags> : is_typed_flags<GetAttribsFlags, 0x07> {};
138 template<class T> bool checkSvxFieldData(const SvxFieldData* pData)
140 return dynamic_cast<const T*>(pData) != nullptr;
143 enum class SetAttribsMode {
144 NONE, WholeWord, Edge
147 class SdrObject;
148 class EDITENG_DLLPUBLIC EditEngine
150 friend class EditView;
151 friend class ImpEditView;
152 friend class EditDbg;
153 friend class Outliner;
154 friend class TextChainingUtils;
157 public:
158 typedef std::vector<EditView*> ViewsType;
160 private:
161 ImpEditEngine* pImpEditEngine;
163 EditEngine( const EditEngine& ) = delete;
164 EditEngine& operator=( const EditEngine& ) = delete;
165 EDITENG_DLLPRIVATE bool PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, vcl::Window* pFrameWin );
167 EDITENG_DLLPRIVATE void CursorMoved(ContentNode* pPrevNode);
168 EDITENG_DLLPRIVATE void CheckIdleFormatter();
169 EDITENG_DLLPRIVATE bool IsIdleFormatterActive() const;
170 EDITENG_DLLPRIVATE ParaPortion* FindParaPortion(ContentNode* pNode);
171 EDITENG_DLLPRIVATE const ParaPortion* FindParaPortion(ContentNode* pNode) const;
172 EDITENG_DLLPRIVATE const ParaPortion* GetPrevVisPortion(const ParaPortion* pCurPortion) const;
174 EDITENG_DLLPRIVATE css::uno::Reference<
175 css::datatransfer::XTransferable>
176 CreateTransferable(const EditSelection& rSelection);
178 EDITENG_DLLPRIVATE EditSelection InsertText(
179 css::uno::Reference<css::datatransfer::XTransferable > const & rxDataObj,
180 const OUString& rBaseURL, const EditPaM& rPaM, bool bUseSpecial);
182 EDITENG_DLLPRIVATE EditPaM EndOfWord(const EditPaM& rPaM);
184 EDITENG_DLLPRIVATE EditPaM GetPaM(const Point& aDocPos, bool bSmart = true);
186 EDITENG_DLLPRIVATE EditSelection SelectWord(
187 const EditSelection& rCurSelection,
188 sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES);
190 EDITENG_DLLPRIVATE long GetXPos(
191 const ParaPortion* pParaPortion, const EditLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false) const;
193 EDITENG_DLLPRIVATE Range GetLineXPosStartEnd(
194 const ParaPortion* pParaPortion, const EditLine* pLine) const;
196 EDITENG_DLLPRIVATE sal_uInt16 GetOnePixelInRef() const;
197 EDITENG_DLLPRIVATE InternalEditStatus& GetInternalEditStatus();
199 EDITENG_DLLPRIVATE void HandleBeginPasteOrDrop(PasteOrDropInfos& rInfos);
200 EDITENG_DLLPRIVATE void HandleEndPasteOrDrop(PasteOrDropInfos& rInfos);
201 EDITENG_DLLPRIVATE bool HasText() const;
202 EDITENG_DLLPRIVATE const EditSelectionEngine& GetSelectionEngine() const;
203 EDITENG_DLLPRIVATE void SetInSelectionMode(bool b);
205 protected:
208 public:
209 EditEngine( SfxItemPool* pItemPool );
210 virtual ~EditEngine();
212 const SfxItemSet& GetEmptyItemSet();
214 void SetDefTab( sal_uInt16 nDefTab );
216 void SetRefDevice( OutputDevice* pRefDef );
217 OutputDevice* GetRefDevice() const;
219 void SetRefMapMode( const MapMode& rMapMode );
220 MapMode GetRefMapMode();
222 void SetUpdateMode( bool bUpdate );
223 bool GetUpdateMode() const;
225 void SetBackgroundColor( const Color& rColor );
226 Color GetBackgroundColor() const;
227 Color GetAutoColor() const;
228 void EnableAutoColor( bool b );
229 void ForceAutoColor( bool b );
230 bool IsForceAutoColor() const;
232 void InsertView(EditView* pEditView, size_t nIndex = EE_APPEND);
233 EditView* RemoveView( EditView* pEditView );
234 void RemoveView(size_t nIndex);
235 EditView* GetView(size_t nIndex = 0) const;
236 size_t GetViewCount() const;
237 bool HasView( EditView* pView ) const;
238 EditView* GetActiveView() const;
239 void SetActiveView(EditView* pView);
241 void SetPaperSize( const Size& rSize );
242 const Size& GetPaperSize() const;
244 void SetVertical( bool bVertical, bool bTopToBottom = true );
245 bool IsVertical() const;
246 bool IsTopToBottom() const;
248 void SetFixedCellHeight( bool bUseFixedCellHeight );
250 void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
251 EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const;
253 SvtScriptType GetScriptType( const ESelection& rSelection ) const;
254 LanguageType GetLanguage(const EditPaM& rPaM) const;
255 LanguageType GetLanguage( sal_Int32 nPara, sal_Int32 nPos ) const;
257 void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode );
258 EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
260 void SetAsianCompressionMode( sal_uInt16 nCompression );
262 void SetKernAsianPunctuation( bool bEnabled );
264 void SetAddExtLeading( bool b );
266 void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
267 void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
268 void ClearPolygon();
270 const Size& GetMinAutoPaperSize() const;
271 void SetMinAutoPaperSize( const Size& rSz );
273 const Size& GetMaxAutoPaperSize() const;
274 void SetMaxAutoPaperSize( const Size& rSz );
276 OUString GetText( LineEnd eEnd = LINEEND_LF ) const;
277 OUString GetText( const ESelection& rSelection ) const;
278 sal_uInt32 GetTextLen() const;
279 sal_uInt32 GetTextHeight() const;
280 sal_uInt32 GetTextHeightNTP() const;
281 sal_uInt32 CalcTextWidth();
283 OUString GetText( sal_Int32 nParagraph ) const;
284 sal_Int32 GetTextLen( sal_Int32 nParagraph ) const;
285 sal_uInt32 GetTextHeight( sal_Int32 nParagraph ) const;
287 sal_Int32 GetParagraphCount() const;
289 sal_Int32 GetLineCount( sal_Int32 nParagraph ) const;
290 sal_Int32 GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const;
291 void GetLineBoundaries( /*out*/sal_Int32& rStart, /*out*/sal_Int32& rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const;
292 sal_Int32 GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const;
293 sal_uInt32 GetLineHeight( sal_Int32 nParagraph );
294 ParagraphInfos GetParagraphInfos( sal_Int32 nPara );
295 sal_Int32 FindParagraph( long nDocPosY );
296 EPosition FindDocPosition( const Point& rDocPos ) const;
297 Rectangle GetCharacterBounds( const EPosition& rPos ) const;
299 OUString GetWord(sal_Int32 nPara, sal_Int32 nIndex);
301 ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const;
303 void Clear();
304 void SetText( const OUString& rStr );
306 EditTextObject* CreateTextObject();
307 EditTextObject* GetEmptyTextObject() const;
308 EditTextObject* CreateTextObject( sal_Int32 nPara, sal_Int32 nParas = 1 );
309 EditTextObject* CreateTextObject( const ESelection& rESelection );
310 void SetText( const EditTextObject& rTextObject );
312 void RemoveParagraph(sal_Int32 nPara);
313 void InsertParagraph(sal_Int32 nPara, const EditTextObject& rTxtObj);
314 void InsertParagraph(sal_Int32 nPara, const OUString& rText);
316 void SetText(sal_Int32 nPara, const OUString& rText);
318 virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet );
319 const SfxItemSet& GetParaAttribs( sal_Int32 nPara ) const;
321 void GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const;
323 SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags = GetAttribsFlags::ALL ) const;
324 SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All );
326 bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const;
327 const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich );
329 vcl::Font GetStandardFont( sal_Int32 nPara );
330 SvxFont GetStandardSvxFont( sal_Int32 nPara );
332 void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich );
334 void ShowParagraph( sal_Int32 nParagraph, bool bShow );
336 ::svl::IUndoManager& GetUndoManager();
337 ::svl::IUndoManager* SetUndoManager(::svl::IUndoManager* pNew);
338 void UndoActionStart( sal_uInt16 nId );
339 void UndoActionStart(sal_uInt16 nId, const ESelection& rSel);
340 void UndoActionEnd( sal_uInt16 nId );
341 bool IsInUndo();
343 void EnableUndo( bool bEnable );
344 bool IsUndoEnabled();
346 /** returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo
347 This is currently used in a bad but needed hack to get undo actions merged in the
348 OutlineView in impress. Do not use it unless you want to sell your soul too! */
349 bool HasTriedMergeOnLastAddUndo() const;
351 void ClearModifyFlag();
352 void SetModified();
353 bool IsModified() const;
355 void SetModifyHdl( const Link<LinkParamNone*,void>& rLink );
356 Link<LinkParamNone*,void> GetModifyHdl() const;
358 bool IsInSelectionMode() const;
360 void StripPortions();
361 void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList );
363 long GetFirstLineStartX( sal_Int32 nParagraph );
364 Point GetDocPosTopLeft( sal_Int32 nParagraph );
365 Point GetDocPos( const Point& rPaperPos ) const;
366 bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder );
368 // StartDocPos corresponds to VisArea.TopLeft().
369 void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
370 void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos );
371 void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, bool bClip );
372 void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
374 // sal_uInt32: Error code of the stream.
375 sal_uLong Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
376 void Write( SvStream& rOutput, EETextFormat );
378 void SetStatusEventHdl( const Link<EditStatus&,void>& rLink );
379 Link<EditStatus&,void> GetStatusEventHdl() const;
381 void SetNotifyHdl( const Link<EENotify&,void>& rLink );
382 Link<EENotify&,void> GetNotifyHdl() const;
384 void SetImportHdl( const Link<ImportInfo&,void>& rLink );
385 const Link<ImportInfo&,void>& GetImportHdl() const;
387 // Do not evaluate font formatting => For Outliner
388 bool IsFlatMode() const;
389 void SetFlatMode( bool bFlat );
391 void SetControlWord( EEControlBits nWord );
392 EEControlBits GetControlWord() const;
394 void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
395 void QuickMarkInvalid( const ESelection& rSel );
396 void QuickFormatDoc( bool bFull = false );
397 void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
398 void QuickInsertLineBreak( const ESelection& rSel );
399 void QuickInsertText(const OUString& rText, const ESelection& rSel);
400 void QuickDelete( const ESelection& rSel );
401 void QuickMarkToBeRepainted( sal_Int32 nPara );
403 void SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY = 100 );
404 void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ) const;
406 void SetEditTextObjectPool( SfxItemPool* pPool );
407 SfxItemPool* GetEditTextObjectPool() const;
409 void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
410 SfxStyleSheetPool* GetStyleSheetPool();
412 void SetStyleSheet(const EditSelection& aSel, SfxStyleSheet* pStyle);
413 void SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle );
414 const SfxStyleSheet* GetStyleSheet( sal_Int32 nPara ) const;
415 SfxStyleSheet* GetStyleSheet( sal_Int32 nPara );
417 void SetWordDelimiters( const OUString& rDelimiters );
418 const OUString& GetWordDelimiters() const;
420 void EraseVirtualDevice();
422 void SetSpeller( css::uno::Reference<
423 css::linguistic2::XSpellChecker1 > const &xSpeller );
424 css::uno::Reference<
425 css::linguistic2::XSpellChecker1 >
426 GetSpeller();
427 void SetHyphenator( css::uno::Reference<
428 css::linguistic2::XHyphenator >& xHyph );
430 void GetAllMisspellRanges( std::vector<editeng::MisspellRanges>& rRanges ) const;
431 void SetAllMisspellRanges( const std::vector<editeng::MisspellRanges>& rRanges );
433 static void SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars );
435 void SetDefaultLanguage( LanguageType eLang );
436 LanguageType GetDefaultLanguage() const;
438 bool HasOnlineSpellErrors() const;
439 void CompleteOnlineSpelling();
441 bool ShouldCreateBigTextObject() const;
443 // For fast Pre-Test without view:
444 EESpellState HasSpellErrors();
445 void ClearSpellErrors();
446 bool HasText( const SvxSearchItem& rSearchItem );
448 //spell and return a sentence
449 bool SpellSentence(EditView& rEditView, svx::SpellPortions& rToFill, bool bIsGrammarChecking );
450 // put spell position to start of current sentence
451 void PutSpellingToSentenceStart( EditView& rEditView );
452 //applies a changed sentence
453 void ApplyChangedSentence(EditView& rEditView, const svx::SpellPortions& rNewPortions, bool bRecheck );
455 // for text conversion (see also HasSpellErrors)
456 bool HasConvertibleTextPortion( LanguageType nLang );
457 virtual bool ConvertNextDocument();
459 bool UpdateFields();
460 bool UpdateFieldsOnly();
461 void RemoveFields( const std::function<bool ( const SvxFieldData* )>& isFieldData = [] (const SvxFieldData* ){return true;} );
463 sal_uInt16 GetFieldCount( sal_Int32 nPara ) const;
464 EFieldInfo GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const;
466 bool IsRightToLeft( sal_Int32 nPara ) const;
468 css::uno::Reference< css::datatransfer::XTransferable >
469 CreateTransferable( const ESelection& rSelection ) const;
471 // MT: Can't create new virtual functions like for ParagraphInserted/Deleted, musst be compatible in SRC638, change later...
472 void SetBeginMovingParagraphsHdl( const Link<MoveParagraphsInfo&,void>& rLink );
473 void SetEndMovingParagraphsHdl( const Link<MoveParagraphsInfo&,void>& rLink );
474 void SetBeginPasteOrDropHdl( const Link<PasteOrDropInfos&,void>& rLink );
475 void SetEndPasteOrDropHdl( const Link<PasteOrDropInfos&,void>& rLink );
477 virtual void PaintingFirstLine( sal_Int32 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
478 virtual void ParagraphInserted( sal_Int32 nNewParagraph );
479 virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph );
480 virtual void ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph );
481 virtual void ParaAttribsChanged( sal_Int32 nParagraph );
482 virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
483 void ParagraphHeightChanged( sal_Int32 nPara );
485 virtual void DrawingText( const Point& rStartPos, const OUString& rText,
486 sal_Int32 nTextStart, sal_Int32 nTextLen,
487 const long* pDXArray, const SvxFont& rFont,
488 sal_Int32 nPara, sal_uInt8 nRightToLeft,
489 const EEngineData::WrongSpellVector* pWrongSpellVector,
490 const SvxFieldData* pFieldData,
491 bool bEndOfLine,
492 bool bEndOfParagraph,
493 const css::lang::Locale* pLocale,
494 const Color& rOverlineColor,
495 const Color& rTextLineColor);
497 virtual void DrawingTab( const Point& rStartPos, long nWidth, const OUString& rChar,
498 const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft,
499 bool bEndOfLine,
500 bool bEndOfParagraph,
501 const Color& rOverlineColor,
502 const Color& rTextLineColor);
503 virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const;
504 virtual bool SpellNextDocument();
505 virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos );
506 virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rTxtColor, Color*& rFldColor );
508 // override this if access to bullet information needs to be provided
509 virtual const SvxNumberFormat * GetNumberFormat( sal_Int32 nPara ) const;
511 virtual Rectangle GetBulletArea( sal_Int32 nPara );
513 static SfxItemPool* CreatePool( bool bLoadRefCounts = true );
514 static SfxItemPool& GetGlobalItemPool();
515 static bool DoesKeyChangeText( const KeyEvent& rKeyEvent );
516 static bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
517 static bool IsSimpleCharInput( const KeyEvent& rKeyEvent );
518 static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const vcl::Font& rFont );
519 static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont );
520 static vcl::Font CreateFontFromItemSet( const SfxItemSet& rItemSet, SvtScriptType nScriptType );
521 static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet );
522 static bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); }
523 static bool HasValidData( const css::uno::Reference< css::datatransfer::XTransferable >& rTransferable );
524 /** sets a link that is called at the beginning of a drag operation at an edit view */
525 void SetBeginDropHdl( const Link<EditView*,void>& rLink );
526 Link<EditView*,void> GetBeginDropHdl() const;
528 /** sets a link that is called at the end of a drag operation at an edit view */
529 void SetEndDropHdl( const Link<EditView*,void>& rLink );
530 Link<EditView*,void> GetEndDropHdl() const;
532 /// specifies if auto-correction should capitalize the first word or not (default is on)
533 void SetFirstWordCapitalization( bool bCapitalize );
535 /** specifies if auto-correction should replace a leading single quotation
536 mark (apostrophe) or not (default is on) */
537 void SetReplaceLeadingSingleQuotationMark( bool bReplace );
539 EditDoc& GetEditDoc();
540 const EditDoc& GetEditDoc() const;
541 void dumpAsXmlEditDoc(struct _xmlTextWriter* pWriter) const;
543 ParaPortionList& GetParaPortions();
544 const ParaPortionList& GetParaPortions() const;
546 bool IsFormatted() const;
547 bool IsImportHandlerSet() const;
548 bool IsImportRTFStyleSheetsSet() const;
550 void CallImportHandler(ImportInfo& rInfo);
552 void ParaAttribsToCharAttribs(ContentNode* pNode);
554 EditPaM CreateEditPaM(const EPaM& rEPaM);
555 EditPaM ConnectParagraphs(
556 ContentNode* pLeft, ContentNode* pRight, bool bBackward);
558 EditPaM InsertField(const EditSelection& rEditSelection, const SvxFieldItem& rFld);
559 EditPaM InsertText(const EditSelection& aCurEditSelection, const OUString& rStr);
560 EditSelection InsertText(const EditTextObject& rTextObject, const EditSelection& rSel);
561 EditPaM InsertParaBreak(const EditSelection& rEditSelection);
562 EditPaM InsertLineBreak(const EditSelection& rEditSelection);
564 EditPaM CursorLeft(
565 const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = css::i18n::CharacterIteratorMode::SKIPCELL);
566 EditPaM CursorRight(
567 const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = css::i18n::CharacterIteratorMode::SKIPCELL);
569 void SeekCursor(ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont);
571 EditPaM DeleteSelection(const EditSelection& rSel);
573 ESelection CreateESelection(const EditSelection& rSel);
574 EditSelection CreateSelection(const ESelection& rSel);
576 const SfxItemSet& GetBaseParaAttribs(sal_Int32 nPara) const;
577 void SetParaAttribsOnly(sal_Int32 nPara, const SfxItemSet& rSet);
578 void SetAttribs(const EditSelection& rSel, const SfxItemSet& rSet, SetAttribsMode nSpecial = SetAttribsMode::NONE);
580 OUString GetSelected(const EditSelection& rSel) const;
581 EditPaM DeleteSelected(const EditSelection& rSel);
583 SvtScriptType GetScriptType(const EditSelection& rSel) const;
585 void RemoveParaPortion(sal_Int32 nNode);
587 void SetCallParaInsertedOrDeleted(bool b);
588 bool IsCallParaInsertedOrDeleted() const;
590 void AppendDeletedNodeInfo(DeletedNodeInfo* pInfo);
591 void UpdateSelections();
593 void InsertContent(ContentNode* pNode, sal_Int32 nPos);
594 EditPaM SplitContent(sal_Int32 nNode, sal_Int32 nSepPos);
595 EditPaM ConnectContents(sal_Int32 nLeftNode, bool bBackward);
597 void InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem);
599 EditSelection MoveParagraphs(const Range& rParagraphs, sal_Int32 nNewPos);
601 void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false);
602 void RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich);
604 ViewsType& GetEditViews();
605 const ViewsType& GetEditViews() const;
607 void SetUndoMode(bool b);
608 void FormatAndUpdate(EditView* pCurView, bool bCalledFromUndo = false);
610 void Undo(EditView* pView);
611 void Redo(EditView* pView);
613 sal_Int32 GetOverflowingParaNum() const;
614 sal_Int32 GetOverflowingLineNum() const;
615 void ClearOverflowingParaNum();
616 bool IsPageOverflow();
618 // tdf#115639 compatibility flag
619 void SetHoriAlignIgnoreTrailingWhitespace(bool bEnabled);
620 bool IsHoriAlignIgnoreTrailingWhitespace() const;
623 #endif // INCLUDED_EDITENG_EDITENG_HXX
625 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */