ooo-build r15300 - in trunk: . patches/dev300



Author: thorstenb
Date: Fri Feb  6 13:31:06 2009
New Revision: 15300
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15300&view=rev

Log:
    * patches/dev300/apply:
    * patches/dev300/optional-outplace-ole.diff: patch from i#98970,
    UI + core to have OLE editing optionally outplace
    * patches/dev300/slideshow-configurable-paintoverlay.diff: patch
    from i#97972; UI + core to have in-slideshow user drawing
    configurable (color & stroke width); kudos to fredus & ssaboum for
    this nifty feature



Added:
   trunk/patches/dev300/slideshow-configurable-paintoverlay.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/optional-outplace-ole.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Feb  6 13:31:06 2009
@@ -32,7 +32,7 @@
 	      UnUsedButNotYetRemovedFromSVN, WebDAVUpstream, \
 	      PostgreSQL, SELinux, VOSremoval, Glib2, \
 	      UnitBootstrap, RadioButtons, UnstableLibwpd, WWInProgress, \
-	      KDE4, MinGW, CalcExperimental, OptionalOutplaceOLE
+	      KDE4, MinGW, CalcExperimental
 DebianLooseSections: DebianBaseNoHelpContent
 # Optional sections
 Optional : DejaVuFonts, NovellOnlyExtensionFixes, Win32OnlyExtensionFixes, Linux32OnlyExtensionFixes
@@ -1816,10 +1816,6 @@
 
 scsolver-lpsolve.diff
 
-[ OptionalOutplaceOLE ]
-SectionOwner => thorsten
-optional-outplace-ole.diff, thorsten
-
 #[ OOXSTLport5 ]
 #
 ## oox devs, please reconsider operator[] use,
@@ -2668,6 +2664,11 @@
 sfx2-privateprotectedpublic.diff
 # add make_pair<>()-like type generator functions to generated header files
 codemaker-function-template-generators.diff, i#98625, thorsten
+# UI + core to make OLE editing optionally outplace
+optional-outplace-ole.diff, i#98970, thorsten
+# UI + core to have in-slideshow user drawing configurable (color &
+# stroke width)
+slideshow-configurable-paintoverlay.diff, i#97972, fredus
 
 # several compile fixes for --enable-debug.
 buildfix-enable-debug.diff

Modified: trunk/patches/dev300/optional-outplace-ole.diff
==============================================================================
--- trunk/patches/dev300/optional-outplace-ole.diff	(original)
+++ trunk/patches/dev300/optional-outplace-ole.diff	Fri Feb  6 13:31:06 2009
@@ -317,22 +317,23 @@
 index 83cfa86..d0e13fc 100644
 --- sd/inc/app.hrc
 +++ sd/inc/app.hrc
-@@ -443,6 +443,7 @@
- 
- #define SID_SELECT_BACKGROUND				(SID_SD_START+422)
- #define SID_OBJECT_CROP						(SID_SD_START+423)
-+#define SID_OUTPLACE_OBJECT				    (SID_SD_START+424)
- 
- // Slots for the tool pane popup
- #define SID_TP_APPLY_TO_ALL_SLIDES          (SID_SD_START+425)
-@@ -459,6 +460,7 @@
- #define SID_DISPLAY_MASTER_BACKGROUND       (SID_SD_START+436)
+@@ -460,11 +460,13 @@
  #define SID_DISPLAY_MASTER_OBJECTS          (SID_SD_START+437)
  #define SID_INSERTPAGE_LAYOUT_MENU          (SID_SD_START+438)
-+#define SID_INPLACE_OBJECT				    (SID_SD_START+439)
+ #define SID_OUTLINE_TEXT_AUTOFIT            (SID_SD_START+439)
++#define SID_INPLACE_OBJECT				    (SID_SD_START+440)
++#define SID_OUTPLACE_OBJECT				(SID_SD_START+441)
  
  // Add companion for the SID_HIDE_SLIDE (that is defined in svx)
