Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / docmodel / source / uno / UnoComplexColor.cxx
blob673627bc98a4717fae9dc3e23f8e734c45a7747e
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 */
11 #include <docmodel/uno/UnoComplexColor.hxx>
12 #include <cppuhelper/queryinterface.hxx>
14 using namespace css;
16 sal_Int32 UnoComplexColor::getType() { return sal_Int32(maColor.getType()); }
18 sal_Int32 UnoComplexColor::getSchemeColorType() { return sal_Int32(maColor.getSchemeType()); }
20 util::Color UnoComplexColor::resolveColor(uno::Reference<util::XTheme> const& /*xTheme*/)
22 return util::Color(maColor.getRGBColor());
25 namespace model::color
27 uno::Reference<util::XComplexColor> createXComplexColor(model::ComplexColor const& rColor)
29 return new UnoComplexColor(rColor);
32 model::ComplexColor getFromXComplexColor(uno::Reference<util::XComplexColor> const& rxColor)
34 model::ComplexColor aComplexColor;
35 UnoComplexColor const* pUnoComplexColor = static_cast<UnoComplexColor const*>(rxColor.get());
36 if (pUnoComplexColor)
37 aComplexColor = pUnoComplexColor->getComplexColor();
38 return aComplexColor;
41 } // end model::color
43 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */