diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-11-02 10:03:21 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-11-02 10:03:21 +0000 |
commit | 5a272995ec4d65c8bf8832a98bd3c5f0aee4b05f (patch) | |
tree | b4c294ec95174259aca08e21238843de92448377 /basic/source/runtime/methods1.cxx | |
parent | d3024c373098157890c4ca19065f815f97980f66 (diff) |
INTEGRATION: CWS ab30 (1.28.28); FILE MERGED
2006/10/19 08:40:22 ab 1.28.28.5: #i69835# Remove patch due to problems in Windows
2006/10/18 13:57:13 ab 1.28.28.4: #69835# Fixed Solaris related build problem
2006/10/17 14:55:07 ab 1.28.28.3: RESYNC: (1.28-1.29); FILE MERGED
2006/09/28 14:21:26 ab 1.28.28.2: #i69835# Environ() use Sytem Text Encoding
2006/09/21 11:07:27 ab 1.28.28.1: #i67610# RTL function returns current state and also can be called without parameter
Diffstat (limited to 'basic/source/runtime/methods1.cxx')
-rw-r--r-- | basic/source/runtime/methods1.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 689ad6b2f48c..1ddb1e434c7b 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -4,9 +4,9 @@ * * $RCSfile: methods1.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: obo $ $Date: 2006-10-12 14:29:59 $ + * last change: $Author: vg $ $Date: 2006-11-02 11:03:21 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -2546,11 +2546,20 @@ RTLFUNC(CompatibilityMode) (void)pBasic; (void)bWrite; - rPar.Get(0)->PutEmpty(); - if ( rPar.Count() != 2 ) + bool bEnabled = false; + USHORT nCount = rPar.Count(); + if ( nCount != 1 && nCount != 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); - if( pINST ) - pINST->EnableCompatibility( rPar.Get(1)->GetBool() ); + + SbiInstance* pInst = pINST; + if( pInst ) + { + if ( nCount == 2 ) + pInst->EnableCompatibility( rPar.Get(1)->GetBool() ); + + bEnabled = pInst->IsCompatibility(); + } + rPar.Get(0)->PutBool( bEnabled ); } RTLFUNC(Input) |