From b37a0d52a06a91b98e08b9d3e220f80feb5051d0 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Fri, 6 Jun 2008 10:52:32 +0000 Subject: INTEGRATION: CWS xmlfix2 (1.8.4); FILE MERGED 2008/05/15 17:15:14 mst 1.8.4.2: RESYNC: (1.8-1.9); FILE MERGED 2008/03/31 14:28:05 mst 1.8.4.1: #i81678#: interface change: XXPathAPI - extensions/source/update/feed/upatefeed.cxx, extensions/source/update/check/upateprotocol.cxx: + adapt to changes in css.xml.xpath.XXPathAPI --- extensions/source/update/feed/updatefeed.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'extensions') diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index b0df5284b664..4c2da9378960 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: updatefeed.cxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.10 $ * * This file is part of OpenOffice.org. * @@ -769,7 +769,12 @@ UpdateInformationProvider::getChildNode(const uno::Reference< xml::dom::XNode >& const rtl::OUString& rName) { OSL_ASSERT(m_xXPathAPI.is()); - return m_xXPathAPI->selectSingleNode(rxNode, UNISTRING( "./atom:" ) + rName); + try { + return m_xXPathAPI->selectSingleNode(rxNode, UNISTRING( "./atom:" ) + rName); + } catch (xml::xpath::XPathException &) { + // ignore + return 0; + } } //------------------------------------------------------------------------------ @@ -806,8 +811,13 @@ UpdateInformationProvider::getUpdateInformationEnumeration( else aXPathExpression = UNISTRING("//atom:entry"); - uno::Reference< xml::dom::XNodeList > xNodeList = - m_xXPathAPI->selectNodeList(xDocument.get(), aXPathExpression); + uno::Reference< xml::dom::XNodeList > xNodeList; + try { + xNodeList = m_xXPathAPI->selectNodeList(xDocument.get(), + aXPathExpression); + } catch (xml::xpath::XPathException &) { + // ignore + } return new UpdateInformationEnumeration(xNodeList, this); } -- cgit v1.2.3