summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-19 09:06:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-08-19 09:13:33 +0200
commit6d64afb31eefcbd8f1413aa30d952338e35771e4 (patch)
treea2e8d7cf2b9f6d18ad696f58cdbe0d6e52227674 /unotools
parent7f527276606f3b23c91f8c6ac00d744d6b9b3a06 (diff)
Replace utl::LocalFileHelper::IsLocalFile -> ...::IsFileUrl
...given that vnd.sun.star.wfs is long gone. Note that the old code could have behaved differently in that for one it could have worked for relative URL input (as osl_getSystemPathFromFileURL is allowed to accept relative URLs) and for another could have failed for some file URLs (for which osl_getSystemPathFromFileURL would return something other than osl_File_E_None for whatever reason), but it looks plausible to assume that what the call sites are really interested in is whether a given URL is a file URL. Simplifies those call sites that already have a INetURLObject instance even further. Change-Id: Iaee4595d933a760b8321e42414a9ef0865311833
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/localfilehelper.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/unotools/source/ucbhelper/localfilehelper.cxx b/unotools/source/ucbhelper/localfilehelper.cxx
index 52fb3739cdd3..bf4627378df4 100644
--- a/unotools/source/ucbhelper/localfilehelper.cxx
+++ b/unotools/source/ucbhelper/localfilehelper.cxx
@@ -56,10 +56,9 @@ bool LocalFileHelper::ConvertURLToPhysicalName(const OUString& rName, OUString&
return ok;
}
-bool LocalFileHelper::IsLocalFile(const OUString& rName)
+bool LocalFileHelper::IsFileUrl(const OUString& rUrl)
{
- OUString aTmp;
- return ConvertURLToPhysicalName(rName, aTmp);
+ return rUrl.startsWithIgnoreAsciiCase("file:");
}
typedef ::std::vector< OUString* > StringList_Impl;