summaryrefslogtreecommitdiff
path: root/include/oox/helper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-02 11:43:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-05 07:35:01 +0100
commit61d79dd740958186c4a4344e18eaeb5b2c139c91 (patch)
treeabea71a038352572871ea1fb2a9c40d2f196ddd6 /include/oox/helper
parent04c9cb68dffa2af15661cc35bc61032b036ed2cd (diff)
use more Color in oox
Change-Id: I8fdc6742de5af9101e246411e7208650bae2c4c7 Reviewed-on: https://gerrit.libreoffice.org/50617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/oox/helper')
-rw-r--r--include/oox/helper/graphichelper.hxx8
-rw-r--r--include/oox/helper/helper.hxx11
-rw-r--r--include/oox/helper/propertyset.hxx3
3 files changed, 13 insertions, 9 deletions
diff --git a/include/oox/helper/graphichelper.hxx b/include/oox/helper/graphichelper.hxx
index 9eb77ee60318..2127d3ec57f4 100644
--- a/include/oox/helper/graphichelper.hxx
+++ b/include/oox/helper/graphichelper.hxx
@@ -73,11 +73,11 @@ public:
// System colors and predefined colors ------------------------------------
/** Returns a system color specified by the passed XML token identifier. */
- sal_Int32 getSystemColor( sal_Int32 nToken, sal_Int32 nDefaultRgb = API_RGB_TRANSPARENT ) const;
+ ::Color getSystemColor( sal_Int32 nToken, ::Color nDefaultRgb = API_RGB_TRANSPARENT ) const;
/** Derived classes may implement to resolve a scheme color from the passed XML token identifier. */
- virtual sal_Int32 getSchemeColor( sal_Int32 nToken ) const;
+ virtual ::Color getSchemeColor( sal_Int32 nToken ) const;
/** Derived classes may implement to resolve a palette index to an RGB color. */
- virtual sal_Int32 getPaletteColor( sal_Int32 nPaletteIdx ) const;
+ virtual ::Color getPaletteColor( sal_Int32 nPaletteIdx ) const;
virtual sal_Int32 getDefaultChartAreaFillStyle() const;
@@ -164,7 +164,7 @@ private:
css::uno::Reference< css::graphic::XGraphicProvider2 > mxGraphicProvider;
css::uno::Reference< css::awt::XUnitConversion > mxUnitConversion;
css::awt::DeviceInfo maDeviceInfo; ///< Current output device info.
- ::std::map< sal_Int32, sal_Int32 > maSystemPalette; ///< Maps system colors (XML tokens) to RGB color values.
+ ::std::map< sal_Int32, ::Color > maSystemPalette; ///< Maps system colors (XML tokens) to RGB color values.
StorageRef mxStorage; ///< Storage containing embedded graphics.
mutable GraphicObjectDeque maGraphicObjects; ///< Caches all created graphic objects to keep them alive.
mutable EmbeddedGraphicMap maEmbeddedGraphics; ///< Maps all embedded graphics by their storage path.
diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index 0729a27aaf64..a0c79e0bc6f7 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -32,6 +32,7 @@
#include <rtl/textenc.h>
#include <sal/macros.h>
#include <sal/types.h>
+#include <tools/color.hxx>
namespace oox {
@@ -69,11 +70,11 @@ const sal_uInt8 WINDOWS_CHARSET_EASTERN = 238;
const sal_uInt8 WINDOWS_CHARSET_OEM = 255;
-const sal_Int32 API_RGB_TRANSPARENT = -1; ///< Transparent color for API calls.
-const sal_uInt32 UNSIGNED_RGB_TRANSPARENT = static_cast<sal_uInt32>(-1); ///< Transparent color for unsigned int32 places.
-const sal_Int32 API_RGB_BLACK = 0x000000; ///< Black color for API calls.
-const sal_Int32 API_RGB_GRAY = 0x808080; ///< Gray color for API calls.
-const sal_Int32 API_RGB_WHITE = 0xFFFFFF; ///< White color for API calls.
+const ::Color API_RGB_TRANSPARENT (0xffffffff); ///< Transparent color for API calls.
+const sal_uInt32 UNSIGNED_RGB_TRANSPARENT = static_cast<sal_uInt32>(-1); ///< Transparent color for unsigned int32 places.
+const ::Color API_RGB_BLACK (0x000000); ///< Black color for API calls.
+const ::Color API_RGB_GRAY (0x808080); ///< Gray color for API calls.
+const ::Color API_RGB_WHITE (0xFFFFFF); ///< White color for API calls.
const sal_Int16 API_LINE_SOLID = 0;
const sal_Int16 API_LINE_DOTTED = 1;
diff --git a/include/oox/helper/propertyset.hxx b/include/oox/helper/propertyset.hxx
index 39dbf8583e6a..11d044e5ff3a 100644
--- a/include/oox/helper/propertyset.hxx
+++ b/include/oox/helper/propertyset.hxx
@@ -26,6 +26,7 @@
#include <oox/dllapi.h>
#include <rtl/ustring.hxx>
#include <sal/types.h>
+#include <tools/color.hxx>
namespace com { namespace sun { namespace star {
namespace beans { class XMultiPropertySet; }
@@ -106,6 +107,8 @@ public:
template< typename Type >
bool setProperty( sal_Int32 nPropId, const Type& rValue )
{ return setAnyProperty( nPropId, css::uno::Any( rValue ) ); }
+ bool setProperty( sal_Int32 nPropId, ::Color rValue )
+ { return setAnyProperty( nPropId, css::uno::makeAny( rValue ) ); }
/** Puts the passed properties into the property set. Tries to use the XMultiPropertySet interface.
@param rPropNames The property names. MUST be ordered alphabetically.