sd/source/filter/eppt/pptx-animations.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 134c9391b0def6b632645e8296251daff9eeafed
Author:     Karthik Godha <[email protected]>
AuthorDate: Thu Dec 25 17:24:54 2025 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Jan 2 13:51:44 2026 +0100

    PPTX->PPTX Invalid value in 'h' attribute of hsl
    
    'h' attribute inside XML_hsl (CT_TLByHslColorTransform) can't be a
    decimal value.
    
    Test file: rhbz710556-3.pptx
    
    Change-Id: I4ac7af4115c44443ad92c4ca9b9a8be09f806686
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196218
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sd/source/filter/eppt/pptx-animations.cxx 
b/sd/source/filter/eppt/pptx-animations.cxx
index 9795886e9176..e14c8916b304 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <cmath>
 #include <o3tl/any.hxx>
 #include <o3tl/string_view.hxx>
 #include <oox/token/tokens.hxx>
@@ -182,9 +183,9 @@ void WriteAnimateColorColor(const FSHelperPtr& pFS, const 
Any& rAny, sal_Int32 n
     if (nToken == XML_by)
     {
         // CT_TLByHslColorTransform
-        pFS->singleElementNS(XML_p, XML_hsl, XML_h, OString::number(aHSL[0] * 
60000), // ST_Angel
-                             XML_s, OString::number(aHSL[1] * 100000), XML_l,
-                             OString::number(aHSL[2] * 100000));
+        pFS->singleElementNS(
+            XML_p, XML_hsl, XML_h, OString::number(std::round(aHSL[0] * 
60000)), // ST_Angel
+            XML_s, OString::number(aHSL[1] * 100000), XML_l, 
OString::number(aHSL[2] * 100000));
     }
     else
     {

Reply via email to