Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

I've continued code cleanup and removed #ifdef'ed blocks because _ENABLE_CUR_DIR is never #defined.

Christina
From 81a17913da2c94e0cde5c14f4de933de1913b04c Mon Sep 17 00:00:00 2001
From: Christina Rossmanith <ChrRossmanith@web.de>
Date: Tue, 22 Mar 2011 19:26:46 +0100
Subject: [PATCH] Removed never defined _ENABLE_CUR_DIR

---
 basic/source/runtime/methods.cxx |   53 +------------------------------------
 1 files changed, 2 insertions(+), 51 deletions(-)

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index d69fb2c..2a319c4 100755
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -85,8 +85,6 @@ using namespace com::sun::star::script;
 
 #endif /* _USE_UNO */
 
-//#define _ENABLE_CUR_DIR
-
 #include "stdobj.hxx"
 #include <basic/sbstdobj.hxx>
 #include "rtlproto.hxx"
@@ -489,27 +487,7 @@ RTLFUNC(ChDir)
     (void)bWrite;
 
     rPar.Get(0)->PutEmpty();
-    if (rPar.Count() == 2)
-    {
-#ifdef _ENABLE_CUR_DIR
-        String aPath = rPar.Get(1)->GetString();
-        sal_Bool bError = sal_False;
-#ifdef WNT
-        // #55997 Laut MI hilft es bei File-URLs einen DirEntry zwischenzuschalten
-        // #40996 Harmoniert bei Verwendung der WIN32-Funktion nicht mit getdir
-        DirEntry aEntry( aPath );
-        ByteString aFullPath( aEntry.GetFull(), gsl_getSystemTextEncoding() );
-        if( chdir( aFullPath.GetBuffer()) )
-            bError = sal_True;
-#else
-        if (!DirEntry(aPath).SetCWD())
-            bError = sal_True;
-#endif
-        if( bError )
-            StarBASIC::Error( SbERR_PATH_NOT_FOUND );
-#endif
-    }
-    else
+    if (rPar.Count() != 2)
         StarBASIC::Error( SbERR_BAD_ARGUMENT );
 }
 
@@ -519,34 +497,7 @@ RTLFUNC(ChDrive)
     (void)bWrite;
 
     rPar.Get(0)->PutEmpty();
-    if (rPar.Count() == 2)
-    {
-#ifdef _ENABLE_CUR_DIR
-        // Keine Laufwerke in Unix
-#ifndef UNX
-        String aPar1 = rPar.Get(1)->GetString();
-
-#if defined (WNT) || defined (OS2)
-        if (aPar1.Len() > 0)
-        {
-            int nCurDrive = (int)aPar1.GetBuffer()[0]; ;
-            if ( !isalpha( nCurDrive ) )
-            {
-                StarBASIC::Error( SbERR_BAD_ARGUMENT );
-                return;
-            }
-            else
-                nCurDrive -= ( 'A' - 1 );
-            if (_chdrive(nCurDrive))
-                StarBASIC::Error( SbERR_NO_DEVICE );
-        }
-#endif
-
-#endif
-        // #ifndef UNX
-#endif
-    }
-    else
+    if (rPar.Count() != 2)
         StarBASIC::Error( SbERR_BAD_ARGUMENT );
 }
 
-- 
1.7.0.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.