From 2b7c401e537d654a7469f7840e3e4527b22b2a8e Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sat, 20 Nov 2010 14:02:00 +0100 Subject: remove redundant code --- .../deployment/registry/help/dp_helpbackenddb.cxx | 33 +--------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx index 2f3a566e6151..315b32867760 100644 --- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx +++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx @@ -136,40 +136,9 @@ HelpBackendDb::getEntry(::rtl::OUString const & url) ::std::list HelpBackendDb::getAllDataUrls() { - try - { - ::std::list listRet; - Reference doc = getDocument(); - Reference root = doc->getFirstChild(); - - Reference xpathApi = getXPathAPI(); - const OUString sPrefix = getNSPrefix(); - OUString sExpression( - sPrefix + OUSTR(":help/") + sPrefix + OUSTR(":data-url/text()")); - Reference nodes = - xpathApi->selectNodeList(root, sExpression); - if (nodes.is()) - { - sal_Int32 length = nodes->getLength(); - for (sal_Int32 i = 0; i < length; i++) - listRet.push_back(nodes->item(i)->getNodeValue()); - } - return listRet; - } - catch (css::deployment::DeploymentException& ) - { - throw; - } - catch(css::uno::Exception &) - { - Any exc( ::cppu::getCaughtException() ); - throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in help backend db: ") + - m_urlDb, 0, exc); - } + return getOneChildFromAllEntries(OUString(RTL_CONSTASCII_USTRINGPARAM("data-url"))); } - } // namespace help } // namespace backend } // namespace dp_registry -- cgit