LibreOffice Module oox (master)  1
pptimport.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_OOX_PPT_PPTIMPORT_HXX
21 #define INCLUDED_OOX_PPT_PPTIMPORT_HXX
22 
23 #include <map>
24 #include <memory>
25 #include <vector>
26 
27 #include <com/sun/star/uno/Reference.hxx>
28 #include <com/sun/star/uno/Sequence.hxx>
29 #include <oox/core/filterbase.hxx>
32 #include <oox/drawingml/theme.hxx>
33 #include <oox/ppt/slidepersist.hxx>
34 #include <oox/ppt/pptshape.hxx>
35 #include <rtl/ustring.hxx>
36 #include <sal/types.h>
37 
38 namespace com::sun::star {
39  namespace beans { struct PropertyValue; }
40  namespace uno { class XComponentContext; }
41 }
42 
43 namespace oox {
44  class GraphicHelper;
45  namespace drawingml::chart { class ChartConverter; }
46  namespace ole { class VbaProject; }
47  namespace vml { class Drawing; }
48 }
49 
50 namespace oox::ppt {
51 
52 
54 {
55 public:
57  PowerPointImport( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
58  virtual ~PowerPointImport() override;
59 
60  // from FilterBase
61  virtual bool importDocument() override;
62  virtual bool exportDocument() noexcept override;
63 
64  virtual const ::oox::drawingml::Theme* getCurrentTheme() const override;
65  virtual ::oox::vml::Drawing* getVmlDrawing() override;
67  virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override;
68 
70  void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; };
71  std::map< OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; };
72  std::vector< SlidePersistPtr >& getDrawPages(){ return maDrawPages; };
73  std::vector< SlidePersistPtr >& getMasterPages(){ return maMasterPages; };
74  std::vector< SlidePersistPtr >& getNotesPages(){ return maNotesPages; };
75 
76  virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue >& rDescriptor ) override;
77 
78  ::Color getSchemeColor( sal_Int32 nToken ) const;
79 
80 #if OSL_DEBUG_LEVEL > 0
82 #endif
83 
84 private:
85  virtual GraphicHelper* implCreateGraphicHelper() const override;
86  virtual ::oox::ole::VbaProject* implCreateVbaProject() const override;
87  virtual OUString SAL_CALL getImplementationName() override;
88 
89 private:
92 
94  std::map< OUString, oox::drawingml::ThemePtr > maThemes;
95 
96  std::vector< SlidePersistPtr > maDrawPages;
97  std::vector< SlidePersistPtr > maMasterPages;
98  std::vector< SlidePersistPtr > maNotesPages;
99 
100  std::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
101 };
102 
103 }
104 
105 #endif // INCLUDED_OOX_PPT_PPTIMPORT_HXX
106 
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
virtual ::oox::drawingml::chart::ChartConverter * getChartConverter() override
Has to be implemented by each filter, returns a filter-specific chart converter object, that should be global per imported document.
Definition: pptimport.cxx:239
std::vector< SlidePersistPtr > maDrawPages
Definition: pptimport.hxx:96
std::vector< SlidePersistPtr > & getMasterPages()
Definition: pptimport.hxx:73
std::map< OUString, oox::drawingml::ThemePtr > maThemes
Definition: pptimport.hxx:94
std::vector< SlidePersistPtr > & getDrawPages()
Definition: pptimport.hxx:72
std::shared_ptr< TableStyleList > TableStyleListPtr
virtual ~PowerPointImport() override
Definition: pptimport.cxx:71
virtual OUString SAL_CALL getImplementationName() override
Definition: pptimport.cxx:284
virtual sal_Bool SAL_CALL filter(const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor) override
Definition: pptimport.cxx:179
virtual const ::oox::drawingml::Theme * getCurrentTheme() const override
Has to be implemented by each filter, returns the current theme.
Definition: pptimport.cxx:174
virtual bool importDocument() override
Derived classes implement import of the entire document.
Definition: pptimport.cxx:75
oox::drawingml::table::TableStyleListPtr mpTableStyleList
Definition: pptimport.hxx:91
virtual ::oox::ole::VbaProject * implCreateVbaProject() const override
Derived classes create a VBA project manager object.
Definition: pptimport.cxx:279
static XmlFilterBase * mpDebugFilterBase
Definition: pptimport.hxx:81
std::map< OUString, oox::drawingml::ThemePtr > & getThemes()
Definition: pptimport.hxx:71
virtual GraphicHelper * implCreateGraphicHelper() const override
Derived classes may create a specialized graphic helper, e.g.
Definition: pptimport.cxx:274
SlidePersistPtr mpActualSlidePersist
Definition: pptimport.hxx:93
unsigned char sal_Bool
void setActualSlidePersist(SlidePersistPtr pActualSlidePersist)
Definition: pptimport.hxx:70
std::vector< SlidePersistPtr > & getNotesPages()
Definition: pptimport.hxx:74
const SlidePersistPtr & getActualSlidePersist() const
Definition: pptimport.hxx:69
exports com.sun.star. beans
virtual oox::drawingml::table::TableStyleListPtr getTableStyles() override
Has to be implemented by each filter to return the table style list.
Definition: pptimport.cxx:228
XmlFilterBase(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual ::oox::vml::Drawing * getVmlDrawing() override
Has to be implemented by each filter to return the collection of VML shapes.
Definition: pptimport.cxx:223
PowerPointImport(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
Definition: pptimport.cxx:61
std::shared_ptr< SlidePersist > SlidePersistPtr
std::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv
Definition: pptimport.hxx:100
std::vector< SlidePersistPtr > maNotesPages
Definition: pptimport.hxx:98
virtual bool exportDocument() noexcept override
Derived classes implement export of the entire document.
Definition: pptimport.cxx:135
::Color getSchemeColor(sal_Int32 nToken) const
Definition: pptimport.cxx:140
std::vector< SlidePersistPtr > maMasterPages
Definition: pptimport.hxx:97