[Libreoffice-bugs] [Bug 117017] Text formatting .uno:Subscript, .uno: Superscript work from menu and Sidebar deck, but not completed with assigned keyboard shortcut

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Apr 23 20:51:00 UTC 2018


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

--- Comment #11 from Maxim Monastirsky <momonasmon at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180423/b17012d7/attachment-0001.html>


More information about the Libreoffice-bugs mailing list