fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / editeng / editeng.hxx
blobe55dbacb9ff6c0c87701948d211c583dd9db2203
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 _MyEDITENG_HXX
21 #define _MyEDITENG_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 <i18nlangtag/lang.h>
32 #include "editeng/editengdllapi.h"
34 #include <tools/rtti.hxx> // due to typedef TypeId
36 #include <editeng/eedata.hxx>
38 namespace com { namespace sun { namespace star {
39 namespace linguistic2 {
40 class XSpellChecker1;
41 class XHyphenator;
43 namespace datatransfer {
44 class XTransferable;
46 namespace lang {
47 struct Locale;
49 }}}
51 namespace svx {
52 struct SpellPortion;
53 typedef std::vector<SpellPortion> SpellPortions;
56 namespace svl { class IUndoManager; }
57 namespace basegfx { class B2DPolyPolygon; }
59 class ImpEditEngine;
60 class EditView;
61 class OutputDevice;
62 class EditUndo;
63 class SvxFont;
64 class SfxItemPool;
65 class SfxStyleSheet;
66 class String;
67 class SfxStyleSheetPool;
68 class SvxSearchItem;
69 class SvxFieldItem;
70 class SvxCharSetColorItem;
71 class SfxUndoAction;
72 class MapMode;
73 class Color;
74 class Font;
75 class KeyEvent;
76 class PolyPolygon;
77 class Size;
78 class Point;
79 class Rectangle;
80 class SvStream;
81 class Link;
82 class OutputDevice;
83 class Window;
84 class SfxPoolItem;
85 class SvxNumBulletItem;
86 class SvxBulletItem;
87 class SvxLRSpaceItem;
88 class SvKeyValueIterator;
89 class SvxForbiddenCharactersTable;
90 class SvxNumberFormat;
91 class FontList;
92 class SvxFieldData;
93 class ContentNode;
94 class ParaPortion;
95 class EditSelection;
96 class EditPaM;
97 class EditLine;
98 class InternalEditStatus;
99 class EditSelectionEngine;
100 class EditDoc;
101 struct PasteOrDropInfos;
102 class Range;
103 struct EPaM;
104 class DeletedNodeInfo;
105 class ParaPortionList;
107 //////////////////////////////////////////////////////////////////////////////
109 /** values for GetAttribs
111 const sal_uInt8 EditEngineAttribs_All = 0; /// returns all attributes even when theire not set
112 const sal_uInt8 EditEngineAttribs_HardAndPara = 1; /// returns all attributes set on paragraph and on portions
113 const sal_uInt8 EditEngineAttribs_OnlyHard = 2; /// returns only attributes hard set on portions
115 #define GETATTRIBS_STYLESHEET (sal_uInt8)0x01
116 #define GETATTRIBS_PARAATTRIBS (sal_uInt8)0x02
117 #define GETATTRIBS_CHARATTRIBS (sal_uInt8)0x04
118 #define GETATTRIBS_ALL (sal_uInt8)0xFF
120 class EDITENG_DLLPUBLIC EditEngine
122 friend class EditView;
123 friend class ImpEditView;
124 friend class EditDbg;
125 friend class Outliner;
127 public:
128 typedef std::vector<EditView*> ViewsType;
130 private:
131 ImpEditEngine* pImpEditEngine;
133 EDITENG_DLLPRIVATE EditEngine( const EditEngine& );
134 EDITENG_DLLPRIVATE EditEngine& operator=( const EditEngine& );
135 EDITENG_DLLPRIVATE sal_uInt8 PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, Window* pFrameWin = NULL );
137 EDITENG_DLLPRIVATE void CursorMoved(ContentNode* pPrevNode);
138 EDITENG_DLLPRIVATE void CheckIdleFormatter();
139 EDITENG_DLLPRIVATE bool IsIdleFormatterActive() const;
140 EDITENG_DLLPRIVATE ParaPortion* FindParaPortion(ContentNode* pNode);
141 EDITENG_DLLPRIVATE const ParaPortion* FindParaPortion(ContentNode* pNode) const;
142 EDITENG_DLLPRIVATE const ParaPortion* GetPrevVisPortion(const ParaPortion* pCurPortion) const;
144 EDITENG_DLLPRIVATE com::sun::star::uno::Reference<
145 com::sun::star::datatransfer::XTransferable>
146 CreateTransferable(const EditSelection& rSelection);
148 EDITENG_DLLPRIVATE EditSelection InsertText(
149 com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable >& rxDataObj,
150 const String& rBaseURL, const EditPaM& rPaM, bool bUseSpecial);
152 EDITENG_DLLPRIVATE EditPaM EndOfWord(
153 const EditPaM& rPaM, sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES);
155 EDITENG_DLLPRIVATE EditPaM GetPaM(const Point& aDocPos, bool bSmart = true);
157 EDITENG_DLLPRIVATE EditSelection SelectWord(
158 const EditSelection& rCurSelection,
159 sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES,
160 bool bAcceptStartOfWord = true);
162 EDITENG_DLLPRIVATE long GetXPos(
163 const ParaPortion* pParaPortion, const EditLine* pLine, sal_uInt16 nIndex, bool bPreferPortionStart = false) const;
165 EDITENG_DLLPRIVATE Range GetLineXPosStartEnd(
166 const ParaPortion* pParaPortion, const EditLine* pLine) const;
168 EDITENG_DLLPRIVATE sal_uInt16 GetOnePixelInRef() const;
169 EDITENG_DLLPRIVATE InternalEditStatus& GetInternalEditStatus();
171 EDITENG_DLLPRIVATE void HandleBeginPasteOrDrop(PasteOrDropInfos& rInfos);
172 EDITENG_DLLPRIVATE void HandleEndPasteOrDrop(PasteOrDropInfos& rInfos);
173 EDITENG_DLLPRIVATE bool HasText() const;
174 EDITENG_DLLPRIVATE const EditSelectionEngine& GetSelectionEngine() const;
175 EDITENG_DLLPRIVATE void SetInSelectionMode(bool b);
177 protected:
180 public:
181 EditEngine( SfxItemPool* pItemPool );
182 virtual ~EditEngine();
184 const SfxItemSet& GetEmptyItemSet();
186 void SetDefTab( sal_uInt16 nDefTab );
188 void SetRefDevice( OutputDevice* pRefDef );
189 OutputDevice* GetRefDevice() const;
191 void SetRefMapMode( const MapMode& rMapMode );
192 MapMode GetRefMapMode();
194 void SetUpdateMode( sal_Bool bUpdate );
195 sal_Bool GetUpdateMode() const;
197 void SetBackgroundColor( const Color& rColor );
198 Color GetBackgroundColor() const;
199 Color GetAutoColor() const;
200 void EnableAutoColor( sal_Bool b );
201 void ForceAutoColor( sal_Bool b );
202 sal_Bool IsForceAutoColor() const;
204 void InsertView(EditView* pEditView, size_t nIndex = EE_APPEND);
205 EditView* RemoveView( EditView* pEditView );
206 EditView* RemoveView(size_t nIndex = EE_APPEND);
207 EditView* GetView(size_t nIndex = 0) const;
208 size_t GetViewCount() const;
209 sal_Bool HasView( EditView* pView ) const;
210 EditView* GetActiveView() const;
211 void SetActiveView(EditView* pView);
213 void SetPaperSize( const Size& rSize );
214 const Size& GetPaperSize() const;
216 void SetVertical( bool bVertical );
217 bool IsVertical() const;
219 void SetFixedCellHeight( sal_Bool bUseFixedCellHeight );
221 void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
222 EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const;
224 sal_uInt16 GetScriptType( const ESelection& rSelection ) const;
225 LanguageType GetLanguage(const EditPaM& rPaM) const;
226 LanguageType GetLanguage( sal_Int32 nPara, sal_uInt16 nPos ) const;
228 void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode );
229 EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
231 void SetAsianCompressionMode( sal_uInt16 nCompression );
233 void SetKernAsianPunctuation( sal_Bool bEnabled );
235 void SetAddExtLeading( sal_Bool b );
237 void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
238 void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
239 void ClearPolygon();
241 const Size& GetMinAutoPaperSize() const;
242 void SetMinAutoPaperSize( const Size& rSz );
244 const Size& GetMaxAutoPaperSize() const;
245 void SetMaxAutoPaperSize( const Size& rSz );
247 OUString GetText( LineEnd eEnd = LINEEND_LF ) const;
248 String GetText( const ESelection& rSelection, const LineEnd eEnd = LINEEND_LF ) const;
249 sal_uInt32 GetTextLen() const;
250 sal_uInt32 GetTextHeight() const;
251 sal_uInt32 GetTextHeightNTP() const;
252 sal_uInt32 CalcTextWidth();
254 String GetText( sal_Int32 nParagraph ) const;
255 xub_StrLen GetTextLen( sal_Int32 nParagraph ) const;
256 sal_uInt32 GetTextHeight( sal_Int32 nParagraph ) const;
258 sal_Int32 GetParagraphCount() const;
260 sal_uInt16 GetLineCount( sal_Int32 nParagraph ) const;
261 xub_StrLen GetLineLen( sal_Int32 nParagraph, sal_uInt16 nLine ) const;
262 void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const;
263 sal_uInt16 GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const;
264 sal_uInt32 GetLineHeight( sal_Int32 nParagraph, sal_uInt16 nLine = 0 );
265 ParagraphInfos GetParagraphInfos( sal_Int32 nPara );
266 sal_Int32 FindParagraph( long nDocPosY );
267 EPosition FindDocPosition( const Point& rDocPos ) const;
268 Rectangle GetCharacterBounds( const EPosition& rPos ) const;
270 String GetWord( sal_Int32 nPara, xub_StrLen nIndex );
272 ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const;
274 void Clear();
275 void SetText( const OUString& rStr );
277 EditTextObject* CreateTextObject();
278 EditTextObject* CreateTextObject( sal_Int32 nPara, sal_Int32 nParas = 1 );
279 EditTextObject* CreateTextObject( const ESelection& rESelection );
280 void SetText( const EditTextObject& rTextObject );
282 void RemoveParagraph( sal_Int32 nPara );
283 void InsertParagraph( sal_Int32 nPara, const EditTextObject& rTxtObj );
284 void InsertParagraph( sal_Int32 nPara, const String& rText);
286 void SetText( sal_Int32 nPara, const String& rText);
288 virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet );
289 virtual const SfxItemSet& GetParaAttribs( sal_Int32 nPara ) const;
291 void GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const;
293 SfxItemSet GetAttribs( sal_Int32 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const;
294 SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All );
296 sal_Bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const;
297 const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich );
299 Font GetStandardFont( sal_Int32 nPara );
300 SvxFont GetStandardSvxFont( sal_Int32 nPara );
302 void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
304 void ShowParagraph( sal_Int32 nParagraph, sal_Bool bShow = sal_True );
306 ::svl::IUndoManager&
307 GetUndoManager();
308 void UndoActionStart( sal_uInt16 nId );
309 void UndoActionStart(sal_uInt16 nId, const ESelection& rSel);
310 void UndoActionEnd( sal_uInt16 nId );
311 sal_Bool IsInUndo();
313 void EnableUndo( sal_Bool bEnable );
314 sal_Bool IsUndoEnabled();
316 /** returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo
317 This is currently used in a bad but needed hack to get undo actions merged in the
318 OutlineView in impress. Do not use it unless you want to sell your soul too! */
319 bool HasTriedMergeOnLastAddUndo() const;
321 void ClearModifyFlag();
322 void SetModified();
323 sal_Bool IsModified() const;
325 void SetModifyHdl( const Link& rLink );
326 Link GetModifyHdl() const;
328 sal_Bool IsInSelectionMode() const;
330 void StripPortions();
331 void GetPortions( sal_Int32 nPara, std::vector<sal_uInt16>& rList );
333 long GetFirstLineStartX( sal_Int32 nParagraph );
334 Point GetDocPosTopLeft( sal_Int32 nParagraph );
335 Point GetDocPos( const Point& rPaperPos ) const;
336 sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
338 // StartDocPos corrresponds to VisArea.TopLeft().
339 void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
340 void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos );
341 void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, sal_Bool bClip );
342 void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
344 // sal_uInt32: Error code of the stream.
345 sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
346 sal_uLong Write( SvStream& rOutput, EETextFormat );
348 void SetStatusEventHdl( const Link& rLink );
349 Link GetStatusEventHdl() const;
351 void SetNotifyHdl( const Link& rLink );
352 Link GetNotifyHdl() const;
354 void SetImportHdl( const Link& rLink );
355 Link GetImportHdl() const;
357 // Do not evaluate font formatting => For Outliner
358 sal_Bool IsFlatMode() const;
359 void SetFlatMode( sal_Bool bFlat );
361 void SetControlWord( sal_uInt32 nWord );
362 sal_uInt32 GetControlWord() const;
364 void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
365 void QuickRemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 );
366 void QuickMarkInvalid( const ESelection& rSel );
367 void QuickFormatDoc( sal_Bool bFull = sal_False );
368 void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
369 void QuickInsertLineBreak( const ESelection& rSel );
370 void QuickInsertText( const String& rText, const ESelection& rSel );
371 void QuickDelete( const ESelection& rSel );
372 void QuickMarkToBeRepainted( sal_Int32 nPara );
374 void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
375 void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ) const;
377 void SetEditTextObjectPool( SfxItemPool* pPool );
378 SfxItemPool* GetEditTextObjectPool() const;
380 void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
381 SfxStyleSheetPool* GetStyleSheetPool();
383 void SetStyleSheet(const EditSelection& aSel, SfxStyleSheet* pStyle);
384 void SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle );
385 const SfxStyleSheet* GetStyleSheet( sal_Int32 nPara ) const;
386 SfxStyleSheet* GetStyleSheet( sal_Int32 nPara );
388 void SetWordDelimiters( const String& rDelimiters );
389 String GetWordDelimiters() const;
391 void EraseVirtualDevice();
393 void SetSpeller( ::com::sun::star::uno::Reference<
394 ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller );
395 ::com::sun::star::uno::Reference<
396 ::com::sun::star::linguistic2::XSpellChecker1 >
397 GetSpeller();
398 void SetHyphenator( ::com::sun::star::uno::Reference<
399 ::com::sun::star::linguistic2::XHyphenator >& xHyph );
401 void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
403 void SetDefaultLanguage( LanguageType eLang );
404 LanguageType GetDefaultLanguage() const;
406 sal_Bool HasOnlineSpellErrors() const;
407 void CompleteOnlineSpelling();
409 sal_Bool ShouldCreateBigTextObject() const;
411 // For fast Pre-Test without view:
412 EESpellState HasSpellErrors();
413 sal_Bool HasText( const SvxSearchItem& rSearchItem );
415 //initialize sentence spelling
416 void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc);
417 //spell and return a sentence
418 bool SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking );
419 // put spell position to start of current sentence
420 void PutSpellingToSentenceStart( EditView& rEditView );
421 //applies a changed sentence
422 void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
424 // for text conversion (see also HasSpellErrors)
425 sal_Bool HasConvertibleTextPortion( LanguageType nLang );
426 virtual sal_Bool ConvertNextDocument();
428 bool UpdateFields();
429 bool UpdateFieldsOnly();
430 void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL );
432 sal_uInt16 GetFieldCount( sal_Int32 nPara ) const;
433 EFieldInfo GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const;
435 sal_Bool IsRightToLeft( sal_Int32 nPara ) const;
437 ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
438 CreateTransferable( const ESelection& rSelection ) const;
440 // MT: Can't create new virtual functions like for ParagraphInserted/Deleted, musst be compatible in SRC638, change later...
441 void SetBeginMovingParagraphsHdl( const Link& rLink );
442 void SetEndMovingParagraphsHdl( const Link& rLink );
443 void SetBeginPasteOrDropHdl( const Link& rLink );
444 void SetEndPasteOrDropHdl( const Link& rLink );
446 virtual void PaintingFirstLine( sal_Int32 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
447 virtual void ParagraphInserted( sal_Int32 nNewParagraph );
448 virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph );
449 virtual void ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph );
450 virtual void ParaAttribsChanged( sal_Int32 nParagraph );
451 virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
452 virtual void ParagraphHeightChanged( sal_Int32 nPara );
454 virtual void DrawingText(
455 const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray,
456 const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
457 const EEngineData::WrongSpellVector* pWrongSpellVector,
458 const SvxFieldData* pFieldData,
459 bool bEndOfLine,
460 bool bEndOfParagraph,
461 bool bEndOfBullet,
462 const ::com::sun::star::lang::Locale* pLocale,
463 const Color& rOverlineColor,
464 const Color& rTextLineColor);
466 virtual void DrawingTab(
467 const Point& rStartPos, long nWidth, const String& rChar,
468 const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
469 bool bEndOfLine,
470 bool bEndOfParagraph,
471 const Color& rOverlineColor,
472 const Color& rTextLineColor);
473 virtual String GetUndoComment( sal_uInt16 nUndoId ) const;
474 virtual sal_Bool FormattingParagraph( sal_Int32 nPara );
475 virtual sal_Bool SpellNextDocument();
476 virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
477 virtual void FieldSelected( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
478 virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
480 // to be overloaded if access to bullet information needs to be provided
481 virtual const SvxNumberFormat * GetNumberFormat( sal_Int32 nPara ) const;
483 virtual Rectangle GetBulletArea( sal_Int32 nPara );
485 static SfxItemPool* CreatePool( sal_Bool bLoadRefCounts = sal_True );
486 static SfxItemPool& GetGlobalItemPool();
487 static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent );
488 static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
489 static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent );
490 static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont );
491 static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont );
492 static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType );
493 static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet );
494 static sal_Bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); }
495 static sal_Bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable );
497 /** sets a link that is called at the beginning of a drag operation at an edit view */
498 void SetBeginDropHdl( const Link& rLink );
499 Link GetBeginDropHdl() const;
501 /** sets a link that is called at the end of a drag operation at an edit view */
502 void SetEndDropHdl( const Link& rLink );
503 Link GetEndDropHdl() const;
505 /// specifies if auto-correction should capitalize the first word or not (default is on)
506 void SetFirstWordCapitalization( sal_Bool bCapitalize );
508 EditDoc& GetEditDoc();
509 const EditDoc& GetEditDoc() const;
511 ParaPortionList& GetParaPortions();
512 const ParaPortionList& GetParaPortions() const;
514 bool IsFormatted() const;
515 bool IsImportHandlerSet() const;
516 bool IsImportRTFStyleSheetsSet() const;
518 void CallImportHandler(ImportInfo& rInfo);
520 void ParaAttribsToCharAttribs(ContentNode* pNode);
522 EditPaM CreateEditPaM(const EPaM& rEPaM);
523 EditPaM ConnectParagraphs(
524 ContentNode* pLeft, ContentNode* pRight, bool bBackward = false);
526 EditPaM InsertField(const EditSelection& rEditSelection, const SvxFieldItem& rFld);
527 EditPaM InsertText(const EditSelection& aCurEditSelection, const String& rStr);
528 EditSelection InsertText(const EditTextObject& rTextObject, const EditSelection& rSel);
529 EditPaM InsertParaBreak(
530 const EditSelection& rEditSelection, bool bKeepEndingAttribs = true);
531 EditPaM InsertLineBreak(const EditSelection& rEditSelection);
533 EditPaM CursorLeft(
534 const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = com::sun::star::i18n::CharacterIteratorMode::SKIPCELL);
535 EditPaM CursorRight(
536 const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = com::sun::star::i18n::CharacterIteratorMode::SKIPCELL);
538 void SeekCursor(
539 ContentNode* pNode, sal_uInt16 nPos, SvxFont& rFont, OutputDevice* pOut = NULL, sal_uInt16 nIgnoreWhich = 0);
541 EditPaM DeleteSelection(const EditSelection& rSel);
543 ESelection CreateESelection(const EditSelection& rSel);
544 EditSelection CreateSelection(const ESelection& rSel);
546 const SfxItemSet& GetBaseParaAttribs(sal_Int32 nPara) const;
547 void SetParaAttribsOnly(sal_Int32 nPara, const SfxItemSet& rSet);
548 void SetAttribs(const EditSelection& rSel, const SfxItemSet& rSet, sal_uInt8 nSpecial = 0);
550 String GetSelected(const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF) const;
551 EditPaM DeleteSelected(const EditSelection& rSel);
553 sal_uInt16 GetScriptType(const EditSelection& rSel) const;
555 void RemoveParaPortion(sal_Int32 nNode);
557 void SetCallParaInsertedOrDeleted(bool b);
558 bool IsCallParaInsertedOrDeleted() const;
560 void AppendDeletedNodeInfo(DeletedNodeInfo* pInfo);
561 void UpdateSelections();
563 void InsertContent(ContentNode* pNode, sal_Int32 nPos);
564 EditPaM SplitContent(sal_Int32 nNode, sal_uInt16 nSepPos);
565 EditPaM ConnectContents(sal_Int32 nLeftNode, bool bBackward);
567 EditPaM InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem);
569 EditSelection MoveParagraphs(const Range& rParagraphs, sal_Int32 nNewPos, EditView* pCurView);
571 void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false);
572 void RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich = 0);
574 ViewsType& GetEditViews();
575 const ViewsType& GetEditViews() const;
577 void SetUndoMode(bool b);
578 void FormatAndUpdate(EditView* pCurView = NULL);
580 bool Undo(EditView* pView);
581 bool Redo(EditView* pView);
584 #endif // _MyEDITENG_HXX
586 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */