diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-21 18:57:52 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-12-21 18:42:11 +0100 |
commit | 88ac99d6afb1903c4f4a6a33b92fef461979703c (patch) | |
tree | e235b25e8e02206f106b58e70c27f00dcd4c5acf /xmloff | |
parent | fa87499193bddd2bc8728532f62b1e2a91052a44 (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.
Conflicts:
sc/source/filter/xml/XMLExportDataPilot.cxx
xmloff/source/chart/SchXMLExport.cxx
Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108107
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/PropertyMaps.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 56 | ||||
-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, 111 insertions, 111 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index 521addbc1166..1538daff10b2 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -425,8 +425,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 )); @@ -477,7 +477,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; @@ -489,9 +489,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 efa8a6873973..b7046039e6b2 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -287,8 +287,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()) @@ -1178,8 +1178,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() ) @@ -1195,7 +1195,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); @@ -1368,8 +1368,8 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > addPosition( xLegendShape ); // export legend size - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFSaneDefaultVersion() ); + if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012 ) { try { @@ -1384,7 +1384,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( @@ -2070,8 +2070,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 ); @@ -2190,8 +2190,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() ); @@ -2614,8 +2614,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 ); @@ -2647,8 +2647,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 ) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFSaneDefaultVersion() ); + if( nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012 ) { if (xPropSet.is()) { @@ -2818,8 +2818,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 ); @@ -2911,8 +2911,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; } @@ -2987,10 +2987,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()) @@ -3045,7 +3045,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 ); } @@ -3249,8 +3249,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 ); @@ -3311,8 +3311,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 ); @@ -3499,7 +3499,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 a314b6a39670..608c043f6117 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -344,7 +344,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); @@ -996,7 +996,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()); @@ -1004,7 +1004,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 @@ -1015,7 +1015,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); @@ -1194,9 +1194,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; } @@ -2313,9 +2313,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); } @@ -2329,9 +2329,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, @@ -2380,9 +2380,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 6a59ac6967e2..0b4f2cddc17e 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -1146,8 +1146,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 44c9afee02fd..4de4a36734c2 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 ddd128d1d8b0..390202d2c3ed 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 } @@ -2404,7 +2404,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( } { - if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { if (sOutMimeType.isEmpty()) { @@ -2452,7 +2452,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); @@ -2471,7 +2471,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); @@ -4112,7 +4112,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 ); } @@ -4575,7 +4575,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; } @@ -4831,7 +4831,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 a9ec047d8f29..5b559e4d3b20 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -240,8 +240,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 d5569f633eec..ed07f7ca14d7 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -230,7 +230,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 cd94fccae8dd..acae5a1ffa09 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 0f5a45dc40da..824fd6566c82 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -612,15 +612,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; } @@ -734,18 +734,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 e5b367e1343e..69f09f555e38 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1693,7 +1693,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 2ae5b7520bde..62dd37f37a9f 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -398,7 +398,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, @@ -1178,7 +1178,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 @@ -1308,7 +1308,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 @@ -1328,8 +1328,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 a1c04371666f..76b08ddc61fe 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 24b5a8f2cbae..c207d178618f 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -909,8 +909,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 ) @@ -951,7 +951,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 @@ -970,7 +970,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 @@ -1001,7 +1001,7 @@ void XMLTextParagraphExport::exportListChange( else { if ( bExportODF && - eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && + eODFDefaultVersion >= SvtSaveOptions::ODFSVER_012 && !sListId.isEmpty() ) { GetExport().AddAttribute( XML_NAMESPACE_TEXT, @@ -1169,7 +1169,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 ) ) @@ -2231,7 +2231,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()) @@ -2297,7 +2297,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, @@ -2333,7 +2333,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()) @@ -3147,7 +3147,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()) { @@ -3195,7 +3195,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()) { @@ -3778,9 +3778,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; } |