diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-03-05 16:10:42 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-03-05 16:10:42 +0000 |
commit | 653d77959b3bf9fdd40646f2892e165e023972a9 (patch) | |
tree | 4c6feb6cd291c1d5c75e5332e6d97715a9b3c370 /sfx2/source/doc/SfxDocumentMetaData.cxx | |
parent | 9f36474d6004c9d72daebd84302172cb7d14151b (diff) |
#i86741# catch libxml exception
Diffstat (limited to 'sfx2/source/doc/SfxDocumentMetaData.cxx')
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 3b2fcf3705a1..c33b6683ea5f 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -4,9 +4,9 @@ * * $RCSfile: SfxDocumentMetaData.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: rt $ $Date: 2008-03-03 08:50:52 $ + * last change: $Author: kz $ $Date: 2008-03-05 17:10:42 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1110,11 +1110,18 @@ void SAL_CALL SfxDocumentMetaData::init( // NB: we do not handle the single-XML-file ODF variant, which would // have the root element office:document. // The root of such documents must be converted in the importer! - ::rtl::OUString prefix = ::rtl::OUString::createFromAscii( - "/child::office:document-meta/child::office:meta"); - css::uno::Reference<css::xml::dom::XNode> xDocNode( - m_xDoc, css::uno::UNO_QUERY_THROW); - m_xParent = xPath->selectSingleNode(xDocNode, prefix); + try + { + ::rtl::OUString prefix = ::rtl::OUString::createFromAscii( + "/child::office:document-meta/child::office:meta"); + css::uno::Reference<css::xml::dom::XNode> xDocNode( + m_xDoc, css::uno::UNO_QUERY_THROW); + m_xParent = xPath->selectSingleNode(xDocNode, prefix); + } + catch(com::sun::star::uno::RuntimeException& rRE) + { + DBG_ERROR("caught RuntimeException from libxml!"); + } if (!m_xParent.is()) { // all this create/append stuff may throw DOMException |