summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx14
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx22
-rw-r--r--sw/source/filter/xml/xmlexp.cxx2
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx4
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx19
-rw-r--r--xmloff/source/draw/shapeexport.cxx16
-rw-r--r--xmloff/source/style/xmlexppr.cxx2
-rw-r--r--xmloff/source/style/xmlnumfe.cxx10
-rw-r--r--xmloff/source/text/txtflde.cxx10
-rw-r--r--xmloff/source/text/txtparae.cxx6
10 files changed, 53 insertions, 52 deletions
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index d09b63002c7f..ab3f2f4fe665 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -432,7 +432,7 @@ void ScXMLExportDataPilot::WriteSubTotals(const ScDPSaveDimension* pDim)
{
sal_Int32 nSubTotalCount = pDim->GetSubTotalsCount();
std::optional<OUString> pLayoutName;
- if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
// Export display names only for 1.2 extended or later.
pLayoutName = pDim->GetSubtotalName();
@@ -464,7 +464,7 @@ void ScXMLExportDataPilot::WriteMembers(const ScDPSaveDimension* pDim)
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, rpMember->GetName());
- if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
// Export display names only for ODF 1.2 extended or later.
const std::optional<OUString> & pLayoutName = rpMember->GetLayoutName();
@@ -492,7 +492,7 @@ void ScXMLExportDataPilot::WriteLevels(const ScDPSaveDimension* pDim)
::sax::Converter::convertBool(sBuffer, pDim->GetShowEmpty());
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
}
- if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
OUStringBuffer sBuffer;
::sax::Converter::convertBool(sBuffer, pDim->GetRepeatItemLabels());
@@ -675,7 +675,7 @@ void ScXMLExportDataPilot::WriteDimension(const ScDPSaveDimension* pDim, const S
{
OUString aSrcDimName = ScDPUtil::getSourceDimensionName(pDim->GetName());
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, aSrcDimName);
- if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
// Export display names only for ODF 1.2 extended or later.
const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
@@ -700,7 +700,7 @@ void ScXMLExportDataPilot::WriteDimension(const ScDPSaveDimension* pDim, const S
if (eOrientation == sheet::DataPilotFieldOrientation_PAGE)
{
- if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
rExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_IGNORE_SELECTED_PAGE, "true");
}
@@ -813,7 +813,7 @@ void ScXMLExportDataPilot::WriteDataPilots()
// grand total elements.
const std::optional<OUString> & pGrandTotalName = pDPSave->GetGrandTotalName();
- if (pGrandTotalName && rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (pGrandTotalName && rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
// Use the new data-pilot-grand-total element.
if (bRowGrand && bColumnGrand)
@@ -832,7 +832,7 @@ void ScXMLExportDataPilot::WriteDataPilots()
{
const ScSheetSourceDesc* pSheetSource = (*pDPs)[i].GetSheetDesc();
- if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
if (pSheetSource->HasRangeName())
{
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index b60c4959ce7c..93e4743276c8 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1707,7 +1707,7 @@ void ScXMLExport::SetBodyAttributes()
{
AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY_DIGEST_ALGORITHM,
ScPassHashHelper::getHashURI(PASSHASH_XL));
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
AddAttribute(XML_NAMESPACE_LO_EXT, XML_PROTECTION_KEY_DIGEST_ALGORITHM_2,
ScPassHashHelper::getHashURI(PASSHASH_SHA1));
}
@@ -2830,7 +2830,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const uno::Reference<sheet::XSpre
{
AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY_DIGEST_ALGORITHM,
ScPassHashHelper::getHashURI(PASSHASH_XL));
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
AddAttribute(XML_NAMESPACE_LO_EXT, XML_PROTECTION_KEY_DIGEST_ALGORITHM_2,
ScPassHashHelper::getHashURI(PASSHASH_SHA1));
}
@@ -2859,7 +2859,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const uno::Reference<sheet::XSpre
AddAttribute( XML_NAMESPACE_TABLE, XML_PRINT, XML_FALSE);
SvXMLElementExport aElemT(*this, sElemTab, true, true);
- if (pProtect && pProtect->isProtected() && getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (pProtect && pProtect->isProtected() && getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
if (pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS))
AddAttribute(XML_NAMESPACE_LO_EXT, XML_SELECT_PROTECTED_CELLS, XML_TRUE);
@@ -2981,7 +2981,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const uno::Reference<sheet::XSpre
WriteNamedRange(pRangeName);
}
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
//export new conditional format information
ExportConditionalFormat(nTable);
@@ -3138,7 +3138,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
{
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
aCell.nNumberFormat, aCell.maBaseCell.mfValue);
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
aCell.nNumberFormat, aCell.maBaseCell.mfValue, false, XML_NAMESPACE_CALC_EXT, false);
}
@@ -3149,7 +3149,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
OUString sCellString = aCell.maBaseCell.getString(pDoc);
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
sCellString, sFormattedString);
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
sCellString, sFormattedString, false, XML_NAMESPACE_CALC_EXT);
}
@@ -3185,7 +3185,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
{
AddAttribute(sAttrValueType, XML_STRING);
AddAttribute(sAttrStringValue, aCell.maBaseCell.getString(pDoc));
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
//export calcext:value-type="error"
AddAttribute(XML_NAMESPACE_CALC_EXT,XML_VALUE_TYPE, OUString("error"));
@@ -3200,7 +3200,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
{
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
aCell.nNumberFormat, pDoc->GetValue(aCell.maCellAddress));
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
aCell.nNumberFormat, pDoc->GetValue(aCell.maCellAddress), false, XML_NAMESPACE_CALC_EXT, false );
@@ -3213,7 +3213,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
{
AddAttribute(sAttrValueType, XML_STRING);
AddAttribute(sAttrStringValue, aCell.maBaseCell.getString(pDoc));
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
AddAttribute(XML_NAMESPACE_CALC_EXT,XML_VALUE_TYPE, XML_STRING);
}
@@ -3998,7 +3998,7 @@ void ScXMLExport::WriteExternalDataMapping()
if (!pDoc)
return;
- if (getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
+ if ((getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) == 0)
// Export this only for 1.2 extended and above.
return;
@@ -4331,7 +4331,7 @@ void ScXMLExport::WriteDataStream()
// Export this only in experimental mode.
return;
- if (getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
+ if ((getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) == 0)
// Export this only for 1.2 extended and above.
return;
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index f966da56d26e..f1e6509798c4 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -125,7 +125,7 @@ ErrCode SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
if( getExportFlags() & (SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::STYLES|
SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT))
{
- if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
GetNamespaceMap_().Add(
GetXMLToken(XML_NP_OFFICE_EXT),
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index bfa7ea8829d3..8e2dccaf8ec5 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -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::ODFSVER_012 && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
+ else if (nCurrentVersion & SvtSaveOptions::ODFSVER_EXTENDED && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
sValueBuffer.append( GetXMLToken( XML_POLYNOMIAL ));
- else if (nCurrentVersion > SvtSaveOptions::ODFSVER_012 && aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve")
+ else if (nCurrentVersion & SvtSaveOptions::ODFSVER_EXTENDED && 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 49cd2dbb9945..a0a2d2bf401a 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -286,7 +286,7 @@ CustomLabelSeq lcl_getCustomLabelField(sal_Int32 nDataPointIndex,
return CustomLabelSeq();
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
- if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
+ if ((nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) == 0) // do not export to ODF 1.3 or older
return CustomLabelSeq();
if(Reference<beans::XPropertySet> xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is())
@@ -308,7 +308,7 @@ css::chart2::RelativePosition lcl_getCustomLabelPosition(sal_Int32 nDataPointInd
return chart2::RelativePosition();
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
- if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
+ if ((nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) == 0) // do not export to ODF 1.3 or older
return chart2::RelativePosition();
if (Reference<beans::XPropertySet> xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is())
@@ -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::ODFSVER_012)
+ if (xPivotTableDataProvider.is() && nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED)
{
OUString sPivotTableName = xPivotTableDataProvider->getPivotTableName();
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_DATA_PILOT_SOURCE, sPivotTableName);
@@ -1387,7 +1387,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
// export legend overlay
try
{
- if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012)
+ if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED)
{
Any aAny( xProp->getPropertyValue("Overlay"));
if(aAny.get<bool>())
@@ -2226,7 +2226,7 @@ bool lcl_exportAxisType( const Reference< chart2::XAxis >& rChart2Axis, SvXMLExp
return bExportDateScale;
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
- if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
+ if ((nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) == 0) //do not export to ODF 1.3 or older
return bExportDateScale;
chart2::ScaleData aScale( rChart2Axis->getScaleData() );
@@ -2299,7 +2299,8 @@ void SchXMLExportHelper_Impl::exportAxis(
if( rAxisProps.is() && mxExpPropMapper.is() )
{
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
- if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012 && eDimension == XML_X)
+ if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED
+ && eDimension == XML_X)
{
chart2::ScaleData aScaleData(rChart2Axis->getScaleData());
bool bShiftedCatPos = aScaleData.ShiftedCategoryPosition;
@@ -2698,7 +2699,7 @@ void SchXMLExportHelper_Impl::exportSeries(
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, OUString());
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
- if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
+ if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) // do not export to ODF 1.3 or older
{
if (xPropSet.is())
{
@@ -2869,7 +2870,7 @@ void SchXMLExportHelper_Impl::exportSeries(
nSeriesLength, xNewDiagram, bExportContent );
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
- if (bExportContent && nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
+ if (bExportContent && nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) // do not export to ODF 1.3 or older
{
Sequence< OUString > aSupportedMappings = rChartType->getSupportedPropertyRoles();
exportPropertyMapping( xSource, aSupportedMappings );
@@ -3252,7 +3253,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
xSeriesProperties->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint;
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
- if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
+ if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) // do not export to ODF 1.3 or older
xSeriesProperties->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq;
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index f75e334a246c..d1d46bf32dab 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -727,8 +727,8 @@ 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.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012))
+ // export draw:display (do not export in ODF 1.3 or older)
+ if (xSet.is() && (mrExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED))
{
if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape &&
aShapeInfo.meShapeType != XmlShapeTypeHandoutShape && aShapeInfo.meShapeType != XmlShapeTypeDrawChartShape )
@@ -1563,9 +1563,9 @@ void XMLShapeExport::ImpExportText( const uno::Reference< drawing::XShape >& xSh
{
if (eExtensionNS == TextPNS::EXTENSION)
{
- if (mrExport.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
+ if ((mrExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) == 0)
{
- return; // do not export to ODF 1.1/1.2
+ return; // do not export to ODF 1.1/1.2/1.3
}
}
uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
@@ -2475,7 +2475,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
ImpExportDescription( xShape ); // #i68101#
// Signature Line, QR Code - needs to be after the images!
- if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
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.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012))
+ if (!bExtended && bNeedExtended && (rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED))
ImpExportEnhancedPath( rExport, rCoordinates, rSegments, true );
}
@@ -4578,8 +4578,8 @@ 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.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
+ // export draw:sub-view-size (do not export in ODF 1.3 or older)
+ if ((rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) == 0)
{
continue;
}
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index d2843f71441d..7601bf1f12c6 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -841,7 +841,7 @@ void SvXMLExportPropertyMapper::exportXML(
aPropTokens[i].eToken == xmloff::token::XML_GRAPHIC_PROPERTIES)
{
nNamespace = XML_NAMESPACE_LO_EXT;
- if (rExport.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
+ if ((rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED) == 0)
{
continue; // don't write for ODF <= 1.2
}
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index d17266d5f15a..178815c54316 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -743,7 +743,7 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl(
SvtSaveOptions::ODFSaneDefaultVersion eVersion = rExport.getSaneDefaultVersion();
if ( !aIntegerFractionDelimiterString.isEmpty() && aIntegerFractionDelimiterString != " "
&& ((eVersion & SvtSaveOptions::ODFSVER_EXTENDED) != 0) )
- { // Export only for 1.2 with extensions or 1.3 and later.
+ { // Export only for 1.2/1.3 with extensions.
rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_INTEGER_FRACTION_DELIMITER,
aIntegerFractionDelimiterString );
}
@@ -753,7 +753,7 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl(
nMinNumeratorDigits++;
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_MIN_NUMERATOR_DIGITS,
OUString::number( nMinNumeratorDigits ) );
- // Export only for 1.2 with extensions or 1.3 and later.
+ // Export only for 1.2/1.3 with extensions.
if ((eVersion & SvtSaveOptions::ODFSVER_EXTENDED) != 0)
{
// For extended ODF use loext namespace
@@ -1211,9 +1211,9 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
LanguageTag aLanguageTag( aAttr.Locale);
OUString aLanguage, aScript, aCountry;
aLanguageTag.getIsoLanguageScriptCountry( aLanguage, aScript, aCountry);
- // For 1.2+ use loext namespace, for 1.3 use number namespace.
- rExport.AddAttribute( ((eVersion < SvtSaveOptions::ODFSVER_013) ?
- XML_NAMESPACE_LO_EXT : XML_NAMESPACE_NUMBER),
+ // For 1.2/1.3+ use loext namespace.
+ rExport.AddAttribute( /*((eVersion < SvtSaveOptions::ODFSVER_)
+ ? */ XML_NAMESPACE_LO_EXT /*: XML_NAMESPACE_NUMBER)*/,
XML_TRANSLITERATION_SPELLOUT, aAttr.Spellout );
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TRANSLITERATION_LANGUAGE,
aLanguage );
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index b6876a1e63c5..d2aefc403292 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().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
// 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().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
// 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().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
// 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().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT, XML_PAGE_NAME, false, false );
GetExport().Characters( sPresentation );
@@ -1758,7 +1758,7 @@ void XMLTextFieldExport::ExportFieldHelper(
{
GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, aName);
SvtSaveOptions::ODFSaneDefaultVersion eVersion = rExport.getSaneDefaultVersion();
- if(eVersion > SvtSaveOptions::ODFSVER_012)
+ if (eVersion & SvtSaveOptions::ODFSVER_EXTENDED)
{
bool b = GetBoolProperty("Resolved", rPropSet);
OUString aResolvedText;
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index a3de06e07939..928005e3211d 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2244,7 +2244,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
/* As of now, textmarks are a proposed extension to the OpenDocument standard. */
if (!bAutoStyles)
{
- if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
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().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
SvXMLElementExport aElem( GetExport(), !bAutoStyles,
XML_NAMESPACE_FIELD, XML_FIELDMARK_END,
@@ -2346,7 +2346,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
if (!bAutoStyles)
{
- if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
+ if (GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())