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

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

commit c41871853db58faf9a05d9473c99dafbebe2bc0a
Author: Jim Jagielski <[email protected]>
AuthorDate: Tue Nov 3 09:45:41 2026 -0500

    sc: keep the fill of a cell note out of its text style in ODF 1.4 Extended
    
    Same as for other shapes; this path is taken for a loaded sheet saved 
without changes.
---
 main/sc/source/filter/xml/xmlexprt.cxx | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/main/sc/source/filter/xml/xmlexprt.cxx 
b/main/sc/source/filter/xml/xmlexprt.cxx
index 1a5693d171..dd5a05ed2c 100644
--- a/main/sc/source/filter/xml/xmlexprt.cxx
+++ b/main/sc/source/filter/xml/xmlexprt.cxx
@@ -2344,6 +2344,17 @@ void ScXMLExport::_ExportAutoStyles()
                             {
                                 std::vector<XMLPropertyState> xPropStates(
                                     
GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter(xShapeProperties));
+                                // ODF 1.4 Extended: the fill is in the style 
of the note shape, as for other shapes (XMLShapeExport)
+                                if( getDefaultVersion() == 
SvtSaveOptions::ODFVER_014_EXT )
+                                {
+                                    UniReference< XMLPropertySetMapper > 
xParaMapper( 
GetTextParagraphExport()->GetParagraphPropertyMapper()->getPropertySetMapper() 
);
+                                    for( 
std::vector<XMLPropertyState>::iterator aIter = xPropStates.begin(); aIter != 
xPropStates.end(); ++aIter )
+                                    {
+                                        if( aIter->mnIndex != -1 && ( 
xParaMapper->GetEntryType( aIter->mnIndex ) & XML_TYPE_PROP_MASK ) == 
XML_TYPE_PROP_GRAPHIC &&
+                                            
xParaMapper->GetEarliestODFVersionForExport( aIter->mnIndex ) == 
SvtSaveOptions::ODFVER_EXTENSION )
+                                            aIter->mnIndex = -1;
+                                    }
+                                }
                                 rtl::OUString sParent;
                                 rtl::OUString sName( aNoteIter->maTextStyle );
                                 GetAutoStylePool()->AddNamed(sName, 
XML_STYLE_FAMILY_TEXT_PARAGRAPH, sParent, xPropStates);

Reply via email to