oox/source/drawingml/textparagraphpropertiescontext.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 8e2e7e1dfd65f018266fa11093c8ab1e0a48e420
Author:     Dr. David Alan Gilbert <[email protected]>
AuthorDate: Wed Oct 8 01:27:03 2025 +0100
Commit:     David Gilbert <[email protected]>
CommitDate: Thu Oct 30 15:57:43 2025 +0100

    tdf#168406: oox: Restart numbering on 'startAt'
    
    A pptx numbered list can have its numbering restarted at an arbitrary number
    with a 'startAt' entry e.g.:
        <a:buAutoNum type="arabicPlain" startAt="3"/>
    
    We already store this value, which ends up in the bullet properties,
    but we also need to tell LO to restart numbering using the new value.
    
    In tdf#168406 this saves 8 biking related deaths!
    
    Change-Id: Idb635f6d89f8da35cf91cf0ea266a587f8f46bc6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192161
    Tested-by: Jenkins
    Reviewed-by: David Gilbert <[email protected]>

diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx 
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 8ae21020441b..6004e730a9b1 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -291,7 +291,12 @@ ContextHandlerRef 
TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
         {
             try {
                 sal_Int32 nType = rAttribs.getToken( XML_type, 0 );
-                sal_Int32 nStartAt = rAttribs.getInteger( XML_startAt, 1 );
+                sal_Int32 nStartAt = rAttribs.getInteger( XML_startAt, -1 );
+                if( nStartAt >= 0 )
+                {
+                    mrTextParagraphProperties.setRestartNumbering(true);
+                }
+
                 if( nStartAt > 32767 )
                 {
                     nStartAt = 32767;

Reply via email to