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/.
12 #include <xmloff/dllapi.h>
13 #include <docmodel/uno/UnoComplexColor.hxx>
15 using namespace ::xmloff::token
;
18 class XMLOFF_DLLPUBLIC XMLComplexColorHandler
: public XMLPropertyHandler
21 bool importXML(const OUString
& /*rStrImpValue*/, css::uno::Any
& /*rValue*/,
22 const SvXMLUnitConverter
&) const override
27 bool exportXML(OUString
& /*rStrExpValue*/, const css::uno::Any
& /*rValue*/,
28 const SvXMLUnitConverter
&) const override
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: */