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

New commits:
commit 74e53fa6f70ddb05e30766832868600798d20e65
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Nov 20 11:27:55 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Nov 20 15:00:57 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]>

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index eb501bb9daf8..30a42156be00 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3161,21 +3161,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