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 /sfx2 | |
parent | 520053459aa6a34b6d9ad52d97704399e5138d3d (diff) |
Consolidate isFileUrl checks
Change-Id: I1b74fdfaa09c4d0d6c296253958e83e78b546a9a
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 6 |
3 files changed, 8 insertions, 9 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 464b098bf9bb..fd1f6799a277 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -43,7 +43,7 @@ #include <com/sun/star/task/InteractionHandler.hpp> #include <com/sun/star/task/XInteractionRequest.hpp> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> - +#include <comphelper/fileurl.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/stillreadwriteinteraction.hxx> @@ -53,7 +53,6 @@ #include <vcl/help.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/ucbhelper.hxx> -#include <unotools/localfilehelper.hxx> #include <osl/file.hxx> #include <osl/mutex.hxx> #include <osl/security.hxx> @@ -1963,7 +1962,7 @@ void FileDialogHelper_Impl::saveConfig() if ( ! mbIsSaveDlg ) { OUString aPath = getPath(); - if ( utl::LocalFileHelper::IsFileUrl( aPath ) ) + if ( comphelper::isFileUrl( aPath ) ) { SetToken( aUserData, 1, ' ', aPath ); bWriteConfig = true; diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index cb7b20bc79a8..284c581f362b 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -66,6 +66,7 @@ #include <com/sun/star/security/DocumentDigitalSignatures.hpp> #include <tools/urlobj.hxx> #include <unotools/tempfile.hxx> +#include <comphelper/fileurl.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/interaction.hxx> #include <framework/interaction.hxx> @@ -94,7 +95,6 @@ #include <svtools/asynclink.hxx> #include <svl/inettype.hxx> #include <ucbhelper/commandenvironment.hxx> -#include <unotools/localfilehelper.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/ucbhelper.hxx> #include <unotools/progresshandlerwrap.hxx> @@ -1027,7 +1027,7 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI ) sal_Int8 bUIStatus = LOCK_UI_NOLOCK; // check whether system file locking has been used, the default value is false - bool bUseSystemLock = ::utl::LocalFileHelper::IsFileUrl( pImp->m_aLogicName ) && IsSystemFileLockingUsed(); + bool bUseSystemLock = comphelper::isFileUrl( pImp->m_aLogicName ) && IsSystemFileLockingUsed(); // TODO/LATER: This implementation does not allow to detect the system lock on saving here, actually this is no big problem // if system lock is used the writeable stream should be available @@ -1861,7 +1861,7 @@ void SfxMedium::Transfer_Impl() OUString aDestURL( aDest.GetMainURL( INetURLObject::NO_DECODE ) ); - if ( ::utl::LocalFileHelper::IsFileUrl( aDestURL ) || !aDest.removeSegment() ) + if ( comphelper::isFileUrl( aDestURL ) || !aDest.removeSegment() ) { TransactedTransferForFS_Impl( aSource, aDest, xComEnv ); diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 6ed6fe8eec42..503318cb9cbc 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/document/UpdateDocMode.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/embed/ElementModes.hpp> +#include <comphelper/fileurl.hxx> #include <vcl/msgbox.hxx> #include <svl/style.hxx> #include <vcl/wrkwin.hxx> @@ -46,7 +47,6 @@ #include <unotools/saveopt.hxx> #include <unotools/useroptions.hxx> -#include <unotools/localfilehelper.hxx> #include <vcl/virdev.hxx> #include <vcl/oldprintadaptor.hxx> #include <vcl/settings.hxx> @@ -387,7 +387,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) if ( !pFile ) return; - if ( !::utl::LocalFileHelper::IsFileUrl( pFile->GetName() ) ) + if ( !comphelper::isFileUrl( pFile->GetName() ) ) // update only for documents loaded from the local file system return; @@ -532,7 +532,7 @@ void SfxObjectShell::ResetFromTemplate( const OUString& rTemplateName, const OUS // TODO/REFACTOR: // Title? - if( ::utl::LocalFileHelper::IsFileUrl( rFileName ) ) + if( comphelper::isFileUrl( rFileName ) ) { OUString aFoundName; if( SfxGetpApp()->Get_Impl()->GetDocumentTemplates()->GetFull( OUString(), rTemplateName, aFoundName ) ) |