<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Text formatting .uno:Subscript, .uno:Superscript work from menu and Sidebar deck, but not completed with assigned keyboard shortcut"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=117017#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Text formatting .uno:Subscript, .uno:Superscript work from menu and Sidebar deck, but not completed with assigned keyboard shortcut"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=117017">bug 117017</a>
              from <span class="vcard"><a class="email" href="mailto:momonasmon@gmail.com" title="Maxim Monastirsky <momonasmon@gmail.com>"> <span class="fn">Maxim Monastirsky</span></a>
</span></b>
        <pre>(In reply to Eike Rathke from <a href="show_bug.cgi?id=117017#c10">comment #10</a>)
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;</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>