diff options
author | László Németh <laszlo.nemeth@collabora.com> | 2015-03-16 11:04:46 +0100 |
---|---|---|
committer | László Németh <laszlo.nemeth@collabora.com> | 2015-03-16 11:14:48 +0100 |
commit | 90e12e00da614311620b36973aca5d5f4c78516e (patch) | |
tree | b7db7f8570ed774fd0c88b35ff83dc297c5fa357 /sw | |
parent | b60635df9cccd0472450d79af4f8e36bddf29ff4 (diff) |
fdo#37156 insert table copy as nested table in non-starting cell position
Cherry-picked from 7600a2942ce2b9dac66836105bed6620d55abec2
Change-Id: I7584ed179e92abcb10ef0e3a7e4e0d30d24f86bf
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/frmedt/fecopy.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index cd6abb8211a7..b9c6f8fe0d48 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -813,7 +813,12 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) FOREACHPAM_START(GetCrsr()) if( pSrcNd && - 0 != ( pDestNd = GetDoc()->IsIdxInTbl( PCURCRSR->GetPoint()->nNode ))) + 0 != ( pDestNd = GetDoc()->IsIdxInTbl( PCURCRSR->GetPoint()->nNode )) && + // are we at the beginning of the cell? (if not, we will insert a nested table) + // first paragraph of the cell? + PCURCRSR->GetNode().GetIndex() == PCURCRSR->GetNode().FindTableBoxStartNode()->GetIndex()+1 && + // beginning of the paragraph? + !PCURCRSR->GetPoint()->nContent.GetIndex()) { SwPosition aDestPos( *PCURCRSR->GetPoint() ); |