oox/source/export/drawingml.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 9ae49e667e30a06e6ebfc77528bd8466ae7456a5
Author:     Karthik Godha <[email protected]>
AuthorDate: Thu Dec 25 15:16:40 2025 +0530
Commit:     Xisco Fauli <[email protected]>
CommitDate: Mon Jan 19 16:21:05 2026 +0100

    tdf#170035:Prefix numericals with "val" in guidelist
    
    The `fmla` value in `a:gd` XML attribute should be perfixed by "val "
    for numerical values.
    
    Change-Id: I4678a53679d8f2d9e21d6cbe255c922a4cf023c2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196210
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197359
    Tested-by: Jenkins
    (cherry picked from commit f956174c8d50cb6cc528c37ec42b2b63ffadb418)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197557
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 7c74b6ea9c40..a4c642c7e102 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4980,6 +4980,11 @@ OUString GetFormula(const OUString& sEquation)
     // TODO: This needs to be completely re-written. It is extremely 
simplistic/minimal.
     // What is needed here is the reverse of convertToOOEquation.
 
+    // If the equation is numerical
+    sal_Int64 nValue = sEquation.toInt64();
+    if (!sEquation.isEmpty() && OUString::number(nValue) == sEquation)
+        return "val " + sEquation;
+
     OUString sFormula = sEquation;
 
     /* replace LO native placeholders with OOXML placeholders

Reply via email to