sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e5e7e5c6d06b7af19f4ff7c2d76ff87b1e8a288e
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Mon Feb 24 22:30:55 2025 +0100
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Tue Feb 25 14:18:49 2025 +0100

    tdf#164878 sw inline heading: skip non-text content, i.e. formula
    
    Formulae with style separator lost their centered position because
    of the newly introduced Inline Heading frame around the object.
    Limit Inline Heading frames only for paragraphs with text content.
    
    Regression from commit 49765a9e7be41d4908729ff7d838755276b244cb
    "tdf#48459 tdf#131728 sw inline heading: new frame style: fix DOCX export".
    
    Change-Id: Ibabc0e045045f96dbbe8cfb31f9ce319189ee72a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182127
    Tested-by: László Németh <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>

diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index eb0761c75deb..8e04f5b259ed 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -2789,7 +2789,9 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
                     // a frame to get inline paragraphs, keeping also the 
table of content support
                     // FIXME: overwrite the non-character styles of the 
paragraph style
                     // with the settings of the next paragraph style, like MSO 
does
-                    if ( m_StreamStateStack.top().bIsInlineParagraph && 
!m_StreamStateStack.top().bIsPreviousInlineParagraph )
+                    if ( m_StreamStateStack.top().bIsInlineParagraph && 
!m_StreamStateStack.top().bIsPreviousInlineParagraph &&
+                            // tdf#164878 skip empty paragraphs, i.e. math 
formula and other objects
+                            m_StreamStateStack.top().bParaChanged )
                     {
                         uno::Reference<text::XParagraphCursor> xParaCursor(
                             
xTextAppend->createTextCursorByRange(xTextAppend->getEnd()), 
uno::UNO_QUERY_THROW);

Reply via email to