From 35dce8716bcc60b967e704564a30e2110167ad58 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 7 Oct 2016 09:47:48 +0100 Subject: for 0 len arg, the source might as well be nullptr for these flushing cases Change-Id: I59a3c04d0cbeb92cd0d9348c2ed0cf65cb5683d4 --- svtools/source/svhtml/htmlout.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'svtools') diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 82e4f8cbe39d..aa30af1c6fc7 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -427,7 +427,7 @@ static OString lcl_ConvertCharToHTML( sal_Unicode c, if( pStr ) { sal_Size nLen = rtl_convertUnicodeToText( - rContext.m_hConv, rContext.m_hContext, &c, 0, + rContext.m_hConv, rContext.m_hContext, nullptr, 0, cBuffer, TXTCONV_BUFFER_SIZE, nFlags|RTL_UNICODETOTEXT_FLAGS_FLUSH, &nInfo, &nSrcChars ); @@ -457,7 +457,7 @@ static OString lcl_ConvertCharToHTML( sal_Unicode c, // entity. // coverity[callee_ptr_arith] nLen = rtl_convertUnicodeToText( - rContext.m_hConv, rContext.m_hContext, &c, 0, + rContext.m_hConv, rContext.m_hContext, nullptr, 0, cBuffer, TXTCONV_BUFFER_SIZE, nFlags|RTL_UNICODETOTEXT_FLAGS_FLUSH, &nInfo, &nSrcChars ); @@ -480,7 +480,6 @@ static OString lcl_FlushToAscii( HTMLOutContext& rContext ) { OStringBuffer aDest; - sal_Unicode c = 0; sal_Char cBuffer[TXTCONV_BUFFER_SIZE]; sal_uInt32 nInfo = 0; sal_Size nSrcChars; @@ -490,7 +489,7 @@ static OString lcl_FlushToAscii( HTMLOutContext& rContext ) RTL_UNICODETOTEXT_FLAGS_FLUSH| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR; sal_Size nLen = rtl_convertUnicodeToText( - rContext.m_hConv, rContext.m_hContext, &c, 0, + rContext.m_hConv, rContext.m_hContext, nullptr, 0, cBuffer, TXTCONV_BUFFER_SIZE, nFlags, &nInfo, &nSrcChars ); DBG_ASSERT( (nInfo & (RTL_UNICODETOTEXT_INFO_ERROR|RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL)) == 0, "HTMLOut: error while flushing" ); -- cgit