1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _OUTLEENG_HXX
28 #define _OUTLEENG_HXX
29 
30 #include <editeng/outliner.hxx>
31 #ifndef _EDITENG_HXX
32 #include <editeng/editeng.hxx>
33 #endif
34 
35 typedef EENotify* EENotifyPtr;
36 SV_DECL_PTRARR_DEL( NotifyList, EENotifyPtr, 1, 1 )
37 
38 class OutlinerEditEng : public EditEngine
39 {
40 	Outliner* 			pOwner;
41 
42 protected:
43 
44     // derived from EditEngine. Allows Outliner objetcs to provide
45     // bullet access to the EditEngine.
46     virtual const SvxNumberFormat*  GetNumberFormat( sal_uInt16 nPara ) const;
47 
48 public:
49 						OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool );
50 						~OutlinerEditEng();
51 
52 	virtual void 		PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
53 
54 	virtual void 		ParagraphInserted( sal_uInt16 nNewParagraph );
55 	virtual void 		ParagraphDeleted( sal_uInt16 nDeletedParagraph );
56     virtual void        ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph );
57 
58 	// #101498#
59 	virtual void DrawingText(
60         const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
61         sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft,
62         const EEngineData::WrongSpellVector* pWrongSpellVector,
63         const SvxFieldData* pFieldData,
64         bool bEndOfLine,
65         bool bEndOfParagraph,
66         bool bEndOfBullet,
67         const ::com::sun::star::lang::Locale* pLocale,
68         const Color& rOverlineColor,
69         const Color& rTextLineColor);
70 
71 	virtual	void 		StyleSheetChanged( SfxStyleSheet* pStyle );
72 	virtual void 		ParaAttribsChanged( sal_uInt16 nPara );
73 	virtual sal_Bool 		SpellNextDocument();
74 	virtual XubString	GetUndoComment( sal_uInt16 nUndoId ) const;
75 
76     // for text conversion
77     virtual sal_Bool        ConvertNextDocument();
78 
79 	virtual void		FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos );
80 	virtual void		FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos );
81 	virtual XubString	CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor );
82 
83 	virtual Rectangle 	GetBulletArea( sal_uInt16 nPara );
84 
85    	virtual void        SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
86 
87     // belongs into class Outliner, move there before incompatible update!
88     Link                aOutlinerNotifyHdl;
89     NotifyList          aNotifyCache;
90 };
91 
92 #endif
93 
94