From 728bc0518bd9ddd4564393b293a24e0a66a50ff5 Mon Sep 17 00:00:00 2001 From: Gergo Mocsi Date: Wed, 17 Jul 2013 15:54:13 +0200 Subject: GSOC work Window appearance fix 2 + code fixes Added a function to select the first entry in the ListBox by default. Selected entry can be inserted with the ENTER key. Fixed some code in basic code generation class (SbiCodeGen). Change-Id: Ia6eb43ee5661a0a3ae0b738b619f19972f019eac --- basic/source/comp/codegen.cxx | 12 ++++++------ basic/source/inc/codegen.hxx | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'basic') diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index abbbce94b8f2..207fd9159bfb 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -46,7 +46,7 @@ sal_uInt32 SbiCodeGen::GetPC() void SbiCodeGen::Statement() { - if( aMiscOptions.IsExperimentalMode() && pParser->IsCodeCompleting() ) + if( pParser->IsCodeCompleting() ) return; bStmnt = true; @@ -63,7 +63,7 @@ void SbiCodeGen::Statement() void SbiCodeGen::GenStmnt() { - if( aMiscOptions.IsExperimentalMode() && pParser->IsCodeCompleting() ) + if( pParser->IsCodeCompleting() ) return; if( bStmnt ) @@ -78,7 +78,7 @@ void SbiCodeGen::GenStmnt() sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode ) { - if( aMiscOptions.IsExperimentalMode() && pParser->IsCodeCompleting() ) + if( pParser->IsCodeCompleting() ) return 0; #ifdef DBG_UTIL @@ -92,7 +92,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode ) sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd ) { - if( aMiscOptions.IsExperimentalMode() && pParser->IsCodeCompleting() ) + if( pParser->IsCodeCompleting() ) return 0; #ifdef DBG_UTIL @@ -108,7 +108,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd ) sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd1, sal_uInt32 nOpnd2 ) { - if( aMiscOptions.IsExperimentalMode() && pParser->IsCodeCompleting() ) + if( pParser->IsCodeCompleting() ) return 0; #ifdef DBG_UTIL @@ -127,7 +127,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd1, sal_uInt32 nOp void SbiCodeGen::Save() { - if( aMiscOptions.IsExperimentalMode() && pParser->IsCodeCompleting() ) + if( pParser->IsCodeCompleting() ) return; SbiImage* p = new SbiImage; diff --git a/basic/source/inc/codegen.hxx b/basic/source/inc/codegen.hxx index 3cdd27c21710..f2537193e1ab 100644 --- a/basic/source/inc/codegen.hxx +++ b/basic/source/inc/codegen.hxx @@ -24,7 +24,6 @@ class SbiParser; class SbModule; #include "opcodes.hxx" #include "buffer.hxx" -#include class SbiCodeGen { SbiParser* pParser; // for error messages, line, column etc. @@ -33,7 +32,7 @@ class SbiCodeGen { short nLine, nCol; // for stmnt command short nForLevel; // #29955 bool bStmnt; // true: statement-opcode is pending - SvtMiscOptions aMiscOptions; + public: SbiCodeGen( SbModule&, SbiParser*, short ); SbiParser* GetParser() { return pParser; } -- cgit