diff options
author | Bjoern Michaelsen <b_michaelsen@openoffice.org> | 2011-01-19 16:36:58 +0100 |
---|---|---|
committer | Bjoern Michaelsen <b_michaelsen@openoffice.org> | 2011-01-19 16:36:58 +0100 |
commit | 40738f11f412b62b52277ffbcf6166bf7421460c (patch) | |
tree | e8ee335e66944e3e97382a866fb559ad0a80398f /sd/source/ui/app | |
parent | 0bafb5a5e88a430440cb7a3ea42d787c6d1dcd79 (diff) | |
parent | b81ed13b5a1398c0fb19e95d176ea2e159a548ce (diff) |
gnumake3: mergeing changes from DEV300_m97, fixing jars for svl complex test, deliver globlmn.hrc for now, adding component registration for svx libraries, still misses gengal and friends when packing
Diffstat (limited to 'sd/source/ui/app')
-rw-r--r--[-rwxr-xr-x] | 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 4355da3011c9..3366a0ea98db 100755..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( USHORT nConfigId, BOOL bUseConfig ) : bPreviewChangedEffects( FALSE ), bPreviewTransitions( 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 @@ 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, ULONG& rCount ) con "PreviewChangedEffects", "PreviewTransitions", - "Display" + "Display", + + "PenColor", + "PenWidth" }; - rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 25 : 16 ); + rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 27 : 16 ); ppNames = aPropNames; } @@ -641,6 +659,12 @@ 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 TRUE; @@ -684,6 +708,9 @@ BOOL SdOptionsMisc::WriteData( Any* pValues ) const pValues[ 23 ] <<= IsPreviewTransitions(); pValues[ 24 ] <<= GetDisplay(); + + pValues[ 25 ] <<= GetPresentationPenColor(); + pValues[ 26 ] <<= GetPresentationPenWidth(); } return TRUE; @@ -725,6 +752,9 @@ SdOptionsMiscItem::SdOptionsMiscItem( USHORT _nWhich, SdOptions* pOpts, ::sd::Fr 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 { |