Kaydet (Commit) 7600a294 authored tarafından László Németh's avatar László Németh

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
üst e3a85e44
...@@ -818,7 +818,12 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) ...@@ -818,7 +818,12 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
{ {
if( pSrcNd && 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() ); SwPosition aDestPos( *rPaM.GetPoint() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment