LibreOffice Module xmloff (master) 1
XMLComplexColorHandler.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 */
9
10#pragma once
11
12#include <xmloff/dllapi.h>
14
15using namespace ::xmloff::token;
16using namespace css;
17
19{
20public:
21 bool importXML(const OUString& /*rStrImpValue*/, css::uno::Any& /*rValue*/,
22 const SvXMLUnitConverter&) const override
23 {
24 return false;
25 }
26
27 bool exportXML(OUString& /*rStrExpValue*/, const css::uno::Any& /*rValue*/,
28 const SvXMLUnitConverter&) const override
29 {
30 return false;
31 }
32
33 bool equals(const css::uno::Any& rAny1, const css::uno::Any& rAny2) const override
34 {
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;
42 }
43};
44
45/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:83
bool exportXML(OUString &, const css::uno::Any &, const SvXMLUnitConverter &) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
bool importXML(const OUString &, css::uno::Any &, const SvXMLUnitConverter &) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
bool equals(const css::uno::Any &rAny1, const css::uno::Any &rAny2) const override
Compares two Any's in case of the given XML-data-type.
Abstract base-class for different XML-types.
Definition: xmlprhdl.hxx:36
#define XMLOFF_DLLPUBLIC
Definition: dllapi.h:29
model::ComplexColor getFromXComplexColor(uno::Reference< util::XComplexColor > const &rxColor)
Handling of tokens in XML: