1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: editobj.hxx,v $
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 ************************************************************************/
35 #include <tools/stream.hxx>
37 #ifndef _TOOLS_DEBUG_HXX
38 #include <tools/debug.hxx>
41 #include <rsc/rscsfx.hxx>
43 #ifndef _SFXITEMSET_HXX
44 #include <bf_svtools/itemset.hxx>
47 #include <bf_svx/eeitem.hxx>
52 class SfxStyleSheetPool
;
54 DBG_NAMEEX( EE_EditTextObject
)//STRIP008
57 class EECharAttribArray
;
59 #define EDTOBJ_SETTINGS_ULITEMSUMMATION 0x00000001
60 #define EDTOBJ_SETTINGS_ULITEMFIRSTPARA 0x00000002
68 EditTextObject( USHORT nWhich
);
69 EditTextObject( const EditTextObject
& r
);
71 virtual void StoreData( SvStream
& rOStream
) const;
72 virtual void CreateData( SvStream
& rIStream
);
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;
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