xref: /aoo41x/main/editeng/inc/editeng/unofored.hxx (revision 3ea0c3d5)
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 
24cdf0e10cSrcweir #ifndef _SVX_UNOFORED_HXX
25cdf0e10cSrcweir #define _SVX_UNOFORED_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <editeng/editeng.hxx>
28cdf0e10cSrcweir #include <editeng/unoedsrc.hxx>
29cdf0e10cSrcweir #include "editeng/editengdllapi.h"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir //	SvxEditEngineForwarder - SvxTextForwarder fuer EditEngine
32cdf0e10cSrcweir 
33cdf0e10cSrcweir class EDITENG_DLLPUBLIC SvxEditEngineForwarder : public SvxTextForwarder
34cdf0e10cSrcweir {
35cdf0e10cSrcweir private:
36cdf0e10cSrcweir 	EditEngine&			rEditEngine;
37cdf0e10cSrcweir 
38cdf0e10cSrcweir public:
39cdf0e10cSrcweir 						SvxEditEngineForwarder( EditEngine& rEngine );
40cdf0e10cSrcweir 	virtual				~SvxEditEngineForwarder();
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 	virtual sal_uInt16		GetParagraphCount() const;
43cdf0e10cSrcweir 	virtual sal_uInt16		GetTextLen( sal_uInt16 nParagraph ) const;
44cdf0e10cSrcweir 	virtual String		GetText( const ESelection& rSel ) const;
45cdf0e10cSrcweir 	virtual SfxItemSet	GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const;
46cdf0e10cSrcweir 	virtual	SfxItemSet	GetParaAttribs( sal_uInt16 nPara ) const;
47cdf0e10cSrcweir 	virtual void		SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
48cdf0e10cSrcweir     virtual void        RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
49cdf0e10cSrcweir 	virtual void		GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const;
50cdf0e10cSrcweir 
51cdf0e10cSrcweir 	virtual sal_uInt16		GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
52cdf0e10cSrcweir 	virtual sal_uInt16		GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 	virtual void		QuickInsertText( const String& rText, const ESelection& rSel );
55cdf0e10cSrcweir 	virtual void		QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
56cdf0e10cSrcweir 	virtual void		QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
57cdf0e10cSrcweir 	virtual void		QuickInsertLineBreak( const ESelection& rSel );
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 	virtual SfxItemPool* GetPool() const;
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	virtual XubString    CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
62cdf0e10cSrcweir 	virtual void 	     FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
63cdf0e10cSrcweir 	virtual sal_Bool		 IsValid() const;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir     virtual LanguageType 	GetLanguage( sal_uInt16, sal_uInt16 ) const;
66cdf0e10cSrcweir     virtual sal_uInt16			GetFieldCount( sal_uInt16 nPara ) const;
67cdf0e10cSrcweir     virtual EFieldInfo		GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
68cdf0e10cSrcweir     virtual EBulletInfo     GetBulletInfo( sal_uInt16 nPara ) const;
69cdf0e10cSrcweir     virtual Rectangle		GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
70cdf0e10cSrcweir     virtual Rectangle		GetParaBounds( sal_uInt16 nPara ) const;
71cdf0e10cSrcweir     virtual MapMode			GetMapMode() const;
72cdf0e10cSrcweir 	virtual OutputDevice*	GetRefDevice() const;
73cdf0e10cSrcweir     virtual sal_Bool		GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
74cdf0e10cSrcweir     virtual sal_Bool		GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
75*9b8096d0SSteve Yin     virtual sal_Bool 		GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell = sal_False ) const;
76cdf0e10cSrcweir     virtual sal_uInt16			GetLineCount( sal_uInt16 nPara ) const;
77cdf0e10cSrcweir     virtual sal_uInt16			GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
78cdf0e10cSrcweir     virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
79cdf0e10cSrcweir     virtual sal_uInt16          GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
80cdf0e10cSrcweir     virtual sal_Bool		Delete( const ESelection& );
81cdf0e10cSrcweir     virtual sal_Bool		InsertText( const String&, const ESelection& );
82cdf0e10cSrcweir     virtual sal_Bool		QuickFormatDoc( sal_Bool bFull=sal_False );
83cdf0e10cSrcweir     virtual sal_Int16		GetDepth( sal_uInt16 nPara ) const;
84cdf0e10cSrcweir     virtual sal_Bool		SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
85cdf0e10cSrcweir 
86cdf0e10cSrcweir     virtual const SfxItemSet*   GetEmptyItemSetPtr();
87cdf0e10cSrcweir 
88cdf0e10cSrcweir     // implementation functions for XParagraphAppend and XTextPortionAppend
89cdf0e10cSrcweir     virtual void        AppendParagraph();
90cdf0e10cSrcweir     virtual xub_StrLen  AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
91cdf0e10cSrcweir     //XTextCopy
92cdf0e10cSrcweir     virtual void        CopyText(const SvxTextForwarder& rSource);
93cdf0e10cSrcweir };
94cdf0e10cSrcweir 
95cdf0e10cSrcweir #endif
96cdf0e10cSrcweir 
97