Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / oox / ppt / pptimport.hxx
blob24fa59621cc10dfd1e0f40b43406b48a8d0e5c38
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_OOX_PPT_PPTIMPORT_HXX
21 #define INCLUDED_OOX_PPT_PPTIMPORT_HXX
23 #include <exception>
24 #include <map>
25 #include <memory>
26 #include <vector>
28 #include <com/sun/star/uno/Reference.hxx>
29 #include <com/sun/star/uno/RuntimeException.hpp>
30 #include <com/sun/star/uno/Sequence.hxx>
31 #include <oox/core/filterbase.hxx>
32 #include <oox/core/xmlfilterbase.hxx>
33 #include <oox/drawingml/drawingmltypes.hxx>
34 #include <oox/drawingml/theme.hxx>
35 #include <oox/ppt/slidepersist.hxx>
36 #include <rtl/ustring.hxx>
37 #include <sal/types.h>
39 namespace com { namespace sun { namespace star {
40 namespace beans { struct PropertyValue; }
41 namespace uno { class XComponentContext; }
42 } } }
44 namespace oox {
45 class GraphicHelper;
46 namespace drawingml { namespace chart { class ChartConverter; } }
47 namespace ole { class VbaProject; }
48 namespace vml { class Drawing; }
51 namespace oox { namespace ppt {
54 class PowerPointImport : public oox::core::XmlFilterBase
56 public:
57 /// @throws css::uno::RuntimeException
58 PowerPointImport( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
59 virtual ~PowerPointImport() override;
61 // from FilterBase
62 virtual bool importDocument() override;
63 virtual bool exportDocument() throw() override;
65 virtual const ::oox::drawingml::Theme* getCurrentTheme() const override;
66 virtual ::oox::vml::Drawing* getVmlDrawing() override;
67 virtual const oox::drawingml::table::TableStyleListPtr getTableStyles() override;
68 virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override;
70 const SlidePersistPtr& getActualSlidePersist() const { return mpActualSlidePersist; };
71 void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; };
72 std::map< OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; };
73 std::vector< SlidePersistPtr >& getDrawPages(){ return maDrawPages; };
74 std::vector< SlidePersistPtr >& getMasterPages(){ return maMasterPages; };
75 std::vector< SlidePersistPtr >& getNotesPages(){ return maNotesPages; };
77 virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue >& rDescriptor ) override;
79 sal_Int32 getSchemeColor( sal_Int32 nToken ) const;
81 #if OSL_DEBUG_LEVEL > 0
82 static XmlFilterBase* mpDebugFilterBase;
83 #endif
85 private:
86 virtual GraphicHelper* implCreateGraphicHelper() const override;
87 virtual ::oox::ole::VbaProject* implCreateVbaProject() const override;
88 virtual OUString SAL_CALL getImplementationName() override;
90 private:
91 OUString maTableStyleListPath;
92 oox::drawingml::table::TableStyleListPtr mpTableStyleList;
94 SlidePersistPtr mpActualSlidePersist;
95 std::map< OUString, oox::drawingml::ThemePtr > maThemes;
97 std::vector< SlidePersistPtr > maDrawPages;
98 std::vector< SlidePersistPtr > maMasterPages;
99 std::vector< SlidePersistPtr > maNotesPages;
101 std::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
106 #endif // INCLUDED_OOX_PPT_PPTIMPORT_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */