ooo-build r15468 - in trunk: . patches/dev300 patches/vba



Author: kyoshida
Date: Thu Mar  5 00:57:45 2009
New Revision: 15468
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15468&view=rev

Log:
2009-03-04  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/apply:
	* patches/dev300/calc-multi-range-copy-paste.diff:
	* patches/dev300/cws-scsheetprotection02-sc.diff:
	* patches/dev300/sc-paste-on-enter.diff:
	* patches/vba/vba-workbook-worksheet-events.diff: worked on fixing 
	calc-multi-range-copy-paste.diff patch which was not applying cleanly
	on fresh build due to wrong patch dependency.  Changed the patch order
	a bit and fixed the header hunks on some of the dependant patches.

	* patches/dev300/sc-copy-source-border.diff: adjusted the source border
	for multi-range source region.


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/calc-multi-range-copy-paste.diff
   trunk/patches/dev300/cws-scsheetprotection02-sc.diff
   trunk/patches/dev300/sc-copy-source-border.diff
   trunk/patches/dev300/sc-paste-on-enter.diff
   trunk/patches/vba/vba-workbook-worksheet-events.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Thu Mar  5 00:57:45 2009
@@ -1,4 +1,4 @@
-\
+
 #
 # The format of this file is: not documented except by example
 #
@@ -788,15 +788,6 @@
 # row is the column header (depends on sc-natural-sort.diff patch).
 sc-simple-sort-include-format-header.diff, i#13829, kohei
 
-# Support copy & pasting of non-contiguous region.
-calc-multi-range-copy-paste.diff, n#447003, i#25855, kohei
-
-# Paste clipboard when ENTER is pressed, then clear clipboard.
-sc-paste-on-enter.diff, n#358545, i#28535, jonp
-
-# Place a border around the Copy source cell(s).
-sc-copy-source-border.diff, n#367489, jonp
-
 # Allow 'june-2007' to be properly parsed as June 1 2007 in en-US locales.
 sc-date-fix.diff, n#358750, jonp
 
@@ -863,6 +854,15 @@
 enable-xls-export-encryption.diff, kohei
 enable-sheet-protection-options.diff, kohei
 
+# Paste clipboard when ENTER is pressed, then clear clipboard.
+sc-paste-on-enter.diff, n#358545, i#28535, jonp
+
+# Support copy & pasting of non-contiguous region.
+calc-multi-range-copy-paste.diff, n#447003, i#25855, kohei
+
+# Place a border around the Copy source cell(s).
+sc-copy-source-border.diff, n#367489, jonp
+
 # Ensure that Print Preview is consistent with Print output.
 sc-print-selected-sheets.diff, n#335684, i#45497, jonp
 

Modified: trunk/patches/dev300/calc-multi-range-copy-paste.diff
==============================================================================
--- trunk/patches/dev300/calc-multi-range-copy-paste.diff	(original)
+++ trunk/patches/dev300/calc-multi-range-copy-paste.diff	Thu Mar  5 00:57:45 2009
@@ -539,12 +539,11 @@
 index 9bf31a2..7dfa529 100644
 --- sc/source/core/data/documen2.cxx
 +++ sc/source/core/data/documen2.cxx
-@@ -95,6 +95,7 @@
+@@ -95,5 +95,6 @@
  #include "lookupcache.hxx"
  #include "externalrefmgr.hxx"
  #include "tabprotection.hxx"
 +#include "clipparam.hxx"
