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>
34#include <rtl/ustring.hxx>
35#include <sal/types.h>
36
37namespace com::sun::star {
38 namespace beans { struct PropertyValue; }
39 namespace uno { class XComponentContext; }
40}
41
42namespace oox {
43 class GraphicHelper;
44 namespace drawingml::chart { class ChartConverter; }
45 namespace ole { class VbaProject; }
46 namespace vml { class Drawing; }
47}
48
49namespace oox::ppt {
50
51
53{
54public:
56 PowerPointImport( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
57 virtual ~PowerPointImport() override;
58
59 // from FilterBase
60 virtual bool importDocument() override;
61 virtual bool exportDocument() noexcept override;
62
63 virtual const ::oox::drawingml::Theme* getCurrentTheme() const override;
64 virtual ::oox::vml::Drawing* getVmlDrawing() override;
66 virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override;
67
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; };
74
75 virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue >& rDescriptor ) override;
76
77 ::Color getSchemeColor( sal_Int32 nToken ) const;
78 virtual std::shared_ptr<::oox::drawingml::Theme> getCurrentThemePtr() const override;
79
80#if OSL_DEBUG_LEVEL > 0
82#endif
83
84private:
85 virtual GraphicHelper* implCreateGraphicHelper() const override;
86 virtual ::oox::ole::VbaProject* implCreateVbaProject() const override;
87 virtual OUString SAL_CALL getImplementationName() override;
88
89private:
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...
XmlFilterBase(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
std::vector< SlidePersistPtr > & getNotesPages()
Definition: pptimport.hxx:73
std::vector< SlidePersistPtr > maMasterPages
Definition: pptimport.hxx:97
std::vector< SlidePersistPtr > maNotesPages
Definition: pptimport.hxx:98
std::vector< SlidePersistPtr > & getMasterPages()
Definition: pptimport.hxx:72
::Color getSchemeColor(sal_Int32 nToken) const
Definition: pptimport.cxx:146
virtual GraphicHelper * implCreateGraphicHelper() const override
Derived classes may create a specialized graphic helper, e.g.
Definition: pptimport.cxx:285
std::vector< SlidePersistPtr > & getDrawPages()
Definition: pptimport.hxx:71
std::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv
Definition: pptimport.hxx:100
const SlidePersistPtr & getActualSlidePersist() const
Definition: pptimport.hxx:68
void setActualSlidePersist(SlidePersistPtr pActualSlidePersist)
Definition: pptimport.hxx:69
virtual ::oox::vml::Drawing * getVmlDrawing() override
Has to be implemented by each filter to return the collection of VML shapes.
Definition: pptimport.cxx:234
virtual oox::drawingml::table::TableStyleListPtr getTableStyles() override
Has to be implemented by each filter to return the table style list.
Definition: pptimport.cxx:239
oox::drawingml::table::TableStyleListPtr mpTableStyleList
Definition: pptimport.hxx:91
static XmlFilterBase * mpDebugFilterBase
Definition: pptimport.hxx:81
virtual sal_Bool SAL_CALL filter(const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor) override
Definition: pptimport.cxx:190
virtual bool importDocument() override
Derived classes implement import of the entire document.
Definition: pptimport.cxx:81
std::vector< SlidePersistPtr > maDrawPages
Definition: pptimport.hxx:96
virtual std::shared_ptr<::oox::drawingml::Theme > getCurrentThemePtr() const override
May be implemented by filters which handle Diagrams, default returns empty ptr.
Definition: pptimport.cxx:185
std::map< OUString, oox::drawingml::ThemePtr > & getThemes()
Definition: pptimport.hxx:70
virtual ::oox::ole::VbaProject * implCreateVbaProject() const override
Derived classes create a VBA project manager object.
Definition: pptimport.cxx:290
virtual ::oox::drawingml::chart::ChartConverter * getChartConverter() override
Has to be implemented by each filter, returns a filter-specific chart converter object,...
Definition: pptimport.cxx:250
virtual OUString SAL_CALL getImplementationName() override
Definition: pptimport.cxx:295
SlidePersistPtr mpActualSlidePersist
Definition: pptimport.hxx:93
PowerPointImport(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
Definition: pptimport.cxx:63
virtual bool exportDocument() noexcept override
Derived classes implement export of the entire document.
Definition: pptimport.cxx:141
virtual const ::oox::drawingml::Theme * getCurrentTheme() const override
Has to be implemented by each filter, returns the current theme.
Definition: pptimport.cxx:180
virtual ~PowerPointImport() override
Definition: pptimport.cxx:77
std::map< OUString, oox::drawingml::ThemePtr > maThemes
Definition: pptimport.hxx:94
std::shared_ptr< TableStyleList > TableStyleListPtr
std::shared_ptr< SlidePersist > SlidePersistPtr
unsigned char sal_Bool