From 0a5ab4320969089fdc7979b70bb0f43bc2c0af06 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Jun 2010 13:46:22 +0200 Subject: changehid: #i111874# remove SmartId, make HID of type rtl::OString, fill in dummies for all explicit help ids --- rsc/source/parser/rscicpx.cxx | 10 +++++----- rsc/source/parser/rscinit.cxx | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'rsc/source/parser') diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 625417769f45..2d0f9a4edbeb 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -297,7 +297,7 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, InsWinBit( pClassWindow, "DialogControl", nTabControlId ); nId = aNmTb.Put( "HelpID", VARNAME ); - pClassWindow->SetVariable( nId, &aIdLong ); + pClassWindow->SetVariable( nId, &aString, NULL, 0, WINDOW_HELPID ); nRsc_XYMAPMODEId = nId = aNmTb.Put( "_XYMapMode", VARNAME ); @@ -325,7 +325,7 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, nId = aNmTb.Put( "ExtraLong", VARNAME ); pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_EXTRALONG ); nId = aNmTb.Put( "UniqueId", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_UNIQUEID ); + pClassWindow->SetVariable( nId, &aString, NULL, 0, WINDOW_UNIQUEID ); // BorderStyle RscEnum* pBorderStyleEnum = new RscEnum( pHS->getID( "WindowBorderStyle" ), RSC_NOTYPE ); @@ -1201,7 +1201,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, pClassMenuItem->SetVariable( nId, &aLangString, NULL, 0, RSC_MENUITEM_HELPTEXT ); nId = aNmTb.Put( "HelpID", VARNAME ); - pClassMenuItem->SetVariable( nId, &aIdLong, NULL, 0, + pClassMenuItem->SetVariable( nId, &aString, NULL, 0, RSC_MENUITEM_HELPID ); nId = aNmTb.Put( "AccelKey", VARNAME ); pClassMenuItem->SetVariable( nId, pClassKeyCode, NULL, 0, @@ -1276,7 +1276,7 @@ RscTop * RscTypCont::InitClassMessBox( RscTop * pSuper, nId = aNmTb.Put( "DefButton", VARNAME ); pClassMessBox->SetVariable( nId, pMessDefButton ); nId = aNmTb.Put( "HelpID", VARNAME ); - pClassMessBox->SetVariable( nId, &aIdLong ); + pClassMessBox->SetVariable( nId, &aString ); nId = aNmTb.Put( "SysModal", VARNAME ); pClassMessBox->SetVariable( nId, &aBool ); nId = aNmTb.Put( "Title", VARNAME ); @@ -2015,7 +2015,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId ); } nId = aNmTb.Put( "HelpID", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aIdLong, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aString, NULL, 0, RSC_TOOLBOXITEM_HELPID ); nId = aNmTb.Put( "Text", VARNAME ); pClassToolBoxItem->SetVariable( nId, &aLangString, NULL, 0, diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index a763b92f0bb1..54a56a3840d2 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -210,9 +210,11 @@ void RscTypCont::Init() aNmTb.Put( "TRUE", BOOLEAN, (long)TRUE ); aNmTb.Put( "FALSE", BOOLEAN, (long)FALSE ); + #if 0 /* Vordefinierte HilfeId's */ aNmTb.Put( "HELP_INDEX", NUMBER, OOO_HELP_INDEX ); aNmTb.Put( "HELP_HELPONHELP", NUMBER, OOO_HELP_HELPONHELP ); + #endif aNmTb.Put( "XSCALE", XSCALE , (long)0 ); aNmTb.Put( "YSCALE", YSCALE , (long)0 ); -- cgit From 5965bb52435916c06d1b5a63df4959203b7cf018 Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Fri, 25 Jun 2010 13:15:03 +0200 Subject: codecleanup02: #i112685# Removed ifdefs and code for WIN,W30,W31 --- rsc/source/parser/erscerr.cxx | 2 -- rsc/source/parser/rscyacc.cxx | 4 ---- 2 files changed, 6 deletions(-) (limited to 'rsc/source/parser') diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx index 158aea21b6e3..ed63510737aa 100644 --- a/rsc/source/parser/erscerr.cxx +++ b/rsc/source/parser/erscerr.cxx @@ -88,10 +88,8 @@ void RscError::StdOut( const char * pStr, const RscVerbosity _verbosityLevel ) *************************************************************************/ void RscError::StdErr( const char * pStr ) { -#ifndef WIN if( pStr ) fprintf( stderr, "%s", pStr ); -#endif } /************************************************************************* diff --git a/rsc/source/parser/rscyacc.cxx b/rsc/source/parser/rscyacc.cxx index 89891581d9ba..0d5cc8faef0e 100644 --- a/rsc/source/parser/rscyacc.cxx +++ b/rsc/source/parser/rscyacc.cxx @@ -253,12 +253,8 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop ) #ifdef UNX #define YYMAXDEPTH 2000 #else -#ifdef W30 -#define YYMAXDEPTH 300 -#else #define YYMAXDEPTH 800 #endif -#endif #if defined _MSC_VER #pragma warning(push, 1) -- cgit From 22e9afcab567030e0b1d029400dd85851b2d86e3 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 10 Jul 2010 18:21:24 +0200 Subject: CWS changehid: #i111874#: change code to support HelpIds as byte strings --- rsc/source/parser/rscdb.cxx | 3 ++- rsc/source/parser/rscicpx.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'rsc/source/parser') diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 97d23d4e3b53..05f7210fd357 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -81,6 +81,7 @@ RscTypCont :: RscTypCont( RscError * pErrHdl, a0to9999Short( pHS->getID( "YearShort" ), RSC_NOTYPE ), aIdLong( pHS->getID( "IDLONG" ), RSC_NOTYPE ), aString( pHS->getID( "Chars" ), RSC_NOTYPE ), + aStringLiteral( pHS->getID( "Chars" ), RSC_NOTYPE ), aWinBits( pHS->getID( "WinBits" ), RSC_NOTYPE ), aLangType(), aLangString( pHS->getID( "Lang_Chars" ), RSC_NOTYPE, &aString, &aLangType ), @@ -125,7 +126,7 @@ static sal_uInt32 getLangIdAndShortenLocale( RscTypCont* pTypCont, else rLang = rtl::OString(); #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, " %s (0x%hx)", aL.getStr(), nRet ); + fprintf( stderr, " %s (0x%hx)", aL.getStr(), (int)nRet ); #endif return nRet; } diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 2d0f9a4edbeb..1942711a4a47 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -297,7 +297,7 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, InsWinBit( pClassWindow, "DialogControl", nTabControlId ); nId = aNmTb.Put( "HelpID", VARNAME ); - pClassWindow->SetVariable( nId, &aString, NULL, 0, WINDOW_HELPID ); + pClassWindow->SetVariable( nId, &aStringLiteral, NULL, 0, WINDOW_HELPID ); nRsc_XYMAPMODEId = nId = aNmTb.Put( "_XYMapMode", VARNAME ); @@ -1201,7 +1201,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, pClassMenuItem->SetVariable( nId, &aLangString, NULL, 0, RSC_MENUITEM_HELPTEXT ); nId = aNmTb.Put( "HelpID", VARNAME ); - pClassMenuItem->SetVariable( nId, &aString, NULL, 0, + pClassMenuItem->SetVariable( nId, &aStringLiteral, NULL, 0, RSC_MENUITEM_HELPID ); nId = aNmTb.Put( "AccelKey", VARNAME ); pClassMenuItem->SetVariable( nId, pClassKeyCode, NULL, 0, @@ -1276,7 +1276,7 @@ RscTop * RscTypCont::InitClassMessBox( RscTop * pSuper, nId = aNmTb.Put( "DefButton", VARNAME ); pClassMessBox->SetVariable( nId, pMessDefButton ); nId = aNmTb.Put( "HelpID", VARNAME ); - pClassMessBox->SetVariable( nId, &aString ); + pClassMessBox->SetVariable( nId, &aStringLiteral ); nId = aNmTb.Put( "SysModal", VARNAME ); pClassMessBox->SetVariable( nId, &aBool ); nId = aNmTb.Put( "Title", VARNAME ); @@ -2015,7 +2015,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId ); } nId = aNmTb.Put( "HelpID", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aString, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aStringLiteral, NULL, 0, RSC_TOOLBOXITEM_HELPID ); nId = aNmTb.Put( "Text", VARNAME ); pClassToolBoxItem->SetVariable( nId, &aLangString, NULL, 0, -- cgit From 0e880cfd4b2180d9ecade3d00608c446ccdf77c2 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 14 Jul 2010 13:40:45 +0200 Subject: vcl113: #i43066# handle string concatenations in lexer --- rsc/source/parser/rsclex.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'rsc/source/parser') diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index e0df5de254f9..cc5bd0eb39b4 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -175,11 +175,16 @@ int MakeToken( YYSTYPE * pTokenVal ){ c = pFI->GetFastChar(); if( c == '"' ) { - c = pFI->GetFastChar(); + do + { + c = pFI->GetFastChar(); + } + while( isblank( c ) ); if( c == '"' ) { - aBuf.append( '"' ); - aBuf.append( '"' ); + // this is a continued string + // note: multiline string continuations are handled by the parser + // see rscyacc.y } else bDone = TRUE; -- cgit From 325dec657f22b698dadc1253bbd13d8cfc40f14c Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 16 Jul 2010 16:31:00 +0200 Subject: vcl113: fix missing isblank on Windows --- rsc/source/parser/rsclex.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 rsc/source/parser/rsclex.cxx (limited to 'rsc/source/parser') diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx old mode 100644 new mode 100755 index cc5bd0eb39b4..76ec4c551d52 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -179,7 +179,7 @@ int MakeToken( YYSTYPE * pTokenVal ){ { c = pFI->GetFastChar(); } - while( isblank( c ) ); + while( c == ' ' || c == '\t' ); if( c == '"' ) { // this is a continued string -- cgit