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



Author: jiaojh
Date: Wed Apr 30 09:39:32 2008
New Revision: 12392
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12392&view=rev

Log:
    * patches/dev300/form-control-visibility.diff:
    * patches/dev300/apply:
      form control's visibility import/export.


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

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Wed Apr 30 09:39:32 2008
@@ -443,6 +443,8 @@
 # Add a GroupName property to RadioButtons so that RadioButtons don't need to
 # share the same name to be part of the same group.
 forms-radio-button-group-names.diff, n#310052, jonp
+# import/export form control's visibility
+form-control-visibility.diff, i88878, jianhua
 # depends on forms-radio-button-group-names.diff above ( needs bug id too )
 xl-import-formradiobutton.diff, noelpwer
 

Added: trunk/patches/dev300/form-control-visibility.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/form-control-visibility.diff	Wed Apr 30 09:39:32 2008
@@ -0,0 +1,205 @@
+--- xmloff/source/forms/strings.hxx.orig	2008-04-11 06:12:05.000000000 +0800
++++ xmloff/source/forms/strings.hxx	2008-04-30 17:36:12.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_MAXTEXTLENGTH,		"MaxTextLen" );
+ 	XMLFORM_CONSTASCII_STRING( PROPERTY_LINECOUNT,			"LineCount" );
+ 	XMLFORM_CONSTASCII_STRING( PROPERTY_TABINDEX,			"TabIndex" );
+--- xmloff/source/forms/formattributes.hxx.orig	2008-04-11 06:03:59.000000000 +0800
++++ xmloff/source/forms/formattributes.hxx	2008-04-30 17:36:12.000000000 +0800
+@@ -69,6 +69,7 @@ namespace xmloff
+ 	#define CCA_VALUE					0x00200000
+     #define CCA_ORIENTATION             0x00400000
+     #define CCA_VISUAL_EFFECT           0x00800000
++    #define CCA_VISIBLE                 0x01000000
+ 
+ 	// flags for database control atttributes
+ 	#define DA_BOUND_COLUMN				0x00000001
+--- xmloff/source/forms/formattributes.cxx.orig	2008-04-11 06:03:42.000000000 +0800
++++ xmloff/source/forms/formattributes.cxx	2008-04-30 17:36:12.000000000 +0800
+@@ -60,6 +60,7 @@ namespace xmloff
+ 			case CCA_CURRENT_SELECTED: 	return "current-selected";
+ 			case CCA_CURRENT_VALUE: 	return "current-value";
+ 			case CCA_DISABLED: 			return "disabled";
++			case CCA_VISIBLE: 			return "visible";
+ 			case CCA_DROPDOWN: 			return "dropdown";
+ 			case CCA_FOR: 				return "for";
+ 			case CCA_IMAGE_DATA: 		return "image-data";
+--- xmloff/source/forms/elementexport.cxx.orig	2008-04-11 06:00:18.000000000 +0800
++++ xmloff/source/forms/elementexport.cxx	2008-04-30 17:36:12.000000000 +0800
+@@ -523,15 +523,15 @@ namespace xmloff
+ 		{
+ 			static sal_Int32 nBooleanPropertyAttributeIds[] =
+ 			{	// attribute flags
+-				CCA_CURRENT_SELECTED, CCA_DISABLED, CCA_DROPDOWN, CCA_PRINTABLE, CCA_READONLY, CCA_SELECTED, CCA_TAB_STOP
++				CCA_CURRENT_SELECTED, CCA_DISABLED, CCA_DROPDOWN, CCA_PRINTABLE, CCA_READONLY, CCA_SELECTED, CCA_TAB_STOP, CCA_VISIBLE
+ 			};
+ 			static const ::rtl::OUString* pBooleanPropertyNames[] =
+ 			{	// property names
+-				&PROPERTY_STATE, &PROPERTY_ENABLED, &PROPERTY_DROPDOWN, &PROPERTY_PRINTABLE, &PROPERTY_READONLY, &PROPERTY_DEFAULT_STATE, &PROPERTY_TABSTOP
++				&PROPERTY_STATE, &PROPERTY_ENABLED, &PROPERTY_DROPDOWN, &PROPERTY_PRINTABLE, &PROPERTY_READONLY, &PROPERTY_DEFAULT_STATE, &PROPERTY_TABSTOP, &PROPERTY_VISIBLE
+ 			};
+ 			static sal_Bool nBooleanPropertyAttrFlags[] =
+ 			{	// attribute defaults
+-				BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_FALSE | BOOLATTR_INVERSE_SEMANTICS, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_VOID
++				BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_FALSE | BOOLATTR_INVERSE_SEMANTICS, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_VOID, BOOLATTR_DEFAULT_FALSE
+ 			};
+ 		#if OSL_DEBUG_LEVEL > 0
+ 			sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]);
+--- toolkit/inc/toolkit/helper/property.hxx.orig	2008-04-11 17:05:01.000000000 +0800
++++ toolkit/inc/toolkit/helper/property.hxx	2008-04-30 17:36:12.000000000 +0800
+@@ -191,6 +191,7 @@ namespace rtl {
+ #define BASEPROPERTY_DIALOGSOURCEURL				132
+ #define BASEPROPERTY_NOLABEL               133   // ::rtl::OUString  added for issue79712
+ #define BASEPROPERTY_URL                   134  // ::rtl::OUString
++#define BASEPROPERTY_VISIBLE               135  // sal_Bool
+ 
+ // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
+ #define BASEPROPERTY_FONTDESCRIPTORPART_START			1000
+--- toolkit/source/helper/property.cxx.orig	2008-04-11 17:36:59.000000000 +0800
++++ toolkit/source/helper/property.cxx	2008-04-30 17:36:12.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 )
+             };
+ 			pPropertyInfos = aImplPropertyInfos;
+ 			nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo );
+--- toolkit/source/awt/vclxwindow.cxx.orig	2008-04-11 17:22:21.000000000 +0800
++++ toolkit/source/awt/vclxwindow.cxx	2008-04-30 17:36:12.000000000 +0800
+@@ -1539,6 +1539,8 @@ void VCLXWindow::ImplGetPropertyIds( std
+                          BASEPROPERTY_TABSTOP,
+                          0);
+ 
++    // for visibility
++    rIds.push_back( BASEPROPERTY_VISIBLE );
+     // lovely hack from:
+     // void UnoControlModel::ImplRegisterProperty( sal_uInt16 nPropId )
+     std::list< sal_uInt16 >::const_iterator iter;
+@@ -1609,6 +1611,13 @@ void VCLXWindow::setProperty( const ::rt
+ 					setEnable( b );
+ 			}
+ 			break;
++            case BASEPROPERTY_VISIBLE:
++            {
++                sal_Bool b = sal_Bool();
++                if ( ( Value >>= b ) && !b )
++                    setVisible( b );
++            }
++            break;
+ 			case BASEPROPERTY_TEXT:
+ 			case BASEPROPERTY_LABEL:
+ 			case BASEPROPERTY_TITLE:
+@@ -2067,6 +2076,10 @@ void VCLXWindow::setProperty( const ::rt
+ 				aProp <<= (sal_Bool) GetWindow()->IsEnabled();
+ 			    break;
+ 
++			case BASEPROPERTY_VISIBLE:
++				aProp <<= (sal_Bool) GetWindow()->IsVisible();
++			    break;
++
+ 			case BASEPROPERTY_TEXT:
+ 			case BASEPROPERTY_LABEL:
+ 			case BASEPROPERTY_TITLE:
+--- toolkit/source/controls/unocontrolmodel.cxx.orig	2008-04-11 17:32:33.000000000 +0800
++++ toolkit/source/controls/unocontrolmodel.cxx	2008-04-30 17:36:12.000000000 +0800
+@@ -338,6 +338,7 @@ void UnoControlModel::ImplPropertyChange
+             case BASEPROPERTY_SCALEIMAGE:
+             case BASEPROPERTY_ENABLED:
+             case BASEPROPERTY_PRINTABLE:
++            case BASEPROPERTY_VISIBLE:
+             case BASEPROPERTY_DECORATION:           aDefault <<= (sal_Bool) sal_True; break;
+ 
+             case BASEPROPERTY_HELPTEXT:
+--- toolkit/source/controls/unocontrol.cxx.orig	2008-04-11 17:29:19.000000000 +0800
++++ toolkit/source/controls/unocontrol.cxx	2008-04-30 17:36:12.000000000 +0800
+@@ -1286,6 +1286,19 @@ void UnoControl::createPeer( const Refer
+ 		}
+ 		//issue79712 ends
+ 		
++		// Visible
++		aPropName = GetPropertyName( BASEPROPERTY_VISIBLE );
++		if ( xInfo->hasPropertyByName( aPropName ) )
++		{
++			aVal = xPSet->getPropertyValue( aPropName );
++			sal_Bool b = sal_Bool();
++			if ( ( aVal >>=b ) && !b )
++            {
++                aDescr.WindowAttributes ^= awt::WindowAttribute::SHOW;
++                maComponentInfos.bVisible = b;
++            }
++		}
++
+ 		// Align
+ 		aPropName = GetPropertyName( BASEPROPERTY_ALIGN );
+ 		if ( xInfo->hasPropertyByName( aPropName ) )
+--- sc/source/filter/inc/xlescher.hxx.orig	2008-04-30 11:16:54.000000000 +0800
++++ sc/source/filter/inc/xlescher.hxx	2008-04-30 17:36:12.000000000 +0800
+@@ -96,6 +96,7 @@ const sal_uInt16 EXC_OBJ_CMO_UNKNOWN    
+ 
+ // ftCmo: flags
+ const sal_uInt16 EXC_OBJ_CMO_PRINTABLE      = 0x0010;   /// Object printable
++const sal_uInt16 EXC_OBJ_CMO_VISIBLE        = 0x0002;   /// Object visible
+ 
+ // ftPioGrbit: flags
+ const sal_uInt16 EXC_OBJ_PIO_MANUALSIZE     = 0x0001;
+--- sc/source/filter/inc/xiescher.hxx.orig	2008-04-30 11:16:52.000000000 +0800
++++ sc/source/filter/inc/xiescher.hxx	2008-04-30 17:36:12.000000000 +0800
+@@ -104,6 +104,7 @@ public:
+     /** If set, the SdrObject will be created or processed, but not be inserted into the draw page. */
+     inline void         SetSkipInsertSdr() { mbInsSdr = false; }
+     inline void         SetObjectName( const String sName ) { maObjectName = sName; }
++    inline void         SetVisible( const sal_uInt32 nObjVisible ) { mnObjVisible = nObjVisible; }
+ 
+     /** Returns the Calc sheet index of this object. */
+     inline SCTAB        GetScTab() const { return maObjId.mnScTab; }
+@@ -128,6 +129,7 @@ public:
+     inline bool         IsInsertSdr() const { return mbInsSdr; }
+     /** Returns true, if Escher object is printable. */
+     inline bool         IsPrintable() const { return ::get_flag( mnObjFlags, EXC_OBJ_CMO_PRINTABLE ); }
++    inline bool         IsVisible() const { return !::get_flag( mnObjVisible, (sal_uInt32)EXC_OBJ_CMO_VISIBLE ); }
+ 
+     /** Returns true, if the passed size is valid for this object. */
+     bool                IsValidSize( const Rectangle& rAnchorRect ) const;
+@@ -165,6 +167,7 @@ private:
+     bool                mbValid;        /// true = Object is valid, do processing and insertion.
+     bool                mbAreaObj;      /// true = Width and height must be greater than 0.
+     bool                mbInsSdr;       /// true = Insert the SdrObject into draw page.
++    sal_uInt32          mnObjVisible;   /// falgs for visibility
+ };
+ 
+ // ----------------------------------------------------------------------------
+--- sc/source/filter/excel/xiescher.cxx.orig	2008-04-30 11:16:54.000000000 +0800
++++ sc/source/filter/excel/xiescher.cxx	2008-04-30 17:36:12.000000000 +0800
+@@ -296,7 +296,8 @@ XclImpDrawObjBase::XclImpDrawObjBase( co
+     mnShapeBlipId( 0 ),
+     mbValid( true ),
+     mbAreaObj( false ),
+-    mbInsSdr( true )
++    mbInsSdr( true ),
++    mnObjVisible( 0 )
+ {
+ }
+ 
+@@ -820,6 +821,7 @@ void XclImpTbxControlObj::DoProcessSdrOb
+ 
+     // control printable?
+     aPropSet.SetBoolProperty( CREATE_OUSTRING( "Printable" ), IsPrintable() );
++    aPropSet.SetBoolProperty( CREATE_OUSTRING( "Visible" ), IsVisible() );
+ 
+     // #118053# #i51348# set internal name of the control (use name from SdrObject, if extant)
+     OUString aCtrlName = rSdrObj.GetName();
+@@ -1587,6 +1589,7 @@ SdrObject* XclImpDffManager::ProcessObj(
+ 
+     // set shape information from Escher stream
+     xDrawObj->SetShapeData( rObjData.nShapeId, rObjData.nSpFlags, GetPropertyValue( DFF_Prop_pib ) );
++    xDrawObj->SetVisible( GetPropertyValue( DFF_Prop_fPrint ) );
+ 
+     /*  Connect textbox data (string, alignment, text orientation) to object.
+         #98132# don't ask for a text-ID, Escher export doesn't set one. */



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