diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-21 18:57:52 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-05-07 19:01:01 +0200 |
commit | 45f2e81c98a5b7fe6f021923fd93d20b3c5f3815 (patch) | |
tree | 21bd3ac8aeeb7fef7c88c59c02fdb1ad7d2366b3 /xmloff | |
parent | 6ba74150866d71469827de9f4f19268dfa7db137 (diff) |
replace ODFDefaultVersion usage with ODFSaneDefaultVersion
Compare with ODFSVER_012 mostly works the same, except for places where
namespaces are defined where the ODFSVER_EXTENDED bit should be checked.
Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92727
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/PropertyMaps.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 70 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLTools.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 32 | ||||
-rw-r--r-- | xmloff/source/draw/sdpropls.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 16 | ||||
-rw-r--r-- | xmloff/source/style/XMLPageExport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/chrlohdl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlexppr.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlnume.cxx | 22 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 16 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 28 |
17 files changed, 118 insertions, 118 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index c7adfe787f8a..bfa7ea8829d3 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -424,8 +424,8 @@ void XMLChartExportPropertyMapper::handleSpecialItem( { if( ( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT ) { - const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentVersion < SvtSaveOptions::ODFVER_012 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFSaneDefaultVersion() ); + if (nCurrentVersion < SvtSaveOptions::ODFSVER_012) sValueBuffer.append( GetXMLToken( XML_PERCENTAGE )); else sValueBuffer.append( GetXMLToken( XML_VALUE_AND_PERCENTAGE )); @@ -476,7 +476,7 @@ void XMLChartExportPropertyMapper::handleSpecialItem( break; case XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE: { - const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() ); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFSaneDefaultVersion() ); OUString aServiceName; rProperty.maValue >>= aServiceName; @@ -488,9 +488,9 @@ void XMLChartExportPropertyMapper::handleSpecialItem( sValueBuffer.append( GetXMLToken( XML_EXPONENTIAL )); else if (aServiceName == "com.sun.star.chart2.PotentialRegressionCurve") sValueBuffer.append( GetXMLToken( XML_POWER )); - else if (nCurrentVersion > SvtSaveOptions::ODFVER_012 && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve") + else if (nCurrentVersion > SvtSaveOptions::ODFSVER_012 && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve") sValueBuffer.append( GetXMLToken( XML_POLYNOMIAL )); - else if (nCurrentVersion > SvtSaveOptions::ODFVER_012 && aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve") + else if (nCurrentVersion > SvtSaveOptions::ODFSVER_012 && aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve") sValueBuffer.append( GetXMLToken( XML_MOVING_AVERAGE )); } break; diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index c77f99beb1d9..49cd2dbb9945 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -285,8 +285,8 @@ CustomLabelSeq lcl_getCustomLabelField(sal_Int32 nDataPointIndex, if( !rSeries.is() ) return CustomLabelSeq(); - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older return CustomLabelSeq(); if(Reference<beans::XPropertySet> xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is()) @@ -307,8 +307,8 @@ css::chart2::RelativePosition lcl_getCustomLabelPosition(sal_Int32 nDataPointInd if (!rSeries.is()) return chart2::RelativePosition(); - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFDefaultVersion()); - if (nCurrentODFVersion <= SvtSaveOptions::ODFVER_012)//do not export to ODF 1.2 or older + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older return chart2::RelativePosition(); if (Reference<beans::XPropertySet> xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is()) @@ -1197,8 +1197,8 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > if( bExportContent ) { //export data provider in xlink:href attribute - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012) { OUString aDataProviderURL( ".." ); if( xNewDoc->hasInternalDataProvider() ) @@ -1214,7 +1214,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > } Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider(xNewDoc->getDataProvider(), uno::UNO_QUERY); - if (xPivotTableDataProvider.is() && nCurrentODFVersion > SvtSaveOptions::ODFVER_012) + if (xPivotTableDataProvider.is() && nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) { OUString sPivotTableName = xPivotTableDataProvider->getPivotTableName(); mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_DATA_PILOT_SOURCE, sPivotTableName); @@ -1370,7 +1370,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > Reference< beans::XPropertySet > xProp( rChartDoc->getLegend(), uno::UNO_QUERY ); if( xProp.is()) { - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); // export legend anchor position try @@ -1387,7 +1387,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > // export legend overlay try { - if (nCurrentODFVersion > SvtSaveOptions::ODFVER_012) + if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) { Any aAny( xProp->getPropertyValue("Overlay")); if(aAny.get<bool>()) @@ -1404,7 +1404,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > addPosition( xLegendShape ); // export legend size - if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 ) + if (xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012) { try { @@ -1419,7 +1419,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > { awt::Size aSize( xLegendShape->getSize() ); // tdf#131966: chart legend attributes width and height shouldn't be exported to ODF 1.2 (strict) - if (nCurrentODFVersion > SvtSaveOptions::ODFVER_012) + if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) addSize( aSize, true ); OUStringBuffer aAspectRatioString; ::sax::Converter::convertDouble( @@ -2105,8 +2105,8 @@ void SchXMLExportHelper_Impl::exportPlotArea( void SchXMLExportHelper_Impl::exportCoordinateRegion( const uno::Reference< chart::XDiagram >& xDiagram ) { - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older return; Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY ); @@ -2225,8 +2225,8 @@ bool lcl_exportAxisType( const Reference< chart2::XAxis >& rChart2Axis, SvXMLExp if( !rChart2Axis.is() ) return bExportDateScale; - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older return bExportDateScale; chart2::ScaleData aScale( rChart2Axis->getScaleData() ); @@ -2298,8 +2298,8 @@ void SchXMLExportHelper_Impl::exportAxis( // get property states for autostyles if( rAxisProps.is() && mxExpPropMapper.is() ) { - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFDefaultVersion()); - if (nCurrentODFVersion > SvtSaveOptions::ODFVER_012 && eDimension == XML_X) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012 && eDimension == XML_X) { chart2::ScaleData aScaleData(rChart2Axis->getScaleData()); bool bShiftedCatPos = aScaleData.ShiftedCategoryPosition; @@ -2664,8 +2664,8 @@ void SchXMLExportHelper_Impl::exportSeries( TOOLS_INFO_EXCEPTION("xmloff.chart", "Required property not found in DataRowProperties" ); } - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012) { lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport ); lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport ); @@ -2697,8 +2697,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::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion > SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older { if (xPropSet.is()) { @@ -2868,8 +2868,8 @@ void SchXMLExportHelper_Impl::exportSeries( uno::Reference< beans::XPropertySet >( aSeriesSeq[nSeriesIdx], uno::UNO_QUERY ), nSeriesLength, xNewDiagram, bExportContent ); - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( bExportContent && nCurrentODFVersion > SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (bExportContent && nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older { Sequence< OUString > aSupportedMappings = rChartType->getSupportedPropertyRoles(); exportPropertyMapping( xSource, aSupportedMappings ); @@ -2961,8 +2961,8 @@ void SchXMLExportHelper_Impl::exportRegressionCurve( xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient") >>= bShowRSquared; bExportEquation = ( bShowEquation || bShowRSquared ); - const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentVersion < SvtSaveOptions::ODFVER_012 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentVersion < SvtSaveOptions::ODFSVER_012) { bExportEquation=false; } @@ -3037,10 +3037,10 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe { assert(mxExpPropMapper.is()); - const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() ); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); /// Don't export X ErrorBars for older ODF versions. - if ( !bYError && nCurrentVersion < SvtSaveOptions::ODFVER_012 ) + if (!bYError && nCurrentVersion < SvtSaveOptions::ODFSVER_012) return; if (xSeriesProp.is()) @@ -3095,7 +3095,7 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe // add style name attribute AddAutoStyleAttribute( aPropertyStates ); - if( nCurrentVersion >= SvtSaveOptions::ODFVER_012 ) + if (nCurrentVersion >= SvtSaveOptions::ODFSVER_012) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_DIMENSION, bYError ? XML_Y : XML_X );//#i114149# SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_ERROR_INDICATOR, true, true ); } @@ -3251,8 +3251,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( xSeriesProperties->getPropertyValue("AttributedDataPoints") >>= aDataPointSeq; xSeriesProperties->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint; - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion > SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older xSeriesProperties->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq; } @@ -3304,8 +3304,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( SAL_WARN_IF( !xPropSet.is(), "xmloff.chart", "Pie Segments should have properties" ); if( xPropSet.is()) { - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 && bExportNumFmt ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012 && bExportNumFmt) { lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport ); lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport ); @@ -3366,8 +3366,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( } if( xPropSet.is()) { - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012) { lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport ); lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport ); @@ -3588,7 +3588,7 @@ SchXMLExport::SchXMLExport(const Reference<uno::XComponentContext>& xContext, , maAutoStylePool(new SchXMLAutoStylePoolP(*this)) , maExportHelper(new SchXMLExportHelper(*this, *maAutoStylePool)) { - if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) + if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) GetNamespaceMap_().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); } diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 14eee9b365a0..f500ae82046a 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -609,8 +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::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion == SvtSaveOptions::ODFVER_010 || nCurrentODFVersion == SvtSaveOptions::ODFVER_011 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + 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 SvXMLElementExport aEmptyShapeGroup( rExport, XML_NAMESPACE_DRAW, diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx index 59fbc83c689a..0a14b506352a 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx @@ -38,8 +38,8 @@ bool XMLErrorBarStylePropertyHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const { uno::Any aValue(rValue); - const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentVersion < SvtSaveOptions::ODFVER_012 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentVersion < SvtSaveOptions::ODFSVER_012) { sal_Int32 nValue = 0; if(rValue >>= nValue ) diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 6184fe2680c1..b22b7b58b5c4 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -353,7 +353,7 @@ void SvXMLExport::InitCtor_() mpNamespaceMap->Add( GetXMLToken(XML_NP_OOOC), GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC ); mpNamespaceMap->Add( GetXMLToken(XML_NP_OF), GetXMLToken(XML_N_OF), XML_NAMESPACE_OF ); - if (getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) { mpNamespaceMap->Add( GetXMLToken(XML_NP_TABLE_EXT), GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT); @@ -1005,7 +1005,7 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref if (bWriteEmpty || !rLanguageTag.isSystemLocale()) { AddAttribute( nPrefix, XML_LANGUAGE, rLanguageTag.getLanguage()); - if (rLanguageTag.hasScript() && getDefaultVersion() >= SvtSaveOptions::ODFVER_012) + if (rLanguageTag.hasScript() && getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012) AddAttribute( nPrefix, XML_SCRIPT, rLanguageTag.getScript()); if (bWriteEmpty || !rLanguageTag.getCountry().isEmpty()) AddAttribute( nPrefix, XML_COUNTRY, rLanguageTag.getCountry()); @@ -1013,7 +1013,7 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref } else { - if (getDefaultVersion() >= SvtSaveOptions::ODFVER_012) + if (getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012) AddAttribute( nPrefixRfc, XML_RFC_LANGUAGE_TAG, rLanguageTag.getBcp47()); // Also in case of non-pure-ISO tag store best matching fo: attributes // for consumers not handling *:rfc-language-tag, ensuring that only @@ -1024,7 +1024,7 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref if (!aLanguage.isEmpty()) { AddAttribute( nPrefix, XML_LANGUAGE, aLanguage); - if (!aScript.isEmpty() && getDefaultVersion() >= SvtSaveOptions::ODFVER_012) + if (!aScript.isEmpty() && getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012) AddAttribute( nPrefix, XML_SCRIPT, aScript); if (!aCountry.isEmpty()) AddAttribute( nPrefix, XML_COUNTRY, aCountry); @@ -1203,9 +1203,9 @@ static void lcl_AddGrddl(SvXMLExport const & rExport, const SvXMLExportFlags /*nExportMode*/) { // check version >= 1.2 - switch (rExport.getDefaultVersion()) { - case SvtSaveOptions::ODFVER_011: // fall through - case SvtSaveOptions::ODFVER_010: return; + switch (rExport.getSaneDefaultVersion()) { + case SvtSaveOptions::ODFSVER_011: // fall through + case SvtSaveOptions::ODFSVER_010: return; default: break; } @@ -2322,9 +2322,9 @@ void SvXMLExport::AddAttributeIdLegacy( sal_uInt16 const nLegacyPrefix, OUString const& rValue) { - switch (getDefaultVersion()) { - case SvtSaveOptions::ODFVER_011: // fall through - case SvtSaveOptions::ODFVER_010: break; + switch (getSaneDefaultVersion()) { + case SvtSaveOptions::ODFSVER_011: // fall through + case SvtSaveOptions::ODFSVER_010: break; default: // ODF 1.2: xml:id AddAttribute(XML_NAMESPACE_XML, XML_ID, rValue); } @@ -2338,9 +2338,9 @@ void SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc) { // check version >= 1.2 - switch (getDefaultVersion()) { - case SvtSaveOptions::ODFVER_011: // fall through - case SvtSaveOptions::ODFVER_010: return; + switch (getSaneDefaultVersion()) { + case SvtSaveOptions::ODFSVER_011: // fall through + case SvtSaveOptions::ODFSVER_010: return; default: break; } const uno::Reference<rdf::XMetadatable> xMeta(i_xIfc, @@ -2389,9 +2389,9 @@ SvXMLExport::AddAttributesRDFa( uno::Reference<text::XTextContent> const & i_xTextContent) { // check version >= 1.2 - switch (getDefaultVersion()) { - case SvtSaveOptions::ODFVER_011: // fall through - case SvtSaveOptions::ODFVER_010: return; + switch (getSaneDefaultVersion()) { + case SvtSaveOptions::ODFSVER_011: // fall through + case SvtSaveOptions::ODFSVER_010: return; default: break; } diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 16c593b7a87b..fdeb89059d02 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -1176,8 +1176,8 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy if (mpExport #if 1 // TODO: remove in a couple releases, when users have the import of style:shrink-to-fit - && (mpExport->getDefaultVersion() - <= SvtSaveOptions::ODFVER_012) + && (mpExport->getSaneDefaultVersion() + <= SvtSaveOptions::ODFSVER_012) #endif ) { diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 03c769cce1a4..2432d0756c07 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -553,7 +553,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent GetXMLToken(XML_N_ANIMATION), XML_NAMESPACE_ANIMATION); - if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) + if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) { GetNamespaceMap_().Add( GetXMLToken(XML_NP_OFFICE_EXT), @@ -1996,7 +1996,7 @@ void SdXMLExport::ExportStyles_(bool bUsed) GetShapeExport()->ExportGraphicDefaults(); // do not export in ODF 1.1 or older - if( getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) + if (getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012) GetShapeExport()->GetShapeTableExport()->exportTableStyles(); // write presentation styles @@ -2500,7 +2500,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage ) { // do not export in ODF 1.2 or older - if( getDefaultVersion() <= SvtSaveOptions::ODFVER_012 ) + if (getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012) return; Reference< XAnnotationAccess > xAnnotationAccess( xDrawPage, UNO_QUERY ); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 370bfcf3e44f..f75e334a246c 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -728,7 +728,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } // export draw:display (do not export in ODF 1.2 or older) - if( xSet.is() && ( mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) ) + if (xSet.is() && (mrExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)) { if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape && aShapeInfo.meShapeType != XmlShapeTypeHandoutShape && aShapeInfo.meShapeType != XmlShapeTypeDrawChartShape ) @@ -1563,7 +1563,7 @@ void XMLShapeExport::ImpExportText( const uno::Reference< drawing::XShape >& xSh { if (eExtensionNS == TextPNS::EXTENSION) { - if (mrExport.getDefaultVersion() <= SvtSaveOptions::ODFVER_012) + if (mrExport.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012) { return; // do not export to ODF 1.1/1.2 } @@ -2408,7 +2408,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( } { - if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { if (sOutMimeType.isEmpty()) { @@ -2456,7 +2456,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); } - if (!aMimeType.isEmpty() && GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (!aMimeType.isEmpty() && GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "mime-type", aMimeType); SvXMLElementExport aElement(mrExport, XML_NAMESPACE_DRAW, XML_IMAGE, true, true); @@ -2475,7 +2475,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( ImpExportDescription( xShape ); // #i68101# // Signature Line, QR Code - needs to be after the images! - if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { ImpExportSignatureLine(xShape); ImpExportQRCode(xShape); @@ -4116,7 +4116,7 @@ static void ImpExportEnhancedPath( SvXMLExport& rExport, } aStr = aStrBuffer.makeStringAndClear(); rExport.AddAttribute( bExtended ? XML_NAMESPACE_DRAW_EXT : XML_NAMESPACE_DRAW, XML_ENHANCED_PATH, aStr ); - if ( !bExtended && bNeedExtended && (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) ) + if (!bExtended && bNeedExtended && (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)) ImpExportEnhancedPath( rExport, rCoordinates, rSegments, true ); } @@ -4579,7 +4579,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc case EAS_SubViewSize: { // export draw:sub-view-size (do not export in ODF 1.2 or older) - if (rExport.getDefaultVersion() <= SvtSaveOptions::ODFVER_012) + if (rExport.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012) { continue; } @@ -4835,7 +4835,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape SvXMLElementExport aElement( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true ); // do not export in ODF 1.1 or older - if( mrExport.getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) + if (mrExport.getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012) { if( !bIsEmptyPresObj ) { diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 7db579e23608..7a07e732626d 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -241,8 +241,8 @@ void XMLPageExport::exportDefaultStyle() if( bExport ) { - assert(GetExport().getDefaultVersion() - >= SvtSaveOptions::ODFVER_012); + assert(GetExport().getSaneDefaultVersion() + >= SvtSaveOptions::ODFSVER_012); //<style:default-page-layout> SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx index c945b3f91d65..2834e519d122 100644 --- a/xmloff/source/style/chrlohdl.cxx +++ b/xmloff/source/style/chrlohdl.cxx @@ -233,7 +233,7 @@ bool XMLCharScriptHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue if (!aLanguageTag.hasScript()) return false; - if (SvtSaveOptions().GetODFDefaultVersion() < SvtSaveOptions::ODFVER_012) + if (SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012) return false; OUString aLanguage, aCountry; @@ -356,7 +356,7 @@ bool XMLCharRfcLanguageTagHdl::exportXML( OUString& rStrExpValue, const uno::Any if (aLocale.Variant.isEmpty()) return false; - if (SvtSaveOptions().GetODFDefaultVersion() < SvtSaveOptions::ODFVER_012) + if (SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012) return false; rStrExpValue = aLocale.Variant; diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 127526346695..32c8be5408e6 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -231,7 +231,7 @@ bool XMLStyleExport::exportStyle( since ODF 1.2. Thus, suppress its export for former versions. (#i104889#) */ if ( ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) && - GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) + GetExport().getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012) { GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DEFAULT_OUTLINE_LEVEL, diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index cec29f36374c..80f90fdf9edb 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -789,7 +789,7 @@ void SvXMLExportPropertyMapper::exportXML( aPropTokens[i].eToken == xmloff::token::XML_GRAPHIC_PROPERTIES) { nNamespace = XML_NAMESPACE_LO_EXT; - if (rExport.getDefaultVersion() <= SvtSaveOptions::ODFVER_012) + if (rExport.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012) { continue; // don't write for ODF <= 1.2 } diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index eede84316e92..b6a99a179b4b 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -614,15 +614,15 @@ SvxXMLNumRuleExport::SvxXMLNumRuleExport( SvXMLExport& rExp ) : // Let list style creation depend on Load/Save option "ODF format version" (#i89178#) mbExportPositionAndSpaceModeLabelAlignment( true ) { - switch ( GetExport().getDefaultVersion() ) + switch (GetExport().getSaneDefaultVersion()) { - case SvtSaveOptions::ODFVER_010: - case SvtSaveOptions::ODFVER_011: + case SvtSaveOptions::ODFSVER_010: + case SvtSaveOptions::ODFSVER_011: { mbExportPositionAndSpaceModeLabelAlignment = false; } break; - default: // ODFVER_UNKNOWN or ODFVER_012 + default: // >= ODFSVER_012 { mbExportPositionAndSpaceModeLabelAlignment = true; } @@ -736,18 +736,18 @@ void SvxXMLNumRuleExport::exportOutline() xNumRulePropSet->getPropertyValue( sName ) >>= sOutlineStyleName; } } - const SvtSaveOptions::ODFDefaultVersion nODFVersion = - GetExport().getDefaultVersion(); - if ( ( nODFVersion == SvtSaveOptions::ODFVER_010 || - nODFVersion == SvtSaveOptions::ODFVER_011 ) && - GetExport().writeOutlineStyleAsNormalListStyle() ) + const SvtSaveOptions::ODFSaneDefaultVersion nODFVersion = + GetExport().getSaneDefaultVersion(); + if ((nODFVersion == SvtSaveOptions::ODFSVER_010 || + nODFVersion == SvtSaveOptions::ODFSVER_011) + && GetExport().writeOutlineStyleAsNormalListStyle()) { exportNumberingRule( sOutlineStyleName, false, xNumRule ); } else { - if ( nODFVersion != SvtSaveOptions::ODFVER_010 && - nODFVersion != SvtSaveOptions::ODFVER_011 ) + if (nODFVersion != SvtSaveOptions::ODFSVER_010 && + nODFVersion != SvtSaveOptions::ODFSVER_011) { // style:name="..." GetExport().CheckAttrList(); diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 680368de6a00..d17266d5f15a 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1699,7 +1699,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt break; case NF_SYMBOLTYPE_STAR : // export only if ODF 1.2 extensions are enabled - if( rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) + if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { if ( pElemStr && pElemStr->getLength() > 1 ) WriteRepeatedElement_Impl( (*pElemStr)[1] ); diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index ff084a9185b0..e69e6e11487a 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -397,7 +397,7 @@ void XMLSectionExport::ExportRegularSectionStart( // in ODF 1.0/1.1 the algorithm was left unspecified so we can write anything GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTION_KEY, aBuffer.makeStringAndClear()); - if (aPassword.getLength() == 32 && GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012) + if (aPassword.getLength() == 32 && GetExport().getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012) { // attribute exists in ODF 1.2 or later; default is SHA1 so no need to write that GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTION_KEY_DIGEST_ALGORITHM, @@ -1180,7 +1180,7 @@ void XMLSectionExport::ExportIndexTemplateElement( bool bWithTabStopOK = false; //i90246, the ODF version being written to is: - const SvtSaveOptions::ODFDefaultVersion aODFVersion = rExport.getDefaultVersion(); + const SvtSaveOptions::ODFSaneDefaultVersion aODFVersion = rExport.getSaneDefaultVersion(); //the above version cannot be used for old OOo (OOo 1.0) formats! // token type @@ -1310,7 +1310,7 @@ void XMLSectionExport::ExportIndexTemplateElement( { case TOK_TTYPE_HYPERLINK_START: case TOK_TTYPE_HYPERLINK_END: - if (SvtSaveOptions::ODFVER_012 < aODFVersion) + if (SvtSaveOptions::ODFSVER_012 < aODFVersion) { assert(eType == TEXT_SECTION_TYPE_ILLUSTRATION || eType == TEXT_SECTION_TYPE_OBJECT @@ -1330,8 +1330,8 @@ void XMLSectionExport::ExportIndexTemplateElement( //--->i90246 //check the ODF version being exported - if( aODFVersion == SvtSaveOptions::ODFVER_011 - || aODFVersion == SvtSaveOptions::ODFVER_010) + if (aODFVersion == SvtSaveOptions::ODFSVER_011 + || aODFVersion == SvtSaveOptions::ODFSVER_010) { bLevelOK = false; if (TOK_TTYPE_CHAPTER_INFO == nTokenType) diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index ca4cc01901d5..b6876a1e63c5 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1619,7 +1619,7 @@ void XMLTextFieldExport::ExportFieldHelper( GetInt16Property(gsPropertySequenceNumber, rPropSet), GetStringProperty(gsPropertySourceName, rPropSet) ) ); if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) && - SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012) + SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { // export text:reference-language attribute, if not empty ProcessString(XML_REFERENCE_LANGUAGE, @@ -1641,7 +1641,7 @@ void XMLTextFieldExport::ExportFieldHelper( ProcessString(XML_REF_NAME, GetStringProperty(gsPropertySourceName, rPropSet)); if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) && - SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012) + SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { // export text:reference-language attribute, if not empty ProcessString(XML_REFERENCE_LANGUAGE, @@ -1666,7 +1666,7 @@ void XMLTextFieldExport::ExportFieldHelper( MakeFootnoteRefName(GetInt16Property( gsPropertySequenceNumber, rPropSet))); if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) && - SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012) + SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { // export text:reference-language attribute, if not empty ProcessString(XML_REFERENCE_LANGUAGE, @@ -1694,7 +1694,7 @@ void XMLTextFieldExport::ExportFieldHelper( case FIELD_ID_PAGENAME: { - if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT, XML_PAGE_NAME, false, false ); GetExport().Characters( sPresentation ); @@ -1794,7 +1794,7 @@ void XMLTextFieldExport::ExportFieldHelper( GetExport().Characters(aBuffer.makeStringAndClear()); } - if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { // initials OUString aInitials( GetStringProperty(gsPropertyInitials, rPropSet) ); @@ -2312,9 +2312,9 @@ void XMLTextFieldExport::ExportMetaField( { bool doExport(!i_bAutoStyles); // do not export element if autostyles // check version >= 1.2 - switch (GetExport().getDefaultVersion()) { - case SvtSaveOptions::ODFVER_011: // fall through - case SvtSaveOptions::ODFVER_010: doExport = false; break; + switch (GetExport().getSaneDefaultVersion()) { + case SvtSaveOptions::ODFSVER_011: // fall through + case SvtSaveOptions::ODFSVER_010: doExport = false; break; default: break; } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 4aa66869a9f8..a3de06e07939 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -922,8 +922,8 @@ void XMLTextParagraphExport::exportListChange( const bool bExportODF = bool( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ); - const SvtSaveOptions::ODFDefaultVersion eODFDefaultVersion = - GetExport().getDefaultVersion(); + const SvtSaveOptions::ODFSaneDefaultVersion eODFDefaultVersion = + GetExport().getSaneDefaultVersion(); // start a new list if ( rNextInfo.GetLevel() > 0 ) @@ -964,7 +964,7 @@ void XMLTextParagraphExport::exportListChange( if ( !mpTextListsHelper->IsListProcessed( sListId ) ) { if ( bExportODF && - eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && + eODFDefaultVersion >= SvtSaveOptions::ODFSVER_012 && !sListId.isEmpty() ) { /* Property text:id at element <text:list> has to be @@ -983,7 +983,7 @@ void XMLTextParagraphExport::exportListChange( const OUString sNewListId( mpTextListsHelper->GenerateNewListId() ); if ( bExportODF && - eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && + eODFDefaultVersion >= SvtSaveOptions::ODFSVER_012 && !sListId.isEmpty() ) { /* Property text:id at element <text:list> has to be @@ -1014,7 +1014,7 @@ void XMLTextParagraphExport::exportListChange( else { if ( bExportODF && - eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && + eODFDefaultVersion >= SvtSaveOptions::ODFSVER_012 && !sListId.isEmpty() ) { GetExport().AddAttribute( XML_NAMESPACE_TEXT, @@ -1182,7 +1182,7 @@ void XMLTextParagraphExport::exportListChange( aBuffer.makeStringAndClear() ); } if ( ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) && - GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) + GetExport().getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012) { const OUString& sListStyleName( rNextInfo.GetNumRulesName() ); if ( !mpTextListsHelper->EqualsToTopListStyleOnStack( sListStyleName ) ) @@ -2244,7 +2244,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( /* As of now, textmarks are a proposed extension to the OpenDocument standard. */ if (!bAutoStyles) { - if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY); if (xBookmark.is()) @@ -2310,7 +2310,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( { Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY); - if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { SvXMLElementExport aElem( GetExport(), !bAutoStyles, XML_NAMESPACE_FIELD, XML_FIELDMARK_END, @@ -2346,7 +2346,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( { if (!bAutoStyles) { - if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY); if (xBookmark.is()) @@ -3160,7 +3160,7 @@ void XMLTextParagraphExport::_exportTextGraphic( GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_FILTER_NAME, sGrfFilter ); - if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { if (sOutMimeType.isEmpty()) { @@ -3208,7 +3208,7 @@ void XMLTextParagraphExport::_exportTextGraphic( GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD); } - if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { if (sOutMimeType.isEmpty()) { @@ -3785,9 +3785,9 @@ void XMLTextParagraphExport::exportMeta( { bool doExport(!i_bAutoStyles); // do not export element if autostyles // check version >= 1.2 - switch (GetExport().getDefaultVersion()) { - case SvtSaveOptions::ODFVER_011: // fall through - case SvtSaveOptions::ODFVER_010: doExport = false; break; + switch (GetExport().getSaneDefaultVersion()) { + case SvtSaveOptions::ODFSVER_011: // fall through + case SvtSaveOptions::ODFSVER_010: doExport = false; break; default: break; } |