xref: /AOO41X/main/oox/inc/oox/ppt/pptimport.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef OOX_POWERPOINT_POWERPOINTIMPORT_HXX
29 #define OOX_POWERPOINT_POWERPOINTIMPORT_HXX
30 
31 #include "oox/core/xmlfilterbase.hxx"
32 
33 #include <com/sun/star/animations/XAnimationNode.hpp>
34 #include <oox/drawingml/theme.hxx>
35 #include "oox/ppt/presentationfragmenthandler.hxx"
36 #include "oox/ppt/slidepersist.hxx"
37 #include <vector>
38 #include <map>
39 
40 namespace oox { namespace ppt {
41 
42 // ---------------------------------------------------------------------
43 
44 class PowerPointImport : public oox::core::XmlFilterBase
45 {
46 public:
47 
48 	PowerPointImport( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext )
49         throw( ::com::sun::star::uno::RuntimeException );
50 	virtual ~PowerPointImport();
51 
52     // from FilterBase
53     virtual bool importDocument() throw();
54     virtual bool exportDocument() throw();
55 
56     virtual const ::oox::drawingml::Theme* getCurrentTheme() const;
57     virtual ::oox::vml::Drawing* getVmlDrawing();
58 	virtual const oox::drawingml::table::TableStyleListPtr getTableStyles();
59     virtual ::oox::drawingml::chart::ChartConverter& getChartConverter();
60 
61 	void													setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; };
62 	std::map< rtl::OUString, oox::drawingml::ThemePtr >&	getThemes(){ return maThemes; };
63 	std::vector< SlidePersistPtr >&							getDrawPages(){ return maDrawPages; };
64 	std::vector< SlidePersistPtr >&							getMasterPages(){ return maMasterPages; };
65 	std::vector< SlidePersistPtr >&							getNotesPages(){ return maNotesPages; };
66 
67     sal_Int32 getSchemeColor( sal_Int32 nToken ) const;
68 
69 private:
70     virtual GraphicHelper* implCreateGraphicHelper() const;
71     virtual ::oox::ole::VbaProject* implCreateVbaProject() const;
72     virtual ::rtl::OUString implGetImplementationName() const;
73 
74 private:
75 	rtl::OUString										maTableStyleListPath;
76 	oox::drawingml::table::TableStyleListPtr			mpTableStyleList;
77 
78 	SlidePersistPtr										mpActualSlidePersist;
79 	std::map< rtl::OUString, oox::drawingml::ThemePtr > maThemes;
80 
81 	std::vector< SlidePersistPtr > maDrawPages;
82 	std::vector< SlidePersistPtr > maMasterPages;
83 	std::vector< SlidePersistPtr > maNotesPages;
84 
85     ::boost::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
86 };
87 
88 } }
89 
90 #endif // OOX_POWERPOINT_POWERPOINTIMPORT_HXX
91