diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-28 12:16:40 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-09 08:09:27 +0100 |
commit | 36e492823ef4575eac2a159da3c6c7a7962d5769 (patch) | |
tree | 9abaca29fcb6643b65292663b8cda174f2d1e538 /xmloff | |
parent | 671bf2330a741b70c55b58db7ee438db5d5b858b (diff) |
OFormsRootImport::CreateChildContext: survive a missing css.form.Forms
At least moz406390-1.odt has an unreferenced (so uninteresting in
practice) <form:form> block. Till there is a real benefit of it, better
not add form/database components to the Android component list but teach
the user of such code to fail gracefully.
Change-Id: I165a09fefa887da7b78a917c43ecc17d8f0ba3e2
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/forms/officeforms.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index 014d7921e03a..e289e78671e2 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -53,7 +53,15 @@ namespace xmloff SvXMLImportContext* OFormsRootImport::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList>& xAttrList ) { - return GetImport().GetFormImport()->createContext( _nPrefix, _rLocalName, xAttrList ); + SvXMLImportContext* pRet = 0; + try + { + pRet = GetImport().GetFormImport()->createContext( _nPrefix, _rLocalName, xAttrList ); + } catch (const Exception& rException) + { + SAL_WARN("xmloff.forms", "OFormsRootImport::CreateChildContext: " << rException.Message); + } + return pRet; } void OFormsRootImport::implImportBool(const Reference< XAttributeList >& _rxAttributes, OfficeFormsAttributes _eAttribute, |