diff options
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index eae541f087be..a79dea71193c 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1509,6 +1509,23 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS } // if ( aSaveOpt.IsSaveRelFSys() ) const ::rtl::OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HierarchicalDocumentName")),::rtl::OUString()) ); xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")), uno::makeAny(sHierarchicalDocumentName)); + ::rtl::OUString aVersion; + SvtSaveOptions::ODFDefaultVersion nDefVersion = aSaveOpt.GetODFDefaultVersion(); + + // older versions can not have this property set, it exists only starting from ODF1.2 + if ( nDefVersion >= SvtSaveOptions::ODFVER_012 ) + aVersion = ODFVER_012_TEXT; + + if ( aVersion.getLength() ) + { + try + { + xInfoSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Version" )), uno::makeAny( aVersion ) ); + } + catch( uno::Exception& ) + { + } + } sal_Int32 nArgsLen = aDelegatorArguments.getLength(); |