Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / docmodel / uno / UnoComplexColor.hxx
blobc15e53404a3bd2b1bf1efb257ed70d7735acd482
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/.
8 */
10 #pragma once
12 #include <cppuhelper/implbase.hxx>
13 #include <cppuhelper/supportsservice.hxx>
14 #include <comphelper/servicehelper.hxx>
16 #include <com/sun/star/util/Color.hpp>
17 #include <com/sun/star/util/XComplexColor.hpp>
18 #include <com/sun/star/uno/XComponentContext.hpp>
20 #include <utility>
21 #include <docmodel/dllapi.h>
22 #include <docmodel/color/ComplexColor.hxx>
24 class DOCMODEL_DLLPUBLIC UnoComplexColor final
25 : public cppu::WeakImplHelper<css::util::XComplexColor>
27 private:
28 model::ComplexColor maColor;
30 public:
31 UnoComplexColor(model::ComplexColor const& rColor)
32 : maColor(rColor)
36 model::ComplexColor const& getComplexColor() const { return maColor; }
38 // XComplexColor
39 sal_Int32 SAL_CALL getType() override;
40 sal_Int32 SAL_CALL getSchemeColorType() override;
41 css::util::Color SAL_CALL
42 resolveColor(css::uno::Reference<css::util::XTheme> const& xTheme) override;
45 namespace model::color
47 DOCMODEL_DLLPUBLIC css::uno::Reference<css::util::XComplexColor>
48 createXComplexColor(model::ComplexColor const& rColor);
49 DOCMODEL_DLLPUBLIC model::ComplexColor
50 getFromXComplexColor(css::uno::Reference<css::util::XComplexColor> const& rxColor);
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */