xref: /AOO41X/main/editeng/source/outliner/outleeng.hxx (revision 4c5491ea21520f5347760e8fc7d072f082fcde5f)
1*4c5491eaSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*4c5491eaSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*4c5491eaSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*4c5491eaSAndrew Rist  * distributed with this work for additional information
6*4c5491eaSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*4c5491eaSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*4c5491eaSAndrew Rist  * "License"); you may not use this file except in compliance
9*4c5491eaSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*4c5491eaSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*4c5491eaSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*4c5491eaSAndrew Rist  * software distributed under the License is distributed on an
15*4c5491eaSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*4c5491eaSAndrew Rist  * KIND, either express or implied.  See the License for the
17*4c5491eaSAndrew Rist  * specific language governing permissions and limitations
18*4c5491eaSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*4c5491eaSAndrew Rist  *************************************************************/
21*4c5491eaSAndrew Rist 
22*4c5491eaSAndrew Rist 
23cdf0e10cSrcweir #ifndef _OUTLEENG_HXX
24cdf0e10cSrcweir #define _OUTLEENG_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <editeng/outliner.hxx>
27cdf0e10cSrcweir #ifndef _EDITENG_HXX
28cdf0e10cSrcweir #include <editeng/editeng.hxx>
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir 
31cdf0e10cSrcweir typedef EENotify* EENotifyPtr;
32cdf0e10cSrcweir SV_DECL_PTRARR_DEL( NotifyList, EENotifyPtr, 1, 1 )
33cdf0e10cSrcweir 
34cdf0e10cSrcweir class OutlinerEditEng : public EditEngine
35cdf0e10cSrcweir {
36cdf0e10cSrcweir 	Outliner* 			pOwner;
37cdf0e10cSrcweir 
38cdf0e10cSrcweir protected:
39cdf0e10cSrcweir 
40cdf0e10cSrcweir     // derived from EditEngine. Allows Outliner objetcs to provide
41cdf0e10cSrcweir     // bullet access to the EditEngine.
42cdf0e10cSrcweir     virtual const SvxNumberFormat*  GetNumberFormat( sal_uInt16 nPara ) const;
43cdf0e10cSrcweir 
44cdf0e10cSrcweir public:
45cdf0e10cSrcweir 						OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool );
46cdf0e10cSrcweir 						~OutlinerEditEng();
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 	virtual void 		PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 	virtual void 		ParagraphInserted( sal_uInt16 nNewParagraph );
51cdf0e10cSrcweir 	virtual void 		ParagraphDeleted( sal_uInt16 nDeletedParagraph );
52cdf0e10cSrcweir     virtual void        ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph );
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 	// #101498#
55cdf0e10cSrcweir 	virtual void DrawingText(
56cdf0e10cSrcweir         const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
57cdf0e10cSrcweir         sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft,
58cdf0e10cSrcweir         const EEngineData::WrongSpellVector* pWrongSpellVector,
59cdf0e10cSrcweir         const SvxFieldData* pFieldData,
60cdf0e10cSrcweir         bool bEndOfLine,
61cdf0e10cSrcweir         bool bEndOfParagraph,
62cdf0e10cSrcweir         bool bEndOfBullet,
63cdf0e10cSrcweir         const ::com::sun::star::lang::Locale* pLocale,
64cdf0e10cSrcweir         const Color& rOverlineColor,
65cdf0e10cSrcweir         const Color& rTextLineColor);
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 	virtual	void 		StyleSheetChanged( SfxStyleSheet* pStyle );
68cdf0e10cSrcweir 	virtual void 		ParaAttribsChanged( sal_uInt16 nPara );
69cdf0e10cSrcweir 	virtual sal_Bool 		SpellNextDocument();
70cdf0e10cSrcweir 	virtual XubString	GetUndoComment( sal_uInt16 nUndoId ) const;
71cdf0e10cSrcweir 
72cdf0e10cSrcweir     // for text conversion
73cdf0e10cSrcweir     virtual sal_Bool        ConvertNextDocument();
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 	virtual void		FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos );
76cdf0e10cSrcweir 	virtual void		FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos );
77cdf0e10cSrcweir 	virtual XubString	CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor );
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 	virtual Rectangle 	GetBulletArea( sal_uInt16 nPara );
80cdf0e10cSrcweir 
81cdf0e10cSrcweir    	virtual void        SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
82cdf0e10cSrcweir 
83cdf0e10cSrcweir     // belongs into class Outliner, move there before incompatible update!
84cdf0e10cSrcweir     Link                aOutlinerNotifyHdl;
85cdf0e10cSrcweir     NotifyList          aNotifyCache;
86cdf0e10cSrcweir };
87cdf0e10cSrcweir 
88cdf0e10cSrcweir #endif
89cdf0e10cSrcweir 
90