ooo-build r12347 - in trunk: . patches/test



Author: kyoshida
Date: Sun Apr 27 01:17:40 2008
New Revision: 12347
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12347&view=rev

Log:
2008-04-26  Kohei Yoshida  <kyoshida novell com>

	* patches/test/sc-highlight-current-row.diff: better highlighting of
	current row.


Modified:
   trunk/ChangeLog
   trunk/patches/test/sc-highlight-current-row.diff

Modified: trunk/patches/test/sc-highlight-current-row.diff
==============================================================================
--- trunk/patches/test/sc-highlight-current-row.diff	(original)
+++ trunk/patches/test/sc-highlight-current-row.diff	Sun Apr 27 01:17:40 2008
@@ -31,54 +31,9 @@
  };
  
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/gridwin4.cxx sc/source/ui/view/gridwin4.cxx
---- sc.clean/source/ui/view/gridwin4.cxx	2008-04-01 12:26:33.000000000 -0400
-+++ sc/source/ui/view/gridwin4.cxx	2008-04-13 15:58:00.000000000 -0400
-@@ -1693,6 +1693,7 @@ void ScGridWindow::InvertSimple( SCCOL n
- 
- void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
- {
-+//  fprintf(stdout, "ScGridWindow::GetSelectionRects: --begin\n");
-     // transformed from ScGridWindow::InvertSimple
- 
- //  ScMarkData& rMark = pViewData->GetMarkData();
-@@ -1844,12 +1845,16 @@ void ScGridWindow::GetSelectionRects( ::
- 											nThisY + pMerge->GetRowMerge(), eWhich );
- 									if ( aEndPos.X() * nLayoutSign > nScrX * nLayoutSign && aEndPos.Y() > nScrY )
- 									{
-+//                                      fprintf(stdout, "ScGridWindow::GetSelectionRects:   (%d,%d)-(%d,%d)\n",
-+//                                              nScrX,nScrY,aEndPos.X()-nLayoutSign,aEndPos.Y()-1);
- 										aInvert.AddRect( Rectangle( nScrX,nScrY,
- 													aEndPos.X()-nLayoutSign,aEndPos.Y()-1 ) );
- 									}
- 								}
- 								else if ( nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY )
- 								{
-+//                                  fprintf(stdout, "ScGridWindow::GetSelectionRects:   (%d,%d)-(%d,%d)\n",
-+//                                          nScrX,nScrY,nEndX,nEndY);
- 									aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) );
- 								}
- 							}
-@@ -1860,6 +1865,8 @@ void ScGridWindow::GetSelectionRects( ::
- 						if ( aMultiMark.IsCellMarked( nX, nY, TRUE ) == bRepeat &&
- 												nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY )
- 						{
-+//                          fprintf(stdout, "ScGridWindow::GetSelectionRects:   (%d,%d)-(%d,%d)\n",
-+//                                  nScrX,nScrY,nEndX,nEndY);
- 							aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) );
- 						}
- 					}
-@@ -1872,6 +1879,7 @@ void ScGridWindow::GetSelectionRects( ::
- 	}
- 
- //	aInvert.Flush();		// before restoring MapMode
-+//  fprintf(stdout, "ScGridWindow::GetSelectionRects: --end\n");
- }
- 
- // -------------------------------------------------------------------------
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
 --- sc.clean/source/ui/view/gridwin.cxx	2008-04-13 06:12:16.000000000 -0400
-+++ sc/source/ui/view/gridwin.cxx	2008-04-13 19:51:48.000000000 -0400
++++ sc/source/ui/view/gridwin.cxx	2008-04-26 19:57:38.000000000 -0400
 @@ -36,7 +36,7 @@
  // MARKER(update_precomp.py): autogen include statement, do not remove
  #include "precompiled_sc.hxx"
@@ -114,7 +69,7 @@
  
      std::vector<Rectangle> aPixelRects;
  
-@@ -5159,8 +5164,19 @@ void ScGridWindow::UpdateCursorOverlay()
+@@ -5159,8 +5164,16 @@ void ScGridWindow::UpdateCursorOverlay()
              sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aCursorColor, aRanges );
  
  			pOverlayManager->add(*pOverlay);
@@ -130,43 +85,10 @@
 +            double maxY = range.getMaxY();
 +            double w = range.getWidth();
 +            double h = range.getHeight();
-+
-+//          fprintf(stdout, "ScGridWindow::UpdateCursorOverlay:   (%g,%g)-(%g,%g); width=%g; height=%g\n",
-+//                  minX,minY,maxX,maxY,w,h);
          }
      }
  
-@@ -5175,6 +5191,7 @@ void ScGridWindow::DeleteSelectionOverla
- 
- void ScGridWindow::UpdateSelectionOverlay()
- {
-+//  fprintf(stdout, "ScGridWindow::UpdateSelectionOverlay: --begin\n");
-     MapMode aDrawMode = GetDrawMapMode();
-     MapMode aOldMode = GetMapMode();
-     if ( aOldMode != aDrawMode )
-@@ -5185,8 +5202,12 @@ void ScGridWindow::UpdateSelectionOverla
-     std::vector<Rectangle> aPixelRects;
-     GetSelectionRects( aPixelRects );
- 
-+//  Rectangle dummyRect(0, 0, 100, 100);
-+//  aPixelRects.push_back(dummyRect);
-+
-     if ( aPixelRects.size() && pViewData->IsActive() )
-     {
-+//      fprintf(stdout, "ScGridWindow::UpdateSelectionOverlay:   rect count = %d\n", aPixelRects.size());
-         SCTAB nTab = pViewData->GetTabNo();
-         BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( nTab );
-         BOOL bOld = pViewData->GetView()->IsOldSelection();
-@@ -5234,6 +5255,8 @@ void ScGridWindow::UpdateSelectionOverla
- 
-     if ( aOldMode != aDrawMode )
-         SetMapMode( aOldMode );
-+
-+//  fprintf(stdout, "ScGridWindow::UpdateSelectionOverlay: --end\n");
- }
- 
- void ScGridWindow::DeleteAutoFillOverlay()
-@@ -5584,6 +5607,44 @@ void ScGridWindow::UpdateShrinkOverlay()
+@@ -5584,6 +5597,41 @@ void ScGridWindow::UpdateShrinkOverlay()
          SetMapMode( aOldMode );
  }
  
@@ -177,8 +99,6 @@
 +
 +void ScGridWindow::UpdateRowHighlightOverlay( const MapMode& rDrawMode )
 +{
-+    fprintf(stdout, "ScGridWindow::UpdateRowHighlightOverlay: --begin\n");
-+
 +    ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
 +    if (!pOverlayManager)
 +        return;
@@ -189,9 +109,10 @@
 +    SCCOL nCurY = pViewData->GetCurY();
 +    Point aCurPtStart = pViewData->GetScrPos(nCurX, nCurY, eWhich);
 +    Point aCurPtEnd   = pViewData->GetScrPos(nCurX+1, nCurY+1, eWhich);
++    Size aScrSize = pViewData->GetScrSize();
 +
-+    aPixelRects.push_back(Rectangle(0, aCurPtStart.Y(), 5000, aCurPtStart.Y()+1));
-+    aPixelRects.push_back(Rectangle(0, aCurPtEnd.Y()-2, 5000, aCurPtEnd.Y()-1));
++    aPixelRects.push_back(Rectangle(0, aCurPtStart.Y()-4, aScrSize.getWidth(), aCurPtStart.Y()-2));
++    aPixelRects.push_back(Rectangle(0, aCurPtEnd.Y(), aScrSize.getWidth(), aCurPtEnd.Y()+2));
 +
 +    sdr::overlay::OverlayObjectCell::RangeVector aRanges;
 +    ConvertPixelRectsToRangeVector( aPixelRects, aRanges, rDrawMode );
@@ -204,14 +125,12 @@
 +    pOverlayManager->add(*pOverlay);
 +    mpOORowHighlight = new ::sdr::overlay::OverlayObjectList;
 +    mpOORowHighlight->append(*pOverlay);
-+
-+    fprintf(stdout, "ScGridWindow::UpdateRowHighlightOverlay: --end\n");
 +}
 +
  // #i70788# central method to get the OverlayManager safely
  ::sdr::overlay::OverlayManager* ScGridWindow::getOverlayManager()
  {
-@@ -5613,6 +5674,24 @@ void ScGridWindow::flushOverlayManager()
+@@ -5613,6 +5661,24 @@ void ScGridWindow::flushOverlayManager()
  	}
  }
  



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