ooo-build r15329 - in trunk: . patches/dev300



Author: kyoshida
Date: Fri Feb 13 02:12:32 2009
New Revision: 15329
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15329&view=rev

Log:
2009-02-12  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/apply: added comment for the patch.
	
	* patches/dev300/calc-single-click-unselect-tabs.diff: retain current
	selection when switching from one selected tab to another selected tab,
	unless all tabs are selected. (i#70320, n#396894)


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/calc-single-click-unselect-tabs.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Feb 13 02:12:32 2009
@@ -1798,6 +1798,7 @@
 # Fix error on xls 2003 xml export (by Daniel Watson)
 filter-xls2003-xml-export-fix.diff, i#99097, kohei/danielbw
 
+# Make it easier to un-select tabs when multiple tabs are selected.
 calc-single-click-unselect-tabs.diff, i#70320, kohei/rail
 
 

Modified: trunk/patches/dev300/calc-single-click-unselect-tabs.diff
==============================================================================
--- trunk/patches/dev300/calc-single-click-unselect-tabs.diff	(original)
+++ trunk/patches/dev300/calc-single-click-unselect-tabs.diff	Fri Feb 13 02:12:32 2009
@@ -1,20 +1,37 @@
 diff --git sc/source/ui/view/tabview3.cxx sc/source/ui/view/tabview3.cxx
-index c06fa78..9f7ccc3 100644
+index c06fa78..a888435 100644
 --- sc/source/ui/view/tabview3.cxx
 +++ sc/source/ui/view/tabview3.cxx
-@@ -1679,7 +1679,6 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
+@@ -1679,31 +1679,31 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
  		SfxBindings& rBindings = aViewData.GetBindings();
  		ScMarkData& rMark = aViewData.GetMarkData();
  
 -        BOOL bSelectOneTable = FALSE;
-         if (bExtendSelection)
-         {
-             // #i6327# if all tables are selected, a selection event (#i6330#) will deselect all
-@@ -1689,21 +1688,15 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
-             if( bAllSelected )
+-        if (bExtendSelection)
+-        {
+-            // #i6327# if all tables are selected, a selection event (#i6330#) will deselect all
+-            BOOL bAllSelected = TRUE;
+-            for( SCTAB nSelTab = 0; bAllSelected && (nSelTab < nTabCount); ++nSelTab )
+-                bAllSelected = !pDoc->IsVisible( nSelTab ) || rMark.GetTableSelect( nSelTab );
+-            if( bAllSelected )
++        bool bAllSelected = true;
++        for (SCTAB nSelTab = 0; nSelTab < nTabCount; ++nSelTab)
++        {    
++            if (!pDoc->IsVisible(nSelTab) || rMark.GetTableSelect(nSelTab))
++            {    
++                if (nTab == nSelTab)
++                    // This tab is already in selection.  Keep the current 
++                    // selection.
++                    bExtendSelection = true;
++            }
++            else
              {
-                 bExtendSelection = FALSE;
+-                bExtendSelection = FALSE;
 -                bSelectOneTable = TRUE;
++                bAllSelected = false;
++                if (bExtendSelection)
++                    // We got what we need.  No need to stay in the loop.
++                    break;
              }
          }
 -        else
@@ -22,12 +39,15 @@
 -            // move from multi-selection to unselected table
 -            bSelectOneTable = !rMark.GetTableSelect( nTab );
 -        }
++        if (bAllSelected)
++            // #i6327# if all tables are selected, a selection event (#i6330#) will deselect all
++            bExtendSelection = false;
  
          if (bExtendSelection)
-         {
-             // #i6330# multi-selection with keyboard
+-        {
+-            // #i6330# multi-selection with keyboard
              rMark.SelectTable( nTab, TRUE );
-         }
+-        }
 -        else if (bSelectOneTable)
 +        else
  		{



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