Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / oox / ppt / pptimport.hxx
blob2d7367c4c63ef74216bdcec78c4515f83e28f61e
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 <map>
24 #include <memory>
25 #include <vector>
27 #include <com/sun/star/uno/Reference.hxx>
28 #include <com/sun/star/uno/Sequence.hxx>
29 #include <oox/core/filterbase.hxx>
30 #include <oox/core/xmlfilterbase.hxx>
31 #include <oox/drawingml/drawingmltypes.hxx>
32 #include <oox/drawingml/theme.hxx>
33 #include <oox/ppt/slidepersist.hxx>
34 #include <rtl/ustring.hxx>
35 #include <sal/types.h>
37 namespace com::sun::star {
38 namespace beans { struct PropertyValue; }
39 namespace uno { class XComponentContext; }
42 namespace oox {
43 class GraphicHelper;
44 namespace drawingml::chart { class ChartConverter; }
45 namespace ole { class VbaProject; }
46 namespace vml { class Drawing; }
49 namespace oox::ppt {
52 class PowerPointImport final : public oox::core::XmlFilterBase
54 public:
55 /// @throws css::uno::RuntimeException
56 PowerPointImport( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
57 virtual ~PowerPointImport() override;
59 // from FilterBase
60 virtual bool importDocument() override;
61 virtual bool exportDocument() noexcept override;
63 virtual const ::oox::drawingml::Theme* getCurrentTheme() const override;
64 virtual ::oox::vml::Drawing* getVmlDrawing() override;
65 virtual oox::drawingml::table::TableStyleListPtr getTableStyles() override;
66 virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override;
68 const SlidePersistPtr& getActualSlidePersist() const { return mpActualSlidePersist; };
69 void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; };
70 std::map< OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; };
71 std::vector< SlidePersistPtr >& getDrawPages(){ return maDrawPages; };
72 std::vector< SlidePersistPtr >& getMasterPages(){ return maMasterPages; };
73 std::vector< SlidePersistPtr >& getNotesPages(){ return maNotesPages; };
75 virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue >& rDescriptor ) override;
77 ::Color getSchemeColor( sal_Int32 nToken ) const;
78 virtual std::shared_ptr<::oox::drawingml::Theme> getCurrentThemePtr() const override;
80 #if OSL_DEBUG_LEVEL > 0
81 static XmlFilterBase* mpDebugFilterBase;
82 #endif
84 private:
85 virtual GraphicHelper* implCreateGraphicHelper() const override;
86 virtual ::oox::ole::VbaProject* implCreateVbaProject() const override;
87 virtual OUString SAL_CALL getImplementationName() override;
89 private:
90 OUString maTableStyleListPath;
91 oox::drawingml::table::TableStyleListPtr mpTableStyleList;
93 SlidePersistPtr mpActualSlidePersist;
94 std::map< OUString, oox::drawingml::ThemePtr > maThemes;
96 std::vector< SlidePersistPtr > maDrawPages;
97 std::vector< SlidePersistPtr > maMasterPages;
98 std::vector< SlidePersistPtr > maNotesPages;
100 std::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
105 #endif // INCLUDED_OOX_PPT_PPTIMPORT_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */