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



Author: jiaojh
Date: Tue May 20 10:25:16 2008
New Revision: 12606
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12606&view=rev

Log:
    * patches/dev300/form-control-visibility.diff:
      update with sun guy's suggestion.


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/form-control-visibility.diff

Modified: trunk/patches/dev300/form-control-visibility.diff
==============================================================================
--- trunk/patches/dev300/form-control-visibility.diff	(original)
+++ trunk/patches/dev300/form-control-visibility.diff	Tue May 20 10:25:16 2008
@@ -1,15 +1,15 @@
 --- xmloff/source/forms/strings.hxx.orig	2008-05-05 18:14:36.000000000 +0800
-+++ xmloff/source/forms/strings.hxx	2008-05-05 18:15:32.000000000 +0800
++++ xmloff/source/forms/strings.hxx	2008-05-05 18:20:40.000000000 +0800
 @@ -114,6 +114,7 @@ namespace xmloff
  	XMLFORM_CONSTASCII_STRING( PROPERTY_TABSTOP,			"Tabstop" );
  	XMLFORM_CONSTASCII_STRING( PROPERTY_STATE,				"State" );
  	XMLFORM_CONSTASCII_STRING( PROPERTY_ENABLED,			"Enabled" );
-+	XMLFORM_CONSTASCII_STRING( PROPERTY_VISIBLE,			"Visible" );
++	XMLFORM_CONSTASCII_STRING( PROPERTY_VISIBLE,			"EnableVisible" );
  	XMLFORM_CONSTASCII_STRING( PROPERTY_MAXTEXTLENGTH,		"MaxTextLen" );
  	XMLFORM_CONSTASCII_STRING( PROPERTY_LINECOUNT,			"LineCount" );
  	XMLFORM_CONSTASCII_STRING( PROPERTY_TABINDEX,			"TabIndex" );
 --- xmloff/source/forms/formattributes.hxx.orig	2008-05-05 18:14:36.000000000 +0800
-+++ xmloff/source/forms/formattributes.hxx	2008-05-05 18:15:32.000000000 +0800
++++ xmloff/source/forms/formattributes.hxx	2008-05-05 18:20:40.000000000 +0800
 @@ -69,6 +69,7 @@ namespace xmloff
  	#define CCA_VALUE					0x00200000
      #define CCA_ORIENTATION             0x00400000
@@ -19,7 +19,7 @@
  	// flags for database control atttributes
  	#define DA_BOUND_COLUMN				0x00000001
 --- xmloff/source/forms/formattributes.cxx.orig	2008-05-05 18:14:37.000000000 +0800
-+++ xmloff/source/forms/formattributes.cxx	2008-05-05 18:15:32.000000000 +0800
++++ xmloff/source/forms/formattributes.cxx	2008-05-05 18:20:40.000000000 +0800
 @@ -60,6 +60,7 @@ namespace xmloff
  			case CCA_CURRENT_SELECTED: 	return "current-selected";
  			case CCA_CURRENT_VALUE: 	return "current-value";
@@ -29,7 +29,7 @@
  			case CCA_FOR: 				return "for";
  			case CCA_IMAGE_DATA: 		return "image-data";
 --- xmloff/source/forms/elementexport.cxx.orig	2008-05-05 18:14:37.000000000 +0800
-+++ xmloff/source/forms/elementexport.cxx	2008-05-05 18:15:32.000000000 +0800
++++ xmloff/source/forms/elementexport.cxx	2008-05-05 18:20:40.000000000 +0800
 @@ -523,15 +523,15 @@ namespace xmloff
  		{
  			static sal_Int32 nBooleanPropertyAttributeIds[] =
@@ -49,8 +49,18 @@
  			};
  		#if OSL_DEBUG_LEVEL > 0
  			sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]);
+--- toolkit/inc/toolkit/awt/vclxwindow.hxx.orig	2008-05-09 15:00:12.000000000 +0800
++++ toolkit/inc/toolkit/awt/vclxwindow.hxx	2008-05-09 15:01:22.000000000 +0800
+@@ -112,6 +112,7 @@ private:
+ 	sal_Bool						mbSynthesizingVCLEvent : 1;
+     sal_Bool                        mbWithDefaultProps : 1;
+ 	sal_Bool						mbDrawingOntoParent;
++	sal_Bool						mbDirectVisible;
+ 
+     UnoPropertyArrayHelper *GetPropHelper();
+ 	
 --- toolkit/inc/toolkit/helper/property.hxx.orig	2008-05-05 18:14:37.000000000 +0800
-+++ toolkit/inc/toolkit/helper/property.hxx	2008-05-05 18:15:32.000000000 +0800
++++ toolkit/inc/toolkit/helper/property.hxx	2008-05-05 18:20:40.000000000 +0800
 @@ -191,6 +191,7 @@ namespace rtl {
  #define BASEPROPERTY_DIALOGSOURCEURL				132
  #define BASEPROPERTY_NOLABEL               133   // ::rtl::OUString  added for issue79712
@@ -60,20 +70,73 @@
  // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
  #define BASEPROPERTY_FONTDESCRIPTORPART_START			1000
 --- toolkit/source/helper/property.cxx.orig	2008-05-05 18:14:37.000000000 +0800
-+++ toolkit/source/helper/property.cxx	2008-05-05 18:15:32.000000000 +0800
++++ toolkit/source/helper/property.cxx	2008-05-05 18:20:40.000000000 +0800
 @@ -269,7 +269,8 @@ ImplPropertyInfo* ImplGetPropertyInfos( 
  			DECL_PROP_3		( "RowHeight",				TREE_ROWHEIGHT,			sal_Int32,			BOUND, MAYBEDEFAULT, MAYBEVOID ),
  			DECL_PROP_2		( "InvokesStopNodeEditing",	TREE_INVOKESSTOPNODEEDITING, sal_Bool,		BOUND, MAYBEDEFAULT ),
              DECL_PROP_2     ( "DialogSourceURL",        DIALOGSOURCEURL,        ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
 -            DECL_PROP_2     ( "URL",                    URL,                    ::rtl::OUString,    BOUND, MAYBEDEFAULT )
 +            DECL_PROP_2     ( "URL",                    URL,                    ::rtl::OUString,    BOUND, MAYBEDEFAULT ),
-+            DECL_PROP_2     ( "Visible",                VISIBLE,                bool,    BOUND, MAYBEDEFAULT )
++            DECL_PROP_2     ( "EnableVisible",                VISIBLE,                bool,    BOUND, MAYBEDEFAULT )
              };
  			pPropertyInfos = aImplPropertyInfos;
  			nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo );
 --- toolkit/source/awt/vclxwindow.cxx.orig	2008-05-05 11:01:12.000000000 +0800
-+++ toolkit/source/awt/vclxwindow.cxx	2008-05-05 18:15:32.000000000 +0800
-@@ -1542,6 +1542,8 @@ void VCLXWindow::ImplGetPropertyIds( std
++++ toolkit/source/awt/vclxwindow.cxx	2008-05-20 18:34:59.000000000 +0800
+@@ -208,6 +208,7 @@ private:
+     ::vos::IMutex&                      mrMutex;
+     ::toolkit::AccessibilityClient      maAccFactory;
+     bool                                mbDisposed;
++    bool                                mbEnableVisible;
+     ::osl::Mutex                        maListenerContainerMutex;
+     ::cppu::OInterfaceContainerHelper   maWindow2Listeners;
+ 
+@@ -229,6 +230,11 @@ public:
+     */
+     VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex );
+ 
++    /** synchronously mbEnableVisible
++    */
++    void    setEnableVisible( bool bEnableVisible ) { mbEnableVisible = bEnableVisible; }
++    bool    isEnableVisible() { return mbEnableVisible; }
++
+     /** asynchronously notifies a mouse event to the VCLXWindow's XMouseListeners
+     */
+     void    notifyMouseEvent( const awt::MouseEvent& _rMouseEvent, MouseEventType _nType );
+@@ -299,6 +305,7 @@ VCLXWindowImpl::VCLXWindowImpl( VCLXWind
+     ,mrAntiImpl( _rAntiImpl )
+     ,mrMutex( _rMutex )
+     ,mbDisposed( false )
++    ,mbEnableVisible(true)
+     ,maListenerContainerMutex( )
+     ,maWindow2Listeners( maListenerContainerMutex )
+ #ifdef THREADED_NOTIFICATION
+@@ -560,7 +567,8 @@ VCLXWindow::VCLXWindow( bool bWithDefaul
+       mbDesignMode( false ),
+       mbSynthesizingVCLEvent( false ),
+       mbWithDefaultProps( !!bWithDefaultProps ),
+-      mbDrawingOntoParent( false )
++      mbDrawingOntoParent( false ),
++      mbDirectVisible( true )
+ {
+ 	DBG_CTOR( VCLXWindow, 0 );
+ 
+@@ -1225,7 +1233,13 @@ void VCLXWindow::setVisible( sal_Bool bV
+ 			}
+ 		}
+ */
+-		pWindow->Show( bVisible );
++        if( mpImpl->isEnableVisible() )
++        {
++            mbDirectVisible = bVisible;
++		    pWindow->Show( bVisible );
++        }
++        else
++            pWindow->Show( sal_False );
+ 	}
+ }
+ 
+@@ -1542,6 +1556,8 @@ void VCLXWindow::ImplGetPropertyIds( std
                           BASEPROPERTY_TABSTOP,
                           0);
  
@@ -82,7 +145,7 @@
      // lovely hack from:
      // void UnoControlModel::ImplRegisterProperty( sal_uInt16 nPropId )
      std::list< sal_uInt16 >::const_iterator iter;
-@@ -1612,6 +1614,13 @@ void VCLXWindow::setProperty( const ::rt
+@@ -1612,6 +1628,23 @@ void VCLXWindow::setProperty( const ::rt
  					setEnable( b );
  			}
  			break;
@@ -90,13 +153,23 @@
 +            {
 +                sal_Bool b = sal_Bool();
 +                if ( Value >>= b )
-+                    setVisible( b );
++                {
++                    if( b != mpImpl->isEnableVisible() )
++                    {
++                        mpImpl->setEnableVisible( b );
++                        // if mbEnableVisible change from false to true.
++                        // it will ignore the mbDirectVisible, setVisilbe
++                        // and set mbDirectVisible as true.
++                        if( mbDirectVisible || b )
++                            setVisible( b );
++                    }
++                }
 +            }
 +            break;
  			case BASEPROPERTY_TEXT:
  			case BASEPROPERTY_LABEL:
  			case BASEPROPERTY_TITLE:
-@@ -2070,6 +2079,10 @@ void VCLXWindow::setProperty( const ::rt
+@@ -2070,6 +2103,10 @@ void VCLXWindow::setProperty( const ::rt
  				aProp <<= (sal_Bool) GetWindow()->IsEnabled();
  			    break;
  
@@ -107,8 +180,18 @@
  			case BASEPROPERTY_TEXT:
  			case BASEPROPERTY_LABEL:
  			case BASEPROPERTY_TITLE:
+@@ -2444,7 +2481,8 @@ void VCLXWindow::draw( sal_Int32 nX, sal
+ 				BOOL bOldNW =pWindow->IsNativeWidgetEnabled();
+ 				if( bOldNW )
+ 					pWindow->EnableNativeWidget(FALSE);
+-                pWindow->PaintToDevice( pDev, aP, aSz );
++                if( mpImpl->isEnableVisible() )
++                    pWindow->PaintToDevice( pDev, aP, aSz );
+ 				if( bOldNW )
+ 					pWindow->EnableNativeWidget(TRUE);
+             }
 --- toolkit/source/controls/unocontrolmodel.cxx.orig	2008-05-05 18:14:37.000000000 +0800
-+++ toolkit/source/controls/unocontrolmodel.cxx	2008-05-05 18:15:32.000000000 +0800
++++ toolkit/source/controls/unocontrolmodel.cxx	2008-05-05 18:20:40.000000000 +0800
 @@ -338,6 +338,7 @@ void UnoControlModel::ImplPropertyChange
              case BASEPROPERTY_SCALEIMAGE:
              case BASEPROPERTY_ENABLED:
@@ -118,7 +201,7 @@
  
              case BASEPROPERTY_HELPTEXT:
 --- toolkit/source/controls/unocontrol.cxx.orig	2008-05-05 18:14:37.000000000 +0800
-+++ toolkit/source/controls/unocontrol.cxx	2008-05-05 18:15:32.000000000 +0800
++++ toolkit/source/controls/unocontrol.cxx	2008-05-09 17:50:30.000000000 +0800
 @@ -1286,6 +1286,19 @@ void UnoControl::createPeer( const Refer
  		}
  		//issue79712 ends
@@ -140,7 +223,7 @@
  		aPropName = GetPropertyName( BASEPROPERTY_ALIGN );
  		if ( xInfo->hasPropertyByName( aPropName ) )
 --- sc/source/filter/inc/xlescher.hxx.orig	2008-05-05 18:14:37.000000000 +0800
-+++ sc/source/filter/inc/xlescher.hxx	2008-05-05 18:15:32.000000000 +0800
++++ sc/source/filter/inc/xlescher.hxx	2008-05-05 18:20:40.000000000 +0800
 @@ -96,6 +96,7 @@ const sal_uInt16 EXC_OBJ_CMO_UNKNOWN    
  
  // ftCmo: flags
@@ -150,7 +233,7 @@
  // ftPioGrbit: flags
  const sal_uInt16 EXC_OBJ_PIO_MANUALSIZE     = 0x0001;
 --- sc/source/filter/inc/xiescher.hxx.orig	2008-05-05 11:01:01.000000000 +0800
-+++ sc/source/filter/inc/xiescher.hxx	2008-05-05 18:17:45.000000000 +0800
++++ sc/source/filter/inc/xiescher.hxx	2008-05-05 18:20:40.000000000 +0800
 @@ -94,6 +94,7 @@ public:
      void                SetObjData( sal_uInt16 nObjType, sal_uInt16 nObjId, sal_uInt16 nObjFlags );
      /** Sets shape data from Escher stream. */
@@ -176,7 +259,7 @@
  
  // ----------------------------------------------------------------------------
 --- sc/source/filter/excel/xiescher.cxx.orig	2008-05-05 18:14:37.000000000 +0800
-+++ sc/source/filter/excel/xiescher.cxx	2008-05-05 18:15:32.000000000 +0800
++++ sc/source/filter/excel/xiescher.cxx	2008-05-05 18:20:40.000000000 +0800
 @@ -296,7 +296,8 @@ XclImpDrawObjBase::XclImpDrawObjBase( co
      mnShapeBlipId( 0 ),
      mbValid( true ),
@@ -191,7 +274,7 @@
  
      // control printable?
      aPropSet.SetBoolProperty( CREATE_OUSTRING( "Printable" ), IsPrintable() );
-+    aPropSet.SetBoolProperty( CREATE_OUSTRING( "Visible" ), IsVisible() );
++    aPropSet.SetBoolProperty( CREATE_OUSTRING( "EnableVisible" ), IsVisible() );
  
      // #118053# #i51348# set internal name of the control (use name from SdrObject, if extant)
      OUString aCtrlName = rSdrObj.GetName();



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