sw/source/filter/ww8/docxattributeoutput.cxx | 11 +---------- sw/source/filter/ww8/docxattributeoutput.hxx | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-)
New commits: commit df4b3e9d42b870172f33a7a00a5d55e68cdc3436 Author: Justin Luth <[email protected]> AuthorDate: Fri Feb 6 10:15:34 2026 -0500 Commit: Justin Luth <[email protected]> CommitDate: Fri Feb 6 21:23:56 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]> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 1cc8a988a113..adf613699ff6 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -448,12 +448,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) { @@ -617,12 +611,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; @@ -10545,7 +10537,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;
