diff options
Diffstat (limited to 'basic/source/runtime/methods1.cxx')
-rw-r--r-- | basic/source/runtime/methods1.cxx | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 8c7da2403705..2a536eae65be 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -28,11 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_basic.hxx" -#if defined(WIN) -#include <string.h> -#else #include <stdlib.h> // getenv -#endif #include <vcl/svapp.hxx> #include <vcl/mapmod.hxx> #include <vcl/wrkwin.hxx> @@ -52,10 +48,6 @@ #include <svpm.h> #endif -#if defined(WIN) -#include <tools/svwin.h> -#endif - #ifndef CLK_TCK #define CLK_TCK CLOCKS_PER_SEC #endif @@ -528,11 +520,13 @@ RTLFUNC(DoEvents) (void)pBasic; (void)bWrite; (void)rPar; - Timer aTimer; - aTimer.SetTimeout( 1 ); - aTimer.Start(); - while ( aTimer.IsActive() ) - Application::Yield(); + // Dummy implementation as the following code leads + // to performance problems for unknown reasons + //Timer aTimer; + //aTimer.SetTimeout( 1 ); + //aTimer.Start(); + //while ( aTimer.IsActive() ) + // Application::Reschedule(); } RTLFUNC(GetGUIVersion) @@ -1163,31 +1157,10 @@ RTLFUNC(Environ) } String aResult; // sollte ANSI sein, aber unter Win16 in DLL nicht moeglich -#if defined(WIN) - LPSTR lpszEnv = GetDOSEnvironment(); - String aCompareStr( rPar.Get(1)->GetString() ); - aCompareStr += '='; - const char* pCompare = aCompareStr.GetStr(); - int nCompareLen = aCompareStr.Len(); - while ( *lpszEnv ) - { - // Es werden alle EnvString in der Form ENV=VAL 0-terminiert - // aneinander gehaengt. - - if ( strnicmp( pCompare, lpszEnv, nCompareLen ) == 0 ) - { - aResult = (const char*)(lpszEnv+nCompareLen); - rPar.Get(0)->PutString( aResult ); - return; - } - lpszEnv += lstrlen( lpszEnv ) + 1; // Next Enviroment-String - } -#else ByteString aByteStr( rPar.Get(1)->GetString(), gsl_getSystemTextEncoding() ); const char* pEnvStr = getenv( aByteStr.GetBuffer() ); if ( pEnvStr ) aResult = String::CreateFromAscii( pEnvStr ); -#endif rPar.Get(0)->PutString( aResult ); } @@ -1198,11 +1171,7 @@ static double GetDialogZoomFactor( BOOL bX, long nValue ) if( pDevice ) { Size aRefSize( nValue, nValue ); -#ifndef WIN Fraction aFracX( 1, 26 ); -#else - Fraction aFracX( 1, 23 ); -#endif Fraction aFracY( 1, 24 ); MapMode aMap( MAP_APPFONT, Point(), aFracX, aFracY ); Size aScaledSize = pDevice->LogicToPixel( aRefSize, aMap ); @@ -1586,8 +1555,6 @@ RTLFUNC(Join) } -typedef ::std::vector< String > StringVector; - RTLFUNC(Split) { (void)pBasic; |