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 virtual ~PowerPointImport(); 46 47 // from FilterBase 48 virtual bool importDocument() throw(); 49 virtual bool exportDocument() throw(); 50 51 virtual const ::oox::drawingml::Theme* getCurrentTheme() const; 52 virtual ::oox::vml::Drawing* getVmlDrawing(); 53 virtual const oox::drawingml::table::TableStyleListPtr getTableStyles(); 54 virtual ::oox::drawingml::chart::ChartConverter& getChartConverter(); 55 setActualSlidePersist(SlidePersistPtr pActualSlidePersist)56 void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; }; getThemes()57 std::map< rtl::OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; }; getDrawPages()58 std::vector< SlidePersistPtr >& getDrawPages(){ return maDrawPages; }; getMasterPages()59 std::vector< SlidePersistPtr >& getMasterPages(){ return maMasterPages; }; getNotesPages()60 std::vector< SlidePersistPtr >& getNotesPages(){ return maNotesPages; }; 61 62 sal_Int32 getSchemeColor( sal_Int32 nToken ) const; 63 64 private: 65 virtual GraphicHelper* implCreateGraphicHelper() const; 66 virtual ::oox::ole::VbaProject* implCreateVbaProject() const; 67 virtual ::rtl::OUString implGetImplementationName() const; 68 69 private: 70 rtl::OUString maTableStyleListPath; 71 oox::drawingml::table::TableStyleListPtr mpTableStyleList; 72 73 SlidePersistPtr mpActualSlidePersist; 74 std::map< rtl::OUString, oox::drawingml::ThemePtr > maThemes; 75 76 std::vector< SlidePersistPtr > maDrawPages; 77 std::vector< SlidePersistPtr > maMasterPages; 78 std::vector< SlidePersistPtr > maNotesPages; 79 80 ::boost::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv; 81 }; 82 83 } } 84 85 #endif // OOX_POWERPOINT_POWERPOINTIMPORT_HXX 86