diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-19 09:06:21 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-19 09:13:33 +0200 |
commit | 6d64afb31eefcbd8f1413aa30d952338e35771e4 (patch) | |
tree | a2e8d7cf2b9f6d18ad696f58cdbe0d6e52227674 /filter | |
parent | 7f527276606f3b23c91f8c6ac00d744d6b9b3a06 (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 'filter')
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index af8041696f52..42b609c09bab 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -1136,7 +1136,7 @@ void TypeDetection::impl_openStream(utl::MediaDescriptor& rDescriptor) bool bSuccess = false; OUString sURL = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_URL(), OUString() ); bool bRequestedReadOnly = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_READONLY(), false ); - if ( !sURL.isEmpty() && ::utl::LocalFileHelper::IsLocalFile( INetURLObject( sURL ).GetMainURL( INetURLObject::NO_DECODE ) ) ) + if ( utl::LocalFileHelper::IsFileUrl( sURL ) ) { // OOo uses own file locking mechanics in case of local file bSuccess = rDescriptor.addInputStreamOwnLock(); |