ooo-build r13824 - in trunk: . patches/dev300 patches/vba



Author: noelpwer
Date: Sun Sep  7 19:28:34 2008
New Revision: 13824
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13824&view=rev

Log:
2008-09-07  Noel Power  <kyoshida novell com>

        * patches/dev300/apply: removed some old entries, move some  patches
        * patches/dev300/cws-npower11.diff: updated with userform  control
        patches, additionally some stuff moved from ooo-build
        * patches/vba/vba-workbook-worksheet-events.diff: tweak from  above
        * patches/vba/enhanced-form-userform-controls.diff: fix import of
        state for radiobuttons & checkboxes on  userforms


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/cws-npower11.diff
   trunk/patches/vba/enhanced-form-userform-controls.diff
   trunk/patches/vba/vba-workbook-worksheet-events.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Sun Sep  7 19:28:34 2008
@@ -369,7 +369,12 @@
 offapi-typecheck-whitelist.diff, thorsten
 
 # ensure macros are imported ( not as comments ) for calc
-vba-default-enable-calcmacros.diff
+vba-default-enable-calcmacros.diff, noelpwer
+# in the basic IDE if the curson in within a macro
+# pressing the run button should run that macro
+# if the cursor is not in the macro then it should
+# raise the macro chooser dialog
+vba-ide-choose-macro-to-run.diff, noelpwer
 
 [ FixesNotForUpstream < ooo300-m3 ]
 pdfimport-no-license-m2.diff
@@ -1511,13 +1516,6 @@
 #vba-symbol-searchhack-for-thisworkbook.diff
 vba-allow-ranges-for-cell-functions.diff
 
-# in the basic IDE if the curson in within a macro
-# pressing the run button should run that macro
-# if the cursor is not in the macro then it should
-# raise the macro chooser dialog
-vba-ide-choose-macro-to-run.diff
-
-# provide a compatible error object
 vba-error-object.diff
 
 
@@ -1591,9 +1589,9 @@
 basic-caller-support.diff
 # comparison of tow empty type fix in vba mode
 vba-empty-comparison-fix.diff, n#397438, Fong
-# Add Worksheet.EnableSelection
+# Add Worksheet.EnableSelection ( depends on cws-scsheetprotection02-sc.diff )
 vba-worksheet-enableselection.diff, n#405312, Fong
-vba-worksheet-paste-fix.diff, n#417439, Fong
+# needs a ScCompiler change upstream
 vba-worksheetfunctions-fix.diff, n#414248, Fong
 
 # Fixed for n#407805
@@ -1620,11 +1618,6 @@
 # fix bad intersect api, need to be folded into npower11
 # also needs some testing
 vba-intersect-multi-area.diff
-# fix rowheight to return null if any row in a multicell range is 
-# of a different height to the others, also need to be pulled into npower11
-vba-rowheight-fix.diff, n#422688
-# fix crash when hiding userform controls
-vba-fix-userform-hidecontrolcrash.diff
 # fix datevalue function in non-en_US locale
 vba-datevalue-function-fix.diff, Fong
 # fix window.SplitRow issue
@@ -1639,33 +1632,6 @@
 #not so useful but perhaps we can build on it later
 basic-speedup-fix.diff
 
-# backup for npower11
-# fix for n#353242. missing APIs
-# a set of CommandBar APIs.
-vba-commandbar-bundle.diff, n#353242, Jianhua
-# fix for n#365557. missing APIs of XInterior
-vba-interior.diff, n#365557, Jianhua
-vba-window-service.diff, jianhua
-vba-hyperlink-service.diff, Fong
-vba-pagesetup-object.diff, Fong
-# support Range.MergeArea, Range.ShowDetail
-vba-range-missing-api.diff, Fong
-# ListBox.removeItem
-vba-listbox-removeitem.diff, n#405306, Jianhua
-# Range.Find
-vba-range-find.diff, n#405304, Jianhua
-# For SpinButton
-vba-spin-button.diff, n#405308, Jianhua
-# erro compile switch
-vba-scroll-bar-idl-switch.diff, Jianhua
-# Add HPageBreaks object
-vba-pagebreak-object.diff, n#405312, Fong
-# Add to support Application.Union
-vba-application-union.diff, n#405313, Fong
-# Add to support Worksheet.Index, and fix for n#403974
-vba-worksheet-fix-n403974.diff, n#403974, Fong
-vba-range-find-fix.diff, n#417312, Fong
-
 [ VBAObjects < ooo300-m3 ]
 bytearray-string-fix.diff, i#91911, Fong
 

Modified: trunk/patches/dev300/cws-npower11.diff
==============================================================================
--- trunk/patches/dev300/cws-npower11.diff	(original)
+++ trunk/patches/dev300/cws-npower11.diff	Sun Sep  7 19:28:34 2008
@@ -36,10 +36,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/makefile.mk,v
 retrieving revision 1.6
-retrieving revision 1.5.42.7
-diff -u -p -u -p -b -w -B -r1.6 -r1.5.42.7
+retrieving revision 1.5.42.8
+diff -u -p -u -p -b -w -B -r1.6 -r1.5.42.8
 --- sc/source/ui/vba/makefile.mk	11 Apr 2008 00:46:57 -0000	1.6
-+++ sc/source/ui/vba/makefile.mk	4 Aug 2008 08:35:52 -0000	1.5.42.7
++++ sc/source/ui/vba/makefile.mk	5 Sep 2008 14:04:18 -0000	1.5.42.8
 @@ -88,6 +88,7 @@ SLOFILES= \
                  $(SLO)$/vbabutton.obj \
                  $(SLO)$/vbalabel.obj \
@@ -48,7 +48,7 @@
                  $(SLO)$/vbaradiobutton.obj \
                  $(SLO)$/vbalistbox.obj \
                  $(SLO)$/vbapropvalue.obj \
-@@ -111,8 +112,25 @@ SLOFILES= \
+@@ -111,8 +112,26 @@ SLOFILES= \
                  $(SLO)$/vbaformatconditions.obj \
                  $(SLO)$/vbastyle.obj \
                  $(SLO)$/vbastyles.obj \
@@ -72,6 +72,7 @@
 +		        $(SLO)$/vbapagebreak.obj \
 +        		$(SLO)$/vbapagebreaks.obj \
 +		        $(SLO)$/vbaspinbutton.obj \
++		        $(SLO)$/vbaimage.obj \
 +				$(SLO)$/service.obj
  
  # --- Targets ------------------------------------------------------
@@ -636,16 +637,16 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbabutton.cxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbabutton.cxx	11 Apr 2008 00:50:02 -0000	1.3
-+++ sc/source/ui/vba/vbabutton.cxx	6 Jul 2008 15:31:19 -0000	1.2.42.2
++++ sc/source/ui/vba/vbabutton.cxx	5 Sep 2008 14:04:19 -0000	1.2.42.3
 @@ -35,7 +35,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< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaButton::ScVbaButton( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
  {
  }
  
@@ -676,17 +677,17 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbabutton.hxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbabutton.hxx	11 Apr 2008 00:50:19 -0000	1.3
-+++ sc/source/ui/vba/vbabutton.hxx	6 Jul 2008 15:29:34 -0000	1.2.42.2
++++ sc/source/ui/vba/vbabutton.hxx	5 Sep 2008 14:04:19 -0000	1.2.42.3
 @@ -40,10 +40,12 @@ typedef cppu::ImplInheritanceHelper1< Sc
  class ScVbaButton : public ButtonImpl_BASE
  {
  public:
 -    ScVbaButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
 -                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper  );
++    ScVbaButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
     // Attributes
      virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
      virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
@@ -720,7 +721,7 @@
 RCS file: sc/source/ui/vba/vbacheckbox.cxx
 diff -N sc/source/ui/vba/vbacheckbox.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacheckbox.cxx	22 Apr 2008 19:53:15 -0000	1.1.2.1
++++ sc/source/ui/vba/vbacheckbox.cxx	5 Sep 2008 14:04:19 -0000	1.1.2.2
 @@ -0,0 +1,110 @@
 +/*************************************************************************
 + *
@@ -765,7 +766,7 @@
 +
 +const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
 +const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-+ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
 +}
 +
@@ -837,7 +838,7 @@
 RCS file: sc/source/ui/vba/vbacheckbox.hxx
 diff -N sc/source/ui/vba/vbacheckbox.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacheckbox.hxx	22 Apr 2008 19:53:15 -0000	1.1.2.1
++++ sc/source/ui/vba/vbacheckbox.hxx	5 Sep 2008 14:04:19 -0000	1.1.2.2
 @@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
@@ -886,7 +887,7 @@
 +class ScVbaCheckbox : public CheckBoxImpl_BASE
 +{
 +public:
-+    ScVbaCheckbox(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++    ScVbaCheckbox(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
 +   // Attributes
 +    virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
 +    virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
@@ -901,10 +902,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbacombobox.cxx,v
 retrieving revision 1.4
-retrieving revision 1.3.42.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.2
+retrieving revision 1.3.42.3
+diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.3
 --- sc/source/ui/vba/vbacombobox.cxx	11 Apr 2008 00:55:28 -0000	1.4
-+++ sc/source/ui/vba/vbacombobox.cxx	6 Jul 2008 15:29:37 -0000	1.3.42.2
++++ sc/source/ui/vba/vbacombobox.cxx	5 Sep 2008 14:04:19 -0000	1.3.42.3
 @@ -34,34 +34,93 @@ using namespace com::sun::star;
  using namespace org::openoffice;
  
@@ -919,7 +920,7 @@
 +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< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper, bool bDialogType ) : ComboBoxImpl_BASE( xParent, xContext, xControl, pGeomHelper ), mbDialogType( bDialogType )
++ScVbaComboBox::ScVbaComboBox( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, bool bDialogType ) : ComboBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ), mbDialogType( bDialogType )
  {
 +	if ( !mbDialogType )
  	// grab the default value property name
@@ -1033,10 +1034,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbacombobox.hxx,v
 retrieving revision 1.4
-retrieving revision 1.3.42.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.2
+retrieving revision 1.3.42.3
+diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.3
 --- sc/source/ui/vba/vbacombobox.hxx	11 Apr 2008 00:55:42 -0000	1.4
-+++ sc/source/ui/vba/vbacombobox.hxx	6 Jul 2008 15:30:26 -0000	1.3.42.2
++++ sc/source/ui/vba/vbacombobox.hxx	5 Sep 2008 14:04:19 -0000	1.3.42.3
 @@ -44,22 +44,16 @@
  typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
  class ScVbaComboBox : public ComboBoxImpl_BASE
@@ -1056,7 +1057,7 @@
 -                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
 -                    const css::uno::Reference< css::drawing::XControlShape> xControlShape );
 -
-+	ScVbaComboBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper, bool bDialogType = false );
++	ScVbaComboBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper, bool bDialogType = false );
  
  	// Attributes
 +	virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
@@ -1527,7 +1528,7 @@
 RCS file: sc/source/ui/vba/vbacommandbarcontrol.cxx
 diff -N sc/source/ui/vba/vbacommandbarcontrol.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbarcontrol.cxx	29 Jul 2008 06:35:40 -0000	1.1.2.1
++++ sc/source/ui/vba/vbacommandbarcontrol.cxx	5 Sep 2008 14:04:19 -0000	1.1.2.2
 @@ -0,0 +1,403 @@
 +/*************************************************************************
 + *
@@ -1872,7 +1873,7 @@
 +    return sal_True;
 +}
 +void SAL_CALL 
-+ScVbaCommandBarControl::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
++ScVbaCommandBarControl::setVisible( ::sal_Bool /*_visible*/ ) throw (uno::RuntimeException)
 +{
 +    // "IsVisilbe"
 +}
@@ -2034,7 +2035,7 @@
 RCS file: sc/source/ui/vba/vbacommandbarcontrols.cxx
 diff -N sc/source/ui/vba/vbacommandbarcontrols.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbarcontrols.cxx	29 Jul 2008 06:35:40 -0000	1.1.2.1
++++ sc/source/ui/vba/vbacommandbarcontrols.cxx	5 Sep 2008 14:04:20 -0000	1.1.2.2
 @@ -0,0 +1,247 @@
 +/*************************************************************************
 + *
@@ -2230,7 +2231,7 @@
 +    return uno::Any();
 +}
 +uno::Reference< vba::XCommandBarControl > SAL_CALL 
-+ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const uno::Any& Parameter, const uno::Any& Before, const uno::Any& Temporary ) throw (script::BasicErrorException, uno::RuntimeException)
++ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const uno::Any& /*Parameter*/, const uno::Any& Before, const uno::Any& Temporary ) throw (script::BasicErrorException, uno::RuntimeException)
 +{
 +    // Parameter is not supported
 +    // the following name needs to be individually created;
@@ -2724,11 +2725,26 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbacontrol.cxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
+retrieving revision 1.2.42.4
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.4
 --- sc/source/ui/vba/vbacontrol.cxx	11 Apr 2008 00:57:50 -0000	1.3
-+++ sc/source/ui/vba/vbacontrol.cxx	29 Jul 2008 06:35:41 -0000	1.2.42.3
-@@ -44,17 +44,26 @@
++++ sc/source/ui/vba/vbacontrol.cxx	5 Sep 2008 14:04:20 -0000	1.2.42.4
+@@ -36,7 +36,13 @@
+ #include <com/sun/star/frame/XModel.hpp>
+ #include <com/sun/star/view/XControlAccess.hpp>
+ #include <com/sun/star/container/XChild.hpp>
+-
++#include <com/sun/star/form/binding/XBindableValue.hpp>
++#include <com/sun/star/form/binding/XListEntrySink.hpp>
++#include <com/sun/star/table/CellAddress.hpp>
++#include <com/sun/star/table/CellRangeAddress.hpp>
++#ifdef VBA_OOBUILD_HACK
++#include <svtools/bindablecontrolhelper.hxx>
++#endif
+ #include"vbacontrol.hxx"
+ #include"vbacombobox.hxx"
+ #include "vbabutton.hxx"
+@@ -44,35 +50,39 @@
  #include "vbatextbox.hxx"
  #include "vbaradiobutton.hxx"
  #include "vbalistbox.hxx"
@@ -2739,6 +2755,7 @@
 +#include "vbaprogressbar.hxx"
 +#include "vbamultipage.hxx"
 +#include "vbaspinbutton.hxx"
++#include "vbaimage.hxx"
  
  
  using namespace com::sun::star;
@@ -2751,19 +2768,18 @@
 -ScVbaControl::getWindowPeer( const uno::Reference< ::drawing::XControlShape >& xControlShape ) throw (uno::RuntimeException)
 +ScVbaControl::getWindowPeer() throw (uno::RuntimeException)
  {
-+    // #FIXME why don't we already have the XModel instead of getting it
-+    // directly from the controlmodel, probablye we thought there was a reason
-+    // at some stage.
 +    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
 +
      uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
-     //init m_xWindowPeer 
-     uno::Reference< container::XChild > xChild( xControlModel, uno::UNO_QUERY_THROW );
-@@ -62,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 );
+-    //init m_xWindowPeer 
+-    uno::Reference< container::XChild > xChild( xControlModel, uno::UNO_QUERY_THROW );
+-    xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW );
+-    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 );
 -    uno::Reference< awt::XControl > xControl;
++
++    uno::Reference< view::XControlAccess > xControlAccess( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
 +    uno::Reference< css::awt::XWindowPeer >  xWinPeer;
      try
      {
@@ -2786,7 +2802,7 @@
  //ScVbaControl
  
 -ScVbaControl::ScVbaControl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::drawing::XControlShape >& xControlShape ) : m_xContext( xContext ), m_xControlShape( xControlShape )
-+ScVbaControl::ScVbaControl( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : ControlImpl_BASE( xParent, xContext ),  m_xControl( xControl )
++ScVbaControl::ScVbaControl( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl,  const css::uno::Reference< css::frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ControlImpl_BASE( xParent, xContext ),  m_xControl( xControl ), m_xModel( xModel )
  {
 -    //init m_xProps
 -    uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
@@ -2811,21 +2827,21 @@
  ScVbaControl::~ScVbaControl()
  {
 -    if( m_xControlShape.is() )
--    {
++    if( m_xControl.is() )
+     {
 -        uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
--        xComponent->removeEventListener( m_xEventListener );
--    }
--}
--
++        uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
+         xComponent->removeEventListener( m_xEventListener );
+     }
+ }
+ 
 -void ScVbaControl::removeResouce() throw( uno::RuntimeException )
-+    if( m_xControl.is() )
- {
+-{
 -    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_xProps = NULL;
- }
+-}
 -
 -
 -ScVbaControl::ScVbaControl( const uno::Reference< uno::XComponentContext >& xContext, 
@@ -2836,8 +2852,8 @@
 -    m_xEventListener.set( new ScVbaControlListener( this ) );
 -    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
 -    xComponent->addEventListener( m_xEventListener );
- }
- 
+-}
+-
 -void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< ::drawing::XControlShape > xControlShape )
 +void 
 +ScVbaControl::setGeometryHelper( AbstractGeometryAttributes* pHelper )
@@ -2870,7 +2886,7 @@
  }
  
  //In design model has different behavior
-@@ -189,132 +176,173 @@ void SAL_CALL ScVbaControl::setEnabled( 
+@@ -189,132 +176,267 @@ void SAL_CALL ScVbaControl::setEnabled( 
  
  sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException)
  {
@@ -2952,27 +2968,138 @@
 -    oldPosition.Y = pt2mm( _top ) * 100;;
 -    xShape->setPosition( oldPosition );
 +    mpGeometryHelper->setTop( _top );
-+}
-+
-+void SAL_CALL ScVbaControl::SetFocus() throw (uno::RuntimeException) 
-+{
-+    uno::Reference< awt::XWindow > xWin( m_xControl, uno::UNO_QUERY_THROW );
-+    xWin->setFocus();
  }
  
- //ScVbaControlFactory
+-//ScVbaControlFactory
++uno::Reference< uno::XInterface > SAL_CALL
++ScVbaControl::getObject() throw (uno::RuntimeException)
++{
++	uno::Reference< msforms::XControl > xRet( this );
++	return xRet;
++}
  
 -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 )
++void SAL_CALL ScVbaControl::SetFocus() throw (uno::RuntimeException) 
  {
 -    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 );
++    uno::Reference< awt::XWindow > xWin( m_xControl, uno::UNO_QUERY_THROW );
++    xWin->setFocus();
  }
  
 -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( const uno::Reference< uno::XInterface >& xParent )  throw (uno::RuntimeException)
++rtl::OUString SAL_CALL 
++ScVbaControl::getControlSource() throw (uno::RuntimeException)
++{
++// #FIXME I *hate* having these upstream differences
++// but this is necessary until I manage to upstream other
++// dependant parts
++#ifdef VBA_OOBUILD_HACK
++	rtl::OUString sControlSource;
++	uno::Reference< form::binding::XBindableValue > xBindable( m_xProps, uno::UNO_QUERY );
++	if ( xBindable.is() )
++	{
++		try
+ {
++			uno::Reference< lang::XMultiServiceFactory > xFac( m_xModel, uno::UNO_QUERY_THROW );
++			uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.table.CellAddressConversion" ))), uno::UNO_QUERY );
++			uno::Reference< beans::XPropertySet > xProps( xBindable->getValueBinding(), uno::UNO_QUERY_THROW );
++			table::CellAddress aAddress;
++			xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BoundCell") ) ) >>= aAddress;
++			xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address") ), uno::makeAny( aAddress ) );
++                	xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sControlSource;
++		}
++		catch( uno::Exception& )
++		{
++		}	
+ }
++	return sControlSource;
++#else
++	throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getControlSource not supported") ), uno::Reference< uno::XInterface >()); // not supported
++#endif
++}
++
++void SAL_CALL 
++ScVbaControl::setControlSource( const rtl::OUString& _controlsource ) throw (uno::RuntimeException)
++{
++#ifdef VBA_OOBUILD_HACK
++    rtl::OUString sEmpty;
++    svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, sEmpty );
++#else
++	throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setControlSource not supported ") ).concat( _controlsource ), uno::Reference< uno::XInterface >()); // not supported
++#endif
++}
++
++rtl::OUString SAL_CALL 
++ScVbaControl::getRowSource() throw (uno::RuntimeException)
++{
++#ifdef VBA_OOBUILD_HACK
++	rtl::OUString sRowSource;
++	uno::Reference< form::binding::XListEntrySink > xListSink( m_xProps, uno::UNO_QUERY );
++	if ( xListSink.is() )
++	{
++		try
++		{
++			uno::Reference< lang::XMultiServiceFactory > xFac( m_xModel, uno::UNO_QUERY_THROW );
++			uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.table.CellRangeAddressConversion" ))), uno::UNO_QUERY );
+ 
+-ScVbaControl* ScVbaControlFactory::createControl( const sal_Int16 nClassId )  throw (uno::RuntimeException)
++			uno::Reference< beans::XPropertySet > xProps( xListSink->getListEntrySource(), uno::UNO_QUERY_THROW );
++			table::CellRangeAddress aAddress;
++			xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellRange") ) ) >>= aAddress;
++			xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address")), uno::makeAny( aAddress ) );
++			xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sRowSource;
++		}
++		catch( uno::Exception& )
+ {
+-    switch( nClassId )
++		}	
++	}
++	return sRowSource;
++#else
++	throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getRowSource not supported") ), uno::Reference< uno::XInterface >()); // not supported
++#endif
++}
++
++void SAL_CALL 
++ScVbaControl::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
+     {
+-        case form::FormComponentType::COMBOBOX:
+-            return new ScVbaComboBox( m_xContext, m_xProps, m_xControlShape );
+-        case form::FormComponentType::COMMANDBUTTON:
+-            return new ScVbaButton( m_xContext, m_xControlShape );
+-        case form::FormComponentType::FIXEDTEXT:
+-            return new ScVbaLabel( m_xContext, m_xControlShape );
+-        case form::FormComponentType::TEXTFIELD:
+-            return new ScVbaTextBox( m_xContext, m_xControlShape );
+-        case form::FormComponentType::RADIOBUTTON:
+-            return new ScVbaRadioButton( m_xContext, m_xControlShape );
+-        case form::FormComponentType::LISTBOX:
+-            return new ScVbaListBox( m_xContext, m_xControlShape );
+-        default:
+-            throw uno::RuntimeException( rtl::OUString::createFromAscii(
+-                    "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
++#ifdef VBA_OOBUILD_HACK
++    rtl::OUString sEmpty;
++    svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, sEmpty, _rowsource );
++#else
++	throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setRowSource not supported ") ).concat( _rowsource ), uno::Reference< uno::XInterface >()); // not supported
++#endif
+     }
++
++//ScVbaControlFactory
++
++ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel ): m_xContext( xContext ), m_xControl( xControl ), m_xModel( xModel )
++{
+ }
+ 
+ ScVbaControl* ScVbaControlFactory::createControl()  throw (uno::RuntimeException)
  {
++    return createControl( m_xModel );
++}
++ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< uno::XInterface >& xParent )  throw (uno::RuntimeException)
++{
 +    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
 +    if ( xControlShape.is() ) // form controls
 +        return createControl( xControlShape, xParent );
@@ -2981,89 +3108,86 @@
 +        throw uno::RuntimeException(); // really we should be more informative
 +    return createControl( xControl, xParent );
 +    
- }
- 
--ScVbaControl* ScVbaControlFactory::createControl( const sal_Int16 nClassId )  throw (uno::RuntimeException)
++}
++
 +ScVbaControl* ScVbaControlFactory::createControl(const uno::Reference< drawing::XControlShape >& xControlShape,  const uno::Reference< uno::XInterface >& /*xParent*/ )  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") );
+     sal_Int32 nClassId = -1;
+     const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
+-    m_xProps->getPropertyValue( sClassId ) >>= nClassId;
 +    xProps->getPropertyValue( sClassId ) >>= nClassId;
 +    uno::Reference< vba::XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
      switch( nClassId )
      {
          case form::FormComponentType::COMBOBOX:
--            return new ScVbaComboBox( m_xContext, m_xProps, m_xControlShape );
-+            return new ScVbaComboBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
+-            return new ScVbaComboBox( m_xContext, m_xControlShape );
++            return new ScVbaComboBox( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
          case form::FormComponentType::COMMANDBUTTON:
 -            return new ScVbaButton( m_xContext, m_xControlShape );
-+            return new ScVbaButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++            return new ScVbaButton( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
          case form::FormComponentType::FIXEDTEXT:
 -            return new ScVbaLabel( m_xContext, m_xControlShape );
-+            return new ScVbaLabel( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++            return new ScVbaLabel( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
          case form::FormComponentType::TEXTFIELD:
 -            return new ScVbaTextBox( m_xContext, m_xControlShape );
-+            return new ScVbaTextBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++            return new ScVbaTextBox( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
          case form::FormComponentType::RADIOBUTTON:
 -            return new ScVbaRadioButton( m_xContext, m_xControlShape );
-+            return new ScVbaRadioButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++            return new ScVbaRadioButton( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
          case form::FormComponentType::LISTBOX:
 -            return new ScVbaListBox( m_xContext, m_xControlShape );
-+            return new ScVbaListBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++            return new ScVbaListBox( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
 +        case form::FormComponentType::SPINBUTTON:
-+            return new ScVbaSpinButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++            return new ScVbaSpinButton( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++        case form::FormComponentType::IMAGECONTROL:
++            return new ScVbaImage( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
          default:
              throw uno::RuntimeException( rtl::OUString::createFromAscii(
-                     "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
+-                    "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
++                    "Donot support this Control Type." ), uno::Reference< uno::XInterface >() );
      }
  }
- 
--ScVbaControl* ScVbaControlFactory::createControl()  throw (uno::RuntimeException)
++
 +ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< awt::XControl >& xControl,  const uno::Reference< uno::XInterface >& xParent  )  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;
 +    uno::Reference< vba::XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
 +    if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
-+	pControl = new ScVbaCheckbox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );	
++	pControl = new ScVbaCheckbox( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );	
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlRadioButtonModel") ) ) )
-+	pControl = new ScVbaRadioButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );	
++	pControl = new ScVbaRadioButton( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );	
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlEditModel") ) ) )
-+        pControl = new ScVbaTextBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), true );
++        pControl = new ScVbaTextBox( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ), true );
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlButtonModel") ) ) )
 +    {
 +        sal_Bool bToggle = sal_False;
 +        xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Toggle") ) ) >>= bToggle;
 +        if ( bToggle )
-+            pControl = new ScVbaToggleButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++            pControl = new ScVbaToggleButton( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +        else
-+            pControl = new ScVbaButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++            pControl = new ScVbaButton( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +    }
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") ) ) )
-+        pControl = new ScVbaComboBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), true );
++        pControl = new ScVbaComboBox( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ), true );
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") ) ) )
-+	pControl = new ScVbaListBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++	pControl = new ScVbaListBox( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") ) ) )
-+	pControl = new ScVbaLabel( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++	pControl = new ScVbaLabel( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( 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();
++	pControl = new ScVbaImage( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ) ) )
-+	pControl = new ScVbaProgressBar( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++	pControl = new ScVbaProgressBar( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) ) )
-+	pControl = new ScVbaFrame( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++	pControl = new ScVbaFrame( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlScrollBarModel") ) ) )
-+	pControl = new ScVbaScrollBar( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++	pControl = new ScVbaScrollBar( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
-+	pControl = new ScVbaMultiPage( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), xParent );
++	pControl = new ScVbaMultiPage( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ), xParent );
 +    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlSpinButtonModel") ) ) )
-+	pControl = new ScVbaSpinButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++	pControl = new ScVbaSpinButton( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +    else
 +        throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
 +    return pControl;
@@ -3078,41 +3202,26 @@
 +
 +uno::Sequence< rtl::OUString > 
 +ScVbaControl::getServiceNames()
-     {
--        case form::FormComponentType::COMBOBOX:
--            return new ScVbaComboBox( m_xContext, m_xControlShape );
--        case form::FormComponentType::COMMANDBUTTON:
--            return new ScVbaButton( m_xContext, m_xControlShape );
--        case form::FormComponentType::FIXEDTEXT:
--            return new ScVbaLabel( m_xContext, m_xControlShape );
--        case form::FormComponentType::TEXTFIELD:
--            return new ScVbaTextBox( m_xContext, m_xControlShape );
--        case form::FormComponentType::RADIOBUTTON:
--            return new ScVbaRadioButton( m_xContext, m_xControlShape );
--        case form::FormComponentType::LISTBOX:
--            return new ScVbaListBox( m_xContext, m_xControlShape );
--        default:
--            throw uno::RuntimeException( rtl::OUString::createFromAscii(
--                    "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
++{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
 +		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Control" ) );
-     }
++	}
 +	return aServiceNames;
- }
++}
 +
 +
 Index: sc/source/ui/vba/vbacontrol.hxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbacontrol.hxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbacontrol.hxx	11 Apr 2008 00:58:09 -0000	1.3
-+++ sc/source/ui/vba/vbacontrol.hxx	6 Jul 2008 15:30:36 -0000	1.2.42.2
-@@ -35,40 +35,33 @@
++++ sc/source/ui/vba/vbacontrol.hxx	5 Sep 2008 14:04:20 -0000	1.2.42.3
+@@ -35,40 +35,34 @@
  #include <com/sun/star/uno/XComponentContext.hpp>
  #include <com/sun/star/script/XDefaultProperty.hpp>
  #include <com/sun/star/drawing/XControlShape.hpp>
@@ -3149,6 +3258,7 @@
 -                const css::uno::Reference< css::beans::XPropertySet > xProps,
 -                const css::uno::Reference< css::drawing::XControlShape > xControlShape );
 +    css::uno::Reference< css::uno::XInterface > m_xControl;
++    css::uno::Reference< css::frame::XModel > m_xModel;
 +
 +    virtual css::uno::Reference< css::awt::XWindowPeer > getWindowPeer() throw (css::uno::RuntimeException);
  public:
@@ -3158,7 +3268,7 @@
 -                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
 -                    const css::uno::Reference< css::drawing::XControlShape > xControlShape );
 +    ScVbaControl( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
-+                    const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pHelper );
++                    const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pHelper );
      virtual ~ScVbaControl();
 +    // This class will own the helper, so make sure it is allocated from 
 +    // the heap
@@ -3166,13 +3276,17 @@
      // XControl
      virtual sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
      virtual void SAL_CALL setEnabled( sal_Bool _enabled ) throw (css::uno::RuntimeException);
-@@ -82,9 +75,14 @@ public:
+@@ -82,9 +76,18 @@ public:
      virtual void SAL_CALL setLeft( double _left ) throw (css::uno::RuntimeException);
      virtual double SAL_CALL getTop() throw (css::uno::RuntimeException);
      virtual void SAL_CALL setTop( double _top ) throw (css::uno::RuntimeException);
 +    virtual void SAL_CALL SetFocus(  ) throw (css::uno::RuntimeException);
-+
  
++    virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getObject() throw (css::uno::RuntimeException);
++    virtual rtl::OUString SAL_CALL getControlSource() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setControlSource( const rtl::OUString& _controlsource ) throw (css::uno::RuntimeException);
++    virtual rtl::OUString SAL_CALL getRowSource() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
      //remove resouce because org.openoffice.excel.XControl is a wrapper of com.sun.star.drawing.XControlShape
      virtual void removeResouce() throw( css::uno::RuntimeException );
 +    //XHelperInterface
@@ -3181,7 +3295,7 @@
  };
  
  
-@@ -92,16 +90,13 @@ class ScVbaControlFactory
+@@ -92,16 +95,15 @@ class ScVbaControlFactory
  {
  public:
      ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
@@ -3190,8 +3304,8 @@
 -                    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 );
--    ScVbaControl* createControl()  throw ( css::uno::RuntimeException );
-+                    const css::uno::Reference< css::uno::XInterface >& xControl );
++                    const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel );
+     ScVbaControl* createControl()  throw ( css::uno::RuntimeException );
 +    ScVbaControl* createControl( const css::uno::Reference< css::uno::XInterface >& xParent )  throw ( css::uno::RuntimeException );
  private:
 +    ScVbaControl* createControl( const css::uno::Reference< css::awt::XControl >&, const css::uno::Reference< css::uno::XInterface >&  )  throw ( css::uno::RuntimeException );
@@ -3200,6 +3314,7 @@
 -    css::uno::Reference< css::beans::XPropertySet > m_xProps;
 -    css::uno::Reference< css::drawing::XControlShape > m_xControlShape;
 +    css::uno::Reference< css::uno::XInterface > m_xControl;
++    css::uno::Reference< css::frame::XModel > m_xModel;
  };
  
  #endif//SC_VBA_CONTROL_HXX
@@ -3208,7 +3323,7 @@
 RCS file: sc/source/ui/vba/vbaframe.cxx
 diff -N sc/source/ui/vba/vbaframe.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaframe.cxx	22 Apr 2008 19:53:15 -0000	1.1.2.1
++++ sc/source/ui/vba/vbaframe.cxx	5 Sep 2008 14:04:20 -0000	1.1.2.2
 @@ -0,0 +1,93 @@
 +/*************************************************************************
 + *
@@ -3252,7 +3367,7 @@
 +
 +
 +const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+ScVbaFrame::ScVbaFrame( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : FrameImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaFrame::ScVbaFrame( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper ) : FrameImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
 +}
 +
@@ -3308,7 +3423,7 @@
 RCS file: sc/source/ui/vba/vbaframe.hxx
 diff -N sc/source/ui/vba/vbaframe.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaframe.hxx	22 Apr 2008 19:53:15 -0000	1.1.2.1
++++ sc/source/ui/vba/vbaframe.hxx	5 Sep 2008 14:04:20 -0000	1.1.2.2
 @@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
@@ -3357,7 +3472,7 @@
 +class ScVbaFrame : public FrameImpl_BASE
 +{
 +public:
-+    ScVbaFrame(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++    ScVbaFrame(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
 +   // 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);
@@ -3408,10 +3523,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbahelper.cxx,v
 retrieving revision 1.5
-retrieving revision 1.3.42.4
-diff -u -p -u -p -b -w -B -r1.5 -r1.3.42.4
+retrieving revision 1.3.42.5
+diff -u -p -u -p -b -w -B -r1.5 -r1.3.42.5
 --- sc/source/ui/vba/vbahelper.cxx	11 Apr 2008 01:02:33 -0000	1.5
-+++ sc/source/ui/vba/vbahelper.cxx	6 Jul 2008 15:30:59 -0000	1.3.42.4
++++ sc/source/ui/vba/vbahelper.cxx	5 Sep 2008 14:04:20 -0000	1.3.42.5
 @@ -37,6 +37,7 @@
  #include <com/sun/star/uno/XComponentContext.hpp>
  #include <com/sun/star/lang/XMultiComponentFactory.hpp>
@@ -3449,7 +3564,7 @@
  uno::Reference< script::XTypeConverter >
  getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
  {
-@@ -215,6 +229,22 @@ dispatchRequests (uno::Reference< frame:
+@@ -215,11 +229,27 @@ dispatchRequests (uno::Reference< frame:
  }
  
  
@@ -3472,6 +3587,12 @@
  void
  implnPaste()
  {
+ 	PasteCellsWarningReseter resetWarningBox;
+-	ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
++	ScTabViewShell* pViewShell = getCurrentBestViewShell();
+ 	if ( pViewShell )
+ 	{
+ 		pViewShell->PasteFromSystem();
 @@ -531,6 +561,11 @@ void PrintOutHelper( const uno::Any& Fro
  	//   of this method
  }
@@ -3495,7 +3616,7 @@
 +
 +#define VBA_LEFT "PositionX"
 +#define VBA_TOP "PositionY"
-+UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< awt::XControl >& xControl )
++UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComponentContext >& /*xContext*/, const uno::Reference< awt::XControl >& xControl )
 +{
 +    mxModel.set( xControl->getModel(), uno::UNO_QUERY_THROW );
 +}
