Bug 131523 - FILEOPEN Rectangle in SVG has wrong selection rectangle
Summary: FILEOPEN Rectangle in SVG has wrong selection rectangle
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:svg
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2020-03-24 08:36 UTC by Aron Budea
Modified: 2023-04-25 10:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2020-03-24 08:36:24 UTC
- Open attachment 124072 [details] from bug 99088.
- Click into the rectangle.

=> The selection rectangle is the whole "page" area.
Note that if you click outside the rectangle, it correctly deselects the object.

This started with the following commit, bibisected with repo bibisect-linux-64-6.1, but I assume it never worked correctly with this other filter.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=3ca7be09834a26fbd1c371deabd7a58111092676
author		Armin Le Grand <Armin.Le.Grand@cib.de>	2018-05-10 17:49:19 +0200
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-05-18 20:11:35 +0200

Replace SVGFilter using SVGIO
Comment 1 Aron Budea 2020-03-24 09:11:20 UTC
Note: Verify that bug 100632 is fixed after this issue is fixed.
Comment 2 Xisco Faulí 2020-03-24 14:56:08 UTC
Reproduced in

Version: 7.0.0.0.alpha0+
Build ID: 9163755e9f64a0b1dd5f2090e0702c19e31c12c9
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 3 Regina Henschel 2020-03-25 01:27:25 UTC
I think it opens correctly.

The outer svg-element has width="28" and height="4", which determines the total size.

Inside you have a group element with transform="translate(0, -296)" and therein the rectangle with x="2", y="298", width="24", height="2".
After applying the transformation to the rectangle, it has position x="2", y="2".
Drawing it into an area given by the outer svg-element results in a white area of height 2 above the rectangle and a white area of width 2 left and right of the rectangle. So the entire svg image is larger than the pure rectangle.

If you "open" an svg image, the document has exactly the size of the svg image, which is width="28" and height="4" in this case. Clicking on the image will always select the entire image and not a part of it. Only if you "Break" an svg image, it will be converted into a collection of its child elements. Then you can select the rectangle itself.
Comment 4 Aron Budea 2020-03-31 04:49:13 UTC
Thanks for the detailed explanation, Regina!

(In reply to Regina Henschel from comment #3)
> If you "open" an svg image, the document has exactly the size of the svg
> image, which is width="28" and height="4" in this case. Clicking on the
> image will always select the entire image and not a part of it. Only if you
> "Break" an svg image, it will be converted into a collection of its child
> elements. Then you can select the rectangle itself.
If it was opened for embedding in a drawing, then I'd understand why the entire image is a single object, but it's opened for editing. And when the graphics is being edited, the actual object(s) should be separate from the canvas. Can't the "outer svg-element" you mentioned safely be equated to the canvas?
Comment 5 Regina Henschel 2020-03-31 12:07:21 UTC
(In reply to Aron Budea from comment #4)

> If it was opened for embedding in a drawing, then I'd understand why the
> entire image is a single object, but it's opened for editing. And when the
> graphics is being edited, the actual object(s) should be separate from the
> canvas.

LibreOffice is not an SVG-editor. You cannot open a svg-file for editing. "opening" a svg-file is always the same as creating a new Draw-document and then inserting the svg-file as image. "open" a svg-file and save it immediately. You will get a Draw-document.

> Can't the "outer svg-element" you mentioned safely be equated to the
> canvas?

That is already down. The size of the new Draw-document is exactly the size of the "outer svg-element".
Comment 6 Aron Budea 2020-05-21 07:58:27 UTC
(In reply to Regina Henschel from comment #5)
> LibreOffice is not an SVG-editor. You cannot open a svg-file for editing.
> "opening" a svg-file is always the same as creating a new Draw-document and
> then inserting the svg-file as image. "open" a svg-file and save it
> immediately. You will get a Draw-document.
Why can't Draw be an SVG-editor? It's a vector graphics editor, and SVG is a vector graphics format. I'm not expecting Inkscape-level tools, but does Draw really have no business with editing SVGs?

> > Can't the "outer svg-element" you mentioned safely be equated to the
> > canvas?
> 
> That is already down. The size of the new Draw-document is exactly the size
> of the "outer svg-element".
Yes, what I meant is that the SVG's canvas becomes Draw's canvas, and the elements, to the extent we can import them individually, become individual elements in Draw as well (as it used to happen).
Comment 7 QA Administrators 2022-05-22 03:42:44 UTC
Dear Aron Budea,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug