tdf#161219 Exporting XML filter as package results in empty jar
regression from
commit a04bf69bcc
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Mon Jan 16 10:36:59 2023 +0200
XUnoTunnel->dynamic_cast in ZipPackageEntry
Change-Id: I12915bb093ea050f4290c02cc5a6e1dc2c7b903a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include <com/sun/star/container/XNamed.hpp>
|
||||
#include <com/sun/star/container/XChild.hpp>
|
||||
#include <com/sun/star/lang/IllegalArgumentException.hpp>
|
||||
#include <com/sun/star/lang/XUnoTunnel.hpp>
|
||||
#include <com/sun/star/util/XChangesBatch.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
|
||||
@@ -105,11 +104,10 @@ static Reference< XInterface > addFolder( Reference< XInterface > const & xRootF
|
||||
static void addFile_( Reference< XInterface > const & xRootFolder, Reference< XSingleServiceFactory > const & xFactory, Reference< XInputStream > const & xInput, const OUString& aName )
|
||||
{
|
||||
Reference< XActiveDataSink > xSink( xFactory->createInstance(), UNO_QUERY );
|
||||
Reference< XUnoTunnel > xTunnel( xSink, UNO_QUERY );
|
||||
if( xSink.is() && xTunnel.is())
|
||||
if( xSink.is() )
|
||||
{
|
||||
Reference< XNameContainer > xNameContainer(xRootFolder, UNO_QUERY );
|
||||
xNameContainer->insertByName(encodeZipUri( aName ), Any(xTunnel));
|
||||
xNameContainer->insertByName(encodeZipUri( aName ), Any(Reference< XInterface >( xSink, UNO_QUERY )));
|
||||
xSink->setInputStream( xInput );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user