summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-15 12:43:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-15 13:02:24 +0200
commit27be81819064cb96d98c881f45d6e3fbdf7a33d0 (patch)
treef182a2979a2c0df28f21c1fa0634d56bc772500f /sax
parentf7ae11ce60c0d1d63e09041e621f9e95bb952847 (diff)
loplugin:singlevalfields in l10ntools..sax
and ignore URE headers in the plugin Change-Id: I939df744c1173cf0f67d515f6c3fb4ac4cb25588
Diffstat (limited to 'sax')
-rw-r--r--sax/inc/xml2utf.hxx5
-rw-r--r--sax/source/expatwrap/xml2utf.cxx23
2 files changed, 6 insertions, 22 deletions
diff --git a/sax/inc/xml2utf.hxx b/sax/inc/xml2utf.hxx
index 25245b2a803a..c001518419d6 100644
--- a/sax/inc/xml2utf.hxx
+++ b/sax/inc/xml2utf.hxx
@@ -57,15 +57,10 @@ public:
~Unicode2TextConverter();
css::uno::Sequence<sal_Int8> convert( const sal_Unicode * , sal_Int32 nLength );
- bool canContinue() { return m_bCanContinue; }
private:
- void init( rtl_TextEncoding encoding );
-
rtl_UnicodeToTextConverter m_convUnicode2Text;
rtl_UnicodeToTextContext m_contextUnicode2Text;
- bool m_bCanContinue;
- bool m_bInitialized;
rtl_TextEncoding m_rtlEncoding;
css::uno::Sequence<sal_Unicode> m_seqSource;
};
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index 0c3e96564ab7..361e02fc99b0 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -92,7 +92,7 @@ sal_Int32 XMLFile2UTFConverter::readAndConvert( Sequence<sal_Int8> &seq , sal_In
// do the encoding
if( m_pText2Unicode && m_pUnicode2Text &&
- m_pText2Unicode->canContinue() && m_pUnicode2Text->canContinue() ) {
+ m_pText2Unicode->canContinue() ) {
Sequence<sal_Unicode> seqUnicode = m_pText2Unicode->convert( seq );
seq = m_pUnicode2Text->convert( seqUnicode.getConstArray(), seqUnicode.getLength() );
@@ -447,16 +447,16 @@ Sequence<sal_Unicode> Text2UnicodeConverter::convert( const Sequence<sal_Int8> &
Unicode2TextConverter::Unicode2TextConverter( rtl_TextEncoding encoding )
{
- init( encoding );
+ m_convUnicode2Text = rtl_createUnicodeToTextConverter( encoding );
+ m_contextUnicode2Text = rtl_createUnicodeToTextContext( m_convUnicode2Text );
+ m_rtlEncoding = encoding;
}
Unicode2TextConverter::~Unicode2TextConverter()
{
- if( m_bInitialized ) {
- rtl_destroyUnicodeToTextContext( m_convUnicode2Text , m_contextUnicode2Text );
- rtl_destroyUnicodeToTextConverter( m_convUnicode2Text );
- }
+ rtl_destroyUnicodeToTextContext( m_convUnicode2Text , m_contextUnicode2Text );
+ rtl_destroyUnicodeToTextConverter( m_convUnicode2Text );
}
@@ -536,17 +536,6 @@ Sequence<sal_Int8> Unicode2TextConverter::convert(const sal_Unicode *puSource ,
return seqText;
}
-void Unicode2TextConverter::init( rtl_TextEncoding encoding )
-{
- m_bCanContinue = true;
- m_bInitialized = true;
-
- m_convUnicode2Text = rtl_createUnicodeToTextConverter( encoding );
- m_contextUnicode2Text = rtl_createUnicodeToTextContext( m_convUnicode2Text );
- m_rtlEncoding = encoding;
-};
-
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */