diff options
Diffstat (limited to 'embeddedobj/source/inc/oleembobj.hxx')
-rw-r--r-- | embeddedobj/source/inc/oleembobj.hxx | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx index 7eea3d407e7d..087a3c829527 100644 --- a/embeddedobj/source/inc/oleembobj.hxx +++ b/embeddedobj/source/inc/oleembobj.hxx @@ -32,6 +32,7 @@ #include <com/sun/star/util/XCloseListener.hpp> #include <com/sun/star/io/XActiveDataStreamer.hpp> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase.hxx> #include <rtl/ref.hxx> @@ -39,8 +40,8 @@ #include <osl/thread.h> #include <memory> -namespace cppu { - class OMultiTypeInterfaceContainerHelper; +namespace comphelper { + class OMultiTypeInterfaceContainerHelper2; } class VerbExecutionController @@ -114,7 +115,8 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper , css::embed::XInplaceObject , css::container::XChild , css::io::XActiveDataStreamer - , css::lang::XInitialization > + , css::lang::XInitialization + , css::lang::XServiceInfo > { friend class OleComponent; @@ -122,7 +124,7 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper rtl::Reference<OleComponent> m_pOleComponent; - std::unique_ptr<::cppu::OMultiTypeInterfaceContainerHelper> m_pInterfaceContainer; + std::unique_ptr<::comphelper::OMultiTypeInterfaceContainerHelper2> m_pInterfaceContainer; bool m_bReadOnly; @@ -247,7 +249,8 @@ protected: const css::uno::Reference< css::embed::XStorage >& xStorage, const OUString& sEntName, const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs, - bool bSaveAs ); + bool bSaveAs, + osl::ResettableMutexGuard& rGuard); #ifdef _WIN32 /// @throws css::uno::Exception void StoreObjectToStream( css::uno::Reference< css::io::XOutputStream > const & xOutStream ); @@ -290,13 +293,13 @@ protected: public: // in case a new object must be created the class ID must be specified - OleEmbeddedObject( const css::uno::Reference< css::uno::XComponentContext >& xContext, + OleEmbeddedObject( css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Sequence< sal_Int8 >& aClassID, - const OUString& aClassName ); + OUString aClassName ); // in case object will be loaded from a persistent entry or from a file the class ID will be detected on loading // factory can do it for OOo objects, but for OLE objects OS dependent code is required - OleEmbeddedObject( const css::uno::Reference< css::uno::XComponentContext >& xContext, + OleEmbeddedObject( css::uno::Reference< css::uno::XComponentContext > xContext, bool bLink ); #ifdef _WIN32 // this constructor let object be initialized from clipboard @@ -444,6 +447,22 @@ public: // XInitialization void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override; + + // XServiceInfo + OUString SAL_CALL getImplementationName() override; + sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; + css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; }; +namespace +{ +#if defined(_WIN32) +template <class Proc> auto ExecUnlocked(Proc proc, osl::ResettableMutexGuard& guard) +{ + osl::ResettableMutexGuardScopedReleaser area(guard); + return proc(); +} +#endif +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |