ooo-build r12063 - in trunk: . patches/src680 patches/test/vba



Author: noelpwer
Date: Mon Mar 31 16:28:38 2008
New Revision: 12063
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12063&view=rev

Log:
2008-03-31  Noel Power<noel power novell com>

        * patches/src680/apply:
        * patches/src680/xl-import-formradiobutton.diff: support for
        * import of formcontrol radio button ( and application of 'GroupName'
property )
        * patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff: 
        snapshot of userform work



Added:
   trunk/patches/src680/xl-import-formradiobutton.diff
Modified:
   trunk/ChangeLog
   trunk/patches/src680/apply
   trunk/patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff

Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply	(original)
+++ trunk/patches/src680/apply	Mon Mar 31 16:28:38 2008
@@ -467,7 +467,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
-
+# depends on forms-radio-button-group-names.diff above ( needs bug id too )
+xl-import-formradiobutton.diff, noelpwer
 [ SELinux ]
 # make OOo work under SELinux
 ooo80816.selinux.bridges.diff, i#80816
@@ -1430,7 +1431,6 @@
 vba-interior.diff, n#365557, Jianhua
 vba-stringtodouble.diff, n#359943, noelpwer
 
-
 [ VBAUntested ]
 SectionOwner => noelpwer
 # start LCL hacks

Added: trunk/patches/src680/xl-import-formradiobutton.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/xl-import-formradiobutton.diff	Mon Mar 31 16:28:38 2008
@@ -0,0 +1,327 @@
+Index: sc/source/filter/excel/xiescher.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/excel/xiescher.cxx,v
+retrieving revision 1.54
+diff -u -p -r1.54 xiescher.cxx
+--- sc/source/filter/excel/xiescher.cxx	6 Jul 2007 12:37:20 -0000	1.54
++++ sc/source/filter/excel/xiescher.cxx	20 Feb 2008 17:21:49 -0000
+@@ -221,6 +221,7 @@
+ #include "xicontent.hxx"
+ #endif
+ 
++#include "xlescher.hxx"
+ using ::rtl::OUString;
+ using ::rtl::OUStringBuffer;
+ using ::com::sun::star::uno::Reference;
+@@ -424,7 +425,7 @@ XclImpDrawObjBase::~XclImpDrawObjBase()
+ {
+ }
+ 
+-XclImpDrawObjRef XclImpDrawObjBase::ReadObjCmo( XclImpStream& rStrm )
++XclImpDrawObjRef XclImpDrawObjBase::ReadObjCmo( XclImpObjectManager& rObjMgr, XclImpStream& rStrm )
+ {
+     XclImpDrawObjRef xDrawObj;
+ 
+@@ -457,7 +458,7 @@ XclImpDrawObjRef XclImpDrawObjBase::Read
+         case EXC_OBJ_CMO_COMBOBOX:
+         case EXC_OBJ_CMO_SPIN:
+         case EXC_OBJ_CMO_SCROLLBAR:
+-            xDrawObj.reset( new XclImpTbxControlObj( rStrm.GetRoot() ) );
++            xDrawObj.reset( new XclImpTbxControlObj( rObjMgr, rStrm.GetRoot() ) );
+         break;
+         case EXC_OBJ_CMO_PICTURE:
+             xDrawObj.reset( new XclImpOleObj( rStrm.GetRoot() ) );
+@@ -739,23 +740,31 @@ ScfPropertySet XclImpControlObjHelper::G
+     return ScfPropertySet( mxCtrlModel );
+ }
+ 
+-void XclImpControlObjHelper::ConvertSheetLinks( const XclImpRoot& rRoot, SdrObject& /* rSdrObj */ ) const
++// get service factory from Calc document
++Reference< XMultiServiceFactory > lclGetFactoryFromRoot( const XclImpRoot& rRoot )
+ {
+     // get service factory from Calc document
+     Reference< XMultiServiceFactory > xFactory;
+     if( SfxObjectShell* pDocShell = rRoot.GetDocShell() )
+         xFactory.set( pDocShell->GetModel(), UNO_QUERY );
++    return xFactory;
++}
++
++void XclImpControlObjHelper::ConvertSheetLinks( const XclImpRoot& rRoot, const ScfRef< ScAddress >& rxCellLink ) const
++{
++    Reference< XMultiServiceFactory > xFactory = lclGetFactoryFromRoot( rRoot );
++
+     if( !mxCtrlModel.is() || !xFactory.is() )
+         return;
+ 
+     // *** cell link *** ------------------------------------------------------
+ 
+     Reference< XBindableValue > xBindable( mxCtrlModel, UNO_QUERY );
+-    if( mxCellLink.is() && xBindable.is() )
++    if( rxCellLink.is() && xBindable.is() )
+     {
+         // create argument sequence for createInstanceWithArguments()
+         CellAddress aApiAddress;
+-        ScUnoConversion::FillApiAddress( aApiAddress, *mxCellLink );
++        ScUnoConversion::FillApiAddress( aApiAddress, *rxCellLink );
+ 
+         NamedValue aValue;
+         aValue.Name = CREATE_OUSTRING( SC_UNONAME_BOUNDCELL );
+@@ -792,14 +801,24 @@ void XclImpControlObjHelper::ConvertShee
+             xBindable->setValueBinding( xBinding );
+     }
+ 
++
++}
++
++void XclImpControlObjHelper::ConvertSheetLinks( const XclImpRoot& rRoot, const ScfRef< ScRange >& rxSrcRange ) const
++{
++    Reference< XMultiServiceFactory > xFactory = lclGetFactoryFromRoot( rRoot );
++
++    if( !mxCtrlModel.is() || !xFactory.is() )
++        return;
++
+     // *** source range *** ---------------------------------------------------
+ 
+     Reference< XListEntrySink > xEntrySink( mxCtrlModel, UNO_QUERY );
+-    if( mxSrcRange.is() && xEntrySink.is() )
++    if( rxSrcRange.is() && xEntrySink.is() )
+     {
+         // create argument sequence for createInstanceWithArguments()
+         CellRangeAddress aApiRange;
+-        ScUnoConversion::FillApiRange( aApiRange, *mxSrcRange );
++        ScUnoConversion::FillApiRange( aApiRange, *rxSrcRange );
+ 
+         NamedValue aValue;
+         aValue.Name = CREATE_OUSTRING( SC_UNONAME_CELLRANGE );
+@@ -824,13 +843,27 @@ void XclImpControlObjHelper::ConvertShee
+         if( xEntrySource.is() )
+             xEntrySink->setListEntrySource( xEntrySource );
+     }
++
++}
++
++void XclImpControlObjHelper::ConvertSheetLinks( const XclImpRoot& rRoot, SdrObject& /* rSdrObj */ ) const
++{
++    // *** cell link *** ------------------------------------------------------
++
++    ConvertSheetLinks( rRoot, mxCellLink );
++
++    // *** source range *** ---------------------------------------------------
++
++    ConvertSheetLinks( rRoot, mxSrcRange );
+ }
+ 
+ // ----------------------------------------------------------------------------
+ 
+-XclImpTbxControlObj::XclImpTbxControlObj( const XclImpRoot& rRoot ) :
++XclImpTbxControlObj::XclImpTbxControlObj( XclImpObjectManager& rObjMgr, const XclImpRoot& rRoot ) :
+     XclImpDrawingObj( rRoot, true ),
+     XclImpControlObjHelper( EXC_CTRL_BINDPOSITION ),
++    mrObjManager( rObjMgr ),
++    mbGroupLeader( false ),
+     mnState( EXC_OBJ_CBLS_STATE_UNCHECK ),
+     mnSelEntry( 0 ),
+     mnSelType( EXC_OBJ_LBS_SEL_SIMPLE ),
+@@ -866,6 +899,9 @@ void XclImpTbxControlObj::ReadSubRecord(
+         case EXC_ID_OBJ_FTGBODATA:
+             ReadGboData( rStrm );
+         break;
++        case EXC_ID_OBJ_FTRBODATA:
++            ReadRboData( rStrm );
++        break;
+         default:
+             XclImpDrawObjBase::ReadSubRecord( rStrm, nSubRecId, nSubRecSize );
+     }
+@@ -904,7 +940,6 @@ void XclImpTbxControlObj::DoProcessSdrOb
+ 
+     namespace AwtVisualEffect = ::com::sun::star::awt::VisualEffect;
+     namespace AwtScrollOrient = ::com::sun::star::awt::ScrollBarOrientation;
+-    using ::com::sun::star::style::VerticalAlignment_MIDDLE;
+ 
+     // control name, printable, sheet links -----------------------------------
+ 
+@@ -944,24 +979,29 @@ void XclImpTbxControlObj::DoProcessSdrOb
+         case EXC_OBJ_CMO_CHECKBOX:
+         case EXC_OBJ_CMO_OPTIONBUTTON:
+         {
+-            bool bCheckBox = GetObjType() == EXC_OBJ_CMO_CHECKBOX;
+-
+-            sal_Int16 nApiState = 0;
+-            switch( mnState )
++            if( GetObjType() == EXC_OBJ_CMO_CHECKBOX )
++                SetCBRBCommonProps();
++            else
+             {
+-                case EXC_OBJ_CBLS_STATE_UNCHECK:    nApiState = 0;                  break;
+-                case EXC_OBJ_CBLS_STATE_CHECK:      nApiState = 1;                  break;
+-                case EXC_OBJ_CBLS_STATE_TRI:        nApiState = bCheckBox ? 2 : 1;  break;
++                XclImpTbxControlObj* pTbxObj = dynamic_cast< XclImpTbxControlObj* >( mrObjManager.FindDrawObj( mNextRBInGroupId ).get() );
++                if ( ( pTbxObj && pTbxObj->mbGroupLeader ) )
++                {
++                    // Group has terminated
++                    // traverse each RadioButton in group and 
++                    //     a) apply the groupname 
++                    //     b) propagate the linked cell from the lead radiobutton
++                    //     c) apply the correct Ref value
++                    XclImpTbxControlObj* pLeader = pTbxObj;
++                    XclObjId rLeaderId = pLeader->GetObjId();
++                    sal_Int32 nRefVal = 1;
++                    do 
++                    {
++                        pTbxObj->ApplyGroupingBits( *pLeader, nRefVal++ );
++                        pTbxObj = dynamic_cast< XclImpTbxControlObj* >( mrObjManager.FindDrawObj( pTbxObj->mNextRBInGroupId ).get() );
++                    } while ( pTbxObj && !pTbxObj->mbGroupLeader );
++                } 
++               
+             }
+-            if( bCheckBox )
+-                aPropSet.SetBoolProperty( CREATE_OUSTRING( "TriState" ), nApiState == 2 );
+-            aPropSet.SetProperty( CREATE_OUSTRING( "DefaultState" ), nApiState );
+-
+-            sal_Int16 nApiBorder = mbFlatButton ? AwtVisualEffect::FLAT : AwtVisualEffect::LOOK3D;
+-            aPropSet.SetProperty( CREATE_OUSTRING( "VisualEffect" ), nApiBorder );
+-
+-            // #i40279# always centered vertically
+-            aPropSet.SetProperty( CREATE_OUSTRING( "VerticalAlign" ), VerticalAlignment_MIDDLE );
+         }
+         break;
+ 
+@@ -1111,6 +1151,45 @@ void XclImpTbxControlObj::ReadLbsData( X
+     }
+ }
+ 
++void XclImpTbxControlObj::ApplyGroupingBits( XclImpTbxControlObj& rLeadRB, sal_Int32 nRefVal )
++{
++    ScfPropertySet aProps = GetControlPropSet();
++    // shape Id is formed from object id + sheet id
++    rtl::OUString sGroupName = rtl::OUString::valueOf( static_cast< sal_Int32 >( rLeadRB.GetShapeId() ) );
++    aProps.SetStringProperty( CREATE_OUSTRING( "GroupName" ), sGroupName );
++    aProps.SetStringProperty( CREATE_OUSTRING( "RefValue" ), rtl::OUString::valueOf( nRefVal ) );
++    // propagate cell link info
++    if ( rLeadRB.HasCellLink() && !HasCellLink() )
++    {
++        ScfRef< ScAddress > xAddress( new ScAddress( *rLeadRB.GetCellLink() ) );
++        ConvertSheetLinks( GetRoot(), xAddress ); 
++    }
++    SetCBRBCommonProps();
++}
++
++void XclImpTbxControlObj::SetCBRBCommonProps() const
++{
++    sal_Int16 nApiState = 0;
++    bool bCheckBox = ( GetObjType() == EXC_OBJ_CMO_CHECKBOX );
++    switch( mnState )
++    {
++        case EXC_OBJ_CBLS_STATE_UNCHECK:    nApiState = 0;                  break;
++        case EXC_OBJ_CBLS_STATE_CHECK:      nApiState = 1;                  break;
++        case EXC_OBJ_CBLS_STATE_TRI:        nApiState = bCheckBox ? 2 : 1;  break;
++    }
++    ScfPropertySet aPropSet = GetControlPropSet();
++    if ( bCheckBox )
++        aPropSet.SetBoolProperty( CREATE_OUSTRING( "TriState" ), nApiState == 2 );
++    namespace AwtVisualEffect = ::com::sun::star::awt::VisualEffect;
++    using ::com::sun::star::style::VerticalAlignment_MIDDLE;
++
++    aPropSet.SetProperty( CREATE_OUSTRING( "DefaultState" ), nApiState );
++    sal_Int16 nApiBorder = mbFlatButton ? AwtVisualEffect::FLAT : AwtVisualEffect::LOOK3D;
++    aPropSet.SetProperty( CREATE_OUSTRING( "VisualEffect" ), nApiBorder );
++    // #i40279# always centered vertically
++    aPropSet.SetProperty( CREATE_OUSTRING( "VerticalAlign" ), VerticalAlignment_MIDDLE );
++}
++
+ void XclImpTbxControlObj::ReadSbs( XclImpStream& rStrm )
+ {
+     sal_uInt16 nOrient, nStyle;
+@@ -1131,6 +1210,17 @@ void XclImpTbxControlObj::ReadGboData( X
+     mbFlatBorder = ::get_flag( nStyle, EXC_OBJ_GBO_FLAT );
+ }
+ 
++void XclImpTbxControlObj::ReadRboData( XclImpStream& rStrm )
++{
++    sal_Int16 mnNextRBInGroup;
++    rStrm >> mnNextRBInGroup;
++    sal_uInt8 nGroupLeader;
++    rStrm >> nGroupLeader;
++    sal_uInt8 unknown;
++    rStrm >> unknown;
++    mbGroupLeader = ( nGroupLeader & 0x1 );
++    mNextRBInGroupId = XclObjId( GetScTab(), mnNextRBInGroup );
++}
+ // ----------------------------------------------------------------------------
+ 
+ XclImpOleObj::XclImpOleObj( const XclImpRoot& rRoot ) :
+@@ -2224,7 +2314,7 @@ void XclImpObjectManager::ReadObj8( XclI
+             break;
+             case EXC_ID_OBJ_FTCMO:
+                 DBG_ASSERT( !xDrawObj, "XclImpObjectManager::ReadObj8 - multiple FTCMO subrecords" );
+-                xDrawObj = XclImpDrawObjBase::ReadObjCmo( rStrm );
++                xDrawObj = XclImpDrawObjBase::ReadObjCmo( *this, rStrm );
+                 bLoop = xDrawObj.is();
+             break;
+             default:
+Index: sc/source/filter/inc/xiescher.hxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/inc/xiescher.hxx,v
+retrieving revision 1.27
+diff -u -p -r1.27 xiescher.hxx
+--- sc/source/filter/inc/xiescher.hxx	6 Jul 2007 12:38:40 -0000	1.27
++++ sc/source/filter/inc/xiescher.hxx	20 Feb 2008 17:21:50 -0000
+@@ -99,7 +99,7 @@ public:
+     virtual             ~XclImpDrawObjBase();
+ 
+     /** Reads the FTCMO subrecord (common object data) in an OBJ record, returns a new object. */
+-    static XclImpDrawObjRef ReadObjCmo( XclImpStream& rStrm );
++    static XclImpDrawObjRef ReadObjCmo( XclImpObjectManager& rObjMrg, XclImpStream& rStrm );
+     /** Reads the contents of the specified subrecord of an OBJ record from stream. */
+     virtual void        ReadSubRecord( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize );
+     /** Reads the client anchor from an msofbtClientAnchor Escher record. */
+@@ -254,6 +254,9 @@ protected:
+     ScfPropertySet      GetControlPropSet() const;
+     /** Tries to set a spreadsheet cell link and source range link at the passed form control. */
+     void                ConvertSheetLinks( const XclImpRoot& rRoot, SdrObject& rSdrObj ) const;
++    void                ConvertSheetLinks( const XclImpRoot& rRoot, const ScfRef< ScAddress >& rxCellLink ) const;
++    void                ConvertSheetLinks( const XclImpRoot& rRoot, const ScfRef< ScRange >& rxSrcRange ) const;
++    ScAddress*          GetCellLink(){ return mxCellLink.get(); }
+ 
+ private:
+     XControlModelRef    mxCtrlModel;    /// Model of the created form control object.
+@@ -268,7 +271,7 @@ private:
+ class XclImpTbxControlObj : public XclImpDrawingObj, public XclImpControlObjHelper
+ {
+ public:
+-    explicit            XclImpTbxControlObj( const XclImpRoot& rRoot );
++    explicit            XclImpTbxControlObj( XclImpObjectManager& rObjMgr, const XclImpRoot& rRoot );
+ 
+     /** Reads the contents of the specified subrecord of an OBJ record from stream. */
+     virtual void        ReadSubRecord( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize );
+@@ -295,8 +298,15 @@ private:
+     void                ReadSbs( XclImpStream& rStrm );
+     /** Reads the contents of the ftGboData sub structure in an OBJ record. */
+     void                ReadGboData( XclImpStream& rStrm );
++    /** Reads the contents of the ftRboData sub structure in an OBJ record. */
++    void                ReadRboData( XclImpStream& rStrm );
+ 
+ private:
++    void SetCBRBCommonProps() const;
++    void ApplyGroupingBits( XclImpTbxControlObj& rTbxObj, sal_Int32 nRefVal );
++    XclImpObjectManager&  mrObjManager;
++    bool                mbGroupLeader;  /// Identifies start of group
++    XclObjId            mNextRBInGroupId;    /// 
+     ScfInt16Vec         maMultiSel;     /// Indexes of all selected entries in a multi selection.
+     sal_uInt16          mnState;        /// Checked/unchecked state.
+     sal_Int16           mnSelEntry;     /// Index of selected entry (1-based).
+Index: sc/source/filter/inc/xlescher.hxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/inc/xlescher.hxx,v
+retrieving revision 1.21
+diff -u -p -r1.21 xlescher.hxx
+--- sc/source/filter/inc/xlescher.hxx	22 Jan 2007 13:22:23 -0000	1.21
++++ sc/source/filter/inc/xlescher.hxx	20 Feb 2008 17:21:50 -0000
+@@ -75,6 +75,7 @@ const sal_uInt16 EXC_ID_OBJ_FTCBLS      
+ const sal_uInt16 EXC_ID_OBJ_FTSBS           = 0x000C;   /// Scroll bar data.
+ const sal_uInt16 EXC_ID_OBJ_FTSBSFMLA       = 0x000E;   /// Scroll bar/list box/combo box cell link.
+ const sal_uInt16 EXC_ID_OBJ_FTGBODATA       = 0x000F;   /// Group box data.
++const sal_uInt16 EXC_ID_OBJ_FTRBODATA       = 0x0011;   /// Radiobutton data.
+ const sal_uInt16 EXC_ID_OBJ_FTLBSDATA       = 0x0013;   /// List box/combo box data.
+ const sal_uInt16 EXC_ID_OBJ_FTCBLSFMLA      = 0x0014;   /// Check box/radio button cell link.
+ const sal_uInt16 EXC_ID_OBJ_FTCMO           = 0x0015;   /// Common object settings.

Modified: trunk/patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff
==============================================================================
--- trunk/patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff	(original)
+++ trunk/patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff	Mon Mar 31 16:28:38 2008
@@ -1,5 +1,5 @@
 --- /dev/null	2007-05-04 11:54:36.000000000 +0100
-+++ udkapi/com/sun/star/script/ModuleType.idl	2008-03-20 10:25:13.000000000 +0000
++++ udkapi/com/sun/star/script/ModuleType.idl	2008-03-28 10:30:33.000000000 +0000
 @@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
@@ -60,7 +60,7 @@
 +
 +#endif
 --- /dev/null	2007-05-04 11:54:36.000000000 +0100
-+++ udkapi/com/sun/star/script/ModuleInfo.idl	2008-03-20 15:16:05.000000000 +0000
++++ udkapi/com/sun/star/script/ModuleInfo.idl	2008-03-28 10:30:33.000000000 +0000
 @@ -0,0 +1,57 @@
 +/*************************************************************************
 + *
@@ -120,7 +120,7 @@
 +
 +#endif
 --- /dev/null	2007-05-04 11:54:36.000000000 +0100
-+++ udkapi/com/sun/star/script/XObjectProvider.idl	2008-03-20 10:25:13.000000000 +0000
++++ udkapi/com/sun/star/script/XObjectProvider.idl	2008-03-28 10:30:33.000000000 +0000
 @@ -0,0 +1,52 @@
 +/*************************************************************************
 + *
@@ -174,9 +174,9 @@
 +
 +};  };  };  };
 +#endif
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/udkapi/com/sun/star/script/makefile.mk udkapi/com/sun/star/script/makefile.mk
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/udkapi/com/sun/star/script/makefile.mk	2008-03-19 10:56:58.000000000 +0000
-+++ udkapi/com/sun/star/script/makefile.mk	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/udkapi/com/sun/star/script/makefile.mk udkapi/com/sun/star/script/makefile.mk
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/udkapi/com/sun/star/script/makefile.mk	2008-03-29 23:08:19.000000000 +0000
++++ udkapi/com/sun/star/script/makefile.mk	2008-03-28 10:30:33.000000000 +0000
 @@ -89,6 +89,9 @@ IDLFILES=\
  	XScriptEventsAttacher.idl\
  	XDefaultMethod.idl\
@@ -187,9 +187,9 @@
  	DateType.idl\
  
  # ------------------------------------------------------------------
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/svx/source/msfilter/msvbasic.cxx svx/source/msfilter/msvbasic.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/svx/source/msfilter/msvbasic.cxx	2006-09-17 06:28:12.000000000 +0100
-+++ svx/source/msfilter/msvbasic.cxx	2008-03-20 10:41:41.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/svx/source/msfilter/msvbasic.cxx svx/source/msfilter/msvbasic.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/svx/source/msfilter/msvbasic.cxx	2006-09-17 06:28:12.000000000 +0100
++++ svx/source/msfilter/msvbasic.cxx	2008-03-28 10:30:33.000000000 +0000
 @@ -54,6 +54,8 @@
  #include "msvbasic.hxx"
  #endif
@@ -260,9 +260,9 @@
                      OSL_TRACE("Module %s is of type Normal VBA",
                          ::rtl::OUStringToOString( value ,
                              RTL_TEXTENCODING_ASCII_US ).pData->buffer );
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/svx/source/msfilter/msvbasic.hxx svx/source/msfilter/msvbasic.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/svx/source/msfilter/msvbasic.hxx	2006-06-19 17:20:43.000000000 +0100
-+++ svx/source/msfilter/msvbasic.hxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/svx/source/msfilter/msvbasic.hxx svx/source/msfilter/msvbasic.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/svx/source/msfilter/msvbasic.hxx	2006-06-19 17:20:43.000000000 +0100
++++ svx/source/msfilter/msvbasic.hxx	2008-03-28 10:30:33.000000000 +0000
 @@ -50,11 +50,13 @@
  #ifndef _DYNARY_HXX
  #include <tools/dynary.hxx>
@@ -303,9 +303,9 @@
  
      std::vector<String> maReferences;
  private:
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/svx/source/msfilter/svxmsbas.cxx svx/source/msfilter/svxmsbas.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/svx/source/msfilter/svxmsbas.cxx	2007-12-07 12:21:21.000000000 +0000
-+++ svx/source/msfilter/svxmsbas.cxx	2008-03-26 12:50:56.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/svx/source/msfilter/svxmsbas.cxx svx/source/msfilter/svxmsbas.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/svx/source/msfilter/svxmsbas.cxx	2007-12-07 12:21:21.000000000 +0000
++++ svx/source/msfilter/svxmsbas.cxx	2008-03-28 10:30:33.000000000 +0000
 @@ -88,6 +88,8 @@ using namespace com::sun::star::awt;
  
  #include <com/sun/star/container/XNameContainer.hpp>
@@ -413,9 +413,9 @@
  		SFX_APP()->LeaveBasicCall();
  	}
  	return bRet;
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/inc/document.hxx sc/inc/document.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/inc/document.hxx	2008-03-19 10:57:03.000000000 +0000
-+++ sc/inc/document.hxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/inc/document.hxx sc/inc/document.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/inc/document.hxx	2008-03-29 23:08:24.000000000 +0000
++++ sc/inc/document.hxx	2008-03-28 10:30:33.000000000 +0000
 @@ -308,6 +308,7 @@ private:
  
  	com::sun::star::uno::Sequence<sal_Int8>	aProtectPass;
@@ -442,9 +442,9 @@
  	BOOL			GetTable( const String& rName, SCTAB& rTab ) const;
  	inline SCTAB	GetTableCount() const { return nMaxTableNumber; }
  	SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; }
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/inc/servuno.hxx sc/inc/servuno.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/inc/servuno.hxx	2008-03-19 10:57:00.000000000 +0000
-+++ sc/inc/servuno.hxx	2008-03-25 12:39:27.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/inc/servuno.hxx sc/inc/servuno.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/inc/servuno.hxx	2008-03-29 23:08:20.000000000 +0000
++++ sc/inc/servuno.hxx	2008-03-28 10:30:33.000000000 +0000
 @@ -103,7 +103,9 @@ class ScDocShell;
  #define SC_SERVICE_FORMULAPARS  38
  #define SC_SERVICE_OPCODEMAPPER 39
@@ -456,9 +456,9 @@
  #define SC_SERVICE_INVALID		USHRT_MAX
  
  
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/inc/table.hxx sc/inc/table.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/inc/table.hxx	2008-03-19 10:57:03.000000000 +0000
-+++ sc/inc/table.hxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/inc/table.hxx sc/inc/table.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/inc/table.hxx	2008-03-29 23:08:24.000000000 +0000
++++ sc/inc/table.hxx	2008-03-28 10:30:33.000000000 +0000
 @@ -104,6 +104,7 @@ private:
  	ScColumn		aCol[MAXCOLCOUNT];
  
@@ -477,9 +477,9 @@
      const String&   GetUpperName() const;
  
  	const String&	GetPageStyle() const					{ return aPageStyle; }
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/core/data/document.cxx sc/source/core/data/document.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/core/data/document.cxx	2008-03-19 10:57:00.000000000 +0000
-+++ sc/source/core/data/document.cxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/core/data/document.cxx sc/source/core/data/document.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/core/data/document.cxx	2008-03-29 23:08:20.000000000 +0000
++++ sc/source/core/data/document.cxx	2008-03-28 10:30:33.000000000 +0000
 @@ -101,6 +101,7 @@
  #include "scextopt.hxx"
  #include "postit.hxx"
@@ -592,9 +592,9 @@
  				}
  
  				pTab[nTabCount - 1] = NULL;
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/core/data/table1.cxx sc/source/core/data/table1.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/core/data/table1.cxx	2008-03-19 10:57:03.000000000 +0000
-+++ sc/source/core/data/table1.cxx	2008-03-25 14:26:21.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/core/data/table1.cxx sc/source/core/data/table1.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/core/data/table1.cxx	2008-03-29 23:08:24.000000000 +0000
++++ sc/source/core/data/table1.cxx	2008-03-28 10:30:33.000000000 +0000
 @@ -130,6 +130,7 @@ extern BOOL bIsOlk, bOderSo;
  ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
  					BOOL bColInfo, BOOL bRowInfo ) :
@@ -603,18 +603,9 @@
  	bScenario( FALSE ),
  	bLayoutRTL( FALSE ),
      bLoadingRTL( FALSE ),
-@@ -161,7 +162,7 @@ ScTable::ScTable( ScDocument* pDoc, SCTA
- 	bActiveScenario( FALSE ),
-     pViewOptions( NULL )
- {
--
-+OSL_TRACE("!!!!ScTab created!!!");
- 	if (bColInfo)
- 	{
- 		pColWidth  = new USHORT[ MAXCOL+1 ];
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/filter/excel/excimp8.cxx sc/source/filter/excel/excimp8.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/filter/excel/excimp8.cxx	2008-03-19 10:56:44.000000000 +0000
-+++ sc/source/filter/excel/excimp8.cxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/filter/excel/excimp8.cxx sc/source/filter/excel/excimp8.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/filter/excel/excimp8.cxx	2008-03-29 23:08:10.000000000 +0000
++++ sc/source/filter/excel/excimp8.cxx	2008-03-28 10:30:33.000000000 +0000
 @@ -148,7 +148,7 @@ using namespace com::sun::star;
  
  
@@ -624,7 +615,7 @@
  {
  	delete pFormConv;
  
-@@ -290,9 +290,15 @@ void ImportExcel8::Codename( BOOL bWorkb
+@@ -284,9 +284,15 @@ void ImportExcel8::Codename( BOOL bWorkb
          if( aName.Len() )
          {
              if( bWorkbookGlobals )
@@ -642,9 +633,9 @@
          }
  	}
  }
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/filter/inc/excimp8.hxx sc/source/filter/inc/excimp8.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/filter/inc/excimp8.hxx	2008-03-19 10:56:44.000000000 +0000
-+++ sc/source/filter/inc/excimp8.hxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/filter/inc/excimp8.hxx sc/source/filter/inc/excimp8.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/filter/inc/excimp8.hxx	2008-03-29 23:08:10.000000000 +0000
++++ sc/source/filter/inc/excimp8.hxx	2008-03-28 10:30:33.000000000 +0000
 @@ -69,6 +69,7 @@ class XclImpStream;
  
  class ImportExcel8 : public ImportExcel
@@ -653,9 +644,9 @@
  	protected:
          ExcScenarioList         aScenList;
  
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/docshell/docfunc.cxx sc/source/ui/docshell/docfunc.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/docshell/docfunc.cxx	2008-03-19 10:57:00.000000000 +0000
-+++ sc/source/ui/docshell/docfunc.cxx	2008-03-25 15:32:25.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/docshell/docfunc.cxx sc/source/ui/docshell/docfunc.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/docshell/docfunc.cxx	2008-03-29 23:08:20.000000000 +0000
++++ sc/source/ui/docshell/docfunc.cxx	2008-03-28 10:30:33.000000000 +0000
 @@ -58,6 +58,13 @@
  #include <svtools/PasswordHelper.hxx>
  #endif
@@ -826,9 +817,39 @@
  		rDocShell.Broadcast( ScTablesHint( SC_TAB_DELETED, nTab ) );
  
  		if (bWasLinked)
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/makefile.mk sc/source/ui/unoobj/makefile.mk
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/makefile.mk	2008-03-19 10:57:00.000000000 +0000
-+++ sc/source/ui/unoobj/makefile.mk	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/docshell/vbaevents.cxx sc/source/ui/docshell/vbaevents.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/docshell/vbaevents.cxx	2008-03-29 23:08:18.000000000 +0000
++++ sc/source/ui/docshell/vbaevents.cxx	2008-03-28 10:30:34.000000000 +0000
+@@ -60,11 +60,7 @@ const static rtl::OUString sUrlPart2 = r
+ 	rtl::OUString sCodeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
+ 	if ( pShell )
+ 	{
+-		if ( ScExtDocOptions* pExtDocOpts = pShell->GetDocument()->GetExtDocOptions() )
+-		{
+-			if ( pExtDocOpts->GetDocSettings().maGlobCodeName.Len() > 0 ) 
+-				sCodeName = pExtDocOpts->GetDocSettings().maGlobCodeName;
+-		}
++            pShell->GetDocument()->GetCodeName();
+ 	}
+ 	return sCodeName;
+ }	
+@@ -316,12 +312,8 @@ uno::Any createRange( const uno::Any& aR
+ 
+ String getSheetModuleName( ScDocShell* pShell, SCTAB nTab )
+ {
+-	ScExtDocOptions* pExtOptions = pShell->GetDocument()->GetExtDocOptions();
+ 	String aCodeName;
+-	pShell->GetDocument()->GetName( nTab, aCodeName);
+-	// Use code name if that exists
+-	if ( pExtOptions )
+-		aCodeName = pExtOptions->GetCodeName( nTab );
++	pShell->GetDocument()->GetCodeName( nTab, aCodeName);
+ 	return aCodeName;	
+ }
+ 
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/makefile.mk sc/source/ui/unoobj/makefile.mk
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/makefile.mk	2008-03-29 23:08:20.000000000 +0000
++++ sc/source/ui/unoobj/makefile.mk	2008-03-28 10:30:33.000000000 +0000
 @@ -54,6 +54,7 @@ AUTOSEG=true
  .INCLUDE :  sc.mk
  .INCLUDE :  $(PRJ)$/util$/makefile.pmk
@@ -837,9 +858,9 @@
  # --- Files --------------------------------------------------------
  SLO1FILES =  \
          $(SLO)$/docuno.obj \
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/servuno.cxx sc/source/ui/unoobj/servuno.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/servuno.cxx	2008-03-19 10:57:00.000000000 +0000
-+++ sc/source/ui/unoobj/servuno.cxx	2008-03-25 13:46:23.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/servuno.cxx sc/source/ui/unoobj/servuno.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/servuno.cxx	2008-03-29 23:08:20.000000000 +0000
++++ sc/source/ui/unoobj/servuno.cxx	2008-03-28 10:30:33.000000000 +0000
 @@ -46,10 +46,19 @@
  #include <svx/unonrule.hxx>
  #endif
@@ -1057,377 +1078,259 @@
  	}
  	return xRet;
  }
---- /dev/null	2007-05-04 11:54:36.000000000 +0100
-+++ sc/source/ui/vba/vbauserform.hxx	2008-03-27 23:24:11.000000000 +0000
-@@ -0,0 +1,72 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile: vbashape.hxx,v $
-+ *
-+ *  $Revision: 1.2 $
-+ *
-+ *  last change: $Author: vg $ $Date: 2007/12/07 11:02:09 $
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_USERFORM_HXX
-+#define SC_VBA_USERFORM_HXX
-+
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XUserForm.hpp>
-+#include <com/sun/star/awt/XDialog.hpp>
-+
-+#include "vbahelperinterface.hxx"
-+#include "vbacontrol.hxx"
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/makefile.mk sc/source/ui/vba/makefile.mk
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/makefile.mk	2008-03-29 23:08:19.000000000 +0000
++++ sc/source/ui/vba/makefile.mk	2008-03-28 14:09:38.000000000 +0000
+@@ -121,6 +121,9 @@ SLOFILES= \
+                 $(SLO)$/vbacommandbarcontrols.obj \
+                 $(SLO)$/vbacommandbar.obj \
+                 $(SLO)$/vbacommandbars.obj \
++                $(SLO)$/vbauserform.obj \
++                $(SLO)$/vbacheckbox.obj \
++                $(SLO)$/vbatogglebutton.obj \
+ 		$(SLO)$/service.obj \
+  
+ 
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/service.cxx sc/source/ui/vba/service.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/service.cxx	2007-12-07 10:42:52.000000000 +0000
++++ sc/source/ui/vba/service.cxx	2008-03-28 10:30:33.000000000 +0000
+@@ -62,7 +62,10 @@ namespace globals
+ {
+ extern sdecl::ServiceDecl const serviceDecl;
+ }
+-
++namespace  userform
++{
++extern sdecl::ServiceDecl const serviceDecl;
++}
+ 
+ 
+ extern "C"
+@@ -81,7 +84,7 @@ extern "C"
+ 
+ 	// Component registration
+         if ( component_writeInfoHelper( pServiceManager, pRegistryKey, 
+-		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl ) )
++		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl ) )
+ 		{
+ 			// Singleton registration
+ 			try
+@@ -109,7 +112,7 @@ extern "C"
+     {
+ 		OSL_TRACE("In component_getFactory for %s", pImplName );
+ 	void* pRet =  component_getFactoryHelper(
+-        	pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl );
++        	pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl );
+ 	OSL_TRACE("Ret is 0x%x", pRet);
+ 	return pRet;
+     }
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbabutton.cxx sc/source/ui/vba/vbabutton.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbabutton.cxx	2007-12-07 10:44:58.000000000 +0000
++++ sc/source/ui/vba/vbabutton.cxx	2008-03-28 18:21:50.000000000 +0000
+@@ -40,7 +40,7 @@ using namespace org::openoffice;
+ 
+ 
+ const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
+-ScVbaButton::ScVbaButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ButtonImpl_BASE( xContext, xControlShape )
++ScVbaButton::ScVbaButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : ButtonImpl_BASE( xContext, xControl )
+ {
+ }
+ 
+@@ -58,3 +58,22 @@ ScVbaButton::setCaption( const rtl::OUSt
+ {
+     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ }
 +
-+//typedef InheritedHelperInterfaceImpl1< oo::msforms::XUserForm > ScVbaUserForm_BASE;
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XUserForm > ScVbaUserForm_BASE;
++rtl::OUString& 
++ScVbaButton::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaButton") );
++	return sImplName;
++}
 +
-+class ScVbaUserForm : public ScVbaUserForm_BASE
++uno::Sequence< rtl::OUString > 
++ScVbaButton::getServiceNames()
 +{
-+private:
-+    css::uno::Reference< css::awt::XDialog > m_xDialog;
-+    ScDocShell* m_pDocShell;
-+protected:
-+public:
-+    ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
-+    virtual ~ScVbaUserForm();
-+    // XUserForm
-+    virtual void SAL_CALL Show(  ) throw (css::uno::RuntimeException);
-+    // XIntrospection
-+    virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection(  ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
-+    virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
-+    virtual ::rtl::OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException);
-+    virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException);
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Button" ) );
++	}
++	return aServiceNames;
++}
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbabutton.hxx sc/source/ui/vba/vbabutton.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbabutton.hxx	2007-12-07 10:45:09.000000000 +0000
++++ sc/source/ui/vba/vbabutton.hxx	2008-03-28 18:08:06.000000000 +0000
+@@ -46,9 +46,12 @@ class ScVbaButton : public ButtonImpl_BA
+ {
+ public:
+     ScVbaButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
++                    const css::uno::Reference< css::uno::XInterface >& xControl );
+    // Attributes
+     virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
 +    //XHelperInterface
 +    virtual rtl::OUString& getServiceImplName();
 +    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif
---- /dev/null	2007-05-04 11:54:36.000000000 +0100
-+++ sc/source/ui/vba/vbauserform.cxx	2008-03-27 23:35:23.000000000 +0000
-@@ -0,0 +1,215 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile: vbashape.cxx,v $
-+ *
-+ *  $Revision: 1.3 $
-+ *
-+ *  last change: $Author: kz $ $Date: 2007/12/14 12:41:26 $
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "helperdecl.hxx"
-+#include "vbauserform.hxx"
-+#include <com/sun/star/awt/XControl.hpp>
-+#include <basic/sbx.hxx>
-+#include <basic/sbstar.hxx>
-+#include <basic/sbmeth.hxx>
-+#include "unonames.hxx"
+ };
+ #endif //SC_VBA_BUTTON_HXX
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacombobox.cxx sc/source/ui/vba/vbacombobox.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacombobox.cxx	2007-12-07 10:48:18.000000000 +0000
++++ sc/source/ui/vba/vbacombobox.cxx	2008-03-29 00:25:52.000000000 +0000
+@@ -39,34 +39,70 @@ using namespace com::sun::star;
+ using namespace org::openoffice;
+ 
+ 
+-const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
++//SelectedItems list of integer indexes
++//StringItemList list of items
++
++const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
++const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
+ const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
++const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
+ 
+-ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ComboBoxImpl_BASE( xContext, xControlShape )
++ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, bool bDialogType ) : ComboBoxImpl_BASE( xContext, xControl ), mbDialogType( bDialogType )
+ {
+-	// grab the default value property name
+-	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
++	if ( !mbDialogType )
++		// grab the default value property name
++		m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;		
+ }
+ 
+-ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ComboBoxImpl_BASE( xContext, xPropSet, xControlShape )
+-{
+-	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
+-}
++// Attributes
+ 
+ 
+-// Attributes
++// Value, [read] e.g. getValue returns the value of ooo Text propery e.g. the value in
++// the drop down
+ uno::Any SAL_CALL 
+ ScVbaComboBox::getValue() throw (uno::RuntimeException)
+ {
+-	return m_xProps->getPropertyValue( sSourceName );
++	if ( mbDialogType )
++		return 	m_xProps->getPropertyValue( TEXT ); 
++	else	
++		return m_xProps->getPropertyValue( sSourceName );
+ }
+ 
++// Value, [write]e.g. setValue sets the value in the drop down, and if the value is one
++// of the values in the list then the selection is also set
+ void SAL_CALL 
+ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
+ {
+-	m_xProps->setPropertyValue( sSourceName, _value );
++	if ( mbDialogType )
++	{
++		uno::Sequence< sal_Int32 > sSelection;
++		uno::Sequence< rtl::OUString > sItems;
++		m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
++		m_xProps->getPropertyValue( ITEMS ) >>= sItems;
++		// Assume you can't set a value to a mulipleselection ( need to check )
++	        if ( sSelection.getLength() > 1 )
++			throw uno::RuntimeException( rtl::OUString::createFromAscii( "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
++
++		rtl::OUString sValue = getAnyAsString( _value );
++		sal_Int32 nItems = sItems.getLength();
++		for ( sal_Int32 index = 0; index < nItems; ++index )
++		{
++			if ( sItems[ index ].equals( sValue ) )
++			{
++				uno::Sequence< sal_Int32 > sSelected( 1 );
++				sSelected[ 0 ] = index;
++				m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( sSelected ) );
++				break;
++			}
++		}
++		m_xProps->setPropertyValue( TEXT, uno::makeAny( sValue ) );
++	}
++	else
++		m_xProps->setPropertyValue( sSourceName, _value );
+ }
+ 
++// see Value
 +
-+using namespace ::org::openoffice;
-+using namespace ::com::sun::star;
+ ::rtl::OUString SAL_CALL 
+ ScVbaComboBox::getText() throw (uno::RuntimeException)
+ {
+@@ -145,3 +181,22 @@ ScVbaComboBox::Clear(  ) throw (uno::Run
+ 	setValue( uno::makeAny( rtl::OUString() ) );
+ 	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
+ }
 +
-+#define VBA_LEFT "Left"
-+#define VBA_TOP "Top"
-+class UserFormGeometryHelper : public AbstractGeometryAttributes
++rtl::OUString& 
++ScVbaComboBox::getServiceImplName()
 +{
-+
-+    uno::Reference< beans::XPropertySet > mxModel;
-+public:
-+    UserFormGeometryHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< awt::XControl >& xControl )
-+    {
-+        mxModel.set( xControl->getModel(), uno::UNO_QUERY_THROW );
-+    }
-+    virtual double getLeft()
-+    {
-+	sal_Int32 nLeft = 0;
-+	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft;	
-+	return Millimeter::getInPoints( nLeft );
-+    }
-+    virtual void setLeft( double nLeft )
-+    {
-+        mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nLeft ) ) );
-+    }
-+    virtual double getTop()
-+    {
-+	sal_Int32 nTop = 0;
-+	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	VBA_TOP ) ) ) >>= nTop;	
-+	return Millimeter::getInPoints( nTop );
-+    }
-+    virtual void setTop( double nTop )
-+    {
-+	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	VBA_TOP ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) );
-+    }
-+    virtual double getHeight()
-+    {
-+	sal_Int32 nHeight = 0;
-+	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLHGT ) ) ) >>= nHeight;	
-+	return Millimeter::getInPoints( nHeight );
-+    }
-+    virtual void setHeight( double nHeight )
-+    {
-+	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLHGT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) );
-+    }
-+    virtual double getWidth()
-+    {
-+	sal_Int32 nWidth = 0;
-+	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLWID ) ) ) >>= nWidth;	
-+	return Millimeter::getInPoints( nWidth );
-+    }
-+    virtual void setWidth( double nWidth)
-+    {
-+	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLWID ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) );
-+    }
-+
-+
-+};
-+// some little notes
-+// XDialog implementation has the following interesting bits
-+// a Controls property ( which is an array of the container controls )
-+//   each item in the controls array is a XControl, where the model is 
-+//   basically a property bag
-+// additionally the XDialog instance has itself a model
-+//     this model has a ControlModels ( array of models ) property
-+//     the models in ControlModels can be accessed by name
-+// also the XDialog is a XControl ( to access the model above
-+
-+//ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) :  ScVbaUserForm_BASE( getXSomethingFromArgs< vba::XHelperInterface >( aArgs, 0 ), xContext ), m_xDialog( getXSomethingFromArgs< awt::XDialog >( aArgs, 1 ) ), m_pDocShell( 0 )
-+ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) :  ScVbaUserForm_BASE( xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ) ), m_pDocShell( 0 )
-+{
-+    OSL_TRACE("ScVbaUserForm::ScVbaUserForm()");
-+    m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
-+    uno::Reference< frame::XModel > xModel = getXSomethingFromArgs< frame::XModel >( aArgs, 2 );
-+    uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
-+    m_pDocShell = getDocShell( xModel );
-+    m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
-+    mpGeometryHelper.reset( new UserFormGeometryHelper( xContext, xControl ) );
-+}
-+
-+ScVbaUserForm::~ScVbaUserForm()
-+{
-+}
-+
-+void SAL_CALL 
-+ScVbaUserForm::Show(  ) throw (uno::RuntimeException)
-+{
-+	OSL_TRACE("ScVbaUserForm::Show(  )");
-+	if ( m_xDialog.is() )
-+		m_xDialog->execute();
-+}
-+
-+rtl::OUString SAL_CALL 
-+ScVbaUserForm::getCaption() throw (::com::sun::star::uno::RuntimeException)
-+{
-+    rtl::OUString sCaption;
-+    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ) ) >>= sCaption;
-+    return sCaption;
-+}
-+void
-+ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), uno::makeAny( _caption ) );
-+}
-+rtl::OUString& 
-+ScVbaUserForm::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
-+	return sImplName;
-+}
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox") );
++	return sImplName;
++}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaUserForm::getServiceNames()
++ScVbaComboBox::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.UserForm" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.ComboBox" ) );
 +	}
 +	return aServiceNames;
 +}
-+
-+uno::Reference< beans::XIntrospectionAccess > SAL_CALL 
-+ScVbaUserForm::getIntrospection(  ) throw (uno::RuntimeException)
-+{
-+	return uno::Reference< beans::XIntrospectionAccess >();
-+}
-+
-+uno::Any SAL_CALL 
-+ScVbaUserForm::invoke( const ::rtl::OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
-+{
-+	throw uno::RuntimeException(); // unsupported operation
-+}
-+
-+void SAL_CALL 
-+ScVbaUserForm::setValue( const ::rtl::OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
-+{
-+	throw uno::RuntimeException();
-+}
-+
-+uno::Any SAL_CALL 
-+ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
-+{
-+	uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
-+	uno::Reference< container::XNameAccess > xNameAccess( xControl->getModel(), uno::UNO_QUERY_THROW );	
-+	// need to create control here
-+	return xNameAccess->getByName( aPropertyName );
-+}
-+
-+::sal_Bool SAL_CALL 
-+ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
-+{
-+	return sal_False;
-+}
-+
-+::sal_Bool SAL_CALL 
-+ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
-+{
-+	uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
-+	uno::Reference< container::XNameAccess > xNameAccess( xControl->getModel(), uno::UNO_QUERY_THROW );	
-+	return xNameAccess->hasByName( aName );
-+}
-+
-+namespace userform
-+{
-+namespace sdecl = comphelper::service_decl;
-+sdecl::vba_service_class_<ScVbaUserForm, sdecl::with_args<true> > serviceImpl;
-+extern sdecl::ServiceDecl const serviceDecl(
-+    serviceImpl,
-+    "ScVbaUserForm",
-+    "org.openoffice.excel.UserForm" );
-+}
-+
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/makefile.mk sc/source/ui/vba/makefile.mk
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/makefile.mk	2008-03-19 10:56:58.000000000 +0000
-+++ sc/source/ui/vba/makefile.mk	2008-03-20 14:00:09.000000000 +0000
-@@ -121,6 +121,7 @@ SLOFILES= \
-                 $(SLO)$/vbacommandbarcontrols.obj \
-                 $(SLO)$/vbacommandbar.obj \
-                 $(SLO)$/vbacommandbars.obj \
-+                $(SLO)$/vbauserform.obj \
- 		$(SLO)$/service.obj \
-  
- 
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/service.cxx sc/source/ui/vba/service.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/service.cxx	2007-12-07 10:42:52.000000000 +0000
-+++ sc/source/ui/vba/service.cxx	2008-03-20 14:02:25.000000000 +0000
-@@ -62,7 +62,10 @@ namespace globals
- {
- extern sdecl::ServiceDecl const serviceDecl;
- }
--
-+namespace  userform
-+{
-+extern sdecl::ServiceDecl const serviceDecl;
-+}
- 
- 
- extern "C"
-@@ -81,7 +84,7 @@ extern "C"
- 
- 	// Component registration
-         if ( component_writeInfoHelper( pServiceManager, pRegistryKey, 
--		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl ) )
-+		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl ) )
- 		{
- 			// Singleton registration
- 			try
-@@ -109,7 +112,7 @@ extern "C"
-     {
- 		OSL_TRACE("In component_getFactory for %s", pImplName );
- 	void* pRet =  component_getFactoryHelper(
--        	pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl );
-+        	pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl );
- 	OSL_TRACE("Ret is 0x%x", pRet);
- 	return pRet;
-     }
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacombobox.cxx sc/source/ui/vba/vbacombobox.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacombobox.cxx	2007-12-07 10:48:18.000000000 +0000
-+++ sc/source/ui/vba/vbacombobox.cxx	2008-03-27 15:49:59.000000000 +0000
-@@ -48,12 +48,6 @@ ScVbaComboBox::ScVbaComboBox( const uno:
- 	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
- }
- 
--ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ComboBoxImpl_BASE( xContext, xPropSet, xControlShape )
--{
--	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
--}
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacombobox.hxx sc/source/ui/vba/vbacombobox.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacombobox.hxx	2007-12-07 10:48:31.000000000 +0000
++++ sc/source/ui/vba/vbacombobox.hxx	2008-03-29 00:21:48.000000000 +0000
+@@ -49,20 +49,13 @@
+ typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
+ class ScVbaComboBox : public ComboBoxImpl_BASE
+ {		
 -
+-	//css::uno::Reference< css::uno::XComponentContext > m_xContext;
+-	//css::uno::Reference< css::beans::XPropertySet > m_xProps;
+ 	rtl::OUString sSourceName; 
+ 	rtl::OUString msDftPropName;
 -
- // Attributes
- uno::Any SAL_CALL 
- ScVbaComboBox::getValue() throw (uno::RuntimeException)
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacombobox.hxx sc/source/ui/vba/vbacombobox.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacombobox.hxx	2007-12-07 10:48:31.000000000 +0000
-+++ sc/source/ui/vba/vbacombobox.hxx	2008-03-27 15:50:16.000000000 +0000
-@@ -59,10 +59,6 @@ class ScVbaComboBox : public ComboBoxImp
++	bool mbDialogType;
+ 	
  public:
  	ScVbaComboBox( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
-                     const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
 -    ScVbaComboBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
 -                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
 -                    const css::uno::Reference< css::drawing::XControlShape> xControlShape );
 -
++                    const css::uno::Reference< css::uno::XInterface >& xControl, bool bDialogType = false );
  
  	// Attributes
  	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.cxx sc/source/ui/vba/vbacontrol.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.cxx	2007-12-07 10:49:52.000000000 +0000
-+++ sc/source/ui/vba/vbacontrol.cxx	2008-03-27 21:01:52.000000000 +0000
-@@ -54,12 +54,14 @@
+@@ -76,6 +69,9 @@ public:
+ 
+ 	// XDefaultProperty
+         ::rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++	//XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
+ 
+ #endif //
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.cxx sc/source/ui/vba/vbacontrol.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.cxx	2007-12-07 10:49:52.000000000 +0000
++++ sc/source/ui/vba/vbacontrol.cxx	2008-03-29 00:27:30.000000000 +0000
+@@ -49,17 +49,21 @@
+ #include "vbatextbox.hxx"
+ #include "vbaradiobutton.hxx"
+ #include "vbalistbox.hxx"
++#include "vbatogglebutton.hxx"
++#include "vbacheckbox.hxx"
+ 
+ 
  using namespace com::sun::star;
  using namespace org::openoffice;
  
@@ -1446,7 +1349,7 @@
      uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
      //init m_xWindowPeer 
      uno::Reference< container::XChild > xChild( xControlModel, uno::UNO_QUERY_THROW );
-@@ -67,17 +69,18 @@ ScVbaControl::getWindowPeer( const uno::
+@@ -67,17 +71,18 @@ ScVbaControl::getWindowPeer( const uno::
      xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW );
      uno::Reference< frame::XModel > xModel( xChild->getParent(), uno::UNO_QUERY_THROW );
      uno::Reference< view::XControlAccess > xControlAccess( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
@@ -1468,7 +1371,7 @@
  }
  
  //ScVbaControlListener
-@@ -111,69 +114,39 @@ ScVbaControlListener::disposing( const l
+@@ -111,67 +116,49 @@ ScVbaControlListener::disposing( const l
  
  //ScVbaControl
  
@@ -1484,14 +1387,20 @@
 -    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
 +    uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
      xComponent->addEventListener( m_xEventListener );
++   
++    // The initialisation below is pretty shitty, this should be
++    // done in the subclass(s) or a virtual ctor as appropriate 
 +
 +    //init m_xProps
 +    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY ) ;
++    uno::Reference< awt::XControl> xUserFormControl( m_xControl, uno::UNO_QUERY ) ;
 +    if ( xControlShape.is() ) // form control
 +    {
 +        m_xProps.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
-+        mpGeometryHelper.reset( new ConcreteXShapeGeometryAttributes( xContext, uno::Reference< drawing::XShape >(  m_xControl, uno::UNO_QUERY_THROW ) ) );
++        setGeometryHelper( new ConcreteXShapeGeometryAttributes( xContext, uno::Reference< drawing::XShape >(  m_xControl, uno::UNO_QUERY_THROW ) ) );
 +    }
++    else if ( xUserFormControl.is() ) // userform control
++        m_xProps.set( xUserFormControl->getModel(), uno::UNO_QUERY_THROW );
  }
  
  ScVbaControl::~ScVbaControl()
@@ -1505,16 +1414,16 @@
      }
  }
  
- void ScVbaControl::removeResouce() throw( uno::RuntimeException )
+-void ScVbaControl::removeResouce() throw( uno::RuntimeException )
++void 
++ScVbaControl::setGeometryHelper( AbstractGeometryAttributes* pHelper )
  {
 -    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
-+    uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
-     xComponent->removeEventListener( m_xEventListener );
+-    xComponent->removeEventListener( m_xEventListener );
 -    m_xControlShape = NULL;
-+    m_xControl= NULL;
-     m_xProps = NULL;
- }
- 
+-    m_xProps = NULL;
+-}
+-
 -
 -ScVbaControl::ScVbaControl( const uno::Reference< uno::XComponentContext >& xContext, 
 -        const uno::Reference< beans::XPropertySet >& xProps, 
@@ -1536,23 +1445,27 @@
 -    uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
 -    uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
 -    m_xProps = xProps;
--}
--
++    mpGeometryHelper.reset( pHelper );
+ }
+ 
 -void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext, 
 -        const uno::Reference< beans::XPropertySet > xProps, 
 -        const uno::Reference< drawing::XControlShape > xControlShape )
--{
++void ScVbaControl::removeResouce() throw( uno::RuntimeException )
+ {
 -    m_xEventListener.set( new ScVbaControlListener( this ) );
 -    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
 -    m_xContext.set( xContext, uno::UNO_QUERY_THROW );
 -    m_xProps.set( xProps, uno::UNO_QUERY_THROW );
 -    m_xControlShape.set( xControlShape, uno::UNO_QUERY_THROW );
--}
--
++    uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
++    xComponent->removeEventListener( m_xEventListener );
++    m_xControl= NULL;
++    m_xProps = NULL;
+ }
+ 
  //In design model has different behavior
- sal_Bool SAL_CALL ScVbaControl::getEnabled() throw (uno::RuntimeException)
- {
-@@ -194,74 +167,56 @@ void SAL_CALL ScVbaControl::setEnabled( 
+@@ -194,132 +181,156 @@ void SAL_CALL ScVbaControl::setEnabled( 
  
  sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException)
  {
@@ -1637,20 +1550,83 @@
  }
  
  //ScVbaControlFactory
-@@ -273,32 +228,6 @@ ScVbaControlFactory::ScVbaControlFactory
-     m_xProps.set( xProps, uno::UNO_QUERY_THROW );
+ 
+-ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XControlShape >& xControlShape ): m_xContext( xContext ), m_xControlShape( xControlShape )
++ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ): m_xContext( xContext ), m_xControl( xControl )
+ {
+-    uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+-    uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
+-    m_xProps.set( xProps, uno::UNO_QUERY_THROW );
  }
  
 -ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, const uno::Reference< drawing::XControlShape > xControlShape ): m_xContext( xContext ), m_xProps( xProps ), m_xControlShape( xControlShape )
--{
--}
--
++ScVbaControl* ScVbaControlFactory::createControl()  throw (uno::RuntimeException)
+ {
++    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
++    if ( xControlShape.is() ) // form controls
++        return createControl( xControlShape );
++    uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY );
++    if ( !xControl.is() )
++        throw uno::RuntimeException(); // really we should be more informative
++    return createControl( xControl );
++    
+ }
+ 
 -ScVbaControl* ScVbaControlFactory::createControl( const sal_Int16 nClassId )  throw (uno::RuntimeException)
--{
++ScVbaControl* ScVbaControlFactory::createControl(uno::Reference< drawing::XControlShape >& xControlShape )  throw (uno::RuntimeException)
+ {
++    uno::Reference< beans::XPropertySet > xProps( xControlShape->getControl(), uno::UNO_QUERY_THROW );
++    sal_Int32 nClassId = -1;
++    const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
++    xProps->getPropertyValue( sClassId ) >>= nClassId;
+     switch( nClassId )
+     {
+         case form::FormComponentType::COMBOBOX:
+-            return new ScVbaComboBox( m_xContext, m_xProps, m_xControlShape );
++            return new ScVbaComboBox( m_xContext, xControlShape );
+         case form::FormComponentType::COMMANDBUTTON:
+-            return new ScVbaButton( m_xContext, m_xControlShape );
++            return new ScVbaButton( m_xContext, xControlShape );
+         case form::FormComponentType::FIXEDTEXT:
+-            return new ScVbaLabel( m_xContext, m_xControlShape );
++            return new ScVbaLabel( m_xContext, xControlShape );
+         case form::FormComponentType::TEXTFIELD:
+-            return new ScVbaTextBox( m_xContext, m_xControlShape );
++            return new ScVbaTextBox( m_xContext, xControlShape );
+         case form::FormComponentType::RADIOBUTTON:
+-            return new ScVbaRadioButton( m_xContext, m_xControlShape );
++            return new ScVbaRadioButton( m_xContext, xControlShape );
+         case form::FormComponentType::LISTBOX:
+-            return new ScVbaListBox( m_xContext, m_xControlShape );
++            return new ScVbaListBox( m_xContext, xControlShape );
+         default:
+             throw uno::RuntimeException( rtl::OUString::createFromAscii(
+                     "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
+     }
+ }
+ 
+-ScVbaControl* ScVbaControlFactory::createControl()  throw (uno::RuntimeException)
++ScVbaControl* ScVbaControlFactory::createControl(uno::Reference< awt::XControl >& xControl )  throw (uno::RuntimeException)
+ {
+-    sal_Int32 nClassId = -1;
+-    const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
+-    m_xProps->getPropertyValue( sClassId ) >>= nClassId;
 -    switch( nClassId )
--    {
++    uno::Reference< beans::XPropertySet > xProps( xControl->getModel(), uno::UNO_QUERY_THROW );
++    uno::Reference< lang::XServiceInfo > xServiceInfo( xProps, uno::UNO_QUERY_THROW );
++    ScVbaControl* pControl = NULL;
++    // #FIXME we should ( I guess ) be able to have a single point of creation for
++    // the controls. I'll clean that up later
++    if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
++	pControl = new ScVbaCheckbox( m_xContext, xControl );	
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.com.sun.star.awt.UnoControlRadioButtonModel") ) ) )
++	pControl = new ScVbaRadioButton( m_xContext, xControl );	
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlEditModel") ) ) )
++        pControl = new ScVbaTextBox( m_xContext, xControl );
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlButtonModel") ) ) )
+     {
 -        case form::FormComponentType::COMBOBOX:
--            return new ScVbaComboBox( m_xContext, m_xProps, m_xControlShape );
+-            return new ScVbaComboBox( m_xContext, m_xControlShape );
 -        case form::FormComponentType::COMMANDBUTTON:
 -            return new ScVbaButton( m_xContext, m_xControlShape );
 -        case form::FormComponentType::FIXEDTEXT:
@@ -1664,17 +1640,27 @@
 -        default:
 -            throw uno::RuntimeException( rtl::OUString::createFromAscii(
 -                    "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
--    }
--}
--
- ScVbaControl* ScVbaControlFactory::createControl()  throw (uno::RuntimeException)
- {
-     sal_Int32 nClassId = -1;
-@@ -323,3 +252,25 @@ ScVbaControl* ScVbaControlFactory::creat
-                     "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
++        sal_Bool bToggle = sal_False;
++        xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Toggle") ) ) >>= bToggle;
++        if ( bToggle )
++            pControl = new ScVbaToggleButton( m_xContext, xControl );
++        else
++            pControl = new ScVbaButton( m_xContext, xControl );
      }
- }
-+
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") ) ) )
++        pControl = new ScVbaComboBox( m_xContext, xControl, true );
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") ) ) )
++	pControl = new ScVbaListBox( m_xContext, xControl );
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") ) ) )
++	pControl = new ScVbaLabel( m_xContext, xControl );
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") ) ) )
++	//pControl = new ScVbaImage( m_xContext, xControl );
++        throw uno::RuntimeException();
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ) ) )
++	//pControl = new ScVbaProgressBar( m_xContext, xControl );
++        throw uno::RuntimeException();
++    return pControl;
++}
 +
 +rtl::OUString& 
 +ScVbaControl::getServiceImplName()
@@ -1693,13 +1679,18 @@
 +		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Control" ) );
 +	}
 +	return aServiceNames;
-+}
+ }
 +
 +
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.hxx sc/source/ui/vba/vbacontrol.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.hxx	2007-12-07 10:50:07.000000000 +0000
-+++ sc/source/ui/vba/vbacontrol.hxx	2008-03-27 21:50:16.000000000 +0000
-@@ -44,35 +44,24 @@
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.hxx sc/source/ui/vba/vbacontrol.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.hxx	2007-12-07 10:50:07.000000000 +0000
++++ sc/source/ui/vba/vbacontrol.hxx	2008-03-28 15:17:46.000000000 +0000
+@@ -40,40 +40,34 @@
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/script/XDefaultProperty.hpp>
+ #include <com/sun/star/drawing/XControlShape.hpp>
++#include <com/sun/star/awt/XControl.hpp>
+ #include <com/sun/star/awt/XWindowPeer.hpp>
  #include <org/openoffice/msforms/XControl.hpp>
  
  #include "vbahelper.hxx"
@@ -1717,7 +1708,6 @@
 -*/
 -private:
 -    css::uno::Reference< css::awt::XWindowPeer > getWindowPeer( const css::uno::Reference< css::drawing::XControlShape >& xControlShape ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< css::awt::XWindowPeer > getWindowPeer() throw (css::uno::RuntimeException);
      com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > m_xEventListener;
  protected:
 +    std::auto_ptr< oo::AbstractGeometryAttributes > mpGeometryHelper;
@@ -1732,17 +1722,23 @@
 -                const css::uno::Reference< css::beans::XPropertySet > xProps,
 -                const css::uno::Reference< css::drawing::XControlShape > xControlShape );
 +    css::uno::Reference< css::uno::XInterface > m_xControl;
++
++    virtual css::uno::Reference< css::awt::XWindowPeer > getWindowPeer() throw (css::uno::RuntimeException);
  public:
      ScVbaControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
 -                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
 -    ScVbaControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
 -                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
 -                    const css::uno::Reference< css::drawing::XControlShape > xControlShape );
-+                    const css::uno::Reference< css::uno::XInterface >& xControlShape );
++                    const css::uno::Reference< css::uno::XInterface >& xControl);
      virtual ~ScVbaControl();
++    // This class will own the helper, so make sure it is allocated from 
++    // the heap
++    void setGeometryHelper( oo::AbstractGeometryAttributes* pHelper );
      // XControl
      virtual sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
-@@ -90,6 +79,9 @@ public:
+     virtual void SAL_CALL setEnabled( sal_Bool _enabled ) throw (css::uno::RuntimeException);
+@@ -90,6 +84,9 @@ public:
  
      //remove resouce because org.openoffice.excel.XControl is a wrapper of com.sun.star.drawing.XControlShape
      virtual void removeResouce() throw( css::uno::RuntimeException );
@@ -1752,20 +1748,30 @@
  };
  
  
-@@ -98,10 +90,6 @@ class ScVbaControlFactory
+@@ -97,16 +94,13 @@ class ScVbaControlFactory
+ {
  public:
      ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
-                     const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
 -    ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
 -                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
 -                    const css::uno::Reference< css::drawing::XControlShape > xControlShape );
 -    ScVbaControl* createControl( const sal_Int16 nClassID )  throw ( css::uno::RuntimeException );
++                    const css::uno::Reference< css::uno::XInterface >& xControl );
      ScVbaControl* createControl()  throw ( css::uno::RuntimeException );
  private:
++    ScVbaControl* createControl( css::uno::Reference< css::awt::XControl >& )  throw ( css::uno::RuntimeException );
++    ScVbaControl* createControl( css::uno::Reference< css::drawing::XControlShape >& )  throw ( css::uno::RuntimeException );
      css::uno::Reference< css::uno::XComponentContext > m_xContext;
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbahelper.cxx sc/source/ui/vba/vbahelper.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbahelper.cxx	2008-03-19 10:56:34.000000000 +0000
-+++ sc/source/ui/vba/vbahelper.cxx	2008-03-27 17:25:21.000000000 +0000
+-    css::uno::Reference< css::beans::XPropertySet > m_xProps;
+-    css::uno::Reference< css::drawing::XControlShape > m_xControlShape;
++    css::uno::Reference< css::uno::XInterface > m_xControl;
+ };
+ 
+ #endif//SC_VBA_CONTROL_HXX
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbahelper.cxx sc/source/ui/vba/vbahelper.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbahelper.cxx	2008-03-29 23:07:54.000000000 +0000
++++ sc/source/ui/vba/vbahelper.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -62,6 +62,7 @@
  #include "tabvwsh.hxx"
  #include "transobj.hxx"
@@ -1785,9 +1791,9 @@
 +
  } // openoffice
  } //org
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbahelper.hxx sc/source/ui/vba/vbahelper.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbahelper.hxx	2008-03-19 10:56:34.000000000 +0000
-+++ sc/source/ui/vba/vbahelper.hxx	2008-03-27 21:48:03.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbahelper.hxx sc/source/ui/vba/vbahelper.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbahelper.hxx	2008-03-29 23:07:54.000000000 +0000
++++ sc/source/ui/vba/vbahelper.hxx	2008-03-28 10:30:34.000000000 +0000
 @@ -45,6 +45,7 @@
  #include <com/sun/star/frame/XModel.hpp>
  #include <docsh.hxx>
@@ -1859,15 +1865,80 @@
  class ShapeHelper
  {
  protected:
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalistbox.cxx sc/source/ui/vba/vbalistbox.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalistbox.cxx	2007-12-10 09:31:13.000000000 +0000
-+++ sc/source/ui/vba/vbalistbox.cxx	2008-03-27 15:50:26.000000000 +0000
-@@ -52,12 +52,6 @@ ScVbaListBox::ScVbaListBox( const uno::R
- 	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalabel.cxx sc/source/ui/vba/vbalabel.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalabel.cxx	2007-12-07 10:54:35.000000000 +0000
++++ sc/source/ui/vba/vbalabel.cxx	2008-03-28 14:25:58.000000000 +0000
+@@ -40,7 +40,7 @@ using namespace org::openoffice;
+ 
+ 
+ const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
+-ScVbaLabel::ScVbaLabel( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : LabelImpl_BASE( xContext, xControlShape )
++ScVbaLabel::ScVbaLabel( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : LabelImpl_BASE( xContext, xControl )
+ {
  }
  
--ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ListBoxImpl_BASE( xContext, xPropSet, xControlShape )
--{
+@@ -58,3 +58,22 @@ ScVbaLabel::setCaption( const rtl::OUStr
+ {
+     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ }
++
++rtl::OUString& 
++ScVbaLabel::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaLabel::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Label" ) );
++	}
++	return aServiceNames;
++}
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalabel.hxx sc/source/ui/vba/vbalabel.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalabel.hxx	2007-12-07 10:54:46.000000000 +0000
++++ sc/source/ui/vba/vbalabel.hxx	2008-03-28 14:23:06.000000000 +0000
+@@ -46,9 +46,12 @@ class ScVbaLabel : public LabelImpl_BASE
+ {
+ public:
+     ScVbaLabel( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
++                    const css::uno::Reference< css::uno::XInterface >& xControl );
+    // Attributes
+     virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
+ #endif //SC_VBA_LABEL_HXX
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalistbox.cxx sc/source/ui/vba/vbalistbox.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalistbox.cxx	2007-12-10 09:31:13.000000000 +0000
++++ sc/source/ui/vba/vbalistbox.cxx	2008-03-29 00:36:16.000000000 +0000
+@@ -42,31 +42,31 @@
+ using namespace com::sun::star;
+ using namespace org::openoffice;
+ 
+-const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
++const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
++const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
+ const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
+ 
+ 
+-ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ListBoxImpl_BASE( xContext, xControlShape )
++ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl ) : ListBoxImpl_BASE( xContext, xControl )
+ {
+-	// grab the default value property name
+-	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
+ }
+ 
+-ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ListBoxImpl_BASE( xContext, xPropSet, xControlShape )
+-{
 -	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
 -}
 -
@@ -1875,23 +1946,228 @@
  // Attributes
  uno::Any SAL_CALL 
  ScVbaListBox::getValue() throw (uno::RuntimeException)
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalistbox.hxx sc/source/ui/vba/vbalistbox.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalistbox.hxx	2007-12-07 10:55:31.000000000 +0000
-+++ sc/source/ui/vba/vbalistbox.hxx	2008-03-27 15:50:39.000000000 +0000
-@@ -56,10 +56,6 @@ class ScVbaListBox : public ListBoxImpl_
+ {
++    uno::Sequence< sal_Int32 > sSelection;
++    uno::Sequence< rtl::OUString > sItems;
++    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
++    m_xProps->getPropertyValue( ITEMS ) >>= sItems;
+     if( getMultiSelect() )
+         throw uno::RuntimeException( rtl::OUString::createFromAscii(
+                     "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
+     uno::Reference< form::validation::XValidatableFormComponent > xValidatableFormComponent( m_xProps, uno::UNO_QUERY_THROW );
+-    return xValidatableFormComponent->getCurrentValue();
++    uno::Any aRet;
++    if ( sSelection.getLength() )
++        aRet = uno::makeAny( sItems[ sSelection[ 0 ] ] ); 
++    return aRet;
+ }
+ 
+ void SAL_CALL 
+@@ -96,18 +96,17 @@ ScVbaListBox::setValue( const uno::Any& 
+         throw uno::RuntimeException( rtl::OUString::createFromAscii(
+                     "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
+ 
+-    nList.realloc( 1 );
+-    nList[0] = nValue;
+-            
+-	m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
++    uno::Sequence< sal_Int16 > nSelectedIndices(1);
++    nSelectedIndices[ 0 ] = nValue;
++    m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nSelectedIndices ) ); 
++    m_xProps->setPropertyValue( TEXT, uno::makeAny( sValue ) ); 
+ }
+ 
+ ::rtl::OUString SAL_CALL 
+ ScVbaListBox::getText() throw (uno::RuntimeException)
+ {
+ 	rtl::OUString result;
+-    uno::Reference< form::validation::XValidatableFormComponent > xValidatableFormComponent( m_xProps, uno::UNO_QUERY_THROW );
+-    xValidatableFormComponent->getCurrentValue() >>= result;
++	getValue() >>= result;
+ 	return result;
+ }
+ 
+@@ -130,29 +129,7 @@ ScVbaListBox::setMultiSelect( sal_Bool _
+ {
+     m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ), uno::makeAny( _multiselect ) );
+ }
+-/*
+-css::uno::Sequence< sal_Bool > SAL_CALL 
+-ScVbaListBox::getSelected() throw (css::uno::RuntimeException)
+-{
+-    uno::Sequence< rtl::OUString > sList;
+-    uno::Sequence< sal_Int16 > nList;
+-    m_xProps->getPropertyValue( ITEMS ) >>= sList;
+-    uno::Sequence< sal_Bool > bSelected( sList.getLength() );
+-    for( sal_Int16 i = 0; i < bSelected.getLength(); i++ )
+-        bSelected[i] = sal_False;
+-    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
+-    for( sal_Int16 i = 0; i < nList.getLength(); i++ )
+-    {
+-        bSelected[nList[i]] = sal_True;
+-    }
+-    return bSelected;
+-}
+ 
+-void SAL_CALL 
+-ScVbaListBox::setSelected( const css::uno::Sequence< sal_Bool >& _selected ) throw (css::uno::RuntimeException)
+-{
+-}
+-*/
+ css::uno::Any SAL_CALL 
+ ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
+ {
+@@ -230,6 +207,10 @@ ScVbaListBox::Clear(  ) throw (uno::Runt
+ 	//setValue( uno::makeAny( sal_Int16() ) );
+ 	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
+ }
++
++// this is called when something like the following vba code is used
++// to set the selected state of particular entries in the Listbox
++// ListBox1.Selected( 3 ) = false
+ //PropListener
+ void 
+ ScVbaListBox::setValueEvent( const uno::Any& value )
+@@ -239,7 +220,7 @@ ScVbaListBox::setValueEvent( const uno::
+         throw uno::RuntimeException( rtl::OUString::createFromAscii(
+                     "Invalid type\n. need boolean." ), uno::Reference< uno::XInterface >() );
+     uno::Sequence< sal_Int16 > nList;
+-    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
++    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList;
+     sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
+     sal_Int16 nIndex = m_nIndex;
+     for( sal_Int16 i = 0; i < nLength; i++ )
+@@ -255,7 +236,8 @@ ScVbaListBox::setValueEvent( const uno::
+                     nList[i] = nList[i + 1];
+                 }
+                 nList.realloc( nLength - 1 );
+-                m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
++                //m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
++		m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nList ) );
+                 return;
+             }
+         }
+@@ -276,6 +258,10 @@ ScVbaListBox::setValueEvent( const uno::
+     }
+ }
+ 
++// this is called when something like the following vba code is used
++// to determine the selected state of particular entries in the Listbox
++// msgbox ListBox1.Selected( 3 )
++
+ css::uno::Any 
+ ScVbaListBox::getValueEvent()
+ {
+@@ -292,3 +278,22 @@ ScVbaListBox::getValueEvent()
+ 
+     return uno::makeAny( sal_False );
+ }
++
++rtl::OUString& 
++ScVbaListBox::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaListBox") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaListBox::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.ScVbaListBox" ) );
++	}
++	return aServiceNames;
++}
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalistbox.hxx sc/source/ui/vba/vbalistbox.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbalistbox.hxx	2007-12-07 10:55:31.000000000 +0000
++++ sc/source/ui/vba/vbalistbox.hxx	2008-03-28 14:23:23.000000000 +0000
+@@ -55,11 +55,7 @@ class ScVbaListBox : public ListBoxImpl_
+ 	
  public:
  	ScVbaListBox( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
-                     const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
 -    ScVbaListBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
 -                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
 -                    const css::uno::Reference< css::drawing::XControlShape> xControlShape );
 -
++                    const css::uno::Reference< css::uno::XInterface >& xControl );
  
  	// Attributes
  	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbashape.hxx sc/source/ui/vba/vbashape.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbashape.hxx	2008-03-19 10:56:34.000000000 +0000
-+++ sc/source/ui/vba/vbashape.hxx	2008-03-27 17:05:15.000000000 +0000
+@@ -77,7 +73,11 @@ public:
+ 
+ 	// XDefaultProperty
+     rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+-    
++
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();    
++
+     //PropListener
+     virtual void setValueEvent( const css::uno::Any& value );
+     virtual css::uno::Any getValueEvent();
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaradiobutton.cxx sc/source/ui/vba/vbaradiobutton.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaradiobutton.cxx	2007-12-07 11:00:34.000000000 +0000
++++ sc/source/ui/vba/vbaradiobutton.cxx	2008-03-28 14:27:44.000000000 +0000
+@@ -41,7 +41,7 @@ using namespace org::openoffice;
+ 
+ const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
+ const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
+-ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : RadioButtonImpl_BASE( xContext, xControlShape )
++ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : RadioButtonImpl_BASE( xContext, xControl )
+ {
+ }
+ 
+@@ -79,3 +79,22 @@ ScVbaRadioButton::setValue( sal_Bool _va
+         nValue = 1;
+     m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
+ }
++
++rtl::OUString& 
++ScVbaRadioButton::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaRadioButton::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.RadioButton" ) );
++	}
++	return aServiceNames;
++}
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaradiobutton.hxx sc/source/ui/vba/vbaradiobutton.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaradiobutton.hxx	2007-12-07 11:00:45.000000000 +0000
++++ sc/source/ui/vba/vbaradiobutton.hxx	2008-03-28 14:23:33.000000000 +0000
+@@ -46,12 +46,14 @@ class ScVbaRadioButton : public RadioBut
+ {
+ public:
+     ScVbaRadioButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
++                    const css::uno::Reference< css::uno::XInterface >& xControl );
+    // Attributes
+     virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
+     virtual sal_Bool SAL_CALL getValue() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setValue( sal_Bool _value ) throw (css::uno::RuntimeException);
+-
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
+ #endif //SC_VBA_RADIOBUTTON_HXX
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbashape.hxx sc/source/ui/vba/vbashape.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbashape.hxx	2008-03-29 23:07:54.000000000 +0000
++++ sc/source/ui/vba/vbashape.hxx	2008-03-28 10:30:34.000000000 +0000
 @@ -52,6 +52,7 @@ typedef InheritedHelperInterfaceImpl< Li
  
  class ScVbaShape : public ScVbaShape_BASE
@@ -1900,9 +2176,66 @@
  private:
  protected:
      css::uno::Reference< css::drawing::XShape > m_xShape;
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.cxx sc/source/ui/vba/vbaworksheet.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.cxx	2008-03-19 10:56:34.000000000 +0000
-+++ sc/source/ui/vba/vbaworksheet.cxx	2008-03-27 14:57:30.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbatextbox.cxx sc/source/ui/vba/vbatextbox.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbatextbox.cxx	2007-12-07 11:03:50.000000000 +0000
++++ sc/source/ui/vba/vbatextbox.cxx	2008-03-28 14:28:35.000000000 +0000
+@@ -42,7 +42,7 @@ using namespace org::openoffice;
+ 
+ 
+ 
+-ScVbaTextBox::ScVbaTextBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : TextBoxImpl_BASE( xContext, xControlShape )
++ScVbaTextBox::ScVbaTextBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : TextBoxImpl_BASE( xContext, xControl )
+ {
+ }
+ 
+@@ -103,3 +103,22 @@ ScVbaTextBox::setMultiline( sal_Bool _mu
+     m_xProps->setPropertyValue
+             (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), aValue);
+ }
++
++rtl::OUString& 
++ScVbaTextBox::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaTextBox::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.TextBox" ) );
++	}
++	return aServiceNames;
++}
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbatextbox.hxx sc/source/ui/vba/vbatextbox.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbatextbox.hxx	2007-12-07 11:04:01.000000000 +0000
++++ sc/source/ui/vba/vbatextbox.hxx	2008-03-28 14:23:42.000000000 +0000
+@@ -45,7 +45,7 @@ class ScVbaTextBox : public TextBoxImpl_
+ {
+ public:
+     ScVbaTextBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
++                    const css::uno::Reference< css::uno::XInterface >& xControl );
+    // Attributes
+     virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException);
+@@ -53,6 +53,8 @@ public:
+     virtual void SAL_CALL setMaxLength( sal_Int32 _maxlength ) throw (css::uno::RuntimeException);
+     virtual sal_Bool SAL_CALL getMultiline() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeException);
+-
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
+ #endif //SC_VBA_TEXTBOX_HXX
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.cxx sc/source/ui/vba/vbaworksheet.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.cxx	2008-03-29 23:07:54.000000000 +0000
++++ sc/source/ui/vba/vbaworksheet.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -61,6 +61,7 @@
  #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
  #include <com/sun/star/drawing/XControlShape.hpp>
@@ -2071,9 +2404,9 @@
  }
  
  
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.hxx sc/source/ui/vba/vbaworksheet.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.hxx	2008-03-19 10:56:34.000000000 +0000
-+++ sc/source/ui/vba/vbaworksheet.hxx	2008-03-27 12:28:28.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.hxx sc/source/ui/vba/vbaworksheet.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.hxx	2008-03-29 23:07:54.000000000 +0000
++++ sc/source/ui/vba/vbaworksheet.hxx	2008-03-28 10:30:34.000000000 +0000
 @@ -62,7 +62,7 @@ class ScVbaWorksheet : public WorksheetI
  	css::uno::Reference< oo::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
  	css::uno::Reference< oo::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
@@ -2083,9 +2416,9 @@
  	css::uno::Any getControlShape( const rtl::OUString& sName );
  protected:
  
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/view/viewfun2.cxx sc/source/ui/view/viewfun2.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sc/source/ui/view/viewfun2.cxx	2008-03-19 10:56:43.000000000 +0000
-+++ sc/source/ui/view/viewfun2.cxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/view/viewfun2.cxx sc/source/ui/view/viewfun2.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/view/viewfun2.cxx	2008-03-29 23:08:24.000000000 +0000
++++ sc/source/ui/view/viewfun2.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -62,6 +62,11 @@
  #include <vcl/sound.hxx>
  #include <vcl/waitobj.hxx>
@@ -2098,7 +2431,7 @@
  #include "viewfunc.hxx"
  
  #include "sc.hrc"
-@@ -2091,15 +2096,42 @@ BOOL ScViewFunc::DeleteTable( SCTAB nTab
+@@ -2095,15 +2100,42 @@ BOOL ScViewFunc::DeleteTable( SCTAB nTab
  	return bSuccess;
  }
  
@@ -2141,7 +2474,7 @@
  
  	while ( nNewTab > 0 && !pDoc->IsVisible( nNewTab ) )
  		--nNewTab;
-@@ -2166,9 +2198,18 @@ BOOL ScViewFunc::DeleteTables(const SvSh
+@@ -2170,9 +2202,18 @@ BOOL ScViewFunc::DeleteTables(const SvSh
  
  	for(i=TheTabs.Count()-1;i>=0;i--)
  	{
@@ -2160,7 +2493,7 @@
              pDocSh->Broadcast( ScTablesHint( SC_TAB_DELETED, TheTabs[sal::static_int_cast<USHORT>(i)] ) );
  		}
  	}
-@@ -2196,6 +2237,7 @@ BOOL ScViewFunc::DeleteTables(const SvSh
+@@ -2200,6 +2241,7 @@ BOOL ScViewFunc::DeleteTables(const SvSh
  		pDocSh->PostPaintExtras();
  		pDocSh->SetDocumentModified();
  
@@ -2168,98 +2501,432 @@
          SfxApplication* pSfxApp = SFX_APP();                                // Navigator
          pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
          pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/basicide/basides1.cxx basctl/source/basicide/basides1.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/basicide/basides1.cxx	2008-01-14 16:00:33.000000000 +0000
-+++ basctl/source/basicide/basides1.cxx	2008-03-20 18:10:19.000000000 +0000
-@@ -1229,10 +1229,16 @@ IDEBaseWindow* BasicIDEShell::FindWindow
-                 // return any non-suspended window
-                 return pWin;
-             }
--            else if ( pWin->IsDocument( rDocument ) && pWin->GetLibName() == rLibName && pWin->GetName() == rName &&
-+            else if ( pWin->IsDocument( rDocument ) )
-+            {
-+                OSL_TRACE("FindWindow pWin->GetLibName() %s rLibName %s",
-+			rtl::OUStringToOString( pWin->GetLibName(), RTL_TEXTENCODING_UTF8 ).getStr(),
-+			rtl::OUStringToOString( rLibName, RTL_TEXTENCODING_UTF8 ).getStr() );
-+                OSL_TRACE("pWin->pWin->IsA( TYPE( ModulWindow ) %d && nType %d = BASICIDE_TYPE_MODULE %d", pWin->IsA( TYPE( ModulWindow ) ), nType, BASICIDE_TYPE_MODULE );
-+                OSL_TRACE("pWin->pWin->IsA( TYPE( DialogWindow ) %d && nType %d = BASICIDE_TYPE_DIALOG %d", pWin->IsA( TYPE( DialogWindow ) ), nType, BASICIDE_TYPE_DIALOG );
-+		if (  pWin->GetLibName() == rLibName && pWin->GetName() == rName &&
-                       ( ( pWin->IsA( TYPE( ModulWindow ) )  && nType == BASICIDE_TYPE_MODULE ) ||
-                         ( pWin->IsA( TYPE( DialogWindow ) ) && nType == BASICIDE_TYPE_DIALOG ) ) )
--            {
-                 return pWin;
-             }
-         }
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/basicide/basides2.cxx basctl/source/basicide/basides2.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/basicide/basides2.cxx	2007-11-21 16:37:21.000000000 +0000
-+++ basctl/source/basicide/basides2.cxx	2008-03-20 10:25:13.000000000 +0000
-@@ -252,9 +252,12 @@ ModulWindow* BasicIDEShell::CreateBasWin
- 
-         if ( bSuccess )
-         {
--			// new module window
--			pWin = new ModulWindow( pModulLayout, rDocument, aLibName, aModName, aModule );
--			nKey = InsertWindowInTable( pWin );
-+			pWin = FindBasWin( rDocument, aLibName, aModName, FALSE, TRUE );
-+            if( !pWin )
-+			{    // new module window
-+			    pWin = new ModulWindow( pModulLayout, rDocument, aLibName, aModName, aModule );
-+			    nKey = InsertWindowInTable( pWin );
-+            }
-         }
- 	}
- 	else
-@@ -269,7 +272,8 @@ ModulWindow* BasicIDEShell::CreateBasWin
- 		}
- 		DBG_ASSERT( nKey, "CreateBasWin: Kein Key- Fenster nicht gefunden!" );
- 	}
--	pTabBar->InsertPage( (USHORT)nKey, aModName );
-+    if( nKey )
-+	    pTabBar->InsertPage( (USHORT)nKey, aModName );
- 	pTabBar->Sort();
- 	pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
- 	if ( !pCurWin )
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/basicide/basidesh.cxx	2008-01-14 16:00:46.000000000 +0000
-+++ basctl/source/basicide/basidesh.cxx	2008-03-25 11:09:33.000000000 +0000
-@@ -97,6 +97,9 @@
- #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
- #include <com/sun/star/container/XNameContainer.hpp>
- #endif
-+#include <com/sun/star/container/XContainer.hpp>
-+#include <com/sun/star/container/XContainerListener.hpp>
-+#include <com/sun/star/script/XLibraryContainer.hpp>
- 
- #include <svx/xmlsecctrl.hxx>
- 
-@@ -104,6 +107,71 @@ using namespace ::com::sun::star::uno;
- using namespace ::com::sun::star;
- using ::rtl::OUString;
- 
-+static const rtl::OUString sStandardLibName(  rtl::OUString::createFromAscii("Standard") );
-+
-+typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerBASE;
+--- /dev/null	2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbauserform.hxx	2008-03-29 21:39:06.000000000 +0000
+@@ -0,0 +1,76 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile: vbashape.hxx,v $
++ *
++ *  $Revision: 1.2 $
++ *
++ *  last change: $Author: vg $ $Date: 2007/12/07 11:02:09 $
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_USERFORM_HXX
++#define SC_VBA_USERFORM_HXX
 +
-+class ContainerListenerImpl : public ContainerListenerBASE
-+{
-+    BasicIDEShell* mpShell;
-+public:
++#include <cppuhelper/implbase1.hxx>
++#include <org/openoffice/msforms/XUserForm.hpp>
++#include <com/sun/star/awt/XDialog.hpp>
 +
-+    ContainerListenerImpl( BasicIDEShell* pShell ) : mpShell( pShell ) {}
++#include "vbahelperinterface.hxx"
++#include "vbacontrol.hxx"
 +
-+    ~ContainerListenerImpl() 
-+    {
-+    }
++//typedef InheritedHelperInterfaceImpl1< oo::msforms::XUserForm > ScVbaUserForm_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XUserForm > ScVbaUserForm_BASE;
 +
-+    void addContainerListener( const ScriptDocument& rScriptDocument )
-+    {
-+        uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, sStandardLibName, FALSE ), uno::UNO_QUERY );
-+        if ( rScriptDocument.isDocument() && xContainer.is() )
-+        {
-+            uno::Reference< container::XContainerListener > xContainerListener( this );
-+            try
-+            {
-+                xContainer->addContainerListener( xContainerListener );
++class ScVbaUserForm : public ScVbaUserForm_BASE
++{
++private:
++    css::uno::Reference< css::awt::XDialog > m_xDialog;
++    ScDocShell* m_pDocShell;
++    bool mbDispose;
++protected:
++public:
++    ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
++    virtual ~ScVbaUserForm();
++    // XUserForm
++    virtual void SAL_CALL Show(  ) throw (css::uno::RuntimeException);
++    // XIntrospection
++    virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection(  ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
++    virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
++    virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
++    virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
++    virtual ::rtl::OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException);
++    virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException);
++    virtual void SAL_CALL Hide(  ) throw (css::uno::RuntimeException);
++    virtual void SAL_CALL UnloadObject(  ) throw (css::uno::RuntimeException);
++
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif
+--- /dev/null	2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbauserform.cxx	2008-03-29 22:06:12.000000000 +0000
+@@ -0,0 +1,252 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile: vbashape.cxx,v $
++ *
++ *  $Revision: 1.3 $
++ *
++ *  last change: $Author: kz $ $Date: 2007/12/14 12:41:26 $
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "helperdecl.hxx"
++#include "vbauserform.hxx"
++#include <com/sun/star/awt/XControl.hpp>
++#include <com/sun/star/awt/XControlContainer.hpp>
++#include <basic/sbx.hxx>
++#include <basic/sbstar.hxx>
++#include <basic/sbmeth.hxx>
++#include "unonames.hxx"
++
++using namespace ::org::openoffice;
++using namespace ::com::sun::star;
++
++#define VBA_LEFT "Left"
++#define VBA_TOP "Top"
++class UserFormGeometryHelper : public AbstractGeometryAttributes
++{
++
++    uno::Reference< beans::XPropertySet > mxModel;
++public:
++    UserFormGeometryHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< awt::XControl >& xControl )
++    {
++        mxModel.set( xControl->getModel(), uno::UNO_QUERY_THROW );
++    }
++    virtual double getLeft()
++    {
++	sal_Int32 nLeft = 0;
++	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft;	
++	return Millimeter::getInPoints( nLeft );
++    }
++    virtual void setLeft( double nLeft )
++    {
++        mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nLeft ) ) );
++    }
++    virtual double getTop()
++    {
++	sal_Int32 nTop = 0;
++	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	VBA_TOP ) ) ) >>= nTop;	
++	return nTop;
++    }
++    virtual void setTop( double nTop )
++    {
++	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	VBA_TOP ) ), uno::makeAny( static_cast< sal_Int32 >( nTop ) ) );
++    }
++    virtual double getHeight()
++    {
++	sal_Int32 nHeight = 0;
++	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLHGT ) ) ) >>= nHeight;	
++	return static_cast< double >( nHeight );
++    }
++    virtual void setHeight( double nHeight )
++    {
++	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLHGT ) ), uno::makeAny( static_cast< sal_Int32 >( nHeight ) ) );
++    }
++    virtual double getWidth()
++    {
++	sal_Int32 nWidth = 0;
++	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLWID ) ) ) >>= nWidth;	
++	return static_cast< sal_Int32 >( nWidth );
++    }
++    virtual void setWidth( double nWidth)
++    {
++	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLWID ) ), uno::makeAny(  static_cast< sal_Int32 >( nWidth ) ) );
++    }
++
++
++};
++// some little notes
++// XDialog implementation has the following interesting bits
++// a Controls property ( which is an array of the container controls )
++//   each item in the controls array is a XControl, where the model is 
++//   basically a property bag
++// additionally the XDialog instance has itself a model
++//     this model has a ControlModels ( array of models ) property
++//     the models in ControlModels can be accessed by name
++// also the XDialog is a XControl ( to access the model above
++
++ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) :  ScVbaUserForm_BASE( xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ) ), m_pDocShell( 0 ), mbDispose( true )
++{
++    OSL_TRACE("ScVbaUserForm::ScVbaUserForm()");
++    m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
++    uno::Reference< frame::XModel > xModel = getXSomethingFromArgs< frame::XModel >( aArgs, 2 );
++    uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
++    m_pDocShell = getDocShell( xModel );
++    m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
++    setGeometryHelper( new UserFormGeometryHelper( xContext, xControl ) );
++}
++
++ScVbaUserForm::~ScVbaUserForm()
++{
++    OSL_TRACE("ScVbaUserForm::~ScVbaUserForm()");
++}
++
++void SAL_CALL 
++ScVbaUserForm::Show(  ) throw (uno::RuntimeException)
++{
++	OSL_TRACE("ScVbaUserForm::Show(  )");
++	short aRet = 0;
++	if ( m_xDialog.is() )
++		aRet = m_xDialog->execute();
++	OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet);
++	if ( mbDispose )
++	{
++		try
++		{
++			uno::Reference< lang::XComponent > xComp( m_xDialog, uno::UNO_QUERY_THROW );
++			m_xDialog = NULL;
++			xComp->dispose();
++			mbDispose = false; 
++		}
++		catch( uno::Exception& )
++		{
++		}
++	}
++}
++
++rtl::OUString SAL_CALL 
++ScVbaUserForm::getCaption() throw (::com::sun::star::uno::RuntimeException)
++{
++    rtl::OUString sCaption;
++    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ) ) >>= sCaption;
++    return sCaption;
++}
++void
++ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), uno::makeAny( _caption ) );
++}
++
++void SAL_CALL 
++ScVbaUserForm::Hide(  ) throw (uno::RuntimeException)
++{
++	mbDispose = false;  // hide not dispose
++	if ( m_xDialog.is() )
++		m_xDialog->endExecute();
++}
++
++void SAL_CALL 
++ScVbaUserForm::UnloadObject(  ) throw (uno::RuntimeException)
++{
++	mbDispose = true;
++	if ( m_xDialog.is() )
++		m_xDialog->endExecute();
++}
++
++rtl::OUString& 
++ScVbaUserForm::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaUserForm::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.UserForm" ) );
++	}
++	return aServiceNames;
++}
++
++uno::Reference< beans::XIntrospectionAccess > SAL_CALL 
++ScVbaUserForm::getIntrospection(  ) throw (uno::RuntimeException)
++{
++	return uno::Reference< beans::XIntrospectionAccess >();
++}
++
++uno::Any SAL_CALL 
++ScVbaUserForm::invoke( const ::rtl::OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
++{
++	throw uno::RuntimeException(); // unsupported operation
++}
++
++void SAL_CALL 
++ScVbaUserForm::setValue( const ::rtl::OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
++{
++	throw uno::RuntimeException();
++}
++
++uno::Any SAL_CALL 
++ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
++{
++	//OSL_TRACE("ScVbaUserForm getProperty( %s )", rtl::OUStringToOString( aPropertyName, RTL_TEXTENCODING_UTF8 ).getStr() );
++	uno::Reference< awt::XControlContainer > xContainer( m_xDialog, uno::UNO_QUERY_THROW );
++	uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName );
++	ScVbaControlFactory aFac( mxContext, xControl );
++        uno::Reference< msforms::XControl > xVBAControl( aFac.createControl() );
++        ScVbaControl* pControl  = dynamic_cast< ScVbaControl* >( xVBAControl.get() );
++        pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) );
++	return uno::makeAny( xVBAControl );
++}
++
++::sal_Bool SAL_CALL 
++ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
++{
++	return sal_False;
++}
++
++::sal_Bool SAL_CALL 
++ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
++{
++	uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
++	uno::Reference< container::XNameAccess > xNameAccess( xControl->getModel(), uno::UNO_QUERY_THROW );	
++	return xNameAccess->hasByName( aName );
++}
++
++namespace userform
++{
++namespace sdecl = comphelper::service_decl;
++sdecl::vba_service_class_<ScVbaUserForm, sdecl::with_args<true> > serviceImpl;
++extern sdecl::ServiceDecl const serviceDecl(
++    serviceImpl,
++    "ScVbaUserForm",
++    "org.openoffice.excel.UserForm" );
++}
++
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/basicide/basides1.cxx basctl/source/basicide/basides1.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/basicide/basides1.cxx	2008-01-14 16:00:33.000000000 +0000
++++ basctl/source/basicide/basides1.cxx	2008-03-28 10:30:34.000000000 +0000
+@@ -1229,10 +1229,16 @@ IDEBaseWindow* BasicIDEShell::FindWindow
+                 // return any non-suspended window
+                 return pWin;
+             }
+-            else if ( pWin->IsDocument( rDocument ) && pWin->GetLibName() == rLibName && pWin->GetName() == rName &&
++            else if ( pWin->IsDocument( rDocument ) )
++            {
++                OSL_TRACE("FindWindow pWin->GetLibName() %s rLibName %s",
++			rtl::OUStringToOString( pWin->GetLibName(), RTL_TEXTENCODING_UTF8 ).getStr(),
++			rtl::OUStringToOString( rLibName, RTL_TEXTENCODING_UTF8 ).getStr() );
++                OSL_TRACE("pWin->pWin->IsA( TYPE( ModulWindow ) %d && nType %d = BASICIDE_TYPE_MODULE %d", pWin->IsA( TYPE( ModulWindow ) ), nType, BASICIDE_TYPE_MODULE );
++                OSL_TRACE("pWin->pWin->IsA( TYPE( DialogWindow ) %d && nType %d = BASICIDE_TYPE_DIALOG %d", pWin->IsA( TYPE( DialogWindow ) ), nType, BASICIDE_TYPE_DIALOG );
++		if (  pWin->GetLibName() == rLibName && pWin->GetName() == rName &&
+                       ( ( pWin->IsA( TYPE( ModulWindow ) )  && nType == BASICIDE_TYPE_MODULE ) ||
+                         ( pWin->IsA( TYPE( DialogWindow ) ) && nType == BASICIDE_TYPE_DIALOG ) ) )
+-            {
+                 return pWin;
+             }
+         }
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/basicide/basides2.cxx basctl/source/basicide/basides2.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/basicide/basides2.cxx	2007-11-21 16:37:21.000000000 +0000
++++ basctl/source/basicide/basides2.cxx	2008-03-28 10:30:34.000000000 +0000
+@@ -252,9 +252,12 @@ ModulWindow* BasicIDEShell::CreateBasWin
+ 
+         if ( bSuccess )
+         {
+-			// new module window
+-			pWin = new ModulWindow( pModulLayout, rDocument, aLibName, aModName, aModule );
+-			nKey = InsertWindowInTable( pWin );
++			pWin = FindBasWin( rDocument, aLibName, aModName, FALSE, TRUE );
++            if( !pWin )
++			{    // new module window
++			    pWin = new ModulWindow( pModulLayout, rDocument, aLibName, aModName, aModule );
++			    nKey = InsertWindowInTable( pWin );
++            }
+         }
+ 	}
+ 	else
+@@ -269,7 +272,8 @@ ModulWindow* BasicIDEShell::CreateBasWin
+ 		}
+ 		DBG_ASSERT( nKey, "CreateBasWin: Kein Key- Fenster nicht gefunden!" );
+ 	}
+-	pTabBar->InsertPage( (USHORT)nKey, aModName );
++    if( nKey )
++	    pTabBar->InsertPage( (USHORT)nKey, aModName );
+ 	pTabBar->Sort();
+ 	pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
+ 	if ( !pCurWin )
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/basicide/basidesh.cxx	2008-01-14 16:00:46.000000000 +0000
++++ basctl/source/basicide/basidesh.cxx	2008-03-28 10:30:34.000000000 +0000
+@@ -97,6 +97,9 @@
+ #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+ #include <com/sun/star/container/XNameContainer.hpp>
+ #endif
++#include <com/sun/star/container/XContainer.hpp>
++#include <com/sun/star/container/XContainerListener.hpp>
++#include <com/sun/star/script/XLibraryContainer.hpp>
+ 
+ #include <svx/xmlsecctrl.hxx>
+ 
+@@ -104,6 +107,71 @@ using namespace ::com::sun::star::uno;
+ using namespace ::com::sun::star;
+ using ::rtl::OUString;
+ 
++static const rtl::OUString sStandardLibName(  rtl::OUString::createFromAscii("Standard") );
++
++typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerBASE;
++
++class ContainerListenerImpl : public ContainerListenerBASE
++{
++    BasicIDEShell* mpShell;
++public:
++
++    ContainerListenerImpl( BasicIDEShell* pShell ) : mpShell( pShell ) {}
++
++    ~ContainerListenerImpl() 
++    {
++    }
++
++    void addContainerListener( const ScriptDocument& rScriptDocument )
++    {
++        uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, sStandardLibName, FALSE ), uno::UNO_QUERY );
++        if ( rScriptDocument.isDocument() && xContainer.is() )
++        {
++            uno::Reference< container::XContainerListener > xContainerListener( this );
++            try
++            {
++                xContainer->addContainerListener( xContainerListener );
 +            }
 +            catch( uno::Exception& ) {}
 +        }
@@ -2390,9 +3057,9 @@
          m_aCurLibName = aLibName;
          if ( bUpdateWindows )
              UpdateWindows();
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/scriptdocument.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/basicide/scriptdocument.cxx	2007-10-09 16:24:54.000000000 +0100
-+++ basctl/source/basicide/scriptdocument.cxx	2008-03-20 11:00:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/scriptdocument.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/basicide/scriptdocument.cxx	2007-10-09 16:24:54.000000000 +0100
++++ basctl/source/basicide/scriptdocument.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -61,6 +61,7 @@
  #include <com/sun/star/frame/XModel2.hpp>
  #include <com/sun/star/awt/XWindow2.hpp>
@@ -2442,9 +3109,9 @@
          return true;
      }
  
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/inc/basidesh.hxx basctl/source/inc/basidesh.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basctl/source/inc/basidesh.hxx	2007-10-09 16:25:06.000000000 +0100
-+++ basctl/source/inc/basidesh.hxx	2008-03-20 15:54:09.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/inc/basidesh.hxx basctl/source/inc/basidesh.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basctl/source/inc/basidesh.hxx	2007-10-09 16:25:06.000000000 +0100
++++ basctl/source/inc/basidesh.hxx	2008-03-28 10:30:34.000000000 +0000
 @@ -62,7 +62,7 @@
  #ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
  #include <com/sun/star/io/XInputStreamProvider.hpp>
@@ -2479,9 +3146,9 @@
  
  #if _SOLAR__PRIVATE
  	void				Init();
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/inc/basic/sbdef.hxx basic/inc/basic/sbdef.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/inc/basic/sbdef.hxx	2007-04-11 13:51:38.000000000 +0100
-+++ basic/inc/basic/sbdef.hxx	2008-03-20 14:07:06.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/inc/basic/sbdef.hxx basic/inc/basic/sbdef.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/inc/basic/sbdef.hxx	2007-04-11 13:51:38.000000000 +0100
++++ basic/inc/basic/sbdef.hxx	2008-03-28 10:30:34.000000000 +0000
 @@ -100,6 +100,8 @@ void setBasicWatchMode( bool bOn );
  
  #define SBXID_BASIC			0x6273			// sb: StarBASIC
@@ -2491,9 +3158,9 @@
  #define SBXID_BASICPROP		0x7262			// pr: StarBASIC-Property
  #define	SBXID_BASICMETHOD	0x6d65          // me: StarBASIC-Methode
  #define	SBXID_JSCRIPTMOD	0x6a62			// jm: JavaScript-Modul
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/inc/basic/sbstar.hxx basic/inc/basic/sbstar.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/inc/basic/sbstar.hxx	2007-08-30 10:58:14.000000000 +0100
-+++ basic/inc/basic/sbstar.hxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/inc/basic/sbstar.hxx basic/inc/basic/sbstar.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/inc/basic/sbstar.hxx	2007-08-30 10:58:14.000000000 +0100
++++ basic/inc/basic/sbstar.hxx	2008-03-28 10:30:34.000000000 +0000
 @@ -51,6 +51,7 @@
  
  #include <basic/sbdef.hxx>
@@ -2529,9 +3196,9 @@
  
  	// #60175 TRUE: SFX-Resource wird bei Basic-Fehlern nicht angezogen
  	static void StaticSuppressSfxResource( BOOL bSuppress );
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/inc/basic/sbxobj.hxx basic/inc/basic/sbxobj.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/inc/basic/sbxobj.hxx	2007-04-11 13:55:16.000000000 +0100
-+++ basic/inc/basic/sbxobj.hxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/inc/basic/sbxobj.hxx basic/inc/basic/sbxobj.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/inc/basic/sbxobj.hxx	2007-04-11 13:55:16.000000000 +0100
++++ basic/inc/basic/sbxobj.hxx	2008-03-28 10:30:34.000000000 +0000
 @@ -80,7 +80,7 @@ public:
  	virtual SbxClassType GetClass() const;
  	virtual void Clear();
@@ -2541,9 +3208,9 @@
  	const String& GetClassName() const { return aClassName; }
  	void		  SetClassName( const String &rNew ) { aClassName = rNew; }
  	// Default-Property
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/basmgr/basmgr.cxx basic/source/basmgr/basmgr.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/basmgr/basmgr.cxx	2007-08-30 10:58:48.000000000 +0100
-+++ basic/source/basmgr/basmgr.cxx	2008-03-20 15:18:11.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/basmgr/basmgr.cxx basic/source/basmgr/basmgr.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/basmgr/basmgr.cxx	2007-08-30 10:58:48.000000000 +0100
++++ basic/source/basmgr/basmgr.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -102,6 +102,8 @@
  #include <com/sun/star/script/XStarBasicDialogInfo.hpp>
  #include <com/sun/star/script/XStarBasicLibraryInfo.hpp>
@@ -2650,29 +3317,9 @@
  
  		pLib->SetModified( FALSE );
  	}
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/classes/eventatt.cxx basic/source/classes/eventatt.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/classes/eventatt.cxx	2008-03-19 10:56:33.000000000 +0000
-+++ basic/source/classes/eventatt.cxx	2008-03-26 11:36:15.000000000 +0000
-@@ -505,7 +505,6 @@ void RTL_Impl_CreateUnoDialog( StarBASIC
- {
- 	static OUString aResourceResolverPropName = OUString::createFromAscii( "ResourceResolver" );
- 
--    (void)pBasic;
-     (void)bWrite;
-     
- 	Reference< XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory() );
-@@ -576,7 +575,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC
- 	}
- 
- 	// Find dialog library for dialog, direct access is not possible here
--    StarBASIC* pStartedBasic = pINST->GetBasic();
-+    StarBASIC* pStartedBasic = pINST ? pBasic : pINST->GetBasic();
- 	SbxObject* pParentBasic = pStartedBasic ? pStartedBasic->GetParent() : NULL;
- 	SbxObject* pParentParentBasic = pParentBasic ? pParentBasic->GetParent() : NULL;
- 
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/classes/sb.cxx basic/source/classes/sb.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/classes/sb.cxx	2008-03-19 10:56:58.000000000 +0000
-+++ basic/source/classes/sb.cxx	2008-03-20 15:18:11.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/classes/sb.cxx basic/source/classes/sb.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/classes/sb.cxx	2008-03-29 23:08:18.000000000 +0000
++++ basic/source/classes/sb.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -70,6 +70,7 @@
  #include "disas.hxx"
  #include "runtime.hxx"
@@ -2748,9 +3395,9 @@
  			// Sonst testen, ob das Element vorhanden ist
  			// GBLSEARCH-Flag rausnehmen (wg. Rekursion)
  			USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/classes/sbxmod.cxx basic/source/classes/sbxmod.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/classes/sbxmod.cxx	2008-03-19 10:56:58.000000000 +0000
-+++ basic/source/classes/sbxmod.cxx	2008-03-26 16:06:20.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/classes/sbxmod.cxx basic/source/classes/sbxmod.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/classes/sbxmod.cxx	2008-03-29 23:08:19.000000000 +0000
++++ basic/source/classes/sbxmod.cxx	2008-03-29 21:24:15.000000000 +0000
 @@ -62,6 +62,9 @@
  #include "sbunoobj.hxx"
  #include <basic/hilight.hxx>
