diff options
author | László Németh <laszlo.nemeth@collabora.com> | 2015-03-16 11:04:46 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2015-04-06 01:40:25 +0000 |
commit | 46ed3c7fd370416186080a35e091dcbb50d533cf (patch) | |
tree | 95868283b0478819ca6e7e536bd8363faad05b8b /sw | |
parent | f6a67357ab8f827ba934eb40f79fcc58391f909a (diff) |
tdf#37156 insert table copy as nested table in non-starting cell position
Cherry-picked from 7600a2942ce2b9dac66836105bed6620d55abec2
Change-Id: I7584ed179e92abcb10ef0e3a7e4e0d30d24f86bf
Reviewed-on: https://gerrit.libreoffice.org/14879
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
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 4d059483f08b..08bf192d55ab 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -815,7 +815,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() ); |