summaryrefslogtreecommitdiff
path: root/extensions/source/plugin/inc
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2015-12-12 11:36:25 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-12-17 15:31:17 +0000
commit4c18af27bf95b332ee2006cfc0bbf469fb1a84d4 (patch)
tree5ff484eada8d6782b70c323a340bf197709ecc1e /extensions/source/plugin/inc
parent57b1cf5862429d86a82158eb5e8cf425fd2f4527 (diff)
tdf#96398 kill remaining NPAPI support for plugins _inside_ LO
- probably out of date - links against Gtk2 and thus causes a GTk2 dependency in core packages - the only serious usecase (Flash) is doomed anyway Change-Id: I7264ab5eb04c2f4b6c31a815e45b9818209e5ae2 Reviewed-on: https://gerrit.libreoffice.org/20658 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Reviewed-by: Bryan Quigley <gquigs@gmail.com> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'extensions/source/plugin/inc')
-rw-r--r--extensions/source/plugin/inc/plugin/aqua/sysplug.hxx156
-rw-r--r--extensions/source/plugin/inc/plugin/impl.hxx437
-rw-r--r--extensions/source/plugin/inc/plugin/model.hxx132
-rw-r--r--extensions/source/plugin/inc/plugin/multiplx.hxx169
-rw-r--r--extensions/source/plugin/inc/plugin/plcom.hxx80
-rw-r--r--extensions/source/plugin/inc/plugin/plctrl.hxx181
-rw-r--r--extensions/source/plugin/inc/plugin/unx/mediator.hxx147
-rw-r--r--extensions/source/plugin/inc/plugin/unx/plugcon.hxx206
-rw-r--r--extensions/source/plugin/inc/plugin/unx/sysplug.hxx78
-rw-r--r--extensions/source/plugin/inc/plugin/win/sysplug.hxx130
10 files changed, 0 insertions, 1716 deletions
diff --git a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
deleted file mode 100644
index 3a1638a9381e..000000000000
--- a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_AQUA_SYSPLUG_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_AQUA_SYSPLUG_HXX
-
-#include <unistd.h>
-
-#include <list>
-#include <map>
-#include <algorithm>
-#include "premac.h"
-#include <Carbon/Carbon.h>
-#include <Security/cssmconfig.h>
-#include "postmac.h"
-#undef uint32
-
-#define XP_MAC
-#include "npapi.h"
-#include "npsdk/npupp.h"
-
-#include "plugin/plcom.hxx"
-
-#include "vcl/sysdata.hxx"
-#include "vcl/threadex.hxx"
-#include "vcl/timer.hxx"
-#include "osl/module.h"
-
-#ifdef __OBJC__
-@class NSView;
-#else
-class NSView;
-#endif
-
-class XPlugin_Impl;
-
-namespace plugstringhelper
-{
-OUString getString( CFStringRef i_xString );
-OUString getString( CFURLRef i_xURL );
-CFMutableStringRef createString( const OUString& i_rString );
-CFURLRef createURL( const OUString& i_rString );
-OUString getURLFromPath( const OUString& i_rPath );
-CFURLRef createURLFromPath( const OUString& i_rPath );
-OUString CFURLtoOSLURL( CFURLRef i_xURL );
-}
-
-
-class MacPluginComm :
- public PluginComm,
- public vcl::SolarThreadExecutor
-
-{
- enum CallType {
- eNPP_Destroy,
- eNPP_DestroyStream,
- eNPP_GetJavaClass,
- eNPP_Initialize,
- eNPP_New,
- eNPP_NewStream,
- eNPP_Print,
- eNPP_SetWindow,
- eNPP_Shutdown,
- eNPP_StreamAsFile,
- eNPP_URLNotify,
- eNPP_Write,
- eNPP_WriteReady,
- eNPP_GetValue,
- eNPP_SetValue,
- eNPP_HandleEvent,
- eNP_Initialize
- };
-
- void* m_aArgs[ 8 ];
- CallType m_eCall;
-
- virtual long doIt();
-public:
- MacPluginComm( const OUString& rMIME, const OUString& rName, NSView* pView );
- virtual ~MacPluginComm();
-
- // FIXME:
- // this actually should be from the NP headers
- // but currently we have too old a version
- // changes this when we have updated our headers
- typedef struct NP_CGContext
- {
- CGContextRef context;
- WindowRef window;
- } NP_CGContext;
-
-public:
- virtual NPError NPP_Destroy( NPP instance, NPSavedData** save );
- virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason );
- virtual NPError NPP_Initialize();
- virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc,
- char* argn[], char* argv[], NPSavedData *saved );
- virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream,
- NPBool seekable, uint16_t* stype );
- virtual void NPP_Print( NPP instance, NPPrint* platformPrint );
- virtual NPError NPP_SetWindow( NPP instance, NPWindow* window );
- virtual void NPP_Shutdown();
- virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname );
- virtual void NPP_URLNotify( NPP instance, const char* url,
- NPReason reason, void* notifyData );
- virtual int32_t NPP_Write( NPP instance, NPStream* stream, int32_t offset,
- int32_t len, void* buffer );
- virtual int32_t NPP_WriteReady( NPP instance, NPStream* stream );
- virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_value );
- virtual int16_t NPP_HandleEvent( NPP instance, void* event );
-
- virtual NPError NPP_SetWindow( XPlugin_Impl* );
- virtual NPError NPP_Destroy( XPlugin_Impl*, NPSavedData** save );
-
- void drawView( XPlugin_Impl* );
-private:
- sal_Bool retrieveFunction( const char* i_pName, void** i_ppFunc ) const;
- DECL_LINK_TYPED( NullTimerHdl, Timer*, void );
-
-private:
- CFBundleRef m_xBundle;
- oslModule m_hPlugLib;
- NPPluginFuncs m_aNPPfuncs;
-
- // timer for sending nullEvents
- AutoTimer* m_pNullTimer;
- std::list< XPlugin_Impl* > m_aNullEventClients;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx
deleted file mode 100644
index 85d74184a05b..000000000000
--- a/extensions/source/plugin/inc/plugin/impl.hxx
+++ /dev/null
@@ -1,437 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_IMPL_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_IMPL_HXX
-
-#include <config_lgpl.h>
-
-#include <limits>
-#include <memory>
-
-#include "cppuhelper/weak.hxx"
-
-#include "com/sun/star/awt/Key.hpp"
-#include "com/sun/star/awt/KeyFunction.hpp"
-#include "com/sun/star/beans/PropertyAttribute.hpp"
-#include "com/sun/star/plugin/PluginMode.hpp"
-#include "com/sun/star/plugin/PluginDescription.hpp"
-#include "com/sun/star/plugin/PluginException.hpp"
-#include "com/sun/star/plugin/PluginVariable.hpp"
-#include "com/sun/star/plugin/XPlugin.hpp"
-#include "com/sun/star/plugin/XPluginManager.hpp"
-#include "com/sun/star/plugin/XPluginContext.hpp"
-#include "com/sun/star/io/XConnectable.hpp"
-#include "com/sun/star/io/XOutputStream.hpp"
-#include "com/sun/star/io/XDataOutputStream.hpp"
-#include "com/sun/star/io/XActiveDataControl.hpp"
-#include "com/sun/star/io/XDataInputStream.hpp"
-#include "com/sun/star/io/XMarkableStream.hpp"
-#include "com/sun/star/io/XInputStream.hpp"
-#include "com/sun/star/io/XStreamListener.hpp"
-#include "com/sun/star/io/XActiveDataSink.hpp"
-#include "com/sun/star/io/XActiveDataSource.hpp"
-#include "com/sun/star/lang/XServiceName.hpp"
-#include "com/sun/star/lang/XServiceInfo.hpp"
-#include "com/sun/star/lang/XMultiServiceFactory.hpp"
-#include "com/sun/star/lang/XSingleServiceFactory.hpp"
-#include "com/sun/star/awt/GradientStyle.hpp"
-#include "com/sun/star/awt/RasterOperation.hpp"
-#include "com/sun/star/awt/Gradient.hpp"
-#include "com/sun/star/awt/XGraphics.hpp"
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include "cppuhelper/implbase2.hxx"
-#include "cppuhelper/implbase1.hxx"
-
-#include <list>
-
-#ifdef WNT
-#include <plugin/win/sysplug.hxx>
-#elif defined(MACOSX)
-#include "plugin/aqua/sysplug.hxx"
-#elif defined(UNX)
-#include "plugin/unx/sysplug.hxx"
-#endif
-
-struct SysPlugData;
-
-std::shared_ptr<SysPlugData> CreateSysPlugData();
-
-extern "C" {
-
-void /*SAL_CALL NP_LOADDS*/ NPN_ForceRedraw_Impl(NPP instance);
-NPError /*SAL_CALL NP_LOADDS*/ NPN_SetValue_Impl( NPP instance,
- NPPVariable variable,
- void* value );
-} // extern "C"
-
-#include "plugin/plctrl.hxx"
-#include "plugin/model.hxx"
-
-#include "vcl/sysdata.hxx"
-#include "vcl/syschild.hxx"
-
-#include "tools/link.hxx"
-#include "tools/stream.hxx"
-
-
-using namespace com::sun::star::uno;
-
-#define PROVIDING_NONE 0
-#define PROVIDING_NOW 1
-#define PROVIDING_MODEL_UPDATE 2
-
-// forwards
-namespace ucbhelper { class Content; }
-class PluginStream;
-class PluginInputStream;
-class PluginOutputStream;
-class XPlugin_Impl;
-class PluginDisposer;
-class PluginEventListener;
-
-class XPlugin_Impl : public css::plugin::XPlugin,
- public PluginControl_Impl,
- public css::beans::XPropertyChangeListener
-{
-private:
- ::osl::Mutex m_aMutex;
- Reference< css::lang::XMultiServiceFactory > m_xSMgr;
- Reference< css::plugin::XPluginContext > m_rBrowserContext;
-
- PluginComm* m_pPluginComm;
- NPP_t m_aInstance;
- NPWindow m_aNPWindow;
- std::shared_ptr<SysPlugData> m_pSysPlugData;
- rtl_TextEncoding m_aEncoding;
-
- const char** m_pArgv;
- const char** m_pArgn;
- int m_nArgs;
- OString m_aLastGetUrl;
-
- Reference< css::awt::XControlModel > m_xModel;
-
- css::plugin::PluginDescription m_aDescription;
- sal_Int16 m_aPluginMode;
-
- int m_nProvidingState;
- int m_nCalledFromPlugin;
- PluginDisposer* m_pDisposer;
-
- ::std::list<PluginInputStream*> m_aInputStreams;
- ::std::list<PluginOutputStream*> m_aOutputStreams;
- ::std::list<PluginEventListener*> m_aPEventListeners;
- OUString m_aURL;
-
- bool m_bIsDisposed;
-
-#ifdef MACOSX
- void SetSysPlugDataParentView(SystemEnvData const& rEnvData);
-#endif
-
- void prependArg( const char* pName, const char* pValue ); // arguments will be strdup'ed
- void initArgs( const Sequence< OUString >& argn,
- const Sequence< OUString >& argv,
- sal_Int16 mode );
- void freeArgs();
- void handleSpecialArgs();
-
- void loadPlugin();
- void destroyInstance();
- void modelChanged();
-
-public:
- XPlugin_Impl( const Reference< css::lang::XMultiServiceFactory > & rSMgr );
- virtual ~XPlugin_Impl();
-
- ::osl::Mutex& getMutex() { return m_aMutex; }
-
- void destroyStreams();
-
- void setLastGetUrl( const OString& rUrl ) { m_aLastGetUrl = rUrl; }
-
- css::plugin::PluginDescription fitDescription( const OUString& rURL );
-
- ::std::list<PluginInputStream*>& getInputStreams() { return m_aInputStreams; }
- ::std::list<PluginOutputStream*>& getOutputStreams() { return m_aOutputStreams; }
- PluginComm* getPluginComm() { return m_pPluginComm; }
- void setPluginComm( PluginComm* comm )
- {
- if( ! m_pPluginComm )
- {
- m_pPluginComm = comm;
- m_pPluginComm->addRef();
- }
- }
- Reference< css::lang::XMultiServiceFactory > getServiceManager() { return m_xSMgr; }
- const css::plugin::PluginDescription& getDescription() const { return m_aDescription; }
- rtl_TextEncoding getTextEncoding() { return m_aEncoding; }
- NPP_t& getNPPInstance() { return m_aInstance; }
- NPWindow& getNPWindow() { return m_aNPWindow; }
-
- void enterPluginCallback() { m_nCalledFromPlugin++; }
- void leavePluginCallback() { m_nCalledFromPlugin--; }
- bool isDisposable() { return m_nCalledFromPlugin < 1; }
- DECL_LINK_TYPED( secondLevelDispose, void*, void );
-
- void addPluginEventListener( PluginEventListener* pListener )
- { m_aPEventListeners.push_back( pListener ); }
- void checkListeners( const char* normalizedURL );
-
- void initInstance(
- const css::plugin::PluginDescription& rDescription,
- const Sequence< OUString >& argn,
- const Sequence< OUString >& argv,
- sal_Int16 mode );
- void initInstance(
- const OUString& rURL,
- const Sequence< OUString >& argn,
- const Sequence< OUString >& argv,
- sal_Int16 mode );
-
- const OUString& getRefererURL() { return m_aURL; }
- OUString getCreationURL();
-
- PluginStream* getStreamFromNPStream( NPStream* );
-
- const SystemEnvData* getSysChildSysData()
- { return _pSysChild->GetSystemData(); }
-
- const Reference< css::plugin::XPluginContext > & getPluginContext() const
- { return m_rBrowserContext; }
- void setPluginContext( const Reference< css::plugin::XPluginContext > & );
-
- // XInterface
- virtual Any SAL_CALL queryInterface( const Type& ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL acquire() throw() override
- { OWeakAggObject::acquire(); }
- virtual void SAL_CALL release() throw() override
- { OWeakAggObject::release(); }
-
- // OWeakAggObject
- virtual Any SAL_CALL queryAggregation( const Type& )
- throw( css::uno::RuntimeException, std::exception ) override;
-
- // PluginContol_Impl
- virtual void SAL_CALL dispose() throw(std::exception) override;
- virtual void SAL_CALL createPeer( const Reference< css::awt::XToolkit > & xToolkit, const Reference< css::awt::XWindowPeer > & Parent) throw( RuntimeException, std::exception ) override;
-
- virtual sal_Bool SAL_CALL setModel( const Reference< css::awt::XControlModel > & Model ) throw( RuntimeException, std::exception ) override;
- virtual Reference< css::awt::XControlModel > SAL_CALL getModel()throw( RuntimeException, std::exception ) override
- { return m_xModel; }
-
- virtual void SAL_CALL setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_, sal_Int32 nHeight_, sal_Int16 nFlags ) throw( RuntimeException, std::exception ) override;
-
- // css::plugin::XPlugin
- virtual sal_Bool SAL_CALL provideNewStream(const OUString& mimetype, const Reference< css::io::XActiveDataSource > & stream, const OUString& url, sal_Int32 length, sal_Int32 lastmodified, sal_Bool isfile) throw(std::exception) override;
-
- // css::beans::XPropertyChangeListener
- virtual void SAL_CALL disposing( const css::lang::EventObject& rSource ) throw(std::exception) override;
- virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& rEvent)
- throw (css::uno::RuntimeException, std::exception) override;
-};
-
-class PluginManager
-{
-private:
- Reference< css::lang::XMultiServiceFactory > m_xSMgr;
- ::std::list<PluginComm*> m_aPluginComms;
- ::std::list<XPlugin_Impl*> m_aAllPlugins;
- ::osl::Mutex m_aPluginMutex;
-
- static PluginManager* pManager;
-
- PluginManager();
-public:
-
- static PluginManager& get();
- static void setServiceFactory( const Reference< css::lang::XMultiServiceFactory >& xFactory );
- static const Sequence< OUString >& getAdditionalSearchPaths();
-
- ::std::list<PluginComm*>& getPluginComms() { return m_aPluginComms; }
- ::std::list<XPlugin_Impl*>& getPlugins() { return m_aAllPlugins; }
- ::osl::Mutex& getPluginMutex() { return m_aPluginMutex; }
-};
-
-class XPluginManager_Impl :
- public cppu::WeakAggImplHelper2< css::plugin::XPluginManager,
- css::lang::XServiceInfo >
-{
- Reference< css::uno::XComponentContext > m_xContext;
-public:
- XPluginManager_Impl( const Reference< css::uno::XComponentContext > & );
- virtual ~XPluginManager_Impl();
-
- static XPlugin_Impl* getXPluginFromNPP( NPP );
- static XPlugin_Impl* getPluginImplementation( const Reference< css::plugin::XPlugin >& plugin );
-
- virtual Reference< css::plugin::XPluginContext > SAL_CALL createPluginContext() throw(std::exception) override;
-
- // has to be implemented per system
- static Sequence< css::plugin::PluginDescription > SAL_CALL impl_getPluginDescriptions() throw(css::uno::RuntimeException, std::exception);
- // calls system specific impl_getPluginDescriptions
- // checks whether plugins are disabled
- virtual Sequence< css::plugin::PluginDescription > SAL_CALL getPluginDescriptions()
- throw (css::uno::RuntimeException, std::exception) override;
-
- virtual Reference< css::plugin::XPlugin > SAL_CALL createPlugin( const Reference< css::plugin::XPluginContext > & acontext, sal_Int16 mode, const Sequence< OUString >& argn, const Sequence< OUString >& argv, const css::plugin::PluginDescription& plugintype) throw( RuntimeException,css::plugin::PluginException, std::exception ) override;
-
- virtual Reference< css::plugin::XPlugin > SAL_CALL createPluginFromURL( const Reference< css::plugin::XPluginContext > & acontext, sal_Int16 mode, const Sequence< OUString >& argn, const Sequence< OUString >& argv, const Reference< css::awt::XToolkit > & toolkit, const Reference< css::awt::XWindowPeer > & parent, const OUString& url ) throw (css::uno::RuntimeException, std::exception) override;
-
- virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw() override;
- virtual OUString SAL_CALL getImplementationName() throw() override;
-
- Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ) override;
- static Sequence< OUString > getSupportedServiceNames_Static() throw( );
- static OUString getImplementationName_Static() throw( )
- {
- /** the soplayer uses this name in its source! maybe not after 5.2 */
- return OUString( "com.sun.star.extensions.PluginManager" );
- }
-};
-Reference< XInterface > SAL_CALL PluginManager_CreateInstance( const Reference< css::lang::XMultiServiceFactory > & ) throw( Exception );
-
-enum PluginStreamType { InputStream, OutputStream };
-
-class PluginStream
-{
-protected:
- css::uno::WeakReference<css::uno::XInterface> m_wPlugin;
- XPlugin_Impl* m_pPlugin;
- NPStream m_aNPStream;
-public:
- PluginStream( XPlugin_Impl* pPlugin,
- const char* url, sal_uInt32 len, sal_uInt32 lastmod );
- virtual ~PluginStream();
-
- NPStream& getStream() { return m_aNPStream; }
-
- virtual PluginStreamType getStreamType() = 0;
-};
-
-class PluginInputStream :
- public PluginStream,
- public cppu::WeakAggImplHelper2<
- css::io::XOutputStream,
- css::io::XConnectable
- >
-{
-private:
- ::ucbhelper::Content* m_pContent;
- sal_Int32 m_nMode;
- sal_uInt32 m_nWritePos;
-
- Reference< css::io::XActiveDataSource > m_xSource;
- // hold a reference on input until closeOutput is called
-
- Reference< css::io::XConnectable > m_xPredecessor;
- Reference< css::io::XConnectable > m_xSuccessor;
-
- // needed to hold a reference to self in NP_SEEK mode
- Reference< css::io::XOutputStream > m_xSelf;
-
- SvFileStream m_aFileStream;
-public:
- PluginInputStream( XPlugin_Impl* pPlugin,
- const char* url, sal_uInt32 len, sal_uInt32 lastmod );
-
- PluginInputStream() : PluginStream( nullptr, nullptr, 0, 0 ) {}
-
- virtual ~PluginInputStream();
-
- virtual PluginStreamType getStreamType() override;
-
- void setMode( sal_Int32 nMode );
- sal_uInt32 read( sal_uInt32 offset, sal_Int8* buffer, sal_uInt32 size );
- void setSource( const Reference< css::io::XActiveDataSource >& xSource ) { m_xSource = xSource; }
- // get contents ot url via ucbhelper::Content
- void load();
-
- // clear reference
- bool releaseSelf()
- { bool bRet = m_xSelf.is(); m_xSelf.clear(); return bRet; }
-
- // XOutputStream
- virtual void SAL_CALL writeBytes( const Sequence<sal_Int8>& ) throw(std::exception) override;
- virtual void SAL_CALL flush() throw(std::exception) override;
- virtual void SAL_CALL closeOutput() throw(std::exception) override;
-
- // XConnectable
- virtual void SAL_CALL setPredecessor( const Reference< css::io::XConnectable >& xPredecessor ) throw(std::exception) override
- { m_xPredecessor = xPredecessor; }
- virtual Reference< css::io::XConnectable > SAL_CALL getPredecessor() throw(std::exception) override
- { return m_xPredecessor; }
-
- virtual void SAL_CALL setSuccessor( const Reference< css::io::XConnectable >& xSuccessor ) throw(std::exception) override
- { m_xSuccessor = xSuccessor; }
- virtual Reference< css::io::XConnectable > SAL_CALL getSuccessor() throw(std::exception) override
- { return m_xSuccessor; }
-};
-
-class PluginOutputStream : public PluginStream
-{
-private:
- Reference< css::io::XOutputStream > m_xStream;
-public:
- PluginOutputStream( XPlugin_Impl* pPlugin, const char* url,
- sal_uInt32 len, sal_uInt32 lastmod );
- virtual ~PluginOutputStream();
-
- virtual PluginStreamType getStreamType() override;
-
- Reference< css::io::XOutputStream > & getOutputStream() { return m_xStream; }
-};
-
-class PluginEventListener :
- public cppu::WeakAggImplHelper1< css::lang::XEventListener >
-{
-private:
- XPlugin_Impl* m_pPlugin;
- Reference< css::plugin::XPlugin > m_xPlugin; // just to hold the plugin
- char* m_pUrl;
- char* m_pNormalizedUrl;
- void* m_pNotifyData;
-public:
- PluginEventListener( XPlugin_Impl*,
- const char* url,
- const char* normurl,
- void* notifyData );
- virtual ~PluginEventListener();
-
- const char* getURL() { return m_pUrl; }
- const char* getNormalizedURL() { return m_pNormalizedUrl; }
- void* getNotifyData() { return m_pNotifyData; }
-
- // css::lang::XEventListener
- virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(std::exception) override;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/model.hxx b/extensions/source/plugin/inc/plugin/model.hxx
deleted file mode 100644
index 227ae6f545bb..000000000000
--- a/extensions/source/plugin/inc/plugin/model.hxx
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_MODEL_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_MODEL_HXX
-
-#include <com/sun/star/io/XObjectInputStream.hpp>
-#include <com/sun/star/io/XPersistObject.hpp>
-#include <com/sun/star/io/XObjectOutputStream.hpp>
-#include <com/sun/star/lang/XServiceName.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/awt/XControlModel.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-
-#include <cppuhelper/propshlp.hxx>
-#include <cppuhelper/weakagg.hxx>
-#include <rtl/alloc.h>
-
-#include <list>
-
-using namespace com::sun::star::uno;
-
-class BroadcasterHelperHolder
-{
-protected:
- ::cppu::OBroadcastHelper m_aHelper;
-public:
- BroadcasterHelperHolder( osl::Mutex& rMutex ) :
- m_aHelper( rMutex ) {}
- ~BroadcasterHelperHolder() {}
-};
-
-class PluginModel : public BroadcasterHelperHolder,
- public cppu::OPropertySetHelper,
- public cppu::OPropertyArrayHelper,
- public cppu::OWeakAggObject,
- public css::lang::XComponent,
- public css::io::XPersistObject,
- public css::awt::XControlModel
-{
- private:
- OUString m_aCreationURL;
- OUString m_aMimeType;
-
- std::list< Reference< css::lang::XEventListener > >
- m_aDisposeListeners;
- public:
- // these are here to force memory de/allocation to sal lib.
- static void * SAL_CALL operator new( size_t nSize ) throw()
- { return rtl_allocateMemory( nSize ); }
- static void SAL_CALL operator delete( void * pMem ) throw()
- { rtl_freeMemory( pMem ); }
-
- PluginModel();
- PluginModel( const OUString& rURL, const OUString& rMimeType );
- virtual ~PluginModel();
-
- // XInterface
- virtual Any SAL_CALL queryInterface( const Type& rType ) throw( css::uno::RuntimeException, std::exception ) override
- { return OWeakAggObject::queryInterface( rType ); }
- virtual void SAL_CALL acquire() throw() override
- { OWeakAggObject::acquire(); }
- virtual void SAL_CALL release() throw() override
- { OWeakAggObject::release(); }
-
- virtual Any SAL_CALL queryAggregation( const Type& ) throw( css::uno::RuntimeException, std::exception ) override;
-
-
- // css::lang::XTypeProvider
-
- static Sequence< OUString > SAL_CALL getSupportedServiceNames_Static() throw( );
- static OUString SAL_CALL getImplementationName_Static() throw( )
- {
- /** the soplayer uses this name in its source! maybe not after 5.2 */
- return OUString( "com.sun.star.extensions.PluginModel" );
- }
-
- // OPropertySetHelper
- virtual cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
- virtual sal_Bool SAL_CALL convertFastPropertyValue( Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue ) throw() override;
- virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle,
- const Any& rValue )
- throw(css::uno::Exception, std::exception) override;
- virtual void SAL_CALL getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const throw() override;
- virtual Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(std::exception) override;
-
- // css::io::XPersistObject
- virtual OUString SAL_CALL getServiceName() throw(std::exception) override;
- virtual void SAL_CALL write(const Reference< css::io::XObjectOutputStream > & OutStream) throw(std::exception) override;
- virtual void SAL_CALL read(const Reference< css::io::XObjectInputStream > & InStream) throw(std::exception) override;
-
- // css::lang::XComponent
- virtual void SAL_CALL addEventListener( const Reference< css::lang::XEventListener > & l ) throw(std::exception) override;
- virtual void SAL_CALL removeEventListener( const Reference< css::lang::XEventListener > & l ) throw(std::exception) override;
- virtual void SAL_CALL dispose() throw(std::exception) override;
- private:
- using cppu::OPropertySetHelper::getFastPropertyValue;
-};
-Reference< XInterface > SAL_CALL PluginModel_CreateInstance( const Reference< css::lang::XMultiServiceFactory > & ) throw( Exception );
-
-#endif // INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_MODEL_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/multiplx.hxx b/extensions/source/plugin/inc/plugin/multiplx.hxx
deleted file mode 100644
index dc0e480e1b33..000000000000
--- a/extensions/source/plugin/inc/plugin/multiplx.hxx
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_MULTIPLX_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_MULTIPLX_HXX
-
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/awt/XKeyListener.hpp>
-#include <com/sun/star/awt/XPaintListener.hpp>
-#include <com/sun/star/awt/KeyEvent.hpp>
-#include <com/sun/star/awt/KeyModifier.hpp>
-#include <com/sun/star/awt/XMouseMotionListener.hpp>
-#include <com/sun/star/awt/FocusEvent.hpp>
-#include <com/sun/star/awt/XWindowListener.hpp>
-#include <com/sun/star/awt/XActivateListener.hpp>
-#include <com/sun/star/awt/MouseEvent.hpp>
-#include <com/sun/star/awt/XTopWindowListener.hpp>
-#include <com/sun/star/awt/PaintEvent.hpp>
-#include <com/sun/star/awt/InputEvent.hpp>
-#include <com/sun/star/awt/KeyGroup.hpp>
-#include <com/sun/star/awt/Key.hpp>
-#include <com/sun/star/awt/WindowEvent.hpp>
-#include <com/sun/star/awt/XMouseListener.hpp>
-#include <com/sun/star/awt/KeyFunction.hpp>
-#include <com/sun/star/awt/FocusChangeReason.hpp>
-#include <com/sun/star/awt/MouseButton.hpp>
-#include <com/sun/star/awt/XFocusListener.hpp>
-#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
-
-#include <cppuhelper/implbase7.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
-
-using namespace com::sun::star::uno;
-
-struct MRCListenerMultiplexerHelper_Mutex
-{
- ::osl::Mutex aMutex;
-};
-
-class MRCListenerMultiplexerHelper :
- public MRCListenerMultiplexerHelper_Mutex,
-
- public ::cppu::WeakAggImplHelper7<
- css::awt::XFocusListener,
- css::awt::XWindowListener,
- css::awt::XKeyListener,
- css::awt::XMouseListener,
- css::awt::XMouseMotionListener,
- css::awt::XPaintListener,
- css::awt::XTopWindowListener >
-{
-public:
- /**
- * Create a Multiplexer of XWindowEvents.
- *
- * @param rControl The control. All listeners think that this is the original
- * broadcaster.
- * @param rPeer The peer from which the original events are dispatched. Null is
- * allowed.
- */
- MRCListenerMultiplexerHelper( const Reference< css::awt::XWindow > & rControl, const Reference< css::awt::XWindow > & rPeer );
-
- /**
- * Remove all listeners from the previous set peer and add the needed listeners to rPeer.
- * @param rPeer The peer from which the original events are dispatched. Null is
- * allowed.
- */
- void setPeer( const Reference< css::awt::XWindow > & rPeer );
-
- /**
- * Remove all listeners and send a disposing message.
- */
- void disposeAndClear();
-
- /**
- * Add the specified listener to the source.
- */
- void advise( const Type& type, const Reference< XInterface > & listener);
- /**
- * Remove the specified listener from the source.
- */
- void unadvise(const Type& type, const Reference< XInterface > & listener);
-
- // css::lang::XEventListener
- void SAL_CALL disposing(const css::lang::EventObject& Source) throw(std::exception) override;
- // css::awt::XFocusListener
- void SAL_CALL focusGained(const css::awt::FocusEvent& e) throw(std::exception) override;
- void SAL_CALL focusLost(const css::awt::FocusEvent& e) throw(std::exception) override;
- // css::awt::XWindowListener
- void SAL_CALL windowResized(const css::awt::WindowEvent& e) throw(std::exception) override;
- void SAL_CALL windowMoved(const css::awt::WindowEvent& e) throw(std::exception) override;
- void SAL_CALL windowShown(const css::lang::EventObject& e) throw(std::exception) override;
- void SAL_CALL windowHidden(const css::lang::EventObject& e) throw(std::exception) override;
- // css::awt::XKeyListener
- void SAL_CALL keyPressed( const css::awt::KeyEvent& e ) throw(std::exception) override;
- void SAL_CALL keyReleased( const css::awt::KeyEvent& e ) throw(std::exception) override;
- // css::awt::XMouseListener
- void SAL_CALL mousePressed(const css::awt::MouseEvent& e) throw(std::exception) override;
- void SAL_CALL mouseReleased(const css::awt::MouseEvent& e) throw(std::exception) override;
- void SAL_CALL mouseEntered(const css::awt::MouseEvent& e) throw(std::exception) override;
- void SAL_CALL mouseExited(const css::awt::MouseEvent& e) throw(std::exception) override;
- // css::awt::XMouseMotionListener
- void SAL_CALL mouseDragged(const css::awt::MouseEvent& e) throw(std::exception) override;
- void SAL_CALL mouseMoved(const css::awt::MouseEvent& e) throw(std::exception) override;
- // css::awt::XPaintListener
- void SAL_CALL windowPaint(const css::awt::PaintEvent& e) throw(std::exception) override;
- // css::awt::XTopWindowListener
- void SAL_CALL windowOpened( const css::lang::EventObject& e ) throw(std::exception) override;
- void SAL_CALL windowClosing( const css::lang::EventObject& e ) throw(std::exception) override;
- void SAL_CALL windowClosed( const css::lang::EventObject& e ) throw(std::exception) override;
- void SAL_CALL windowMinimized( const css::lang::EventObject& e ) throw(std::exception) override;
- void SAL_CALL windowNormalized( const css::lang::EventObject& e ) throw(std::exception) override;
- void SAL_CALL windowActivated( const css::lang::EventObject& e ) throw(std::exception) override;
- void SAL_CALL windowDeactivated( const css::lang::EventObject& e ) throw(std::exception) override;
-protected:
- /**
- * Remove the listener with the uik rUik from the peer rPeer.
- * @param rPeer the peer from which the listener is removed.
- * @param rUik the listener uik, which specify the type of the listener.
- */
- void adviseToPeer( const Reference< css::awt::XWindow > & rPeer, const Type & type );
- /**
- * Add the listener with the uik rUik to the peer rPeer.
- * @param rPeer the peer to which the listener is added.
- * @param rUik the listener uik, which specify the type of the listener.
- */
- void unadviseFromPeer( const Reference< css::awt::XWindow > & rPeer, const Type & type );
-private:
- /** The source of the events. Normally this is the peer object.*/
- Reference< css::awt::XWindow > xPeer;
- WeakReference< css::awt::XControl > xControl;
- ::cppu::OMultiTypeInterfaceContainerHelper aListenerHolder;
-
-
- MRCListenerMultiplexerHelper( const MRCListenerMultiplexerHelper & ) = delete;
- MRCListenerMultiplexerHelper & operator = ( const MRCListenerMultiplexerHelper & ) = delete;
-};
-
-#endif // INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_MULTIPLX_HXX
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/plcom.hxx b/extensions/source/plugin/inc/plugin/plcom.hxx
deleted file mode 100644
index 213c6c494a96..000000000000
--- a/extensions/source/plugin/inc/plugin/plcom.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_PLCOM_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_PLCOM_HXX
-
-#include <list>
-
-class XPlugin_Impl;
-
-class PluginComm
-{
-protected:
- int m_nRefCount;
- OString m_aLibName;
- std::list< OUString > m_aFilesToDelete;
-public:
- PluginComm( const OString& rLibName, bool bReusable = true );
- virtual ~PluginComm();
-
- void addRef() { m_nRefCount++; }
- void decRef() { m_nRefCount--; if( ! m_nRefCount ) delete this; }
-
- const OString& getLibName() { return m_aLibName; }
-
- void addFileToDelete( const OUString& filename )
- { m_aFilesToDelete.push_back( filename ); }
-
- virtual NPError NPP_Destroy( NPP instance, NPSavedData** save ) = 0;
- virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream,
- NPError reason ) = 0;
- virtual NPError NPP_Initialize() = 0;
- virtual NPError NPP_New( NPMIMEType pluginType, NPP instance,
- uint16_t mode, int16_t argc,
- char* argn[], char* argv[],
- NPSavedData *saved ) = 0;
- virtual NPError NPP_NewStream( NPP instance, NPMIMEType type,
- NPStream* stream,
- NPBool seekable, uint16_t* stype ) = 0;
- virtual NPError NPP_SetWindow( NPP instance, NPWindow* window ) = 0;
- virtual void NPP_Shutdown() = 0;
- virtual void NPP_StreamAsFile( NPP instance, NPStream* stream,
- const char* fname ) = 0;
- virtual void NPP_URLNotify( NPP instance, const char* url,
- NPReason reason, void* notifyData ) = 0;
- virtual int32_t NPP_Write( NPP instance, NPStream* stream, int32_t offset,
- int32_t len, void* buffer ) = 0;
- virtual int32_t NPP_WriteReady( NPP instance, NPStream* stream ) = 0;
-
- NPError NPP_SetWindow( XPlugin_Impl* );
- NPError NPP_Destroy( XPlugin_Impl*, NPSavedData** save );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/plctrl.hxx b/extensions/source/plugin/inc/plugin/plctrl.hxx
deleted file mode 100644
index 6f75cef3d8ec..000000000000
--- a/extensions/source/plugin/inc/plugin/plctrl.hxx
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_PLCTRL_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_PLCTRL_HXX
-
-#include <cppuhelper/weak.hxx>
-#include <plugin/multiplx.hxx>
-#include <com/sun/star/beans/PropertyValues.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/PropertyState.hpp>
-#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#include <com/sun/star/beans/XMultiPropertySet.hpp>
-#include <com/sun/star/beans/XFastPropertySet.hpp>
-#include <com/sun/star/beans/XVetoableChangeListener.hpp>
-#include <com/sun/star/beans/XPropertyState.hpp>
-#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
-#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#include <com/sun/star/beans/XPropertyAccess.hpp>
-#include <com/sun/star/beans/XPropertyContainer.hpp>
-#include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
-#include <com/sun/star/beans/PropertyChangeEvent.hpp>
-#include <com/sun/star/awt/XVclContainerPeer.hpp>
-#include <com/sun/star/awt/XVclWindowPeer.hpp>
-#include <com/sun/star/awt/XControlModel.hpp>
-#include <com/sun/star/awt/XUnoControlContainer.hpp>
-#include <com/sun/star/awt/XControlContainer.hpp>
-#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
-#include <com/sun/star/awt/XVclContainer.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
-
-#include <cppuhelper/implbase4.hxx>
-#include <vcl/vclptr.hxx>
-
-#include <list>
-
-class SystemChildWindow;
-
-
-class PluginControl_Impl : public ::cppu::WeakAggImplHelper4<
- css::awt::XControl,
- css::awt::XWindow,
- css::awt::XFocusListener,
- css::awt::XView >
-{
-public:
- // css::awt::XControl
- virtual void SAL_CALL setContext( const css::uno::Reference< css::uno::XInterface > & xContext ) throw( css::uno::RuntimeException, std::exception ) override
- { _xContext = xContext; }
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() throw( css::uno::RuntimeException, std::exception ) override
- { return _xContext; }
-
- virtual sal_Bool SAL_CALL setModel( const css::uno::Reference< css::awt::XControlModel > & Model ) throw( css::uno::RuntimeException, std::exception ) override = 0;
- virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() throw( css::uno::RuntimeException, std::exception ) override = 0;
-
- virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() throw( css::uno::RuntimeException, std::exception ) override
- { return static_cast<css::awt::XView*>(this); }
-
- virtual sal_Bool SAL_CALL isTransparent() throw( css::uno::RuntimeException, std::exception ) override
- { return sal_False; }
-
- virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual sal_Bool SAL_CALL isDesignMode() throw( css::uno::RuntimeException, std::exception ) override
- { return _bInDesignMode; }
-
- virtual void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit > & xToolkit, const css::uno::Reference< css::awt::XWindowPeer > & Parent) throw( css::uno::RuntimeException, std::exception ) override;
- virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() throw( css::uno::RuntimeException, std::exception ) override
- { return _xPeer; }
-
- // css::awt::XWindow
- virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL setFocus() throw( css::uno::RuntimeException, std::exception ) override;
-
- virtual void SAL_CALL setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_, sal_Int32 nHeight_, sal_Int16 nFlags ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual css::awt::Rectangle SAL_CALL getPosSize() throw( css::uno::RuntimeException, std::exception ) override;
-
- virtual void SAL_CALL addWindowListener( const css::uno::Reference< css::awt::XWindowListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL removeWindowListener( const css::uno::Reference< css::awt::XWindowListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL addFocusListener( const css::uno::Reference< css::awt::XFocusListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL removeFocusListener( const css::uno::Reference< css::awt::XFocusListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL addKeyListener( const css::uno::Reference< css::awt::XKeyListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL removeKeyListener( const css::uno::Reference< css::awt::XKeyListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL addMouseListener( const css::uno::Reference< css::awt::XMouseListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL removeMouseListener( const css::uno::Reference< css::awt::XMouseListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL addMouseMotionListener( const Reference< css::awt::XMouseMotionListener > & l ) throw( RuntimeException, std::exception ) override;
- virtual void SAL_CALL removeMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL addPaintListener( const css::uno::Reference< css::awt::XPaintListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL removePaintListener( const css::uno::Reference< css::awt::XPaintListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
-
- // css::lang::XEventListener
- virtual void SAL_CALL disposing( const css::lang::EventObject & rSource ) throw( css::uno::RuntimeException, std::exception ) override;
- // css::awt::XFocusListener
- virtual void SAL_CALL focusGained( const css::awt::FocusEvent & rEvt ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL focusLost( const css::awt::FocusEvent & rEvt ) throw( css::uno::RuntimeException, std::exception ) override;
-
- // css::lang::XComponent
- virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener > & l ) throw( css::uno::RuntimeException, std::exception ) override;
-
- virtual void SAL_CALL dispose() throw( css::uno::RuntimeException, std::exception ) override;
-
- // css::awt::XView
- virtual sal_Bool SAL_CALL setGraphics( const css::uno::Reference< css::awt::XGraphics > & /*aDevice*/ ) throw( css::uno::RuntimeException, std::exception ) override
- { return sal_False; }
- virtual css::uno::Reference< css::awt::XGraphics > SAL_CALL getGraphics() throw( css::uno::RuntimeException, std::exception ) override
- { return css::uno::Reference< css::awt::XGraphics > (); }
-
- virtual css::awt::Size SAL_CALL getSize() throw( css::uno::RuntimeException, std::exception ) override
- { return css::awt::Size(_nWidth, _nHeight); }
-
- virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) throw( css::uno::RuntimeException, std::exception ) override;
- virtual void SAL_CALL setZoom( float ZoomX, float ZoomY ) throw( css::uno::RuntimeException, std::exception ) override;
-
-public:
- PluginControl_Impl();
- virtual ~PluginControl_Impl();
-
- MRCListenerMultiplexerHelper* getMultiplexer();
-
-protected:
- void releasePeer();
-
-protected:
- ::std::list< Reference< css::lang::XEventListener > > _aDisposeListeners;
- MRCListenerMultiplexerHelper* _pMultiplexer;
-
- Reference< XInterface > _xContext;
-
- sal_Int32 _nX;
- sal_Int32 _nY;
- sal_Int32 _nWidth;
- sal_Int32 _nHeight;
- sal_Int16 _nFlags;
-
- bool _bVisible;
- bool _bInDesignMode;
- bool _bEnable;
-
- VclPtr<SystemChildWindow> _pSysChild;
- css::uno::Reference< css::awt::XWindowPeer > _xPeer;
- css::uno::Reference< css::awt::XWindow > _xPeerWindow;
-
- css::uno::Reference< css::awt::XWindow > _xParentWindow;
- css::uno::Reference< css::awt::XWindowPeer > _xParentPeer;
-};
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx
deleted file mode 100644
index 8c8dbcf94602..000000000000
--- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_UNX_MEDIATOR_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_UNX_MEDIATOR_HXX
-
-#include <string.h>
-#include <tools/link.hxx>
-#include <tools/solar.h>
-#include <osl/pipe.hxx>
-#include <osl/mutex.hxx>
-#include <osl/conditn.hxx>
-#include <osl/thread.hxx>
-
-#include <vector>
-
-struct MediatorMessage
-{
- sal_uLong m_nID;
- sal_uLong m_nBytes;
- char* m_pBytes;
- char* m_pRun;
-
- MediatorMessage() : m_nID( 0 ), m_nBytes( 0 ),
- m_pBytes( nullptr ), m_pRun( nullptr ) {}
- MediatorMessage( sal_uLong nID, sal_uLong nBytes, char* pBytes ) :
- m_nID( nID ),m_nBytes( nBytes ), m_pRun( nullptr )
- {
- m_pBytes = new char[ m_nBytes ];
- memcpy( m_pBytes, pBytes, (size_t)m_nBytes );
- }
-
- ~MediatorMessage()
- {
- if( m_pBytes )
- delete [] m_pBytes;
- }
-
- sal_uLong ExtractULONG();
- char* GetString();
- sal_uInt32 GetUINT32();
- void* GetBytes( sal_uLong& );
- void* GetBytes() { sal_uLong nBytes; return GetBytes( nBytes ); }
-};
-
-class MediatorListener;
-
-class Mediator
-{
- friend class MediatorListener;
-protected:
- int m_nSocket;
-
- std::vector<MediatorMessage*> m_aMessageQueue;
- osl::Mutex m_aQueueMutex;
- osl::Mutex m_aSendMutex;
- // only one thread can send a message at any given time
- osl::Condition m_aNewMessageCdtn;
- MediatorListener* m_pListener;
- // thread to fill the queue
-
- sal_uLong m_nCurrentID;
- // will be constantly increased with each message sent
- bool m_bValid;
-
- Link<Mediator*,void> m_aConnectionLostHdl;
- Link<Mediator*,void> m_aNewMessageHdl;
-public:
- Mediator( int nSocket );
- virtual ~Mediator();
-
- // mark mediator as invalid. No more messages will be processed,
- // SendMessage, WaitForMessage, TransactMessage will return immediately
- // with error
- void invalidate() { m_bValid = false; }
-
- sal_uLong SendMessage( sal_uLong nBytes, const char* pBytes, sal_uLong nMessageID = 0 );
-
- bool WaitForMessage( sal_uLong nTimeOut = 5000 );
- // timeout in ms
- // TRUE: Message came in
- // FALSE: timed out
- // if timeout is set, WaitForMessage will wait even if there are messages
- // in the queue
-
- virtual MediatorMessage* WaitForAnswer( sal_uLong nMessageID );
- // wait for an answer message ( ID >= 1 << 24 )
- // the message will be removed from the queue and returned
-
- MediatorMessage* TransactMessage( sal_uLong nBytes, char* pBytes );
- // sends a message and waits for an answer
-
- MediatorMessage* GetNextMessage( bool bWait = false );
-
-
- void SetConnectionLostHdl( const Link<Mediator*,void>& rLink )
- {
- m_aConnectionLostHdl = rLink;
- }
-
- void SetNewMessageHdl( const Link<Mediator*,void>& rLink )
- {
- m_aNewMessageHdl = rLink;
- }
-};
-
-class MediatorListener : public osl::Thread
-{
- friend class Mediator;
-private:
- Mediator* m_pMediator;
- ::osl::Mutex m_aMutex;
-
- MediatorListener( Mediator* );
- virtual ~MediatorListener();
-
- virtual void run() override;
- virtual void onTerminated() override;
-};
-
-#endif // INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_UNX_MEDIATOR_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
deleted file mode 100644
index 81325eb30f59..000000000000
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_UNX_PLUGCON_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_UNX_PLUGCON_HXX
-
-#include <stdarg.h>
-#include <string.h>
-
-#include <list>
-#include <vector>
-#include <plugin/unx/mediator.hxx>
-
-#include <prex.h>
-
-#include <X11/Xlib.h>
-extern "C" {
-#include <X11/Intrinsic.h>
-}
-#include <X11/Shell.h>
-#include <X11/IntrinsicP.h> /* Intrinsics Definitions*/
-#include <X11/StringDefs.h> /* Standard Name-String definitions*/
-#if defined USE_MOTIF
-#include <Xm/DrawingA.h>
-#else
-#include <X11/Composite.h>
-#endif
-#include <X11/Xatom.h>
-#ifndef XP_UNIX
-# define XP_UNIX
-#endif
-#define MOZ_X11
-#include <stdio.h>
-
-#if ! defined ( _NPAPI_H_) && ! defined (npapi_h_)
-extern "C" {
-#include <npsdk/npupp.h>
-}
-#include "npapi.h"
-
-#if NP_VERSION_MINOR < 17
-// compatibility hack: compile with older NPN api header, but define
-// some later introduced constants
-// for gcc 3
-#define NP_ABI_MASK 0x10000000
-#define NPNVSupportsXEmbedBool ((NPNVariable)14)
-#define NPPVpluginNeedsXEmbed ((NPPVariable)14)
-#define NPNVToolkit ((int)(13 | NP_ABI_MASK))
-#define NPNVGtk12 1
-#define NPNVGtk2 2
-#endif
-#endif
-
-#include <config_vclplug.h>
-
-#if ENABLE_GTK
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#else
-#define GtkWidget void
-#endif
-
-#include <postx.h>
-
-#include <tools/solar.h>
-
-class ConnectorInstance
-{
-public:
- NPP instance;
- NPWindow window;
- NPSetWindowCallbackStruct ws_info;
- char* pMimeType;
- void* pShell;
- void* pWidget;
-
- GtkWidget* pGtkWindow;
- GtkWidget* pGtkWidget;
-
- bool bShouldUseXEmbed;
-
- int nArg;
- char** argn;
- char** argv;
- char* pArgnBuf;
- char* pArgvBuf;
- NPSavedData aData;
-
- ConnectorInstance( NPP inst, char* type,
- int args, char* pargnbuf, sal_uLong nargnbytes,
- char* pargvbuf, sal_uLong nargvbytes,
- char* savedata, sal_uLong savebytes );
- ~ConnectorInstance();
-};
-
-class PluginConnector : public Mediator
-{
-protected:
- osl::Mutex m_aUserEventMutex;
-
- static std::vector<PluginConnector*> allConnectors;
-
- DECL_LINK_TYPED( NewMessageHdl, Mediator*, void );
- DECL_LINK_TYPED( WorkOnNewMessageHdl, void*, void );
-
- std::vector<NPStream*> m_aNPWrapStreams;
- std::vector<ConnectorInstance*> m_aInstances;
-
- static sal_uLong FillBuffer( char*&, const char*, sal_uLong, va_list );
-public:
- PluginConnector( int nSocket );
- virtual ~PluginConnector();
-
- virtual MediatorMessage* WaitForAnswer( sal_uLong nMessageID ) override;
- MediatorMessage* Transact( const char*, sal_uLong, ... );
- MediatorMessage* Transact( sal_uInt32, ... );
- void Respond( sal_uLong nID, char*, sal_uLong, ... );
- sal_uLong Send( sal_uInt32, ... );
-
- static const sal_uInt32 UnknownStreamID = 0xffffffff;
- static const sal_uInt32 UnknownNPPID = 0xffffffff;
-
- sal_uInt32 GetStreamID( NPStream* pStream );
- sal_uInt32 GetNPPID( NPP );
-
- std::vector<NPStream*>& getStreamList() { return m_aNPWrapStreams; }
-
- static NPError GetNPError( MediatorMessage* pMes )
- {
- NPError* pErr = static_cast<NPError*>(pMes->GetBytes());
- NPError aErr = *pErr;
- delete [] pErr;
- return aErr;
- }
-
- void CallWorkHandler()
- {
- LINK( this, PluginConnector, WorkOnNewMessageHdl ).
- Call( static_cast<Mediator*>(this) );
- }
-};
-
-enum CommandAtoms
-{
- eNPN_GetURL,
- eNPN_GetURLNotify,
- eNPN_DestroyStream,
- eNPN_NewStream,
- eNPN_PostURLNotify,
- eNPN_PostURL,
- eNPN_RequestRead,
- eNPN_Status,
- eNPN_Version,
- eNPN_Write,
- eNPN_UserAgent,
-
- eNPP_DestroyStream,
- eNPP_Destroy,
- eNPP_DestroyPhase2,
- eNPP_NewStream,
- eNPP_New,
- eNPP_SetWindow,
- eNPP_StreamAsFile,
- eNPP_URLNotify,
- eNPP_WriteReady,
- eNPP_Write,
- eNPP_GetMIMEDescription,
- eNPP_Initialize,
- eNPP_Shutdown,
-
- eMaxCommand
-};
-
-const char* GetCommandName( CommandAtoms );
-
-#define POST_NONCONST_STRING( x ) x ? x : const_cast<char*>(""), x ? strlen(x) : 1
-#define POST_STRING( x ) x ? x : "", x ? strlen(x) : 1
-
-#endif // INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_UNX_PLUGCON_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/unx/sysplug.hxx b/extensions/source/plugin/inc/plugin/unx/sysplug.hxx
deleted file mode 100644
index 03772a62ae2b..000000000000
--- a/extensions/source/plugin/inc/plugin/unx/sysplug.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_UNX_SYSPLUG_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_UNX_SYSPLUG_HXX
-
-#include <unistd.h>
-
-#include <plugin/unx/plugcon.hxx>
-#include <plugin/plcom.hxx>
-#include <vcl/sysdata.hxx>
-
-class UnxPluginComm : public PluginComm, public PluginConnector
-{
-private:
- pid_t m_nCommPID;
-public:
- UnxPluginComm( const OUString& mimetype,
- const OUString& library,
- Window aParent,
- int nDescriptor1,
- int nDescriptor2
- );
- virtual ~UnxPluginComm();
-
- using PluginComm::NPP_Destroy;
- virtual NPError NPP_Destroy( NPP instance, NPSavedData** save ) override;
- virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream,
- NPError reason ) override;
- virtual NPError NPP_Initialize() override;
- virtual NPError NPP_New( NPMIMEType pluginType, NPP instance,
- uint16_t mode, int16_t argc,
- char* argn[], char* argv[], NPSavedData *saved ) override;
- virtual NPError NPP_NewStream( NPP instance, NPMIMEType type,
- NPStream* stream,
- NPBool seekable, uint16_t* stype ) override;
-
- using PluginComm::NPP_SetWindow;
- virtual NPError NPP_SetWindow( NPP instance, NPWindow* window ) override;
- virtual void NPP_Shutdown() override;
- virtual void NPP_StreamAsFile( NPP instance, NPStream* stream,
- const char* fname ) override;
- virtual void NPP_URLNotify( NPP instance, const char* url, NPReason reason,
- void* notifyData ) override;
- virtual int32_t NPP_Write( NPP instance, NPStream* stream, int32_t offset,
- int32_t len, void* buffer ) override;
- virtual int32_t NPP_WriteReady( NPP instance, NPStream* stream ) override;
-
- static bool getPluginappPath(OString * path);
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/plugin/inc/plugin/win/sysplug.hxx b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
deleted file mode 100644
index 38c5abf3d62f..000000000000
--- a/extensions/source/plugin/inc/plugin/win/sysplug.hxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_WIN_SYSPLUG_HXX
-#define INCLUDED_EXTENSIONS_SOURCE_PLUGIN_INC_PLUGIN_WIN_SYSPLUG_HXX
-
-#if defined _MSC_VER
-#pragma warning (push,1)
-#pragma warning (disable:4005)
-#endif
-
-#include <tchar.h>
-
-#if defined _MSC_VER
-#pragma pack( push, 8 )
-#endif
-#include "npapi.h"
-#include <npsdk/npupp.h>
-#if defined _MSC_VER
-#pragma pack( pop )
-#endif
-
-#if defined _MSC_VER
-#pragma warning (pop)
-#endif
-
-#include <list>
-#include <map>
-#include <algorithm>
-
-#include <plugin/plcom.hxx>
-#include <vcl/threadex.hxx>
-
-
-class PluginComm_Impl :
- public PluginComm,
- public vcl::SolarThreadExecutor
-
-{
- enum CallType {
- eNPP_Destroy,
- eNPP_DestroyStream,
- eNPP_GetJavaClass,
- eNPP_Initialize,
- eNPP_New,
- eNPP_NewStream,
- eNPP_Print,
- eNPP_SetWindow,
- eNPP_Shutdown,
- eNPP_StreamAsFile,
- eNPP_URLNotify,
- eNPP_Write,
- eNPP_WriteReady,
- eNPP_GetValue,
- eNPP_SetValue,
- eNP_Initialize
- };
-
- void* m_aArgs[ 8 ];
- CallType m_eCall;
-
- virtual long doIt();
-public:
- struct CannotInitializeException {};
-
- PluginComm_Impl( const OUString& rMIME, const OUString& rName, HWND hWnd );
- virtual ~PluginComm_Impl();
-
-public:
- using PluginComm::NPP_Destroy;
- virtual NPError NPP_Destroy( NPP instance, NPSavedData** save );
- virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason );
- virtual NPError NPP_Initialize();
- virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc,
- char* argn[], char* argv[], NPSavedData *saved );
- virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream,
- NPBool seekable, uint16_t* stype );
- virtual void NPP_Print( NPP instance, NPPrint* platformPrint );
-
- using PluginComm::NPP_SetWindow;
- virtual NPError NPP_SetWindow( NPP instance, NPWindow* window );
- virtual void NPP_Shutdown();
- virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname );
- virtual void NPP_URLNotify( NPP instance, const char* url,
- NPReason reason, void* notifyData );
- virtual int32_t NPP_Write( NPP instance, NPStream* stream, int32_t offset,
- int32_t len, void* buffer );
- virtual int32_t NPP_WriteReady( NPP instance, NPStream* stream );
- virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_alue );
-
-private:
- void shutdown();
- BOOL retrieveFunction( TCHAR const * pName, void** ppFunc ) const;
-
-private:
- HINSTANCE _plDLL;
-
- NPPluginFuncs _NPPfuncs;
-};
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */