sw/source/filter/ww8/docxattributeoutput.cxx | 11 +---------- sw/source/filter/ww8/docxattributeoutput.hxx | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-)
New commits: commit 3e00b924bc0990a1321ad1071647c3e70da0839c Author: Justin Luth <[email protected]> AuthorDate: Fri Feb 6 10:15:34 2026 -0500 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Feb 9 09:54:58 2026 +0100 docx export: remove rather odd lcl_isOnelinerSdt This early SDT patch (from 2014) is just plain WRONG. The unit test from that patch still passes. It is all related to table cells, so I'm sure that later patches have solved the complication in a saner fashion. Change-Id: Ic2793c8796f122a3748f809d0876f0bc31a0c898 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198848 Tested-by: Jenkins Reviewed-by: Justin Luth <[email protected]> (cherry picked from commit df4b3e9d42b870172f33a7a00a5d55e68cdc3436) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198870 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 69ec3bc9864b..a1ec2adc56a4 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -445,12 +445,6 @@ void DocxAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 /*nScript*/ ) m_pSerializer->singleElementNS(XML_w, XML_rtl, FSNS(XML_w, XML_val), "true"); } -/// Are multiple paragraphs disallowed inside this type of SDT? -static bool lcl_isOnelinerSdt(std::u16string_view rName) -{ - return rName == u"Title" || rName == u"Subtitle" || rName == u"Company"; -} - // write a floating table directly to docx without the surrounding frame void DocxAttributeOutput::WriteFloatingTable(ww8::Frame const* pParentFrame) { @@ -615,12 +609,10 @@ sal_Int32 DocxAttributeOutput::StartParagraph(const ww8::WW8TableNodeInfo::Point } } // TODO also avoid multiline paragraphs in those SDT types for shape text - bool bOneliner = m_aParagraphSdt.m_bStartedSdt && !m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen() && lcl_isOnelinerSdt(m_aStartedParagraphSdtPrAlias); - if (bEndParaSdt || (m_aParagraphSdt.m_bStartedSdt && m_bHadSectPr) || bOneliner) + if (bEndParaSdt || (m_aParagraphSdt.m_bStartedSdt && m_bHadSectPr)) { // This is the common case: "close sdt before the current paragraph" was requested by the next paragraph. m_aParagraphSdt.EndSdtBlock(m_pSerializer); - m_aStartedParagraphSdtPrAlias.clear(); } m_bHadSectPr = false; @@ -10542,7 +10534,6 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem) const uno::Sequence<beans::PropertyValue> aGrabBagSdt = rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >(); m_aParagraphSdt.GetSdtParamsFromGrabBag(aGrabBagSdt); - m_aStartedParagraphSdtPrAlias = m_aParagraphSdt.m_aAlias; } else if (rGrabBagElement.first == "ParaCnfStyle") { diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 066b65edd4a6..98d28202a09c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -1085,9 +1085,6 @@ private: SdtBlockHelper m_aParagraphSdt; SdtBlockHelper m_aRunSdt; - /// Same as m_aParagraphSdtPrAlias, but its content is available till the SDT is closed. - OUString m_aStartedParagraphSdtPrAlias; - std::vector<std::map<SvxBoxItemLine, css::table::BorderLine2>> m_aTableStyleConfs; std::optional<SwLineBreakClear> m_oLineBreakClear;