- #include <com/sun/star/document/XVbaEventsHelper.hpp>
  
  // pImpl because including lookupcache.hxx in document.hxx isn't wanted, and
 @@ -154,6 +155,7 @@ ScDocument::ScDocument( ScDocumentMode	eMode,
@@ -1493,14 +1492,13 @@
  
  #include "globstr.hrc"
  #include "scui_def.hxx" //CHINA001
-@@ -2249,8 +2250,15 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa
+@@ -2249,9 +2250,15 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa
          WaitObject aWait( pViewData->GetDialogParent() );
          if (!pOwnClip)
              pTabViewShell->PasteFromSystem();
--        else {
+         else
+         {
 -            pTabViewShell->PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
-+        else
-+        {
 +            ScDocument* pClipDoc = pOwnClip->GetDocument();
 +            sal_uInt16 nFlags = IDF_ALL;
 +            if (pClipDoc->GetClipParam().isMultiRange())

Modified: trunk/patches/dev300/cws-scsheetprotection02-sc.diff
==============================================================================
--- trunk/patches/dev300/cws-scsheetprotection02-sc.diff	(original)
+++ trunk/patches/dev300/cws-scsheetprotection02-sc.diff	Thu Mar  5 00:57:45 2009
@@ -6712,9 +6712,9 @@
 --- sc/source/ui/view/gridwin.cxx
 +++ sc/source/ui/view/gridwin.cxx
 @@ -140,6 +140,7 @@
+ #include "userdat.hxx"
  #include "drwlayer.hxx"
  #include "attrib.hxx"
- #include "cellsh.hxx"
 +#include "tabprotection.hxx"
  
  // #114409#

Modified: trunk/patches/dev300/sc-copy-source-border.diff
==============================================================================
--- trunk/patches/dev300/sc-copy-source-border.diff	(original)
+++ trunk/patches/dev300/sc-copy-source-border.diff	Thu Mar  5 00:57:45 2009
@@ -1,8 +1,8 @@
 diff --git sc/source/ui/inc/gridwin.hxx sc/source/ui/inc/gridwin.hxx
-index 1762f20..1ace419 100644
+index 643ae95..2946c39 100644
 --- sc/source/ui/inc/gridwin.hxx
 +++ sc/source/ui/inc/gridwin.hxx
-@@ -143,6 +143,7 @@ private:
+@@ -144,6 +144,7 @@ private:
  	// #114409#
  	::sdr::overlay::OverlayObjectList*				mpOOCursors;
      ::sdr::overlay::OverlayObjectList*              mpOOSelection;
@@ -10,7 +10,7 @@
      ::sdr::overlay::OverlayObjectList*              mpOOAutoFill;
      ::sdr::overlay::OverlayObjectList*              mpOODragRect;
      ::sdr::overlay::OverlayObjectList*              mpOOHeader;
-@@ -310,6 +311,15 @@ private:
+@@ -314,6 +315,15 @@ private:
  	void			SelectForContextMenu( const Point& rPosPixel );
  
      void            GetSelectionRects( ::std::vector< Rectangle >& rPixelRects );
@@ -27,10 +27,18 @@
  protected:
      using Window::Resize;
 diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
-index a5952de..d57ed0a 100644
+index 5bcc6c8..3d7f3d4 100644
 --- sc/source/ui/view/gridwin.cxx
 +++ sc/source/ui/view/gridwin.cxx
-@@ -407,6 +407,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
+@@ -120,6 +120,7 @@
+ #include "attrib.hxx"
+ #include "cellsh.hxx"
+ #include "tabprotection.hxx"
++#include "clipparam.hxx"
+ 
+ // #114409#
+ #include <vcl/salbtype.hxx>		// FRound
+@@ -396,6 +397,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
  			DragSourceHelper( this ),
              mpOOCursors( NULL ),
              mpOOSelection( NULL ),
@@ -38,7 +46,7 @@
              mpOOAutoFill( NULL ),
              mpOODragRect( NULL ),
              mpOOHeader( NULL ),
-@@ -5154,6 +5155,82 @@ void ScGridWindow::UpdateAllOverlays()
+@@ -5159,6 +5161,87 @@ void ScGridWindow::UpdateAllOverlays()
  void ScGridWindow::DeleteCursorOverlay()
  {
      DELETEZ( mpOOCursors );
@@ -80,48 +88,53 @@
 +    if (!pClipDoc)
 +        return;
 +
-+    SCCOL nClipStartX;
-+    SCROW nClipStartY;
-+    pClipDoc->GetClipStart( nClipStartX, nClipStartY );
++    SCTAB nCurTab = pViewData->GetCurPos().Tab();
 +
-+    SCCOL nClipAreaX;
-+    SCROW nClipAreaY;
-+    pClipDoc->GetClipArea( nClipAreaX, nClipAreaY, TRUE);
-+
-+    Point aClipStartScrPos = pViewData->GetScrPos( nClipStartX, nClipStartY, eWhich );
-+    Point aClipEndScrPos   = pViewData->GetScrPos( nClipStartX + nClipAreaX + 1, 
-+        nClipStartY + nClipAreaY + 1, eWhich);
-+
-+    long nSizeXPix = aClipEndScrPos.X() - aClipStartScrPos.X();
-+    long nSizeYPix = aClipEndScrPos.Y() - aClipStartScrPos.Y();
-+
-+    aClipStartScrPos.X() -= 2;
-+    aClipStartScrPos.Y() -= 2;
-+
-+    Rectangle aRect( aClipStartScrPos, Size( nSizeXPix + 3, nSizeYPix + 3 ) );
-+
-+    std::vector<Rectangle> aPixelRects;
-+
-+    aPixelRects.push_back(Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ));
-+    aPixelRects.push_back(Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ));
-+    aPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ));
-+    aPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ));
-+
-+    sdr::overlay::OverlayObjectCell::RangeVector aRanges;
-+    ConvertPixelRectsToRangeVector( aPixelRects, &aRanges, rDrawMode );
-+
-+    ScOverlayType eType = SC_OVERLAY_BORDER_TRANSPARENT;
-+
-+    Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
-+    sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
-+
-+    pOverlayManager->add(*pOverlay);
++    ScClipParam& rClipParam = pClipDoc->GetClipParam();
 +    mpOOSelectionBorder = new ::sdr::overlay::OverlayObjectList;
