LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/editeng - outliner.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 52 90 57.8 %
Date: 2013-07-09 Functions: 37 66 56.1 %
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             : #ifndef _OUTLINER_HXX
      20             : #define _OUTLINER_HXX
      21             : 
      22             : #include <tools/gen.hxx>
      23             : #include <tools/string.hxx>
      24             : 
      25             : #include <svl/brdcst.hxx>
      26             : 
      27             : #include <editeng/editdata.hxx>
      28             : #include <editeng/numitem.hxx>
      29             : #include <i18nlangtag/lang.h>
      30             : #include <tools/color.hxx>
      31             : #include <tools/contnr.hxx>
      32             : #include <vcl/graph.hxx>
      33             : #include <tools/link.hxx>
      34             : #include <rsc/rscsfx.hxx>
      35             : #include "editeng/editengdllapi.h"
      36             : #include <com/sun/star/lang/Locale.hpp>
      37             : 
      38             : #include <svtools/grfmgr.hxx>
      39             : 
      40             : #include <tools/rtti.hxx>   // due to typedef TypeId
      41             : #include <vector>
      42             : 
      43             : class OutlinerEditEng;
      44             : class Outliner;
      45             : class EditView;
      46             : class EditUndo;
      47             : class ParagraphList;
      48             : class OutlinerParaObject;
      49             : class SvStream;
      50             : class SvxBulletItem;
      51             : class SvxFont;
      52             : class SvxSearchItem;
      53             : class SvxFieldItem;
      54             : class Window;
      55             : class KeyEvent;
      56             : class MouseEvent;
      57             : class Pointer;
      58             : class CommandEvent;
      59             : class MapMode;
      60             : class OutputDevice;
      61             : class PolyPolygon;
      62             : class SfxStyleSheetPool;
      63             : class SfxStyleSheet;
      64             : class SfxItemPool;
      65             : class SfxItemSet;
      66             : class SvxNumBulletItem;
      67             : class SvxNumberFormat;
      68             : class SvxLRSpaceItem;
      69             : class EditEngine;
      70             : class SvKeyValueIterator;
      71             : class SvxForbiddenCharactersTable;
      72             : 
      73             : namespace svl
      74             : {
      75             :     class IUndoManager;
      76             : }
      77             : 
      78             : #include <com/sun/star/uno/Reference.h>
      79             : 
      80             : #include <rtl/ref.hxx>
      81             : #include <editeng/svxfont.hxx>
      82             : #include <editeng/eedata.hxx>
      83             : #include <editeng/paragraphdata.hxx>
      84             : 
      85             : class SvxFieldData;
      86             : //////////////////////////////////////////////////////////////////////////////
      87             : 
      88             : namespace com { namespace sun { namespace star { namespace linguistic2 {
      89             :     class XSpellChecker1;
      90             :     class XHyphenator;
      91             : }}}}
      92             : namespace svx{
      93             : struct SpellPortion;
      94             : typedef std::vector<SpellPortion> SpellPortions;
      95             : }
      96             : 
      97             : namespace basegfx { class B2DPolyPolygon; }
      98             : 
      99             : // internal use only!
     100             : #define PARAFLAG_DROPTARGET         0x1000
     101             : #define PARAFLAG_DROPTARGET_EMPTY   0x2000
     102             : #define PARAFLAG_HOLDDEPTH          0x4000
     103             : #define PARAFLAG_SETBULLETTEXT      0x8000
     104             : #define PARAFLAG_ISPAGE             0x0100
     105             : 
     106             : // Undo-Action-Ids
     107             : #define OLUNDO_DEPTH            EDITUNDO_USER
     108             : // #define OLUNDO_HEIGHT           EDITUNDO_USER+1
     109             : #define OLUNDO_EXPAND           EDITUNDO_USER+2
     110             : #define OLUNDO_COLLAPSE         EDITUNDO_USER+3
     111             : // #define OLUNDO_REMOVE           EDITUNDO_USER+4
     112             : #define OLUNDO_ATTR             EDITUNDO_USER+5
     113             : #define OLUNDO_INSERT           EDITUNDO_USER+6
     114             : // #define OLUNDO_MOVEPARAGRAPHS    EDITUNDO_USER+7
     115             : #define OLUNDO_CHECKPARA        EDITUNDO_USER+8
     116             : 
     117             : class Paragraph : protected ParagraphData
     118             : {
     119             : private:
     120             :     friend class Outliner;
     121             :     friend class ParagraphList;
     122             :     friend class OutlinerView;
     123             :     friend class OutlinerParaObject;
     124             :     friend class OutlinerEditEng;
     125             :     friend class OutlinerUndoCheckPara;
     126             :     friend class OutlinerUndoChangeParaFlags;
     127             : 
     128             :     Paragraph& operator=(const Paragraph& rPara );
     129             : 
     130             :     sal_uInt16          nFlags;
     131             :     OUString       aBulText;
     132             :     Size                aBulSize;
     133             :     sal_Bool            bVisible;
     134             : 
     135         198 :     sal_Bool                IsVisible() const { return bVisible; }
     136        2151 :     void                SetText( const OUString& rText ) { aBulText = rText; aBulSize.Width() = -1; }
     137      811183 :     void                Invalidate() { aBulSize.Width() = -1; }
     138     1139040 :     void                SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; }
     139     1368373 :     const OUString& GetText() const { return aBulText; }
     140             : 
     141             :                         Paragraph( sal_Int16 nDepth );
     142             :                         Paragraph( const Paragraph& );
     143             :                         Paragraph( const ParagraphData& );
     144             :                         ~Paragraph();
     145             : 
     146     3049514 :     sal_Int16           GetDepth() const { return nDepth; }
     147             : 
     148          28 :     sal_Int16           GetNumberingStartValue() const { return mnNumberingStartValue; }
     149             :     void                SetNumberingStartValue( sal_Int16 nNumberingStartValue );
     150             : 
     151          28 :     sal_Bool            IsParaIsNumberingRestart() const { return mbParaIsNumberingRestart; }
     152             :     void                SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart );
     153             : 
     154           0 :     void                SetFlag( sal_uInt16 nFlag ) { nFlags |= nFlag; }
     155           0 :     void                RemoveFlag( sal_uInt16 nFlag ) { nFlags &= ~nFlag; }
     156          21 :     bool                HasFlag( sal_uInt16 nFlag ) const { return (nFlags & nFlag) != 0; }
     157             : };
     158             : 
     159             : struct ParaRange
     160             : {
     161             :     sal_Int32  nStartPara;
     162             :     sal_Int32  nEndPara;
     163             : 
     164          22 :             ParaRange( sal_Int32 nS, sal_Int32 nE ) { nStartPara = nS, nEndPara = nE; }
     165             : 
     166             :     void    Adjust();
     167             :     sal_uInt16  Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); }
     168             : };
     169             : 
     170          22 : inline void ParaRange::Adjust()
     171             : {
     172          22 :     if ( nStartPara > nEndPara )
     173             :     {
     174           0 :         sal_Int32 nTmp = nStartPara;
     175           0 :         nStartPara = nEndPara;
     176           0 :         nEndPara = nTmp;
     177             :     }
     178          22 : }
     179             : 
     180             : class EDITENG_DLLPUBLIC OutlinerView
     181             : {
     182             :     friend class Outliner;
     183             : 
     184             : private:
     185             : 
     186             :     Outliner*   pOwner;
     187             :     EditView*   pEditView;
     188             : 
     189             :     // Drag & Drop
     190             :     sal_Bool        bBeginDragAtMove_OLDMEMBER;
     191             :     sal_Bool        bInDragMode;
     192             :     Point       aDDStartPosRef;
     193             :     Point       aDDStartPosPix;
     194             :     sal_Int32       nDDStartPara;
     195             :     sal_Int32       nDDStartParaVisChildCount;
     196             :     sal_Int32       nDDCurPara;
     197             :     sal_uInt16      nDDStartDepth;
     198             :     sal_uInt16      nDDCurDepth;
     199             :     sal_uInt16      nDDMaxDepth;
     200             :     sal_Bool        bDDChangingDepth;
     201             :     sal_Bool        bDDCursorVisible;
     202             :     long*       pHorTabArrDoc;
     203             :     long        nDDScrollLRBorderWidthWin;  // Left Right
     204             :     long        nDDScrollTBBorderWidthWin;  // Top Bottom
     205             :     long        nDDScrollLROffs;
     206             :     long        nDDScrollTDOffs;
     207             : 
     208             :     void*       pDummy;
     209             :     sal_uLong       nDummy;
     210             : 
     211             :     enum MouseTarget {
     212             :         MouseText = 0,
     213             :         MouseBullet = 1,
     214             :         MouseHypertext = 2,  // Outside OutputArea
     215             :         MouseOutside = 3,    // Outside OutputArea
     216             :         MouseDontKnow = 4
     217             :     };
     218             :     MouseTarget OLD_ePrevMouseTarget;
     219             : 
     220             :     EDITENG_DLLPRIVATE void         ImplExpandOrCollaps( sal_Int32 nStartPara, sal_Int32 nEndPara, sal_Bool bExpand );
     221             : 
     222             :     EDITENG_DLLPRIVATE sal_Int32    ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget);
     223             :     EDITENG_DLLPRIVATE void         ImpToggleExpand( Paragraph* pParentPara );
     224             :     EDITENG_DLLPRIVATE ParaRange    ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChildren );
     225             : 
     226             :     EDITENG_DLLPRIVATE Pointer      ImpGetMousePointer( MouseTarget eTarget );
     227             :     EDITENG_DLLPRIVATE sal_Int32    ImpInitPaste( sal_Int32& rStart );
     228             :     EDITENG_DLLPRIVATE void         ImpPasted( sal_Int32 nStart, sal_Int32 nPrevParaCount, sal_Int32 nSize);
     229             :     EDITENG_DLLPRIVATE sal_Int32    ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected );
     230             :     EDITENG_DLLPRIVATE sal_Bool        ImpIsIndentingPages();
     231             : 
     232             : public:
     233             :                 OutlinerView( Outliner* pOut, Window* pWindow );
     234             :     virtual     ~OutlinerView();
     235             : 
     236          28 :     EditView&   GetEditView() const { return *pEditView; }
     237             : 
     238             :     void        Scroll( long nHorzScroll, long nVertScroll );
     239             : 
     240             :     void        Paint( const Rectangle& rRect, OutputDevice* pTargetDevice = 0 );
     241             :     sal_Bool        PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin = NULL );
     242             :     sal_Bool        MouseButtonDown( const MouseEvent& );
     243             :     sal_Bool        MouseButtonUp( const MouseEvent& );
     244             :     sal_Bool        MouseMove( const MouseEvent& );
     245             : 
     246             :     void        ShowCursor( sal_Bool bGotoCursor = sal_True );
     247             :     void        HideCursor();
     248             : 
     249           0 :     Outliner*   GetOutliner() const { return pOwner; }
     250             : 
     251             :     void        SetWindow( Window* pWindow );
     252             :     Window*     GetWindow() const;
     253             : 
     254             :     void        SetReadOnly( sal_Bool bReadOnly );
     255             :     sal_Bool        IsReadOnly() const;
     256             : 
     257             :     void        SetOutputArea( const Rectangle& rRect );
     258             :     Rectangle   GetOutputArea() const;
     259             : 
     260             :     Rectangle   GetVisArea() const;
     261             : 
     262             :     void        CreateSelectionList (std::vector<Paragraph*> &aSelList) ;
     263             : 
     264             :     // Retruns the number of selected paragraphs
     265             :     sal_Int32   Select( Paragraph* pParagraph,
     266             :                     sal_Bool bSelect=sal_True,
     267             :                     sal_Bool bWChildren=sal_True);
     268             : 
     269             :     String      GetSelected() const;
     270             :     void        SelectRange( sal_Int32 nFirst, sal_Int32 nCount );
     271             :     void        SetAttribs( const SfxItemSet& );
     272             :     void        Indent( short nDiff );
     273             :     void        AdjustDepth( short nDX );   // Later replace with Indent!
     274             : 
     275             :     sal_Bool        AdjustHeight( long nDY );
     276             : 
     277             :     sal_uLong       Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
     278             : 
     279             :     void        InsertText( const String& rNew, sal_Bool bSelect = sal_False );
     280             :     void        InsertText( const OutlinerParaObject& rParaObj );
     281             :     void        Expand();
     282             :     void        Collapse();
     283             :     void        ExpandAll();
     284             :     void        CollapseAll();
     285             : 
     286             :     void        SetBackgroundColor( const Color& rColor );
     287             :     Color       GetBackgroundColor();
     288             : 
     289             :     SfxItemSet  GetAttribs();
     290             : 
     291             :     void        Cut();
     292             :     void        Copy();
     293             :     void        Paste();
     294             :     void        PasteSpecial();
     295             : 
     296             :     const SfxStyleSheet*  GetStyleSheet() const;
     297             :     SfxStyleSheet*  GetStyleSheet();
     298             : 
     299             :     void        SetControlWord( sal_uLong nWord );
     300             :     sal_uLong       GetControlWord() const;
     301             : 
     302             :     void            SetAnchorMode( EVAnchorMode eMode );
     303             :     EVAnchorMode    GetAnchorMode() const;
     304             : 
     305             :     Pointer     GetPointer( const Point& rPosPixel );
     306             :     void        Command( const CommandEvent& rCEvt );
     307             : 
     308             :     EESpellState    StartSpeller( sal_Bool bMultipleDoc = sal_False );
     309             :     EESpellState    StartThesaurus();
     310             :     sal_uInt16          StartSearchAndReplace( const SvxSearchItem& rSearchItem );
     311             : 
     312             :     // for text conversion
     313             :     void            StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc );
     314             : 
     315             :     void            TransliterateText( sal_Int32 nTransliterationMode );
     316             : 
     317             :     ESelection  GetSelection();
     318             : 
     319             :     sal_uInt16      GetSelectedScriptType() const;
     320             : 
     321             :     void        SetVisArea( const Rectangle& rRect );
     322             :     void        SetSelection( const ESelection& );
     323             : 
     324             :     void        RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0, sal_Bool bKeepLanguages = sal_False );
     325             :     void        RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs );
     326             :     sal_Bool        HasSelection() const;
     327             : 
     328             :     void                InsertField( const SvxFieldItem& rFld );
     329             :     const SvxFieldItem* GetFieldUnderMousePointer() const;
     330             :     const SvxFieldItem* GetFieldAtSelection() const;
     331             : 
     332             :     /** enables bullets for the selected paragraphs if the bullets/numbering of the first paragraph is off
     333             :         or disables bullets/numbering for the selected paragraphs if the bullets/numbering of the first paragraph is on
     334             :     */
     335             :     void ToggleBullets();
     336             : 
     337             :     void ToggleBulletsNumbering(
     338             :         const bool bToggle,
     339             :         const bool bHandleBullets,
     340             :         const SvxNumRule* pNumRule = NULL );
     341             : 
     342             :     /** apply bullets/numbering for paragraphs
     343             : 
     344             :         @param boolean bHandleBullets
     345             :         true: handle bullets
     346             :         false: handle numbering
     347             : 
     348             :         @param pNewNumRule
     349             :         numbering rule which needs to be applied. can be 0.
     350             : 
     351             :         @param boolean bAtSelection
     352             :         true: apply bullets/numbering at selected paragraphs
     353             :         false: apply bullets/numbering at all paragraphs
     354             :     */
     355             :     void ApplyBulletsNumbering(
     356             :         const bool bHandleBullets,
     357             :         const SvxNumRule* pNewNumRule,
     358             :         const bool bCheckCurrentNumRuleBeforeApplyingNewNumRule,
     359             :         const bool bAtSelection = false );
     360             : 
     361             :     /** switch off bullets/numbering for paragraphs
     362             : 
     363             :         @param boolean bAtSelection
     364             :         true: switch off bullets/numbering at selected paragraphs
     365             :         false: switch off bullets/numbering at all paragraphs
     366             :     */
     367             :     void SwitchOffBulletsNumbering(
     368             :         const bool bAtSelection = false );
     369             : 
     370             :     /** enables numbering for the selected paragraphs that are not enabled and ignore all selected
     371             :         paragraphs that already have numbering enabled.
     372             :     */
     373             :     void        EnableBullets();
     374             : 
     375             :     sal_Bool        IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False );
     376             :     sal_Bool        IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False );
     377             :     void        ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 );
     378             : 
     379             :     void        SetInvalidateMore( sal_uInt16 nPixel );
     380             :     sal_uInt16      GetInvalidateMore() const;
     381             : 
     382             :     String      GetSurroundingText() const;
     383             :      Selection  GetSurroundingTextSelection() const;
     384             : };
     385             : 
     386             : 
     387             : // some thesaurus functionality to avoid code duplication in different projects...
     388             : bool EDITENG_DLLPUBLIC  GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView );
     389             : void EDITENG_DLLPUBLIC  ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText );
     390             : 
     391             : typedef ::std::vector< OutlinerView* > ViewList;
     392             : 
     393             : class EDITENG_DLLPUBLIC DrawPortionInfo
     394             : {
     395             : public:
     396             :     const Point&        mrStartPos;
     397             :     const String&       mrText;
     398             :     sal_uInt16          mnTextStart;
     399             :     sal_uInt16          mnTextLen;
     400             :     sal_Int32           mnPara;
     401             :     xub_StrLen          mnIndex;
     402             :     const SvxFont&      mrFont;
     403             :     const sal_Int32*    mpDXArray;
     404             : 
     405             :     const EEngineData::WrongSpellVector*  mpWrongSpellVector;
     406             :     const SvxFieldData* mpFieldData;
     407             :     const ::com::sun::star::lang::Locale* mpLocale;
     408             :     const Color maOverlineColor;
     409             :     const Color maTextLineColor;
     410             : 
     411             :     sal_uInt8               mnBiDiLevel;
     412             : 
     413             :     bool                mbFilled;
     414             :     long                mnWidthToFill;
     415             : 
     416             :     // bitfield
     417             :     unsigned            mbEndOfLine : 1;
     418             :     unsigned            mbEndOfParagraph : 1;
     419             :     unsigned            mbEndOfBullet : 1;
     420             : 
     421             :     sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; }
     422        9992 :     sal_Bool IsRTL() const { return mnBiDiLevel % 2 ? sal_True : sal_False; }
     423             : 
     424       10402 :     DrawPortionInfo(
     425             :         const Point& rPos,
     426             :         const String& rTxt,
     427             :         sal_uInt16 nTxtStart,
     428             :         sal_uInt16 nTxtLen,
     429             :         const SvxFont& rFnt,
     430             :         sal_Int32 nPar,
     431             :         xub_StrLen nIdx,
     432             :         const sal_Int32* pDXArr,
     433             :         const EEngineData::WrongSpellVector* pWrongSpellVector,
     434             :         const SvxFieldData* pFieldData,
     435             :         const ::com::sun::star::lang::Locale* pLocale,
     436             :         const Color& rOverlineColor,
     437             :         const Color& rTextLineColor,
     438             :         sal_uInt8 nBiDiLevel,
     439             :         bool bFilled,
     440             :         long nWidthToFill,
     441             :         bool bEndOfLine,
     442             :         bool bEndOfParagraph,
     443             :         bool bEndOfBullet)
     444             :     :   mrStartPos(rPos),
     445             :         mrText(rTxt),
     446             :         mnTextStart(nTxtStart),
     447             :         mnTextLen(nTxtLen),
     448             :         mnPara(nPar),
     449             :         mnIndex(nIdx),
     450             :         mrFont(rFnt),
     451             :         mpDXArray(pDXArr),
     452             :         mpWrongSpellVector(pWrongSpellVector),
     453             :         mpFieldData(pFieldData),
     454             :         mpLocale(pLocale),
     455             :         maOverlineColor(rOverlineColor),
     456             :         maTextLineColor(rTextLineColor),
     457             :         mnBiDiLevel(nBiDiLevel),
     458             :         mbFilled( bFilled ),
     459             :         mnWidthToFill( nWidthToFill ),
     460             :         mbEndOfLine(bEndOfLine),
     461             :         mbEndOfParagraph(bEndOfParagraph),
     462       10402 :         mbEndOfBullet(bEndOfBullet)
     463       10402 :     {}
     464             : };
     465             : 
     466           0 : class EDITENG_DLLPUBLIC DrawBulletInfo
     467             : {
     468             : public:
     469             :     const GraphicObject maBulletGraphicObject;
     470             :     Point               maBulletPosition;
     471             :     Size                maBulletSize;
     472             : 
     473           0 :     DrawBulletInfo(
     474             :         const GraphicObject& rBulletGraphicObject,
     475             :         const Point& rBulletPosition,
     476             :         const Size& rBulletSize)
     477             :     :   maBulletGraphicObject(rBulletGraphicObject),
     478             :         maBulletPosition(rBulletPosition),
     479           0 :         maBulletSize(rBulletSize)
     480           0 :     {}
     481             : };
     482             : 
     483             : struct EDITENG_DLLPUBLIC PaintFirstLineInfo
     484             : {
     485             :     sal_Int32 mnPara;
     486             :     const Point& mrStartPos;
     487             :     long mnBaseLineY;
     488             :     const Point& mrOrigin;
     489             :     short mnOrientation;
     490             :     OutputDevice* mpOutDev;
     491             : 
     492           0 :     PaintFirstLineInfo( sal_Int32 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
     493           0 :         : mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev )
     494           0 :     {}
     495             : };
     496             : 
     497             : class SdrPage;
     498             : 
     499             : class EditFieldInfo
     500             : {
     501             : private:
     502             :     Outliner*           pOutliner;
     503             :     const SvxFieldItem& rFldItem;
     504             : 
     505             :     Color*              pTxtColor;
     506             :     Color*              pFldColor;
     507             : 
     508             :     String              aRepresentation;
     509             : 
     510             :     sal_Int32           nPara;
     511             :     xub_StrLen          nPos;
     512             :     sal_Bool                bSimpleClick;
     513             : 
     514             :                         EditFieldInfo();
     515             :                         EditFieldInfo( const EditFieldInfo& );
     516             : 
     517             :     SdrPage*            mpSdrPage;
     518             : 
     519             : public:
     520        1382 :                     EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, sal_Int32 nPa, xub_StrLen nPo )
     521        1382 :                         : rFldItem( rFItem )
     522             :                     {
     523        1382 :                         pOutliner = pOutl;
     524        1382 :                         nPara = nPa; nPos = nPo;
     525        1382 :                         pTxtColor = 0; pFldColor = 0; bSimpleClick = sal_False;
     526        1382 :                         mpSdrPage = 0;
     527        1382 :                     }
     528        1382 :                     ~EditFieldInfo()
     529        1382 :                     {
     530        1382 :                         delete pTxtColor;
     531        1382 :                         delete pFldColor;
     532        1382 :                     }
     533             : 
     534        2764 :     Outliner*       GetOutliner() const { return pOutliner; }
     535             : 
     536        1382 :     const SvxFieldItem& GetField() const { return rFldItem; }
     537             : 
     538        1382 :     Color*          GetTxtColor() const { return pTxtColor; }
     539           0 :     void            SetTxtColor( const Color& rColor )
     540           0 :                         { delete pTxtColor; pTxtColor = new Color( rColor ); }
     541             : 
     542        1403 :     Color*          GetFldColor() const { return pFldColor; }
     543          21 :     void            SetFldColor( const Color& rColor )
     544          21 :                         { delete pFldColor; pFldColor = new Color( rColor ); }
     545           0 :     void            ClearFldColor()
     546           0 :                         { delete pFldColor; pFldColor = 0; }
     547             : 
     548           5 :     sal_Int32           GetPara() const { return nPara; }
     549           5 :     xub_StrLen          GetPos() const { return nPos; }
     550             : 
     551             :     sal_Bool            IsSimpleClick() const { return bSimpleClick; }
     552           0 :     void            SetSimpleClick( sal_Bool bSimple ) { bSimpleClick = bSimple; }
     553             : 
     554             :     const String&       GetRepresentation() const                { return aRepresentation; }
     555        1382 :     String&             GetRepresentation()                      { return aRepresentation; }
     556        1382 :     void                SetRepresentation( const String& rStr )  { aRepresentation = rStr; }
     557             : 
     558           0 :     void            SetSdrPage( SdrPage* pPage ) { mpSdrPage = pPage; }
     559        1377 :     SdrPage*        GetSdrPage() const { return mpSdrPage; }
     560             : };
     561             : 
     562         736 : struct EBulletInfo
     563             : {
     564             :     sal_Bool        bVisible;
     565             :     sal_uInt16      nType;          // see SvxNumberType
     566             :     String      aText;
     567             :     SvxFont     aFont;
     568             :     Graphic     aGraphic;
     569             :     sal_Int32   nParagraph;
     570             :     Rectangle   aBounds;
     571             : 
     572         736 :     EBulletInfo() : bVisible( sal_False ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
     573             : };
     574             : 
     575             : #define OUTLINERMODE_DONTKNOW       0x0000
     576             : #define OUTLINERMODE_TEXTOBJECT     0x0001
     577             : #define OUTLINERMODE_TITLEOBJECT    0x0002
     578             : #define OUTLINERMODE_OUTLINEOBJECT  0x0003
     579             : #define OUTLINERMODE_OUTLINEVIEW    0x0004
     580             : 
     581             : #define OUTLINERMODE_USERMASK       0x00FF
     582             : 
     583             : #define OUTLINERMODE_SUBTITLE       (0x0100|OUTLINERMODE_TEXTOBJECT)
     584             : #define OUTLINERMODE_NOTE           (0x0200|OUTLINERMODE_TEXTOBJECT)
     585             : 
     586             : class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
     587             : {
     588             :     friend class OutlinerView;
     589             :     friend class OutlinerEditEng;
     590             :     friend class OutlinerParaObject;
     591             :     friend class OLUndoExpand;
     592             :     friend class OutlinerUndoChangeDepth;
     593             :     friend class OutlinerUndoCheckPara;
     594             :     friend class OutlinerUndoChangeParaFlags;
     595             : 
     596             :     OutlinerEditEng*    pEditEngine;
     597             : 
     598             :     ParagraphList*      pParaList;
     599             :     ViewList            aViewList;
     600             : 
     601             :     Paragraph*          pHdlParagraph;
     602             :     sal_Int32           mnFirstSelPage;
     603             :     Link                aDrawPortionHdl;
     604             :     Link                aDrawBulletHdl;
     605             :     Link                aExpandHdl;
     606             :     Link                aParaInsertedHdl;
     607             :     Link                aParaRemovingHdl;
     608             :     Link                aDepthChangedHdl;
     609             :     Link                aWidthArrReqHdl;
     610             :     Link                aBeginMovingHdl;
     611             :     Link                aEndMovingHdl;
     612             :     Link                aIndentingPagesHdl;
     613             :     Link                aRemovingPagesHdl;
     614             :     Link                aFieldClickedHdl;
     615             :     Link                aCalcFieldValueHdl;
     616             :     Link                maPaintFirstLineHdl;
     617             :     Link                maBeginPasteOrDropHdl;
     618             :     Link                maEndPasteOrDropHdl;
     619             : 
     620             :     sal_Int32           nDepthChangedHdlPrevDepth;
     621             :     sal_uInt16          mnDepthChangeHdlPrevFlags;
     622             :     sal_Int16           nMaxDepth;
     623             :     const sal_Int16     nMinDepth;
     624             :     sal_Int32           nFirstPage;
     625             : 
     626             :     sal_uInt16              nOutlinerMode;
     627             : 
     628             :     sal_Bool                bIsExpanding; // Only valid in Expand/Collaps-Hdl, reset
     629             :     sal_Bool                bFirstParaIsEmpty;
     630             :     sal_Bool                bBlockInsCallback;
     631             :     sal_Bool                bStrippingPortions;
     632             :     sal_Bool                bPasting;
     633             : 
     634             :     sal_uLong               nDummy;
     635             : 
     636             :     DECL_LINK(              ParaVisibleStateChangedHdl, Paragraph* );
     637             :     DECL_LINK(              BeginMovingParagraphsHdl, void* );
     638             :     DECL_LINK(              EndMovingParagraphsHdl, MoveParagraphsInfo* );
     639             :     DECL_LINK(              BeginPasteOrDropHdl, PasteOrDropInfos* );
     640             :     DECL_LINK(              EndPasteOrDropHdl, PasteOrDropInfos* );
     641             :     DECL_LINK(              EditEngineNotifyHdl, EENotify* );
     642             :     void                    ImplCheckParagraphs( sal_Int32 nStart, sal_Int32 nEnd );
     643             :     bool ImplHasNumberFormat( sal_Int32 nPara ) const;
     644             :     Size                    ImplGetBulletSize( sal_Int32 nPara );
     645             :     sal_uInt16              ImplGetNumbering( sal_Int32 nPara, const SvxNumberFormat* pParaFmt );
     646             :     void                    ImplCalcBulletText( sal_Int32 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChildren );
     647             :     String                  ImplGetBulletText( sal_Int32 nPara );
     648             :     void                    ImplCheckNumBulletItem( sal_Int32 nPara );
     649             :     void                    ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False );
     650             :     void                    ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet* pLevelStyle = NULL );
     651             : 
     652             :     void                    ImplBlockInsertionCallbacks( sal_Bool b );
     653             : 
     654             :     void                ImplCheckStyleSheet( sal_Int32 nPara, sal_Bool bReplaceExistingStyle );
     655             :     void                ImpRecalcBulletIndent( sal_Int32 nPara );
     656             : 
     657             :     const SvxBulletItem& ImpGetBullet( sal_Int32 nPara, sal_uInt16& );
     658             :     void        ImpFilterIndents( sal_Int32 nFirstPara, sal_Int32 nLastPara );
     659             :     bool        ImpConvertEdtToOut( sal_Int32 nPara, EditView* pView = 0 );
     660             : 
     661             :     void        ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount );
     662             :     long        ImpCalcMaxBulletWidth( sal_Int32 nPara, const SvxBulletItem& rBullet );
     663             :     Font        ImpCalcBulletFont( sal_Int32 nPara ) const;
     664             :     Rectangle   ImpCalcBulletArea( sal_Int32 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos );
     665             :     long        ImpGetTextIndent( sal_Int32 nPara );
     666             :     sal_Bool        ImpCanIndentSelectedPages( OutlinerView* pCurView );
     667             :     sal_Bool        ImpCanDeleteSelectedPages( OutlinerView* pCurView );
     668             :     sal_Bool        ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_Int32 nFirstPage, sal_Int32 nPages );
     669             : 
     670      586681 :     sal_uInt16      ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
     671             :     void        ImplCheckDepth( sal_Int16& rnDepth ) const;
     672             : 
     673             : protected:
     674             :     void            ParagraphInserted( sal_Int32 nParagraph );
     675             :     void            ParagraphDeleted( sal_Int32 nParagraph );
     676             :     void            ParaAttribsChanged( sal_Int32 nParagraph );
     677             : 
     678             :     virtual void    StyleSheetChanged( SfxStyleSheet* pStyle );
     679             : 
     680             :     void        InvalidateBullet( Paragraph* pPara, sal_Int32 nPara );
     681             :     void        PaintBullet( sal_Int32 nPara, const Point& rStartPos,
     682             :                     const Point& rOrigin, short nOrientation,
     683             :                     OutputDevice* pOutDev );
     684             : 
     685             :     // used by OutlinerEditEng. Allows Outliner objects to provide
     686             :     // bullet access to the EditEngine.
     687             :     virtual const SvxNumberFormat*  GetNumberFormat( sal_Int32 nPara ) const;
     688             : 
     689             : public:
     690             : 
     691             :                     Outliner( SfxItemPool* pPool, sal_uInt16 nOutlinerMode );
     692             :     virtual         ~Outliner();
     693             : 
     694             :     void            Init( sal_uInt16 nOutlinerMode );
     695       36829 :     sal_uInt16          GetMode() const { return nOutlinerMode; }
     696             : 
     697             :     void            SetVertical( sal_Bool bVertical );
     698             :     sal_Bool            IsVertical() const;
     699             : 
     700             :     void            SetFixedCellHeight( sal_Bool bUseFixedCellHeight );
     701             : 
     702             :     void                        SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
     703             :     EEHorizontalTextDirection   GetDefaultHorizontalTextDirection() const;
     704             : 
     705             :     sal_uInt16          GetScriptType( const ESelection& rSelection ) const;
     706             :     LanguageType    GetLanguage( sal_Int32 nPara, sal_uInt16 nPos ) const;
     707             : 
     708             :     void            SetAsianCompressionMode( sal_uInt16 nCompressionMode );
     709             : 
     710             :     void            SetKernAsianPunctuation( sal_Bool bEnabled );
     711             : 
     712             :     void            SetAddExtLeading( sal_Bool b );
     713             : 
     714             :     size_t          InsertView( OutlinerView* pView, size_t nIndex = size_t(-1) );
     715             :     OutlinerView*   RemoveView( OutlinerView* pView );
     716             :     OutlinerView*   RemoveView( size_t nIndex );
     717             :     OutlinerView*   GetView( size_t nIndex ) const;
     718             :     size_t          GetViewCount() const;
     719             : 
     720             :     Paragraph*      Insert( const String& rText, sal_Int32 nAbsPos = EE_PARA_APPEND, sal_Int16 nDepth = 0 );
     721             :     void            SetText( const OutlinerParaObject& );
     722             :     void            AddText( const OutlinerParaObject& );
     723             :     void            SetText( const String& rText, Paragraph* pParagraph );
     724             :     String          GetText( Paragraph* pPara, sal_Int32 nParaCount=1 ) const;
     725             : 
     726             :     OutlinerParaObject* CreateParaObject( sal_Int32 nStartPara = 0, sal_Int32 nParaCount = EE_PARA_ALL ) const;
     727             : 
     728             :     const SfxItemSet& GetEmptyItemSet() const;
     729             : 
     730             :     void            SetRefMapMode( const MapMode& );
     731             :     MapMode         GetRefMapMode() const;
     732             : 
     733             :     void            SetBackgroundColor( const Color& rColor );
     734             :     Color           GetBackgroundColor() const;
     735             : 
     736      550003 :     sal_Int16       GetMinDepth() const { return -1; }
     737             : 
     738             :     void            SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParas = sal_False );
     739           0 :     sal_Int16          GetMaxDepth() const { return nMaxDepth; }
     740             : 
     741             :     void            SetUpdateMode( sal_Bool bUpdate );
     742             :     sal_Bool            GetUpdateMode() const;
     743             : 
     744             :     void            Clear();
     745             : 
     746             :     void            RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
     747             : 
     748             :     sal_Int32       GetParagraphCount() const;
     749             :     Paragraph*      GetParagraph( sal_Int32 nAbsPos ) const;
     750             : 
     751             :     sal_Bool            HasParent( Paragraph* pParagraph ) const;
     752             :     sal_Bool            HasChildren( Paragraph* pParagraph ) const;
     753             :     sal_Int32       GetChildCount( Paragraph* pParent ) const;
     754             :     sal_Bool            IsExpanded( Paragraph* pPara ) const;
     755             :     Paragraph*          GetParent( Paragraph* pParagraph ) const;
     756             :     sal_Int32           GetAbsPos( Paragraph* pPara );
     757             : 
     758             :     sal_Int16       GetDepth( sal_Int32 nPara ) const;
     759             :     void            SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth );
     760             : 
     761             :     sal_Bool            IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); }
     762             : 
     763             :     void            EnableUndo( sal_Bool bEnable );
     764             :     sal_Bool            IsUndoEnabled() const;
     765             :     void            UndoActionStart( sal_uInt16 nId );
     766             :     void            UndoActionEnd( sal_uInt16 nId );
     767             :     void            InsertUndo( EditUndo* pUndo );
     768             :     sal_Bool            IsInUndo();
     769             : 
     770             :     void            ClearModifyFlag();
     771             :     sal_Bool            IsModified() const;
     772             : 
     773           0 :     Paragraph*      GetHdlParagraph() const { return pHdlParagraph; }
     774             :     sal_Bool            IsExpanding() const { return bIsExpanding; }
     775             : 
     776             :     virtual void    ExpandHdl();
     777             :     void            SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; }
     778             :     Link            GetExpandHdl() const { return aExpandHdl; }
     779             : 
     780             :     virtual void    ParagraphInsertedHdl();
     781           0 :     void            SetParaInsertedHdl(const Link& rLink){aParaInsertedHdl=rLink;}
     782           0 :     Link            GetParaInsertedHdl() const { return aParaInsertedHdl; }
     783             : 
     784             :     virtual void    ParagraphRemovingHdl();
     785           0 :     void            SetParaRemovingHdl(const Link& rLink){aParaRemovingHdl=rLink;}
     786           0 :     Link            GetParaRemovingHdl() const { return aParaRemovingHdl; }
     787             : 
     788             :     virtual void    DepthChangedHdl();
     789           0 :     void            SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;}
     790           0 :     Link            GetDepthChangedHdl() const { return aDepthChangedHdl; }
     791           0 :     sal_Int16       GetPrevDepth() const { return static_cast<sal_Int16>(nDepthChangedHdlPrevDepth); }
     792           0 :     sal_uInt16      GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
     793             : 
     794             :     virtual long    RemovingPagesHdl( OutlinerView* );
     795           0 :     void            SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;}
     796             :     Link            GetRemovingPagesHdl() const { return aRemovingPagesHdl; }
     797             :     virtual long    IndentingPagesHdl( OutlinerView* );
     798           0 :     void            SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;}
     799             :     Link            GetIndentingPagesHdl() const { return aIndentingPagesHdl; }
     800             :     // valid only in the two upper handlers
     801           0 :     sal_Int32       GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
     802             : 
     803             :     // valid only in the two upper handlers
     804             :     sal_Int32       GetFirstSelPage() const { return mnFirstSelPage; }
     805             : 
     806       13070 :     void            SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; }
     807       10607 :     Link            GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; }
     808             : 
     809             :     void            SetFieldClickedHdl(const Link& rLink ) { aFieldClickedHdl= rLink; }
     810             :     Link            GetFieldClickedHdl() const { return aFieldClickedHdl; }
     811             : 
     812       14300 :     void            SetDrawPortionHdl(const Link& rLink){aDrawPortionHdl=rLink;}
     813             :     Link            GetDrawPortionHdl() const { return aDrawPortionHdl; }
     814             : 
     815       14300 :     void            SetDrawBulletHdl(const Link& rLink){aDrawBulletHdl=rLink;}
     816             :     Link            GetDrawBulletHdl() const { return aDrawBulletHdl; }
     817             : 
     818           0 :     void            SetPaintFirstLineHdl(const Link& rLink) { maPaintFirstLineHdl = rLink; }
     819             :     Link            GetPaintFirstLineHdl() const { return maPaintFirstLineHdl; }
     820             : 
     821             :     void            SetModifyHdl( const Link& rLink );
     822             :     Link            GetModifyHdl() const;
     823             : 
     824             :     void            SetNotifyHdl( const Link& rLink );
     825             : 
     826             :     void            SetStatusEventHdl( const Link& rLink );
     827             :     Link            GetStatusEventHdl() const;
     828             : 
     829             :     void            Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
     830             :     void            Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
     831             : 
     832             :     const Size&     GetPaperSize() const;
     833             :     void            SetPaperSize( const Size& rSize );
     834             : 
     835           0 :     void            SetFirstPageNumber( sal_Int32 n )  { nFirstPage = n; }
     836             :     sal_Int32       GetFirstPageNumber() const      { return nFirstPage; }
     837             : 
     838             :     void                SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
     839             :     void                SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
     840             :     void                ClearPolygon();
     841             : 
     842             :     const Size&     GetMinAutoPaperSize() const;
     843             :     void            SetMinAutoPaperSize( const Size& rSz );
     844             : 
     845             :     const Size&     GetMaxAutoPaperSize() const;
     846             :     void            SetMaxAutoPaperSize( const Size& rSz );
     847             : 
     848             :     void            SetDefTab( sal_uInt16 nTab );
     849             : 
     850             :     sal_Bool            IsFlatMode() const;
     851             :     void            SetFlatMode( sal_Bool bFlat );
     852             : 
     853             :     void            EnableAutoColor( sal_Bool b );
     854             : 
     855             :     void            ForceAutoColor( sal_Bool b );
     856             :     sal_Bool            IsForceAutoColor() const;
     857             : 
     858             :     EBulletInfo     GetBulletInfo( sal_Int32 nPara );
     859             : 
     860             :     void        SetWordDelimiters( const String& rDelimiters );
     861             :     String      GetWordDelimiters() const;
     862             :     String      GetWord( sal_Int32 nPara, xub_StrLen nIndex );
     863             : 
     864             :     void            StripPortions();
     865             : 
     866             :     virtual void DrawingText(
     867             :         const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen,
     868             :         const sal_Int32* pDXArray, const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
     869             :         const EEngineData::WrongSpellVector* pWrongSpellVector,
     870             :         const SvxFieldData* pFieldData,
     871             :         bool bEndOfLine,
     872             :         bool bEndOfParagraph,
     873             :         bool bEndOfBullet,
     874             :         const ::com::sun::star::lang::Locale* pLocale,
     875             :         const Color& rOverlineColor,
     876             :         const Color& rTextLineColor);
     877             : 
     878             :     virtual void DrawingTab(
     879             :         const Point& rStartPos, long nWidth, const String& rChar,
     880             :         const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
     881             :         bool bEndOfLine,
     882             :         bool bEndOfParagraph,
     883             :         const Color& rOverlineColor,
     884             :         const Color& rTextLineColor);
     885             : 
     886             :     Size            CalcTextSize();
     887             :     Size            CalcTextSizeNTP();
     888             : 
     889             :     void                SetStyleSheetPool( SfxStyleSheetPool* pSPool );
     890             :     SfxStyleSheetPool*  GetStyleSheetPool();
     891             : 
     892             :     sal_Bool            IsInSelectionMode() const;
     893             : 
     894             :     void            SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle );
     895             :     SfxStyleSheet*  GetStyleSheet( sal_Int32 nPara );
     896             : 
     897             :     void            SetParaAttribs( sal_Int32 nPara, const SfxItemSet& );
     898             :     SfxItemSet      GetParaAttribs( sal_Int32 nPara );
     899             : 
     900             :     void            Remove( Paragraph* pPara, sal_Int32 nParaCount );
     901             :     sal_Bool            Expand( Paragraph* );
     902             :     sal_Bool            Collapse( Paragraph* );
     903             : 
     904             :     void            SetParaFlag( Paragraph* pPara,  sal_uInt16 nFlag );
     905             :     bool            HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const;
     906             : 
     907             :     // Returns an array containing the widths of the Bullet Indentations
     908             :     // Last value must be -1. Is deleted by the outliner.
     909             :     Link            GetWidthArrReqHdl() const{ return aWidthArrReqHdl; }
     910             :     void            SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; }
     911             : 
     912             :     void            SetControlWord( sal_uLong nWord );
     913             :     sal_uLong           GetControlWord() const;
     914             : 
     915           0 :     Link            GetBeginMovingHdl() const { return aBeginMovingHdl; }
     916           0 :     void            SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;}
     917           0 :     Link            GetEndMovingHdl() const {return aEndMovingHdl;}
     918           0 :     void            SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;}
     919             : 
     920             :     sal_uLong           GetLineCount( sal_Int32 nParagraph ) const;
     921             :     sal_uInt16          GetLineLen( sal_Int32 nParagraph, sal_uInt16 nLine ) const;
     922             :     sal_uLong           GetLineHeight( sal_Int32 nParagraph, sal_uInt16 nLine = 0 );
     923             : 
     924             :     sal_uLong           Read( SvStream& rInput, const String& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
     925             : 
     926             :     ::svl::IUndoManager& GetUndoManager();
     927             :     ::svl::IUndoManager* SetUndoManager(::svl::IUndoManager* pNew);
     928             : 
     929             :     void            QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
     930             :     void            QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
     931             :     void            QuickInsertLineBreak( const ESelection& rSel );
     932             : 
     933             :     // Only for EditEngine mode
     934             :     void            QuickInsertText( const String& rText, const ESelection& rSel );
     935             :     void            QuickDelete( const ESelection& rSel );
     936             :     void            QuickRemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 );
     937             :     void            QuickFormatDoc( sal_Bool bFull = sal_False );
     938             : 
     939             :     sal_Bool            UpdateFields();
     940             :     void            RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL );
     941             : 
     942             :     virtual void    FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
     943             :     virtual void    FieldSelected( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
     944             :     virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
     945             : 
     946             :     void            SetSpeller( ::com::sun::star::uno::Reference<
     947             :                             ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller );
     948             :     ::com::sun::star::uno::Reference<
     949             :         ::com::sun::star::linguistic2::XSpellChecker1 >
     950             :                     GetSpeller();
     951             :     void            SetHyphenator( ::com::sun::star::uno::Reference<
     952             :                         ::com::sun::star::linguistic2::XHyphenator >& xHyph );
     953             : 
     954             :     void            SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
     955             : 
     956             :     // Depricated
     957             :     void            SetDefaultLanguage( LanguageType eLang );
     958             :     LanguageType    GetDefaultLanguage() const;
     959             : 
     960             :     void            CompleteOnlineSpelling();
     961             : 
     962             :     EESpellState    HasSpellErrors();
     963             :     sal_Bool            HasText( const SvxSearchItem& rSearchItem );
     964             :     virtual sal_Bool    SpellNextDocument();
     965             : 
     966             :     // for text conversion
     967             :     sal_Bool        HasConvertibleTextPortion( LanguageType nLang );
     968             :     virtual sal_Bool    ConvertNextDocument();
     969             : 
     970             :     void            SetEditTextObjectPool( SfxItemPool* pPool );
     971             :     SfxItemPool*    GetEditTextObjectPool() const;
     972             : 
     973             :     void            SetRefDevice( OutputDevice* pRefDev );
     974             :     OutputDevice*   GetRefDevice() const;
     975             : 
     976             :     sal_uLong           GetTextHeight() const;
     977             :     sal_uLong           GetTextHeight( sal_Int32 nParagraph ) const;
     978             :     Point           GetDocPosTopLeft( sal_Int32 nParagraph );
     979             :     Point           GetDocPos( const Point& rPaperPos ) const;
     980             :     sal_Bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
     981             :     sal_Bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBuuletPos );
     982             : 
     983             :     void            SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
     984             :     void            GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ) const;
     985             :     void            EraseVirtualDevice();
     986             : 
     987             :     sal_Bool            ShouldCreateBigTextObject() const;
     988             : 
     989      218793 :     const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); }
     990             : 
     991             :     // this is needed for StarOffice Api
     992             :     void SetLevelDependendStyleSheet( sal_Int32 nPara );
     993             : 
     994       12350 :     sal_uInt16  GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
     995             : 
     996             :     void            StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc);
     997             :     // spell and return a sentence
     998             :     bool            SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking );
     999             :     // put spell position to start of current sentence
    1000             :     void            PutSpellingToSentenceStart( EditView& rEditView );
    1001             :     // applies a changed sentence
    1002             :     void            ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
    1003             : 
    1004             :     /** sets a link that is called at the beginning of a drag operation at an edit view */
    1005             :     void            SetBeginDropHdl( const Link& rLink );
    1006             : 
    1007             :     /** sets a link that is called at the end of a drag operation at an edit view */
    1008             :     void            SetEndDropHdl( const Link& rLink );
    1009             : 
    1010             :     /** sets a link that is called before a drop or paste operation. */
    1011             :     void            SetBeginPasteOrDropHdl( const Link& rLink );
    1012             :     Link            GetBeginPasteOrDropHdl() const { return maBeginPasteOrDropHdl; }
    1013             : 
    1014             :     /** sets a link that is called after a drop or paste operation. */
    1015             :     void            SetEndPasteOrDropHdl( const Link& rLink );
    1016             :     Link            GetEndPasteOrDropHdl() const { return maEndPasteOrDropHdl; }
    1017             : 
    1018             :     virtual sal_Int16 GetNumberingStartValue( sal_Int32 nPara );
    1019             :     virtual void SetNumberingStartValue( sal_Int32 nPara, sal_Int16 nNumberingStartValue );
    1020             : 
    1021             :     virtual sal_Bool IsParaIsNumberingRestart( sal_Int32 nPara );
    1022             :     virtual void SetParaIsNumberingRestart( sal_Int32 nPara, sal_Bool bParaIsNumberingRestart );
    1023             : 
    1024             :     /** determine the bullets/numbering status of the given paragraphs
    1025             : 
    1026             :         @param nParaStart
    1027             :         index of paragraph at which the check starts
    1028             : 
    1029             :         @param nParaEnd
    1030             :         index of paragraph at which the check ends
    1031             : 
    1032             :         @returns
    1033             :         0 : all paragraphs have bullets
    1034             :         1 : all paragraphs have numbering
    1035             :         2 : otherwise
    1036             :     */
    1037             :     sal_Int32 GetBulletsNumberingStatus(
    1038             :         const sal_Int32 nParaStart,
    1039             :         const sal_Int32 nParaEnd ) const;
    1040             : 
    1041             :     // convenient method to determine the bullets/numbering status for all paragraphs
    1042             :     sal_Int32 GetBulletsNumberingStatus() const;
    1043             : };
    1044             : 
    1045             : #endif
    1046             : 
    1047             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10