@@ -3895,6 +4016,127 @@
 +};
 +#endif /* SC_VBA_HYPERLINK_HXX */
 +
+Index: sc/source/ui/vba/vbaimage.cxx
+===================================================================
+RCS file: sc/source/ui/vba/vbaimage.cxx
+diff -N sc/source/ui/vba/vbaimage.cxx
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbaimage.cxx	5 Sep 2008 14:05:15 -0000	1.1.2.1
+@@ -0,0 +1,59 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++#include "vbaimage.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++ScVbaImage::ScVbaImage( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ImageImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
++{
++}
++
++rtl::OUString& 
++ScVbaImage::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaImage") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaImage::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Image" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbaimage.hxx
+===================================================================
+RCS file: sc/source/ui/vba/vbaimage.hxx
+diff -N sc/source/ui/vba/vbaimage.hxx
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbaimage.hxx	5 Sep 2008 14:05:15 -0000	1.1.2.1
+@@ -0,0 +1,48 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++#ifndef SC_VBA_IMAGE_HXX
++#define SC_VBA_IMAGE_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <org/openoffice/msforms/XImage.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XImage > ImageImpl_BASE;
++
++class ScVbaImage : public ImageImpl_BASE
++{
++public:
++    ScVbaImage( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif //SC_VBA_IMAGE_HXX
 Index: sc/source/ui/vba/vbainterior.cxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbainterior.cxx,v
@@ -4304,16 +4546,16 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbalabel.cxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbalabel.cxx	11 Apr 2008 01:03:52 -0000	1.3
-+++ sc/source/ui/vba/vbalabel.cxx	6 Jul 2008 15:30:14 -0000	1.2.42.2
++++ sc/source/ui/vba/vbalabel.cxx	5 Sep 2008 14:04:20 -0000	1.2.42.3
 @@ -35,7 +35,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 css::uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaLabel::ScVbaLabel(  const css::uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
  {
  }
  
@@ -4358,10 +4600,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbalabel.hxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbalabel.hxx	11 Apr 2008 01:04:06 -0000	1.3
-+++ sc/source/ui/vba/vbalabel.hxx	6 Jul 2008 15:30:52 -0000	1.2.42.2
++++ sc/source/ui/vba/vbalabel.hxx	5 Sep 2008 14:04:21 -0000	1.2.42.3
 @@ -34,16 +34,23 @@
  
  #include "vbacontrol.hxx"
@@ -4376,7 +4618,7 @@
  public:
 -    ScVbaLabel( const css::uno::Reference< css::uno::XComponentContext >& xContext,
 -                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaLabel( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper  );
++    ScVbaLabel( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
     // 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);
@@ -4393,10 +4635,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbalistbox.cxx,v
 retrieving revision 1.4
-retrieving revision 1.3.42.3
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.3
+retrieving revision 1.3.42.4
+diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.4
 --- sc/source/ui/vba/vbalistbox.cxx	11 Apr 2008 01:05:34 -0000	1.4
-+++ sc/source/ui/vba/vbalistbox.cxx	29 Jul 2008 06:35:41 -0000	1.3.42.3
++++ sc/source/ui/vba/vbalistbox.cxx	5 Sep 2008 14:04:21 -0000	1.3.42.4
 @@ -37,31 +37,49 @@
  using namespace com::sun::star;
  using namespace org::openoffice;
@@ -4408,7 +4650,7 @@
  
  
 -ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ListBoxImpl_BASE( xContext, xControlShape )
-+ScVbaListBox::ScVbaListBox( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : ListBoxImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaListBox::ScVbaListBox( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ListBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
  {
 -	// grab the default value property name
 -	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
@@ -4612,10 +4854,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbalistbox.hxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
+retrieving revision 1.2.42.4
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.4
 --- sc/source/ui/vba/vbalistbox.hxx	11 Apr 2008 01:05:48 -0000	1.3
-+++ sc/source/ui/vba/vbalistbox.hxx	29 Jul 2008 06:35:41 -0000	1.2.42.3
++++ sc/source/ui/vba/vbalistbox.hxx	5 Sep 2008 14:04:21 -0000	1.2.42.4
 @@ -49,14 +49,11 @@ class ScVbaListBox : public ListBoxImpl_
      sal_Int16 m_nIndex;
  	
@@ -4626,7 +4868,7 @@
 -                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
 -                    const css::uno::Reference< css::drawing::XControlShape> xControlShape );
 -
-+	ScVbaListBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++	ScVbaListBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
  
  	// Attributes
 +	virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
@@ -4657,7 +4899,7 @@
 RCS file: sc/source/ui/vba/vbamultipage.cxx
 diff -N sc/source/ui/vba/vbamultipage.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbamultipage.cxx	22 Apr 2008 19:53:15 -0000	1.1.2.1
++++ sc/source/ui/vba/vbamultipage.cxx	5 Sep 2008 14:04:21 -0000	1.1.2.2
 @@ -0,0 +1,132 @@
 +/*************************************************************************
 + *
@@ -4737,7 +4979,7 @@
 +	return new PagesImpl( nPages );
 +}
 +
-+ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper, const uno::Reference< uno::XInterface >& xDialog ) : MultiPageImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, const uno::Reference< uno::XInterface >& xDialog ) : MultiPageImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
 +    mxDialogProps.set( xDialog, uno::UNO_QUERY_THROW );
 +    // set dialog step to value of multipage pseudo model
@@ -4796,7 +5038,7 @@
 RCS file: sc/source/ui/vba/vbamultipage.hxx
 diff -N sc/source/ui/vba/vbamultipage.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbamultipage.hxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
++++ sc/source/ui/vba/vbamultipage.hxx	5 Sep 2008 14:04:21 -0000	1.1.2.2
 @@ -0,0 +1,65 @@
 +/*************************************************************************
 + *
@@ -4850,7 +5092,7 @@
 +    css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
 +    css::uno::Reference< css::beans::XPropertySet > mxDialogProps;
 +public:
-+    ScVbaMultiPage( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper, const css::uno::Reference< css::uno::XInterface >& xDialog );
++    ScVbaMultiPage( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper, const css::uno::Reference< css::uno::XInterface >& xDialog );
 +   // Attributes
 +    virtual sal_Int32 SAL_CALL getValue() throw (css::uno::RuntimeException);
 +    virtual void SAL_CALL setValue( const sal_Int32 _value ) throw (css::uno::RuntimeException);
@@ -5145,7 +5387,7 @@
 RCS file: sc/source/ui/vba/vbapagebreak.hxx
 diff -N sc/source/ui/vba/vbapagebreak.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapagebreak.hxx	29 Jul 2008 06:35:41 -0000	1.1.2.1
++++ sc/source/ui/vba/vbapagebreak.hxx	5 Sep 2008 14:04:21 -0000	1.1.2.2
 @@ -0,0 +1,87 @@
 +/*************************************************************************
 + *
@@ -5194,8 +5436,8 @@
 +{
 +typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE;
 +protected:
-+    css::sheet::TablePageBreakData maTablePageBreakData;
 +	css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet;
++    css::sheet::TablePageBreakData maTablePageBreakData;
 +public:
 +	ScVbaPageBreak( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, 
 +                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
@@ -6762,7 +7004,7 @@
 RCS file: sc/source/ui/vba/vbaprogressbar.cxx
 diff -N sc/source/ui/vba/vbaprogressbar.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaprogressbar.cxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
++++ sc/source/ui/vba/vbaprogressbar.cxx	5 Sep 2008 14:04:21 -0000	1.1.2.2
 @@ -0,0 +1,78 @@
 +/*************************************************************************
 + *
@@ -6807,7 +7049,7 @@
 +// uno servicename com.sun.star.awt.UnoControlProgressBarMode
 +const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
 +
-+ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
 +}
 +
@@ -6847,7 +7089,7 @@
 RCS file: sc/source/ui/vba/vbaprogressbar.hxx
 diff -N sc/source/ui/vba/vbaprogressbar.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaprogressbar.hxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
++++ sc/source/ui/vba/vbaprogressbar.hxx	5 Sep 2008 14:04:22 -0000	1.1.2.2
 @@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
@@ -6897,7 +7139,7 @@
 +class ScVbaProgressBar : public ProgressBarImpl_BASE
 +{
 +public:
-+    ScVbaProgressBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++    ScVbaProgressBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
 +   // 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);
@@ -6912,16 +7154,16 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbaradiobutton.cxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbaradiobutton.cxx	11 Apr 2008 01:12:55 -0000	1.3
-+++ sc/source/ui/vba/vbaradiobutton.cxx	6 Jul 2008 15:31:33 -0000	1.2.42.2
++++ sc/source/ui/vba/vbaradiobutton.cxx	5 Sep 2008 14:04:22 -0000	1.2.42.3
 @@ -36,7 +36,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< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
  {
  }
  
@@ -6989,10 +7231,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbaradiobutton.hxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbaradiobutton.hxx	11 Apr 2008 01:13:09 -0000	1.3
-+++ sc/source/ui/vba/vbaradiobutton.hxx	6 Jul 2008 15:30:03 -0000	1.2.42.2
++++ sc/source/ui/vba/vbaradiobutton.hxx	5 Sep 2008 14:04:22 -0000	1.2.42.3
 @@ -29,24 +29,27 @@
   ************************************************************************/
  #ifndef SC_VBA_RADIOBUTTON_HXX
@@ -7012,7 +7254,7 @@
  public:
 -    ScVbaRadioButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
 -                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaRadioButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++    ScVbaRadioButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
     // Attributes
      virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
      virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
@@ -7032,10 +7274,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbarange.cxx,v
 retrieving revision 1.9
-retrieving revision 1.5.34.13
-diff -u -p -u -p -b -w -B -r1.9 -r1.5.34.13
+retrieving revision 1.5.34.14
+diff -u -p -u -p -b -w -B -r1.9 -r1.5.34.14
 --- sc/source/ui/vba/vbarange.cxx	14 May 2008 10:03:31 -0000	1.9
-+++ sc/source/ui/vba/vbarange.cxx	12 Aug 2008 19:39:18 -0000	1.5.34.13
++++ sc/source/ui/vba/vbarange.cxx	5 Sep 2008 14:04:22 -0000	1.5.34.14
 @@ -115,6 +115,7 @@
  #include <org/openoffice/excel/XlCellType.hpp>
  #include <org/openoffice/excel/XlSpecialCellsValue.hpp>
@@ -7124,6 +7366,15 @@
  		return false;
  	}
  		
+@@ -789,7 +828,7 @@ public:
+ 			pUnoRangesBase )
+ 		{
+ 			ScRangeList aCellRanges = pUnoRangesBase->GetRangeList();	
+-			ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart, ScGrammar::GRAM_DEFAULT );
++			ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart, ScGrammar::GRAM_PODF_A1 );
+ 			aCompiler.CompileString( sVal );
+ 			// set desired convention
+             aCompiler.SetGrammar( m_eGrammar );
 @@ -1150,10 +1189,19 @@ lcl_setupBorders( const uno::Reference< 
  }
  
@@ -7135,13 +7386,13 @@
 +	mxRanges.set( mxPropertySet, uno::UNO_QUERY );
 +	uno::Reference< container::XIndexAccess >  xIndex;
 +	if ( mxRange.is() )
- {
--	mxRange.set( mxPropertySet, uno::UNO_QUERY_THROW );
--	uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxContext, mxRange ) );
++	{
 +		xIndex = new SingleRangeIndexAccess( mxContext, mxRange );
 +	}
 +	else if ( mxRanges.is() )
-+	{
+ {
+-	mxRange.set( mxPropertySet, uno::UNO_QUERY_THROW );
+-	uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxContext, mxRange ) );
 +		xIndex.set( mxRanges, uno::UNO_QUERY_THROW );
 +	}
  	m_Areas = new ScVbaRangeAreas( mxContext, xIndex, mbIsRows, mbIsColumns );
@@ -7190,7 +7441,7 @@
  }
  
 +uno::Reference< excel::XRange > SAL_CALL 
-+ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& LookIn, const uno::Any& LookAt, const uno::Any& SearchOrder, const uno::Any& SearchDirection, const uno::Any& MatchCase, const uno::Any& MatchByte, const uno::Any& SearchFormat ) throw (uno::RuntimeException)
++ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& LookIn, const uno::Any& LookAt, const uno::Any& SearchOrder, const uno::Any& SearchDirection, const uno::Any& MatchCase, const uno::Any& /*MatchByte*/, const uno::Any& /*SearchFormat*/ ) throw (uno::RuntimeException)
 +{
 +    // return a Range object that represents the first cell where that information is found.
 +    rtl::OUString sWhat;
@@ -7386,7 +7637,26 @@
  	return new CellsEnumeration( mxContext, m_Areas );
  }
  
-@@ -4119,7 +4369,7 @@ ScVbaRange::Autofit() throw (uno::Runtim
+@@ -3363,7 +3613,7 @@ ScVbaRange::getRowHeight() throw (uno::R
+ 		return xRange->getRowHeight();
+ 	}	
+ 
+-	// if this range is a 'Rows' range, then if any row's RowHeight in the 
++	// if any row's RowHeight in the 
+ 	// range is different from any other then return NULL
+ 	RangeHelper thisRange( mxRange );	
+ 	table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
+@@ -3373,7 +3623,8 @@ ScVbaRange::getRowHeight() throw (uno::R
+ 	double nHeight = getCalcRowHeight( thisAddress );
+ 	// #TODO probably possible to use the SfxItemSet ( and see if
+ 	//  SFX_ITEM_DONTCARE is set ) to improve performance
+-	if ( mbIsRows ) 
++// #CHECKME looks like this is general behaviour not just row Range specific
++//	if ( mbIsRows ) 
+ 	{
+ 		for ( sal_Int32 nRow = nStartRow ; nRow <= nEndRow; ++nRow )
+ 		{
+@@ -4119,7 +4370,7 @@ ScVbaRange::Autofit() throw (uno::Runtim
  		// if the range is a not a row or column range autofit will
  		// throw an error
  
@@ -7395,7 +7665,7 @@
  			DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); 			
          ScDocShell* pDocShell = getDocShellFromRange( mxRange );
          if ( pDocShell )
-@@ -4298,6 +4548,113 @@ void ScVbaRange::setFormulaHidden(const 
+@@ -4298,6 +4549,113 @@ void ScVbaRange::setFormulaHidden(const 
  	xProps->setPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLPRO)), uno::makeAny(rCellAttr));
  }
  
@@ -7509,7 +7779,7 @@
  
  void SAL_CALL 
  ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any& Copies, const uno::Any& Preview, const uno::Any& ActivePrinter, const uno::Any& PrintToFile, const uno::Any& Collate, const uno::Any& PrToFileName ) throw (uno::RuntimeException)
-@@ -4516,7 +4873,7 @@ ScVbaRange::AutoOutline(  ) throw (scrip
+@@ -4516,7 +4874,7 @@ ScVbaRange::AutoOutline(  ) throw (scrip
  {
  	// #TODO #FIXME needs to check for summary row/col ( whatever they are )
  	// not valid for multi Area Addresses
@@ -7518,7 +7788,7 @@
  		DebugHelper::exception(SbERR_METHOD_FAILED, STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY); 			
  	// So needs to either span an entire Row or a just be a single cell 
  	// ( that contains a summary RowColumn )
-@@ -4734,6 +5091,7 @@ ScVbaRange::SpecialCells( const uno::Any
+@@ -4734,6 +5092,7 @@ ScVbaRange::SpecialCells( const uno::Any
  		case excel::XlCellType::xlCellTypeConstants:
  		case excel::XlCellType::xlCellTypeFormulas:
  		case excel::XlCellType::xlCellTypeVisible:
@@ -7566,7 +7836,7 @@
 RCS file: sc/source/ui/vba/vbascrollbar.cxx
 diff -N sc/source/ui/vba/vbascrollbar.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbascrollbar.cxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
++++ sc/source/ui/vba/vbascrollbar.cxx	5 Sep 2008 14:04:22 -0000	1.1.2.2
 @@ -0,0 +1,139 @@
 +/*************************************************************************
 + *
@@ -7616,7 +7886,7 @@
 +const static rtl::OUString SCROLLMAX( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") );
 +const static rtl::OUString SCROLLMIN( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMin") );
 +
-+ScVbaScrollBar::ScVbaScrollBar(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaScrollBar::ScVbaScrollBar(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
 +}
 +
@@ -7712,7 +7982,7 @@
 RCS file: sc/source/ui/vba/vbascrollbar.hxx
 diff -N sc/source/ui/vba/vbascrollbar.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbascrollbar.hxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
++++ sc/source/ui/vba/vbascrollbar.hxx	5 Sep 2008 14:04:22 -0000	1.1.2.2
 @@ -0,0 +1,66 @@
 +/*************************************************************************
 + *
@@ -7761,7 +8031,7 @@
 +class ScVbaScrollBar : public ScrollBarImpl_BASE
 +{
 +public:
-+    ScVbaScrollBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper  );
++    ScVbaScrollBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
 +   // 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);
@@ -7843,7 +8113,7 @@
 RCS file: sc/source/ui/vba/vbaspinbutton.cxx
 diff -N sc/source/ui/vba/vbaspinbutton.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaspinbutton.cxx	29 Jul 2008 06:35:42 -0000	1.1.2.1
++++ sc/source/ui/vba/vbaspinbutton.cxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
 @@ -0,0 +1,109 @@
 +/*************************************************************************
 + *
@@ -7891,7 +8161,7 @@
 +const static rtl::OUString SPINMAX( RTL_CONSTASCII_USTRINGPARAM("SpinValueMax") );
 +const static rtl::OUString SPINMIN( RTL_CONSTASCII_USTRINGPARAM("SpinValueMin") );
 +
-+ScVbaSpinButton::ScVbaSpinButton(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaSpinButton::ScVbaSpinButton(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
 +}
 +
@@ -7959,7 +8229,7 @@
 RCS file: sc/source/ui/vba/vbaspinbutton.hxx
 diff -N sc/source/ui/vba/vbaspinbutton.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaspinbutton.hxx	29 Jul 2008 06:35:43 -0000	1.1.2.1
++++ sc/source/ui/vba/vbaspinbutton.hxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
 @@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
@@ -8008,7 +8278,7 @@
 +class ScVbaSpinButton : public SpinButtonImpl_BASE
 +{
 +public:
-+    ScVbaSpinButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper  );
++    ScVbaSpinButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
 +   // 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);
@@ -8026,16 +8296,16 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbatextbox.cxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbatextbox.cxx	11 Apr 2008 01:19:17 -0000	1.3
-+++ sc/source/ui/vba/vbatextbox.cxx	6 Jul 2008 15:30:55 -0000	1.2.42.2
++++ sc/source/ui/vba/vbatextbox.cxx	5 Sep 2008 14:04:23 -0000	1.2.42.3
 @@ -37,11 +37,24 @@ 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< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper, bool bDialog ) : TextBoxImpl_BASE( xParent, xContext, xControl, pGeomHelper ), mbDialog( bDialog )
++ScVbaTextBox::ScVbaTextBox( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, bool bDialog ) : TextBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ), mbDialog( bDialog )
  {
  }
  
@@ -8098,10 +8368,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbatextbox.hxx,v
 retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
+retrieving revision 1.2.42.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
 --- sc/source/ui/vba/vbatextbox.hxx	11 Apr 2008 01:19:33 -0000	1.3
-+++ sc/source/ui/vba/vbatextbox.hxx	6 Jul 2008 15:31:16 -0000	1.2.42.2
++++ sc/source/ui/vba/vbatextbox.hxx	5 Sep 2008 14:04:23 -0000	1.2.42.3
 @@ -38,16 +38,20 @@ typedef cppu::ImplInheritanceHelper1< Sc
  
  class ScVbaTextBox : public TextBoxImpl_BASE
@@ -8110,7 +8380,7 @@
  public:
 -    ScVbaTextBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
 -                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaTextBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper, bool bDialog = false );
++    ScVbaTextBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper, bool bDialog = false );
     // 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);
@@ -8277,7 +8547,7 @@
 RCS file: sc/source/ui/vba/vbatogglebutton.cxx
 diff -N sc/source/ui/vba/vbatogglebutton.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbatogglebutton.cxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
++++ sc/source/ui/vba/vbatogglebutton.cxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
 @@ -0,0 +1,108 @@
 +/*************************************************************************
 + *
@@ -8323,7 +8593,7 @@
 +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 css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
 +    OSL_TRACE("ScVbaToggleButton(ctor)");
 +    m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
@@ -8392,7 +8662,7 @@
 RCS file: sc/source/ui/vba/vbatogglebutton.hxx
 diff -N sc/source/ui/vba/vbatogglebutton.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbatogglebutton.hxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
++++ sc/source/ui/vba/vbatogglebutton.hxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
 @@ -0,0 +1,63 @@
 +/*************************************************************************
 + *
@@ -8442,7 +8712,7 @@
 +{
 +	rtl::OUString msDftPropName;
 +public:
-+    ScVbaToggleButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++    ScVbaToggleButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
 +    ~ScVbaToggleButton();
 +   // Attributes
 +    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
@@ -8462,8 +8732,8 @@
 RCS file: sc/source/ui/vba/vbauserform.cxx
 diff -N sc/source/ui/vba/vbauserform.cxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbauserform.cxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
-@@ -0,0 +1,219 @@
++++ sc/source/ui/vba/vbauserform.cxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
+@@ -0,0 +1,218 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -8521,12 +8791,11 @@
 +//     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, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), static_cast< org::openoffice::AbstractGeometryAttributes* >(0) ), m_pDocShell( 0 ), mbDispose( true )
++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, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), getXSomethingFromArgs< frame::XModel >( aArgs, 2 ), static_cast< org::openoffice::AbstractGeometryAttributes* >(0) ), m_pDocShell( 0 ), mbDispose( true )
 +{
 +    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_pDocShell = getDocShell( m_xModel );
 +    m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
 +    setGeometryHelper( new UserFormGeometryHelper( xContext, xControl ) );
 +}
@@ -8645,7 +8914,7 @@
 +	uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
 +	uno::Reference< awt::XControlContainer > xContainer( m_xDialog, uno::UNO_QUERY_THROW );
 +	uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName );
-+	ScVbaControlFactory aFac( mxContext, xControl );
++	ScVbaControlFactory aFac( mxContext, xControl, m_xModel );
 +        uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) );
 +        ScVbaControl* pControl  = dynamic_cast< ScVbaControl* >( xVBAControl.get() );
 +        pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) );
@@ -8688,8 +8957,8 @@
 RCS file: sc/source/ui/vba/vbauserform.hxx
 diff -N sc/source/ui/vba/vbauserform.hxx
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbauserform.hxx	22 Apr 2008 19:53:17 -0000	1.1.2.1
-@@ -0,0 +1,77 @@
++++ sc/source/ui/vba/vbauserform.hxx	5 Sep 2008 14:04:24 -0000	1.1.2.2
+@@ -0,0 +1,78 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -8730,6 +8999,7 @@
 +#include <cppuhelper/implbase1.hxx>
 +#include <org/openoffice/msforms/XUserForm.hpp>
 +#include <com/sun/star/awt/XDialog.hpp>
++#include <com/sun/star/frame/XModel.hpp>
 +
 +#include "vbahelperinterface.hxx"
 +#include "vbacontrol.hxx"
@@ -9162,10 +9432,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbaworksheet.cxx,v
 retrieving revision 1.5
-retrieving revision 1.3.42.5
-diff -u -p -u -p -b -w -B -r1.5 -r1.3.42.5
+retrieving revision 1.3.42.6
+diff -u -p -u -p -b -w -B -r1.5 -r1.3.42.6
 --- sc/source/ui/vba/vbaworksheet.cxx	11 Apr 2008 01:23:10 -0000	1.5
-+++ sc/source/ui/vba/vbaworksheet.cxx	29 Jul 2008 06:35:43 -0000	1.3.42.5
++++ sc/source/ui/vba/vbaworksheet.cxx	5 Sep 2008 14:04:24 -0000	1.3.42.6
 @@ -47,6 +47,7 @@
  #include <com/sun/star/sheet/XSheetPastable.hpp>
  #include <com/sun/star/sheet/XCellAddressable.hpp>
@@ -9258,8 +9528,9 @@
 -	}
 -*/
      uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW );
-     ScVbaControlFactory controlFactory( mxContext, xControlShape );
+-    ScVbaControlFactory controlFactory( mxContext, xControlShape );
 -    uno::Reference< msforms::XControl > xControl( controlFactory.createControl() );
++    ScVbaControlFactory controlFactory( mxContext, xControlShape, getModel() );
 +    uno::Reference< msforms::XControl > xControl( controlFactory.createControl( getModel() ) );
  	return uno::makeAny( xControl );
 -//	return aProp;
@@ -9609,7 +9880,7 @@
 RCS file: sc/source/ui/vba/testvba/runTests.pl
 diff -N sc/source/ui/vba/testvba/runTests.pl
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/runTests.pl	29 Jul 2008 07:22:41 -0000	1.1.2.1
++++ sc/source/ui/vba/testvba/runTests.pl	5 Sep 2008 14:04:24 -0000	1.1.2.2
 @@ -0,0 +1,121 @@
 +#!/usr/bin/perl -w
 +use URI::Escape;
@@ -9632,7 +9903,7 @@
 +my $theResult;
 +my $officepath = shift || die "please specify path to office installation program dir";
 +my $DocName = shift || "";
-+my $programpath = "$officepath/program";
++my $programpath = "$officepath"."3/program:$officepath/program:";
 +my $basiclibrarypath = "$officepath/basis3.0/program";
 +my $urelibpath = "$officepath/ure/lib";
 +my $binext = "";
@@ -10270,117 +10541,117 @@
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
-Binary files /dev/null and /tmp/cvsN7lahZ differ
+Binary files /dev/null and /tmp/cvsDhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
-Binary files /dev/null and /tmp/cvsPYP5as differ
+Binary files /dev/null and /tmp/cvsEhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/PageBreaks.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/PageBreaks.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/PageBreaks.xls
-Binary files /dev/null and /tmp/cvsks0q5U differ
+Binary files /dev/null and /tmp/cvsFhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
-Binary files /dev/null and /tmp/cvsZEEZZn differ
+Binary files /dev/null and /tmp/cvsGhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/Ranges-2.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/Ranges-2.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/Ranges-2.xls
-Binary files /dev/null and /tmp/cvs224MUQ differ
+Binary files /dev/null and /tmp/cvsHhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/Ranges-3.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/Ranges-3.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/Ranges-3.xls
-Binary files /dev/null and /tmp/cvsdgdVZj differ
+Binary files /dev/null and /tmp/cvsIhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
-Binary files /dev/null and /tmp/cvsTNdg5M differ
+Binary files /dev/null and /tmp/cvsJhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
-Binary files /dev/null and /tmp/cvskqGClg differ
+Binary files /dev/null and /tmp/cvsKhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
-Binary files /dev/null and /tmp/cvsv0wjCJ differ
+Binary files /dev/null and /tmp/cvsLhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/Template.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/Template.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/Template.xls
-Binary files /dev/null and /tmp/cvsGageTc differ
+Binary files /dev/null and /tmp/cvsMhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
-Binary files /dev/null and /tmp/cvsgjDmaG differ
+Binary files /dev/null and /tmp/cvsNhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest.xls
-Binary files /dev/null and /tmp/cvss3PGr9 differ
+Binary files /dev/null and /tmp/cvsOhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
-Binary files /dev/null and /tmp/cvsoRbfJC differ
+Binary files /dev/null and /tmp/cvsPhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/Window.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/Window.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/Window.xls
-Binary files /dev/null and /tmp/cvsfSI205 differ
+Binary files /dev/null and /tmp/cvsQhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/bytearraystring.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/bytearraystring.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/bytearraystring.xls
-Binary files /dev/null and /tmp/cvs5UQ7iz differ
+Binary files /dev/null and /tmp/cvsRhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
-Binary files /dev/null and /tmp/cvsrkxpB2 differ
+Binary files /dev/null and /tmp/cvsShaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/datevalue.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/datevalue.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/datevalue.xls
-Binary files /dev/null and /tmp/cvs2JWSTv differ
+Binary files /dev/null and /tmp/cvsThaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/format.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/format.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/format.xls
-Binary files /dev/null and /tmp/cvsQGszcZ differ
+Binary files /dev/null and /tmp/cvsUhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/partition.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/partition.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/partition.xls
-Binary files /dev/null and /tmp/cvsi7nAvs differ
+Binary files /dev/null and /tmp/cvsVhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/range-4.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/range-4.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/range-4.xls
-Binary files /dev/null and /tmp/cvsd9XOOV differ
+Binary files /dev/null and /tmp/cvsWhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/replace.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/replace.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/replace.xls
-Binary files /dev/null and /tmp/cvsW7X7gp differ
+Binary files /dev/null and /tmp/cvsXhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/stringplusdouble.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/stringplusdouble.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/stringplusdouble.xls
-Binary files /dev/null and /tmp/cvsjg5FJS differ
+Binary files /dev/null and /tmp/cvsYhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/window2.xls
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/window2.xls
 diff -N sc/source/ui/vba/testvba/TestDocuments/window2.xls
-Binary files /dev/null and /tmp/cvsRHptcm differ
+Binary files /dev/null and /tmp/cvsZhaaBj differ
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
@@ -13936,11 +14207,11 @@
 ===================================================================
 RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XControl.idl,v
 retrieving revision 1.3
-retrieving revision 1.2.4.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.4.2
+retrieving revision 1.2.4.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.4.3
 --- oovbaapi/org/openoffice/msforms/XControl.idl	11 Apr 2008 10:01:02 -0000	1.3
-+++ oovbaapi/org/openoffice/msforms/XControl.idl	6 Jul 2008 15:37:58 -0000	1.2.4.2
-@@ -37,12 +37,17 @@
++++ oovbaapi/org/openoffice/msforms/XControl.idl	5 Sep 2008 14:06:38 -0000	1.2.4.3
+@@ -37,12 +37,20 @@
  
  //=============================================================================
  
@@ -13957,6 +14228,9 @@
  {
 +	interface ::org::openoffice::vba::XHelperInterface;
 +	void SetFocus();
++	[attribute, readonly ] com::sun::star::uno::XInterface Object;
++	[attribute] string ControlSource;
++	[attribute] string RowSource;
  	[attribute] boolean Enabled;
  	[attribute] boolean Visible;
      //Size. there are some defferent between Mso and OOo.
@@ -14023,6 +14297,64 @@
 +#endif
 +
 +
+Index: oovbaapi/org/openoffice/msforms/XImage.idl
+===================================================================
+RCS file: oovbaapi/org/openoffice/msforms/XImage.idl
+diff -N oovbaapi/org/openoffice/msforms/XImage.idl
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ oovbaapi/org/openoffice/msforms/XImage.idl	5 Sep 2008 14:06:38 -0000	1.1.2.1
+@@ -0,0 +1,51 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++#ifndef __org_openoffice_msforms_XImage_idl__
++#define __org_openoffice_msforms_XImage_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
++
++module org {  module openoffice {  module msforms { 
++
++//=============================================================================
++interface XImage: com::sun::star::uno::XInterface 
++{
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
 Index: oovbaapi/org/openoffice/msforms/XLabel.idl
 ===================================================================
 RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XLabel.idl,v
@@ -14626,11 +14958,11 @@
 ===================================================================
 RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/makefile.mk,v
 retrieving revision 1.4
-retrieving revision 1.3.4.4
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.4
+retrieving revision 1.3.4.5
+diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.5
 --- oovbaapi/org/openoffice/msforms/makefile.mk	11 Apr 2008 10:03:53 -0000	1.4
-+++ oovbaapi/org/openoffice/msforms/makefile.mk	29 Jul 2008 06:27:52 -0000	1.3.4.4
-@@ -60,7 +60,15 @@ IDLFILES=\
++++ oovbaapi/org/openoffice/msforms/makefile.mk	5 Sep 2008 14:06:38 -0000	1.3.4.5
+@@ -60,7 +60,16 @@ IDLFILES=\
  	XFillFormat.idl \
  	XPictureFormat.idl \
  	XShapeRange.idl \
@@ -14644,6 +14976,7 @@
 +	XMultiPage.idl \
 +	XPages.idl \
 +	XSpinButton.idl \
++	XImage.idl \
  
  # ------------------------------------------------------------------
  

Modified: trunk/patches/vba/enhanced-form-userform-controls.diff
==============================================================================
--- trunk/patches/vba/enhanced-form-userform-controls.diff	(original)
+++ trunk/patches/vba/enhanced-form-userform-controls.diff	Sun Sep  7 19:28:34 2008
@@ -357,10 +357,10 @@
  public:
  
 diff --git sc/inc/unonames.hxx sc/inc/unonames.hxx
-index aa2820b..b2c45ac 100644
+index a072fdd..18c858b 100644
 --- sc/inc/unonames.hxx
 +++ sc/inc/unonames.hxx
-@@ -591,6 +591,7 @@
+@@ -592,6 +592,7 @@
  #define SC_UNONAME_ADDRESS          "Address"
  #define SC_UNONAME_UIREPR           "UserInterfaceRepresentation"
  #define SC_UNONAME_PERSREPR         "PersistentRepresentation"
@@ -369,7 +369,7 @@
  
  // --> PB 2004-08-23 #i33095# Security Options
 diff --git sc/source/ui/unoobj/addruno.cxx sc/source/ui/unoobj/addruno.cxx
-index b417b7e..4f313f2 100644
+index b417b7e..c279a7b 100644
 --- sc/source/ui/unoobj/addruno.cxx
 +++ sc/source/ui/unoobj/addruno.cxx
 @@ -72,7 +72,7 @@ void ScAddressConversionObj::Notify( Sfx
@@ -437,7 +437,7 @@
          }
      }
      else
-@@ -268,17 +273,21 @@ uno::Any SAL_CALL ScAddressConversionObj
+@@ -268,17 +273,24 @@ uno::Any SAL_CALL ScAddressConversionObj
              aRange.aStart.Format( aFormatStr, nFlags, pDoc );
          aRet <<= rtl::OUString( aFormatStr );
      }
@@ -458,6 +458,9 @@
              aFormatStr.Append( (sal_Unicode) ':' );
              String aSecond;
 -            aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc );
++            USHORT nFlags = SCA_VALID;
++            if( aConv != ScAddress::CONV_XL_A1 )
++		nFlags |= SCA_TAB_3D;
 +            aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
              aFormatStr.Append( aSecond );
          }
@@ -535,11 +538,267 @@
              // leave the possibility to optionally allow the old dialog creation
              // to use the new XScriptListener ( which converts the old style macro
              // to a SF url )
+diff --git svtools/inc/bindablecontrolhelper.hxx svtools/inc/bindablecontrolhelper.hxx
+new file mode 100644
+index 0000000..e9cd3e6
+--- /dev/null
++++ svtools/inc/bindablecontrolhelper.hxx
+@@ -0,0 +1,62 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: imageresourceaccess.hxx,v $
++ * $Revision: 1.5 $
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#ifndef SVTOOLS_INC_BINDABLECONTROL_HXX
++#define SVTOOLS_INC_BINDABLECONTROL_HXX
++
++#include "svtools/svtdllapi.h"
++
++#include <com/sun/star/frame/XModel.hpp>
++//........................................................................
++namespace svt
++{
++//........................................................................
++
++    //====================================================================
++    //= GraphicAccess
++    //====================================================================
++    /** helper class for obtaining streams (which also can be used with the ImageProducer)
++        from a resource
++    */
++    class BindableControlHelper
++    {
++    private:
++        BindableControlHelper();    // never implemented
++
++    public:
++        SVT_DLLPUBLIC static  void ApplyListSourceAndBindableData( const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface >& rObj, const rtl::OUString& rsCtrlSource, const rtl::OUString& rsRowSource );
++    };
++
++//........................................................................
++} // namespace svt
++//........................................................................
++
++#endif // DBA14_SVTOOLS_INC_IMAGERESOURCEACCESS_HXX
++
+diff --git svtools/prj/d.lst svtools/prj/d.lst
+index 934462c..037ad33 100644
+--- svtools/prj/d.lst
++++ svtools/prj/d.lst
+@@ -169,6 +169,7 @@ mkdir: %_DEST%\inc%_EXT%\svtools
+ ..\inc\svtools\logindlg.hxx %_DEST%\inc%_EXT%\svtools\logindlg.hxx
+ ..\inc\svtools\httpcook.hxx %_DEST%\inc%_EXT%\svtools\httpcook.hxx
+ ..\inc\imageresourceaccess.hxx %_DEST%\inc%_EXT%\svtools\imageresourceaccess.hxx
++..\inc\bindablecontrolhelper.hxx %_DEST%\inc%_EXT%\svtools\bindablecontrolhelper.hxx
+ ..\inc\svtools\itemprop.hxx %_DEST%\inc%_EXT%\svtools\itemprop.hxx
+ ..\inc\addresstemplate.hxx %_DEST%\inc%_EXT%\svtools\addresstemplate.hxx
+ ..\inc\svtools\genericunodialog.hxx %_DEST%\inc%_EXT%\svtools\genericunodialog.hxx
+diff --git svtools/source/misc/bindablecontrolhelper.cxx svtools/source/misc/bindablecontrolhelper.cxx
+new file mode 100644
+index 0000000..daa30a0
+--- /dev/null
++++ svtools/source/misc/bindablecontrolhelper.cxx
+@@ -0,0 +1,158 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: imageresourceaccess.cxx,v $
++ * $Revision: 1.5 $
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++// MARKER(update_precomp.py): autogen include statement, do not remove
++#include "precompiled_svtools.hxx"
++#include "bindablecontrolhelper.hxx"
++#include <com/sun/star/form/binding/XBindableValue.hpp>
++#include <com/sun/star/form/binding/XValueBinding.hpp>
++#include <com/sun/star/form/binding/XListEntrySink.hpp>
++#include <com/sun/star/form/binding/XListEntrySource.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
++#include <com/sun/star/table/CellRangeAddress.hpp>
++#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
++#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
++#include <com/sun/star/lang/XMultiServiceFactory.hpp>
++#include <com/sun/star/table/CellAddress.hpp>
++#include <com/sun/star/beans/NamedValue.hpp>
++
++//........................................................................
++namespace svt
++{
++//........................................................................
++
++#ifndef C2U
++#define C2U(cChar)	rtl::OUString::createFromAscii(cChar)
++#endif
++
++    using namespace ::com::sun::star;
++
++bool lcl_isNamedRange( const rtl::OUString& sAddress, const uno::Reference< frame::XModel >& xModel, table::CellRangeAddress& aAddress )
++{
++    bool bRes = false;
++    const static rtl::OUString sNamedRanges( RTL_CONSTASCII_USTRINGPARAM("NamedRanges"));
++    uno::Reference< sheet::XCellRangeReferrer > xReferrer;
++    try
++    {
++        uno::Reference< beans::XPropertySet > xPropSet( xModel, uno::UNO_QUERY_THROW );
++        uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW );
++        xReferrer.set ( xNamed->getByName( sAddress ), uno::UNO_QUERY );
++    }
++    catch( uno::Exception& /*e*/ )
++    {
++        // do nothing
++    }
++    if ( xReferrer.is() )
++    {
++        uno::Reference< sheet::XCellRangeAddressable > xRangeAddressable( xReferrer->getReferredCells(), uno::UNO_QUERY );
++        if ( xRangeAddressable.is() )
++        {
++            aAddress = xRangeAddressable->getRangeAddress();
++            bRes = true;
++        }
++    }
++    return bRes;
++}
++
++
++void
++BindableControlHelper::ApplyListSourceAndBindableData( const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface >& rObj, const rtl::OUString& rsCtrlSource, const rtl::OUString& rsRowSource )
++{
++// XBindable etc.
++    uno::Reference< lang::XMultiServiceFactory > xFac;
++    if ( xModel.is() )
++        xFac.set( xModel, uno::UNO_QUERY );
++    uno::Reference< form::binding::XBindableValue > xBindable( rObj, uno::UNO_QUERY );
++    if (  xFac.is() && rsCtrlSource.getLength() && xBindable.is() )
++    {
++         
++         // OOo address structures
++         // RefCell - convert from XL
++         // pretend we converted the imported string address into the
++         // appropriate address structure
++         uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( C2U( "com.sun.star.table.CellAddressConversion" )), uno::UNO_QUERY );
++         table::CellAddress aAddress;
++         if ( xConvertor.is() )
++         {
++             // we need this service to properly convert XL notation also
++             // Should be easy to extend
++             xConvertor->setPropertyValue( C2U( "XL_A1_Representation" ), uno::makeAny( rsCtrlSource ) );
++             xConvertor->getPropertyValue( C2U( "Address" ) ) >>= aAddress;    
++         }
++        
++         beans::NamedValue aArg1;
++         aArg1.Name = C2U("BoundCell");
++         aArg1.Value <<= aAddress;
++
++         uno::Sequence< uno::Any > aArgs(1);
++         aArgs[ 0 ]  <<= aArg1;
++
++         uno::Reference< form::binding::XValueBinding > xBinding( xFac->createInstanceWithArguments( C2U("com.sun.star.table.CellValueBinding" ), aArgs ), uno::UNO_QUERY );
++         xBindable->setValueBinding( xBinding );
++    }
++    uno::Reference< form::binding::XListEntrySink > xListEntrySink( rObj, uno::UNO_QUERY );
++    if (  xFac.is() && rsRowSource.getLength() && xListEntrySink.is() )
++    {
++         
++         // OOo address structures
++         // RefCell - convert from XL
++         // pretend we converted the imported string address into the
++         // appropriate address structure
++         uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( C2U( "com.sun.star.table.CellRangeAddressConversion" )), uno::UNO_QUERY );
++         table::CellRangeAddress aAddress;
++         if ( xConvertor.is() )
++         {
++             if ( !lcl_isNamedRange( rsRowSource, xModel, aAddress ) )
++             {
++                 // we need this service to properly convert XL notation also
++                 // Should be easy to extend
++                 xConvertor->setPropertyValue( C2U( "XL_A1_Representation" ), uno::makeAny( rsRowSource ) );
++                 xConvertor->getPropertyValue( C2U( "Address" ) ) >>= aAddress;
++             }
++         }
++        
++         beans::NamedValue aArg1;
++         aArg1.Name = C2U("CellRange");
++         aArg1.Value <<= aAddress;
++
++         uno::Sequence< uno::Any > aArgs(1);
++         aArgs[ 0 ]  <<= aArg1;
++
++         uno::Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( C2U("com.sun.star.table.CellRangeListSource" ), aArgs ), uno::UNO_QUERY );
++         xListEntrySink->setListEntrySource( xSource );
++    }
++
++}
++
++//........................................................................
++} // namespace svt
++//........................................................................
++
+diff --git svtools/source/misc/makefile.mk svtools/source/misc/makefile.mk
+index e58134b..7e57dbb 100644
+--- svtools/source/misc/makefile.mk
++++ svtools/source/misc/makefile.mk
+@@ -83,6 +83,7 @@ SLOFILES=\
+     $(SLO)$/dialogcontrolling.obj   \
+     $(SLO)$/sharecontrolfile.obj   \
+     $(SLO)$/documentlockfile.obj   \
++    $(SLO)$/bindablecontrolhelper.obj   \
+     $(SLO)$/langtab.obj
+ 
+ # --- Targets -------------------------------------------------------
 diff --git svx/inc/svx/msocximex.hxx svx/inc/svx/msocximex.hxx
-index 9c397fe..c94eaeb 100644
+index 830e62b..6b9ae47 100644
 --- svx/inc/svx/msocximex.hxx
 +++ svx/inc/svx/msocximex.hxx
-@@ -406,6 +406,8 @@ public:
+@@ -405,6 +405,8 @@ public:
  	sal_uInt32 nGroupNameLen;
  	sal_uInt32 nUnknown10;
  
@@ -587,7 +846,7 @@
  		mnForeColor = 0x80000008;
  		nBorderColor = 0x80000006;
 diff --git svx/source/msfilter/msocximex.cxx svx/source/msfilter/msocximex.cxx
-index fd5d2e5..039f7d6 100644
+index b30665a..0ba055d 100644
 --- svx/source/msfilter/msocximex.cxx
 +++ svx/source/msfilter/msocximex.cxx
 @@ -49,6 +49,10 @@
@@ -641,7 +900,7 @@
              }
  
              // seek to end of data
-@@ -1554,6 +1574,99 @@ sal_Bool OCX_ImageButton::Export(SvStora
+@@ -1560,6 +1580,99 @@ sal_Bool OCX_ImageButton::Export(SvStora
  	return WriteContents(xContents,rPropSet,rSize);
  }
  
@@ -741,7 +1000,30 @@
  
  sal_Bool OCX_OptionButton::Import(com::sun::star::uno::Reference<
          com::sun::star::beans::XPropertySet> &rPropSet)
-@@ -1625,7 +1738,8 @@ sal_Bool OCX_OptionButton::Import(com::s
+@@ -1592,11 +1705,20 @@ sal_Bool OCX_OptionButton::Import(com::s
+     aTmp <<= ImportSpecEffect( nSpecialEffect );
+     rPropSet->setPropertyValue( WW8_ASCII2STR("VisualEffect"), aTmp);
+ 
+-	if (pValue && !bSetInDialog)
++	if (pValue)
+ 	{
+ 		INT16 nTmp = pValue[0]-0x30;
+ 		aTmp <<= nTmp;
+-		rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
++		if (!bSetInDialog)
++			rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
++		else
++		{
++			// dialog ( but we might be using the form model )
++			if ( rPropSet->getPropertySetInfo()->hasPropertyByName( WW8_ASCII2STR("DefaultState") ) )
++				rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
++			else
++				rPropSet->setPropertyValue( WW8_ASCII2STR("State"), aTmp);
++		}
+ 	}
+ 
+ 	if (pCaption)
+@@ -1632,7 +1754,8 @@ sal_Bool OCX_OptionButton::Import(com::s
          aTmp <<= sGroupName;
          rPropSet->setPropertyValue( WW8_ASCII2STR("GroupName"), aTmp);
      }
@@ -749,9 +1031,9 @@
 +	uno::Reference< frame::XModel > xModel ( pDocSh ? pDocSh->GetModel() : NULL );
 +	lcl_ApplyListSourceAndBindableStuff( xModel, rPropSet, msCtrlSource, msRowSource );
  	aFontData.Import(rPropSet);
- 	return sal_True;
- }
-@@ -2516,6 +2630,9 @@ sal_Bool OCX_ComboBox::Import(com::sun::
+ 
+     if ( sImageUrl.getLength() )
+@@ -2535,6 +2658,9 @@ sal_Bool OCX_ComboBox::Import(com::sun::
  	aTmp <<= nTmp;
  	rPropSet->setPropertyValue( WW8_ASCII2STR("MaxTextLen"), aTmp);
  
@@ -761,7 +1043,7 @@
  	aFontData.Import(rPropSet);
  	return sal_True;
  }
-@@ -2736,7 +2853,8 @@ sal_Bool OCX_ListBox::Import(com::sun::s
+@@ -2755,7 +2881,8 @@ sal_Bool OCX_ListBox::Import(com::sun::s
  
      aTmp <<= ImportColor( nBorderColor );
      rPropSet->setPropertyValue( WW8_ASCII2STR("BorderColor"), aTmp);
@@ -771,7 +1053,7 @@
  	aFontData.Import(rPropSet);
  	return sal_True;
  }
-@@ -3520,15 +3638,29 @@ void OCX_ContainerControl::ProcessContro
+@@ -3552,15 +3679,29 @@ void OCX_ContainerControl::ProcessContro
      {
          // A container control needs to read the f stream in
          // the folder ( substorage ) associated with this control
@@ -808,7 +1090,7 @@
          pControl->sName = rec.cName;
          pControl->msToolTip = rec.controlTip;
          // Position of controls is relative to the container
-@@ -4161,7 +4293,7 @@ sal_Bool OCX_UserForm::Import(
+@@ -4199,7 +4340,7 @@ sal_Bool OCX_UserForm::Import(
      OCX_ContainerControl::Import( xPropSet );
  
      uno::Reference<io::XInputStreamProvider> xSource =
@@ -817,6 +1099,23 @@
      uno::Any aSourceAny(uno::makeAny(xSource));
      if (rLib->hasByName(sName))
          rLib->replaceByName(sName, aSourceAny);
+@@ -4742,11 +4883,14 @@ sal_Bool OCX_CheckBox::Import(com::sun::
+     aTmp <<= ImportSpecEffect( nSpecialEffect );
+     rPropSet->setPropertyValue( WW8_ASCII2STR("VisualEffect"), aTmp);
+ 
+-	if (pValue && !bSetInDialog)
++	if (pValue)
+ 	{
+ 		INT16 nTmp=pValue[0]-0x30;
+ 		aTmp <<= nTmp;
+-		rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
++		if ( !bSetInDialog )
++		 	rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
++		else
++		 	rPropSet->setPropertyValue( WW8_ASCII2STR("State"), aTmp);
+ 	}
+ 
+ 	if (pCaption)
 diff --git toolkit/source/controls/dialogcontrol.cxx toolkit/source/controls/dialogcontrol.cxx
 index 3fd5723..7e717ae 100644
 --- toolkit/source/controls/dialogcontrol.cxx
@@ -901,7 +1200,7 @@
  
  }
 diff --git xmlscript/source/xmldlg_imexp/exp_share.hxx xmlscript/source/xmldlg_imexp/exp_share.hxx
-index c87538f..db2aa1c 100644
+index 80019af..08e5aa6 100644
 --- xmlscript/source/xmldlg_imexp/exp_share.hxx
 +++ xmlscript/source/xmldlg_imexp/exp_share.hxx
 @@ -180,9 +180,9 @@ public:
@@ -929,7 +1228,7 @@
      void readNumericFieldModel( StyleBag * all_styles )
          SAL_THROW( (css::uno::Exception) );
 diff --git xmlscript/source/xmldlg_imexp/imp_share.hxx xmlscript/source/xmldlg_imexp/imp_share.hxx
-index c53e325..e5263ad 100644
+index e9225c8..fac87f4 100644
 --- xmlscript/source/xmldlg_imexp/imp_share.hxx
 +++ xmlscript/source/xmldlg_imexp/imp_share.hxx
 @@ -131,6 +131,7 @@ struct DialogImport
@@ -1012,7 +1311,7 @@
  	xml::sax::InputSource source;
  	source.aInputStream = xInput;
 diff --git xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
-index 3d744be..7488f94 100644
+index b1e8538..faae647 100644
 --- xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
 +++ xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
 @@ -32,7 +32,16 @@
@@ -1191,7 +1490,7 @@
                    OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
      readEvents();
 diff --git xmlscript/source/xmldlg_imexp/xmldlg_export.cxx xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
-index 999f899..2e4729e 100644
+index 72b31c5..cbe9698 100644
 --- xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
 +++ xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
 @@ -1309,7 +1309,8 @@ void StyleBag::dump( Reference< xml::sax
@@ -1241,7 +1540,7 @@
              else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFileControlModel") ) ) )
              {
 diff --git xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
-index ee1d824..310b3a6 100644
+index d82be30..42099fa 100644
 --- xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
 +++ xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
 @@ -31,11 +31,19 @@
@@ -1367,7 +1666,7 @@
  // progessmeter
  //__________________________________________________________________________________________________
  Reference< xml::input::XElement > ProgressBarElement::startChildElement(
-@@ -1003,9 +1105,37 @@ void ImageControlElement::endElement()
+@@ -1073,9 +1175,37 @@ void ImageControlElement::endElement()
  	ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleImage") ),
  							   OUString( RTL_CONSTASCII_USTRINGPARAM("scale-image") ),
  							   _xAttributes );
@@ -1408,7 +1707,7 @@
      ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
                                 OUString( RTL_CONSTASCII_USTRINGPARAM("tabstop") ),
                                 _xAttributes );
-@@ -1338,10 +1468,24 @@ void TitledBoxElement::endElement()
+@@ -1408,10 +1538,24 @@ void TitledBoxElement::endElement()
  		Reference< xml::input::XElement > xRadio( _radios[ nPos ] );
  		Reference< xml::input::XAttributes > xAttributes(
              xRadio->getAttributes() );
@@ -1434,7 +1733,7 @@
  		Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
  		
  		Reference< xml::input::XElement > xStyle( getStyle( xAttributes ) );
-@@ -1393,7 +1537,7 @@ void TitledBoxElement::endElement()
+@@ -1463,7 +1607,7 @@ void TitledBoxElement::endElement()
  		}
  		xControlModel->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("State") ),
  										 makeAny( nVal ) );
@@ -1443,7 +1742,7 @@
          ::std::vector< Reference< xml::input::XElement > > * radioEvents =
              static_cast< RadioElement * >( xRadio.get() )->getEvents();
  		ctx.importEvents( *radioEvents );
-@@ -1469,10 +1613,23 @@ void RadioGroupElement::endElement()
+@@ -1539,10 +1683,23 @@ void RadioGroupElement::endElement()
  		Reference< xml::input::XElement > xRadio( _radios[ nPos ] );
  		Reference< xml::input::XAttributes > xAttributes(
              xRadio->getAttributes() );
@@ -1468,7 +1767,7 @@
  		Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
  		
  		Reference< xml::input::XElement > xStyle( getStyle( xAttributes ) );
-@@ -1524,6 +1681,7 @@ void RadioGroupElement::endElement()
+@@ -1594,6 +1751,7 @@ void RadioGroupElement::endElement()
  		xControlModel->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("State") ),
  										 makeAny( nVal ) );
  		
@@ -1476,7 +1775,7 @@
          ::std::vector< Reference< xml::input::XElement > > * radioEvents =
              static_cast< RadioElement * >( xRadio.get() )->getEvents();
  		ctx.importEvents( *radioEvents );
-@@ -1644,9 +1802,26 @@ Reference< xml::input::XElement > MenuLi
+@@ -1714,9 +1872,26 @@ Reference< xml::input::XElement > MenuLi
  void MenuListElement::endElement()
  	throw (xml::sax::SAXException, RuntimeException)
  {
@@ -1504,7 +1803,7 @@
  	Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
  	
  	Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
-@@ -1679,13 +1854,16 @@ void MenuListElement::endElement()
+@@ -1749,13 +1924,16 @@ void MenuListElement::endElement()
  	ctx.importAlignProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
                               OUString( RTL_CONSTASCII_USTRINGPARAM("align") ),
                               _xAttributes );
@@ -1524,7 +1823,7 @@
  										 makeAny( p->getSelectedItems() ) );
  	}
  	ctx.importEvents( _events );
-@@ -1731,9 +1909,26 @@ Reference< xml::input::XElement > ComboB
+@@ -1801,9 +1979,26 @@ Reference< xml::input::XElement > ComboB
  void ComboBoxElement::endElement()
  	throw (xml::sax::SAXException, RuntimeException)
  {
@@ -1552,7 +1851,7 @@
  	Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
  	
  	Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
-@@ -1775,8 +1970,10 @@ void ComboBoxElement::endElement()
+@@ -1845,8 +2040,10 @@ void ComboBoxElement::endElement()
  	ctx.importAlignProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
                               OUString( RTL_CONSTASCII_USTRINGPARAM("align") ),
                               _xAttributes );

Modified: trunk/patches/vba/vba-workbook-worksheet-events.diff
==============================================================================
--- trunk/patches/vba/vba-workbook-worksheet-events.diff	(original)
+++ trunk/patches/vba/vba-workbook-worksheet-events.diff	Sun Sep  7 19:28:34 2008
@@ -2351,9 +2351,9 @@
 --- /home/feng/work/ooo-build/build/dev300-m14/sc/source/ui/vba/makefile.mk	2008-06-16 21:30:17.000000000 +0800
 +++ sc/source/ui/vba/makefile.mk	2008-06-05 18:11:39.000000000 +0800
 @@ -128,7 +128,8 @@ SLOFILES= \
- 		        $(SLO)$/vbapagebreak.obj \
          		$(SLO)$/vbapagebreaks.obj \
  		        $(SLO)$/vbaspinbutton.obj \
+ 		        $(SLO)$/vbaimage.obj \
 -				$(SLO)$/service.obj
 +				$(SLO)$/service.obj \
 +        $(SLO)$/vbaeventshelper.obj \



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