ooo-build r11956 - in trunk: . patches/src680
- From: jonp svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11956 - in trunk: . patches/src680
- Date: Thu, 20 Mar 2008 03:42:33 +0000 (GMT)
Author: jonp
Date: Thu Mar 20 03:42:33 2008
New Revision: 11956
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11956&view=rev
Log:
* patches/src680/apply: Add sc-copy-source-border.diff.
* patches/src680/sc-copy-source-border.diff: Draw a border around the cells
that were copied to the clipboard. (n#367489)
* patches/src680/sc-paste-on-enter.diff: Use a white list of keys that won't
cancel paste mode (instead of a black list of keys that will), so that '='
and co. will cancel paste mode. (n#372446)
Added:
trunk/patches/src680/sc-copy-source-border.diff
Modified:
trunk/ChangeLog
trunk/patches/src680/apply
trunk/patches/src680/sc-paste-on-enter.diff
Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply (original)
+++ trunk/patches/src680/apply Thu Mar 20 03:42:33 2008
@@ -637,6 +637,9 @@
# 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
Added: trunk/patches/src680/sc-copy-source-border.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/sc-copy-source-border.diff Thu Mar 20 03:42:33 2008
@@ -0,0 +1,80 @@
+Index: sc/source/ui/view/gridwin.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/view/gridwin.cxx,v
+retrieving revision 1.88
+diff -u -p -r1.88 gridwin.cxx
+--- sc/source/ui/view/gridwin.cxx 12 Dec 2007 13:21:19 -0000 1.88
++++ sc/source/ui/view/gridwin.cxx 20 Mar 2008 02:45:50 -0000
+@@ -5028,6 +5131,59 @@ void ScGridWindow::DeleteCursorOverlay()
+ DELETEZ( mpOOCursors );
+ }
+
++static void AddCopySelection( std::vector<Rectangle>& rPixelRects, ScDocument* pClipDoc,
++ ScViewData* pViewData, ScSplitPos eWhich )
++{
++ if( !pClipDoc || !pViewData->IsPasteMode())
++ return;
++
++ SCCOL nX = pViewData->GetCurX();
++ SCROW nY = pViewData->GetCurY();
++
++ SCCOL nClipStartX;
++ SCROW nClipStartY;
++ pClipDoc->GetClipStart( nClipStartX, nClipStartY );
++
++ // we don't want to "draw-over" the actual cursor, as this causes the
++ // cursor to disappear.
++ if (nX == nClipStartX && nY == nClipStartY)
++ return;
++
++ 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 ) );
++
++ // cursor borders XOR wth each other -- if a border is drawn over the same
++ // area twice, no border is drawn. Consequently, we can't draw a border
++ // around the copy selection of the cursor is next to the copied cell(s),
++ // otherwise we'll get a "missing" border.
++
++ // left edge
++ if (!(nY == nClipStartY && nX == nClipStartX-1))
++ rPixelRects.push_back(Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ));
++ // right edge
++ if (!(nY == nClipStartY && nX == nClipStartX+1))
++ rPixelRects.push_back(Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ));
++ // top edge
++ if (!(nX == nClipStartX && nY == nClipStartY-1))
++ rPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ));
++ // bottom edge
++ if (!(nX == nClipStartX && nY == nClipStartY+1))
++ rPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ));
++}
++
+ void ScGridWindow::UpdateCursorOverlay()
+ {
+ MapMode aDrawMode = GetDrawMapMode();
+@@ -5042,6 +5198,12 @@ void ScGridWindow::UpdateCursorOverlay()
+
+ std::vector<Rectangle> aPixelRects;
+
++ ScTransferObj* pTransObj = ScTransferObj::GetOwnClipboard( pViewData->GetActiveWin() );
++ if (pTransObj)
++ {
++ AddCopySelection( aPixelRects, pTransObj->GetDocument(), pViewData, eWhich );
++ }
++
+ //
+ // determine the cursor rectangles in pixels (moved from ScGridWindow::DrawCursor)
+ //
Modified: trunk/patches/src680/sc-paste-on-enter.diff
==============================================================================
--- trunk/patches/src680/sc-paste-on-enter.diff (original)
+++ trunk/patches/src680/sc-paste-on-enter.diff Thu Mar 20 03:42:33 2008
@@ -59,11 +59,12 @@
diff -u -p -r1.48 cellsh1.cxx
--- sc/source/ui/view/cellsh1.cxx 26 Nov 2007 15:20:42 -0000 1.48
+++ sc/source/ui/view/cellsh1.cxx 21 Feb 2008 01:29:30 -0000
-@@ -1176,6 +1184,7 @@ void ScCellShell::ExecuteEdit( SfxReques
+@@ -1176,6 +1184,8 @@ void ScCellShell::ExecuteEdit( SfxReques
WaitObject aWait( GetViewData()->GetDialogParent() );
pTabViewShell->CopyToClip( NULL, FALSE, FALSE, TRUE );
rReq.Done();
+ GetViewData()->SetPasteMode( TRUE );
++ pTabViewShell->ShowCursor();
}
break;
@@ -233,7 +234,7 @@
if( !rKeyCode.GetModifier() && (rKeyCode.GetCode() == KEY_F2) )
{
SC_MOD()->EndReference();
-@@ -2961,9 +3020,40 @@ void __EXPORT ScGridWindow::KeyInput(con
+@@ -2961,9 +3024,52 @@ void __EXPORT ScGridWindow::KeyInput(con
return;
}
}
@@ -253,17 +254,29 @@
+ uno::Reference<datatransfer::clipboard::XClipboardOwner>());
+ }
+
++ // hide the border around the copy source
+ pViewData->SetPasteMode( FALSE );
++ UpdateCursorOverlay();
+ return;
+ }
// wenn semi-Modeless-SfxChildWindow-Dialog oben, keine KeyInputs:
else if( !pViewData->IsAnyFillMode() )
{
+ USHORT nGroup = rKeyCode.GetGroup();
-+ if (!rKeyCode.GetModifier() &&
-+ (nGroup == KEYGROUP_NUM || nGroup == KEYGROUP_ALPHA))
++ // permit cursor keys
++ if (!(nGroup == KEYGROUP_CURSOR ||
++ // function keys
++ nGroup == KEYGROUP_FKEYS ||
++ // tab
++ (nGroup == KEYGROUP_MISC && rKeyCode.GetCode() == KEY_TAB) ||
++ // keyboard shortcuts
++ (nGroup == KEYGROUP_ALPHA && rKeyCode.GetModifier())))
++ {
++ // all else cancels paste mode.
+ pViewData->SetPasteMode( FALSE );
-+ else if( rKeyCode.GetCode() == KEY_TAB )
++ UpdateCursorOverlay();
++ }
++ if (rKeyCode.GetCode() == KEY_TAB)
+ {
+ ScMarkData& rMark = pViewData->GetMarkData();
+ if( rMark.IsMarked() || rMark.IsMultiMarked() )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]