summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-18 03:05:02 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2018-12-18 05:00:30 +0100
commitc49ea4f3155dcb3538c81734e911eb2910570553 (patch)
treedad2669ac1769a0453ca7a559eca4d2758f0d545
parent8dc3fe631583228fe5bb49b44d2308470ec30df0 (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>
-rw-r--r--include/sfx2/docfile.hxx2
-rw-r--r--sfx2/source/doc/docfile.cxx14
2 files changed, 8 insertions, 8 deletions
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 8e22b0a40b31..8019c8a676d2 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -295,7 +295,7 @@ public:
private:
enum class ShowLockResult { NoLock, Succeeded, Try };
- ShowLockResult ShowLockedDocumentDialog(const OUString& aDocURL, const LockFileEntry& aData,
+ ShowLockResult ShowLockedDocumentDialog(const LockFileEntry& aData,
bool bIsLoading, bool bOwnLock, bool bHandleSysLocked);
enum class MessageDlg { LockFileIgnore, LockFileCorrupt };
bool ShowLockFileProblemDialog(MessageDlg nWhichDlg);
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;