2000-09-18 16:15:01 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-09 05:53:00 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 05:53:00 +00:00
|
|
|
* $RCSfile: dbui.cxx,v $
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2006-09-16 21:44:23 +00:00
|
|
|
* $Revision: 1.6 $
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2006-09-16 21:44:23 +00:00
|
|
|
* last change: $Author: obo $ $Date: 2006-09-16 22:44:23 $
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 05:53:00 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-09 05:53:00 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 05:53:00 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 05:53:00 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2005-09-09 05:53:00 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 21:44:23 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sw.hxx"
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
// INCLUDE ---------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _LIST_HXX //autogen
|
|
|
|
#include <tools/list.hxx>
|
|
|
|
#endif
|
|
|
|
#include "wrtsh.hxx"
|
|
|
|
|
|
|
|
|
|
|
|
#include "dbui.hrc"
|
|
|
|
#include "dbui.hxx"
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------
|
|
|
|
Beschreibung:
|
|
|
|
---------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
PrintMonitor::PrintMonitor( Window *pParent, BOOL bEMail )
|
|
|
|
: ModelessDialog( pParent, SW_RES(DLG_PRINTMONITOR) ),
|
|
|
|
aDocName (this, SW_RES( FT_DOCNAME )),
|
|
|
|
aPrinting (this, SW_RES( bEMail ? FT_SENDING : FT_PRINTING )),
|
|
|
|
aPrinter (this, SW_RES( FT_PRINTER )),
|
|
|
|
aPrintInfo (this, SW_RES( FT_PRINTINFO )),
|
|
|
|
aCancel (this, SW_RES( PB_CANCELPRNMON ))
|
|
|
|
{
|
|
|
|
if (bEMail)
|
|
|
|
{
|
|
|
|
SetText(SW_RES(STR_EMAILMON));
|
|
|
|
}
|
|
|
|
FreeResource();
|
|
|
|
}
|
|
|
|
|
2004-11-16 15:57:35 +00:00
|
|
|
/*---------------------------------------------------------------------
|
|
|
|
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 );
|
|
|
|
}
|