LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/editeng - editeng.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 1 0.0 %
Date: 2012-12-27 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : // MyEDITENG, due to exported EditEng
      20             : #ifndef _MyEDITENG_HXX
      21             : #define _MyEDITENG_HXX
      22             : 
      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>
      28             : 
      29             : #include <rsc/rscsfx.hxx>
      30             : #include <editeng/editdata.hxx>
      31             : #include <i18npool/lang.h>
      32             : #include "editeng/editengdllapi.h"
      33             : 
      34             : #include <tools/rtti.hxx>   // due to typedef TypeId
      35             : 
      36             : #include <editeng/eedata.hxx>
      37             : 
      38             : namespace com { namespace sun { namespace star {
      39             :   namespace linguistic2 {
      40             :     class XSpellChecker1;
      41             :     class XHyphenator;
      42             :   }
      43             :   namespace datatransfer {
      44             :     class XTransferable;
      45             :   }
      46             :   namespace lang {
      47             :     struct Locale;
      48             :   }
      49             : }}}
      50             : 
      51             : namespace svx {
      52             : struct SpellPortion;
      53             : typedef std::vector<SpellPortion> SpellPortions;
      54             : }
      55             : 
      56             : namespace svl { class IUndoManager; }
      57             : namespace basegfx { class B2DPolyPolygon; }
      58             : 
      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;
     106             : 
     107             : //////////////////////////////////////////////////////////////////////////////
     108             : 
     109             : /** values for GetAttribs
     110             : */
     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
     114             : 
     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
     119             : 
     120             : class EDITENG_DLLPUBLIC EditEngine
     121             : {
     122             :     friend class EditView;
     123             :     friend class ImpEditView;
     124             :     friend class EditDbg;
     125             :     friend class Outliner;
     126             : 
     127             : public:
     128             :     typedef std::vector<EditView*> ViewsType;
     129             : 
     130             : private:
     131             :     ImpEditEngine*  pImpEditEngine;
     132             : 
     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 );
     136             : 
     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;
     143             : 
     144             :     EDITENG_DLLPRIVATE com::sun::star::uno::Reference<
     145             :         com::sun::star::datatransfer::XTransferable>
     146             :             CreateTransferable(const EditSelection& rSelection);
     147             : 
     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);
     151             : 
     152             :     EDITENG_DLLPRIVATE EditPaM EndOfWord(
     153             :         const EditPaM& rPaM, sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES);
     154             : 
     155             :     EDITENG_DLLPRIVATE EditPaM GetPaM(const Point& aDocPos, bool bSmart = true);
     156             : 
     157             :     EDITENG_DLLPRIVATE EditSelection SelectWord(
     158             :         const EditSelection& rCurSelection,
     159             :         sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES,
     160             :         bool bAcceptStartOfWord = true);
     161             : 
     162             :     EDITENG_DLLPRIVATE long GetXPos(
     163             :         const ParaPortion* pParaPortion, const EditLine* pLine, sal_uInt16 nIndex, bool bPreferPortionStart = false) const;
     164             : 
     165             :     EDITENG_DLLPRIVATE Range GetLineXPosStartEnd(
     166             :         const ParaPortion* pParaPortion, const EditLine* pLine) const;
     167             : 
     168             :     EDITENG_DLLPRIVATE sal_uInt16 GetOnePixelInRef() const;
     169             :     EDITENG_DLLPRIVATE InternalEditStatus& GetInternalEditStatus();
     170             : 
     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);
     176             : 
     177             : protected:
     178             : 
     179             : 
     180             : public:
     181             :                     EditEngine( SfxItemPool* pItemPool );
     182             :     virtual         ~EditEngine();
     183             : 
     184             :     const SfxItemSet&   GetEmptyItemSet();
     185             : 
     186             :     void            SetDefTab( sal_uInt16 nDefTab );
     187             : 
     188             :     void            SetRefDevice( OutputDevice* pRefDef );
     189             :     OutputDevice*   GetRefDevice() const;
     190             : 
     191             :     void            SetRefMapMode( const MapMode& rMapMode );
     192             :     MapMode         GetRefMapMode();
     193             : 
     194             :     void            SetUpdateMode( sal_Bool bUpdate );
     195             :     sal_Bool            GetUpdateMode() const;
     196             : 
     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;
     203             : 
     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);
     212             : 
     213             :     void            SetPaperSize( const Size& rSize );
     214             :     const Size&     GetPaperSize() const;
     215             : 
     216             :     void            SetVertical( bool bVertical );
     217             :     bool            IsVertical() const;
     218             : 
     219             :     void            SetFixedCellHeight( sal_Bool bUseFixedCellHeight );
     220             : 
     221             :     void                        SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
     222             :     EEHorizontalTextDirection   GetDefaultHorizontalTextDirection() const;
     223             : 
     224             :     sal_uInt16          GetScriptType( const ESelection& rSelection ) const;
     225             :     LanguageType    GetLanguage(const EditPaM& rPaM) const;
     226             :     LanguageType    GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const;
     227             : 
     228             :     void            TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode );
     229             :     EditSelection   TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
     230             : 
     231             :     void            SetAsianCompressionMode( sal_uInt16 nCompression );
     232             : 
     233             :     void            SetKernAsianPunctuation( sal_Bool bEnabled );
     234             : 
     235             :     void            SetAddExtLeading( sal_Bool b );
     236             : 
     237             :     void                SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
     238             :     void                SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
     239             :     void                ClearPolygon();
     240             : 
     241             :     const Size&     GetMinAutoPaperSize() const;
     242             :     void            SetMinAutoPaperSize( const Size& rSz );
     243             : 
     244             :     const Size&     GetMaxAutoPaperSize() const;
     245             :     void            SetMaxAutoPaperSize( const Size& rSz );
     246             : 
     247             :     String          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();
     253             : 
     254             :     String          GetText( sal_uInt16 nParagraph ) const;
     255             :     xub_StrLen      GetTextLen( sal_uInt16 nParagraph ) const;
     256             :     sal_uInt32      GetTextHeight( sal_uInt16 nParagraph ) const;
     257             : 
     258             :     sal_uInt16          GetParagraphCount() const;
     259             : 
     260             :     sal_uInt16          GetLineCount( sal_uInt16 nParagraph ) const;
     261             :     xub_StrLen      GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
     262             :     void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
     263             :     sal_uInt16          GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
     264             :     sal_uInt32      GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine = 0 );
     265             :     ParagraphInfos  GetParagraphInfos( sal_uInt16 nPara );
     266             :     sal_uInt16          FindParagraph( long nDocPosY );
     267             :     EPosition       FindDocPosition( const Point& rDocPos ) const;
     268             :     Rectangle       GetCharacterBounds( const EPosition& rPos ) const;
     269             : 
     270             :     String          GetWord( sal_uInt16 nPara, xub_StrLen nIndex );
     271             : 
     272             :     ESelection      GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const;
     273             : 
     274             :     void            Clear();
     275             :     void            SetText( const String& rStr );
     276             : 
     277             :     EditTextObject* CreateTextObject();
     278             :     EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 );
     279             :     EditTextObject* CreateTextObject( const ESelection& rESelection );
     280             :     void            SetText( const EditTextObject& rTextObject );
     281             : 
     282             :     void            RemoveParagraph( sal_uInt16 nPara );
     283             :     void            InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj );
     284             :     void            InsertParagraph( sal_uInt16 nPara, const String& rText);
     285             : 
     286             :     void            SetText( sal_uInt16 nPara, const String& rText);
     287             : 
     288             :     virtual void                SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
     289             :     virtual const SfxItemSet&   GetParaAttribs( sal_uInt16 nPara ) const;
     290             : 
     291             :     void                GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAttrib>& rLst ) const;
     292             : 
     293             :     SfxItemSet          GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const;
     294             :     SfxItemSet          GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All );
     295             : 
     296             :     sal_Bool                HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
     297             :     const SfxPoolItem&  GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich );
     298             : 
     299             :     Font            GetStandardFont( sal_uInt16 nPara );
     300             :     SvxFont         GetStandardSvxFont( sal_uInt16 nPara );
     301             : 
     302             :     void            RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
     303             : 
     304             :     void            ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow = sal_True );
     305             : 
     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();
     312             : 
     313             :     void            EnableUndo( sal_Bool bEnable );
     314             :     sal_Bool            IsUndoEnabled();
     315             : 
     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;
     320             : 
     321             :     void            ClearModifyFlag();
     322             :     void            SetModified();
     323             :     sal_Bool            IsModified() const;
     324             : 
     325             :     void            SetModifyHdl( const Link& rLink );
     326             :     Link            GetModifyHdl() const;
     327             : 
     328             :     sal_Bool            IsInSelectionMode() const;
     329             : 
     330             :     void            StripPortions();
     331             :     void            GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList );
     332             : 
     333             :     long            GetFirstLineStartX( sal_uInt16 nParagraph );
     334             :     Point           GetDocPosTopLeft( sal_uInt16 nParagraph );
     335             :     Point           GetDocPos( const Point& rPaperPos ) const;
     336             :     sal_Bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
     337             : 
     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 );
     343             : 
     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 );
     347             : 
     348             :     void            SetStatusEventHdl( const Link& rLink );
     349             :     Link            GetStatusEventHdl() const;
     350             : 
     351             :     void            SetNotifyHdl( const Link& rLink );
     352             :     Link            GetNotifyHdl() const;
     353             : 
     354             :     void            SetImportHdl( const Link& rLink );
     355             :     Link            GetImportHdl() const;
     356             : 
     357             :     // Do not evaluate font formatting => For Outliner
     358             :     sal_Bool            IsFlatMode() const;
     359             :     void            SetFlatMode( sal_Bool bFlat );
     360             : 
     361             :     void            SetControlWord( sal_uInt32 nWord );
     362             :     sal_uInt32      GetControlWord() const;
     363             : 
     364             :     void            QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
     365             :     void            QuickRemoveCharAttribs( sal_uInt16 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_uInt16 nPara );
     373             : 
     374             :     void            SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
     375             :     void            GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY );
     376             : 
     377             :     void            SetEditTextObjectPool( SfxItemPool* pPool );
     378             :     SfxItemPool*    GetEditTextObjectPool() const;
     379             : 
     380             :     void                SetStyleSheetPool( SfxStyleSheetPool* pSPool );
     381             :     SfxStyleSheetPool*  GetStyleSheetPool();
     382             : 
     383             :     void SetStyleSheet(const EditSelection& aSel, SfxStyleSheet* pStyle);
     384             :     void                SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle );
     385             :     const SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const;
     386             :     SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara );
     387             : 
     388             :     void            SetWordDelimiters( const String& rDelimiters );
     389             :     String          GetWordDelimiters() const;
     390             : 
     391             :     void            EraseVirtualDevice();
     392             : 
     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 );
     400             : 
     401             :     void            SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
     402             : 
     403             :     void            SetDefaultLanguage( LanguageType eLang );
     404             :     LanguageType    GetDefaultLanguage() const;
     405             : 
     406             :     sal_Bool            HasOnlineSpellErrors() const;
     407             :     void            CompleteOnlineSpelling();
     408             : 
     409             :     sal_Bool            ShouldCreateBigTextObject() const;
     410             : 
     411             :     // For fast Pre-Test without view:
     412             :     EESpellState    HasSpellErrors();
     413             :     sal_Bool            HasText( const SvxSearchItem& rSearchItem );
     414             : 
     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 );
     423             : 
     424             :     // for text conversion (see also HasSpellErrors)
     425             :     sal_Bool        HasConvertibleTextPortion( LanguageType nLang );
     426             :     virtual sal_Bool    ConvertNextDocument();
     427             : 
     428             :     bool UpdateFields();
     429             :     bool UpdateFieldsOnly();
     430             :     void            RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL );
     431             : 
     432             :     sal_uInt16          GetFieldCount( sal_uInt16 nPara ) const;
     433             :     EFieldInfo      GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
     434             : 
     435             :     sal_Bool            IsRightToLeft( sal_uInt16 nPara ) const;
     436             : 
     437             :     ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
     438             :                     CreateTransferable( const ESelection& rSelection ) const;
     439             : 
     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 );
     445             : 
     446             :     virtual void    PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
     447             :     virtual void    ParagraphInserted( sal_uInt16 nNewParagraph );
     448             :     virtual void    ParagraphDeleted( sal_uInt16 nDeletedParagraph );
     449             :     virtual void    ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph );
     450             :     virtual void    ParaAttribsChanged( sal_uInt16 nParagraph );
     451             :     virtual void    StyleSheetChanged( SfxStyleSheet* pStyle );
     452             :     virtual void    ParagraphHeightChanged( sal_uInt16 nPara );
     453             : 
     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_uInt16 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);
     465             : 
     466             :     virtual void DrawingTab(
     467             :         const Point& rStartPos, long nWidth, const String& rChar,
     468             :         const SvxFont& rFont, sal_uInt16 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_uInt16 nPara );
     475             :     virtual sal_Bool    SpellNextDocument();
     476             :     virtual void    FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
     477             :     virtual void    FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
     478             :     virtual String  CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
     479             : 
     480             :     // to be overloaded if access to bullet information needs to be provided
     481             :     virtual const SvxNumberFormat * GetNumberFormat( sal_uInt16 nPara ) const;
     482             : 
     483             :     virtual Rectangle GetBulletArea( sal_uInt16 nPara );
     484             : 
     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           0 :     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 );
     496             : 
     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;
     500             : 
     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;
     504             : 
     505             :     /// specifies if auto-correction should capitalize the first word or not (default is on)
     506             :     void            SetFirstWordCapitalization( sal_Bool bCapitalize );
     507             : 
     508             :     EditDoc& GetEditDoc();
     509             :     const EditDoc& GetEditDoc() const;
     510             : 
     511             :     ParaPortionList& GetParaPortions();
     512             :     const ParaPortionList& GetParaPortions() const;
     513             : 
     514             :     bool IsFormatted() const;
     515             :     bool IsImportHandlerSet() const;
     516             :     bool IsImportRTFStyleSheetsSet() const;
     517             : 
     518             :     void CallImportHandler(ImportInfo& rInfo);
     519             : 
     520             :     void ParaAttribsToCharAttribs(ContentNode* pNode);
     521             : 
     522             :     EditPaM CreateEditPaM(const EPaM& rEPaM);
     523             :     EditPaM ConnectParagraphs(
     524             :         ContentNode* pLeft, ContentNode* pRight, bool bBackward = false);
     525             : 
     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);
     532             : 
     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);
     537             : 
     538             :     void SeekCursor(
     539             :         ContentNode* pNode, sal_uInt16 nPos, SvxFont& rFont, OutputDevice* pOut = NULL, sal_uInt16 nIgnoreWhich = 0);
     540             : 
     541             :     EditPaM DeleteSelection(const EditSelection& rSel);
     542             : 
     543             :     ESelection CreateESelection(const EditSelection& rSel);
     544             :     EditSelection CreateSelection(const ESelection& rSel);
     545             : 
     546             :     const SfxItemSet& GetBaseParaAttribs(sal_uInt16 nPara) const;
     547             :     void SetParaAttribsOnly(sal_uInt16 nPara, const SfxItemSet& rSet);
     548             :     void SetAttribs(const EditSelection& rSel, const SfxItemSet& rSet, sal_uInt8 nSpecial = 0);
     549             : 
     550             :     String GetSelected(const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF) const;
     551             :     EditPaM DeleteSelected(const EditSelection& rSel);
     552             : 
     553             :     sal_uInt16 GetScriptType(const EditSelection& rSel) const;
     554             : 
     555             :     void RemoveParaPortion(size_t nNode);
     556             : 
     557             :     void SetCallParaInsertedOrDeleted(bool b);
     558             :     bool IsCallParaInsertedOrDeleted() const;
     559             : 
     560             :     void AppendDeletedNodeInfo(DeletedNodeInfo* pInfo);
     561             :     void UpdateSelections();
     562             : 
     563             :     void InsertContent(ContentNode* pNode, sal_uInt16 nPos);
     564             :     EditPaM SplitContent(sal_uInt16 nNode, sal_uInt16 nSepPos);
     565             :     EditPaM ConnectContents(sal_uInt16 nLeftNode, bool bBackward);
     566             : 
     567             :     EditPaM InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem);
     568             : 
     569             :     EditSelection MoveParagraphs(const Range& rParagraphs, sal_uInt16 nNewPos, EditView* pCurView);
     570             : 
     571             :     void RemoveCharAttribs(sal_uInt16 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false);
     572             :     void RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich = 0);
     573             : 
     574             :     ViewsType& GetEditViews();
     575             :     const ViewsType& GetEditViews() const;
     576             : 
     577             :     void SetUndoMode(bool b);
     578             :     void FormatAndUpdate(EditView* pCurView = NULL);
     579             : 
     580             :     bool Undo(EditView* pView);
     581             :     bool Redo(EditView* pView);
     582             : };
     583             : 
     584             : #endif // _MyEDITENG_HXX
     585             : 
     586             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10