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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SVX_SOURCE_ACCESSIBILITY_LOOKUPCOLORNAME_HXX
21 #define INCLUDED_SVX_SOURCE_ACCESSIBILITY_LOOKUPCOLORNAME_HXX
23 #include "sal/config.h"
26 namespace accessibility
{
28 /** This is a color name lookup targeted to be used by the accessibility
29 <type>DescriptionGenerator</type> class. It encapsulates a
30 <type>com.sun.star.drawing.ColorTable</type> and provides an inverse look
31 up of color names for given numerical color descriptions (the RGB values
32 encoded as an integer).
34 <p>The implementation uses as singleton so that the
35 <type>com.sun.star.drawing.ColorTable</type> object needs to be created
36 only once. That singleton instance for now lives until the application
37 terminates. However, the color table from which it takes its values may
38 change during this time. Reacting to these changes remains a task for the
42 This integer is the sum of the 8 Bit red value shifted left 16 Bits, the
43 green value shifted left 8 Bits, and the unshifted blue value.
46 The returned string is either the color name of the specified color or,
47 when no name exists, a string of the form "#RRGGBB" with two hexadecimal
48 digits for each color component.
50 OUString
lookUpColorName(long color
);
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */