summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-07 09:47:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-07 10:43:55 +0100
commit35dce8716bcc60b967e704564a30e2110167ad58 (patch)
treed918e715c084bf9c411de50e4f33d6447f7fa088 /svtools
parentd7ff853a5d568bf61e06c3b3d4ccacc34a3379e6 (diff)
for 0 len arg, the source might as well be nullptr for these flushing cases
Change-Id: I59a3c04d0cbeb92cd0d9348c2ed0cf65cb5683d4
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/svhtml/htmlout.cxx7
1 files changed, 3 insertions, 4 deletions
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" );