Bump version to 6.4-15
[LibreOffice.git] / include / oox / shape / ShapeFilterBase.hxx
blob35118a15d35c56fd30738364d5589fd0d60a823e
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_SHAPE_SHAPEFILTERBASE_HXX
21 #define INCLUDED_OOX_SHAPE_SHAPEFILTERBASE_HXX
23 #include <memory>
24 #include <oox/dllapi.h>
25 #include <oox/vml/vmldrawing.hxx>
26 #include <oox/core/xmlfilterbase.hxx>
27 #include <oox/drawingml/drawingmltypes.hxx>
28 #include <com/sun/star/graphic/XGraphicMapper.hpp>
30 namespace oox { namespace drawingml { namespace table {
32 class TableStyleList;
33 typedef std::shared_ptr< TableStyleList > TableStyleListPtr;
35 }}}
37 namespace oox {
38 namespace shape {
40 class OOX_DLLPUBLIC ShapeFilterBase final : public core::XmlFilterBase
42 public:
43 typedef std::shared_ptr<ShapeFilterBase> Pointer_t;
45 /// @throws css::uno::RuntimeException
46 explicit ShapeFilterBase(
47 const css::uno::Reference< css::uno::XComponentContext >& rxContext );
49 virtual ~ShapeFilterBase() override;
51 /** Has to be implemented by each filter, returns the current theme. */
52 virtual const ::oox::drawingml::Theme* getCurrentTheme() const override;
54 void setCurrentTheme(const ::oox::drawingml::ThemePtr& pTheme);
56 /** Has to be implemented by each filter to return the collection of VML shapes. */
57 virtual ::oox::vml::Drawing* getVmlDrawing() override;
59 /** Has to be implemented by each filter to return TableStyles. */
60 virtual ::oox::drawingml::table::TableStyleListPtr getTableStyles() override;
62 virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override;
64 virtual bool importDocument() override { return true; }
65 virtual bool exportDocument() override { return true; }
67 ::Color getSchemeColor( sal_Int32 nToken ) const;
69 void importTheme();
71 void setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rxGraphicMapper)
73 mxGraphicMapper = rxGraphicMapper;
76 private:
77 virtual ::oox::ole::VbaProject* implCreateVbaProject() const override;
78 virtual OUString SAL_CALL getImplementationName() override;
79 virtual GraphicHelper* implCreateGraphicHelper() const override;
81 std::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
82 ::oox::drawingml::ThemePtr mpTheme;
83 css::uno::Reference<css::graphic::XGraphicMapper> mxGraphicMapper;
86 } // namespace shape
87 } // namespace oox
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */