[Libreoffice-commits] .: 3 commits - l10ntools/source scp2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 3 10:43:34 PDT 2012
l10ntools/source/lngmerge.cxx | 21 ++++++++++++---------
scp2/source/math/registryitem_math.ulf | 1 -
2 files changed, 12 insertions(+), 10 deletions(-)
New commits:
commit 3bde7aa0943c76cf0b8063f9c03f7b15edd749b1
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Wed Oct 3 12:50:21 2012 +0200
Delete german text from registryitem_math.ulf
Change-Id: Ic6a6706062bc82d5e4096d0a6aa7b52a8988f1bc
diff --git a/scp2/source/math/registryitem_math.ulf b/scp2/source/math/registryitem_math.ulf
index ce4e2fb..0b987cb 100644
--- a/scp2/source/math/registryitem_math.ulf
+++ b/scp2/source/math/registryitem_math.ulf
@@ -24,4 +24,3 @@ en-US = "%SXWFORMATNAME %SXWFORMATVERSION Formula"
[STR_REG_VAL_OO_FORMULA]
en-US = "OpenDocument Formula"
-de = "OpenDocument Formel"
commit 2146c00da07a0c632028cf41c4c1a5a687d82ffe
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Wed Oct 3 12:37:19 2012 +0200
Ulfex ignores comments during extraction too
During string extraction this does not cause
real problem but causes unnecessary operations.
Plus make isNextGroup not to change sLine_in
parameter.
Change-Id: I3db6a94ef320c096a7519f7f83dd4080d0588459
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index fcab696..b0282f5 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -146,12 +146,12 @@ void LngParser::WriteSDF(std::ofstream &aSDFStream,
}
}
-bool LngParser::isNextGroup(rtl::OString &sGroup_out, rtl::OString &sLine_in)
+bool LngParser::isNextGroup(rtl::OString &sGroup_out, const rtl::OString &sLine_in)
{
- sLine_in = sLine_in.trim();
- if ((sLine_in[0] == '[') && (sLine_in[sLine_in.getLength() - 1] == ']'))
+ const OString sLineTrim = sLine_in.trim();
+ if ((sLineTrim[0] == '[') && (sLineTrim[sLineTrim.getLength() - 1] == ']'))
{
- sGroup_out = getBracketedContent(sLine_in).trim();
+ sGroup_out = getBracketedContent(sLineTrim).trim();
return true;
}
return false;
@@ -160,10 +160,13 @@ bool LngParser::isNextGroup(rtl::OString &sGroup_out, rtl::OString &sLine_in)
void LngParser::ReadLine(const rtl::OString &rLine_in,
OStringHashMap &rText_inout)
{
- rtl::OString sLang(rLine_in.getToken(0, '=').trim());
- if (!sLang.isEmpty()) {
- rtl::OString sText(rLine_in.getToken(1, '"'));
- rText_inout[sLang] = sText;
+ if (!rLine_in.match(" *") && !rLine_in.match("/*"))
+ {
+ rtl::OString sLang(rLine_in.getToken(0, '=').trim());
+ if (!sLang.isEmpty()) {
+ rtl::OString sText(rLine_in.getToken(1, '"'));
+ rText_inout[sLang] = sText;
+ }
}
}
commit 8ca8ea20e0aeeb26f085cbf331bf92003e1e9648
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Wed Oct 3 10:25:46 2012 +0200
Correct ulfex to ignore comments
Change-Id: I50e41a3946ff885783006018f7b6ff2945cc7dfc
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 264b50c..fcab696 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -232,7 +232,7 @@ sal_Bool LngParser::Merge(
{
sal_Int32 n = 0;
rtl::OString sLang(sLine.getToken(0, '=', n));
- if (n == -1)
+ if (n == -1 || static_cast<bool>(sLine.match("/*")))
{
++nPos;
}
More information about the Libreoffice-commits
mailing list