xref: /aoo41x/main/sw/inc/SwAppletImpl.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SW_APPLET_IMPL_HXX
29 #define _SW_APPLET_IMPL_HXX
30 
31 #define SWHTML_OPTTYPE_IGNORE 0
32 #define SWHTML_OPTTYPE_TAG 1
33 #define SWHTML_OPTTYPE_PARAM 2
34 #define SWHTML_OPTTYPE_SIZE 3
35 
36 #include <com/sun/star/embed/XEmbeddedObject.hpp>
37 
38 
39 #include <tools/string.hxx>
40 #include <sfx2/frmhtml.hxx>
41 #include <sfx2/frmhtmlw.hxx>
42 #ifndef _WRKWIN_HXX //autogen
43 #include <vcl/wrkwin.hxx>
44 #endif
45 #include <sot/storage.hxx>
46 #include <svl/itemset.hxx>
47 
48 #include <svl/ownlist.hxx>
49 
50 class SfxItemSet;
51 
52 #define OOO_STRING_SW_HTML_O_Hidden "HIDDEN"
53 
54 class SwApplet_Impl
55 {
56     com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > xApplet;
57     SvCommandList     aCommandList; // und die szugehorige Command-List
58 	SfxItemSet 		  aItemSet;
59 	String			  sAlt;
60 
61 public:
62 	static sal_uInt16 GetOptionType( const String& rName, sal_Bool bApplet );
63 	SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
64 	SwApplet_Impl( SfxItemSet& rSet ): aItemSet ( rSet) {}
65 	~SwApplet_Impl();
66 	void CreateApplet( const String& rCode, const String& rName,
67                        sal_Bool bMayScript, const String& rCodeBase,
68                        const String& rBaseURL );
69 #ifdef SOLAR_JAVA
70 	sal_Bool CreateApplet( const String& rBaseURL );
71 	void AppendParam( const String& rName, const String& rValue );
72 #endif
73 	void FinishApplet();
74     com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetApplet() { return xApplet; }
75 	SfxItemSet& GetItemSet() { return aItemSet; }
76     const String& GetAltText() { return sAlt; }
77     void          SetAltText( const String& rAlt ) {sAlt = rAlt;}
78 };
79 #endif
80