sw/source/writerfilter/dmapper/DomainMapper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 62d3d4448e3e1ccf1db002d49439e51b93bbc598 Author: Justin Luth <[email protected]> AuthorDate: Fri Feb 20 09:32:23 2026 -0500 Commit: Miklos Vajna <[email protected]> CommitDate: Tue Feb 24 09:34:12 2026 +0100 RunSDT: SetSdtType AFTER it might be cleared During the cleanup of some outstanding text, a content control might be created. At the end of that process, it clear()s m_pSdtHelper so clearly setting m_pSdtHelper variables should come at the end of that cleanup. Right? This change was triggered by sdt-run-in-para.docx and the assert I added to PopSdt's assert(m_pSdtHelper->GetSdtType() == NS_ooxml::LN_CT_SdtRun_sdtContent) Change-Id: If3458fc8255c328bb3921093c10d6521ee94f930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199905 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Justin Luth <[email protected]> diff --git a/sw/source/writerfilter/dmapper/DomainMapper.cxx b/sw/source/writerfilter/dmapper/DomainMapper.cxx index 64c5584cf5c6..4e79ca162655 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper.cxx @@ -1267,8 +1267,6 @@ void DomainMapper::lcl_attribute(Id nName, const Value & val) case NS_ooxml::LN_CT_SdtBlock_sdtContent: case NS_ooxml::LN_CT_SdtRun_sdtContent: { - m_pImpl->m_pSdtHelper->SetSdtType(nName); - if (m_pImpl->m_pSdtHelper->getControlType() == SdtControlType::unknown) { // Still not determined content type? and it is even not unsupported? Then it is plain text field @@ -1330,10 +1328,12 @@ void DomainMapper::lcl_attribute(Id nName, const Value & val) m_pImpl->clearDeferredBreaks(); } + m_pImpl->m_pSdtHelper->SetSdtType(nName); m_pImpl->m_pSdtHelper->setControlType(SdtControlType::richText); m_pImpl->PushSdt(); break; } + m_pImpl->m_pSdtHelper->SetSdtType(nName); m_pImpl->SetSdt(true); } break;
