diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-08-03 08:55:57 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-08-03 08:55:57 +0000 |
commit | 5888277f340b2985d13ca4268b7a84dfc3ec6f25 (patch) | |
tree | 9122b6d9f20df22116823c059443cf18d4592870 /basic/source | |
parent | 9c0e25ca0bb8945c2c6b80c5232189da60bccc84 (diff) |
INTEGRATION: CWS ab34 (1.32.50); FILE MERGED
2007/07/24 13:52:03 ab 1.32.50.2: RESYNC: (1.32-1.33); FILE MERGED
2007/06/27 10:22:49 ab 1.32.50.1: #i78144# Make CDate return type date, removed stupid date special handling from cdbl/csng
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/runtime/methods1.cxx | 53 |
1 files changed, 13 insertions, 40 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index d80c006a64dc..9801c0056b34 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -4,9 +4,9 @@ * * $RCSfile: methods1.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.34 $ * - * last change: $Author: hr $ $Date: 2007-06-27 14:26:12 $ + * last change: $Author: hr $ $Date: 2007-08-03 09:55:57 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -244,25 +244,11 @@ RTLFUNC(CDbl) // JSM SbxVariable *pSbxVariable = rPar.Get(1); if( pSbxVariable->GetType() == SbxSTRING ) { - SbxError eOld = SbxBase::GetError(); - if( eOld != SbxERR_OK ) - SbxBase::ResetError(); - - // AB #42529 , zunaechst Wandlung in Date versuchen - // Wenn erfolgreich, ist das das Ergebnis - nVal = pSbxVariable->GetDate(); - if( SbxBase::GetError() != SbxERR_OK ) - { - SbxBase::ResetError(); - if( eOld != SbxERR_OK ) - SbxBase::SetError( eOld ); - - // AB #41690 , String holen - String aScanStr = pSbxVariable->GetString(); - SbError Error = SbxValue::ScanNumIntnl( aScanStr, nVal ); - if( Error != SbxERR_OK ) - StarBASIC::Error( Error ); - } + // AB #41690 , String holen + String aScanStr = pSbxVariable->GetString(); + SbError Error = SbxValue::ScanNumIntnl( aScanStr, nVal ); + if( Error != SbxERR_OK ) + StarBASIC::Error( Error ); } else { @@ -320,25 +306,12 @@ RTLFUNC(CSng) // JSM SbxVariable *pSbxVariable = rPar.Get(1); if( pSbxVariable->GetType() == SbxSTRING ) { - SbxError eOld = SbxBase::GetError(); - if( eOld != SbxERR_OK ) - SbxBase::ResetError(); - - // AB #42529 , zunaechst Wandlung in Date versuchen - // Wenn erfolgreich, ist das das Ergebnis - double dVal = pSbxVariable->GetDate(); - if( SbxBase::GetError() != SbxERR_OK ) - { - SbxBase::ResetError(); - if( eOld != SbxERR_OK ) - SbxBase::SetError( eOld ); - - // AB #41690 , String holen - String aScanStr = pSbxVariable->GetString(); - SbError Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/TRUE ); - if( SbxBase::GetError() == SbxERR_OK && Error != SbxERR_OK ) - StarBASIC::Error( Error ); - } + // AB #41690 , String holen + double dVal = 0.0; + String aScanStr = pSbxVariable->GetString(); + SbError Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/TRUE ); + if( SbxBase::GetError() == SbxERR_OK && Error != SbxERR_OK ) + StarBASIC::Error( Error ); nVal = (float)dVal; } else |