oox/inc/drawingml/textparagraphproperties.hxx | 3 +++ oox/source/drawingml/textparagraphproperties.cxx | 9 ++++++++- oox/source/token/properties.txt | 1 + 3 files changed, 12 insertions(+), 1 deletion(-)
New commits: commit 656905c94c5a606665130e56e16cedbe3fd1b5c2 Author: Dr. David Alan Gilbert <[email protected]> AuthorDate: Tue Oct 7 01:03:04 2025 +0100 Commit: David Gilbert <[email protected]> CommitDate: Thu Oct 30 15:56:23 2025 +0100 tdf#168406: oox: Add ParaIsNumberingRestart property When this property is enabled, LO will emit a text:start-value= as part of the text:list-item. Change-Id: I9c158bb14fac5e6e77bfc93d0168081a89c8ceb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192160 Tested-by: Jenkins Reviewed-by: David Gilbert <[email protected]> diff --git a/oox/inc/drawingml/textparagraphproperties.hxx b/oox/inc/drawingml/textparagraphproperties.hxx index 9903c502cba4..ae6c3ec7a13a 100644 --- a/oox/inc/drawingml/textparagraphproperties.hxx +++ b/oox/inc/drawingml/textparagraphproperties.hxx @@ -97,6 +97,8 @@ public: TextSpacing& getLineSpacing() { return maLineSpacing; } void setLineSpacing( const TextSpacing& rLineSpacing ) { maLineSpacing = rLineSpacing; } + bool getRestartNumbering( ) { return mbRestartNumbering; } + void setRestartNumbering( const bool bRestartNumbering ) { mbRestartNumbering = bRestartNumbering; } void apply( const TextParagraphProperties& rSourceProps ); void pushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase, const css::uno::Reference < css::beans::XPropertySet > & xPropSet, @@ -129,6 +131,7 @@ private: std::optional< sal_Int32 > moDefaultTabSize; sal_Int16 mnLevel; TextSpacing maLineSpacing; + bool mbRestartNumbering; }; } diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 44b1e10702da..820568e39050 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -382,7 +382,7 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, P } TextParagraphProperties::TextParagraphProperties() -: mnLevel( 0 ) +: mnLevel( 0 ), mbRestartNumbering( false ) { } @@ -407,6 +407,8 @@ void TextParagraphProperties::apply( const TextParagraphProperties& rSourceProps moParaAdjust = rSourceProps.moParaAdjust; if( rSourceProps.maLineSpacing.bHasValue ) maLineSpacing = rSourceProps.maLineSpacing; + if( rSourceProps.mbRestartNumbering ) + mbRestartNumbering = rSourceProps.mbRestartNumbering; } void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase, @@ -531,6 +533,11 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p { aPropSet.setProperty( PROP_ParaLineSpacing, css::style::LineSpacing( css::style::LineSpacingMode::PROP, 100 )); } + + if ( mbRestartNumbering ) + { + aPropSet.setProperty( PROP_ParaIsNumberingRestart, true); + } } float TextParagraphProperties::getCharHeightPoints( float fDefault ) const diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 96b1fc988f09..3787bf6e4af3 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -408,6 +408,7 @@ ParaFirstLineIndent ParaIndent ParaIsHangingPunctuation ParaIsHyphenation +ParaIsNumberingRestart ParaLeftMargin ParaLineSpacing ParaRightMargin
