From 186ef501a305d452da1f36aa51106dba181dc324 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 13 Jan 2020 17:07:34 +0100 Subject: [PATCH] sw reqif-xhtml export: fix non-well-formed output on Chinese text And also search for the '"<" OOO_something' pattern, and fix up all cases where we forgot to call GetNamespace() when opening an element. Change-Id: I015e807c1ad0f96c7c4aaa97f7f61ae134cf3754 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86701 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- .../extras/htmlexport/data/reqif-chinese.odt | Bin 0 -> 8350 bytes sw/qa/extras/htmlexport/htmlexport.cxx | 22 ++++++++++++++++++ sw/source/filter/html/htmlatr.cxx | 10 ++++---- sw/source/filter/html/htmlbas.cxx | 4 ++-- sw/source/filter/html/htmlfldw.cxx | 5 ++-- sw/source/filter/html/htmlflywriter.cxx | 2 +- sw/source/filter/html/htmlforw.cxx | 6 ++--- sw/source/filter/html/htmlftn.cxx | 4 ++-- sw/source/filter/html/wrthtml.cxx | 4 ++-- sw/source/filter/html/wrthtml.hxx | 2 +- 10 files changed, 40 insertions(+), 19 deletions(-) create mode 100644 sw/qa/extras/htmlexport/data/reqif-chinese.odt diff --git a/sw/qa/extras/htmlexport/data/reqif-chinese.odt b/sw/qa/extras/htmlexport/data/reqif-chinese.odt new file mode 100644 index 0000000000000000000000000000000000000000..b99c57caee10cb7f05fd187cafc6740bff399bf2 GIT binary patch literal 8350 zcmdT}by$?!w;mc4q(K_#PHCks#yHs)|U+1ONa!0Pw_#UDdFQ2a^#10Q@NMp8&QXTOicU z9%y234+fc;KtXm8&KD4K4m%SkkQ0ZUJrH7UXXb1Rgg`lmGP11EEWx`BaC9Im$DJzc%1pvdv< zXpO2Y=YdQZOBng7p*acJnqi5Sz>(-sY1>wCRQsuSSDEUktq}8ynU2?=pYs|j2PvB_ zi?3r8#;5A#_)QwS(dM&vNA=kTDAH83EPP4QSe&!%Y2>><6PW^Y+y@Vm4Y8N8FnHF5 zFCmOxx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3f$%WF~NUo&?mraSIs;E+hXDKz6pcJ%UkQ3A@{?~iSMf42*i7}*) zrei^qS7-GC?0P0sQ1>>UI6~`WczyZm74)z-fW0$EPU+ReJS6e+$0VJ(j3Xs9Ez767$TxWzQcN( z8e9oFZ4q0h4~{-|Ax%lBV{XfodxXy(3x!pJ*i*sGKyp=A{)V@#Y`kLR6_*k~Fy2FU zx0Y)Je}{ZD?sei?0&!A{>(8S?)Fh>*C*vj(=wPd0bC^!}3oN@@Jl3Wysr^ z_JQ;KNtFDtp(&Am9G~9_W`Bf4tyM{qA2I>c0R6q?^V7 literal 0 HcmV?d00001 diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index c2ef9bc7961b..0bf573039813 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -761,6 +761,28 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testRTFOLEMimeType) aType); } +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testChinese) +{ + // Load a document with Chinese text in it. + OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "reqif-chinese.odt"; + mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", {}); + + // Export it. + uno::Reference xStorable(mxComponent, uno::UNO_QUERY); + uno::Sequence aStoreProperties = { + comphelper::makePropertyValue("FilterName", OUString("HTML (StarWriter)")), + comphelper::makePropertyValue("FilterOptions", OUString("xhtmlns=reqif-xhtml")), + }; + xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties); + SvMemoryStream aStream; + HtmlExportTest::wrapFragment(maTempFile, aStream); + xmlDocPtr pDoc = parseXmlStream(&aStream); + + // Without the accompanying fix in place, this test would have failed as the output was not + // well-formed. + CPPUNIT_ASSERT(pDoc); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 7c1258ae90bd..8b501b0e894f 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -781,7 +781,7 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, // The align=... attribute does behave strange in netscape // if there are controls in a paragraph, because the control and // all text behind the control does not recognize this attribute. - OString sOut = "<" OOO_STRING_SVTOOLS_HTML_division; + OString sOut = "<" + rHWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_division; rWrt.Strm().WriteOString( sOut ); rHWrt.m_bTextAttr = false; @@ -2648,7 +2648,7 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt ) } else { - OString sOut = "<" OOO_STRING_SVTOOLS_HTML_font " " + OString sOut = "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_font " " OOO_STRING_SVTOOLS_HTML_O_color "="; rWrt.Strm().WriteOString( sOut ); HTMLOutFuncs::Out_Color( rWrt.Strm(), aColor ).WriteChar( '>' ); @@ -2708,7 +2708,7 @@ static Writer& OutHTML_SvxFont( Writer& rWrt, const SfxPoolItem& rHt ) } else { - OString sOut = "<" OOO_STRING_SVTOOLS_HTML_font " " + OString sOut = "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_font " " OOO_STRING_SVTOOLS_HTML_O_face "=\""; rWrt.Strm().WriteOString( sOut ); HTMLOutFuncs::Out_String( rWrt.Strm(), aNames, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters ) @@ -2748,7 +2748,7 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt ) } else { - OString sOut = "<" OOO_STRING_SVTOOLS_HTML_font; + OString sOut = "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_font; sal_uInt32 nHeight = static_cast(rHt).GetHeight(); sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight ); @@ -2788,7 +2788,7 @@ static Writer& OutHTML_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt ) if( rHTMLWrt.m_bTagOn ) { - OString sOut = "<" OOO_STRING_SVTOOLS_HTML_span; + OString sOut = "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_span; rWrt.Strm().WriteOString( sOut ); rHTMLWrt.OutLanguage( static_cast(rHt).GetLanguage() ); rWrt.Strm().WriteChar( '>' ); diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 4e3a2d40b1ea..d42f6f90a872 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -245,7 +245,7 @@ void SwHTMLParser::InsertBasicDocEvent( const OUString& aEvent, const OUString& pDocSh ); } -void SwHTMLWriter::OutBasic() +void SwHTMLWriter::OutBasic(SwHTMLWriter & rHTMLWrt) { #if HAVE_FEATURE_SCRIPTING if( !m_bCfgStarBasic ) @@ -274,7 +274,7 @@ void SwHTMLWriter::OutBasic() bFirst = false; OutNewLine(); OString sOut = - "<" OOO_STRING_SVTOOLS_HTML_meta + "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_meta " " OOO_STRING_SVTOOLS_HTML_O_httpequiv "=\"" OOO_STRING_SVTOOLS_HTML_META_content_script_type diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 33014b6dddef..ee67b6f08374 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -442,6 +442,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField, Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt ) { + SwHTMLWriter& rHTMLWrt = static_cast(rWrt); const SwFormatField & rField = static_cast(rHt); const SwField* pField = rField.GetField(); const SwFieldType* pFieldTyp = pField->GetTyp(); @@ -509,7 +510,7 @@ Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt ) OUString sComment(convertLineEnd(rComment, GetSystemLineEnd())); // TODO: ??? OString sOut = - "<" OOO_STRING_SVTOOLS_HTML_comment + "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_comment " " + OUStringToOString(sComment, static_cast(rWrt).m_eDestEnc) + " -->"; @@ -518,7 +519,6 @@ Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt ) } else if( SwFieldIds::Script == pFieldTyp->Which() ) { - SwHTMLWriter& rHTMLWrt = static_cast(rWrt); if( rHTMLWrt.m_bLFPossible ) rHTMLWrt.OutNewLine( true ); @@ -544,7 +544,6 @@ Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt ) OSL_ENSURE( pTextField, "Where is the txt fld?" ); if( pTextField ) { - SwHTMLWriter& rHTMLWrt = static_cast(rWrt); // ReqIF-XHTML doesn't allow specifying a background color. bool bFieldShadings = SwViewOption::IsFieldShadings() && !rHTMLWrt.mbReqIF; if (bFieldShadings) diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 93c948f76013..424b902a644c 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -1657,7 +1657,7 @@ static Writer& OutHTML_FrameFormatAsSpacer( Writer& rWrt, const SwFrameFormat& r rHTMLWrt.OutNewLine( true ); OString sOut = - "<" OOO_STRING_SVTOOLS_HTML_spacer " " + "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_spacer " " OOO_STRING_SVTOOLS_HTML_O_type "=\"" OOO_STRING_SVTOOLS_HTML_SPTYPE_block "\""; rWrt.Strm().WriteOString( sOut ); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 4b00a5b57705..4431234b8015 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -444,7 +444,7 @@ void SwHTMLWriter::OutForm( bool bOn, // the new form is opened if( m_bLFPossible ) OutNewLine(); - OString sOut = "<" OOO_STRING_SVTOOLS_HTML_form; + OString sOut = "<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_form; uno::Reference< beans::XPropertySet > xFormPropSet( rFormComps, uno::UNO_QUERY ); @@ -573,7 +573,7 @@ void SwHTMLWriter::OutHiddenControls( { if( m_bLFPossible ) OutNewLine( true ); - OString sOut = "<" OOO_STRING_SVTOOLS_HTML_input " " + OString sOut = "<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_input " " OOO_STRING_SVTOOLS_HTML_O_type "=\"" OOO_STRING_SVTOOLS_HTML_IT_hidden "\""; @@ -1200,7 +1200,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, nSel++; rHTMLWrt.OutNewLine(); // every Option gets its own line - sOut = "<" OOO_STRING_SVTOOLS_HTML_option; + sOut = "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_option; if( !sVal.isEmpty() || bEmptyVal ) { sOut += " " OOO_STRING_SVTOOLS_HTML_O_value "=\""; diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index a55b3801cc01..1d628ef49c88 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -327,7 +327,7 @@ void SwHTMLWriter::OutFootEndNotes() if( m_bLFPossible ) OutNewLine(); OString sOut = - "<" OOO_STRING_SVTOOLS_HTML_division + "<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_division " " OOO_STRING_SVTOOLS_HTML_O_id "=\""; Strm().WriteOString( sOut ); HTMLOutFuncs::Out_String( Strm(), sFootnoteName, m_eDestEnc, &m_aNonConvertableCharacters ); @@ -504,7 +504,7 @@ static void lcl_html_outFootEndNoteInfo( Writer& rWrt, OUString const *pParts, rHTMLWrt.OutNewLine(); OString sOut = - "<" OOO_STRING_SVTOOLS_HTML_meta " " + "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_meta " " OOO_STRING_SVTOOLS_HTML_O_name "=\"" + rtl::OStringView(pName) + "\" " OOO_STRING_SVTOOLS_HTML_O_content "=\""; rWrt.Strm().WriteOString( sOut ); diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 91dc026ba61a..0aae69b16f93 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -418,7 +418,7 @@ ErrCode SwHTMLWriter::WriteStream() &m_aNonConvertableCharacters ); aStartTags = - "<" OOO_STRING_SVTOOLS_HTML_division + "<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_division " " OOO_STRING_SVTOOLS_HTML_O_id "=\"" + aName + "\">" + aStartTags; @@ -1053,7 +1053,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) // and now ... the BASIC and JavaScript! if( m_pDoc->GetDocShell() ) // only with DocShell BASIC is possible - OutBasic(); + OutBasic(*this); DecIndentLevel(); // indent content of OutNewLine(); diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 27304b8705da..0f773901aa33 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -445,7 +445,7 @@ public: void OutFootEndNoteSym( const SwFormatFootnote& rFormatFootnote, const OUString& rNum, sal_uInt16 nScript ); - void OutBasic(); + void OutBasic(SwHTMLWriter& rHTMLWrt); void OutAndSetDefList( sal_uInt16 nNewLvl );