[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

László Németh laszlo.nemeth at collabora.com
Mon Mar 16 03:14:46 PDT 2015


 sw/source/core/frmedt/fecopy.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit f42608ecab31dc3d626a7b30a779b6591b1f7dd6
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Mon Mar 16 11:04:46 2015 +0100

    fdo#37156 insert table copy as nested table in non-starting cell position
    
    Cherry-picked from 7600a2942ce2b9dac66836105bed6620d55abec2
    
    Change-Id: I7584ed179e92abcb10ef0e3a7e4e0d30d24f86bf

diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 8c5b6b9..5bac3ab 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -824,7 +824,12 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_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() );
 


More information about the Libreoffice-commits mailing list