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: sjapplet.cxx,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 ************************************************************************/
31 #include "sal/config.h"
33 #include "sjapplet.hxx"
35 #include "osl/diagnose.h"
36 #include "rtl/string.hxx"
37 #include "rtl/ustring.hxx"
39 #include "sjapplet_impl.hxx"
41 using namespace ::rtl
;
42 using namespace ::com::sun::star::uno
;
44 SjApplet2::SjApplet2()
45 : _pImpl(new SjApplet2_Impl())
49 SjApplet2::~SjApplet2()
54 //=========================================================================
56 com::sun::star::uno::Reference
<
57 com::sun::star::uno::XComponentContext
> const & context
,
58 Window
* pParentWin
, const INetURLObject
& rDocBase
,
59 const SvCommandList
& rCmdList
)
63 _pImpl
->init(pParentWin
, context
, rDocBase
, rCmdList
);
65 catch(RuntimeException
& runtimeException
) {
66 #if OSL_DEBUG_LEVEL > 1
67 OString message
= OUStringToOString(runtimeException
.Message
, RTL_TEXTENCODING_ASCII_US
);
68 OSL_TRACE("sjapplet.cxx: SjApplet2::Init - exception occurred: %s\n", message
.getStr());
70 (void) runtimeException
; // avoid warning
78 //=========================================================================
79 void SjApplet2::setSizePixel( const Size
& rSize
)
82 _pImpl
->setSize(rSize
);
85 void SjApplet2::appletRestart()
91 void SjApplet2::appletReload()
97 void SjApplet2::appletStart()
103 void SjApplet2::appletStop()
109 void SjApplet2::appletClose()
115 // Fuer SO3, Wrapper fuer Applet liefern
116 SjJScriptAppletObject
* SjApplet2::GetJScriptApplet()
118 OSL_TRACE("SjApplet2::GetJScriptApplet\n");
123 // Settings are detected by the JavaVM service
124 // This function is not necessary anymore
125 void SjApplet2::settingsChanged(void)