tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / docmodel / source / uno / UnoComplexColor.cxx
blobf419543ca0a99c034e0d3fd6a0431ac6fecde585
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::getThemeColorType() { return sal_Int32(maColor.getThemeColorType()); }
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: */