ooo-build r11989 - in trunk: . patches/src680



Author: jiaojh
Date: Mon Mar 24 03:30:12 2008
New Revision: 11989
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11989&view=rev

Log:
    * patches/src680/plus-minus-sw-navigator2.diff: update drag&drop
    Make drag&drop to correct target.


Modified:
   trunk/ChangeLog
   trunk/patches/src680/plus-minus-sw-navigator2.diff

Modified: trunk/patches/src680/plus-minus-sw-navigator2.diff
==============================================================================
--- trunk/patches/src680/plus-minus-sw-navigator2.diff	(original)
+++ trunk/patches/src680/plus-minus-sw-navigator2.diff	Mon Mar 24 03:30:12 2008
@@ -1,5 +1,5 @@
---- sw/source/ui/inc/conttree.hxx	2006-12-20 22:03:30.000000000 +0800
-+++ sw/source/ui/inc/conttree.hxx	2007-03-14 17:17:13.000000000 +0800
+--- sw/source/ui/inc/conttree.hxx.orig	2008-03-24 11:20:48.000000000 +0800
++++ sw/source/ui/inc/conttree.hxx	2008-03-24 11:21:23.000000000 +0800
 @@ -43,6 +43,9 @@
  #include "swcont.hxx"
  #endif
@@ -10,7 +10,7 @@
  class SwWrtShell;
  class SwContentType;
  class SwNavigationPI;
-@@ -80,6 +83,8 @@
+@@ -84,6 +87,8 @@ class SwContentTree : public SvTreeListB
  	SwWrtShell* 		pActiveShell;   // die aktive oder eine konst. offene View
  	SwNavigationConfig*	pConfig;
  
@@ -19,9 +19,63 @@
      sal_Int32           nActiveBlock;
  	USHORT				nHiddenBlock;
  	USHORT 				nRootType;
---- sw/source/ui/utlui/content.cxx	2007-02-25 14:37:53.000000000 +0800
-+++ sw/source/ui/utlui/content.cxx	2007-03-16 10:17:02.000000000 +0800
-@@ -1262,8 +1262,10 @@
+--- sw/source/ui/utlui/content.cxx.orig	2008-03-24 11:20:48.000000000 +0800
++++ sw/source/ui/utlui/content.cxx	2008-03-24 11:29:01.000000000 +0800
+@@ -1001,7 +1001,6 @@ SwContentTree::~SwContentTree()
+ /***************************************************************************
+ 	Drag&Drop methods
+ ***************************************************************************/
+-
+ void SwContentTree::StartDrag( sal_Int8 nAction, const Point& rPosPixel )
+ {
+ 	if( !bIsRoot || nRootType != CONTENT_TYPE_OUTLINE )
+@@ -1051,8 +1050,45 @@ sal_Int8 SwContentTree::AcceptDrop( cons
+ /***************************************************************************
+ 	Beschreibung:	Drop wird im Navigator ausgefuehrt
+ ***************************************************************************/
++void* lcl_GetOutlineKey( SwContentTree* pTree, SwOutlineContent* pContent)
++{
++    void* key = 0;
++    if( pTree && pContent )
++    {
++        SwWrtShell* pShell = pTree->GetWrtShell();
++        sal_Int32 nPos = pContent->GetYPos();
++        if( nPos )
++        {
++            key = (void*)pShell->GetOutlineNode( nPos );
++        }
++    }
++    return key;
++}
++
+ sal_Int8 SwContentTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
+ {
++    SvLBoxEntry* pEntry = pTargetEntry;
++    if( pEntry && ( nRootType == CONTENT_TYPE_OUTLINE ) && lcl_IsContent( pEntry ) )
++    {
++        SwOutlineContent* pOutlineContent = ( SwOutlineContent* )( pEntry->GetUserData() );
++        if( pOutlineContent )
++        {
++            void* key = lcl_GetOutlineKey(this, pOutlineContent);
++            if( !mOutLineNodeMap[key] )
++            {
++                while( pEntry->HasChilds() )
++                {
++                    SvLBoxEntry* pChildEntry = FirstChild( pEntry );
++                    while( pChildEntry )
++                    {
++                        pEntry = pChildEntry;
++                        pChildEntry = NextSibling( pChildEntry );
++                    }
++                }
++                pTargetEntry = pEntry;
++            }
++        }
++    }
+ 	if( bIsRoot )
+ 		return SvTreeListBox::ExecuteDrop( rEvt );
+ 	return bIsInDrag ? DND_ACTION_NONE : GetParentWindow()->ExecuteDrop(rEvt);
+@@ -1268,8 +1304,10 @@ void  SwContentTree::RequestingChilds( S
                          if(!sEntry.Len())
                              sEntry = sSpace;
                          if(!pChild || (nLevel == 0))
@@ -32,7 +86,7 @@
                          else
                          {
                              //back search parent.
-@@ -1314,7 +1316,8 @@
+@@ -1320,7 +1358,8 @@ void  SwContentTree::RequestingChilds( S
  
  sal_Bool  SwContentTree::Expand( SvLBoxEntry* pParent )
  {
@@ -42,7 +96,7 @@
  	{
  		if(lcl_IsContentType(pParent))
  		{
-@@ -1329,18 +1332,39 @@
+@@ -1335,18 +1374,39 @@ sal_Bool  SwContentTree::Expand( SvLBoxE
  				nHiddenBlock |= nOr;
              if((pCntType->GetType() == CONTENT_TYPE_OUTLINE))
              {
@@ -83,7 +137,7 @@
  	}
  	return SvTreeListBox::Expand(pParent);
  }
-@@ -1352,7 +1376,8 @@
+@@ -1358,7 +1418,8 @@ sal_Bool  SwContentTree::Expand( SvLBoxE
  sal_Bool  SwContentTree::Collapse( SvLBoxEntry* pParent )
  {
  	sal_Bool bRet;
@@ -93,7 +147,7 @@
  	{
  		if(lcl_IsContentType(pParent))
  		{
-@@ -1369,6 +1394,13 @@
+@@ -1375,6 +1436,13 @@ sal_Bool  SwContentTree::Collapse( SvLBo
  			else
  				nHiddenBlock &= nAnd;
  		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]