summaryrefslogtreecommitdiff
path: root/l10ntools/source/cfgmerge.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools/source/cfgmerge.cxx')
-rw-r--r--l10ntools/source/cfgmerge.cxx32
1 files changed, 3 insertions, 29 deletions
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 695620004e5e..fd9474a184ce 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -27,6 +27,7 @@
#include "boost/scoped_ptr.hpp"
#include "rtl/strbuf.hxx"
+#include "helper.hxx"
#include "export.hxx"
#include "cfgmerge.hxx"
#include "tokens.h"
@@ -136,33 +137,6 @@ static OString lcl_QuoteHTML( const OString& rString )
return sReturn.makeStringAndClear();
}
-static OString lcl_UnquoteHTML( const OString& rString )
-{
- rtl::OStringBuffer sReturn;
- for (sal_Int32 i = 0; i != rString.getLength();) {
- if (rString.match("&", i)) {
- sReturn.append('&');
- i += RTL_CONSTASCII_LENGTH("&");
- } else if (rString.match("<", i)) {
- sReturn.append('<');
- i += RTL_CONSTASCII_LENGTH("&lt;");
- } else if (rString.match("&gt;", i)) {
- sReturn.append('>');
- i += RTL_CONSTASCII_LENGTH("&gt;");
- } else if (rString.match("&quot;", i)) {
- sReturn.append('"');
- i += RTL_CONSTASCII_LENGTH("&quot;");
- } else if (rString.match("&apos;", i)) {
- sReturn.append('\'');
- i += RTL_CONSTASCII_LENGTH("&apos;");
- } else {
- sReturn.append(rString[i]);
- ++i;
- }
- }
- return sReturn.makeStringAndClear();
-}
-
} // anonymous namespace
//
@@ -489,7 +463,7 @@ void CfgExport::WorkOnResourceEnd()
if ( sText.isEmpty())
sText = sFallback;
- sText = lcl_UnquoteHTML( sText );
+ sText = helper::UnQuotHTML( sText );
common::writePoEntry(
"Cfgex", pOutputStream, sPath, pStackData->sResTyp,
@@ -504,7 +478,7 @@ void CfgExport::WorkOnText(
const rtl::OString &rIsoLang
)
{
- if( rIsoLang.getLength() ) rText = lcl_UnquoteHTML( rText );
+ if( rIsoLang.getLength() ) rText = helper::UnQuotHTML( rText );
}