summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh4.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-14 13:47:01 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-04-15 11:36:58 +0000
commitf0461e8360e13137c29dfcc1d20ba93e7bbd3073 (patch)
treef50b6a25aeb7609f7bc11443bdb18bd2c343af66 /sc/source/ui/docshell/docsh4.cxx
parentba9acdf799bf556c8a20b1dc27eb116e23d481db (diff)
convert LOCKFILE_ constants to scoped enum and cleanup
Change-Id: I9a2339cc953a718403b3cd0960d5d8d34abae455 Reviewed-on: https://gerrit.libreoffice.org/15304 Tested-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r--sc/source/ui/docshell/docsh4.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index a9dd15cf948b..4a9c0d7e8fb8 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -997,17 +997,14 @@ void ScDocShell::Execute( SfxRequest& rReq )
try
{
::svt::DocumentLockFile aLockFile( GetSharedFileURL() );
- uno::Sequence< OUString > aData = aLockFile.GetLockData();
- if ( aData.getLength() > LOCKFILE_SYSUSERNAME_ID )
+ LockFileEntry aData = aLockFile.GetLockData();
+ if ( !aData[LockFileComponent::OOOUSERNAME].isEmpty() )
{
- if ( !aData[LOCKFILE_OOOUSERNAME_ID].isEmpty() )
- {
- aUserName = aData[LOCKFILE_OOOUSERNAME_ID];
- }
- else if ( !aData[LOCKFILE_SYSUSERNAME_ID].isEmpty() )
- {
- aUserName = aData[LOCKFILE_SYSUSERNAME_ID];
- }
+ aUserName = aData[LockFileComponent::OOOUSERNAME];
+ }
+ else if ( !aData[LockFileComponent::SYSUSERNAME].isEmpty() )
+ {
+ aUserName = aData[LockFileComponent::SYSUSERNAME];
}
}
catch ( uno::Exception& )