diff options
Diffstat (limited to 'desktop/source/pkgchk')
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 14 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_shared.h | 14 |
2 files changed, 5 insertions, 23 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index 52b4ab884a1b..a034828646be 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -41,11 +41,10 @@ #include "osl/file.hxx" #include "osl/thread.hxx" #include "tools/getprocessworkingdir.hxx" -#include "ucbhelper/contentbroker.hxx" -#include "ucbhelper/configurationkeys.hxx" #include "comphelper/processfactory.hxx" #include "unotools/configmgr.hxx" #include "com/sun/star/lang/XMultiServiceFactory.hpp" +#include "com/sun/star/ucb/UniversalContentBroker.hpp" #include "cppuhelper/bootstrap.hxx" #include "comphelper/sequence.hxx" #include <stdio.h> @@ -384,15 +383,10 @@ Reference<XComponentContext> bootstrapStandAlone( // set global process service factory used by unotools config helpers ::comphelper::setProcessServiceFactory( xServiceManager ); - // initialize the ucbhelper ucb, - // because the package implementation uses it - Sequence<Any> ucb_args( 2 ); - ucb_args[ 0 ] <<= OUSTR(UCB_CONFIGURATION_KEY1_LOCAL); - ucb_args[ 1 ] <<= OUSTR(UCB_CONFIGURATION_KEY2_OFFICE); - if (! ::ucbhelper::ContentBroker::initialize( xServiceManager, ucb_args )) - throw RuntimeException( OUSTR("cannot initialize UCB!"), 0 ); + // Initialize the UCB (for backwards compatibility, in case some code still + // uses plain createInstance w/o args directly to obtain an instance): + UniversalContentBroker::create( xContext ); - disposeGuard.setDeinitUCB(); return xContext; } diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h index 400e2835199e..c8cdc3c51a78 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_shared.h +++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h @@ -35,8 +35,6 @@ #include "tools/resmgr.hxx" #include "rtl/ustring.hxx" #include "unotools/configmgr.hxx" -#include "ucbhelper/contentbroker.hxx" - #define APP_NAME "unopkg" @@ -126,14 +124,10 @@ bool isBootstrapVariable(sal_uInt32 * pIndex); class DisposeGuard { css::uno::Reference<css::lang::XComponent> m_xComp; - bool m_bDeinitUCB; + public: - DisposeGuard(): m_bDeinitUCB(false) {} inline ~DisposeGuard() { - if (m_bDeinitUCB) - ::ucbhelper::ContentBroker::deinitialize(); - if (m_xComp.is()) m_xComp->dispose(); } @@ -143,12 +137,6 @@ public: { m_xComp = xComp; } - - inline void setDeinitUCB() - { - m_bDeinitUCB = true; - } - }; //============================================================================== |