Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9dca300a
Kaydet (Commit)
9dca300a
authored
Mar 07, 2002
tarafından
Sven Jacobi
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
initial version
üst
5acbb755
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
966 additions
and
0 deletions
+966
-0
build.lst
filter/prj/build.lst
+4
-0
d.lst
filter/prj/d.lst
+0
-0
makefile.mk
filter/source/msfilter/powerpoint/makefile.mk
+134
-0
pptcom.hxx
filter/source/msfilter/powerpoint/pptcom.hxx
+144
-0
pptimporter.cxx
filter/source/msfilter/powerpoint/pptimporter.cxx
+201
-0
pptimporter.hxx
filter/source/msfilter/powerpoint/pptimporter.hxx
+129
-0
pptimporteruno.cxx
filter/source/msfilter/powerpoint/pptimporteruno.cxx
+141
-0
ppttoxml.cxx
filter/source/msfilter/powerpoint/ppttoxml.cxx
+126
-0
ppttoxml.hxx
filter/source/msfilter/powerpoint/ppttoxml.hxx
+87
-0
No files found.
filter/prj/build.lst
0 → 100644
Dosyayı görüntüle @
9dca300a
fl filter : goodies xmloff NULL
fl filter usr1 - all fl_mkout NULL
fl filter\prj get - all fl_prj NULL
fl filter\source\msfilter\powerpoint nmake - all fl_powerpoint NULL
filter/prj/d.lst
0 → 100644
Dosyayı görüntüle @
9dca300a
filter/source/msfilter/powerpoint/makefile.mk
0 → 100644
Dosyayı görüntüle @
9dca300a
#*************************************************************************
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.1 $
#
# last change: $Author: sj $ $Date: 2002-03-07 17:54:35 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
#
# - GNU Lesser General Public License Version 2.1
# - Sun Industry Standards Source License Version 1.1
#
# Sun Microsystems Inc., October, 2000
#
# GNU Lesser General Public License Version 2.1
# =============================================
# Copyright 2000 by Sun Microsystems, Inc.
# 901 San Antonio Road, Palo Alto, CA 94303, USA
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1, as published by the Free Software Foundation.
#
# This library 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 for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
#
# Sun Industry Standards Source License Version 1.1
# =================================================
# The contents of this file are subject to the Sun Industry Standards
# Source License Version 1.1 (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.openoffice.org/license.html.
#
# Software provided under this License is provided on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
# See the License for the specific provisions governing your rights and
# obligations concerning the Software.
#
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
#
# Copyright: 2000 by Sun Microsystems, Inc.
#
# All Rights Reserved.
#
# Contributor(s): _______________________________________
#
#
#
#*************************************************************************
PRJ
=
..
$/
..
$/
..
PRJNAME
=
filter
TARGET
=
PptImporter
UNOUCRRDB
=
$(SOLARBINDIR)$/
applicat.rdb
ENABLE_EXCEPTIONS
=
TRUE
USE_DEFFILE
=
TRUE
# --- Settings ----------------------------------
.INCLUDE
:
svpre.mk
.INCLUDE
:
settings.mk
.INCLUDE
:
sv.mk
# --- Types -------------------------------------
UNOTYPES
=
com.sun.star.uno.XWeak
\
com.sun.star.uno.XNamingService
\
com.sun.star.uno.XComponentContext
\
com.sun.star.uno.XAggregation
\
com.sun.star.lang.XServiceInfo
\
com.sun.star.lang.XSingleServiceFactory
\
com.sun.star.lang.XMultiServiceFactory
\
com.sun.star.lang.XSingleComponentFactory
\
com.sun.star.lang.XTypeProvider
\
com.sun.star.registry.XSimpleRegistry
\
com.sun.star.document.XFilter
\
com.sun.star.document.XImporter
\
com.sun.star.lang.XInitialization
\
com.sun.star.io.XInputStream
\
com.sun.star.xml.sax.XDocumentHandler
\
com.sun.star.xml.sax.InputSource
\
com.sun.star.xml.sax.XParser
# --- Files -------------------------------------
CXXFILES
=
pptimporter.cxx
\
pptimporteruno.cxx
\
ppttoxml.cxx
SLOFILES
=
$(SLO)$/
pptimporter.obj
\
$(SLO)$/
pptimporteruno.obj
\
$(SLO)$/
ppttoxml.obj
# --- Library -----------------------------------
SHL1TARGET
=
$(TARGET)$(UPD)$(DLLPOSTFIX)
SHL1STDLIBS
=
$(CPPULIB)
\
$(CPPUHELPERLIB)
\
$(UNOTOOLSLIB)
\
$(COMPHELPERLIB)
\
$(VOSLIB)
\
$(SALLIB)
\
$(VCLLIB)
\
$(SVLLIB)
\
$(ONELIB)
\
$(TOOLSLIB)
\
$(SOTLIB)
\
$(XMLOFFLIB)
SHL1DEPN
=
SHL1IMPLIB
=
i
$(SHL1TARGET)
SHL1LIBS
=
$(SLB)$/$(TARGET)
.lib
SHL1DEF
=
$(MISC)$/$(SHL1TARGET)
.def
DEF1NAME
=
$(SHL1TARGET)
DEF1EXPORTFILE
=
exports.dxp
# --- Targets ----------------------------------
.INCLUDE
:
target.mk
filter/source/msfilter/powerpoint/pptcom.hxx
0 → 100644
Dosyayı görüntüle @
9dca300a
/*************************************************************************
*
* $RCSfile: pptcom.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: sj $ $Date: 2002-03-07 17:54:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _PPTCOM_HXX
#define _PPTCOM_HXX
#ifndef __RTL_USTRING_
#include <rtl/ustring>
#endif
#ifndef _DEBUG_HXX
#include <tools/debug.hxx>
#endif
#ifndef _STREAM_HXX
#include <tools/stream.hxx>
#endif
#ifndef _STRING_HXX
#include <tools/string.hxx>
#endif
#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
#endif
#ifndef _STACK_HXX
#include <tools/stack.hxx>
#endif
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/RuntimeException.hpp>
#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#endif
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
#include <com/sun/star/io/XInputStream.hpp>
#endif
#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
#ifndef _XMLOFF_XMLEXP_HXX
#include <xmloff/xmlexp.hxx>
#endif
#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
#endif
#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
#endif
#ifndef _CPPUHELPER_IMPLBASE4_HXX_
#include <cppuhelper/implbase4.hxx>
#endif
#ifndef _COM_SUN_STAR_DOCUMENT_XFILTER_HPP_
#include <com/sun/star/document/XFilter.hpp>
#endif
#ifndef _COM_SUN_STAR_DOCUMENT_XIMPORTER_HPP_
#include <com/sun/star/document/XImporter.hpp>
#endif
#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
#include <com/sun/star/lang/XInitialization.hpp>
#endif
#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
#endif
// -----------------------------------------------------------------------------
#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_PRES com::sun::star::presentation
#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 )))
#define PPT_DTD_STRING B2UCONST( "<!DOCTYPE office:document-styles PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"office.dtd\">"
#endif
filter/source/msfilter/powerpoint/pptimporter.cxx
0 → 100644
Dosyayı görüntüle @
9dca300a
/*************************************************************************
*
* $RCSfile: pptimporter.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: sj $ $Date: 2002-03-07 17:54:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _PPTIMPORTER_HXX
#include "pptimporter.hxx"
#endif
#ifdef DBG_DUMP_PPT_IMPORT
#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HDL_
#include <com/sun/star/io/XActiveDataSource.hpp>
#endif
#ifndef _UTL_STREAM_WRAPPER_HXX_
#include <unotools/streamwrap.hxx>
#endif
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
#include <comphelper/processfactory.hxx>
#endif
#endif
#include <uno/mapping.hxx>
// -----------------
// - PptImporter -
// -----------------
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
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
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
(
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
)
);
// REF( NMSP_BEANS::XPropertySet ) xPropSet( xServiceFactory->createInstance( B2UCONST( "com.sun.star.beans.PropertySet" ) ) );
// Any aAny;
// aAny <<= (sal_Bool)sal_True;
// xPropSet->setPropertyValue( B2UCONST( "UsePrettyPrinting" ), aAny );
#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
();
}
filter/source/msfilter/powerpoint/pptimporter.hxx
0 → 100644
Dosyayı görüntüle @
9dca300a
/*************************************************************************
*
* $RCSfile: pptimporter.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: sj $ $Date: 2002-03-07 17:54:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _PPTIMPORTER_HXX
#define _PPTIMPORTER_HXX
#ifndef _PPTCOM_HXX
#include "pptcom.hxx"
#endif
#ifndef _PPTTOXML_HXX
#include "ppttoxml.hxx"
#endif
// ---------------
// - 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
filter/source/msfilter/powerpoint/pptimporteruno.cxx
0 → 100644
Dosyayı görüntüle @
9dca300a
/*************************************************************************
*
* $RCSfile: pptimporteruno.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: sj $ $Date: 2002-03-07 17:54:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include "pptimporter.hxx"
#include <cppuhelper/factory.hxx>
#include <uno/mapping.hxx>
// -------------------
// - factory methods -
// -------------------
static
REF
(
NMSP_UNO
::
XInterface
)
SAL_CALL
create_PptImporter
(
const
REF
(
NMSP_LANG
::
XMultiServiceFactory
)
&
rxFact
)
{
return
REF
(
NMSP_UNO
::
XInterface
)(
*
new
PptImporter
(
rxFact
)
);
}
// ------------------------------------------
// - component_getImplementationEnvironment -
// ------------------------------------------
extern
"C"
void
SAL_CALL
component_getImplementationEnvironment
(
const
sal_Char
**
ppEnvTypeName
,
uno_Environment
**
ppEnv
)
{
*
ppEnvTypeName
=
CPPU_CURRENT_LANGUAGE_BINDING_NAME
;
}
// -----------------------
// - component_writeInfo -
// -----------------------
extern
"C"
sal_Bool
SAL_CALL
component_writeInfo
(
void
*
pServiceManager
,
void
*
pRegistryKey
)
{
sal_Bool
bRet
=
sal_False
;
if
(
pRegistryKey
)
{
try
{
NMSP_UNO
::
Reference
<
NMSP_REGISTRY
::
XRegistryKey
>
xNewKey
(
reinterpret_cast
<
NMSP_REGISTRY
::
XRegistryKey
*
>
(
pRegistryKey
)
->
createKey
(
PptImporter_getImplementationName
()
)
);
xNewKey
=
xNewKey
->
createKey
(
B2UCONST
(
"/UNO/SERVICES"
)
);
const
SEQ
(
NMSP_RTL
::
OUString
)
&
rSNL
=
PptImporter_getSupportedServiceNames
();
const
NMSP_RTL
::
OUString
*
pArray
=
rSNL
.
getConstArray
();
for
(
sal_Int32
nPos
=
rSNL
.
getLength
();
nPos
--
;
)
xNewKey
->
createKey
(
pArray
[
nPos
]
);
bRet
=
sal_True
;
}
catch
(
NMSP_REGISTRY
::
InvalidRegistryException
&
)
{