summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmltabw.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-10 11:54:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-10 18:50:52 +0200
commit241bee7e4be6a205fae0d3f5508e084462c7ca55 (patch)
tree7d8771a5cbbe7021106852f1a54496faeea6ad4e /sw/source/filter/html/htmltabw.cxx
parent36567d58115e21c111b45c011524ddbae540fd91 (diff)
convert WriteCharPtr..getStr to WriteOString
and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/html/htmltabw.cxx')
-rw-r--r--sw/source/filter/html/htmltabw.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 30a07fa45782..da33a4bbb6eb 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -402,7 +402,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
}
}
- rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
rWrt.m_bTextAttr = false;
rWrt.m_bOutOpts = true;
@@ -450,7 +450,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
&rWrt.m_aNonConvertableCharacters));
}
sOut.append('>');
- rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
rWrt.m_bLFPossible = true;
rWrt.IncIndentLevel(); // indent the content of <TD>...</TD>
@@ -538,7 +538,7 @@ void SwHTMLWrtTable::OutTableCells( SwHTMLWriter& rWrt,
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_valign)
.append("=\"").append(text::VertOrientation::TOP==eRowVertOri ? OOO_STRING_SVTOOLS_HTML_VA_top : OOO_STRING_SVTOOLS_HTML_VA_bottom)
.append("\"");
- rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
}
rWrt.Strm().WriteChar( '>' );
@@ -612,7 +612,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
rWrt.m_nDirection = rWrt.GetHTMLDirection( pFrameFormat->GetAttrSet() );
if( rWrt.m_bOutFlyFrame || nOldDirection != rWrt.m_nDirection )
{
- rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
rWrt.OutDirection( rWrt.m_nDirection );
}
@@ -688,7 +688,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellspacing).
append("=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(m_nCellSpacing,false))).append("\"");
- rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
// output background
if( pFrameFormat )
@@ -700,7 +700,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
}
sOut.append('>');
- rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
rWrt.IncIndentLevel(); // indent content of table