diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-03-07 16:13:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-03-13 17:22:58 +0100 |
commit | a6cb747bab83c363d9683e19a71b2f18e37a5838 (patch) | |
tree | 14b9635cbd344c39b92450c73378cb74d6760712 /sd | |
parent | 4a2f9d488326fcbaa2cda4ebe66e060a3c3e3350 (diff) |
no need to use strlen here
we know the size of the buffer
Change-Id: I20c99cd55e8af842dd8e70d8ec39550fd8e7c7f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164770
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 07126c6c59bf..5582a415c1d0 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -378,9 +378,7 @@ OUString StringToHTMLString( std::u16string_view rString ) { SvMemoryStream aMemStm; HTMLOutFuncs::Out_String( aMemStm, rString ); - aMemStm.WriteChar( char(0) ); - sal_Int32 nLength = strlen(static_cast<char const *>(aMemStm.GetData())); - return OUString( static_cast<char const *>(aMemStm.GetData()), nLength, RTL_TEXTENCODING_UTF8 ); + return OUString( static_cast<char const *>(aMemStm.GetData()), aMemStm.GetSize(), RTL_TEXTENCODING_UTF8 ); } // converts a paragraph of the outliner to html |