Kaydet (Commit) 3505f0e4 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert "fdo#46808, Convert oox::PowerPointExport service to new style"

This reverts commit 02021163.  The filter
appears to be split in two (com.sun.star.comp.oox.ppt.PowerPointImport
implementation oox::ppt::PowerPointImport from include/oox/ppt/pptimport.hxx for
im-/export, for export calling com.sun.star.comp.Impress.oox.PowerPointExport
implementation PowerPointExport from sd/source/filter/eppt/epptooxml.hxx) for no
good reason, so the com.sun.star.oox.PowerPointExport new-style service is
supporting a hack that should rather be cleaned up.

Conflicts:
	offapi/UnoApi_offapi.mk

Change-Id: I875192a68a8e3458dbfd74b4981a6a2e86ce44d7
üst 8400e229
...@@ -107,7 +107,6 @@ $(eval $(call gb_Package_add_files_with_dir,odk_autodoc,$(gb_Package_SDKDIRNAME) ...@@ -107,7 +107,6 @@ $(eval $(call gb_Package_add_files_with_dir,odk_autodoc,$(gb_Package_SDKDIRNAME)
com/sun/star/media \ com/sun/star/media \
com/sun/star/mozilla \ com/sun/star/mozilla \
com/sun/star/office \ com/sun/star/office \
com/sun/star/oox \
com/sun/star/packages \ com/sun/star/packages \
com/sun/star/packages/manifest \ com/sun/star/packages/manifest \
com/sun/star/packages/zip \ com/sun/star/packages/zip \
......
...@@ -265,9 +265,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/mozilla,\ ...@@ -265,9 +265,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/mozilla,\
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/office,\ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/office,\
Quickstart \ Quickstart \
)) ))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/oox,\
PowerPointExport \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/packages/manifest,\ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/packages/manifest,\
ManifestReader \ ManifestReader \
ManifestWriter \ ManifestWriter \
......
/* -*- 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_oox_PowerPointExport_idl__
#define __com_sun_star_oox_PowerPointExport_idl__
#include <com/sun/star/document/XExporter.idl>
module com { module sun { module star { module oox {
/**
@since LibreOffice 4.2
*/
service PowerPointExport : com::sun::star::document::XExporter;
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -24,12 +24,10 @@ ...@@ -24,12 +24,10 @@
#include "oox/helper/graphichelper.hxx" #include "oox/helper/graphichelper.hxx"
#include "oox/ole/vbaproject.hxx" #include "oox/ole/vbaproject.hxx"
#include "com/sun/star/oox/PowerPointExport.hpp"
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::xml::sax;
using namespace ::oox::core; using namespace oox::core;
using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::lang::XComponent; using ::com::sun::star::lang::XComponent;
...@@ -98,7 +96,7 @@ sal_Int32 PowerPointImport::getSchemeColor( sal_Int32 nToken ) const ...@@ -98,7 +96,7 @@ sal_Int32 PowerPointImport::getSchemeColor( sal_Int32 nToken ) const
if ( mpActualSlidePersist ) if ( mpActualSlidePersist )
{ {
sal_Bool bColorMapped = sal_False; sal_Bool bColorMapped = sal_False;
::oox::drawingml::ClrMapPtr pClrMapPtr( mpActualSlidePersist->getClrMap() ); oox::drawingml::ClrMapPtr pClrMapPtr( mpActualSlidePersist->getClrMap() );
if ( pClrMapPtr ) if ( pClrMapPtr )
bColorMapped = pClrMapPtr->getColorMap( nToken ); bColorMapped = pClrMapPtr->getColorMap( nToken );
...@@ -112,7 +110,7 @@ sal_Int32 PowerPointImport::getSchemeColor( sal_Int32 nToken ) const ...@@ -112,7 +110,7 @@ sal_Int32 PowerPointImport::getSchemeColor( sal_Int32 nToken ) const
bColorMapped = pClrMapPtr->getColorMap( nToken ); bColorMapped = pClrMapPtr->getColorMap( nToken );
} }
} }
::oox::drawingml::ClrSchemePtr pClrSchemePtr( mpActualSlidePersist->getClrScheme() ); oox::drawingml::ClrSchemePtr pClrSchemePtr( mpActualSlidePersist->getClrScheme() );
if ( pClrSchemePtr ) if ( pClrSchemePtr )
pClrSchemePtr->getColor( nToken, nColor ); pClrSchemePtr->getColor( nToken, nColor );
else else
...@@ -142,15 +140,17 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe ...@@ -142,15 +140,17 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe
return true; return true;
if( isExportFilter() ) { if( isExportFilter() ) {
Reference< XExporter > xExporter = css::oox::PowerPointExport::create( getComponentContext() ); Reference< XExporter > xExporter( Reference<css::lang::XMultiServiceFactory>(getComponentContext()->getServiceManager(), UNO_QUERY_THROW)->createInstance( "com.sun.star.comp.Impress.oox.PowerPointExport" ), UNO_QUERY );;
Reference< XComponent > xDocument( getModel(), UNO_QUERY ); if( xExporter.is() ) {
Reference< XFilter > xFilter( xExporter, UNO_QUERY ); Reference< XComponent > xDocument( getModel(), UNO_QUERY );
Reference< XFilter > xFilter( xExporter, UNO_QUERY );
if( xFilter.is() ) { if( xFilter.is() ) {
xExporter->setSourceDocument( xDocument ); xExporter->setSourceDocument( xDocument );
if( xFilter->filter( rDescriptor ) ) if( xFilter->filter( rDescriptor ) )
return true; return true;
}
} }
} }
...@@ -162,12 +162,12 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe ...@@ -162,12 +162,12 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe
return mpActualSlidePersist ? mpActualSlidePersist->getDrawing() : 0; return mpActualSlidePersist ? mpActualSlidePersist->getDrawing() : 0;
} }
const ::oox::drawingml::table::TableStyleListPtr PowerPointImport::getTableStyles() const oox::drawingml::table::TableStyleListPtr PowerPointImport::getTableStyles()
{ {
if ( !mpTableStyleList && !maTableStyleListPath.isEmpty() ) if ( !mpTableStyleList && !maTableStyleListPath.isEmpty() )
{ {
mpTableStyleList = ::oox::drawingml::table::TableStyleListPtr( new ::oox::drawingml::table::TableStyleList() ); mpTableStyleList = oox::drawingml::table::TableStyleListPtr( new oox::drawingml::table::TableStyleList() );
importFragment( new ::oox::drawingml::table::TableStyleListFragmentHandler( importFragment( new oox::drawingml::table::TableStyleListFragmentHandler(
*this, maTableStyleListPath, *mpTableStyleList ) ); *this, maTableStyleListPath, *mpTableStyleList ) );
} }
return mpTableStyleList; return mpTableStyleList;
......
...@@ -2141,9 +2141,8 @@ OUString SAL_CALL PowerPointExport_getImplementationName() throw() ...@@ -2141,9 +2141,8 @@ OUString SAL_CALL PowerPointExport_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL PowerPointExport_getSupportedServiceNames() throw() uno::Sequence< OUString > SAL_CALL PowerPointExport_getSupportedServiceNames() throw()
{ {
Sequence< OUString > aSeq( 2 ); const OUString aServiceName( "com.sun.star.comp.ooxpptx" );
aSeq[0] = "com.sun.star.comp.ooxpptx"; const Sequence< OUString > aSeq( &aServiceName, 1 );
aSeq[1] = "com.sun.star.oox.PowerPointExport";
return aSeq; return aSeq;
} }
......
...@@ -11,6 +11,5 @@ ...@@ -11,6 +11,5 @@
xmlns="http://openoffice.org/2010/uno-components"> xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.Impress.oox.PowerPointExport"> <implementation name="com.sun.star.comp.Impress.oox.PowerPointExport">
<service name="com.sun.star.comp.ooxpptx"/> <service name="com.sun.star.comp.ooxpptx"/>
<service name="com.sun.star.oox.PowerPointExport"/>
</implementation> </implementation>
</component> </component>
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