summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Paths.xcu6
-rw-r--r--sfx2/source/appl/app.cxx1
-rw-r--r--sfx2/source/appl/appinit.cxx1
-rw-r--r--sfx2/source/appl/appserv.cxx1
-rw-r--r--sw/source/filter/basflt/fltini.cxx7
-rw-r--r--tools/Library_tl.mk1
-rw-r--r--tools/Package_inc.mk1
-rw-r--r--tools/inc/tools/svlibrary.hxx44
-rw-r--r--tools/source/generic/svlibrary.cxx130
9 files changed, 4 insertions, 188 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
index 1bf90f2a303f..b6092e42cd54 100644
--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
@@ -98,12 +98,6 @@
</node>
</node>
- <node oor:name="Libraries" oor:op="fuse" oor:mandatory="true">
- <node oor:name="InternalPaths">
- <node oor:name="$(progpath)/libraries" oor:op="fuse" />
- </node>
- </node>
-
<node oor:name="Gallery" oor:op="fuse" oor:mandatory="true">
<node oor:name="InternalPaths">
<node oor:name="$(insturl)/share/gallery" oor:op="fuse" />
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index b39243b438cf..74a5a717dd57 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -106,7 +106,6 @@
#include "sfx2/stbitem.hxx"
#include "eventsupplier.hxx"
#include <sfx2/dockwin.hxx>
-#include <tools/svlibrary.hxx>
#ifdef DBG_UTIL
#include <sfx2/mnuitem.hxx>
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 48dbcdf7e379..08e6a78bf87c 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -74,7 +74,6 @@
#include <sfx2/fcontnr.hxx>
#include "helper.hxx" // SfxContentHelper::Kill()
#include "sfxpicklist.hxx"
-#include <tools/svlibrary.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index d39bc406fb14..1287df6bf7ec 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -124,7 +124,6 @@
#include <sfx2/dialogs.hrc>
#include "sorgitm.hxx"
#include "sfx2/sfxhelp.hxx"
-#include <tools/svlibrary.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 2fe88b73baed..35e7d2fefeca 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -67,7 +67,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <rtl/uri.hxx>
-#include <tools/svlibrary.hxx>
using namespace utl;
using rtl::OUString;
@@ -162,9 +161,11 @@ Filters::~Filters()
oslGenericFunction Filters::GetMswordLibSymbol( const char *pSymbol )
{
- static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) );
if (!msword_.is())
- SvLibrary::LoadModule( msword_, aLibName, &thisModule, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY );
+ {
+ bool ok = msword_.loadRelative( &thisModule, SVLIBRARY( "msword" ), SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY );
+ SAL_WARN_IF(!ok, "sw", "failed to load msword library");
+ }
if (msword_.is())
return msword_.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) );
return NULL;
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk
index 975574f78919..b8cb8f45936e 100644
--- a/tools/Library_tl.mk
+++ b/tools/Library_tl.mk
@@ -81,7 +81,6 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
tools/source/generic/poly2 \
tools/source/generic/svborder \
tools/source/generic/toolsin \
- tools/source/generic/svlibrary \
tools/source/inet/inetmime \
tools/source/inet/inetmsg \
tools/source/inet/inetstrm \
diff --git a/tools/Package_inc.mk b/tools/Package_inc.mk
index 46b829fbcb7e..58c82700c047 100644
--- a/tools/Package_inc.mk
+++ b/tools/Package_inc.mk
@@ -82,7 +82,6 @@ $(eval $(call gb_Package_add_file,tools_inc,inc/tools/solarmutex.hxx,tools/solar
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/stream.hxx,tools/stream.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/string.hxx,tools/string.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/svborder.hxx,tools/svborder.hxx))
-$(eval $(call gb_Package_add_file,tools_inc,inc/tools/svlibrary.hxx,tools/svlibrary.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/tempfile.hxx,tools/tempfile.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/tenccvt.hxx,tools/tenccvt.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/time.hxx,tools/time.hxx))
diff --git a/tools/inc/tools/svlibrary.hxx b/tools/inc/tools/svlibrary.hxx
deleted file mode 100644
index b10adde91541..000000000000
--- a/tools/inc/tools/svlibrary.hxx
+++ /dev/null
@@ -1,44 +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 _SVLIBRARY_HXX
-#define _SVLIBRARY_HXX
-
-#include "tools/toolsdllapi.h"
-
-#include <osl/module.hxx>
-#include <rtl/ustring.hxx>
-
-class TOOLS_DLLPUBLIC SvLibrary
-{
-public:
- static bool LoadModule( osl::Module&, const rtl::OUString& rLibName, ::oslGenericFunction baseModule, ::sal_Int32 mode = SAL_LOADMODULE_DEFAULT );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/generic/svlibrary.cxx b/tools/source/generic/svlibrary.cxx
deleted file mode 100644
index 8b46dfb916b3..000000000000
--- a/tools/source/generic/svlibrary.cxx
+++ /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.
- *
- ************************************************************************/
-
-
-#include <tools/svlibrary.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/util/XMacroExpander.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <comphelper/processfactory.hxx>
-#include <tools/string.hxx>
-#include <rtl/uri.hxx>
-
-using namespace com::sun::star;
-
-static uno::Sequence< rtl::OUString > GetMultiPaths_Impl()
-{
- uno::Sequence< rtl::OUString > aRes;
- uno::Sequence< rtl::OUString > aInternalPaths;
- uno::Sequence< rtl::OUString > aUserPaths;
-
- bool bSuccess = true;
- uno::Reference< lang::XMultiServiceFactory > xMgr( comphelper::getProcessServiceFactory() );
- if (xMgr.is())
- {
- try
- {
- String aInternal;
- aInternal.AppendAscii("Libraries");
- String aUser;
- aUser.AppendAscii("Libraries");
- aInternal .AppendAscii( "_internal" );
- aUser .AppendAscii( "_user" );
-
- uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.PathSettings" )) ), uno::UNO_QUERY_THROW );
- xPathSettings->getPropertyValue( aInternal ) >>= aInternalPaths;
- xPathSettings->getPropertyValue( aUser ) >>= aUserPaths;
- }
- catch (const uno::Exception &)
- {
- bSuccess = false;
- }
- }
- if (bSuccess)
- {
- sal_Int32 nMaxEntries = aInternalPaths.getLength() + aUserPaths.getLength();
- aRes.realloc( nMaxEntries );
- rtl::OUString *pRes = aRes.getArray();
- sal_Int32 nCount = 0; // number of actually added entries
- for (int i = 0; i < 2; ++i)
- {
- const uno::Sequence< rtl::OUString > &rPathSeq = i == 0 ? aUserPaths : aInternalPaths;
- const rtl::OUString *pPathSeq = rPathSeq.getConstArray();
- for (sal_Int32 k = 0; k < rPathSeq.getLength(); ++k)
- {
- const bool bAddUser = (&rPathSeq == &aUserPaths);
- const bool bAddInternal = (&rPathSeq == &aInternalPaths);
- if ((bAddUser || bAddInternal) && !pPathSeq[k].isEmpty())
- pRes[ nCount++ ] = pPathSeq[k];
- }
- }
- aRes.realloc( nCount );
- }
-
- return aRes;
-}
-
-bool SvLibrary::LoadModule( osl::Module& rModule, const rtl::OUString& rLibName, ::oslGenericFunction baseModule, ::sal_Int32 mode )
-{
- static uno::Sequence < rtl::OUString > aPaths = GetMultiPaths_Impl();
- bool bLoaded = false;
-
- for (sal_Int32 n=0; n<aPaths.getLength(); n++)
- {
- rtl::OUString aMod = aPaths[n];
- if ( aPaths[n].indexOfAsciiL("vnd.sun.star.expand",19) == 0)
- {
- uno::Reference< uno::XComponentContext > xComponentContext = comphelper::getProcessComponentContext();
- uno::Reference< util::XMacroExpander > xMacroExpander;
- xComponentContext->getValueByName(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.util.theMacroExpander") ) )
- >>= xMacroExpander;
-
- aMod = aMod.copy( sizeof("vnd.sun.star.expand:") -1 );
- aMod = ::rtl::Uri::decode( aMod, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- aMod = xMacroExpander->expandMacros( aMod );
- }
-
- aMod += ::rtl::OUString( sal_Unicode('/') );
- aMod += rLibName;
- bLoaded = rModule.load( aMod, mode );
- if ( bLoaded )
- break;
- }
-
- if (!bLoaded )
- bLoaded = rModule.loadRelative( baseModule, rLibName, mode );
-
- return bLoaded;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */