diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-11-16 15:57:35 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-11-16 15:57:35 +0000 |
commit | 92f1fa105cc95cde515c32a0bb03abdf61267e9b (patch) | |
tree | a18030fad6bb0b537abb71a508b1156670f41c1f /sw/source/ui/dbui/dbui.cxx | |
parent | 672b16feb727e9a422b41c9dc3a5c1ac888089fe (diff) |
INTEGRATION: CWS iha04 (1.3.736); FILE MERGED
2004/10/29 16:25:32 iha 1.3.736.2: #i36130# CreateMonitor for mail merge
2004/10/27 18:35:41 iha 1.3.736.1: #i36130# CreateMonitor for mail merge
Diffstat (limited to 'sw/source/ui/dbui/dbui.cxx')
-rw-r--r-- | sw/source/ui/dbui/dbui.cxx | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/sw/source/ui/dbui/dbui.cxx b/sw/source/ui/dbui/dbui.cxx index 4764d0e0cb72..43dbc76cdc43 100644 --- a/sw/source/ui/dbui/dbui.cxx +++ b/sw/source/ui/dbui/dbui.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dbui.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: vg $ $Date: 2003-04-17 15:20:20 $ + * last change: $Author: obo $ $Date: 2004-11-16 16:57:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,3 +92,50 @@ PrintMonitor::PrintMonitor( Window *pParent, BOOL bEMail ) FreeResource(); } +/*--------------------------------------------------------------------- + Progress Indicator for Creation of personalized Mail Merge documents: +---------------------------------------------------------------------*/ + +CreateMonitor::CreateMonitor( Window *pParent ) +: ModelessDialog( pParent, SW_RES(DLG_MM_CREATIONMONITOR) ), + m_aStatus (this, SW_RES( FT_STATUS )), + m_aProgress (this, SW_RES( FT_PROGRESS )), + m_aCreateDocuments (this, SW_RES( FT_CREATEDOCUMENTS )), + m_aCounting (this, SW_RES( FT_COUNTING )), + m_aCancelButton (this, SW_RES( PB_CANCELPRNMON )), + m_sCountingPattern(), + m_sVariable_Total( String::CreateFromAscii("%Y") ), + m_sVariable_Position( String::CreateFromAscii("%X") ), + m_nTotalCount(0), + m_nCurrentPosition(0) +{ + FreeResource(); + + m_sCountingPattern = m_aCounting.GetText(); + m_aCounting.SetText(String::CreateFromAscii("...")); +} + +void CreateMonitor::UpdateCountingText() +{ + String sText(m_sCountingPattern); + sText.SearchAndReplaceAll( m_sVariable_Total, String::CreateFromInt32( m_nTotalCount ) ); + sText.SearchAndReplaceAll( m_sVariable_Position, String::CreateFromInt32( m_nCurrentPosition ) ); + m_aCounting.SetText(sText); +} + +void CreateMonitor::SetTotalCount( sal_Int32 nTotal ) +{ + m_nTotalCount = nTotal; + UpdateCountingText(); +} + +void CreateMonitor::SetCurrentPosition( sal_Int32 nCurrent ) +{ + m_nCurrentPosition = nCurrent; + UpdateCountingText(); +} + +void CreateMonitor::SetCancelHdl( const Link& rLink ) +{ + m_aCancelButton.SetClickHdl( rLink ); +} |