diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-03-17 12:36:05 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-03-17 12:36:05 +0000 |
commit | 8163ffd1fd7af6d1c3818930d69e35d159e74735 (patch) | |
tree | 4aed76fc4c9d47ea9daa4a0989c50f3aeb9c94a6 /basic | |
parent | 57000f74e0e4e8d355366f7004278f3b49b81488 (diff) |
INTEGRATION: CWS jl5vba (1.52.6); FILE MERGED
2004/01/21 09:46:42 ab 1.52.6.1: #111934# Merge to src680, for tasks see message INTEGRATION: CWS ab02vba (1.51.4)
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/methods.cxx | 55 |
1 files changed, 44 insertions, 11 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 20267e09a5fb..dfe3a425d630 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2,9 +2,9 @@ * * $RCSfile: methods.cxx,v $ * - * $Revision: 1.53 $ + * $Revision: 1.54 $ * - * last change: $Author: kz $ $Date: 2004-02-26 16:23:23 $ + * last change: $Author: obo $ $Date: 2004-03-17 13:36:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -894,6 +894,23 @@ RTLFUNC(RmDir) // JSM { try { + SbiInstance* pInst = pINST; + bool bCompatibility = ( pInst && pInst->IsCompatibility() ); + if( bCompatibility ) + { + sal_Int32 nCount = 1; + if( xSFI->isFolder( aPath ) ) + { + Sequence< OUString > aContent = xSFI->getFolderContents( aPath, true ); + nCount = aContent.getLength(); + } + if( nCount > 0 ) + { + StarBASIC::Error( SbERR_ACCESS_ERROR ); + return; + } + } + xSFI->kill( getFullPath( aPath ) ); } catch( Exception & ) @@ -2027,7 +2044,7 @@ RTLFUNC(IsNull) if( !bNull && pArg->GetType() == SbxOBJECT ) { SbxBase* pObj = pArg->GetObject(); - if( !pObj ) + if( !pObj || pObj->ISA(TypeHolderObject) ) bNull = TRUE; } rPar.Get( 0 )->PutBool( bNull ); @@ -2368,7 +2385,10 @@ RTLFUNC(Dir) if( pRTLData->aDirSeq.getLength() > 0 ) { - sal_Bool bOnlyFolders = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0); + sal_Bool bFolderFlag = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0); + + SbiInstance* pInst = pINST; + bool bCompatibility = ( pInst && pInst->IsCompatibility() ); for( ;; ) { if( pRTLData->nCurDirPos < 0 ) @@ -2393,12 +2413,24 @@ RTLFUNC(Dir) { OUString aFile = pRTLData->aDirSeq.getConstArray()[pRTLData->nCurDirPos++]; - // Only directories? - if( bOnlyFolders ) + if( bCompatibility ) + { + if( !bFolderFlag ) + { + sal_Bool bFolder = xSFI->isFolder( aFile ); + if( bFolder ) + continue; + } + } + else { - sal_Bool bFolder = xSFI->isFolder( aFile ); - if( !bFolder ) - continue; + // Only directories + if( bFolderFlag ) + { + sal_Bool bFolder = xSFI->isFolder( aFile ); + if( !bFolder ) + continue; + } } INetURLObject aURL( aFile ); @@ -2549,7 +2581,7 @@ RTLFUNC(Dir) if( pRTLData->pDir ) { - sal_Bool bOnlyFolders = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0); + sal_Bool bFolderFlag = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0); for( ;; ) { if( pRTLData->nCurDirPos < 0 ) @@ -2581,7 +2613,7 @@ RTLFUNC(Dir) nRet = aItem.getFileStatus( aFileStatus ); // Only directories? - if( bOnlyFolders ) + if( bFolderFlag ) { FileStatus::Type aType = aFileStatus.getFileType(); sal_Bool bFolder = isFolder( aType ); @@ -3246,6 +3278,7 @@ RTLFUNC(TypeName) "WChar", // SbxWCHAR "Int64", // SbxSALINT64 "UInt64", // SbxSALUINT64 + "Decimal", // SbxDECIMAL }; if ( rPar.Count() != 2 ) |