From f21a2374dc623604d26cec5ec3d5a8f7a8958b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolnai=20Tam=C3=A1s?= Date: Sat, 25 May 2013 22:23:57 +0200 Subject: [PATCH] Fix some escaping bug in l10ntools 1. A typo in export.cxx makes not working replacing 2. EscapeAll() ignored single backlash characters Change-Id: I1a5309778acdd601391f643ebf3c66d04a6601d4 --- l10ntools/source/export.cxx | 2 +- l10ntools/source/helper.cxx | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index 5d285ad1b370..c15d81fe22e5 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -1201,7 +1201,7 @@ void Export::ConvertMergeContent( OString &rText ) sal_Bool bNoClose = !rText.endsWith("\\\""); - rText = rText.replaceAll("\\\"'","\'"); // Temporary: until PO files contain escaped single quotes + rText = rText.replaceAll("\\\'","\'"); // Temporary: until PO files contain escaped single quotes // (Maybe next PO update solve this) rText = helper::escapeAll( diff --git a/l10ntools/source/helper.cxx b/l10ntools/source/helper.cxx index 6c3a04559078..85bfe4a17f96 100644 --- a/l10ntools/source/helper.cxx +++ b/l10ntools/source/helper.cxx @@ -46,6 +46,10 @@ OString unEscapeAll( sReturn.append(rUnEscaped[nEscapedOne/2]); ++nIndex; } + else + { + sReturn.append(rText[nIndex]); + } } else sReturn.append(rText[nIndex]);