diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-11-20 13:27:25 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-11-20 13:27:25 +0000 |
commit | efae0f61f1e45db66b9e98eb72f6e0022ec8353f (patch) | |
tree | 680b3b367ae2a23ade4d1ab095124012c540d443 /sc/source/ui/miscdlgs/sharedocdlg.cxx | |
parent | 77588e26942ad545eb1aa98455c2ecec15b1edd0 (diff) |
CWS-TOOLING: integrate CWS calc46_DEV300
Diffstat (limited to 'sc/source/ui/miscdlgs/sharedocdlg.cxx')
-rw-r--r-- | sc/source/ui/miscdlgs/sharedocdlg.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx index a89491b53b26..0222d199d59b 100644 --- a/sc/source/ui/miscdlgs/sharedocdlg.cxx +++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: sharedocdlg.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.134.1 $ * * This file is part of OpenOffice.org. * @@ -155,11 +155,28 @@ void ScShareDocumentDlg::UpdateView() aUser += String::CreateFromInt32( nUnknownUser++ ); } - String aDateTime = pUsersData[i][SHARED_EDITTIME_ID]; + // parse the edit time string of the format "DD.MM.YYYY hh:mm" + ::rtl::OUString aDateTimeStr = pUsersData[i][SHARED_EDITTIME_ID]; + sal_Int32 nIndex = 0; + ::rtl::OUString aDateStr = aDateTimeStr.getToken( 0, ' ', nIndex ); + ::rtl::OUString aTimeStr = aDateTimeStr.getToken( 0, ' ', nIndex ); + nIndex = 0; + USHORT nDay = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); + USHORT nMonth = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); + USHORT nYear = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); + nIndex = 0; + USHORT nHours = sal::static_int_cast< USHORT >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() ); + USHORT nMinutes = sal::static_int_cast< USHORT >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() ); + Date aDate( nDay, nMonth, nYear ); + Time aTime( nHours, nMinutes ); + DateTime aDateTime( aDate, aTime ); String aString( aUser ); aString += '\t'; - aString += aDateTime; + aString += ScGlobal::pLocaleData->getDate( aDateTime ); + aString += ' '; + aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE ); + maLbUsers.InsertEntry( aString, NULL ); } } |