diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-05-10 16:41:54 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-05-10 21:07:40 +0200 |
commit | 16de54a5c47fbc4691ee099c1f7bb559a8fe11ac (patch) | |
tree | 25001b1ee47ba73a12f156e436dfa3d6e7d52e74 /xmloff | |
parent | d9a6e0c8b74522fca7ff008a13184e479efd1ba0 (diff) |
tdf#138209 ODF export: work around forms problem in LO < 7.0
LO without commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6 makes a mess
when storing form documents it has loaded from ODF 1.3 documents: the
XML parts are stored as ODF 1.2, but the storage (and therefore manifest
entry) keeps version 1.3.
To avoid this, store form documents as ODF 1.2 extended by default.
Unfortunately a bunch of ODF export code accesses the global
SvtSaveOptions variable; with this version override, only
SvXMLExport::getSaneDefaultVersion() must be used.
Change-Id: I5fa8e286f5103c578ed0d93da07a8a6cbe2f0ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115357
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/PropertyMaps.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 101 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLTools.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 46 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/core/xmluconv.cxx | 21 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/layerexport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/XMLPageExport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/chrlohdl.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmlexppr.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/table/XMLTableExport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 8 |
16 files changed, 156 insertions, 81 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index f63d04c45fd4..ddd77f292345 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -438,7 +438,8 @@ void XMLChartExportPropertyMapper::handleSpecialItem( { if( ( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT ) { - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFSaneDefaultVersion() ); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentVersion < SvtSaveOptions::ODFSVER_012) sValueBuffer.append( GetXMLToken( XML_PERCENTAGE )); else @@ -495,7 +496,8 @@ void XMLChartExportPropertyMapper::handleSpecialItem( break; case XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE: { - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFSaneDefaultVersion() ); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( + mrExport.getSaneDefaultVersion()); OUString aServiceName; rProperty.maValue >>= aServiceName; diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index af5885d3e354..f418cebd4500 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -282,7 +282,8 @@ public: namespace { -CustomLabelSeq lcl_getCustomLabelField(sal_Int32 nDataPointIndex, +CustomLabelSeq lcl_getCustomLabelField(SvXMLExport const& rExport, + sal_Int32 nDataPointIndex, const uno::Reference< chart2::XDataSeries >& rSeries) { if (!rSeries.is()) @@ -291,7 +292,7 @@ CustomLabelSeq lcl_getCustomLabelField(sal_Int32 nDataPointIndex, // Custom data label text will be written to the <text:p> child element of a // <chart:data-label> element. That exists only since ODF 1.2. const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( - SvtSaveOptions().GetODFSaneDefaultVersion()); + rExport.getSaneDefaultVersion()); if (nCurrentODFVersion < SvtSaveOptions::ODFSVER_012) return CustomLabelSeq(); @@ -307,13 +308,17 @@ CustomLabelSeq lcl_getCustomLabelField(sal_Int32 nDataPointIndex, return CustomLabelSeq(); } -css::chart2::RelativePosition lcl_getCustomLabelPosition(sal_Int32 nDataPointIndex, +css::chart2::RelativePosition lcl_getCustomLabelPosition( + SvXMLExport const& rExport, + sal_Int32 const nDataPointIndex, const uno::Reference< chart2::XDataSeries >& rSeries) { if (!rSeries.is()) return chart2::RelativePosition(); - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + rExport.getSaneDefaultVersion()); + if ((nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) == 0) // do not export to ODF 1.3 or older return chart2::RelativePosition(); @@ -1182,13 +1187,15 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > { Reference< beans::XPropertySet > xPropSet = rChartDoc->getArea(); if( xPropSet.is()) - aPropertyStates = mxExpPropMapper->Filter( xPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet); } if( bExportContent ) { //export data provider in xlink:href attribute - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); + if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012) { OUString aDataProviderURL( ".." ); @@ -1272,7 +1279,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > { Reference< beans::XPropertySet > xPropSet( rChartDoc->getTitle(), uno::UNO_QUERY ); if( xPropSet.is()) - aPropertyStates = mxExpPropMapper->Filter( xPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet); } if( bExportContent ) { @@ -1312,7 +1319,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > { Reference< beans::XPropertySet > xPropSet( rChartDoc->getSubTitle(), uno::UNO_QUERY ); if( xPropSet.is()) - aPropertyStates = mxExpPropMapper->Filter( xPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet); } if( bExportContent ) @@ -1353,7 +1360,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > { Reference< beans::XPropertySet > xPropSet( rChartDoc->getLegend(), uno::UNO_QUERY ); if( xPropSet.is()) - aPropertyStates = mxExpPropMapper->Filter( xPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet); } if( bExportContent ) @@ -1361,7 +1368,8 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > Reference< beans::XPropertySet > xProp( rChartDoc->getLegend(), uno::UNO_QUERY ); if( xProp.is()) { - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); // export legend anchor position try @@ -1864,7 +1872,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( if( xPropSet.is()) { if( mxExpPropMapper.is()) - aPropertyStates = mxExpPropMapper->Filter( xPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet); } if( bExportContent ) { @@ -1983,7 +1991,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( if( xStockPropSet.is()) { aPropertyStates.clear(); - aPropertyStates = mxExpPropMapper->Filter( xStockPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xStockPropSet); if( !aPropertyStates.empty() ) { @@ -2005,7 +2013,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( if( xStockPropSet.is()) { aPropertyStates.clear(); - aPropertyStates = mxExpPropMapper->Filter( xStockPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xStockPropSet); if( !aPropertyStates.empty() ) { @@ -2027,7 +2035,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( if( xStockPropSet.is()) { aPropertyStates.clear(); - aPropertyStates = mxExpPropMapper->Filter( xStockPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xStockPropSet); if( !aPropertyStates.empty() ) { @@ -2058,7 +2066,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( Reference< beans::XPropertySet > xWallPropSet = xWallFloorSupplier->getWall(); if( xWallPropSet.is()) { - aPropertyStates = mxExpPropMapper->Filter( xWallPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xWallPropSet); if( !aPropertyStates.empty() ) { @@ -2085,7 +2093,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( if( !xFloorPropSet.is()) return; - aPropertyStates = mxExpPropMapper->Filter( xFloorPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xFloorPropSet); if( aPropertyStates.empty() ) return; @@ -2106,7 +2114,8 @@ void SchXMLExportHelper_Impl::exportPlotArea( void SchXMLExportHelper_Impl::exportCoordinateRegion( const uno::Reference< chart::XDiagram >& xDiagram ) { - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older return; @@ -2177,7 +2186,7 @@ void SchXMLExportHelper_Impl::exportAxisTitle( const Reference< beans::XProperty { if( !rTitleProps.is() ) return; - std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( rTitleProps ); + std::vector<XMLPropertyState> aPropertyStates = mxExpPropMapper->Filter(mrExport, rTitleProps); if( bExportContent ) { OUString aText; @@ -2205,7 +2214,7 @@ void SchXMLExportHelper_Impl::exportGrid( const Reference< beans::XPropertySet > { if( !rGridProperties.is() ) return; - std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( rGridProperties ); + std::vector<XMLPropertyState> aPropertyStates = mxExpPropMapper->Filter(mrExport, rGridProperties); if( bExportContent ) { AddAutoStyleAttribute( aPropertyStates ); @@ -2229,7 +2238,8 @@ bool lcl_exportAxisType( const Reference< chart2::XAxis >& rChart2Axis, SvXMLExp if( !rChart2Axis.is() ) return bExportDateScale; - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + rExport.getSaneDefaultVersion()); if ((nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) == 0) //do not export to ODF 1.3 or older return bExportDateScale; @@ -2302,7 +2312,8 @@ void SchXMLExportHelper_Impl::exportAxis( // get property states for autostyles if( rAxisProps.is() && mxExpPropMapper.is() ) { - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED && eDimension == XML_X) { @@ -2318,7 +2329,7 @@ void SchXMLExportHelper_Impl::exportAxis( } lcl_exportNumberFormat( "NumberFormat", rAxisProps, mrExport ); - aPropertyStates = mxExpPropMapper->Filter( rAxisProps ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, rAxisProps); if (!maSrcShellID.isEmpty() && !maDestShellID.isEmpty() && maSrcShellID != maDestShellID) { @@ -2727,7 +2738,8 @@ void SchXMLExportHelper_Impl::exportSeries( TOOLS_INFO_EXCEPTION("xmloff.chart", "Required property not found in DataRowProperties" ); } - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012) { lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport ); @@ -2735,7 +2747,7 @@ void SchXMLExportHelper_Impl::exportSeries( } if( mxExpPropMapper.is()) - aPropertyStates = mxExpPropMapper->Filter( xPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet); } if( bExportContent ) @@ -2760,7 +2772,8 @@ void SchXMLExportHelper_Impl::exportSeries( // #i75297# allow empty series, export empty range to have all ranges on import mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, OUString()); - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) // do not export to ODF 1.3 or older { if (xPropSet.is()) @@ -2898,7 +2911,7 @@ void SchXMLExportHelper_Impl::exportSeries( if( xStatProp.is() ) { - aPropertyStates = mxExpPropMapper->Filter( xStatProp ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xStatProp); if( !aPropertyStates.empty() ) { @@ -2931,7 +2944,8 @@ void SchXMLExportHelper_Impl::exportSeries( uno::Reference< beans::XPropertySet >( aSeriesSeq[nSeriesIdx], uno::UNO_QUERY ), nSeriesLength, xNewDiagram, bExportContent ); - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); // create <chart:data-label> child element if needed. if (xPropSet.is() && mxExpPropMapper.is()) @@ -3042,7 +3056,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve( OUString aService = xServiceName->getServiceName(); - std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( xProperties ); + std::vector<XMLPropertyState> aPropertyStates = mxExpPropMapper->Filter(mrExport, xProperties); // Add service name (which is regression type) sal_Int32 nIndex = GetPropertySetMapper()->FindEntryIndex(XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE); @@ -3057,7 +3071,8 @@ void SchXMLExportHelper_Impl::exportRegressionCurve( xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient") >>= bShowRSquared; bExportEquation = ( bShowEquation || bShowRSquared ); - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentVersion < SvtSaveOptions::ODFSVER_012) { bExportEquation=false; @@ -3071,7 +3086,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve( { mrExport.addDataStyle( nNumberFormat ); } - aEquationPropertyStates = mxExpPropMapper->Filter( xEquationProperties ); + aEquationPropertyStates = mxExpPropMapper->Filter(mrExport, xEquationProperties); } } @@ -3132,7 +3147,8 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe { assert(mxExpPropMapper.is()); - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( + mrExport.getSaneDefaultVersion()); /// Don't export X ErrorBars for older ODF versions. if (!bYError && nCurrentVersion < SvtSaveOptions::ODFSVER_012) @@ -3182,7 +3198,7 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe } } - std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( xErrorBarProp ); + std::vector<XMLPropertyState> aPropertyStates = mxExpPropMapper->Filter(mrExport, xErrorBarProp); if( aPropertyStates.empty() ) return; @@ -3347,7 +3363,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( xSeriesProperties->getPropertyValue("AttributedDataPoints") >>= aDataPointSeq; xSeriesProperties->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint; - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) // do not export to ODF 1.3 or older xSeriesProperties->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq; } @@ -3401,7 +3418,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( SAL_WARN_IF( !xPropSet.is(), "xmloff.chart", "Pie Segments should have properties" ); if( xPropSet.is()) { - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012 && bExportNumFmt) { lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport ); @@ -3426,7 +3444,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( } } - aPropertyStates = mxExpPropMapper->Filter(xPropSet); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet); if (!aPropertyStates.empty() || !aDataLabelPropertyStates.empty()) { if (bExportContent) @@ -3448,8 +3466,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( maAutoStyleNameQueue.pop(); } if(bExportNumFmt) - aPoint.mCustomLabelText = lcl_getCustomLabelField(nElement, xSeries); - aPoint.mCustomLabelPos = lcl_getCustomLabelPosition(nElement, xSeries); + aPoint.mCustomLabelText = lcl_getCustomLabelField(mrExport, nElement, xSeries); + aPoint.mCustomLabelPos = lcl_getCustomLabelPosition(mrExport, nElement, xSeries); aDataPointVector.push_back( aPoint ); } @@ -3497,7 +3515,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( } if( xPropSet.is()) { - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + mrExport.getSaneDefaultVersion()); if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012) { lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport ); @@ -3511,7 +3530,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( mxExpPropMapper); } - aPropertyStates = mxExpPropMapper->Filter( xPropSet ); + aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet); if (!aPropertyStates.empty() || !aDataLabelPropertyStates.empty()) { @@ -3526,8 +3545,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( aPoint.maStyleName = maAutoStyleNameQueue.front(); maAutoStyleNameQueue.pop(); } - aPoint.mCustomLabelText = lcl_getCustomLabelField(nCurrIndex, xSeries); - aPoint.mCustomLabelPos = lcl_getCustomLabelPosition(nCurrIndex, xSeries); + aPoint.mCustomLabelText = lcl_getCustomLabelField(mrExport, nCurrIndex, xSeries); + aPoint.mCustomLabelPos = lcl_getCustomLabelPosition(mrExport, nCurrIndex, xSeries); if (!aDataLabelPropertyStates.empty()) { SAL_WARN_IF(maAutoStyleNameQueue.empty(), "xmloff.chart", diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index db6a2e6a68ee..27fa23987b59 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -609,7 +609,8 @@ void exportRangeToSomewhere( SvXMLExport& rExport, const OUString& rValue ) //#i113950# first the range was exported to attribute text:id, but that attribute does not allow arbitrary strings anymore within ODF 1.2 //as an alternative the range info is now saved into the description at an empty group element (not very nice, but ODF conform) - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( + rExport.getSaneDefaultVersion()); if (nCurrentODFVersion == SvtSaveOptions::ODFSVER_010 || nCurrentODFVersion == SvtSaveOptions::ODFSVER_011) return;//svg:desc is not allowed at draw:g in ODF1.0; but as the ranges for error bars are anyhow not allowed within ODF1.0 nor ODF1.1 we do not need the information diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx index 0a14b506352a..c50450740db3 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx @@ -18,6 +18,8 @@ */ #include "XMLErrorBarStylePropertyHdl.hxx" + +#include <xmloff/xmluconv.hxx> #include <unotools/saveopt.hxx> #include <com/sun/star/chart/ErrorBarStyle.hpp> @@ -35,10 +37,10 @@ XMLErrorBarStylePropertyHdl::~XMLErrorBarStylePropertyHdl() } bool XMLErrorBarStylePropertyHdl::exportXML( OUString& rStrExpValue, - const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const + const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter) const { uno::Any aValue(rValue); - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(rUnitConverter.getSaneDefaultVersion()); if (nCurrentVersion < SvtSaveOptions::ODFSVER_012) { sal_Int32 nValue = 0; diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index c5bcc2a4db95..d355e4a0ff28 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -22,6 +22,7 @@ #include <sal/log.hxx> #include <stack> +#include <optional> #include <xmloff/unointerfacetouniqueidentifiermapper.hxx> #include <osl/mutex.hxx> @@ -58,6 +59,7 @@ #include <com/sun/star/document/XEventsSupplier.hpp> #include <com/sun/star/document/XViewDataSupplier.hpp> #include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/frame/XModule.hpp> #include <xmloff/GradientStyle.hxx> #include <xmloff/HatchStyle.hxx> #include <xmloff/ImageStyle.hxx> @@ -260,6 +262,7 @@ public: uno::Reference< embed::XStorage > mxTargetStorage; SvtSaveOptions maSaveOptions; + std::optional<SvtSaveOptions::ODFSaneDefaultVersion> m_oOverrideODFVersion; /// name of stream in package, e.g., "content.xml" OUString mStreamName; @@ -418,6 +421,32 @@ void SvXMLExport::DetermineModelType_() if ( mxModel.is() ) { meModelType = SvtModuleOptions::ClassifyFactoryByModel( mxModel ); + + // note: MATH documents will throw NotInitializedException; maybe unit test problem + if (meModelType == SvtModuleOptions::EFactory::WRITER) + { + uno::Reference<frame::XModule> const xModule(mxModel, uno::UNO_QUERY); + bool const isBaseForm(xModule.is() && + xModule->getIdentifier() == "com.sun.star.sdb.FormDesign"); + if (isBaseForm) + { + switch (mpImpl->maSaveOptions.GetODFSaneDefaultVersion()) + { + case SvtSaveOptions::ODFSVER_013_EXTENDED: + SAL_INFO("xmloff.core", "tdf#138209 force form export to ODF 1.2"); + mpImpl->m_oOverrideODFVersion = SvtSaveOptions::ODFSVER_012_EXTENDED; + maUnitConv.overrideSaneDefaultVersion(SvtSaveOptions::ODFSVER_012_EXTENDED); + break; + case SvtSaveOptions::ODFSVER_013: + SAL_INFO("xmloff.core", "tdf#138209 force form export to ODF 1.2"); + mpImpl->m_oOverrideODFVersion = SvtSaveOptions::ODFSVER_012; + maUnitConv.overrideSaneDefaultVersion(SvtSaveOptions::ODFSVER_012); + break; + default: + break; + } + } + } } } @@ -430,7 +459,7 @@ SvXMLExport::SvXMLExport( m_xContext(xContext), m_implementationName(implementationName), mxAttrList( new SvXMLAttributeList ), mpNamespaceMap( new SvXMLNamespaceMap ), - maUnitConv( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit ), + maUnitConv(xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit, getSaneDefaultVersion()), meClass( eClass ), mnExportFlags( nExportFlags ), mnErrorFlags( SvXMLErrorFlags::NO ), @@ -455,7 +484,7 @@ SvXMLExport::SvXMLExport( mxAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - maUnitConv( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit ), + maUnitConv(xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit, getSaneDefaultVersion()), meClass( XML_TOKEN_INVALID ), mnExportFlags( SvXMLExportFlags::NONE ), mnErrorFlags( SvXMLErrorFlags::NO ), @@ -490,7 +519,8 @@ SvXMLExport::SvXMLExport( mpNamespaceMap( new SvXMLNamespaceMap ), maUnitConv( xContext, util::MeasureUnit::MM_100TH, - SvXMLUnitConverter::GetMeasureUnit(eDefaultFieldUnit) ), + SvXMLUnitConverter::GetMeasureUnit(eDefaultFieldUnit), + getSaneDefaultVersion()), meClass( XML_TOKEN_INVALID ), mnExportFlags( nExportFlag ), mnErrorFlags( SvXMLErrorFlags::NO ), @@ -2291,11 +2321,11 @@ uno::Reference< embed::XStorage > const & SvXMLExport::GetTargetStorage() const SvtSaveOptions::ODFSaneDefaultVersion SvXMLExport::getSaneDefaultVersion() const { - if( mpImpl ) - return mpImpl->maSaveOptions.GetODFSaneDefaultVersion(); - - // fatal error, use current version as default - return SvtSaveOptions::ODFSVER_LATEST; + if (mpImpl->m_oOverrideODFVersion) + { + return *mpImpl->m_oOverrideODFVersion; + } + return mpImpl->maSaveOptions.GetODFSaneDefaultVersion(); } void diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 9bd811775185..1f21acef1876 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -411,7 +411,8 @@ SvXMLImport::SvXMLImport( mpNamespaceMap( new SvXMLNamespaceMap ), mpUnitConv( new SvXMLUnitConverter( xContext, - util::MeasureUnit::MM_100TH, util::MeasureUnit::MM_100TH) ), + util::MeasureUnit::MM_100TH, util::MeasureUnit::MM_100TH, + SvtSaveOptions::ODFSVER_LATEST_EXTENDED) ), mnImportFlags( nImportFlags ), maNamespaceHandler( new SvXMLImportFastNamespaceHandler() ), diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 23f3d7017ccd..9cc7fe68370a 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -66,6 +66,7 @@ struct SvXMLUnitConverter::Impl { sal_Int16 m_eCoreMeasureUnit; /*css::util::MeasureUnit*/ sal_Int16 m_eXMLMeasureUnit; /*css::util::MeasureUnit*/ + SvtSaveOptions::ODFSaneDefaultVersion m_eODFVersion; util::Date m_aNullDate; mutable uno::Reference< text::XNumberingTypeInfo > m_xNumTypeInfo; mutable uno::Reference< i18n::XCharacterClassification > m_xCharClass; @@ -73,9 +74,11 @@ struct SvXMLUnitConverter::Impl Impl(uno::Reference<uno::XComponentContext> const& xContext, sal_Int16 const eCoreMeasureUnit, - sal_Int16 const eXMLMeasureUnit) + sal_Int16 const eXMLMeasureUnit, + SvtSaveOptions::ODFSaneDefaultVersion const nODFVersion) : m_eCoreMeasureUnit(eCoreMeasureUnit) , m_eXMLMeasureUnit(eXMLMeasureUnit) + , m_eODFVersion(nODFVersion) , m_aNullDate(30, 12, 1899) , m_xContext(xContext) { @@ -117,6 +120,17 @@ sal_Int16 SvXMLUnitConverter::GetXMLMeasureUnit() const return m_pImpl->m_eXMLMeasureUnit; } +SvtSaveOptions::ODFSaneDefaultVersion SvXMLUnitConverter::getSaneDefaultVersion() const +{ + return m_pImpl->m_eODFVersion; +} + +void SvXMLUnitConverter::overrideSaneDefaultVersion( + SvtSaveOptions::ODFSaneDefaultVersion const nODFVersion) +{ + m_pImpl->m_eODFVersion = nODFVersion; +} + /** constructs a SvXMLUnitConverter. The core measure unit is the default unit for numerical measures, the XML measure unit is the default unit for textual measures @@ -125,8 +139,9 @@ sal_Int16 SvXMLUnitConverter::GetXMLMeasureUnit() const SvXMLUnitConverter::SvXMLUnitConverter( const uno::Reference<uno::XComponentContext>& xContext, sal_Int16 const eCoreMeasureUnit, - sal_Int16 const eXMLMeasureUnit) -: m_pImpl(new Impl(xContext, eCoreMeasureUnit, eXMLMeasureUnit)) + sal_Int16 const eXMLMeasureUnit, + SvtSaveOptions::ODFSaneDefaultVersion const nODFVersion) +: m_pImpl(new Impl(xContext, eCoreMeasureUnit, eXMLMeasureUnit, nODFVersion)) { } diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index bab2dc2aa27f..652bce79610d 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1528,7 +1528,7 @@ OUString SdXMLExport::ImpCreatePresPageStyleName( const Reference<XDrawPage>& xD const rtl::Reference< SvXMLExportPropertyMapper > aMapperRef( GetPresPagePropsMapper() ); - std::vector< XMLPropertyState > aPropStates( aMapperRef->Filter( xPropSet ) ); + std::vector<XMLPropertyState> aPropStates(aMapperRef->Filter(*this, xPropSet)); if( !aPropStates.empty() ) { diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 96971ab4c555..e68bf388325f 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -392,7 +392,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap sal_Int32 nCount = 0; if( !bIsEmptyPresObj || (aShapeInfo.meShapeType != XmlShapeTypePresPageShape) ) { - aPropStates = GetPropertySetMapper()->Filter( xPropSet ); + aPropStates = GetPropertySetMapper()->Filter(mrExport, xPropSet); if (XmlShapeTypeDrawControlShape == aShapeInfo.meShapeType) { @@ -443,7 +443,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap // optionally generate auto style for text attributes if( (!bIsEmptyPresObj || (aShapeInfo.meShapeType != XmlShapeTypePresPageShape)) && bObjSupportsText ) { - aPropStates = GetExport().GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter( xPropSet ); + aPropStates = GetExport().GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter(mrExport, xPropSet); // yet more additionally, we need to care for the ParaAdjust property if ( XmlShapeTypeDrawControlShape == aShapeInfo.meShapeType ) diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index c587394d383f..e87d8fae9fc3 100644 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -569,7 +569,7 @@ namespace xmloff // determine a number style, if needed xColumnPropertiesMeta = xColumnProperties->getPropertySetInfo(); // get the styles of the column - ::std::vector< XMLPropertyState > aPropertyStates = m_xStyleExportMapper->Filter( xColumnProperties ); + ::std::vector<XMLPropertyState> aPropertyStates = m_xStyleExportMapper->Filter(m_rContext, xColumnProperties); // care for the number format, additionally OUString sColumnNumberStyle; diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 0f00a2c13bb6..b9f3c95a47d6 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -71,7 +71,7 @@ void XMLPageExport::collectPageMasterAutoStyle( SAL_WARN_IF( !xPageMasterPropSetMapper.is(), "xmloff", "page master family/XMLPageMasterPropSetMapper not found" ); if( xPageMasterPropSetMapper.is() ) { - ::std::vector<XMLPropertyState> aPropStates = xPageMasterExportPropMapper->Filter( rPropSet ); + ::std::vector<XMLPropertyState> aPropStates = xPageMasterExportPropMapper->Filter(rExport, rPropSet); if( !aPropStates.empty()) { OUString sParent; @@ -84,7 +84,7 @@ void XMLPageExport::collectPageMasterAutoStyle( } assert(m_xPageMasterDrawingPageExportPropMapper.is()); ::std::vector<XMLPropertyState> const aPropStates( - m_xPageMasterDrawingPageExportPropMapper->Filter(rPropSet)); + m_xPageMasterDrawingPageExportPropMapper->Filter(rExport, rPropSet)); if (!aPropStates.empty()) { OUString sParent; @@ -287,7 +287,7 @@ void XMLPageExport::exportDefaultStyle() GetExport().CheckAttrList(); ::std::vector< XMLPropertyState > aPropStates = - xPageMasterExportPropMapper->FilterDefaults( xPropSet ); + xPageMasterExportPropMapper->FilterDefaults(rExport, xPropSet); bool bExport = false; rtl::Reference < XMLPropertySetMapper > aPropMapper(xPageMasterExportPropMapper->getPropertySetMapper()); diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx index 2834e519d122..4b6b1aebbf1d 100644 --- a/xmloff/source/style/chrlohdl.cxx +++ b/xmloff/source/style/chrlohdl.cxx @@ -218,7 +218,8 @@ bool XMLCharScriptHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue return true; } -bool XMLCharScriptHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& ) const +bool XMLCharScriptHdl::exportXML(OUString& rStrExpValue, + const uno::Any& rValue, const SvXMLUnitConverter& rUnitConv) const { lang::Locale aLocale; if(!(rValue >>= aLocale)) @@ -233,7 +234,7 @@ bool XMLCharScriptHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue if (!aLanguageTag.hasScript()) return false; - if (SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012) + if (rUnitConv.getSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012) return false; OUString aLanguage, aCountry; @@ -346,7 +347,8 @@ bool XMLCharRfcLanguageTagHdl::importXML( const OUString& rStrImpValue, uno::Any return true; } -bool XMLCharRfcLanguageTagHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& ) const +bool XMLCharRfcLanguageTagHdl::exportXML(OUString& rStrExpValue, + const uno::Any& rValue, const SvXMLUnitConverter& rUnitConv) const { lang::Locale aLocale; if(!(rValue >>= aLocale)) @@ -356,7 +358,7 @@ bool XMLCharRfcLanguageTagHdl::exportXML( OUString& rStrExpValue, const uno::Any if (aLocale.Variant.isEmpty()) return false; - if (SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012) + if (rUnitConv.getSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012) return false; rStrExpValue = aLocale.Variant; diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 734318a0ab13..8b4256a3d043 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -361,7 +361,7 @@ bool XMLStyleExport::exportStyle( // <style:properties> ::std::vector< XMLPropertyState > aPropStates = - rPropMapper->Filter( xPropSet, true ); + rPropMapper->Filter(GetExport(), xPropSet, true); bool const bUseExtensionNamespaceForGraphicProperties( rXMLFamily != "drawing-page" && rXMLFamily != "graphic" && @@ -401,7 +401,7 @@ void XMLStyleExport::exportDefaultStyle( true, true ); // <style:properties> ::std::vector< XMLPropertyState > aPropStates = - rPropMapper->FilterDefaults( xPropSet ); + rPropMapper->FilterDefaults(GetExport(), xPropSet); rPropMapper->exportXML( GetExport(), aPropStates, SvXmlExportFlags::IGN_WS ); } diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index 129a568065c1..aeda6e081405 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -512,18 +512,21 @@ void SvXMLExportPropertyMapper::ChainExportMapper( } std::vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter( + SvXMLExport const& rExport, const uno::Reference<beans::XPropertySet>& rPropSet, bool bEnableFoFontFamily ) const { - return Filter_(rPropSet, false, bEnableFoFontFamily); + return Filter_(rExport, rPropSet, false, bEnableFoFontFamily); } std::vector<XMLPropertyState> SvXMLExportPropertyMapper::FilterDefaults( + SvXMLExport const& rExport, const uno::Reference<beans::XPropertySet>& rPropSet ) const { - return Filter_(rPropSet, true, false/*bEnableFoFontFamily*/); + return Filter_(rExport, rPropSet, true, false/*bEnableFoFontFamily*/); } vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_( + SvXMLExport const& rExport, const Reference<XPropertySet>& xPropSet, bool bDefault, bool bEnableFoFontFamily ) const { vector< XMLPropertyState > aPropStateArray; @@ -545,7 +548,7 @@ vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_( if( !pFilterInfo ) { assert(SvtSaveOptions().GetODFDefaultVersion() != SvtSaveOptions::ODFVER_UNKNOWN); - const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(rExport.getSaneDefaultVersion()); pFilterInfo = new FilterPropertiesInfo_Impl; for( sal_Int32 i=0; i < nProps; i++ ) { diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index 9f1bcd88ff2e..6deb085fcba7 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -235,7 +235,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) for( sal_Int32 nColumn = 0; nColumn < nColumnCount; ++nColumn ) try { Reference< XPropertySet > xPropSet( xIndexAccessCols->getByIndex(nColumn) , UNO_QUERY_THROW ); - std::vector< XMLPropertyState > aPropStates( mxColumnExportPropertySetMapper->Filter( xPropSet ) ); + std::vector<XMLPropertyState> aPropStates(mxColumnExportPropertySetMapper->Filter(mrExport, xPropSet)); if( has_states( aPropStates ) ) { @@ -259,7 +259,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) try { Reference< XPropertySet > xPropSet( xIndexAccessRows->getByIndex(nRow) , UNO_QUERY_THROW ); - std::vector< XMLPropertyState > aRowPropStates( mxRowExportPropertySetMapper->Filter( xPropSet ) ); + std::vector<XMLPropertyState> aRowPropStates(mxRowExportPropertySetMapper->Filter(mrExport, xPropSet)); if( has_states( aRowPropStates ) ) { @@ -287,7 +287,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) // create auto style, if needed OUString sStyleName; - std::vector< XMLPropertyState > aCellPropStates( mxCellExportPropertySetMapper->Filter( xCellSet ) ); + std::vector<XMLPropertyState> aCellPropStates(mxCellExportPropertySetMapper->Filter(mrExport, xCellSet)); if( has_states( aCellPropStates ) ) sStyleName = mrExport.GetAutoStylePool()->Add(XmlStyleFamily::TABLE_CELL, aCellPropStates); else diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index bc12e93ba4be..b5c5de5b9133 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -535,7 +535,7 @@ void XMLTextParagraphExport::Add( XmlStyleFamily nFamily, SAL_WARN_IF( !xPropMapper.is(), "xmloff", "There is the property mapper?" ); vector< XMLPropertyState > aPropStates = - xPropMapper->Filter( rPropSet ); + xPropMapper->Filter(GetExport(), rPropSet); if( ppAddStates ) { @@ -667,7 +667,7 @@ void XMLTextParagraphExport::Add( XmlStyleFamily nFamily, } SAL_WARN_IF( !xPropMapper.is(), "xmloff", "There is the property mapper?" ); - vector< XMLPropertyState > aPropStates(xPropMapper->Filter( rPropSet )); + vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); if( rPropSetHelper.hasProperty( NUMBERING_RULES_AUTO ) ) { @@ -764,7 +764,7 @@ OUString XMLTextParagraphExport::Find( SAL_WARN_IF( !xPropMapper.is(), "xmloff", "There is the property mapper?" ); if( !xPropMapper.is() ) return sName; - vector< XMLPropertyState > aPropStates(xPropMapper->Filter( rPropSet )); + vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); if( ppAddStates ) { while( *ppAddStates ) @@ -787,7 +787,7 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink( const XMLPropertyState** ppAddStates ) const { rtl::Reference < SvXMLExportPropertyMapper > xPropMapper(GetTextPropMapper()); - vector< XMLPropertyState > aPropStates(xPropMapper->Filter( rPropSet )); + vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); // Get parent and remove hyperlinks (they aren't of interest) OUString sName; |