1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
11 #include <xmloff/xmlprcon.hxx>
13 #include <com/sun/star/drawing/XDrawPage.hpp>
14 #include <com/sun/star/util/Color.hpp>
15 #include <com/sun/star/container/XNameContainer.hpp>
17 #include <docmodel/theme/ColorSet.hxx>
25 class XMLThemeContext
: public SvXMLImportContext
27 css::uno::Reference
<css::drawing::XDrawPage
> m_xPage
;
28 std::shared_ptr
<model::Theme
> mpTheme
;
31 XMLThemeContext(SvXMLImport
& rImport
,
32 css::uno::Reference
<css::xml::sax::XFastAttributeList
> const& xAttrList
,
33 css::uno::Reference
<css::drawing::XDrawPage
> const& xPage
);
36 css::uno::Reference
<css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
38 const css::uno::Reference
<css::xml::sax::XFastAttributeList
>& xAttribs
) override
;
41 /// Imports the theme colors of a theme
42 class XMLThemeColorsContext
: public SvXMLImportContext
44 model::Theme
& mrTheme
;
45 std::shared_ptr
<model::ColorSet
> m_pColorSet
;
46 std::vector
<css::util::Color
> m_aColorScheme
;
49 XMLThemeColorsContext(SvXMLImport
& rImport
,
50 css::uno::Reference
<css::xml::sax::XFastAttributeList
> const& xAttrList
,
51 model::Theme
& mrTheme
);
52 ~XMLThemeColorsContext();
54 css::uno::Reference
<css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
56 css::uno::Reference
<css::xml::sax::XFastAttributeList
> const& xAttribs
) override
;
59 /// Imports a color for a color table
60 class XMLColorContext
: public SvXMLImportContext
63 XMLColorContext(SvXMLImport
& rImport
,
64 css::uno::Reference
<css::xml::sax::XFastAttributeList
> const& xAttrList
,
65 std::shared_ptr
<model::ColorSet
>& rpColorSet
);
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */