diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-10-02 11:29:48 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-10-02 11:30:32 +0200 |
commit | 4ea8ddb05b3e5f65ee8cf73ae87500d066c13ea5 (patch) | |
tree | 69eb60f203c739a1e353db7973f452d1416c4a26 /filter | |
parent | Make Clang happy (diff) | |
download | core-4ea8ddb05b3e5f65ee8cf73ae87500d066c13ea5.tar.gz core-4ea8ddb05b3e5f65ee8cf73ae87500d066c13ea5.zip |
PptImporter is unused; it was also missing in scp2
Change-Id: I87c8d46d791525e3e5b6866edc6423e92cbcca81
Diffstat (limited to 'filter')
-rw-r--r-- | filter/Library_PptImporter.mk | 42 | ||||
-rw-r--r-- | filter/Module_filter.mk | 1 | ||||
-rw-r--r-- | filter/source/msfilter/powerpoint/pptcom.hxx | 62 | ||||
-rw-r--r-- | filter/source/msfilter/powerpoint/pptimporter.cxx | 148 | ||||
-rw-r--r-- | filter/source/msfilter/powerpoint/pptimporter.hxx | 85 | ||||
-rw-r--r-- | filter/source/msfilter/powerpoint/pptimporteruno.cxx | 63 | ||||
-rw-r--r-- | filter/source/msfilter/powerpoint/ppttoxml.cxx | 83 | ||||
-rw-r--r-- | filter/source/msfilter/powerpoint/ppttoxml.hxx | 41 |
8 files changed, 0 insertions, 525 deletions
diff --git a/filter/Library_PptImporter.mk b/filter/Library_PptImporter.mk deleted file mode 100644 index f1d172aeda4f..000000000000 --- a/filter/Library_PptImporter.mk +++ /dev/null @@ -1,42 +0,0 @@ -# -# 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 . -# - -$(eval $(call gb_Library_Library,PptImporter)) - -$(eval $(call gb_Library_use_sdk_api,PptImporter)) - -$(eval $(call gb_Library_set_include,PptImporter,\ - $$(INCLUDE) \ -)) - -$(eval $(call gb_Library_use_libraries,PptImporter,\ - sot \ - tl \ - cppuhelper \ - cppu \ - sal \ - $(gb_UWINAPI) \ -)) - -$(eval $(call gb_Library_add_exception_objects,PptImporter,\ - filter/source/msfilter/powerpoint/pptimporter \ - filter/source/msfilter/powerpoint/pptimporteruno \ - filter/source/msfilter/powerpoint/ppttoxml \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk index b3ec2a3f19a0..99bebb5c55d8 100644 --- a/filter/Module_filter.mk +++ b/filter/Module_filter.mk @@ -26,7 +26,6 @@ $(eval $(call gb_Module_add_targets,filter,\ AllLangResTarget_xsltdlg \ Configuration_filter \ CustomTarget_svg \ - Library_PptImporter \ Library_egi \ Library_eme \ Library_epb \ diff --git a/filter/source/msfilter/powerpoint/pptcom.hxx b/filter/source/msfilter/powerpoint/pptcom.hxx deleted file mode 100644 index f25e6adaab20..000000000000 --- a/filter/source/msfilter/powerpoint/pptcom.hxx +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- 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 _PPTCOM_HXX -#define _PPTCOM_HXX - -#include <rtl/ustring.hxx> - -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/uno/RuntimeException.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/registry/XRegistryKey.hpp> -#include <com/sun/star/io/XInputStream.hpp> -#include <com/sun/star/xml/sax/XDocumentHandler.hpp> -#include <xmloff/xmlexp.hxx> -#include <xmloff/nmspmap.hxx> -#include <cppuhelper/implbase1.hxx> -#include <cppuhelper/implbase4.hxx> -#include <com/sun/star/document/XFilter.hpp> -#include <com/sun/star/document/XImporter.hpp> -#include <com/sun/star/lang/XInitialization.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> - -// ----------------------------------------------------------------------------- - -#define NMSP_CPPU cppu -#define NMSP_RTL rtl -#define NMSP_UTL utl -#define NMSP_COMPHELPER comphelper -#define NMSP_UNO com::sun::star::uno -#define NMSP_BEANS com::sun::star::beans -#define NMSP_LANG com::sun::star::lang -#define NMSP_IO com::sun::star::io -#define NMSP_SAX com::sun::star::xml::sax -#define NMSP_REGISTRY com::sun::star::registry -#define NMSP_DOCUMENT com::sun::star::document - - -#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > -#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > -#define ANY NMSP_UNO::Any -#define B2UCONST( _def_pChar ) (NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar ))) -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/powerpoint/pptimporter.cxx b/filter/source/msfilter/powerpoint/pptimporter.cxx deleted file mode 100644 index 6450b761ba15..000000000000 --- a/filter/source/msfilter/powerpoint/pptimporter.cxx +++ /dev/null @@ -1,148 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "pptimporter.hxx" - -#ifdef DBG_DUMP_PPT_IMPORT -#include <com/sun/star/io/XActiveDataSource.hpp> -#include <unotools/streamwrap.hxx> -#include <comphelper/processfactory.hxx> -#endif - -#include <uno/mapping.hxx> - -NMSP_RTL::OUString PptImporter_getImplementationName() - throw( NMSP_UNO::RuntimeException ) -{ - return B2UCONST( "com.sun.star.presentation.PptImporter" ); -} -#define SERVICE_NAME "com.sun.star.document.ImportFilter" -sal_Bool SAL_CALL PptImporter_supportsService( const NMSP_RTL::OUString& ServiceName ) - throw( NMSP_UNO::RuntimeException ) -{ - return ServiceName == SERVICE_NAME; -} - -SEQ( NMSP_RTL::OUString ) SAL_CALL PptImporter_getSupportedServiceNames() - throw( NMSP_UNO::RuntimeException ) -{ - SEQ( NMSP_RTL::OUString ) aRet(1); - NMSP_RTL::OUString* pArray = aRet.getArray(); - pArray[0] = B2UCONST( SERVICE_NAME ); - return aRet; -} -#undef SERVICE_NAME - -PptImporter::PptImporter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ) : - xFact( rxMgr ) -{ - NMSP_RTL::OUString sService( B2UCONST( "com.sun.star.comp.Impress.XMLImporter" ) ); - try - { - xHdl = REF( NMSP_SAX::XDocumentHandler ) ( xFact->createInstance( sService ), NMSP_UNO::UNO_QUERY ); - xImporter = REF( NMSP_DOCUMENT::XImporter )( xHdl, NMSP_UNO::UNO_QUERY ); - } - catch( const NMSP_UNO::Exception & ) - { - } -} - -PptImporter::~PptImporter() -{ -} - -void SAL_CALL PptImporter::acquire() throw() -{ - OWeakObject::acquire(); -} - -void SAL_CALL PptImporter::release() throw() -{ - OWeakObject::release(); -} - -// XFilter -sal_Bool SAL_CALL PptImporter::filter( const SEQ( NMSP_BEANS::PropertyValue )& aDescriptor ) - throw ( NMSP_UNO::RuntimeException ) -{ - - -#ifdef DBG_DUMP_PPT_IMPORT - - REF( NMSP_LANG::XMultiServiceFactory ) xServiceFactory( NMSP_COMPHELPER::getProcessServiceFactory() ); - REF( NMSP_UNO::XInterface ) xWriter( xServiceFactory->createInstance( B2UCONST( "com.sun.star.xml.sax.Writer" ) ) ); - SvFileStream aStrm( B2UCONST( "d:\\test2.xml" ), STREAM_READ | STREAM_WRITE | STREAM_TRUNC ); - REF( NMSP_IO::XOutputStream ) xOutStream( (::cppu::OWeakObject*) new NMSP_UTL::OOutputStreamWrapper( aStrm ), NMSP_UNO::UNO_QUERY ); - REF( NMSP_IO::XActiveDataSource ) xDataSource( xWriter , NMSP_UNO::UNO_QUERY ); - xDataSource->setOutputStream( xOutStream ); - aFilter.filter( aDescriptor, REF( NMSP_SAX::XDocumentHandler )( xWriter, NMSP_UNO::UNO_QUERY ) ); - -#endif - - return aFilter.filter( aDescriptor, xHdl ); -} - -void SAL_CALL PptImporter::cancel() - throw ( NMSP_UNO::RuntimeException ) -{ - aFilter.cancel(); -} - -// XImporter -void SAL_CALL PptImporter::setTargetDocument( const REF( NMSP_LANG::XComponent )& xDoc ) - throw ( NMSP_LANG::IllegalArgumentException, NMSP_UNO::RuntimeException) -{ - xImporter->setTargetDocument( xDoc ); -} - -// XInitialization -void SAL_CALL PptImporter::initialize( const SEQ( NMSP_UNO::Any )& /* aArguments */ ) - throw ( NMSP_UNO::Exception, NMSP_UNO::RuntimeException ) -{ -} - -// XServiceInfo -NMSP_RTL::OUString SAL_CALL PptImporter::getImplementationName() - throw( NMSP_UNO::RuntimeException ) -{ - return PptImporter_getImplementationName(); -} - -sal_Bool SAL_CALL PptImporter::supportsService( const NMSP_RTL::OUString& rServiceName ) - throw( NMSP_UNO::RuntimeException ) -{ - return PptImporter_supportsService( rServiceName ); -} - -SEQ( NMSP_RTL::OUString ) SAL_CALL PptImporter::getSupportedServiceNames() - throw ( NMSP_UNO::RuntimeException ) -{ - return PptImporter_getSupportedServiceNames(); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/powerpoint/pptimporter.hxx b/filter/source/msfilter/powerpoint/pptimporter.hxx deleted file mode 100644 index 10cce61d559f..000000000000 --- a/filter/source/msfilter/powerpoint/pptimporter.hxx +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- 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 _PPTIMPORTER_HXX -#define _PPTIMPORTER_HXX - -#include "pptcom.hxx" -#include "ppttoxml.hxx" - -// --------------- -// - PptImporter - -// --------------- - -class PptImporter : public NMSP_CPPU::WeakImplHelper4 -< - NMSP_DOCUMENT::XFilter, - NMSP_DOCUMENT::XImporter, - NMSP_LANG::XInitialization, - NMSP_LANG::XServiceInfo -> -{ - PptToXml aFilter; - REF( NMSP_SAX::XDocumentHandler ) xHdl; - REF( NMSP_LANG::XMultiServiceFactory ) xFact; - REF( NMSP_DOCUMENT::XImporter ) xImporter; - -public: - - PptImporter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ); - virtual ~PptImporter(); - - // XInterface - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); - - // XFilter - virtual sal_Bool SAL_CALL filter( const SEQ( NMSP_BEANS::PropertyValue )& aDescriptor ) - throw ( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL cancel( ) - throw ( NMSP_UNO::RuntimeException ); - - // XImporter - virtual void SAL_CALL setTargetDocument( const REF(NMSP_LANG::XComponent)& xDoc ) - throw ( NMSP_LANG::IllegalArgumentException, NMSP_UNO::RuntimeException ); - - // XInitialization - virtual void SAL_CALL initialize( const SEQ( NMSP_UNO::Any )& aArguments ) - throw ( NMSP_UNO::Exception, NMSP_UNO::RuntimeException ); - - // XServiceInfo - virtual NMSP_RTL::OUString SAL_CALL getImplementationName() - throw ( NMSP_UNO::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService( const NMSP_RTL::OUString& ServiceName ) - throw ( NMSP_UNO::RuntimeException ); - virtual SEQ( NMSP_RTL::OUString ) SAL_CALL getSupportedServiceNames() - throw ( NMSP_UNO::RuntimeException ); - -}; - -NMSP_RTL::OUString PptImporter_getImplementationName() - throw ( NMSP_UNO::RuntimeException ); -sal_Bool SAL_CALL PptImportert_supportsService( const NMSP_RTL::OUString& ServiceName ) - throw( NMSP_UNO::RuntimeException ); -SEQ( NMSP_RTL::OUString ) SAL_CALL PptImporter_getSupportedServiceNames() - throw( NMSP_UNO::RuntimeException ); - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/powerpoint/pptimporteruno.cxx b/filter/source/msfilter/powerpoint/pptimporteruno.cxx deleted file mode 100644 index be0b49ebfad5..000000000000 --- a/filter/source/msfilter/powerpoint/pptimporteruno.cxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include "pptimporter.hxx" - -#include <cppuhelper/factory.hxx> -#include <uno/mapping.hxx> - -static REF( NMSP_UNO::XInterface ) SAL_CALL create_PptImporter( const REF( NMSP_LANG::XMultiServiceFactory )& rxFact ) -{ - return REF( NMSP_UNO::XInterface )( *new PptImporter( rxFact ) ); -} - -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) -{ - REF( NMSP_LANG::XSingleServiceFactory ) xFactory; - void* pRet = 0; - - if( rtl_str_compare( pImplName, "com.sun.star.presentation.PptImporter" ) == 0 ) - { - const NMSP_RTL::OUString aServiceName( B2UCONST( "com.sun.star.presentation.PptImporter" ) ); - - xFactory = REF( NMSP_LANG::XSingleServiceFactory )( NMSP_CPPU::createSingleFactory( - reinterpret_cast< NMSP_LANG::XMultiServiceFactory* >( pServiceManager ), - B2UCONST( "com.sun.star.presentation.PptImporter" ), - create_PptImporter, SEQ( NMSP_RTL::OUString )( &aServiceName, 1 ) ) ); - } - if( xFactory.is() ) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - - return pRet; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/powerpoint/ppttoxml.cxx b/filter/source/msfilter/powerpoint/ppttoxml.cxx deleted file mode 100644 index 9385108c5b12..000000000000 --- a/filter/source/msfilter/powerpoint/ppttoxml.cxx +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include "ppttoxml.hxx" -#include <sot/storage.hxx> - -PptToXml::PptToXml() -{ -} - -PptToXml::~PptToXml() -{ -} - -sal_Bool PptToXml::filter( const SEQ( NMSP_BEANS::PropertyValue )& aDescriptor, - REF( NMSP_SAX::XDocumentHandler ) xHandler ) -{ - xHdl = xHandler; - - sal_Bool bStatus = sal_False; - sal_Int32 i; - for( i = 0; i < aDescriptor.getLength(); i++ ) - { - NMSP_RTL::OUString strTemp; - aDescriptor[ i ].Value >>= strTemp; - - if ( aDescriptor[ i ].Name == B2UCONST( "URL" ) ) - { - NMSP_RTL::OUString sURL; - aDescriptor[ i ].Value >>= sURL; - SotStorageRef xStg( new SotStorage( sURL, STREAM_STD_READ, 0 ) ); - if ( xStg.Is() ) - { - SotStorageStreamRef xDocStream( xStg->OpenSotStream( B2UCONST( "PowerPoint Document" ), STREAM_STD_READ ) ); - if( xDocStream.Is() ) - { - xDocStream->SetVersion( xStg->GetVersion() ); - xDocStream->SetCryptMaskKey(xStg->GetKey()); - - xHdl->startDocument(); - - - xHdl->endDocument(); - bStatus = sal_True; - } - } - } - } - return bStatus; -} - -void PptToXml::cancel() -{ - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/powerpoint/ppttoxml.hxx b/filter/source/msfilter/powerpoint/ppttoxml.hxx deleted file mode 100644 index 47120852d282..000000000000 --- a/filter/source/msfilter/powerpoint/ppttoxml.hxx +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 _PPTTOXML_HXX -#define _PPTTOXML_HXX - -#include "pptcom.hxx" - -class PptToXml -{ - REF( NMSP_SAX::XDocumentHandler ) xHdl; - - public: - - PptToXml(); - ~PptToXml(); - - sal_Bool filter( const SEQ( NMSP_BEANS::PropertyValue )& aDescriptor, - REF(NMSP_SAX::XDocumentHandler) xHandler ); - void cancel(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |