diff options
Diffstat (limited to 'include/sax/tools')
-rw-r--r-- | include/sax/tools/converter.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sax/tools/converter.hxx b/include/sax/tools/converter.hxx index 2dfc33461919..c7fe12f4c100 100644 --- a/include/sax/tools/converter.hxx +++ b/include/sax/tools/converter.hxx @@ -29,6 +29,7 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/util/MeasureUnit.hpp> +#include <tools/color.hxx> namespace com { namespace sun { namespace star { @@ -97,10 +98,21 @@ public: /** convert string to rgb color */ static bool convertColor( sal_Int32& rColor, const OUString&rValue ); + static bool convertColor( ::Color& rColor, + const OUString&rValue ) + { + sal_Int32 n(rColor); + bool b = convertColor( n, rValue ); + if (b) rColor = n; + return b; + } /** convert color to string */ static void convertColor( OUStringBuffer &rBuffer, sal_Int32 nColor ); + static void convertColor( OUStringBuffer &rBuffer, + ::Color nColor ) + { convertColor( rBuffer, sal_Int32(nColor) ); } /** convert string to number with optional min and max values */ static bool convertNumber( sal_Int32& rValue, |