xref: /aoo4110/main/oox/inc/oox/ppt/pptimport.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef OOX_POWERPOINT_POWERPOINTIMPORT_HXX
25 #define OOX_POWERPOINT_POWERPOINTIMPORT_HXX
26 
27 #include "oox/core/xmlfilterbase.hxx"
28 
29 #include <com/sun/star/animations/XAnimationNode.hpp>
30 #include <oox/drawingml/theme.hxx>
31 #include "oox/ppt/presentationfragmenthandler.hxx"
32 #include "oox/ppt/slidepersist.hxx"
33 #include <vector>
34 #include <map>
35 
36 namespace oox { namespace ppt {
37 
38 // ---------------------------------------------------------------------
39 
40 class PowerPointImport : public oox::core::XmlFilterBase
41 {
42 public:
43 
44 	PowerPointImport( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext )
45         throw( ::com::sun::star::uno::RuntimeException );
46 	virtual ~PowerPointImport();
47 
48     // from FilterBase
49     virtual bool importDocument() throw();
50     virtual bool exportDocument() throw();
51 
52     virtual const ::oox::drawingml::Theme* getCurrentTheme() const;
53     virtual ::oox::vml::Drawing* getVmlDrawing();
54 	virtual const oox::drawingml::table::TableStyleListPtr getTableStyles();
55     virtual ::oox::drawingml::chart::ChartConverter& getChartConverter();
56 
setActualSlidePersist(SlidePersistPtr pActualSlidePersist)57 	void													setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; };
getThemes()58 	std::map< rtl::OUString, oox::drawingml::ThemePtr >&	getThemes(){ return maThemes; };
getDrawPages()59 	std::vector< SlidePersistPtr >&							getDrawPages(){ return maDrawPages; };
getMasterPages()60 	std::vector< SlidePersistPtr >&							getMasterPages(){ return maMasterPages; };
getNotesPages()61 	std::vector< SlidePersistPtr >&							getNotesPages(){ return maNotesPages; };
62 
63     sal_Int32 getSchemeColor( sal_Int32 nToken ) const;
64 
65 private:
66     virtual GraphicHelper* implCreateGraphicHelper() const;
67     virtual ::oox::ole::VbaProject* implCreateVbaProject() const;
68     virtual ::rtl::OUString implGetImplementationName() const;
69 
70 private:
71 	rtl::OUString										maTableStyleListPath;
72 	oox::drawingml::table::TableStyleListPtr			mpTableStyleList;
73 
74 	SlidePersistPtr										mpActualSlidePersist;
75 	std::map< rtl::OUString, oox::drawingml::ThemePtr > maThemes;
76 
77 	std::vector< SlidePersistPtr > maDrawPages;
78 	std::vector< SlidePersistPtr > maMasterPages;
79 	std::vector< SlidePersistPtr > maNotesPages;
80 
81     ::boost::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
82 };
83 
84 } }
85 
86 #endif // OOX_POWERPOINT_POWERPOINTIMPORT_HXX
87