diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-11-06 12:52:58 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-11-06 12:52:58 +0000 |
commit | 042ecaedd51580a32bc4bc5f6d042783c17d68eb (patch) | |
tree | eaac05d62b3a31b6bd9116e720fc85682578a0b8 /rsc | |
parent | bd2c5e6d0e7fb2889047c5813a8ae6f490c5dac8 (diff) |
#94297# clear system dependant name list
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/inc/rscdb.hxx | 5 | ||||
-rw-r--r-- | rsc/source/parser/rscdb.cxx | 12 | ||||
-rw-r--r-- | rsc/source/rsc/rsc.cxx | 14 |
3 files changed, 25 insertions, 6 deletions
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index f94480935508..d0e6397bf660 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -2,9 +2,9 @@ * * $RCSfile: rscdb.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: pl $ $Date: 2001-11-05 14:44:05 $ + * last change: $Author: pl $ $Date: 2001-11-06 13:52:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -409,6 +409,7 @@ public: RscTop * GetRoot() { return( pRoot ); }; USHORT PutSysName( USHORT nRscTyp, char * pName, USHORT nConst, USHORT nId, BOOL bFirst ); + void ClearSysNames(); ERRTYPE WriteRc( FILE * fOutput ); void WriteSrc( FILE * fOutput, ULONG nFileIndex, CharSet nCharSet, BOOL bName = TRUE ); diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 38eb4568d47b..f6495b4de455 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -2,9 +2,9 @@ * * $RCSfile: rscdb.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: pl $ $Date: 2001-10-10 11:51:23 $ + * last change: $Author: pl $ $Date: 2001-11-06 13:52:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -228,6 +228,14 @@ RscTypCont :: ~RscTypCont(){ }; } +void RscTypCont::ClearSysNames() +{ + RscSysEntry * pSysEntry; + while( NULL != (pSysEntry = aSysLst.Remove()) ){ + delete pSysEntry; + }; +} + //======================================================================= RscTop * RscTypCont::SearchType( HASHID nId ) /* [Beschreibung] diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index a243c92d4dd9..f950eef19e63 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: rsc.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: hjs $ $Date: 2001-11-06 12:43:23 $ + * last change: $Author: pl $ $Date: 2001-11-06 13:52:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -855,6 +855,15 @@ ERRTYPE RscCompiler::Link() // rc-Datei schreiben ByteString aDir( it->aOutputRc ); aDir.SetToken( aDir.GetTokenCount( PATHSEP )-1, PATHSEP, ByteString() ); + if( ! aDir.Len() ) + { + char aBuf[1024]; + if( getcwd( aBuf, sizeof( aBuf ) ) ) + { + aDir = aBuf; + aDir.Append( PATHSEP ); + } + } aDir.Append( "rscXXXXXX" ); char* pTmp = strdup( aDir.GetBuffer() ); mktemp( pTmp ); @@ -870,6 +879,7 @@ ERRTYPE RscCompiler::Link() pTC->ChangeLanguage( it->nLangTypeId ); pTC->ChangeDefLanguage( International::GetNeutralLanguage( it->nLangTypeId ) ); pTC->SetSourceCharSet( it->nSourceCharSet ); + pTC->ClearSysNames(); aError = pTC->WriteRc( foutput ); fclose( foutput ); |