@@ -2789,7 +3436,7 @@
  
  SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4)
  SV_IMPL_VARARR(SbiBreakpoints,USHORT)
-@@ -1903,6 +1919,275 @@ void SyntaxHighlighter::getHighlightPort
+@@ -1903,6 +1919,230 @@ void SyntaxHighlighter::getHighlightPort
  	m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions );
  }
  
@@ -2903,6 +3550,7 @@
 +    }
 +    virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException)
 +    {
++        OSL_TRACE("** Userform/Dialog disposing");
 +        mbDisposed = true;
 +        uno::Any aSource;
 +        aSource <<= Source;   
@@ -2913,56 +3561,22 @@
 +};
 +
 +
-+static const char pHideStr[]	= "Hide";
-+USHORT SbUserFormModule::nHideHash = 0;
-+
 +SbUserFormModule::SbUserFormModule( const rtl::OUString& rName, const com::sun::star::script::ModuleInfo& mInfo )
 +    :SbObjModule( rName, mInfo ), m_bUnloaded( true )
 +{
-+    if ( !nHideHash )
-+        nHideHash = MakeHashCode( String::CreateFromAscii( pHideStr ) );
-+    SbxVariable* p = Make( String::CreateFromAscii( pHideStr ), SbxCLASS_METHOD, SbxEMPTY );;
-+    p->SetFlag( SBX_DONTSTORE );
-+}
-+
-+void SbUserFormModule::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1, const SfxHint& rHint, const TypeId& rId2 )
-+{
-+    const SbxHint* p = PTR_CAST(SbxHint,&rHint);
-+    if( p )
-+    {
-+        ULONG nId = p->GetId();
-+        BOOL bRead  = BOOL( nId == SBX_HINT_DATAWANTED );
-+        BOOL bWrite = BOOL( nId == SBX_HINT_DATACHANGED );
-+        SbxVariable* pVar = p->GetVar();
-+        XubString aVarName( pVar->GetName() );
-+
-+        if( bRead || bWrite )        
-+        {
-+            if( pVar->GetHashCode() == nHideHash && aVarName.EqualsIgnoreCaseAscii( pHideStr ) )
-+                Hide();
-+            else
-+                return SbObjModule::SFX_NOTIFY( rCst, rId1, rHint, rId2 );
-+        }
-+        else 
-+            SbObjModule::SFX_NOTIFY( rCst, rId1, rHint, rId2 );
-+    }
 +}
 +
-+ void SbUserFormModule::ResetApiObj( bool bUnload )
++void SbUserFormModule::ResetApiObj( bool bUnload )
 +{
-+    // trigger terminate event
-+    pDocObject = NULL;
-+    m_xDialog = NULL;
-+    if ( bUnload )
-+    {
-+        triggerTerminateEvent();
-+        m_bUnloaded = true;
-+    }
++        pDocObject = NULL;
++	m_xDialog = NULL;
++        //triggerTerminateEvent();
 +}
 +
 +void SbUserFormModule::triggerInitializeEvent( void )
 +
 +{
++        OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent");
 +	static String aInitMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Initialize") );
 +
 +	// Search method
@@ -2976,6 +3590,7 @@
 +
 +void SbUserFormModule::triggerTerminateEvent( void )
 +{
++        OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent");
 +	static String aTermMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Terminate") );
 +
 +	// Search method
@@ -2989,29 +3604,19 @@
 +
 +void SbUserFormModule::Unload()
 +{
-+    if ( m_xDialog.is() )
-+        m_xDialog->endExecute();
-+}
-+
-+// it makes sense to support Hide here rather than at the api
-+// object only because we do an awful simulation of Hide for the Userform.
-+// In MSO Hide doesn't dispose the userform, it merely makes it inactive 
-+// and no longer displayes it.  But openoffice doesn't (yet) support hide 
-+// so we simulate it by terminating the dialog ( via endExecute ) but.. 
-+// we don't want to call the terminate handler, hence the hackfest below
-+void SbUserFormModule::Hide()
-+{
-+    GetObject(); // if the object is unloaded, then we need to load
-+    FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() );
-+    if ( pFormListener )
-+        pFormListener->removeListener();
-+    // need to take a local reference because we will reset it in ResetApiObj
-+    uno::Reference< awt::XDialog > xDialog = m_xDialog; 
-+    if ( xDialog.is() )
++    OSL_TRACE("** Unload() "); // #FIXME the rtl method should just call find on "Unload"
++    if ( m_xDialog.is() )      // this whole method can be gotten rid of 
 +    {
-+        ResetApiObj( false );
-+        xDialog->endExecute();
++	triggerTerminateEvent();
 +    }
++	// Search method
++	SbxVariable* pMeth = SbObjModule::Find( String( RTL_CONSTASCII_USTRINGPARAM( "UnloadObject" ) ), SbxCLASS_METHOD );
++	if( pMeth )
++	{
++		OSL_TRACE("Attempting too run the UnloadObjectMethod");
++		SbxValues aVals;
++		pMeth->Get( aVals );
++	}
 +}
 +
 +void SbUserFormModule::InitObject()
@@ -3045,10 +3650,7 @@
 +            m_DialogListener = new FormObjEventListenerImpl( this, xComponent );
 +
 +            // trigger initialise event
-+            if ( m_bUnloaded )
-+                triggerInitializeEvent();
-+
-+            m_bUnloaded = false;
++            triggerInitializeEvent();
 +        } 
 +    }
 +    catch( uno::Exception& e )
@@ -3065,9 +3667,9 @@
  
  /////////////////////////////////////////////////////////////////////////
  // Implementation SbJScriptModule (Basic-Modul fuer JavaScript-Sourcen)
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/runtime/methods1.cxx basic/source/runtime/methods1.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/runtime/methods1.cxx	2007-09-20 16:55:19.000000000 +0100
-+++ basic/source/runtime/methods1.cxx	2008-03-25 23:39:30.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/runtime/methods1.cxx basic/source/runtime/methods1.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/runtime/methods1.cxx	2007-09-20 16:55:19.000000000 +0100
++++ basic/source/runtime/methods1.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -60,6 +60,9 @@
  #ifndef _SBX_HXX
  #include <basic/sbx.hxx>
@@ -3113,9 +3715,9 @@
  		refVar->PutObject( pClassModuleObject );
 -	}
  }
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/runtime/methods.cxx basic/source/runtime/methods.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/runtime/methods.cxx	2008-03-19 10:56:58.000000000 +0000
-+++ basic/source/runtime/methods.cxx	2008-03-26 16:11:22.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/runtime/methods.cxx basic/source/runtime/methods.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/runtime/methods.cxx	2008-03-29 23:08:19.000000000 +0000
++++ basic/source/runtime/methods.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -152,6 +152,8 @@ using namespace com::sun::star::io;
  #include <io.h>
  #endif
@@ -3139,9 +3741,9 @@
  	{
  		SbxVariable* pVar = ((SbxObject*)pObj)->
  			Find( String( RTL_CONSTASCII_USTRINGPARAM("Unload") ), SbxCLASS_METHOD );
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/runtime/runtime.cxx basic/source/runtime/runtime.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/runtime/runtime.cxx	2008-03-19 10:56:58.000000000 +0000
-+++ basic/source/runtime/runtime.cxx	2008-03-26 15:54:36.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/runtime/runtime.cxx basic/source/runtime/runtime.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/runtime/runtime.cxx	2008-03-29 23:08:19.000000000 +0000
++++ basic/source/runtime/runtime.cxx	2008-03-29 00:19:02.000000000 +0000
 @@ -82,6 +82,17 @@ void StarBASIC::StaticEnableReschedule( 
  {
      bStaticGlobalEnableReschedule = bReschedule;
@@ -3160,9 +3762,9 @@
  
  
  struct SbiArgvStack {					// Argv stack:
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/sbx/sbxobj.cxx basic/source/sbx/sbxobj.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/sbx/sbxobj.cxx	2007-06-27 15:31:34.000000000 +0100
-+++ basic/source/sbx/sbxobj.cxx	2008-03-20 10:25:13.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/sbx/sbxobj.cxx basic/source/sbx/sbxobj.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/sbx/sbxobj.cxx	2007-06-27 15:31:34.000000000 +0100
++++ basic/source/sbx/sbxobj.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -187,7 +187,7 @@ void SbxObject::SFX_NOTIFY( SfxBroadcast
  	}
  }
@@ -3172,9 +3774,9 @@
  {
  	return BOOL( aClassName.EqualsIgnoreCaseAscii( rName ) );
  }
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/uno/namecont.cxx basic/source/uno/namecont.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/basic/source/uno/namecont.cxx	2008-02-26 17:01:46.000000000 +0000
-+++ basic/source/uno/namecont.cxx	2008-03-20 15:18:11.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/uno/namecont.cxx basic/source/uno/namecont.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/uno/namecont.cxx	2008-02-26 17:01:46.000000000 +0000
++++ basic/source/uno/namecont.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -139,6 +139,9 @@
  #endif
  #include <basic/sbmod.hxx>
@@ -3203,9 +3805,105 @@
  		throw IllegalArgumentException();
  
  	NameContainerNameMap::iterator aIt = mHashMap.find( aName );
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sfx2/source/doc/docmacromode.cxx sfx2/source/doc/docmacromode.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/sfx2/source/doc/docmacromode.cxx	2008-01-24 15:54:21.000000000 +0000
-+++ sfx2/source/doc/docmacromode.cxx	2008-03-25 12:38:22.000000000 +0000
+--- /dev/null	2007-05-04 11:54:36.000000000 +0100
++++ basic/inc/basic/sbobjmod.hxx	2008-03-29 21:24:47.000000000 +0000
+@@ -0,0 +1,93 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile: sbobjmod.hxx,v $
++ *
++ *  $Revision: 1.4 $
++ *
++ *  last change: $Author:  $ $Date: 2007/08/27 16:31:39 $
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#ifndef _SB_OBJMOD_HXX
++#define _SB_OBJMOD_HXX
++
++#include <basic/sbmod.hxx>
++#include <basic/sbstar.hxx>
++#include <com/sun/star/script/ModuleInfo.hpp>
++#include <com/sun/star/lang/XEventListener.hpp>
++#include <com/sun/star/awt/XDialog.hpp>
++
++namespace css = ::com::sun::star;
++
++// Basic-Module for excel object.
++
++class SbObjModule : public SbModule
++{
++protected:
++    com::sun::star::script::ModuleInfo m_mInfo;
++    SbxObjectRef pDocObject; // a vba api object.
++    virtual void InitObject();
++public:
++    TYPEINFO();
++	SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_DOCUMENTMOD,2);
++    SbObjModule( const rtl::OUString& rName, const com::sun::star::script::ModuleInfo& mInfo );
++    virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
++    SbxVariable* GetObject();
++	virtual BOOL  IsClass( const String& );
++};
++
++class SbUserFormModule : public SbObjModule
++{
++    css::uno::Reference<css::lang::XEventListener> m_DialogListener;
++    css::uno::Reference<css::awt::XDialog> m_xDialog;
++    String sFormName;
++
++    bool m_bUnloaded;
++    static USHORT nHideHash;
++protected:
++    virtual void InitObject();
++public:
++    TYPEINFO();
++	SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_USERFORMMOD,2);
++    SbUserFormModule( const rtl::OUString& rName, const com::sun::star::script::ModuleInfo& mInfo );
++    virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
++    void ResetApiObj( bool bUnloaded = true );
++    void Unload();
++    void triggerInitializeEvent();
++    void triggerTerminateEvent();
++};
++
++SV_DECL_IMPL_REF(SbUserFormModule);
++#ifndef __SB_SBOBJMODULEREF_HXX
++#define __SB_SBOBJMODULEREF_HXX
++
++SV_DECL_IMPL_REF(SbObjModule);
++
++#endif
++#endif
++
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sfx2/source/doc/docmacromode.cxx sfx2/source/doc/docmacromode.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sfx2/source/doc/docmacromode.cxx	2008-01-24 15:54:21.000000000 +0000
++++ sfx2/source/doc/docmacromode.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -45,6 +45,7 @@
  #include <com/sun/star/task/DocumentMacroConfirmationRequest.hpp>
  #include <com/sun/star/task/InteractionClassification.hpp>
@@ -3280,20 +3978,59 @@
  				    }
  			    }
  		    }
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/makefile.mk oovbaapi/org/openoffice/msforms/makefile.mk
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/makefile.mk	2008-03-19 10:56:58.000000000 +0000
-+++ oovbaapi/org/openoffice/msforms/makefile.mk	2008-03-20 13:59:37.000000000 +0000
-@@ -60,6 +60,7 @@ IDLFILES=\
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/makefile.mk oovbaapi/org/openoffice/msforms/makefile.mk
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/makefile.mk	2008-03-29 23:08:19.000000000 +0000
++++ oovbaapi/org/openoffice/msforms/makefile.mk	2008-03-28 18:04:39.000000000 +0000
+@@ -60,7 +60,9 @@ IDLFILES=\
  	XPictureFormat.idl \
  	XShapeRange.idl \
  	XTextBoxShape.idl \
+-	XListBox.idl 
 +	XUserForm.idl \
- 	XListBox.idl 
++	XListBox.idl \
++	XToggleButton.idl
  
  # ------------------------------------------------------------------
