ooo-build r12160 - in trunk: . patches/test
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12160 - in trunk: . patches/test
- Date: Mon, 14 Apr 2008 21:20:10 +0100 (BST)
Author: kyoshida
Date: Mon Apr 14 21:20:10 2008
New Revision: 12160
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12160&view=rev
Log:
2008-04-14 Kohei Yoshida <kyoshida novell com>
* patches/test/sc-highlight-current-row.diff: test implementation to
highlight a current row per Recardo's idea.
* patches/test/sc-vba-worksheet-changed.diff: some ground work to
implement VBA's Worksheet_Changed function (for Noel).
Added:
trunk/patches/test/sc-highlight-current-row.diff
trunk/patches/test/sc-vba-worksheet-changed.diff
Modified:
trunk/ChangeLog
Added: trunk/patches/test/sc-highlight-current-row.diff
==============================================================================
--- (empty file)
+++ trunk/patches/test/sc-highlight-current-row.diff Mon Apr 14 21:20:10 2008
@@ -0,0 +1,238 @@
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/inc/gridwin.hxx sc/source/ui/inc/gridwin.hxx
+--- sc.clean/source/ui/inc/gridwin.hxx 2008-04-01 12:26:31.000000000 -0400
++++ sc/source/ui/inc/gridwin.hxx 2008-04-14 09:09:24.000000000 -0400
+@@ -169,6 +169,7 @@ private:
+ ::sdr::overlay::OverlayObjectList* mpOODragRect;
+ ::sdr::overlay::OverlayObjectList* mpOOHeader;
+ ::sdr::overlay::OverlayObjectList* mpOOShrink;
++ ::sdr::overlay::OverlayObjectList* mpOORowHighlight;
+
+ private:
+ ScViewData* pViewData;
+@@ -446,6 +447,8 @@ public:
+ void UpdateHeaderOverlay();
+ void DeleteShrinkOverlay();
+ void UpdateShrinkOverlay();
++ void DeleteRowHighlightOverlay();
++ void UpdateRowHighlightOverlay( const MapMode& rDrawMode );
+ void UpdateAllOverlays();
+
+ protected:
+@@ -453,6 +456,12 @@ protected:
+ void ImpCreateOverlayObjects();
+ void ImpDestroyOverlayObjects();
+
++private:
++
++ void ConvertPixelRectsToRangeVector(
++ const ::std::vector< Rectangle >& rPixelRects,
++ sdr::overlay::OverlayObjectCell::RangeVector& rRanges,
++ const MapMode& rDrawMode );
+ };
+
+
+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
+@@ -36,7 +36,7 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_sc.hxx"
+
+-
++#include <stdio.h>
+
+ //------------------------------------------------------------------
+
+@@ -421,6 +421,7 @@ ScGridWindow::ScGridWindow( Window* pPar
+ mpOODragRect( NULL ),
+ mpOOHeader( NULL ),
+ mpOOShrink( NULL ),
++ mpOORowHighlight( NULL ),
+ pViewData( pData ),
+ eWhich( eWhichPos ),
+ pNoteMarker( NULL ),
+@@ -5022,6 +5023,7 @@ void ScGridWindow::ImpDestroyOverlayObje
+ DeleteDragRectOverlay();
+ DeleteHeaderOverlay();
+ DeleteShrinkOverlay();
++ DeleteRowHighlightOverlay();
+ }
+
+ void ScGridWindow::UpdateAllOverlays()
+@@ -5048,6 +5050,9 @@ void ScGridWindow::UpdateCursorOverlay()
+ // For now, just re-create them.
+
+ DeleteCursorOverlay();
++ DeleteRowHighlightOverlay();
++
++ UpdateRowHighlightOverlay(aDrawMode);
+
+ std::vector<Rectangle> aPixelRects;
+
+@@ -5159,8 +5164,19 @@ void ScGridWindow::UpdateCursorOverlay()
+ sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aCursorColor, aRanges );
+
+ pOverlayManager->add(*pOverlay);
+- mpOOCursors = new ::sdr::overlay::OverlayObjectList;
+- mpOOCursors->append(*pOverlay);
++ mpOOCursors = new ::sdr::overlay::OverlayObjectList;
++ mpOOCursors->append(*pOverlay);
++ const basegfx::B2DRange range = pOverlay->getBaseRange();
++
++ double minX = range.getMinX();
++ double minY = range.getMinY();
++ double maxX = range.getMaxX();
++ 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()
+ SetMapMode( aOldMode );
+ }
+
++void ScGridWindow::DeleteRowHighlightOverlay()
++{
++ DELETEZ( mpOORowHighlight );
++}
++
++void ScGridWindow::UpdateRowHighlightOverlay( const MapMode& rDrawMode )
++{
++ fprintf(stdout, "ScGridWindow::UpdateRowHighlightOverlay: --begin\n");
++
++ ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
++ if (!pOverlayManager)
++ return;
++
++ std::vector<Rectangle> aPixelRects;
++
++ SCCOL nCurX = pViewData->GetCurX();
++ SCCOL nCurY = pViewData->GetCurY();
++ Point aCurPtStart = pViewData->GetScrPos(nCurX, nCurY, eWhich);
++ Point aCurPtEnd = pViewData->GetScrPos(nCurX+1, nCurY+1, eWhich);
++
++ aPixelRects.push_back(Rectangle(0, aCurPtStart.Y(), 5000, aCurPtStart.Y()+1));
++ aPixelRects.push_back(Rectangle(0, aCurPtEnd.Y()-2, 5000, aCurPtEnd.Y()-1));
++
++ sdr::overlay::OverlayObjectCell::RangeVector aRanges;
++ ConvertPixelRectsToRangeVector( aPixelRects, aRanges, rDrawMode );
++
++ ScOverlayType eType = SC_OVERLAY_TRANSPARENT;
++
++ Color aHighlight(140, 100, 24);
++ sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
++
++ 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()
+ }
+ }
+
++void ScGridWindow::ConvertPixelRectsToRangeVector( const ::std::vector< Rectangle >& rPixelRects,
++ sdr::overlay::OverlayObjectCell::RangeVector& rRanges,
++ const MapMode& rDrawMode )
++{
++ std::vector<Rectangle>::const_iterator aPixelEnd( rPixelRects.end() );
++ for ( std::vector<Rectangle>::const_iterator aPixelIter( rPixelRects.begin() );
++ aPixelIter != aPixelEnd; ++aPixelIter )
++ {
++ Rectangle aLogic( PixelToLogic( *aPixelIter, rDrawMode ) );
++
++ const basegfx::B2DPoint aTopLeft(aLogic.Left(), aLogic.Top());
++ const basegfx::B2DPoint aBottomRight(aLogic.Right(), aLogic.Bottom());
++ const basegfx::B2DRange a2DRange(aTopLeft, aBottomRight);
++
++ rRanges.push_back( a2DRange );
++ }
++}
++
+ // ---------------------------------------------------------------------------
+
+ // #114409#
Added: trunk/patches/test/sc-vba-worksheet-changed.diff
==============================================================================
--- (empty file)
+++ trunk/patches/test/sc-vba-worksheet-changed.diff Mon Apr 14 21:20:10 2008
@@ -0,0 +1,166 @@
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/data/documen7.cxx sc/source/core/data/documen7.cxx
+--- sc.clean/source/core/data/documen7.cxx 2008-04-01 18:26:36.000000000 +0200
++++ sc/source/core/data/documen7.cxx 2008-04-13 00:11:00.000000000 +0200
+@@ -35,7 +35,7 @@
+
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_sc.hxx"
+-
++#include <stdio.h>
+ // INCLUDE ---------------------------------------------------------------
+
+ #include <vcl/svapp.hxx>
+@@ -110,6 +110,16 @@ void ScDocument::Broadcast( ULONG nHint,
+
+ void ScDocument::Broadcast( const ScHint& rHint )
+ {
++ const ScAddress& rAddr = rHint.GetAddress();
++ if (rAddr != BCA_BRDCST_ALWAYS)
++ {
++ String aStr;
++ rAddr.Format(aStr, SCA_ABS, this);
++ fprintf(stdout, "ScDocument::Broadcast: address = '%s'; col = %d; row = %ld\n",
++ rtl::OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr(),
++ rAddr.Col(), rAddr.Row());
++ }
++
+ if ( !pBASM )
+ return ; // Clipboard or Undo
+ if ( !nHardRecalcState )
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
+--- sc.clean/source/ui/docshell/docsh.cxx 2008-04-01 18:26:34.000000000 +0200
++++ sc/source/ui/docshell/docsh.cxx 2008-04-13 00:15:17.000000000 +0200
+@@ -37,7 +37,7 @@
+ #include "precompiled_sc.hxx"
+ // System - Includes -----------------------------------------------------
+
+-
++#include <stdio.h>
+
+ #include "scitems.hxx"
+ #include <svx/eeitem.hxx>
+@@ -2629,7 +2629,49 @@ ScDocShellModificator::~ScDocShellModifi
+
+ void ScDocShellModificator::SetDocumentModified()
+ {
++ static long callCount = 0;
++ fprintf(stdout, "ScDocShellModificator::SetDocumentModified: --begin (%ld)\n", callCount++);
++
+ ScDocument* pDoc = rDocShell.GetDocument();
++ {
++ // Kohei's experimental code
++ ScViewData* pViewData = ScDocShell::GetViewData();
++ ScMarkData aMarkData( pViewData->GetMarkData() );
++ aMarkData.SetMarking(false);
++
++ if (aMarkData.IsMarked())
++ {
++ if (aMarkData.IsMultiMarked())
++ {
++ ScRangeList aList;
++ aMarkData.FillRangeListWithMarks(&aList, false);
++ String aStr;
++ aList.Format(aStr, SCR_ABS_3D, pDoc, ScAddress::CONV_XL_A1);
++ fprintf(stdout, "ScDocShellModificator::SetDocumentModified: format = '%s' (multimark list)\n",
++ rtl::OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr());
++ }
++ else
++ {
++ ScRange aRange;
++ aMarkData.GetMarkArea(aRange);
++ String aStr;
++ aRange.Format(aStr, SCR_ABS_3D, pDoc, ScAddress::CONV_XL_A1);
++ fprintf(stdout, "ScDocShellModificator::SetDocumentModified: format = '%s'\n",
++ rtl::OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr());
++ }
++ }
++ else
++ {
++ ScAddress aAddr(pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo());
++ String aStr;
++ aAddr.Format(aStr, SCA_ABS_3D, pDoc, ScAddress::CONV_XL_A1);
++ fprintf(stdout, "ScDocShellModificator::SetDocumentModified: format = '%s' (not marked)\n",
++ rtl::OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr());
++ fprintf(stdout, "ScDocShellModificator::SetDocumentModified: tab=%d; col=%d; row=%ld\n",
++ pViewData->GetTabNo(), pViewData->GetCurX(), pViewData->GetCurY());
++ }
++ }
++
+ if ( !pDoc->IsImportingXML() )
+ {
+ // AutoCalcShellDisabled temporaer restaurieren
+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-01 18:26:33.000000000 +0200
++++ sc/source/ui/view/gridwin.cxx 2008-04-12 10:58:05.000000000 +0200
+@@ -36,7 +36,7 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_sc.hxx"
+
+-
++#include <stdio.h>
+
+ //------------------------------------------------------------------
+
+@@ -5175,6 +5175,7 @@ void ScGridWindow::DeleteSelectionOverla
+
+ void ScGridWindow::UpdateSelectionOverlay()
+ {
++// fprintf(stdout, "ScGridWindow::UpdateSelectionOverlay: --begin\n");
+ MapMode aDrawMode = GetDrawMapMode();
+ MapMode aOldMode = GetMapMode();
+ if ( aOldMode != aDrawMode )
+@@ -5185,8 +5186,10 @@ void ScGridWindow::UpdateSelectionOverla
+ std::vector<Rectangle> aPixelRects;
+ GetSelectionRects( aPixelRects );
+
++
+ 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();
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/tabview3.cxx sc/source/ui/view/tabview3.cxx
+--- sc.clean/source/ui/view/tabview3.cxx 2008-04-01 18:26:33.000000000 +0200
++++ sc/source/ui/view/tabview3.cxx 2008-04-13 10:25:27.000000000 +0200
+@@ -1570,11 +1570,13 @@ void ScTabView::Unmark()
+
+ void ScTabView::SetMarkData( const ScMarkData& rNew )
+ {
++ fprintf(stdout, "ScTabView::SetMarkData: --begin\n");
+ DoneBlockMode();
+ InitOwnBlockMode();
+ aViewData.GetMarkData() = rNew;
+
+ MarkDataChanged();
++ fprintf(stdout, "ScTabView::SetMarkData: --end\n");
+ }
+
+ void ScTabView::MarkDataChanged()
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/viewfun3.cxx sc/source/ui/view/viewfun3.cxx
+--- sc.clean/source/ui/view/viewfun3.cxx 2008-04-01 18:26:33.000000000 +0200
++++ sc/source/ui/view/viewfun3.cxx 2008-04-13 10:35:05.000000000 +0200
+@@ -752,6 +752,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT n
+ InsCellCmd eMoveMode, USHORT nUndoExtraFlags,
+ BOOL bAllowDialogs )
+ {
++ fprintf(stdout, "ScViewFunc::PasteFromClip: --begin\n");
+ if (!pClipDoc)
+ {
+ DBG_ERROR("PasteFromClip: pClipDoc=0 not allowed");
+@@ -1049,6 +1050,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT n
+ DoneBlockMode();
+ InitOwnBlockMode();
+ }
++ rMark.SetMarking(true);
+ rMark.SetMarkArea( aUserRange );
+ MarkDataChanged();
+
+@@ -1217,6 +1219,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT n
+ SelectionChanged();
+
+ delete pTransClip;
++ fprintf(stdout, "ScViewFunc::PasteFromClip: --end\n");
+ return TRUE;
+ }
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]