summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-12-26 14:26:51 +0100
committerZolnai Tamás <tamas.zolnai@collabora.com>2013-12-27 07:14:53 +0100
commit0dbd93b92a694a384b293e0dce87b5acdf12e9e8 (patch)
tree3552b29d5c1ced35bca348e08e8c5eff4cd439ee
parent94da69d4898fb2dd30834a388a980a54039dea04 (diff)
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
-rw-r--r--l10ntools/inc/export.hxx2
-rw-r--r--l10ntools/inc/tokens.h1
-rw-r--r--l10ntools/source/export.cxx41
-rw-r--r--l10ntools/source/merge.cxx10
-rw-r--r--l10ntools/source/srclex.l5
5 files changed, 2 insertions, 57 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 971b18495670..a160f6ab4fc4 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -134,7 +134,6 @@ public:
OString sTextTyp;
ExportList *pStringList;
- ExportList *pUIEntries;
ExportList *pItemList;
ExportList *pFilterList;
ExportList *pPairedList;
@@ -150,7 +149,6 @@ public:
#define LIST_FILTER 0x0002
#define LIST_ITEM 0x0004
#define LIST_PAIRED 0x0005
-#define LIST_UIENTRIES 0x0008
#define STRING_TYP_TEXT 0x0010
#define STRING_TYP_HELPTEXT 0x0020
#define STRING_TYP_QUICKHELPTEXT 0x0040
diff --git a/l10ntools/inc/tokens.h b/l10ntools/inc/tokens.h
index 4f4c49f65011..9f4f2a8664ce 100644
--- a/l10ntools/inc/tokens.h
+++ b/l10ntools/inc/tokens.h
@@ -51,7 +51,6 @@
#define LISTTEXT 514 /* < "Text" ... > */
#define RSCDEFINE 515 /* #define MY_TEXT */
#define RSCDEFINELEND 516 /* */
-#define UIENTRIES 518 /* UIEntries = { */
#define PRAGMA 519 /* #pragma ... */
#define _LISTTEXT 521 /* { "Text" ... } */
#define TEXTREFID 522 /* Text = 12345 */
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index ef1df104d134..5bd5e84d255c 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -527,14 +527,6 @@ int Export::Execute( int nToken, const char * pToken )
nListIndex = 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
&& (lcl_countOccurrences(sToken, '{')
> lcl_countOccurrences(sToken, '}')))
@@ -543,7 +535,6 @@ int Export::Execute( int nToken, const char * pToken )
}
}
break;
- case UIENTRIES:
case LISTASSIGNMENT:
{
OString sTmpToken(
@@ -588,14 +579,6 @@ int Export::Execute( int nToken, const char * pToken )
nListIndex = 0;
nListLevel = 0;
}
- else if (sKey == "UIENTRIES")
- {
- pResData->bList = sal_True;
- nList = LIST_UIENTRIES;
- m_sListLang = SOURCE_LANGUAGE;
- nListIndex = 0;
- nListLevel = 0;
- }
}
}
break;
@@ -872,12 +855,6 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
if ( bCreateNew )
pResData->pPairedList = 0;
}
- if ( pResData->pUIEntries ) {
- OString sList( "uientries" );
- WriteExportList( pResData, pResData->pUIEntries, sList, bCreateNew );
- if ( bCreateNew )
- pResData->pUIEntries = 0;
- }
return sal_True;
}
@@ -1011,14 +988,6 @@ void Export::InsertListEntry(const OString &rText, const OString &rLine)
nListIndex = 0;
}
}
- else if ( nList == LIST_UIENTRIES ) {
- pList = pResData->pUIEntries;
- if ( !pList ) {
- pResData->pUIEntries = new ExportList();
- pList = pResData->pUIEntries;
- nListIndex = 0;
- }
- }
else
return;
@@ -1206,13 +1175,12 @@ bool Export::GetAllMergeEntrysOfList(ResData *pResData, std::vector<MergeEntrys*
MergeEntrys* pEntrysOfFirstItem = 0;
sal_uInt16 nType = LIST_STRING;
bool bPairedList = false;
- while( !pEntrysOfFirstItem && nType <= LIST_UIENTRIES )
+ while( !pEntrysOfFirstItem && nType <= LIST_PAIRED )
{
switch ( nType )
{
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_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_PAIRED : pResData->sResTyp = "pairedlist"; o_pList = pResData->pPairedList; bPairedList = true; break;
}
@@ -1364,7 +1332,6 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
}
// Merge Lists
-
if ( pResData->bList ) {
OString sOldId = pResData->sId;
OString sOldGId = pResData->sGId;
@@ -1410,9 +1377,6 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
case LIST_PAIRED:
sHead.append("PairedList ");
break;
- case LIST_UIENTRIES:
- sHead.append("UIEntries ");
- break;
}
sHead.append("[ ");
sHead.append(sCur);
@@ -1436,8 +1400,7 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
sLine = ( *(*pList)[ nLIndex ])[ SOURCE_LANGUAGE ];
if ( sLine.indexOf( '>' ) != -1 ) {
- if (( nList != LIST_UIENTRIES ) &&
- (( sLine.indexOf( '{' ) == -1 ) ||
+ if ((( sLine.indexOf( '{' ) == -1 ) ||
( sLine.indexOf( '{' ) >= sLine.indexOf( '"' ))) &&
(( sLine.indexOf( '<' ) == -1 ) ||
( sLine.indexOf( '<' ) >= sLine.indexOf( '"' ))))
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 6752c7fb704c..befa5905bb34 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -76,7 +76,6 @@ ResData::ResData( const OString &rGId )
sGId( rGId ),
sTextTyp( "Text" ),
pStringList( NULL ),
- pUIEntries( NULL ),
pItemList( NULL ),
pFilterList( NULL ),
pPairedList( NULL )
@@ -98,7 +97,6 @@ ResData::ResData( const OString &rGId, const OString &rFilename)
sFilename( rFilename ),
sTextTyp( "Text" ),
pStringList( NULL ),
- pUIEntries( NULL ),
pItemList( NULL ),
pFilterList( NULL ),
pPairedList( NULL )
@@ -133,14 +131,6 @@ ResData::~ResData()
}
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;
- }
}
//
diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
index 048d1f11c035..3642376f4818 100644
--- a/l10ntools/source/srclex.l
+++ b/l10ntools/source/srclex.l
@@ -191,11 +191,6 @@ void YYWarning();
WorkOnTokenSet( LISTASSIGNMENT, yytext );
}
-"UIEntries"[ \t]*("["[ \t]*[a-zA-Z0-9_\-]+[ \t]*"]"[ \t]*)?"="[ \t]*(\\[ \t]*)?\n?[ \t]*"{" {
-/* UIENTRIES */
- WorkOnTokenSet( UIENTRIES, yytext );
-}
-
"<"?[ \t]*L?\".*\".*">" {
/* LISTTEXT */
WorkOnTokenSet( LISTTEXT, yytext );