summaryrefslogtreecommitdiff
path: root/extensions/source/plugin
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2000-11-28 09:02:59 +0000
committerPhilipp Lohmann <pl@openoffice.org>2000-11-28 09:02:59 +0000
commit3c28c05cdf8e26b176d107bec3b4d89f181f0703 (patch)
tree5f2a0717fd06b8261a48a648a7a7cb0a01b9980c /extensions/source/plugin
parentfc65cfd517db2cafaad8f1a92a69872bc431bd96 (diff)
#80561# use SvtPathOptions instead of Settings service
Diffstat (limited to 'extensions/source/plugin')
-rw-r--r--extensions/source/plugin/base/manager.cxx56
-rw-r--r--extensions/source/plugin/util/makefile.mk5
2 files changed, 18 insertions, 43 deletions
diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx
index 1a6b14887759..02dfc40adb50 100644
--- a/extensions/source/plugin/base/manager.cxx
+++ b/extensions/source/plugin/base/manager.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: manager.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:16:51 $
+ * last change: $Author: pl $ $Date: 2000-11-28 10:02:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,7 +64,13 @@
#endif
#include <plugin/impl.hxx>
+
+#ifndef _OSL_MUTEX_HXX
#include <osl/mutex.hxx>
+#endif
+#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
+#include <svtools/pathoptions.hxx>
+#endif
#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
#include <com/sun/star/container/XEnumerationAccess.hpp>
#endif
@@ -117,46 +123,14 @@ const Sequence< ::rtl::OUString >& PluginManager::getAdditionalSearchPaths()
if( ! aPaths.getLength() )
{
- Reference< XInterface > xInst = get().m_xSMgr->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Settings" ) );
- Reference< ::com::sun::star::container::XNameAccess > xAccess( xInst, UNO_QUERY );
- if( xAccess.is() )
+ SvtPathOptions aOptions;
+ String aPluginPath( aOptions.GetPluginPath() );
+ if( aPluginPath.Len() )
{
- Any aValue = xAccess->getByName( ::rtl::OUString::createFromAscii( "PathSettings" ) );
- Reference< ::com::sun::star::beans::XPropertySet > xProp;
- if( aValue.hasValue() )
- aValue >>= xProp;
- if( xProp.is() )
- {
- aValue = xProp->getPropertyValue( ::rtl::OUString::createFromAscii( "Plugins" ) );
- if( aValue.getValueType().getTypeClass() == TypeClass_STRING )
-
- {
- ::rtl::OUString sValue;
- aValue >>= sValue;
- sal_Int32 nTokens = sValue.getTokenCount();
- aPaths = Sequence< ::rtl::OUString >( nTokens );
- while( nTokens-- )
- aPaths.getArray()[nTokens] = sValue.getToken( nTokens );
- }
- else if( aValue.getValueType().equals( ::getCppuType( (Sequence< ::rtl::OUString >*)0 ) ) )
-
- {
- Sequence< ::rtl::OUString > aArr;
- aValue >>= aArr;
- sal_Int32 nGlobalTokens = 0;
- int i = 0;
- for( i = 0; i < aArr.getLength(); i++ )
- nGlobalTokens += aArr.getConstArray()[i].getTokenCount();
- aPaths = Sequence< ::rtl::OUString >( nGlobalTokens );
- for( i = aArr.getLength()-1; i >= 0; i-- )
- {
- sal_Int32 nTokens = aArr.getConstArray()[i].getTokenCount();
- while( nTokens-- )
- aPaths.getArray()[--nGlobalTokens] =
- aArr.getConstArray()[i].getToken( nTokens );
- }
- }
- }
+ int nPaths = aPluginPath.GetTokenCount( ';' );
+ aPaths.realloc( nPaths );
+ for( int i = 0; i < nPaths; i++ )
+ aPaths.getArray()[i] = aPluginPath.GetToken( i, ';' );
}
}
diff --git a/extensions/source/plugin/util/makefile.mk b/extensions/source/plugin/util/makefile.mk
index 53daf359d4ca..6bb0f4eece17 100644
--- a/extensions/source/plugin/util/makefile.mk
+++ b/extensions/source/plugin/util/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1.1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: hr $ $Date: 2000-09-18 16:16:51 $
+# last change: $Author: pl $ $Date: 2000-11-28 10:02:59 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -99,6 +99,7 @@ SHL1LINKLIB = $(SLB)$/plos2.lib
SHL1STDLIBS=\
$(SHL1OWNLIB) \
+ $(SVTOOLLIB) \
$(VCLLIB) \
$(TOOLSLIB) \
$(TKLIB) \