crashtesting: assert on exporting fdo48097-1.doc to docx

noticeable since:

commit ad4b72a0eacf6bb6887236ea3a3807b1264de822
Date:   Thu Mar 21 12:10:40 2024 +0100

    tdf#160301 import DOCVARIABLE fields as user fields

but not really caused by it

Change-Id: I44910756df3938829589f230716363beaf0f4f91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166023
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f50e8d5..a329b73 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -32,6 +32,7 @@
#include <i18nlangtag/languagetag.hxx>

#include <comphelper/configuration.hxx>
#include <comphelper/string.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx>
#include <rtl/random.h>
@@ -4820,7 +4821,8 @@ void SwWW8ImplReader::ReadDocVars()
            OUString value = aDocValueStrings[i];
            value = value.replaceAll("\r\n", "\n");
            value = value.replaceAll("\r", "\n");
            aValue <<= value;
            // fdo48097-1.doc is an example of a case needing sanitizeStringSurrogates
            aValue <<= comphelper::string::sanitizeStringSurrogates(value);
        }

        uno::Reference< beans::XPropertySet > xMaster;