diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-07-22 06:40:35 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-07-22 06:40:35 +0000 |
commit | 472bf9edf1100dfb941a6e1830937a35a02afb8f (patch) | |
tree | 6333160d8328027fe10bf9d5f0f3093f8b3b61d1 /svx/source/dialog/docrecovery.cxx | |
parent | INTEGRATION: CWS pba11y01 (1.5.112); FILE MERGED (diff) | |
download | core-472bf9edf1100dfb941a6e1830937a35a02afb8f.tar.gz core-472bf9edf1100dfb941a6e1830937a35a02afb8f.zip |
INTEGRATION: CWS pba11y01 (1.22.112); FILE MERGED
2008/07/14 11:37:34 pb 1.22.112.1: fix: #i37177# set status text for a11y
Diffstat (limited to 'svx/source/dialog/docrecovery.cxx')
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 55 |
1 files changed, 51 insertions, 4 deletions
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index e066df2707dd..bfc3f51cbbf5 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: docrecovery.cxx,v $ - * $Revision: 1.22 $ + * $Revision: 1.23 $ * * This file is part of OpenOffice.org. * @@ -466,7 +466,7 @@ ERecoveryState RecoveryCore::mapDocState2RecoverState(sal_Int32 eDocState) ((eDocState & E_TRY_LOAD_BACKUP ) == E_TRY_LOAD_BACKUP ) || ((eDocState & E_TRY_LOAD_ORIGINAL) == E_TRY_LOAD_ORIGINAL) ) - eRecState = E_RECOVERY_IN_PROGRESS; + eRecState = E_RECOVERY_IS_IN_PROGRESS; // red else if ((eDocState & E_DAMAGED) == E_DAMAGED) @@ -951,7 +951,7 @@ void RecovDocListEntry::Paint(const Point& aPos , } break; - case E_RECOVERY_IN_PROGRESS : + case E_RECOVERY_IS_IN_PROGRESS : { pImg = 0; pTxt = &pList->m_aRecovInProgrStr; @@ -1104,7 +1104,10 @@ RecoveryDialog::RecoveryDialog(Window* pParent, { const TURLInfo& rInfo = *pIt; - SvLBoxEntry* pEntry = m_aFileListLB.InsertEntry(rInfo.DisplayName, rInfo.StandardImage, rInfo.StandardImage); + String sName( rInfo.DisplayName ); + sName += '\t'; + sName += impl_getStatusString( rInfo ); + SvLBoxEntry* pEntry = m_aFileListLB.InsertEntry(sName, rInfo.StandardImage, rInfo.StandardImage); pEntry->SetUserData((void*)&rInfo); m_aFileListLB.SetExpandedEntryBmp (pEntry, rInfo.HCImage, BMP_COLOR_HIGHCONTRAST); m_aFileListLB.SetCollapsedEntryBmp(pEntry, rInfo.HCImage, BMP_COLOR_HIGHCONTRAST); @@ -1360,6 +1363,23 @@ void RecoveryDialog::start() //=============================================== void RecoveryDialog::updateItems() { + ULONG c = m_aFileListLB.GetEntryCount(); + ULONG i = 0; + for ( i=0; i<c; ++i ) + { + SvLBoxEntry* pEntry = m_aFileListLB.GetEntry(i); + if ( !pEntry ) + continue; + + TURLInfo* pInfo = (TURLInfo*)pEntry->GetUserData(); + if ( !pInfo ) + continue; + + String sStatus = impl_getStatusString( *pInfo ); + if ( sStatus.Len() > 0 ) + m_aFileListLB.SetEntryText( sStatus, pEntry, 1 ); + } + m_aFileListLB.Invalidate(); m_aFileListLB.Update(); } @@ -1425,6 +1445,33 @@ void RecoveryDialog::impl_refreshDocList() } //=============================================== +String RecoveryDialog::impl_getStatusString( const TURLInfo& rInfo ) const +{ + String sStatus; + switch ( rInfo.RecoveryState ) + { + case E_SUCCESSFULLY_RECOVERED : + sStatus = m_aFileListLB.m_aSuccessRecovStr; + break; + case E_ORIGINAL_DOCUMENT_RECOVERED : + sStatus = m_aFileListLB.m_aOrigDocRecovStr; + break; + case E_RECOVERY_FAILED : + sStatus = m_aFileListLB.m_aRecovFailedStr; + break; + case E_RECOVERY_IS_IN_PROGRESS : + sStatus = m_aFileListLB.m_aRecovInProgrStr; + break; + case E_NOT_RECOVERED_YET : + sStatus = m_aFileListLB.m_aNotRecovYetStr; + break; + default: + break; + } + return sStatus; +} + +//=============================================== BrokenRecoveryDialog::BrokenRecoveryDialog(Window* pParent , RecoveryCore* pCore , sal_Bool bBeforeRecovery) |