summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-02-09 11:46:49 +0000
committerRüdiger Timm <rt@openoffice.org>2006-02-09 11:46:49 +0000
commit278155dc90577dc13f548f527db8c209d0beefe9 (patch)
tree61ceb3a63b5eb60e31702c52c7fb41467cdf9d10
parentaed04be270a95ab3229f61ad30eb4d32de812382 (diff)
INTEGRATION: CWS ab24 (1.12.48); FILE MERGED
2006/02/02 16:43:17 ab 1.12.48.1: #i59791# Fixed compiler expression optimization
-rw-r--r--basic/source/comp/exprgen.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index 83496a8530c7..46c0a3a796c9 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: exprgen.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: hr $ $Date: 2005-09-29 16:17:04 $
+ * last change: $Author: rt $ $Date: 2006-02-09 12:46:49 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -79,10 +79,16 @@ void SbiExprNode::Gen( RecursiveMode eRecMode )
{
case SbxEMPTY: pGen->Gen( _EMPTY ); break;
case SbxINTEGER: pGen->Gen( _CONST, (short) nVal ); break;
- case SbxSTRING: pGen->Gen( _SCONST, nStringId ); break;
+ case SbxSTRING:
+ {
+ USHORT nStringId = pGen->GetParser()->aGblStrings.Add( aStrVal, TRUE );
+ pGen->Gen( _SCONST, nStringId ); break;
+ }
default:
- nStringId = pGen->GetParser()->aGblStrings.Add( nVal, eType );
+ {
+ USHORT nStringId = pGen->GetParser()->aGblStrings.Add( nVal, eType );
pGen->Gen( _NUMBER, nStringId );
+ }
}
}
else if( IsOperand() )
@@ -138,7 +144,7 @@ void SbiExprNode::Gen( RecursiveMode eRecMode )
else if( IsTypeOf() )
{
pLeft->Gen();
- pGen->Gen( _TESTCLASS, nStringId );
+ pGen->Gen( _TESTCLASS, nTypeStrId );
}
else
{