sw/source/core/table/swnewtable.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 53fd124d2488977af8536f439874a15de375dc40
Author: Justin Luth <justin_l...@sil.org>
Date:   Fri Dec 30 22:21:19 2016 +0300

    tdf#49102 - UI: remove list numbering from merged cells
    
    The hidden cells in a vertical merge retained
    their numbered list properties while the
    document was loaded (bad).  However, on closing and
    reopening, the hidden cells no longer had any
    numbering (good).
    
    This patch immediately removes the numbering,
    so that the working copy matches the saved copy.
    Now vertical merging works the same way as
    horizontal merging already worked.
    
    Change-Id: Ia37151031eab4fd57bf958e9cddf6dce06dafc3c
    Reviewed-on: https://gerrit.libreoffice.org/32518
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/sw/source/core/table/swnewtable.cxx 
b/sw/source/core/table/swnewtable.cxx
index b3278a9..d681fab 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -20,6 +20,7 @@
 #include <swtable.hxx>
 #include <tblsel.hxx>
 #include <tblrwcl.hxx>
+#include <ndtxt.hxx>
 #include <node.hxx>
 #include <UndoTable.hxx>
 #include <pam.hxx>
@@ -940,7 +941,23 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& 
rBoxes,
                     pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, 
0, 0 ) );
                 }
                 else
+                {
                     pBox->ChgFrameFormat( 
static_cast<SwTableBoxFormat*>(pNewFormat) );
+                    // remove numbering from cells that will be disabled in 
the merge
+                    if( nCurrLine )
+                    {
+                        SwPaM aPam( *pBox->GetSttNd(), 0 );
+                        aPam.GetPoint()->nNode++;
+                        SwTextNode* pNd = aPam.GetNode().GetTextNode();
+                        while( pNd )
+                        {
+                            pNd->SetCountedInList( false );
+
+                            aPam.GetPoint()->nNode++;
+                            pNd = aPam.GetNode().GetTextNode();
+                        }
+                    }
+                }
             }
         }
         if( pLastBox ) // Robust
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to