summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-10-04 19:48:07 +0000
committerKurt Zenker <kz@openoffice.org>2004-10-04 19:48:07 +0000
commitf4db9955f5c9b016335a0a9843feed9a2187218b (patch)
tree2d3ee7c3a3808470549a69e4cfafff8cb19c7970 /sfx2/source
parent2bf2feb9041b345b138798b7889bae1ee43a97c3 (diff)
INTEGRATION: CWS mav09 (1.14.186); FILE MERGED
2004/09/16 23:49:03 mav 1.14.186.3: RESYNC: (1.15-1.16); FILE MERGED 2004/04/29 21:15:45 mav 1.14.186.2: RESYNC: (1.14-1.15); FILE MERGED 2004/04/14 11:31:08 mba 1.14.186.1: #i27773#: remove so3
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/bastyp/progress.cxx75
1 files changed, 4 insertions, 71 deletions
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 1e3ed973ba..c9db2ca7ac 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: progress.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: obo $ $Date: 2004-09-09 16:48:05 $
+ * last change: $Author: kz $ $Date: 2004-10-04 20:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,14 +73,13 @@
#endif
#pragma hdrstop
-#include <so3/transbnd.hxx> // SvProgressArg
#include <svtools/eitem.hxx>
#include "appdata.hxx"
#include "request.hxx"
#include "frame.hxx"
#include "viewfrm.hxx"
-#include "ipfrm.hxx"
+//#include "ipfrm.hxx"
#include "viewsh.hxx"
#include "objsh.hxx"
#include "app.hxx"
@@ -91,6 +90,7 @@
#include "workwin.hxx"
#include "sfxresid.hxx"
#include "bastyp.hrc"
+#include "msg.hxx"
#include <time.h>
@@ -114,52 +114,6 @@ void AddNumber_Impl( String& aNumber, sal_uInt32 nArg )
}
}
-String GetStatusString( const SvProgressArg* pArg )
-{
- String aString;
- StringList_Impl aSL( SfxResId( RID_DLSTATUS2 ), (USHORT)pArg->eStatus );
- USHORT nTotal = 0;
-
- if ( pArg->eStatus == SVBINDSTATUS_ENDDOWNLOADDATA && nTotal <= 1 )
- return aString;
-
- if( aSL )
- {
- INetURLObject aObj( pArg->rStatus );
- aString = aSL.GetString();
- aString.SearchAndReplaceAscii( "$(HOST)", aObj.GetHost() );
- String aTarget = aObj.GetFull();
- if( aTarget.Len() <= 1 && pArg->eStatus != SVBINDSTATUS_CONNECTING )
- aTarget = aObj.GetHost();
- if( pArg->nMax )
- {
- aTarget += DEFINE_CONST_UNICODE( " (" );
- AddNumber_Impl( aTarget, pArg->nMax );
- aTarget += ')';
- }
-
- aString.SearchAndReplaceAscii( "$(TARGET)",aTarget );
- String aNumber;
- AddNumber_Impl( aNumber, pArg->nProgress );
- if( pArg->nRate )
- {
- aNumber+= DEFINE_CONST_UNICODE( " (" );
- AddNumber_Impl( aNumber, (ULONG)pArg->nRate );
- aNumber+= DEFINE_CONST_UNICODE( "/s)" );
- }
- if( pArg->nMax && pArg->nProgress && pArg->nMax != pArg->nProgress )
- {
- aNumber += DEFINE_CONST_UNICODE( " [" );
- float aPerc = pArg->nProgress / (float)pArg->nMax;
- aNumber += String::CreateFromInt32( (USHORT)(aPerc * 100) );
- aNumber += DEFINE_CONST_UNICODE( "%]" );
- }
- aString.SearchAndReplaceAscii( "$(BYTE)", aNumber );
- }
- return aString;
-}
-
-
struct SfxProgress_Impl : public SfxCancellable
{
Reference < XStatusIndicator > xStatusInd;
@@ -446,27 +400,6 @@ long TimeOut_Impl( void* pThis, void* pArgV )
// -----------------------------------------------------------------------
-IMPL_STATIC_LINK( SfxProgress, DefaultBindingProgress, SvProgressArg*, pArg )
-{
- if( !nLastTime )
- {
- Timer *pTimer = new Timer();
- pTimer->SetTimeout( 3000 );
- pTimer->SetTimeoutHdl( Link( 0, TimeOut_Impl ) );
- pTimer->Start();
- }
- if( Time::GetSystemTicks( ) - nLastTime > 100 )
- {
- nLastTime = Time::GetSystemTicks();
- String aString = GetStatusString( pArg );
- if( aString.Len() )
- GetpApp()->ShowStatusText( aString );
- }
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
BOOL SfxProgress::SetStateText
(
ULONG nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */