diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-18 03:05:02 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-18 05:00:30 +0100 |
commit | c49ea4f3155dcb3538c81734e911eb2910570553 (patch) | |
tree | dad2669ac1769a0453ca7a559eca4d2758f0d545 /sfx2 | |
parent | 8dc3fe631583228fe5bb49b44d2308470ec30df0 (diff) |
Simplify ShowLockedDocumentDialog argument list
No need to pass file URL explicitly - it's available as GetURLObject().
commit 607b80ca3cddc239a35580470944a438ce144fc8 follow-up.
Change-Id: I6a2ceb6d3ae78c277f40215082af22112f9e2d27
Reviewed-on: https://gerrit.libreoffice.org/65300
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 7c23cfa90046..e6eefe86e6b6 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -986,8 +986,7 @@ OUString tryForeignLockfiles(const OUString& sDocURL) } } -SfxMedium::ShowLockResult SfxMedium::ShowLockedDocumentDialog(const OUString& aDocURL, - const LockFileEntry& aData, +SfxMedium::ShowLockResult SfxMedium::ShowLockedDocumentDialog(const LockFileEntry& aData, bool bIsLoading, bool bOwnLock, bool bHandleSysLocked) { @@ -1028,9 +1027,10 @@ SfxMedium::ShowLockResult SfxMedium::ShowLockedDocumentDialog(const OUString& aD else aInfo = aData[LockFileComponent::SYSUSERNAME]; - if (aInfo.isEmpty() && !aDocURL.isEmpty()) + if (aInfo.isEmpty() && !GetURLObject().isAnyKnownWebDAVScheme()) // Try to get name of user who has locked the file using other applications - aInfo = tryForeignLockfiles(aDocURL); + aInfo = tryForeignLockfiles( + GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::NONE)); if ( !aInfo.isEmpty() && !aData[LockFileComponent::EDITTIME].isEmpty() ) aInfo += " ( " + aData[LockFileComponent::EDITTIME] + " )"; @@ -1265,7 +1265,8 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand( bool bLoading, bool b if ( !bResult && !bNoUI ) { - bUIStatus = ShowLockedDocumentDialog("", aLockData, bLoading, false , true ); + bUIStatus + = ShowLockedDocumentDialog(aLockData, bLoading, false, true); } } catch( ucb::InteractiveNetworkWriteException& ) @@ -1488,8 +1489,7 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand( bool bLoading, bool b { if (!bNoUI) bUIStatus = ShowLockedDocumentDialog( - pImpl->m_aLogicName, aData, bLoading, bOwnLock, - bHandleSysLocked); + aData, bLoading, bOwnLock, bHandleSysLocked); else if (bLoading && bTryIgnoreLockFile && !bHandleSysLocked) bUIStatus = ShowLockResult::Succeeded; |