Bug 156902 - FILEOPEN PPTX: graphics not shown (edit mode and presentation mode)
Summary: FILEOPEN PPTX: graphics not shown (edit mode and presentation mode)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:24.2.0 target:7.6.3 target:7.5.8
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PPTX-Shapes 156901
  Show dependency treegraph
 
Reported: 2023-08-24 21:26 UTC by Gerald Pfeifer
Modified: 2023-10-09 14:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Minimized example file (24.84 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2023-08-26 00:45 UTC, Gabor Kelemen (allotropia)
Details
The minimal example in PP 2016 and fresh master (177.89 KB, image/png)
2023-08-26 00:46 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2023-08-24 21:26:04 UTC
Using the document from attachment #189129 [details] of bug #156901 the blue
cow does not appear in Impress - neither in edit mode nor in 
presentation mode.

How it should look like: attachment #189130 [details] of bug #156901.
How it looks like: attachment #189131 [details] of bug #156901.


Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b5aaf194866c5e416167cb54d37f9f04dabc5375
CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US

Not showing the blue *cow* of the logo is a regression that
happened between

  Version: 6.4.8.0.0+
  Build ID: 99b065ec31d032fc08ab14f66430dac4fef904a5
  CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: gtk3;
  TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-4, Time: 2020-10-08_08:57:08
  Locale: en-US (en_US.UTF-8); UI-Language: en-US

and

  Version: 7.0.7.0.0+
  Build ID: 54e9dd41dc9dd45af12c9346199f601ea4a5994d
  CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: gtk3
  Locale: en-US (en_US.UTF-8); UI: en-US
  TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-7-0, Time: 2021-05-07_08:22:18
Comment 1 Gerald Pfeifer 2023-08-24 21:28:10 UTC
The distorted/missing text close to the blue cow is covered by bug #156901.
Comment 2 Gabor Kelemen (allotropia) 2023-08-26 00:19:44 UTC
Seems to have started in

https://git.libreoffice.org/core/+/f9fc420dceb1ece2c98767da16a21aaff771f140

author	Tamas Bunth <tamas.bunth@collabora.co.uk>	Tue Jan 21 19:04:13 2020 +0100
committer	Tamás Bunth <btomi96@gmail.com>	Tue Mar 03 15:52:47 2020 +0100

tdf#101181 Implement glow effect on shapes
Comment 3 Gabor Kelemen (allotropia) 2023-08-26 00:45:50 UTC
Created attachment 189160 [details]
Minimized example file

Seems like the cow is a grouping of two shapes, and the grouping has glow effect set on it. This is not supported in Impress.
Comment 4 Gabor Kelemen (allotropia) 2023-08-26 00:46:15 UTC
Created attachment 189161 [details]
The minimal example in PP 2016 and fresh master
Comment 5 Armin Le Grand (allotropia) 2023-09-12 13:59:17 UTC
(In reply to Gabor Kelemen (allotropia) from comment #3)
> Seems like the cow is a grouping of two shapes, and the grouping has glow
> effect set on it. This is not supported in Impress.

See my findings in tdf#156901 this one is also the cause for that one.
Technically there is *no* reason to not have a glow effect for groups. Maybe we do not support it, but then it's a missing feature/adaption. I changed the effect to work on primitives, so it's capable of this...
Comment 6 Gerald Pfeifer 2023-09-13 23:30:27 UTC
(In reply to Gabor Kelemen (allotropia) from comment #3)
> Seems like the cow is a grouping of two shapes, and the grouping has glow
> effect set on it. This is not supported in Impress.

Not showing glow effect for a grouping of shapes is one thing. Completely
not showing the two shapes at *all* is quite massive, though.
Comment 7 Regina Henschel 2023-10-07 00:12:37 UTC
If a group has a glow set in MS Office, then we get this in oox/source/drawingml/shape.cxx :

In Shape::createAndInsert() we have:
1916          // Set glow effect properties
1917          if ( aEffectProperties.maGlow.moGlowRad.has_value() )
1918          {
1919              uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
1920              propertySet->setPropertyValue("GlowEffectRadius", Any(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.value())));
1921              propertySet->setPropertyValue("GlowEffectColor", Any(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper)));
1922              propertySet->setPropertyValue("GlowEffectTransparency", Any(aEffectProperties.maGlow.moGlowColor.getTransparency()));
1923          }

That produces an exception, because "GlowEffectRadius" does not exist for a group shape.

createAndInsert() is called from Shape::addShape() in
367              Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, false, false, aMatrix, rShapeOrParentShapeFillProps, pParentGroupShape) );

That lays inside a try-catch. Thus from the try to set GlowEffectRadius it immediately jumps to the catch part. And because
377                  addChildren( rFilterBase, *this, pTheme, xShapes, pShapeMap, aMatrix );
which would add the shapes inside the group, is behind createAnInsert, this part is skipped.

A hot fix might be to exclude groups from setting "GlowEffectRadius". In a second step a render solution for groups could be implemented.
Comment 8 Regina Henschel 2023-10-07 14:28:08 UTC
Will do the mentioned "hot fix".
Comment 9 Commit Notification 2023-10-07 19:52:57 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

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

tdf#156902 Do not set glow on group shape in import

It will be available in 24.2.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 10 Regina Henschel 2023-10-07 20:18:41 UTC
I suggest to use this bug report only for the missing group children. Getting glow on a group would be an enhancement request and should be tracked in a separate bug report.

The missing group children problem is fixed by my patch. When glow for groups is implemented, the patch can be replaced with a better solution.
Comment 11 Gerald Pfeifer 2023-10-08 21:04:09 UTC
Thank you, Regina. A small patch, quite some effect!

Verified with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
  Build ID: 7ef3d937415185ef66e32dd3043783eddcd03db5
  CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
  Locale: en-US (en_US.UTF-8); UI: en-US

(In reply to Regina Henschel from comment #10)
> I suggest to use this bug report only for the missing group children.
> Getting glow on a group would be an enhancement request and should be
> tracked in a separate bug report.

This makes sense, yes. I filed bug #157661 to track this feature.
Thanks again for your insights and hacking!
Comment 12 Commit Notification 2023-10-09 11:56:24 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/18beb9a0bb64ba79f65eb67637b0f3750299d705

tdf#156902 Do not set glow on group shape in import

It will be available in 7.6.3.

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 13 Commit Notification 2023-10-09 14:40:56 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#156902 Do not set glow on group shape in import

It will be available in 7.5.8.

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.