summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-07-07 09:55:26 +0000
committerOliver Bolte <obo@openoffice.org>2005-07-07 09:55:26 +0000
commit2e054dc6068ff54659f847a76b3d5c6b95289a85 (patch)
treeb9f2c28fb311e5ad6fb55ac6e0bf07bc28cf120f /ucbhelper
parent48d669335aa57e60fd02802016122ad96c633fb3 (diff)
INTEGRATION: CWS sb33 (1.4.166); FILE MERGED
2005/06/27 16:12:36 sb 1.4.166.1: #i51181# Reduced getLocalFileURL to the minimum, so that it no longer instantiates the catch-all gnomevfs UCP for the nonexistent vnd.sun.star.wfs schema.
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/source/client/fileidentifierconverter.cxx35
1 files changed, 8 insertions, 27 deletions
diff --git a/ucbhelper/source/client/fileidentifierconverter.cxx b/ucbhelper/source/client/fileidentifierconverter.cxx
index cbe9efe787f5..0070ffff98e6 100644
--- a/ucbhelper/source/client/fileidentifierconverter.cxx
+++ b/ucbhelper/source/client/fileidentifierconverter.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fileidentifierconverter.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: sb $ $Date: 2001-06-06 07:32:36 $
+ * last change: $Author: obo $ $Date: 2005-07-07 10:55:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,33 +101,14 @@ namespace ucb {
rtl::OUString
getLocalFileURL(
- uno::Reference< star::ucb::XContentProviderManager > const & rManager)
+ uno::Reference< star::ucb::XContentProviderManager > const &)
SAL_THROW((com::sun::star::uno::RuntimeException))
{
- OSL_ASSERT(rManager.is());
-
- static sal_Char const * const aBaseURLs[]
- = { "file:///", "vnd.sun.star.wfs:///" };
- sal_Int32 nMaxLocality = -1;
- rtl::OUString aMaxBaseURL;
- for (int i = 0; i < sizeof aBaseURLs / sizeof (sal_Char const *); ++i)
- {
- rtl::OUString aBaseURL(rtl::OUString::createFromAscii(aBaseURLs[i]));
- uno::Reference< star::ucb::XFileIdentifierConverter >
- xConverter(rManager->queryContentProvider(aBaseURL),
- uno::UNO_QUERY);
- if (xConverter.is())
- {
- sal_Int32 nLocality
- = xConverter->getFileProviderLocality(aBaseURL);
- if (nLocality > nMaxLocality)
- {
- nMaxLocality = nLocality;
- aMaxBaseURL = aBaseURL;
- }
- }
- }
- return aMaxBaseURL;
+ // If there were more file systems than just "file:///" (e.g., the obsolete
+ // "vnd.sun.star.wfs:///"), this code should query all relevant UCPs for
+ // their com.sun.star.ucb.XFileIdentifierConverter.getFileProviderLocality
+ // and return the most local one:
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///"));
}
//============================================================================