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: ipobj.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 <bf_so3/embobj.hxx>
35 #include <bf_so3/ipobj.hxx>
37 #ifndef INCLUDED_SO3DLLAPI_H
38 #include "bf_so3/so3dllapi.h"
41 /*************************************************************************/
42 /*************************************************************************/
49 class SvContainerEnvironment
;
50 class ImpInPlaceObject
;
52 class ImpOleInPlaceActiveObject
;
53 struct IOleInPlaceObject
;
54 struct IOleInPlaceActiveObject
;
55 class SvInPlaceEnvironment
;
56 class SvInPlaceObjectList
;
57 class SvInPlaceClipWindow
;
58 class SvInPlaceWindow
;
59 /*************************************************************************
60 *************************************************************************/
61 class SvInPlaceObject
;
62 #ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
63 #define SO2_DECL_SVINPLACEOBJECT_DEFINED
64 SO2_DECL_REF(SvInPlaceObject
)
67 class SO3_DLLPUBLIC SvInPlaceObject
: public SvEmbeddedObject
69 friend class ImpInPlaceObject
;
70 friend class ImpInPlaceSite
;
71 friend class SvInPlaceClient
;
72 friend class ImpOleInPlaceActiveObject
;
73 friend class SvEditObjectProtocol
;
74 friend class ImplSvEditObjectProtocol
;
75 friend class SvInPlaceEnvironment
;
78 IOleInPlaceObject
* pObjI
;
79 IOleInPlaceActiveObject
* pActiveObj
;
80 SvInPlaceEnvironment
* pIPEnv
;
84 SO3_DLLPRIVATE BOOL
DoMergePalette();
88 virtual void TopWinActivate( BOOL bActivate
);
89 virtual void DocWinActivate( BOOL bActivate
);
91 SO3_DLLPRIVATE
void SetIPEnv( SvInPlaceEnvironment
* pFrm
);
93 virtual ErrCode
Verb( long nVerbPos
, SvEmbeddedClient
* pCallerClient
,
94 Window
* pWin
, const Rectangle
* pWorkAreaPixel
);
95 virtual void Open( BOOL bOpen
);
96 virtual void InPlaceActivate( BOOL bActivate
);
97 virtual void UIActivate( BOOL bActivate
);
99 SO3_DLLPRIVATE
void SetUndoable( BOOL bUndoable
)
100 { bIsUndoable
= bUndoable
; }
102 virtual BOOL
MergePalette( const Palette
& rContainerPal
);
105 SO2_DECL_STANDARD_CLASS_DLL(SvInPlaceObject
,SOAPP
)
106 IOleInPlaceObject
* GetInPlaceObject() const;
107 IOleInPlaceActiveObject
* GetInPlaceActiveObject() const;
108 BOOL
SetInPlaceActiveObject( IOleInPlaceActiveObject
* );
110 SvInPlaceEnvironment
* GetIPEnv() const { return pIPEnv
; }
111 SvInPlaceClient
* GetIPClient() const
112 { return aProt
.GetIPClient(); }
113 static SvInPlaceObjectList
& GetIPActiveObjectList();
115 // Robuste Protokollsteuerung
116 ErrCode
DoInPlaceActivate( BOOL bActivate
);
117 ErrCode
DoUIActivate( BOOL bActivate
);
119 virtual void SetVisArea( const Rectangle
& rVisArea
);
120 BOOL
IsUndoable() const { return bIsUndoable
; }
121 virtual BOOL
ReactivateAndUndo();
124 DECLARE_LIST(SvInPlaceObjectList
,SvInPlaceObject
*)
125 SO2_IMPL_REF(SvInPlaceObject
)
127 //=========================================================================
128 class SO3_DLLPUBLIC SvDeathObject
: public SvInPlaceObject
131 Wenn das Laden eine Ole-Objektes fehlschl"agt, kann dieses Objekt
132 teilweise als ersatzt dienen.
136 Nicht an allen Methoden des Objektes erkennt der Aufrufer,
137 dass es sich um eine Ersatzobjekt handelt.
141 SO3_DLLPRIVATE
virtual ErrCode
Verb( long, SvEmbeddedClient
* pCallerClient
,
142 Window
* pWin
, const Rectangle
* pWorkRectPixel
);
143 SO3_DLLPRIVATE
virtual void Draw( OutputDevice
*,
144 const JobSetup
& rSetup
,
145 USHORT nAspect
= ASPECT_CONTENT
);
147 SvDeathObject( const Rectangle
& rVisArea
);