diff options
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLExportDataPilot.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 2 | ||||
-rwxr-xr-x | xmloff/source/chart/SchXMLExport.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 6 |
6 files changed, 14 insertions, 16 deletions
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 27026c5ba28c..bf755d60969d 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -1710,7 +1710,7 @@ bool DiagramHelper::switchDiagramPositioningToExcludingPositioning( { //return true if something was changed const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion == SvtSaveOptions::ODFVER_LATEST )//#i100778# todo: change this dependent on fileformat evolution + if( nCurrentODFVersion > SvtSaveOptions::ODFVER_012 ) { uno::Reference< ::com::sun::star::chart::XChartDocument > xOldDoc( xChartModel, uno::UNO_QUERY ) ; if( xOldDoc.is() ) diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index ade9d7dbe780..5b5622c39451 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -444,7 +444,7 @@ void ScXMLExportDataPilot::WriteSubTotals(ScDPSaveDimension* pDim) sal_Int32 nSubTotalCount = pDim->GetSubTotalsCount(); const OUString* pLayoutName = NULL; - if (rExport.getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST) + if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) // Export display names only for 1.2 extended or later. pLayoutName = pDim->GetSubtotalName(); @@ -476,7 +476,7 @@ void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim) { rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, rtl::OUString((*i)->GetName())); - if (rExport.getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST) + if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) { // Export display names only for ODF 1.2 extended or later. const OUString* pLayoutName = (*i)->GetLayoutName(); @@ -685,7 +685,7 @@ void ScXMLExportDataPilot::WriteGroupDimElements(ScDPSaveDimension* pDim, const void ScXMLExportDataPilot::WriteDimension(ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData) { rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, rtl::OUString(pDim->GetName())); - if (rExport.getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST) + if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) { // Export display names only for ODF 1.2 extended or later. const OUString* pLayoutName = pDim->GetLayoutName(); @@ -817,7 +817,7 @@ void ScXMLExportDataPilot::WriteDataPilots(const uno::Reference <sheet::XSpreads // grand total elements. const OUString* pGrandTotalName = pDPSave->GetGrandTotalName(); - if (pGrandTotalName && rExport.getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST) + if (pGrandTotalName && rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) { // Use the new data-pilot-grand-total element. if (bRowGrand && bColumnGrand) @@ -836,7 +836,7 @@ void ScXMLExportDataPilot::WriteDataPilots(const uno::Reference <sheet::XSpreads { const ScSheetSourceDesc* pSheetSource = (*pDPs)[i]->GetSheetDesc(); - if (rExport.getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST) + if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) { if (pSheetSource->HasRangeName()) rExport.AddAttribute( diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 0561ddb9cda1..bae35a7ee1d9 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -604,7 +604,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet) const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( bReadOnly || bWrongPageKind || (nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST) ) + if( bReadOnly || bWrongPageKind || (nCurrentODFVersion <= SvtSaveOptions::ODFVER_012) ) rSet.DisableItem( SID_INSERT_POSTIT ); rSet.Put(SfxBoolItem(SID_SHOW_POSTIT, mbShowAnnotations)); diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 9faf522df45f..d6017d24f0d3 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -155,7 +155,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) if( (getExportFlags() & (EXPORT_FONTDECLS|EXPORT_STYLES| EXPORT_MASTERSTYLES|EXPORT_CONTENT)) != 0 ) { - if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) { _GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE_EXT), diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f0c77838aec9..9cb5bc53c5a3 100755 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1494,7 +1494,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& // export legend size const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 && nCurrentODFVersion == SvtSaveOptions::ODFVER_LATEST )//do not export legend-expansion to ODF 1.0 and export size only if extensions are enabled //#i28670# todo: change this dependent on fileformat evolution + if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 ) { try { @@ -2255,8 +2255,6 @@ void SchXMLExportHelper_Impl::exportCoordinateRegion( const uno::Reference< char const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older return; - if( nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST )//export only if extensions are enabled //#i100778# todo: change this dependent on fileformat evolution - return; Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY ); DBG_ASSERT( xDiaPos.is(), "Invalid xDiaPos as parameter" ); @@ -2379,7 +2377,7 @@ bool lcl_exportAxisType( const Reference< chart2::XAxis > xChart2Axis, SvXMLExpo return bExportDateScale; const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST ) //#i25706#todo: change version for next ODF version + if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older return bExportDateScale; chart2::ScaleData aScale( xChart2Axis->getScaleData() ); @@ -3658,7 +3656,7 @@ SchXMLExport::SchXMLExport( maAutoStylePool( *this ), maExportHelper( *this, maAutoStylePool ) { - if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) _GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index b1decab06af6..99f3230ef720 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2266,7 +2266,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( else if (sType.equals(sTextFieldStart)) { /* As of now, textmarks are a proposed extension to the OpenDocument standard. */ - if ( GetExport().getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) { Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); if (xBookmark.is()) @@ -2328,7 +2328,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( } else if (sType.equals(sTextFieldEnd)) { - if ( GetExport().getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) { GetExport().StartElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_END, sal_False); GetExport().EndElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_END, sal_False); @@ -2357,7 +2357,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( } else if (sType.equals(sTextFieldStartEnd)) { - if ( GetExport().getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) { Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); if (xBookmark.is()) |