-+    mpOOSelectionBorder->append(*pOverlay);
++    for (ScRange* p = rClipParam.maRanges.First(); p; p = rClipParam.maRanges.Next())
++    {
++        if (p->aStart.Tab() != nCurTab)
++            continue;
++
++        SCCOL nClipStartX = p->aStart.Col();
++        SCROW nClipStartY = p->aStart.Row();
++        SCCOL nClipEndX   = p->aEnd.Col();
++        SCROW nClipEndY   = p->aEnd.Row();
++    
++        Point aClipStartScrPos = pViewData->GetScrPos( nClipStartX, nClipStartY, eWhich );
++        Point aClipEndScrPos   = pViewData->GetScrPos( nClipEndX + 1, nClipEndY + 1, eWhich );
++    
++        long nSizeXPix = aClipEndScrPos.X() - aClipStartScrPos.X();
++        long nSizeYPix = aClipEndScrPos.Y() - aClipStartScrPos.Y();
++    
++        aClipStartScrPos.X() -= 2;
++        aClipStartScrPos.Y() -= 2;
++    
++        Rectangle aRect( aClipStartScrPos, Size( nSizeXPix + 3, nSizeYPix + 3 ) );
++    
++        std::vector<Rectangle> aPixelRects;
++    
++        aPixelRects.push_back(Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ));
++        aPixelRects.push_back(Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ));
++        aPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ));
++        aPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ));
++    
++        sdr::overlay::OverlayObjectCell::RangeVector aRanges;
++        ConvertPixelRectsToRangeVector( aPixelRects, &aRanges, rDrawMode );
++    
++        ScOverlayType eType = SC_OVERLAY_BORDER_TRANSPARENT;
++    
++        Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
++        sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
++    
++        pOverlayManager->add(*pOverlay);
++        mpOOSelectionBorder->append(*pOverlay);
++    }
  }
  
  void ScGridWindow::UpdateCursorOverlay()
-@@ -5168,6 +5245,8 @@ void ScGridWindow::UpdateCursorOverlay()
+@@ -5173,6 +5256,8 @@ void ScGridWindow::UpdateCursorOverlay()
  
      DeleteCursorOverlay();
  
