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