diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 12:43:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 13:02:24 +0200 |
commit | 27be81819064cb96d98c881f45d6e3fbdf7a33d0 (patch) | |
tree | f182a2979a2c0df28f21c1fa0634d56bc772500f /sax/source | |
parent | f7ae11ce60c0d1d63e09041e621f9e95bb952847 (diff) |
loplugin:singlevalfields in l10ntools..sax
and ignore URE headers in the plugin
Change-Id: I939df744c1173cf0f67d515f6c3fb4ac4cb25588
Diffstat (limited to 'sax/source')
-rw-r--r-- | sax/source/expatwrap/xml2utf.cxx | 23 |
1 files changed, 6 insertions, 17 deletions
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: */ |