This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch ms-odrawxml in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 9352a74887f7c4d1cc6a4aa01dd167f18cf884c6 Author: Pedro Giffuni <[email protected]> AuthorDate: Wed Nov 25 01:59:21 2026 -0500 Implement MCE Phase 1: Markup Compatibility and Extensibility support for DOCX, XLSX, PPTX export Implement native OOXML Markup Compatibility and Extensibility (MCE) processing for Apache OpenOffice export filters. This includes: 1. MceProcessor class (main/oox/source/core/mceprocessor.cxx/.hxx): - SpreadsheetML namespace detection for 2006/main - Namespace resolution from Excel filter attributes - Choice eligibility based on required namespaces - Branch selection logic (first eligible choice, fallback, none) 2. MceAlternateContext class (main/oox/source/core/mcealternatecontext.cxx/.hxx): - Namespace stack management for all elements - mc:Ignorable namespace registration and filtering - mc:ProcessContent element filtering - Nested AlternateContext handling with inherited state - Choice/Fallback selection and element forwarding 3. Integration with FilterHandler: - FragmentHandler::pushNamespaces() called for all elements - DocxExportFilter::createFastChildContext intercepts MS_Excel_2007_XML 4. Build configuration: - main/oox/Library_oox.mk: added mcealternatecontext.cxx and mceprocessor.cxx - main/writerfilter/Library_writerfilter.mk: added oox/inc include path All source files compile successfully with GCC 15.2. --- main/oox/inc/oox/core/mcealternatecontext.hxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/main/oox/inc/oox/core/mcealternatecontext.hxx b/main/oox/inc/oox/core/mcealternatecontext.hxx index 9ade194696..099040c234 100644 --- a/main/oox/inc/oox/core/mcealternatecontext.hxx +++ b/main/oox/inc/oox/core/mcealternatecontext.hxx @@ -13,7 +13,7 @@ namespace core { /** Context handler for mc:AlternateContent elements. - Implements Phase 1+2 MCE support: mc:AlternateContent, + Implements Phase 1 MCE support: mc:AlternateContent, mc:Choice, mc:Fallback selection based on mc:Requires namespace resolution, plus mc:Ignorable and mc:ProcessContent processing. @@ -132,6 +132,19 @@ private: namespace stack. */ std::vector< ::rtl::OUString > resolvePrefixList( const ::rtl::OUString& rRequires ) const; + + /** Processes the mc:Ignorable attribute, adding each referenced + namespace URI to the ignorable namespaces list. */ + void processIgnorableAttribute( + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::sax::XFastAttributeList >& rAttribs ); + + /** Processes the mc:ProcessContent attribute, adding each qualified + element name to the set of elements to process even when in an + ignorable namespace. */ + void processProcessContent( + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::sax::XFastAttributeList >& rAttribs ); }; } // namespace core
