diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-04-18 13:44:53 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-04-18 13:44:53 +0000 |
commit | b7403910ad90d52881293d5e8ccb44784cbb9544 (patch) | |
tree | d99b04e00413945758194979c067c9673e6c103a /oox/source | |
parent | d666f18f7853788c5ceb3a3d31185497b96c0952 (diff) |
INTEGRATION: CWS xmlfilter04 (1.2.12); FILE MERGED
2008/02/27 13:16:25 dr 1.2.12.3: improved XLS color handling
2008/02/27 11:47:36 dr 1.2.12.2: added static Color::getPresetColor() and Color::getSystemColor()
2008/02/21 12:42:08 hbrinkm 1.2.12.1: joined changes from xmlfilter03
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/xls/themebuffer.cxx | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/oox/source/xls/themebuffer.cxx b/oox/source/xls/themebuffer.cxx index 6751094f4e88..86ef5b0a03de 100644 --- a/oox/source/xls/themebuffer.cxx +++ b/oox/source/xls/themebuffer.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: themebuffer.cxx,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -33,6 +33,7 @@ #include "oox/xls/stylespropertyhelper.hxx" using ::oox::drawingml::ClrScheme; +using ::oox::drawingml::Color; using ::oox::drawingml::Theme; using ::oox::drawingml::ThemePtr; @@ -136,29 +137,7 @@ sal_Int32 ThemeBuffer::getColorByIndex( sal_Int32 nIndex ) const static const sal_Int32 spnColorTokens[] = { XML_lt1, XML_dk1, XML_lt2, XML_dk2, XML_accent1, XML_accent2, XML_accent3, XML_accent4, XML_accent5, XML_accent6, XML_hlink, XML_folHlink }; - - sal_Int32 nColor = 0; - if( mxTheme.get() ) - if( const ClrScheme* pClrScheme = mxTheme->getClrScheme().get() ) - if( pClrScheme->getColor( STATIC_ARRAY_SELECT( spnColorTokens, nIndex, XML_TOKEN_INVALID ), nColor ) ) - return nColor; - return API_RGB_TRANSPARENT; -} - -sal_Int32 ThemeBuffer::getSystemColor( sal_Int32 nElement, sal_Int32 nDefaultColor ) -{ - sal_Int32 nColor = 0; - return ClrScheme::getSystemColor( nColor, nElement ) ? nColor : nDefaultColor; -} - -sal_Int32 ThemeBuffer::getSystemWindowColor() -{ - return getSystemColor( XML_window, 0xFFFFFF ); -} - -sal_Int32 ThemeBuffer::getSystemWindowTextColor() -{ - return getSystemColor( XML_windowText, 0x000000 ); + return getColorByToken( STATIC_ARRAY_SELECT( spnColorTokens, nIndex, XML_TOKEN_INVALID ) ); } // ============================================================================ |