Kaydet (Commit) c1222598 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS odfversion (1.18.44); FILE MERGED

2008/04/10 10:20:38 cl 1.18.44.1: #i88125# export correct office:version attribute
üst f1684e18
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite * OpenOffice.org - a multi-platform office productivity suite
* *
* $RCSfile: MetaExportComponent.cxx,v $ * $RCSfile: MetaExportComponent.cxx,v $
* $Revision: 1.19 $ * $Revision: 1.20 $
* *
* This file is part of OpenOffice.org. * This file is part of OpenOffice.org.
* *
...@@ -166,9 +166,22 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) ...@@ -166,9 +166,22 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum )
} }
#endif #endif
AddAttribute( XML_NAMESPACE_OFFICE, XML_VERSION, ::rtl::OUString::createFromAscii( "1.1" ) ); const sal_Char* pVersion = 0;
switch( getDefaultVersion() )
{
case SvtSaveOptions::ODFVER_012: pVersion = "1.2"; break;
case SvtSaveOptions::ODFVER_011: pVersion = "1.1"; break;
case SvtSaveOptions::ODFVER_010: break;
default:
DBG_ERROR("xmloff::XMLMetaExportComponent::exportDoc(), unexpected odf default version!");
}
if( pVersion )
AddAttribute( XML_NAMESPACE_OFFICE, XML_VERSION,
::rtl::OUString::createFromAscii(pVersion) );
SvXMLElementExport aDocElem( *this, XML_NAMESPACE_OFFICE, XML_DOCUMENT_META, SvXMLElementExport aDocElem( *this, XML_NAMESPACE_OFFICE, XML_DOCUMENT_META,
sal_True, sal_True ); sal_True, sal_True );
// NB: office:meta is now written by _ExportMeta // NB: office:meta is now written by _ExportMeta
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment