Coverage Report

Created: 2025-07-07 10:01

/src/libreoffice/include/oox/ppt/pptimport.hxx
Line
Count
Source (jump to first uncovered line)
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>
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>
36
37
namespace com::sun::star {
38
    namespace uno { class XComponentContext; }
39
}
40
41
namespace oox {
42
    namespace drawingml::chart { class ChartConverter; }
43
}
44
45
namespace oox::ppt {
46
47
48
class PowerPointImport final : public oox::core::XmlFilterBase
49
{
50
public:
51
    /// @throws css::uno::RuntimeException
52
    PowerPointImport( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
53
    virtual ~PowerPointImport() override;
54
55
    // from FilterBase
56
    virtual bool importDocument() override;
57
    virtual bool exportDocument() noexcept override;
58
59
    virtual const ::oox::drawingml::Theme* getCurrentTheme() const override;
60
    virtual ::oox::vml::Drawing* getVmlDrawing() override;
61
    virtual oox::drawingml::table::TableStyleListPtr getTableStyles() override;
62
    virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override;
63
64
0
    const SlidePersistPtr&                                  getActualSlidePersist() const { return mpActualSlidePersist; };
65
27.1k
    void                                                    setActualSlidePersist(const SlidePersistPtr& pActualSlidePersist) { mpActualSlidePersist = pActualSlidePersist; };
66
21.0k
    std::map< OUString, oox::drawingml::ThemePtr >&         getThemes(){ return maThemes; };
67
8.92k
    std::vector< SlidePersistPtr >&                         getDrawPages(){ return maDrawPages; };
68
46.2k
    std::vector< SlidePersistPtr >&                         getMasterPages(){ return maMasterPages; };
69
105
    std::vector< SlidePersistPtr >&                         getNotesPages(){ return maNotesPages; };
70
71
    virtual sal_Bool SAL_CALL filter( const css::uno::Sequence<   css::beans::PropertyValue >& rDescriptor ) override;
72
73
    void getSchemeColorToken(sal_Int32& nToken) const;
74
    ::Color getSchemeColor( sal_Int32 nToken ) const;
75
    virtual std::shared_ptr<::oox::drawingml::Theme> getCurrentThemePtr() const override;
76
77
#if OSL_DEBUG_LEVEL > 0
78
    static XmlFilterBase* mpDebugFilterBase;
79
#endif
80
81
private:
82
    virtual GraphicHelper* implCreateGraphicHelper() const override;
83
    virtual ::oox::ole::VbaProject* implCreateVbaProject() const override;
84
    virtual OUString SAL_CALL getImplementationName() override;
85
86
private:
87
    OUString                                       maTableStyleListPath;
88
    oox::drawingml::table::TableStyleListPtr            mpTableStyleList;
89
90
    SlidePersistPtr                                     mpActualSlidePersist;
91
    std::map< OUString, oox::drawingml::ThemePtr > maThemes;
92
93
    std::vector< SlidePersistPtr > maDrawPages;
94
    std::vector< SlidePersistPtr > maMasterPages;
95
    std::vector< SlidePersistPtr > maNotesPages;
96
97
    std::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
98
};
99
100
}
101
102
#endif // INCLUDED_OOX_PPT_PPTIMPORT_HXX
103
104
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */