diff --git a/bsc1201095.patch b/bsc1201095.patch new file mode 100644 index 0000000..f70c6f1 --- /dev/null +++ b/bsc1201095.patch @@ -0,0 +1,47 @@ +From 37e5c4fcbacb73138fe47bf12e27961a47b11af3 Mon Sep 17 00:00:00 2001 +From: Sarper Akdemir +Date: Mon, 17 Oct 2022 09:06:20 +0300 +Subject: [PATCH] tdf#151547 pptx import: workaround for COL_AUTO collision + +In the current implementation of ::Color, it is not possible +to have fully transparent white text (since it collides with +COL_AUTO and gets interpreted as Automatic Color). + +Implement a workaround for import of fully transparent white +text color so that it isn't interpreted as the magic value +COL_AUTO (i.e. instead of fully transparent #FFFFFF import +as fully transparent #FFFFFE). + +Change-Id: Ide750093ef8a89f1424ddd8f4e9ee1e18209f2ad +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141439 +Tested-by: Jenkins +Reviewed-by: Miklos Vajna +(cherry picked from commit adfdd2bee4d1d59bf1ee372d9c242cf0b691e423) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141748 +Reviewed-by: Andras Timar +--- + .../drawingml/textcharacterproperties.cxx | 8 +++++- + .../tdf151547-transparent-white-text.pptx | Bin 0 -> 32731 bytes + sd/qa/unit/import-tests2.cxx | 23 ++++++++++++++++++ + 3 files changed, 30 insertions(+), 1 deletion(-) + create mode 100644 sd/qa/unit/data/pptx/tdf151547-transparent-white-text.pptx + +diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx +index 7be4d89ae57c..e7bc36763049 100644 +--- a/oox/source/drawingml/textcharacterproperties.cxx ++++ b/oox/source/drawingml/textcharacterproperties.cxx +@@ -142,7 +142,13 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil + + if (aColor.hasTransparency()) + { +- rPropMap.setProperty(PROP_CharTransparence, aColor.getTransparency()); ++ const auto nTransparency = aColor.getTransparency(); ++ rPropMap.setProperty(PROP_CharTransparence, nTransparency); ++ ++ // WORKAROUND: Fully transparent white has the same value as COL_AUTO, avoid collision ++ if (nTransparency == 100 ++ && aColor.getColor(rFilter.getGraphicHelper()).GetRGBColor() == COL_AUTO.GetRGBColor()) ++ rPropMap.setProperty(PROP_CharColor, ::Color(ColorTransparency, 0xFFFFFFFE)); + } + } + diff --git a/libreoffice.changes b/libreoffice.changes index b4b8f79..dae78a3 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 26 08:41:00 UTC 2022 - Andras Timar + +- Fix bsc#1201095 - LO-L3: Text box shows that does not show in PowerPoint + * bsc1201095.patch + ------------------------------------------------------------------- Thu Oct 13 10:07:43 UTC 2022 - Danilo Spinella diff --git a/libreoffice.spec b/libreoffice.spec index 49a2fbb..d306f0b 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -109,6 +109,8 @@ Patch9: fix_math_desktop_file.patch Patch10: fix_gtk_popover_on_3.20.patch # PATCH-FIX-UPSTREAM remove egrep/fgrep calls Patch13: libreoffice-7.4.1.2-grep.patch +# LO-L3: Text box shows that does not show in PowerPoint +Patch14: bsc1201095.patch # Build with java 8 Patch101: 0001-Revert-java-9-changes.patch # try to save space by using hardlinks @@ -1029,6 +1031,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %patch101 -p1 %endif %patch13 -p1 +%patch14 -p1 %patch990 -p1 %patch991 -p1