Kaydet (Commit) 0dbd93b9 authored tarafından Zolnai Tamás's avatar Zolnai Tamás Kaydeden (comit) Zolnai Tamás

Transex3: UIEntries list type is unused

This list type doesn't appear in the resource files
and there are lots of alternatives (ItemList, StringList ...)
for future need.

Change-Id: Ia4454a329ba93f54e5b3ca45443a1a84be3b4bf7
üst 94da69d4
...@@ -134,7 +134,6 @@ public: ...@@ -134,7 +134,6 @@ public:
OString sTextTyp; OString sTextTyp;
ExportList *pStringList; ExportList *pStringList;
ExportList *pUIEntries;
ExportList *pItemList; ExportList *pItemList;
ExportList *pFilterList; ExportList *pFilterList;
ExportList *pPairedList; ExportList *pPairedList;
...@@ -150,7 +149,6 @@ public: ...@@ -150,7 +149,6 @@ public:
#define LIST_FILTER 0x0002 #define LIST_FILTER 0x0002
#define LIST_ITEM 0x0004 #define LIST_ITEM 0x0004
#define LIST_PAIRED 0x0005 #define LIST_PAIRED 0x0005
#define LIST_UIENTRIES 0x0008
#define STRING_TYP_TEXT 0x0010 #define STRING_TYP_TEXT 0x0010
#define STRING_TYP_HELPTEXT 0x0020 #define STRING_TYP_HELPTEXT 0x0020
#define STRING_TYP_QUICKHELPTEXT 0x0040 #define STRING_TYP_QUICKHELPTEXT 0x0040
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
#define LISTTEXT 514 /* < "Text" ... > */ #define LISTTEXT 514 /* < "Text" ... > */
#define RSCDEFINE 515 /* #define MY_TEXT */ #define RSCDEFINE 515 /* #define MY_TEXT */
#define RSCDEFINELEND 516 /* */ #define RSCDEFINELEND 516 /* */
#define UIENTRIES 518 /* UIEntries = { */
#define PRAGMA 519 /* #pragma ... */ #define PRAGMA 519 /* #pragma ... */
#define _LISTTEXT 521 /* { "Text" ... } */ #define _LISTTEXT 521 /* { "Text" ... } */
#define TEXTREFID 522 /* Text = 12345 */ #define TEXTREFID 522 /* Text = 12345 */
......
...@@ -527,14 +527,6 @@ int Export::Execute( int nToken, const char * pToken ) ...@@ -527,14 +527,6 @@ int Export::Execute( int nToken, const char * pToken )
nListIndex = 0; nListIndex = 0;
nListLevel = 0; nListLevel = 0;
} }
else if (sKey == "UIENTRIES")
{
pResData->bList = sal_True;
nList = LIST_UIENTRIES;
m_sListLang = SOURCE_LANGUAGE;
nListIndex = 0;
nListLevel = 0;
}
if (sToken.indexOf( '{' ) != -1 if (sToken.indexOf( '{' ) != -1
&& (lcl_countOccurrences(sToken, '{') && (lcl_countOccurrences(sToken, '{')
> lcl_countOccurrences(sToken, '}'))) > lcl_countOccurrences(sToken, '}')))
...@@ -543,7 +535,6 @@ int Export::Execute( int nToken, const char * pToken ) ...@@ -543,7 +535,6 @@ int Export::Execute( int nToken, const char * pToken )
} }
} }
break; break;
case UIENTRIES:
case LISTASSIGNMENT: case LISTASSIGNMENT:
{ {
OString sTmpToken( OString sTmpToken(
...@@ -588,14 +579,6 @@ int Export::Execute( int nToken, const char * pToken ) ...@@ -588,14 +579,6 @@ int Export::Execute( int nToken, const char * pToken )
nListIndex = 0; nListIndex = 0;
nListLevel = 0; nListLevel = 0;
} }
else if (sKey == "UIENTRIES")
{
pResData->bList = sal_True;
nList = LIST_UIENTRIES;
m_sListLang = SOURCE_LANGUAGE;
nListIndex = 0;
nListLevel = 0;
}
} }
} }
break; break;
...@@ -872,12 +855,6 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew ) ...@@ -872,12 +855,6 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
if ( bCreateNew ) if ( bCreateNew )
pResData->pPairedList = 0; pResData->pPairedList = 0;
} }
if ( pResData->pUIEntries ) {
OString sList( "uientries" );
WriteExportList( pResData, pResData->pUIEntries, sList, bCreateNew );
if ( bCreateNew )
pResData->pUIEntries = 0;
}
return sal_True; return sal_True;
} }
...@@ -1011,14 +988,6 @@ void Export::InsertListEntry(const OString &rText, const OString &rLine) ...@@ -1011,14 +988,6 @@ void Export::InsertListEntry(const OString &rText, const OString &rLine)
nListIndex = 0; nListIndex = 0;
} }
} }
else if ( nList == LIST_UIENTRIES ) {
pList = pResData->pUIEntries;
if ( !pList ) {
pResData->pUIEntries = new ExportList();
pList = pResData->pUIEntries;
nListIndex = 0;
}
}
else else
return; return;
...@@ -1206,13 +1175,12 @@ bool Export::GetAllMergeEntrysOfList(ResData *pResData, std::vector<MergeEntrys* ...@@ -1206,13 +1175,12 @@ bool Export::GetAllMergeEntrysOfList(ResData *pResData, std::vector<MergeEntrys*
MergeEntrys* pEntrysOfFirstItem = 0; MergeEntrys* pEntrysOfFirstItem = 0;
sal_uInt16 nType = LIST_STRING; sal_uInt16 nType = LIST_STRING;
bool bPairedList = false; bool bPairedList = false;
while( !pEntrysOfFirstItem && nType <= LIST_UIENTRIES ) while( !pEntrysOfFirstItem && nType <= LIST_PAIRED )
{ {
switch ( nType ) switch ( nType )
{ {
case LIST_STRING : pResData->sResTyp = "stringlist"; o_pList = pResData->pStringList; bPairedList = false; break; case LIST_STRING : pResData->sResTyp = "stringlist"; o_pList = pResData->pStringList; bPairedList = false; break;
case LIST_FILTER : pResData->sResTyp = "filterlist"; o_pList = pResData->pFilterList; bPairedList = false; break; case LIST_FILTER : pResData->sResTyp = "filterlist"; o_pList = pResData->pFilterList; bPairedList = false; break;
case LIST_UIENTRIES : pResData->sResTyp = "uientries"; o_pList = pResData->pUIEntries;bPairedList = false; break;
case LIST_ITEM : pResData->sResTyp = "itemlist"; o_pList = pResData->pItemList; bPairedList = false; break; case LIST_ITEM : pResData->sResTyp = "itemlist"; o_pList = pResData->pItemList; bPairedList = false; break;
case LIST_PAIRED : pResData->sResTyp = "pairedlist"; o_pList = pResData->pPairedList; bPairedList = true; break; case LIST_PAIRED : pResData->sResTyp = "pairedlist"; o_pList = pResData->pPairedList; bPairedList = true; break;
} }
...@@ -1364,7 +1332,6 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode ) ...@@ -1364,7 +1332,6 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
} }
// Merge Lists // Merge Lists
if ( pResData->bList ) { if ( pResData->bList ) {
OString sOldId = pResData->sId; OString sOldId = pResData->sId;
OString sOldGId = pResData->sGId; OString sOldGId = pResData->sGId;
...@@ -1410,9 +1377,6 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode ) ...@@ -1410,9 +1377,6 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
case LIST_PAIRED: case LIST_PAIRED:
sHead.append("PairedList "); sHead.append("PairedList ");
break; break;
case LIST_UIENTRIES:
sHead.append("UIEntries ");
break;
} }
sHead.append("[ "); sHead.append("[ ");
sHead.append(sCur); sHead.append(sCur);
...@@ -1436,8 +1400,7 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode ) ...@@ -1436,8 +1400,7 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
sLine = ( *(*pList)[ nLIndex ])[ SOURCE_LANGUAGE ]; sLine = ( *(*pList)[ nLIndex ])[ SOURCE_LANGUAGE ];
if ( sLine.indexOf( '>' ) != -1 ) { if ( sLine.indexOf( '>' ) != -1 ) {
if (( nList != LIST_UIENTRIES ) && if ((( sLine.indexOf( '{' ) == -1 ) ||
(( sLine.indexOf( '{' ) == -1 ) ||
( sLine.indexOf( '{' ) >= sLine.indexOf( '"' ))) && ( sLine.indexOf( '{' ) >= sLine.indexOf( '"' ))) &&
(( sLine.indexOf( '<' ) == -1 ) || (( sLine.indexOf( '<' ) == -1 ) ||
( sLine.indexOf( '<' ) >= sLine.indexOf( '"' )))) ( sLine.indexOf( '<' ) >= sLine.indexOf( '"' ))))
......
...@@ -76,7 +76,6 @@ ResData::ResData( const OString &rGId ) ...@@ -76,7 +76,6 @@ ResData::ResData( const OString &rGId )
sGId( rGId ), sGId( rGId ),
sTextTyp( "Text" ), sTextTyp( "Text" ),
pStringList( NULL ), pStringList( NULL ),
pUIEntries( NULL ),
pItemList( NULL ), pItemList( NULL ),
pFilterList( NULL ), pFilterList( NULL ),
pPairedList( NULL ) pPairedList( NULL )
...@@ -98,7 +97,6 @@ ResData::ResData( const OString &rGId, const OString &rFilename) ...@@ -98,7 +97,6 @@ ResData::ResData( const OString &rGId, const OString &rFilename)
sFilename( rFilename ), sFilename( rFilename ),
sTextTyp( "Text" ), sTextTyp( "Text" ),
pStringList( NULL ), pStringList( NULL ),
pUIEntries( NULL ),
pItemList( NULL ), pItemList( NULL ),
pFilterList( NULL ), pFilterList( NULL ),
pPairedList( NULL ) pPairedList( NULL )
...@@ -133,14 +131,6 @@ ResData::~ResData() ...@@ -133,14 +131,6 @@ ResData::~ResData()
} }
delete pItemList; delete pItemList;
} }
if ( pUIEntries ) {
// delete existing res. of type UIEntries
for ( size_t i = 0; i < pUIEntries->size(); i++ ) {
ExportListEntry* test = (*pUIEntries)[ i ];
delete test;
}
delete pUIEntries;
}
} }
// //
......
...@@ -191,11 +191,6 @@ void YYWarning(); ...@@ -191,11 +191,6 @@ void YYWarning();
WorkOnTokenSet( LISTASSIGNMENT, yytext ); WorkOnTokenSet( LISTASSIGNMENT, yytext );
} }
"UIEntries"[ \t]*("["[ \t]*[a-zA-Z0-9_\-]+[ \t]*"]"[ \t]*)?"="[ \t]*(\\[ \t]*)?\n?[ \t]*"{" {
/* UIENTRIES */
WorkOnTokenSet( UIENTRIES, yytext );
}
"<"?[ \t]*L?\".*\".*">" { "<"?[ \t]*L?\".*\".*">" {
/* LISTTEXT */ /* LISTTEXT */
WorkOnTokenSet( LISTTEXT, yytext ); WorkOnTokenSet( LISTTEXT, yytext );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment