[ooo-build-commit] patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Jul 1 13:11:21 PDT 2009
patches/dev300/calc-selection-fixed-cursor.diff | 42 ++++++++++++++++++++++++
1 file changed, 42 insertions(+)
New commits:
commit 96d6d58c3abd567a2c2e591af87415fb9c17aa6e
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Jul 1 16:09:05 2009 -0400
Don't scroll back to display cell cursor when selection is large.
Now that the cell cursor doesn't move when making selection,
aligning to the cursor when the mouse button is lifted causes an
undesired scrolling. This commit fixes it. (n#518426)
* 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 79c1784..0138fae 100644
--- a/patches/dev300/calc-selection-fixed-cursor.diff
+++ b/patches/dev300/calc-selection-fixed-cursor.diff
@@ -236,6 +236,20 @@ diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
index ad12e86..b5bb7c6 100644
--- sc/source/ui/view/gridwin.cxx
+++ sc/source/ui/view/gridwin.cxx
+@@ -2200,8 +2200,12 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
+ }
+
+ SfxStringItem aPosItem( SID_CURRENTCELL, aAddr );
++ // We don't want to align to the cursor position because if the
++ // cell cursor isn't visible after making selection, it would jump
++ // back to the origin of the selection where the cell cursor is.
++ SfxBoolItem aAlignCursorItem( FN_PARAM_2, false );
+ pDisp->Execute( SID_CURRENTCELL, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
+- &aPosItem, (void*)0L );
++ &aPosItem, &aAlignCursorItem, (void*)0L );
+
+ pViewData->GetView()->InvalidateAttribs();
+ }
@@ -3960,7 +3960,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( bDone )
{
@@ -798,6 +812,17 @@ diff --git sc/source/ui/view/tabvwsh3.cxx sc/source/ui/view/tabvwsh3.cxx
index caea267..74505f4 100644
--- sc/source/ui/view/tabvwsh3.cxx
+++ sc/source/ui/view/tabvwsh3.cxx
+@@ -276,6 +276,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
+ if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ bUnmark = ((const SfxBoolItem*)pItem)->GetValue();
+
++ bool bAlignToCursor = true;
++ if (pReqArgs->GetItemState(FN_PARAM_2, true, &pItem) == SFX_ITEM_SET)
++ bAlignToCursor = static_cast<const SfxBoolItem*>(pItem)->GetValue();
++
+ if ( nSlot == SID_JUMPTOMARK )
+ {
+ // #106586# URL has to be decoded for escaped characters (%20)
@@ -396,10 +396,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// und Cursor setzen
@@ -810,6 +835,23 @@ index caea267..74505f4 100644
// Navigator-Aufrufe sind nicht API!!!
+@@ -417,9 +421,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
+ if (!rReq.IsAPI())
+ rReq.Done();
+ }
+- // align to cursor even if the cursor position hasn't changed,
+- // because the cursor may be set outside the visible area.
+- AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
++
++ if (bAlignToCursor)
++ {
++ // align to cursor even if the cursor position hasn't changed,
++ // because the cursor may be set outside the visible area.
++ AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
++ }
+
+ rReq.SetReturnValue( SfxStringItem( SID_CURRENTCELL, aAddress ) );
+ }
diff --git sc/source/ui/view/viewdata.cxx sc/source/ui/view/viewdata.cxx
index f69ab24..66c07c4 100644
--- sc/source/ui/view/viewdata.cxx
More information about the ooo-build-commit
mailing list