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

New commits:
commit 4b7236a73b6484877e1cd3009e729346a15f6c0a
Author:     Karthik Godha <[email protected]>
AuthorDate: Thu Dec 25 15:16:40 2025 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Tue Jan 6 19:37:32 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]>

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index c4747fa9ccab..15497622cabf 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4942,6 +4942,11 @@ bool IsValidOOXMLFormula(std::u16string_view sFormula)
 
 OUString GetFormula(const OUString& sEquation, const OUString& sReplace, const 
OUString& sNewStr)
 {
+    // If the equation is numerical
+    sal_Int64 nValue = sEquation.toInt64();
+    if (!sEquation.isEmpty() && OUString::number(nValue) == sEquation)
+        return "val " + sEquation;
+
     OUString sFormula = sEquation;
     size_t nPos = sFormula.indexOf(sReplace);
     if (nPos != std::string::npos)

Reply via email to