This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch odf-devel
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 1b236cffad92c85c639dc7f7947a637d14e2e3a4
Author: Jim Jagielski <[email protected]>
AuthorDate: Wed Oct 28 11:05:23 2026 -0400

    xmloff: valid iterate-interval and additive, no FontWork attributes in ODF 
1.2 strict mode
---
 main/xmloff/source/draw/animationexport.cxx |  5 +++--
 main/xmloff/source/draw/sdpropls.cxx        | 11 +++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/main/xmloff/source/draw/animationexport.cxx 
b/main/xmloff/source/draw/animationexport.cxx
index aeaea802e7..a9fde3cf17 100644
--- a/main/xmloff/source/draw/animationexport.cxx
+++ b/main/xmloff/source/draw/animationexport.cxx
@@ -1038,7 +1038,7 @@ void AnimationsExporterImpl::exportContainer( const 
Reference< XTimeContainer >&
                        double fTemp = xIter->getIterateInterval();
                        if( fTemp )
                        {
-                               if( 0 == ( mrExport.getExportFlags() & 
EXPORT_SAVEBACKWARDCOMPATIBLE ) )
+                               if( 0 == ( mrExport.getExportFlags() & 
EXPORT_SAVEBACKWARDCOMPATIBLE ) || mrExport.getDefaultVersion() == 
SvtSaveOptions::ODFVER_012 )
                                {
                                        // issue 146582
                                        sal_Int32 nSecondsFraction = 
static_cast<sal_Int32>(fTemp * 1000 ) % 1000;
@@ -1218,7 +1218,8 @@ void AnimationsExporterImpl::exportAnimate( const 
Reference< XAnimate >& xAnimat
                                        mrExport.AddAttribute( 
XML_NAMESPACE_SMIL, XML_ACCUMULATE, XML_SUM );
 
                                nTemp = xAnimate->getAdditive();
-                               if( nTemp != AnimationAdditiveMode::REPLACE )
+                               // strict ODF 1.2 knows only replace and sum
+                               if( nTemp != AnimationAdditiveMode::REPLACE && 
( nTemp == AnimationAdditiveMode::SUM || mrExport.getDefaultVersion() != 
SvtSaveOptions::ODFVER_012 ) )
                                {
                                        SvXMLUnitConverter::convertEnum( sTmp, 
(sal_uInt16)nTemp, getAnimationsEnumMap(Animations_EnumMap_AdditiveMode) );
                                        mrExport.AddAttribute( 
XML_NAMESPACE_SMIL, XML_ADDITIVE, sTmp.makeStringAndClear() );
diff --git a/main/xmloff/source/draw/sdpropls.cxx 
b/main/xmloff/source/draw/sdpropls.cxx
index cedec582bc..d720778b99 100644
--- a/main/xmloff/source/draw/sdpropls.cxx
+++ b/main/xmloff/source/draw/sdpropls.cxx
@@ -1521,6 +1521,17 @@ void XMLShapeExportPropertyMapper::ContextFilter(
        if( pClipState != NULL && pClip11State != NULL  )
                pClip11State->mnIndex = -1;
 
+       // the FontWork attributes are not in ODF 1.2
+       if( SvtSaveOptions().GetODFDefaultVersion() == 
SvtSaveOptions::ODFVER_012 )
+       {
+               XMLPropertyState* aFontWork[] = { pFontWorkStyle, 
pFontWorkAdjust, pFontWorkDistance, pFontWorkStart,
+                       pFontWorkMirror, pFontWorkOutline, pFontWorkShadow, 
pFontWorkShadowColor, pFontWorkShadowOffsetx,
+                       pFontWorkShadowOffsety, pFontWorkForm, 
pFontWorkHideform, pFontWorkShadowTransparence };
+               for( size_t i = 0; i < sizeof( aFontWork ) / sizeof( 
aFontWork[0] ); ++i )
+                       if( aFontWork[i] )
+                               aFontWork[i]->mnIndex = -1;
+       }
+
        SvXMLExportPropertyMapper::ContextFilter(rProperties, rPropSet);
 }
 

Reply via email to