diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-19 12:24:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-19 12:24:37 +0200 |
commit | 5da0dce19caaf87a6fe53750a7e9ea5d564d6a12 (patch) | |
tree | 52028a1384c5074886fdd1722f71c32f3970146f /vcl | |
parent | 520053459aa6a34b6d9ad52d97704399e5138d3d (diff) |
Consolidate isFileUrl checks
Change-Id: I1b74fdfaa09c4d0d6c296253958e83e78b546a9a
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/print/genprnpsp.cxx | 3 | ||||
-rw-r--r-- | vcl/osx/salframe.cxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 044206698d66..8c1a10a82c26 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -36,6 +36,7 @@ # include <sys/stat.h> #endif +#include <comphelper/fileurl.hxx> #include "rtl/ustring.hxx" #include "vcl/button.hxx" @@ -1124,7 +1125,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo else osl_createTempFile( NULL, NULL, &aPDFUrl.pData ); // normalize to file URL - if( !aPDFUrl.startsWith( "file:" ) ) + if( !comphelper::isFileUrl(aPDFUrl) ) { // this is not a file URL, but it should // form it into a osl friendly file URL diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 58fdbf9f4e9b..3882c4023824 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -19,6 +19,7 @@ #include <string> +#include <comphelper/fileurl.hxx> #include "rtl/ustrbuf.hxx" #include "osl/file.h" @@ -323,7 +324,7 @@ void AquaSalFrame::SetRepresentedURL( const OUString& i_rDocURL ) // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - if( i_rDocURL.startsWith( "file:" ) ) + if( comphelper::isFileUrl(i_rDocURL) ) { OUString aSysPath; osl_getSystemPathFromFileURL( i_rDocURL.pData, &aSysPath.pData ); |