Kaydet (Commit) 69456287 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Stephan Bergmann

fdo#46808, Adapt packages::manifest::ManifestReader UNO service to new style

The service already existed, it just did not have an IDL file.

Change-Id: Idad85ab23f6650c89ba3095d10568a302503613b
üst b30ee830
......@@ -61,7 +61,7 @@
#include "com/sun/star/ucb/UnsupportedCommandException.hpp"
#include "com/sun/star/sdbc/XResultSet.hpp"
#include "com/sun/star/sdbc/XRow.hpp"
#include "com/sun/star/packages/manifest/XManifestReader.hpp"
#include "com/sun/star/packages/manifest/ManifestReader.hpp"
#include "com/sun/star/packages/manifest/XManifestWriter.hpp"
#include "com/sun/star/deployment/DependencyException.hpp"
#include "com/sun/star/deployment/LicenseException.hpp"
......@@ -1445,10 +1445,8 @@ void BackendImpl::PackageImpl::scanBundle(
const Reference<XComponentContext> xContext(
getMyBackend()->getComponentContext() );
Reference<packages::manifest::XManifestReader> xManifestReader(
xContext->getServiceManager()->createInstanceWithContext(
OUSTR("com.sun.star.packages.manifest.ManifestReader"),
xContext ), UNO_QUERY_THROW );
Reference<packages::manifest::XManifestReader> xManifestReader =
packages::manifest::ManifestReader::create( xContext );
const Sequence< Sequence<beans::PropertyValue> > manifestSeq(
xManifestReader->readManifestSequence( manifestContent.openStream() ) );
const OUString packageRootURL( getURL() );
......
......@@ -177,6 +177,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/media,\
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/mozilla,\
MozillaBootstrap \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/packages/manifest,\
ManifestReader \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/plugin,\
PluginManager \
))
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_packages_manifest_ManifestReader_idl__
#define __com_sun_star_packages_manifest_ManifestReader_idl__
#include <com/sun/star/packages/manifest/XManifestReader.idl>
module com { module sun { module star { module packages { module manifest {
published service ManifestReader : XManifestReader;
}; }; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -40,7 +40,7 @@
#include <com/sun/star/ucb/ContentInfoAttribute.hpp>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/packages/manifest/XManifestWriter.hpp>
#include <com/sun/star/packages/manifest/XManifestReader.hpp>
#include <com/sun/star/packages/manifest/ManifestReader.hpp>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
#include <rtl/digest.h>
......@@ -1780,9 +1780,8 @@ void UCBStorage_Impl::Init()
// create a manifest reader object that will read in the manifest from the stream
Reference < ::com::sun::star::packages::manifest::XManifestReader > xReader =
Reference< ::com::sun::star::packages::manifest::XManifestReader >
( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString("com.sun.star.packages.manifest.ManifestReader")), UNO_QUERY) ;
::com::sun::star::packages::manifest::ManifestReader::create(
::comphelper::getProcessComponentContext() ) ;
Sequence < Sequence < PropertyValue > > aProps = xReader->readManifestSequence( xInputStream );
// cleanup
......
......@@ -39,7 +39,7 @@
#include <com/sun/star/security/SerialNumberAdapter.hpp>
#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
#include <com/sun/star/packages/manifest/XManifestReader.hpp>
#include <com/sun/star/packages/manifest/ManifestReader.hpp>
#include <rtl/ustrbuf.hxx>
......@@ -268,9 +268,8 @@ void DigitalSignaturesDialog::SetStorage( const com::sun::star::uno::Reference <
mxStore = rxStore;
maSignatureHelper.SetStorage( mxStore, m_sODFVersion);
Reference < css::packages::manifest::XManifestReader > xReader(
mxCtx->getServiceManager()->createInstanceWithContext(
OUSTR("com.sun.star.packages.manifest.ManifestReader"), mxCtx), UNO_QUERY_THROW);
Reference < css::packages::manifest::XManifestReader > xReader =
css::packages::manifest::ManifestReader::create(mxCtx);
//Get the manifest.xml
Reference < css::embed::XStorage > xSubStore(rxStore->openStorageElement(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment