diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-04-24 13:02:10 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-04-24 13:02:10 +0000 |
commit | 476ca04c2d43109b758f945cfb2949f58c51d917 (patch) | |
tree | a1f7c570d745177ffdfeeb04b36ddb2cd053a661 /basic | |
parent | 51f32751afe81ae9b10673a98c73850ff4faeace (diff) |
INTEGRATION: CWS uno3 (1.12.14); FILE MERGED
2003/04/16 12:01:44 ab 1.12.14.1: #i13122# Fixed LSet/RSet
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/step0.cxx | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 11c9c344f214..dfd89eeb552c 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -2,9 +2,9 @@ * * $RCSfile: step0.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: rt $ $Date: 2003-04-23 16:58:31 $ + * last change: $Author: vg $ $Date: 2003-04-24 14:02:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -317,12 +317,21 @@ void SbiRuntime::StepLSET() String aRefVarString = refVar->GetString(); String aRefValString = refVal->GetString(); - if (aRefVarString.Len() > aRefValString.Len()) - aRefVarString.Fill(aRefVarString.Len(),' '); - aRefVarString = aRefValString.Copy( 0, aRefVarString.Len() ); - aRefVarString += aRefVarString.Copy( aRefValString.Len() ); - refVar->PutString(aRefVarString); + USHORT nVarStrLen = aRefVarString.Len(); + USHORT nValStrLen = aRefValString.Len(); + String aNewStr; + if( nVarStrLen > nValStrLen ) + { + aRefVarString.Fill(nVarStrLen,' '); + aNewStr = aRefValString.Copy( 0, nValStrLen ); + aNewStr += aRefVarString.Copy( nValStrLen, nVarStrLen - nValStrLen ); + } + else + { + aNewStr = aRefValString.Copy( 0, nVarStrLen ); + } + refVar->PutString( aNewStr ); refVar->SetFlags( n ); } } @@ -345,13 +354,14 @@ void SbiRuntime::StepRSET() String aRefValString = refVal->GetString(); USHORT nPos = 0; - if (aRefVarString.Len() > aRefValString.Len()) + USHORT nVarStrLen = aRefVarString.Len(); + if( nVarStrLen > aRefValString.Len() ) { - aRefVarString.Fill(aRefVarString.Len(),' '); - nPos = aRefVarString.Len() - aRefValString.Len(); + aRefVarString.Fill(nVarStrLen,' '); + nPos = nVarStrLen - aRefValString.Len(); } aRefVarString = aRefVarString.Copy( 0, nPos ); - aRefVarString += aRefValString.Copy( 0, aRefVarString.Len() - nPos ); + aRefVarString += aRefValString.Copy( 0, nVarStrLen - nPos ); refVar->PutString(aRefVarString); refVar->SetFlags( n ); |