summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-05-09 13:46:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-05-09 13:46:19 +0200
commit2b0244db8b223780e9d740ac600b7e25a2c11d93 (patch)
tree32a2e624dca4d4f2e9a9a3688d2ce6bbe6f9ef7a /tools
parent4ae4c57caab02c5d8fe91cd9956fabba6bd3dc1e (diff)
Removed unnecessary SvLibrary
Change-Id: I42e64af8ed88e652341707d5f9d2da3daaa0f9bb
Diffstat (limited to 'tools')
-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
4 files changed, 0 insertions, 176 deletions
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: */