- #define SID_SHOW_SLIDE                      (SID_SD_START+440)
+-#define SID_SHOW_SLIDE                      (SID_SD_START+440)
++#define SID_SHOW_SLIDE                      (SID_SD_START+442)
+ 
+-#define SID_ADD_MOTION_PATH					(SID_SD_START+441)
+-#define SID_TABLE_TOOLBOX					(SID_SD_START+442)
++#define SID_ADD_MOTION_PATH					(SID_SD_START+443)
++#define SID_TABLE_TOOLBOX					(SID_SD_START+444)
+ 
+ #endif
 diff --git sd/sdi/_drvwsh.sdi sd/sdi/_drvwsh.sdi
 index 76ed4a3..527070d 100644
 --- sd/sdi/_drvwsh.sdi

Added: trunk/patches/dev300/slideshow-configurable-paintoverlay.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/slideshow-configurable-paintoverlay.diff	Fri Feb  6 13:31:06 2009
@@ -0,0 +1,573 @@
+Modified: sd/source/ui/slideshow/slideshow.hrc
+==============================================================================
+--- sd/source/ui/slideshow/slideshow.hrc	Sat Jan 31 09:53:18 2009	(r267232)
++++ sd/source/ui/slideshow/slideshow.hrc	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -38,8 +38,15 @@
+ #define CM_SCREEN_BLACK	5
+ #define CM_SCREEN_WHITE	6
+ #define CM_ENDSHOW		7
+-#define CM_FIRST_SLIDE	8
+-#define CM_LAST_SLIDE	9
+-#define CM_SLIDES		10
++#define CM_COLOR_PEN 8
++#define CM_FIRST_SLIDE	9
++#define CM_LAST_SLIDE	10
++#define CM_WIDTH_PEN		11
++#define CM_WIDTH_PEN_VERY_THIN		12
++#define CM_WIDTH_PEN_THIN		13
++#define CM_WIDTH_PEN_NORMAL	14
++#define CM_WIDTH_PEN_THICK	15
++#define CM_WIDTH_PEN_VERY_THICK	16
++#define CM_SLIDES		17
+ 
+ #endif
+
+Modified: sd/source/ui/slideshow/slideshow.src
+==============================================================================
+--- sd/source/ui/slideshow/slideshow.src	Sat Jan 31 09:53:18 2009	(r267232)
++++ sd/source/ui/slideshow/slideshow.src	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -100,6 +100,56 @@
+ 		{
+ 			Separator = TRUE;
+ 		};
++	MenuItem
++		{
++            		Identifier = CM_WIDTH_PEN;
++            		Text [ en-US ] = "~Pen Width" ;
++
++			SubMenu = Menu
++            		{
++				ItemList =
++				{
++					MenuItem
++					{
++						Identifier =  CM_WIDTH_PEN_VERY_THIN;
++						Text [ en-US ] = "~Very thin";
++					};			  
++					MenuItem
++					{
++						Identifier =  CM_WIDTH_PEN_THIN;
++						Text [ en-US ] = "~Thin";
++					};
++					MenuItem
++					{
++						Identifier =  CM_WIDTH_PEN_NORMAL;
++						Text [ en-US ] = "~Normal";
++					};			  
++					MenuItem
++					{
++						Identifier =  CM_WIDTH_PEN_THICK;
++						Text [ en-US ] = "~Thick";
++					};
++					MenuItem
++					{
++						Identifier =  CM_WIDTH_PEN_VERY_THICK;
++						Text [ en-US ] = "~Very Thick";
++					};			  
++				};
++			};
++		};
++		MenuItem
++		{
++			Separator = TRUE;
++		};
++	 MenuItem
++        {
++            Identifier = CM_COLOR_PEN ;
++            Text [ en-US ] = "~Change Color" ;
++		};
++		MenuItem
++		{
++			Separator = TRUE;
++		};
+         MenuItem
+         {
+             Identifier = CM_ENDSHOW ;
+
+Modified: sd/source/ui/slideshow/slideshowimpl.cxx
+==============================================================================
+--- sd/source/ui/slideshow/slideshowimpl.cxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ sd/source/ui/slideshow/slideshowimpl.cxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -84,6 +84,7 @@
+ #include "canvas/elapsedtime.hxx"
+ #include "canvas/prioritybooster.hxx"
+ #include "avmedia/mediawindow.hxx"
++#include  "svtools/colrdlg.hxx"
+ 
+ #include <boost/noncopyable.hpp>
+ #include <boost/bind.hpp>
+@@ -532,7 +533,8 @@
+ , mbInputFreeze(false)
+ , mbActive(sal_False)
+ , maPresSettings( pDoc->getPresentationSettings() )
+-, mnUserPaintColor( 0x0000FF00L )
++, mnUserPaintColor( 0x00000000L )
++, mdUserPaintStrokeWidth ( 4.0 ) 
+ , mnEntryCounter(0)
+ , mnLastSlideNumber(-1)
+ , msOnClick( RTL_CONSTASCII_USTRINGPARAM("OnClick") )
+@@ -2111,6 +2113,8 @@
+ 
+ 	PopupMenu* pMenu = new PopupMenu( SdResId( RID_SLIDESHOW_CONTEXTMENU ) );
+ 
++	pMenu->EnableItem( CM_COLOR_PEN, (maPresSettings.mbMouseAsPen));
++
+ 	const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
+ 	pMenu->EnableItem( CM_NEXT_SLIDE, ( mpSlideController->getNextSlideIndex() != -1 ) );
+ 	pMenu->EnableItem( CM_PREV_SLIDE, ( mpSlideController->getPreviousSlideIndex() != -1 ) || (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) );
+@@ -2178,6 +2182,55 @@
+ 		}
+ 	}
+ 
++
++	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;
++			
++ 			
++
++			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) );
++				
++			}
++		}
++	}
++
+ 	pMenu->SetSelectHdl( LINK( this, SlideshowImpl, ContextMenuSelectHdl ) );
+ 	pMenu->Execute( mpShowWindow, maPopupMousePos );
+ 	delete pMenu;
+@@ -2240,6 +2293,59 @@
+ 			}
+ 		}
+ 		break;
++
++		case CM_COLOR_PEN:
++			 if( maPresSettings.mbMouseAsPen ){
++
++				//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:
++			 if( maPresSettings.mbMouseAsPen ){
++              			setPenWidth(4.0);
++				mbWasPaused = false;
++			}
++			break;
++
++		case CM_WIDTH_PEN_THIN:
++			 if( maPresSettings.mbMouseAsPen ){
++				setPenWidth(100.0);
++				mbWasPaused = false;
++			}
++			break;
++
++		case CM_WIDTH_PEN_NORMAL:
++			 if( maPresSettings.mbMouseAsPen ){
++				setPenWidth(150.0);
++				mbWasPaused = false;
++			}
++			break;
++
++		case CM_WIDTH_PEN_THICK:
++			 if( maPresSettings.mbMouseAsPen ){
++				setPenWidth(200.0);
++				mbWasPaused = false;
++			}
++			break;
++
++		case CM_WIDTH_PEN_VERY_THICK:
++			 if( maPresSettings.mbMouseAsPen ){
++				setPenWidth(400.0);
++				mbWasPaused = false;
++			}
++			break;
+ 		
+ 		case CM_ENDSHOW:
+ 			// in case the user cancels the presentation, switch to current slide
+@@ -2824,6 +2930,17 @@
+         aPenProp.Value = aValue;
+ 
+         mxShow->setProperty( aPenProp );
++
++	//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 );
+     }
+ 	catch( Exception& e )
+ 	{
+@@ -2837,6 +2954,27 @@
+ 	}
+ }
+ 
++
++// --------------------------------------------------------------------
++
++double SAL_CALL SlideshowImpl::getPenWidth() throw (RuntimeException)
++{
++	::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
++	return mdUserPaintStrokeWidth;
++}
++
++
++// --------------------------------------------------------------------
++
++void SAL_CALL SlideshowImpl::setPenWidth( double dStrokeWidth ) throw (RuntimeException)
++{
++        ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
++        mdUserPaintStrokeWidth = dStrokeWidth;
++        if( maPresSettings.mbMouseAsPen )
++                setUsePen( sal_True ); // update color and width
++}
++
++
+ // --------------------------------------------------------------------
+ 
+ sal_Int32 SAL_CALL SlideshowImpl::getPenColor() throw (RuntimeException)
+@@ -2845,6 +2983,7 @@
+ 	return mnUserPaintColor;
+ }
+ 
++
+ // --------------------------------------------------------------------
+ 
+ void SAL_CALL SlideshowImpl::setPenColor( sal_Int32 nColor ) throw (RuntimeException)
+@@ -2852,7 +2991,7 @@
+ 	::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ 	mnUserPaintColor = nColor;
+ 	if( maPresSettings.mbMouseAsPen )
+-		setUsePen( sal_True ); // update color
++		setUsePen( sal_True ); // update color and width
+ }
+ 
+ // --------------------------------------------------------------------
+
+Modified: sd/source/ui/slideshow/slideshowimpl.hxx
+==============================================================================
+--- sd/source/ui/slideshow/slideshowimpl.hxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ sd/source/ui/slideshow/slideshowimpl.hxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -200,6 +200,8 @@
+     virtual void SAL_CALL setMouseVisible( ::sal_Bool _mousevisible ) throw (css::uno::RuntimeException);
+     virtual ::sal_Bool SAL_CALL getUsePen() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setUsePen( ::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);
+     virtual ::sal_Int32 SAL_CALL getPenColor() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setPenColor( ::sal_Int32 _pencolor ) throw (css::uno::RuntimeException);
+     virtual ::sal_Bool SAL_CALL isRunning(  ) throw (css::uno::RuntimeException);
+@@ -379,6 +381,8 @@
+ 	PresentationSettings maPresSettings;
+ 	sal_Int32		mnUserPaintColor;
+ 
++	double		        mdUserPaintStrokeWidth;
++
+ 	/// used in updateHdl to prevent recursive calls
+ 	sal_Int32		mnEntryCounter;
+  
+
+Modified: slideshow/source/engine/eventmultiplexer.cxx
+==============================================================================
+--- slideshow/source/engine/eventmultiplexer.cxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ slideshow/source/engine/eventmultiplexer.cxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -1065,6 +1065,14 @@
+                     boost::cref(rUserColor)));
+ }
+ 
++bool EventMultiplexer::notifyUserPaintStrokeWidth( double rUserStrokeWidth )
++{
++    return mpImpl->maUserPaintEventHandlers.applyAll(
++        boost::bind(&UserPaintEventHandler::widthChanged,
++                    _1,
++                    rUserStrokeWidth));
++}
++
+ bool EventMultiplexer::notifyUserPaintDisabled()
+ {
+     return mpImpl->maUserPaintEventHandlers.applyAll(
+
+Modified: slideshow/source/engine/slide/slideimpl.cxx
+==============================================================================
+--- slideshow/source/engine/slide/slideimpl.cxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ slideshow/source/engine/slide/slideimpl.cxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -113,6 +113,7 @@
+                const ShapeEventListenerMap&                      rShapeListenerMap,
+                const ShapeCursorMap&                             rShapeCursorMap,
+                RGBColor const&                                   rUserPaintColor,
++	       double						dUserPaintStrokeWidth,
+                bool                                              bUserPaintEnabled,
+                bool                                              bIntrinsicAnimationsAllowed,
+                bool                                              bDisableAnimationZOrder );
+@@ -246,6 +247,7 @@
+     SlideAnimations										maAnimations;
+         
+     RGBColor                                            maUserPaintColor;
++    double 						mdUserPaintStrokeWidth;
+     UserPaintOverlaySharedPtr							mpPaintOverlay;
+     
+     /// Bitmaps with slide content at various states
+@@ -347,6 +349,7 @@
+                       const ShapeEventListenerMap&                          rShapeListenerMap,
+                       const ShapeCursorMap&                                 rShapeCursorMap,
+                       RGBColor const&                                       aUserPaintColor,
++		      double						   dUserPaintStrokeWidth,
+                       bool                                                  bUserPaintEnabled,
+                       bool                                                  bIntrinsicAnimationsAllowed,
+                       bool                                                  bDisableAnimationZOrder ) :
+@@ -376,6 +379,7 @@
+     maAnimations( maContext,
+                   getSlideSizeImpl() ),
+     maUserPaintColor(aUserPaintColor),
++    mdUserPaintStrokeWidth(dUserPaintStrokeWidth),
+     mpPaintOverlay(),
+     maSlideBitmaps(),
+     meAnimationState( CONSTRUCTING_STATE ),
+@@ -863,7 +867,7 @@
+ {
+     if( mbUserPaintOverlayEnabled )
+         mpPaintOverlay = UserPaintOverlay::create( maUserPaintColor,
+-                                                   2.0,
++                                                   mdUserPaintStrokeWidth,
+                                                    maContext );
+ }
+ 
+@@ -1188,6 +1192,7 @@
+                             const ShapeEventListenerMap&                        rShapeListenerMap,
+                             const ShapeCursorMap&                               rShapeCursorMap,
+                             RGBColor const&                                     rUserPaintColor,
++			    double						dUserPaintStrokeWidth,
+                             bool                                                bUserPaintEnabled,
+                             bool                                                bIntrinsicAnimationsAllowed,
+                             bool                                                bDisableAnimationZOrder )
+@@ -1198,7 +1203,7 @@
+                                                       rCursorManager, rViewContainer,
+                                                       xComponentContext, rShapeListenerMap,
+                                                       rShapeCursorMap, rUserPaintColor,
+-                                                      bUserPaintEnabled, 
++                                                      dUserPaintStrokeWidth, bUserPaintEnabled, 
+                                                       bIntrinsicAnimationsAllowed,
+                                                       bDisableAnimationZOrder ));
+ 
+
+Modified: slideshow/source/engine/slide/userpaintoverlay.cxx
+==============================================================================
+--- slideshow/source/engine/slide/userpaintoverlay.cxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ slideshow/source/engine/slide/userpaintoverlay.cxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -63,7 +63,8 @@
+     namespace internal
+     {
+         class PaintOverlayHandler : public MouseEventHandler,
+-                                    public ViewEventHandler
++                                    public ViewEventHandler,
++				    public UserPaintEventHandler
+         {
+         public:
+             PaintOverlayHandler( const RGBColor&         rStrokeColor,
+@@ -208,6 +209,7 @@
+                         if( pPolyPoly )
+                         {
+                             pPolyPoly->setRGBALineColor( maStrokeColor.getIntegerColor() );
++ 			    pPolyPoly->setStrokeWidth(mnStrokeWidth);
+                             pPolyPoly->draw();
+                         }
+                     }
+@@ -226,6 +228,24 @@
+                 return false; // did not handle the event
+             }
+ 
++
++            bool colorChanged( RGBColor const& rUserColor ){
++            	this->maStrokeColor = rUserColor;
++            	return true;
++            }
++
++	   bool widthChanged( double nUserStrokeWidth ){
++            	this->mnStrokeWidth = nUserStrokeWidth;
++            	return true;
++            }
++
++            bool disable(){
++               	//this->maStrokeColor = *(new RGBColor(255,255,255));
++		//this->mnStrokeWidth = 4.0;
++               	return true;
++            }
++
++
+         private:
+             ActivitiesQueue&        mrActivitiesQueue;
+             ScreenUpdater&          mrScreenUpdater;
+@@ -262,6 +282,7 @@
+             mrMultiplexer.addClickHandler( mpHandler, 3.0 );
+             mrMultiplexer.addMouseMoveHandler( mpHandler, 3.0 );
+             mrMultiplexer.addViewHandler( mpHandler );
++	    mrMultiplexer.addUserPaintHandler(mpHandler);
+         }
+         
+         UserPaintOverlay::~UserPaintOverlay()
+
+Modified: slideshow/source/engine/slideshowimpl.cxx
+==============================================================================
+--- slideshow/source/engine/slideshowimpl.cxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ slideshow/source/engine/slideshowimpl.cxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -332,6 +332,8 @@
+     
+     boost::optional<RGBColor>               maUserPaintColor;
+ 
++    boost::optional<double>               maUserPaintStrokeWidth;
++
+     boost::shared_ptr<canvas::tools::ElapsedTime> mpPresTimer;
+     ScreenUpdater                           maScreenUpdater;
+     EventQueue                              maEventQueue;
+@@ -444,6 +446,7 @@
+       maShapeEventListeners(),
+       maShapeCursors(),
+       maUserPaintColor(),
++      maUserPaintStrokeWidth(4.0),
+       mpPresTimer( new canvas::tools::ElapsedTime ),
+       maScreenUpdater(maViewContainer),
+       maEventQueue( mpPresTimer ),
+@@ -767,6 +770,7 @@
+                                              maShapeEventListeners,
+                                              maShapeCursors,
+                                              maUserPaintColor ? *maUserPaintColor : RGBColor(),
++					     *maUserPaintStrokeWidth,
+                                              !!maUserPaintColor,
+                                              mbImageAnimationsAllowed,
+                                              mbDisableAnimationZOrder) );
+@@ -1173,6 +1177,34 @@
+ 
+         return true;
+     }
++
++     // new Property for pen's width 
++     if (rProperty.Name.equalsAsciiL(
++            RTL_CONSTASCII_STRINGPARAM("UserPaintStrokeWidth") ))
++    {
++        double nWidth(4.0);
++        if (rProperty.Value >>= nWidth) 
++        {
++            OSL_ENSURE( mbMouseVisible,
++                        "setProperty(): User paint overrides invisible mouse" );
++
++            // enable user paint stroke width
++            maUserPaintStrokeWidth.reset( nWidth );
++            maEventMultiplexer.notifyUserPaintStrokeWidth( *maUserPaintStrokeWidth );
++        }
++        else 
++        {
++            // disable user paint stroke width
++            maUserPaintStrokeWidth.reset();
++            maEventMultiplexer.notifyUserPaintDisabled();
++        }
++
++        if( mnCurrentCursor == awt::SystemPointer::ARROW )
++            resetCursor();
++
++        return true;
++    }	
++
+     
+     if (rProperty.Name.equalsAsciiL(
+             RTL_CONSTASCII_STRINGPARAM("AdvanceOnClick") )) 
+
+Modified: slideshow/source/inc/eventmultiplexer.hxx
+==============================================================================
+--- slideshow/source/inc/eventmultiplexer.hxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ slideshow/source/inc/eventmultiplexer.hxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -486,6 +486,17 @@
+     */
+     bool notifyUserPaintColor( RGBColor const& rUserColor );
+ 
++    /** Notify a new user paint width
++        
++        Sending this notification also implies that user paint is
++        enabled. .
++
++        @return true, if this event was processed by
++        anybody. If false is returned, no handler processed
++        this event (and probably, nothing will happen at all)
++    */
++    bool notifyUserPaintStrokeWidth( double rUserStrokeWidth );
++
+     /** Notify that user paint is disabled
+         
+         User paint denotes the feature to draw colored lines on top of
+
+Modified: slideshow/source/inc/slide.hxx
+==============================================================================
+--- slideshow/source/inc/slide.hxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ slideshow/source/inc/slide.hxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -198,6 +198,7 @@
+                                     const ShapeEventListenerMap&                       rShapeListenerMap,
+                                     const ShapeCursorMap&                              rShapeCursorMap,
+                                     RGBColor const&                                    aUserPaintColor,
++ 				    double                                             dUserPaintStrokeWidth,
+                                     bool                                               bUserPaintEnabled,
+                                     bool                                               bIntrinsicAnimationsAllowed,
+                                     bool                                               bDisableAnimationZOrder );
+
+Modified: slideshow/source/inc/userpainteventhandler.hxx
+==============================================================================
+--- slideshow/source/inc/userpainteventhandler.hxx	Sat Jan 31 09:53:18 2009	(r267232)
++++ slideshow/source/inc/userpainteventhandler.hxx	Sat Jan 31 14:05:38 2009	(r267233)
+@@ -53,6 +53,7 @@
+             virtual ~UserPaintEventHandler() {}
+ 
+             virtual bool colorChanged( RGBColor const& rUserColor ) = 0;
++	    virtual bool widthChanged( double nUserStrokeWidth ) = 0;
+             virtual bool disable() = 0;
+         };
+ 
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]