summaryrefslogtreecommitdiff
path: root/sd/source/ui/app
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-01-28 11:44:02 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-01-28 11:44:02 +0100
commitb0879ce503220f8c67f5452d413574b18ad66776 (patch)
treed38af920368a2693af9de274ab0368634a44a61f /sd/source/ui/app
parent6a2b7e2232d12df4a2b4d820929085edc22c1f42 (diff)
parentfa27b2da2f8e7bd9bafb4a057318ac22577727dd (diff)
undoapi: pulled and merged DEV300.m98
Diffstat (limited to 'sd/source/ui/app')
-rw-r--r--[-rwxr-xr-x]sd/source/ui/app/optsitem.cxx39
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/strings.src2
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
{