summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xmloff/xmltoken.hxx2
-rw-r--r--xmloff/source/core/xmlimp.cxx14
-rw-r--r--xmloff/source/core/xmltoken.cxx2
-rw-r--r--xmloff/source/token/tokens.txt2
4 files changed, 20 insertions, 0 deletions
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 70b57d1b0f8d..4430d298d63b 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -245,6 +245,7 @@ namespace xmloff { namespace token {
XML_APPLICATION_DATA,
XML_APPLICATION_XML,
XML_APPLY,
+ XML_APPLY_DESIGN_MODE,
XML_APPLY_STYLE_NAME,
XML_AQUA,
XML_ARC,
@@ -275,6 +276,7 @@ namespace xmloff { namespace token {
XML_AUTO_UPDATE,
XML_AUTOMATIC,
XML_AUTOMATIC_FIND_LABELS,
+ XML_AUTOMATIC_FOCUS,
XML_AUTOMATIC_ORDER,
XML_AUTOMATIC_STYLES,
XML_AUTOMATIC_UPDATE,
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 36de2638a874..c213c05b053a 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -783,6 +783,20 @@ void SAL_CALL SvXMLImport::setDocumentLocator( const uno::Reference< xml::sax::X
void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
{
+ if ( Attribs.is() && Attribs->hasAttribute( NAMESPACE_TOKEN( XML_NAMESPACE_OFFICE ) | XML_VERSION ) )
+ {
+ mpImpl->aODFVersion = Attribs->getValue( NAMESPACE_TOKEN( XML_NAMESPACE_OFFICE ) | XML_VERSION );
+
+ // the ODF version in content.xml and manifest.xml must be the same starting from ODF1.2
+ if ( mpImpl->mStreamName == "content.xml" && !IsODFVersionConsistent( mpImpl->aODFVersion ) )
+ {
+ throw xml::sax::SAXException("Inconsistent ODF versions in content.xml and manifest.xml!",
+ uno::Reference< uno::XInterface >(),
+ uno::makeAny(
+ packages::zip::ZipIOException("Inconsistent ODF versions in content.xml and manifest.xml!" ) ) );
+ }
+ }
+
//Namespace handling is unnecessary. It is done by the fastparser itself.
uno::Reference<XFastContextHandler> xContext;
if (!maFastContexts.empty())
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 813c864ca264..5ee0ce8dfa84 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -247,6 +247,7 @@ namespace xmloff { namespace token {
TOKEN( "application-data", XML_APPLICATION_DATA ),
TOKEN( "application-xml", XML_APPLICATION_XML ),
TOKEN( "apply", XML_APPLY ),
+ TOKEN( "apply-design-mode", XML_APPLY_DESIGN_MODE ),
TOKEN( "apply-style-name", XML_APPLY_STYLE_NAME ),
TOKEN( "aqua", XML_AQUA ),
TOKEN( "arc", XML_ARC ),
@@ -277,6 +278,7 @@ namespace xmloff { namespace token {
TOKEN( "auto-update", XML_AUTO_UPDATE ),
TOKEN( "automatic", XML_AUTOMATIC ),
TOKEN( "automatic-find-labels", XML_AUTOMATIC_FIND_LABELS ),
+ TOKEN( "automatic-focus", XML_AUTOMATIC_FOCUS ),
TOKEN( "automatic-order", XML_AUTOMATIC_ORDER ),
TOKEN( "automatic-styles", XML_AUTOMATIC_STYLES ),
TOKEN( "automatic-update", XML_AUTOMATIC_UPDATE ),
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index 3c9d08360b12..e8878d8ec6c1 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -169,6 +169,7 @@ applet-name
application-data
application-xml
apply
+apply-design-mode
apply-style-name
aqua
arc
@@ -199,6 +200,7 @@ auto-text-indent
auto-update
automatic
automatic-find-labels
+automatic-focus
automatic-order
automatic-styles
automatic-update