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: plugin.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/ipobj.hxx>
35 #include <bf_svtools/ownlist.hxx>
36 #include <bf_so3/ipenv.hxx>
38 #ifndef INCLUDED_SO3DLLAPI_H
39 #include "bf_so3/so3dllapi.h"
48 //=========================================================================
49 struct SvPlugInData_Impl
;
50 class SjJScriptPluginObject
;
51 class SjJScriptJavaObject
;
52 class SO3_DLLPUBLIC SvPlugInObject
: public SvInPlaceObject
55 Die Klasse PlugInObject ist die Abbildung eines InPlace-Objektes
56 auf einen PlugIn-Server. Dieses Objekt kann nur InPlace- und
57 nicht UI-Aktiviert werden.
60 Es handelt sich bei diesem Objekt immer um einen Link. Dieser Link
61 kann allerdings InPlace aktiviert werden.
64 friend class SvPlugInEnvironment
;
65 friend class Executor_Impl
;
67 SvPlugInEnvironment
* pPlugInEnv
;
68 SvPlugInData_Impl
* pImpl
;
69 SvCommandList aCmdList
;
71 USHORT nPlugInMode
;// nicht ein Enum, wegen header file
74 DECL_STATIC_LINK( SvPlugInObject
, NewPlugInHdl_Impl
, Timer
* );
75 DECL_STATIC_LINK( SvPlugInObject
, DataAvailable
, void* );
77 SO3_DLLPRIVATE
void DataChanged_Impl( BOOL bOnlyEmbedSource
);
79 SO3_DLLPRIVATE BOOL
DoStartPlugIn( );
80 SO3_DLLPRIVATE BOOL
StartPlugIn( );
81 SO3_DLLPRIVATE
virtual void FillClass( SvGlobalName
* pClassName
,
84 String
* pFullTypeName
,
85 String
* pShortTypeName
,
86 long nFileFormat
= SOFFICE_FILEFORMAT_CURRENT
) const;
88 SO3_DLLPRIVATE
virtual void Open( BOOL bOpen
);
89 SO3_DLLPRIVATE
virtual void Embed( BOOL
);
90 SO3_DLLPRIVATE
virtual void InPlaceActivate( BOOL
);
91 SO3_DLLPRIVATE
virtual ErrCode
Verb( long, SvEmbeddedClient
* pCallerClient
,
92 Window
* pWin
, const Rectangle
* pWorkRectPixel
);
95 SO3_DLLPRIVATE
virtual void SetVisArea( const Rectangle
& rVisArea
);
96 SO3_DLLPRIVATE
virtual void Draw( OutputDevice
*,
97 const JobSetup
& rSetup
,
98 USHORT nAspect
= ASPECT_CONTENT
);
101 SO3_DLLPRIVATE
virtual BOOL
InitNew( SvStorage
* );
102 SO3_DLLPRIVATE
virtual BOOL
Load( SvStorage
* );
103 SO3_DLLPRIVATE
virtual BOOL
Save();
104 SO3_DLLPRIVATE
virtual BOOL
SaveAs( SvStorage
* );
105 SO3_DLLPRIVATE
virtual void HandsOff();
106 SO3_DLLPRIVATE
virtual BOOL
SaveCompleted( SvStorage
* );
108 // Spaeter gerne mal virtuell...
109 SO3_DLLPRIVATE
void SetMIMEDetectedLink( const Link
& rLink
);
111 SO3_DLLPRIVATE
~SvPlugInObject();
113 SO2_DECL_BASIC_CLASS_DLL(SvPlugInObject
,SOAPP
)
116 virtual ULONG
GetMiscStatus() const;
117 virtual BOOL
IsLink() const;
119 // spezielle Internet Methoden
120 void SetCommandList( const SvCommandList
& rList
);
121 const SvCommandList
& GetCommandList() const { return aCmdList
; }
122 void SetURL( const INetURLObject
& rURL
);
123 INetURLObject
* GetURL() const { return pURL
; }
124 void SetMimeType( const String
& rMimeType
);
125 const String
& GetMimeType() const;
126 void SetPlugInMode( USHORT
);
127 USHORT
GetPlugInMode() const { return nPlugInMode
; }
130 SO2_DECL_IMPL_REF(SvPlugInObject
)
134 #endif // _PLUGIN_HXX