oox/source/export/drawingml.cxx |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 8adad56b37c5dcf0fc598cc9e6d3c190ca4311b2
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Nov 20 11:27:55 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Fri Nov 21 11:40:04 2025 +0100

    mso-test: invalid buAutoNum enum value
    
    found by converting tdf135078-1.odp to pptx and running officeotron on the 
output
    
    pptx does not support some of the combinations here, so choose the closest 
appropriate one.
    
    Change-Id: I6157c83d1a741f3590eb7db28ec9ac16f6ce80f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194252
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 74e53fa6f70ddb05e30766832868600798d20e65)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194302
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index f7ded04d18c7..7f503d3a6396 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3163,21 +3163,34 @@ static OUString GetAutoNumType(SvxNumType 
nNumberingType, bool bSDot, bool bPBeh
     else if (bSDot)
         sPrefixSuffix = "Period";
 
+    // For some of these, there is no corresponding valid value, so we use 
val+"Period"
     switch( nNumberingType )
     {
         case SVX_NUM_CHARS_UPPER_LETTER_N :
         case SVX_NUM_CHARS_UPPER_LETTER :
-            return "alphaUc" + sPrefixSuffix;
+            if (sPrefixSuffix.isEmpty())
+                return u"alphaUcPeriod"_ustr;
+            else
+                return "alphaUc" + sPrefixSuffix;
 
         case SVX_NUM_CHARS_LOWER_LETTER_N :
         case SVX_NUM_CHARS_LOWER_LETTER :
-            return "alphaLc" + sPrefixSuffix;
+            if (sPrefixSuffix.isEmpty())
+                return u"alphaLcPeriod"_ustr;
+            else
+                return "alphaLc" + sPrefixSuffix;
 
         case SVX_NUM_ROMAN_UPPER :
-            return "romanUc" + sPrefixSuffix;
+            if (sPrefixSuffix.isEmpty())
+                return u"romanUcPeriod"_ustr;
+            else
+                return "romanUc" + sPrefixSuffix;
 
         case SVX_NUM_ROMAN_LOWER :
-            return "romanLc" + sPrefixSuffix;
+            if (sPrefixSuffix.isEmpty())
+                return u"romanLcPeriod"_ustr;
+            else
+                return "romanLc" + sPrefixSuffix;
 
         case SVX_NUM_ARABIC :
         {

Reply via email to