I think the reason for fdo58189 is that the lcl_GetOutlineKey-function
checks the position against 0 whereas the key-finding lines in ::Collapse
and ::Expand (for example lines 1459 or 1479 in content.cxx)  dont.

Ulrich
From c08340403e551499fc4282d28805af5b2ae384d2 Mon Sep 17 00:00:00 2001
From: Ulrich Kitzinger <ulrich.kitzin...@hotmail.de>
Date: Mon, 18 Aug 2014 23:01:05 +0200
Subject: [PATCH] fdo#58189: Wrong DnD move to first node

During DnD, the target of the dropped node is wrong when dropping after the first node. That's because no key is calculated for position 0 (= t
he first node).

Change-Id: I5141efbffb690b940c73887c208400545470a36e
---
 sw/source/uibase/utlui/content.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index eb2889c..aef2970 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1078,10 +1078,9 @@ static void* lcl_GetOutlineKey( SwContentTree* pTree, SwOutlineContent* pContent
     {
         SwWrtShell* pShell = pTree->GetWrtShell();
         sal_Int32 nPos = pContent->GetYPos();
-        if( nPos )
-        {
-            key = (void*)pShell->getIDocumentOutlineNodesAccess()->getOutlineNode( nPos );
-        }
+
+        key = (void*)pShell->getIDocumentOutlineNodesAccess()->getOutlineNode( nPos );
+
     }
     return key;
 }
-- 
1.7.9.5

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to