binaryurp/source/binaryurp.component | 5 +-- binaryurp/source/bridgefactory.cxx | 39 ++++++++++++++++++++++---- binaryurp/source/bridgefactory.hxx | 12 +++++++- framework/source/dispatch/closedispatcher.cxx | 13 ++++++-- 4 files changed, 55 insertions(+), 14 deletions(-)
New commits: commit c1ca0de5cc03044f5d292aa5b9276e378c2511e3 Author: Samuel Mehrbrodt <[email protected]> AuthorDate: Wed Jun 15 14:25:36 2022 +0200 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Wed Jun 15 14:50:50 2022 +0200 Show start center when closing last document also when there are active UNO connections. (Behavior was different when there were active UNO connections) Change-Id: Ief37b0f362b7e2a47eccbec985ee3017c475046c diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index c5da1bb44d15..da40936c4ad6 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -355,12 +355,17 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, LinkParamNone*, void) // application or establish the backing mode now. // And that depends from the dispatched URL ... { - if (bHasActiveConnections) - bCloseFrame = true; - else if (eOperation == E_CLOSE_FRAME) - bTerminateApp = true; + if (eOperation == E_CLOSE_FRAME) + { + if (bHasActiveConnections) + bCloseFrame = true; + else + bTerminateApp = true; + } else if( SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::STARTMODULE) ) bEstablishBackingMode = true; + else if (bHasActiveConnections) + bCloseFrame = true; else bTerminateApp = true; } commit f37c5f629ede0bcb706dba3dad3af3a528db4b74 Author: Samuel Mehrbrodt <[email protected]> AuthorDate: Wed Jun 15 13:11:58 2022 +0200 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Wed Jun 15 14:50:50 2022 +0200 Revert "binaryurp: create instances with uno constructors" This reverts commit 65fc5bd895948d73f3d1eec14a669ada3e3465f0. diff --git a/binaryurp/source/binaryurp.component b/binaryurp/source/binaryurp.component index e2581c76411e..1eff0c2c18d6 100644 --- a/binaryurp/source/binaryurp.component +++ b/binaryurp/source/binaryurp.component @@ -18,9 +18,8 @@ --> <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" - xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.comp.bridge.BridgeFactory" - constructor="com_sun_star_comp_bridge_BridgeFactory_get_implementation"> + prefix="binaryurp" xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.bridge.BridgeFactory"> <service name="com.sun.star.bridge.BridgeFactory"/> </implementation> </component> diff --git a/binaryurp/source/bridgefactory.cxx b/binaryurp/source/bridgefactory.cxx index f653d40cc68c..6563b101f1df 100644 --- a/binaryurp/source/bridgefactory.cxx +++ b/binaryurp/source/bridgefactory.cxx @@ -43,6 +43,21 @@ namespace binaryurp { +css::uno::Reference< css::uno::XInterface > BridgeFactory::static_create( + css::uno::Reference< css::uno::XComponentContext > const & /*xContext*/) +{ + return static_cast< cppu::OWeakObject * >(new BridgeFactory); +} + +OUString BridgeFactory::static_getImplementationName() { + return "com.sun.star.comp.bridge.BridgeFactory"; +} + +css::uno::Sequence< OUString > +BridgeFactory::static_getSupportedServiceNames() { + return css::uno::Sequence<OUString>{ "com.sun.star.bridge.BridgeFactory" }; +} + void BridgeFactory::removeBridge( css::uno::Reference< css::bridge::XBridge > const & bridge) { @@ -70,7 +85,7 @@ BridgeFactory::~BridgeFactory() {} OUString BridgeFactory::getImplementationName() { - return "com.sun.star.comp.bridge.BridgeFactory"; + return static_getImplementationName(); } sal_Bool BridgeFactory::supportsService(OUString const & ServiceName) @@ -80,7 +95,7 @@ sal_Bool BridgeFactory::supportsService(OUString const & ServiceName) css::uno::Sequence< OUString > BridgeFactory::getSupportedServiceNames() { - return { "com.sun.star.bridge.BridgeFactory" }; + return static_getSupportedServiceNames(); } css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( @@ -183,11 +198,23 @@ void BridgeFactory::disposing() { } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* -com_sun_star_comp_bridge_BridgeFactory_get_implementation( - css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&) +namespace { + +static cppu::ImplementationEntry const services[] = { + { &binaryurp::BridgeFactory::static_create, + &binaryurp::BridgeFactory::static_getImplementationName, + &binaryurp::BridgeFactory::static_getSupportedServiceNames, + &cppu::createOneInstanceComponentFactory, nullptr, 0 }, + { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } +}; + +} + +extern "C" SAL_DLLPUBLIC_EXPORT void * binaryurp_component_getFactory( + char const * pImplName, void * pServiceManager, void * pRegistryKey) { - return cppu::acquire(static_cast< cppu::OWeakObject * >(new binaryurp::BridgeFactory)); + return cppu::component_getFactoryHelper( + pImplName, pServiceManager, pRegistryKey, services); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/binaryurp/source/bridgefactory.hxx b/binaryurp/source/bridgefactory.hxx index bbe2e39fd46a..1a83962ee6b7 100644 --- a/binaryurp/source/bridgefactory.hxx +++ b/binaryurp/source/bridgefactory.hxx @@ -57,6 +57,16 @@ typedef class BridgeFactory : private cppu::BaseMutex, public BridgeFactoryBase { public: + static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > + SAL_CALL static_create( + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + const & xContext); + + static OUString SAL_CALL static_getImplementationName(); + + static com::sun::star::uno::Sequence< OUString > SAL_CALL + static_getSupportedServiceNames(); + void removeBridge( com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > const & bridge); @@ -64,6 +74,7 @@ public: using BridgeFactoryBase::acquire; using BridgeFactoryBase::release; +private: BridgeFactory(const BridgeFactory&) = delete; BridgeFactory& operator=(const BridgeFactory&) = delete; @@ -71,7 +82,6 @@ public: virtual ~BridgeFactory() override; -private: virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
