use insert function instead of for loop
[LibreOffice.git] / include / oox / ppt / pptimport.hxx
blobd4212f8140e23343d96b19c41b67b616ad3f0226
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(const 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 void getSchemeColorToken(sal_Int32& nToken) const;
78 ::Color getSchemeColor( sal_Int32 nToken ) const;
79 virtual std::shared_ptr<::oox::drawingml::Theme> getCurrentThemePtr() const override;
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: */