diff options
author | jan Iversen <jani@documentfoundation.org> | 2016-05-03 21:36:57 +0000 |
---|---|---|
committer | jan Iversen <jani@documentfoundation.org> | 2016-05-04 11:21:37 +0000 |
commit | 7031189b9ce472ed908e719be67dd2ca057d5f06 (patch) | |
tree | c1ac778ed85d03cb903b649dc57e4fe30231d67f | |
parent | 6d1c52c5f79541d6129c83e7b4cdc2d5975e2e00 (diff) |
genlang correct xcu filter
modified algorithm for adding "."
Change-Id: Ibaa59cf5faa7bf211ead222dbb2e5a391929d679
-rw-r--r-- | l10ntools/source/gConvXcu.cxx | 8 | ||||
-rw-r--r-- | l10ntools/source/gLexXcu.l | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/l10ntools/source/gConvXcu.cxx b/l10ntools/source/gConvXcu.cxx index 0352e988a470..fe5d9214b2cb 100644 --- a/l10ntools/source/gConvXcu.cxx +++ b/l10ntools/source/gConvXcu.cxx @@ -125,8 +125,12 @@ void convert_xcu::stopCollectData(char *syyText) if (useText.size()) { // locate key and extract it - for (nL = 0; nL < (int)mcStack.size() -1; ++nL) - useKey += "." + mcStack[nL]; + int max = (int)mcStack.size() - 1; + for (nL = 0; nL < max; ++nL) { + useKey += mcStack[nL]; + if (nL < max -1) + useKey += "."; + } mcMemory.setSourceKey(miLineNo, msSourceFile, useKey, useText, "", "value", mcStack[nL], mbMergeMode); } diff --git a/l10ntools/source/gLexXcu.l b/l10ntools/source/gLexXcu.l index 8cc02c49028b..5eb55a047e02 100644 --- a/l10ntools/source/gLexXcu.l +++ b/l10ntools/source/gLexXcu.l @@ -50,13 +50,14 @@ FIN [^/>]*">" "component-data" { LOCptr->addLevel(); LOCptr->pushKey(""); -// LOCptr->copySource(yytext, false); + LOCptr->copySource(yytext, false); } "<oor:component-data"{NAME} { LOCptr->addLevel(); + LOCptr->pushKey(""); LOCptr->pushKey(yytext); } |