@@ -130,7 +143,7 @@
      std::vector<Rectangle> aPixelRects;
  
      //
-@@ -5252,19 +5331,7 @@ void ScGridWindow::UpdateCursorOverlay()
+@@ -5257,19 +5342,7 @@ void ScGridWindow::UpdateCursorOverlay()
      if ( aPixelRects.size() )
      {
          sdr::overlay::OverlayObjectCell::RangeVector aRanges;
@@ -151,7 +164,7 @@
  
  		// #i70788# get the OverlayManager safely
  		::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
-@@ -5306,41 +5373,43 @@ void ScGridWindow::UpdateSelectionOverlay()
+@@ -5311,41 +5384,43 @@ void ScGridWindow::UpdateSelectionOverlay()
  
      if ( aPixelRects.size() && pViewData->IsActive() )
      {
@@ -214,7 +227,7 @@
  			Color aHighlight( GetSettings().GetStyleSettings().GetHighlightColor() );
              sdr::overlay::OverlayObjectCell* pOverlay =
  	            new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
-@@ -5535,19 +5604,7 @@ void ScGridWindow::UpdateDragRectOverlay()
+@@ -5540,19 +5615,7 @@ void ScGridWindow::UpdateDragRectOverlay()
          //
  
          sdr::overlay::OverlayObjectCell::RangeVector aRanges;

Modified: trunk/patches/dev300/sc-paste-on-enter.diff
==============================================================================
--- trunk/patches/dev300/sc-paste-on-enter.diff	(original)
+++ trunk/patches/dev300/sc-paste-on-enter.diff	Thu Mar  5 00:57:45 2009
@@ -133,7 +133,7 @@
  			break;
  
  		case SID_CLIPBOARD_FORMAT_ITEMS:
-@@ -2264,3 +2245,46 @@ IMPL_LINK( ScCellShell, DialogClosed, Ab
+@@ -2264,3 +2245,47 @@ IMPL_LINK( ScCellShell, DialogClosed, Ab
      return 0;
  }
  
@@ -171,7 +171,8 @@
 +        WaitObject aWait( pViewData->GetDialogParent() );
 +        if (!pOwnClip)
 +            pTabViewShell->PasteFromSystem();
-+        else {
++        else
++        {
 +            pTabViewShell->PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
 +                    PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
 +                    bShowDialog );		// allow warning dialog
@@ -210,11 +211,12 @@
 diff -u -p -r1.94 gridwin.cxx
 --- sc/source/ui/view/gridwin.cxx	18 Apr 2008 11:47:50 -0000	1.94
 +++ sc/source/ui/view/gridwin.cxx	1 May 2008 20:04:44 -0000
-@@ -135,6 +139,7 @@
+@@ -135,7 +139,8 @@
  #include "userdat.hxx"
  #include "drwlayer.hxx"
  #include "attrib.hxx"
 +#include "cellsh.hxx"
+ #include "tabprotection.hxx"
  
  // #114409#
  #include <vcl/salbtype.hxx>		// FRound

Modified: trunk/patches/vba/vba-workbook-worksheet-events.diff
==============================================================================
--- trunk/patches/vba/vba-workbook-worksheet-events.diff	(original)
+++ trunk/patches/vba/vba-workbook-worksheet-events.diff	Thu Mar  5 00:57:45 2009
@@ -1466,10 +1466,11 @@
 
 --- /home/feng/work/ooo-build/build/dev300-m14/sc/source/core/data/documen2.cxx	2008-06-16 21:30:17.000000000 +0800
 +++ sc/source/core/data/documen2.cxx	2008-06-16 14:35:26.000000000 +0800
-@@ -93,6 +93,7 @@
+@@ -93,7 +93,8 @@
  #include "recursionhelper.hxx"
  #include "lookupcache.hxx"
  #include "tabprotection.hxx"
+ #include "clipparam.hxx"
 +#include <com/sun/star/document/XVbaEventsHelper.hpp>
  
  // pImpl because including lookupcache.hxx in document.hxx isn't wanted, and



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