sw/source/filter/ww8/rtfattributeoutput.cxx |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 60d2b60c12c4a1e1075ec93f2b6fae7eb0fad0e3
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Dec 2 11:48:55 2024 +0000
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Dec 3 08:54:21 2024 +0100

    crashtesting: failure to import rtf output of forum-en-44797.odt
    
    field text ended in \ so next } was escaped
    
    Change-Id: I2129f410a1d1c3d507a223c3576f02b78f7aac63
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177683
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 5d50496eda59..f39492693c58 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2398,8 +2398,9 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const 
ww8::Frame& rFrame, const Poi
                                 
m_aRun->append(msfilter::rtfutil::OutHex(*pStr, 2));
                             m_aRun->append('}');
                             m_aRun->append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT 
" ");
-                            xPropSet->getPropertyValue("Text") >>= aTmp;
-                            m_aRun->append(OUStringToOString(aTmp, 
m_rExport.GetCurrentEncoding()));
+                            xPropSet->getPropertyValue(u"Text"_ustr) >>= aTmp;
+                            m_aRun->append(
+                                msfilter::rtfutil::OutString(aTmp, 
m_rExport.GetCurrentEncoding()));
                             m_aRun->append('}');
                             m_aRun->append(
                                 "{" OOO_STRING_SVTOOLS_RTF_IGNORE 
OOO_STRING_SVTOOLS_RTF_FORMFIELD
@@ -2411,8 +2412,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const 
ww8::Frame& rFrame, const Poi
                                 
m_aRun->append(OOO_STRING_SVTOOLS_RTF_FFOWNHELP);
                                 m_aRun->append("{" 
OOO_STRING_SVTOOLS_RTF_IGNORE
                                                    
OOO_STRING_SVTOOLS_RTF_FFHELPTEXT " ");
-                                m_aRun->append(
-                                    OUStringToOString(aTmp, 
m_rExport.GetCurrentEncoding()));
+                                m_aRun->append(msfilter::rtfutil::OutString(
+                                    aTmp, m_rExport.GetCurrentEncoding()));
                                 m_aRun->append('}');
                             }
 
@@ -2423,8 +2424,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const 
ww8::Frame& rFrame, const Poi
                                 
m_aRun->append(OOO_STRING_SVTOOLS_RTF_FFOWNSTAT);
                                 m_aRun->append("{" 
OOO_STRING_SVTOOLS_RTF_IGNORE
                                                    
OOO_STRING_SVTOOLS_RTF_FFSTATTEXT " ");
-                                m_aRun->append(
-                                    OUStringToOString(aTmp, 
m_rExport.GetCurrentEncoding()));
+                                m_aRun->append(msfilter::rtfutil::OutString(
+                                    aTmp, m_rExport.GetCurrentEncoding()));
                                 m_aRun->append('}');
                             }
                             m_aRun->append("}");

Reply via email to