+ 
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/XControl.idl oovbaapi/org/openoffice/msforms/XControl.idl
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/XControl.idl	2007-12-07 12:14:42.000000000 +0000
++++ oovbaapi/org/openoffice/msforms/XControl.idl	2008-03-28 10:30:34.000000000 +0000
+@@ -42,12 +42,16 @@
+ 
+ //=============================================================================
+ 
+-module org {  module openoffice {  module msforms { 
++#ifndef __org_openoffice_vba_XHelperInterface_idl__
++#include <org/openoffice/vba/XHelperInterface.idl>
++#endif
+ 
++module org {  module openoffice {  module msforms { 
+ 
+ //=============================================================================
+-interface XControl: com::sun::star::uno::XInterface
++interface XControl
+ {
++	interface ::org::openoffice::vba::XHelperInterface;
+ 	[attribute] boolean Enabled;
+ 	[attribute] boolean Visible;
+     //Size. there are some defferent between Mso and OOo.
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl	2007-04-27 08:32:41.000000000 +0100
++++ oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl	2008-03-28 10:30:34.000000000 +0000
+@@ -50,5 +50,10 @@ interface XVBAToOOEventDescGen : com::su
+ 	com::sun::star::script::XScriptEventsSupplier getEventSupplier( [in] com::sun::star::uno::XInterface xControl );
+ };
+ 
++interface XFakeVBAEventDescriptorSupplier : com::sun::star::uno::XInterface
++{
++	sequence< com::sun::star::script::ScriptEventDescriptor >  getEventDescriptions( [in] com::sun::star::uno::XInterface xControl );
++};
++
+ }; }; };
+ #endif
 --- /dev/null	2007-05-04 11:54:36.000000000 +0100
-+++ oovbaapi/org/openoffice/msforms/XUserForm.idl	2008-03-27 22:43:22.000000000 +0000
-@@ -0,0 +1,54 @@
++++ oovbaapi/org/openoffice/msforms/XUserForm.idl	2008-03-29 21:26:04.000000000 +0000
+@@ -0,0 +1,56 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -3344,34 +4081,15 @@
 +	interface ::com::sun::star::script::XInvocation;
 +    [attribute] string Caption;
 +    void Show();
++    void Hide();
++    void UnloadObject();
 +};
 +}; }; };
 +
 +#endif
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/XControl.idl	2007-12-07 12:14:42.000000000 +0000
-+++ oovbaapi/org/openoffice/msforms/XControl.idl	2008-03-28 10:24:19.000000000 +0000
-@@ -42,12 +42,16 @@
- 
- //=============================================================================
- 
--module org {  module openoffice {  module msforms { 
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
- 
-+module org {  module openoffice {  module msforms { 
- 
- //=============================================================================
--interface XControl: com::sun::star::uno::XInterface
-+interface XControl
- {
-+	interface ::org::openoffice::vba::XHelperInterface;
- 	[attribute] boolean Enabled;
- 	[attribute] boolean Visible;
-     //Size. there are some defferent between Mso and OOo.
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/forms/source/inc/InterfaceContainer.hxx forms/source/inc/InterfaceContainer.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/forms/source/inc/InterfaceContainer.hxx	2007-01-29 15:46:36.000000000 +0000
-+++ forms/source/inc/InterfaceContainer.hxx	2008-03-25 12:59:07.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/forms/source/inc/InterfaceContainer.hxx forms/source/inc/InterfaceContainer.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/forms/source/inc/InterfaceContainer.hxx	2007-01-29 15:46:36.000000000 +0000
++++ forms/source/inc/InterfaceContainer.hxx	2008-03-28 10:30:34.000000000 +0000
 @@ -319,6 +319,9 @@ protected:
  	void implCheckIndex( const sal_Int32 _nIndex ) SAL_THROW( ( ::com::sun::star::lang::IndexOutOfBoundsException ) );
  
@@ -3382,9 +4100,9 @@
  	// the runtime event format has changed from version SO5.2 to OOo
  	enum EventFormat
  	{
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/forms/source/misc/InterfaceContainer.cxx forms/source/misc/InterfaceContainer.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/forms/source/misc/InterfaceContainer.cxx	2006-12-01 16:55:25.000000000 +0000
-+++ forms/source/misc/InterfaceContainer.cxx	2008-03-25 12:59:07.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/forms/source/misc/InterfaceContainer.cxx forms/source/misc/InterfaceContainer.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/forms/source/misc/InterfaceContainer.cxx	2006-12-01 16:55:25.000000000 +0000
++++ forms/source/misc/InterfaceContainer.cxx	2008-03-28 10:30:34.000000000 +0000
 @@ -105,11 +105,14 @@
  #include <rtl/logfile.hxx>
  #endif
@@ -3563,9 +4281,9 @@
      return aReturn;
  }
  
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/forms/source/misc/makefile.mk forms/source/misc/makefile.mk
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/forms/source/misc/makefile.mk	2005-09-09 00:01:56.000000000 +0100
-+++ forms/source/misc/makefile.mk	2008-03-25 12:59:07.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/forms/source/misc/makefile.mk forms/source/misc/makefile.mk
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/forms/source/misc/makefile.mk	2005-09-09 00:01:56.000000000 +0100
++++ forms/source/misc/makefile.mk	2008-03-28 10:30:34.000000000 +0000
 @@ -48,6 +48,7 @@ ENABLE_EXCEPTIONS=TRUE
  # --- Types -------------------------------------
  
@@ -3587,9 +4305,22 @@
 +        +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
 +        echo $@
 +
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/scripting/source/vbaevents/eventhelper.cxx scripting/source/vbaevents/eventhelper.cxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/scripting/source/vbaevents/eventhelper.cxx	2008-03-19 10:56:58.000000000 +0000
-+++ scripting/source/vbaevents/eventhelper.cxx	2008-03-26 09:32:15.000000000 +0000
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/scripting/source/dlgprov/dlgevtatt.hxx scripting/source/dlgprov/dlgevtatt.hxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/scripting/source/dlgprov/dlgevtatt.hxx	2008-03-29 23:07:53.000000000 +0000
++++ scripting/source/dlgprov/dlgevtatt.hxx	2008-03-28 12:09:13.000000000 +0000
+@@ -68,6 +68,9 @@
+ #include <com/sun/star/script/XScriptEventsSupplier.hpp>
+ 
+ #include <hash_map>
++
++#define FAKE_VBA_EVENT_SUPPORT 1 
++
+ //.........................................................................
+ namespace dlgprov
+ {
+diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/scripting/source/vbaevents/eventhelper.cxx scripting/source/vbaevents/eventhelper.cxx
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/scripting/source/vbaevents/eventhelper.cxx	2008-03-29 23:08:19.000000000 +0000
++++ scripting/source/vbaevents/eventhelper.cxx	2008-03-29 00:44:15.000000000 +0000
 @@ -94,7 +94,7 @@ Sequence< ::rtl::OUString> getEventMetho
      return aNames;
  }
@@ -3607,7 +4338,26 @@
  
  bool isKeyEventOk( awt::KeyEvent& evt, const Sequence< Any >& params )
  {
-@@ -393,41 +394,17 @@ eventMethodToDescriptors( const ::rtl::O
+@@ -277,6 +278,9 @@ EventInfoHash& getEventTransInfo()
+         info.sVBAName = rtl::OUString::createFromAscii("_Click");
+         info.toVBA = NULL;
+         actionInfos.push_back( info );
++        info.sVBAName = rtl::OUString::createFromAscii("_Change");
++        info.toVBA = NULL;
++        actionInfos.push_back( info );
+         eventTransInfo[ rtl::OUString::createFromAscii("actionPerformed") ] = actionInfos;
+         // changed ooo event
+         std::list< TranslateInfo > changeInfos;
+@@ -336,7 +340,7 @@ EventInfoHash& getEventTransInfo()
+         eventTransInfo[ rtl::OUString::createFromAscii("mousePressed") ] = mousePressedInfos;
+         // mouseMoved ooo event
+         std::list< TranslateInfo > mouseMovedInfos;
+-        info.sVBAName = rtl::OUString::createFromAscii("_MouseMoved");
++        info.sVBAName = rtl::OUString::createFromAscii("_MouseMove");
+         info.toVBA = ooMouseEvtToVBAMouseEvt;
+         mouseMovedInfos.push_back( info );
+         eventTransInfo[ rtl::OUString::createFromAscii("mouseMoved") ] = mouseMovedInfos;
+@@ -393,41 +397,17 @@ eventMethodToDescriptors( const ::rtl::O
      EventInfoHash::const_iterator eventInfo_it = infos.find( sMethodName );
      EventInfoHash::const_iterator it_end = infos.end();
  
@@ -3657,7 +4407,7 @@
      return false;
  
  }
-@@ -522,8 +499,10 @@ ScriptEventFactory::getEventListeners( c
+@@ -522,8 +502,10 @@ ScriptEventFactory::getEventListeners( c
          Reference< beans::XIntrospection > xIntrospection( 
              xMFac->createInstanceWithContext( rtl::OUString( 
                  RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.beans.Introspection"  ) ), instance().m_xCtx ), UNO_QUERY );
@@ -3670,7 +4420,7 @@
          Reference< beans::XIntrospectionAccess > xIntrospectionAccess;
  	if  ( xIntrospection.is() )
  	{
-@@ -583,7 +562,8 @@ ScriptEventFactory::createEvents( const 
+@@ -583,7 +565,8 @@ ScriptEventFactory::createEvents( const 
          ::rtl::OUString sNoNameSpaceMethod = *pSrc;
          if ( ( lastDotIndex = pSrc->lastIndexOf( '.' ) ) > -1 )
              sNoNameSpaceMethod = sNoNameSpaceMethod.copy( lastDotIndex + 1 );
@@ -3680,7 +4430,7 @@
          if ( eventMethodToDescriptors( sNoNameSpaceMethod, xControl, sLibModName, sHandlerExts, evtDescs ) )
          {
              sal_Int32 dIndex = nEvts;
-@@ -826,13 +806,23 @@ EventListener::getPropertySetInfo(  ) th
+@@ -826,13 +809,23 @@ EventListener::getPropertySetInfo(  ) th
  void
  EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeException)
  {
@@ -3705,7 +4455,7 @@
      //dumpEvent( evt );
      EventInfoHash& infos = getEventTransInfo();
      EventInfoHash::const_iterator eventInfo_it = infos.find( evt.MethodName );
-@@ -858,14 +848,11 @@ EventListener::firing_Impl(const ScriptE
+@@ -858,14 +851,11 @@ EventListener::firing_Impl(const ScriptE
          {
              // see if we have a match for the handlerextension
              // where ScriptCode is methodname_handlerextension 
@@ -3725,7 +4475,7 @@
              {
                  // !! translate arguments & emulate events where necessary 
                  Sequence< Any > aArguments;
-@@ -881,7 +868,7 @@ EventListener::firing_Impl(const ScriptE
+@@ -881,7 +871,7 @@ EventListener::firing_Impl(const ScriptE
                      static rtl::OUString part2 = rtl::OUString::createFromAscii("?language=Basic&location=document"); 
  
                      // create script url
@@ -3734,7 +4484,7 @@
                   
                      OSL_TRACE("script url = %s",
                          rtl::OUStringToOString( url, 
-@@ -893,16 +880,7 @@ EventListener::firing_Impl(const ScriptE
+@@ -893,16 +883,7 @@ EventListener::firing_Impl(const ScriptE
                      {
                          uno::Reference< script::provider::XScript > xScript = xScriptProvider->getScript( url );
                          if ( xScript.is() )
@@ -3753,17 +4503,147 @@
                      catch ( uno::Exception& e )
                      {
 --- /dev/null	2007-05-04 11:54:36.000000000 +0100
-+++ basic/inc/basic/sbobjmod.hxx	2008-03-26 16:06:26.000000000 +0000
-@@ -0,0 +1,95 @@
++++ oovbaapi/org/openoffice/msforms/XToggleButton.idl	2008-03-28 18:06:47.000000000 +0000
+@@ -0,0 +1,60 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile: XButton.idl,v $
++ *
++ *  $Revision: 1.2 $
++ *
++ *  last change: $Author: vg $ $Date: 2007/12/07 12:14:23 $
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef __org_openoffice_msforms_XToggleButton_idl__
++#define __org_openoffice_msforms_XToggleButton_idl__
++
++#ifndef __org_openoffice_msforms_XButton_idl__
++#include <org/openoffice/msforms/XButton.idl>
++#endif
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
++
++module org {  module openoffice {  module msforms { 
++//=============================================================================
++interface XToggleButton
++{
++	interface XButton;
++	[attribute] any Value; 
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+--- /dev/null	2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbatogglebutton.hxx	2008-03-28 22:48:49.000000000 +0000
+@@ -0,0 +1,64 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile: vbabutton.hxx,v $
++ *
++ *  $Revision: 1.2 $
++ *
++ *  last change: $Author: vg $ $Date: 2007/12/07 10:45:09 $
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_TOGGLEBUTTON_HXX
++#define SC_VBA_TOGGLEBUTTON_HXX
++#include <cppuhelper/implbase2.hxx>
++#include <org/openoffice/msforms/XToggleButton.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XToggleButton, css::script::XDefaultProperty  > ToggleButtonImpl_BASE;
++
++class ScVbaToggleButton : public ToggleButtonImpl_BASE
++{
++	rtl::OUString msDftPropName;
++public:
++    ScVbaToggleButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
++                    const css::uno::Reference< css::uno::XInterface >& xControl );
++    ~ScVbaToggleButton();
++   // Attributes
++    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
++
++    virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    // XDefaultProperty
++    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++};
++#endif //SC_VBA_TOGGLEBUTTON_HXX
+--- /dev/null	2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbatogglebutton.cxx	2008-03-28 22:49:45.000000000 +0000
+@@ -0,0 +1,108 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
 + *
-+ *  $RCSfile: sbobjmod.hxx,v $
++ *  $RCSfile: vbabutton.cxx,v $
 + *
-+ *  $Revision: 1.4 $
++ *  $Revision: 1.2 $
 + *
-+ *  last change: $Author:  $ $Date: 2007/08/27 16:31:39 $
++ *  last change: $Author: vg $ $Date: 2007/12/07 10:44:58 $
 + *
 + *  The Contents of this file are made available subject to
 + *  the terms of GNU Lesser General Public License Version 2.1.
@@ -3789,120 +4669,241 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
++#include "vbatogglebutton.hxx"
++#include <vector>
 +
-+#ifndef _SB_OBJMOD_HXX
-+#define _SB_OBJMOD_HXX
++using namespace com::sun::star;
++using namespace org::openoffice;
 +
-+#include <basic/sbmod.hxx>
-+#include <basic/sbstar.hxx>
-+#include <com/sun/star/script/ModuleInfo.hpp>
-+#include <com/sun/star/lang/XEventListener.hpp>
-+#include <com/sun/star/awt/XDialog.hpp>
 +
-+namespace css = ::com::sun::star;
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++const static rtl::OUString TOGGLE( RTL_CONSTASCII_USTRINGPARAM("Toggle") );
++const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
++ScVbaToggleButton::ScVbaToggleButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : ToggleButtonImpl_BASE( xContext, xControl )
++{
++    OSL_TRACE("ScVbaToggleButton(ctor)");
++    m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
++}
 +
-+// Basic-Module for excel object.
++ScVbaToggleButton::~ScVbaToggleButton()
++{
++    OSL_TRACE("~ScVbaToggleButton(dtor)");
++}
 +
-+class SbObjModule : public SbModule
++// Attributes
++rtl::OUString SAL_CALL 
++ScVbaToggleButton::getCaption() throw (css::uno::RuntimeException)
 +{
-+protected:
-+    com::sun::star::script::ModuleInfo m_mInfo;
-+    SbxObjectRef pDocObject; // a vba api object.
-+    virtual void InitObject();
-+public:
-+    TYPEINFO();
-+	SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_DOCUMENTMOD,2);
-+    SbObjModule( const rtl::OUString& rName, const com::sun::star::script::ModuleInfo& mInfo );
-+    virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
-+    SbxVariable* GetObject();
-+	virtual BOOL  IsClass( const String& );
-+};
++    rtl::OUString Label;
++    m_xProps->getPropertyValue( LABEL ) >>= Label;
++    return Label;
++}
 +
-+class SbUserFormModule : public SbObjModule
++void SAL_CALL 
++ScVbaToggleButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
 +{
-+    css::uno::Reference<css::lang::XEventListener> m_DialogListener;
-+    css::uno::Reference<css::awt::XDialog> m_xDialog;
-+    String sFormName;
++    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
++}
 +
-+    bool m_bUnloaded;
-+    static USHORT nHideHash;
-+protected:
-+    virtual void InitObject();
++uno::Any SAL_CALL 
++ScVbaToggleButton::getValue() throw (uno::RuntimeException)
++{
++	sal_Int16 nState = 0;
++    	m_xProps->getPropertyValue( STATE ) >>= nState;
++ 	return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
++}
++
++void SAL_CALL 
++ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
++{
++	sal_Int16 nState = 0;
++	_value >>= nState;
++        OSL_TRACE( "nState - %d", nState );
++	nState = ( nState == -1 ) ?  1 : 0;
++        OSL_TRACE( "nState - %d", nState );
++	m_xProps->setPropertyValue( STATE, uno::makeAny(  nState ) );
++}
++
++rtl::OUString& 
++ScVbaToggleButton::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaToggleButton") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaToggleButton::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.ToggleButton" ) );
++	}
++	return aServiceNames;
++}
++
+--- /dev/null	2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbacheckbox.hxx	2008-03-28 14:29:21.000000000 +0000
+@@ -0,0 +1,59 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile: vbaradiobutton.hxx,v $
++ *
++ *  $Revision: 1.2 $
++ *
++ *  last change: $Author: vg $ $Date: 2007/12/07 11:00:45 $
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_CHECKBOX_HXX
++#define SC_VBA_CHECKBOX_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <org/openoffice/msforms/XRadioButton.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XRadioButton > RadioButtonImpl_BASE;
++
++class ScVbaCheckbox : public RadioButtonImpl_BASE
++{
 +public:
-+    TYPEINFO();
-+	SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_USERFORMMOD,2);
-+    SbUserFormModule( const rtl::OUString& rName, const com::sun::star::script::ModuleInfo& mInfo );
-+    virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
-+    virtual void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& );
-+    void ResetApiObj( bool bUnloaded = true );
-+    void Hide();
-+    void Unload();
-+    void triggerInitializeEvent();
-+    void triggerTerminateEvent();
++    ScVbaCheckbox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
++                    const css::uno::Reference< css::uno::XInterface >& xControl );
++   // Attributes
++    virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
++    virtual sal_Bool SAL_CALL getValue() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setValue( sal_Bool _value ) throw (css::uno::RuntimeException);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
 +};
++#endif //SC_VBA_CHECKBOX_HXX
+--- /dev/null	2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbacheckbox.cxx	2008-03-28 14:30:05.000000000 +0000
+@@ -0,0 +1,99 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile: vbaradiobutton.cxx,v $
++ *
++ *  $Revision: 1.2 $
++ *
++ *  last change: $Author: vg $ $Date: 2007/12/07 11:00:34 $
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "vbacheckbox.hxx"
++#include <vector>
 +
-+SV_DECL_IMPL_REF(SbUserFormModule);
-+#ifndef __SB_SBOBJMODULEREF_HXX
-+#define __SB_SBOBJMODULEREF_HXX
++using namespace com::sun::star;
++using namespace org::openoffice;
 +
-+SV_DECL_IMPL_REF(SbObjModule);
 +
-+#endif
-+#endif
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
++ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : RadioButtonImpl_BASE( xContext, xControl )
++{
++}
 +
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl	2007-04-27 08:32:41.000000000 +0100
-+++ oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl	2008-03-25 12:59:07.000000000 +0000
-@@ -50,5 +50,10 @@ interface XVBAToOOEventDescGen : com::su
- 	com::sun::star::script::XScriptEventsSupplier getEventSupplier( [in] com::sun::star::uno::XInterface xControl );
- };
- 
-+interface XFakeVBAEventDescriptorSupplier : com::sun::star::uno::XInterface
++// Attributes
++rtl::OUString SAL_CALL 
++ScVbaCheckbox::getCaption() throw (css::uno::RuntimeException)
 +{
-+	sequence< com::sun::star::script::ScriptEventDescriptor >  getEventDescriptions( [in] com::sun::star::uno::XInterface xControl );
-+};
++    rtl::OUString Label;
++    m_xProps->getPropertyValue( LABEL ) >>= Label;
++    return Label;
++}
 +
- }; }; };
- #endif
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/docshell/vbaevents.cxx	2008-03-27 09:30:52.000000000 +0000
-+++ sc/source/ui/docshell/vbaevents.cxx	2008-03-26 23:09:37.000000000 +0000
-@@ -60,11 +60,7 @@ const static rtl::OUString sUrlPart2 = r
- 	rtl::OUString sCodeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
- 	if ( pShell )
- 	{
--		if ( ScExtDocOptions* pExtDocOpts = pShell->GetDocument()->GetExtDocOptions() )
--		{
--			if ( pExtDocOpts->GetDocSettings().maGlobCodeName.Len() > 0 ) 
--				sCodeName = pExtDocOpts->GetDocSettings().maGlobCodeName;
--		}
-+            pShell->GetDocument()->GetCodeName();
- 	}
- 	return sCodeName;
- }	
-@@ -316,12 +312,8 @@ uno::Any createRange( const uno::Any& aR
- 
- String getSheetModuleName( ScDocShell* pShell, SCTAB nTab )
- {
--	ScExtDocOptions* pExtOptions = pShell->GetDocument()->GetExtDocOptions();
- 	String aCodeName;
--	pShell->GetDocument()->GetName( nTab, aCodeName);
--	// Use code name if that exists
--	if ( pExtOptions )
--		aCodeName = pExtOptions->GetCodeName( nTab );
-+	pShell->GetDocument()->GetCodeName( nTab, aCodeName);
- 	return aCodeName;	
- }
- 
-diff -rup /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/scripting/source/dlgprov/dlgevtatt.hxx scripting/source/dlgprov/dlgevtatt.hxx
---- /esata1/BUILD-related/HEAD/ooo-build/build/ooh680-m12/scripting/source/dlgprov/dlgevtatt.hxx	2008-03-19 10:56:33.000000000 +0000
-+++ scripting/source/dlgprov/dlgevtatt.hxx	2008-03-25 14:00:00.000000000 +0000
-@@ -68,6 +68,9 @@
- #include <com/sun/star/script/XScriptEventsSupplier.hpp>
- 
- #include <hash_map>
++void SAL_CALL 
++ScVbaCheckbox::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
++}
 +
-+#define FAKE_VBA_EVENT_SUPPORT 1 
++sal_Bool SAL_CALL 
++ScVbaCheckbox::getValue() throw (css::uno::RuntimeException)
++{
++    sal_Bool bValue = sal_False;
++    sal_Int16 nValue = -1;
++    m_xProps->getPropertyValue( STATE ) >>= nValue;
++    if( nValue != 0 )
++        bValue = sal_True;
++    return bValue;
++}
 +
- //.........................................................................
- namespace dlgprov
- {
++void SAL_CALL 
++ScVbaCheckbox::setValue( sal_Bool _value ) throw (css::uno::RuntimeException)
++{
++    sal_Int16 nValue = 0;
++    if( _value )
++        nValue = 1;
++    m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
++}
++rtl::OUString& 
++ScVbaCheckbox::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCheckbox") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaCheckbox::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.CheckBox" ) );
++	}
++	return aServiceNames;
++}



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