summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-06-05 03:57:55 +0200
committerThorsten Behrens <tbehrens@suse.com>2012-06-05 05:10:57 +0200
commit24c260a271ec5f086b7883a6ed258e02af799d61 (patch)
tree17e8e6b78273bd5ea56a704c9def2f777882ee7d /xmloff
parentecdd0501c809e8f283a09cc320a539b828bfec2f (diff)
Unify ODF extended vs. ODF1.2 handling
Make "export extended ODF" consistently mean "version > ODF1.2". Future ODF versions need manual review anyway, of the various changes/additions we ship. Change-Id: I0f6c1646b306e18f0abcdd1a1802fece821b2e93
Diffstat (limited to 'xmloff')
-rwxr-xr-xxmloff/source/chart/SchXMLExport.cxx8
-rw-r--r--xmloff/source/text/txtparae.cxx6
2 files changed, 6 insertions, 8 deletions
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())