diff options
author | Sascha Ballach <sab@openoffice.org> | 2001-03-29 09:53:56 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2001-03-29 09:53:56 +0000 |
commit | 78b2235beff5a86d0c31aac6dcacd72b0a2f81f4 (patch) | |
tree | 0d189a03bc9ca595248e282732a6016f696ab25b /sc/source/ui/unoobj/confuno.cxx | |
parent | 62001b529de9f17fc0b3d8cdaada3cebd8a6d3c1 (diff) |
add GirdColor to the PropertySet
Diffstat (limited to 'sc/source/ui/unoobj/confuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/confuno.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 9c858f132712..b4eac5a53047 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: confuno.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: sab $ $Date: 2001-03-29 08:35:31 $ + * last change: $Author: sab $ $Date: 2001-03-29 10:53:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,6 +84,7 @@ const SfxItemPropertyMap* lcl_GetConfigPropertyMap() {MAP_CHAR_LEN(SC_UNO_SHOWZERO), 0, &getBooleanCppuType(), 0}, {MAP_CHAR_LEN(SC_UNO_SHOWNOTES), 0, &getBooleanCppuType(), 0}, {MAP_CHAR_LEN(SC_UNO_SHOWGRID), 0, &getBooleanCppuType(), 0}, + {MAP_CHAR_LEN(SC_UNO_GRIDCOLOR), 0, &getCppuType((sal_Int32*)0), 0}, {MAP_CHAR_LEN(SC_UNO_SHOWPAGEBR), 0, &getBooleanCppuType(), 0}, {MAP_CHAR_LEN(SC_UNONAME_LINKUPD), 0, &getCppuType((sal_Int16*)0), 0}, {MAP_CHAR_LEN(SC_UNO_COLROWHDR), 0, &getBooleanCppuType(), 0}, @@ -185,6 +186,16 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( aViewOpt.SetOption(VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aPropertyName.compareToAscii( SC_UNO_SHOWGRID ) == 0 ) aViewOpt.SetOption(VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); + else if ( aPropertyName.compareToAscii( SC_UNO_GRIDCOLOR ) == 0 ) + { + sal_Int64 nColor; + if (aValue >>= nColor) + { + String aColorName; + Color aColor(static_cast<sal_uInt32>(nColor)); + aViewOpt.SetGridColor(aColor, aColorName); + } + } else if ( aPropertyName.compareToAscii( SC_UNO_SHOWPAGEBR ) == 0 ) aViewOpt.SetOption(VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aPropertyName.compareToAscii( SC_UNONAME_LINKUPD ) == 0 ) @@ -239,6 +250,12 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_NOTES ) ); else if ( aPropertyName.compareToAscii( SC_UNO_SHOWGRID ) == 0 ) ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_GRID ) ); + else if ( aPropertyName.compareToAscii( SC_UNO_GRIDCOLOR ) == 0 ) + { + String aColorName; + Color aColor = aViewOpt.GetGridColor(&aColorName); + aRet <<= static_cast<sal_Int64>(aColor.GetColor()); + } else if ( aPropertyName.compareToAscii( SC_UNO_SHOWPAGEBR ) == 0 ) ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_PAGEBREAKS ) ); else if ( aPropertyName.compareToAscii( SC_UNONAME_LINKUPD ) == 0 ) |