Pasting an SVG from a text file changes the scale of the imported items

Split out from #4845

Summary:

The copied and pasted content is much smaller than it was originally. It doesn't seem to take the svg width/height into copy.

Normal copying/pasting of items is unaffected. The svg on clipboard during those actions have their width/height removed and the viewbox adjusted.

Introduced in inkscape@14f53899

Steps to reproduce:

  • open Inkscape
  • draw a rectangle
  • save file
  • open file with text editor
  • Ctrl+A, Ctrl+C
  • Inkscape: File > New
  • Paste clipboard contents

What happened?

  • the scale is just a quarter of the original. For this simple test case, a transform is applied matrix(0.26458333,0,0,0.26458333,212.12539,62.03085), which when removed, gives the correct size

What should have happened?

  • the scale should be correct

Version Info:

- Inkscape Version: Inkscape 1.1-beta1 (4738257183, 2021-04-29)
- Operating System: Linux Mint 20.1
Edited by Nathan Lee