diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-01-21 17:18:37 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-01-21 17:18:37 +0100 |
commit | 6e9afe9627d0aa7156c8f01f69180b8ae3dccbda (patch) | |
tree | ecdf355d5a9c2e2868a77ed5f6d632374effcb63 /sd/source/ui/app | |
parent | 23951d3a0d99d72547df9850b31aaa0087aca0fe (diff) | |
parent | fa27b2da2f8e7bd9bafb4a057318ac22577727dd (diff) |
removetooltypes01: Rebase to DEV300m98
Diffstat (limited to 'sd/source/ui/app')
-rw-r--r-- | sd/source/ui/app/optsitem.cxx | 39 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/app/strings.src | 2 |
2 files changed, 37 insertions, 4 deletions
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 28b392ed7073..1b68e3ee0031 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -46,6 +46,16 @@ using namespace ::com::sun::star::uno; #define B2U(_def_aStr) (OUString::createFromAscii(_def_aStr)) +template< class T > T getSafeValue( const Any& rAny ) +{ + T value = T(); + bool bOk = (rAny >>= value); + + DBG_ASSERT( bOk, "SdOptionsItem, wrong type from configuration!" ); + (void)bOk; + + return value; +} // ----------------- // - SdOptionsItem - @@ -503,6 +513,9 @@ SdOptionsMisc::SdOptionsMisc( sal_uInt16 nConfigId, sal_Bool bUseConfig ) : bPreviewChangedEffects( sal_False ), bPreviewTransitions( sal_True ), mnDisplay( 0 ), + mnPenColor( 0xff0000 ), + mnPenWidth( 150.0 ), + // The default for 6.1-and-above documents is to use printer-independent // formatting. mnPrinterIndependentLayout (1) @@ -541,7 +554,9 @@ sal_Bool SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const IsPreviewChangedEffects() == rOpt.IsPreviewChangedEffects() && IsPreviewTransitions() == rOpt.IsPreviewTransitions() && GetDisplay() == rOpt.GetDisplay() && - IsShowComments() == rOpt.IsShowComments() + IsShowComments() == rOpt.IsShowComments() && + GetPresentationPenColor() == rOpt.GetPresentationPenColor() && + GetPresentationPenWidth() == rOpt.GetPresentationPenWidth() ); } @@ -583,10 +598,13 @@ void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) "PreviewChangedEffects", "PreviewTransitions", - "Display" + "Display", + + "PenColor", + "PenWidth" }; - rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 25 : 16 ); + rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 27 : 16 ); ppNames = aPropNames; } @@ -641,6 +659,12 @@ sal_Bool SdOptionsMisc::ReadData( const Any* pValues ) if( pValues[24].hasValue() ) SetDisplay(*(sal_Int32*) pValues[ 24 ].getValue()); + + if( pValues[25].hasValue() ) + SetPresentationPenColor( getSafeValue< sal_Int32 >( pValues[ 25 ] ) ); + + if( pValues[26].hasValue() ) + SetPresentationPenWidth( getSafeValue< double >( pValues[ 26 ] ) ); } return sal_True; @@ -684,6 +708,9 @@ sal_Bool SdOptionsMisc::WriteData( Any* pValues ) const pValues[ 23 ] <<= IsPreviewTransitions(); pValues[ 24 ] <<= GetDisplay(); + + pValues[ 25 ] <<= GetPresentationPenColor(); + pValues[ 26 ] <<= GetPresentationPenWidth(); } return sal_True; @@ -725,6 +752,9 @@ SdOptionsMiscItem::SdOptionsMiscItem( sal_uInt16 _nWhich, SdOptions* pOpts, ::sd maOptionsMisc.SetDisplay(pOpts->GetDisplay()); maOptionsMisc.SetShowComments( pOpts->IsShowComments() ); + + maOptionsMisc.SetPresentationPenColor(pOpts->GetPresentationPenColor() ); + maOptionsMisc.SetPresentationPenWidth(pOpts->GetPresentationPenWidth() ); } if( pView ) @@ -813,6 +843,9 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const pOpts->SetPreviewTransitions( maOptionsMisc.IsPreviewTransitions() ); pOpts->SetDisplay( maOptionsMisc.GetDisplay() ); + + pOpts->SetPresentationPenColor( maOptionsMisc.GetPresentationPenColor() ); + pOpts->SetPresentationPenWidth( maOptionsMisc.GetPresentationPenWidth() ); } } diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src index 7e87b246d371..4fc88c3a6049 100644..100755 --- a/sd/source/ui/app/strings.src +++ b/sd/source/ui/app/strings.src @@ -784,7 +784,7 @@ String STR_PUBLISH_OUTLINE }; String STR_EYEDROPPER { - Text [ en-US ] = "Eyedropper" ; + Text [ en-US ] = "Color Replacer" ; }; String STR_UNDO_MORPHING { |