summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-28 12:26:09 +0100
committerAndras Timar <andras.timar@collabora.com>2015-06-10 09:34:07 +0200
commit9e3ad16c5dc83efcf3f33a423107a3ddaf1f91a0 (patch)
tree4ae283b8540e7dd445618ea1683aed6690d9609e /sc
parenteaf291f7288a252458056f4b45bde4bf5506b824 (diff)
Resolves: tdf#90960 toggle out of paste-mode on editing an object
otherwise pressing return in the object goes to the sheet and attempts to paste over the current cell reproduce with insert->comment in A1, insert some text and click in e.g. A5, ctrl c, right click on A1 and show comment, double click on comment to edit, go to end of text and press enter, either "bad things happen" if a11y is enabled , or "nothing happens" instead of a new line appearing in the object Change-Id: Ie44851cf3394652e1a60eecb59a999889094b3c5 (cherry picked from commit 7b75dc8ccca61988392779d4c61eef15f1211c16) Reviewed-on: https://gerrit.libreoffice.org/15942 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/drawfunc/futext.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 0d76c7eab6d6..1915fac3c007 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -735,6 +735,12 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
//!?? ohne uebergebenen Outliner stimmen die Defaults nicht ???!?
if ( pView->SdrBeginTextEdit(pObj, pPV, pWindow, true, pO) )
{
+ // Toggle out of paste mode if we are in it, otherwise
+ // pressing return in this object will instead go to the
+ // sheet and be considered an overwrite-cell instruction
+ pViewShell->GetViewData().SetPasteMode(SC_PASTE_NONE);
+ pViewShell->UpdateCopySourceOverlay();
+
// EditEngine-UndoManager anmelden
pViewShell->SetDrawTextUndo( &pO->GetUndoManager() );