summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2006-11-14 14:42:23 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2006-11-14 14:42:23 +0000
commit3f9e1ba046912f53d818a8783f98ecd582712e16 (patch)
treeb1f725248fb5c2f1ed0d1ec0fd0880e87fc147b2 /svtools/source
parent16524bfaae068c2c04033647433ebe99b3f16d14 (diff)
INTEGRATION: CWS aw024 (1.42.22); FILE MERGED
2006/11/10 06:05:34 aw 1.42.22.8: RESYNC: (1.51-1.52); FILE MERGED 2006/09/22 05:01:21 aw 1.42.22.7: RESYNC: (1.50-1.51); FILE MERGED 2006/07/04 16:50:46 aw 1.42.22.6: RESYNC: (1.49-1.50); FILE MERGED 2006/05/12 23:11:23 aw 1.42.22.5: RESYNC: (1.47-1.49); FILE MERGED 2006/01/30 19:42:23 aw 1.42.22.4: RESYNC: (1.46-1.47); FILE MERGED 2005/11/18 18:35:21 aw 1.42.22.3: RESYNC: (1.43-1.46); FILE MERGED 2005/09/19 19:39:33 aw 1.42.22.2: RESYNC: (1.42-1.43); FILE MERGED 2005/08/04 15:37:43 sj 1.42.22.1: #48467# using GraphicExporter component for exports, graphic filter progress now works now via xStatusIndicater instead of callback mechanism
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.cxx34
1 files changed, 19 insertions, 15 deletions
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx
index d08199f0f697..12f451ff657d 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.cxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: winmtf.cxx,v $
*
- * $Revision: 1.52 $
+ * $Revision: 1.53 $
*
- * last change: $Author: hr $ $Date: 2006-10-24 13:33:18 $
+ * last change: $Author: ihi $ $Date: 2006-11-14 15:42:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -348,11 +348,10 @@ const void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags )
// ------------------------------------------------------------------------
-WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, PFilterCallback pcallback, void * pcallerdata ) :
+WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigItem* pConfigItem ) :
pOut ( pWinMtfOutput ),
pWMF ( &rStreamWMF ),
- pCallback ( pcallback ),
- pCallerData ( pcallerdata )
+ pFilterConfigItem ( pConfigItem )
{
#ifdef WIN_MTF_ASSERT
// we want to assert not implemented features, but we do this
@@ -369,6 +368,15 @@ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, PFilterCallba
nStartPos = pWMF->Tell();
pOut->SetDevOrg( Point() );
+ if ( pFilterConfigItem )
+ {
+ xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
+ if ( xStatusIndicator.is() )
+ {
+ rtl::OUString aMsg;
+ xStatusIndicator->start( aMsg, 100 );
+ }
+ }
}
// ------------------------------------------------------------------------
@@ -376,21 +384,17 @@ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, PFilterCallba
WinMtf::~WinMtf()
{
delete pOut;
+
+ if ( xStatusIndicator.is() )
+ xStatusIndicator->end();
}
// ------------------------------------------------------------------------
-BOOL WinMtf::Callback( USHORT nPercent )
+void WinMtf::Callback( USHORT nPercent )
{
- if ( pCallback != NULL )
- {
- if( (*pCallback)( pCallerData, nPercent ) )
- {
- pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
- return TRUE;
- }
- }
- return FALSE;
+ if ( xStatusIndicator.is() )
+ xStatusIndicator->setValue( nPercent );
}
// ------------------------------------------------------------------------