summaryrefslogtreecommitdiff
path: root/oox/source/ppt
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-07-19 08:42:36 +0200
committerJan Holesovsky <kendy@collabora.com>2017-07-21 19:46:41 +0200
commit5d0901a75e7ef96dc722b5277450cc18ad163f7b (patch)
tree10196f12c94e0f4680ffcd59e1b3c712853d6d70 /oox/source/ppt
parent7b0607aa7d42e3ea4c1623d65b124970abc04d79 (diff)
sd pptm: Add a separate PPTM filter.
Similarly to commit 697173f6fdfae581022cfdb5ec5171c5a3be58f0, we have to preserve the correct content-type which is not the same for PPTX and PPTM. This commit also changes sdfilt.component to use the constructor feature. Change-Id: I4b334540ec07a53d308e6b9dd6403294842bddf8 Reviewed-on: https://gerrit.libreoffice.org/40195 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/40265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'oox/source/ppt')
-rw-r--r--oox/source/ppt/pptimport.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 30d3d2951b24..446a054ffd91 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <comphelper/propertysequence.hxx>
#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
@@ -216,14 +217,23 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe
if( XmlFilterBase::filter( rDescriptor ) )
return true;
- if( isExportFilter() ) {
- Reference< XExporter > xExporter( Reference<css::lang::XMultiServiceFactory>(getComponentContext()->getServiceManager(), UNO_QUERY_THROW)->createInstance( "com.sun.star.comp.Impress.oox.PowerPointExport" ), UNO_QUERY );
+ if (isExportFilter())
+ {
+ uno::Sequence<uno::Any> aArguments(comphelper::InitAnySequence(
+ {
+ {"IsPPTM", uno::makeAny(exportVBA())},
+ }));
+
+ Reference<css::lang::XMultiServiceFactory> aFactory(getComponentContext()->getServiceManager(), UNO_QUERY_THROW);
+ Reference< XExporter > xExporter(aFactory->createInstanceWithArguments("com.sun.star.comp.Impress.oox.PowerPointExport", aArguments), UNO_QUERY);
- if( xExporter.is() ) {
+ if (xExporter.is())
+ {
Reference< XComponent > xDocument( getModel(), UNO_QUERY );
Reference< XFilter > xFilter( xExporter, UNO_QUERY );
- if( xFilter.is() ) {
+ if (xFilter.is())
+ {
xExporter->setSourceDocument( xDocument );
if( xFilter->filter( rDescriptor ) )
return true;