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: svdoole2.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 #ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
35 #include <com/sun/star/frame/XModel.hpp>
39 #include <bf_svx/svdorect.hxx>
41 #ifndef _GRAPH_HXX //autogen
42 #include <vcl/graph.hxx>
44 #ifndef _GDIMTF_HXX //autogen
45 #include <vcl/gdimtf.hxx>
48 #include <bf_so3/svstor.hxx>
53 class SvInPlaceObjectRef
;
54 class SvEmbeddedInfoObject
;
56 //************************************************************
58 //************************************************************
60 class SvxUnoShapeModifyListener
;
64 class SdrOle2Obj
: public SdrRectObj
67 SvInPlaceObjectRef
* ppObjRef
; // Referenz auf Objekt
69 String aName
; // Name des Objektes
74 // wg. Kompatibilitaet erstmal am SdrTextObj
76 BOOL bInDestruction
: 1;
78 SdrOle2ObjImpl
* mpImpl
;
80 SvxUnoShapeModifyListener
* pModifyListener
;
84 /*NBFF*/ void ImpSetVisAreaSize();
91 SdrOle2Obj(FASTBOOL bFrame_
=FALSE
);
92 SdrOle2Obj(const SvInPlaceObjectRef
& rNewObjRef
, const String
& rNewObjName
, const Rectangle
& rNewRect
, FASTBOOL bFrame_
=FALSE
);
93 virtual ~SdrOle2Obj();
95 // Ein OLE-Zeichenobjekt kann eine StarView-Grafik beinhalten.
96 // Diese wird angezeigt, wenn das OLE-Objekt leer ist.
97 void SetGraphic(const Graphic
* pGrf
);
98 Graphic
* GetGraphic() const { return pGraphic
; }
100 // OLE object has got a separate PersistName member now;
101 // !!! use ::SetPersistName( ... ) only, if you know what you do !!!
102 String
GetPersistName() const;
103 void SetPersistName( const String
& rPersistName
);
106 virtual String
GetName() const;
108 // Einem SdrOle2Obj kann man ein Applikationsnamen verpassen, den man
109 // spaeter wieder abfragen kann (SD braucht das fuer Praesentationsobjekte).
110 void SetProgName(const String
& rNam
) { aProgName
=rNam
; }
111 const String
& GetProgName() const { return aProgName
; }
112 FASTBOOL
IsEmpty() const;
113 void SetObjRef(const SvInPlaceObjectRef
& rNewObjRef
);
114 const SvInPlaceObjectRef
& GetObjRef() const;
116 virtual void SetPage(SdrPage
* pNewPage
);
117 virtual void SetModel(SdrModel
* pModel
);
119 /** Change the IsClosedObj attribute
122 Whether the OLE object is closed, i.e. has opaque background
124 void SetClosedObj( bool bIsClosed
);
126 virtual UINT16
GetObjIdentifier() const;
127 virtual SdrObject
* CheckHit(const Point
& rPnt
, USHORT nTol
, const SetOfByte
* pVisiLayer
) const;
132 virtual void NbcMove(const Size
& rSize
);
133 virtual void NbcResize(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
);
134 virtual void NbcSetSnapRect(const Rectangle
& rRect
);
135 virtual void NbcSetLogicRect(const Rectangle
& rRect
);
138 FASTBOOL
HasGDIMetaFile() const;
139 const GDIMetaFile
* GetGDIMetaFile() const;
141 virtual void WriteData(SvStream
& rOut
) const;
142 virtual void ReadData(const SdrObjIOHeader
& rHead
, SvStream
& rIn
);
149 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
> getXModel() const;
151 /// #110015# sets the visible area at the SvInPlaceObject and SvEmbeddedInfoObject
152 void SetVisibleArea( const Rectangle
& rArea
);
155 }//end of namespace binfilter
156 #endif //_SVDOOLE2_HXX