summaryrefslogtreecommitdiff
path: root/sw/source/core/table
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-12-30 22:21:19 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-01-03 08:19:46 +0000
commit53fd124d2488977af8536f439874a15de375dc40 (patch)
tree0aac39c26a222ee140d974547a8d963445a8da93 /sw/source/core/table
parentbd97bca534b61ef302c606ae7452454d5e87910e (diff)
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 <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/core/table')
-rw-r--r--sw/source/core/table/swnewtable.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index b3278a9420c1..d681fab39b89 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