Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svx / editobj.hxx
blob62147732c834d3f0c896d24c84eaf8efa99fc3c4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: editobj.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _EDITOBJ_HXX
32 #define _EDITOBJ_HXX
34 #ifndef _STREAM_HXX
35 #include <tools/stream.hxx>
36 #endif
37 #ifndef _TOOLS_DEBUG_HXX
38 #include <tools/debug.hxx>
39 #endif
40 #ifndef _RSCSFX_HXX
41 #include <rsc/rscsfx.hxx>
42 #endif
43 #ifndef _SFXITEMSET_HXX
44 #include <bf_svtools/itemset.hxx>
45 #endif
46 #ifndef _EEITEM_HXX
47 #include <bf_svx/eeitem.hxx>
48 #endif
49 namespace binfilter {
51 class SfxItemPool;
52 class SfxStyleSheetPool;
54 DBG_NAMEEX( EE_EditTextObject )//STRIP008
56 class SvxFieldItem;
57 class EECharAttribArray;
59 #define EDTOBJ_SETTINGS_ULITEMSUMMATION 0x00000001
60 #define EDTOBJ_SETTINGS_ULITEMFIRSTPARA 0x00000002
62 class EditTextObject
64 private:
65 USHORT nWhich;
67 protected:
68 EditTextObject( USHORT nWhich );
69 EditTextObject( const EditTextObject& r );
71 virtual void StoreData( SvStream& rOStream ) const;
72 virtual void CreateData( SvStream& rIStream );
74 public:
75 virtual ~EditTextObject();
77 USHORT Which() const { return nWhich; }
79 virtual USHORT GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern
80 virtual void SetUserType( USHORT n );
83 virtual BOOL IsVertical() const;
84 virtual
85 void SetVertical( BOOL bVertical );
87 virtual USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert
89 virtual EditTextObject* Clone() const = 0;
91 BOOL Store( SvStream& rOStream ) const;
92 static EditTextObject* Create( SvStream& rIStream,
93 SfxItemPool* pGlobalTextObjectPool = 0 );
95 // Zur 5.1 hat sich die Bedeutung des LRSpaceItems fuer den Outliner geaendert...
96 virtual void AdjustImportedLRSpaceItems( BOOL bTurnOfBullets );
97 virtual void PrepareStore( SfxStyleSheetPool* pStyleSheetPool );
98 virtual void FinishStore();
99 virtual void FinishLoad( SfxStyleSheetPool* pStyleSheetPool );
101 virtual USHORT GetParagraphCount() const;
103 virtual XubString GetText( USHORT nParagraph ) const;
104 virtual void Insert( const EditTextObject& rObj, USHORT nPara );
106 virtual void ClearPortionInfo();
111 virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart = EE_CHAR_START, USHORT nEnd = EE_CHAR_END );
113 virtual BOOL HasField( TypeId aType = NULL ) const;
115 virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
117 virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const;
118 virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily );
119 virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily,
120 const XubString& rNewName, SfxStyleFamily eNewFamily );
121 virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName );
124 }//end of namespace binfilter
125 #endif // _EDITOBJ_HXX