[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Mar 22 16:56:17 PDT 2011


 sc/source/ui/view/gridwin.cxx |   21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

New commits:
commit a706e2c7ce8a7ad8acfcf4b569e426ed4efa87ed
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Mar 22 19:51:41 2011 -0400

    Let's not clear single cell selection after enter-paste. (fdo#35116)

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 2e4e435..31c66f0 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3020,24 +3020,6 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
     }
 }
 
-static void ClearSingleSelection( ScViewData* pViewData )
-{
-    SCCOL nX;
-    SCROW nY;
-    ScTransferObj* pTransObj = ScTransferObj::GetOwnClipboard(
-        pViewData->GetActiveWin() );
-    if (!pTransObj)
-        return;
-
-    ScDocument* pClipDoc = pTransObj->GetDocument();
-    pClipDoc->GetClipArea( nX, nY, true );
-    if (nX == 0 && nY == 0)
-    {
-        ScTabView* pView = pViewData->GetView();
-        pView->Unmark();
-    }
-}
-
 void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
 {
     // Cursor control for ref input dialog
@@ -3061,10 +3043,9 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
     else if( rKeyCode.GetCode() == KEY_RETURN && pViewData->IsPasteMode() )
     {
         ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
-
         ScCellShell::PasteFromClipboard( pViewData, pTabViewShell, false );
-        ClearSingleSelection( pViewData );
 
+        // Clear clipboard content.
         uno::Reference<datatransfer::clipboard::XClipboard> xSystemClipboard =
             TransferableHelper::GetSystemClipboard();
         if (xSystemClipboard.is())


More information about the Libreoffice-commits mailing list