1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SFX_PLUGIN_HXX
21 #define _SFX_PLUGIN_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <com/sun/star/util/XCloseable.hpp>
26 #include <com/sun/star/lang/XEventListener.hpp>
27 #include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
30 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
31 #include <com/sun/star/plugin/XPlugin.hpp>
32 #include <com/sun/star/lang/XInitialization.hpp>
33 #include <com/sun/star/embed/XEmbeddedObject.hpp>
34 #include <cppuhelper/implbase5.hxx>
36 #include <rtl/ustring.hxx>
37 #include <svl/ownlist.hxx>
38 #include <svl/itemprop.hxx>
40 #include <sfx2/sfxuno.hxx>
45 class PluginObject
: public ::cppu::WeakImplHelper5
<
46 com::sun::star::util::XCloseable
,
47 com::sun::star::lang::XEventListener
,
48 com::sun::star::frame::XSynchronousFrameLoader
,
49 com::sun::star::lang::XInitialization
,
50 com::sun::star::beans::XPropertySet
>
52 com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> mxFact
;
53 com::sun::star::uno::Reference
< com::sun::star::plugin::XPlugin
> mxPlugin
;
54 com::sun::star::uno::Reference
< com::sun::star::embed::XEmbeddedObject
> mxObj
;
55 SfxItemPropertyMap maPropMap
;
56 SvCommandList maCmdList
;
60 PluginObject( const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& rFact
);
63 virtual sal_Bool SAL_CALL
load( const com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
>& lDescriptor
,
64 const com::sun::star::uno::Reference
< com::sun::star::frame::XFrame
>& xFrame
) throw( com::sun::star::uno::RuntimeException
);
65 virtual void SAL_CALL
cancel() throw( com::sun::star::uno::RuntimeException
);
66 virtual void SAL_CALL
close( sal_Bool bDeliverOwnership
) throw( com::sun::star::util::CloseVetoException
, com::sun::star::uno::RuntimeException
);
67 virtual void SAL_CALL
addCloseListener( const com::sun::star::uno::Reference
< com::sun::star::util::XCloseListener
>& xListener
) throw( com::sun::star::uno::RuntimeException
);
68 virtual void SAL_CALL
removeCloseListener( const com::sun::star::uno::Reference
< com::sun::star::util::XCloseListener
>& xListener
) throw( com::sun::star::uno::RuntimeException
);
69 virtual void SAL_CALL
disposing( const com::sun::star::lang::EventObject
& aEvent
) throw (com::sun::star::uno::RuntimeException
) ;
70 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException
);
71 virtual void SAL_CALL
addPropertyChangeListener(const OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
> & aListener
) throw( ::com::sun::star::uno::RuntimeException
);
72 virtual void SAL_CALL
removePropertyChangeListener(const OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
> & aListener
) throw( ::com::sun::star::uno::RuntimeException
);
73 virtual void SAL_CALL
addVetoableChangeListener(const OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
> & aListener
) throw( ::com::sun::star::uno::RuntimeException
);
74 virtual void SAL_CALL
removeVetoableChangeListener(const OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
> & aListener
) throw( ::com::sun::star::uno::RuntimeException
);
75 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
76 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
77 virtual void SAL_CALL
initialize( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aArguments
) throw (::com::sun::star::uno::Exception
, ::com::sun::star::uno::RuntimeException
);
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */