Bug 155216 - SVG background color changes when zooming/dezooming in Writer
Summary: SVG background color changes when zooming/dezooming in Writer
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Area-Fill-Tab Zoom
  Show dependency treegraph
 
Reported: 2023-05-09 13:40 UTC by Roland Baudin
Modified: 2023-11-08 14:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG test image (6.39 KB, image/svg+xml)
2023-05-09 13:40 UTC, Roland Baudin
Details
Writer document example (13.02 KB, application/vnd.oasis.opendocument.text)
2023-05-09 13:41 UTC, Roland Baudin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Baudin 2023-05-09 13:40:28 UTC
Description:
In Writer, the background color of an imported SVG image can change when zooming/dezooming within the document.

When the document is saved with a big zooming factor (> 350% on my display), the SVG graphics color seems to be lost. But when dezooming (typically < 200%), it reappears...


Steps to Reproduce:
1. Open the attached test.svg with Draw

2. Select the object and copy to clipboard (Ctrl-C)

3. Open Writer and paste from clipboard (Ctrl-V)

4. In Writer, change the object background color to some plain color, say red

5. In Writer, set the zoom level to some high value (> 350% on my display) and save the document to some test.odt

6. Quit LibreOffice and reload the test.odt document in Writer => the object background color seems to have disappeared

7. Reduce the zoom level => the object background color reappears

Actual Results:
The object backgound color seems to have disappeared when the document is saved, but the color reappears when dezooming.

Expected Results:
The object background color should not disappear when zooming/dezooming.


Reproducible: Always


User Profile Reset: Yes

Additional Info:

LibreOffice version:

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 48; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu package version: 4:7.5.3~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded

System version:
Ubuntu 22.04.2 LTS, 64 bits
Comment 1 Roland Baudin 2023-05-09 13:40:53 UTC
Created attachment 187168 [details]
SVG test image
Comment 2 Roland Baudin 2023-05-09 13:41:16 UTC
Created attachment 187169 [details]
Writer document example
Comment 3 Stéphane Guillou (stragu) 2023-05-10 17:18:22 UTC
Reproduced in:

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Colour reappears when reaching 100% zoom level. Same with e.g. a bitmap fill.

Also in recent master build:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 002ae41bb6088002ba3ed0188ac822fb823a23f9
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Could not use example ODT to find where the issue started because results were inconsistent: opening the file sometimes will show the background, other times not.
I had to bisect adding a background, saving and reloading.

Bibisected with linux-64-6.1 to first bad commit c5e18ecabec7818a55e4a887ec4fe3d6739d7c49 which points to core commit:

commit 7b355669c6ddeab2e6cec692d6afdff41c61d0fb
author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	Sat Apr 14 15:13:05 2018 +0900
committer	Tomaž Vajngerl <quikee@gmail.com>	Fri Apr 20 09:15:22 2018 +0200
Function to load graphic swapped out (loaded on demand)
Reviewed-on: https://gerrit.libreoffice.org/53016

Quikee, can you please have a look?
Comment 4 Stéphane Guillou (stragu) 2023-11-08 14:49:00 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> Colour reappears when reaching 100% zoom level. Same with e.g. a bitmap fill.

Still reproduced in recent trunk build. Colour reappears when reducing zoom to 170% or below in sample ODT. Same with gen VCL plugin.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ff3fb42b48c70ba5788507a6177bf0a9f3b50fdb
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded