Bug 149822 - Clone Formatting does not apply glow effects
Summary: Clone Formatting does not apply glow effects
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.3.4.2 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.5.0 target:7.4.0.0.beta2
Keywords:
Depends on:
Blocks: Clone-Formatting
  Show dependency treegraph
 
Reported: 2022-07-03 00:20 UTC by xordevoreaux
Modified: 2022-07-04 10:57 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 xordevoreaux 2022-07-03 00:20:41 UTC
Description:
Copying the glow effect properties from one object to another does not work using clone formatting.



Steps to Reproduce:
1. Launch Windows LO
2. Create a new Draw document
3. Create any two shapes
4. Apply a glow effect to one of the shapes
5. Attempt to use the Clone Formatting tool to apply the effect to the other shape

Actual Results:
Nothing happens

Expected Results:
Glow effect should be applied to the second shape


Reproducible: Always


User Profile Reset: No



Additional Info:
Tested with:

Version: 7.3.4.2 (x64) / LibreOffice Community
Build ID: 728fec16bd5f605073805c3c9e7c4212a0120dc5
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

and:

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 23f76e2fed8d77c888a5595d96520ec958cccda8
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 1 Rafael Lima 2022-07-03 13:26:56 UTC
Repro with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 61f5c991a97de8990badfed6ef840941b5aa8c7f
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded

Glow effect is not considered by the Clone Formatting tool.
Comment 2 Julien Nabet 2022-07-03 18:02:22 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I got a patch not yet submitted on gerrit because I'm waiting feedback for the patch about tdf#130252 put in see also.
Indeed, to fix this one correctly, we need tdf#130252 to be fixed first.
Comment 3 Rafael Lima 2022-07-03 18:13:51 UTC
(In reply to Julien Nabet from comment #2)
> I got a patch not yet submitted on gerrit because I'm waiting feedback for
> the patch about tdf#130252 put in see also.
> Indeed, to fix this one correctly, we need tdf#130252 to be fixed first.

Hi Julien, thanks for taking interest in this issue.

Since you're at it, the new Soft Edge effect has the same problem and it is not copied by the clone formatting tool. Could you please address this issue as well?
Comment 4 Julien Nabet 2022-07-03 18:56:29 UTC
(In reply to Rafael Lima from comment #3)
> ...
> Hi Julien, thanks for taking interest in this issue.
> 
> Since you're at it, the new Soft Edge effect has the same problem and it is
> not copied by the clone formatting tool. Could you please address this issue
> as well?

Yes I saw it too. It requires to add the range SDRATTR_SOFTEDGE_FIRST SDRATTR_SOFTEDGE_LAST in GetFormatRangeImpl method
(see https://opengrok.libreoffice.org/xref/core/svx/source/svdraw/svdedxv.cxx?r=226847e3#2654)
BUT both constants of this range are defined like this:
426  constexpr sal_uInt16 SDRATTR_SOFTEDGE_FIRST(SDRATTR_GLOW_LAST + 1);
(427  constexpr TypedWhichId<SdrMetricItem> SDRATTR_SOFTEDGE_RADIUS(SDRATTR_SOFTEDGE_FIRST + 0);)
428  constexpr sal_uInt16 SDRATTR_SOFTEDGE_LAST(SDRATTR_SOFTEDGE_RADIUS);

So there's only 1 real attribute and SDRATTR_SOFTEDGE_LAST = SDRATTR_SOFTEDGE_RADIUS = SDRATTR_SOFTEDGE_FIRST therefore the prerequisite is to have tdf#130252 fixed.
Comment 5 Julien Nabet 2022-07-03 19:19:26 UTC
I've just set tdf#130252 as FIXED since the patch has been pushed.

So I've submitted https://gerrit.libreoffice.org/c/core/+/136787 (which includes SOFTEDGE_RADIUS)
Comment 6 Commit Notification 2022-07-03 20:26:59 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d2dfc0c4286057f5d8dda178817de3503c3a7d29

tdf#149822: Clone Formatting does not apply glow effects

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Julien Nabet 2022-07-03 20:33:46 UTC
I've submitted the patch for 7.4 branch here:
https://gerrit.libreoffice.org/c/core/+/136759
Comment 8 Commit Notification 2022-07-04 10:57:23 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/519d358b5c227610e21f41b28b9400296d66991f

tdf#149822: Clone Formatting does not apply glow effects

It will be available in 7.4.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.