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: ndole.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 ************************************************************************/
34 #include <ndnotxt.hxx>
39 class SvInPlaceObjectRef
;
40 class SvInPlaceObject
;
51 friend class SwOLENode
;
53 static SwOLELRUCache
* pOLELRU_Cache
;
55 const SwOLENode
* pOLENd
;
57 //Entweder Ref oder Name sind bekannt, wenn nur der Name bekannt ist, wird
58 //dir Ref bei Anforderung durch GetOleRef() vom Sfx besorgt.
59 SvInPlaceObjectRef
*pOLERef
; //new/delete, damit so2.hxx wegfaellt.
62 SwOLEObj( const SwOLEObj
& rObj
); //nicht erlaubt.
65 void SetNode( SwOLENode
* pNode
);
68 SwOLEObj( SvInPlaceObject
*pObj
);
69 SwOLEObj( const String
&rName
);
72 BOOL
RemovedFromLRU();
74 #ifndef _FESHVIEW_ONLY_INLINE_NEEDED
75 SvInPlaceObjectRef
GetOleRef();
76 const String
&GetName() const { return aName
; }
78 BOOL
IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss.
83 // --------------------
85 // --------------------
87 struct SwPersistentOleData
;
89 class SwOLENode
: public SwNoTxtNode
93 SwPersistentOleData
* pSavedData
;
94 String sChartTblName
; // bei Chart Objecten: Name der ref. Tabelle
95 BOOL bOLESizeInvalid
; //Soll beim SwDoc::PrtOLENotify beruecksichtig
96 //werden (zum Beispiel kopiert). Ist nicht
99 SwOLENode( const SwNodeIndex
&rWhere
,
101 SwGrfFmtColl
*pGrfColl
,
102 SwAttrSet
* pAutoAttr
= 0 );
104 SwOLENode( const SwNodeIndex
&rWhere
,
106 SwGrfFmtColl
*pGrfColl
,
107 SwAttrSet
* pAutoAttr
= 0 );
109 // aOLEObj besitzt einen privaten Copy-CTOR, wir brauchen auch einen:
110 SwOLENode( const SwOLENode
& );
113 const SwOLEObj
& GetOLEObj() const { return aOLEObj
; }
114 SwOLEObj
& GetOLEObj() { return aOLEObj
; }
116 virtual SwCntntNode
*SplitNode( const SwPosition
& );
117 // steht in ndcopy.cxx
118 virtual SwCntntNode
* MakeCopy( SwDoc
*, const SwNodeIndex
& ) const;
120 virtual Size
GetTwipSize() const;
123 BOOL
IsInGlobalDocSection() const;
124 BOOL
IsOLEObjectDeleted() const;
126 BOOL
IsOLESizeInvalid() const { return bOLESizeInvalid
; }
127 void SetOLESizeInvalid( BOOL b
){ bOLESizeInvalid
= b
; }
129 #ifndef _FESHVIEW_ONLY_INLINE_NEEDED
130 const String
& GetChartTblName() const { return sChartTblName
; }
131 void SetChartTblName( const String
& rNm
) { sChartTblName
= rNm
; }
136 // Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
137 #if !(defined(MACOSX) && ( __GNUC__ < 3 ))
138 // GrP moved to gcc_outl.cxx; revisit with gcc3
139 inline SwOLENode
*SwNode::GetOLENode()
141 return ND_OLENODE
== nNodeType
? (SwOLENode
*)this : 0;
143 inline const SwOLENode
*SwNode::GetOLENode() const
145 return ND_OLENODE
== nNodeType
? (const SwOLENode
*)this : 0;
149 } //namespace binfilter