Copying text from MS Word always creates a new text element, even when the cursor is inside an existing text element

Migrated from: https://bugs.launchpad.net/inkscape/+bug/491716

Steps to reproduce:

  • open Inkscape
  • create a text object and type something
  • open MS Word, type something and copy to clipboard
  • place the cursor somewhere in the text field in Inkscape
  • paste

What happened?

A new text object is created.

What should have happened?

The text is inserted at the position of the cursor.

My best guess: the EMF import is invoked on paste, creating a new text object.

Suggestions:

  • When the text tool is active, query the clipboard for a text representation. Else, use the EMF import
  • When the text tool is active, check the EMF import: If it contains only one text object, in that case, paste in the text box. Else, paste the EMF import

Inkscape Version and Operating System:

  • Inkscape Version: 1.1-dev (12e2a09, 2020-02-19)
  • Operating System: Windows 10
  • Operating System version: 10.0.18362

Migration information

  • not replicated in Inkscape 0.46
  • replicated in Inkscape 0.47
  • rep. Windows 7, Inkscape 0.48 and MS Outlook 2010
  • rep. on Windows XP, trunk revision 11649 and devlibs revision 32.

Not affected: Libre Office, Notepad

#1587 is the opposite: a new text element should be created when pasting text from a non-EMF-providing application.

Edited by Nathan Lee
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information