summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs
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/miscdlgs
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/miscdlgs')
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index d934ff77ea27..911b74d3d1d8 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -135,9 +135,8 @@ void ScShareDocumentDlg::UpdateView()
try
{
::svt::ShareControlFile aControlFile( mpDocShell->GetSharedFileURL() );
- uno::Sequence< uno::Sequence< OUString > > aUsersData = aControlFile.GetUsersData();
- const uno::Sequence< OUString >* pUsersData = aUsersData.getConstArray();
- sal_Int32 nLength = aUsersData.getLength();
+ std::vector<LockFileEntry> aUsersData = aControlFile.GetUsersData();
+ sal_Int32 nLength = aUsersData.size();
if ( nLength > 0 )
{
@@ -145,24 +144,24 @@ void ScShareDocumentDlg::UpdateView()
for ( sal_Int32 i = 0; i < nLength; ++i )
{
- if ( pUsersData[i].getLength() > SHARED_EDITTIME_ID )
+ if ( !aUsersData[i][LockFileComponent::EDITTIME].isEmpty() )
{
OUString aUser;
- if ( !pUsersData[i][SHARED_OOOUSERNAME_ID].isEmpty() )
+ if ( !aUsersData[i][LockFileComponent::OOOUSERNAME].isEmpty() )
{
- aUser = pUsersData[i][SHARED_OOOUSERNAME_ID];
+ aUser = aUsersData[i][LockFileComponent::OOOUSERNAME];
}
- else if ( !pUsersData[i][SHARED_SYSUSERNAME_ID].isEmpty() )
+ else if ( !aUsersData[i][LockFileComponent::SYSUSERNAME].isEmpty() )
{
- aUser = pUsersData[i][SHARED_SYSUSERNAME_ID];
+ aUser = aUsersData[i][LockFileComponent::SYSUSERNAME];
}
else
{
- aUser = OUString(m_aStrUnknownUser) + " " + OUString::number( nUnknownUser++ );
+ aUser = m_aStrUnknownUser + " " + OUString::number( nUnknownUser++ );
}
// parse the edit time string of the format "DD.MM.YYYY hh:mm"
- OUString aDateTimeStr = pUsersData[i][SHARED_EDITTIME_ID];
+ OUString aDateTimeStr = aUsersData[i][LockFileComponent::EDITTIME];
sal_Int32 nIndex = 0;
OUString aDateStr = aDateTimeStr.getToken( 0, ' ', nIndex );
OUString aTimeStr = aDateTimeStr.getToken( 0, ' ', nIndex );