Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svx / svdoole2.hxx
blobc233f38e861393ae5cc317de94132f0c328b033d
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: svdoole2.hxx,v $
10 * $Revision: 1.10 $
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 _SVDOOLE2_HXX
32 #define _SVDOOLE2_HXX
34 #ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
35 #include <com/sun/star/frame/XModel.hpp>
36 #endif
38 #ifndef _SVDORECT_HXX
39 #include <bf_svx/svdorect.hxx>
40 #endif
41 #ifndef _GRAPH_HXX //autogen
42 #include <vcl/graph.hxx>
43 #endif
44 #ifndef _GDIMTF_HXX //autogen
45 #include <vcl/gdimtf.hxx>
46 #endif
48 #include <bf_so3/svstor.hxx>
50 namespace binfilter {
52 class SvPersist;
53 class SvInPlaceObjectRef;
54 class SvEmbeddedInfoObject;
56 //************************************************************
57 // SdrOle2Obj
58 //************************************************************
60 class SvxUnoShapeModifyListener;
62 class SdrOle2ObjImpl;
64 class SdrOle2Obj : public SdrRectObj
66 protected:
67 SvInPlaceObjectRef* ppObjRef; // Referenz auf Objekt
69 String aName; // Name des Objektes
71 Graphic* pGraphic;
72 String aProgName;
74 // wg. Kompatibilitaet erstmal am SdrTextObj
75 BOOL bFrame : 1;
76 BOOL bInDestruction : 1;
78 SdrOle2ObjImpl* mpImpl;
80 SvxUnoShapeModifyListener* pModifyListener;
82 protected:
84 /*NBFF*/ void ImpSetVisAreaSize();
86 void Init();
88 public:
89 TYPEINFO();
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
121 @param bIsClosed
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);
137 // fuer Import:
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);
144 BOOL Unload();
146 void Connect();
147 void Disconnect();
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