[ooo-build-commit] patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Jun 8 16:25:29 PDT 2009
patches/dev300/calc-selection-fixed-cursor.diff | 80 +++++++++++++-----------
1 file changed, 46 insertions(+), 34 deletions(-)
New commits:
commit b5922908a1cc20d0726d72fba35391eb9e005333
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Jun 8 19:22:41 2009 -0400
Fixed a crash when the selection cursor was going out of bound.
When making a range selection, attempting to move the selection outside
the sheet's boundary caused Calc to crash. (n#511051)
* patches/dev300/calc-selection-fixed-cursor.diff:
diff --git a/patches/dev300/calc-selection-fixed-cursor.diff b/patches/dev300/calc-selection-fixed-cursor.diff
index b8ffa05..aa3ceec 100644
--- a/patches/dev300/calc-selection-fixed-cursor.diff
+++ b/patches/dev300/calc-selection-fixed-cursor.diff
@@ -1,8 +1,8 @@
diff --git sc/inc/document.hxx sc/inc/document.hxx
-index 004f7a2..e9cbe14 100644
+index 96b6809..cc91c1a 100644
--- sc/inc/document.hxx
+++ sc/inc/document.hxx
-@@ -825,6 +825,7 @@ public:
+@@ -824,6 +824,7 @@ public:
ScRange* pLastRange = NULL,
Rectangle* pLastMM = NULL ) const;
@@ -11,10 +11,10 @@ index 004f7a2..e9cbe14 100644
BOOL IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
-index 16e4dda..163feea 100644
+index de89b1b..8ba6dfa 100644
--- sc/source/core/data/document.cxx
+++ sc/source/core/data/document.cxx
-@@ -4273,6 +4273,13 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
+@@ -4534,6 +4534,13 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
return bChange;
}
@@ -233,7 +233,7 @@ index 4cb00fb..3f80397 100644
}
diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
-index 169dcc1..84e0bf9 100644
+index ad12e86..b5bb7c6 100644
--- sc/source/ui/view/gridwin.cxx
+++ sc/source/ui/view/gridwin.cxx
@@ -3960,7 +3960,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
@@ -267,10 +267,10 @@ index 169dcc1..84e0bf9 100644
}
diff --git sc/source/ui/view/select.cxx sc/source/ui/view/select.cxx
-index f5d28bb..c60d346 100644
+index d41fe45..e983ca9 100644
--- sc/source/ui/view/select.cxx
+++ sc/source/ui/view/select.cxx
-@@ -668,7 +668,10 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
+@@ -667,7 +667,10 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
}
}
if (bStarted)
@@ -281,7 +281,7 @@ index f5d28bb..c60d346 100644
}
else
{
-@@ -704,9 +707,9 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
+@@ -703,9 +706,9 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
bStarted = TRUE;
}
@@ -293,7 +293,7 @@ index f5d28bb..c60d346 100644
if (bHideCur)
pView->ShowAllCursors();
diff --git sc/source/ui/view/tabview.cxx sc/source/ui/view/tabview.cxx
-index 75ad4ba..9b66eb6 100644
+index dacaee8..5274b50 100644
--- sc/source/ui/view/tabview.cxx
+++ sc/source/ui/view/tabview.cxx
@@ -384,7 +384,6 @@ BOOL lcl_HasRowOutline( const ScViewData& rViewData )
@@ -305,7 +305,7 @@ index 75ad4ba..9b66eb6 100644
diff --git sc/source/ui/view/tabview2.cxx sc/source/ui/view/tabview2.cxx
-index c63ccc0..24aec8e 100644
+index bd9515c..bd744e4 100644
--- sc/source/ui/view/tabview2.cxx
+++ sc/source/ui/view/tabview2.cxx
@@ -62,6 +62,7 @@
@@ -333,7 +333,7 @@ index c63ccc0..24aec8e 100644
void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE
{
// Wenn zwischen Tabellen- und Header SelectionEngine gewechselt wird,
-@@ -414,6 +408,277 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
+@@ -414,6 +408,289 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
aHdrFunc.SetAnchorFlag( FALSE );
}
@@ -465,41 +465,53 @@ index c63ccc0..24aec8e 100644
+
+ if (nMovX > 0)
+ {
-+ for (SCCOL i = 0; i < nMovX; ++i)
++ if (rCol < MAXCOL)
+ {
-+ if (!lcl_isCellQualified(pDoc, rCol+1, rRow, nTab, bSelectLocked, bSelectUnlocked))
-+ break;
-+ ++rCol;
++ for (SCCOL i = 0; i < nMovX; ++i)
++ {
++ if (!lcl_isCellQualified(pDoc, rCol+1, rRow, nTab, bSelectLocked, bSelectUnlocked))
++ break;
++ ++rCol;
++ }
+ }
+ }
+ else if (nMovX < 0)
+ {
-+ nMovX = -nMovX;
-+ for (SCCOL i = 0; i < nMovX; ++i)
++ if (rCol > 0)
+ {
-+ if (!lcl_isCellQualified(pDoc, rCol-1, rRow, nTab, bSelectLocked, bSelectUnlocked))
-+ break;
-+ --rCol;
++ nMovX = -nMovX;
++ for (SCCOL i = 0; i < nMovX; ++i)
++ {
++ if (!lcl_isCellQualified(pDoc, rCol-1, rRow, nTab, bSelectLocked, bSelectUnlocked))
++ break;
++ --rCol;
++ }
+ }
+ }
+
+ if (nMovY > 0)
+ {
-+ for (SCROW i = 0; i < nMovY; ++i)
++ if (rRow < MAXROW)
+ {
-+ if (!lcl_isCellQualified(pDoc, rCol, rRow+1, nTab, bSelectLocked, bSelectUnlocked))
-+ break;
-+ ++rRow;
++ for (SCROW i = 0; i < nMovY; ++i)
++ {
++ if (!lcl_isCellQualified(pDoc, rCol, rRow+1, nTab, bSelectLocked, bSelectUnlocked))
++ break;
++ ++rRow;
++ }
+ }
+ }
+ else if (nMovY < 0)
+ {
-+ nMovY = -nMovY;
-+ for (SCROW i = 0; i < nMovY; ++i)
++ if (rRow > 0)
+ {
-+ if (!lcl_isCellQualified(pDoc, rCol, rRow-1, nTab, bSelectLocked, bSelectUnlocked))
-+ break;
-+ --rRow;
++ nMovY = -nMovY;
++ for (SCROW i = 0; i < nMovY; ++i)
++ {
++ if (!lcl_isCellQualified(pDoc, rCol, rRow-1, nTab, bSelectLocked, bSelectUnlocked))
++ break;
++ --rRow;
++ }
+ }
+ }
+}
@@ -612,7 +624,7 @@ index c63ccc0..24aec8e 100644
{
for (USHORT i=0; i<4; i++)
diff --git sc/source/ui/view/tabview3.cxx sc/source/ui/view/tabview3.cxx
-index 6e59c27..43e2903 100644
+index 1b4879c..da85e44 100644
--- sc/source/ui/view/tabview3.cxx
+++ sc/source/ui/view/tabview3.cxx
@@ -125,10 +125,7 @@ void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl )
@@ -775,10 +787,10 @@ index 6e59c27..43e2903 100644
aViewData.ResetOldCursor();
SetCursor( nPosX, nPosY );
diff --git sc/source/ui/view/tabvwsh3.cxx sc/source/ui/view/tabvwsh3.cxx
-index 5bca772..73d4c0d 100644
+index caea267..74505f4 100644
--- sc/source/ui/view/tabvwsh3.cxx
+++ sc/source/ui/view/tabvwsh3.cxx
-@@ -389,10 +389,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
+@@ -396,10 +396,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// und Cursor setzen
// zusammengefasste Zellen beruecksichtigen:
@@ -791,10 +803,10 @@ index 5bca772..73d4c0d 100644
// Navigator-Aufrufe sind nicht API!!!
diff --git sc/source/ui/view/viewdata.cxx sc/source/ui/view/viewdata.cxx
-index 3e2acbc..53117bd 100644
+index f69ab24..66c07c4 100644
--- sc/source/ui/view/viewdata.cxx
+++ sc/source/ui/view/viewdata.cxx
-@@ -1883,12 +1883,11 @@ BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
+@@ -1891,12 +1891,11 @@ BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
{
//! public Methode um Position anzupassen
More information about the ooo-build-commit
mailing list