sw/source/writerfilter/dmapper/DomainMapper.cxx |   15 +--------------
 sw/source/writerfilter/dmapper/DomainMapper.hxx |    1 -
 2 files changed, 1 insertion(+), 15 deletions(-)

New commits:
commit b1c31e6a44b5dc564a9a34c95ee6d7e194c23814
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Tue Jul 29 18:13:32 2025 -0400
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Thu Jul 31 01:59:33 2025 +0200

    related tdf#166553 writerfilter: remove column-only mbIsSplitPara
    
    It seems pointless to have a separate mbIsSplitPara
    just for column breaks, when there is also a shared
    m_pImpl->m_bIsSplitPara.
    
    I'm sure the issues for breaking a paragraph in the middle
    for a column break are the same as for a page break,
    so the two cases shouldn't have to be handled separately.
    
    DomainMapper_Impl::PushProperties now has special handling
    for     (CONTEXT_PARAGRAPH && m_bIsSplitPara)
    so it doesn't seem necessary to avoid that call for columns.
    Plus, PushProperties was almost always called anyway
    because usually CONTEXT_CHARACTER is at the top of the stack.
    
    So lets just drop the earlier, column-only mbIsSplitPara,
    since having two separate-but-similar flags just causes confusion.
    
    The original commit's unit test is still OK.
    mbIsSplitPara: added by 0c61ffc15ecd8122cb9102d2591561e1d4e37327
    Author: Vinaya Mandke <vinaya.man...@synerzip.com>
    on Thu Dec 5 18:22:56 2013 +0530
      Fix for Column Break if it appears in w:r which is not the first run
    
    m_bIsSplitPara: added later by 61e8452c62a587b40bf80076642b869cbd1b7ed6
    Author: sushil_shinde <sushil.shi...@synerzip.com>
    on Mon Apr 28 17:10:27 2014 +0530
      fdo#77727 PAGEBREAK In first paragraph was not rendered and exported
    
    Change-Id: I164baedf012370b558c52b3a5b6c65e1316ea850
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188565
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/writerfilter/dmapper/DomainMapper.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper.cxx
index ba397f7a9cec..38bcbaca760d 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper.cxx
@@ -120,7 +120,6 @@ DomainMapper::DomainMapper( const uno::Reference< 
uno::XComponentContext >& xCon
     LoggedTable("DomainMapper"),
     LoggedStream("DomainMapper"),
     m_pImpl(new DomainMapper_Impl(*this, xContext, xModel, eDocumentType, 
rMediaDesc)),
-    mbIsSplitPara(false),
     mbHasControls(false),
     mbWasShapeInPara(false)
 {
@@ -1200,7 +1199,6 @@ void DomainMapper::lcl_attribute(Id nName, const Value & 
val)
                 {
                     if (m_pImpl->GetIsFirstParagraphInSection() || 
!m_pImpl->IsFirstRun())
                     {
-                        mbIsSplitPara = true;
                         m_pImpl->m_bIsSplitPara = true;
                         finishParagraph();
                         lcl_startParagraphGroup();
@@ -3890,16 +3888,7 @@ void DomainMapper::lcl_startParagraphGroup()
 
     const bool bIsSplitPara = m_pImpl->m_bIsSplitPara; // preserve flag reset 
by PushProperties
 
-    /*
-     * Add new para properties only if paragraph is not split
-     * or the top context is not of paragraph properties
-     * Set mbIsSplitPara to false as it has been handled
-     */
-    if (!mbIsSplitPara)
-        m_pImpl->PushProperties(CONTEXT_PARAGRAPH);
-    mbIsSplitPara = false;
-    if (m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) != 
m_pImpl->GetTopContext())
-        m_pImpl->PushProperties(CONTEXT_PARAGRAPH);
+    m_pImpl->PushProperties(CONTEXT_PARAGRAPH);
 
     if (!m_pImpl->IsInShape() && !m_pImpl->IsInComments())
     {
@@ -4599,7 +4588,6 @@ void DomainMapper::lcl_utext(const sal_Unicode *const 
data_, size_t len)
                     assert(pContext); // can't have deferred break without
                     if ( m_pImpl->GetIsFirstParagraphInSection() || 
!m_pImpl->IsFirstRun() )
                     {
-                        mbIsSplitPara = true;
                         m_pImpl->m_bIsSplitPara = true;
                         finishParagraph();
                         lcl_startParagraphGroup();
@@ -4691,7 +4679,6 @@ void DomainMapper::lcl_utext(const sal_Unicode *const 
data_, size_t len)
                 {
                     if (m_pImpl->GetIsFirstParagraphInSection() || 
!m_pImpl->IsFirstRun() || mbWasShapeInPara)
                     {
-                        mbIsSplitPara = true;
                         m_pImpl->m_bIsSplitPara = true;
                         finishParagraph();
                         lcl_startParagraphGroup();
diff --git a/sw/source/writerfilter/dmapper/DomainMapper.hxx 
b/sw/source/writerfilter/dmapper/DomainMapper.hxx
index a431a8d876d4..0cc866205735 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper.hxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper.hxx
@@ -191,7 +191,6 @@ private:
     static OUString getBracketStringFromEnum(const sal_Int32 nIntValue, const 
bool bIsPrefix = true);
     static css::style::TabAlign getTabAlignFromValue(const sal_Int32 
nIntValue);
     static sal_Unicode getFillCharFromValue(const sal_Int32 nIntValue);
-    bool mbIsSplitPara;
     bool mbHasControls;
     bool mbWasShapeInPara;
     bool mbIsLastPara = false;

Reply via email to