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

New commits:
commit 0fa49ee2968dc1a04c2b0befec18277c64b87ea3
Author:     Karthik Godha <[email protected]>
AuthorDate: Thu Dec 25 15:16:40 2025 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Jan 15 16:50:20 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]>
    (cherry picked from commit 4b7236a73b6484877e1cd3009e729346a15f6c0a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197323
    Tested-by: Michael Stahl <[email protected]>

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 8d02577237b3..a661dfdf9896 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4912,6 +4912,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