https://bugs.documentfoundation.org/show_bug.cgi?id=117017

--- Comment #11 from Maxim Monastirsky <momonas...@gmail.com> ---
(In reply to Eike Rathke from comment #10)
Maybe we can paste as unformatted text when the focus is in the formula bar (so
users could still override this with the paste special dialog or the toolbar
button), i.e. something like this:

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index e3e6ec2f35de..75ddf11ece37 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1468,7 +1468,8 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const
Point& rPosPixel )
 void ScTextWnd::KeyInput(const KeyEvent& rKEvt)
 {
     bInputMode = true;
-    if (!SC_MOD()->InputKeyEvent( rKEvt ))
+    if (rKEvt.GetKeyCode().GetFunction() == KeyFuncType::PASTE ||
+        !SC_MOD()->InputKeyEvent( rKEvt ))
     {
         bool bUsed = false;
         ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 804401b303f4..5c8d00bff7b3 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -217,7 +217,11 @@ void ScEditShell::Execute( SfxRequest& rReq )
             break;

         case SID_PASTE:
-            pTableView->PasteSpecial();
+            if (pTopView && pTopView->GetWindow()->HasFocus())
+                pTableView->Paste();
+            else
+                pTableView->PasteSpecial();
+
             if (pTopView)
                 pTopView->Paste();
             break;

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to