summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2011-01-05 13:23:59 +0100
committerVladimir Glazunov <vg@openoffice.org>2011-01-05 13:23:59 +0100
commitfaf2e7ab967a47f55804af62adad5d9a3f77dbcc (patch)
treecbf17dbc153f2cf17409665f2b766ddf8741722a /sd
parenteb483309e8c3792c8a494ed9f1ec4f08a0f9590b (diff)
parent43aa5e0362693dfddbd9e8a44ca028f49428fd96 (diff)
CWS-TOOLING: integrate CWS impressdefaults1
Diffstat (limited to 'sd')
-rwxr-xr-xsd/source/core/drawdoc4.cxx21
-rw-r--r--[-rwxr-xr-x]sd/source/core/glob.src0
-rwxr-xr-xsd/source/core/stlpool.cxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationPane.cxx10
-rw-r--r--[-rwxr-xr-x]sd/source/ui/app/optsitem.cxx39
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/strings.src2
-rwxr-xr-xsd/source/ui/func/fuconstr.cxx92
-rwxr-xr-xsd/source/ui/func/fudraw.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fusel.cxx8
-rwxr-xr-xsd/source/ui/func/futext.cxx11
-rwxr-xr-xsd/source/ui/inc/optsitem.hxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshow.hrc33
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshow.src70
-rwxr-xr-xsd/source/ui/slideshow/slideshowimpl.cxx544
-rwxr-xr-xsd/source/ui/slideshow/slideshowimpl.hxx11
-rwxr-xr-xsd/source/ui/view/drviewse.cxx10
17 files changed, 389 insertions, 515 deletions
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index a58577458a67..c3fb301a0fc3 100755
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -163,7 +163,7 @@ void SdDrawDocument::CreateLayoutTemplates()
String aNullStr;
::basegfx::B2DPolyPolygon aNullPolyPolygon;
- Color aNullCol(RGB_Color(COL_BLACK));
+ Color aNullCol(RGB_Color(COL_DEFAULT_SHAPE_STROKE));
XDash aNullDash;
XGradient aNullGrad(aNullCol,RGB_Color(COL_WHITE));
@@ -173,19 +173,20 @@ void SdDrawDocument::CreateLayoutTemplates()
// Linienattribute (Extended OutputDevice)
rISet.Put(XLineStyleItem(XLINE_SOLID));
- rISet.Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
+ rISet.Put(XLineColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_STROKE)));
rISet.Put(XLineWidthItem(0));
rISet.Put(XLineDashItem(pPool,aNullDash));
rISet.Put(XLineStartItem(pPool,aNullPolyPolygon));
rISet.Put(XLineEndItem(pPool,aNullPolyPolygon));
- rISet.Put(XLineStartWidthItem(300));
- rISet.Put(XLineEndWidthItem(300));
+ rISet.Put(XLineStartWidthItem(200));
+ rISet.Put(XLineEndWidthItem(200));
rISet.Put(XLineStartCenterItem());
rISet.Put(XLineEndCenterItem());
+ rISet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK));
// Fuellattribute (Extended OutputDevice)
rISet.Put(XFillStyleItem(XFILL_SOLID));
- rISet.Put(XFillColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_FILLING))); // "Blue 8"
+ rISet.Put(XFillColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_FILLING)));
rISet.Put(XFillGradientItem(pPool,aNullGrad));
rISet.Put(XFillHatchItem(pPool,aNullHatch));
@@ -198,8 +199,8 @@ void SdDrawDocument::CreateLayoutTemplates()
// Schattenattribute (Drawing Engine)
rISet.Put(SdrShadowItem(FALSE));
rISet.Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
- rISet.Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz
- rISet.Put(SdrShadowYDistItem(300));
+ rISet.Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz
+ rISet.Put(SdrShadowYDistItem(200));
Font aLatinFont, aCJKFont, aCTLFont;
@@ -310,8 +311,8 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(SdrShadowItem(TRUE));
pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
- pISet->Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz
- pISet->Put(SdrShadowYDistItem(300));
+ pISet->Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz
+ pISet->Put(SdrShadowYDistItem(200));
// ---- Objekt ohne Fllung -------------------------------------------
@@ -322,6 +323,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet = &pSheet->GetItemSet();
pISet->Put(XFillStyleItem(XFILL_NONE));
+ pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
// ---- Text ----------------------------------------------------------
@@ -513,6 +515,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet = &pSheet->GetItemSet();
pISet->Put(XFillStyleItem(XFILL_NONE));
+ pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
pISet->Put(SvxFontHeightItem(423, 100, EE_CHAR_FONTHEIGHT )); // 12 pt
diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src
index f1c7058ddf79..f1c7058ddf79 100755..100644
--- a/sd/source/core/glob.src
+++ b/sd/source/core/glob.src
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 205e007d9e97..ef3d5d0ebe25 100755
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -519,10 +519,11 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet();
rBackgroundObjectsSet.Put(SdrShadowItem(FALSE));
rBackgroundObjectsSet.Put(SdrShadowColorItem(String(), Color(COL_GRAY)));
- rBackgroundObjectsSet.Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz
- rBackgroundObjectsSet.Put(SdrShadowYDistItem(300));
+ rBackgroundObjectsSet.Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz
+ rBackgroundObjectsSet.Put(SdrShadowYDistItem(200));
// #i16874# enable kerning by default but only for new documents
rBackgroundObjectsSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rBackgroundObjectsSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK));
}
/**************************************************************************
@@ -1029,12 +1030,8 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , FALSE);
- aNumberFormat.SetLSpace( 0 );
- aNumberFormat.SetAbsLSpace( 0 );
- aNumberFormat.SetFirstLineOffset( 0 );
- aNumRule.SetLevel( 0, aNumberFormat );
- for( USHORT i = 1; i < aNumRule.GetLevelCount(); i++ )
+ for( USHORT i = 0; i < aNumRule.GetLevelCount(); i++ )
{
const short nLSpace = (i + 1) * 600;
aNumberFormat.SetLSpace(nLSpace);
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 8b96e08b4a8c..9cdbc2f0cfba 100644..100755
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1953,6 +1953,16 @@ void CustomAnimationPane::onChange( bool bCreate )
{
CustomAnimationEffectPtr pCreated = mpMainSequence->append( pDescriptor, (*aIter), fDuration );
+ // if only one shape with text and no fill or outline is selected, animate only by first level paragraphs
+ if( bHasText && (aTargets.size() == 1) )
+ {
+ Reference< XShape > xShape( (*aIter), UNO_QUERY );
+ if( xShape.is() && !hasVisibleShape( xShape ) )
+ {
+ mpMainSequence->createTextGroup( pCreated, 1, -1.0, sal_False, sal_False );
+ }
+ }
+
if( bFirst )
bFirst = false;
else
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
{
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index c0d8235e97fb..a1ab9b853ff4 100755
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -312,40 +312,74 @@ void FuConstruct::SetStyleSheet(SfxItemSet& rAttr, SdrObject* pObj)
sal_Bool bUseFillStyle, bUseNoFillStyle;
bUseFillStyle = bUseNoFillStyle = sal_False;
- if (nSlotId == SID_DRAW_RECT || // Rechteck
- nSlotId == SID_DRAW_RECT_ROUND || // Rechteck, rund
- nSlotId == SID_DRAW_SQUARE || // Quadrat
- nSlotId == SID_DRAW_SQUARE_ROUND || // Quadrat, rund
- nSlotId == SID_DRAW_ELLIPSE || // Ellipse
- nSlotId == SID_DRAW_PIE || // Ellipsensegment
- nSlotId == SID_DRAW_ELLIPSECUT || // Ellipsenabschnitt
- nSlotId == SID_DRAW_CIRCLE || // Kreis
- nSlotId == SID_DRAW_CIRCLEPIE || // Kreissegment
- nSlotId == SID_DRAW_CIRCLECUT || // Ellipsenabschnitt
- nSlotId == SID_DRAW_POLYGON || // Polygon
- nSlotId == SID_DRAW_XPOLYGON || // 45ø-Polygon
- nSlotId == SID_DRAW_FREELINE || // Freihandlinie
- nSlotId == SID_DRAW_BEZIER_FILL) // Bezier
+ switch( nSlotId )
+ {
+ case SID_DRAW_RECT:
+ case SID_DRAW_RECT_ROUND:
+ case SID_DRAW_SQUARE:
+ case SID_DRAW_SQUARE_ROUND:
+ case SID_DRAW_ELLIPSE:
+ case SID_DRAW_PIE:
+ case SID_DRAW_ELLIPSECUT:
+ case SID_DRAW_CIRCLE:
+ case SID_DRAW_CIRCLEPIE:
+ case SID_DRAW_CIRCLECUT:
+ case SID_DRAW_POLYGON:
+ case SID_DRAW_XPOLYGON:
+ case SID_DRAW_FREELINE:
+ case SID_DRAW_BEZIER_FILL:
{
bUseFillStyle = sal_True;
+ break;
}
- else if
- (nSlotId == SID_DRAW_RECT_NOFILL || // Rechteck
- nSlotId == SID_DRAW_RECT_ROUND_NOFILL || // Rechteck, rund
- nSlotId == SID_DRAW_SQUARE_NOFILL || // Quadrat
- nSlotId == SID_DRAW_SQUARE_ROUND_NOFILL || // Quadrat, rund
- nSlotId == SID_DRAW_ELLIPSE_NOFILL || // Ellipse
- nSlotId == SID_DRAW_PIE_NOFILL || // Ellipsensegment
- nSlotId == SID_DRAW_ELLIPSECUT_NOFILL || // Ellipsenabschnitt
- nSlotId == SID_DRAW_CIRCLE_NOFILL || // Kreis
- nSlotId == SID_DRAW_CIRCLEPIE_NOFILL || // Kreissegment
- nSlotId == SID_DRAW_CIRCLECUT_NOFILL || // Ellipsenabschnitt
- nSlotId == SID_DRAW_POLYGON_NOFILL || // Polygon
- nSlotId == SID_DRAW_XPOLYGON_NOFILL || // 45ø-Polygon
- nSlotId == SID_DRAW_FREELINE_NOFILL || // Freihandlinie
- nSlotId == SID_DRAW_BEZIER_NOFILL) // Bezier
+ case SID_DRAW_RECT_NOFILL:
+ case SID_DRAW_RECT_ROUND_NOFILL:
+ case SID_DRAW_SQUARE_NOFILL:
+ case SID_DRAW_SQUARE_ROUND_NOFILL:
+ case SID_DRAW_ELLIPSE_NOFILL:
+ case SID_DRAW_PIE_NOFILL:
+ case SID_DRAW_ELLIPSECUT_NOFILL:
+ case SID_DRAW_CIRCLE_NOFILL:
+ case SID_DRAW_CIRCLEPIE_NOFILL:
+ case SID_DRAW_CIRCLECUT_NOFILL:
+ case SID_DRAW_POLYGON_NOFILL:
+ case SID_DRAW_XPOLYGON_NOFILL:
+ case SID_DRAW_FREELINE_NOFILL:
+ case SID_DRAW_LINE:
+ case SID_DRAW_XLINE:
+ case SID_CONNECTOR_ARROW_START:
+ case SID_CONNECTOR_ARROW_END:
+ case SID_CONNECTOR_ARROWS:
+ case SID_CONNECTOR_CIRCLE_START:
+ case SID_CONNECTOR_CIRCLE_END:
+ case SID_CONNECTOR_CIRCLES:
+ case SID_CONNECTOR_LINE:
+ case SID_CONNECTOR_LINE_ARROW_START:
+ case SID_CONNECTOR_LINE_ARROW_END:
+ case SID_CONNECTOR_LINE_ARROWS:
+ case SID_CONNECTOR_LINE_CIRCLE_START:
+ case SID_CONNECTOR_LINE_CIRCLE_END:
+ case SID_CONNECTOR_LINE_CIRCLES:
+ case SID_CONNECTOR_CURVE:
+ case SID_CONNECTOR_CURVE_ARROW_START:
+ case SID_CONNECTOR_CURVE_ARROW_END:
+ case SID_CONNECTOR_CURVE_ARROWS:
+ case SID_CONNECTOR_CURVE_CIRCLE_START:
+ case SID_CONNECTOR_CURVE_CIRCLE_END:
+ case SID_CONNECTOR_CURVE_CIRCLES:
+ case SID_CONNECTOR_LINES:
+ case SID_CONNECTOR_LINES_ARROW_START:
+ case SID_CONNECTOR_LINES_ARROW_END:
+ case SID_CONNECTOR_LINES_ARROWS:
+ case SID_CONNECTOR_LINES_CIRCLE_START:
+ case SID_CONNECTOR_LINES_CIRCLE_END:
+ case SID_CONNECTOR_LINES_CIRCLES:
+ case SID_DRAW_BEZIER_NOFILL:
+ case SID_LINE_ARROW_END:
{
bUseNoFillStyle = sal_True;
+ break;
+ }
}
SetStyleSheet( rAttr, pObj, bUseFillStyle, bUseNoFillStyle );
}
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 5cc3cc49ca88..4d03abd7b8bc 100755
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -163,40 +163,40 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
if (!mpView->IsSnapEnabled())
mpView->SetSnapEnabled(TRUE);
- BOOL bCntrl = rMEvt.IsMod1();
+ BOOL bSnapModPressed = rMEvt.IsMod1();
BOOL bGridSnap = pFrameView->IsGridSnap();
- bGridSnap = (bCntrl != bGridSnap);
+ bGridSnap = (bSnapModPressed != bGridSnap);
if (mpView->IsGridSnap() != bGridSnap)
mpView->SetGridSnap(bGridSnap);
BOOL bBordSnap = pFrameView->IsBordSnap();
- bBordSnap = (bCntrl != bBordSnap);
+ bBordSnap = (bSnapModPressed != bBordSnap);
if (mpView->IsBordSnap() != bBordSnap)
mpView->SetBordSnap(bBordSnap);
BOOL bHlplSnap = pFrameView->IsHlplSnap();
- bHlplSnap = (bCntrl != bHlplSnap);
+ bHlplSnap = (bSnapModPressed != bHlplSnap);
if (mpView->IsHlplSnap() != bHlplSnap)
mpView->SetHlplSnap(bHlplSnap);
BOOL bOFrmSnap = pFrameView->IsOFrmSnap();
- bOFrmSnap = (bCntrl != bOFrmSnap);
+ bOFrmSnap = (bSnapModPressed != bOFrmSnap);
if (mpView->IsOFrmSnap() != bOFrmSnap)
mpView->SetOFrmSnap(bOFrmSnap);
BOOL bOPntSnap = pFrameView->IsOPntSnap();
- bOPntSnap = (bCntrl != bOPntSnap);
+ bOPntSnap = (bSnapModPressed != bOPntSnap);
if (mpView->IsOPntSnap() != bOPntSnap)
mpView->SetOPntSnap(bOPntSnap);
BOOL bOConSnap = pFrameView->IsOConSnap();
- bOConSnap = (bCntrl != bOConSnap);
+ bOConSnap = (bSnapModPressed != bOConSnap);
if (mpView->IsOConSnap() != bOConSnap)
mpView->SetOConSnap(bOConSnap);
@@ -229,7 +229,7 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
if ( bHelpLine
&& !mpView->IsCreateObj()
- && ((mpView->GetEditMode() == SDREDITMODE_EDIT && !bHitHdl) || (rMEvt.IsShift() && bCntrl)) )
+ && ((mpView->GetEditMode() == SDREDITMODE_EDIT && !bHitHdl) || (rMEvt.IsShift() && bSnapModPressed)) )
{
mpWindow->CaptureMouse();
mpView->BegDragHelpLine(nHelpLine, pPV);
@@ -285,41 +285,41 @@ BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
bOrtho = rMEvt.IsShift() != pFrameView->IsOrtho();
}
- BOOL bCntrl = rMEvt.IsMod1();
+ BOOL bSnapModPressed = rMEvt.IsMod2();
mpView->SetDragWithCopy(rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
BOOL bGridSnap = pFrameView->IsGridSnap();
- bGridSnap = (bCntrl != bGridSnap);
+ bGridSnap = (bSnapModPressed != bGridSnap);
if (mpView->IsGridSnap() != bGridSnap)
mpView->SetGridSnap(bGridSnap);
BOOL bBordSnap = pFrameView->IsBordSnap();
- bBordSnap = (bCntrl != bBordSnap);
+ bBordSnap = (bSnapModPressed != bBordSnap);
if (mpView->IsBordSnap() != bBordSnap)
mpView->SetBordSnap(bBordSnap);
BOOL bHlplSnap = pFrameView->IsHlplSnap();
- bHlplSnap = (bCntrl != bHlplSnap);
+ bHlplSnap = (bSnapModPressed != bHlplSnap);
if (mpView->IsHlplSnap() != bHlplSnap)
mpView->SetHlplSnap(bHlplSnap);
BOOL bOFrmSnap = pFrameView->IsOFrmSnap();
- bOFrmSnap = (bCntrl != bOFrmSnap);
+ bOFrmSnap = (bSnapModPressed != bOFrmSnap);
if (mpView->IsOFrmSnap() != bOFrmSnap)
mpView->SetOFrmSnap(bOFrmSnap);
BOOL bOPntSnap = pFrameView->IsOPntSnap();
- bOPntSnap = (bCntrl != bOPntSnap);
+ bOPntSnap = (bSnapModPressed != bOPntSnap);
if (mpView->IsOPntSnap() != bOPntSnap)
mpView->SetOPntSnap(bOPntSnap);
BOOL bOConSnap = pFrameView->IsOConSnap();
- bOConSnap = (bCntrl != bOConSnap);
+ bOConSnap = (bSnapModPressed != bOConSnap);
if (mpView->IsOConSnap() != bOConSnap)
mpView->SetOConSnap(bOConSnap);
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 2ddf6a5fb885..5c380da547bc 100644..100755
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -436,6 +436,12 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
mpView->BegMarkObj(aMDPos);
}
}
+
+ if( bMarked && bTempRotation && (nSlotId == SID_OBJECT_ROTATE) && !rMEvt.IsShift() && (rMEvt.GetClicks() != 2) )
+ {
+ nSlotId = SID_OBJECT_SELECT;
+ Activate();
+ }
}
}
}
@@ -711,6 +717,8 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
if (nSlotId == SID_OBJECT_SELECT
&& mpView->IsRotateAllowed()
+
+ && (rMEvt.GetClicks() != 2)
&& (mpViewShell->GetFrameView()->IsClickChangeRotation()
|| (pSingleObj
&& pSingleObj->GetObjInventor()==E3dInventor))
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 2f3111665692..2835821796a1 100755
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -702,6 +702,17 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
mpView->EndDragObj( mpView->IsDragWithCopy() );
mpView->ForceMarkedToAnotherPage();
mpView->SetCurrentObj(OBJ_TEXT);
+
+ USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+
+ if ( mpView->IsRotateAllowed() && mpViewShell->GetFrameView()->IsClickChangeRotation() && (rMEvt.GetClicks() != 2) &&
+ !rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() && !rMEvt.IsRight() &&
+ Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
+ Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
+ {
+ // toggle to rotation mode
+ mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_OBJECT_ROTATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
+ }
}
else if( mpView && mpView->IsCreateObj() && rMEvt.IsLeft())
{
diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index 13088dfc64cb..419f661b1405 100755
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -279,6 +279,9 @@ private:
sal_Int32 mnDisplay;
+ sal_Int32 mnPenColor;
+ double mnPenWidth;
+
/** This value controls the device to use for formatting documents.
The currently supported values are 0 for the current printer or 1
for the printer independent virtual device the can be retrieved from
@@ -336,6 +339,12 @@ public:
sal_Int32 GetDisplay() const { Init(); return mnDisplay; }
void SetDisplay( sal_Int32 nDisplay = 0 ) { if( mnDisplay != nDisplay ) { OptionsChanged(); mnDisplay = nDisplay; } }
+ sal_Int32 GetPresentationPenColor() const { Init(); return mnPenColor; }
+ void SetPresentationPenColor( sal_Int32 nPenColor ) { if( mnPenColor != nPenColor ) { OptionsChanged(); mnPenColor = nPenColor; } }
+
+ double GetPresentationPenWidth() const { Init(); return mnPenWidth; }
+ void SetPresentationPenWidth( double nPenWidth ) { if( mnPenWidth != nPenWidth ) { OptionsChanged(); mnPenWidth = nPenWidth; } }
+
void SetStartWithTemplate( BOOL bOn = TRUE ) { if( bStartWithTemplate != bOn ) { OptionsChanged(); bStartWithTemplate = bOn; } }
void SetMarkedHitMovesAlways( BOOL bOn = TRUE ) { if( bMarkedHitMovesAlways != bOn ) { OptionsChanged(); bMarkedHitMovesAlways = bOn; } }
void SetMoveOnlyDragging( BOOL bOn = TRUE ) { if( bMoveOnlyDragging != bOn ) { OptionsChanged(); bMoveOnlyDragging = bOn; } }
diff --git a/sd/source/ui/slideshow/makefile.mk b/sd/source/ui/slideshow/makefile.mk
index ad4f4d306c6b..62062d7e5461 100644..100755
--- a/sd/source/ui/slideshow/makefile.mk
+++ b/sd/source/ui/slideshow/makefile.mk
@@ -40,8 +40,7 @@ AUTOSEG=true
.INCLUDE : $(PRJ)$/util$/makefile.pmk
.IF "$(ENABLE_PRESENTER_EXTRA_UI)"=="YES"
-RSCDEFS+=-DENABLE_PRESENTER_EXTRA_UI
-ADDCDEFS+=-DENABLE_PRESENTER_EXTRA_UI
+ENABLE_PRESENTER_EXTRA_UI is not used anymore
.ENDIF
# --- Files --------------------------------------------------------
diff --git a/sd/source/ui/slideshow/slideshow.hrc b/sd/source/ui/slideshow/slideshow.hrc
index 709e2a79146e..f086f52cb73f 100644..100755
--- a/sd/source/ui/slideshow/slideshow.hrc
+++ b/sd/source/ui/slideshow/slideshow.hrc
@@ -37,25 +37,20 @@
#define CM_ENDSHOW 7
#define CM_FIRST_SLIDE 8
#define CM_LAST_SLIDE 9
-#define CM_SLIDES 10
+
//CM for extra presenter UI
-#define CM_ERASE_ALLINK 11
-#define CM_ERASE_INK 12
-#define CM_ERASE_INK_PEN 13
-#define CM_ERASE_INK_PEN_VERY_THIN 14
-#define CM_ERASE_INK_PEN_THIN 15
-#define CM_ERASE_INK_PEN_NORMAL 16
-#define CM_ERASE_INK_PEN_THICK 17
-#define CM_ERASE_INK_PEN_VERY_THICK 18
-#define CM_COLOR_PEN 19
-#define CM_WIDTH_PEN 20
-#define CM_WIDTH_PEN_VERY_THIN 21
-#define CM_WIDTH_PEN_THIN 22
-#define CM_WIDTH_PEN_NORMAL 23
-#define CM_WIDTH_PEN_THICK 24
-#define CM_WIDTH_PEN_VERY_THICK 25
-#define CM_PEN_MODE 26
-#define CM_ERASE_MODE 27
-#define CM_POINTER_OPTION 28
+#define CM_ERASE_ALLINK 10
+#define CM_COLOR_PEN 11
+#define CM_WIDTH_PEN 12
+#define CM_WIDTH_PEN_VERY_THIN 13
+#define CM_WIDTH_PEN_THIN 14
+#define CM_WIDTH_PEN_NORMAL 15
+#define CM_WIDTH_PEN_THICK 16
+#define CM_WIDTH_PEN_VERY_THICK 17
+#define CM_PEN_MODE 18
+#define CM_ERASE_MODE 19
+#define CM_POINTER_OPTION 20
+
+#define CM_SLIDES 21 // this must be the last id!
#endif
diff --git a/sd/source/ui/slideshow/slideshow.src b/sd/source/ui/slideshow/slideshow.src
index 02c225fb5ea9..78cd2aae0d9f 100644..100755
--- a/sd/source/ui/slideshow/slideshow.src
+++ b/sd/source/ui/slideshow/slideshow.src
@@ -71,20 +71,10 @@ Menu RID_SLIDESHOW_CONTEXTMENU
{
Separator = TRUE;
};
-#ifdef ENABLE_PRESENTER_EXTRA_UI
MenuItem
{
Identifier = CM_PEN_MODE;
- Text [ en-US ] = "~Pen Mode";
- };
- MenuItem
- {
- Identifier = CM_ERASE_MODE;
- Text [ en-US ] = "~Eraser Mode";
- };
- MenuItem
- {
- Separator = TRUE;
+ Text [ en-US ] = "Mouse pointer as ~pen";
};
MenuItem
{
@@ -124,20 +114,8 @@ Menu RID_SLIDESHOW_CONTEXTMENU
};
MenuItem
{
- Separator = TRUE;
- };
- MenuItem
- {
Identifier = CM_COLOR_PEN ;
- Text [ en-US ] = "~Change Pen Color" ;
- };
- MenuItem
- {
- Separator = TRUE;
- };
- MenuItem
- {
- Separator = TRUE;
+ Text [ en-US ] = "~Change Pen Color..." ;
};
MenuItem
{
@@ -150,48 +128,6 @@ Menu RID_SLIDESHOW_CONTEXTMENU
};
MenuItem
{
- Identifier = CM_ERASE_INK_PEN;
- Text [ en-US ] = "~Eraser Width" ;
-
- SubMenu = Menu
- {
- ItemList =
- {
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_VERY_THIN;
- Text [ en-US ] = "~Very thin";
- };
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_THIN;
- Text [ en-US ] = "~Thin";
- };
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_NORMAL;
- Text [ en-US ] = "~Normal";
- };
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_THICK;
- Text [ en-US ] = "~Thick";
- };
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_VERY_THICK;
- Text [ en-US ] = "~Very Thick";
- };
- };
- };
- };
-#endif
- MenuItem
- {
- Separator = TRUE;
- };
- MenuItem
- {
Identifier = CM_SCREEN;
Text [ en-US ] = "~Screen" ;
@@ -216,6 +152,6 @@ Menu RID_SLIDESHOW_CONTEXTMENU
{
Identifier = CM_ENDSHOW ;
Text [ en-US ] = "~End Show" ;
- };
+ };
};
};
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index ee89da143910..67ac7e94cadb 100755
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -554,13 +554,11 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation,
, mbInputFreeze(false)
, mbActive(sal_False)
, maPresSettings( pDoc->getPresentationSettings() )
-, mnUserPaintColor( 0x00000000L ) //User paint color is Black by default
-#ifdef ENABLE_PRESENTER_EXTRA_UI
-, mbSwitchPenMode(true)
+, mnUserPaintColor( 0x80ff0000L )
+, mbUsePen(false)
+, mdUserPaintStrokeWidth ( 150.0 )
+#ifdef ENABLE_ERASER_UI
, mbSwitchEraserMode(false)
-, mdUserPaintStrokeWidth ( 4.0 )
-, mbEraseAllInk(false)
-//, mbEraseInk(false)
, mnEraseInkSize(100)
#endif
, mnEntryCounter(0)
@@ -591,10 +589,26 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation,
mbAutoSaveWasOn = true;
Application::AddEventListener( LINK( this, SlideshowImpl, EventListenerHdl ) );
+
+ mbUsePen = maPresSettings.mbMouseAsPen;
+
+ SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
+ if( pOptions )
+ {
+ mnUserPaintColor = pOptions->GetPresentationPenColor();
+ mdUserPaintStrokeWidth = pOptions->GetPresentationPenWidth();
+ }
}
SlideshowImpl::~SlideshowImpl()
{
+ SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
+ if( pOptions )
+ {
+ pOptions->SetPresentationPenColor(mnUserPaintColor);
+ pOptions->SetPresentationPenWidth(mdUserPaintStrokeWidth);
+ }
+
Application::RemoveEventListener( LINK( this, SlideshowImpl, EventListenerHdl ) );
maDeactivateTimer.Stop();
@@ -1124,13 +1138,20 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
-1, Any( maPresSettings.mbManual != sal_False ),
beans::PropertyState_DIRECT_VALUE ) );
- if( maPresSettings.mbMouseAsPen )
+ if( mbUsePen )
{
aProperties.push_back(
beans::PropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM("UserPaintColor") ),
// User paint color is black by default.
- -1, Any( static_cast<sal_Int32>(0x00000000L) ),
+ -1, Any( mnUserPaintColor ),
+ beans::PropertyState_DIRECT_VALUE ) );
+
+ aProperties.push_back(
+ beans::PropertyValue(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("UserPaintStrokeWidth") ),
+ // User paint color is black by default.
+ -1, Any( mdUserPaintStrokeWidth ),
beans::PropertyState_DIRECT_VALUE ) );
}
@@ -1461,14 +1482,14 @@ void SlideshowImpl::displayCurrentSlide (const bool bSkipAllMainSequenceEffects)
void SlideshowImpl::endPresentation()
{
-#ifdef ENABLE_PRESENTER_EXTRA_UI
+/*
if( maPresSettings.mbMouseAsPen)
{
Reference< XMultiServiceFactory > xDocFactory(mpDoc->getUnoModel(), UNO_QUERY );
if( xDocFactory.is() )
mxShow->registerUserPaintPolygons(xDocFactory);
}
-#endif
+*/
if( !mnEndShowEvent )
mnEndShowEvent = Application::PostUserEvent( LINK(this, SlideshowImpl, endPresentationHdl) );
}
@@ -2203,16 +2224,8 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG )
PopupMenu* pMenu = new PopupMenu( SdResId( RID_SLIDESHOW_CONTEXTMENU ) );
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- //adding button to contextual menu for erasing functionnalities for UserPaintOverlay
- pMenu->EnableItem( CM_ERASE_ALLINK, (maPresSettings.mbMouseAsPen));
- // Adding button to contextual menu for changing pen color
- pMenu->EnableItem( CM_COLOR_PEN, (maPresSettings.mbMouseAsPen));
// Adding button to display if in Pen mode
- pMenu->EnableItem( CM_PEN_MODE, (maPresSettings.mbMouseAsPen));
- // Adding button to displau if in Erase Mode
- pMenu->EnableItem( CM_ERASE_MODE, (maPresSettings.mbMouseAsPen));
-#endif
+ pMenu->CheckItem( CM_PEN_MODE, mbUsePen);
const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
pMenu->EnableItem( CM_NEXT_SLIDE, ( mpSlideController->getNextSlideIndex() != -1 ) );
@@ -2280,105 +2293,44 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG )
pBlankMenu->CheckItem( ( mpShowWindow->GetBlankColor() == Color( COL_WHITE ) ) ? CM_SCREEN_WHITE : CM_SCREEN_BLACK );
}
}
-#ifdef ENABLE_PRESENTER_EXTRA_UI
PopupMenu* pWidthMenu = pMenu->GetPopupMenu( CM_WIDTH_PEN);
// populate color width list
if( pWidthMenu )
{
- if(! maPresSettings.mbMouseAsPen)
- {
- pMenu->EnableItem( CM_WIDTH_PEN, FALSE );
- }
- else
- {
- sal_Int32 nIterator;
- double nWidth;
+ sal_Int32 nIterator;
+ double nWidth;
- nWidth = 4.0;
- for( nIterator = 1; nIterator < 6; nIterator++)
- {
- switch(nIterator)
- {
- case 1:
- nWidth = 4.0;
- break;
- case 2:
- nWidth = 100.0;
- break;
- case 3:
- nWidth = 150.0;
- break;
- case 4:
- nWidth = 200.0;
- break;
- case 5:
- nWidth = 400.0;
- break;
- default:
- break;
- }
-
- pWidthMenu->EnableItem( (USHORT)(CM_WIDTH_PEN + nIterator), TRUE);
- if( nWidth == mdUserPaintStrokeWidth)
- pWidthMenu->CheckItem( (USHORT)(CM_WIDTH_PEN + nIterator) );
-
- }
- }
- }
-
-
- PopupMenu* pEraseWidthMenu = pMenu->GetPopupMenu( CM_ERASE_INK_PEN);
-
- // populate eraser width list
- if( pEraseWidthMenu )
- {
- if(! maPresSettings.mbMouseAsPen)
+ nWidth = 4.0;
+ for( nIterator = 1; nIterator < 6; nIterator++)
{
- pMenu->EnableItem( CM_ERASE_INK_PEN, FALSE );
- }
- else
- {
- sal_Int32 nEIterator;
- double nEWidth;
-
- nEWidth = 100.0;
- for( nEIterator = 1; nEIterator < 6; nEIterator++)
+ switch(nIterator)
{
- switch(nEIterator)
- {
- case 1:
- nEWidth = 100.0;
- break;
- case 2:
- nEWidth = 200.0;
- break;
- case 3:
- nEWidth = 300.0;
- break;
- case 4:
- nEWidth = 400.0;
- break;
- case 5:
- nEWidth = 500.0;
- break;
- default:
- break;
- }
-
- pEraseWidthMenu->EnableItem( (USHORT)(CM_ERASE_INK_PEN + nEIterator), TRUE);
- if( nEWidth == mnEraseInkSize)
- pEraseWidthMenu->CheckItem( (USHORT)(CM_ERASE_INK_PEN + nEIterator) );
- if( mbSwitchPenMode )
- pMenu->CheckItem( (USHORT)(CM_PEN_MODE));
- if( mbSwitchEraserMode )
- pMenu->CheckItem( (USHORT)(CM_ERASE_MODE));
-
+ case 1:
+ nWidth = 4.0;
+ break;
+ case 2:
+ nWidth = 100.0;
+ break;
+ case 3:
+ nWidth = 150.0;
+ break;
+ case 4:
+ nWidth = 200.0;
+ break;
+ case 5:
+ nWidth = 400.0;
+ break;
+ default:
+ break;
}
+
+ pWidthMenu->EnableItem( (USHORT)(CM_WIDTH_PEN + nIterator), TRUE);
+ if( nWidth == mdUserPaintStrokeWidth)
+ pWidthMenu->CheckItem( (USHORT)(CM_WIDTH_PEN + nIterator) );
}
}
-#endif
pMenu->SetSelectHdl( LINK( this, SlideshowImpl, ContextMenuSelectHdl ) );
pMenu->Execute( mpShowWindow, maPopupMousePos );
@@ -2442,139 +2394,93 @@ IMPL_LINK( SlideshowImpl, ContextMenuSelectHdl, Menu *, pMenu )
}
}
break;
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- if( maPresSettings.mbMouseAsPen )
- {
- case CM_COLOR_PEN:
- {
- //Open a color picker based on SvColorDialog
- ::Color aColor( mnUserPaintColor );
- SvColorDialog aColorDlg( mpShowWindow);
- aColorDlg.SetColor( aColor );
-
- if (aColorDlg.Execute() )
- {
- aColor = aColorDlg.GetColor();
- mnUserPaintColor = aColor.GetColor();
- setPenColor(mnUserPaintColor);
- }
- mbWasPaused = false;
- }
- break;
-
- case CM_WIDTH_PEN_VERY_THIN:
- {
- setPenWidth(4.0);
- mbWasPaused = false;
- }
- break;
-
- case CM_WIDTH_PEN_THIN:
- {
- setPenWidth(100.0);
- mbWasPaused = false;
- }
- break;
-
- case CM_WIDTH_PEN_NORMAL:
- {
- setPenWidth(150.0);
- mbWasPaused = false;
- }
- break;
+ case CM_COLOR_PEN:
+ {
+ //Open a color picker based on SvColorDialog
+ ::Color aColor( mnUserPaintColor );
+ SvColorDialog aColorDlg( mpShowWindow);
+ aColorDlg.SetColor( aColor );
- case CM_WIDTH_PEN_THICK:
+ if (aColorDlg.Execute() )
{
- setPenWidth(200.0);
- mbWasPaused = false;
+ aColor = aColorDlg.GetColor();
+ setPenColor(aColor.GetColor());
}
- break;
+ mbWasPaused = false;
+ }
+ break;
- case CM_WIDTH_PEN_VERY_THICK:
- {
- setPenWidth(400.0);
- mbWasPaused = false;
- }
- break;
- case CM_ERASE_ALLINK:
- {
- setEraseAllInk(true);
- mbWasPaused = false;
- }
- break;
- case CM_PEN_MODE:
- {
- setPenMode(true);
- mbWasPaused = false;
- }
- break;
- case CM_ERASE_MODE:
- {
- setEraserMode(true);
- mbWasPaused = false;
- }
- break;
- case CM_ERASE_INK_PEN_VERY_THIN:
- {
- setEraseInk(100);
- mbWasPaused = false;
- }
- break;
+ case CM_WIDTH_PEN_VERY_THIN:
+ {
+ setPenWidth(4.0);
+ mbWasPaused = false;
+ }
+ break;
- case CM_ERASE_INK_PEN_THIN:
- {
- setEraseInk(200);
- mbWasPaused = false;
- }
- break;
+ case CM_WIDTH_PEN_THIN:
+ {
+ setPenWidth(100.0);
+ mbWasPaused = false;
+ }
+ break;
- case CM_ERASE_INK_PEN_NORMAL:
- {
- setEraseInk(300);
- mbWasPaused = false;
- }
- break;
+ case CM_WIDTH_PEN_NORMAL:
+ {
+ setPenWidth(150.0);
+ mbWasPaused = false;
+ }
+ break;
- case CM_ERASE_INK_PEN_THICK:
- {
- setEraseInk(400);
- mbWasPaused = false;
- }
- break;
- case CM_ERASE_INK_PEN_VERY_THICK:
- {
- setEraseInk(500);
- mbWasPaused = false;
- }
- break;
- }
-#endif
+ case CM_WIDTH_PEN_THICK:
+ {
+ setPenWidth(200.0);
+ mbWasPaused = false;
+ }
+ break;
- case CM_ENDSHOW:
- // in case the user cancels the presentation, switch to current slide
- // in edit mode
- if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
- {
- if( mpSlideController->getCurrentSlideNumber() != -1 )
- {
- mnRestoreSlide = mpSlideController->getCurrentSlideNumber();
- }
- }
- endPresentation();
- break;
- default:
- sal_Int32 nPageNumber = nMenuId - CM_SLIDES;
- const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
- if( (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) )
- {
- mpShowWindow->RestartShow( nPageNumber );
- }
- else if( nPageNumber != mpSlideController->getCurrentSlideNumber() )
+ case CM_WIDTH_PEN_VERY_THICK:
+ {
+ setPenWidth(400.0);
+ mbWasPaused = false;
+ }
+ break;
+ case CM_ERASE_ALLINK:
+ {
+ setEraseAllInk(true);
+ mbWasPaused = false;
+ }
+ break;
+ case CM_PEN_MODE:
+ {
+ setUsePen(!mbUsePen);
+ mbWasPaused = false;
+ }
+ break;
+ case CM_ENDSHOW:
+ // in case the user cancels the presentation, switch to current slide
+ // in edit mode
+ if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
+ {
+ if( mpSlideController->getCurrentSlideNumber() != -1 )
{
- displaySlideNumber( nPageNumber );
+ mnRestoreSlide = mpSlideController->getCurrentSlideNumber();
}
- mbWasPaused = false;
- break;
+ }
+ endPresentation();
+ break;
+ default:
+ sal_Int32 nPageNumber = nMenuId - CM_SLIDES;
+ const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
+ if( (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) )
+ {
+ mpShowWindow->RestartShow( nPageNumber );
+ }
+ else if( nPageNumber != mpSlideController->getCurrentSlideNumber() )
+ {
+ displaySlideNumber( nPageNumber );
+ }
+ mbWasPaused = false;
+ break;
}
}
@@ -2960,7 +2866,7 @@ void SlideshowImpl::receiveRequest(SfxRequest& rReq)
switch ( rReq.GetSlot() )
{
case SID_NAVIGATOR_PEN:
- setUsePen(!maPresSettings.mbMouseAsPen);
+ setUsePen(!mbUsePen);
break;
case SID_NAVIGATOR_PAGE:
@@ -3146,7 +3052,7 @@ void SAL_CALL SlideshowImpl::setMouseVisible( sal_Bool bVisible ) throw (Runtime
sal_Bool SAL_CALL SlideshowImpl::getUsePen() throw (RuntimeException)
{
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- return maPresSettings.mbMouseAsPen;
+ return mbUsePen;
}
// --------------------------------------------------------------------
@@ -3154,93 +3060,38 @@ sal_Bool SAL_CALL SlideshowImpl::getUsePen() throw (RuntimeException)
void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen ) throw (RuntimeException)
{
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- maPresSettings.mbMouseAsPen = bMouseAsPen;
+ mbUsePen = bMouseAsPen;
if( mxShow.is() ) try
{
- // For Pencolor;
+ // For Pencolor;
Any aValue;
- if( maPresSettings.mbMouseAsPen )
- // TODO: take color from configuration
- aValue <<= mnUserPaintColor;
+ if( mbUsePen )
+ aValue <<= mnUserPaintColor;
beans::PropertyValue aPenProp;
aPenProp.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "UserPaintColor" ));
aPenProp.Value = aValue;
mxShow->setProperty( aPenProp );
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- //for StrokeWidth :
- Any aValueWidth;
- if( maPresSettings.mbMouseAsPen )
- aValueWidth <<= mdUserPaintStrokeWidth;
-
- beans::PropertyValue aPenPropWidth;
- aPenPropWidth.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "UserPaintStrokeWidth" ));
- aPenPropWidth.Value = aValueWidth;
-
- mxShow->setProperty( aPenPropWidth );
-
- // for Pen Mode
- Any aValueSwitchPenMode;
- if( maPresSettings.mbMouseAsPen )
- aValueSwitchPenMode <<= mbSwitchPenMode;
- beans::PropertyValue aPenPropSwitchPenMode;
- aPenPropSwitchPenMode.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SwitchPenMode" ));
- aPenPropSwitchPenMode.Value = aValueSwitchPenMode;
- mxShow->setProperty( aPenPropSwitchPenMode );
-
- //for EraseAllInk :
- Any aValueEraseAllInk;
- if( maPresSettings.mbMouseAsPen )
- aValueEraseAllInk <<= mbEraseAllInk;
- beans::PropertyValue aPenPropEraseAllInk;
- aPenPropEraseAllInk.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EraseAllInk" ));
- aPenPropEraseAllInk.Value = aValueEraseAllInk;
- mxShow->setProperty( aPenPropEraseAllInk );
- mbEraseAllInk = false; // sets to false so not to have it applied again
-#endif
- }
- catch( Exception& e )
- {
- static_cast<void>(e);
- DBG_ERROR(
- (OString("sd::SlideshowImpl::setUsePen(), "
- "exception caught: ") +
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
- }
-}
-#ifdef ENABLE_PRESENTER_EXTRA_UI
-void SAL_CALL SlideshowImpl::setUseEraser( sal_Bool bMouseAsPen ) throw (RuntimeException)
-{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- maPresSettings.mbMouseAsPen = bMouseAsPen;
- if( mxShow.is() ) try
- {
+ //for StrokeWidth :
+ if( mbUsePen )
+ {
+ beans::PropertyValue aPenPropWidth;
+ aPenPropWidth.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "UserPaintStrokeWidth" ));
+ aPenPropWidth.Value <<= mdUserPaintStrokeWidth;
+ mxShow->setProperty( aPenPropWidth );
- //for EraseInk :
- Any aValueEraseInk;
- if( maPresSettings.mbMouseAsPen )
- aValueEraseInk <<= mnEraseInkSize;
- beans::PropertyValue aPenPropEraseInk;
- aPenPropEraseInk.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EraseInk" ));
- aPenPropEraseInk.Value = aValueEraseInk;
- mxShow->setProperty( aPenPropEraseInk );
-
- // for Erase Mode
- Any aValueSwitchEraserMode;
- if( maPresSettings.mbMouseAsPen )
- aValueSwitchEraserMode <<= mbSwitchEraserMode;
- beans::PropertyValue aPenPropSwitchEraserMode;
- aPenPropSwitchEraserMode.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SwitchEraserMode" ));
- aPenPropSwitchEraserMode.Value = aValueSwitchEraserMode;
- mxShow->setProperty( aPenPropSwitchEraserMode );
+ // for Pen Mode
+ beans::PropertyValue aPenPropSwitchPenMode;
+ aPenPropSwitchPenMode.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SwitchPenMode" ));
+ aPenPropSwitchPenMode.Value <<= sal_True;
+ mxShow->setProperty( aPenPropSwitchPenMode );
+ }
}
catch( Exception& e )
{
static_cast<void>(e);
DBG_ERROR(
- (OString("sd::SlideshowImpl::setUseEraser(), "
+ (OString("sd::SlideshowImpl::setUsePen(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
@@ -3262,12 +3113,9 @@ void SAL_CALL SlideshowImpl::setPenWidth( double dStrokeWidth ) throw (RuntimeEx
{
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
mdUserPaintStrokeWidth = dStrokeWidth;
- mbSwitchPenMode = true;
- mbSwitchEraserMode = !mbSwitchPenMode;
- if( maPresSettings.mbMouseAsPen )
- setUsePen( sal_True ); // update color and width
+ setUsePen( true ); // enable pen mode, update color and width
}
-#endif
+
// --------------------------------------------------------------------
sal_Int32 SAL_CALL SlideshowImpl::getPenColor() throw (RuntimeException)
@@ -3282,71 +3130,59 @@ void SAL_CALL SlideshowImpl::setPenColor( sal_Int32 nColor ) throw (RuntimeExcep
{
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
mnUserPaintColor = nColor;
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- mbSwitchPenMode = true;
- mbSwitchEraserMode = !mbSwitchPenMode;
-#endif
- if( maPresSettings.mbMouseAsPen )
- setUsePen( sal_True ); // update color
+ setUsePen( true ); // enable pen mode, update color
}
-#ifdef ENABLE_PRESENTER_EXTRA_UI
// --------------------------------------------------------------------
-void SAL_CALL SlideshowImpl::setPenMode( bool bSwitchPenMode ) throw (RuntimeException)
+void SAL_CALL SlideshowImpl::setUseEraser( ::sal_Bool /*_usepen*/ ) throw (css::uno::RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- mbSwitchPenMode = bSwitchPenMode;
-
- if(mbSwitchPenMode == true){
- mbSwitchEraserMode = false;
- }else{
- mbSwitchEraserMode = true;
- }
- if( maPresSettings.mbMouseAsPen )
- setUsePen( sal_True ); // Switch to Pen Mode
-
}
-void SAL_CALL SlideshowImpl::setEraserMode(bool bSwitchEraserMode ) throw (RuntimeException)
+// --------------------------------------------------------------------
+
+void SAL_CALL SlideshowImpl::setPenMode( bool bSwitchPenMode ) throw (RuntimeException)
{
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- mbSwitchEraserMode = bSwitchEraserMode;
- if(mbSwitchEraserMode = true){
- mbSwitchPenMode = false;
- }else{
- mbSwitchPenMode = true;
- }
-
- if( maPresSettings.mbMouseAsPen )
- setUseEraser( sal_True ); // Switch to EraseMode
+ setUsePen( bSwitchPenMode ); // SwitchPen Mode
}
-
// --------------------------------------------------------------------
-void SAL_CALL SlideshowImpl::setEraseAllInk( bool bEraseAllInk ) throw (RuntimeException)
+void SAL_CALL SlideshowImpl::setEraseAllInk(bool bEraseAllInk) throw (RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- mbEraseAllInk=bEraseAllInk;
- mbSwitchPenMode = true;
- mbSwitchEraserMode = false;
- if( maPresSettings.mbMouseAsPen )
- setUsePen( sal_True ); // update erase all ink bool
+ if( bEraseAllInk )
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ if( mxShow.is() ) try
+ {
+ beans::PropertyValue aPenPropEraseAllInk;
+ aPenPropEraseAllInk.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EraseAllInk" ));
+ aPenPropEraseAllInk.Value <<= bEraseAllInk;
+ mxShow->setProperty( aPenPropEraseAllInk );
+ }
+ catch( Exception& e )
+ {
+ static_cast<void>(e);
+ DBG_ERROR(
+ (OString("sd::SlideshowImpl::setEraseAllInk(), "
+ "exception caught: ") +
+ rtl::OUStringToOString(
+ comphelper::anyToString( cppu::getCaughtException() ),
+ RTL_TEXTENCODING_UTF8 )).getStr() );
+ }
+ }
}
+void SAL_CALL SlideshowImpl::setEraseInk( sal_Int32 /*nEraseInkSize*/ ) throw (css::uno::RuntimeException)
+{
+}
-void SAL_CALL SlideshowImpl::setEraseInk( sal_Int32 nEraseInkSize ) throw (RuntimeException)
+void SAL_CALL SlideshowImpl::setEraserMode( bool /*bSwitchEraserMode*/ ) throw (css::uno::RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- mnEraseInkSize=nEraseInkSize;
- mbSwitchPenMode = false;
- mbSwitchEraserMode = true;
- if( maPresSettings.mbMouseAsPen )
- setUseEraser( sal_True ); // update erase ink size
}
-#endif
+
// --------------------------------------------------------------------
// XSlideShowController Methods
// --------------------------------------------------------------------
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index cb33c4a740c7..98a34959e0b9 100755
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -198,7 +198,6 @@ public:
virtual void SAL_CALL setUsePen( ::sal_Bool _usepen ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getPenColor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setPenColor( ::sal_Int32 _pencolor ) throw (css::uno::RuntimeException);
-#ifdef ENABLE_PRESENTER_EXTRA_UI
virtual void SAL_CALL setUseEraser( ::sal_Bool _usepen ) throw (css::uno::RuntimeException);
virtual double SAL_CALL getPenWidth() throw (css::uno::RuntimeException);
virtual void SAL_CALL setPenWidth( double dStrokeWidth ) throw (css::uno::RuntimeException);
@@ -206,7 +205,6 @@ public:
virtual void SAL_CALL setEraseInk( sal_Int32 nEraseInkSize ) throw (css::uno::RuntimeException);
virtual void SAL_CALL setPenMode( bool bSwitchPenMode) throw (css::uno::RuntimeException);
virtual void SAL_CALL setEraserMode( bool bSwitchEraserMode ) throw (css::uno::RuntimeException);
-#endif
virtual ::sal_Bool SAL_CALL isRunning( ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getSlideCount( ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getSlideByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
@@ -396,14 +394,9 @@ private:
PresentationSettings maPresSettings;
sal_Int32 mnUserPaintColor;
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- bool mbSwitchPenMode;
- bool mbSwitchEraserMode;
+ bool mbUsePen;
double mdUserPaintStrokeWidth;
- bool mbEraseAllInk;
-// bool mbEraseInk;
- sal_Int32 mnEraseInkSize;
-#endif
+
/// used in updateHdl to prevent recursive calls
sal_Int32 mnEntryCounter;
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 6f6f49fdc93c..020f95b5af89 100755
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -329,6 +329,16 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
{
short nSlotId = rReq.GetSlot();
+ if( nSlotId == SID_OBJECT_ROTATE )
+ {
+ // togle rotation
+ if( nOldSId == nSlotId )
+ {
+ nSlotId = SID_OBJECT_SELECT;
+ rReq.SetSlot( nSlotId );
+ }
+ }
+
if (nSlotId == SID_OBJECT_CROOK_ROTATE ||
nSlotId == SID_OBJECT_CROOK_SLANT ||
nSlotId == SID_OBJECT_CROOK_STRETCH)