engine/xmloff/source/chart/SchXMLExport.cxx | 1 -
engine/xmloff/source/style/xmlnume.cxx | 2 +-
engine/xmloff/source/text/XMLTextListAutoStylePool.cxx | 7 +++----
3 files changed, 4 insertions(+), 6 deletions(-)
New commits:
commit a8df16a579fd0202460fd66370a7e86261437bb9
Author: Méven Car <
meve...@collabora.com>
AuthorDate: Thu May 21 12:54:06 2026 +0000
Commit: Tomaž Vajngerl <
tomaz.v...@collabora.com>
CommitDate: Mon May 25 08:03:49 2026 +0000
xmloff: stop warning on legitimate no-style-families and no-data-provider cases
When loading a flat ODF (.fodt) that contains embedded objects, each
embedded object is split into its own storage by re-serialising the
inlined XML through the regular ODF exporter. Two SAL_WARN_IF lines
in that path fire under normal conditions:
* XMLTextListAutoStylePool's constructor is invoked for every
SvXMLExport, including sub-exports (chart, embedded ...) whose
model legitimately does not implement XStyleFamiliesSupplier.
Bail out silently in that case - there is nothing to pre-register.
The same diagnostic is still emitted at the top-level styles.xml
export path (xmlnume.cxx), where a null supplier really is
suspicious.
* SchXMLExportHelper_Impl::InitRangeSegmentationProperties warned
about charts with no external XDataProvider - i.e. charts that
own their data internally, the common case for Writer-embedded
charts.
While here, fix the pre-existing copy-paste typo in xmlnume.cxx that
re-checked xFamiliesSupp instead of the freshly-fetched xFamilies.
Signed-off-by: Méven Car <
meve...@collabora.com>
Change-Id: Ic7bfc5014efed32ae7e3350b5ce988fa5b44d833
Reviewed-on:
https://gerrit.collaboraoffice.com/c/online/+/3076
Tested-by: Jenkins CPCI <
rel...@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <
tomaz.v...@collabora.com>
diff --git a/engine/xmloff/source/chart/SchXMLExport.cxx b/engine/xmloff/source/chart/SchXMLExport.cxx
index 59d3e27eca3f..182a78f23c0e 100644
--- a/engine/xmloff/source/chart/SchXMLExport.cxx
+++ b/engine/xmloff/source/chart/SchXMLExport.cxx
@@ -4082,7 +4082,6 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference<
try
{
Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() );
- SAL_WARN_IF( !xDataProvider.is(), "xmloff.chart", "No DataProvider" );
if( xDataProvider.is())
{
Reference< chart2::data::XDataSource > xDataSource( lcl_pressUsedDataIntoRectangularFormat( xChartDoc, mbHasCategoryLabels ));
diff --git a/engine/xmloff/source/style/xmlnume.cxx b/engine/xmloff/source/style/xmlnume.cxx
index 7a56e5e9e3c0..af8626708712 100644
--- a/engine/xmloff/source/style/xmlnume.cxx
+++ b/engine/xmloff/source/style/xmlnume.cxx
@@ -802,7 +802,7 @@ void SvxXMLNumRuleExport::exportStyles( bool bUsed, bool bExportChapterNumbering
return;
Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() );
- SAL_WARN_IF( !xFamiliesSupp.is(), "xmloff", "getStyleFamilies() from XModel failed for export!" );
+ SAL_WARN_IF( !xFamilies.is(), "xmloff", "getStyleFamilies() from XModel failed for export!" );
if( !xFamilies.is() )
return;
diff --git a/engine/xmloff/source/text/XMLTextListAutoStylePool.cxx b/engine/xmloff/source/text/XMLTextListAutoStylePool.cxx
index c347345b6228..a7cd1dc86650 100644
--- a/engine/xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ b/engine/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -158,11 +158,10 @@ XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) :
m_sPrefix = "ML";
Reference<XStyleFamiliesSupplier> xFamiliesSupp(m_rExport.GetModel(), UNO_QUERY);
- SAL_WARN_IF(!xFamiliesSupp.is(), "xmloff", "getStyleFamilies() from XModel failed for export!");
- Reference< XNameAccess > xFamilies;
- if (xFamiliesSupp.is())
- xFamilies = xFamiliesSupp->getStyleFamilies();
+ if (!xFamiliesSupp.is())
+ return;
+ Reference<XNameAccess> xFamilies = xFamiliesSupp->getStyleFamilies();
Reference<XIndexAccess> xStyles;
static constexpr OUString aNumberStyleName(u"NumberingStyles"_ustr);
if (xFamilies.is() && xFamilies->hasByName(aNumberStyleName))