sw/source/core/frmedt/fecopy.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 7600a2942ce2b9dac66836105bed6620d55abec2 Author: László Németh <laszlo.nem...@collabora.com> Date: Fri Mar 13 22:05:56 2015 +0100 fdo#37156 insert table copy as nested table in non-starting cell position Inserted table content overwrote full cell content, when it was inserted in the middle of a multi-paragraph table cell. Now overwriting depends from the cursor position within the cell: if the cursor is not at the beginning of the first paragraph of the cell, Writer inserts the copied table content as a nested table, instead of overwriting the cell (or also the other cells of the destination). Change-Id: I1f993cfa65cf5936da245b39108162c15b3ff571 diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index dee853a..c4e2a35 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -818,7 +818,12 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { if( pSrcNd && - 0 != ( pDestNd = GetDoc()->IsIdxInTbl( rPaM.GetPoint()->nNode ))) + 0 != ( pDestNd = GetDoc()->IsIdxInTbl( rPaM.GetPoint()->nNode )) && + // are we at the beginning of the cell? (if not, we will insert a nested table) + // first paragraph of the cell? + rPaM.GetNode().GetIndex() == rPaM.GetNode().FindTableBoxStartNode()->GetIndex()+1 && + // beginning of the paragraph? + !rPaM.GetPoint()->nContent.GetIndex()) { SwPosition aDestPos( *rPaM.GetPoint() );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits