Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / xmloff / XMLComplexColorHandler.hxx
blob8d40c8459f30743e733643e7bffd65e74100e4f9
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 <xmloff/dllapi.h>
13 #include <docmodel/uno/UnoComplexColor.hxx>
15 using namespace ::xmloff::token;
16 using namespace css;
18 class XMLOFF_DLLPUBLIC XMLComplexColorHandler : public XMLPropertyHandler
20 public:
21 bool importXML(const OUString& /*rStrImpValue*/, css::uno::Any& /*rValue*/,
22 const SvXMLUnitConverter&) const override
24 return false;
27 bool exportXML(OUString& /*rStrExpValue*/, const css::uno::Any& /*rValue*/,
28 const SvXMLUnitConverter&) const override
30 return false;
33 bool equals(const css::uno::Any& rAny1, const css::uno::Any& rAny2) const override
35 uno::Reference<util::XComplexColor> xComplexColor1;
36 uno::Reference<util::XComplexColor> xComplexColor2;
37 rAny1 >>= xComplexColor1;
38 rAny2 >>= xComplexColor2;
39 model::ComplexColor aComplexColor1 = model::color::getFromXComplexColor(xComplexColor1);
40 model::ComplexColor aComplexColor2 = model::color::getFromXComplexColor(xComplexColor2);
41 return aComplexColor1 == aComplexColor2;
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */