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



Author: noelpwer
Date: Thu Jan 29 14:52:06 2009
New Revision: 15240
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15240&view=rev

Log:
2009-01-30  Noel Power  <noel power novell com>

        * patches/dev300/cws-npower11.diff: regenerate 
        * patches/dev300/vba-get-nonfiltered-range-selection.diff: get  rid of
        crlfs
        * patches/vba/api-application-caller.diff: ditto


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/cws-npower11.diff
   trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff
   trunk/patches/vba/api-application-caller.diff

Modified: trunk/patches/dev300/cws-npower11.diff
==============================================================================
--- trunk/patches/dev300/cws-npower11.diff	(original)
+++ trunk/patches/dev300/cws-npower11.diff	Thu Jan 29 14:52:06 2009
@@ -1,43 +1,8 @@
-diff --git basic/source/classes/sbunoobj.cxx basic/source/classes/sbunoobj.cxx
-index e75294e..1313496 100644
---- basic/source/classes/sbunoobj.cxx
-+++ basic/source/classes/sbunoobj.cxx
-@@ -117,7 +117,7 @@ static String ID_DBG_PROPERTIES( RTL_CONSTASCII_USTRINGPARAM("Dbg_Properties") )
- static String ID_DBG_METHODS( RTL_CONSTASCII_USTRINGPARAM("Dbg_Methods") );
- 
- static ::rtl::OUString aSeqLevelStr( RTL_CONSTASCII_USTRINGPARAM("[]") );
--static ::rtl::OUString defaultNameSpace( RTL_CONSTASCII_USTRINGPARAM("org.openoffice") );
-+static ::rtl::OUString defaultNameSpace( RTL_CONSTASCII_USTRINGPARAM("ooo.vba") );
- 
- // Gets the default property for an uno object. Note: There is some
- // redirection built in. The property name specifies the name
-@@ -1600,7 +1600,7 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj,
- 			OSL_TRACE("Checking if object implements %s",
- 				OUStringToOString( defaultNameSpace + aClass,
- 					RTL_TEXTENCODING_UTF8 ).getStr() );
--			// although interfaces in the org.openoffice.vba namespace
-+			// although interfaces in the ooo.vba.vba namespace
- 			// obey the idl rules and have a leading X, in basic we
- 			// want to be able to do something like
- 			// 'dim wrkbooks as WorkBooks'
-diff --git basic/source/runtime/step2.cxx basic/source/runtime/step2.cxx
-index 1f659e1..a9ea4b1 100644
---- basic/source/runtime/step2.cxx
-+++ basic/source/runtime/step2.cxx
-@@ -71,7 +71,7 @@ SbxArray* getVBAGlobals( )
- 	xCtx.set( xProps->getPropertyValue( rtl::OUString(
- 		RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))),
- 			UNO_QUERY_THROW );
--	SbUnoObject dGlobs( String( RTL_CONSTASCII_USTRINGPARAM("ExcelGlobals") ), xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/org.openoffice.vba.theGlobals") ) );
-+	SbUnoObject dGlobs( String( RTL_CONSTASCII_USTRINGPARAM("ExcelGlobals") ), xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/ooo.vba.theGlobals") ) );
- 
- 	SbxVariable *vba = dGlobs.Find( String( RTL_CONSTASCII_USTRINGPARAM("getGlobals") ) , SbxCLASS_DONTCARE );
- 
-diff --git oovbaapi/genconstidl/api-to-idl.pl oovbaapi/genconstidl/api-to-idl.pl
-index f8d03c1..c3a3f10 100644
---- oovbaapi/genconstidl/api-to-idl.pl
-+++ oovbaapi/genconstidl/api-to-idl.pl
-@@ -131,12 +131,23 @@ sub generate_idls($) {
+Index: oovbaapi/genconstidl/api-to-idl.pl
+===================================================================
+--- oovbaapi/genconstidl/api-to-idl.pl	(.../tags/DEV300_m39)	(revision 266650)
++++ oovbaapi/genconstidl/api-to-idl.pl	(.../cws/npower11)	(revision 266650)
+@@ -131,12 +131,23 @@
              my $fname = $path . "/" . $type . ".idl";
              open( IDL, ">$fname" ) || die "Cannot write $fname.";
              
@@ -53,21 +18,41 @@
              foreach $constant ( @{$result{$module}{$type}} ) {
                  print IDL "        const long $constant->{'name'} = $constant->{'value'};\n";
              }
+-            print IDL "    };\n}; }; };\n";
 +            if( $module eq "vba" ) {
 +		print IDL "    };\n}; };\n";
 +	    }
 +	    else {
-             print IDL "    };\n}; }; };\n";
++            	print IDL "    };\n}; }; };\n";
 +            }
  
              close( IDL );
          }
-diff --git oovbaapi/ooo/vba/Globals.idl oovbaapi/ooo/vba/Globals.idl
-new file mode 100644
-index 0000000..21863c3
---- /dev/null
-+++ oovbaapi/ooo/vba/Globals.idl
-@@ -0,0 +1,48 @@
+Index: oovbaapi/prj/build.lst
+===================================================================
+--- oovbaapi/prj/build.lst	(.../tags/DEV300_m39)	(revision 266650)
++++ oovbaapi/prj/build.lst	(.../cws/npower11)	(revision 266650)
+@@ -1,8 +1,8 @@
+ ovba	oovbaapi	:	offapi solenv NULL
+-ovba	oovbaapi									usr1	-	all	ovba_mkout NULL
+-ovba	oovbaapi\genconstidl         nmake	-	all	ovba_genconstidl NULL
+-ovba	oovbaapi\org\openoffice\constants         nmake	-	all	ovba_constants  ovba_genconstidl NULL
+-ovba	oovbaapi\org\openoffice\vba         nmake	-	all	ovba_vba NULL
+-ovba	oovbaapi\org\openoffice\excel         nmake	-	all	ovba_excel NULL
+-ovba	oovbaapi\org\openoffice\msforms         nmake	-	all	ovba_msforms NULL
+-ovba   oovbaapi\util                             nmake   -   all ovba_util ovba_vba ovba_excel ovba_msforms ovba_constants ovba_genconstidl NULL
++ovba	oovbaapi                            usr1	-	all	ovba_mkout NULL
++ovba	oovbaapi\genconstidl                nmake	-	all	ovba_genconstidl NULL
++ovba	oovbaapi\ooo\vba\constants          nmake	-	all	ovba_constants  ovba_genconstidl NULL
++ovba	oovbaapi\ooo\vba                    nmake	-	all	ovba_vba NULL
++ovba	oovbaapi\ooo\vba\excel              nmake	-	all	ovba_excel NULL
++ovba	oovbaapi\ooo\vba\msforms            nmake	-	all	ovba_msforms NULL
++ovba    oovbaapi\util                       nmake       -       all     ovba_util ovba_vba ovba_excel ovba_msforms ovba_constants ovba_genconstidl NULL
+Index: oovbaapi/ooo/vba/XGlobals.idl
+===================================================================
+--- oovbaapi/ooo/vba/XGlobals.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XGlobals.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,67 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,8 +61,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: Globals.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XGlobals.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -97,31 +82,118 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+
-+#ifndef __ooo_vba_Globals_idl__
-+#define __ooo_vba_Globals_idl__
-+
 +#ifndef __ooo_vba_XGlobals_idl__
-+#include <ooo/vba/XGlobals.idl>
++#define __ooo_vba_XGlobals_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++#ifndef __ooo_vba_excel_XApplication_idl__
++#include <ooo/vba/excel/XApplication.idl>
++#endif
++#ifndef __ooo_vba_excel_XWorkbook_idl__
++#include <ooo/vba/excel/XWorkbook.idl>
++#endif
++#ifndef __ooo_vba_excel_XWorksheet_idl__
++#include <ooo/vba/excel/XWorksheet.idl>
 +#endif
 +
-+#include <com/sun/star/uno/XComponentContext.idl>
-+#include <com/sun/star/table/XCellRange.idl>
++module ooo {  module vba { 
 +
-+module ooo {  module vba {
-+service Globals : XGlobals
++interface XGlobals: com::sun::star::uno::XInterface
 +{
++        // FIXME, need better way to expose globals
++	sequence< any > getGlobals();
++
++	[attribute, readonly] ooo::vba::excel::XApplication Application;
++	[attribute, readonly] ooo::vba::excel::XWorkbook ActiveWorkbook;
++	[attribute, readonly] ooo::vba::excel::XWorksheet ActiveSheet;
++	any WorkSheets( [in] any aIndex );
++	any WorkBooks( [in] any aIndex );
++	any Sheets( [in] any aIndex );
++	any Range( [in] any Cell1, [in] any Cell2 );
++	any Names( [in] any Index );
 +};
 +
 +}; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/XAssistant.idl oovbaapi/ooo/vba/XAssistant.idl
-new file mode 100644
-index 0000000..9490af4
---- /dev/null
-+++ oovbaapi/ooo/vba/XAssistant.idl
-@@ -0,0 +1,65 @@
++
++
+Index: oovbaapi/ooo/vba/makefile.mk
+===================================================================
+--- oovbaapi/ooo/vba/makefile.mk	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/makefile.mk	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,64 @@
++#*************************************************************************
++#
++# 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: makefile.mk,v $
++#
++# $Revision: 1.4 $
++#
++# 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.
++#
++#*************************************************************************
++PRJ=..$/..
++
++PRJNAME=oovbapi
++
++TARGET=vba
++PACKAGE=ooo$/vba
++
++# --- Settings -----------------------------------------------------
++.INCLUDE :  $(PRJ)$/util$/makefile.pmk
++
++.IF "$(ENABLE_VBA)"!="YES"
++dummy:
++        @echo "not building vba..."
++.ENDIF
++
++# ------------------------------------------------------------------------
++
++IDLFILES=\
++	XErrObject.idl \
++	XGlobals.idl \
++	XCollection.idl\
++	XVBAToOOEventDescGen.idl\
++	XPropValue.idl\
++	XHelperInterface.idl\
++	XAssistant.idl\
++	XCommandBarControl.idl\
++	XCommandBarControls.idl\
++	XCommandBar.idl\
++	XCommandBars.idl\
++	Globals.idl\
++
++# ------------------------------------------------------------------
++
++.INCLUDE :  target.mk
+Index: oovbaapi/ooo/vba/XCommandBars.idl
+===================================================================
+--- oovbaapi/ooo/vba/XCommandBars.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XCommandBars.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -156,112 +228,38 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_XAssistant_idl__
-+#define __ooo_vba_XAssistant_idl__
++#ifndef __ooo_vba_XCommandBars_idl__
++#define __ooo_vba_XCommandBars_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
-+//=============================================================================
-+
-+module ooo {  module vba { 
-+//=============================================================================
-+
-+interface XAssistant
-+{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+    [attribute] boolean On;
-+    [attribute] boolean Visible;
-+    [attribute] long Top;
-+    [attribute] long Left;
-+    [attribute] long Animation;
-+    
-+    string Name() raises ( com::sun::star::script::BasicErrorException );
-+};
-+
-+}; };
-+
-+#endif
-diff --git oovbaapi/ooo/vba/XCollection.idl oovbaapi/ooo/vba/XCollection.idl
-new file mode 100644
-index 0000000..dd3d86e
---- /dev/null
-+++ oovbaapi/ooo/vba/XCollection.idl
-@@ -0,0 +1,63 @@
-+/*************************************************************************
-+ *
-+ * 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: XCollection.idl,v $
-+ * $Revision: 1.4 $
-+ *
-+ * 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 __ooo_vba_XCollection_idl__
-+#define __ooo_vba_XCollection_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+#ifndef __com_sun_star_script_XDefaultMethod_idl__
-+#include <com/sun/star/script/XDefaultMethod.idl>
-+#endif
-+#ifndef __com_sun_star_container_XEnumerationAccess_idl__
-+#include <com/sun/star/container/XEnumerationAccess.idl>
++#include <ooo/vba/XCollection.idl>
 +#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
 +//=============================================================================
 +
 +module ooo {  module vba { 
 +//=============================================================================
++interface XCommandBar;
 +
-+interface XCollection
++interface XCommandBars
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+	interface ::com::sun::star::script::XDefaultMethod;
-+	interface ::com::sun::star::container::XEnumerationAccess;
++    interface XCollection;
 +
-+	[attribute, readonly] long Count;
-+	any  Item( [in] any Index1, [in] any Index2 );
++    XCommandBar Add( [in] any Name, [in] any Position,  [in] any MenuBar, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
 +};
 +
 +}; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/XCommandBar.idl oovbaapi/ooo/vba/XCommandBar.idl
-new file mode 100644
-index 0000000..f5f317b
---- /dev/null
-+++ oovbaapi/ooo/vba/XCommandBar.idl
-@@ -0,0 +1,64 @@
+Index: oovbaapi/ooo/vba/XCommandBarControls.idl
+===================================================================
+--- oovbaapi/ooo/vba/XCommandBarControls.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XCommandBarControls.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -296,178 +294,233 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_XCommandBar_idl__
-+#define __ooo_vba_XCommandBar_idl__
++#ifndef __ooo_vba_XCommandBarControls_idl__
++#define __ooo_vba_XCommandBarControls_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
 +#endif
++
 +//=============================================================================
 +
 +module ooo {  module vba { 
 +//=============================================================================
-+interface XCommandBarControls;
++interface XCommandBarControl;
 +
-+interface XCommandBar
++interface XCommandBarControls
 +{
-+	interface XHelperInterface;
++	interface XCollection;
 +
-+    [attribute] string Name;
-+    [attribute] boolean Visible;
-+    
-+    void Delete() raises ( com::sun::star::script::BasicErrorException );
-+    any Controls( [in] any Index ) raises ( com::sun::star::script::BasicErrorException );
++    XCommandBarControl Add( [in] any Type, [in] any Id, [in] any Parameter, [in] any Before, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
 +};
 +
 +}; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/XCommandBarControl.idl oovbaapi/ooo/vba/XCommandBarControl.idl
-new file mode 100644
-index 0000000..ea0c612
---- /dev/null
-+++ oovbaapi/ooo/vba/XCommandBarControl.idl
-@@ -0,0 +1,64 @@
+Index: oovbaapi/ooo/vba/msforms/XControl.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XControl.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XControl.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,72 @@
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile: XControl.idl,v $
++ * $Revision: 1.3 $
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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 __ooo_vba_XCommandBarControl_idl__
-+#define __ooo_vba_XCommandBarControl_idl__
++#ifndef __ooo_vba_msforms_XControl_idl__
++#define __ooo_vba_msforms_XControl_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
++
++//=============================================================================
++
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+//=============================================================================
 +
-+module ooo {  module vba { 
-+//=============================================================================
++module ooo {  module vba {  module msforms { 
 +
-+interface XCommandBarControl
++//=============================================================================
++interface XControl
 +{
-+	interface XHelperInterface;
-+
-+    [attribute] string Caption;
-+    [attribute] string OnAction;
-+    [attribute] boolean Visible;
-+    
-+    void Delete() raises ( com::sun::star::script::BasicErrorException );
-+    any Controls( [in] any Index ) raises ( com::sun::star::script::BasicErrorException );
++	interface ::ooo::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.
++    //Mso use double but OOo use long. OOo 1 =  1/100mm but Mso use pt
++	[attribute] double Height;
++	[attribute] double Width;
++    //Postion
++    [attribute] double  Left;
++    [attribute] double  Top;
++	[attribute] string Name;
 +};
 +
-+}; };
++//=============================================================================
++
++}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/XCommandBarControls.idl oovbaapi/ooo/vba/XCommandBarControls.idl
-new file mode 100644
-index 0000000..c874b0a
---- /dev/null
-+++ oovbaapi/ooo/vba/XCommandBarControls.idl
-@@ -0,0 +1,61 @@
++
++
+Index: oovbaapi/ooo/vba/msforms/XImage.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XImage.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XImage.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,51 @@
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile$
++ * $Revision$
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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 __ooo_vba_XCommandBarControls_idl__
-+#define __ooo_vba_XCommandBarControls_idl__
++#ifndef __ooo_vba_msforms_XImage_idl__
++#define __ooo_vba_msforms_XImage_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++//=============================================================================
 +
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
++module ooo {  module vba {  module msforms { 
 +
 +//=============================================================================
++interface XImage: com::sun::star::uno::XInterface 
++{
++};
 +
-+module ooo {  module vba { 
 +//=============================================================================
-+interface XCommandBarControl;
 +
-+interface XCommandBarControls
-+{
-+	interface XCollection;
++}; }; };
 +
-+    XCommandBarControl Add( [in] any Type, [in] any Id, [in] any Parameter, [in] any Before, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XShapes.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XShapes.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XShapes.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,58 @@
++/*************************************************************************
++ *
++ * 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: XShapes.idl,v $
++ * $Revision: 1.3 $
++ *
++ * 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 __ooo_vba_msforms_XShapes_idl__
++#define __ooo_vba_msforms_XShapes_idl__
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++#ifndef  __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++module ooo {  module vba { module msforms {
++
++interface XShapeRange;
++interface XShape;
++
++interface XShapes 
++{
++    interface ooo::vba::XCollection;
++    void SelectAll();
++    XShapeRange Range( [in] any shapes );
++    /*
++    helper::calc
++    */
++    any AddLine( [in] long StartX, [in] long StartY, [in] long endX, [in] long endY );
++    any AddShape([in] long ShapeType, [in] long StartX, [in] long StartY, [in] long endX, [in] long endY );
 +};
++}; }; };
 +
-+}; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/XCommandBars.idl oovbaapi/ooo/vba/XCommandBars.idl
-new file mode 100644
-index 0000000..42e78a5
---- /dev/null
-+++ oovbaapi/ooo/vba/XCommandBars.idl
+Index: oovbaapi/ooo/vba/msforms/XScrollBar.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XScrollBar.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XScrollBar.idl	(.../cws/npower11)	(revision 266650)
 @@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
@@ -503,103 +556,120 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_XCommandBars_idl__
-+#define __ooo_vba_XCommandBars_idl__
++#ifndef __ooo_vba_msforms_XScrollBar_idl__
++#define __ooo_vba_msforms_XScrollBar_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++//=============================================================================
 +
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
++module ooo {  module vba {  module msforms { 
 +
 +//=============================================================================
++interface XScrollBar: com::sun::star::uno::XInterface 
++{
++	[attribute] long Max;
++	[attribute] long Min;
++	[attribute] any Value;
++	[attribute] long LargeChange;
++	[attribute] long SmallChange;
++};
 +
-+module ooo {  module vba { 
 +//=============================================================================
-+interface XCommandBar;
 +
-+interface XCommandBars
-+{
-+    interface XCollection;
++}; }; };
 +
-+    XCommandBar Add( [in] any Name, [in] any Position,  [in] any MenuBar, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
-+};
++#endif
 +
-+}; };
 +
-+#endif
-diff --git oovbaapi/ooo/vba/XErrObject.idl oovbaapi/ooo/vba/XErrObject.idl
-new file mode 100644
-index 0000000..dc9e3ab
---- /dev/null
-+++ oovbaapi/ooo/vba/XErrObject.idl
-@@ -0,0 +1,58 @@
-+/*************************************************************************
-+ *
-+ * 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: XErrObject.idl,v $
-+ * $Revision: 1.4 $
-+ *
-+ * 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.
-+ *
-+ ************************************************************************/
+Index: oovbaapi/ooo/vba/msforms/makefile.mk
+===================================================================
+--- oovbaapi/ooo/vba/msforms/makefile.mk	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/makefile.mk	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,77 @@
++#*************************************************************************
++#
++# 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: makefile.mk,v $
++#
++# $Revision: 1.4 $
++#
++# 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.
++#
++#*************************************************************************
++PRJ=..$/..$/..
 +
-+#ifndef __ooo_vba__XErrObject_idl__
-+#define __ooo_vba__XErrObject_idl__
++PRJNAME=oovbapi
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++TARGET=msforms
++PACKAGE=ooo$/vba$/msforms
 +
-+module ooo {  module vba  {
-+//==============================================================================
-+/** 
-+*/
-+interface XErrObject : ::com::sun::star::uno::XInterface
-+{
-+  //-----------------------------------------------------------------------
-+  /**
-+  */
-+  [attribute] long Number;
-+  [attribute] long HelpContext;
-+  [attribute] string HelpFile;
-+  [attribute] string Description;
-+  [attribute] string Source;
-+  void Clear();
-+  void Raise([in] any Number, [in] any Source, [in] any Description, [in] any HelpFile, [in] any HelpContext);
++# --- Settings -----------------------------------------------------
++.INCLUDE :  $(PRJ)$/util$/makefile.pmk
 +
-+};
++.IF "$(ENABLE_VBA)"!="YES"
++dummy:
++        @echo "not building vba..."
++.ENDIF
 +
-+}; };
-+#endif
-diff --git oovbaapi/ooo/vba/XGlobals.idl oovbaapi/ooo/vba/XGlobals.idl
-new file mode 100644
-index 0000000..75273c9
---- /dev/null
-+++ oovbaapi/ooo/vba/XGlobals.idl
-@@ -0,0 +1,67 @@
++# ------------------------------------------------------------------------
++
++IDLFILES=\
++	MSFormReturnTypes.idl \
++	XComboBox.idl \
++	XButton.idl \
++	XControl.idl \
++	XLabel.idl \
++	XTextBox.idl \
++	XRadioButton.idl \
++	XShape.idl \
++	XShapes.idl \
++	XLineFormat.idl \
++	XColorFormat.idl \
++	XFillFormat.idl \
++	XPictureFormat.idl \
++	XShapeRange.idl \
++	XTextBoxShape.idl \
++	XUserForm.idl \
++	XListBox.idl \
++	XToggleButton.idl \
++	XScrollBar.idl \
++	XProgressBar.idl \
++	XMultiPage.idl \
++	XPages.idl \
++	XSpinButton.idl \
++	XImage.idl \
++	XControls.idl \
++
++# ------------------------------------------------------------------
++
++.INCLUDE :  target.mk
+Index: oovbaapi/ooo/vba/msforms/XListBox.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XListBox.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XListBox.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -608,8 +678,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XGlobals.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XListBox.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -629,50 +699,44 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_XGlobals_idl__
-+#define __ooo_vba_XGlobals_idl__
++#ifndef __ooo_vba_msforms_XListBox_idl__
++#define __ooo_vba_msforms_XListBox_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __ooo_vba_excel_XApplication_idl__
-+#include <ooo/vba/excel/XApplication.idl>
-+#endif
-+#ifndef __ooo_vba_excel_XWorkbook_idl__
-+#include <ooo/vba/excel/XWorkbook.idl>
-+#endif
-+#ifndef __ooo_vba_excel_XWorksheet_idl__
-+#include <ooo/vba/excel/XWorksheet.idl>
-+#endif
++//=============================================================================
 +
-+module ooo {  module vba { 
++module ooo {  module vba {  module msforms { 
 +
-+interface XGlobals: com::sun::star::uno::XInterface
-+{
-+        // FIXME, need better way to expose globals
-+	sequence< any > getGlobals();
 +
-+	[attribute, readonly] ooo::vba::excel::XApplication Application;
-+	[attribute, readonly] ooo::vba::excel::XWorkbook ActiveWorkbook;
-+	[attribute, readonly] ooo::vba::excel::XWorksheet ActiveSheet;
-+	any WorkSheets( [in] any aIndex );
-+	any WorkBooks( [in] any aIndex );
-+	any Sheets( [in] any aIndex );
-+	any Range( [in] any Cell1, [in] any Cell2 );
-+	any Names( [in] any Index );
++//=============================================================================
++interface XListBox: com::sun::star::uno::XInterface 
++{
++	[attribute] any Value;
++	[attribute] string Text;
++	[attribute] boolean MultiSelect;
++	[attribute] any ListIndex;
++        [attribute, readonly ] long ListCount;
++	void AddItem( [in] any pvargItem, [in] any pvargIndex );
++	void removeItem( [in] any index );
++	void Clear();
++    any Selected( [in] long index );
++    any List( [in] any pvargIndex, [in] any pvarColumn );
 +};
 +
-+}; };
++//=============================================================================
++
++}; }; };
 +
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/XHelperInterface.idl oovbaapi/ooo/vba/XHelperInterface.idl
-new file mode 100644
-index 0000000..a669ae5
---- /dev/null
-+++ oovbaapi/ooo/vba/XHelperInterface.idl
-@@ -0,0 +1,71 @@
+Index: oovbaapi/ooo/vba/msforms/XPictureFormat.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XPictureFormat.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XPictureFormat.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,48 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -681,7 +745,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XHelperInterface.idl,v $
++ * $RCSfile: XPictureFormat.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -702,54 +766,30 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_msforms_XPictureFormat_idl__
++#define __ooo_vba_msforms_XPictureFormat_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#define __ooo_vba_XHelperInterface_idl__
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+
-+#ifndef __com_sun_star_uno_Exception_idl__
-+#include <com/sun/star/uno/Exception.idl>
-+#endif
 +
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
-+#ifndef __com_sun_star_lang_XServiceInfo_idl__
-+#include <com/sun/star/lang/XServiceInfo.idl>
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+module ooo {  module vba {
-+
-+interface XHelperInterface 
++module ooo {  module vba { module msforms {
++interface XPictureFormat : ooo::vba::XHelperInterface
 +{
-+
-+    interface ::com::sun::star::lang::XServiceInfo;
-+    /** this is one of the few methods that does not aim to be compatible; it
-+     * returns 0x53756E4F which is "SunO"
-+     */
-+    long getCreator()
-+        raises (com::sun::star::script::BasicErrorException);
-+
-+    XHelperInterface getParent()
-+        raises (com::sun::star::script::BasicErrorException);
-+
-+    any Application()
-+        raises (com::sun::star::script::BasicErrorException);
-+
++    [attribute] double Brightness;
++    [attribute] double Contrast;
++    void IncrementBrightness( [in] double increment );
++    void IncrementContrast( [in] double increment );
 +};
-+
-+}; };
++}; }; };
 +
 +#endif
-+
-diff --git oovbaapi/ooo/vba/XPropValue.idl oovbaapi/ooo/vba/XPropValue.idl
-new file mode 100644
-index 0000000..58f8593
---- /dev/null
-+++ oovbaapi/ooo/vba/XPropValue.idl
-@@ -0,0 +1,55 @@
+Index: oovbaapi/ooo/vba/msforms/XColorFormat.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XColorFormat.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XColorFormat.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,46 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -758,7 +798,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XPropValue.idl,v $
++ * $RCSfile: XColorFormat.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -779,168 +819,91 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_XPropValue_idl__
-+#define __ooo_vba_XPropValue_idl__
++#ifndef __ooo_vba_msforms_XColorFormat_idl__
++#define __ooo_vba_msforms_XColorFormat_idl__
 +
-+#ifndef __com_sun_star_script_XDefaultProperty_idl__
-+#include <com/sun/star/script/XDefaultProperty.idl>
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
++module ooo {  module vba { module msforms {
 +
-+//=============================================================================
-+
-+module ooo {  module vba { 
-+
-+
-+//=============================================================================
-+interface XPropValue: com::sun::star::script::XDefaultProperty
++interface XColorFormat : ooo::vba::XHelperInterface
 +{
-+	[attribute] any Value;
++    [attribute] long RGB;
++    [attribute] long SchemeColor;
 +};
 +
-+//=============================================================================
-+
-+}; };
-+
++};};};
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl
-new file mode 100644
-index 0000000..b72fccf
---- /dev/null
-+++ oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl
-@@ -0,0 +1,49 @@
+Index: oovbaapi/ooo/vba/msforms/XMultiPage.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XMultiPage.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XMultiPage.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
-+ * 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
 + *
-+ * OpenOffice.org - a multi-platform office productivity suite
++ *  $RCSfile$
 + *
-+ * $RCSfile: XVBAToOOEventDescGen.idl,v $
-+ * $Revision: 1.3 $
++ *  $Revision$
 + *
-+ * This file is part of OpenOffice.org.
++ *  last change: $Author$ $Date$
 + *
-+ * 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.
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
 + *
-+ * 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.
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_XVBAToOOEventDescGen_idl__
-+#define __ooo_vba_XVBAToOOEventDescGen_idl__
++#ifndef __ooo_vba_msforms_XMultiPage_idl__
++#define __ooo_vba_msforms_XMultiPage_idl__
 +
-+#ifndef __com_sun_star_script_ScriptEventDescriptor_idl__
-+#include <com/sun/star/script/ScriptEventDescriptor.idl>
-+#endif 
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
-+#ifndef __com_sun_star_script_XScriptEventsSupplier_idl__
-+#include <com/sun/star/script/XScriptEventsSupplier.idl>
-+#endif 
++module ooo {  module vba {  module msforms { 
 +
-+module ooo {  module vba { 
-+interface XVBAToOOEventDescGen : com::sun::star::uno::XInterface
++//=============================================================================
++interface XMultiPage: com::sun::star::uno::XInterface 
 +{
-+	sequence< com::sun::star::script::ScriptEventDescriptor >  getEventDescriptions( [in] com::sun::star::uno::XInterface xControl, [in] string sLibModName, [in] sequence< string > handlerExts );
-+	com::sun::star::script::XScriptEventsSupplier getEventSupplier( [in] com::sun::star::uno::XInterface xControl );
++	[attribute] long Value;
++	any Pages( [in] any index );
 +};
 +
-+}; };
-+#endif
-diff --git oovbaapi/ooo/vba/constants/makefile.mk oovbaapi/ooo/vba/constants/makefile.mk
-new file mode 100644
-index 0000000..9fb0e91
---- /dev/null
-+++ oovbaapi/ooo/vba/constants/makefile.mk
-@@ -0,0 +1,69 @@
-+#*************************************************************************
-+#
-+# 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: makefile.mk,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.
-+#
-+#*************************************************************************
-+PRJ=..$/..$/..
-+
-+PRJNAME=oovbapi
-+
-+TARGET=constants
-+PACKAGE=org$/vba$/constants
-+
-+# --- Settings -----------------------------------------------------
-+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
-+
-+.IF "$(ENABLE_VBA)"!="YES"
-+dummy:
-+        @echo "not building vba..."
-+.ELSE
-+
-+# ------------------------------------------------------------------------
-+
-+# I tried to use the IDLFILES target but it failed dismally
-+MY_GEN_IDL_PATH=$(MISC)$/idl
-+MY_GEN_UCR_PATH=$(OUT)$/ucr$/$(PACKAGE)
-+MYTMPIDLFILES=$(shell @ls $(MY_GEN_IDL_PATH))
-+#IDLFILES=$(foreach,i,$(MYTMPIDLFILES) $(MY_GEN_IDL_PATH)$/$(i))
-+MYIDLFILES=$(foreach,i,$(MYTMPIDLFILES) $(MY_GEN_IDL_PATH)$/$(i))
-+MYURDFILES=$(foreach,i,$(MYIDLFILES) $(MY_GEN_UCR_PATH)$/$(i:b).urd)
-+MYDBTARGET=$(OUT)$/ucr/constants.db
-+
-+
-+.INCLUDE :  target.mk
-+
-+ALLTAR: $(MYDBTARGET)
++//=============================================================================
 +
-+$(MY_GEN_UCR_PATH)$/%.urd: $(MY_GEN_IDL_PATH)$/%.idl
-+    $(IDLC) -C -O $(MY_GEN_UCR_PATH) -I $(MY_GEN_IDL_PATH) -I $(SOLARIDLDIR) $?
++}; }; };
 +
-+$(MYDBTARGET) : $(MYURDFILES)  $(MYIDLFILES)
-+    $(REGMERGE) $(OUT)$/ucr/constants.db /UCR @$(mktmp $(MYURDFILES))
++#endif
 +
-+.ENDIF
 +
-diff --git oovbaapi/ooo/vba/excel/Hyperlink.idl oovbaapi/ooo/vba/excel/Hyperlink.idl
-new file mode 100644
-index 0000000..c729143
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/Hyperlink.idl
-@@ -0,0 +1,54 @@
+Index: oovbaapi/ooo/vba/msforms/XProgressBar.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XProgressBar.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XProgressBar.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,57 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -975,32 +938,34 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_msforms_XProgressBar_idl__
++#define __ooo_vba_msforms_XProgressBar_idl__
 +
-+#ifndef __ooo_vba_excel_Hyperlink_idl__
-+#define __ooo_vba_excel_Hyperlink_idl__
-+
-+#ifndef __ooo_vba_excel_XHyperlink_idl__
-+#include <ooo/vba/excel/XHyperlink.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
++//=============================================================================
 +
-+#include <com/sun/star/uno/XComponentContext.idl>
-+#include <com/sun/star/frame/XModel.idl>
++module ooo {  module vba {  module msforms { 
 +
-+module ooo {  module vba { module excel {
-+service Hyperlink : XHyperlink
++//=============================================================================
++interface XProgressBar: com::sun::star::uno::XInterface 
 +{
-+  	createHyperlink(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
++	[attribute] any Value;
 +};
 +
++//=============================================================================
++
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/excel/Range.idl oovbaapi/ooo/vba/excel/Range.idl
-new file mode 100644
-index 0000000..1565691
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/Range.idl
-@@ -0,0 +1,49 @@
++
++
+Index: oovbaapi/ooo/vba/msforms/XRadioButton.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XRadioButton.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XRadioButton.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,53 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1009,7 +974,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: Range.idl,v $
++ * $RCSfile: XRadioButton.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -1030,92 +995,35 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_msforms_XRadioButton_idl__
++#define __ooo_vba_msforms_XRadioButton_idl__
 +
-+#ifndef __ooo_vba_excel_Range_idl__
-+#define __ooo_vba_excel_Range_idl__
-+
-+#ifndef __ooo_vba_excel_XRange_idl__
-+#include <ooo/vba/excel/XRange.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
++//=============================================================================
 +
-+#include <com/sun/star/uno/XComponentContext.idl>
-+#include <com/sun/star/table/XCellRange.idl>
++module ooo {  module vba {  module msforms { 
 +
-+module ooo {  module vba { module excel {
-+service Range : XRange
++//=============================================================================
++interface XRadioButton: com::sun::star::uno::XInterface 
 +{
-+  	createRangeFromXCellRange(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::table::XCellRange Range );
++	[attribute] string Caption;
++	[attribute] any Value;
 +};
 +
-+}; }; };
-+
-+#endif
-diff --git oovbaapi/ooo/vba/excel/Window.idl oovbaapi/ooo/vba/excel/Window.idl
-new file mode 100644
-index 0000000..28d2c83
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/Window.idl
-@@ -0,0 +1,54 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
++//=============================================================================
 +
-+#ifndef __ooo_vba_excel_Window_idl__
-+#define __ooo_vba_excel_Window_idl__
++}; }; };
 +
-+#ifndef __ooo_vba_excel_XWindow_idl__
-+#include <ooo/vba/excel/XWindow.idl>
 +#endif
 +
-+#include <com/sun/star/uno/XComponentContext.idl>
-+#include <com/sun/star/frame/XModel.idl>
-+
-+module ooo {  module vba { module excel {
-+service Window : XWindow
-+{
-+  	createWindow(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
-+};
-+
-+}; }; };
 +
-+#endif
-diff --git oovbaapi/ooo/vba/excel/Workbook.idl oovbaapi/ooo/vba/excel/Workbook.idl
-new file mode 100644
-index 0000000..6a6e78b
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/Workbook.idl
-@@ -0,0 +1,49 @@
+Index: oovbaapi/ooo/vba/msforms/XTextBox.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XTextBox.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XTextBox.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,55 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1124,7 +1032,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: Workbook.idl,v $
++ * $RCSfile: XTextBox.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -1145,31 +1053,36 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_msforms_XTextBox_idl__
++#define __ooo_vba_msforms_XTextBox_idl__
 +
-+#ifndef __ooo_vba_excel_Workbook_idl__
-+#define __ooo_vba_excel_Workbook_idl__
-+
-+#ifndef __ooo_vba_excel_XWorkbook_idl__
-+#include <ooo/vba/excel/XWorkbook.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
++//=============================================================================
 +
-+#include <com/sun/star/uno/XComponentContext.idl>
-+#include <com/sun/star/frame/XModel.idl>
++module ooo {  module vba {  module msforms { 
 +
-+module ooo {  module vba { module excel {
-+service Workbook : XWorkbook
++//=============================================================================
++interface XTextBox: com::sun::star::uno::XInterface 
 +{
-+  	createWorkbook(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
++	[attribute] string  Text;
++    [attribute] any    Value;
++    [attribute] long    MaxLength;
++    [attribute] boolean Multiline;
 +};
 +
++//=============================================================================
++
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/excel/Worksheet.idl oovbaapi/ooo/vba/excel/Worksheet.idl
-new file mode 100644
-index 0000000..137e11b
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/Worksheet.idl
++
++
+Index: oovbaapi/ooo/vba/msforms/XFillFormat.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XFillFormat.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XFillFormat.idl	(.../cws/npower11)	(revision 266650)
 @@ -0,0 +1,53 @@
 +/*************************************************************************
 + *
@@ -1179,7 +1092,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: Worksheet.idl,v $
++ * $RCSfile: XFillFormat.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -1200,36 +1113,101 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_msforms_XFillFormat_idl__
++#define __ooo_vba_msforms_XFillFormat_idl__
 +
-+#ifndef __ooo_vba_excel_Worksheet_idl__
-+#define __ooo_vba_excel_Worksheet_idl__
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
-+#ifndef __ooo_vba_excel_XWorksheet_idl__
-+#include <ooo/vba/excel/XWorksheet.idl>
++#ifndef __ooo_vba_msforms_XColorFormat_idl__
++#include <ooo/vba/msforms/XColorFormat.idl>
 +#endif
 +
-+#ifndef __com_sun_star_sheet_XComponentContext_idl__
-+#include <com/sun/star/uno/XComponentContext.idl>
++module ooo {  module vba { module msforms {
++interface XFillFormat : ooo::vba::XHelperInterface
++{
++    [attribute] boolean Visible;
++    [attribute] double Transparency;
++    void Solid();
++    void TwoColorGradient( [in] long style, [in] long variant );
++    XColorFormat BackColor();
++    XColorFormat ForeColor();
++};
++
++};};};
 +#endif
-+#ifndef __com_sun_star_frame_XModel_idl__
-+#include <com/sun/star/frame/XModel.idl>
+Index: oovbaapi/ooo/vba/msforms/XPages.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XPages.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XPages.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,61 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef __ooo_vba_msforms_XPage_idl__
++#define __ooo_vba_msforms_XPage_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++#ifndef  __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
 +#endif
 +
-+module ooo {  module vba { module excel {
-+service Worksheet : XWorksheet
++//=============================================================================
++
++module ooo {  module vba {  module msforms { 
++
++//=============================================================================
++interface XPages
 +{
-+  	createWorksheet(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel, [in] string SheetName  );
++    interface ooo::vba::XCollection;
 +};
 +
++//=============================================================================
++
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/excel/XApplication.idl oovbaapi/ooo/vba/excel/XApplication.idl
-new file mode 100644
-index 0000000..8b0bde9
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XApplication.idl
-@@ -0,0 +1,119 @@
++
++
+Index: oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,54 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1238,8 +1216,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XApplication.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: MSFormReturnTypes.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -1259,102 +1237,36 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XApplication_idl__
-+#define __ooo_vba_excel_XApplication_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
-+
-+#ifndef __ooo_vba_XAssistant_idl__
-+#include <ooo/vba/XAssistant.idl>
-+#endif
-+
-+#ifndef __ooo_vba_XCommandBars_idl__
-+#include <ooo/vba/XCommandBars.idl>
-+#endif
-+
-+module ooo {  module vba {  module excel { 
-+
-+interface XRange;
-+interface XWorkbook;
-+interface XWorkbooks;
-+interface XWorksheets;
-+interface XWorksheetFunction;
-+interface XWindow;
-+interface XWorksheet;
-+
-+interface XApplication
++module msforms
 +{
++    struct ReturnBoolean
++    {
++        boolean Value;
++    };
++                                                                                
++    struct ReturnEffect
++    {
++        //fmDropEffect Value;
++        short Value;
++    };
++                                                                                
++    struct ReturnInteger
++    {
++        long Value;
++    };
++                                                                                
++    struct ReturnSingle
++    {
++        float Value;
++    };
++                                                                                
 +
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	[attribute, readonly] any Selection;
-+	[attribute, readonly] XWorkbook ActiveWorkbook;
-+	[attribute, readonly] XRange ActiveCell;
-+	[attribute, readonly] XWindow ActiveWindow;
-+	[attribute, readonly] XWorksheet ActiveSheet;
-+    [attribute, readonly] ooo::vba::XAssistant Assistant;
-+	[attribute] long Calculation;
-+	//#TODO #FIXME this is more of a placeholder, will return
-+	// the value of activeworkbook, in xl 'ThisWorkbook' should return the
-+	// workbook in which the 'calling' macro is running. Should be possible
-+	// to determine this
-+	[attribute, readonly] XWorkbook ThisWorkbook;
-+	[attribute, readonly] string Name;
-+	[attribute] boolean ScreenUpdating;
-+	[attribute] boolean DisplayStatusBar;
-+	[attribute] boolean DisplayAlerts;
-+	[attribute] boolean DisplayFormulaBar;
-+	[attribute] any CutCopyMode;
-+	[attribute] any StatusBar;
-+	[attribute] long Cursor; 
-+	[attribute, readonly] string Version;
-+
-+	void setDefaultFilePath([in] string DefaultFilePath) raises(com::sun::star::script::BasicErrorException);
-+
-+	string getDefaultFilePath() raises(com::sun::star::script::BasicErrorException); 
-+
-+	string LibraryPath() raises(com::sun::star::script::BasicErrorException);
-+	string TemplatesPath() raises(com::sun::star::script::BasicErrorException);
-+	string PathSeparator() raises(com::sun::star::script::BasicErrorException);
-+    any CommandBars( [in] any aIndex );
-+	any Workbooks( [in] any aIndex );
-+	any Worksheets( [in] any aIndex );
-+	any Windows( [in] any aIndex );
-+	any WorksheetFunction();
-+	any Evaluate( [in] string Name );
-+	any Dialogs( [in] any DialogIndex );
-+	any Range( [in] any Cell1, [in] any Cell2 );
-+	any Names( [in] any Index );
-+	void GoTo( [in] any Reference, [in] any Scroll );
-+	// #FIXME #TODO up to 30 args needed
-+	double CountA( [in] any arg1 );
-+	void wait( [in] double time );
-+	void Calculate() raises(com::sun::star::script::BasicErrorException);
-+	XRange Intersect([in] XRange Arg1, [in] XRange Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30)
-+        raises(com::sun::star::script::BasicErrorException);
-+	XRange Union([in] XRange Arg1, [in] XRange Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30)
-+        raises(com::sun::star::script::BasicErrorException);
-+	void Volatile([in] any Volatile);
-+	void DoEvents();
 +};
-+
-+}; }; };
-+
-+#endif
-+
-+
-diff --git oovbaapi/ooo/vba/excel/XAxes.idl oovbaapi/ooo/vba/excel/XAxes.idl
-new file mode 100644
-index 0000000..fba5c6a
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XAxes.idl
-@@ -0,0 +1,59 @@
+Index: oovbaapi/ooo/vba/msforms/XLineFormat.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XLineFormat.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XLineFormat.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1363,7 +1275,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XAxes.idl,v $
++ * $RCSfile: XLineFormat.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -1384,42 +1296,42 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+
-+#ifndef __ooo_vba_excel_XAxes_idl__
-+#define __ooo_vba_excel_XAxes_idl__
-+
-+#ifndef __ooo_vba_excel_XAxis_idl__
-+#include <ooo/vba/excel/XAxis.idl>
-+#endif
-+
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
++#ifndef __ooo_vba_msforms_XLineFormat_idl__
++#define __ooo_vba_msforms_XLineFormat_idl__
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++#ifndef __ooo_vba_msforms_XColorFormat_idl__
++#include <ooo/vba/msforms/XColorFormat.idl>
 +#endif
-+module ooo {  module vba { module excel { 
 +
-+interface XAxes
++module ooo {  module vba { module msforms {
++interface XLineFormat : ooo::vba::XHelperInterface
 +{
-+	interface ::ooo::vba::XCollection;	
++    [attribute] long BeginArrowheadStyle;
++    [attribute] long BeginArrowheadLength;
++    [attribute] long BeginArrowheadWidth;
++    [attribute] long EndArrowheadStylel;
++    [attribute] long EndArrowheadLength;
++    [attribute] long EndArrowheadWidth;
++    [attribute] double Weight;
++    [attribute] boolean Visible;
++    [attribute] double Transparency;
++    [attribute] short Style;
++    [attribute] long DashStyle;
++    XColorFormat BackColor();
++    XColorFormat ForeColor();
 +};
-+
 +}; }; };
 +
 +#endif
-+
-diff --git oovbaapi/ooo/vba/excel/XAxis.idl oovbaapi/ooo/vba/excel/XAxis.idl
-new file mode 100644
-index 0000000..8df328c
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XAxis.idl
-@@ -0,0 +1,262 @@
+Index: oovbaapi/ooo/vba/msforms/XShape.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XShape.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XShape.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,89 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1428,7 +1340,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XAxis.idl,v $
++ * $RCSfile: XShape.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -1449,245 +1361,315 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_msforms_XShape_idl__
++#define __ooo_vba_msforms_XShape_idl__
 +
-+#ifndef __ooo_vba_excel_XAxis_idl__
-+#define __ooo_vba_excel_XAxis_idl__
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
++#ifndef __ooo_vba_excel_XTextFrame_idl__
++#include <ooo/vba/excel/XTextFrame.idl>
 +#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_msforms_XLineFormat_idl__
++#include <ooo/vba/msforms/XLineFormat.idl>
 +#endif
 +
-+module ooo {  module vba { module excel {
-+interface XAxisTitle;
-+interface XAxis 
-+{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+    void Delete()
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    XAxisTitle getAxisTitle()
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    void setDisplayUnit([in] long DisplayUnit)
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    long getDisplayUnit()
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    void setCrosses([in] long Crosses)
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    long getCrosses()
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    void setCrossesAt([in] double CrossesAt)
-+        raises(com::sun::star::script::BasicErrorException);
++#ifndef __ooo_vba_msforms_XFillFormat_idl__
++#include <ooo/vba/msforms/XFillFormat.idl>
++#endif
 +
-+    double getCrossesAt()
-+        raises(com::sun::star::script::BasicErrorException);
++#ifndef __ooo_vba_msforms_XPictureFormat_idl__
++#include <ooo/vba/msforms/XPictureFormat.idl>
++#endif
 +
-+    void setType([in] long Type)
-+        raises(com::sun::star::script::BasicErrorException);
++module ooo {  module vba { module msforms {
++interface XShapeRange;
++interface XShape : ooo::vba::XHelperInterface
++{
++    [attribute] string Name;
++    [attribute] double Height;
++    [attribute] double Width;
++    [attribute] double Left;
++    [attribute] double Top;
++    [attribute] boolean Visible;
++    [attribute, readonly] long ZOrderPosition;
++    [attribute, readonly] long Type;
++    [attribute] double Rotation;
++    [attribute, readonly] XLineFormat Line;
++    [attribute, readonly] XFillFormat Fill;
++    [attribute, readonly] XPictureFormat PictureFormat;
 +
-+    long getType()
-+        raises(com::sun::star::script::BasicErrorException);
++    /*
++    using in word
++    [attribute] RelativeHorizontalPosition
++    [attribute] RelativeVerticalPosition
++    [attribute] XWrapFormat WrapFormat;
++    */
++    ooo::vba::excel::XTextFrame TextFrame();
++    void Delete();
++    void ZOrder( [in] long ZOrderCmd );
++    void IncrementRotation( [in] double Increment );
++    void IncrementLeft( [in] double Increment );
++    void IncrementTop( [in] double Increment );
++    void Select( [in]  /*Optional*/ any Replace );
++    void ScaleHeight( [in] double Factor, [in] boolean RelativeToOriginalSize, [in] long Scale );
++    void ScaleWidth( [in] double Factor, [in] boolean RelativeToOriginalSize, [in] long Scale );
++    any ShapeRange( [in] any index );  // only here for convience
++};
++}; }; };
 +
-+    void setHasTitle([in] boolean HasTitle)
-+        raises(com::sun::star::script::BasicErrorException);
++#endif
+Index: oovbaapi/ooo/vba/msforms/XUserForm.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XUserForm.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XUserForm.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,58 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef __ooo_vba_msforms_XUserForm_idl__
++#define __ooo_vba_msforms_XUserForm_idl__
 +
-+    boolean getHasTitle()
-+        raises(com::sun::star::script::BasicErrorException);
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++#ifndef __com_sun_star_script_XInvocation_idl__
++#include <com/sun/star/script/XInvocation.idl>
++#endif
++module ooo {  module vba { module msforms {
++interface XUserForm 
++{
++	//interface ::ooo::vba::XHelperInterface;
++	interface ::com::sun::star::script::XInvocation;
++    [attribute] string Caption;
++    void Show();
++    void Hide();
++    void RePaint();
++    void UnloadObject();
++    any Controls( [in] any index );
++};
++}; }; };
 +
-+    void setMinorUnit([in] double MinorUnit)
-+        raises(com::sun::star::script::BasicErrorException);
++#endif
+Index: oovbaapi/ooo/vba/msforms/XControls.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XControls.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XControls.idl	(.../cws/npower11)	(revision 266650)
+@@ -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 __ooo_vba_msforms_XControls_idl__
++#define __ooo_vba_msforms_XControls_idl__
 +
-+    double getMinorUnit()
-+        raises(com::sun::star::script::BasicErrorException);
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++#ifndef  __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++module ooo {  module vba { module msforms {
 +
-+    void setMinorUnitIsAuto([in] boolean MinorUnitIsAuto)
-+        raises(com::sun::star::script::BasicErrorException);
++interface XControl;
 +
-+    boolean getMinorUnitIsAuto()
-+        raises(com::sun::star::script::BasicErrorException);
++interface XControls 
++{
++    interface ooo::vba::XCollection;
++    void Move( [in] double cx, [in] double cy );
++};
++}; }; };
 +
-+    void setReversePlotOrder([in] boolean ReversePlotOrder)
-+        raises(com::sun::star::script::BasicErrorException);
 +
-+    boolean getReversePlotOrder()
-+        raises(com::sun::star::script::BasicErrorException);
++#endif
+Index: oovbaapi/ooo/vba/msforms/XGroupBox.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XGroupBox.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XGroupBox.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,56 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef __ooo_vba_msforms_XGroupBox_idl__
++#define __ooo_vba_msforms_XGroupBox_idl__
 +
-+    void setMajorUnit([in] double MajorUnit)
-+        raises(com::sun::star::script::BasicErrorException);
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
-+    double getMajorUnit()
-+        raises(com::sun::star::script::BasicErrorException);
++module ooo {  module vba {  module msforms { 
++//=============================================================================
++interface XGroupBox
++{
++	[attribute] string Caption; 
++};
 +
-+    void setMajorUnitIsAuto([in] boolean MajorUnitIsAuto)
-+        raises(com::sun::star::script::BasicErrorException);
++//=============================================================================
 +
-+    boolean getMajorUnitIsAuto()
-+        raises(com::sun::star::script::BasicErrorException);
++}; }; };
 +
-+    void setMaximumScale([in] double MaximumScale)
-+        raises(com::sun::star::script::BasicErrorException);
++#endif
 +
-+    double getMaximumScale()
-+        raises(com::sun::star::script::BasicErrorException);
 +
-+    void setMaximumScaleIsAuto([in] boolean MaximumScaleIsAuto)
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    boolean getMaximumScaleIsAuto()
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    void setMinimumScale([in] double MinimumScale)
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    double getMinimumScale()
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    void setMinimumScaleIsAuto([in] boolean MinimumScaleIsAuto)
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    boolean getMinimumScaleIsAuto()
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    long getAxisGroup();//
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    void setScaleType([in] long ScaleType)
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    long getScaleType()
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    double getHeight()
-+        raises (com::sun::star::script::BasicErrorException);
-+
-+    void setHeight([in] /* double */ double height)
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    double getWidth()
-+        raises (com::sun::star::script::BasicErrorException);
-+
-+    void setWidth([in] /* double */ double width)
-+        raises(com::sun::star::script::BasicErrorException);
-+
-+    double getTop()
-+        raises (com::sun::star::script::BasicErrorException);
-+
-+    void setTop([in] /* double */ double top)
-+        raises (com::sun::star::script::BasicErrorException);
-+
-+    double getLeft()
-+        raises (com::sun::star::script::BasicErrorException);
-+
-+    void setLeft([in] /* double */ double left)
-+        raises (com::sun::star::script::BasicErrorException);
-+
-+
-+    //    XBorder		getBorder( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setMinorGridlines( [in] XGridlines MinorGridlines ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // XGridlines		getMinorGridlines( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setMinorTickMark( [in] long MinorTickMark ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getMinorTickMark( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setTickLabelPosition( [in] long TickLabelPosition ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getTickLabelPosition( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setTickLabels( [in] XTickLabels TickLabels ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // XTickLabels		getTickLabels( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setTickLabelSpacing( [in] long TickLabelSpacing ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getTickLabelSpacing( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setTickMarkSpacing( [in] long TickMarkSpacing ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getTickMarkSpacing( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setMajorGridlines( [in] XGridlines MajorGridlines ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // XGridlines		getMajorGridlines( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setMajorTickMark( [in] long MajorTickMark ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getMajorTickMark( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setBaseUnit( [in] long BaseUnit ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getBaseUnit( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setBaseUnitIsAuto( [in] boolean BaseUnitIsAuto ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // boolean		getBaseUnitIsAuto( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setMajorUnitScale( [in] long MajorUnitScale ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getMajorUnitScale( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setMinorUnitScale( [in] long MinorUnitScale ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getMinorUnitScale( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setCategoryType( [in] long CategoryType ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long		getCategoryType( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setHasMajorGridlines( [in] boolean HasMajorGridlines ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // boolean		getHasMajorGridlines( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setHasMinorGridlines( [in] boolean HasMinorGridlines ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // boolean		getHasMinorGridlines( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void			setCategoryNames( [in] any CategoryNames ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // any			getCategoryNames( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setDisplayUnitCustom( [in] double DisplayUnitCustom ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // double		getDisplayUnitCustom( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setHasDisplayUnitLabel( [in] boolean HasDisplayUnitLabel ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // boolean		getHasDisplayUnitLabel( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setDisplayUnitLabel( [in] XDisplayUnitLabel DisplayUnitLabel ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // XDisplayUnitLabel		getDisplayUnitLabel( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // any			Select(  ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setAxisBetweenCategories( [in] boolean AxisBetweenCategories ) raises ( com::sun::star::script::BasicErrorException );
+Index: oovbaapi/ooo/vba/msforms/XSpinButton.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XSpinButton.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XSpinButton.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,59 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef __ooo_vba_msforms_XSpinButton_idl__
++#define __ooo_vba_msforms_XSpinButton_idl__
 +
-+    // boolean		getAxisBetweenCategories( ) raises ( com::sun::star::script::BasicErrorException );
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
++module ooo {  module vba {  module msforms { 
 +
++//=============================================================================
++interface XSpinButton: com::sun::star::uno::XInterface 
++{
++	[attribute] long Max;
++	[attribute] long Min;
++	[attribute] any Value;
 +};
 +
++//=============================================================================
++
 +}; }; };
 +
 +#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XAxisTitle.idl oovbaapi/ooo/vba/excel/XAxisTitle.idl
-new file mode 100644
-index 0000000..7b96474
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XAxisTitle.idl
-@@ -0,0 +1,52 @@
++
+Index: oovbaapi/ooo/vba/msforms/XComboBox.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XComboBox.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XComboBox.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1696,7 +1678,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XAxisTitle.idl,v $
++ * $RCSfile: XComboBox.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -1717,35 +1699,43 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_msforms_XComboBox_idl__
++#define __ooo_vba_msforms_XComboBox_idl__
 +
-+#ifndef __ooo_vba_excel_XAxisTitle_idl__
-+#define __ooo_vba_excel_XAxisTitle_idl__
-+
-+#ifndef __ooo_vba_excel_XTitle_idl__
-+#include <ooo/vba/excel/XTitle.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
 +
-+module ooo {  module vba { module excel { 
++//=============================================================================
 +
-+interface XAxisTitle 
++module ooo {  module vba {  module msforms { 
++
++
++//=============================================================================
++interface XComboBox: ::com::sun::star::uno::XInterface
 +{
-+	interface ::ooo::vba::excel::XTitle;
++	[attribute] any Value;
++	[attribute] any ListIndex;
++	[attribute, readonly ] long ListCount;
++	[attribute] string Text;
++	void AddItem( [in] any pvargItem, [in] any pvargIndex );
++	void removeItem( [in] any index );
++	void Clear();
 +};
 +
++//=============================================================================
++
 +}; }; };
 +
 +#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XBorder.idl oovbaapi/ooo/vba/excel/XBorder.idl
-new file mode 100644
-index 0000000..b3c1198
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XBorder.idl
-@@ -0,0 +1,62 @@
++
+Index: oovbaapi/ooo/vba/msforms/XButton.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XButton.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XButton.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,52 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1754,8 +1744,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XBorder.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XButton.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -1775,30 +1765,20 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XBorder_idl__
-+#define __ooo_vba_excel_XBorder_idl__
++#ifndef __ooo_vba_msforms_XButton_idl__
++#define __ooo_vba_msforms_XButton_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
-+
++module ooo {  module vba {  module msforms { 
 +
 +//=============================================================================
-+interface XBorder
++interface XButton: com::sun::star::uno::XInterface 
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	[attribute] any Color;
-+	[attribute] any ColorIndex;
-+	[attribute] any LineStyle;
-+	[attribute] any Weight;
++	[attribute] string Caption;
 +};
 +
 +//=============================================================================
@@ -1808,12 +1788,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XBorders.idl oovbaapi/ooo/vba/excel/XBorders.idl
-new file mode 100644
-index 0000000..c40e4e7
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XBorders.idl
-@@ -0,0 +1,62 @@
+Index: oovbaapi/ooo/vba/msforms/XShapeRange.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XShapeRange.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XShapeRange.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1822,8 +1801,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XBorders.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XShapeRange.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -1843,30 +1822,91 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XBorders_idl__
-+#define __ooo_vba_excel_XBorders_idl__
++#ifndef __ooo_vba_msforms_XShapeRange_idl__
++#define __ooo_vba_msforms_XShapeRange_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+#ifndef  __ooo_vba_excel_XBorder_idl__
-+#include <ooo/vba/excel/XBorder.idl>
++
++#ifndef __ooo_vba_msforms_XShape_idl__
++#include <ooo/vba/msforms/XShape.idl>
 +#endif
++
 +#ifndef  __ooo_vba_XCollection_idl__
 +#include <ooo/vba/XCollection.idl>
 +#endif
 +
++module ooo {  module vba { module msforms {
 +
-+//=============================================================================
++interface XShapeRange 
++{
++    interface ooo::vba::XCollection;
++    void Select();
++    XShape Group();
++    void IncrementRotation( [in] double Increment );
++    void IncrementLeft( [in] double Increment );
++    void IncrementTop( [in] double Increment );
++};
++}; }; };
 +
-+module ooo {  module vba {  module excel { 
++#endif
+Index: oovbaapi/ooo/vba/msforms/XToggleButton.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XToggleButton.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XToggleButton.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef __ooo_vba_msforms_XToggleButton_idl__
++#define __ooo_vba_msforms_XToggleButton_idl__
++
++#ifndef __ooo_vba_msforms_XButton_idl__
++#include <ooo/vba/msforms/XButton.idl>
++#endif
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
++module ooo {  module vba {  module msforms { 
 +//=============================================================================
-+interface XBorders
++interface XToggleButton
 +{
-+	
-+	interface ooo::vba::excel::XBorder;
-+	interface ooo::vba::XCollection;
++	interface XButton;
++	[attribute] any Value; 
 +};
 +
 +//=============================================================================
@@ -1876,68 +1916,63 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XCharacters.idl oovbaapi/ooo/vba/excel/XCharacters.idl
-new file mode 100644
-index 0000000..ba37b5a
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XCharacters.idl
-@@ -0,0 +1,65 @@
+Index: oovbaapi/ooo/vba/msforms/XTextBoxShape.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XTextBoxShape.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XTextBoxShape.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
-+ * 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
 + *
-+ * OpenOffice.org - a multi-platform office productivity suite
++ *  $RCSfile$
 + *
-+ * $RCSfile: XCharacters.idl,v $
-+ * $Revision: 1.4 $
++ *  $Revision$
 + *
-+ * This file is part of OpenOffice.org.
++ *  last change: $Author$ $Date$
 + *
-+ * 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.
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
 + *
-+ * 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.
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XCharacters_idl__
-+#define __ooo_vba_excel_XCharacters_idl__
++#ifndef __ooo_vba_msforms_XTextBoxShape_idl__
++#define __ooo_vba_msforms_XTextBoxShape_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __ooo_vba_excel_XFont_idl__
-+#include <ooo/vba/excel/XFont.idl>
-+#endif
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_excel_XCharacters_idl
++#include <ooo/vba/excel/XCharacters.idl>
 +#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
++module ooo {  module vba {  module msforms { 
 +
 +//=============================================================================
-+interface XCharacters
++interface XTextBoxShape: com::sun::star::uno::XInterface 
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	[attribute] string Caption;
-+	[attribute, readonly ] long Count;
-+	[attribute] string Text;
-+	[attribute] XFont Font;
-+	void Insert([in] string String);
-+	void Delete();
++	[attribute] string  Text;
++	::ooo::vba::excel::XCharacters characters([in] any Start, [in] any Length);
 +};
 +
 +//=============================================================================
@@ -1947,12 +1982,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XChart.idl oovbaapi/ooo/vba/excel/XChart.idl
-new file mode 100644
-index 0000000..1234368
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XChart.idl
-@@ -0,0 +1,90 @@
+Index: oovbaapi/ooo/vba/msforms/XLabel.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XLabel.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XLabel.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,53 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1961,8 +1995,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XChart.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XLabel.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -1982,58 +2016,21 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XChart_idl__
-+#define __ooo_vba_excel_XChart_idl__
++#ifndef __ooo_vba_msforms_XLabel_idl__
++#define __ooo_vba_msforms_XLabel_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
-+
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
++module ooo {  module vba {  module msforms { 
 +
 +//=============================================================================
-+interface XRange; 
-+interface XChartTitle; 
-+interface XChart
++interface XLabel: com::sun::star::uno::XInterface 
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+	
-+	[attribute, readonly] string Name;
-+	any SeriesCollection( [in] any Item );
-+	long getChartType() raises(com::sun::star::script::BasicErrorException);
-+
-+	void setChartType([in] long chartType) raises(com::sun::star::script::BasicErrorException);
-+
-+	void Activate() raises(com::sun::star::script::BasicErrorException);
-+	void setSourceData([in] XRange Source, [in] any PlotBy) raises(com::sun::star::script::BasicErrorException);
-+
-+	long Location() raises (com::sun::star::script::BasicErrorException);
-+	long getLocation() raises (com::sun::star::script::BasicErrorException);
-+
-+	void setLocation([in] long where, [in] any Name) raises (com::sun::star::script::BasicErrorException);
-+
-+	boolean getHasTitle() raises(com::sun::star::script::BasicErrorException);
-+
-+	void setHasTitle([in] boolean bTitle) raises(com::sun::star::script::BasicErrorException);
-+
-+	boolean getHasLegend() raises(com::sun::star::script::BasicErrorException);
-+
-+	void setHasLegend([in] boolean bLegend) raises(com::sun::star::script::BasicErrorException);
-+	XChartTitle getChartTitle() raises (com::sun::star::script::BasicErrorException);
-+	void setPlotBy([in] long xlRowCol) raises(com::sun::star::script::BasicErrorException);
-+
-+	long getPlotBy() raises(com::sun::star::script::BasicErrorException);
-+
-+	any Axes( [in] any Type, [in] any AxisGroup ) raises (com::sun::star::script::BasicErrorException);
-+
++	[attribute] string Caption;
++	[attribute] any Value;
 +};
 +
 +//=============================================================================
@@ -2043,12 +2040,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XChartObject.idl oovbaapi/ooo/vba/excel/XChartObject.idl
-new file mode 100644
-index 0000000..5cc70dd
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XChartObject.idl
-@@ -0,0 +1,64 @@
+Index: oovbaapi/ooo/vba/Globals.idl
+===================================================================
+--- oovbaapi/ooo/vba/Globals.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/Globals.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,48 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2057,8 +2053,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XChartObject.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: Globals.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -2078,46 +2074,29 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XChartObject_idl__
-+#define __ooo_vba_excel_XChartObject_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
++#ifndef __ooo_vba_Globals_idl__
++#define __ooo_vba_Globals_idl__
++
++#ifndef __ooo_vba_XGlobals_idl__
++#include <ooo/vba/XGlobals.idl>
 +#endif
-+//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/table/XCellRange.idl>
 +
-+//=============================================================================
-+interface XChart;
-+interface XChartObject
++module ooo {  module vba {
++service Globals : XGlobals
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	[attribute, readonly] XChart Chart;
-+	[attribute] string Name;
-+	void  Delete() raises(com::sun::star::script::BasicErrorException);
-+
 +};
 +
-+//=============================================================================
-+
-+}; }; };
++}; };
 +
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/excel/XChartObjects.idl oovbaapi/ooo/vba/excel/XChartObjects.idl
-new file mode 100644
-index 0000000..c3dc08a
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XChartObjects.idl
+Index: oovbaapi/ooo/vba/XCollection.idl
+===================================================================
+--- oovbaapi/ooo/vba/XCollection.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XCollection.idl	(.../cws/npower11)	(revision 266650)
 @@ -0,0 +1,63 @@
 +/*************************************************************************
 + *
@@ -2127,7 +2106,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XChartObjects.idl,v $
++ * $RCSfile: XCollection.idl,v $
 + * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
@@ -2148,46 +2127,45 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XChartObjects_idl__
-+#define __ooo_vba_excel_XChartObjects_idl__
++#ifndef __ooo_vba_XCollection_idl__
++#define __ooo_vba_XCollection_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++#ifndef __com_sun_star_script_XDefaultMethod_idl__
++#include <com/sun/star/script/XDefaultMethod.idl>
 +#endif
-+
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
++#ifndef __com_sun_star_container_XEnumerationAccess_idl__
++#include <com/sun/star/container/XEnumerationAccess.idl>
 +#endif
 +
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
-+
++module ooo {  module vba { 
 +//=============================================================================
-+interface XChartObjects
++
++interface XCollection
 +{
-+	interface ooo::vba::XCollection;
-+	any Add( [in] double Left, [in] double Top, [in] double Width, [in] double Height ) raises(com::sun::star::script::BasicErrorException);
-+	void Delete() raises (com::sun::star::script::BasicErrorException);
-+};
++	interface ::ooo::vba::XHelperInterface;
++	interface ::com::sun::star::script::XDefaultMethod;
++	interface ::com::sun::star::container::XEnumerationAccess;
 +
-+//=============================================================================
++	[attribute, readonly] long Count;
++	any  Item( [in] any Index1, [in] any Index2 );
++};
 +
-+}; }; };
++}; };
 +
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/excel/XChartTitle.idl oovbaapi/ooo/vba/excel/XChartTitle.idl
-new file mode 100644
-index 0000000..cc263cd
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XChartTitle.idl
-@@ -0,0 +1,53 @@
+Index: oovbaapi/ooo/vba/XHelperInterface.idl
+===================================================================
+--- oovbaapi/ooo/vba/XHelperInterface.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XHelperInterface.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,71 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2196,7 +2174,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XChartTitle.idl,v $
++ * $RCSfile: XHelperInterface.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -2218,35 +2196,52 @@
 + *
 + ************************************************************************/
 +
-+#ifndef __ooo_vba_excel_XChartTitle_idl__
-+#define __ooo_vba_excel_XChartTitle_idl__
++#ifndef __ooo_vba_XHelperInterface_idl__
++#define __ooo_vba_XHelperInterface_idl__
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
-+#ifndef __ooo_vba_excel_XTitle_idl__
-+#include <ooo/vba/excel/XTitle.idl>
++#ifndef __com_sun_star_uno_Exception_idl__
++#include <com/sun/star/uno/Exception.idl>
 +#endif
 +
 +#ifndef __com_sun_star_script_BasicErrorException_idl__
 +#include <com/sun/star/script/BasicErrorException.idl>
 +#endif
++#ifndef __com_sun_star_lang_XServiceInfo_idl__
++#include <com/sun/star/lang/XServiceInfo.idl>
++#endif
 +
-+module ooo {  module vba { module excel { 
++module ooo {  module vba {
 +
-+interface XTitle;
-+interface XChartTitle 
++interface XHelperInterface 
 +{
-+	interface XTitle;
++
++    interface ::com::sun::star::lang::XServiceInfo;
++    /** this is one of the few methods that does not aim to be compatible; it
++     * returns 0x53756E4F which is "SunO"
++     */
++    long getCreator()
++        raises (com::sun::star::script::BasicErrorException);
++
++    XHelperInterface getParent()
++        raises (com::sun::star::script::BasicErrorException);
++
++    any Application()
++        raises (com::sun::star::script::BasicErrorException);
++
 +};
 +
-+}; }; };
++}; };
 +
 +#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XCharts.idl oovbaapi/ooo/vba/excel/XCharts.idl
-new file mode 100644
-index 0000000..7fd864a
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XCharts.idl
-@@ -0,0 +1,63 @@
+Index: oovbaapi/ooo/vba/excel/XWorkbooks.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWorkbooks.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorkbooks.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2255,8 +2250,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XCharts.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XWorkbooks.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -2276,8 +2271,8 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XChart_idl__
-+#define __ooo_vba_excel_XChart_idl__
++#ifndef __ooo_vba_excel_XWorkbooks_idl__
++#define __ooo_vba_excel_XWorkbooks_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
@@ -2287,35 +2282,30 @@
 +#include <ooo/vba/XCollection.idl>
 +#endif
 +
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
 +
 +//=============================================================================
 +
 +module ooo {  module vba {  module excel { 
-+interface XChart;
++
 +//=============================================================================
-+interface XCharts
++
++interface XWorkbooks 
 +{
-+	interface ooo::vba::XCollection;
-+	any Add() raises(com::sun::star::script::BasicErrorException);
-+	XChart getActiveChart() raises (com::sun::star::script::BasicErrorException);
-+};
++	interface ::ooo::vba::XCollection;
++	any Add();
++	any Open([in] string Filename, [in] any UpdateLinks, [in] any ReadOnly, [in] any Format, [in] any Password, [in] any WriteResPassword, [in] any IgnoreReadOnlyRecommended, [in] any Origin, [in] any Delimiter, [in] any Editable, [in] any Notify, [in] any Converter, [in] any AddToMru);
 +
-+//=============================================================================
++	void Close();
++};
 +
 +}; }; };
 +
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/excel/XComment.idl oovbaapi/ooo/vba/excel/XComment.idl
-new file mode 100644
-index 0000000..f13dd6a
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XComment.idl
-@@ -0,0 +1,69 @@
+Index: oovbaapi/ooo/vba/excel/XPageBreak.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XPageBreak.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPageBreak.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,73 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2324,8 +2314,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XComment.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile$
++ * $Revision$
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -2345,37 +2335,41 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XComment_idl__
-+#define __ooo_vba_excel_XComment_idl__
++#ifndef __ooo_vba_excel_XPageBreak_idl__
++#define __ooo_vba_excel_XPageBreak_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
-+#include <com/sun/star/lang/IllegalArgumentException.idl>
-+#endif
++
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
++
++#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel {
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
 +
-+interface XApplication;
 +interface XRange;
 +
-+interface XComment
++interface XPageBreak
 +{
++
 +	interface ::ooo::vba::XHelperInterface;
 +
-+	[attribute] string Author;
-+//	[attribute, readonly] Shape Shape;
-+	[attribute] boolean Visible;
++    // Attributes
++    [attribute] long Type;
++    
++	//Methods	
++	void Delete() raises(com::sun::star::script::BasicErrorException);
++    XRange Location()raises(com::sun::star::script::BasicErrorException);
 +
-+	void Delete();
-+	XComment Next();
-+	XComment Previous();
-+	string Text([in] any Text, [in] any Start, [in] any Overwrite);
 +};
 +
 +//=============================================================================
@@ -2385,12 +2379,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XComments.idl oovbaapi/ooo/vba/excel/XComments.idl
-new file mode 100644
-index 0000000..9ce8c23
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XComments.idl
-@@ -0,0 +1,58 @@
+Index: oovbaapi/ooo/vba/excel/XWorksheetFunction.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWorksheetFunction.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorksheetFunction.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,68 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2399,7 +2392,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XComments.idl,v $
++ * $RCSfile: XWorksheetFunction.idl,v $
 + * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
@@ -2420,26 +2413,36 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XComments_idl__
-+#define __ooo_vba_excel_XComments_idl__
++#ifndef __ooo_vba_excel_XWSFunction_idl__
++#define __ooo_vba_excel_XWSFunction_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
-+#include <com/sun/star/lang/IllegalArgumentException.idl>
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++
++#ifndef __com_sun_star_beans_XExactName_idl__
++#include <com/sun/star/beans/XExactName.idl>
 +#endif
 +
++#ifndef __com_sun_star_script_XInvocation_idl__
++#include <com/sun/star/script/XInvocation.idl>
++#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel {
++module ooo {  module vba {  module excel { 
 +
-+interface XComments
++//=============================================================================
++
++
++interface XWorksheetFunction
 +{
-+	interface ooo::vba::XCollection;
++	interface ::ooo::vba::XHelperInterface;
++	interface ::com::sun::star::beans::XExactName;
++	interface ::com::sun::star::script::XInvocation;
 +};
 +
 +//=============================================================================
@@ -2449,12 +2452,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XDataLabel.idl oovbaapi/ooo/vba/excel/XDataLabel.idl
-new file mode 100644
-index 0000000..95fad63
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XDataLabel.idl
-@@ -0,0 +1,62 @@
+Index: oovbaapi/ooo/vba/excel/XFormatConditions.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XFormatConditions.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XFormatConditions.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,71 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2463,7 +2465,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XDataLabel.idl,v $
++ * $RCSfile: XFormatConditions.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -2484,45 +2486,53 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XDataLabel_idl__
-+#define __ooo_vba_excel_XDataLabel_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
++#ifndef __ooo_vba_excel_XFormatConditions_idl__
++#define __ooo_vba_excel_XFormatConditions_idl__
 +
 +#ifndef __com_sun_star_script_BasicErrorException_idl__
 +#include <com/sun/star/script/BasicErrorException.idl>
 +#endif
-+//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
 +
-+//=============================================================================
-+interface XDataLabel
++module ooo {  module vba { module excel
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+	string Text() raises(com::sun::star::script::BasicErrorException);
 +
-+	string Name() raises (com::sun::star::script::BasicErrorException);
++interface XFormatCondition;
++interface XFormatConditions 
++{
++
++	interface ooo::vba::XCollection;
++
++	void Delete(  ) raises ( com::sun::star::script::BasicErrorException );
++
++	/**
++	@param Type
++	
++	@param Operator
++		Optional.
++	@param Formula1
++		Optional.
++	@param Formula2
++		Optional.
++	@return XFormatCondition
++	**/
++	XFormatCondition Add( [in] long Type, [in]  /*Optional*/ any Operator, [in]  /*Optional*/ any Formula1, [in]  /*Optional*/ any Formula2 ) raises ( com::sun::star::script::BasicErrorException );
++
++
 +};
 +
-+//=============================================================================
 +
 +}; }; };
 +
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/excel/XDataLabels.idl oovbaapi/ooo/vba/excel/XDataLabels.idl
-new file mode 100644
-index 0000000..63720ef
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XDataLabels.idl
-@@ -0,0 +1,59 @@
+Index: oovbaapi/ooo/vba/excel/XDialogs.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XDialogs.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XDialogs.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,63 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2531,8 +2541,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XDataLabels.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XDialogs.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -2552,9 +2562,9 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XDataLabels_idl__
-+#define __ooo_vba_excel_XDataLabels_idl__
-+
++#ifndef __ooo_vba_excel_XDialogs_idl__
++#define __ooo_vba_excel_XDialogs_idl__
++                                                                                                                             
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
@@ -2562,32 +2572,35 @@
 +#include <ooo/vba/XCollection.idl>
 +#endif
 +
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+//=============================================================================
-+
-+module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
-+interface XDataLabels
++                                                                                                                             
++module ooo {  module vba {  module excel {
++interface XApplication;                                                                                                                             
++//=============================================================================
++                                                                                                                             
++//interface XDialogs : ::ooo::vba::XCollection
++interface XDialogs 
 +{
-+	interface ::ooo::vba::XCollection;
-+};
++	interface ::ooo::vba::XHelperInterface;
 +
-+//=============================================================================
++        [attribute, readonly] long Count;
 +
++	any Item( [in] any Index );
++};
++                                                                                                                             
 +}; }; };
-+
++                                                                                                                             
 +#endif
 +
-+
-diff --git oovbaapi/ooo/vba/excel/XDialog.idl oovbaapi/ooo/vba/excel/XDialog.idl
-new file mode 100644
-index 0000000..da45681
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XDialog.idl
-@@ -0,0 +1,60 @@
+Index: oovbaapi/ooo/vba/excel/Worksheet.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Worksheet.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/Worksheet.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,53 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2596,8 +2609,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XDialog.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: Worksheet.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -2617,43 +2630,35 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XDialog_idl__
-+#define __ooo_vba_excel_XDialog_idl__
-+                                                                                                                             
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
++#ifndef __ooo_vba_excel_Worksheet_idl__
++#define __ooo_vba_excel_Worksheet_idl__
 +
++#ifndef __ooo_vba_excel_XWorksheet_idl__
++#include <ooo/vba/excel/XWorksheet.idl>
++#endif
 +
-+//=============================================================================
-+                                                                                                                             
-+module ooo {  module vba {  module excel {
-+                                                                                                                             
-+//=============================================================================
++#ifndef __com_sun_star_sheet_XComponentContext_idl__
++#include <com/sun/star/uno/XComponentContext.idl>
++#endif
++#ifndef __com_sun_star_frame_XModel_idl__
++#include <com/sun/star/frame/XModel.idl>
++#endif
 +
-+interface XApplication;
-+                                                                                                                             
-+interface XDialog 
++module ooo {  module vba { module excel {
++service Worksheet : XWorksheet
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	void Show();
++  	createWorksheet(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel, [in] string SheetName  );
 +};
-+                                                                                                                             
++
 +}; }; };
-+                                                                                                                             
-+#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XDialogs.idl oovbaapi/ooo/vba/excel/XDialogs.idl
-new file mode 100644
-index 0000000..0610c44
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XDialogs.idl
-@@ -0,0 +1,63 @@
++#endif
+Index: oovbaapi/ooo/vba/excel/XPane.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XPane.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPane.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,56 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2662,8 +2667,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XDialogs.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XPane.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -2683,46 +2688,38 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XDialogs_idl__
-+#define __ooo_vba_excel_XDialogs_idl__
-+                                                                                                                             
++#ifndef __com_sun_star_helper_XPane_idl__
++#define __com_sun_star_helper_XPane_idl__
++
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
++//============================================================================
 +
-+//=============================================================================
-+                                                                                                                             
-+module ooo {  module vba {  module excel {
-+interface XApplication;                                                                                                                             
-+//=============================================================================
-+                                                                                                                             
-+//interface XDialogs : ::ooo::vba::XCollection
-+interface XDialogs 
-+{
-+	interface ::ooo::vba::XHelperInterface;
++module ooo { module vba { module excel {
 +
-+        [attribute, readonly] long Count;
++//============================================================================
 +
-+	any Item( [in] any Index );
++interface XPane: com::sun::star::uno::XInterface
++{
++    [attribute] long ScrollColumn;
++    [attribute] long ScrollRow;
++
++    void SmallScroll([in] /*Optional*/ any Down, [in] /*Optional*/ any Up, [in] /*Optional*/ any ToRight, [in] /*Optional*/ any ToLeft);
++    void LargeScroll([in] /*Optional*/ any Down, [in] /*Optional*/ any Up, [in] /*Optional*/ any ToRight, [in] /*Optional*/ any ToLeft);
 +};
-+                                                                                                                             
++
++//============================================================================
++
 +}; }; };
-+                                                                                                                             
-+#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XFont.idl oovbaapi/ooo/vba/excel/XFont.idl
-new file mode 100644
-index 0000000..597f362
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XFont.idl
-@@ -0,0 +1,74 @@
++#endif
+Index: oovbaapi/ooo/vba/excel/XPivotCache.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XPivotCache.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPivotCache.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2731,7 +2728,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XFont.idl,v $
++ * $RCSfile: XPivotCache.idl,v $
 + * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
@@ -2752,15 +2749,12 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XFont_idl__
-+#define __ooo_vba_excel_XFont_idl__
++#ifndef __ooo_vba_excel_XPivotCache_idl__
++#define __ooo_vba_excel_XPivotCache_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
-+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
-+#endif
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
@@ -2770,24 +2764,13 @@
 +
 +module ooo {  module vba {  module excel { 
 +
-+interface XFont
++//=============================================================================
++
++interface XPivotCache
 +{
 +	interface ::ooo::vba::XHelperInterface;
 +
-+	[attribute] any   Size;
-+	[attribute] any StandardFontSize;
-+	[attribute] any  StandardFont;
-+	[attribute] any  FontStyle;
-+	[attribute] any    ColorIndex;
-+	[attribute] any    Color;
-+	[attribute] any Bold;
-+	[attribute] any Underline;
-+	[attribute] any Strikethrough;
-+	[attribute] any Shadow;
-+	[attribute] any Italic;
-+	[attribute] any Subscript;
-+	[attribute] any Superscript;
-+	[attribute] any  Name;
++	void Refresh();
 +};
 +
 +//=============================================================================
@@ -2797,11 +2780,10 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XFormat.idl oovbaapi/ooo/vba/excel/XFormat.idl
-new file mode 100644
-index 0000000..4dd52ca
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XFormat.idl
+Index: oovbaapi/ooo/vba/excel/XFormat.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XFormat.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XFormat.idl	(.../cws/npower11)	(revision 266650)
 @@ -0,0 +1,138 @@
 +/*************************************************************************
 + *
@@ -2941,12 +2923,11 @@
 +
 +#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XFormatCondition.idl oovbaapi/ooo/vba/excel/XFormatCondition.idl
-new file mode 100644
-index 0000000..9ebc63d
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XFormatCondition.idl
-@@ -0,0 +1,84 @@
+Index: oovbaapi/ooo/vba/excel/XChartObject.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XChartObject.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XChartObject.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,64 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2955,8 +2936,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XFormatCondition.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XChartObject.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -2976,67 +2957,46 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_excel_XChartObject_idl__
++#define __ooo_vba_excel_XChartObject_idl__
 +
-+#ifndef __ooo_vba_excel_XFormatCondition_idl__
-+#define __ooo_vba_excel_XFormatCondition_idl__
-+
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++//=============================================================================
 +
-+module ooo {  module vba { module excel { 
-+
-+interface XFont;
-+interface XInterior;
-+interface XBorders;
++module ooo {  module vba {  module excel { 
 +
-+interface XFormatCondition 
++//=============================================================================
++interface XChart;
++interface XChartObject
 +{
-+	interface  ::ooo::vba::XHelperInterface;
-+
-+	void Delete(  ) raises ( com::sun::star::script::BasicErrorException );
++	interface ::ooo::vba::XHelperInterface;
 +
-+	/**
-+	@param Type
-+	@param Operator
-+	Optional.
-+	@param Formula1
-+	Optional.
-+	@param Formula2
-+	Optional.
-+	@return void
-+	**/
-+	void Modify( [in] long Type, [in]  /*Optional*/ any Operator, [in]  /*Optional*/ any Formula1, [in]  /*Optional*/ any Formula2 ) raises ( com::sun::star::script::BasicErrorException );
-+	
-+	long Type( ) raises ( com::sun::star::script::BasicErrorException );
-+	
-+	long Operator( ) raises ( com::sun::star::script::BasicErrorException );
-+	
-+	string Formula1( ) raises ( com::sun::star::script::BasicErrorException );
-+	
-+	string Formula2( ) raises ( com::sun::star::script::BasicErrorException );
-+	
-+	XInterior Interior( ) raises ( com::sun::star::script::BasicErrorException );
++	[attribute, readonly] XChart Chart;
++	[attribute] string Name;
++	void  Delete() raises(com::sun::star::script::BasicErrorException);
 +
-+	any Borders( [in] any Index) raises ( com::sun::star::script::BasicErrorException );
-+	
-+	XFont Font( ) raises ( com::sun::star::script::BasicErrorException );
 +};
 +
++//=============================================================================
 +
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/excel/XFormatConditions.idl oovbaapi/ooo/vba/excel/XFormatConditions.idl
-new file mode 100644
-index 0000000..db3d5e1
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XFormatConditions.idl
-@@ -0,0 +1,71 @@
++
++
+Index: oovbaapi/ooo/vba/excel/XHPageBreak.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XHPageBreak.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XHPageBreak.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,55 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3045,8 +3005,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XFormatConditions.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile$
++ * $Revision$
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3066,54 +3026,37 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XFormatConditions_idl__
-+#define __ooo_vba_excel_XFormatConditions_idl__
-+
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
++#ifndef __ooo_vba_excel_XHPageBreak_idl__
++#define __ooo_vba_excel_XHPageBreak_idl__
 +
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++#ifndef __ooo_vba_excel_XPageBreak_idl__
++#include <ooo/vba/excel/XPageBreak.idl>
 +#endif
 +
-+module ooo {  module vba { module excel
-+{
-+
-+interface XFormatCondition;
-+interface XFormatConditions 
-+{
-+
-+	interface ooo::vba::XCollection;
 +
-+	void Delete(  ) raises ( com::sun::star::script::BasicErrorException );
++//=============================================================================
 +
-+	/**
-+	@param Type
-+	
-+	@param Operator
-+		Optional.
-+	@param Formula1
-+		Optional.
-+	@param Formula2
-+		Optional.
-+	@return XFormatCondition
-+	**/
-+	XFormatCondition Add( [in] long Type, [in]  /*Optional*/ any Operator, [in]  /*Optional*/ any Formula1, [in]  /*Optional*/ any Formula2 ) raises ( com::sun::star::script::BasicErrorException );
++module ooo {  module vba {  module excel { 
 +
++//=============================================================================
 +
++interface XHPageBreak
++{
++	interface ::ooo::vba::excel::XPageBreak;
 +};
 +
++//=============================================================================
 +
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/excel/XHPageBreak.idl oovbaapi/ooo/vba/excel/XHPageBreak.idl
-new file mode 100644
-index 0000000..3fda6b6
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XHPageBreak.idl
-@@ -0,0 +1,55 @@
++
++
+Index: oovbaapi/ooo/vba/excel/XOLEObjects.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XOLEObjects.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XOLEObjects.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,54 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3122,8 +3065,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XOLEObjects.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3143,23 +3086,22 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XHPageBreak_idl__
-+#define __ooo_vba_excel_XHPageBreak_idl__
++#ifndef __ooo_vba_excel_XOLEObjects_idl__
++#define __ooo_vba_excel_XOLEObjects_idl__
 +
-+#ifndef __ooo_vba_excel_XPageBreak_idl__
-+#include <ooo/vba/excel/XPageBreak.idl>
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
 +#endif
-+
-+
 +//=============================================================================
 +
 +module ooo {  module vba {  module excel { 
 +
-+//=============================================================================
 +
-+interface XHPageBreak
++//=============================================================================
++interface XOLEObjects
 +{
-+	interface ::ooo::vba::excel::XPageBreak;
++	interface ::ooo::vba::XCollection;
++	//[attribute, readonly] boolean Focused;
 +};
 +
 +//=============================================================================
@@ -3169,12 +3111,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XHPageBreaks.idl oovbaapi/ooo/vba/excel/XHPageBreaks.idl
-new file mode 100644
-index 0000000..f6ac421
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XHPageBreaks.idl
-@@ -0,0 +1,70 @@
+Index: oovbaapi/ooo/vba/excel/XInterior.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XInterior.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XInterior.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,65 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3183,8 +3124,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XInterior.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3204,8 +3145,8 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XHPageBreaks_idl__
-+#define __ooo_vba_excel_XHPageBreaks_idl__
++#ifndef __ooo_vba_excel_XInterior_idl__
++#define __ooo_vba_excel_XInterior_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
@@ -3215,27 +3156,22 @@
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
-+#ifndef  __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
-+
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
++module ooo {  module vba {  module excel  { 
 +
 +//=============================================================================
 +
-+interface XHPageBreak;
 +
-+interface XHPageBreaks
++interface XInterior
 +{
++	interface ::ooo::vba::XHelperInterface;
 +
-+	interface ooo::vba::XCollection;
-+	//Methods	
-+    any Add([in] any Before) raises(com::sun::star::script::BasicErrorException);
++	[attribute]  any  Color;
++	[attribute]  any  ColorIndex;
++	[attribute]  any  Pattern;
++	[attribute]  any  PatternColor;
++	[attribute]  any  PatternColorIndex;
 +};
 +
 +//=============================================================================
@@ -3245,83 +3181,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XHyperlink.idl oovbaapi/ooo/vba/excel/XHyperlink.idl
-new file mode 100644
-index 0000000..76ecfa5
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XHyperlink.idl
-@@ -0,0 +1,65 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef __ooo_vba_excel_XHyperlink_idl__
-+#define __ooo_vba_excel_XHyperlink_idl__
-+                                                                                                                             
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
-+
-+//=============================================================================
-+                                                                                                                             
-+module ooo {  module vba {  module excel {
-+                                                                                                                             
-+//=============================================================================
-+interface XRange;
-+interface XHyperlink
-+{
-+	interface ::ooo::vba::XHelperInterface;
-+	
-+	[attribute] string Address;
-+	[attribute] string Name;
-+	[attribute] string TextToDisplay;
-+
-+	XRange Range();
-+};
-+                                                                                                                             
-+}; }; };
-+                                                                                                                             
-+#endif
-diff --git oovbaapi/ooo/vba/excel/XInterior.idl oovbaapi/ooo/vba/excel/XInterior.idl
-new file mode 100644
-index 0000000..fa91f34
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XInterior.idl
-@@ -0,0 +1,65 @@
+Index: oovbaapi/ooo/vba/excel/XDataLabels.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XDataLabels.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XDataLabels.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3330,8 +3194,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XInterior.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XDataLabels.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3351,33 +3215,27 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XInterior_idl__
-+#define __ooo_vba_excel_XInterior_idl__
++#ifndef __ooo_vba_excel_XDataLabels_idl__
++#define __ooo_vba_excel_XDataLabels_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
 +#endif
 +
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel  { 
++module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
-+
-+
-+interface XInterior
++interface XDataLabels
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	[attribute]  any  Color;
-+	[attribute]  any  ColorIndex;
-+	[attribute]  any  Pattern;
-+	[attribute]  any  PatternColor;
-+	[attribute]  any  PatternColorIndex;
++	interface ::ooo::vba::XCollection;
 +};
 +
 +//=============================================================================
@@ -3387,12 +3245,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XName.idl oovbaapi/ooo/vba/excel/XName.idl
-new file mode 100644
-index 0000000..c6ae3dc
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XName.idl
-@@ -0,0 +1,69 @@
+Index: oovbaapi/ooo/vba/excel/XPivotTables.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XPivotTables.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPivotTables.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3401,8 +3258,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XName.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XPivotTables.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3422,52 +3279,44 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XName_idl__
-+#define __ooo_vba_excel_XName_idl__
-+                                                                                                                             
++#ifndef __ooo_vba_excel_XPivotTables_idl__
++#define __ooo_vba_excel_XPivotTables_idl__
++
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
 +#endif
 +
 +//=============================================================================
-+                                                                                                                             
-+module ooo {  module vba {  module excel {
-+                                                                                                                             
-+//=============================================================================
 +
-+interface XRange;
++module ooo {  module vba {  module excel { 
 +
-+interface XName
++//=============================================================================
++interface XPivotTables
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+	
-+	[attribute] string Name;
-+	[attribute] string NameLocal;
-+	[attribute] boolean Visible;
-+        [attribute, readonly] string Value;
-+        [attribute, readonly] string RefersTo;
-+        [attribute, readonly] string RefersToLocal;
-+        [attribute, readonly] string RefersToR1C1;
-+        [attribute, readonly] string RefersToR1C1Local;
-+        [attribute, readonly] XRange RefersToRange;
 +
-+	void Delete( );
++	interface ooo::vba::XCollection;
++	// PivotCache should be a PivotCache object ( but thats not defined
++	// yet )
++	//XPivotTable Add( [in] any PivotCache, [in] any TableDestination, [in] any TableName, [in] any ReadData );
++	
 +};
-+                                                                                                                             
++
++//=============================================================================
++
 +}; }; };
-+                                                                                                                             
++
 +#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XNames.idl oovbaapi/ooo/vba/excel/XNames.idl
-new file mode 100644
-index 0000000..82051c6
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XNames.idl
-@@ -0,0 +1,57 @@
++
+Index: oovbaapi/ooo/vba/excel/XWorkbook.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWorkbook.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorkbook.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,83 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3476,8 +3325,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XNames.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XWorkbook.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3497,40 +3346,65 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XNames_idl__
-+#define __ooo_vba_excel_XNames_idl__
-+                                                                                                                             
++#ifndef __ooo_vba_excel_XWorkbook_idl__
++#define __ooo_vba_excel_XWorkbook_idl__
++
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+                                                                                                                             
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+                                                                                                                             
++
 +//=============================================================================
-+                                                                                                                             
-+module ooo {  module vba {  module excel {
-+                                                                                                                             
++
++module ooo {  module vba {  module excel { 
++
 +//=============================================================================
-+                                                                                                                             
-+interface XNames
++
++interface XWorksheet;
++interface XWorksheets;
++interface XStyles;
++
++interface XWorkbook
 +{
-+	interface ::ooo::vba::XCollection;
++	interface ::ooo::vba::XHelperInterface;
 +
-+        any Add( [in] any Name , [in] any RefersTo , [in] any Visible , [in] any MacroType , [in] any ShortcutKey , [in] any Category , [in] any NameLocal , [in] any RefersToLocal , [in] any CategoryLocal , [in] any RefersToR1C1 , [in] any RefersToR1C1Local );
++	[attribute, readonly] string  Name;
++	[attribute, readonly] string  Path;
++	[attribute, readonly] string  FullName;
++	[attribute, readonly] boolean ProtectStructure; 
++	[attribute, readonly] XWorksheet ActiveSheet;
++	[attribute] boolean Saved;
++	[attribute, readonly] string  CodeName;
++
++	any  Worksheets([in] any sheet);
++	any  Styles([in] any Index );
++	any  Sheets([in] any sheet);
++	any  Windows([in] any index );
++	void Close([in] any SaveChanges, [in] any FileName, [in] any RouteWorkBook);
++	void Protect( [in] any Password );
++	void Unprotect( [in] any Password );
++	void Save();
++	void Activate();
++	void ResetColors() raises (com::sun::star::script::BasicErrorException);
++
++	any Names( [in] any Index );
++
++	any Colors([in] any Index) raises (com::sun::star::script::BasicErrorException);
++	long FileFormat() raises (com::sun::star::script::BasicErrorException);
++	void SaveCopyAs( [in] string Filename );
 +};
-+                                                                                                                             
++
 +}; }; };
-+                                                                                                                             
-+#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XOLEObject.idl oovbaapi/ooo/vba/excel/XOLEObject.idl
-new file mode 100644
-index 0000000..cd7efa8
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XOLEObject.idl
-@@ -0,0 +1,66 @@
++#endif
+Index: oovbaapi/ooo/vba/excel/XPageSetup.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XPageSetup.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPageSetup.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,85 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3539,8 +3413,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XOLEObject.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile$
++ * $Revision$
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3560,9 +3434,9 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XOLEObject_idl__
-+#define __ooo_vba_excel_XOLEObject_idl__
-+
++#ifndef __ooo_vba_excel_XPageSetup_idl__
++#define __ooo_vba_excel_XPageSetup_idl__
++
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
@@ -3575,19 +3449,38 @@
 +
 +module ooo {  module vba {  module excel { 
 +
-+
 +//=============================================================================
-+interface XOLEObject
++
++
++interface XPageSetup
 +{
++
 +	interface ::ooo::vba::XHelperInterface;
 +
-+	[attribute, readonly] com::sun::star::uno::XInterface Object;
-+    [attribute] boolean Enabled;
-+    [attribute] boolean Visible;
-+    [attribute] double  Left;
-+    [attribute] double  Top;
-+    [attribute] double  Height;
-+    [attribute] double  Width;
++	//Attributes
++    [attribute] string PrintArea;
++    [attribute] double TopMargin;
++    [attribute] double BottomMargin;
++    [attribute] double RightMargin;
++    [attribute] double LeftMargin;
++    [attribute] double HeaderMargin;
++    [attribute] double FooterMargin;
++    [attribute] long Orientation;
++    [attribute] any FitToPagesTall;
++    [attribute] any FitToPagesWide;
++    [attribute] any Zoom;
++    [attribute] string LeftHeader;
++    [attribute] string CenterHeader;
++    [attribute] string RightHeader;
++    [attribute] string LeftFooter;
++    [attribute] string CenterFooter;
++    [attribute] string RightFooter;
++    [attribute] long Order;
++    [attribute] long FirstPageNumber;
++    [attribute] boolean CenterVertically;
++    [attribute] boolean CenterHorizontally;
++    [attribute] boolean PrintHeadings;
++
 +};
 +
 +//=============================================================================
@@ -3597,12 +3490,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XOLEObjects.idl oovbaapi/ooo/vba/excel/XOLEObjects.idl
-new file mode 100644
-index 0000000..81286fe
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XOLEObjects.idl
-@@ -0,0 +1,54 @@
+Index: oovbaapi/ooo/vba/excel/XWorksheets.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWorksheets.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorksheets.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3611,8 +3503,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XOLEObjects.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XWorksheets.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3632,37 +3524,41 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XOLEObjects_idl__
-+#define __ooo_vba_excel_XOLEObjects_idl__
-+
++#ifndef __ooo_vba_excel_XWorksheets_idl__
++#define __ooo_vba_excel_XWorksheets_idl__
++                                                                                                                             
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++                                                                                                                             
 +#ifndef __ooo_vba_XCollection_idl__
 +#include <ooo/vba/XCollection.idl>
 +#endif
++                                                                                                                             
 +//=============================================================================
-+
-+module ooo {  module vba {  module excel { 
-+
-+
++                                                                                                                             
++module ooo {  module vba {  module excel {
++                                                                                                                             
 +//=============================================================================
-+interface XOLEObjects
++                                                                                                                             
++interface XWorksheets
 +{
 +	interface ::ooo::vba::XCollection;
-+	//[attribute, readonly] boolean Focused;
++	[attribute] any Visible; 
++        any  Add( [in] any Before, [in] any After, [in] any Count, [in] any Type );                                 
++        void Delete();
++	void PrintOut( [in] any From, [in] any To, [in] any Copies, [in] any Preview, [in] any ActivePrinter, [in] any PrintToFile, [in] any Collate, [in] any PrToFileName );
++	void Select( [in] any Replace );
 +};
-+
-+//=============================================================================
-+
 +}; }; };
-+
++                                                                                                                             
 +#endif
 +
-+
-diff --git oovbaapi/ooo/vba/excel/XOutline.idl oovbaapi/ooo/vba/excel/XOutline.idl
-new file mode 100644
-index 0000000..3f93916
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XOutline.idl
-@@ -0,0 +1,64 @@
+Index: oovbaapi/ooo/vba/excel/XTextFrame.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XTextFrame.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XTextFrame.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,54 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3671,8 +3567,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XOutline.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XTextFrame.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3692,47 +3588,36 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XOutline_idl__
-+#define __ooo_vba_excel_XOutline_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++#ifndef __ooo_vba_excel_XTextFrame_idl__
++#define __ooo_vba_excel_XTextFrame_idl__
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+//=============================================================================
-+
-+module ooo {  module vba {  module excel { 
-+
-+//=============================================================================
-+
++#ifndef __ooo_vba_excel_XCharacters_idl__
++#include <ooo/vba/excel/XCharacters.idl>
++#endif
 +
-+interface XOutline
++module ooo {  module vba {  module excel {
++interface XTextFrame : ooo::vba::XHelperInterface
 +{
-+
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	//Methods	
-+	void ShowLevels([in] any RowLevels,[in] any ColumnLevels);
-+
++    [attribute] boolean AutoSize;
++    [attribute] float MarginBottom;
++    [attribute] float MarginTop;
++    [attribute] float MarginLeft;
++    [attribute] float MarginRight;
++    XCharacters Characters();
++    /*I don't find it in msdn
++    Range TextRange();*/
 +};
-+
-+//=============================================================================
-+
 +}; }; };
-+
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/excel/XPageBreak.idl oovbaapi/ooo/vba/excel/XPageBreak.idl
-new file mode 100644
-index 0000000..86db560
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XPageBreak.idl
-@@ -0,0 +1,73 @@
+Index: oovbaapi/ooo/vba/excel/XDialog.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XDialog.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XDialog.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3741,8 +3626,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XDialog.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3762,9 +3647,9 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XPageBreak_idl__
-+#define __ooo_vba_excel_XPageBreak_idl__
-+
++#ifndef __ooo_vba_excel_XDialog_idl__
++#define __ooo_vba_excel_XDialog_idl__
++                                                                                                                             
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
@@ -3773,45 +3658,31 @@
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
 +
 +//=============================================================================
-+
-+module ooo {  module vba {  module excel { 
-+
++                                                                                                                             
++module ooo {  module vba {  module excel {
++                                                                                                                             
 +//=============================================================================
 +
-+interface XRange;
-+
-+interface XPageBreak
++interface XApplication;
++                                                                                                                             
++interface XDialog 
 +{
-+
 +	interface ::ooo::vba::XHelperInterface;
 +
-+    // Attributes
-+    [attribute] long Type;
-+    
-+	//Methods	
-+	void Delete() raises(com::sun::star::script::BasicErrorException);
-+    XRange Location()raises(com::sun::star::script::BasicErrorException);
-+
++	void Show();
 +};
-+
-+//=============================================================================
-+
++                                                                                                                             
 +}; }; };
-+
++                                                                                                                             
 +#endif
 +
-+
-diff --git oovbaapi/ooo/vba/excel/XPageSetup.idl oovbaapi/ooo/vba/excel/XPageSetup.idl
-new file mode 100644
-index 0000000..cd15e79
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XPageSetup.idl
-@@ -0,0 +1,85 @@
+Index: oovbaapi/ooo/vba/excel/XFormatCondition.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XFormatCondition.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XFormatCondition.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,84 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3820,8 +3691,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XFormatCondition.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3841,68 +3712,66 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XPageSetup_idl__
-+#define __ooo_vba_excel_XPageSetup_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
++#ifndef __ooo_vba_excel_XFormatCondition_idl__
++#define __ooo_vba_excel_XFormatCondition_idl__
++
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
 +#endif
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+//=============================================================================
-+
-+module ooo {  module vba {  module excel { 
-+
-+//=============================================================================
++module ooo {  module vba { module excel { 
 +
++interface XFont;
++interface XInterior;
++interface XBorders;
 +
-+interface XPageSetup
++interface XFormatCondition 
 +{
++	interface  ::ooo::vba::XHelperInterface;
 +
-+	interface ::ooo::vba::XHelperInterface;
++	void Delete(  ) raises ( com::sun::star::script::BasicErrorException );
 +
-+	//Attributes
-+    [attribute] string PrintArea;
-+    [attribute] double TopMargin;
-+    [attribute] double BottomMargin;
-+    [attribute] double RightMargin;
-+    [attribute] double LeftMargin;
-+    [attribute] double HeaderMargin;
-+    [attribute] double FooterMargin;
-+    [attribute] long Orientation;
-+    [attribute] any FitToPagesTall;
-+    [attribute] any FitToPagesWide;
-+    [attribute] any Zoom;
-+    [attribute] string LeftHeader;
-+    [attribute] string CenterHeader;
-+    [attribute] string RightHeader;
-+    [attribute] string LeftFooter;
-+    [attribute] string CenterFooter;
-+    [attribute] string RightFooter;
-+    [attribute] long Order;
-+    [attribute] long FirstPageNumber;
-+    [attribute] boolean CenterVertically;
-+    [attribute] boolean CenterHorizontally;
-+    [attribute] boolean PrintHeadings;
++	/**
++	@param Type
++	@param Operator
++	Optional.
++	@param Formula1
++	Optional.
++	@param Formula2
++	Optional.
++	@return void
++	**/
++	void Modify( [in] long Type, [in]  /*Optional*/ any Operator, [in]  /*Optional*/ any Formula1, [in]  /*Optional*/ any Formula2 ) raises ( com::sun::star::script::BasicErrorException );
++	
++	long Type( ) raises ( com::sun::star::script::BasicErrorException );
++	
++	long Operator( ) raises ( com::sun::star::script::BasicErrorException );
++	
++	string Formula1( ) raises ( com::sun::star::script::BasicErrorException );
++	
++	string Formula2( ) raises ( com::sun::star::script::BasicErrorException );
++	
++	XInterior Interior( ) raises ( com::sun::star::script::BasicErrorException );
 +
++	any Borders( [in] any Index) raises ( com::sun::star::script::BasicErrorException );
++	
++	XFont Font( ) raises ( com::sun::star::script::BasicErrorException );
 +};
 +
-+//=============================================================================
 +
 +}; }; };
 +
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/excel/XPane.idl oovbaapi/ooo/vba/excel/XPane.idl
-new file mode 100644
-index 0000000..74635c6
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XPane.idl
-@@ -0,0 +1,56 @@
+Index: oovbaapi/ooo/vba/excel/XStyle.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XStyle.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XStyle.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,102 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3911,7 +3780,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XPane.idl,v $
++ * $RCSfile: XStyle.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -3932,39 +3801,84 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __com_sun_star_helper_XPane_idl__
-+#define __com_sun_star_helper_XPane_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+
-+//============================================================================
++#ifndef __ooo_vba_excel_XStyle_idl__
++#define __ooo_vba_excel_XStyle_idl__
 +
-+module ooo { module vba { module excel {
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
 +
-+//============================================================================
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++#ifndef __ooo_vba_excel_XFormat_idl__
++#include <ooo/vba/excel/XFormat.idl>
++#endif
 +
-+interface XPane: com::sun::star::uno::XInterface
++module ooo {  module vba { module excel { 
++interface XStyle 
 +{
-+    [attribute] long ScrollColumn;
-+    [attribute] long ScrollRow;
++    interface XFormat;
 +
-+    void SmallScroll([in] /*Optional*/ any Down, [in] /*Optional*/ any Up, [in] /*Optional*/ any ToRight, [in] /*Optional*/ any ToLeft);
-+    void LargeScroll([in] /*Optional*/ any Down, [in] /*Optional*/ any Up, [in] /*Optional*/ any ToRight, [in] /*Optional*/ any ToLeft);
-+};
++    boolean BuiltIn()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+//============================================================================
++    void setName([in] string Name)
++        raises(com::sun::star::script::BasicErrorException);
++
++    string getName()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setNameLocal([in] string NameLocal)
++        raises(com::sun::star::script::BasicErrorException);
++
++    string getNameLocal()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void Delete()
++        raises(com::sun::star::script::BasicErrorException);
++
++    /**    void		setValue( [in] string Value ) raises ( com::sun::star::script::BasicErrorException );
++
++     string		getValue( ) raises ( com::sun::star::script::BasicErrorException );
++
++     void		setIncludeAlignment( [in] boolean IncludeAlignment ) raises ( com::sun::star::script::BasicErrorException );
++
++     boolean		getIncludeAlignment( ) raises ( com::sun::star::script::BasicErrorException );
++
++     void		setIncludeBorder( [in] boolean IncludeBorder ) raises ( com::sun::star::script::BasicErrorException );
++
++     boolean		getIncludeBorder( ) raises ( com::sun::star::script::BasicErrorException );
++
++     void		setIncludeFont( [in] boolean IncludeFont ) raises ( com::sun::star::script::BasicErrorException );
++
++     boolean		getIncludeFont( ) raises ( com::sun::star::script::BasicErrorException );
++
++     void		setIncludeNumber( [in] boolean IncludeNumber ) raises ( com::sun::star::script::BasicErrorException );
++
++     boolean		getIncludeNumber( ) raises ( com::sun::star::script::BasicErrorException );
++
++     void		setIncludePatterns( [in] boolean IncludePatterns ) raises ( com::sun::star::script::BasicErrorException );
++
++     boolean		getIncludePatterns( ) raises ( com::sun::star::script::BasicErrorException );
++
++     void		setIncludeProtection( [in] boolean IncludeProtection ) raises ( com::sun::star::script::BasicErrorException );
++
++     boolean		getIncludeProtection( ) raises ( com::sun::star::script::BasicErrorException );
++     */
++
++};
 +
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/excel/XPivotCache.idl oovbaapi/ooo/vba/excel/XPivotCache.idl
-new file mode 100644
-index 0000000..272d654
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XPivotCache.idl
-@@ -0,0 +1,60 @@
++
+Index: oovbaapi/ooo/vba/excel/XAxes.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XAxes.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XAxes.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3973,8 +3887,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XPivotCache.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XAxes.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3994,43 +3908,41 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XPivotCache_idl__
-+#define __ooo_vba_excel_XPivotCache_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
++#ifndef __ooo_vba_excel_XAxes_idl__
++#define __ooo_vba_excel_XAxes_idl__
++
++#ifndef __ooo_vba_excel_XAxis_idl__
++#include <ooo/vba/excel/XAxis.idl>
++#endif
++
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
 +#endif
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+//=============================================================================
-+
-+module ooo {  module vba {  module excel { 
-+
-+//=============================================================================
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++module ooo {  module vba { module excel { 
 +
-+interface XPivotCache
++interface XAxes
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	void Refresh();
++	interface ::ooo::vba::XCollection;	
 +};
 +
-+//=============================================================================
-+
 +}; }; };
 +
 +#endif
 +
-+
-diff --git oovbaapi/ooo/vba/excel/XPivotTable.idl oovbaapi/ooo/vba/excel/XPivotTable.idl
-new file mode 100644
-index 0000000..756e5a1
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XPivotTable.idl
-@@ -0,0 +1,64 @@
+Index: oovbaapi/ooo/vba/excel/XComment.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XComment.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XComment.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,69 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4039,7 +3951,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XPivotTable.idl,v $
++ * $RCSfile: XComment.idl,v $
 + * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
@@ -4060,32 +3972,37 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XPivotTable_idl__
-+#define __ooo_vba_excel_XPivotTable_idl__
++#ifndef __ooo_vba_excel_XComment_idl__
++#define __ooo_vba_excel_XComment_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __ooo_vba_excel_XPivotCache_idl__
-+#include <ooo/vba/excel/XPivotCache.idl>
++#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
++#include <com/sun/star/lang/IllegalArgumentException.idl>
 +#endif
-+
-+#ifndef __ooo_vba__XHelperInterface_idl__
-+#define __ooo_vba__XHelperInterface_idl__
++#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+
 +//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
++module ooo {  module vba {  module excel {
 +
-+//=============================================================================
++interface XApplication;
++interface XRange;
 +
-+//interface XPivotTable: com::sun::star::uno::XInterface
-+interface XPivotTable
++interface XComment
 +{
-+	interface ooo::vba::XHelperInterface;
-+	XPivotCache PivotCache();
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute] string Author;
++//	[attribute, readonly] Shape Shape;
++	[attribute] boolean Visible;
++
++	void Delete();
++	XComment Next();
++	XComment Previous();
++	string Text([in] any Text, [in] any Start, [in] any Overwrite);
 +};
 +
 +//=============================================================================
@@ -4095,12 +4012,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XPivotTables.idl oovbaapi/ooo/vba/excel/XPivotTables.idl
-new file mode 100644
-index 0000000..78b92d6
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XPivotTables.idl
-@@ -0,0 +1,62 @@
+Index: oovbaapi/ooo/vba/excel/XChartTitle.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XChartTitle.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XChartTitle.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,53 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4109,8 +4025,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XPivotTables.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XChartTitle.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -4130,45 +4046,35 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XPivotTables_idl__
-+#define __ooo_vba_excel_XPivotTables_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++#ifndef __ooo_vba_excel_XChartTitle_idl__
++#define __ooo_vba_excel_XChartTitle_idl__
 +
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++#ifndef __ooo_vba_excel_XTitle_idl__
++#include <ooo/vba/excel/XTitle.idl>
 +#endif
 +
-+//=============================================================================
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
 +
-+module ooo {  module vba {  module excel { 
++module ooo {  module vba { module excel { 
 +
-+//=============================================================================
-+interface XPivotTables
++interface XTitle;
++interface XChartTitle 
 +{
-+
-+	interface ooo::vba::XCollection;
-+	// PivotCache should be a PivotCache object ( but thats not defined
-+	// yet )
-+	//XPivotTable Add( [in] any PivotCache, [in] any TableDestination, [in] any TableName, [in] any ReadData );
-+	
++	interface XTitle;
 +};
 +
-+//=============================================================================
-+
 +}; }; };
 +
 +#endif
 +
-+
-diff --git oovbaapi/ooo/vba/excel/XRange.idl oovbaapi/ooo/vba/excel/XRange.idl
-new file mode 100644
-index 0000000..d84dcae
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XRange.idl
-@@ -0,0 +1,179 @@
+Index: oovbaapi/ooo/vba/excel/XAxis.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XAxis.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XAxis.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,262 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4177,8 +4083,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XRange.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XAxis.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -4198,392 +4104,232 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XRange_idl__
-+#define __ooo_vba_excel_XRange_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
-+#include <com/sun/star/lang/IllegalArgumentException.idl>
-+#endif
-+#ifndef __com_sun_star_container_XEnumerationAccess_idl__
-+#include <com/sun/star/container/XEnumerationAccess.idl>
-+#endif
-+#ifndef __com_sun_star_script_XDefaultProperty_idl__
-+#include <com/sun/star/script/XDefaultProperty.idl>
-+#endif
-+#ifndef __com_sun_star_script_XDefaultMethod_idl__
-+#include <com/sun/star/script/XDefaultMethod.idl>
-+#endif
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
-+#ifndef __ooo_vba_excel_XFormat_idl__
-+#include <ooo/vba/excel/XFormat.idl>
++#ifndef __ooo_vba_excel_XAxis_idl__
++#define __ooo_vba_excel_XAxis_idl__
++
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
 +#endif
++
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
-+//=============================================================================
 +
-+module ooo {  module vba {  module excel { 
++module ooo {  module vba { module excel {
++interface XAxisTitle;
++interface XAxis 
++{
++	interface ::ooo::vba::XHelperInterface;
 +
-+interface XFont;
-+interface XRows;
-+interface XColumns;
-+interface XComment;
++    void Delete()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+interface XInterior;
-+interface XCharacters;
-+interface XBorders;
-+interface XValidation;
-+interface XWorksheet;
++    XAxisTitle getAxisTitle()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+interface XRange
-+{
-+ 	interface com::sun::star::container::XEnumerationAccess;
-+	interface com::sun::star::script::XDefaultMethod;
-+	interface com::sun::star::script::XDefaultProperty;
-+	interface ::ooo::vba::excel::XFormat;
-+	//interface ::ooo::vba::XHelperInterface;
++    void setDisplayUnit([in] long DisplayUnit)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+	[attribute] any Value; 
-+	[attribute] any Formula;
-+	[attribute] any FormulaArray;
-+	[attribute] any FormulaR1C1;
-+	[attribute, readonly] long  Count;
-+	[attribute, readonly] long Row;
-+	[attribute, readonly] long Column;
-+	[attribute, readonly] string Text;
-+	[attribute, readonly] XRange EntireRow;
-+	[attribute, readonly] XRange EntireColumn;
-+	[attribute, readonly] XComment Comment;
-+	[attribute] any Hidden;
-+	[attribute] any ColumnWidth;
-+	[attribute, readonly ] any Width;
-+	[attribute, readonly] XWorksheet Worksheet;
-+	[attribute] any RowHeight;
-+	[attribute, readonly ] any Height;
-+	[attribute, readonly ] any Top;
-+	[attribute, readonly ] any Left;
-+	[attribute] any PageBreak;
-+	[attribute, readonly] XValidation Validation;
-+	[attribute] any Style;
-+	[attribute] any AddIndent;
-+	[attribute] any ShowDetail;
++    long getDisplayUnit()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+	XComment AddComment( [in] any Text ); 
-+	void Clear();
-+	void ClearComments();
-+	void ClearContents();
-+	void ClearFormats();
-+	any HasFormula();
-+	void FillLeft();
-+	void FillRight();
-+	void FillUp();
-+	void FillDown();
-+	XRange Item([in] any row, [in] any column) raises(com::sun::star::script::BasicErrorException);
-+	XRange Offset([in] any RowOffset, [in] any ColumnOffset);
-+	XRange CurrentRegion();
-+	XRange CurrentArray(); 
-+	string Characters([in] any Start, [in] any Length);
-+	string Address( [in] any RowAbsolute, [in] any ColumnAbsolute, [in] any ReferenceStyle, [in] any External, [in] any RelativeTo );	
-+	XRange Cells([in] any RowIndex, [in] any ColumnIndex);
-+	void Select();
-+	void AutoOutline() raises(com::sun::star::script::BasicErrorException);
-+	void Activate();
-+	XRange Rows( [in] any RowIndex );
-+	void Calculate() raises(com::sun::star::script::BasicErrorException);
-+	XRange Columns( [in] any ColumnIndex );
-+	void Copy([in] any Destination);
-+	void Cut([in] any Destination);
-+	XRange Resize( [in] any RowSize, [in] any ColumnSize );
-+	XRange Range( [in] any Cell1, [in] any Cell2 );
-+	any getCellRange();
-+	void PasteSpecial([in] any Paste, [in] any Operation,[in] any SkipBlanks, [in] any Transpose);
-+	boolean  Replace( [in] string What, [in] string Replacement, [in] any LookAt, [in] any SearchOrder, [in] any MatchCase, [in] any MatchByte, [in] any SearchFormat, [in] any ReplaceFormat );
-+    XRange Find( [in] any What, [in] any After, [in] any LookIn, [in] any LookAt, [in] any SearchOrder, [in] any SearchDirection, [in] any MatchCase, [in] any MatchByte, [in] any SearchFormat );
-+	
-+	void Sort( [in] any Key1, [in] any Order1, [in] any Key2, [in] any Type,
-+		[in] any Order2, [in] any Key3, [in] any Order3,
-+		[in] any Header, [in] any OrderCustom, [in] any MatchCase, 
-+		[in] any Orientation, [in] any SortMethod, [in] any DataOption1,
-+		[in] any DataOption2, [in] any DataOption3 );
-+	XRange End( [in] long Direction );
-+	// bizarely I have to define Character method as character otherwise
-+	// idl complains
-+	XCharacters characters([in] any Start, [in] any Length);
-+	void Delete( [in] any Shift );
-+		
-+	any Areas( [in] any item );
-+	any BorderAround( [in] any LineStyle, [in] any Weight, [in] any ColorIndex, [in] any Color );
-+        void AutoFilter([in ] any Field, [in] any Criteria1, [in] any Operator, [in] any Criteria2, [in] any VisibleDropDown);
-+        void Insert([in] any Shift, [in] any CopyOrigin);
-+        void Autofit();
-+	void PrintOut([in] any From, [in] any To, [in] any Copies, [in] any Preview, [in] any ActivePrinter, [in] any PrintToFile, [in] any Collate, [in] any PrToFileName);
-+	void AutoFill( [in] XRange Destination, [in] any Type );
-+	boolean GoalSeek( [in] any Goal, [in] XRange ChangingCell );
-+	void ClearOutline() raises(com::sun::star::script::BasicErrorException);
-+	void Ungroup() raises(com::sun::star::script::BasicErrorException);
-+	void Group() raises(com::sun::star::script::BasicErrorException);
-+	void Merge([in] any Across) raises(com::sun::star::script::BasicErrorException);
-+	void UnMerge() raises(com::sun::star::script::BasicErrorException);
-+	XRange Next( ) raises ( com::sun::star::script::BasicErrorException );
-+	XRange Previous( ) raises ( com::sun::star::script::BasicErrorException );
-+ 	XRange SpecialCells( [in] any Type, [in]  /*Optional*/ any Value ) raises ( com::sun::star::script::BasicErrorException );
-+	void RemoveSubtotal() raises ( com::sun::star::script::BasicErrorException );
-+	void	Subtotal( [in] long GroupBy, [in] long Function, [in]  /*Optional*/ sequence<long> TotalList, [in]  /*Optional*/ any Replace, [in]  /*Optional*/ any PageBreaks, [in] any SummaryBelowData ) raises ( com::sun::star::script::BasicErrorException );
-+	XRange MergeArea( ) raises ( com::sun::star::script::BasicErrorException );
++    void setCrosses([in] long Crosses)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+};
++    long getCrosses()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+//=============================================================================
++    void setCrossesAt([in] double CrossesAt)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+}; }; };
++    double getCrossesAt()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+#endif
++    void setType([in] long Type)
++        raises(com::sun::star::script::BasicErrorException);
 +
++    long getType()
++        raises(com::sun::star::script::BasicErrorException);
 +
-diff --git oovbaapi/ooo/vba/excel/XSeries.idl oovbaapi/ooo/vba/excel/XSeries.idl
-new file mode 100644
-index 0000000..b7d1476
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XSeries.idl
-@@ -0,0 +1,63 @@
-+/*************************************************************************
-+ *
-+ * 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: XSeries.idl,v $
-+ * $Revision: 1.4 $
-+ *
-+ * 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 __ooo_vba_excel_XSeries_idl__
-+#define __ooo_vba_excel_XSeries_idl__
++    void setHasTitle([in] boolean HasTitle)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++    boolean getHasTitle()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
++    void setMinorUnit([in] double MinorUnit)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+//=============================================================================
++    double getMinorUnit()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+module ooo {  module vba {  module excel { 
++    void setMinorUnitIsAuto([in] boolean MinorUnitIsAuto)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+//=============================================================================
++    boolean getMinorUnitIsAuto()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+interface XSeries
-+{
-+	interface ::ooo::vba::XHelperInterface;
++    void setReversePlotOrder([in] boolean ReversePlotOrder)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+	[attribute, readonly] string Name;
-+	any Series( [in] any Item );
-+	any Values ( [in] any Values );
-+	any XValues ( [in] any XValues );
-+};
++    boolean getReversePlotOrder()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+//=============================================================================
++    void setMajorUnit([in] double MajorUnit)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+}; }; };
++    double getMajorUnit()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+#endif
++    void setMajorUnitIsAuto([in] boolean MajorUnitIsAuto)
++        raises(com::sun::star::script::BasicErrorException);
 +
++    boolean getMajorUnitIsAuto()
++        raises(com::sun::star::script::BasicErrorException);
 +
-diff --git oovbaapi/ooo/vba/excel/XSeriesCollection.idl oovbaapi/ooo/vba/excel/XSeriesCollection.idl
-new file mode 100644
-index 0000000..7acba26
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XSeriesCollection.idl
-@@ -0,0 +1,60 @@
-+/*************************************************************************
-+ *
-+ * 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: XSeriesCollection.idl,v $
-+ * $Revision: 1.4 $
-+ *
-+ * 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 __ooo_vba_excel_XSeriesCollection_idl__
-+#define __ooo_vba_excel_XSeriesCollection_idl__
++    void setMaximumScale([in] double MaximumScale)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
++    double getMaximumScale()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+//=============================================================================
-+module ooo {  module vba {  module excel { 
-+interface XSeries;
-+//=============================================================================
++    void setMaximumScaleIsAuto([in] boolean MaximumScaleIsAuto)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+interface XSeriesCollection
-+{ 
-+	interface ::ooo::vba::XCollection;
-+	//XSeries Add( [in] any Source, [in] any RowCol, [in] any SeriesLabels,
-+	//	[in] any CategoryLabels, [in] any Replace );	
-+	XSeries NewSeries();	
-+	any XSeries( [in] any Item );
-+};
++    boolean getMaximumScaleIsAuto()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+//=============================================================================
++    void setMinimumScale([in] double MinimumScale)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+}; }; };
++    double getMinimumScale()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+#endif
++    void setMinimumScaleIsAuto([in] boolean MinimumScaleIsAuto)
++        raises(com::sun::star::script::BasicErrorException);
 +
++    boolean getMinimumScaleIsAuto()
++        raises(com::sun::star::script::BasicErrorException);
 +
-diff --git oovbaapi/ooo/vba/excel/XStyle.idl oovbaapi/ooo/vba/excel/XStyle.idl
-new file mode 100644
-index 0000000..542e73c
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XStyle.idl
-@@ -0,0 +1,102 @@
-+/*************************************************************************
-+ *
-+ * 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: XStyle.idl,v $
-+ * $Revision: 1.3 $
-+ *
-+ * 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 __ooo_vba_excel_XStyle_idl__
-+#define __ooo_vba_excel_XStyle_idl__
++    long getAxisGroup();//
++        raises(com::sun::star::script::BasicErrorException);
 +
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
++    void setScaleType([in] long ScaleType)
++        raises(com::sun::star::script::BasicErrorException);
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
-+#ifndef __ooo_vba_excel_XFormat_idl__
-+#include <ooo/vba/excel/XFormat.idl>
-+#endif
++    long getScaleType()
++        raises(com::sun::star::script::BasicErrorException);
 +
-+module ooo {  module vba { module excel { 
-+interface XStyle 
-+{
-+    interface XFormat;
++    double getHeight()
++        raises (com::sun::star::script::BasicErrorException);
 +
-+    boolean BuiltIn()
++    void setHeight([in] /* double */ double height)
 +        raises(com::sun::star::script::BasicErrorException);
 +
-+    void setName([in] string Name)
-+        raises(com::sun::star::script::BasicErrorException);
++    double getWidth()
++        raises (com::sun::star::script::BasicErrorException);
 +
-+    string getName()
++    void setWidth([in] /* double */ double width)
 +        raises(com::sun::star::script::BasicErrorException);
 +
-+    void setNameLocal([in] string NameLocal)
-+        raises(com::sun::star::script::BasicErrorException);
++    double getTop()
++        raises (com::sun::star::script::BasicErrorException);
 +
-+    string getNameLocal()
-+        raises(com::sun::star::script::BasicErrorException);
++    void setTop([in] /* double */ double top)
++        raises (com::sun::star::script::BasicErrorException);
 +
-+    void Delete()
-+        raises(com::sun::star::script::BasicErrorException);
++    double getLeft()
++        raises (com::sun::star::script::BasicErrorException);
 +
-+    /**    void		setValue( [in] string Value ) raises ( com::sun::star::script::BasicErrorException );
++    void setLeft([in] /* double */ double left)
++        raises (com::sun::star::script::BasicErrorException);
 +
-+     string		getValue( ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     void		setIncludeAlignment( [in] boolean IncludeAlignment ) raises ( com::sun::star::script::BasicErrorException );
++    //    XBorder		getBorder( ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     boolean		getIncludeAlignment( ) raises ( com::sun::star::script::BasicErrorException );
++    // void		setMinorGridlines( [in] XGridlines MinorGridlines ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     void		setIncludeBorder( [in] boolean IncludeBorder ) raises ( com::sun::star::script::BasicErrorException );
++    // XGridlines		getMinorGridlines( ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     boolean		getIncludeBorder( ) raises ( com::sun::star::script::BasicErrorException );
++    // void		setMinorTickMark( [in] long MinorTickMark ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     void		setIncludeFont( [in] boolean IncludeFont ) raises ( com::sun::star::script::BasicErrorException );
++    // long		getMinorTickMark( ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     boolean		getIncludeFont( ) raises ( com::sun::star::script::BasicErrorException );
++    // void		setTickLabelPosition( [in] long TickLabelPosition ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     void		setIncludeNumber( [in] boolean IncludeNumber ) raises ( com::sun::star::script::BasicErrorException );
++    // long		getTickLabelPosition( ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     boolean		getIncludeNumber( ) raises ( com::sun::star::script::BasicErrorException );
++    // void		setTickLabels( [in] XTickLabels TickLabels ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     void		setIncludePatterns( [in] boolean IncludePatterns ) raises ( com::sun::star::script::BasicErrorException );
++    // XTickLabels		getTickLabels( ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     boolean		getIncludePatterns( ) raises ( com::sun::star::script::BasicErrorException );
++    // void		setTickLabelSpacing( [in] long TickLabelSpacing ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     void		setIncludeProtection( [in] boolean IncludeProtection ) raises ( com::sun::star::script::BasicErrorException );
++    // long		getTickLabelSpacing( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setTickMarkSpacing( [in] long TickMarkSpacing ) raises ( com::sun::star::script::BasicErrorException );
++
++    // long		getTickMarkSpacing( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setMajorGridlines( [in] XGridlines MajorGridlines ) raises ( com::sun::star::script::BasicErrorException );
++
++    // XGridlines		getMajorGridlines( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setMajorTickMark( [in] long MajorTickMark ) raises ( com::sun::star::script::BasicErrorException );
++
++    // long		getMajorTickMark( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setBaseUnit( [in] long BaseUnit ) raises ( com::sun::star::script::BasicErrorException );
++
++    // long		getBaseUnit( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setBaseUnitIsAuto( [in] boolean BaseUnitIsAuto ) raises ( com::sun::star::script::BasicErrorException );
++
++    // boolean		getBaseUnitIsAuto( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setMajorUnitScale( [in] long MajorUnitScale ) raises ( com::sun::star::script::BasicErrorException );
++
++    // long		getMajorUnitScale( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setMinorUnitScale( [in] long MinorUnitScale ) raises ( com::sun::star::script::BasicErrorException );
++
++    // long		getMinorUnitScale( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setCategoryType( [in] long CategoryType ) raises ( com::sun::star::script::BasicErrorException );
++
++    // long		getCategoryType( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setHasMajorGridlines( [in] boolean HasMajorGridlines ) raises ( com::sun::star::script::BasicErrorException );
++
++    // boolean		getHasMajorGridlines( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setHasMinorGridlines( [in] boolean HasMinorGridlines ) raises ( com::sun::star::script::BasicErrorException );
++
++    // boolean		getHasMinorGridlines( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void			setCategoryNames( [in] any CategoryNames ) raises ( com::sun::star::script::BasicErrorException );
++
++    // any			getCategoryNames( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setDisplayUnitCustom( [in] double DisplayUnitCustom ) raises ( com::sun::star::script::BasicErrorException );
++
++    // double		getDisplayUnitCustom( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setHasDisplayUnitLabel( [in] boolean HasDisplayUnitLabel ) raises ( com::sun::star::script::BasicErrorException );
++
++    // boolean		getHasDisplayUnitLabel( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setDisplayUnitLabel( [in] XDisplayUnitLabel DisplayUnitLabel ) raises ( com::sun::star::script::BasicErrorException );
++
++    // XDisplayUnitLabel		getDisplayUnitLabel( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // any			Select(  ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setAxisBetweenCategories( [in] boolean AxisBetweenCategories ) raises ( com::sun::star::script::BasicErrorException );
++
++    // boolean		getAxisBetweenCategories( ) raises ( com::sun::star::script::BasicErrorException );
 +
-+     boolean		getIncludeProtection( ) raises ( com::sun::star::script::BasicErrorException );
-+     */
 +
 +};
 +
@@ -4591,12 +4337,11 @@
 +
 +#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XStyles.idl oovbaapi/ooo/vba/excel/XStyles.idl
-new file mode 100644
-index 0000000..69fd3bb
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XStyles.idl
-@@ -0,0 +1,71 @@
+Index: oovbaapi/ooo/vba/excel/Range.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Range.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/Range.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,49 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4605,7 +4350,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XStyles.idl,v $
++ * $RCSfile: Range.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -4627,53 +4372,30 @@
 + *
 + ************************************************************************/
 +
-+#ifndef __ooo_vba_excel_XStyles_idl__
-+#define __ooo_vba_excel_XStyles_idl__
-+
-+#ifndef __com_sun_star_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
++#ifndef __ooo_vba_excel_Range_idl__
++#define __ooo_vba_excel_Range_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_excel_XRange_idl__
++#include <ooo/vba/excel/XRange.idl>
 +#endif
 +
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/table/XCellRange.idl>
 +
-+module ooo {  module vba { module excel { 
-+interface XStyle;
-+interface XStyles 
++module ooo {  module vba { module excel {
++service Range : XRange
 +{
-+    interface ::ooo::vba::XCollection;
-+    /**
-+    @param Workbook
-+    Optional.
-+    @return any
-+    **/
-+    // any                      Merge( [in]  /*Optional*/ any Workbook ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    /**
-+    @param Name
-+
-+    @param BasedOn
-+    Optional.
-+    @return XStyle
-+    **/
-+    XStyle Add([in] string Name, [in] /*Optional*/ any BasedOn)
-+        raises (com::sun::star::script::BasicErrorException);	
++  	createRangeFromXCellRange(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::table::XCellRange Range );
++};
 +
-+}; }; }; };
++}; }; };
 +
 +#endif
-+
-diff --git oovbaapi/ooo/vba/excel/XTextFrame.idl oovbaapi/ooo/vba/excel/XTextFrame.idl
-new file mode 100644
-index 0000000..534b256
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XTextFrame.idl
-@@ -0,0 +1,54 @@
+Index: oovbaapi/ooo/vba/excel/XSeriesCollection.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XSeriesCollection.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XSeriesCollection.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4682,8 +4404,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XTextFrame.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XSeriesCollection.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -4703,37 +4425,42 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XTextFrame_idl__
-+#define __ooo_vba_excel_XTextFrame_idl__
++#ifndef __ooo_vba_excel_XSeriesCollection_idl__
++#define __ooo_vba_excel_XSeriesCollection_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+
-+#ifndef __ooo_vba_excel_XCharacters_idl__
-+#include <ooo/vba/excel/XCharacters.idl>
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
 +#endif
 +
-+module ooo {  module vba {  module excel {
-+interface XTextFrame : ooo::vba::XHelperInterface
-+{
-+    [attribute] boolean AutoSize;
-+    [attribute] float MarginBottom;
-+    [attribute] float MarginTop;
-+    [attribute] float MarginLeft;
-+    [attribute] float MarginRight;
-+    XCharacters Characters();
-+    /*I don't find it in msdn
-+    Range TextRange();*/
++//=============================================================================
++module ooo {  module vba {  module excel { 
++interface XSeries;
++//=============================================================================
++
++interface XSeriesCollection
++{ 
++	interface ::ooo::vba::XCollection;
++	//XSeries Add( [in] any Source, [in] any RowCol, [in] any SeriesLabels,
++	//	[in] any CategoryLabels, [in] any Replace );	
++	XSeries NewSeries();	
++	any XSeries( [in] any Item );
 +};
++
++//=============================================================================
++
 +}; }; };
++
 +#endif
-diff --git oovbaapi/ooo/vba/excel/XTitle.idl oovbaapi/ooo/vba/excel/XTitle.idl
-new file mode 100644
-index 0000000..7a76030
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XTitle.idl
-@@ -0,0 +1,119 @@
++
++
+Index: oovbaapi/ooo/vba/excel/XAxisTitle.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XAxisTitle.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XAxisTitle.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,52 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4742,7 +4469,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XTitle.idl,v $
++ * $RCSfile: XAxisTitle.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -4764,11 +4491,11 @@
 + *
 + ************************************************************************/
 +
-+#ifndef __ooo_vba_excel_XTitle_idl__
-+#define __ooo_vba_excel_XTitle_idl__
++#ifndef __ooo_vba_excel_XAxisTitle_idl__
++#define __ooo_vba_excel_XAxisTitle_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_excel_XTitle_idl__
++#include <ooo/vba/excel/XTitle.idl>
 +#endif
 +
 +#ifndef __com_sun_star_script_BasicErrorException_idl__
@@ -4777,88 +4504,20 @@
 +
 +module ooo {  module vba { module excel { 
 +
-+interface XCharacters;
-+interface XFont;
-+interface XBorder;
-+interface XInterior;
-+
-+interface XTitle
++interface XAxisTitle 
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+    //    XBorder			Border( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    XInterior Interior() raises(com::sun::star::script::BasicErrorException);
-+
-+    XFont Font() raises(com::sun::star::script::BasicErrorException);
-+
-+    void setText([in] string Text) raises(com::sun::star::script::BasicErrorException);
-+
-+    string getText() raises(com::sun::star::script::BasicErrorException);
-+    // #FIXME existing implementation object needs to be usable for shape, chart
-+    // axes etc.
-+    //XCharacters Characters() raises(com::sun::star::script::BasicErrorException);
-+
-+    void setTop([in] double Top) raises(com::sun::star::script::BasicErrorException);
-+
-+    double getTop() raises(com::sun::star::script::BasicErrorException);
-+
-+    void setLeft([in] double Left) raises(com::sun::star::script::BasicErrorException);
-+
-+    double getLeft() raises(com::sun::star::script::BasicErrorException);
-+
-+    void setOrientation([in] long Orientation) raises(com::sun::star::script::BasicErrorException);
-+
-+    long getOrientation() raises(com::sun::star::script::BasicErrorException);
-+
-+    // any			Select(  ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // any			Delete(  ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    //    void			setName( [in] string Name ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    //    string			getName( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void		setFill( [in] XChartFillFormat Fill ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // XChartFillFormat		getFill( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void			setCaption( [in] string Caption ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // string			getCaption( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void			setHorizontalAlignment( [in] any HorizontalAlignment ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // any			getHorizontalAlignment( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void			setShadow( [in] boolean Shadow ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // boolean			getShadow( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void			setVerticalAlignment( [in] any VerticalAlignment ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // any			getVerticalAlignment( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void			setReadingOrder( [in] long ReadingOrder ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // long			getReadingOrder( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // void			setAutoScaleFont( [in] any AutoScaleFont ) raises ( com::sun::star::script::BasicErrorException );
-+
-+    // any			getAutoScaleFont( ) raises ( com::sun::star::script::BasicErrorException );
-+
-+
++	interface ::ooo::vba::excel::XTitle;
 +};
 +
 +}; }; };
 +
 +#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XValidation.idl oovbaapi/ooo/vba/excel/XValidation.idl
-new file mode 100644
-index 0000000..8399183
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XValidation.idl
-@@ -0,0 +1,71 @@
+Index: oovbaapi/ooo/vba/excel/XFont.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XFont.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XFont.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,75 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4867,7 +4526,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XValidation.idl,v $
++ * $RCSfile: XFont.idl,v $
 + * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
@@ -4888,12 +4547,15 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XValidation_idl__
-+#define __ooo_vba_excel_XValidation_idl__
++#ifndef __ooo_vba_excel_XFont_idl__
++#define __ooo_vba_excel_XFont_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
++#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
++#endif
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
@@ -4903,24 +4565,25 @@
 +
 +module ooo {  module vba {  module excel { 
 +
-+//=============================================================================
-+
-+interface XValidation
++interface XFont
 +{
 +	interface ::ooo::vba::XHelperInterface;
 +
-+	[attribute] boolean IgnoreBlank;
-+	[attribute] boolean InCellDropdown;
-+	[attribute] boolean ShowInput;
-+	[attribute] boolean ShowError;
-+	[attribute] string InputTitle;	
-+	[attribute] string ErrorTitle;
-+	[attribute] string InputMessage;
-+	[attribute] string ErrorMessage;
-+	[attribute, readonly] string Formula1;
-+	[attribute, readonly] string Formula2;
-+	void Delete();
-+	void Add( [in] any Type, [in] any AlertStyle, [in] any Operator, [in] any Formula1, [in] any Formula2);
++	[attribute] any   Size;
++	[attribute] any StandardFontSize;
++	[attribute] any  StandardFont;
++	[attribute] any  FontStyle;
++	[attribute] any    ColorIndex;
++	[attribute] any    Color;
++	[attribute] any Bold;
++	[attribute] any Underline;
++	[attribute] any Strikethrough;
++	[attribute] any Shadow;
++	[attribute] any Italic;
++	[attribute] any Subscript;
++	[attribute] any Superscript;
++	[attribute] any  Name;
++	[attribute] any  OutlineFont;
 +};
 +
 +//=============================================================================
@@ -4930,12 +4593,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XWindow.idl oovbaapi/ooo/vba/excel/XWindow.idl
-new file mode 100644
-index 0000000..2526826
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XWindow.idl
-@@ -0,0 +1,107 @@
+Index: oovbaapi/ooo/vba/excel/XPivotTable.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XPivotTable.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPivotTable.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,64 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4944,7 +4606,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XWindow.idl,v $
++ * $RCSfile: XPivotTable.idl,v $
 + * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
@@ -4965,14 +4627,18 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XWindow_idl__
-+#define __ooo_vba_excel_XWindow_idl__
++#ifndef __ooo_vba_excel_XPivotTable_idl__
++#define __ooo_vba_excel_XPivotTable_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++#ifndef __ooo_vba_excel_XPivotCache_idl__
++#include <ooo/vba/excel/XPivotCache.idl>
++#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
++#ifndef __ooo_vba__XHelperInterface_idl__
++#define __ooo_vba__XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
@@ -4981,59 +4647,12 @@
 +module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
-+interface XRange;
-+interface XWorksheet;
-+interface XPane;
-+interface XWindow
-+{
-+	interface ::ooo::vba::XHelperInterface;
-+
-+	[attribute] any Caption;
-+	[attribute] boolean DisplayGridlines; 
-+	[attribute] boolean DisplayHeadings; 
-+	[attribute] boolean DisplayHorizontalScrollBar; 
-+	[attribute] boolean DisplayOutline;
-+	[attribute] boolean DisplayVerticalScrollBar; 
-+	[attribute] boolean DisplayWorkbookTabs; 
-+	[attribute] boolean FreezePanes; 
-+	[attribute] long Height; 
-+	[attribute] long Left; 
-+	[attribute] boolean Split; 
-+	[attribute] long SplitColumn;
-+	[attribute] double SplitHorizontal;
-+	[attribute] long SplitRow;
-+	[attribute] double SplitVertical;
-+	[attribute] any ScrollColumn;
-+	[attribute] any ScrollRow;
-+	[attribute] long Top; 
-+	[attribute] any View;
-+	[attribute] boolean Visible;
-+	[attribute] long Width; 
-+	[attribute] any WindowState;
-+	[attribute] any Zoom;
-+	any SelectedSheets( [in] any aIndex );
-+	void SmallScroll( [in] any Down, [in] any Up, [in] any ToRight, [in] any ToLeft );
-+	void LargeScroll( [in] any Down, [in] any Up, [in] any ToRight, [in] any ToLeft );
-+	void ScrollWorkbookTabs( [in] any Sheets, [in] any Position );
-+	void Activate();
-+        void Close([in] any SaveChanges, [in] any FileName, [in] any RouteWorkBook);
-+	XRange ActiveCell() raises(com::sun::star::script::BasicErrorException);
-+	any Selection() raises(com::sun::star::script::BasicErrorException);
-+	long PointsToScreenPixelsX([in] long Points) raises(com::sun::star::script::BasicErrorException);
-+	long PointsToScreenPixelsY([in] long Points) raises(com::sun::star::script::BasicErrorException);
-+    void PrintOut([in] /*optional short*/ any From,
-+        [in] /*optional short*/ any To,
-+        [in] /*optional short*/ any Copies,
-+        [in] /*optional boolean*/ any Preview,
-+        [in] /*optional string*/ any ActivePrinter,
-+        [in] /*optional boolean*/ any PrintToFile,
-+        [in] /*optional boolean*/ any Collate,
-+        [in] /*optional string*/ any PrToFileName
-+        ) raises(com::sun::star::script::BasicErrorException);
-+     void PrintPreview( [in]  /*Optional*/ any EnableChanges ) raises ( com::sun::star::script::BasicErrorException );
 +
-+	XWorksheet ActiveSheet() raises(com::sun::star::script::BasicErrorException);
-+	XPane ActivePane() raises(com::sun::star::script::BasicErrorException);
++//interface XPivotTable: com::sun::star::uno::XInterface
++interface XPivotTable
++{
++	interface ooo::vba::XHelperInterface;
++	XPivotCache PivotCache();
 +};
 +
 +//=============================================================================
@@ -5043,12 +4662,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XWindows.idl oovbaapi/ooo/vba/excel/XWindows.idl
-new file mode 100644
-index 0000000..4768ec8
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XWindows.idl
-@@ -0,0 +1,59 @@
+Index: oovbaapi/ooo/vba/excel/XDataLabel.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XDataLabel.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XDataLabel.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5057,8 +4675,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XWindows.idl,v $
-+ * $Revision: 1.4 $
++ * $RCSfile: XDataLabel.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -5078,27 +4696,30 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XWindows_idl__
-+#define __ooo_vba_excel_XWindows_idl__
++#ifndef __ooo_vba_excel_XDataLabel_idl__
++#define __ooo_vba_excel_XDataLabel_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
 +//=============================================================================
 +
 +module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
-+interface XWindows
++interface XDataLabel
 +{
-+	interface ::ooo::vba::XCollection;
++	interface ::ooo::vba::XHelperInterface;
++	string Text() raises(com::sun::star::script::BasicErrorException);
 +
-+	void Arrange( [in] long ArrangeStyle, [in] any ActiveWorkbook, [in] any SyncHorizontal, [in] any SyncVertical );	
++	string Name() raises (com::sun::star::script::BasicErrorException);
 +};
 +
 +//=============================================================================
@@ -5108,12 +4729,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XWorkbook.idl oovbaapi/ooo/vba/excel/XWorkbook.idl
-new file mode 100644
-index 0000000..1a06729
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XWorkbook.idl
-@@ -0,0 +1,83 @@
+Index: oovbaapi/ooo/vba/excel/XChartObjects.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XChartObjects.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XChartObjects.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,63 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5122,7 +4742,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XWorkbook.idl,v $
++ * $RCSfile: XChartObjects.idl,v $
 + * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
@@ -5143,15 +4763,19 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XWorkbook_idl__
-+#define __ooo_vba_excel_XWorkbook_idl__
++#ifndef __ooo_vba_excel_XChartObjects_idl__
++#define __ooo_vba_excel_XChartObjects_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
 +#endif
 +
 +//=============================================================================
@@ -5159,114 +4783,24 @@
 +module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
++interface XChartObjects
++{
++	interface ooo::vba::XCollection;
++	any Add( [in] double Left, [in] double Top, [in] double Width, [in] double Height ) raises(com::sun::star::script::BasicErrorException);
++	void Delete() raises (com::sun::star::script::BasicErrorException);
++};
 +
-+interface XWorksheet;
-+interface XWorksheets;
-+interface XStyles;
++//=============================================================================
 +
-+interface XWorkbook
-+{
-+	interface ::ooo::vba::XHelperInterface;
++}; }; };
 +
-+	[attribute, readonly] string  Name;
-+	[attribute, readonly] string  Path;
-+	[attribute, readonly] string  FullName;
-+	[attribute, readonly] boolean ProtectStructure; 
-+	[attribute, readonly] XWorksheet ActiveSheet;
-+	[attribute] boolean Saved;
-+	[attribute, readonly] string  CodeName;
++#endif
 +
-+	any  Worksheets([in] any sheet);
-+	any  Styles([in] any Index );
-+	any  Sheets([in] any sheet);
-+	any  Windows([in] any index );
-+	void Close([in] any SaveChanges, [in] any FileName, [in] any RouteWorkBook);
-+	void Protect( [in] any Password );
-+	void Unprotect( [in] any Password );
-+	void Save();
-+	void Activate();
-+	void ResetColors() raises (com::sun::star::script::BasicErrorException);
-+
-+	any Names( [in] any Index );
-+
-+	any Colors([in] any Index) raises (com::sun::star::script::BasicErrorException);
-+	long FileFormat() raises (com::sun::star::script::BasicErrorException);
-+	void SaveCopyAs( [in] string Filename );
-+};
-+
-+}; }; };
-+
-+#endif
-diff --git oovbaapi/ooo/vba/excel/XWorkbooks.idl oovbaapi/ooo/vba/excel/XWorkbooks.idl
-new file mode 100644
-index 0000000..5521257
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XWorkbooks.idl
-@@ -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: XWorkbooks.idl,v $
-+ * $Revision: 1.4 $
-+ *
-+ * 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 __ooo_vba_excel_XWorkbooks_idl__
-+#define __ooo_vba_excel_XWorkbooks_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
-+
-+
-+//=============================================================================
-+
-+module ooo {  module vba {  module excel { 
-+
-+//=============================================================================
-+
-+interface XWorkbooks 
-+{
-+	interface ::ooo::vba::XCollection;
-+	any Add();
-+	any Open([in] string Filename, [in] any UpdateLinks, [in] any ReadOnly, [in] any Format, [in] any Password, [in] any WriteResPassword, [in] any IgnoreReadOnlyRecommended, [in] any Origin, [in] any Delimiter, [in] any Editable, [in] any Notify, [in] any Converter, [in] any AddToMru);
-+
-+	void Close();
-+};
-+
-+}; }; };
 +
-+#endif
-diff --git oovbaapi/ooo/vba/excel/XWorksheet.idl oovbaapi/ooo/vba/excel/XWorksheet.idl
-new file mode 100644
-index 0000000..bca5e4e
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XWorksheet.idl
+Index: oovbaapi/ooo/vba/excel/XWorksheet.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWorksheet.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorksheet.idl	(.../cws/npower11)	(revision 266650)
 @@ -0,0 +1,117 @@
 +/*************************************************************************
 + *
@@ -5385,86 +4919,129 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/excel/XWorksheetFunction.idl oovbaapi/ooo/vba/excel/XWorksheetFunction.idl
-new file mode 100644
-index 0000000..2b52d48
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XWorksheetFunction.idl
-@@ -0,0 +1,68 @@
+Index: oovbaapi/ooo/vba/excel/Hyperlink.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Hyperlink.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/Hyperlink.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,54 @@
 +/*************************************************************************
 + *
-+ * 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
 + *
-+ * OpenOffice.org - a multi-platform office productivity suite
++ *  $RCSfile$
 + *
-+ * $RCSfile: XWorksheetFunction.idl,v $
-+ * $Revision: 1.4 $
++ *  $Revision$
 + *
-+ * This file is part of OpenOffice.org.
++ *  last change: $Author$ $Date$
 + *
-+ * 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.
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
 + *
-+ * 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.
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XWSFunction_idl__
-+#define __ooo_vba_excel_XWSFunction_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++#ifndef __ooo_vba_excel_Hyperlink_idl__
++#define __ooo_vba_excel_Hyperlink_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_excel_XHyperlink_idl__
++#include <ooo/vba/excel/XHyperlink.idl>
 +#endif
 +
-+#ifndef __com_sun_star_beans_XExactName_idl__
-+#include <com/sun/star/beans/XExactName.idl>
-+#endif
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/frame/XModel.idl>
++
++module ooo {  module vba { module excel {
++service Hyperlink : XHyperlink
++{
++  	createHyperlink(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
++};
++
++}; }; };
 +
-+#ifndef __com_sun_star_script_XInvocation_idl__
-+#include <com/sun/star/script/XInvocation.idl>
 +#endif
-+//=============================================================================
+Index: oovbaapi/ooo/vba/excel/Window.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Window.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/Window.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,54 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
 +
-+module ooo {  module vba {  module excel { 
++#ifndef __ooo_vba_excel_Window_idl__
++#define __ooo_vba_excel_Window_idl__
 +
-+//=============================================================================
++#ifndef __ooo_vba_excel_XWindow_idl__
++#include <ooo/vba/excel/XWindow.idl>
++#endif
 +
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/frame/XModel.idl>
 +
-+interface XWorksheetFunction
++module ooo {  module vba { module excel {
++service Window : XWindow
 +{
-+	interface ::ooo::vba::XHelperInterface;
-+	interface ::com::sun::star::beans::XExactName;
-+	interface ::com::sun::star::script::XInvocation;
++  	createWindow(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
 +};
 +
-+//=============================================================================
-+
 +}; }; };
 +
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/excel/XWorksheets.idl oovbaapi/ooo/vba/excel/XWorksheets.idl
-new file mode 100644
-index 0000000..f8e2283
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XWorksheets.idl
-@@ -0,0 +1,59 @@
+Index: oovbaapi/ooo/vba/excel/XCharacters.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XCharacters.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XCharacters.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,65 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5473,7 +5050,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XWorksheets.idl,v $
++ * $RCSfile: XCharacters.idl,v $
 + * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
@@ -5494,42 +5071,47 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XWorksheets_idl__
-+#define __ooo_vba_excel_XWorksheets_idl__
-+                                                                                                                             
++#ifndef __ooo_vba_excel_XCharacters_idl__
++#define __ooo_vba_excel_XCharacters_idl__
++
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+                                                                                                                             
-+#ifndef __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++#ifndef __ooo_vba_excel_XFont_idl__
++#include <ooo/vba/excel/XFont.idl>
++#endif
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+                                                                                                                             
 +//=============================================================================
-+                                                                                                                             
-+module ooo {  module vba {  module excel {
-+                                                                                                                             
++
++module ooo {  module vba {  module excel { 
++
 +//=============================================================================
-+                                                                                                                             
-+interface XWorksheets
++interface XCharacters
 +{
-+	interface ::ooo::vba::XCollection;
-+	[attribute] any Visible; 
-+        any  Add( [in] any Before, [in] any After, [in] any Count, [in] any Type );                                 
-+        void Delete();
-+	void PrintOut( [in] any From, [in] any To, [in] any Copies, [in] any Preview, [in] any ActivePrinter, [in] any PrintToFile, [in] any Collate, [in] any PrToFileName );
-+	void Select( [in] any Replace );
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute] string Caption;
++	[attribute, readonly ] long Count;
++	[attribute] string Text;
++	[attribute] XFont Font;
++	void Insert([in] string String);
++	void Delete();
 +};
++
++//=============================================================================
++
 +}; }; };
-+                                                                                                                             
++
 +#endif
 +
-diff --git oovbaapi/ooo/vba/excel/XlBuildInDialog.idl oovbaapi/ooo/vba/excel/XlBuildInDialog.idl
-new file mode 100644
-index 0000000..38eaf83
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/XlBuildInDialog.idl
-@@ -0,0 +1,280 @@
++
+Index: oovbaapi/ooo/vba/excel/XName.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XName.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XName.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,69 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5538,7 +5120,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XlBuildInDialog.idl,v $
++ * $RCSfile: XName.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -5559,11 +5141,209 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_excel_XlBuildInDialog_idl__
-+#define __ooo_vba_excel_XlBuildInDialog_idl__
-+module ooo {  module vba { module excel {
-+
-+constants XlBuildInDialog
++#ifndef __ooo_vba_excel_XName_idl__
++#define __ooo_vba_excel_XName_idl__
++                                                                                                                             
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++//=============================================================================
++                                                                                                                             
++module ooo {  module vba {  module excel {
++                                                                                                                             
++//=============================================================================
++
++interface XRange;
++
++interface XName
++{
++	interface ::ooo::vba::XHelperInterface;
++	
++	[attribute] string Name;
++	[attribute] string NameLocal;
++	[attribute] boolean Visible;
++        [attribute, readonly] string Value;
++        [attribute, readonly] string RefersTo;
++        [attribute, readonly] string RefersToLocal;
++        [attribute, readonly] string RefersToR1C1;
++        [attribute, readonly] string RefersToR1C1Local;
++        [attribute, readonly] XRange RefersToRange;
++
++	void Delete( );
++};
++                                                                                                                             
++}; }; };
++                                                                                                                             
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XTitle.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XTitle.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XTitle.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,119 @@
++/*************************************************************************
++ *
++ * 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: XTitle.idl,v $
++ * $Revision: 1.3 $
++ *
++ * 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 __ooo_vba_excel_XTitle_idl__
++#define __ooo_vba_excel_XTitle_idl__
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++
++module ooo {  module vba { module excel { 
++
++interface XCharacters;
++interface XFont;
++interface XBorder;
++interface XInterior;
++
++interface XTitle
++{
++	interface ::ooo::vba::XHelperInterface;
++    //    XBorder			Border( ) raises ( com::sun::star::script::BasicErrorException );
++
++    XInterior Interior() raises(com::sun::star::script::BasicErrorException);
++
++    XFont Font() raises(com::sun::star::script::BasicErrorException);
++
++    void setText([in] string Text) raises(com::sun::star::script::BasicErrorException);
++
++    string getText() raises(com::sun::star::script::BasicErrorException);
++    // #FIXME existing implementation object needs to be usable for shape, chart
++    // axes etc.
++    //XCharacters Characters() raises(com::sun::star::script::BasicErrorException);
++
++    void setTop([in] double Top) raises(com::sun::star::script::BasicErrorException);
++
++    double getTop() raises(com::sun::star::script::BasicErrorException);
++
++    void setLeft([in] double Left) raises(com::sun::star::script::BasicErrorException);
++
++    double getLeft() raises(com::sun::star::script::BasicErrorException);
++
++    void setOrientation([in] long Orientation) raises(com::sun::star::script::BasicErrorException);
++
++    long getOrientation() raises(com::sun::star::script::BasicErrorException);
++
++    // any			Select(  ) raises ( com::sun::star::script::BasicErrorException );
++
++    // any			Delete(  ) raises ( com::sun::star::script::BasicErrorException );
++
++    //    void			setName( [in] string Name ) raises ( com::sun::star::script::BasicErrorException );
++
++    //    string			getName( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void		setFill( [in] XChartFillFormat Fill ) raises ( com::sun::star::script::BasicErrorException );
++
++    // XChartFillFormat		getFill( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void			setCaption( [in] string Caption ) raises ( com::sun::star::script::BasicErrorException );
++
++    // string			getCaption( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void			setHorizontalAlignment( [in] any HorizontalAlignment ) raises ( com::sun::star::script::BasicErrorException );
++
++    // any			getHorizontalAlignment( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void			setShadow( [in] boolean Shadow ) raises ( com::sun::star::script::BasicErrorException );
++
++    // boolean			getShadow( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void			setVerticalAlignment( [in] any VerticalAlignment ) raises ( com::sun::star::script::BasicErrorException );
++
++    // any			getVerticalAlignment( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void			setReadingOrder( [in] long ReadingOrder ) raises ( com::sun::star::script::BasicErrorException );
++
++    // long			getReadingOrder( ) raises ( com::sun::star::script::BasicErrorException );
++
++    // void			setAutoScaleFont( [in] any AutoScaleFont ) raises ( com::sun::star::script::BasicErrorException );
++
++    // any			getAutoScaleFont( ) raises ( com::sun::star::script::BasicErrorException );
++
++
++};
++
++}; }; };
++
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XlBuildInDialog.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XlBuildInDialog.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XlBuildInDialog.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,280 @@
++/*************************************************************************
++ *
++ * 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: XlBuildInDialog.idl,v $
++ * $Revision: 1.3 $
++ *
++ * 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 __ooo_vba_excel_XlBuildInDialog_idl__
++#define __ooo_vba_excel_XlBuildInDialog_idl__
++module ooo {  module vba { module excel {
++
++constants XlBuildInDialog
 +{
 +        const long xlDialogActivate = 103; //(&H67)
 +        const long xlDialogActiveCellFont = 476; //(&H1DC)
@@ -5810,199 +5590,11 @@
 +};
 +}; }; };
 +#endif
-diff --git oovbaapi/ooo/vba/excel/makefile.mk oovbaapi/ooo/vba/excel/makefile.mk
-new file mode 100644
-index 0000000..026c1f8
---- /dev/null
-+++ oovbaapi/ooo/vba/excel/makefile.mk
-@@ -0,0 +1,111 @@
-+#*************************************************************************
-+#
-+# 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: makefile.mk,v $
-+#
-+# $Revision: 1.4 $
-+#
-+# 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.
-+#
-+#*************************************************************************
-+PRJ=..$/..$/..
-+
-+PRJNAME=oovapi
-+
-+TARGET=excel
-+PACKAGE=ooo$/vba$/Excel
-+
-+# --- Settings -----------------------------------------------------
-+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
-+
-+.IF "$(ENABLE_VBA)"!="YES"
-+dummy:
-+        @echo "not building vba..."
-+.ENDIF
-+
-+# ------------------------------------------------------------------------
-+
-+
-+IDLFILES= XApplication.idl\
-+	XComment.idl\
-+	XComments.idl\
-+	XRange.idl\
-+	XWorkbook.idl\
-+	XWorkbooks.idl\
-+	XWorksheet.idl\
-+	XWorksheets.idl\
-+	XFont.idl\
-+	XOutline.idl\
-+	XInterior.idl\
-+	XWorksheetFunction.idl\
-+	XWindow.idl\
-+	XChartObject.idl\
-+	XChartObjects.idl\
-+	XChart.idl\
-+	XCharts.idl\
-+	XSeriesCollection.idl\
-+	XSeries.idl\
-+	XDialog.idl \
-+	XPivotTables.idl \
-+	XPivotTable.idl \
-+	XPivotCache.idl \
-+	XDialogs.idl \
-+	XWindows.idl \
-+	XBorder.idl \
-+	XBorders.idl \
-+	XCharacters.idl \
-+	XValidation.idl\
-+	XOLEObject.idl\
-+	XOLEObjects.idl\
-+	XPane.idl\
-+	XTextFrame.idl\
-+	XTitle.idl\
-+	XChartTitle.idl\
-+	XDataLabel.idl\
-+	XDataLabels.idl\
-+	XAxes.idl\
-+	XAxis.idl\
-+	XAxisTitle.idl\
-+	XStyle.idl \
-+	XStyles.idl \
-+	XFormat.idl \
-+	XFormatCondition.idl \
-+	XFormatConditions.idl \
-+	Range.idl\
-+	XName.idl\
-+	XNames.idl \
-+	Workbook.idl \
-+	Worksheet.idl \
-+	Window.idl \
-+ 	XHyperlink.idl \
-+ 	Hyperlink.idl \
-+ 	XPageSetup.idl \
-+ 	XPageBreak.idl \
-+ 	XHPageBreak.idl \
-+ 	XHPageBreaks.idl \
-+
-+
-+# ------------------------------------------------------------------
-+
-+.INCLUDE :  target.mk
-+
-diff --git oovbaapi/ooo/vba/makefile.mk oovbaapi/ooo/vba/makefile.mk
-new file mode 100644
-index 0000000..bf44763
---- /dev/null
-+++ oovbaapi/ooo/vba/makefile.mk
-@@ -0,0 +1,64 @@
-+#*************************************************************************
-+#
-+# 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: makefile.mk,v $
-+#
-+# $Revision: 1.4 $
-+#
-+# 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.
-+#
-+#*************************************************************************
-+PRJ=..$/..
-+
-+PRJNAME=oovbapi
-+
-+TARGET=vba
-+PACKAGE=ooo$/vba
-+
-+# --- Settings -----------------------------------------------------
-+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
-+
-+.IF "$(ENABLE_VBA)"!="YES"
-+dummy:
-+        @echo "not building vba..."
-+.ENDIF
-+
-+# ------------------------------------------------------------------------
-+
-+IDLFILES=\
-+	XErrObject.idl \
-+	XGlobals.idl \
-+	XCollection.idl\
-+	XVBAToOOEventDescGen.idl\
-+	XPropValue.idl\
-+	XHelperInterface.idl\
-+	XAssistant.idl\
-+	XCommandBarControl.idl\
-+	XCommandBarControls.idl\
-+	XCommandBar.idl\
-+	XCommandBars.idl\
-+	Globals.idl\
-+
-+# ------------------------------------------------------------------
-+
-+.INCLUDE :  target.mk
-diff --git oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl
-new file mode 100644
-index 0000000..b1abcc7
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl
-@@ -0,0 +1,54 @@
+Index: oovbaapi/ooo/vba/excel/XStyles.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XStyles.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XStyles.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,71 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6011,7 +5603,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: MSFormReturnTypes.idl,v $
++ * $RCSfile: XStyles.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -6032,95 +5624,53 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+module msforms
-+{
-+    struct ReturnBoolean
-+    {
-+        boolean Value;
-+    };
-+                                                                                
-+    struct ReturnEffect
-+    {
-+        //fmDropEffect Value;
-+        short Value;
-+    };
-+                                                                                
-+    struct ReturnInteger
-+    {
-+        long Value;
-+    };
-+                                                                                
-+    struct ReturnSingle
-+    {
-+        float Value;
-+    };
-+                                                                                
 +
-+};
-diff --git oovbaapi/ooo/vba/msforms/XButton.idl oovbaapi/ooo/vba/msforms/XButton.idl
-new file mode 100644
-index 0000000..452b3ea
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XButton.idl
-@@ -0,0 +1,52 @@
-+/*************************************************************************
-+ *
-+ * 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: XButton.idl,v $
-+ * $Revision: 1.3 $
-+ *
-+ * 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 __ooo_vba_msforms_XButton_idl__
-+#define __ooo_vba_msforms_XButton_idl__
++#ifndef __ooo_vba_excel_XStyles_idl__
++#define __ooo_vba_excel_XStyles_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
 +#endif
-+//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
-+//=============================================================================
-+interface XButton: com::sun::star::uno::XInterface 
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++
++module ooo {  module vba { module excel { 
++interface XStyle;
++interface XStyles 
 +{
-+	[attribute] string Caption;
-+};
++    interface ::ooo::vba::XCollection;
++    /**
++    @param Workbook
++    Optional.
++    @return any
++    **/
++    // any                      Merge( [in]  /*Optional*/ any Workbook ) raises ( com::sun::star::script::BasicErrorException );
 +
-+//=============================================================================
++    /**
++    @param Name
 +
-+}; }; };
++    @param BasedOn
++    Optional.
++    @return XStyle
++    **/
++    XStyle Add([in] string Name, [in] /*Optional*/ any BasedOn)
++        raises (com::sun::star::script::BasicErrorException);	
 +
-+#endif
++}; }; }; };
 +
++#endif
 +
-diff --git oovbaapi/ooo/vba/msforms/XColorFormat.idl oovbaapi/ooo/vba/msforms/XColorFormat.idl
-new file mode 100644
-index 0000000..35ead4e
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XColorFormat.idl
-@@ -0,0 +1,46 @@
+Index: oovbaapi/ooo/vba/excel/XCharts.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XCharts.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XCharts.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,63 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6129,7 +5679,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XColorFormat.idl,v $
++ * $RCSfile: XCharts.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -6150,29 +5700,161 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XColorFormat_idl__
-+#define __ooo_vba_msforms_XColorFormat_idl__
++#ifndef __ooo_vba_excel_XChart_idl__
++#define __ooo_vba_excel_XChart_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+module ooo {  module vba { module msforms {
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
 +
-+interface XColorFormat : ooo::vba::XHelperInterface
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++interface XChart;
++//=============================================================================
++interface XCharts
 +{
-+    [attribute] long RGB;
-+    [attribute] long SchemeColor;
++	interface ooo::vba::XCollection;
++	any Add() raises(com::sun::star::script::BasicErrorException);
++	XChart getActiveChart() raises (com::sun::star::script::BasicErrorException);
 +};
 +
-+};};};
++//=============================================================================
++
++}; }; };
++
 +#endif
-diff --git oovbaapi/ooo/vba/msforms/XComboBox.idl oovbaapi/ooo/vba/msforms/XComboBox.idl
-new file mode 100644
-index 0000000..580fef1
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XComboBox.idl
-@@ -0,0 +1,61 @@
++
++
+Index: oovbaapi/ooo/vba/excel/makefile.mk
+===================================================================
+--- oovbaapi/ooo/vba/excel/makefile.mk	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/makefile.mk	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,111 @@
++#*************************************************************************
++#
++# 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: makefile.mk,v $
++#
++# $Revision: 1.4 $
++#
++# 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.
++#
++#*************************************************************************
++PRJ=..$/..$/..
++
++PRJNAME=oovapi
++
++TARGET=excel
++PACKAGE=ooo$/vba$/Excel
++
++# --- Settings -----------------------------------------------------
++.INCLUDE :  $(PRJ)$/util$/makefile.pmk
++
++.IF "$(ENABLE_VBA)"!="YES"
++dummy:
++        @echo "not building vba..."
++.ENDIF
++
++# ------------------------------------------------------------------------
++
++
++IDLFILES= XApplication.idl\
++	XComment.idl\
++	XComments.idl\
++	XRange.idl\
++	XWorkbook.idl\
++	XWorkbooks.idl\
++	XWorksheet.idl\
++	XWorksheets.idl\
++	XFont.idl\
++	XOutline.idl\
++	XInterior.idl\
++	XWorksheetFunction.idl\
++	XWindow.idl\
++	XChartObject.idl\
++	XChartObjects.idl\
++	XChart.idl\
++	XCharts.idl\
++	XSeriesCollection.idl\
++	XSeries.idl\
++	XDialog.idl \
++	XPivotTables.idl \
++	XPivotTable.idl \
++	XPivotCache.idl \
++	XDialogs.idl \
++	XWindows.idl \
++	XBorder.idl \
++	XBorders.idl \
++	XCharacters.idl \
++	XValidation.idl\
++	XOLEObject.idl\
++	XOLEObjects.idl\
++	XPane.idl\
++	XTextFrame.idl\
++	XTitle.idl\
++	XChartTitle.idl\
++	XDataLabel.idl\
++	XDataLabels.idl\
++	XAxes.idl\
++	XAxis.idl\
++	XAxisTitle.idl\
++	XStyle.idl \
++	XStyles.idl \
++	XFormat.idl \
++	XFormatCondition.idl \
++	XFormatConditions.idl \
++	Range.idl\
++	XName.idl\
++	XNames.idl \
++	Workbook.idl \
++	Worksheet.idl \
++	Window.idl \
++ 	XHyperlink.idl \
++ 	Hyperlink.idl \
++ 	XPageSetup.idl \
++ 	XPageBreak.idl \
++ 	XHPageBreak.idl \
++ 	XHPageBreaks.idl \
++
++
++# ------------------------------------------------------------------
++
++.INCLUDE :  target.mk
++
+Index: oovbaapi/ooo/vba/excel/XComments.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XComments.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XComments.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6181,8 +5863,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XComboBox.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XComments.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -6202,29 +5884,26 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XComboBox_idl__
-+#define __ooo_vba_msforms_XComboBox_idl__
++#ifndef __ooo_vba_excel_XComments_idl__
++#define __ooo_vba_excel_XComments_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+
++#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
++#include <com/sun/star/lang/IllegalArgumentException.idl>
++#endif
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
 +
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
-+
++module ooo {  module vba {  module excel {
 +
-+//=============================================================================
-+interface XComboBox: ::com::sun::star::uno::XInterface
++interface XComments
 +{
-+	[attribute] any Value;
-+	[attribute] any ListIndex;
-+	[attribute, readonly ] long ListCount;
-+	[attribute] string Text;
-+	void AddItem( [in] any pvargItem, [in] any pvargIndex );
-+	void removeItem( [in] any index );
-+	void Clear();
++	interface ooo::vba::XCollection;
 +};
 +
 +//=============================================================================
@@ -6234,12 +5913,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XControl.idl oovbaapi/ooo/vba/msforms/XControl.idl
-new file mode 100644
-index 0000000..086b646
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XControl.idl
-@@ -0,0 +1,72 @@
+Index: oovbaapi/ooo/vba/excel/XSeries.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XSeries.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XSeries.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,63 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6248,8 +5926,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XControl.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XSeries.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -6269,40 +5947,31 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XControl_idl__
-+#define __ooo_vba_msforms_XControl_idl__
++#ifndef __ooo_vba_excel_XSeries_idl__
++#define __ooo_vba_excel_XSeries_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+
-+//=============================================================================
-+
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+module ooo {  module vba {  module msforms { 
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
-+interface XControl
++
++interface XSeries
 +{
 +	interface ::ooo::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.
-+    //Mso use double but OOo use long. OOo 1 =  1/100mm but Mso use pt
-+	[attribute] double Height;
-+	[attribute] double Width;
-+    //Postion
-+    [attribute] double  Left;
-+    [attribute] double  Top;
-+	[attribute] string Name;
++
++	[attribute, readonly] string Name;
++	any Series( [in] any Item );
++	any Values ( [in] any Values );
++	any XValues ( [in] any XValues );
 +};
 +
 +//=============================================================================
@@ -6312,12 +5981,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XControls.idl oovbaapi/ooo/vba/msforms/XControls.idl
-new file mode 100644
-index 0000000..b6abd88
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XControls.idl
-@@ -0,0 +1,51 @@
+Index: oovbaapi/ooo/vba/excel/XValidation.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XValidation.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XValidation.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,71 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6326,8 +5994,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XValidation.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -6347,34 +6015,53 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XControls_idl__
-+#define __ooo_vba_msforms_XControls_idl__
++#ifndef __ooo_vba_excel_XValidation_idl__
++#define __ooo_vba_excel_XValidation_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+#ifndef  __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
-+module ooo {  module vba { module msforms {
 +
-+interface XControl;
++//=============================================================================
 +
-+interface XControls 
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++
++interface XValidation
 +{
-+    interface ooo::vba::XCollection;
-+    void Move( [in] double cx, [in] double cy );
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute] boolean IgnoreBlank;
++	[attribute] boolean InCellDropdown;
++	[attribute] boolean ShowInput;
++	[attribute] boolean ShowError;
++	[attribute] string InputTitle;	
++	[attribute] string ErrorTitle;
++	[attribute] string InputMessage;
++	[attribute] string ErrorMessage;
++	[attribute, readonly] string Formula1;
++	[attribute, readonly] string Formula2;
++	void Delete();
++	void Add( [in] any Type, [in] any AlertStyle, [in] any Operator, [in] any Formula1, [in] any Formula2);
 +};
-+}; }; };
 +
++//=============================================================================
++
++}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/msforms/XFillFormat.idl oovbaapi/ooo/vba/msforms/XFillFormat.idl
-new file mode 100644
-index 0000000..8dd4afd
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XFillFormat.idl
-@@ -0,0 +1,53 @@
++
++
+Index: oovbaapi/ooo/vba/excel/XWindows.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWindows.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWindows.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6383,8 +6070,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XFillFormat.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XWindows.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -6404,83 +6091,27 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XFillFormat_idl__
-+#define __ooo_vba_msforms_XFillFormat_idl__
++#ifndef __ooo_vba_excel_XWindows_idl__
++#define __ooo_vba_excel_XWindows_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_msforms_XColorFormat_idl__
-+#include <ooo/vba/msforms/XColorFormat.idl>
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
 +#endif
 +
-+module ooo {  module vba { module msforms {
-+interface XFillFormat : ooo::vba::XHelperInterface
-+{
-+    [attribute] boolean Visible;
-+    [attribute] double Transparency;
-+    void Solid();
-+    void TwoColorGradient( [in] long style, [in] long variant );
-+    XColorFormat BackColor();
-+    XColorFormat ForeColor();
-+};
-+
-+};};};
-+#endif
-diff --git oovbaapi/ooo/vba/msforms/XGroupBox.idl oovbaapi/ooo/vba/msforms/XGroupBox.idl
-new file mode 100644
-index 0000000..daf51cb
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XGroupBox.idl
-@@ -0,0 +1,56 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef __ooo_vba_msforms_XGroupBox_idl__
-+#define __ooo_vba_msforms_XGroupBox_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++module ooo {  module vba {  module excel { 
++
 +//=============================================================================
-+interface XGroupBox
++interface XWindows
 +{
-+	[attribute] string Caption; 
++	interface ::ooo::vba::XCollection;
++
++	void Arrange( [in] long ArrangeStyle, [in] any ActiveWorkbook, [in] any SyncHorizontal, [in] any SyncVertical );	
 +};
 +
 +//=============================================================================
@@ -6490,12 +6121,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XImage.idl oovbaapi/ooo/vba/msforms/XImage.idl
-new file mode 100644
-index 0000000..1136af6
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XImage.idl
-@@ -0,0 +1,51 @@
+Index: oovbaapi/ooo/vba/excel/XRange.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XRange.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XRange.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,179 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6504,8 +6134,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XRange.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -6525,19 +6155,147 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XImage_idl__
-+#define __ooo_vba_msforms_XImage_idl__
++#ifndef __ooo_vba_excel_XRange_idl__
++#define __ooo_vba_excel_XRange_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
++#include <com/sun/star/lang/IllegalArgumentException.idl>
++#endif
++#ifndef __com_sun_star_container_XEnumerationAccess_idl__
++#include <com/sun/star/container/XEnumerationAccess.idl>
++#endif
++#ifndef __com_sun_star_script_XDefaultProperty_idl__
++#include <com/sun/star/script/XDefaultProperty.idl>
++#endif
++#ifndef __com_sun_star_script_XDefaultMethod_idl__
++#include <com/sun/star/script/XDefaultMethod.idl>
++#endif
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++#ifndef __ooo_vba_excel_XFormat_idl__
++#include <ooo/vba/excel/XFormat.idl>
++#endif
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++module ooo {  module vba {  module excel { 
 +
-+//=============================================================================
-+interface XImage: com::sun::star::uno::XInterface 
++interface XFont;
++interface XRows;
++interface XColumns;
++interface XComment;
++
++interface XInterior;
++interface XCharacters;
++interface XBorders;
++interface XValidation;
++interface XWorksheet;
++
++interface XRange
 +{
++ 	interface com::sun::star::container::XEnumerationAccess;
++	interface com::sun::star::script::XDefaultMethod;
++	interface com::sun::star::script::XDefaultProperty;
++	interface ::ooo::vba::excel::XFormat;
++	//interface ::ooo::vba::XHelperInterface;
++
++	[attribute] any Value; 
++	[attribute] any Formula;
++	[attribute] any FormulaArray;
++	[attribute] any FormulaR1C1;
++	[attribute, readonly] long  Count;
++	[attribute, readonly] long Row;
++	[attribute, readonly] long Column;
++	[attribute, readonly] string Text;
++	[attribute, readonly] XRange EntireRow;
++	[attribute, readonly] XRange EntireColumn;
++	[attribute, readonly] XComment Comment;
++	[attribute] any Hidden;
++	[attribute] any ColumnWidth;
++	[attribute, readonly ] any Width;
++	[attribute, readonly] XWorksheet Worksheet;
++	[attribute] any RowHeight;
++	[attribute, readonly ] any Height;
++	[attribute, readonly ] any Top;
++	[attribute, readonly ] any Left;
++	[attribute] any PageBreak;
++	[attribute, readonly] XValidation Validation;
++	[attribute] any Style;
++	[attribute] any AddIndent;
++	[attribute] any ShowDetail;
++
++	XComment AddComment( [in] any Text ); 
++	void Clear();
++	void ClearComments();
++	void ClearContents();
++	void ClearFormats();
++	any HasFormula();
++	void FillLeft();
++	void FillRight();
++	void FillUp();
++	void FillDown();
++	XRange Item([in] any row, [in] any column) raises(com::sun::star::script::BasicErrorException);
++	XRange Offset([in] any RowOffset, [in] any ColumnOffset);
++	XRange CurrentRegion();
++	XRange CurrentArray(); 
++	string Characters([in] any Start, [in] any Length);
++	string Address( [in] any RowAbsolute, [in] any ColumnAbsolute, [in] any ReferenceStyle, [in] any External, [in] any RelativeTo );	
++	XRange Cells([in] any RowIndex, [in] any ColumnIndex);
++	void Select();
++	void AutoOutline() raises(com::sun::star::script::BasicErrorException);
++	void Activate();
++	XRange Rows( [in] any RowIndex );
++	void Calculate() raises(com::sun::star::script::BasicErrorException);
++	XRange Columns( [in] any ColumnIndex );
++	void Copy([in] any Destination);
++	void Cut([in] any Destination);
++	XRange Resize( [in] any RowSize, [in] any ColumnSize );
++	XRange Range( [in] any Cell1, [in] any Cell2 );
++	any getCellRange();
++	void PasteSpecial([in] any Paste, [in] any Operation,[in] any SkipBlanks, [in] any Transpose);
++	boolean  Replace( [in] string What, [in] string Replacement, [in] any LookAt, [in] any SearchOrder, [in] any MatchCase, [in] any MatchByte, [in] any SearchFormat, [in] any ReplaceFormat );
++    XRange Find( [in] any What, [in] any After, [in] any LookIn, [in] any LookAt, [in] any SearchOrder, [in] any SearchDirection, [in] any MatchCase, [in] any MatchByte, [in] any SearchFormat );
++	
++	void Sort( [in] any Key1, [in] any Order1, [in] any Key2, [in] any Type,
++		[in] any Order2, [in] any Key3, [in] any Order3,
++		[in] any Header, [in] any OrderCustom, [in] any MatchCase, 
++		[in] any Orientation, [in] any SortMethod, [in] any DataOption1,
++		[in] any DataOption2, [in] any DataOption3 );
++	XRange End( [in] long Direction );
++	// bizarely I have to define Character method as character otherwise
++	// idl complains
++	XCharacters characters([in] any Start, [in] any Length);
++	void Delete( [in] any Shift );
++		
++	any Areas( [in] any item );
++	any BorderAround( [in] any LineStyle, [in] any Weight, [in] any ColorIndex, [in] any Color );
++        void AutoFilter([in ] any Field, [in] any Criteria1, [in] any Operator, [in] any Criteria2, [in] any VisibleDropDown);
++        void Insert([in] any Shift, [in] any CopyOrigin);
++        void Autofit();
++	void PrintOut([in] any From, [in] any To, [in] any Copies, [in] any Preview, [in] any ActivePrinter, [in] any PrintToFile, [in] any Collate, [in] any PrToFileName);
++	void AutoFill( [in] XRange Destination, [in] any Type );
++	boolean GoalSeek( [in] any Goal, [in] XRange ChangingCell );
++	void ClearOutline() raises(com::sun::star::script::BasicErrorException);
++	void Ungroup() raises(com::sun::star::script::BasicErrorException);
++	void Group() raises(com::sun::star::script::BasicErrorException);
++	void Merge([in] any Across) raises(com::sun::star::script::BasicErrorException);
++	void UnMerge() raises(com::sun::star::script::BasicErrorException);
++	XRange Next( ) raises ( com::sun::star::script::BasicErrorException );
++	XRange Previous( ) raises ( com::sun::star::script::BasicErrorException );
++ 	XRange SpecialCells( [in] any Type, [in]  /*Optional*/ any Value ) raises ( com::sun::star::script::BasicErrorException );
++	void RemoveSubtotal() raises ( com::sun::star::script::BasicErrorException );
++	void	Subtotal( [in] long GroupBy, [in] long Function, [in]  /*Optional*/ sequence<long> TotalList, [in]  /*Optional*/ any Replace, [in]  /*Optional*/ any PageBreaks, [in] any SummaryBelowData ) raises ( com::sun::star::script::BasicErrorException );
++	XRange MergeArea( ) raises ( com::sun::star::script::BasicErrorException );
++
 +};
 +
 +//=============================================================================
@@ -6547,12 +6305,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XLabel.idl oovbaapi/ooo/vba/msforms/XLabel.idl
-new file mode 100644
-index 0000000..376802d
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XLabel.idl
-@@ -0,0 +1,53 @@
+Index: oovbaapi/ooo/vba/excel/XBorders.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XBorders.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XBorders.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6561,8 +6318,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XLabel.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XBorders.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -6582,21 +6339,30 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XLabel_idl__
-+#define __ooo_vba_msforms_XLabel_idl__
++#ifndef __ooo_vba_excel_XBorders_idl__
++#define __ooo_vba_excel_XBorders_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++#ifndef  __ooo_vba_excel_XBorder_idl__
++#include <ooo/vba/excel/XBorder.idl>
++#endif
++#ifndef  __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++
++
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
-+interface XLabel: com::sun::star::uno::XInterface 
++interface XBorders
 +{
-+	[attribute] string Caption;
-+	[attribute] any Value;
++	
++	interface ooo::vba::excel::XBorder;
++	interface ooo::vba::XCollection;
 +};
 +
 +//=============================================================================
@@ -6606,12 +6372,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XLineFormat.idl oovbaapi/ooo/vba/msforms/XLineFormat.idl
-new file mode 100644
-index 0000000..bfa2c8f
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XLineFormat.idl
-@@ -0,0 +1,60 @@
+Index: oovbaapi/ooo/vba/excel/XChart.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XChart.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XChart.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,90 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6620,8 +6385,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XLineFormat.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XChart.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -6641,43 +6406,72 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XLineFormat_idl__
-+#define __ooo_vba_msforms_XLineFormat_idl__
++#ifndef __ooo_vba_excel_XChart_idl__
++#define __ooo_vba_excel_XChart_idl__
 +
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_msforms_XColorFormat_idl__
-+#include <ooo/vba/msforms/XColorFormat.idl>
++#ifndef __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
 +#endif
++//=============================================================================
 +
-+module ooo {  module vba { module msforms {
-+interface XLineFormat : ooo::vba::XHelperInterface
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++interface XRange; 
++interface XChartTitle; 
++interface XChart
 +{
-+    [attribute] long BeginArrowheadStyle;
-+    [attribute] long BeginArrowheadLength;
-+    [attribute] long BeginArrowheadWidth;
-+    [attribute] long EndArrowheadStylel;
-+    [attribute] long EndArrowheadLength;
-+    [attribute] long EndArrowheadWidth;
-+    [attribute] double Weight;
-+    [attribute] boolean Visible;
-+    [attribute] double Transparency;
-+    [attribute] short Style;
-+    [attribute] long DashStyle;
-+    XColorFormat BackColor();
-+    XColorFormat ForeColor();
++	interface ::ooo::vba::XHelperInterface;
++	
++	[attribute, readonly] string Name;
++	any SeriesCollection( [in] any Item );
++	long getChartType() raises(com::sun::star::script::BasicErrorException);
++
++	void setChartType([in] long chartType) raises(com::sun::star::script::BasicErrorException);
++
++	void Activate() raises(com::sun::star::script::BasicErrorException);
++	void setSourceData([in] XRange Source, [in] any PlotBy) raises(com::sun::star::script::BasicErrorException);
++
++	long Location() raises (com::sun::star::script::BasicErrorException);
++	long getLocation() raises (com::sun::star::script::BasicErrorException);
++
++	void setLocation([in] long where, [in] any Name) raises (com::sun::star::script::BasicErrorException);
++
++	boolean getHasTitle() raises(com::sun::star::script::BasicErrorException);
++
++	void setHasTitle([in] boolean bTitle) raises(com::sun::star::script::BasicErrorException);
++
++	boolean getHasLegend() raises(com::sun::star::script::BasicErrorException);
++
++	void setHasLegend([in] boolean bLegend) raises(com::sun::star::script::BasicErrorException);
++	XChartTitle getChartTitle() raises (com::sun::star::script::BasicErrorException);
++	void setPlotBy([in] long xlRowCol) raises(com::sun::star::script::BasicErrorException);
++
++	long getPlotBy() raises(com::sun::star::script::BasicErrorException);
++
++	any Axes( [in] any Type, [in] any AxisGroup ) raises (com::sun::star::script::BasicErrorException);
++
 +};
++
++//=============================================================================
++
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/msforms/XListBox.idl oovbaapi/ooo/vba/msforms/XListBox.idl
-new file mode 100644
-index 0000000..c68b258
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XListBox.idl
-@@ -0,0 +1,62 @@
++
++
+Index: oovbaapi/ooo/vba/excel/XApplication.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XApplication.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XApplication.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,119 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6686,8 +6480,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XListBox.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XApplication.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -6707,109 +6501,163 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XListBox_idl__
-+#define __ooo_vba_msforms_XListBox_idl__
++#ifndef __ooo_vba_excel_XApplication_idl__
++#define __ooo_vba_excel_XApplication_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
++#ifndef __ooo_vba_XAssistant_idl__
++#include <ooo/vba/XAssistant.idl>
++#endif
 +
-+//=============================================================================
-+interface XListBox: com::sun::star::uno::XInterface 
++#ifndef __ooo_vba_XCommandBars_idl__
++#include <ooo/vba/XCommandBars.idl>
++#endif
++
++module ooo {  module vba {  module excel { 
++
++interface XRange;
++interface XWorkbook;
++interface XWorkbooks;
++interface XWorksheets;
++interface XWorksheetFunction;
++interface XWindow;
++interface XWorksheet;
++
++interface XApplication
 +{
-+	[attribute] any Value;
-+	[attribute] string Text;
-+	[attribute] boolean MultiSelect;
-+	[attribute] any ListIndex;
-+        [attribute, readonly ] long ListCount;
-+	void AddItem( [in] any pvargItem, [in] any pvargIndex );
-+	void removeItem( [in] any index );
-+	void Clear();
-+    any Selected( [in] long index );
-+    any List( [in] any pvargIndex, [in] any pvarColumn );
-+};
 +
-+//=============================================================================
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute, readonly] any Selection;
++	[attribute, readonly] XWorkbook ActiveWorkbook;
++	[attribute, readonly] XRange ActiveCell;
++	[attribute, readonly] XWindow ActiveWindow;
++	[attribute, readonly] XWorksheet ActiveSheet;
++    [attribute, readonly] ooo::vba::XAssistant Assistant;
++	[attribute] long Calculation;
++	//#TODO #FIXME this is more of a placeholder, will return
++	// the value of activeworkbook, in xl 'ThisWorkbook' should return the
++	// workbook in which the 'calling' macro is running. Should be possible
++	// to determine this
++	[attribute, readonly] XWorkbook ThisWorkbook;
++	[attribute, readonly] string Name;
++	[attribute] boolean ScreenUpdating;
++	[attribute] boolean DisplayStatusBar;
++	[attribute] boolean DisplayAlerts;
++	[attribute] boolean DisplayFormulaBar;
++	[attribute] any CutCopyMode;
++	[attribute] any StatusBar;
++	[attribute] long Cursor; 
++	[attribute, readonly] string Version;
++
++	void setDefaultFilePath([in] string DefaultFilePath) raises(com::sun::star::script::BasicErrorException);
++
++	string getDefaultFilePath() raises(com::sun::star::script::BasicErrorException); 
++
++	string LibraryPath() raises(com::sun::star::script::BasicErrorException);
++	string TemplatesPath() raises(com::sun::star::script::BasicErrorException);
++	string PathSeparator() raises(com::sun::star::script::BasicErrorException);
++    any CommandBars( [in] any aIndex );
++	any Workbooks( [in] any aIndex );
++	any Worksheets( [in] any aIndex );
++	any Windows( [in] any aIndex );
++	any WorksheetFunction();
++	any Evaluate( [in] string Name );
++	any Dialogs( [in] any DialogIndex );
++	any Range( [in] any Cell1, [in] any Cell2 );
++	any Names( [in] any Index );
++	void GoTo( [in] any Reference, [in] any Scroll );
++	// #FIXME #TODO up to 30 args needed
++	double CountA( [in] any arg1 );
++	void wait( [in] double time );
++	void Calculate() raises(com::sun::star::script::BasicErrorException);
++	XRange Intersect([in] XRange Arg1, [in] XRange Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30)
++        raises(com::sun::star::script::BasicErrorException);
++	XRange Union([in] XRange Arg1, [in] XRange Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30)
++        raises(com::sun::star::script::BasicErrorException);
++	void Volatile([in] any Volatile);
++	void DoEvents();
++};
 +
 +}; }; };
 +
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XMultiPage.idl oovbaapi/ooo/vba/msforms/XMultiPage.idl
-new file mode 100644
-index 0000000..4e58cbe
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XMultiPage.idl
-@@ -0,0 +1,58 @@
+Index: oovbaapi/ooo/vba/excel/XNames.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XNames.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XNames.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,57 @@
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile: XNames.idl,v $
++ * $Revision: 1.3 $
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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 __ooo_vba_msforms_XMultiPage_idl__
-+#define __ooo_vba_msforms_XMultiPage_idl__
-+
++#ifndef __ooo_vba_excel_XNames_idl__
++#define __ooo_vba_excel_XNames_idl__
++                                                                                                                             
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++                                                                                                                             
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++                                                                                                                             
 +//=============================================================================
-+
-+module ooo {  module vba {  module msforms { 
-+
++                                                                                                                             
++module ooo {  module vba {  module excel {
++                                                                                                                             
 +//=============================================================================
-+interface XMultiPage: com::sun::star::uno::XInterface 
++                                                                                                                             
++interface XNames
 +{
-+	[attribute] long Value;
-+	any Pages( [in] any index );
-+};
-+
-+//=============================================================================
++	interface ::ooo::vba::XCollection;
 +
++        any Add( [in] any Name , [in] any RefersTo , [in] any Visible , [in] any MacroType , [in] any ShortcutKey , [in] any Category , [in] any NameLocal , [in] any RefersToLocal , [in] any CategoryLocal , [in] any RefersToR1C1 , [in] any RefersToR1C1Local );
++};
++                                                                                                                             
 +}; }; };
-+
++                                                                                                                             
 +#endif
 +
-+
-diff --git oovbaapi/ooo/vba/msforms/XPages.idl oovbaapi/ooo/vba/msforms/XPages.idl
-new file mode 100644
-index 0000000..06f2376
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XPages.idl
-@@ -0,0 +1,61 @@
+Index: oovbaapi/ooo/vba/excel/XHyperlink.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XHyperlink.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XHyperlink.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,65 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -6844,39 +6692,42 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XPage_idl__
-+#define __ooo_vba_msforms_XPage_idl__
-+
++#ifndef __ooo_vba_excel_XHyperlink_idl__
++#define __ooo_vba_excel_XHyperlink_idl__
++                                                                                                                             
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef  __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
 +//=============================================================================
-+
-+module ooo {  module vba {  module msforms { 
-+
++                                                                                                                             
++module ooo {  module vba {  module excel {
++                                                                                                                             
 +//=============================================================================
-+interface XPages
++interface XRange;
++interface XHyperlink
 +{
-+    interface ooo::vba::XCollection;
-+};
-+
-+//=============================================================================
++	interface ::ooo::vba::XHelperInterface;
++	
++	[attribute] string Address;
++	[attribute] string Name;
++	[attribute] string TextToDisplay;
 +
++	XRange Range();
++};
++                                                                                                                             
 +}; }; };
-+
++                                                                                                                             
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/msforms/XPictureFormat.idl oovbaapi/ooo/vba/msforms/XPictureFormat.idl
-new file mode 100644
-index 0000000..f6baecd
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XPictureFormat.idl
-@@ -0,0 +1,48 @@
+Index: oovbaapi/ooo/vba/excel/Workbook.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Workbook.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/Workbook.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,49 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6885,7 +6736,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XPictureFormat.idl,v $
++ * $RCSfile: Workbook.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -6906,79 +6757,88 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XPictureFormat_idl__
-+#define __ooo_vba_msforms_XPictureFormat_idl__
 +
++#ifndef __ooo_vba_excel_Workbook_idl__
++#define __ooo_vba_excel_Workbook_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
++#ifndef __ooo_vba_excel_XWorkbook_idl__
++#include <ooo/vba/excel/XWorkbook.idl>
 +#endif
 +
-+module ooo {  module vba { module msforms {
-+interface XPictureFormat : ooo::vba::XHelperInterface
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/frame/XModel.idl>
++
++module ooo {  module vba { module excel {
++service Workbook : XWorkbook
 +{
-+    [attribute] double Brightness;
-+    [attribute] double Contrast;
-+    void IncrementBrightness( [in] double increment );
-+    void IncrementContrast( [in] double increment );
++  	createWorkbook(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
 +};
++
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/msforms/XProgressBar.idl oovbaapi/ooo/vba/msforms/XProgressBar.idl
-new file mode 100644
-index 0000000..ecb226c
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XProgressBar.idl
-@@ -0,0 +1,57 @@
+Index: oovbaapi/ooo/vba/excel/XOLEObject.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XOLEObject.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XOLEObject.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,66 @@
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile: XOLEObject.idl,v $
++ * $Revision: 1.3 $
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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 __ooo_vba_msforms_XProgressBar_idl__
-+#define __ooo_vba_msforms_XProgressBar_idl__
++#ifndef __ooo_vba_excel_XOLEObject_idl__
++#define __ooo_vba_excel_XOLEObject_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++module ooo {  module vba {  module excel { 
++
 +
 +//=============================================================================
-+interface XProgressBar: com::sun::star::uno::XInterface 
++interface XOLEObject
 +{
-+	[attribute] any Value;
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute, readonly] com::sun::star::uno::XInterface Object;
++    [attribute] boolean Enabled;
++    [attribute] boolean Visible;
++    [attribute] double  Left;
++    [attribute] double  Top;
++    [attribute] double  Height;
++    [attribute] double  Width;
 +};
 +
 +//=============================================================================
@@ -6988,12 +6848,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XRadioButton.idl oovbaapi/ooo/vba/msforms/XRadioButton.idl
-new file mode 100644
-index 0000000..3df4932
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XRadioButton.idl
-@@ -0,0 +1,53 @@
+Index: oovbaapi/ooo/vba/excel/XWindow.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWindow.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWindow.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,107 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -7002,8 +6861,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XRadioButton.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XWindow.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -7023,21 +6882,75 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XRadioButton_idl__
-+#define __ooo_vba_msforms_XRadioButton_idl__
++#ifndef __ooo_vba_excel_XWindow_idl__
++#define __ooo_vba_excel_XWindow_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
-+interface XRadioButton: com::sun::star::uno::XInterface 
++interface XRange;
++interface XWorksheet;
++interface XPane;
++interface XWindow
 +{
-+	[attribute] string Caption;
-+	[attribute] any Value;
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute] any Caption;
++	[attribute] boolean DisplayGridlines; 
++	[attribute] boolean DisplayHeadings; 
++	[attribute] boolean DisplayHorizontalScrollBar; 
++	[attribute] boolean DisplayOutline;
++	[attribute] boolean DisplayVerticalScrollBar; 
++	[attribute] boolean DisplayWorkbookTabs; 
++	[attribute] boolean FreezePanes; 
++	[attribute] long Height; 
++	[attribute] long Left; 
++	[attribute] boolean Split; 
++	[attribute] long SplitColumn;
++	[attribute] double SplitHorizontal;
++	[attribute] long SplitRow;
++	[attribute] double SplitVertical;
++	[attribute] any ScrollColumn;
++	[attribute] any ScrollRow;
++	[attribute] long Top; 
++	[attribute] any View;
++	[attribute] boolean Visible;
++	[attribute] long Width; 
++	[attribute] any WindowState;
++	[attribute] any Zoom;
++	any SelectedSheets( [in] any aIndex );
++	void SmallScroll( [in] any Down, [in] any Up, [in] any ToRight, [in] any ToLeft );
++	void LargeScroll( [in] any Down, [in] any Up, [in] any ToRight, [in] any ToLeft );
++	void ScrollWorkbookTabs( [in] any Sheets, [in] any Position );
++	void Activate();
++        void Close([in] any SaveChanges, [in] any FileName, [in] any RouteWorkBook);
++	XRange ActiveCell() raises(com::sun::star::script::BasicErrorException);
++	any Selection() raises(com::sun::star::script::BasicErrorException);
++	long PointsToScreenPixelsX([in] long Points) raises(com::sun::star::script::BasicErrorException);
++	long PointsToScreenPixelsY([in] long Points) raises(com::sun::star::script::BasicErrorException);
++    void PrintOut([in] /*optional short*/ any From,
++        [in] /*optional short*/ any To,
++        [in] /*optional short*/ any Copies,
++        [in] /*optional boolean*/ any Preview,
++        [in] /*optional string*/ any ActivePrinter,
++        [in] /*optional boolean*/ any PrintToFile,
++        [in] /*optional boolean*/ any Collate,
++        [in] /*optional string*/ any PrToFileName
++        ) raises(com::sun::star::script::BasicErrorException);
++     void PrintPreview( [in]  /*Optional*/ any EnableChanges ) raises ( com::sun::star::script::BasicErrorException );
++
++	XWorksheet ActiveSheet() raises(com::sun::star::script::BasicErrorException);
++	XPane ActivePane() raises(com::sun::star::script::BasicErrorException);
 +};
 +
 +//=============================================================================
@@ -7047,64 +6960,72 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XScrollBar.idl oovbaapi/ooo/vba/msforms/XScrollBar.idl
-new file mode 100644
-index 0000000..2d35866
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XScrollBar.idl
-@@ -0,0 +1,61 @@
+Index: oovbaapi/ooo/vba/excel/XHPageBreaks.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XHPageBreaks.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XHPageBreaks.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,70 @@
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile$
++ * $Revision$
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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 __ooo_vba_msforms_XScrollBar_idl__
-+#define __ooo_vba_msforms_XScrollBar_idl__
++#ifndef __ooo_vba_excel_XHPageBreaks_idl__
++#define __ooo_vba_excel_XHPageBreaks_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++#ifndef  __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++module ooo {  module vba {  module excel { 
 +
 +//=============================================================================
-+interface XScrollBar: com::sun::star::uno::XInterface 
++
++interface XHPageBreak;
++
++interface XHPageBreaks
 +{
-+	[attribute] long Max;
-+	[attribute] long Min;
-+	[attribute] any Value;
-+	[attribute] long LargeChange;
-+	[attribute] long SmallChange;
++
++	interface ooo::vba::XCollection;
++	//Methods	
++    any Add([in] any Before) raises(com::sun::star::script::BasicErrorException);
 +};
 +
 +//=============================================================================
@@ -7114,12 +7035,11 @@
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XShape.idl oovbaapi/ooo/vba/msforms/XShape.idl
-new file mode 100644
-index 0000000..a1ac36d
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XShape.idl
-@@ -0,0 +1,89 @@
+Index: oovbaapi/ooo/vba/excel/XBorder.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XBorder.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XBorder.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -7128,8 +7048,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XShape.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XBorder.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -7149,72 +7069,44 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XShape_idl__
-+#define __ooo_vba_msforms_XShape_idl__
++#ifndef __ooo_vba_excel_XBorder_idl__
++#define __ooo_vba_excel_XBorder_idl__
 +
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
-+
-+#ifndef __ooo_vba_excel_XTextFrame_idl__
-+#include <ooo/vba/excel/XTextFrame.idl>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_msforms_XLineFormat_idl__
-+#include <ooo/vba/msforms/XLineFormat.idl>
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
++//=============================================================================
 +
-+#ifndef __ooo_vba_msforms_XFillFormat_idl__
-+#include <ooo/vba/msforms/XFillFormat.idl>
-+#endif
++module ooo {  module vba {  module excel { 
 +
-+#ifndef __ooo_vba_msforms_XPictureFormat_idl__
-+#include <ooo/vba/msforms/XPictureFormat.idl>
-+#endif
 +
-+module ooo {  module vba { module msforms {
-+interface XShapeRange;
-+interface XShape : ooo::vba::XHelperInterface
++//=============================================================================
++interface XBorder
 +{
-+    [attribute] string Name;
-+    [attribute] double Height;
-+    [attribute] double Width;
-+    [attribute] double Left;
-+    [attribute] double Top;
-+    [attribute] boolean Visible;
-+    [attribute, readonly] long ZOrderPosition;
-+    [attribute, readonly] long Type;
-+    [attribute] double Rotation;
-+    [attribute, readonly] XLineFormat Line;
-+    [attribute, readonly] XFillFormat Fill;
-+    [attribute, readonly] XPictureFormat PictureFormat;
++	interface ::ooo::vba::XHelperInterface;
 +
-+    /*
-+    using in word
-+    [attribute] RelativeHorizontalPosition
-+    [attribute] RelativeVerticalPosition
-+    [attribute] XWrapFormat WrapFormat;
-+    */
-+    ooo::vba::excel::XTextFrame TextFrame();
-+    void Delete();
-+    void ZOrder( [in] long ZOrderCmd );
-+    void IncrementRotation( [in] double Increment );
-+    void IncrementLeft( [in] double Increment );
-+    void IncrementTop( [in] double Increment );
-+    void Select( [in]  /*Optional*/ any Replace );
-+    void ScaleHeight( [in] double Factor, [in] boolean RelativeToOriginalSize, [in] long Scale );
-+    void ScaleWidth( [in] double Factor, [in] boolean RelativeToOriginalSize, [in] long Scale );
-+    any ShapeRange( [in] any index );  // only here for convience
++	[attribute] any Color;
++	[attribute] any ColorIndex;
++	[attribute] any LineStyle;
++	[attribute] any Weight;
 +};
++
++//=============================================================================
++
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/msforms/XShapeRange.idl oovbaapi/ooo/vba/msforms/XShapeRange.idl
-new file mode 100644
-index 0000000..1b39485
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XShapeRange.idl
-@@ -0,0 +1,58 @@
++
++
+Index: oovbaapi/ooo/vba/excel/XOutline.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XOutline.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/excel/XOutline.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,64 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -7223,8 +7115,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XShapeRange.idl,v $
-+ * $Revision: 1.3 $
++ * $RCSfile: XOutline.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -7244,105 +7136,115 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XShapeRange_idl__
-+#define __ooo_vba_msforms_XShapeRange_idl__
++#ifndef __ooo_vba_excel_XOutline_idl__
++#define __ooo_vba_excel_XOutline_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +
-+#ifndef __ooo_vba_msforms_XShape_idl__
-+#include <ooo/vba/msforms/XShape.idl>
-+#endif
++//=============================================================================
 +
-+#ifndef  __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
++module ooo {  module vba {  module excel { 
 +
-+module ooo {  module vba { module msforms {
++//=============================================================================
 +
-+interface XShapeRange 
++
++interface XOutline
 +{
-+    interface ooo::vba::XCollection;
-+    void Select();
-+    XShape Group();
-+    void IncrementRotation( [in] double Increment );
-+    void IncrementLeft( [in] double Increment );
-+    void IncrementTop( [in] double Increment );
++
++	interface ::ooo::vba::XHelperInterface;
++
++	//Methods	
++	void ShowLevels([in] any RowLevels,[in] any ColumnLevels);
++
 +};
++
++//=============================================================================
++
 +}; }; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/msforms/XShapes.idl oovbaapi/ooo/vba/msforms/XShapes.idl
-new file mode 100644
-index 0000000..3ba31ab
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XShapes.idl
-@@ -0,0 +1,58 @@
++
++
+Index: oovbaapi/ooo/vba/XCommandBar.idl
+===================================================================
+--- oovbaapi/ooo/vba/XCommandBar.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XCommandBar.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,64 @@
 +/*************************************************************************
 + *
-+ * 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
 + *
-+ * OpenOffice.org - a multi-platform office productivity suite
++ *  $RCSfile$
 + *
-+ * $RCSfile: XShapes.idl,v $
-+ * $Revision: 1.3 $
++ *  $Revision$
 + *
-+ * This file is part of OpenOffice.org.
++ *  last change: $Author$ $Date$
 + *
-+ * 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.
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
 + *
-+ * 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.
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XShapes_idl__
-+#define __ooo_vba_msforms_XShapes_idl__
++#ifndef __ooo_vba_XCommandBar_idl__
++#define __ooo_vba_XCommandBar_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
 +#ifndef __ooo_vba_XHelperInterface_idl__
 +#include <ooo/vba/XHelperInterface.idl>
 +#endif
-+#ifndef  __ooo_vba_XCollection_idl__
-+#include <ooo/vba/XCollection.idl>
-+#endif
-+module ooo {  module vba { module msforms {
++//=============================================================================
 +
-+interface XShapeRange;
-+interface XShape;
++module ooo {  module vba { 
++//=============================================================================
++interface XCommandBarControls;
 +
-+interface XShapes 
++interface XCommandBar
 +{
-+    interface ooo::vba::XCollection;
-+    void SelectAll();
-+    XShapeRange Range( [in] any shapes );
-+    /*
-+    helper::calc
-+    */
-+    any AddLine( [in] long StartX, [in] long StartY, [in] long endX, [in] long endY );
-+    any AddShape([in] long ShapeType, [in] long StartX, [in] long StartY, [in] long endX, [in] long endY );
++	interface XHelperInterface;
++
++    [attribute] string Name;
++    [attribute] boolean Visible;
++    
++    void Delete() raises ( com::sun::star::script::BasicErrorException );
++    any Controls( [in] any Index ) raises ( com::sun::star::script::BasicErrorException );
 +};
-+}; }; };
 +
++}; };
 +
 +#endif
-diff --git oovbaapi/ooo/vba/msforms/XSpinButton.idl oovbaapi/ooo/vba/msforms/XSpinButton.idl
-new file mode 100644
-index 0000000..2ebd013
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XSpinButton.idl
-@@ -0,0 +1,59 @@
+Index: oovbaapi/ooo/vba/XCommandBarControl.idl
+===================================================================
+--- oovbaapi/ooo/vba/XCommandBarControl.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XCommandBarControl.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,64 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -7377,37 +7279,41 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XSpinButton_idl__
-+#define __ooo_vba_msforms_XSpinButton_idl__
++#ifndef __ooo_vba_XCommandBarControl_idl__
++#define __ooo_vba_XCommandBarControl_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+//=============================================================================
-+
-+module ooo {  module vba {  module msforms { 
 +
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +//=============================================================================
-+interface XSpinButton: com::sun::star::uno::XInterface 
-+{
-+	[attribute] long Max;
-+	[attribute] long Min;
-+	[attribute] any Value;
-+};
 +
++module ooo {  module vba { 
 +//=============================================================================
 +
-+}; }; };
++interface XCommandBarControl
++{
++	interface XHelperInterface;
 +
-+#endif
++    [attribute] string Caption;
++    [attribute] string OnAction;
++    [attribute] boolean Visible;
++    
++    void Delete() raises ( com::sun::star::script::BasicErrorException );
++    any Controls( [in] any Index ) raises ( com::sun::star::script::BasicErrorException );
++};
 +
++}; };
 +
-diff --git oovbaapi/ooo/vba/msforms/XTextBox.idl oovbaapi/ooo/vba/msforms/XTextBox.idl
-new file mode 100644
-index 0000000..2b966da
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XTextBox.idl
-@@ -0,0 +1,55 @@
++#endif
+Index: oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl
+===================================================================
+--- oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,49 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -7416,7 +7322,7 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile: XTextBox.idl,v $
++ * $RCSfile: XVBAToOOEventDescGen.idl,v $
 + * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
@@ -7437,38 +7343,31 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XTextBox_idl__
-+#define __ooo_vba_msforms_XTextBox_idl__
++#ifndef __ooo_vba_XVBAToOOEventDescGen_idl__
++#define __ooo_vba_XVBAToOOEventDescGen_idl__
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+//=============================================================================
++#ifndef __com_sun_star_script_ScriptEventDescriptor_idl__
++#include <com/sun/star/script/ScriptEventDescriptor.idl>
++#endif 
 +
-+module ooo {  module vba {  module msforms { 
++#ifndef __com_sun_star_script_XScriptEventsSupplier_idl__
++#include <com/sun/star/script/XScriptEventsSupplier.idl>
++#endif 
 +
-+//=============================================================================
-+interface XTextBox: com::sun::star::uno::XInterface 
++module ooo {  module vba { 
++interface XVBAToOOEventDescGen : com::sun::star::uno::XInterface
 +{
-+	[attribute] string  Text;
-+    [attribute] any    Value;
-+    [attribute] long    MaxLength;
-+    [attribute] boolean Multiline;
++	sequence< com::sun::star::script::ScriptEventDescriptor >  getEventDescriptions( [in] com::sun::star::uno::XInterface xControl, [in] string sLibModName, [in] sequence< string > handlerExts );
++	com::sun::star::script::XScriptEventsSupplier getEventSupplier( [in] com::sun::star::uno::XInterface xControl );
 +};
 +
-+//=============================================================================
-+
-+}; }; };
-+
++}; };
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/msforms/XTextBoxShape.idl oovbaapi/ooo/vba/msforms/XTextBoxShape.idl
-new file mode 100644
-index 0000000..cd49f0a
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XTextBoxShape.idl
-@@ -0,0 +1,61 @@
+Index: oovbaapi/ooo/vba/XAssistant.idl
+===================================================================
+--- oovbaapi/ooo/vba/XAssistant.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XAssistant.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,65 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -7503,169 +7402,102 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __ooo_vba_msforms_XTextBoxShape_idl__
-+#define __ooo_vba_msforms_XTextBoxShape_idl__
++#ifndef __ooo_vba_XAssistant_idl__
++#define __ooo_vba_XAssistant_idl__
 +
 +#ifndef __com_sun_star_uno_XInterface_idl__
 +#include <com/sun/star/uno/XInterface.idl>
 +#endif
-+#ifndef __ooo_vba_excel_XCharacters_idl
-+#include <ooo/vba/excel/XCharacters.idl>
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#endif
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
-+
++module ooo {  module vba { 
 +//=============================================================================
-+interface XTextBoxShape: com::sun::star::uno::XInterface 
++
++interface XAssistant
 +{
-+	[attribute] string  Text;
-+	::ooo::vba::excel::XCharacters characters([in] any Start, [in] any Length);
-+};
++	interface ::ooo::vba::XHelperInterface;
 +
-+//=============================================================================
++    [attribute] boolean On;
++    [attribute] boolean Visible;
++    [attribute] long Top;
++    [attribute] long Left;
++    [attribute] long Animation;
++    
++    string Name() raises ( com::sun::star::script::BasicErrorException );
++};
 +
-+}; }; };
++}; };
 +
 +#endif
-+
-+
-diff --git oovbaapi/ooo/vba/msforms/XToggleButton.idl oovbaapi/ooo/vba/msforms/XToggleButton.idl
-new file mode 100644
-index 0000000..bd47941
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XToggleButton.idl
-@@ -0,0 +1,60 @@
+Index: oovbaapi/ooo/vba/XPropValue.idl
+===================================================================
+--- oovbaapi/ooo/vba/XPropValue.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XPropValue.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,55 @@
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile: XPropValue.idl,v $
++ * $Revision: 1.3 $
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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 __ooo_vba_msforms_XToggleButton_idl__
-+#define __ooo_vba_msforms_XToggleButton_idl__
++#ifndef __ooo_vba_XPropValue_idl__
++#define __ooo_vba_XPropValue_idl__
 +
-+#ifndef __ooo_vba_msforms_XButton_idl__
-+#include <ooo/vba/msforms/XButton.idl>
-+#endif
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
++#ifndef __com_sun_star_script_XDefaultProperty_idl__
++#include <com/sun/star/script/XDefaultProperty.idl>
 +#endif
++
++
 +//=============================================================================
 +
-+module ooo {  module vba {  module msforms { 
++module ooo {  module vba { 
++
++
 +//=============================================================================
-+interface XToggleButton
++interface XPropValue: com::sun::star::script::XDefaultProperty
 +{
-+	interface XButton;
-+	[attribute] any Value; 
++	[attribute] any Value;
 +};
 +
 +//=============================================================================
 +
-+}; }; };
++}; };
 +
 +#endif
 +
 +
-diff --git oovbaapi/ooo/vba/msforms/XUserForm.idl oovbaapi/ooo/vba/msforms/XUserForm.idl
-new file mode 100644
-index 0000000..d199edc
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/XUserForm.idl
-@@ -0,0 +1,58 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef __ooo_vba_msforms_XUserForm_idl__
-+#define __ooo_vba_msforms_XUserForm_idl__
-+
-+#ifndef __ooo_vba_XHelperInterface_idl__
-+#include <ooo/vba/XHelperInterface.idl>
-+#endif
-+#ifndef __com_sun_star_script_XInvocation_idl__
-+#include <com/sun/star/script/XInvocation.idl>
-+#endif
-+module ooo {  module vba { module msforms {
-+interface XUserForm 
-+{
-+	//interface ::ooo::vba::XHelperInterface;
-+	interface ::com::sun::star::script::XInvocation;
-+    [attribute] string Caption;
-+    void Show();
-+    void Hide();
-+    void RePaint();
-+    void UnloadObject();
-+    any Controls( [in] any index );
-+};
-+}; }; };
-+
-+#endif
-diff --git oovbaapi/ooo/vba/msforms/makefile.mk oovbaapi/ooo/vba/msforms/makefile.mk
-new file mode 100644
-index 0000000..24f39f3
---- /dev/null
-+++ oovbaapi/ooo/vba/msforms/makefile.mk
-@@ -0,0 +1,77 @@
+Index: oovbaapi/ooo/vba/constants/makefile.mk
+===================================================================
+--- oovbaapi/ooo/vba/constants/makefile.mk	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/constants/makefile.mk	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,69 @@
 +#*************************************************************************
 +#
 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -7676,7 +7508,7 @@
 +#
 +# $RCSfile: makefile.mk,v $
 +#
-+# $Revision: 1.4 $
++# $Revision: 1.5 $
 +#
 +# This file is part of OpenOffice.org.
 +#
@@ -7700,8 +7532,8 @@
 +
 +PRJNAME=oovbapi
 +
-+TARGET=msforms
-+PACKAGE=ooo$/vba$/msforms
++TARGET=constants
++PACKAGE=org$/vba$/constants
 +
 +# --- Settings -----------------------------------------------------
 +.INCLUDE :  $(PRJ)$/util$/makefile.pmk
@@ -7709,126 +7541,152 @@
 +.IF "$(ENABLE_VBA)"!="YES"
 +dummy:
 +        @echo "not building vba..."
-+.ENDIF
++.ELSE
 +
 +# ------------------------------------------------------------------------
 +
-+IDLFILES=\
-+	MSFormReturnTypes.idl \
-+	XComboBox.idl \
-+	XButton.idl \
-+	XControl.idl \
-+	XLabel.idl \
-+	XTextBox.idl \
-+	XRadioButton.idl \
-+	XShape.idl \
-+	XShapes.idl \
-+	XLineFormat.idl \
-+	XColorFormat.idl \
-+	XFillFormat.idl \
-+	XPictureFormat.idl \
-+	XShapeRange.idl \
-+	XTextBoxShape.idl \
-+	XUserForm.idl \
-+	XListBox.idl \
-+	XToggleButton.idl \
-+	XScrollBar.idl \
-+	XProgressBar.idl \
-+	XMultiPage.idl \
-+	XPages.idl \
-+	XSpinButton.idl \
-+	XImage.idl \
-+	XControls.idl \
++# I tried to use the IDLFILES target but it failed dismally
++MY_GEN_IDL_PATH=$(MISC)$/idl
++MY_GEN_UCR_PATH=$(OUT)$/ucr$/$(PACKAGE)
++MYTMPIDLFILES=$(shell @ls $(MY_GEN_IDL_PATH))
++#IDLFILES=$(foreach,i,$(MYTMPIDLFILES) $(MY_GEN_IDL_PATH)$/$(i))
++MYIDLFILES=$(foreach,i,$(MYTMPIDLFILES) $(MY_GEN_IDL_PATH)$/$(i))
++MYURDFILES=$(foreach,i,$(MYIDLFILES) $(MY_GEN_UCR_PATH)$/$(i:b).urd)
++MYDBTARGET=$(OUT)$/ucr/constants.db
 +
-+# ------------------------------------------------------------------
 +
 +.INCLUDE :  target.mk
-diff --git oovbaapi/prj/build.lst oovbaapi/prj/build.lst
-index afc8869..04060dd 100644
---- oovbaapi/prj/build.lst
-+++ oovbaapi/prj/build.lst
-@@ -1,8 +1,8 @@
- ovba	oovbaapi	:	offapi solenv NULL
- ovba	oovbaapi									usr1	-	all	ovba_mkout NULL
- ovba	oovbaapi\genconstidl         nmake	-	all	ovba_genconstidl NULL
--ovba	oovbaapi\org\openoffice\constants         nmake	-	all	ovba_constants  ovba_genconstidl NULL
--ovba	oovbaapi\org\openoffice\vba         nmake	-	all	ovba_vba NULL
--ovba	oovbaapi\org\openoffice\excel         nmake	-	all	ovba_excel NULL
--ovba	oovbaapi\org\openoffice\msforms         nmake	-	all	ovba_msforms NULL
-+ovba	oovbaapi\ooo\vba\constants          nmake	-	all	ovba_constants  ovba_genconstidl NULL
-+ovba	oovbaapi\ooo\vba                    nmake	-	all	ovba_vba NULL
-+ovba	oovbaapi\ooo\vba\excel              nmake	-	all	ovba_excel NULL
-+ovba	oovbaapi\ooo\vba\msforms            nmake	-	all	ovba_msforms NULL
- ovba   oovbaapi\util                             nmake   -   all ovba_util ovba_vba ovba_excel ovba_msforms ovba_constants ovba_genconstidl NULL
-diff --git sc/inc/cellsuno.hxx sc/inc/cellsuno.hxx
-index 08d0a3a..376e758 100644
---- sc/inc/cellsuno.hxx
-+++ sc/inc/cellsuno.hxx
-@@ -149,6 +149,13 @@ public:
- 						const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner );
- };
- 
-+namespace ooo
-+{
-+    namespace vba {
-+	class ScVbaCellRangeAccess;  // Vba Helper class 
-+    }
-+}
 +
- class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet,
- 						 public com::sun::star::beans::XMultiPropertySet,
- 						 public com::sun::star::beans::XPropertyState,
-@@ -168,8 +175,7 @@ class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet
- {
- 	friend class ScTabViewObj;		// fuer select()
- 	friend class ScTableSheetObj;	// fuer createCursorByRange()
--	friend class NumFormatHelper;	// VBA helper Class that helps manipulate format data
--	friend class ScVbaRange;	//Main VBA helper class for Range
-+ 	friend class ooo::vba::ScVbaCellRangeAccess;
- 
- private:
- 	SfxItemPropertySet		aPropSet;
-diff --git sc/inc/compiler.hxx sc/inc/compiler.hxx
-index ff01a9e..effdf35 100644
---- sc/inc/compiler.hxx
-+++ sc/inc/compiler.hxx
-@@ -354,6 +354,9 @@ public:
-     static BOOL EnQuote( String& rStr );
-     
- 
-+    // Check if it is a valid english function name
-+    static bool IsEnglishSymbol( const String& rName ); 
++ALLTAR: $(MYDBTARGET)
 +
-     //! _either_ CompileForFAP _or_ AutoCorrection, _not_ both
-     void            SetCompileForFAP( BOOL bVal )
-                         { bCompileForFAP = bVal; bIgnoreErrors = bVal; }
-diff --git sc/inc/olinetab.hxx sc/inc/olinetab.hxx
-index 592bec1..16d4d1f 100644
---- sc/inc/olinetab.hxx
-+++ sc/inc/olinetab.hxx
-@@ -111,7 +111,7 @@ public:
- 
-     ScOutlineEntry*         GetEntry( USHORT nLevel, USHORT nIndex ) const;
-     USHORT                  GetCount( USHORT nLevel ) const;
--    ScOutlineEntry*         GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) const;
-+    SC_DLLPUBLIC ScOutlineEntry*         GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) const;
- 
-     BOOL                    GetEntryIndex( USHORT nLevel, SCCOLROW nPos, USHORT& rnIndex ) const;
-     BOOL                    GetEntryIndexInRange(
-diff --git sc/source/core/tool/compiler.cxx sc/source/core/tool/compiler.cxx
-index 5dedad5..a72e1b8 100644
---- sc/source/core/tool/compiler.cxx
-+++ sc/source/core/tool/compiler.cxx
-@@ -366,6 +366,33 @@ void ScCompiler::DeInit()
++$(MY_GEN_UCR_PATH)$/%.urd: $(MY_GEN_IDL_PATH)$/%.idl
++    $(IDLC) -C -O $(MY_GEN_UCR_PATH) -I $(MY_GEN_IDL_PATH) -I $(SOLARIDLDIR) $?
++
++$(MYDBTARGET) : $(MYURDFILES)  $(MYIDLFILES)
++    $(REGMERGE) $(OUT)$/ucr/constants.db /UCR @$(mktmp $(MYURDFILES))
++
++.ENDIF
++
+Index: oovbaapi/ooo/vba/XErrObject.idl
+===================================================================
+--- oovbaapi/ooo/vba/XErrObject.idl	(.../tags/DEV300_m39)	(revision 0)
++++ oovbaapi/ooo/vba/XErrObject.idl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,58 @@
++/*************************************************************************
++ *
++ * 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: XErrObject.idl,v $
++ * $Revision: 1.4 $
++ *
++ * 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 __ooo_vba__XErrObject_idl__
++#define __ooo_vba__XErrObject_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++
++module ooo {  module vba  {
++//==============================================================================
++/** 
++*/
++interface XErrObject : ::com::sun::star::uno::XInterface
++{
++  //-----------------------------------------------------------------------
++  /**
++  */
++  [attribute] long Number;
++  [attribute] long HelpContext;
++  [attribute] string HelpFile;
++  [attribute] string Description;
++  [attribute] string Source;
++  void Clear();
++  void Raise([in] any Number, [in] any Source, [in] any Description, [in] any HelpFile, [in] any HelpContext);
++
++};
++
++}; };
++#endif
+Index: scripting/source/dlgprov/dlgevtatt.cxx
+===================================================================
+--- scripting/source/dlgprov/dlgevtatt.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ scripting/source/dlgprov/dlgevtatt.cxx	(.../cws/npower11)	(revision 266650)
+@@ -54,7 +54,7 @@
+ #include <com/sun/star/beans/MethodConcept.hpp>
+ #include <com/sun/star/beans/XMaterialHolder.hpp>
+ #ifdef FAKE_VBA_EVENT_SUPPORT
+-#include <org/openoffice/vba/XVBAToOOEventDescGen.hpp>
++#include <ooo/vba/XVBAToOOEventDescGen.hpp>
+ #endif
+ 
+ using namespace ::com::sun::star;
+@@ -125,7 +125,7 @@
+         {
+             Sequence< Any > args(1);
+             args[0] <<= xModel;
+-            mxListener = Reference< XScriptListener >( xSMgr->createInstanceWithArgumentsAndContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.EventListener" ) ), args, m_xContext ), UNO_QUERY );
++            mxListener = Reference< XScriptListener >( xSMgr->createInstanceWithArgumentsAndContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.EventListener" ) ), args, m_xContext ), UNO_QUERY );
+         }
+         if ( rxControl.is() )
+         {
+@@ -199,7 +199,7 @@
+         Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
+         if ( xSMgr.is() )
+         {
+-            Reference< org::openoffice::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.VBAToOOEventDesc" ) ), m_xContext ), UNO_QUERY );
++            Reference< ooo::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAToOOEventDesc" ) ), m_xContext ), UNO_QUERY );
+             if ( xVBAToOOEvtDesc.is() )
+                 xEventsSupplier.set( xVBAToOOEvtDesc->getEventSupplier( xControl ), UNO_QUERY );
+             
+Index: sc/source/filter/excel/excimp8.cxx
+===================================================================
+--- sc/source/filter/excel/excimp8.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/filter/excel/excimp8.cxx	(.../cws/npower11)	(revision 266650)
+@@ -254,7 +254,7 @@
+ 	uno::Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY);
+ 		// test if vba service is present
+ 	uno::Reference< uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY );
+-	uno::Reference< uno::XInterface > xGlobals( xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/org.openoffice.vba.theGlobals") ), uno::UNO_QUERY );
++	uno::Reference< uno::XInterface > xGlobals( xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/ooo.vba.theGlobals") ), uno::UNO_QUERY );
+ 
+ 	return xGlobals.is();
+ }
+Index: sc/source/core/tool/compiler.cxx
+===================================================================
+--- sc/source/core/tool/compiler.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/core/tool/compiler.cxx	(.../cws/npower11)	(revision 266650)
+@@ -366,7 +366,33 @@
      }
  }
  
-+// static
 +bool ScCompiler::IsEnglishSymbol( const String& rName )
 +{
 +    // function names are always case-insensitive
 +    String aUpper( ScGlobal::pCharClass->upper( rName ) );
-+
+ 
 +    // 1. built-in function name
 +    OpCode eOp = ScCompiler::GetEnglishOpCode( aUpper );
 +    if ( eOp != ocNone )
@@ -7850,5611 +7708,838 @@
 +    }
 +    return false;		// no valid function name
 +}
- 
++
  // static
  void ScCompiler::InitCharClassEnglish()
-diff --git sc/source/filter/excel/excimp8.cxx sc/source/filter/excel/excimp8.cxx
-index 57dd8ec..d0d132c 100644
---- sc/source/filter/excel/excimp8.cxx
-+++ sc/source/filter/excel/excimp8.cxx
-@@ -254,7 +254,7 @@ bool lcl_hasVBAEnabled()
- 	uno::Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY);
- 		// test if vba service is present
- 	uno::Reference< uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY );
--	uno::Reference< uno::XInterface > xGlobals( xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/org.openoffice.vba.theGlobals") ), uno::UNO_QUERY );
-+	uno::Reference< uno::XInterface > xGlobals( xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/ooo.vba.theGlobals") ), uno::UNO_QUERY );
- 
- 	return xGlobals.is();
- }
-diff --git sc/source/ui/vba/helperdecl.hxx sc/source/ui/vba/helperdecl.hxx
-index 3c1457a..1581e66 100644
---- sc/source/ui/vba/helperdecl.hxx
-+++ sc/source/ui/vba/helperdecl.hxx
-@@ -28,7 +28,7 @@
-  *
-  ************************************************************************/
- #include <comphelper/servicedecl.hxx>
--#include <org/openoffice/vba/XHelperInterface.hpp>
-+#include <ooo/vba/XHelperInterface.hpp>
+ {
+Index: sc/source/ui/vba/vbapivotcache.cxx
+===================================================================
+--- sc/source/ui/vba/vbapivotcache.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapivotcache.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,9 +31,9 @@
  
- namespace comphelper {
- namespace service_decl {
-@@ -86,7 +86,7 @@ struct OwnCreateFunc<ImplT, with_args<false> > {
-                 css::uno::Reference<css::uno::XComponentContext>
-                 const& xContext ) const
-     {
--        return css::uno::Reference< org::openoffice::vba::XHelperInterface >(new OwnServiceImpl<ImplT>( rServiceDecl, xContext ));
-+        return css::uno::Reference< ooo::vba::XHelperInterface >(new OwnServiceImpl<ImplT>( rServiceDecl, xContext ));
-     }
- };
  
-@@ -101,7 +101,7 @@ struct OwnCreateFunc<ImplT, with_args<true> > {
-                 css::uno::Reference<css::uno::XComponentContext>
-                 const& xContext ) const
-     {
--        css::uno::Reference< org::openoffice::vba::XHelperInterface > xHelp(
-+        css::uno::Reference< ooo::vba::XHelperInterface > xHelp(
-             new OwnServiceImpl<ImplT>( rServiceDecl, args, xContext ) );
- 	css::uno::Reference< css::uno::XInterface > xIf( xHelp, css::uno::UNO_QUERY ) ;
- 	return xIf;
-diff --git sc/source/ui/vba/makefile.mk sc/source/ui/vba/makefile.mk
-index 66593e9..eeb6e1a 100644
---- sc/source/ui/vba/makefile.mk
-+++ sc/source/ui/vba/makefile.mk
-@@ -84,13 +84,16 @@ SLOFILES= \
- 		$(SLO)$/vbacombobox.obj \
- 		$(SLO)$/vbavalidation.obj \
-                 $(SLO)$/vbacontrol.obj \
-+                $(SLO)$/vbacontrols.obj \
-                 $(SLO)$/vbaoleobject.obj \
-                 $(SLO)$/vbaoleobjects.obj \
-                 $(SLO)$/vbabutton.obj \
-                 $(SLO)$/vbalabel.obj \
-                 $(SLO)$/vbatextbox.obj \
-+                $(SLO)$/vbatextboxshape.obj \
-                 $(SLO)$/vbaradiobutton.obj \
-                 $(SLO)$/vbalistbox.obj \
-+		$(SLO)$/vbalistcontrolhelper.obj \
-                 $(SLO)$/vbapropvalue.obj \
-                 $(SLO)$/vbapane.obj \
-                 $(SLO)$/vbashape.obj \
-@@ -112,9 +115,27 @@ SLOFILES= \
-                 $(SLO)$/vbaformatconditions.obj \
-                 $(SLO)$/vbastyle.obj \
-                 $(SLO)$/vbastyles.obj \
--		$(SLO)$/service.obj \
-+                $(SLO)$/vbaassistant.obj \
-+                $(SLO)$/vbauserform.obj \
-+                $(SLO)$/vbacheckbox.obj \
-+                $(SLO)$/vbatogglebutton.obj \
-+                $(SLO)$/vbaframe.obj \
-+                $(SLO)$/vbascrollbar.obj \
-+                $(SLO)$/vbaprogressbar.obj \
-+				$(SLO)$/vbamultipage.obj \
-+				$(SLO)$/vbapages.obj \
-+                $(SLO)$/vbacommandbarcontrol.obj \
-+                $(SLO)$/vbacommandbarcontrols.obj \
-+                $(SLO)$/vbacommandbar.obj \
-+                $(SLO)$/vbacommandbars.obj \
-+		        $(SLO)$/vbahyperlink.obj \
-+        		$(SLO)$/vbapagesetup.obj \
-+		        $(SLO)$/vbapagebreak.obj \
-+        		$(SLO)$/vbapagebreaks.obj \
-+		        $(SLO)$/vbaspinbutton.obj \
-+		        $(SLO)$/vbaimage.obj \
-+				$(SLO)$/service.obj
-  
--
- # --- Targets ------------------------------------------------------
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
  
- .INCLUDE :	target.mk
-diff --git sc/source/ui/vba/service.cxx sc/source/ui/vba/service.cxx
-index bbb0857..4c661de 100644
---- sc/source/ui/vba/service.cxx
-+++ sc/source/ui/vba/service.cxx
-@@ -53,12 +53,22 @@ namespace  worksheet
+-ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,  const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotCacheImpl_BASE( xParent, xContext ), m_xTable( xTable )
++ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,  const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotCacheImpl_BASE( xParent, xContext ), m_xTable( xTable )
  {
- extern sdecl::ServiceDecl const serviceDecl;
  }
-+namespace window 
-+{
-+extern sdecl::ServiceDecl const serviceDecl;
-+}
- namespace globals
- {
- extern sdecl::ServiceDecl const serviceDecl;
+ 
+@@ -56,7 +56,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PivotCache" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotCache" ) );
+ 	}
+ 	return aServiceNames;
  }
--
--
-+namespace  userform
-+{
-+extern sdecl::ServiceDecl const serviceDecl;
-+}
-+namespace hyperlink 
-+{
-+extern sdecl::ServiceDecl const serviceDecl;
-+}
+Index: sc/source/ui/vba/vbaname.hxx
+===================================================================
+--- sc/source/ui/vba/vbaname.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaname.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,13 +30,13 @@
+ #ifndef SC_VBA_NAME_HXX
+ #define SC_VBA_NAME_HXX
  
- extern "C"
- {
-@@ -76,7 +86,7 @@ extern "C"
+-#include <org/openoffice/excel/XName.hpp>
++#include <ooo/vba/excel/XName.hpp>
+ #include <com/sun/star/sheet/XNamedRange.hpp>
+ #include <com/sun/star/sheet/XNamedRanges.hpp>
  
- 	// Component registration
-         if ( component_writeInfoHelper( pServiceManager, pRegistryKey, 
--		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl ) )
-+		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl ) )
- 		{
- 			// Singleton registration
- 			try
-@@ -85,9 +95,9 @@ extern "C"
- 					reinterpret_cast< registry::XRegistryKey * >(pRegistryKey);
+ #include "vbahelperinterface.hxx"
  
- 				Reference< registry::XRegistryKey >xKey = pKey->createKey(
--					rtl::OUString::createFromAscii( ("org.openoffice.vba.Globals/UNO/SINGLETONS/org.openoffice.vba.theGlobals") ) );
-+					rtl::OUString::createFromAscii( ("ooo.vba.Globals/UNO/SINGLETONS/ooo.vba.theGlobals") ) );
- 				xKey->setStringValue( ::rtl::OUString::createFromAscii( 
--					("org.openoffice.vba.Globals") ) );
-+					("ooo.vba.Globals") ) );
- 				return sal_True;
- 			}
- 			catch( uno::Exception& /*e*/ )
-@@ -104,7 +114,7 @@ extern "C"
-     {
- 		OSL_TRACE("In component_getFactory for %s", pImplName );
- 	void* pRet =  component_getFactoryHelper(
--        	pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl );
-+        	pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl );
- 	OSL_TRACE("Ret is 0x%x", pRet);
- 	return pRet;
-     }
-diff --git sc/source/ui/vba/testvba/README sc/source/ui/vba/testvba/README
-index 6668f04..3a91946 100644
---- sc/source/ui/vba/testvba/README
-+++ sc/source/ui/vba/testvba/README
-@@ -1,35 +1,37 @@
--running dmake in this directory runs a set of regression (unit) tests.
-+to run the tests 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XName > NameImpl_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XName > NameImpl_BASE;
  
--Note: 
--    o you need to set OFFICEPATH env variable to the install directory of your office installation e.g.
-+build
-+=====
-+    dmake
-     
--export OFFICEPATH="/cygdrive/f/Program\ Files/OpenOffice.org\ 2.3"
-+windows
-+=======
-+   a) you can download a cygwin bash shell environment and install perl ( http://cygwin.com/setup.exe ) 
-+      from the cmdline './runTests.pl $(OFFICE_PROGRAM_PATH)' should run the testclient and compare the logs
-+   b) use ordinary windows perl [1], but additionally you will need the 'diff' program for window ( download from http://gnuwin32.sourceforge.net/packages/diffutils.htm )
+ class ScVbaName : public NameImpl_BASE 
+ {
+@@ -48,10 +48,10 @@
  
--    o naturally in order to run the tests you need to source the build env scripts in the top level build directory [1]
-+[1] for the testclient the perl ( all inclusive ) bundle from ActivePerl is mor e than adeqate ( download from http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.8.822-MSWin32-x86-280952.msi )
+ protected:
+ 	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
+-	virtual css::uno::Reference< oo::excel::XWorksheet > getWorkSheet() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XWorksheet > getWorkSheet() throw (css::uno::RuntimeException);
  
--    o the testclient runs looks for testdocuments in the '../TestDocuments' [3] directory. For each document the test client runs the  macro 'Standard.TestMacros.Main' located in that test document. The macro(s) write a log file, the log files end up in the Logs sub-directory ( in this directory ). A logfile exists for each testdocument that has successfully run. The log files are compared against benchmark logfiles to ensure no regressions have occured ( see [4] for directory structure and location of benchmark files ). At this point we are not concerned with known failures [5]
-+   to run all test cases type
-+   'perl ./runTests.pl $(OFFICE_PROGRAM_PATH)'
-+   to run a test case type
-+   'perl ./runTests.pl $(OFFICE_PROGRAM_PATH) testfilename'
+ public:
+-	ScVbaName( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
++	ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
+ 	virtual ~ScVbaName();
  
-+unix
-+====
+ 	// Attributes
+@@ -71,8 +71,8 @@
+ 	virtual void SAL_CALL setRefersToR1C1( const ::rtl::OUString &rRefersTo ) throw (css::uno::RuntimeException);
+ 	virtual ::rtl::OUString SAL_CALL getRefersToR1C1Local() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setRefersToR1C1Local( const ::rtl::OUString &rRefersTo ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getRefersToRange() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL setRefersToRange( const css::uno::Reference< oo::excel::XRange > xRange ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getRefersToRange() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setRefersToRange( const css::uno::Reference< ov::excel::XRange > xRange ) throw (css::uno::RuntimeException);
  
--[1] Ideally this should not be necessary and you should be able to run the tests without a build env - future
-+assuming perl is installed
-+      './runTests.pl $(OFFICE_PROGRAM_PATH)'
-+    or './runTests.pl $(OFFICE_PROGRAM_PATH) testfilename' for one file test.
+ 	// Methods
+ 	virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbaworkbooks.hxx
+===================================================================
+--- sc/source/ui/vba/vbaworkbooks.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaworkbooks.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,26 +32,26 @@
  
--[2] The test client should be re-written in C++ to get a better handle on lifecycle issues. E.g. currently on windows and sometimes on linux the client won't exit, also the office process doesn't alway exit
-    
--[3]
-+Note: For either windows or unix all of the tests should pass ( and you should get a result like )
-+Note Also: If you meat a problem that stop running test after serveral test documents have been run. please clean your .ooo-2.0 or .oooxxx first, and then re-run.
  
--The TestDocument directory contains 
--   o test documents ( *.xls )
--   o logs directory ( contains the benchmark logs to compare against )
-+========>
+ #include "vbacollectionimpl.hxx"
+-#include <org/openoffice/vba/XGlobals.hpp>
+-#include <org/openoffice/excel/XWorkbooks.hpp>
++#include <ooo/vba/XGlobals.hpp>
++#include <ooo/vba/excel/XWorkbooks.hpp>
+ #include <com/sun/star/container/XEnumerationAccess.hpp>
+ #include "vbahelper.hxx"
  
--[4]
-+skipped 0 test-cases(s)
-+compared 9 test-case documents
-+                 9 tests passedTests
  
--The logs directory contains the following sub-directories
--   o excel ( the orig logs produced by an excel file )
--   o unix  ( the log produced by OpenOffice running imported Excel document under unix )
--   o win   ( the log produced by OpenOffice running imported Excel document under windows )
--
--[*] the seperate win & unix directories are to facilate tests that will produce different results under the different platforms e.g. paths etc.
--
--[5]
--
--o Currently the logs in the excel directory are only stored for comparison, they are not used by the tooling
--o Currently we don't measure how many tests pass or fail, the immediate focus is that we don't get any regressions ( but of course we do look at these manually and try and get all tests to pass )
-+Note also: the testclient will attempt to connect to an existing instance of open-office, when the testClient exits the soffice process may still be running, if you wish to repeat tests you may want to kill the office instance before re-running.
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
-new file mode 100644
-index 0000000..1fe0cbd
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
-@@ -0,0 +1,20 @@
-+Test run started : 17/07/2007 17:36:22
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+  ITEM Assertion OK : test1 'starts with' string criteria
-+  ITEM Assertion OK : test2 'not equal to' string criteria
-+  ITEM Assertion OK : test3 'ends with' string criteria
-+  ITEM Assertion OK : test4 field 'all' 
-+  ITEM Assertion OK : test5 numeric '<15' 
-+  ITEM Assertion OK : test6 numeric '>=15' 
-+  ITEM Assertion OK : test7 numeric '<=12' 
-+Test Results
-+============
+ class ScModelObj;
+ 
+-typedef CollTestImplHelper< oo::excel::XWorkbooks > ScVbaWorkbooks_BASE;
++typedef CollTestImplHelper< ov::excel::XWorkbooks > ScVbaWorkbooks_BASE;
+ 
+ class ScVbaWorkbooks : public ScVbaWorkbooks_BASE
+ {
+ private:
+-	css::uno::Reference< oo::vba::XGlobals > getGlobals() throw (css::uno::RuntimeException);
++	css::uno::Reference< ov::XGlobals > getGlobals() throw (css::uno::RuntimeException);
+ 	rtl::OUString 	getFileFilterType( const rtl::OUString& rString );
+ 	bool 	isTextFile( const rtl::OUString& rString );
+ 	bool 	isSpreadSheetFile( const rtl::OUString& rString );
+ 	static sal_Int16& getCurrentDelim(){ static sal_Int16 nDelim = 44; return nDelim; }
+ public:
+-	ScVbaWorkbooks( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
++	ScVbaWorkbooks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ 	virtual ~ScVbaWorkbooks() {}
+ 
+ 	// XEnumerationAccess
+Index: sc/source/ui/vba/vbacomments.hxx
+===================================================================
+--- sc/source/ui/vba/vbacomments.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacomments.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,18 +32,18 @@
+ 
+ #include <cppuhelper/implbase1.hxx>
+ 
+-#include <org/openoffice/excel/XComments.hpp>
++#include <ooo/vba/excel/XComments.hpp>
+ 
+ #include "vbahelper.hxx"
+ #include "vbacollectionimpl.hxx"
+ #include "vbacomment.hxx"
+ 
+-typedef CollTestImplHelper< oo::excel::XComments > ScVbaComments_BASE;
++typedef CollTestImplHelper< ov::excel::XComments > ScVbaComments_BASE;
+ 
+ class ScVbaComments : public ScVbaComments_BASE
+ {
+ public:
+-    ScVbaComments( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
++    ScVbaComments( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
+ 
+     virtual ~ScVbaComments() {}
+ 
+Index: sc/source/ui/vba/vbaframe.hxx
+===================================================================
+--- sc/source/ui/vba/vbaframe.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaframe.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,58 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_FRAME_HXX
++#define SC_VBA_FRAME_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/msforms/XLabel.hpp>
 +
-+Tests passed: 7
-+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 17/07/2007 17:36:23
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log
-new file mode 100644
-index 0000000..2604653
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log
-@@ -0,0 +1,45 @@
-+Test run started : 17/07/2007 15:01:37
-+----------------------------------------------------------------
-+MiscRangeTests
-+ TEST START : MiscRangeTests
-+  ITEM Assertion OK : test 1
-+  ITEM Assertion OK : test 2
-+  ITEM Assertion OK : test 3
-+  ITEM Assertion OK : test 4
-+  ITEM Assertion OK : test 5
-+  ITEM Assertion OK : test 6
-+  ITEM Assertion OK : test 7
-+  ITEM Assertion OK : test 8
-+  ITEM Assertion OK : test 9
-+  ITEM Assertion OK : test 10
-+  ITEM Assertion OK : test 11
-+  ITEM Assertion OK : test 12
-+  ITEM Assertion OK : test 13
-+  ITEM Assertion OK : test 14
-+  ITEM Assertion OK : test 15
-+  ITEM Assertion OK : test 16
-+  ITEM Assertion OK : test 17
-+  ITEM Assertion OK : test 18
-+  ITEM Assertion OK : test 19
-+  ITEM Assertion OK : test 20
-+  ITEM Assertion OK : test 21
-+  ITEM Assertion OK : test 22
-+  ITEM Assertion OK : test 23
-+  ITEM Assertion OK : test 24
-+  ITEM Assertion OK : test 25
-+  ITEM Assertion OK : test 26
-+  ITEM Assertion OK : test 27
-+  ITEM Assertion OK : test 28
-+  ITEM Assertion OK : test 29
-+  ITEM Assertion OK : test 30
-+  ITEM Assertion OK : test 31
-+No. tests: 31
-+Summary
-+=======
-+Run:       31
-+Passed:    31
-+Failed:    0
-+
-+END 'MiscRangeTests
-+ TEST OK : MiscRangeTests
-+Test run finished : 17/07/2007 15:01:39
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log
-new file mode 100644
-index 0000000..736d5bb
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log
-@@ -0,0 +1,68 @@
-+Test run started : 18/06/2007 17:50:04
-+----------------------------------------------------------------
-+ClearFormtsIssue
-+ TEST START : ClearFormtsIssue
-+  ITEM Assertion OK : Range.Font.Bold is: True
-+  ITEM Assertion OK : Range.Font.Bold is: False
-+END 'ClearFormtsIssue' Symbol
-+ TEST OK : ClearFormtsIssue
-+----------------------------------------------------------------
-+VerticalAlignment-Issue
-+ TEST START : VerticalAlignment-Issue
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : Range.VeritcalAlignment is Null
-+END 'VerticalAlignment-Issue' Symbol
-+ TEST OK : VerticalAlignment-Issue
-+----------------------------------------------------------------
-+HorizontalAlignment-Issue
-+ TEST START : HorizontalAlignment-Issue
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : Range.HorizontalAlignment is Null
-+END 'HorizontalAlignment-Issue' Symbol
-+ TEST OK : HorizontalAlignment-Issue
-+----------------------------------------------------------------
-+WrapText-Issue
-+ TEST START : WrapText-Issue
-+  ITEM Assertion OK : -  Range.WrapText (get)
-+  ITEM Assertion OK : -  Range.WrapText (get)
-+  ITEM Assertion OK : Range.WrapText is Null
-+END 'WrapText-Issue' Symbol
-+ TEST OK : WrapText-Issue
-+----------------------------------------------------------------
-+FontBorderIssues
-+ TEST START : FontBorderIssues
-+  ITEM Assertion OK : -  = Borders.Color (getColor)
-+  ITEM Assertion OK : -  = Font.Color (getColor)
-+END 'FontBorderIssues' Symbol
-+ TEST OK : FontBorderIssues
-+----------------------------------------------------------------
-+RangeSizeIssues
-+ TEST START : RangeSizeIssues
-+  ITEM Assertion OK : Range.Left is: 114
-+  ITEM Assertion OK : Range.Top is: 95.25
-+  ITEM Assertion OK : Range.Width is: 216
-+  ITEM Assertion OK : Range.Height is: 271.5
-+END 'RangeSizeIssues' Symbol
-+ TEST OK : RangeSizeIssues
-+----------------------------------------------------------------
-+ApplicationIssues
-+ TEST START : ApplicationIssues
-+  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
-+END 'ApplicationIssues' Symbol
-+ TEST OK : ApplicationIssues
-+Test run finished : 18/06/2007 17:50:04
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log
-new file mode 100644
-index 0000000..a7de979
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log
-@@ -0,0 +1,8 @@
-+Test run started : 19/06/2007 11:21:42
-+----------------------------------------------------------------
-+MyGoalseek-Issue
-+ TEST START : MyGoalseek-Issue
-+  ITEM Assertion OK : Variable Range value: 15
-+END 'MyGoalseek-Issue' Symbol
-+ TEST OK : MyGoalseek-Issue
-+Test run finished : 19/06/2007 11:21:42
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
-new file mode 100644
-index 0000000..8c9644a
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
-@@ -0,0 +1,280 @@
-+Test run started : 01/06/2007 11:28:58
-+----------------------------------------------------------------
-+ApplicationMethods
-+ TEST START : ApplicationMethods
-+  ITEM Assertion OK :  Name of Workbook is: Ranges.xls
-+  ITEM Assertion OK :  Address of Application.Columns is: $A:$A
-+  ITEM Assertion OK :  Address of Application.Rows is: $1:$1
-+  ITEM Assertion OK :  Address of Application.Range is: $1:$1,$5:$7
-+  ITEM Assertion OK :  Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
-+  ITEM Assertion OK :  Please check manually: Library Path is: C:\Program Files\Microsoft Office\OFFICE11\LIBRARY
-+  ITEM Assertion OK :  Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\Microsoft\Templates\
-+  ITEM Assertion OK :  FileSeparator is \
-+  ITEM Assertion OK :  Name of ActiveWorkbook is: Ranges.xls
-+END 'ApplicationMethods' Symbol
-+ TEST OK : ApplicationMethods
-+----------------------------------------------------------------
-+Insert-Issue
-+ TEST START : Insert-Issue
-+  ITEM Assertion OK : Insert with xlShiftToRight: 10
-+END 'Insert-Issue' Symbol
-+ TEST OK : Insert-Issue
-+----------------------------------------------------------------
-+MergeCells-Issue
-+ TEST START : MergeCells-Issue
-+  ITEM Assertion OK :  Range.MergeCells is True
-+  ITEM Assertion OK : MergeCells is null: True
-+  ITEM Assertion OK : RowCount after Merge: 6
-+  ITEM Assertion OK :  Range.MergeCells is False
-+  ITEM Assertion OK : MergeCells is null: False
-+  ITEM Assertion OK : MergeCells of Second Area is null : True
-+  ITEM Assertion OK : MergeCells of Ranges is Null: True
-+  ITEM Assertion OK : RowCount after Merge: 7
-+  ITEM Assertion OK :  Range.MergeCells is False
-+  ITEM Assertion OK : MergeCells is null: False
-+  ITEM Assertion OK : RowCount after Merge: 7
-+END 'MergeCells-Issue' Symbol
-+ TEST OK : MergeCells-Issue
-+----------------------------------------------------------------
-+Areas-Issue
-+ TEST START : Areas-Issue
-+  ITEM Assertion OK : Range Areas Count is2
-+  ITEM Assertion OK : First Range Address is: $E$8:$G$13
-+  ITEM Assertion OK : First Row is: 8
-+  ITEM Assertion OK : First Column is: 5
-+  ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
-+  ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
-+  ITEM Assertion OK : Range Count:53
-+END 'Areas-Issue' Symbol
-+ TEST OK : Areas-Issue
-+----------------------------------------------------------------
-+Fill-Methods-Issue
-+ TEST START : Fill-Methods-Issue
-+  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyRightFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyBottomFillValue
-+END 'Fill-Methods-Issue' Symbol
-+ TEST OK : Fill-Methods-Issue
-+----------------------------------------------------------------
-+Range/Item-Method-Issue
-+ TEST START : Range/Item-Method-Issue
-+  ITEM Assertion OK :  Range of multiple columns is: $A:$A,$C:$C
-+  ITEM Assertion OK :  Range of multiple rows is: $1:$1,$5:$7
-+  ITEM Assertion OK :  Range of several columns is: $C:$E,$D:$D
-+  ITEM Assertion OK :  Range of several rows is: $5:$8,$6:$10
-+  ITEM Assertion OK :  Range of several single cells is: $C$5,$E$8
-+  ITEM Assertion OK :  Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK :  Range of a single Item Cell is: $E$21
-+  ITEM Assertion OK :  Range of a single Item Cell is: $F$21
-+  ITEM Assertion OK :  Range of a single Item Cell is: $F$10
-+END 'Range/Item-Method-Issue' Symbol
-+ TEST OK : Range/Item-Method-Issue
-+----------------------------------------------------------------
-+R1C1-Formulas-Issue
-+ TEST START : R1C1-Formulas-Issue
-+  ITEM Assertion OK :  R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
-+  ITEM Assertion OK :  Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
-+END 'R1C1-Formulas-Issue' Symbol
-+ TEST OK : R1C1-Formulas-Issue
-+----------------------------------------------------------------
-+Verify_Delete
-+ TEST START : Verify_Delete
-+  ITEM Assertion OK : Ranges are intersecting: $G$13
-+  ITEM Assertion OK : Delete with Default: $AJ$4
-+  ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
-+  ITEM Assertion OK : Delete with ShiftUp: $M$22
-+END 'Verify_Delete' Symbol
-+ TEST OK : Verify_Delete
-+----------------------------------------------------------------
-+Value-Issue
-+ TEST START : Value-Issue
-+  ITEM Assertion OK : Value of Range is: 12.3
-+  ITEM Assertion OK : Text of Range is: 12.3
-+  ITEM Assertion OK : Range has Formula: False
-+  ITEM Assertion OK : Cell has Formula: False
-+  ITEM Assertion OK : Text of Range is null: True
-+  ITEM Assertion OK : Range has Formula: True
-+  ITEM Assertion OK : Cell has Formula: True
-+  ITEM Assertion OK : Value of Cell is: 12
-+  ITEM Assertion OK : Application.Calculation is : -4135
-+  ITEM Assertion OK : Calculation is automated: True
-+  ITEM Assertion OK : Range has Formula: True
-+  ITEM Assertion OK : Value of Cell is: 16
-+  ITEM Assertion OK : Text of Cell is: 16
-+  ITEM Assertion OK : Text of Cell is: 16
-+  ITEM Assertion OK : Range has Formula after 'ClearContents: False
-+  ITEM Assertion OK : Text of Cell is: 
-+  ITEM Assertion OK : Text of Cell is: 
-+END 'Value-Issue' Symbol
-+ TEST OK : Value-Issue
-+----------------------------------------------------------------
-+AutoFit issue
-+ TEST START : AutoFit issue
-+  ITEM Assertion OK :  Columns.AutoFit: CurrentWidth is 673
-+  ITEM Assertion OK :  Rows.AutoFit: CurrentHeight is 612
-+END 'AutoFit issue' Symbol
-+ TEST OK : AutoFit issue
-+----------------------------------------------------------------
-+Selections
-+ TEST START : Selections
-+  ITEM Assertion OK : ActiveCell is : $E$8
-+  ITEM Assertion OK : Active Cell is : $E$8
-+  ITEM Assertion OK : Number of Cells in Range: 53
-+  ITEM Assertion OK : Number of Cells in Range: 53
-+  ITEM Assertion OK : Number of Cells in Range: 53
-+END 'Selections' Symbol
-+ TEST OK : Selections
-+----------------------------------------------------------------
-+Offset-Resize
-+ TEST START : Offset-Resize
-+  ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
-+  ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
-+  ITEM Assertion OK :   Resized Range is : $A$20:$D$23
-+END 'Offset-Resize' Symbol
-+ TEST OK : Offset-Resize
-+----------------------------------------------------------------
-+Ranges-Address
-+ TEST START : Ranges-Address
-+  ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
-+  ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+  ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
-+END 'Ranges-Address' Symbol
-+ TEST OK : Ranges-Address
-+----------------------------------------------------------------
-+Range-Address
-+ TEST START : Range-Address
-+  ITEM Assertion OK : Range Address is: $E$8:$G$13
-+  ITEM Assertion OK : Range Address is: $E8:$G13
-+  ITEM Assertion OK : Range Address is: E$8:G$13
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7
-+  ITEM Assertion OK : Range Address is: $E$8:$G$13
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7
-+  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
-+END 'Range-Address' Symbol
-+ TEST OK : Range-Address
-+----------------------------------------------------------------
-+Column-Address
-+ TEST START : Column-Address
-+  ITEM Assertion OK : Range Address is: $F$8:$F$13
-+  ITEM Assertion OK : Range Address is: $F8:$F13
-+  ITEM Assertion OK : Range Address is: F$8:F$13
-+  ITEM Assertion OK : Range Address is: R8C6:R13C6
-+  ITEM Assertion OK : Range Address is: $F$8:$F$13
-+  ITEM Assertion OK : Range Address is: R8C6:R13C6
-+  ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
-+END 'Column-Address' Symbol
-+ TEST OK : Column-Address
-+----------------------------------------------------------------
-+Row-Address
-+ TEST START : Row-Address
-+  ITEM Assertion OK : Range Address is: $E$9:$G$9
-+  ITEM Assertion OK : Range Address is: $E9:$G9
-+  ITEM Assertion OK : Range Address is: E$9:G$9
-+  ITEM Assertion OK : Range Address is: R9C5:R9C7
-+  ITEM Assertion OK : Range Address is: $E$9:$G$9
-+  ITEM Assertion OK : Range Address is: R9C5:R9C7
-+  ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
-+END 'Row-Address' Symbol
-+ TEST OK : Row-Address
-+----------------------------------------------------------------
-+SingleCell-Address
-+ TEST START : SingleCell-Address
-+  ITEM Assertion OK : Range Address is: $F$9
-+  ITEM Assertion OK : Range Address is: $F9
-+  ITEM Assertion OK : Range Address is: F$9
-+  ITEM Assertion OK : Range Address is: R9C6
-+  ITEM Assertion OK : Range Address is: $F$9
-+  ITEM Assertion OK : Range Address is: R9C6
-+  ITEM Assertion OK : Range Address is: R[7]C[4]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
-+END 'SingleCell-Address' Symbol
-+ TEST OK : SingleCell-Address
-+----------------------------------------------------------------
-+Heights and Widths
-+ TEST START : Heights and Widths
-+  ITEM Assertion OK : Range RowHeight is 40
-+  ITEM Assertion OK : Range ColumnWidth is 50
-+  ITEM Assertion OK : Range Height is 238
-+  ITEM Assertion OK : Range Width is 798.75
-+  ITEM Assertion OK : Range RowHeight is 50
-+  ITEM Assertion OK : Range ColumnWidth is 50
-+  ITEM Assertion OK : Range Height is 297
-+  ITEM Assertion OK : Range Width is 798.75
-+  ITEM Assertion OK : RowHeight is null: True
-+  ITEM Assertion OK : ColumnWidth is null: True
-+END 'Heights and Widths' Symbol
-+ TEST OK : Heights and Widths
-+----------------------------------------------------------------
-+RangeRowColumn-Issue
-+ TEST START : RangeRowColumn-Issue
-+  ITEM Assertion OK : Row is: 8
-+  ITEM Assertion OK : Column is: 5
-+  ITEM Assertion OK : EntireRow.Columns.Count = 256
-+  ITEM Assertion OK : EntireColumn.Rows.Count = 65536
-+END 'RangeRowColumn-Issue' Symbol
-+ TEST OK : RangeRowColumn-Issue
-+----------------------------------------------------------------
-+Replace-Issue
-+ TEST START : Replace-Issue
-+  ITEM Assertion OK : Value after Replace: YourValue
-+  ITEM Assertion OK : Value after Replace: YourValue
-+  ITEM Assertion OK : Value after Replace: ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New Replace
-+  ITEM Assertion OK : Value after Replace: 
-+END 'Replace-Issue' Symbol
-+ TEST OK : Replace-Issue
-+----------------------------------------------------------------
-+Hidden-Issue
-+ TEST START : Hidden-Issue
-+  ITEM Assertion OK : -  Range.Rows.Hidden (set)
-+  ITEM Assertion OK : -  Range.Rows.Hidden (get)
-+  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (set)
-+  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (get)
-+  ITEM Assertion OK : -  Range.Columns.Hidden (set)
-+  ITEM Assertion OK : -  Range.Columns.Hidden (get)
-+  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (set)
-+  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (get)
-+END 'Hidden-Issue' Symbol
-+ TEST OK : Hidden-Issue
-+----------------------------------------------------------------
-+End issue
-+ TEST START : End issue
-+  ITEM Assertion OK : -  = $E$48
-+  ITEM Assertion OK : -  = $E$1
-+  ITEM Assertion OK : -  = $E$3
-+  ITEM Assertion OK : -  = $A$8
-+  ITEM Assertion OK : -  = $B$8
-+  ITEM Assertion OK : -  = $IV$8
-+  ITEM Assertion OK : -  = $Z$8
-+END 'End issue' Symbol
-+ TEST OK : End issue
-+----------------------------------------------------------------
-+Outline issue
-+ TEST START : Outline issue
-+  ITEM Assertion OK : -  Range.clearOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+END 'Outline issue' Symbol
-+ TEST OK : Outline issue
-+----------------------------------------------------------------
-+Validation
-+ TEST START : Validation
-+  ITEM Assertion OK : Validation Input Message is : Attention!
-+  ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
-+  ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
-+  ITEM Assertion OK : Validation Error Message is : An Error occured
-+  ITEM Assertion OK : Validation Error Title is : Microsoft Excel
-+END 'Validation' Symbol
-+ TEST OK : Validation
-+Test run finished : 01/06/2007 11:29:00
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log
-new file mode 100644
-index 0000000..01e5503
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log
-@@ -0,0 +1,62 @@
-+Test run started : 17/07/2007 15:25:17
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+  ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
-+  ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
-+  ITEM Assertion OK : test3 Range ('e:f')  A1 style addressing
-+  ITEM Assertion OK : test4 Range ('e:f')  R1C1 style addressing
-+  ITEM Assertion OK : test5 Columns A1 style addressing
-+  ITEM Assertion OK : test6 Columns R1C1 style addressing
-+  ITEM Assertion OK : test7 Columns(3) A1 style addressing
-+  ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
-+  ITEM Assertion OK : test9 Columns('e') A1 style addressing
-+  ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
-+  ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
-+  ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
-+  ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
-+  ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
-+  ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
-+  ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
-+  ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
-+  ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
-+  ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
-+  ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
-+  ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
-+  ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+  ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
-+  ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
-+  ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
-+  ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false 
-+  ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false 
-+  ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
-+  ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
-+  ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
-+  ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
-+  ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
-+  ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+  ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
-+  ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
-+  ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
-+  ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
-+  ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
-+  ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
-+  ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
-+  ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
-+  ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
-+  ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
-+  ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
-+  ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
-+  ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
-+Test Results
-+============
-+
-+Tests passed: 49
-+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 17/07/2007 15:25:19
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log
-new file mode 100644
-index 0000000..f055279
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log
-@@ -0,0 +1,60 @@
-+Test run started : 30/05/2007 11:33:13
-+BEGIN TestCalc
-+ TEST START : RangeTest2
-+  ITEM Assertion OK : -  Range("D15").Row 
-+  ITEM Assertion OK : -  WorkSheet("D15").Range.Row 
-+  ITEM Assertion OK : -  Range("D15").Column 
-+  ITEM Assertion OK : -  Worksheet.Range("D15").Column 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Columns.Count 
-+  ITEM Assertion OK : -  Range("D1").EntireColumn.Rows.Count 
-+  ITEM Assertion OK : -  Range("D15").ClearContent
-+  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (get)
-+  ITEM Assertion OK : -  Range("B38").Orientation (get)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlDownward)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlUpward)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
-+  ITEM Assertion OK : -  Range("B39").WrapText (get)
-+  ITEM Assertion OK : -  Range("B39").WrapText (set)
-+  ITEM Assertion OK : -  Range("B39").WrapText (set)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (get)
-+  ITEM Assertion OK : -  Range("F39").MergeCells (get)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("F39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("F39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
-+  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
-+  ITEM Assertion OK : -  Range("D41:D42").Replace  MatchCase:=False 
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM OK (RangeTest2)
-+ TEST succesfully completed : RangeTest2
-+END   TestCalc
-+Test run finished : 30/05/2007 11:33:14
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log
-new file mode 100644
-index 0000000..19a5ba9
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log
-@@ -0,0 +1,64 @@
-+Test run started : 31/05/2007 11:02:10
-+BEGIN TestCalc
-+ TEST START : RangeTest3
-+  ITEM Assertion OK : - setFormulaR1C1
-+  ITEM Assertion OK : - getFormulaR1C1
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy(Range("I10"))
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
-+  ITEM Assertion OK : PasteSpecial 
-+  ITEM Assertion OK : PasteSpecial SkipBlanks:=True
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
-+  ITEM Assertion OK : PasteSpecial Transpose:=True
-+  ITEM Assertion OK : ActiveWorkbook.Name
-+  ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
-+  ITEM Assertion OK : -  = Range("K22").End (xlDown)
-+  ITEM Assertion OK : -  = Range("K22").End (xlUo)
-+  ITEM Assertion OK : -  = Range("K22").End (xlToLeft)
-+  ITEM Assertion OK : -  = Range("K22").End (xlRight)
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Next
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Next
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="="
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter 
-+  ITEM Assertion OK : -  ActiveSheet.Resize.Select
-+  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
-+  ITEM Assertion OK : -  Application.GoTo Reference:="R[8]C[2]"
-+  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Ungroup- please check visually
-+  ITEM Assertion OK : -  Range.Ungroup - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.clearOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  ActiveSheet.UsedRange.Select
-+  ITEM Assertion FAIL : -  Range("A13").AddIndent
-+  ITEM Assertion OK : -  Range("A13").IndentLevel set
-+  ITEM Assertion OK : -  Range("A13").IndentLevel get
-+  ITEM Assertion OK : -  Range("A13").IndentLevel get
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Calculate
-+  ITEM Assertion OK : Worksheet.Calculate
-+  ITEM Assertion OK : - Application.Calculate
-+  ITEM Assertion OK : Global.Calculate
-+  ITEM Assertion OK : Calculation set
-+  ITEM Assertion OK : -  = ActiveWorkbook.Colors(3) set
-+  ITEM Assertion OK : -  = ActiveWorkbook.ResetColors
-+  ITEM Assertion OK : -  = ActiveWorkbook.Colors(3) get
-+  ITEM FAIL (RangeTest3)
-+ TEST Not succesfully completed : RangeTest3
-+END   TestCalc
-+Test run finished : 31/05/2007 11:02:12
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log
-new file mode 100644
-index 0000000..55f5d95
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log
-@@ -0,0 +1,20 @@
-+Test run started : 18/07/2007 10:56:38
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+  ITEM Assertion OK : test1 'starts with' string criteria
-+  ITEM Assertion OK : test2 'not equal to' string criteria
-+  ITEM Assertion OK : test3 'ends with' string criteria
-+  ITEM Assertion OK : test4 field 'all' 
-+  ITEM Assertion OK : test5 numeric '<15' 
-+  ITEM Assertion OK : test6 numeric '>=15' 
-+  ITEM Assertion OK : test7 numeric '<=12' 
-+Test Results
-+============
-+
-+Tests passed: 7
-+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 18/07/2007 10:56:44
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log
-new file mode 100644
-index 0000000..215842f
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log
-@@ -0,0 +1,45 @@
-+Test run started : 17/07/2007 20:54:56
-+----------------------------------------------------------------
-+MiscRangeTests
-+ TEST START : MiscRangeTests
-+  ITEM Assertion OK : test 1
-+  ITEM Assertion OK : test 2
-+  ITEM Assertion OK : test 3
-+  ITEM Assertion OK : test 4
-+  ITEM Assertion OK : test 5
-+  ITEM Assertion OK : test 6
-+  ITEM Assertion OK : test 7
-+  ITEM Assertion OK : test 8
-+  ITEM Assertion OK : test 9
-+  ITEM Assertion OK : test 10
-+  ITEM Assertion OK : test 11
-+  ITEM Assertion OK : test 12
-+  ITEM Assertion OK : test 13
-+  ITEM Assertion OK : test 14
-+  ITEM Assertion OK : test 15
-+  ITEM Assertion OK : test 16
-+  ITEM Assertion OK : test 17
-+  ITEM Assertion OK : test 18
-+  ITEM Assertion OK : test 19
-+  ITEM Assertion OK : test 20
-+  ITEM Assertion OK : test 21
-+  ITEM Assertion OK : test 22
-+  ITEM Assertion OK : test 23
-+  ITEM Assertion OK : test 24
-+  ITEM Assertion OK : test 25
-+  ITEM Assertion OK : test 26
-+  ITEM Assertion OK : test 27
-+  ITEM Assertion OK : test 28
-+  ITEM Assertion OK : test 29
-+  ITEM Assertion OK : test 30
-+  ITEM Assertion OK : test 31
-+No. tests: 31
-+Summary
-+=======
-+Run:       31
-+Passed:    31
-+Failed:    0
-+
-+END 'MiscRangeTests
-+ TEST OK : MiscRangeTests
-+Test run finished : 17/07/2007 20:55:03
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log
-new file mode 100644
-index 0000000..0ff400d
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log
-@@ -0,0 +1,10 @@
-+Test run started : 07/24/2008 05:06:12 PM
-+----------------------------------------------------------------
-+ TEST START : PageBreaks-Issue
-+  ITEM Assertion OK : HPageBreaks.Count is 3
-+  ITEM Assertion OK : HPageBreak.Type is -4135
-+  ITEM Assertion OK : HPageBreak.Location: Range.Row is 5
-+  ITEM Assertion OK : HPageBreak.Delete: HPageBreaks.Count is 2
-+END 'PageBreaks-Issue' Symbol
-+ TEST OK : PageBreaks-Issue
-+Test run finished : 07/24/2008 05:06:13 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log
-new file mode 100644
-index 0000000..8b7076e
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log
-@@ -0,0 +1,68 @@
-+Test run started : 19/06/2007 11:14:01
-+----------------------------------------------------------------
-+ClearFormtsIssue
-+ TEST START : ClearFormtsIssue
-+  ITEM Assertion OK : Range.Font.Bold is: True
-+  ITEM Assertion OK : Range.Font.Bold is: False
-+END 'ClearFormtsIssue' Symbol
-+ TEST OK : ClearFormtsIssue
-+----------------------------------------------------------------
-+VerticalAlignment-Issue
-+ TEST START : VerticalAlignment-Issue
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : Range.VeritcalAlignment is Null
-+END 'VerticalAlignment-Issue' Symbol
-+ TEST OK : VerticalAlignment-Issue
-+----------------------------------------------------------------
-+HorizontalAlignment-Issue
-+ TEST START : HorizontalAlignment-Issue
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : Range.HorizontalAlignment is Null
-+END 'HorizontalAlignment-Issue' Symbol
-+ TEST OK : HorizontalAlignment-Issue
-+----------------------------------------------------------------
-+WrapText-Issue
-+ TEST START : WrapText-Issue
-+  ITEM Assertion OK : -  Range.WrapText (get)
-+  ITEM Assertion OK : -  Range.WrapText (get)
-+  ITEM Assertion OK : Range.WrapText is Null
-+END 'WrapText-Issue' Symbol
-+ TEST OK : WrapText-Issue
-+----------------------------------------------------------------
-+FontBorderIssues
-+ TEST START : FontBorderIssues
-+  ITEM Assertion OK : -  = Borders.Color (getColor)
-+  ITEM Assertion OK : -  = Font.Color (getColor)
-+END 'FontBorderIssues' Symbol
-+ TEST OK : FontBorderIssues
-+----------------------------------------------------------------
-+RangeSizeIssues
-+ TEST START : RangeSizeIssues
-+  ITEM Assertion OK : Range.Left is: 118.8432
-+  ITEM Assertion OK : Range.Top is: 92.16585
-+  ITEM Assertion OK : Range.Width is: 226.2
-+  ITEM Assertion OK : Range.Height is: 271.5
-+END 'RangeSizeIssues' Symbol
-+ TEST OK : RangeSizeIssues
-+----------------------------------------------------------------
-+ApplicationIssues
-+ TEST START : ApplicationIssues
-+  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
-+END 'ApplicationIssues' Symbol
-+ TEST OK : ApplicationIssues
-+Test run finished : 19/06/2007 11:14:02
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log
-new file mode 100644
-index 0000000..a130737
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log
-@@ -0,0 +1,8 @@
-+Test run started : 19/06/2007 11:26:09
-+----------------------------------------------------------------
-+MyGoalseek-Issue
-+ TEST START : MyGoalseek-Issue
-+  ITEM Assertion OK : Variable Range value: 15
-+END 'MyGoalseek-Issue' Symbol
-+ TEST OK : MyGoalseek-Issue
-+Test run finished : 19/06/2007 11:26:10
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
-new file mode 100644
-index 0000000..dd4fb49
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
-@@ -0,0 +1,280 @@
-+Test run started : 17/12/2008 14:18:34
-+----------------------------------------------------------------
-+ApplicationMethods
-+ TEST START : ApplicationMethods
-+  ITEM Assertion OK :  Name of Workbook is: Ranges.xls
-+  ITEM Assertion OK :  Address of Application.Columns is: $A:$A
-+  ITEM Assertion OK :  Address of Application.Rows is: $1:$1
-+  ITEM Assertion OK :  Address of Application.Range is: $1:$1,$5:$7
-+  ITEM Assertion OK :  Please check manually: DefaultFilePath is: /data4/home/npower/Documents
-+  ITEM Assertion OK :  Please check manually: Library Path is: /media/disk/BUILD-related/CWS/my_working_copy/INSTALL_FOR_TEST/opt/UserInstallation/user/basic
-+  ITEM Assertion OK :  Please check manually: Template Path is: /media/disk/BUILD-related/CWS/my_working_copy/INSTALL_FOR_TEST/opt/UserInstallation/user/template
-+  ITEM Assertion OK :  FileSeparator is /
-+  ITEM Assertion OK :  Name of ActiveWorkbook is: Ranges.xls
-+END 'ApplicationMethods' Symbol
-+ TEST OK : ApplicationMethods
-+----------------------------------------------------------------
-+Insert-Issue
-+ TEST START : Insert-Issue
-+  ITEM Assertion OK : Insert with xlShiftToRight: 10
-+END 'Insert-Issue' Symbol
-+ TEST OK : Insert-Issue
-+----------------------------------------------------------------
-+MergeCells-Issue
-+ TEST START : MergeCells-Issue
-+  ITEM Assertion OK :  Range.MergeCells is True
-+  ITEM Assertion FAIL : MergeCells is null: False
-+  ITEM Assertion OK : RowCount after Merge: 13
-+  ITEM Assertion OK :  Range.MergeCells is False
-+  ITEM Assertion OK : MergeCells is null: False
-+  ITEM Assertion FAIL : MergeCells of Second Area is null : False
-+  ITEM Assertion FAIL : MergeCells of Ranges is Null: False
-+  ITEM Assertion OK : RowCount after Merge: 7
-+  ITEM Assertion OK :  Range.MergeCells is False
-+  ITEM Assertion OK : MergeCells is null: False
-+  ITEM Assertion OK : RowCount after Merge: 7
-+END 'MergeCells-Issue' Symbol
-+ TEST OK : MergeCells-Issue
-+----------------------------------------------------------------
-+Areas-Issue
-+ TEST START : Areas-Issue
-+  ITEM Assertion OK : Range Areas Count is2
-+  ITEM Assertion OK : First Range Address is: $E$8:$G$13
-+  ITEM Assertion OK : First Row is: 8
-+  ITEM Assertion OK : First Column is: 5
-+  ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
-+  ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
-+  ITEM Assertion OK : Range Count:53
-+END 'Areas-Issue' Symbol
-+ TEST OK : Areas-Issue
-+----------------------------------------------------------------
-+Fill-Methods-Issue
-+ TEST START : Fill-Methods-Issue
-+  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyRightFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyBottomFillValue
-+END 'Fill-Methods-Issue' Symbol
-+ TEST OK : Fill-Methods-Issue
-+----------------------------------------------------------------
-+Range/Item-Method-Issue
-+ TEST START : Range/Item-Method-Issue
-+  ITEM Assertion OK :  Range of multiple columns is: $A:$A,$C:$C
-+  ITEM Assertion OK :  Range of multiple rows is: $1:$1,$5:$7
-+  ITEM Assertion OK :  Range of several columns is: $C:$E,$D:$D
-+  ITEM Assertion OK :  Range of several rows is: $5:$8,$6:$10
-+  ITEM Assertion OK :  Range of several single cells is: $C$5,$E$8
-+  ITEM Assertion OK :  Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK :  Range of a single Item Cell is: $E$21
-+  ITEM Assertion OK :  Range of a single Item Cell is: $F$21
-+  ITEM Assertion OK :  Range of a single Item Cell is: $F$10
-+END 'Range/Item-Method-Issue' Symbol
-+ TEST OK : Range/Item-Method-Issue
-+----------------------------------------------------------------
-+R1C1-Formulas-Issue
-+ TEST START : R1C1-Formulas-Issue
-+  ITEM Assertion OK :  R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
-+  ITEM Assertion OK :  Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
-+END 'R1C1-Formulas-Issue' Symbol
-+ TEST OK : R1C1-Formulas-Issue
-+----------------------------------------------------------------
-+Verify_Delete
-+ TEST START : Verify_Delete
-+  ITEM Assertion OK : Ranges are intersecting: $G$13
-+  ITEM Assertion OK : Delete with Default: $AJ$4
-+  ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
-+  ITEM Assertion OK : Delete with ShiftUp: $M$22
-+END 'Verify_Delete' Symbol
-+ TEST OK : Verify_Delete
-+----------------------------------------------------------------
-+Value-Issue
-+ TEST START : Value-Issue
-+  ITEM Assertion OK : Value of Range is: 12.3
-+  ITEM Assertion OK : Text of Range is: 12.3
-+  ITEM Assertion OK : Range has Formula: False
-+  ITEM Assertion OK : Cell has Formula: False
-+  ITEM Assertion FAIL : Text of Range is null: False
-+  ITEM Assertion OK : Range has Formula: True
-+  ITEM Assertion OK : Cell has Formula: True
-+  ITEM Assertion OK : Value of Cell is: 12
-+  ITEM Assertion OK : Application.Calculation is : -4135
-+  ITEM Assertion OK : Calculation is automated: True
-+  ITEM Assertion OK : Range has Formula: True
-+  ITEM Assertion OK : Value of Cell is: 16
-+  ITEM Assertion OK : Text of Cell is: 16
-+  ITEM Assertion OK : Text of Cell is: 16
-+  ITEM Assertion OK : Range has Formula after 'ClearContents: False
-+  ITEM Assertion OK : Text of Cell is: 
-+  ITEM Assertion OK : Text of Cell is: 
-+END 'Value-Issue' Symbol
-+ TEST OK : Value-Issue
-+----------------------------------------------------------------
-+AutoFit issue
-+ TEST START : AutoFit issue
-+  ITEM Assertion OK :  Columns.AutoFit: CurrentWidth is 679
-+  ITEM Assertion OK :  Rows.AutoFit: CurrentHeight is 546
-+END 'AutoFit issue' Symbol
-+ TEST OK : AutoFit issue
-+----------------------------------------------------------------
-+Selections
-+ TEST START : Selections
-+  ITEM Assertion OK : ActiveCell is : $E$8
-+  ITEM Assertion OK : Active Cell is : $E$8
-+  ITEM Assertion OK : Number of Cells in Range: 52
-+  ITEM Assertion OK : Number of Cells in Range: 52
-+  ITEM Assertion OK : Number of Cells in Range: 52
-+END 'Selections' Symbol
-+ TEST OK : Selections
-+----------------------------------------------------------------
-+Offset-Resize
-+ TEST START : Offset-Resize
-+  ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
-+  ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
-+  ITEM Assertion OK :   Resized Range is : $A$20:$D$23
-+END 'Offset-Resize' Symbol
-+ TEST OK : Offset-Resize
-+----------------------------------------------------------------
-+Ranges-Address
-+ TEST START : Ranges-Address
-+  ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
-+  ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+  ITEM Assertion FAIL : Range Address is: R8C5:R13C7,R13C7:R19C11
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
-+END 'Ranges-Address' Symbol
-+ TEST OK : Ranges-Address
-+----------------------------------------------------------------
-+Range-Address
-+ TEST START : Range-Address
-+  ITEM Assertion OK : Range Address is: $E$8:$G$13
-+  ITEM Assertion OK : Range Address is: $E8:$G13
-+  ITEM Assertion OK : Range Address is: E$8:G$13
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7
-+  ITEM Assertion FAIL : Range Address is: R8C5:R13C7
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7
-+  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
-+END 'Range-Address' Symbol
-+ TEST OK : Range-Address
-+----------------------------------------------------------------
-+Column-Address
-+ TEST START : Column-Address
-+  ITEM Assertion OK : Range Address is: $F$8:$F$13
-+  ITEM Assertion OK : Range Address is: $F8:$F13
-+  ITEM Assertion OK : Range Address is: F$8:F$13
-+  ITEM Assertion OK : Range Address is: R8C6:R13C6
-+  ITEM Assertion FAIL : Range Address is: R8C6:R13C6
-+  ITEM Assertion OK : Range Address is: R8C6:R13C6
-+  ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
-+END 'Column-Address' Symbol
-+ TEST OK : Column-Address
-+----------------------------------------------------------------
-+Row-Address
-+ TEST START : Row-Address
-+  ITEM Assertion OK : Range Address is: $E$9:$G$9
-+  ITEM Assertion OK : Range Address is: $E9:$G9
-+  ITEM Assertion OK : Range Address is: E$9:G$9
-+  ITEM Assertion OK : Range Address is: R9C5:R9C7
-+  ITEM Assertion FAIL : Range Address is: R9C5:R9C7
-+  ITEM Assertion OK : Range Address is: R9C5:R9C7
-+  ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
-+END 'Row-Address' Symbol
-+ TEST OK : Row-Address
-+----------------------------------------------------------------
-+SingleCell-Address
-+ TEST START : SingleCell-Address
-+  ITEM Assertion OK : Range Address is: $F$9
-+  ITEM Assertion OK : Range Address is: $F9
-+  ITEM Assertion OK : Range Address is: F$9
-+  ITEM Assertion OK : Range Address is: R9C6
-+  ITEM Assertion FAIL : Range Address is: R9C6
-+  ITEM Assertion OK : Range Address is: R9C6
-+  ITEM Assertion OK : Range Address is: R[7]C[4]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
-+END 'SingleCell-Address' Symbol
-+ TEST OK : SingleCell-Address
-+----------------------------------------------------------------
-+Heights and Widths
-+ TEST START : Heights and Widths
-+  ITEM Assertion OK : Range RowHeight is 40
-+  ITEM Assertion OK : Range ColumnWidth is 50
-+  ITEM Assertion OK : Range Height is 240
-+  ITEM Assertion OK : Range Width is 787.5
-+  ITEM Assertion OK : Range RowHeight is 50
-+  ITEM Assertion OK : Range ColumnWidth is 50
-+  ITEM Assertion OK : Range Height is 300
-+  ITEM Assertion OK : Range Width is 787.5
-+  ITEM Assertion OK : RowHeight is null: True
-+  ITEM Assertion OK : ColumnWidth is null: True
-+END 'Heights and Widths' Symbol
-+ TEST OK : Heights and Widths
-+----------------------------------------------------------------
-+RangeRowColumn-Issue
-+ TEST START : RangeRowColumn-Issue
-+  ITEM Assertion OK : Row is: 8
-+  ITEM Assertion OK : Column is: 5
-+  ITEM Assertion OK : EntireRow.Columns.Count = 1024
-+  ITEM Assertion OK : EntireColumn.Rows.Count = 131072
-+END 'RangeRowColumn-Issue' Symbol
-+ TEST OK : RangeRowColumn-Issue
-+----------------------------------------------------------------
-+Replace-Issue
-+ TEST START : Replace-Issue
-+  ITEM Assertion OK : Value after Replace: YourValue
-+  ITEM Assertion OK : Value after Replace: YourValue
-+  ITEM Assertion OK : Value after Replace: ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New Replace
-+  ITEM Assertion OK : Value after Replace: 
-+END 'Replace-Issue' Symbol
-+ TEST OK : Replace-Issue
-+----------------------------------------------------------------
-+Hidden-Issue
-+ TEST START : Hidden-Issue
-+  ITEM Assertion OK : -  Range.Rows.Hidden (set)
-+  ITEM Assertion OK : -  Range.Rows.Hidden (get)
-+  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (set)
-+  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (get)
-+  ITEM Assertion OK : -  Range.Columns.Hidden (set)
-+  ITEM Assertion OK : -  Range.Columns.Hidden (get)
-+  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (set)
-+  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (get)
-+END 'Hidden-Issue' Symbol
-+ TEST OK : Hidden-Issue
-+----------------------------------------------------------------
-+End issue
-+ TEST START : End issue
-+  ITEM Assertion OK : -  = $E$48
-+  ITEM Assertion OK : -  = $E$1
-+  ITEM Assertion OK : -  = $E$3
-+  ITEM Assertion OK : -  = $A$8
-+  ITEM Assertion OK : -  = $B$8
-+  ITEM Assertion FAIL : -  = $AMJ$8
-+  ITEM Assertion OK : -  = $Z$8
-+END 'End issue' Symbol
-+ TEST OK : End issue
-+----------------------------------------------------------------
-+Outline issue
-+ TEST START : Outline issue
-+  ITEM Assertion OK : -  Range.clearOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+END 'Outline issue' Symbol
-+ TEST OK : Outline issue
-+----------------------------------------------------------------
-+Validation
-+ TEST START : Validation
-+  ITEM Assertion OK : Validation Input Message is : Attention!
-+  ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
-+  ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
-+  ITEM Assertion OK : Validation Error Message is : An Error occured
-+  ITEM Assertion OK : Validation Error Title is : Microsoft Excel
-+END 'Validation' Symbol
-+ TEST OK : Validation
-+Test run finished : 17/12/2008 14:18:40
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
-new file mode 100644
-index 0000000..3193a0b
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
-@@ -0,0 +1,77 @@
-+Test run started : 10/16/2007 05:25:21 PM
-+BEGIN Shapes_Collection_Behaviour
-+ TEST START : Shapes_Collection_Behaviour
-+  ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1' 
-+  ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2' 
-+ TEST Success. : Shapes_Collection_Behaviour
-+END Shapes_Collection_Behaviour
-+BEGIN Shapes_Select_Item
-+ TEST START : Shapes_Select_Item
-+  ITEM Assertion OK : Correctly selected shape through Range
-+  ITEM Assertion OK : Correctly selected shape through Item
-+  ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
-+  ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
-+ TEST Success. : Shapes_Select_Item
-+END Shapes_Select_Item
-+BEGIN Shapes_Fill
-+ TEST START : Shapes_Fill
-+  ITEM Assertion OK : correctly set visibility of shape fill
-+  ITEM Assertion OK : correctly set transparency of shape line
-+  ITEM Assertion OK : correctly set forecolor of shape fill
-+  ITEM Assertion FAIL : correctly set backcolor of shape fill
-+  ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
-+  ITEM Assertion OK : correctly set forecolor of shape fill
-+  ITEM Assertion FAIL : correctly set forecolor of shape fill
-+ TEST Success. : Shapes_Fill
-+END  Shapes_Fill
-+BEGIN Shapes_Line
-+ TEST START : Shapes_Line
-+  ITEM Assertion FAIL : correctly set weight of shape line
-+  ITEM Assertion OK : correctly set visibility of shape line
-+  ITEM Assertion OK : correctly set transparency of shape line
-+  ITEM Assertion OK : correctly set dash style of shape line
-+  ITEM Assertion OK : correctly set dash style of shape line
-+  ITEM Assertion OK : correctly set forecolor of shape line
-+  ITEM Assertion FAIL : correctly set backcolor of shape line
-+ TEST Success. : Shapes_Line
-+END  Shapes_Line
-+BEGIN Shapes_TextFrame
-+ TEST START : Shapes_TextFrame
-+  ITEM Assertion OK : correctly set Autosize of Shape TextFrame
-+ TEST Success. : Shapes_TextFrame
-+END  Shapes_TextFrame
-+BEGIN Shapes_SimpleGeometry
-+ TEST START : Shapes_SimpleGeometery
-+  ITEM Assertion OK : shape height should be 47.0425168477155 and got 46.9984222363199
-+  ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
-+  ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
-+  ITEM Assertion OK : shape top should be 42.0251943291216 and got 42.0094461726333
-+  ITEM Assertion OK : shape rotation should be 0 and got 0
-+  ITEM Assertion OK : shape rotation should be 25 and got 25
-+  ITEM Assertion OK : shape incrementrotation should be 50 and got 50
-+  ITEM Assertion OK : shape incrementleft should be 70.6834602404119 and got 70.6677120839236
-+  ITEM Assertion OK : shape incrementtop should be 91.262986503119 and got 91.2472383466307
-+ TEST Success. : Shapes_SimpleGeometery
-+END Shapes_SimpleGeometry
-+BEGIN Shapes_Range
-+ TEST START : Shapes_Range
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
-+ TEST Success. : Shapes_Range
-+END Shapes_Range
-+BEGIN Shapes_ShapeRange
-+ TEST START : Shapes_ShapeRange
-+  ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 90.6677120839236 and got 90.6519627935771
-+  ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
-+  ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 111.247238346631 and got 111.231489056284
-+  ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 65.0708633026228 and got 65.0551140122763
-+  ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
-+  ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
-+END Shapes_ShapeRange
-+Test run finished : 10/16/2007 05:25:22 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log
-new file mode 100644
-index 0000000..c7a7d87
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log
-@@ -0,0 +1,9 @@
-+Test run started : 05/29/2008 02:51:03 PM
-+BEGIN StrConv
-+ TEST START : Test StrConv function
-+  ITEM Assertion OK : Converts the string to uppercase characters:ABC EFG HIJ
-+  ITEM Assertion OK : Converts the string to lowercase characters:abc efg hij
-+  ITEM Assertion OK : Converts the first letter of every word in string to uppercase:Abc Efg Hij
-+ TEST OK : Test StrConv function
-+END  StrConv
-+Test run finished : 05/29/2008 02:51:03 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log
-new file mode 100644
-index 0000000..c6376c5
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log
-@@ -0,0 +1,14 @@
-+Test run started : 2008ï07ï10 11:57:05
-+----------------------------------------------------------------
-+TestCaseName
-+ TEST START : TestCaseName
-+  ITEM Assertion OK : Something has been done.
-+Test Results
-+============
-+
-+Tests passed: 1
-+Tests failed: 0
-+
-+END 'TestCaseName
-+ TEST OK : TestCaseName
-+Test run finished : 2008ï07ï10 11:57:05
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
-new file mode 100644
-index 0000000..42360c3
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
-@@ -0,0 +1,62 @@
-+Test run started : 17/07/2007 20:56:04
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+  ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
-+  ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
-+  ITEM Assertion OK : test3 Range ('e:f')  A1 style addressing
-+  ITEM Assertion OK : test4 Range ('e:f')  R1C1 style addressing
-+  ITEM Assertion OK : test5 Columns A1 style addressing
-+  ITEM Assertion OK : test6 Columns R1C1 style addressing
-+  ITEM Assertion OK : test7 Columns(3) A1 style addressing
-+  ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
-+  ITEM Assertion OK : test9 Columns('e') A1 style addressing
-+  ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
-+  ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
-+  ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
-+  ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
-+  ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
-+  ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
-+  ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
-+  ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
-+  ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
-+  ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
-+  ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
-+  ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
-+  ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+  ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
-+  ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
-+  ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
-+  ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false 
-+  ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false 
-+  ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
-+  ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
-+  ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
-+  ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
-+  ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
-+  ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+  ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
-+  ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
-+  ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
-+  ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
-+  ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
-+  ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
-+  ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
-+  ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
-+  ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
-+  ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
-+  ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
-+  ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
-+  ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
-+Test Results
-+============
-+
-+Tests passed: 49
-+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 17/07/2007 20:56:05
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log
-new file mode 100644
-index 0000000..083819d
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log
-@@ -0,0 +1,60 @@
-+Test run started : 30/05/2007 15:59:40
-+BEGIN TestCalc
-+ TEST START : RangeTest2
-+  ITEM Assertion OK : -  Range("D15").Row 
-+  ITEM Assertion OK : -  WorkSheet("D15").Range.Row 
-+  ITEM Assertion OK : -  Range("D15").Column 
-+  ITEM Assertion OK : -  Worksheet.Range("D15").Column 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Columns.Count 
-+  ITEM Assertion OK : -  Range("D1").EntireColumn.Rows.Count 
-+  ITEM Assertion OK : -  Range("D15").ClearContent
-+  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (get)
-+  ITEM Assertion OK : -  Range("B38").Orientation (get)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlDownward)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlUpward)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
-+  ITEM Assertion OK : -  Range("B39").WrapText (get)
-+  ITEM Assertion OK : -  Range("B39").WrapText (set)
-+  ITEM Assertion OK : -  Range("B39").WrapText (set)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (get)
-+  ITEM Assertion OK : -  Range("F39").MergeCells (get)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (set)
-+  ITEM Assertion FAIL : -  Range("F39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("F39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
-+  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
-+  ITEM Assertion OK : -  Range("D41:D42").Replace  MatchCase:=False 
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM FAIL (RangeTest2)
-+ TEST Not succesfully completed : RangeTest2
-+END   TestCalc
-+Test run finished : 30/05/2007 15:59:42
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log
-new file mode 100644
-index 0000000..b1573c0
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log
-@@ -0,0 +1,65 @@
-+Test run started : 10/03/2008 15:15:19
-+BEGIN TestCalc
-+ TEST START : RangeTest3
-+  ITEM Assertion OK : - setFormulaR1C1
-+  ITEM Assertion OK : - getFormulaR1C1
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy(Range("I10"))
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
-+  ITEM Assertion OK : PasteSpecial 
-+  ITEM Assertion OK : PasteSpecial SkipBlanks:=True
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
-+  ITEM Assertion OK : PasteSpecial Transpose:=True
-+  ITEM Assertion FAIL : ActiveWorkbook.FileFormat
-+  ITEM Assertion OK : ActiveWorkbook.Name
-+  ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
-+  ITEM Assertion FAIL : -  = ActiveWorkbook.Colors(3) set
-+  ITEM Assertion OK : -  = ActiveWorkbook.ResetColors
-+  ITEM Assertion OK : -  = ActiveWorkbook.Colors(3) get
-+  ITEM Assertion OK : -  = Range("K22").End (xlDown)
-+  ITEM Assertion OK : -  = Range("K22").End (xlUo)
-+  ITEM Assertion OK : -  = Range("K22").End (xlToLeft)
-+  ITEM Assertion OK : -  = Range("K22").End (xlRight)
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Next
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Next
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="="
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter 
-+  ITEM Assertion OK : -  ActiveSheet.Resize.Select
-+  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
-+  ITEM Assertion FAIL : -  Application.GoTo Reference:="R[8]C[2]"
-+  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Ungroup- please check visually
-+  ITEM Assertion OK : -  Range.Ungroup - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.clearOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  ActiveSheet.UsedRange.Select
-+  ITEM Assertion OK : -  Range("A13").AddIndent
-+  ITEM Assertion OK : -  Range("A13").IndentLevel set
-+  ITEM Assertion OK : -  Range("A13").IndentLevel get
-+  ITEM Assertion OK : -  Range("A13").IndentLevel get
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Calculate
-+  ITEM Assertion OK : Worksheet.Calculate
-+  ITEM Assertion OK : - Application.Calculate
-+  ITEM Assertion OK : Global.Calculate
-+  ITEM Assertion OK : Calculation set
-+  ITEM FAIL (RangeTest3)
-+ TEST Not succesfully completed : RangeTest3
-+END   TestCalc
-+Test run finished : 10/03/2008 15:15:21
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log
-new file mode 100644
-index 0000000..ec9a665
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log
-@@ -0,0 +1,46 @@
-+Test run started : 05/29/2008 02:55:00 PM
-+----------------------------------------------------------------
-+ TEST START : Window-Issue
-+  ITEM Assertion OK : Window.Left is: 0 (Test only applies to maximized Window)
-+  ITEM Assertion OK : Window.Top is: 21 (Test only applies to maximized Window)
-+  ITEM Assertion OK : Window.Width is: 1280 (Test only applies to maximized Window)
-+  ITEM Assertion OK : Window.Height is: 752 (Test only applies to maximized Window)
-+  ITEM Assertion OK : Window.ScrollColumn is: 100
-+  ITEM Assertion OK : Window.ScrollColumn is: 1
-+  ITEM Assertion OK : Window.ScrollRow is: 100
-+  ITEM Assertion OK : Window.ScrollRow is: 1
-+  ITEM Assertion OK : Window.LargeScroll(Down): ScrollRow is: 94 (Test may only apply to maximized Window)
-+  ITEM Assertion OK : Window.LargeScroll(Up): ScrollRow is: 1
-+  ITEM Assertion OK : Window.LargeScroll(ToRight): ScrollColumn is: 58 (Test may only apply to maximized Window)
-+  ITEM Assertion OK : Window.LargeScroll(ToLeft): ScrollColumn is: 1
-+  ITEM Assertion OK : Window.SmallScroll(ToRight): ScrollColumn is: 4 (Test may only apply to maximized Window)
-+  ITEM Assertion OK : Window.SmallScroll(ToLeft): ScrollColumn is: 1
-+  ITEM Assertion OK : Window.DisplayWorkBookTabs is: False
-+  ITEM Assertion OK : Window.DisplayWorkBookTabs is: True
-+  ITEM Assertion OK : Window.DisplayVerticalScrollBar is: True
-+  ITEM Assertion OK : Window.DisplayVerticalScrollBar is: False
-+  ITEM Assertion OK : Window.DisplayHorizontalScrollBar is: False
-+  ITEM Assertion OK : Window.DisplayHorizontalScrollBar is: True
-+  ITEM Assertion OK : Window.DisplayHeadings is: False
-+  ITEM Assertion OK : Window.DisplayHeadings is: True
-+  ITEM Assertion OK : Window.DisplayOutline is: False
-+  ITEM Assertion OK : Window.DisplayOutline is: True
-+  ITEM Assertion OK : Window.Visible is: False
-+  ITEM Assertion OK : Window.Visible is: True
-+  ITEM Assertion OK : Window.Caption is: MyCaption
-+  ITEM Assertion OK : Pane.ScrollColumn is: 100
-+  ITEM Assertion OK : Pane.ScrollColumn is: 1
-+  ITEM Assertion OK : Pane.ScrollRow is: 100
-+  ITEM Assertion OK : Pane.ScrollRow is: 1
-+  ITEM Assertion OK : Pane.LargeScroll(Down): ScrollRow is: 94 (Test may only apply to maximized Window)
-+  ITEM Assertion OK : Pane.LargeScroll(Up): ScrollRow is: 1
-+  ITEM Assertion OK : Pane.LargeScroll(ToRight): ScrollColumn is: 58 (Test may only apply to maximized Window)
-+  ITEM Assertion OK : Pane.LargeScroll(ToLeft): ScrollColumn is: 1
-+  ITEM Assertion OK : Pane.SmallScroll(ToRight): ScrollColumn is: 4 (Test may only apply to maximized Window)
-+  ITEM Assertion OK : Pane.SmallScroll(ToLeft): ScrollColumn is: 1
-+  ITEM Assertion OK : Window Selection: $A$2:$D$5
-+  ITEM Assertion OK : ActiveSheet name of Window: Sheet1
-+  ITEM Assertion OK : Window ActiveCell: $A$1
-+END 'Window-Issue' Symbol
-+ TEST OK : Window-Issue
-+Test run finished : 05/29/2008 02:55:01 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log
-new file mode 100644
-index 0000000..bd24328
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log
-@@ -0,0 +1,8 @@
-+Test run started : 05/29/2008 02:25:58 PM
-+BEGIN Bytearray To String
-+ TEST START : Test the conversion between bytearray and string
-+  ITEM Assertion OK :  The number of byte is:6
-+  ITEM Assertion OK : the return string is: abc
-+ TEST OK : Test the conversion between bytearray and string
-+END  Bytearray To String
-+Test run finished : 05/29/2008 02:25:58 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log
-new file mode 100644
-index 0000000..4dd5f53
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log
-@@ -0,0 +1,9 @@
-+Test run started : 01/24/2008 01:24:50 PM
-+BEGIN DateSerial
-+ TEST START : Test DateSerial function
-+  ITEM Assertion OK : the return date is: 06/15/1999
-+  ITEM Assertion OK : the return date is: 06/15/1999
-+  ITEM Assertion OK : the return date is: 06/15/1999
-+ TEST OK : Test DateSerial function
-+END  DateSerial
-+Test run finished : 01/24/2008 01:24:50 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log
-new file mode 100644
-index 0000000..830d5e7
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log
-@@ -0,0 +1,8 @@
-+Test run started : 01/24/2008 01:24:41 PM
-+BEGIN DateValue
-+ TEST START : Test DateValue function
-+  ITEM Assertion OK : the return date is: 02/12/1969
-+  ITEM Assertion OK : the return date is: 01/21/2008
-+ TEST OK : Test DateValue function
-+END  DateValue
-+Test run finished : 01/24/2008 01:24:41 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
-new file mode 100644
-index 0000000..50fac17
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
-@@ -0,0 +1,36 @@
-+Test run started : 17/12/2008 14:15:22
-+BEGIN Format
-+ TEST START : Test Predefined_Number_Format_Sample function
-+  ITEM Assertion OK : General Number: 562486.2356
-+  ITEM Assertion OK : Fixed: 0.20
-+  ITEM Assertion OK : Standard: 562,486.24
-+  ITEM Assertion OK : Percent: 75.21%
-+  ITEM Assertion OK : Scientific: 5.62E+05
-+  ITEM Assertion OK : Scientific: -3.46E+03
-+  ITEM Assertion OK : Yes/No: No
-+  ITEM Assertion OK : Yes/No: Yes
-+  ITEM Assertion OK : True/False: False
-+  ITEM Assertion OK : True/False: True
-+  ITEM Assertion OK : On/Off: Off
-+  ITEM Assertion OK : On/Off: On
-+ TEST OK : Test Predefined_Number_Format_Sample function
-+ TEST START : Test Custom_Number_Format_Sample function
-+  ITEM Assertion OK : 00.0000: 23.6750
-+  ITEM Assertion OK : 00.00: 23.68
-+  ITEM Assertion OK : 00000: 02658
-+  ITEM Assertion OK : 00.00: 2658.00
-+  ITEM Assertion OK : ##.####: 23.675
-+  ITEM Assertion OK : ##.##: 23.68
-+  ITEM Assertion OK : #,###.##: 12,345.25
-+  ITEM Assertion OK : ##.00%: 25.00%
-+  ITEM Assertion OK : #,###: 1,000,000
-+  ITEM Assertion OK : ######E-###: 109838E-5
-+  ITEM Assertion OK : $#,###.##: $2,345.25
-+  ITEM Assertion OK : ##.###\%: .25%
-+ TEST OK : Test Custom_Number_Format_Sample function
-+ TEST START : Test Custom_Text_Format_Sample function
-+  ITEM Assertion OK : <: vba
-+  ITEM Assertion OK : >: VBA
-+ TEST OK : Test Custom_Text_Format_Sample function
-+END  Format
-+Test run finished : 17/12/2008 14:15:22
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log
-new file mode 100644
-index 0000000..f04585c
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log
-@@ -0,0 +1,77 @@
-+Test run started : 07/21/2008 02:00:06 PM
-+BEGIN PageSetup
-+ TEST START : Sheet_PrintArea
-+  ITEM Assertion OK : PrintArea has changed as expected
-+ TEST OK : Sheet_PrintArea
-+ TEST START : Test margins (no headers)
-+  ITEM Assertion OK : PageSetup.LeftMargin set/get
-+  ITEM Assertion OK : PageSetup.RightMargin set/get
-+  ITEM Assertion OK : PageSetup.TopMargin set/get
-+  ITEM Assertion OK : PageSetup.BottomMargin set/get
-+Verify that page margins on sheet 1 are all 0.5inch   
-+ TEST OK : Test margins (no headers)
-+ TEST START : Test margins (headers)
-+  ITEM Assertion OK : PageSetup.HeaderMargin set/get
-+  ITEM Assertion OK : PageSetup.FooterMargin set/get
-+  ITEM Assertion OK : PageSetup.LeftMargin set/get
-+  ITEM Assertion OK : PageSetup.LeftMargin set/get
-+Verify that top/bottom/header/footer page margins on sheet 2 are all 0.5inch 
-+ TEST OK : Test margins (headers)
-+ TEST START : Test header/footer text
-+  ITEM Assertion OK : PageSetup.LeftHeader set
-+  ITEM Assertion OK : PageSetup.LeftHeader set/get
-+  ITEM Assertion OK : PageSetup.CenterHeader set
-+  ITEM Assertion OK : PageSetup.CenterHeader set/get
-+  ITEM Assertion OK : PageSetup.RightHeader set
-+  ITEM Assertion OK : PageSetup.RightHeader set/get
-+  ITEM Assertion OK : PageSetup.LeftFooter set
-+  ITEM Assertion OK : PageSetup.LeftFooter set/get
-+  ITEM Assertion OK : PageSetup.CenterFooter set
-+  ITEM Assertion OK : PageSetup.CenterFooter set/get
-+  ITEM Assertion OK : PageSetup.RightFooter set
-+  ITEM Assertion OK : PageSetup.RightFooter set/get
-+Verify that headers on sheet 2 are Ready,to,go
-+Verify that footers on sheet 2 are This,now,Works
-+ TEST OK : Test header/footer text
-+ TEST START : Test zoom
-+  ITEM Assertion OK : PageSetup.Zoom set
-+  ITEM Assertion OK : PageSetup.Zoom set/get
-+Verify that sheet 1 zoom is 10%
-+ TEST OK : Test zoom
-+ TEST START : Test orientation
-+  ITEM Assertion OK : PageSetup.Zoom set
-+  ITEM Assertion OK : PageSetup.Orientation set/get
-+Verify that sheet 1 orientation is now landscape
-+ TEST OK : Test orientation
-+ TEST START : Test order
-+  ITEM Assertion OK : PageSetup.Order get
-+  ITEM Assertion OK : PageSetup.Order set/get
-+Verify that order on sheet 1 is now over, then down.
-+ TEST OK : Test order
-+ TEST START : Test first page number
-+  ITEM Assertion OK : PageSetup.FirstPageNumber get
-+  ITEM Assertion OK : PageSetup.FirstPageNumber set/get
-+Verify that first page number on sheet 1 is now 2.
-+ TEST OK : Test first page number
-+ TEST START : Test center vertically
-+  ITEM Assertion OK : PageSetup.CenterVertically get
-+  ITEM Assertion OK : PageSetup.CenterVertically set/get
-+Verify that CenterVertically on sheet 1 is now true.
-+ TEST OK : Test center vertically
-+ TEST START : Test center horizontally
-+  ITEM Assertion OK : PageSetup.CenterHorizontally get
-+  ITEM Assertion OK : PageSetup.CenterHorizontally set/get
-+Verify that CenterHorizontally on sheet 1 is now true.
-+ TEST OK : Test center horizontally
-+ TEST START : Test FitToPagesTall
-+  ITEM Assertion OK : PageSetup.FitToPagesTall set/get
-+ TEST OK : Test FitToPagesTall
-+ TEST START : Test FitToPagesWide
-+  ITEM Assertion OK : PageSetup.FitToPagesWide set/get
-+ TEST OK : Test FitToPagesWide
-+ TEST START : Test PrintHeadings
-+  ITEM Assertion OK : PageSetup.PrintHeadings set/get
-+  ITEM Assertion OK : PageSetup.PrintHeadings set/get
-+ TEST OK : Test PrintHeadings
-+END  PageSetup
-+Test run finished : 07/21/2008 02:00:07 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log
-new file mode 100644
-index 0000000..7b4f2a0
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log
-@@ -0,0 +1,11 @@
-+Test run started : 12/10/2007 11:26:43 AM
-+BEGIN Partition
-+ TEST START : Test Partition function
-+  ITEM Assertion OK : the number 20 occurs in the range:20:24
-+  ITEM Assertion OK : the number 20 occurs in the range: 20: 20
-+  ITEM Assertion OK : the number 120 occurs in the range:100:   
-+  ITEM Assertion OK : the number -5 occurs in the range:   : -1
-+  ITEM Assertion OK : the number 2 occurs in the range: 2: 3
-+ TEST OK : Test Partition function
-+END  Partition
-+Test run finished : 12/10/2007 11:26:43 AM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log
-new file mode 100644
-index 0000000..fb37b6f
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log
-@@ -0,0 +1,16 @@
-+Test run started : 2008ï06ï19 17:14:57
-+----------------------------------------------------------------
-+ShowDetail-Issue
-+ TEST START : ShowDetail-Issue
-+  ITEM Assertion OK :  Range.ShowDetail is True
-+  ITEM Assertion OK :  Range.ShowDetail is False
-+END 'ShowDetail-Issue' Symbol
-+ TEST OK : ShowDetail-Issue
-+----------------------------------------------------------------
-+RangeMerged-Issue
-+ TEST START : RangeMerged-Issue
-+  ITEM Assertion OK :  Range.RangeMerged is $F$2:$H$5
-+  ITEM Assertion OK :  The first address of Range.RangeMerged is $F$2
-+END 'RangeMerged-Issue' Symbol
-+ TEST OK : RangeMerged-Issue
-+Test run finished : 2008ï06ï19 17:14:57
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log
-new file mode 100644
-index 0000000..461955d
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log
-@@ -0,0 +1,14 @@
-+Test run started : 17/12/2008 13:53:49
-+BEGIN Replace
-+ TEST START : Test Replace function
-+  ITEM Assertion OK : common string:aefefdBc
-+  ITEM Assertion OK : expression string:aefefdef
-+  ITEM Assertion OK : binanary compare:aefefdBc
-+  ITEM Assertion OK : text compare:aefefdef
-+  ITEM Assertion OK : text compare:aefefdef
-+  ITEM Assertion OK : start = 3:cefdBc
-+  ITEM Assertion OK : count = 2: aefefdBc
-+  ITEM Assertion OK : start = 1, count = 0, not support in Unix: abcbcdBc
-+ TEST OK : Test Replace function
-+END  Replace
-+Test run finished : 17/12/2008 13:53:49
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log
-new file mode 100644
-index 0000000..6e8b8d9
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log
-@@ -0,0 +1,62 @@
-+Test run started : 05/29/2008 02:51:22 PM
-+BEGIN String Plus Double
-+ TEST START : double = string + double
-+The next compute raises error: s = null, d = null, r = s + d
-+  ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
-+  ITEM Assertion OK : s = null, d = null, r = s & d .The result is: 0
-+The next compute raises error: s = null, d = 20, r = s + d
-+  ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: -1
-+  ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
-+  ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
-+  ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 100
-+  ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 30
-+  ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
-+The next compute raises error: s = 'abc', d = null, r = s + d
-+  ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
-+The next compute raises error: s = 'abc', d = null, r = s & d
-+  ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: -1
-+The next compute raises error: s = 'abc', d = 20, r = s + d
-+  ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
-+The next compute raises error: s = 'abc', d = 20, r = s & d
-+  ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: -1
-+ TEST OK : double = string + double
-+ TEST START : string = string + double
-+The next compute raises error: s = null, d = null, r = s + d
-+  ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
-+  ITEM Assertion OK : s = null, d = null, r = s & d .The result is: 0
-+The next compute raises error: s = null, d = 20, r = s + d
-+  ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: -1
-+  ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
-+  ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
-+  ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 100
-+  ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 30
-+  ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
-+The next compute raises error: s = 'abc', d = null, r = s + d
-+  ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
-+  ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: abc0
-+The next compute raises error: s = 'abc', d = 20, r = s + d
-+  ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
-+  ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: abc20
-+ TEST OK : string = string + double
-+ TEST START : double = string + string
-+The next compute raises error: s = null, d = null, r = s + d
-+  ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
-+The next compute raises error: s = null, d = null, r = s & d
-+  ITEM Assertion OK : s = null, d = null, r = s & d .The result is: -1
-+  ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: 20
-+  ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
-+  ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
-+  ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 10
-+  ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 1020
-+  ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
-+The next compute raises error: s = 'abc', d = null, r = s + d
-+  ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
-+The next compute raises error: s = 'abc', d = null, r = s & d
-+  ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: -1
-+The next compute raises error: s = 'abc', d = 20, r = s + d
-+  ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
-+The next compute raises error: s = 'abc', d = 20, r = s & d
-+  ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: -1
-+ TEST OK : double = string + string
-+END  String Plus Double
-+Test run finished : 05/29/2008 02:51:22 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log
-new file mode 100644
-index 0000000..5d297f8
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log
-@@ -0,0 +1,45 @@
-+Test run started : 05/29/2008 02:55:48 PM
-+BEGIN Window2
-+ TEST START : Test Window.SplitRow
-+  ITEM Assertion OK : Test SplitColumn: 2
-+  ITEM Assertion FAIL : Test SplitRow: 5
-+  ITEM Assertion FAIL : Test SplitVertical: 64.5090003183026
-+  ITEM Assertion OK : Test SplitHorizontal: 502.570118758869
-+  ITEM Assertion OK : Test SplitVertical: 242.283803521067
-+  ITEM Assertion OK : Test SplitRow: 19
-+  ITEM Assertion OK : Test SplitHorizontal: 242.283803521067
-+  ITEM Assertion OK : Test SplitColumn: 1
-+  ITEM Assertion FAIL : Test SplitRow: 8
-+  ITEM Assertion OK : Test SplitColumn: 10
-+  ITEM Assertion OK : Test SplitColumn: 0
-+  ITEM Assertion OK : Test SplitRow: 0
-+ TEST OK : Test Window.SplitRow
-+TEST ERROR - no test begun: Test Window.SplitRow
-+ TEST START : Test Window.DisplayGridlines
-+  ITEM Assertion OK : Test gridlines are on
-+  ITEM Assertion OK : Test gridlines are off
-+ TEST OK : Test Window.DisplayGridlines
-+ TEST START : Test Window.DisplayHeadings
-+  ITEM Assertion OK : Test Headings are on
-+  ITEM Assertion OK : Test Headings are off
-+ TEST OK : Test Window.DisplayHeadings
-+ TEST START : Test Window.Visibility
-+  ITEM Assertion OK : Window is visible
-+ TEST FAIL : Test Window.Visibility (hit error handler).
-+ TEST START : Test Window.FreezePanes
-+  ITEM Assertion OK : Test no panes frozen
-+  ITEM Assertion OK : Test panes frozen at center
-+  ITEM Assertion OK : Test panes frozen at split
-+ TEST OK : Test Window.FreezePanes
-+ TEST START : Test Window.View
-+ TEST OK : Test Window.View
-+ TEST START : Test Window.Zoom
-+  ITEM Assertion OK : Test zoom=100%
-+  ITEM Assertion OK : Test zoom=150%
-+ TEST OK : Test Window.Zoom
-+ TEST START : Test Windows.Count
-+  ITEM Assertion OK : Windows Count: 1
-+  ITEM Assertion OK : Application.Windows Count: 1
-+ TEST OK : Test Windows.Count
-+END  Window2
-+Test run finished : 05/29/2008 02:55:48 PM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log
-new file mode 100644
-index 0000000..b8d0b85
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log
-@@ -0,0 +1,20 @@
-+Test run started : 16/10/2007 17:42:01
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+  ITEM Assertion OK : test1 'starts with' string criteria
-+  ITEM Assertion OK : test2 'not equal to' string criteria
-+  ITEM Assertion OK : test3 'ends with' string criteria
-+  ITEM Assertion OK : test4 field 'all' 
-+  ITEM Assertion OK : test5 numeric '<15' 
-+  ITEM Assertion OK : test6 numeric '>=15' 
-+  ITEM Assertion OK : test7 numeric '<=12' 
-+Test Results
-+============
-+
-+Tests passed: 7
-+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 16/10/2007 17:42:02
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log
-new file mode 100644
-index 0000000..d190abb
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log
-@@ -0,0 +1,45 @@
-+Test run started : 17/07/2007 15:08:56
-+----------------------------------------------------------------
-+MiscRangeTests
-+ TEST START : MiscRangeTests
-+  ITEM Assertion OK : test 1
-+  ITEM Assertion OK : test 2
-+  ITEM Assertion OK : test 3
-+  ITEM Assertion OK : test 4
-+  ITEM Assertion OK : test 5
-+  ITEM Assertion OK : test 6
-+  ITEM Assertion OK : test 7
-+  ITEM Assertion OK : test 8
-+  ITEM Assertion OK : test 9
-+  ITEM Assertion OK : test 10
-+  ITEM Assertion OK : test 11
-+  ITEM Assertion OK : test 12
-+  ITEM Assertion OK : test 13
-+  ITEM Assertion OK : test 14
-+  ITEM Assertion OK : test 15
-+  ITEM Assertion OK : test 16
-+  ITEM Assertion OK : test 17
-+  ITEM Assertion OK : test 18
-+  ITEM Assertion OK : test 19
-+  ITEM Assertion OK : test 20
-+  ITEM Assertion OK : test 21
-+  ITEM Assertion OK : test 22
-+  ITEM Assertion OK : test 23
-+  ITEM Assertion OK : test 24
-+  ITEM Assertion OK : test 25
-+  ITEM Assertion OK : test 26
-+  ITEM Assertion OK : test 27
-+  ITEM Assertion OK : test 28
-+  ITEM Assertion OK : test 29
-+  ITEM Assertion OK : test 30
-+  ITEM Assertion OK : test 31
-+No. tests: 31
-+Summary
-+=======
-+Run:       31
-+Passed:    31
-+Failed:    0
-+
-+END 'MiscRangeTests
-+ TEST OK : MiscRangeTests
-+Test run finished : 17/07/2007 15:08:59
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log
-new file mode 100644
-index 0000000..b80d996
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log
-@@ -0,0 +1,68 @@
-+Test run started : 10/07/2007 01:55:47
-+----------------------------------------------------------------
-+ClearFormtsIssue
-+ TEST START : ClearFormtsIssue
-+  ITEM Assertion OK : Range.Font.Bold is: True
-+  ITEM Assertion OK : Range.Font.Bold is: False
-+END 'ClearFormtsIssue' Symbol
-+ TEST OK : ClearFormtsIssue
-+----------------------------------------------------------------
-+VerticalAlignment-Issue
-+ TEST START : VerticalAlignment-Issue
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range.VerticalAlignment (set)
-+  ITEM Assertion OK : Range.VeritcalAlignment is Null
-+END 'VerticalAlignment-Issue' Symbol
-+ TEST OK : VerticalAlignment-Issue
-+----------------------------------------------------------------
-+HorizontalAlignment-Issue
-+ TEST START : HorizontalAlignment-Issue
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
-+  ITEM Assertion OK : Range.HorizontalAlignment is Null
-+END 'HorizontalAlignment-Issue' Symbol
-+ TEST OK : HorizontalAlignment-Issue
-+----------------------------------------------------------------
-+WrapText-Issue
-+ TEST START : WrapText-Issue
-+  ITEM Assertion OK : -  Range.WrapText (get)
-+  ITEM Assertion OK : -  Range.WrapText (get)
-+  ITEM Assertion OK : Range.WrapText is Null
-+END 'WrapText-Issue' Symbol
-+ TEST OK : WrapText-Issue
-+----------------------------------------------------------------
-+FontBorderIssues
-+ TEST START : FontBorderIssues
-+  ITEM Assertion OK : -  = Borders.Color (getColor)
-+  ITEM Assertion OK : -  = Font.Color (getColor)
-+END 'FontBorderIssues' Symbol
-+ TEST OK : FontBorderIssues
-+----------------------------------------------------------------
-+RangeSizeIssues
-+ TEST START : RangeSizeIssues
-+  ITEM Assertion OK : Range.Left is: 100.5291
-+  ITEM Assertion OK : Range.Top is: 95.39775
-+  ITEM Assertion OK : Range.Width is: 191.25
-+  ITEM Assertion OK : Range.Height is: 271.5
-+END 'RangeSizeIssues' Symbol
-+ TEST OK : RangeSizeIssues
-+----------------------------------------------------------------
-+ApplicationIssues
-+ TEST START : ApplicationIssues
-+  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
-+END 'ApplicationIssues' Symbol
-+ TEST OK : ApplicationIssues
-+Test run finished : 10/07/2007 01:55:48
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log
-new file mode 100644
-index 0000000..365d126
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log
-@@ -0,0 +1,8 @@
-+Test run started : 10/07/2007 01:55:51
-+----------------------------------------------------------------
-+MyGoalseek-Issue
-+ TEST START : MyGoalseek-Issue
-+  ITEM Assertion OK : Variable Range value: 15
-+END 'MyGoalseek-Issue' Symbol
-+ TEST OK : MyGoalseek-Issue
-+Test run finished : 10/07/2007 01:55:51
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log
-new file mode 100644
-index 0000000..fe77d7a
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log
-@@ -0,0 +1,280 @@
-+Test run started : 10/07/2007 01:55:56
-+----------------------------------------------------------------
-+ApplicationMethods
-+ TEST START : ApplicationMethods
-+  ITEM Assertion OK :  Name of Workbook is: Ranges.xls
-+  ITEM Assertion OK :  Address of Application.Columns is: $A:$A
-+  ITEM Assertion OK :  Address of Application.Rows is: $1:$1
-+  ITEM Assertion OK :  Address of Application.Range is: $1:$1,$5:$7
-+  ITEM Assertion OK :  Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
-+  ITEM Assertion OK :  Please check manually: Library Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org2\user\basic
-+  ITEM Assertion OK :  Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org2\user\template
-+  ITEM Assertion OK :  FileSeparator is \
-+  ITEM Assertion OK :  Name of ActiveWorkbook is: Ranges.xls
-+END 'ApplicationMethods' Symbol
-+ TEST OK : ApplicationMethods
-+----------------------------------------------------------------
-+Insert-Issue
-+ TEST START : Insert-Issue
-+  ITEM Assertion OK : Insert with xlShiftToRight: 10
-+END 'Insert-Issue' Symbol
-+ TEST OK : Insert-Issue
-+----------------------------------------------------------------
-+MergeCells-Issue
-+ TEST START : MergeCells-Issue
-+  ITEM Assertion OK :  Range.MergeCells is True
-+  ITEM Assertion FAIL : MergeCells is null: False
-+  ITEM Assertion OK : RowCount after Merge: 13
-+  ITEM Assertion OK :  Range.MergeCells is False
-+  ITEM Assertion OK : MergeCells is null: False
-+  ITEM Assertion FAIL : MergeCells of Second Area is null : False
-+  ITEM Assertion FAIL : MergeCells of Ranges is Null: False
-+  ITEM Assertion OK : RowCount after Merge: 7
-+  ITEM Assertion OK :  Range.MergeCells is False
-+  ITEM Assertion OK : MergeCells is null: False
-+  ITEM Assertion OK : RowCount after Merge: 7
-+END 'MergeCells-Issue' Symbol
-+ TEST OK : MergeCells-Issue
-+----------------------------------------------------------------
-+Areas-Issue
-+ TEST START : Areas-Issue
-+  ITEM Assertion OK : Range Areas Count is2
-+  ITEM Assertion OK : First Range Address is: $E$8:$G$13
-+  ITEM Assertion OK : First Row is: 8
-+  ITEM Assertion OK : First Column is: 5
-+  ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
-+  ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
-+  ITEM Assertion OK : Range Count:53
-+END 'Areas-Issue' Symbol
-+ TEST OK : Areas-Issue
-+----------------------------------------------------------------
-+Fill-Methods-Issue
-+ TEST START : Fill-Methods-Issue
-+  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyRightFillValue
-+  ITEM Assertion OK :  Range Value after FillDown: MyBottomFillValue
-+END 'Fill-Methods-Issue' Symbol
-+ TEST OK : Fill-Methods-Issue
-+----------------------------------------------------------------
-+Range/Item-Method-Issue
-+ TEST START : Range/Item-Method-Issue
-+  ITEM Assertion OK :  Range of multiple columns is: $A:$A,$C:$C
-+  ITEM Assertion OK :  Range of multiple rows is: $1:$1,$5:$7
-+  ITEM Assertion OK :  Range of several columns is: $C:$E,$D:$D
-+  ITEM Assertion OK :  Range of several rows is: $5:$8,$6:$10
-+  ITEM Assertion OK :  Range of several single cells is: $C$5,$E$8
-+  ITEM Assertion OK :  Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK :  Range of a single Item Cell is: $E$21
-+  ITEM Assertion OK :  Range of a single Item Cell is: $F$21
-+  ITEM Assertion OK :  Range of a single Item Cell is: $F$10
-+END 'Range/Item-Method-Issue' Symbol
-+ TEST OK : Range/Item-Method-Issue
-+----------------------------------------------------------------
-+R1C1-Formulas-Issue
-+ TEST START : R1C1-Formulas-Issue
-+  ITEM Assertion OK :  R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
-+  ITEM Assertion FAIL :  Range.Formula is: =IF(OR(J8=0,RC[2]="YES"),"")
-+END 'R1C1-Formulas-Issue' Symbol
-+ TEST OK : R1C1-Formulas-Issue
-+----------------------------------------------------------------
-+Verify_Delete
-+ TEST START : Verify_Delete
-+  ITEM Assertion OK : Ranges are intersecting: $G$13
-+  ITEM Assertion OK : Delete with Default: $AJ$4
-+  ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
-+  ITEM Assertion OK : Delete with ShiftUp: $M$22
-+END 'Verify_Delete' Symbol
-+ TEST OK : Verify_Delete
-+----------------------------------------------------------------
-+Value-Issue
-+ TEST START : Value-Issue
-+  ITEM Assertion OK : Value of Range is: 12.3
-+  ITEM Assertion OK : Text of Range is: 12.3
-+  ITEM Assertion OK : Range has Formula: False
-+  ITEM Assertion OK : Cell has Formula: False
-+  ITEM Assertion FAIL : Text of Range is null: False
-+  ITEM Assertion OK : Range has Formula: True
-+  ITEM Assertion OK : Cell has Formula: True
-+  ITEM Assertion OK : Value of Cell is: 12
-+  ITEM Assertion OK : Application.Calculation is : -4135
-+  ITEM Assertion OK : Calculation is automated: True
-+  ITEM Assertion OK : Range has Formula: True
-+  ITEM Assertion OK : Value of Cell is: 16
-+  ITEM Assertion OK : Text of Cell is: 16
-+  ITEM Assertion OK : Text of Cell is: 16
-+  ITEM Assertion OK : Range has Formula after 'ClearContents: False
-+  ITEM Assertion OK : Text of Cell is: 
-+  ITEM Assertion OK : Text of Cell is: 
-+END 'Value-Issue' Symbol
-+ TEST OK : Value-Issue
-+----------------------------------------------------------------
-+AutoFit issue
-+ TEST START : AutoFit issue
-+  ITEM Assertion OK :  Columns.AutoFit: CurrentWidth is 467
-+  ITEM Assertion FAIL :  Rows.AutoFit: CurrentHeight is 78
-+END 'AutoFit issue' Symbol
-+ TEST OK : AutoFit issue
-+----------------------------------------------------------------
-+Selections
-+ TEST START : Selections
-+  ITEM Assertion OK : ActiveCell is : $E$8
-+  ITEM Assertion OK : Active Cell is : $E$8
-+  ITEM Assertion OK : Number of Cells in Range: 52
-+  ITEM Assertion OK : Number of Cells in Range: 52
-+  ITEM Assertion OK : Number of Cells in Range: 52
-+END 'Selections' Symbol
-+ TEST OK : Selections
-+----------------------------------------------------------------
-+Offset-Resize
-+ TEST START : Offset-Resize
-+  ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
-+  ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
-+  ITEM Assertion OK :   Resized Range is : $A$20:$D$23
-+END 'Offset-Resize' Symbol
-+ TEST OK : Offset-Resize
-+----------------------------------------------------------------
-+Ranges-Address
-+ TEST START : Ranges-Address
-+  ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
-+  ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
-+  ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+  ITEM Assertion FAIL : Range Address is: R8C5:R13C7,R13C7:R19C11
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
-+END 'Ranges-Address' Symbol
-+ TEST OK : Ranges-Address
-+----------------------------------------------------------------
-+Range-Address
-+ TEST START : Range-Address
-+  ITEM Assertion OK : Range Address is: $E$8:$G$13
-+  ITEM Assertion OK : Range Address is: $E8:$G13
-+  ITEM Assertion OK : Range Address is: E$8:G$13
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7
-+  ITEM Assertion FAIL : Range Address is: R8C5:R13C7
-+  ITEM Assertion OK : Range Address is: R8C5:R13C7
-+  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
-+END 'Range-Address' Symbol
-+ TEST OK : Range-Address
-+----------------------------------------------------------------
-+Column-Address
-+ TEST START : Column-Address
-+  ITEM Assertion OK : Range Address is: $F$8:$F$13
-+  ITEM Assertion OK : Range Address is: $F8:$F13
-+  ITEM Assertion OK : Range Address is: F$8:F$13
-+  ITEM Assertion OK : Range Address is: R8C6:R13C6
-+  ITEM Assertion FAIL : Range Address is: R8C6:R13C6
-+  ITEM Assertion OK : Range Address is: R8C6:R13C6
-+  ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
-+END 'Column-Address' Symbol
-+ TEST OK : Column-Address
-+----------------------------------------------------------------
-+Row-Address
-+ TEST START : Row-Address
-+  ITEM Assertion OK : Range Address is: $E$9:$G$9
-+  ITEM Assertion OK : Range Address is: $E9:$G9
-+  ITEM Assertion OK : Range Address is: E$9:G$9
-+  ITEM Assertion OK : Range Address is: R9C5:R9C7
-+  ITEM Assertion FAIL : Range Address is: R9C5:R9C7
-+  ITEM Assertion OK : Range Address is: R9C5:R9C7
-+  ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
-+END 'Row-Address' Symbol
-+ TEST OK : Row-Address
-+----------------------------------------------------------------
-+SingleCell-Address
-+ TEST START : SingleCell-Address
-+  ITEM Assertion OK : Range Address is: $F$9
-+  ITEM Assertion OK : Range Address is: $F9
-+  ITEM Assertion OK : Range Address is: F$9
-+  ITEM Assertion OK : Range Address is: R9C6
-+  ITEM Assertion FAIL : Range Address is: R9C6
-+  ITEM Assertion OK : Range Address is: R9C6
-+  ITEM Assertion OK : Range Address is: R[7]C[4]
-+  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
-+END 'SingleCell-Address' Symbol
-+ TEST OK : SingleCell-Address
-+----------------------------------------------------------------
-+Heights and Widths
-+ TEST START : Heights and Widths
-+  ITEM Assertion OK : Range RowHeight is 40
-+  ITEM Assertion OK : Range ColumnWidth is 50
-+  ITEM Assertion OK : Range Height is 240
-+  ITEM Assertion FAIL : Range Width is 675
-+  ITEM Assertion OK : Range RowHeight is 50
-+  ITEM Assertion OK : Range ColumnWidth is 50
-+  ITEM Assertion OK : Range Height is 300
-+  ITEM Assertion FAIL : Range Width is 675
-+  ITEM Assertion FAIL : RowHeight is null: False
-+  ITEM Assertion OK : ColumnWidth is null: True
-+END 'Heights and Widths' Symbol
-+ TEST OK : Heights and Widths
-+----------------------------------------------------------------
-+RangeRowColumn-Issue
-+ TEST START : RangeRowColumn-Issue
-+  ITEM Assertion OK : Row is: 8
-+  ITEM Assertion OK : Column is: 5
-+  ITEM Assertion OK : EntireRow.Columns.Count = 256
-+  ITEM Assertion OK : EntireColumn.Rows.Count = 131072
-+END 'RangeRowColumn-Issue' Symbol
-+ TEST OK : RangeRowColumn-Issue
-+----------------------------------------------------------------
-+Replace-Issue
-+ TEST START : Replace-Issue
-+  ITEM Assertion OK : Value after Replace: YourValue
-+  ITEM Assertion OK : Value after Replace: YourValue
-+  ITEM Assertion OK : Value after Replace: ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New ReplaceValue
-+  ITEM Assertion OK : Value after Replace: New Replace
-+  ITEM Assertion OK : Value after Replace: 
-+END 'Replace-Issue' Symbol
-+ TEST OK : Replace-Issue
-+----------------------------------------------------------------
-+Hidden-Issue
-+ TEST START : Hidden-Issue
-+  ITEM Assertion OK : -  Range.Rows.Hidden (set)
-+  ITEM Assertion OK : -  Range.Rows.Hidden (get)
-+  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (set)
-+  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (get)
-+  ITEM Assertion OK : -  Range.Columns.Hidden (set)
-+  ITEM Assertion OK : -  Range.Columns.Hidden (get)
-+  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (set)
-+  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (get)
-+END 'Hidden-Issue' Symbol
-+ TEST OK : Hidden-Issue
-+----------------------------------------------------------------
-+End issue
-+ TEST START : End issue
-+  ITEM Assertion OK : -  = $E$48
-+  ITEM Assertion OK : -  = $E$1
-+  ITEM Assertion OK : -  = $E$3
-+  ITEM Assertion OK : -  = $A$8
-+  ITEM Assertion OK : -  = $B$8
-+  ITEM Assertion OK : -  = $IV$8
-+  ITEM Assertion OK : -  = $Z$8
-+END 'End issue' Symbol
-+ TEST OK : End issue
-+----------------------------------------------------------------
-+Outline issue
-+ TEST START : Outline issue
-+  ITEM Assertion OK : -  Range.clearOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+END 'Outline issue' Symbol
-+ TEST OK : Outline issue
-+----------------------------------------------------------------
-+Validation
-+ TEST START : Validation
-+  ITEM Assertion OK : Validation Input Message is : Attention!
-+  ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
-+  ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
-+  ITEM Assertion OK : Validation Error Message is : An Error occured
-+  ITEM Assertion OK : Validation Error Title is : Microsoft Excel
-+END 'Validation' Symbol
-+ TEST OK : Validation
-+Test run finished : 10/07/2007 01:56:04
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log
-new file mode 100644
-index 0000000..fe62ab0
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log
-@@ -0,0 +1,77 @@
-+Test run started : 16/10/2007 17:46:03
-+BEGIN Shapes_Collection_Behaviour
-+ TEST START : Shapes_Collection_Behaviour
-+  ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1' 
-+  ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2' 
-+ TEST Success. : Shapes_Collection_Behaviour
-+END Shapes_Collection_Behaviour
-+BEGIN Shapes_Select_Item
-+ TEST START : Shapes_Select_Item
-+  ITEM Assertion OK : Correctly selected shape through Range
-+  ITEM Assertion OK : Correctly selected shape through Item
-+  ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
-+  ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
-+ TEST Success. : Shapes_Select_Item
-+END Shapes_Select_Item
-+BEGIN Shapes_Fill
-+ TEST START : Shapes_Fill
-+  ITEM Assertion OK : correctly set visibility of shape fill
-+  ITEM Assertion OK : correctly set transparency of shape line
-+  ITEM Assertion OK : correctly set forecolor of shape fill
-+  ITEM Assertion FAIL : correctly set backcolor of shape fill
-+  ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
-+  ITEM Assertion OK : correctly set forecolor of shape fill
-+  ITEM Assertion FAIL : correctly set forecolor of shape fill
-+ TEST Success. : Shapes_Fill
-+END  Shapes_Fill
-+BEGIN Shapes_Line
-+ TEST START : Shapes_Line
-+  ITEM Assertion FAIL : correctly set weight of shape line
-+  ITEM Assertion OK : correctly set visibility of shape line
-+  ITEM Assertion OK : correctly set transparency of shape line
-+  ITEM Assertion OK : correctly set dash style of shape line
-+  ITEM Assertion OK : correctly set dash style of shape line
-+  ITEM Assertion OK : correctly set forecolor of shape line
-+  ITEM Assertion FAIL : correctly set backcolor of shape line
-+ TEST Success. : Shapes_Line
-+END  Shapes_Line
-+BEGIN Shapes_TextFrame
-+ TEST START : Shapes_TextFrame
-+  ITEM Assertion OK : correctly set Autosize of Shape TextFrame
-+ TEST Success. : Shapes_TextFrame
-+END  Shapes_TextFrame
-+BEGIN Shapes_SimpleGeometry
-+ TEST START : Shapes_SimpleGeometery
-+  ITEM Assertion OK : shape height should be 49.4519655148368 and got 49.4078709034412
-+  ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
-+  ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
-+  ITEM Assertion OK : shape top should be 44.1511784471699 and got 44.1354302906816
-+  ITEM Assertion OK : shape rotation should be 0 and got 0
-+  ITEM Assertion OK : shape rotation should be 25 and got 25
-+  ITEM Assertion OK : shape incrementrotation should be 50 and got 50
-+  ITEM Assertion OK : shape incrementleft should be 69.7480272284707 and got 69.7322790719824
-+  ITEM Assertion OK : shape incrementtop should be 93.8141674447769 and got 93.7984192882885
-+ TEST Success. : Shapes_SimpleGeometery
-+END Shapes_SimpleGeometry
-+BEGIN Shapes_Range
-+ TEST START : Shapes_Range
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
-+  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
-+ TEST Success. : Shapes_Range
-+END Shapes_Range
-+BEGIN Shapes_ShapeRange
-+ TEST START : Shapes_ShapeRange
-+  ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 89.7322790719824 and got 89.7165297816359
-+  ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
-+  ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 113.798419288289 and got 113.782669997942
-+  ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 67.4519655148368 and got 67.4362162244903
-+  ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
-+  ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
-+END Shapes_ShapeRange
-+Test run finished : 16/10/2007 17:46:04
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log
-new file mode 100644
-index 0000000..cc51e37
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log
-@@ -0,0 +1,62 @@
-+Test run started : 17/07/2007 15:26:54
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+  ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
-+  ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
-+  ITEM Assertion OK : test3 Range ('e:f')  A1 style addressing
-+  ITEM Assertion OK : test4 Range ('e:f')  R1C1 style addressing
-+  ITEM Assertion OK : test5 Columns A1 style addressing
-+  ITEM Assertion OK : test6 Columns R1C1 style addressing
-+  ITEM Assertion OK : test7 Columns(3) A1 style addressing
-+  ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
-+  ITEM Assertion OK : test9 Columns('e') A1 style addressing
-+  ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
-+  ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
-+  ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
-+  ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
-+  ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
-+  ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
-+  ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
-+  ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
-+  ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
-+  ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
-+  ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
-+  ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
-+  ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+  ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
-+  ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
-+  ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
-+  ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false 
-+  ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false 
-+  ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
-+  ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
-+  ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
-+  ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
-+  ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
-+  ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+  ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
-+  ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+  ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
-+  ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
-+  ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
-+  ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
-+  ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
-+  ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
-+  ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
-+  ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
-+  ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
-+  ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
-+  ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
-+  ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
-+Test Results
-+============
-+
-+Tests passed: 49
-+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 17/07/2007 15:26:56
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log
-new file mode 100644
-index 0000000..492c24b
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log
-@@ -0,0 +1,60 @@
-+Test run started : 10/07/2007 01:56:07
-+BEGIN TestCalc
-+ TEST START : RangeTest2
-+  ITEM Assertion OK : -  Range("D15").Row 
-+  ITEM Assertion OK : -  WorkSheet("D15").Range.Row 
-+  ITEM Assertion OK : -  Range("D15").Column 
-+  ITEM Assertion OK : -  Worksheet.Range("D15").Column 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
-+  ITEM Assertion OK : -  Range("D1").EntireRow.Columns.Count 
-+  ITEM Assertion OK : -  Range("D1").EntireColumn.Rows.Count 
-+  ITEM Assertion OK : -  Range("D15").ClearContent
-+  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (get)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (set)
-+  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (get)
-+  ITEM Assertion OK : -  Range("B38").Orientation (get)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlDownward)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlUpward)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set)
-+  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
-+  ITEM Assertion OK : -  Range("B39").WrapText (get)
-+  ITEM Assertion OK : -  Range("B39").WrapText (set)
-+  ITEM Assertion OK : -  Range("B39").WrapText (set)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (get)
-+  ITEM Assertion OK : -  Range("F39").MergeCells (get)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (set)
-+  ITEM Assertion FAIL : -  Range("F39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("E39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("F39").MergeCells (set)
-+  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
-+  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
-+  ITEM Assertion OK : -  Range("D41:D42").Replace  MatchCase:=False 
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
-+  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
-+  ITEM FAIL (RangeTest2)
-+ TEST Not succesfully completed : RangeTest2
-+END   TestCalc
-+Test run finished : 10/07/2007 01:56:12
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log
-new file mode 100644
-index 0000000..2532289
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log
-@@ -0,0 +1,65 @@
-+Test run started : 10/07/2007 01:56:15
-+BEGIN TestCalc
-+ TEST START : RangeTest3
-+  ITEM Assertion FAIL : - setFormulaR1C1
-+  ITEM Assertion OK : - getFormulaR1C1
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy(Range("I10"))
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
-+  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
-+  ITEM Assertion OK : PasteSpecial 
-+  ITEM Assertion OK : PasteSpecial SkipBlanks:=True
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
-+  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
-+  ITEM Assertion OK : PasteSpecial Transpose:=True
-+  ITEM Assertion FAIL : ActiveWorkbook.FileFormat
-+  ITEM Assertion OK : ActiveWorkbook.Name
-+  ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
-+  ITEM Assertion FAIL : -  = ActiveWorkbook.Colors(3) set
-+  ITEM Assertion OK : -  = ActiveWorkbook.ResetColors
-+  ITEM Assertion OK : -  = ActiveWorkbook.Colors(3) get
-+  ITEM Assertion OK : -  = Range("K22").End (xlDown)
-+  ITEM Assertion OK : -  = Range("K22").End (xlUo)
-+  ITEM Assertion OK : -  = Range("K22").End (xlToLeft)
-+  ITEM Assertion OK : -  = Range("K22").End (xlRight)
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Next
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Next
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
-+  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="="
-+  ITEM Assertion OK : -  Range("J4:J11").AutoFilter 
-+  ITEM Assertion OK : -  ActiveSheet.Resize.Select
-+  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
-+  ITEM Assertion FAIL : -  Application.GoTo Reference:="R[8]C[2]"
-+  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Ungroup- please check visually
-+  ITEM Assertion OK : -  Range.Ungroup - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.Group - please check visually
-+  ITEM Assertion OK : -  Range.clearOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  Range.AutoOutline - please check visually
-+  ITEM Assertion OK : -  ActiveSheet.UsedRange.Select
-+  ITEM Assertion OK : -  Range("A13").AddIndent
-+  ITEM Assertion OK : -  Range("A13").IndentLevel set
-+  ITEM Assertion OK : -  Range("A13").IndentLevel get
-+  ITEM Assertion OK : -  Range("A13").IndentLevel get
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
-+  ITEM Assertion OK : - Range.Calculate
-+  ITEM Assertion OK : Worksheet.Calculate
-+  ITEM Assertion OK : - Application.Calculate
-+  ITEM Assertion OK : Global.Calculate
-+  ITEM Assertion OK : Calculation set
-+  ITEM FAIL (RangeTest3)
-+ TEST Not succesfully completed : RangeTest3
-+END   TestCalc
-+Test run finished : 10/07/2007 01:56:23
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log
-new file mode 100644
-index 0000000..a1c9047
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log
-@@ -0,0 +1,87 @@
-+Test run started : 7/21/2008 10:37:24 AM
-+BEGIN PageSetup
-+ TEST START : Sheet_PrintArea
-+  ITEM Assertion OK : PrintArea has changed as expected
-+ TEST OK : Sheet_PrintArea
-+ TEST START : Test margins (no headers)
-+  ITEM Assertion OK : PageSetup.LeftMargin set/get
-+  ITEM Assertion OK : PageSetup.RightMargin set/get
-+  ITEM Assertion OK : PageSetup.TopMargin set/get
-+  ITEM Assertion OK : PageSetup.BottomMargin set/get
-+Verify that page margins on sheet 1 are all 0.5inch   
-+ TEST OK : Test margins (no headers)
-+ TEST START : Test margins (headers)
-+  ITEM Assertion OK : PageSetup.HeaderMargin set/get
-+  ITEM Assertion OK : PageSetup.FooterMargin set/get
-+  ITEM Assertion OK : PageSetup.LeftMargin set/get
-+  ITEM Assertion OK : PageSetup.LeftMargin set/get
-+Verify that top/bottom/header/footer page margins on sheet 2 are all 0.5inch 
-+ TEST OK : Test margins (headers)
-+ TEST START : Test header/footer text
-+  ITEM Assertion OK : PageSetup.LeftHeader set
-+  ITEM Assertion OK : PageSetup.LeftHeader set/get
-+  ITEM Assertion OK : PageSetup.CenterHeader set
-+  ITEM Assertion OK : PageSetup.CenterHeader set/get
-+  ITEM Assertion OK : PageSetup.RightHeader set
-+  ITEM Assertion OK : PageSetup.RightHeader set/get
-+  ITEM Assertion OK : PageSetup.LeftFooter set
-+  ITEM Assertion OK : PageSetup.LeftFooter set/get
-+  ITEM Assertion OK : PageSetup.CenterFooter set
-+  ITEM Assertion OK : PageSetup.CenterFooter set/get
-+  ITEM Assertion OK : PageSetup.RightFooter set
-+  ITEM Assertion OK : PageSetup.RightFooter set/get
-+Verify that headers on sheet 2 are Ready,to,go
-+Verify that footers on sheet 2 are This,now,Works
-+ TEST OK : Test header/footer text
-+ TEST START : Test zoom
-+  ITEM Assertion OK : PageSetup.Zoom set
-+  ITEM Assertion OK : PageSetup.Zoom set/get
-+Verify that sheet 1 zoom is 10%
-+ TEST OK : Test zoom
-+ TEST START : Test orientation
-+  ITEM Assertion OK : PageSetup.Zoom set
-+  ITEM Assertion OK : PageSetup.Orientation set/get
-+Verify that sheet 1 orientation is now landscape
-+ TEST OK : Test orientation
-+ TEST START : Test paper size
-+  ITEM Assertion OK : PageSetup.PaperSize get
-+  ITEM Assertion OK : PageSetup.PaperSize set/get
-+Verify that paper size on sheet 1 is now Letter
-+ TEST OK : Test paper size
-+ TEST START : Test order
-+  ITEM Assertion OK : PageSetup.Order get
-+  ITEM Assertion OK : PageSetup.Order set/get
-+Verify that order on sheet 1 is now over, then down.
-+ TEST OK : Test order
-+ TEST START : Test first page number
-+  ITEM Assertion OK : PageSetup.FirstPageNumber get
-+  ITEM Assertion OK : PageSetup.FirstPageNumber set/get
-+Verify that first page number on sheet 1 is now 2.
-+ TEST OK : Test first page number
-+ TEST START : Test center vertically
-+  ITEM Assertion OK : PageSetup.CenterVertically get
-+  ITEM Assertion OK : PageSetup.CenterVertically set/get
-+Verify that CenterVertically on sheet 1 is now true.
-+ TEST OK : Test center vertically
-+ TEST START : Test center horizontally
-+  ITEM Assertion OK : PageSetup.CenterHorizontally get
-+  ITEM Assertion OK : PageSetup.CenterHorizontally set/get
-+Verify that CenterHorizontally on sheet 1 is now true.
-+ TEST OK : Test center horizontally
-+ TEST START : Test FitToPagesTall
-+  ITEM Assertion OK : PageSetup.FitToPagesTall set/get
-+ TEST OK : Test FitToPagesTall
-+ TEST START : Test FitToPagesWide
-+  ITEM Assertion OK : PageSetup.FitToPagesWide set/get
-+ TEST OK : Test FitToPagesWide
-+ TEST START : Test PrintHeadings
-+  ITEM Assertion OK : PageSetup.PrintHeadings set/get
-+  ITEM Assertion OK : PageSetup.PrintHeadings set/get
-+ TEST OK : Test PrintHeadings
-+ TEST START : Test PrintTitleRows
-+  ITEM Assertion OK : PageSetup.PrintTitleRows get
-+  ITEM Assertion OK : PageSetup.PrintTitleRows set range/get
-+  ITEM Assertion OK : PageSetup.PrintTitleRows set false/get
-+ TEST OK : Test PrintTitleRows
-+END  PageSetup
-+Test run finished : 7/21/2008 10:37:32 AM
-diff --git sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log
-new file mode 100644
-index 0000000..e96004e
---- /dev/null
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log
-@@ -0,0 +1,14 @@
-+Test run started : 2007-11-21 11:24:04
-+BEGIN Replace
-+ TEST START : Test Replace function
-+  ITEM Assertion OK : common string:aefefdBc
-+  ITEM Assertion OK : expression string:aefefdef
-+  ITEM Assertion OK : binanary compare:aefefdBc
-+  ITEM Assertion OK : text compare:aefefdef
-+  ITEM Assertion OK : text compare:aefefdef
-+  ITEM Assertion OK : start = 3:cefdBc
-+  ITEM Assertion OK : count = 2: aefefdBc
-+  ITEM Assertion OK : start = 1, count = 0, not support in Unix: abcbcdBc
-+ TEST OK : Test Replace function
-+END  Replace
-+Test run finished : 2007-11-21 11:24:04
-diff --git sc/source/ui/vba/testvba/TestVBA.java sc/source/ui/vba/testvba/TestVBA.java
-index 70408a6..e69de29 100644
---- sc/source/ui/vba/testvba/TestVBA.java
-+++ sc/source/ui/vba/testvba/TestVBA.java
-@@ -1,198 +0,0 @@
--//package org.openoffice.vba;
--import com.sun.star.uno.UnoRuntime;
--import com.sun.star.script.provider.*;
--import com.sun.star.beans.XPropertySet;
--import com.sun.star.uno.AnyConverter;
--import java.io.File;
--import java.io.InputStream;
--import java.io.FileInputStream;
--import java.io.FileOutputStream;
--import java.io.OutputStream;
--public class TestVBA
--{
--private com.sun.star.lang.XMultiComponentFactory xMCF = null;
--private com.sun.star.uno.XComponentContext xContext = null;
--private com.sun.star.frame.XComponentLoader xCompLoader = null;
--private File outDir;
--
--public TestVBA( com.sun.star.uno.XComponentContext _xContext, com.sun.star.lang.XMultiComponentFactory _xMCF, com.sun.star.frame.XComponentLoader _xCompLoader, File _outDir 
--) 
--{
--    xMCF = _xMCF;
--    xContext = _xContext;
--    xCompLoader = _xCompLoader;
--    outDir = _outDir;
--}
--
--public String getLogLocation() throws  com.sun.star.beans.UnknownPropertyException,  com.sun.star.lang.IllegalArgumentException, com.sun.star.lang.WrappedTargetException,  com.sun.star.uno.Exception
--{
--	XPropertySet pathSettings = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,  xMCF.createInstanceWithContext( "com.sun.star.comp.framework.PathSettings", xContext) );
--        String sLogLocation = AnyConverter.toString ( pathSettings.getPropertyValue( "Work" ) );
--        sLogLocation = sLogLocation + "/" + "HelperAPI-test.log";
--	return sLogLocation;
--}
--
--public void init()
--{
--    // blow away previous logs?
--}
--
--public void traverse( File fileDirectory ) 
--{
--        if ( !fileDirectory.isDirectory() ) 
--        {
--            throw new IllegalArgumentException(
--                "not a directory: " + fileDirectory.getName()
--                );
--        }
--
--        // Getting all files and directories in the current directory
--        File[] entries = fileDirectory.listFiles();
--
--   	 
--        // Iterating for each file and directory
--        for ( int i = 0; i < entries.length; ++i ) 
--        {
--            // Testing, if the entry in the list is a directory
--/*
--            if ( entries[ i ].isDirectory() ) 
--            {
--                // ignore Recursive call for the new directory
--                // traverse( entries[ i ] );
--            } 
--            else 
--*/
--            if ( !entries[ i ].isDirectory() &&
--              entries[ i ].getName().endsWith(".xls") ) 
--            {
--                try 
--                {
--                    // Composing the URL by replacing all backslashs
--                    String sUrl = "file:///"
--                        + entries[ i ].getAbsolutePath().replace( '\\', '/' );
--                    System.out.println( "processing " + sUrl );                   	 
--                    // Loading the wanted document
--                    com.sun.star.beans.PropertyValue propertyValues[] =
--                        new com.sun.star.beans.PropertyValue[1];
--                    propertyValues[0] = new com.sun.star.beans.PropertyValue();
--                    propertyValues[0].Name = "Hidden";
--                    propertyValues[0].Value = new Boolean(true);
--                    propertyValues[0].Value = new Boolean(false);
--
--                    Object oDoc =
--                        xCompLoader.loadComponentFromURL(
--                            sUrl, "_blank", 0, propertyValues);
--                    String logFileURL = getLogLocation();
--                    java.net.URI logURI = new java.net.URI( logFileURL );
--                    java.net.URL logURL = logURI.toURL();
--                    try
--                    {
--                        XScriptProviderSupplier xSupplier =
--                            (XScriptProviderSupplier)UnoRuntime.queryInterface(
--                                XScriptProviderSupplier.class, oDoc ); 
--			File logFile = new File( logURI );
--                        if ( logFile.exists() )
--                        {
--                            if ( !logFile.delete() )
--                                 throw new java.lang.RuntimeException("failed to delete " + logFileURL );
--                        }
--
--                        XScriptProvider xProv = xSupplier.getScriptProvider();
--                        XScript xScript = xProv.getScript("vnd.sun.star.script:Standard.TestMacros.Main?language=Basic&location=document");
--                        System.out.println("Got script for doc " + entries[ i ] );
--                        Object[][] out = new Object[1][0];
--                        out[0] = new Object[0];
--
--                        short[][] num = new short[1][0];
--                        num[0] = new short[0];
--
--                    	xScript.invoke(new Object[0], num, out); 
--
--			logFile = new File( logURI ); 
--                       	System.out.println( "fileName is " + entries[ i ].getName().substring(0,  entries[ i ].getName().lastIndexOf( ".xls" ) ) );
--                        File newLoc = new File( outDir,  entries[ i ].getName().substring(0,  entries[ i ].getName().lastIndexOf( ".xls" ) ) + ".log" );
--			System.out.println("Moving logfile to " + newLoc.getAbsolutePath() );
--			boolean ret = logFile.renameTo( newLoc );
--           
--			System.out.println("Have run and move of log file worked = " + ret );
--                    }
--                    catch ( Exception ex )
--                    {
--                       ex.printStackTrace(System.err);                    
--                    
--                    }
--                    // interface is supported, otherwise use XComponent.dispose
--                    com.sun.star.util.XCloseable xCloseable =
--                        (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(
--                            com.sun.star.util.XCloseable.class, oDoc);
--                    
--                    if ( xCloseable != null ) 
--                    {
--                        xCloseable.close(false);
--                    } 
--                    else 
--                    {
--                        com.sun.star.lang.XComponent xComp =
--                            (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
--                                com.sun.star.lang.XComponent.class, oDoc);
--                        
--                        xComp.dispose();
--                    }
--                }
--                catch( Exception e ) 
--                {
--                    e.printStackTrace(System.err);                    
--                }
--                
--            }
--        }
--}
--public static void usage()
--{
--	System.out.println("usage: java  TestVba.java " +
--                "\"<path to testdocument dir>\" " +
--                " \"<output_directory>\"");
--        System.exit(1);
--
--}
--public static  void  main( String[] args )
--{
--	if ( !( args.length > 1 ) )
--		usage();
--	
--	com.sun.star.uno.XComponentContext xContext = null;
--            
--        try 
--	{
--            // get the remote office component context
--            xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
--            System.out.println("Connected to a running office ...");
--
--            // get the remote office service manager
--            com.sun.star.lang.XMultiComponentFactory xMCF =
--                xContext.getServiceManager();
--            
--            Object oDesktop = xMCF.createInstanceWithContext(
--                "com.sun.star.frame.Desktop", xContext);
--        
--            com.sun.star.frame.XComponentLoader  xCompLoader = (com.sun.star.frame.XComponentLoader)
--                UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class,
--                                          oDesktop);
--           
--            File testDir = new File(args[0]);
--            File outDir = new File(args[1]);
--            if ( !testDir.isDirectory() || !outDir.isDirectory() ) 
--                usage();
--            TestVBA inst = new TestVBA( xContext, xMCF, xCompLoader, outDir );
--            inst.traverse( testDir );            
--            System.out.println("Log dir is " + inst.getLogLocation() );
--        
--	}
--	catch( Exception e )
--	{
--		System.out.println("Caught exception");
--		System.out.println(e);
--	}	
--	System.exit(0);
--}
--}
-diff --git sc/source/ui/vba/testvba/build.xml sc/source/ui/vba/testvba/build.xml
-index 5c9ae9a..e69de29 100644
---- sc/source/ui/vba/testvba/build.xml
-+++ sc/source/ui/vba/testvba/build.xml
-@@ -1,95 +0,0 @@
--<!--
--
--  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: build.xml,v $
-- 
--  $Revision: 1.3.138.1 $
-- 
--  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.
-- 
---->
--<project name="testvba" default="all" basedir=".">
--
--  <!-- =================== Environmental Properties ======================= -->
--
--  <property name="prj" value=".."/>
--  <property name="build.compiler"   value="classic"/>
--  <property name="optimize"   value="off"/>
--  <property name="debug"   value="on"/>
--  <property name="jardir" value="${out}/class"/>
--  <property name="bindir" value="${out}/bin"/>
--
--  <!-- ==================== build classpath setting ======================= -->
--  <path id="idlclasspath">
--    <pathelement location="${solar.jar}/jurt.jar"/>
--    <pathelement location="${solar.jar}/unoil.jar"/>
--    <pathelement location="${solar.jar}/juh.jar"/>
--    <pathelement location="${solar.jar}/java_uno.jar"/>
--    <pathelement location="${solar.jar}/ridl.jar"/>
--  </path> 
--
--  <!-- ==================== build classpath setting ======================= -->
--  <path id="clientclasspath">
--    <pathelement location="${test.officepath}/program/classes/jurt.jar"/>
--    <pathelement location="${test.officepath}/program/classes/unoil.jar"/>
--    <pathelement location="${test.officepath}/program/classes/juh.jar"/>
--    <pathelement location="${test.officepath}/program/classes/java_uno.jar"/>
--    <pathelement location="${test.officepath}/program/classes/ridl.jar"/>
--    <pathelement location="${out}/class"/>
--  </path> 
--
-- <property name="debugcp" refid="clientclasspath"/>
--  <!-- ===================== Prepare Directories ========================= -->
--  <target name="prepare">
--    <mkdir dir="${jardir}"/>
--  </target>
--
--  <!-- ======================== Compile Classes ========================== -->
--  <target name="compile" depends="prepare">
--    <javac srcdir="." destdir="${jardir}"
--         includes="**/*.java" classpathref="idlclasspath"
--         debug="${debug}" optimize="${optimize}" deprecation="off">
--    </javac>
--  </target>
--
--  <!-- ====================== Clean Generated Files ===================== -->
--  <target name="clean">
--    <delete dir="${jardir}"/>
--  </target>
--  <!-- ========================= All In One Build ======================= -->
--
--  <!-- 
--  <target name="all" depends="compile"/>
---->
--
--  <target name="all" depends="test"/>
--
--  <target name="test" depends="compile">
--	<echo> testcp = ${debugcp}" 
--	</echo>
--       <java classname="TestVBA" fork="true" dir="." classpathref="clientclasspath">
--         <arg value="${test.documents}"/>
--         <arg value="${test.out}"/>
--       </java>
--  </target>
--</project>
-diff --git sc/source/ui/vba/testvba/makefile.mk sc/source/ui/vba/testvba/makefile.mk
-index 51a68a0..578bde1 100644
---- sc/source/ui/vba/testvba/makefile.mk
-+++ sc/source/ui/vba/testvba/makefile.mk
-@@ -30,28 +30,44 @@
- #*************************************************************************
- 
- PRJ=..$/..$/..$/..$/
-+
- PRJNAME=sc
- TARGET=testvba
-+ENABLE_EXCEPTIONS=TRUE
- 
--.INCLUDE : ant.mk
--
--.IF "$(SOLAR_JAVA)"!=""
-+# --- Settings -----------------------------------------------------
- 
--ALLTAR : PROCESSRESULTS
-+.INCLUDE :  settings.mk
-+DLLPRE =
- 
--TESTDOCUMENTS=..$/TestDocuments
--.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
--TESTDOCUMENTLOGS=$(TESTDOCUMENTS)$/logs$/unix
--.ELSE
--TESTDOCUMENTLOGS=$(TESTDOCUMENTS)$/logs$/win
-+.IF "$(ENABLE_VBA)"!="YES"
-+dummy:
-+        @echo "not building vba..."
- .ENDIF
- 
--OUTPUTDIR:=..$/$(TARGET)$/Logs
--ANT_FLAGS+=-Dtest.documents=$(TESTDOCUMENTS)
--ANT_FLAGS+=-Dtest.out=$(OUTPUTDIR)
--ANT_FLAGS+=-Dtest.officepath=$(OFFICEPATH)
--#UNITTEST : $(LOCAL_COMMON_OUT)$/class/TestVBA.class
--PROCESSRESULTS : ANTBUILD
--	$(PERL) testResults.pl  $(OUTPUTDIR) $(TESTDOCUMENTLOGS)
-+INCPRE=$(INCCOM)$/$(TARGET)
-+CDEFS+=-DVBA_OOBUILD_HACK
-+# ------------------------------------------------------------------
-+
-+SLOFILES= \
-+		$(SLO)$/testvba.obj \
-+ 
-+
-+# --- Targets ------------------------------------------------------
-+
-+APP1TARGET=testclient
-+APP1OBJS= $(SLOFILES)
-+
-+APP1STDLIBS=\
-+        $(SALLIB) \
-+        $(STDLIBCPP) \
-+        $(CPPULIB) \
-+        $(CPPUHELPERLIB) \
-+        $(COMPHELPERLIB) \
-+	    $(TOOLSLIB) \
-+        $(UNOTOOLSLIB) \
-+
-+#APP1OBJS= $(OBJ)$/testclient.obj
-+.INCLUDE :	target.mk
-+
- 
--.ENDIF
-diff --git sc/source/ui/vba/testvba/runTests.pl sc/source/ui/vba/testvba/runTests.pl
-new file mode 100644
-index 0000000..520c6e2
---- /dev/null
-+++ sc/source/ui/vba/testvba/runTests.pl
-@@ -0,0 +1,121 @@
-+#!/usr/bin/perl -w
-+use URI::Escape;
-+use File::Basename;
-+use Cwd;
-+use Cwd 'abs_path';
-+
-+$numArgs = $#ARGV + 1;
-+print "thanks, you gave me $numArgs command-line arguments.\n";
-+
-+foreach $argnum (0 .. $#ARGV) {
-+   print "$ARGV[$argnum]\n";
-+}
-+
-+
-+my $binDir = abs_path( dirname($0) );
-+
-+my $sysDir = "unix";
-+my $fileSep = "/";
-+my $theResult;
-+my $officepath = shift || die "please specify path to office installation program dir";
-+my $DocName = shift || "";
-+my $programpath = "$officepath"."3/program:$officepath/program:";
-+my $basiclibrarypath = "$officepath/basis3.1/program";
-+my $urelibpath = "$officepath/ure/lib";
-+my $binext = "";
-+my $testDocDir = "$binDir/TestDocuments";
-+my $testLogDir = "$binDir/Logs";
-+my $testclientname = "testclient";
-+my $buildtestclient = "../../../../unxlngi6.pro/bin/$testclientname";
-+
-+# test testclient
-+if ( -e "$buildtestclient" )
-+{
-+    print "use the latest build\n";
-+    system( "cp $buildtestclient ." );
-+}
-+elsif ( !( -e "$testclientname" ) )
-+{
-+    print "$testclientname do not exist\n";
-+    exit;
-+}
-+
-+# test for uname
-+system("uname");
-+$exit_value  = $? >> 8;
-+$signal_num  = $? & 127;
-+$dumped_core = $? & 128;
-+
-+$failed = ( $exit_value || $signal_num || $dumped_core );
-+
-+print "$failed = ( $exit_value || $signal_num || $dumped_core )\n";
-+
-+if ( !$failed && open(UNAME, "uname -a|") ) {
-+   $theResult = <UNAME>; 
-+   close(UNAME);
-+   if (  $theResult =~ /^CYGWIN/  ) {
-+      # windows under cygwin
-+      $sysDir = "win" ;
-+      $tmpPath=$ENV{"PATH"};
-+      $ENV{"PATH"} = "$officepath:$tmpPath";
-+      $testDocDir=`cygpath -m  $testDocDir`;
-+      uri_escape($testDocDir);
-+      # hacky windows url construction
-+      $testDocDir="file:///$testDocDir";
-+      
-+      chomp($testDocDir);
-+      #print "*** doc dir is $testDocDir\n";
-+      $testLogDir = `cygpath -m  "$testLogDir"`;
-+      uri_escape($testLogDir);
-+      $testLogDir="file:///$testLogDir";
-+      chomp($testLogDir);
-+      #print "*** log dir is $testLogDir\n";
-+      $binext = ".exe";
-+   }
-+   else{
-+      # unix we need to find sal etc. ( from the office path )
-+      my $tmpPath=$ENV{"PATH"};
-+      $ENV{"PATH"} = "$programpath:$basiclibrarypath:$urelibpath/../bin:$tmpPath";
-+      $tmpPATH = $ENV{"LD_LIBRARY_PATH"};
-+      $ENV{"LD_LIBRARY_PATH"} = "$officepath:$programpath:$basiclibrarypath:$urelibpath:$urelibpath../bin/javaldx:$urelibpath/../bin:$tmpPATH";
-+      $ENV{"LD_LIBRARY_PATH"} = "$officepath:$programpath:$basiclibrarypath:$urelibpath:$tmpPATH";
-+      my $testPath = $ENV{"LD_LIBRARY_PATH"};
-+      print "$testPath\n";
-+      $testPath = $ENV{"PATH"};
-+      print "$testPath\n";
-+      $ENV{"STAR_RESOURCEPATH"} = "$officepath/basis3.0/program/resource";
-+      $ENV{"SAL_ALLOW_LINKOO_SYMLINKS"} = "1";
-+      $testPath = $ENV{"LANG"};
-+      print "$testPath\n";
-+   }
-+}
-+else
-+{
-+      # ordinary windows, not sure if this will actually work
-+      $sysDir = "win" ;
-+      $tmpPath=$ENV{"PATH"};
-+      $ENV{"PATH"} = "$tmpPath;$officepath";
-+      $binext = ".exe";
-+}
-+
-+# the exe needs system paths or urls ( urls are by far the least troublesome )
-+
-+my $runCmd = "";
-+my $analyseCmd = "";
-+
-+if ( "$DocName" eq "" )
-+{
-+    $runCmd = "$binDir/testclient$binext $testDocDir $testLogDir";
-+    $analyseCmd = "perl $binDir/testResults.pl $binDir/Logs $binDir/TestDocuments/logs/$sysDir";
-+}
-+else
-+{
-+    $runCmd = "$binDir/testclient$binext $testDocDir $testLogDir $testDocDir/$DocName";
-+    $analyseCmd = "perl $binDir/testResult.pl $binDir/Logs $binDir/TestDocuments/logs/$sysDir $DocName";
-+}
-+print "runCmd = $runCmd\n";
-+
-+system ("rm -rf $testLogDir/*");
-+my $status = system( $runCmd );
-+print "analyseCmd = $analyseCmd\n";
-+$status = system( $analyseCmd );
-diff --git sc/source/ui/vba/testvba/testResult.pl sc/source/ui/vba/testvba/testResult.pl
-new file mode 100644
-index 0000000..b3648b4
---- /dev/null
-+++ sc/source/ui/vba/testvba/testResult.pl
-@@ -0,0 +1,171 @@
-+#!/usr/bin/perl -w
-+use File::Temp qw/ tempfile tempdir /;
-+use File::Basename;
-+use File::stat;
-+use File::Copy;
-+
-+my $binDir = dirname($0);
-+my $timestampclean= "perl $binDir/timestampsClean.pl";
-+#sub gen_diff($)
-+
-+sub testLog
-+{
-+   # 2 No Log to compare against
-+   # 1 Log passed 
-+   # 0 Log failed
-+   my $result = 0;
-+   my $testfile = shift;
-+   my $dirtocheck = shift;
-+   my $filename = basename($testfile);
-+   $filename = "$logdir/$filename"; 
-+   print "processing $testfile $filename\n";
-+   if ( -f $filename )  {
-+      my $tmpFile;
-+      $dir = tempdir( CLEANUP => 1 );
-+      ($fh, $tmpFile) = tempfile( DIR => $dir );
-+      close($fh);
-+      #
-+      my $status = system("diff -U 0 -p $testfile $filename |  $timestampclean > $tmpFile");
-+      my $info = stat($tmpFile) or die "no $tmpFile: $!";
-+      if ( ($status >>=8) == 0 &&  ( $info->size == 0)  ) {
-+         #print "diff worked size is 0\n";
-+         $result = 1; 
-+      }
-+      elsif ( ($status >>=8) == 0 &&  ( $info->size > 0)  ) 
-+      {
-+         #print "diff worked size > 0\n";
-+         $result = 0;
-+      }
-+      else
-+      {
-+         #print "diff failed size > 0\n";
-+         $result = 0;
-+      }
-+   }
-+   else
-+   {
-+      #print "not file > 0\n";
-+      $result = 2;
-+   }
-+   #print "diff result = $result\n";
-+   return $result;
-+}
-+
-+if ( ! ( $logdir = shift @ARGV ) ) {
-+    print STDERR "No logdir specified!\n";
-+    usage();
-+    exit 1;
-+}
-+
-+if ( ! ( $testlogdir = shift @ARGV ) ) {
-+    print STDERR "No testdocuments dir to compare against specified!\n";
-+    usage();
-+    exit 1;
-+}
-+
-+if ( !(-d $logdir ) ) {
-+   print STDERR "No output directory $logdir exists, please create it!!!!\n";
-+   exit 1;
-+}
-+if ( !(-d $testlogdir ) ) {
-+   print STDERR "the directory containing the logfiles to compare against \"$logdir\" does not exist\n";
-+    usage();
-+    exit 1;
-+}
-+print "logdir $logdir\n";
-+print "testlogdir $testlogdir\n";
-+sub filter_crud($)
-+{
-+    my $a = shift;
-+
-+    $a =~ /~$/ && return;
-+    $a =~ /\#$/ && return;
-+    $a =~ /\.orig$/ && return;
-+    $a =~ /unxlng.*\.pro$/ && return;
-+    $a =~ /wntmsc.*\.pro$/ && return;
-+    $a =~ /.swp$/ && return;
-+    $a =~ /POSITION/ && return;
-+    $a =~ /ReadMe/ && return;
-+    $a =~ /.tmp$/ && return;
-+    $a =~ /\.svn/ && return;
-+    $a eq 'CVS' && return;
-+    $a eq '.' && return;
-+    $a eq '..' && return;
-+
-+    return $a;
-+}
-+sub slurp_dir($);
-+
-+sub slurp_dir($)
-+{
-+    my $dir = shift;
-+    my ($dirhandle, $fname);
-+    my @files = ();
-+
-+    opendir ($dirhandle, $dir) || die "Can't open $dir";
-+    while ($fname = readdir ($dirhandle)) {
-+	$fname = filter_crud($fname);
-+	defined $fname || next;
-+#	if (-d "$dir/$fname") {
-+#	    push @files, slurp_dir("$dir/$fname");
-+#	} else 
-+        {
-+	    push @files, "$dir/$fname";
-+	}
-+    }
-+    closedir ($dirhandle);
-+
-+    return @files;
-+}
-+
-+if (-d $testlogdir) {
-+    push @files, slurp_dir($testlogdir);
-+}
-+
-+my $processed = 0;
-+my $passed = 0;
-+my @passedTests=();
-+my @skippedTests=();
-+my @failedTests=();
-+
-+my $failureCmd="";
-+my $testfile = shift @ARGV;
-+my $testfilepath = "$testlogdir/$testfile";
-+$testfilepath =~ s/\.xls/\.log/;
-+print "$testfilepath\n";
-+for $a (@files) {
-+   $filename = $a;
-+   if ( "$testfilepath" eq "$filename" )
-+   { 
-+   $processed++;
-+   my $testcase = $a;  
-+   $testcase =~ s/\.log/\.xls/;
-+   my $result = testLog( $a, $logdir );
-+   if ( $result == 0 ) {
-+      push @failedTests, basename($testcase);
-+      if ( $failureCmd eq "" ) { $failureCmd = " diff -up $a $logdir "; }
-+   }
-+   elsif ( $result == 2 ) {
-+      #print "skipped $a\n";
-+      push @skippedTests, $testcase;
-+   } 
-+   else {
-+      $passed++;
-+      push @passedTests, $testcase;
-+      #print "Test document for $a \t \t passed. \n"; 
-+   }
-+   } 
-+}
-+my $compared= passedTests+@failedTests;
-+my $skip = @skippedTests;
-+print "skipped $skip test-cases(s)\n";
-+print "compared $compared test-case documents\n";
-+print "\t \t $passed tests $ passedTests\n";
-+if ( @failedTests > 0 ) {
-+   print "the following test-case documents failed, please examine the logs manually\n";
-+   
-+   for $a (@failedTests) {
-+      print "\t$a\n";
-+   }
-+   print "e.g. $failureCmd\n"
-+}
-diff --git sc/source/ui/vba/testvba/testResults.pl sc/source/ui/vba/testvba/testResults.pl
-index 9dd079a..1a0a7ef 100755
---- sc/source/ui/vba/testvba/testResults.pl
-+++ sc/source/ui/vba/testvba/testResults.pl
-@@ -1,10 +1,11 @@
- #!/usr/bin/perl -w
--
-+use File::Temp qw/ tempfile tempdir /;
- use File::Basename;
- use File::stat;
- use File::Copy;
-+
- my $binDir = dirname($0);
--my $timestampclean= "$binDir/timestampsClean.pl";
-+my $timestampclean= "perl $binDir/timestampsClean.pl";
- #sub gen_diff($)
- 
- sub testLog
-@@ -19,8 +20,11 @@ sub testLog
-    $filename = "$logdir/$filename"; 
-    print "processing $testfile $filename\n";
-    if ( -f $filename )  {
--      #print "diffing\n";
--      my $tmpFile = "/tmp/gen_diff"; 
-+      my $tmpFile;
-+      $dir = tempdir( CLEANUP => 1 );
-+      ($fh, $tmpFile) = tempfile( DIR => $dir );
-+      close($fh);
-+      #
-       my $status = system("diff -U 0 -p $testfile $filename |  $timestampclean > $tmpFile");
-       my $info = stat($tmpFile) or die "no $tmpFile: $!";
-       if ( ($status >>=8) == 0 &&  ( $info->size == 0)  ) {
-diff --git sc/source/ui/vba/testvba/testvba.cxx sc/source/ui/vba/testvba/testvba.cxx
-new file mode 100644
-index 0000000..b25997e
---- /dev/null
-+++ sc/source/ui/vba/testvba/testvba.cxx
-@@ -0,0 +1,309 @@
-+#include "cppuhelper/bootstrap.hxx"
-+
-+#include <com/sun/star/beans/Property.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <com/sun/star/beans/XPropertySetInfo.hpp>
-+#include <com/sun/star/container/XNameAccess.hpp>
-+#include <com/sun/star/container/XNameContainer.hpp>
-+#include <com/sun/star/frame/XComponentLoader.hpp>
-+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-+#include <com/sun/star/sheet/XSpreadsheet.hpp>
-+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-+#include <com/sun/star/util/XCloseable.hpp>
-+#include <com/sun/star/uno/XComponentContext.hpp>
-+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-+#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
-+#include <com/sun/star/document/XTypeDetection.hpp>
-+
-+#include <tools/urlobj.hxx>
-+#include <osl/file.hxx>
-+
-+#include <memory>
-+#include <iostream>
-+
-+using namespace ::com::sun::star;
-+using namespace ::com::sun::star::sheet;
-+
-+using ::com::sun::star::beans::Property;
-+using ::com::sun::star::beans::PropertyValue;
-+using ::com::sun::star::beans::XPropertySet;
-+using ::com::sun::star::beans::XPropertySetInfo;
-+using ::com::sun::star::container::XNameContainer;
-+using ::com::sun::star::lang::XComponent;
-+using ::com::sun::star::lang::XMultiComponentFactory;
-+using ::com::sun::star::frame::XComponentLoader;
-+using ::com::sun::star::uno::Reference;
-+using ::com::sun::star::uno::Sequence;
-+using ::com::sun::star::uno::UNO_QUERY;
-+using ::com::sun::star::uno::UNO_QUERY_THROW;
-+using ::com::sun::star::uno::XComponentContext;
-+using ::com::sun::star::uno::XInterface;
-+using ::com::sun::star::ucb::XSimpleFileAccess;
-+using ::com::sun::star::document::XTypeDetection;
-+using ::rtl::OUString;
-+
-+using ::std::auto_ptr;
-+
-+const OUString EXTN = rtl::OUString::createFromAscii(".xls"); 
-+
-+OUString convertToURL( const OUString& rPath )
-+{
-+        rtl::OUString aURL;
-+        INetURLObject aObj;
-+        aObj.SetURL( rPath );
-+        bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
-+        if ( bIsURL )
-+                aURL = rPath;
-+        else
-+		{
-+                osl::FileBase::getFileURLFromSystemPath( rPath, aURL );
-+				if ( aURL.equals( rPath ) )
-+					throw uno::RuntimeException( rtl::OUString::createFromAscii( "could'nt convert " ).concat( rPath ).concat( rtl::OUString::createFromAscii( " to a URL, is it a fully qualified path name? " ) ), Reference< uno::XInterface >() );
-+		}
-+		return aURL;
-+}
-+
-+OUString ascii(const sal_Char* cstr)
-+{
-+	return OUString::createFromAscii(cstr);
-+}
-+
-+const sal_Char* getStr(const OUString& ou)
-+{
-+    return OUStringToOString(ou, RTL_TEXTENCODING_UTF8).getStr();
-+}
-+
-+
-+int usage( const char* pName )
-+{
-+	std::cerr << "usage: " << pName << "<path to testdocument dir> <output_directory>" << std::endl;
-+        return 1;
-+
-+}
-+
-+class TestVBA
-+{
-+private:
-+	Reference< XComponentContext >  mxContext;
-+	Reference< XMultiComponentFactory > mxMCF;
-+	Reference< XComponentLoader > mxCompLoader;
-+	Reference< XSimpleFileAccess > mxSFA;
-+	rtl::OUString msOutDirPath;
-+protected:
-+public:
-+	TestVBA( const Reference< XComponentContext >&  _xContext, 
-+		const Reference< XMultiComponentFactory >& _xMCF, 
-+		const Reference< XComponentLoader >& _xCompLoader, 
-+		const rtl::OUString& _outDirPath ) : mxContext( _xContext ), mxMCF( _xMCF ), 
-+mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath  ) ) 
-+	{
-+		mxSFA.set( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), mxContext), uno::UNO_QUERY_THROW );
-+	} 
-+
-+	rtl::OUString getLogLocation() throw (  beans::UnknownPropertyException,  lang::IllegalArgumentException, lang::WrappedTargetException,  uno::Exception ) 
-+	{
-+		rtl::OUString sLogLocation;
-+		Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW );
-+		pathSettings->getPropertyValue( rtl::OUString::createFromAscii( "Work" ) ) >>= sLogLocation;
-+		sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( rtl::OUString::createFromAscii( "HelperAPI-test.log" ) );
-+		return sLogLocation;
-+	}
-+	rtl::OUString getLogLocationWithName( OUString fileName ) throw (  beans::UnknownPropertyException,  lang::IllegalArgumentException, lang::WrappedTargetException,  uno::Exception ) 
-+    {
-+        printf("%s\n", getenv("HOME") );
-+    	printf("file name %s\n", rtl::OUStringToOString( fileName, RTL_TEXTENCODING_UTF8 ).getStr() );
-+		//rtl::OUString sLogLocation( rtl::OUString::createFromAscii( getenv("HOME") ) );
-+		rtl::OUString sLogLocation;
-+		Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW );
-+		pathSettings->getPropertyValue( rtl::OUString::createFromAscii( "Work" ) ) >>= sLogLocation;
-+		sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( fileName.copy ( 0, fileName.lastIndexOf( EXTN )  ) + rtl::OUString::createFromAscii( ".log" ) );
-+		return sLogLocation;
-+    }
-+
-+	void init() 
-+	{
-+		// blow away previous logs?
-+	}
-+
-+	void proccessDocument( const rtl::OUString& sUrl ) 
-+	{
-+			if ( !mxSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCaseAsciiL( ".xls", 4 ) ) 
-+				
-+			{
-+				try 
-+				{
-+					OSL_TRACE( "processing %s",  rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
-+					printf( "processing %s\n",  rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
-+					// Loading the wanted document
-+					Sequence< PropertyValue > propertyValues(1);
-+					propertyValues[0].Name = rtl::OUString::createFromAscii( "Hidden" );
-+					propertyValues[0].Value <<= sal_False;
-+
-+                    rtl::OUString sfileUrl = convertToURL( sUrl );
-+					printf( "try to get xDoc %s\n", rtl::OUStringToOString( sfileUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
-+					Reference< uno::XInterface > xDoc =	
-+						mxCompLoader->loadComponentFromURL( sfileUrl, rtl::OUString::createFromAscii( "_blank" ), 0, propertyValues);
-+					printf( "got xDoc\n" );
-+
-+					OUString logFileURL = convertToURL( getLogLocation() );
-+					try
-+					{
-+						Reference< script::provider::XScriptProviderSupplier > xSupplier( xDoc, uno::UNO_QUERY_THROW ) ; 
-+						if ( mxSFA->exists( logFileURL ) )	
-+							mxSFA->kill( logFileURL );
-+					
-+						printf("try to get the ScriptProvider\n");
-+						Reference< script::provider::XScriptProvider > xProv = xSupplier->getScriptProvider();
-+						printf("get the ScriptProvider\n");
-+						printf("try to get the Script\n");
-+                        Reference< script::provider::XScript > xScript;
-+						try
-+                        {
-+						    xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.TestMacros.Main?language=Basic&location=document" ));
-+                        } catch ( uno::Exception& e )
-+                        {
-+                            try
-+                            {
-+						        xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.testMacro.Main?language=Basic&location=document" ));
-+                            } catch ( uno::Exception& e2 )
-+                            {
-+						        xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.testMain.Main?language=Basic&location=document" ));
-+                            }
-+                        }
-+						OSL_TRACE("Got script for doc %s", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
-+						printf("get the Script\n");
-+						Sequence< uno::Any > aArgs;
-+						Sequence< sal_Int16 > aOutArgsIndex;
-+						Sequence< uno::Any > aOutArgs;
-+						
-+						xScript->invoke(aArgs, aOutArgsIndex, aOutArgs); 
-+		
-+						OUString fileName = sUrl.copy ( sUrl.lastIndexOf( '/' ) );
-+						OUString newLocation = msOutDirPath + fileName.copy ( 0, fileName.lastIndexOf( EXTN )  ) + rtl::OUString::createFromAscii( ".log" );
-+                        try
-+                        {
-+    						printf("move log file\n");
-+	    					mxSFA->move( logFileURL, newLocation );
-+		    				OSL_TRACE("new logfile location is %s ", rtl::OUStringToOString( newLocation, RTL_TEXTENCODING_UTF8 ).getStr() );
-+			    			printf("moved to new location\n");
-+                        }
-+                        catch ( uno::Exception& e )
-+                        {
-+                            logFileURL = convertToURL( getLogLocationWithName( fileName ) );
-+    						printf("move log file from %s\n", rtl::OUStringToOString( logFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
-+	    					mxSFA->move( logFileURL, newLocation );
-+		    				OSL_TRACE("new logfile location is %s ", rtl::OUStringToOString( newLocation, RTL_TEXTENCODING_UTF8 ).getStr() );
-+			    			printf("moved to new location\n");
-+                        }
-+						
-+					}
-+					catch ( uno::Exception& e )
-+					{
-+						std::cerr << "Caught exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
-+					}
-+
-+					// interface is supported, otherwise use XComponent.dispose
-+					Reference< util::XCloseable > xCloseable ( xDoc, uno::UNO_QUERY );
-+		
-+					if ( xCloseable.is() ) 
-+					{
-+			    		printf("try to close\n");
-+                        // will close application. and only run a test case for 3.0
-+                        // maybe it is a bug. yes, it is a bug
-+                        // if only one frame and model, click a button which related will colse.
-+                        // will make a crash. It related with window listener.
-+                        // so, for run all test cases, it should not close the document at this moment.
-+						xCloseable->close(sal_False);
-+			    		printf("closed\n");
-+					} 
-+					else 
-+					{
-+			    		printf("try to dispose\n");
-+						Reference< XComponent > xComp( xDoc, uno::UNO_QUERY_THROW );
-+                        // same as close.
-+						xComp->dispose();
-+			    		printf("disposed\n");
-+					}
-+				}
-+				catch( uno::Exception& e ) 
-+				{
-+					std::cerr << "Caught exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
-+				}
-+		                
-+			}
-+		printf("complete processing %s\n", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
-+	}
-+
-+	void traverse( const rtl::OUString& sFileDirectory ) 
-+	{
-+		rtl::OUString sFileDirectoryURL = convertToURL( sFileDirectory );	
-+		if ( !mxSFA->isFolder( sFileDirectoryURL) ) 
-+		{
-+			throw lang::IllegalArgumentException( rtl::OUString::createFromAscii( "not a directory: ").concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 );
-+		}	
-+		// Getting all files and directories in the current directory
-+		Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, sal_False );
-+	   	 
-+		// Iterating for each file and directory
-+        printf( "Entries %d\n", (int)entries.getLength() );
-+		for ( sal_Int32 i = 0; i < entries.getLength(); ++i ) 
-+		{
-+            proccessDocument( entries[ i ] );
-+		}
-+	}	
-+};
-+
-+void tryDispose( Reference< uno::XInterface > xIF, const char* sComp )
-+{
-+	Reference< lang::XComponent > xComponent( xIF, uno::UNO_QUERY );
-+	if ( xComponent.is() )
-+	{
-+		try
-+		{
-+			xComponent->dispose();
-+		}	
-+		catch( uno::Exception& e )
-+		{
-+			std::cerr << "tryDispose caught exception " <<rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << " while disposing " <<  sComp << std::endl;
-+		}
-+	}
-+}
-+int main( int argv, char** argc )
-+{
-+	if ( !( argv > 2 ) )
-+		return usage( argc[0] );
-+	try
-+	{
-+
-+		OSL_TRACE("Attempting to bootstrap normal");
-+		Reference<XComponentContext> xCC = ::cppu::bootstrap();
-+		Reference<XMultiComponentFactory> xFactory = xCC->getServiceManager();
-+		OSL_TRACE("got servicemanager");
-+        std::cout << "got servicemanager" << std::endl;
-+		Reference<XInterface> desktop = xFactory->createInstanceWithContext(
-+		ascii("com.sun.star.frame.Desktop"), xCC);
-+		OSL_TRACE("got desktop");
-+        std::cout << "got desktop" << std::endl;
-+		Reference<frame::XComponentLoader> xLoader(desktop, UNO_QUERY_THROW);
-+		TestVBA* dTest = new TestVBA( xCC, xFactory, xLoader, ascii( argc[ 2 ] ) );
-+        if ( argv == 4 )
-+        {
-+            std::cout << "before process" << std::endl;
-+            dTest->proccessDocument( ascii( argc[ 3 ] ) );
-+            std::cout << "after process" << std::endl;
-+        }
-+        else
-+        {
-+		    dTest->traverse( ascii( argc[ 1 ] ) );
-+        }
-+		delete dTest;
-+//		tryDispose( xLoader, "desktop" );
-+//		tryDispose( xCC, "remote context" );
-+
-+	}
-+	catch( uno::Exception& e )
-+	{
-+		std::cerr << "Caught Exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
-+	}
-+
-+}
-diff --git sc/source/ui/vba/vbaapplication.cxx sc/source/ui/vba/vbaapplication.cxx
-index b69b6f3..f126f57 100644
---- sc/source/ui/vba/vbaapplication.cxx
-+++ sc/source/ui/vba/vbaapplication.cxx
-@@ -34,14 +34,15 @@
- #include <com/sun/star/sheet/XSpreadsheets.hpp>
- #include<com/sun/star/view/XSelectionSupplier.hpp>
- #include <com/sun/star/lang/XServiceInfo.hpp>
--#include<org/openoffice/excel/XlCalculation.hpp>
-+#include<ooo/vba/excel/XlCalculation.hpp>
- #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
- #include <com/sun/star/sheet/XCalculatable.hpp>
- #include <com/sun/star/frame/XLayoutManager.hpp>
- #include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
- #include <com/sun/star/task/XStatusIndicator.hpp>
--#include <org/openoffice/excel/XlMousePointer.hpp>
-+#include <ooo/vba/excel/XlMousePointer.hpp>
- #include <com/sun/star/sheet/XNamedRanges.hpp>
-+#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
- 
- #include "vbaapplication.hxx"
- #include "vbaworkbooks.hxx"
-@@ -57,6 +58,9 @@
- #include "gridwin.hxx"
- #include "vbanames.hxx"
- #include "vbashape.hxx"
-+#include "vbatextboxshape.hxx"
-+#include "vbaassistant.hxx"
-+#include "vbacommandbars.hxx"
- #include "sc.hrc"
- 
- #include <osl/file.hxx>
-@@ -78,9 +82,19 @@
- #include <basic/sbuno.hxx>
- #include <basic/sbmeth.hxx>
- 
--using namespace ::org::openoffice;
-+#include "convuno.hxx"
-+#include "cellsuno.hxx"
-+#include "docsh.hxx"
-+
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
-+// Enable our own join detection for Intersection and Union
-+// should be more efficient than using ScRangeList::Join ( because
-+// we already are testing the same things )
-+
-+#define OWN_JOIN 1
-+
- // #TODO is this defined somewhere else?
- #if ( defined UNX ) || ( defined OS2 ) //unix
- #define FILE_PATH_SEPERATOR "/"
-@@ -98,10 +112,10 @@ protected:
- 		return getCurrentDocument(); 
- 	}
- public:
--	ActiveWorkbook( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext) : ScVbaWorkbook(  xParent, xContext ){}
-+	ActiveWorkbook( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext) : ScVbaWorkbook(  xParent, xContext ){}
- };
- 
--ScVbaApplication::ScVbaApplication( uno::Reference<uno::XComponentContext >& xContext ): ScVbaApplication_BASE( uno::Reference< vba::XHelperInterface >(), xContext ), m_xCalculation( excel::XlCalculation::xlCalculationAutomatic )
-+ScVbaApplication::ScVbaApplication( uno::Reference<uno::XComponentContext >& xContext ): ScVbaApplication_BASE( uno::Reference< XHelperInterface >(), xContext ), m_xCalculation( excel::XlCalculation::xlCalculationAutomatic )
- {
- }
- 
-@@ -122,9 +136,25 @@ ScVbaApplication::getThisWorkbook() throw (uno::RuntimeException)
- 	return getActiveWorkbook();
- }
- 
-+uno::Reference< XAssistant > SAL_CALL
-+ScVbaApplication::getAssistant() throw (uno::RuntimeException)
-+{
-+    return uno::Reference< XAssistant >( new ScVbaAssistant( this, mxContext ) );
-+}
-+
-+uno::Any SAL_CALL
-+ScVbaApplication::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
-+{
-+    uno::Reference< XCommandBars > xCommandBars( new ScVbaCommandBars( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
-+    if( aIndex.hasValue() )
-+        return uno::makeAny( xCommandBars->Item( aIndex, uno::Any() ) );
-+    return uno::makeAny( xCommandBars );
-+}
-+
- uno::Any SAL_CALL
- ScVbaApplication::getSelection() throw (uno::RuntimeException)
- {
-+    OSL_TRACE("** ScVbaApplication::getSelection() ** ");
-     uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
-     rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
-     if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
-@@ -132,6 +162,17 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
-         uno::Reference< drawing::XShapes > xShapes( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
-         uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
-         uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
-+    	// if ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape
-+    	// and the uno object implements the com.sun.star.drawing.Text service
-+    	// return a textboxshape object
-+    	if ( ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape )
-+    	{
-+    		uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
-+    		if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) )  )
-+    		{
-+            		return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
-+    		}
-+    	}
-         return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, ScVbaShape::getType( xShape ) ) ) );
-     }
-     else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
-@@ -233,7 +274,7 @@ ScVbaApplication::setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (uno::Ru
- uno::Any SAL_CALL
- ScVbaApplication::Workbooks( const uno::Any& aIndex ) throw (uno::RuntimeException)
- {
--	uno::Reference< vba::XCollection > xWorkBooks( new ScVbaWorkbooks( this, mxContext ) );
-+	uno::Reference< XCollection > xWorkBooks( new ScVbaWorkbooks( this, mxContext ) );
- 	if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
- 	{
- 		// void then somebody did Workbooks.something in vba
-@@ -278,7 +319,7 @@ ScVbaApplication::Evaluate( const ::rtl::OUString& Name ) throw (uno::RuntimeExc
- uno::Any 
- ScVbaApplication::Dialogs( const uno::Any &aIndex ) throw (uno::RuntimeException)
- {
--	uno::Reference< excel::XDialogs > xDialogs( new ScVbaDialogs( uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), mxContext ) );
-+	uno::Reference< excel::XDialogs > xDialogs( new ScVbaDialogs( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), mxContext ) );
- 	if( !aIndex.hasValue() )
- 		return uno::Any( xDialogs );
- 	return uno::Any( xDialogs->Item( aIndex ) );
-@@ -288,7 +329,7 @@ uno::Reference< excel::XWindow > SAL_CALL
- ScVbaApplication::getActiveWindow() throw (uno::RuntimeException)
- {
- 	// #FIXME sofar can't determine Parent
--	return new ScVbaWindow( uno::Reference< vba::XHelperInterface >(), mxContext, getCurrentDocument() );
-+	return new ScVbaWindow( uno::Reference< XHelperInterface >(), mxContext, getCurrentDocument() );
- }
- 
- uno::Any SAL_CALL 
-@@ -391,7 +432,7 @@ ScVbaApplication::setCalculation( ::sal_Int32 _calculation ) throw (uno::Runtime
- uno::Any SAL_CALL 
- ScVbaApplication::Windows( const uno::Any& aIndex  ) throw (uno::RuntimeException)
- {
--	uno::Reference< vba::XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
-+	uno::Reference< XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
- 	if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
- 		return uno::Any( xWindows );
- 	return uno::Any( xWindows->Item( aIndex, uno::Any() ) );	
-@@ -426,12 +467,17 @@ ScVbaApplication::Range( const uno::Any& Cell1, const uno::Any& Cell2 ) throw (u
- }
- 
- uno::Any SAL_CALL
--ScVbaApplication::Names( ) throw ( uno::RuntimeException )
-+ScVbaApplication::Names( const css::uno::Any& aIndex ) throw ( uno::RuntimeException )
- {
-     uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
--    uno::Reference< sheet::XNamedRanges > xNamedRanges( getActiveSheet() , uno::UNO_QUERY_THROW );
-+    uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
-+    uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("NamedRanges")) , uno::UNO_QUERY_THROW );
-     css::uno::Reference< excel::XNames > xNames ( new ScVbaNames( this , mxContext , xNamedRanges , xModel ) );
--        return uno::makeAny( xNames );
-+    if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
-+    {
-+        return uno::Any( xNames );
-+    }
-+    return uno::Any( xNames->Item( aIndex, uno::Any() ) );
- }
- 
- 
-@@ -800,89 +846,380 @@ ScVbaApplication::PathSeparator(  ) throw (script::BasicErrorException, uno::Run
- 	return sPathSep;
- }
- 
-+typedef std::list< ScRange > Ranges;
-+typedef std::list< ScRangeList > RangesList;
-+
-+void lcl_addRangesToVec( RangesList& vRanges, const uno::Any& aArg ) throw ( script::BasicErrorException, uno::RuntimeException )
-+{
-+	ScRangeList theRanges;
-+	uno::Reference< excel::XRange > xRange( aArg, uno::UNO_QUERY_THROW );
-+	uno::Reference< XCollection > xCol( xRange->Areas( uno::Any() ), uno::UNO_QUERY_THROW );
-+	sal_Int32 nCount = xCol->getCount();
-+	for( sal_Int32 i = 1; i <= nCount; ++i )
-+	{
-+		uno::Reference< excel::XRange > xAreaRange( xCol->Item( uno::makeAny( sal_Int32(i) ), uno::Any() ), uno::UNO_QUERY_THROW );
-+		uno::Reference< sheet::XCellRangeAddressable > xAddressable( xAreaRange->getCellRange(), uno::UNO_QUERY_THROW );
-+		table::CellRangeAddress addr = xAddressable->getRangeAddress(); 
-+		ScRange refRange;
-+		ScUnoConversion::FillScRange( refRange, addr );
-+		theRanges.Append( refRange );
-+	}
-+	vRanges.push_back( theRanges );
-+}
-+
-+void lcl_addRangeToVec( Ranges& vRanges, const uno::Any& aArg ) throw ( script::BasicErrorException, uno::RuntimeException )
-+{
-+	uno::Reference< excel::XRange > xRange( aArg, uno::UNO_QUERY_THROW );
-+	uno::Reference< XCollection > xCol( xRange->Areas( uno::Any() ), uno::UNO_QUERY_THROW );
-+	sal_Int32 nCount = xCol->getCount();
-+	for( sal_Int32 i = 1; i <= nCount; ++i )
-+	{
-+		uno::Reference< excel::XRange > xAreaRange( xCol->Item( uno::makeAny( sal_Int32(i) ), uno::Any() ), uno::UNO_QUERY_THROW );
-+		uno::Reference< sheet::XCellRangeAddressable > xAddressable( xAreaRange->getCellRange(), uno::UNO_QUERY_THROW );
-+		table::CellRangeAddress addr = xAddressable->getRangeAddress(); 
-+		ScRange refRange;
-+		ScUnoConversion::FillScRange( refRange, addr );
-+		vRanges.push_back( refRange );
-+	}
-+}
-+
-+bool lcl_canJoin( ScRange& r1, ScRange& r2 )
-+{
-+	bool bCanJoin = false;
-+	SCCOL startEndColDiff = r2.aStart.Col() - r1.aEnd.Col(); 
-+	SCROW startEndRowDiff = r2.aStart.Row() - r1.aEnd.Row(); 
-+	SCCOL startColDiff = r2.aStart.Col() - r1.aStart.Col();
-+	SCCOL endColDiff = r2.aEnd.Col() - r1.aEnd.Col();
-+	SCROW startRowDiff =  r2.aStart.Row() - r1.aStart.Row();
-+	SCROW endRowDiff = r2.aEnd.Row() - r1.aEnd.Row();
-+	if ( ( startRowDiff == endRowDiff ) && startRowDiff == 0 && startColDiff >=0 && endColDiff > 0 && ( startEndColDiff <= 1 && startEndColDiff >= -r1.aEnd.Col() ) )
-+		bCanJoin = true;
-+	else if ( ( startColDiff == endColDiff ) && startColDiff == 0 && startRowDiff >= 0 && endRowDiff > 0 && ( startEndRowDiff <= 1 && startEndRowDiff  >= -r1.aEnd.Row() ) )
-+		bCanJoin = true;
-+#ifdef DEBUG
-+	String sr1;
-+	String sr2;
-+	r1.Format( sr1, SCA_VALID ) ;
-+	r2.Format( sr2, SCA_VALID ) ;
-+	OSL_TRACE(" canJoin address %s with %s %s ( startRowDiff(%d), endRowDiff(%d), startColDiff(%d) endColDiff(%d) startEndRowDiff(%d), startEndColDiff(%d) ", 
-+		rtl::OUStringToOString( sr1, RTL_TEXTENCODING_UTF8 ).getStr(),
-+		rtl::OUStringToOString( sr2, RTL_TEXTENCODING_UTF8 ).getStr(), bCanJoin ? "true" : "false", startRowDiff, endRowDiff, startColDiff, endColDiff, startEndRowDiff, startEndColDiff );
-+#endif
-+	return bCanJoin;
-+}
-+// strips out ranges that contain other ranges, also
-+// if the borders of the intersecting ranges are alligned 
-+// then the the range is extended to the larger
-+// e.g. Range("A4:D10"), Range("B4:E10") would be combined
-+// to Range("A4:E10")
-+void lcl_strip_containedRanges( Ranges& vRanges )
-+{
-+	// get rid of ranges that are surrounded by other ranges
-+	for( Ranges::iterator it = vRanges.begin(); it != vRanges.end(); ++it )
-+	{
-+		for( Ranges::iterator it_inner = vRanges.begin(); it_inner != vRanges.end(); ++it_inner )
-+		{
-+			if ( it != it_inner )
-+			{
-+#ifdef DEBUG
-+			String r1;
-+			String r2;
-+			it->Format( r1, SCA_VALID ) ;
-+			it_inner->Format( r2, SCA_VALID ) ;
-+			OSL_TRACE( "try strip/join address %s with %s ", 
-+				rtl::OUStringToOString( r1, RTL_TEXTENCODING_UTF8 ).getStr(),
-+				rtl::OUStringToOString( r2, RTL_TEXTENCODING_UTF8 ).getStr() );
-+#endif
-+				if ( it->In( *it_inner ) )
-+					it_inner = vRanges.erase( it_inner );
-+				else if ( it_inner->In( *it ) )
-+					it = vRanges.erase( it );
-+#ifndef OWN_JOIN
-+				else if ( (*it_inner).aStart.Row() == (*it).aStart.Row() 
-+				&& (*it_inner).aEnd.Row() == (*it).aEnd.Row() )
-+				{
-+					it->ExtendTo( *it_inner );
-+					it_inner = vRanges.erase( it_inner );
-+				}
-+#else
-+				else if ( lcl_canJoin( *it, *it_inner ) )
-+				{
-+					it->ExtendTo( *it_inner );
-+					it_inner = vRanges.erase( it_inner );
-+				}
-+				else if ( lcl_canJoin( *it_inner, *it) )
-+				{
-+					it_inner->ExtendTo( *it );
-+					it = vRanges.erase( it );
-+				}
-+#endif
-+			}
-+		}
-+	}
-+    
-+}
-+
-+Ranges
-+lcl_intersectionImpl( ScRangeList& rl1, ScRangeList& rl2 )
-+{
-+	Ranges intersections;
-+	for ( USHORT x = 0 ; x < rl1.Count(); ++x )
-+	{
-+		for ( USHORT y = 0 ; y < rl2.Count(); ++y )
-+		{
-+#ifdef DEBUG
-+			String r1;
-+			String r2;
-+			rl1.GetObject( x )->Format( r1, SCA_VALID ) ;
-+			rl2.GetObject( y )->Format( r2, SCA_VALID ) ;
-+			OSL_TRACE( "comparing address %s with %s ", 
-+				rtl::OUStringToOString( r1, RTL_TEXTENCODING_UTF8 ).getStr(),
-+				rtl::OUStringToOString( r2, RTL_TEXTENCODING_UTF8 ).getStr() );
-+#endif
-+			if( rl1.GetObject( x )->Intersects( *rl2.GetObject( y ) ) )
-+			{     
-+				ScRange aIntersection = ScRange( Max( rl1.GetObject( x )->aStart.Col(), rl2.GetObject( y )->aStart.Col() ),
-+					Max( rl1.GetObject( x )->aStart.Row(), rl2.GetObject( y )->aStart.Row() ),
-+					Max( rl1.GetObject( x )->aStart.Tab(), rl2.GetObject( y )->aStart.Tab() ),
-+					Min( rl1.GetObject( x )->aEnd.Col(), rl2.GetObject( y )->aEnd.Col() ),
-+					Min( rl1.GetObject( x )->aEnd.Row(), rl2.GetObject( y )->aEnd.Row() ),
-+						Min( rl1.GetObject( x )->aEnd.Tab(), rl2.GetObject( y )->aEnd.Tab() ) );
-+				intersections.push_back( aIntersection );
-+			}
-+		}
-+	}
-+	lcl_strip_containedRanges( intersections );
-+	return intersections;
-+}
-+
-+// Intersection of a set of ranges ( where each range is represented by a ScRangeList e.g.
-+// any range can be a multi-area range )
-+// An intersection is performed between each range in the set of ranges. 
-+// The resulting set of intersections is then processed to strip out any 
-+// intersections that contain other intersections ( and also ranges that directly line up
-+// are joined ) ( see lcl_strip_containedRanges )
-+RangesList lcl_intersections( RangesList& vRanges )
-+{
-+	RangesList intersections;
-+	for( RangesList::iterator it = vRanges.begin(); it != vRanges.end(); ++it )
-+	{
-+		Ranges intermediateList;
-+		for( RangesList::iterator it_inner = vRanges.begin(); it_inner != vRanges.end(); ++it_inner )
-+		{
-+			if ( it != it_inner )
-+			{
-+				Ranges ranges = lcl_intersectionImpl( *it, *it_inner );
-+				for ( Ranges::iterator range_it = ranges.begin(); range_it != ranges.end(); ++range_it )
-+					intermediateList.push_back( *range_it );					
-+			}
-+		}
-+		it = vRanges.erase( it ); // remove it so we don't include it in the next pass.
-+
-+		ScRangeList argIntersect;
-+		lcl_strip_containedRanges( intermediateList );
-+
-+		for( Ranges::iterator it_inter = intermediateList.begin(); it_inter != intermediateList.end(); ++it_inter )
-+#ifndef OWN_JOIN
-+			argIntersect.Join( *it_inter );
-+#else
-+			argIntersect.Append( *it_inter );
-+#endif
-+
-+		intersections.push_back( argIntersect );
-+	}
-+	return intersections;
-+}
-+
- uno::Reference< excel::XRange > SAL_CALL 
- ScVbaApplication::Intersect( const uno::Reference< excel::XRange >& Arg1, const uno::Reference< excel::XRange >& Arg2, const uno::Any& Arg3, const uno::Any& Arg4, const uno::Any& Arg5, const uno::Any& Arg6, const uno::Any& Arg7, const uno::Any& Arg8, const uno::Any& Arg9, const uno::Any& Arg10, const uno::Any& Arg11, const uno::Any& Arg12, const uno::Any& Arg13, const uno::Any& Arg14, const uno::Any& Arg15, const uno::Any& Arg16, const uno::Any& Arg17, const uno::Any& Arg18, const uno::Any& Arg19, const uno::Any& Arg20, const uno::Any& Arg21, const uno::Any& Arg22, const uno::Any& Arg23, const uno::Any& Arg24, const uno::Any& Arg25, const uno::Any& Arg26, const uno::Any& Arg27, const uno::Any& Arg28, const uno::Any& Arg29, const uno::Any& Arg30 ) throw (script::BasicErrorException, uno::RuntimeException)
- {
--	std::vector< uno::Reference< excel::XRange > > vRanges;
- 	if ( !Arg1.is() || !Arg2.is() )
- 		DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
- 
--	vRanges.push_back( Arg1 );
--	vRanges.push_back( Arg2 );
-+	RangesList vRanges;
-+	lcl_addRangesToVec( vRanges, uno::makeAny( Arg1 ) );
-+	lcl_addRangesToVec( vRanges, uno::makeAny( Arg2 ) );
- 
- 	if ( Arg3.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg3, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg3 );
- 	if ( Arg4.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg4, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg4 );
- 	if ( Arg5.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg5, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg5 );
- 	if ( Arg6.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg6, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg6 );
- 	if ( Arg7.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg7, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg7 );
- 	if ( Arg8.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg8, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg8 );
- 	if ( Arg9.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg9, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg9 );
- 	if ( Arg10.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg10, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg10 );
- 	if ( Arg11.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg11, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg11 );
- 	if ( Arg12.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg12, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg12 );
- 	if ( Arg13.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg13, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg13 );
- 	if ( Arg14.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg14, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg14 );
- 	if ( Arg15.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg15, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg15 );
- 	if ( Arg16.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg16, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg16 );
- 	if ( Arg17.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg17, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg17 );
- 	if ( Arg18.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg18, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg18 );
- 	if ( Arg19.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg19, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg19 );
- 	if ( Arg20.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg20, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg20 );
- 	if ( Arg21.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg21, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg21 );
- 	if ( Arg22.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg22, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg22 );
- 	if ( Arg23.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg23, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg23 );
- 	if ( Arg24.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg24, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg24 );
- 	if ( Arg25.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg25, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg25 );
- 	if ( Arg26.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg26, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg26 );
- 	if ( Arg27.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg27, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg27 );
- 	if ( Arg28.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg28, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg28 );
- 	if ( Arg29.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg29, uno::UNO_QUERY_THROW ) );
-+		lcl_addRangesToVec( vRanges, Arg29 );
- 	if ( Arg30.hasValue() )
--		vRanges.push_back( uno::Reference< excel::XRange >( Arg30, uno::UNO_QUERY_THROW ) );
--
--	std::vector< uno::Reference< excel::XRange > >::iterator it = vRanges.begin();
--	std::vector< uno::Reference< excel::XRange > >::iterator it_end = vRanges.end();
-+		lcl_addRangesToVec( vRanges, Arg30 );
-+
-+	ScRangeList aCellRanges;
-+	// first pass - gets the set of all possible interections of Arg1..ArgN
-+	RangesList intersections = lcl_intersections( vRanges );
-+	// second pass - gets the intersections of the intersections ( don't ask, but this
-+	// is what seems to happen )
-+	if ( intersections.size() > 1)
-+		intersections = lcl_intersections( intersections );
-+	for( RangesList::iterator it = intersections.begin(); it != intersections.end(); ++it )
-+	{
-+		for ( USHORT x = 0 ; x < it->Count(); ++x )
-+#ifndef OWN_JOIN
-+			aCellRanges.Join( *it->GetObject(x) );
-+#else
-+			aCellRanges.Append( *it->GetObject(x) );
-+#endif
-+	}
- 
--	uno::Reference< excel::XRange > xRefRange( *it );
--	++it;
--	for ( ; it != it_end; ++it )
-+	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
-+	ScDocShell* pDocShell = getDocShell( xModel );
-+	if ( aCellRanges.Count() == 1 )
- 	{
--		ScVbaRange* pRange = dynamic_cast< ScVbaRange * >( xRefRange.get());
--		if ( pRange )
--			xRefRange = pRange->intersect( *it );
--		if ( !xRefRange.is() )
--			return uno::Reference< excel::XRange >();
-+		xRefRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
-+	}
-+	else if ( aCellRanges.Count() > 1 )
-+	{
-+		uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
-+		xRefRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xRanges );
-+
- 	}
- 	return xRefRange;
- }
- 
-+uno::Reference< excel::XRange > SAL_CALL 
-+ScVbaApplication::Union( const uno::Reference< excel::XRange >& Arg1, const uno::Reference< excel::XRange >& Arg2, const uno::Any& Arg3, const uno::Any& Arg4, const uno::Any& Arg5, const uno::Any& Arg6, const uno::Any& Arg7, const uno::Any& Arg8, const uno::Any& Arg9, const uno::Any& Arg10, const uno::Any& Arg11, const uno::Any& Arg12, const uno::Any& Arg13, const uno::Any& Arg14, const uno::Any& Arg15, const uno::Any& Arg16, const uno::Any& Arg17, const uno::Any& Arg18, const uno::Any& Arg19, const uno::Any& Arg20, const uno::Any& Arg21, const uno::Any& Arg22, const uno::Any& Arg23, const uno::Any& Arg24, const uno::Any& Arg25, const uno::Any& Arg26, const uno::Any& Arg27, const uno::Any& Arg28, const uno::Any& Arg29, const uno::Any& Arg30 ) throw (script::BasicErrorException, uno::RuntimeException)
-+{
-+	if ( !Arg1.is() || !Arg2.is() )
-+		DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+
-+	uno::Reference< excel::XRange > xRange;
-+	Ranges vRanges;
-+	lcl_addRangeToVec( vRanges, uno::makeAny( Arg1 ) );
-+	lcl_addRangeToVec( vRanges, uno::makeAny( Arg2 ) );
-+
-+	if ( Arg3.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg3 );
-+	if ( Arg4.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg4 );
-+	if ( Arg5.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg5 );
-+	if ( Arg6.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg6 );
-+	if ( Arg7.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg7 );
-+	if ( Arg8.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg8 );
-+	if ( Arg9.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg9 );
-+	if ( Arg10.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg10 );
-+	if ( Arg11.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg11 );
-+	if ( Arg12.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg12 );
-+	if ( Arg13.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg13 );
-+	if ( Arg14.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg14 );
-+	if ( Arg15.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg15 );
-+	if ( Arg16.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg16 );
-+	if ( Arg17.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg17 );
-+	if ( Arg18.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg18 );
-+	if ( Arg19.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg19 );
-+	if ( Arg20.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg20 );
-+	if ( Arg21.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg21 );
-+	if ( Arg22.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg22 );
-+	if ( Arg23.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg23 );
-+	if ( Arg24.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg24 );
-+	if ( Arg25.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg25 );
-+	if ( Arg26.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg26 );
-+	if ( Arg27.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg27 );
-+	if ( Arg28.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg28 );
-+	if ( Arg29.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg29 );
-+	if ( Arg30.hasValue() )
-+		lcl_addRangeToVec( vRanges, Arg30 );
-+
-+	ScRangeList aCellRanges;
-+	lcl_strip_containedRanges( vRanges );
-+
-+	for( Ranges::iterator it = vRanges.begin(); it != vRanges.end(); ++it )
-+		aCellRanges.Append( *it );
-+
-+	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
-+    ScDocShell* pDocShell = getDocShell( xModel ); 
-+	if ( aCellRanges.Count() == 1 ) 
-+	{
-+	// normal range
-+		xRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
-+	}
-+	else if ( aCellRanges.Count() > 1 ) // Multi-Area
-+	{
-+		uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
-+    	xRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xRanges );
-+	}
-+	
-+    // #FIXME need proper (WorkSheet) parent
-+	return xRange;
-+}
-+
- void
- ScVbaApplication::Volatile( const uno::Any& aVolatile )  throw ( uno::RuntimeException )
- {
-@@ -953,7 +1290,7 @@ ScVbaApplication::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Application" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Application" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbaapplication.hxx sc/source/ui/vba/vbaapplication.hxx
-index 307fbaa..1c2631e 100644
---- sc/source/ui/vba/vbaapplication.hxx
-+++ sc/source/ui/vba/vbaapplication.hxx
-@@ -31,13 +31,13 @@
- #define SC_VBA_APPLICATION_HXX
- 
- 
--#include <org/openoffice/excel/XWorksheetFunction.hpp>
--#include <org/openoffice/excel/XApplication.hpp>
-+#include <ooo/vba/excel/XWorksheetFunction.hpp>
-+#include <ooo/vba/excel/XApplication.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
- 
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1< oo::excel::XApplication > ScVbaApplication_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XApplication > ScVbaApplication_BASE;
- 
- class ScVbaApplication : public ScVbaApplication_BASE
- {
-@@ -49,7 +49,7 @@ public:
- 	virtual ~ScVbaApplication();
- 
- 	// XHelperInterface ( parent is itself )
--	virtual css::uno::Reference< oo::vba::XHelperInterface > SAL_CALL getParent(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return this; }
-+	virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return this; }
- 
- 	// XApplication
- 	virtual ::rtl::OUString SAL_CALL PathSeparator(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-@@ -64,10 +64,10 @@ public:
- 	virtual ::sal_Int32 SAL_CALL getCalculation() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setCalculation( ::sal_Int32 _calculation ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getSelection() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getActiveCell() throw ( css::uno::RuntimeException);
-- virtual css::uno::Reference< oo::excel::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
-- virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getActiveCell() throw ( css::uno::RuntimeException);
-+ virtual css::uno::Reference< ov::excel::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
-+ virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
- 	virtual sal_Bool SAL_CALL getScreenUpdating() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException);
- 	virtual sal_Bool SAL_CALL getDisplayStatusBar() throw (css::uno::RuntimeException);
-@@ -75,7 +75,9 @@ public:
- 	virtual ::sal_Bool SAL_CALL getDisplayFormulaBar() throw ( css::uno::RuntimeException );
- 	virtual void SAL_CALL setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException );
- 
--	virtual css::uno::Reference< oo::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Workbooks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Worksheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL WorksheetFunction( ) throw (css::uno::RuntimeException);
-@@ -94,10 +96,11 @@ public:
- 	virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL wait( double time ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
--	virtual css::uno::Any SAL_CALL Names( ) throw ( css::uno::RuntimeException );
-+	virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw ( css::uno::RuntimeException );
- 	virtual void SAL_CALL GoTo( const css::uno::Any& Reference, const css::uno::Any& Scroll ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Calculate() throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< oo::excel::XRange >& Arg1, const css::uno::Reference< oo::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorEx
 ception, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorEx
 ception, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorExcept
 ion, css::uno::RuntimeException);
- 	virtual void SAL_CALL Volatile( const css::uno::Any& Volatile ) throw (css::uno::RuntimeException );
- 	virtual void SAL_CALL DoEvents() throw (css::uno::RuntimeException);
- 	// XHelperInterface
-diff --git sc/source/ui/vba/vbaassistant.cxx sc/source/ui/vba/vbaassistant.cxx
-new file mode 100644
-index 0000000..c8c7849
---- /dev/null
-+++ sc/source/ui/vba/vbaassistant.cxx
-@@ -0,0 +1,140 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include <sfx2/app.hxx>
-+#include <svtools/helpopt.hxx>
-+
-+#include <ooo/vba/office/MsoAnimationType.hpp>
-+
-+#include"vbaassistant.hxx"
-+
-+
-+using namespace com::sun::star;
-+using namespace ooo::vba;
-+
-+using namespace ooo::vba::office::MsoAnimationType;
-+
-+ScVbaAssistant::ScVbaAssistant( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext ): ScVbaAssistantImpl_BASE( xParent, xContext )
-+{
-+    m_bIsVisible = sal_False;
-+    m_nPointsLeft = 795;
-+    m_nPointsTop = 248;
-+    m_sName = rtl::OUString::createFromAscii( "Clippit" );
-+    m_nAnimation = msoAnimationIdle;
-+}
-+
-+ScVbaAssistant::~ScVbaAssistant()
-+{
-+}
-+
-+sal_Bool SAL_CALL ScVbaAssistant::getVisible() throw (uno::RuntimeException)
-+{
-+    return m_bIsVisible;
-+}
-+
-+void SAL_CALL ScVbaAssistant::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
-+{
-+    m_bIsVisible = bVisible;
-+}
-+
-+sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException)
-+{
-+    if( SvtHelpOptions().IsHelpAgentAutoStartMode() )
-+        return sal_True;
-+    else
-+        return sal_False;
-+}
-+
-+void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException)
-+{
-+    SvtHelpOptions().SetHelpAgentAutoStartMode( bOn );
-+    setVisible( bOn );
-+}
-+
-+
-+::sal_Int32 SAL_CALL 
-+ScVbaAssistant::getTop() throw (css::uno::RuntimeException)
-+{
-+    return m_nPointsTop;
-+}
-+void SAL_CALL 
-+ScVbaAssistant::setTop( ::sal_Int32 _top ) throw (css::uno::RuntimeException)
-+{
-+    m_nPointsTop = _top;
-+}
-+::sal_Int32 SAL_CALL 
-+ScVbaAssistant::getLeft() throw (css::uno::RuntimeException)
-+{
-+    return m_nPointsLeft;
-+}
-+void SAL_CALL 
-+ScVbaAssistant::setLeft( ::sal_Int32 _left ) throw (css::uno::RuntimeException)
-+{
-+    m_nPointsLeft = _left;
-+}
-+::sal_Int32 SAL_CALL 
-+ScVbaAssistant::getAnimation() throw (css::uno::RuntimeException)
-+{
-+    return m_nAnimation;
-+}
-+void SAL_CALL 
-+ScVbaAssistant::setAnimation( ::sal_Int32 _animation ) throw (css::uno::RuntimeException)
-+{
-+    m_nAnimation = _animation;
-+}
-+
-+::rtl::OUString SAL_CALL 
-+ScVbaAssistant::Name(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-+{
-+    return m_sName;
-+}
-+
-+rtl::OUString& 
-+ScVbaAssistant::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAssistant") );
-+	return sImplName;
-+}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaAssistant::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.Assistant" ) );
-+	}
-+	return aServiceNames;
-+}
-diff --git sc/source/ui/vba/vbaassistant.hxx sc/source/ui/vba/vbaassistant.hxx
-new file mode 100644
-index 0000000..d3c5ff4
---- /dev/null
-+++ sc/source/ui/vba/vbaassistant.hxx
-@@ -0,0 +1,78 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_ASSISTANT_HXX
-+#define SC_VBA_ASSISTANT_HXX
-+
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/XAssistant.hpp>
-+
-+#include <sfx2/sfxhelp.hxx>
-+
-+#include "vbahelper.hxx"
-+#include "vbahelperinterface.hxx"
-+
-+typedef ::cppu::WeakImplHelper1< ov::XAssistant > Assistant;
-+typedef InheritedHelperInterfaceImpl< Assistant > ScVbaAssistantImpl_BASE;
-+
-+class ScVbaAssistant : public ScVbaAssistantImpl_BASE
-+{
-+private:
-+    sal_Bool        m_bIsVisible;
-+    sal_Int32       m_nPointsLeft;
-+    sal_Int32       m_nPointsTop;
-+    rtl::OUString   m_sName;
-+    sal_Int32       m_nAnimation;
-+public:
-+    ScVbaAssistant( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext );
-+    virtual ~ScVbaAssistant();
-+    // XAssistant 
-+    virtual sal_Bool SAL_CALL getOn() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setOn( sal_Bool _on ) throw (css::uno::RuntimeException);
-+    virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Int32 SAL_CALL getTop() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setTop( ::sal_Int32 _top ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Int32 SAL_CALL getLeft() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setLeft( ::sal_Int32 _left ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Int32 SAL_CALL getAnimation() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setAnimation( ::sal_Int32 _animation ) throw (css::uno::RuntimeException);
-+
-+    virtual ::rtl::OUString SAL_CALL Name(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+
-+#endif//SC_VBA_ASSISTANT_HXX
-diff --git sc/source/ui/vba/vbaaxes.cxx sc/source/ui/vba/vbaaxes.cxx
-index 38925b4..058bd2a 100644
---- sc/source/ui/vba/vbaaxes.cxx
-+++ sc/source/ui/vba/vbaaxes.cxx
-@@ -31,15 +31,15 @@
- #include "vbaaxes.hxx"
- #include "vbaaxis.hxx"
- #include "vbachart.hxx"
--#include <org/openoffice/excel/XlAxisType.hpp>
--#include <org/openoffice/excel/XlAxisGroup.hpp>
--#include <org/openoffice/excel/XAxis.hpp>
-+#include <ooo/vba/excel/XlAxisType.hpp>
-+#include <ooo/vba/excel/XlAxisGroup.hpp>
-+#include <ooo/vba/excel/XAxis.hpp>
- #include <map>
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
--using namespace ::org::openoffice::excel::XlAxisType;
--using namespace ::org::openoffice::excel::XlAxisGroup;
-+using namespace ::ooo::vba;
-+using namespace ::ooo::vba::excel::XlAxisType;
-+using namespace ::ooo::vba::excel::XlAxisGroup;
- 
- // each 'Item' in the Axes collection is  indexed via 2 indexes,  group and type.
- // We need to 'flatten' this into a single index in order to be able to wrap
-@@ -86,7 +86,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno:
- 	}
- 	else
- 		throw script::BasicErrorException( rtl::OUString(), NULL, SbERR_METHOD_FAILED, rtl::OUString());
--	uno::Reference< vba::XHelperInterface > xParent( xChart, uno::UNO_QUERY_THROW );
-+	uno::Reference< XHelperInterface > xParent( xChart, uno::UNO_QUERY_THROW );
- 	return new ScVbaAxis( xParent, xContext, xAxisPropertySet, nType, nAxisGroup);
- }
- 
-@@ -146,7 +146,7 @@ uno::Reference< container::XIndexAccess > createIndexWrapper( const uno::Referen
- }
- 
- // #FIXME The collection semantics will never work as this object is not yet initialised correctly
--ScVbaAxes::ScVbaAxes( const uno::Reference< vba::XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< excel::XChart >& xChart ) : ScVbaAxes_BASE( xParent, xContext, createIndexWrapper( xChart, xContext )), moChartParent( xChart )
-+ScVbaAxes::ScVbaAxes( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< excel::XChart >& xChart ) : ScVbaAxes_BASE( xParent, xContext, createIndexWrapper( xChart, xContext )), moChartParent( xChart )
- {
- }
- 
-@@ -199,7 +199,7 @@ ScVbaAxes::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Axes" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Axes" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbaaxes.hxx sc/source/ui/vba/vbaaxes.hxx
-index 0a45cd7..1117d27 100644
---- sc/source/ui/vba/vbaaxes.hxx
-+++ sc/source/ui/vba/vbaaxes.hxx
-@@ -29,17 +29,17 @@
-  ************************************************************************/
- #ifndef SC_VBA_AXES_HXX
- #define SC_VBA_AXES_HXX
--#include <org/openoffice/excel/XAxes.hpp>
--#include <org/openoffice/excel/XAxis.hpp>
--#include <org/openoffice/excel/XChart.hpp>
-+#include <ooo/vba/excel/XAxes.hpp>
-+#include <ooo/vba/excel/XAxis.hpp>
-+#include <ooo/vba/excel/XChart.hpp>
- #include "vbacollectionimpl.hxx"
- 
--typedef CollTestImplHelper< oo::excel::XAxes > ScVbaAxes_BASE;
-+typedef CollTestImplHelper< ov::excel::XAxes > ScVbaAxes_BASE;
- class ScVbaAxes : public ScVbaAxes_BASE
- {
--	css::uno::Reference< oo::excel::XChart > moChartParent; // not the true parent I guess
-+	css::uno::Reference< ov::excel::XChart > moChartParent; // not the true parent I guess
- public:
--	ScVbaAxes( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< oo::excel::XChart >& xChart );
-+	ScVbaAxes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< ov::excel::XChart >& xChart );
- 	// XEnumerationAccess
- 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
- 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);	
-@@ -48,7 +48,7 @@ public:
- 	// XHelperInterface
- 	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
--	static css::uno::Reference< oo::excel::XAxis > createAxis( const css::uno::Reference< oo::excel::XChart >& xChart, const css::uno::Reference< css::uno::XComponentContext >& xContext,  sal_Int32 nType, sal_Int32 nAxisGroup ) throw ( css::uno::RuntimeException );
-+	static css::uno::Reference< ov::excel::XAxis > createAxis( const css::uno::Reference< ov::excel::XChart >& xChart, const css::uno::Reference< css::uno::XComponentContext >& xContext,  sal_Int32 nType, sal_Int32 nAxisGroup ) throw ( css::uno::RuntimeException );
- };
- 
- #endif //SC_VBA_AXES_HXX
-diff --git sc/source/ui/vba/vbaaxis.cxx sc/source/ui/vba/vbaaxis.cxx
-index 97e118d..c6db343 100644
---- sc/source/ui/vba/vbaaxis.cxx
-+++ sc/source/ui/vba/vbaaxis.cxx
-@@ -29,21 +29,21 @@
-  ************************************************************************/
- 
- #include "vbaaxis.hxx"
--#include <org/openoffice/excel/XlAxisCrosses.hpp>
--#include <org/openoffice/excel/XlAxisType.hpp>
--#include <org/openoffice/excel/XlScaleType.hpp>
-+#include <ooo/vba/excel/XlAxisCrosses.hpp>
-+#include <ooo/vba/excel/XlAxisType.hpp>
-+#include <ooo/vba/excel/XlScaleType.hpp>
- #include "vbaaxistitle.hxx"
- #include "vbachart.hxx"
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
--using namespace ::org::openoffice::excel::XlAxisCrosses;
--using namespace ::org::openoffice::excel::XlAxisType;
--using namespace ::org::openoffice::excel::XlScaleType;
-+using namespace ::ooo::vba;
-+using namespace ::ooo::vba::excel::XlAxisCrosses;
-+using namespace ::ooo::vba::excel::XlAxisType;
-+using namespace ::ooo::vba::excel::XlScaleType;
- 
- const rtl::OUString ORIGIN( RTL_CONSTASCII_USTRINGPARAM("Origin") );
- const rtl::OUString AUTOORIGIN( RTL_CONSTASCII_USTRINGPARAM("AutoOrigin") );
--const rtl::OUString MIN( RTL_CONSTASCII_USTRINGPARAM("AutoOrigin") );
--const rtl::OUString MAX( RTL_CONSTASCII_USTRINGPARAM("AutoOrigin") );
-+const rtl::OUString VBA_MIN( RTL_CONSTASCII_USTRINGPARAM("Max") );
-+const rtl::OUString VBA_MAX( RTL_CONSTASCII_USTRINGPARAM("Min") );
- ScVbaChart* 
- ScVbaAxis::getChartPtr() throw( uno::RuntimeException )
- {
-@@ -63,7 +63,7 @@ ScVbaAxis::isValueAxis() throw( script::BasicErrorException )
- 	return sal_True;
- }
- 
--ScVbaAxis::ScVbaAxis( const uno::Reference< vba::XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup  ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False ) 
-+ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup  ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False ) 
- {
- 	oShapeHelper.reset( new ShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, uno::UNO_QUERY ) ) );
- 	moChartParent.set( xParent, uno::UNO_QUERY_THROW  );
-@@ -78,7 +78,7 @@ ScVbaAxis::Delete(  ) throw (script::BasicErrorException, uno::RuntimeException)
- 	xComponent->dispose();
- }
- 
-- uno::Reference< ::org::openoffice::excel::XAxisTitle > SAL_CALL 
-+ uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL 
- ScVbaAxis::getAxisTitle(  ) throw (script::BasicErrorException, uno::RuntimeException)
- {
- 	uno::Reference< excel::XAxisTitle > xAxisTitle;
-@@ -137,12 +137,12 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorExceptio
- 				bCrossesAreCustomized = sal_False;
- 				return;
- 			case xlAxisCrossesMinimum:                     // The axis crosses at the minimum value. 
--				mxPropertySet->getPropertyValue(MIN) >>= fNum;
-+				mxPropertySet->getPropertyValue(VBA_MIN) >>= fNum;
- 				setCrossesAt( fNum );
- 				bCrossesAreCustomized = sal_False;
- 				break;
- 			case xlAxisCrossesMaximum:                     // The axis crosses at the maximum value. 
--				mxPropertySet->getPropertyValue(MAX) >>= fNum;
-+				mxPropertySet->getPropertyValue(VBA_MAX) >>= fNum;
- 				setCrossesAt(fNum);
- 				bCrossesAreCustomized = sal_False;
- 				break;
-@@ -177,7 +177,7 @@ ScVbaAxis::getCrosses(  ) throw (script::BasicErrorException, uno::RuntimeExcept
- 				mxPropertySet->getPropertyValue(ORIGIN) >>= forigin;
- //obsolete      double fmax = AnyConverter.toDouble(mxPropertySet.getPropertyValue("Max"));
- 				double fmin = 0.0;
--				mxPropertySet->getPropertyValue(MIN) >>= fmin;
-+				mxPropertySet->getPropertyValue(VBA_MIN) >>= fmin;
- 				if (forigin == fmin)
- 					nCrosses = xlAxisCrossesMinimum;
- 				else
-@@ -666,7 +666,7 @@ ScVbaAxis::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Axis" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Axis" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbaaxis.hxx sc/source/ui/vba/vbaaxis.hxx
-index 9a661a2..71ec1c1 100644
---- sc/source/ui/vba/vbaaxis.hxx
-+++ sc/source/ui/vba/vbaaxis.hxx
-@@ -30,15 +30,15 @@
- #ifndef SC_VBA_AXIS_HXX
- #define SC_VBA_AXOS_HXX
- #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/excel/XAxis.hpp>
--#include <org/openoffice/excel/XChart.hpp>
-+#include <ooo/vba/excel/XAxis.hpp>
-+#include <ooo/vba/excel/XChart.hpp>
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1< oo::excel::XAxis >  ScVbaAxis_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XAxis >  ScVbaAxis_BASE;
- class ScVbaChart;
- class ScVbaAxis : public ScVbaAxis_BASE
- {
--	css::uno::Reference< oo::excel::XChart > moChartParent;
-+	css::uno::Reference< ov::excel::XChart > moChartParent;
- 	css::uno::Reference< css::beans::XPropertySet > mxPropertySet;
- 	sal_Int32 mnType;
- 	sal_Int32 mnGroup;
-@@ -46,13 +46,13 @@ class ScVbaAxis : public ScVbaAxis_BASE
- 	sal_Bool bCrossesAreCustomized; 
- 	ScVbaChart* getChartPtr() throw( css::uno::RuntimeException );
- 	sal_Bool isValueAxis() throw( css::script::BasicErrorException );
--	std::auto_ptr<oo::ShapeHelper> oShapeHelper;
-+	std::auto_ptr<ov::ShapeHelper> oShapeHelper;
- 	
- public:
--	ScVbaAxis( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup );
-+	ScVbaAxis( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup );
- 	// Methods
- 	virtual void SAL_CALL Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< ::org::openoffice::excel::XAxisTitle > SAL_CALL getAxisTitle(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL getAxisTitle(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL setDisplayUnit( ::sal_Int32 DisplayUnit ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual ::sal_Int32 SAL_CALL getDisplayUnit(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL setCrosses( ::sal_Int32 Crosses ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbaaxistitle.cxx sc/source/ui/vba/vbaaxistitle.cxx
-index 4b202ef..00cf4be 100644
---- sc/source/ui/vba/vbaaxistitle.cxx
-+++ sc/source/ui/vba/vbaaxistitle.cxx
-@@ -30,9 +30,9 @@
- #include "vbaaxistitle.hxx"
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- 
--ScVbaAxisTitle::ScVbaAxisTitle( const uno::Reference< vba::XHelperInterface >& xParent,  const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& _xTitleShape ) :  AxisTitleBase( xParent, xContext, _xTitleShape )
-+ScVbaAxisTitle::ScVbaAxisTitle( const uno::Reference< XHelperInterface >& xParent,  const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& _xTitleShape ) :  AxisTitleBase( xParent, xContext, _xTitleShape )
- {
- }
- 
-@@ -51,7 +51,7 @@ ScVbaAxisTitle::getServiceNames()
- 	{
- 		uno::Sequence< rtl::OUString > BaseServiceNames = AxisTitleBase::getServiceNames();
- 		aServiceNames.realloc( BaseServiceNames.getLength() + 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.AxisTitle" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.AxisTitle" ) );
- 		for ( sal_Int32 index = 1; index < (BaseServiceNames.getLength() + 1); ++index )
- 			aServiceNames[ index ] = BaseServiceNames[ index ];
- 	}
-diff --git sc/source/ui/vba/vbaaxistitle.hxx sc/source/ui/vba/vbaaxistitle.hxx
-index 6b2409a..b33d5ef 100644
---- sc/source/ui/vba/vbaaxistitle.hxx
-+++ sc/source/ui/vba/vbaaxistitle.hxx
-@@ -32,14 +32,14 @@
- 
- #include "vbatitle.hxx"
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/excel/XAxisTitle.hpp>
-+#include <ooo/vba/excel/XAxisTitle.hpp>
- 
--typedef  TitleImpl< cppu::WeakImplHelper1< oo::excel::XAxisTitle > > AxisTitleBase;
-+typedef  TitleImpl< cppu::WeakImplHelper1< ov::excel::XAxisTitle > > AxisTitleBase;
- 
- class ScVbaAxisTitle : public AxisTitleBase
- {
- public:
--        ScVbaAxisTitle( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape );
-+        ScVbaAxisTitle( const css::uno::Reference< ov::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape );
-         // XHelperInterface
-         virtual rtl::OUString& getServiceImplName();
-         virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-diff --git sc/source/ui/vba/vbaborders.cxx sc/source/ui/vba/vbaborders.cxx
-index 6dde824..5703d65 100644
---- sc/source/ui/vba/vbaborders.cxx
-+++ sc/source/ui/vba/vbaborders.cxx
-@@ -30,10 +30,10 @@
- #include "vbaborders.hxx"
- 
- #include <cppuhelper/implbase3.hxx>
--#include <org/openoffice/excel/XlBordersIndex.hpp>
--#include <org/openoffice/excel/XlBorderWeight.hpp>
--#include <org/openoffice/excel/XlLineStyle.hpp>
--#include <org/openoffice/excel/XlColorIndex.hpp>
-+#include <ooo/vba/excel/XlBordersIndex.hpp>
-+#include <ooo/vba/excel/XlBorderWeight.hpp>
-+#include <ooo/vba/excel/XlLineStyle.hpp>
-+#include <ooo/vba/excel/XlColorIndex.hpp>
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XLabel > FrameImpl_BASE;
++
++class ScVbaFrame : public FrameImpl_BASE
++{
++public:
++    ScVbaFrame(  const css::uno::Reference< ov::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, ov::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);
++    virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif //SC_VBA_LABEL_HXX
+Index: sc/source/ui/vba/vbafillformat.cxx
+===================================================================
+--- sc/source/ui/vba/vbafillformat.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbafillformat.cxx	(.../cws/npower11)	(revision 266650)
+@@ -30,14 +30,14 @@
  #include <com/sun/star/beans/XPropertySet.hpp>
- #include <com/sun/star/table/TableBorder.hpp>
- #include <com/sun/star/table/XColumnRowRange.hpp>
-@@ -41,8 +41,8 @@
- #include "vbapalette.hxx"
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
--using namespace ::org::openoffice::excel;
-+using namespace ::ooo::vba;
-+using namespace ::ooo::vba::excel;
- 
- 
- typedef ::cppu::WeakImplHelper1<container::XIndexAccess > RangeBorders_Base;
-@@ -165,12 +165,12 @@ protected:
- 		if ( aServiceNames.getLength() == 0 )
- 		{
- 			aServiceNames.realloc( 1 );
--			aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Border" ) );
-+			aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Border" ) );
- 		}
- 		return aServiceNames;		
- 	}
- public:
--	ScVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, ScVbaPalette& rPalette) : ScVbaBorder_Base( uno::Reference< vba::XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {}  	
-+	ScVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, ScVbaPalette& rPalette) : ScVbaBorder_Base( uno::Reference< XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {}  	
- 
- 	// XBorder
- 	uno::Any SAL_CALL getColor() throw (uno::RuntimeException)
-@@ -383,7 +383,7 @@ public:
- 	}
- };
- 
--ScVbaBorders::ScVbaBorders( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, ScVbaPalette& rPalette  ):  ScVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ), bRangeIsSingleCell( false ) 
-+ScVbaBorders::ScVbaBorders( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, ScVbaPalette& rPalette  ):  ScVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ), bRangeIsSingleCell( false ) 
- {
- 	uno::Reference< table::XColumnRowRange > xColumnRowRange(xRange, uno::UNO_QUERY_THROW );
- 	if ( xColumnRowRange->getRows()->getCount() == 1 && xColumnRowRange->getColumns()->getCount() == 1 )	
-@@ -571,7 +571,7 @@ ScVbaBorders::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Borders" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Borders" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbaborders.hxx sc/source/ui/vba/vbaborders.hxx
-index f7705f3..9ad8c50 100644
---- sc/source/ui/vba/vbaborders.hxx
-+++ sc/source/ui/vba/vbaborders.hxx
-@@ -31,7 +31,7 @@
- #define SC_VBA_BORDERS_HXX
- 
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/excel/XBorders.hpp>
-+#include <ooo/vba/excel/XBorders.hpp>
- 
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/table/XCellRange.hpp>
-@@ -40,7 +40,7 @@
-  
- #include "vbacollectionimpl.hxx"
+ #include <com/sun/star/awt/Gradient.hpp>
+ #include <com/sun/star/awt/GradientStyle.hpp>
+-#include <org/openoffice/office/MsoGradientStyle.hpp>
++#include <ooo/vba/office/MsoGradientStyle.hpp>
+ #include "vbafillformat.hxx"
+ #include "vbacolorformat.hxx"
  
--typedef CollTestImplHelper< oo::excel::XBorders > ScVbaBorders_BASE;
-+typedef CollTestImplHelper< ov::excel::XBorders > ScVbaBorders_BASE;
- class ScVbaPalette;
- class ScVbaBorders : public ScVbaBorders_BASE
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ using namespace com::sun::star;
+ 
+-ScVbaFillFormat::ScVbaFillFormat( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaFillFormat_BASE( xParent, xContext ), m_xShape( xShape )
++ScVbaFillFormat::ScVbaFillFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaFillFormat_BASE( xParent, xContext ), m_xShape( xShape )
  {
-@@ -49,7 +49,7 @@ class ScVbaBorders : public ScVbaBorders_BASE
- 	bool bRangeIsSingleCell;
- 	css::uno::Reference< css::beans::XPropertySet > m_xProps;
- public:
--	ScVbaBorders( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::table::XCellRange >& xRange, ScVbaPalette& rPalette );
-+	ScVbaBorders( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::table::XCellRange >& xRange, ScVbaPalette& rPalette );
- 	virtual ~ScVbaBorders() {}
+     m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
+     m_nFillStyle = drawing::FillStyle_SOLID;
+@@ -195,7 +195,7 @@
+     if ( aServiceNames.getLength() == 0 )
+     {
+         aServiceNames.realloc( 1 );
+-        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.FillFormat" ) );
++        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.FillFormat" ) );
+     }
+     return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbastyle.cxx
+===================================================================
+--- sc/source/ui/vba/vbastyle.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbastyle.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,7 +31,7 @@
+ #include "vbastyle.hxx"
+ #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
  
- 	// XEnumerationAccess
-diff --git sc/source/ui/vba/vbabutton.cxx sc/source/ui/vba/vbabutton.cxx
-index 88309d2..0e4d749 100644
---- sc/source/ui/vba/vbabutton.cxx
-+++ sc/source/ui/vba/vbabutton.cxx
-@@ -31,11 +31,11 @@
- #include <vector>
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
  
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
+ static rtl::OUString DISPLAYNAME( RTL_CONSTASCII_USTRINGPARAM("DisplayName") );
+@@ -71,7 +71,7 @@
  
+ }
  
- 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< 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 )
+-ScVbaStyle::ScVbaStyle( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) :  ScVbaStyle_BASE( xParent, xContext, lcl_getStyleProps( sStyleName, _xModel ), _xModel, false )
++ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) :  ScVbaStyle_BASE( xParent, xContext, lcl_getStyleProps( sStyleName, _xModel ), _xModel, false )
  {
+ 	try
+ 	{
+@@ -83,7 +83,7 @@
+ 	}
  }
  
-@@ -53,3 +53,22 @@ ScVbaButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star
+-ScVbaStyle::ScVbaStyle( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, _xPropertySet, _xModel, false )
++ScVbaStyle::ScVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, _xPropertySet, _xModel, false )
  {
-     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ 	try
+ 	{
+@@ -183,7 +183,7 @@
+         if ( aServiceNames.getLength() == 0 )
+         {
+                 aServiceNames.realloc( 1 );
+-                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.XStyle" ) );
++                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XStyle" ) );
+         }
+         return aServiceNames;
  }
+Index: sc/source/ui/vba/vbacontrols.cxx
+===================================================================
+--- sc/source/ui/vba/vbacontrols.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacontrols.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,227 @@
++/*************************************************************************
++ *
++ * 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 "vbacontrols.hxx"
++#include "vbacontrol.hxx"
++#include <cppuhelper/implbase2.hxx>
++#include <com/sun/star/awt/XControlContainer.hpp>
++#include <hash_map>
++
++using namespace com::sun::star;
++using namespace ooo::vba;
++
++
++typedef ::cppu::WeakImplHelper2< container::XNameAccess, container::XIndexAccess > ArrayWrapImpl;
++
++typedef  std::hash_map< rtl::OUString, sal_Int32, ::rtl::OUStringHash,
++    ::std::equal_to< ::rtl::OUString >  > ControlIndexMap;
++typedef  std::vector< uno::Reference< awt::XControl > > ControlVec;
++
++class ControlArrayWrapper : public ArrayWrapImpl
++{
++    uno::Reference< awt::XControlContainer > mxDialog;
++    uno::Sequence< ::rtl::OUString > msNames;
++    ControlVec mControls;
++    ControlIndexMap mIndices;
++
++    rtl::OUString getControlName( const uno::Reference< awt::XControl >& xCtrl )
++    {
++        uno::Reference< beans::XPropertySet > xProp( xCtrl->getModel(), uno::UNO_QUERY );
++        rtl::OUString sName;
++        xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) ) >>= sName;
++        return sName;
++    }
++
++public:
++
++    ControlArrayWrapper( const uno::Reference< awt::XControl >& xDialog )
++    {
++        mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
++        uno::Sequence< uno::Reference< awt::XControl > > sXControls = mxDialog->getControls();
++    
++        msNames.realloc( sXControls.getLength() );
++        for ( sal_Int32 i = 0; i < sXControls.getLength(); ++i )
++        {
++            uno::Reference< awt::XControl > xCtrl = sXControls[ i ];
++            msNames[ i ] = getControlName( xCtrl );
++            mControls.push_back( xCtrl );
++            mIndices[ msNames[ i ] ] = i;
++        }
++    }
++    
++    // XElementAccess
++    virtual uno::Type SAL_CALL getElementType(  ) throw (uno::RuntimeException)
++    {
++        return awt::XControl::static_type(0);
++    }
++    
++    virtual ::sal_Bool SAL_CALL hasElements(  ) throw (uno::RuntimeException) 
++    {
++        return ( mControls.size() > 0 );
++    }
++    
++    // XNameAcess 
++    virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
++    {
++        if ( !hasByName( aName ) )
++            throw container::NoSuchElementException();
++        return getByIndex( mIndices[ aName ] );
++    }
++    
++    virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames(  ) throw (uno::RuntimeException)
++    {
++        return msNames;
++    }
++    
++    virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException)
++    {
++        ControlIndexMap::iterator it = mIndices.find( aName );
++        return it != mIndices.end();
++    }
++    
++    // XElementAccess
++    virtual ::sal_Int32 SAL_CALL getCount(  ) throw (css::uno::RuntimeException)
++    {
++        return mControls.size();
++    }
++    
++    virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
++    {
++        if ( Index < 0 || Index >= static_cast< sal_Int32 >( mControls.size() ) )
++            throw lang::IndexOutOfBoundsException();
++        return uno::makeAny( mControls[ Index ] );
++    }
++};
++
++
++class ControlsEnumWrapper : public EnumerationHelper_BASE
++{
++    uno::Reference<XHelperInterface > m_xParent;
++    uno::Reference<uno::XComponentContext > m_xContext;
++    uno::Reference<container::XIndexAccess > m_xIndexAccess;
++    uno::Reference<awt::XControl > m_xDlg;
++    sal_Int32 nIndex;
++
++public:
++
++    ControlsEnumWrapper(  const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference< awt::XControl >& xDlg ) :  m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), m_xDlg( xDlg ), nIndex( 0 ) {}
++
++    virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
++    {
++        return ( nIndex < m_xIndexAccess->getCount() );
++    }
++
++    virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
++    {
++        if ( nIndex < m_xIndexAccess->getCount() )
++        {
++            uno::Reference< frame::XModel > xModel;
++            uno::Reference< uno::XInterface > xControl;
++            m_xIndexAccess->getByIndex( nIndex++ ) >>= xControl;
++            // Create control from awt::XControl
++            ScVbaControlFactory aFac( m_xContext, xControl,  xModel );
++            uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( m_xDlg->getModel() ) );
++            return uno::makeAny( xVBAControl );
++        }
++        throw container::NoSuchElementException();
++    }
++
++};
++
++
++uno::Reference<container::XIndexAccess >
++lcl_controlsWrapper( const uno::Reference< awt::XControl >& xDlg )
++{
++    return new ControlArrayWrapper( xDlg );
++}
++
++ScVbaControls::ScVbaControls( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
++                const css::uno::Reference< awt::XControl >& xDialog )
++            : ControlsImpl_BASE( xParent, xContext, lcl_controlsWrapper( xDialog  ) )
++{
++    mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
++}
++
++uno::Reference< container::XEnumeration >
++ScVbaControls::createEnumeration() throw (uno::RuntimeException)
++{
++    uno::Reference< container::XEnumeration > xEnum( new ControlsEnumWrapper( mxParent, mxContext, m_xIndexAccess, mxDialog ) );
++    if ( !xEnum.is() )
++        throw uno::RuntimeException();
++    return xEnum;
++}
++
++uno::Any
++ScVbaControls::createCollectionObject( const css::uno::Any& aSource )
++{
++    // Create control from awt::XControl
++    uno::Reference< awt::XControl > xControl;
++    aSource >>= xControl;
++    uno::Reference< frame::XModel > xModel;
++    ScVbaControlFactory aFac( mxContext, xControl,  xModel );
++    uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( mxDialog->getModel() ) );
++    return uno::makeAny( xVBAControl );
++}
++
++void SAL_CALL 
++ScVbaControls::Move( double cx, double cy ) throw (uno::RuntimeException)
++{
++    uno::Reference< container::XEnumeration > xEnum( createEnumeration() );
++    while ( xEnum->hasMoreElements() )
++    {
++        uno::Reference< msforms::XControl > xControl( xEnum->nextElement(), uno::UNO_QUERY_THROW );
++        xControl->setLeft( xControl->getLeft() + cx );
++        xControl->setTop( xControl->getTop() + cy ); 
++    }
++}
 +
++uno::Type
++ScVbaControls::getElementType() throw (uno::RuntimeException)
++{
++    return ooo::vba::msforms::XControl::static_type(0);
++}
 +rtl::OUString& 
-+ScVbaButton::getServiceImplName()
++ScVbaControls::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaButton") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControls") );
 +	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaButton::getServiceNames()
++ScVbaControls::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Button" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Controls" ) );
 +	}
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbabutton.hxx sc/source/ui/vba/vbabutton.hxx
-index 87a417a..2a98ad6 100644
---- sc/source/ui/vba/vbabutton.hxx
-+++ sc/source/ui/vba/vbabutton.hxx
-@@ -30,20 +30,22 @@
- #ifndef SC_VBA_BUTTON_HXX
- #define SC_VBA_BUTTON_HXX
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/msforms/XButton.hpp>
-+#include <ooo/vba/msforms/XButton.hpp>
- 
- #include "vbacontrol.hxx"
- #include "vbahelper.hxx"
- 
--typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XButton > ButtonImpl_BASE;
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XButton > ButtonImpl_BASE;
- 
- 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< ov::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, ov::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);
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- };
- #endif //SC_VBA_BUTTON_HXX
-diff --git sc/source/ui/vba/vbacharacters.cxx sc/source/ui/vba/vbacharacters.cxx
-index 88bc3b8..b59541c 100644
---- sc/source/ui/vba/vbacharacters.cxx
-+++ sc/source/ui/vba/vbacharacters.cxx
-@@ -33,10 +33,10 @@
- #include "vbafont.hxx"
- 
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
--ScVbaCharacters::ScVbaCharacters( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const uno::Reference< text::XSimpleText>& xRange,const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool Replace  ) throw ( css::lang::IllegalArgumentException ) : ScVbaCharacters_BASE( xParent, xContext ), m_xSimpleText(xRange), m_aPalette( dPalette),  nLength(-1), nStart(1), bReplace( Replace )
-+ScVbaCharacters::ScVbaCharacters( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const uno::Reference< text::XSimpleText>& xRange,const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool Replace  ) throw ( css::lang::IllegalArgumentException ) : ScVbaCharacters_BASE( xParent, xContext ), m_xSimpleText(xRange), m_aPalette( dPalette),  nLength(-1), nStart(1), bReplace( Replace )
- {
- 	Start >>= nStart;
- 	if ( nStart < 1 )
-@@ -46,7 +46,12 @@ ScVbaCharacters::ScVbaCharacters( const uno::Reference< vba::XHelperInterface >&
- 	uno::Reference< text::XTextCursor > xTextCursor( m_xSimpleText->createTextCursor(), uno::UNO_QUERY_THROW );
- 	xTextCursor->collapseToStart();
- 	if ( nStart )
-+	{
-+		if ( ( nStart + 1 ) > m_xSimpleText->getString().getLength() )
-+			//nStart = m_xSimpleText->getString().getLength();
-+			xTextCursor->gotoEnd( sal_False );
- 		xTextCursor->goRight( nStart, sal_False );
-+	}
- 	if ( nLength < 0 ) // expand to end
- 		xTextCursor->gotoEnd( sal_True );
- 	else
-@@ -127,7 +132,7 @@ ScVbaCharacters::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Characters" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Characters" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbacharacters.hxx sc/source/ui/vba/vbacharacters.hxx
-index 742c4de..1ea523f 100644
---- sc/source/ui/vba/vbacharacters.hxx
-+++ sc/source/ui/vba/vbacharacters.hxx
-@@ -32,13 +32,13 @@
- 
- #include <cppuhelper/implbase1.hxx>
- 
--#include <org/openoffice/excel/XCharacters.hpp>
-+#include <ooo/vba/excel/XCharacters.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/text/XSimpleText.hpp>
+Index: sc/source/ui/vba/vbalineformat.hxx
+===================================================================
+--- sc/source/ui/vba/vbalineformat.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbalineformat.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,10 +32,10 @@
  
+ #include <com/sun/star/drawing/XShape.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+-#include <org/openoffice/msforms/XLineFormat.hpp>
++#include <ooo/vba/msforms/XLineFormat.hpp>
  #include "vbahelperinterface.hxx"
- #include "vbapalette.hxx"
--typedef InheritedHelperInterfaceImpl1< oo::excel::XCharacters > ScVbaCharacters_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XCharacters > ScVbaCharacters_BASE;
- 
- class ScVbaCharacters : public ScVbaCharacters_BASE
- {
-@@ -51,7 +51,7 @@ private:
-     // Add becuase of MSO has diferent behavior.
-     sal_Bool bReplace;
- public:
--	ScVbaCharacters( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,  const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool bReplace = sal_False  ) throw ( css::lang::IllegalArgumentException );
-+	ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,  const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool bReplace = sal_False  ) throw ( css::lang::IllegalArgumentException );
- 
- 	virtual ~ScVbaCharacters() {}
- 	// Attributes
-@@ -60,8 +60,8 @@ public:
- 	virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
- 	virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
--	virtual void SAL_CALL setFont( const css::uno::Reference< oo::excel::XFont >& _font ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setFont( const css::uno::Reference< ov::excel::XFont >& _font ) throw (css::uno::RuntimeException);
- 
- 	// Methods
- 	virtual void SAL_CALL Insert( const ::rtl::OUString& String ) throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbachart.cxx sc/source/ui/vba/vbachart.cxx
-index c5aa1dc..3b1238b 100644
---- sc/source/ui/vba/vbachart.cxx
-+++ sc/source/ui/vba/vbachart.cxx
-@@ -40,10 +40,10 @@
- #include <com/sun/star/chart/ChartSolidType.hpp>
- #include <com/sun/star/chart/ChartDataRowSource.hpp>
- #include <com/sun/star/chart/ChartDataCaption.hpp>
--#include <org/openoffice/excel/XlChartType.hpp>
--#include <org/openoffice/excel/XlRowCol.hpp>
--#include <org/openoffice/excel/XlAxisType.hpp>
--#include <org/openoffice/excel/XlAxisGroup.hpp>
-+#include <ooo/vba/excel/XlChartType.hpp>
-+#include <ooo/vba/excel/XlRowCol.hpp>
-+#include <ooo/vba/excel/XlAxisType.hpp>
-+#include <ooo/vba/excel/XlAxisGroup.hpp>
- 
- #include <basic/sberrors.hxx>
- #include "vbachartobject.hxx"
-@@ -52,11 +52,11 @@
- #include "vbaaxes.hxx"
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
--using namespace ::org::openoffice::excel::XlChartType;
--using namespace ::org::openoffice::excel::XlRowCol;
--using namespace ::org::openoffice::excel::XlAxisType;
--using namespace ::org::openoffice::excel::XlAxisGroup;
-+using namespace ::ooo::vba;
-+using namespace ::ooo::vba::excel::XlChartType;
-+using namespace ::ooo::vba::excel::XlRowCol;
-+using namespace ::ooo::vba::excel::XlAxisType;
-+using namespace ::ooo::vba::excel::XlAxisGroup;
  
- const rtl::OUString CHART_NAME( RTL_CONSTASCII_USTRINGPARAM("Name") );
- // #TODO move this constant to vbaseries.[ch]xx ( when it exists )
-@@ -77,7 +77,7 @@ const rtl::OUString HASMAINTITLE( RTL_CONSTASCII_USTRINGPARAM("HasMainTitle") );
- const rtl::OUString HASLEGEND( RTL_CONSTASCII_USTRINGPARAM("HasLegend") );
- const rtl::OUString DATACAPTION( RTL_CONSTASCII_USTRINGPARAM("DataCaption") );
+-typedef InheritedHelperInterfaceImpl1< oo::msforms::XLineFormat > ScVbaLineFormat_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::msforms::XLineFormat > ScVbaLineFormat_BASE;
  
--ScVbaChart::ScVbaChart( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart( _xTableChart )
-+ScVbaChart::ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart( _xTableChart )
+ class ScVbaLineFormat : public ScVbaLineFormat_BASE
  {
- 	mxChartDocument.set( _xChartComponent, uno::UNO_QUERY_THROW ) ;
- 	// #TODO is is possible that the XPropertySet interface is not set
-@@ -562,7 +562,7 @@ ScVbaChart::Activate() throw (script::BasicErrorException, uno::RuntimeException
- 	// them in the worksheets/sheets collections ), but.....???
- 	// note: in vba for excel the parent of a Chart sheet is a workbook,
- 	// e.g. 'ThisWorkbook'
--	uno::Reference< vba::XHelperInterface > xParent( getParent() );
-+	uno::Reference< XHelperInterface > xParent( getParent() );
- 	ScVbaChartObject* pChartObj = static_cast< ScVbaChartObject* >( xParent.get() );
- 	if ( pChartObj )
- 		pChartObj->Activate();
-@@ -571,7 +571,7 @@ ScVbaChart::Activate() throw (script::BasicErrorException, uno::RuntimeException
- }
+@@ -51,7 +51,7 @@
+     rtl::OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (css::uno::RuntimeException);
+     sal_Int32 calculateArrowheadSize();
+ public:
+-    ScVbaLineFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
++    ScVbaLineFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
  
- void SAL_CALL 
--ScVbaChart::setSourceData( const css::uno::Reference< ::org::openoffice::excel::XRange >& _xCalcRange, const css::uno::Any& _aPlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-+ScVbaChart::setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange >& _xCalcRange, const css::uno::Any& _aPlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
- {
- 	try
- 	{
-@@ -1156,7 +1156,7 @@ ScVbaChart::getValuesCount(sal_Int32 _seriesIndex) throw ( script::BasicErrorExc
+     // Attributes
+     virtual sal_Int32 SAL_CALL getBeginArrowheadStyle() throw (css::uno::RuntimeException);
+@@ -78,8 +78,8 @@
+     virtual void SAL_CALL setDashStyle( sal_Int32 _dashstyle ) throw (css::uno::RuntimeException);
  
+     // Methods
+-    virtual css::uno::Reference< oo::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
+ };
  
- uno::Reference< excel::XDataLabels > 
--ScVbaChart::DataLabels( const uno::Reference< oo::excel::XSeries > /*_oSeries*/ ) throw ( css::script::BasicErrorException )
-+ScVbaChart::DataLabels( const uno::Reference< ov::excel::XSeries > /*_oSeries*/ ) throw ( css::script::BasicErrorException )
- {
- 	if ( true )
- 		throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() );
-@@ -1249,7 +1249,7 @@ ScVbaChart::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Chart" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Chart" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbachart.hxx sc/source/ui/vba/vbachart.hxx
-index 6845350..cd20e06 100644
---- sc/source/ui/vba/vbachart.hxx
-+++ sc/source/ui/vba/vbachart.hxx
-@@ -38,12 +38,12 @@
- #include <com/sun/star/chart/XAxisZSupplier.hpp>
- #include <com/sun/star/chart/XTwoAxisXSupplier.hpp>
- #include <com/sun/star/chart/XTwoAxisYSupplier.hpp>
--#include <org/openoffice/excel/XChart.hpp>
--#include <org/openoffice/excel/XDataLabels.hpp>
+ #endif//SC_VBA_XLINEFORMAT_HXX
+Index: sc/source/ui/vba/vbaseriescollection.cxx
+===================================================================
+--- sc/source/ui/vba/vbaseriescollection.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaseriescollection.cxx	(.../cws/npower11)	(revision 266650)
+@@ -28,14 +28,14 @@
+  *
+  ************************************************************************/
+ #include "vbaseriescollection.hxx"
 -#include <org/openoffice/excel/XSeries.hpp>
-+#include <ooo/vba/excel/XChart.hpp>
-+#include <ooo/vba/excel/XDataLabels.hpp>
 +#include <ooo/vba/excel/XSeries.hpp>
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1<oo::excel::XChart > ChartImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1<ov::excel::XChart > ChartImpl_BASE;
- 
- class ScVbaChart : public ChartImpl_BASE
- {		
-@@ -73,7 +73,7 @@ friend class ScVbaAxis;
- 	void assignDiagramAttributes();
- 	void setDefaultSeriesDescriptionLabels(){}
- public:
--	ScVbaChart( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart );
-+	ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart );
  
- 	// Non-interface
- 	css::uno::Reference< css::beans::XPropertySet > xDiagramPropertySet() { return mxDiagramPropertySet; }
-@@ -85,7 +85,7 @@ public:
- 	rtl::OUString getSeriesName(sal_Int32 _index) throw ( css::script::BasicErrorException );
- 	double getValue(sal_Int32 _seriesIndex, sal_Int32 _valindex) throw ( css::script::BasicErrorException );
- 	sal_Int32 getValuesCount(sal_Int32 _seriesIndex) throw ( css::script::BasicErrorException );
--	css::uno::Reference< oo::excel::XDataLabels > DataLabels( const css::uno::Reference< oo::excel::XSeries > _oSeries ) throw ( css::script::BasicErrorException );
-+	css::uno::Reference< ov::excel::XDataLabels > DataLabels( const css::uno::Reference< ov::excel::XSeries > _oSeries ) throw ( css::script::BasicErrorException );
- 	bool getHasDataCaption( const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet )throw ( css::script::BasicErrorException );
- 	void setHasDataCaption( const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, bool _bHasDataLabels )throw ( css::script::BasicErrorException );
- 	bool is3D() throw ( css::uno::RuntimeException );
-@@ -96,7 +96,7 @@ public:
- 	virtual ::sal_Int32 SAL_CALL getChartType() throw ( css::uno::RuntimeException, css::script::BasicErrorException);
- 	virtual void SAL_CALL setChartType( ::sal_Int32 _charttype ) throw ( css::uno::RuntimeException, css::script::BasicErrorException);
- 	virtual void SAL_CALL Activate(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
--	virtual void SAL_CALL setSourceData( const css::uno::Reference< ::org::openoffice::excel::XRange >& range, const css::uno::Any& PlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual void SAL_CALL setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange >& range, const css::uno::Any& PlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual ::sal_Int32 SAL_CALL Location(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual ::sal_Int32 SAL_CALL getLocation(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL setLocation( ::sal_Int32 where, const css::uno::Any& Name ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-@@ -106,7 +106,7 @@ public:
- 	virtual void SAL_CALL setHasLegend( ::sal_Bool bLegend ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL setPlotBy( ::sal_Int32 xlRowCol ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual ::sal_Int32 SAL_CALL getPlotBy(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XChartTitle > SAL_CALL getChartTitle(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XChartTitle > SAL_CALL getChartTitle(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Axes( const css::uno::Any& Type, const css::uno::Any& AxisGroup ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	// XHelperInterface
- 	virtual rtl::OUString& getServiceImplName();
-diff --git sc/source/ui/vba/vbachartobject.cxx sc/source/ui/vba/vbachartobject.cxx
-index a82a9e6..c87e356 100644
---- sc/source/ui/vba/vbachartobject.cxx
-+++ sc/source/ui/vba/vbachartobject.cxx
-@@ -37,12 +37,12 @@
- #include "vbachartobjects.hxx"
+ #include "vbaglobals.hxx"
  
  using namespace ::com::sun::star;
 -using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
  
- const rtl::OUString CHART_NAME( RTL_CONSTASCII_USTRINGPARAM("Name") );
- const rtl::OUString PERSIST_NAME( RTL_CONSTASCII_USTRINGPARAM("PersistName") );
- 
--ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart( _xTableChart ), xDrawPageSupplier( _xDrawPageSupplier )
-+ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart( _xTableChart ), xDrawPageSupplier( _xDrawPageSupplier )
+-ScVbaSeriesCollection::ScVbaSeriesCollection( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SeriesCollection_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ) 
++ScVbaSeriesCollection::ScVbaSeriesCollection( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SeriesCollection_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ) 
  {
-         xDrawPage = xDrawPageSupplier->getDrawPage();        
-         xEmbeddedObjectSupplier.set( xTableChart, uno::UNO_QUERY_THROW );
-@@ -152,7 +152,7 @@ ScVbaChartObject::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
+ }
+ 
+@@ -76,7 +76,7 @@
+ 	if ( sNames.getLength() == 0 )
  	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.ChartObject" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ChartObject" ) );
+ 		sNames.realloc( 1 );
+-		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.SeriesCollection") );
++		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.SeriesCollection") );
  	}
- 	return aServiceNames;
+ 	return sNames;
  }
-diff --git sc/source/ui/vba/vbachartobject.hxx sc/source/ui/vba/vbachartobject.hxx
-index ef5e297..e36f157 100644
---- sc/source/ui/vba/vbachartobject.hxx
-+++ sc/source/ui/vba/vbachartobject.hxx
-@@ -35,11 +35,11 @@
- #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
- #include <com/sun/star/container/XNamed.hpp>
- #include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
--#include <org/openoffice/excel/XChartObject.hpp>
-+#include <ooo/vba/excel/XChartObject.hpp>
- #include "vbahelperinterface.hxx"
- #include <memory>
+Index: sc/source/ui/vba/vbacombobox.hxx
+===================================================================
+--- sc/source/ui/vba/vbacombobox.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacombobox.hxx	(.../cws/npower11)	(revision 266650)
+@@ -33,33 +33,30 @@
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ #include <com/sun/star/script/XDefaultProperty.hpp>
+-#include <org/openoffice/msforms/XComboBox.hpp>
++#include <ooo/vba/msforms/XComboBox.hpp>
+ #include <comphelper/proparrhlp.hxx>
+ #include <comphelper/propertycontainer.hxx>
+ #include <com/sun/star/beans/PropertyAttribute.hpp>
  
--typedef InheritedHelperInterfaceImpl1<oo::excel::XChartObject > ChartObjectImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1<ov::excel::XChartObject > ChartObjectImpl_BASE;
+ #include "vbacontrol.hxx"
++#include "vbalistcontrolhelper.hxx"
+ #include "vbahelper.hxx"
  
- class ScVbaChartObject : public ChartObjectImpl_BASE
+-typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
++typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
+ class ScVbaComboBox : public ComboBoxImpl_BASE
  {		
-@@ -52,15 +52,15 @@ class ScVbaChartObject : public ChartObjectImpl_BASE
- 	css::uno::Reference< css::drawing::XShape > xShape;
- 	css::uno::Reference< css::container::XNamed > xNamed;
- 	rtl::OUString sPersistName;
--	std::auto_ptr<oo::ShapeHelper> oShapeHelper;
-+	std::auto_ptr<ov::ShapeHelper> oShapeHelper;
- 	css::uno::Reference< css::container::XNamed > xNamedShape;
- 	rtl::OUString getPersistName();
- 	css::uno::Reference< css::drawing::XShape > setShape() throw ( css::script::BasicErrorException );
+-
+-	//css::uno::Reference< css::uno::XComponentContext > m_xContext;
+-	//css::uno::Reference< css::beans::XPropertySet > m_xProps;
++	std::auto_ptr< ListControlHelper > mpListHelper;
+ 	rtl::OUString sSourceName; 
+ 	rtl::OUString msDftPropName;
+-
++	bool mbDialogType;
+ 	
  public:
--	ScVbaChartObject( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier );
-+	ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier );
- 	virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setName( const ::rtl::OUString& sName ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XChart > SAL_CALL getChart() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getChart() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException );	
- 	virtual void Activate() throw ( css::script::BasicErrorException );	
- 	// XHelperInterface
-diff --git sc/source/ui/vba/vbachartobjects.cxx sc/source/ui/vba/vbachartobjects.cxx
-index 5e6d2c9..bbd3e2b 100644
---- sc/source/ui/vba/vbachartobjects.cxx
-+++ sc/source/ui/vba/vbachartobjects.cxx
-@@ -33,7 +33,7 @@
- #include <com/sun/star/table/XTableChartsSupplier.hpp>
- #include <com/sun/star/table/XTableChart.hpp>
- #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
--#include <org/openoffice/excel/XlChartType.hpp>
-+#include <ooo/vba/excel/XlChartType.hpp>
+-	ScVbaComboBox( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
+-    ScVbaComboBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
+-                    const css::uno::Reference< css::drawing::XControlShape> xControlShape );
++	ScVbaComboBox( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pGeomHelper, bool bDialogType = false );
  
+-
+ 	// Attributes
++	virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
++	virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setListIndex( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
+ 	virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+@@ -67,10 +64,17 @@
  
- #include "vbachartobjects.hxx"
-@@ -44,17 +44,17 @@
- #include <basic/sberrors.hxx>
+ 	// Methods
+ 	virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Clear(  ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
++	// XControl
++    virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
  
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
+ 	// XDefaultProperty
+         ::rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++	//XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
+ 
+ #endif //
+Index: sc/source/ui/vba/vbatogglebutton.cxx
+===================================================================
+--- sc/source/ui/vba/vbatogglebutton.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbatogglebutton.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,108 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "vbatogglebutton.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace ooo::vba;
++
++
++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< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
++{
++    OSL_TRACE("ScVbaToggleButton(ctor)");
++    m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
++}
++
++ScVbaToggleButton::~ScVbaToggleButton()
++{
++    OSL_TRACE("~ScVbaToggleButton(dtor)");
++}
++
++// Attributes
++rtl::OUString SAL_CALL 
++ScVbaToggleButton::getCaption() throw (css::uno::RuntimeException)
++{
++    rtl::OUString Label;
++    m_xProps->getPropertyValue( LABEL ) >>= Label;
++    return Label;
++}
++
++void SAL_CALL 
++ScVbaToggleButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
++}
++
++uno::Any SAL_CALL 
++ScVbaToggleButton::getValue() throw (uno::RuntimeException)
++{
++	sal_Int16 nState = 0;
++    	m_xProps->getPropertyValue( STATE ) >>= nState;
++ 	return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
++}
++
++void SAL_CALL 
++ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
++{
++	sal_Int16 nState = 0;
++	_value >>= nState;
++        OSL_TRACE( "nState - %d", nState );
++	nState = ( nState == -1 ) ?  1 : 0;
++        OSL_TRACE( "nState - %d", nState );
++	m_xProps->setPropertyValue( STATE, uno::makeAny(  nState ) );
++}
++
++rtl::OUString& 
++ScVbaToggleButton::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaToggleButton") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaToggleButton::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ToggleButton" ) );
++	}
++	return aServiceNames;
++}
++
+Index: sc/source/ui/vba/vbapivottable.hxx
+===================================================================
+--- sc/source/ui/vba/vbapivottable.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapivottable.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,18 +32,18 @@
+ #include <cppuhelper/implbase1.hxx>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/sheet/XDataPilotTable.hpp>
+-#include <org/openoffice/excel/XPivotTable.hpp>
++#include <ooo/vba/excel/XPivotTable.hpp>
+ #include "vbahelper.hxx"
+ #include "vbahelperinterface.hxx"
  
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XPivotTable >  PivotTableImpl_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XPivotTable >  PivotTableImpl_BASE;
  
- class ChartObjectEnumerationImpl : public EnumerationHelperImpl
- {
- 	uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier;
--	uno::Reference< vba::XHelperInterface > xParent;
-+	uno::Reference< XHelperInterface > xParent;
- 	
+ class ScVbaPivotTable : public PivotTableImpl_BASE
+ {		
+ 	css::uno::Reference< css::sheet::XDataPilotTable > m_xTable;
  public:
+ 	ScVbaPivotTable( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable );
+-	virtual css::uno::Reference< oo::excel::XPivotCache > SAL_CALL PivotCache(  ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XPivotCache > SAL_CALL PivotCache(  ) throw (css::uno::RuntimeException);
+ 	// XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+Index: sc/source/ui/vba/vbalabel.cxx
+===================================================================
+--- sc/source/ui/vba/vbalabel.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbalabel.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,11 +31,11 @@
+ #include <vector>
  
--	ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< vba::XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ), xParent( _xParent ) {}
-+	ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ), xParent( _xParent ) {}
- 	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) 
- 	{ 
- 		uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
-@@ -64,7 +64,7 @@ public:
- };
- 
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
  
--ScVbaChartObjects::ScVbaChartObjects( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjects_BASE(_xParent, _xContext, css::uno::Reference< css::container::XIndexAccess >( _xTableCharts, css::uno::UNO_QUERY ) ), xTableCharts( _xTableCharts ) , xDrawPageSupplier( _xDrawPageSupplier )
-+ScVbaChartObjects::ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjects_BASE(_xParent, _xContext, css::uno::Reference< css::container::XIndexAccess >( _xTableCharts, css::uno::UNO_QUERY ) ), xTableCharts( _xTableCharts ) , xDrawPageSupplier( _xDrawPageSupplier )
- {
  
+ 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< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
+ {
  }
-@@ -191,7 +191,7 @@ ScVbaChartObjects::getServiceNames()
- 	if ( sNames.getLength() == 0 )
- 	{
- 		sNames.realloc( 1 );
--		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.ChartObjects") );
-+		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ChartObjects") );
- 	}
- 	return sNames;
+ 
+@@ -53,3 +53,36 @@
+ {
+     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
  }
-diff --git sc/source/ui/vba/vbachartobjects.hxx sc/source/ui/vba/vbachartobjects.hxx
-index 8531c69..3b18f51 100644
---- sc/source/ui/vba/vbachartobjects.hxx
-+++ sc/source/ui/vba/vbachartobjects.hxx
++uno::Any SAL_CALL 
++ScVbaLabel::getValue() throw (css::uno::RuntimeException)
++{
++    return uno::makeAny( getCaption() );
++}
++
++void SAL_CALL 
++ScVbaLabel::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++    rtl::OUString sCaption;
++    _value >>= sCaption;
++    setCaption( sCaption ); 
++}
++
++
++rtl::OUString& 
++ScVbaLabel::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaLabel::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Label" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbachartobjects.hxx
+===================================================================
+--- sc/source/ui/vba/vbachartobjects.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbachartobjects.hxx	(.../cws/npower11)	(revision 266650)
 @@ -29,8 +29,8 @@
   ************************************************************************/
  #ifndef SC_VBA_CHARTOBJECTS_HXX
@@ -13479,7 +8564,7 @@
      ::rtl::OUStringHash,
      ::std::equal_to< ::rtl::OUString > > aHashTable;
  */
-@@ -54,9 +54,9 @@ class ScVbaChartObjects : public ChartObjects_BASE
+@@ -54,9 +54,9 @@
  	css::uno::Reference< css::table::XTableCharts > xTableCharts;
  	css::uno::Reference< css::drawing::XDrawPageSupplier > xDrawPageSupplier;
  	// method associated with populating the hashmap ( I'm not convinced this is necessary )
@@ -13491,711 +8576,625 @@
  
  	css::uno::Sequence< rtl::OUString > getChartObjectNames() throw( css::script::BasicErrorException );
  	void removeByName(const rtl::OUString& _sChartName);
-diff --git sc/source/ui/vba/vbacharts.cxx sc/source/ui/vba/vbacharts.cxx
-index 51cca22..3c87bb5 100644
---- sc/source/ui/vba/vbacharts.cxx
-+++ sc/source/ui/vba/vbacharts.cxx
-@@ -32,10 +32,10 @@
- #include <com/sun/star/table/XTableChartsSupplier.hpp>
+Index: sc/source/ui/vba/vbaworksheet.hxx
+===================================================================
+--- sc/source/ui/vba/vbaworksheet.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaworksheet.hxx	(.../cws/npower11)	(revision 266650)
+@@ -35,35 +35,37 @@
  
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
+ #include <com/sun/star/sheet/XSpreadsheet.hpp>
+ #include <com/sun/star/script/XInvocation.hpp>
+-#include <org/openoffice/excel/XWorksheet.hpp>
+-#include <org/openoffice/excel/XComments.hpp>
+-#include <org/openoffice/excel/XRange.hpp>
++#include <ooo/vba/excel/XWorksheet.hpp>
++#include <ooo/vba/excel/XComments.hpp>
++#include <ooo/vba/excel/XRange.hpp>
+ #include <com/sun/star/lang/XEventListener.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/frame/XModel.hpp>
+-#include <org/openoffice/excel/XOutline.hpp>
+-#include <org/openoffice/excel/XChartObjects.hpp>
++#include <ooo/vba/excel/XOutline.hpp>
++#include <ooo/vba/excel/XPageSetup.hpp>
++#include <ooo/vba/excel/XHPageBreaks.hpp>
++#include <ooo/vba/excel/XChartObjects.hpp>
  
+ #include "vbahelperinterface.hxx"
  
--ScVbaCharts::ScVbaCharts( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext ) : Charts_BASE(_xParent, _xContext, uno::Reference< container::XIndexAccess >() )
-+ScVbaCharts::ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext ) : Charts_BASE(_xParent, _xContext, uno::Reference< container::XIndexAccess >() )
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XWorksheet >  WorksheetImpl_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XWorksheet >  WorksheetImpl_BASE;
+ 
+ class ScVbaWorksheet : public WorksheetImpl_BASE
  {
- 	// #TODO #FIXME surely this is wrong, you should never use the 
- 	// currently documement ( it could be anything )
-@@ -118,7 +118,7 @@ ScVbaCharts::getServiceNames()
- 	if ( sNames.getLength() == 0 )
- 	{
- 		sNames.realloc( 1 );
--		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Charts") );
-+		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Charts") );
- 	}
- 	return sNames;
- }
-diff --git sc/source/ui/vba/vbacharts.hxx sc/source/ui/vba/vbacharts.hxx
-index 46183e0..d9d0f8e 100644
---- sc/source/ui/vba/vbacharts.hxx
-+++ sc/source/ui/vba/vbacharts.hxx
-@@ -29,30 +29,30 @@
-  ************************************************************************/
- #ifndef SC_VBA_CHARTS_HXX
- #define SC_VBA_CHARTS_HXX
--#include <org/openoffice/excel/XCharts.hpp>
-+#include <ooo/vba/excel/XCharts.hpp>
- #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
- #include"vbacollectionimpl.hxx"
- #include "vbahelper.hxx"
- #include <hash_map>
+ 	css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
+ 	css::uno::Reference< css::frame::XModel > mxModel;
+-	css::uno::Reference< oo::excel::XChartObjects > mxCharts;
++	css::uno::Reference< ov::excel::XChartObjects > mxCharts;
+ 		
+-	css::uno::Reference< oo::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
+-	css::uno::Reference< oo::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
++	css::uno::Reference< ov::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
++	css::uno::Reference< ov::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
  
--typedef CollTestImplHelper< oo::excel::XCharts > Charts_BASE;
-+typedef CollTestImplHelper< ov::excel::XCharts > Charts_BASE;
+-	css::uno::Any getControl( const rtl::OUString& sName );
++	css::uno::Reference< css::container::XNameAccess > getFormControls();
+ 	css::uno::Any getControlShape( const rtl::OUString& sName );
+ protected:
  
- class ScVbaCharts : public Charts_BASE
- {		
--	css::uno::Reference< oo::excel::XChart > xActiveChart;
-+	css::uno::Reference< ov::excel::XChart > xActiveChart;
- 	css::uno::Reference< css::sheet::XSpreadsheetDocument > xSpreadsheetDocument;
- 	css::uno::Reference< css::lang::XComponent > xComponent;
+-	ScVbaWorksheet( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext );
++	ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext );
  public:
--	ScVbaCharts( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext );
-+	ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext );
- 	// XCharts
- 	virtual css::uno::Any SAL_CALL Add() throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XChart > SAL_CALL getActiveChart(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getActiveChart(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	// XCollection
- 	::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
- 	// XEnumerationAccess
- 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
- 	// XElementAccess
--	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) { return oo::excel::XChart::static_type(0); }
-+	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) { return ov::excel::XChart::static_type(0); }
- 	// ScVbaCollectionBaseImpl	
- 	virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); 
- 	// Charts_BASE or HelperInterface
-diff --git sc/source/ui/vba/vbacharttitle.cxx sc/source/ui/vba/vbacharttitle.cxx
-index 8fff48d..1380b05 100644
---- sc/source/ui/vba/vbacharttitle.cxx
-+++ sc/source/ui/vba/vbacharttitle.cxx
-@@ -29,10 +29,10 @@
-  ************************************************************************/
- #include "vbacharttitle.hxx"
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
--ScVbaChartTitle::ScVbaChartTitle( const uno::Reference< vba::XHelperInterface >& xParent,  const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& _xTitleShape ) :  ChartTitleBase( xParent, xContext, _xTitleShape )
-+ScVbaChartTitle::ScVbaChartTitle( const uno::Reference< XHelperInterface >& xParent,  const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& _xTitleShape ) :  ChartTitleBase( xParent, xContext, _xTitleShape )
- {
- }
- 
-@@ -51,7 +51,7 @@ ScVbaChartTitle::getServiceNames()
- 	{
- 		uno::Sequence< rtl::OUString > BaseServiceNames = ChartTitleBase::getServiceNames();
- 		aServiceNames.realloc( BaseServiceNames.getLength() + 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Chart" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Chart" ) );
- 		for ( sal_Int32 index = 1; index < (BaseServiceNames.getLength() + 1); ++index )
- 			aServiceNames[ index ] = BaseServiceNames[ index ];
- 	}
-diff --git sc/source/ui/vba/vbacharttitle.hxx sc/source/ui/vba/vbacharttitle.hxx
-index 1221f5b..beb989b 100644
---- sc/source/ui/vba/vbacharttitle.hxx
-+++ sc/source/ui/vba/vbacharttitle.hxx
-@@ -31,15 +31,15 @@
- #define SC_VBA_CHARTTITLE_HXX
- #include "vbatitle.hxx"
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/excel/XChartTitle.hpp>
-+#include <ooo/vba/excel/XChartTitle.hpp>
+-	ScVbaWorksheet( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,
++	ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ 		const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ 		const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet, 
+ 		const css::uno::Reference< css::frame::XModel >& xModel )throw (css::uno::RuntimeException)  ;
+@@ -86,16 +88,19 @@
+ 	virtual ::sal_Bool SAL_CALL getProtectionMode() throw (css::uno::RuntimeException);
+ 	virtual ::sal_Bool SAL_CALL getProtectContents() throw (css::uno::RuntimeException);
+ 	virtual ::sal_Bool SAL_CALL getProtectDrawingObjects() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getUsedRange() throw (css::uno::RuntimeException) ;
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getUsedRange() throw (css::uno::RuntimeException) ;
+ 	virtual css::uno::Any SAL_CALL ChartObjects( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XOutline > SAL_CALL Outline( ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getNext() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getPrevious() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XOutline > SAL_CALL Outline( ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XPageSetup > SAL_CALL PageSetup( ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL HPageBreaks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getNext() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getPrevious() throw (css::uno::RuntimeException);
++ 	virtual sal_Int16 SAL_CALL getIndex() throw (css::uno::RuntimeException);
  
+     // Methods
+ 	virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Move( const css::uno::Any& Before, const css::uno::Any& After ) throw (css::uno::RuntimeException) ;
+  	virtual void SAL_CALL Copy( const css::uno::Any& Before, const css::uno::Any& After ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Paste( const css::uno::Any& Destination, const css::uno::Any& Link ) throw (css::uno::RuntimeException);
+@@ -106,9 +111,9 @@
+ 	virtual void SAL_CALL Calculate(  ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL CheckSpelling( const css::uno::Any& CustomDictionary,const css::uno::Any& IgnoreUppercase,const css::uno::Any& AlwaysSuggest, const css::uno::Any& SpellingLang ) throw (css::uno::RuntimeException);
+ 	// Hacks (?)
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Rows(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Columns(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Rows(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
  
--typedef TitleImpl< cppu::WeakImplHelper1< oo::excel::XChartTitle > > ChartTitleBase;
-+typedef TitleImpl< cppu::WeakImplHelper1< ov::excel::XChartTitle > > ChartTitleBase;
+ 	virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException); 
+ 	virtual css::uno::Any SAL_CALL PivotTables( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
+@@ -131,6 +136,7 @@
+     virtual void SAL_CALL setCodeName( const rtl::OUString& sCodeName ) throw (css::uno::RuntimeException);
+     sal_Int16 getSheetID() throw (css::uno::RuntimeException);
  
- class ScVbaChartTitle : public ChartTitleBase
- {
- public:
--	ScVbaChartTitle( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape );
-+	ScVbaChartTitle( const css::uno::Reference< ov::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape );
++	virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, const css::uno::Any& IgnorePrintAreas ) throw (css::uno::RuntimeException);
  	// XHelperInterface
  	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-diff --git sc/source/ui/vba/vbacheckbox.cxx sc/source/ui/vba/vbacheckbox.cxx
-new file mode 100644
-index 0000000..958e375
---- /dev/null
-+++ sc/source/ui/vba/vbacheckbox.cxx
-@@ -0,0 +1,110 @@
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();	
+Index: sc/source/ui/vba/vbapagebreak.cxx
+===================================================================
+--- sc/source/ui/vba/vbapagebreak.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbapagebreak.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,141 @@
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile$
++ * $Revision$
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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 "vbacheckbox.hxx"
-+#include <vector>
-+
-+using namespace com::sun::star;
-+using namespace ooo::vba;
-+
++#include "vbapagebreak.hxx"
++#include "vbarange.hxx"
++#include <ooo/vba/excel/XlPageBreak.hpp>
++using namespace ::com::sun::star;
++using namespace ::ooo::vba;
 +
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-+ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
++template< typename Ifc1 >
++ScVbaPageBreak<Ifc1>::ScVbaPageBreak( const uno::Reference< XHelperInterface >& xParent, 
++                    const uno::Reference< uno::XComponentContext >& xContext,
++            		uno::Reference< beans::XPropertySet >& xProps,
++                    sheet::TablePageBreakData aTablePageBreakData) throw (uno::RuntimeException):
++            ScVbaPageBreak_BASE( xParent, xContext ),
++            mxRowColPropertySet( xProps ),
++            maTablePageBreakData( aTablePageBreakData )
 +{
 +}
 +
-+// Attributes
-+rtl::OUString SAL_CALL 
-+ScVbaCheckbox::getCaption() throw (css::uno::RuntimeException)
++template< typename Ifc1 >
++sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) 
 +{
-+    rtl::OUString Label;
-+    m_xProps->getPropertyValue( LABEL ) >>= Label;
-+    return Label;
++    uno::Any aValue = mxRowColPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )));
++    sal_Bool hasPageBreak = sal_False;
++    aValue >>= hasPageBreak;
++
++    if( !hasPageBreak )
++        return excel::XlPageBreak::xlPageBreakNone;
++    
++    if( maTablePageBreakData.ManualBreak )
++        return excel::XlPageBreak::xlPageBreakManual;
++    
++    return excel::XlPageBreak::xlPageBreakAutomatic;
 +}
 +
-+void SAL_CALL 
-+ScVbaCheckbox::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++template< typename Ifc1 >
++void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) 
 +{
-+    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
++    if( (type != excel::XlPageBreak::xlPageBreakNone) && 
++        (type != excel::XlPageBreak::xlPageBreakManual) &&
++        (type != excel::XlPageBreak::xlPageBreakAutomatic) )
++    {
++        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++    }
++
++    if( type == excel::XlPageBreak::xlPageBreakNone )
++    {
++        mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
++        return;
++    }
++
++    mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_True));
++    if( type == excel::XlPageBreak::xlPageBreakManual )
++        maTablePageBreakData.ManualBreak = sal_True;
++    else
++        maTablePageBreakData.ManualBreak = sal_False;
 +}
 +
-+uno::Any SAL_CALL 
-+ScVbaCheckbox::getValue() throw (css::uno::RuntimeException)
++template< typename Ifc1 >
++void ScVbaPageBreak<Ifc1>::Delete() throw ( script::BasicErrorException, uno::RuntimeException)
 +{
-+    sal_Int16 nValue = -1;
-+    m_xProps->getPropertyValue( STATE ) >>= nValue;
-+    if( nValue != 0 )
-+        nValue = -1;
-+//    return uno::makeAny( nValue ); 
-+// I must be missing something MSO says value should be -1 if selected, 0 if not
-+// selected
-+    return uno::makeAny( ( nValue == -1 ) ? sal_True : sal_False ); 
++    mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
 +}
 +
-+void SAL_CALL 
-+ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
++template< typename Ifc1 >
++uno::Reference< excel::XRange> ScVbaPageBreak<Ifc1>::Location() throw ( script::BasicErrorException, uno::RuntimeException)
 +{
-+    sal_Int16 nValue = 0;
-+    sal_Bool bValue = false;
-+    if( _value >>= nValue )
-+    {
-+        if( nValue == -1)
-+            nValue = 1;
-+    }
-+    else if ( _value >>= bValue )
-+    {
-+        if ( bValue )
-+            nValue = 1;
-+    }
-+    m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
++    uno::Reference< table::XCellRange > xRange( mxRowColPropertySet, uno::UNO_QUERY_THROW );
++    return new ScVbaRange( ScVbaPageBreak_BASE::getParent(), ScVbaPageBreak_BASE::mxContext, xRange);
 +}
++
++template< typename Ifc1 >
 +rtl::OUString& 
-+ScVbaCheckbox::getServiceImplName()
++ScVbaPageBreak<Ifc1>::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCheckbox") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageBreak") );
 +	return sImplName;
 +}
 +
++template< typename Ifc1 >
 +uno::Sequence< rtl::OUString > 
-+ScVbaCheckbox::getServiceNames()
++ScVbaPageBreak<Ifc1>::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.CheckBox" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageBreak" ) );
 +	}
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbacheckbox.hxx sc/source/ui/vba/vbacheckbox.hxx
-new file mode 100644
-index 0000000..58805c6
---- /dev/null
-+++ sc/source/ui/vba/vbacheckbox.hxx
-@@ -0,0 +1,60 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_CHECKBOX_HXX
-+#define SC_VBA_CHECKBOX_HXX
-+#include <cppuhelper/implbase2.hxx>
-+#include <ooo/vba/msforms/XRadioButton.hpp>
 +
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
++template class ScVbaPageBreak< excel::XHPageBreak >;
 +
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XRadioButton, css::script::XDefaultProperty > CheckBoxImpl_BASE;
++/* class ScVbaHPageBreak */
++rtl::OUString& 
++ScVbaHPageBreak::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreak") );
++	return sImplName;
++}
 +
-+class ScVbaCheckbox : public CheckBoxImpl_BASE
++uno::Sequence< rtl::OUString > 
++ScVbaHPageBreak::getServiceNames()
 +{
-+public:
-+    ScVbaCheckbox(  const css::uno::Reference< ov::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, ov::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);
-+    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);
-+    // XDefaultProperty
-+    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif //SC_VBA_CHECKBOX_HXX
-diff --git sc/source/ui/vba/vbacollectionimpl.cxx sc/source/ui/vba/vbacollectionimpl.cxx
-index ed3fc04..5a9ae13 100644
---- sc/source/ui/vba/vbacollectionimpl.cxx
-+++ sc/source/ui/vba/vbacollectionimpl.cxx
-@@ -30,7 +30,7 @@
- #include <vbacollectionimpl.hxx>
- #include "vbaglobals.hxx"
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- 
- 
- ScVbaCollectionBaseImpl::ScVbaCollectionBaseImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ) throw (uno::RuntimeException) : m_xContext( xContext ), m_xIndexAccess( xIndexAccess )
-diff --git sc/source/ui/vba/vbacollectionimpl.hxx sc/source/ui/vba/vbacollectionimpl.hxx
-index 64f31c3..80371a3 100644
---- sc/source/ui/vba/vbacollectionimpl.hxx
-+++ sc/source/ui/vba/vbacollectionimpl.hxx
-@@ -30,8 +30,8 @@
- #ifndef SC_VBA_COLLECTION_IMPL_HXX
- #define SC_VBA_COLLECTION_IMPL_HXX
- 
--#include <org/openoffice/vba/XCollection.hpp>
--//#include <org/openoffice/vba/XCollectionTest.hpp>
-+#include <ooo/vba/XCollection.hpp>
-+//#include <ooo/vba/XCollectionTest.hpp>
- #include <com/sun/star/container/XEnumerationAccess.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/script/XDefaultMethod.hpp>
-@@ -187,7 +187,7 @@ protected:
- 		return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) );		
- 	}
- public:
--	ScVbaCollectionBase( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ){ m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); }
-+	ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ){ m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); }
- 	//XCollection
- 	virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException)
- 	{
-@@ -235,14 +235,14 @@ public:
- 	
- };
- 
--typedef ::cppu::WeakImplHelper1<oo::vba::XCollection> XCollection_InterfacesBASE;
-+typedef ::cppu::WeakImplHelper1<ov::XCollection> XCollection_InterfacesBASE;
- 
- typedef ScVbaCollectionBase< XCollection_InterfacesBASE > CollImplBase1;
- // compatible with the old collections ( pre XHelperInterface base class ) ( some internal objects still use this )
- class ScVbaCollectionBaseImpl : public CollImplBase1
- {
- public:
--	ScVbaCollectionBaseImpl( const css::uno::Reference< oo::vba::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : CollImplBase1( xParent, xContext, xIndexAccess){}
-+	ScVbaCollectionBaseImpl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : CollImplBase1( xParent, xContext, xIndexAccess){}
- 
- };
- 
-@@ -252,7 +252,7 @@ class CollTestImplHelper :  public ScVbaCollectionBase< ::cppu::WeakImplHelper1<
- typedef ScVbaCollectionBase< ::cppu::WeakImplHelper1< Ifc >  > ImplBase1;
- 
- public:
--	CollTestImplHelper( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,  const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : ImplBase1( xParent, xContext, xIndexAccess ) {}
-+	CollTestImplHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,  const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : ImplBase1( xParent, xContext, xIndexAccess ) {}
- };
- 
- 
-diff --git sc/source/ui/vba/vbacolorformat.cxx sc/source/ui/vba/vbacolorformat.cxx
-index db90cc8..d2ce12b 100644
---- sc/source/ui/vba/vbacolorformat.cxx
-+++ sc/source/ui/vba/vbacolorformat.cxx
-@@ -28,10 +28,10 @@
-  *
-  ************************************************************************/
- #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/msforms/XLineFormat.hpp>
-+#include <ooo/vba/msforms/XLineFormat.hpp>
- #include "vbacolorformat.hxx"
- 
--using namespace org::openoffice;
-+using namespace ooo::vba;
- using namespace com::sun::star;
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.HPageBreak" ) );
++	}
++	return aServiceNames;
++}
++
+Index: sc/source/ui/vba/vbashapes.cxx
+===================================================================
+--- sc/source/ui/vba/vbashapes.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbashapes.cxx	(.../cws/npower11)	(revision 266650)
+@@ -30,14 +30,14 @@
+ #include <com/sun/star/container/XNamed.hpp>
+ #include <com/sun/star/view/XSelectionSupplier.hpp>
+ #include <com/sun/star/text/WrapTextMode.hpp>
+-#include <org/openoffice/msforms/XShapeRange.hpp>
+-#include <org/openoffice/office/MsoAutoShapeType.hpp>
++#include <ooo/vba/msforms/XShapeRange.hpp>
++#include <ooo/vba/office/MsoAutoShapeType.hpp>
  
- sal_Int32
-@@ -51,13 +51,13 @@ MsoColorIndizes::getColorIndex( sal_Int32 nIndex )
-     };
-     return COLORINDIZES[nIndex];
- }
--ScVbaColorFormat::ScVbaColorFormat( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< vba::XHelperInterface > xInternalParent, const uno::Reference< drawing::XShape > xShape, const sal_Int16 nColorFormatType ) : ScVbaColorFormat_BASE( xParent, xContext ), m_xInternalParent( xInternalParent ), m_xShape( xShape ), m_nColorFormatType( nColorFormatType )
-+ScVbaColorFormat::ScVbaColorFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XHelperInterface > xInternalParent, const uno::Reference< drawing::XShape > xShape, const sal_Int16 nColorFormatType ) : ScVbaColorFormat_BASE( xParent, xContext ), m_xInternalParent( xInternalParent ), m_xShape( xShape ), m_nColorFormatType( nColorFormatType )
- {
-     m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
-     m_nFillFormatBackColor = 0;
-     try
-     {
--        uno::Reference< oo::msforms::XFillFormat > xFillFormat( xInternalParent, uno::UNO_QUERY_THROW );
-+        uno::Reference< ov::msforms::XFillFormat > xFillFormat( xInternalParent, uno::UNO_QUERY_THROW );
-         m_pFillFormat = ( ScVbaFillFormat* )( xFillFormat.get() );
-     }catch ( uno::RuntimeException  e )
-     {
-@@ -183,7 +183,7 @@ ScVbaColorFormat::getServiceNames()
-     if ( aServiceNames.getLength() == 0 )
-     {
-         aServiceNames.realloc( 1 );
--        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.ColorFormat" ) );
-+        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ColorFormat" ) );
-     }
-     return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbacolorformat.hxx sc/source/ui/vba/vbacolorformat.hxx
-index e113538..a5104d8 100644
---- sc/source/ui/vba/vbacolorformat.hxx
-+++ sc/source/ui/vba/vbacolorformat.hxx
-@@ -31,12 +31,12 @@
- #define SC_VBA_XCOLORFORMAT_HXX
+ #include "vbashapes.hxx"
+ #include "vbashape.hxx"
+ #include "vbashaperange.hxx"
  
- #include <com/sun/star/drawing/XShape.hpp>
--#include <org/openoffice/msforms/XColorFormat.hpp>
--#include <org/openoffice/msforms/XFillFormat.hpp>
-+#include <ooo/vba/msforms/XColorFormat.hpp>
-+#include <ooo/vba/msforms/XFillFormat.hpp>
- #include "vbahelperinterface.hxx"
- #include "vbafillformat.hxx"
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
  
--typedef InheritedHelperInterfaceImpl1< oo::msforms::XColorFormat > ScVbaColorFormat_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::msforms::XColorFormat > ScVbaColorFormat_BASE;
+ class VbShapeEnumHelper : public EnumerationHelper_BASE
+@@ -76,7 +76,7 @@
+ 	m_xNameAccess.set( xShapes, uno::UNO_QUERY );
+ }
  
- class ColorFormatType
+-ScVbaShapes::ScVbaShapes( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes ): ScVbaShapes_BASE( xParent, xContext, xShapes ), m_nNewShapeCount(0)
++ScVbaShapes::ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes ): ScVbaShapes_BASE( xParent, xContext, xShapes ), m_nNewShapeCount(0)
  {
-@@ -104,7 +104,7 @@ struct MsoColorIndizes
- class ScVbaColorFormat : public ScVbaColorFormat_BASE
+     m_xShapes.set( xShapes, uno::UNO_QUERY_THROW );
+     m_xDrawPage.set( xShapes, uno::UNO_QUERY_THROW ); 
+@@ -103,7 +103,7 @@
+ uno::Type
+ ScVbaShapes::getElementType() throw (uno::RuntimeException)
  {
- private:
--    css::uno::Reference< oo::vba::XHelperInterface > m_xInternalParent;
-+    css::uno::Reference< ov::XHelperInterface > m_xInternalParent;
-     css::uno::Reference< css::drawing::XShape > m_xShape;
-     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
-     ScVbaFillFormat *m_pFillFormat;
-@@ -115,7 +115,7 @@ protected:
-     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-     void setColorFormat( sal_Int16 nType );
- public:
--    ScVbaColorFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< oo::vba::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType );
-+    ScVbaColorFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType );
- 
-     // Attributes
-     virtual sal_Int32 SAL_CALL getRGB() throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbacombobox.cxx sc/source/ui/vba/vbacombobox.cxx
-index a839427..8f1e0fb 100644
---- sc/source/ui/vba/vbacombobox.cxx
-+++ sc/source/ui/vba/vbacombobox.cxx
-@@ -31,25 +31,29 @@
- #include <vector>
+-    return org::openoffice::msforms::XShape::static_type(0);
++    return ooo::vba::msforms::XShape::static_type(0);
+ }
+ rtl::OUString& 
+ ScVbaShapes::getServiceImplName()
+@@ -119,7 +119,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.Shapes" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Shapes" ) );
+ 	}
+ 	return aServiceNames;
+ }
+@@ -172,7 +172,7 @@
+ 	{
+ 		uno::Reference< container::XIndexAccess > xIndexAccess( getShapesByArrayIndices( Index ) );
+ 		// return new collection instance
+-		uno::Reference< vba::XCollection > xShapesCollection(  new ScVbaShapes( this->getParent(), mxContext, xIndexAccess ) );
++		uno::Reference< XCollection > xShapesCollection(  new ScVbaShapes( this->getParent(), mxContext, xIndexAccess ) );
+ 		return uno::makeAny( xShapesCollection );
+ 	}
+ */
+@@ -385,7 +385,7 @@
+ #if 0
+ //TODO helperapi using a writer document
+ awt::Point
+-calculateTopLeftMargin( uno::Reference< vba::XHelperInterface > xDocument )
++calculateTopLeftMargin( uno::Reference< XHelperInterface > xDocument )
+ {
+     awt::Point aPoint( 0, 0 );
+     uno::Reference< frame::XModel > xModel( xDocument, uno::UNO_QUERY_THROW );
+Index: sc/source/ui/vba/vbapane.cxx
+===================================================================
+--- sc/source/ui/vba/vbapane.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapane.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,7 +31,7 @@
+ #include<vbapane.hxx>
  
  using namespace com::sun::star;
 -using namespace org::openoffice;
 +using namespace ooo::vba;
  
+ /*
+ ScVbaPane::ScVbaPane( uno::Reference< uno::XComponentContext > xContext, uno::Refrence< sheet::XViewPane > xViewPane )
+Index: sc/source/ui/vba/vbahelper.hxx
+===================================================================
+--- sc/source/ui/vba/vbahelper.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbahelper.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,20 +31,25 @@
+ #define SC_VBA_HELPER_HXX
  
--const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
-+//SelectedItems list of integer indexes
-+//StringItemList list of items
-+
-+const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
-+const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
- const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
-+const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
+ #include <com/sun/star/drawing/XShape.hpp>
++#include <com/sun/star/beans/XIntrospectionAccess.hpp>
+ #include <com/sun/star/script/BasicErrorException.hpp>
+ #include <com/sun/star/script/XTypeConverter.hpp>
+ #include <com/sun/star/lang/IllegalArgumentException.hpp>
++#include <com/sun/star/awt/XControl.hpp>
+ #include <com/sun/star/awt/XDevice.hpp>
+ #include <basic/sberrors.hxx>
+ #include <cppuhelper/implbase1.hxx>
+ #include <com/sun/star/frame/XModel.hpp>
+ #include <docsh.hxx>
++#include <sfx2/dispatch.hxx>
++#include <ooo/vba/msforms/XShape.hpp>
++#include "cellsuno.hxx"
  
--ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ComboBoxImpl_BASE( xContext, xControlShape )
-+ScVbaComboBox::ScVbaComboBox( const uno::Reference< 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 )
+ namespace css = ::com::sun::star;
+ 
+-namespace org 
++namespace ooo 
  {
-+    	mpListHelper.reset( new ListControlHelper( m_xProps ) );
- 	// grab the default value property name
- 	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
- }
+-	namespace openoffice 
++	namespace vba 
+ 	{
+ 		template < class T > 
+ 		css::uno::Reference< T > getXSomethingFromArgs( css::uno::Sequence< css::uno::Any > const & args, sal_Int32 nPos, bool bCanBeNull = true ) throw (css::lang::IllegalArgumentException)
+@@ -56,10 +61,12 @@
+ 				throw css::lang::IllegalArgumentException();
+ 			return aSomething;
+ 		}
++		css::uno::Reference< css::beans::XIntrospectionAccess > getIntrospectionAccess( const css::uno::Any& aObject ) throw (css::uno::RuntimeException);
+ 		css::uno::Reference< css::script::XTypeConverter > getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
  
--ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ComboBoxImpl_BASE( xContext, xPropSet, xControlShape )
--{
--	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
--}
-+// Attributes
+ 		void dispatchRequests (css::uno::Reference< css::frame::XModel>& xModel,rtl::OUString & aUrl) ;
+ 		void dispatchRequests (css::uno::Reference< css::frame::XModel>& xModel,rtl::OUString & aUrl, css::uno::Sequence< css::beans::PropertyValue >& sProps ) ;
++		void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall = SFX_CALLMODE_SYNCHRON );
+ 		void implnCopy();
+ 		void implnPaste();
+ 		void implnCut();
+@@ -79,6 +86,7 @@
+ 		// contains an empty object reference
+ 		const css::uno::Any& aNULL();
+ 		void PrintOutHelper( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, css::uno::Reference< css::frame::XModel >& xModel, sal_Bool bSelection  );
++		void PrintPreviewHelper( const css::uno::Any& EnableChanges, css::uno::Reference< css::frame::XModel >& xModel );
  
+ 		rtl::OUString getAnyAsString( const css::uno::Any& pvargItem ) throw ( css::uno::RuntimeException );
+ 		rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike = false); // needs to be in an uno service ( already this code is duplicated in basic )
+@@ -86,6 +94,13 @@
+ 	double PointsToPixels( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
+ 	double PixelsToPoints( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
  
--// Attributes
-+// Value, [read] e.g. getValue returns the value of ooo Text propery e.g. the value in
-+// the drop down
- uno::Any SAL_CALL 
- ScVbaComboBox::getValue() throw (uno::RuntimeException)
++
++class ScVbaCellRangeAccess
++{
++public:
++    static SfxItemSet* GetDataSet( ScCellRangeObj* pRangeObj );
++};
++
+ class Millimeter
  {
-@@ -57,11 +61,48 @@ ScVbaComboBox::getValue() throw (uno::RuntimeException)
- }
- 
- void SAL_CALL 
-+ScVbaComboBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeException)
+ //Factor to translate between points and hundredths of millimeters:
+@@ -136,6 +151,80 @@
+ 		return points;
+ 	}
+ };
++
++class AbstractGeometryAttributes // probably should replace the ShapeHelper below
 +{
-+    uno::Sequence< sal_Int16 > sSelection(1);
-+    _value >>= sSelection[ 0 ];
-+    m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( sSelection ) );
-+}
++public:
++    virtual ~AbstractGeometryAttributes() {}
++    virtual double getLeft() = 0;
++    virtual void setLeft( double ) = 0;
++    virtual double getTop() = 0;
++    virtual void setTop( double ) = 0;
++    virtual double getHeight() = 0;
++    virtual void setHeight( double ) = 0;
++    virtual double getWidth() = 0;
++    virtual void setWidth( double ) = 0;
++};
 +
-+uno::Any SAL_CALL 
-+ScVbaComboBox::getListIndex() throw (uno::RuntimeException)
++class ConcreteXShapeGeometryAttributes : public AbstractGeometryAttributes
++{
++public:
++    css::uno::Reference< ooo::vba::msforms::XShape > m_xShape; 
++    ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape );
++    virtual double getLeft()
++    {
++        return m_xShape->getLeft();
++    }
++    virtual void setLeft( double nLeft )
++    {
++        m_xShape->setLeft( nLeft );
++    }
++    virtual double getTop()
++    {
++        return m_xShape->getTop();
++    }
++    virtual void setTop( double nTop )
++    {
++        m_xShape->setTop( nTop );
++    }
++
++    virtual double getHeight()
++    {
++        return m_xShape->getHeight();
++    }
++    virtual void setHeight( double nHeight )
++    {
++        m_xShape->setHeight( nHeight );
++    }
++    virtual double getWidth()
++    {
++        return m_xShape->getWidth();
++    }
++    virtual void setWidth( double nWidth)
++    {
++        m_xShape->setHeight( nWidth );
++    }
++
++   
++};
++#define VBA_LEFT "PositionX"
++#define VBA_TOP "PositionY"
++class UserFormGeometryHelper : public AbstractGeometryAttributes
 +{
-+	uno::Sequence< rtl::OUString > sItems;
-+	m_xProps->getPropertyValue( ITEMS ) >>= sItems;
-+	// should really return the item that has focus regardless of
-+	// it been selected
-+	if ( sItems.getLength() > 0 )
-+	{
-+		rtl::OUString sText = getText();
-+		sal_Int32 nLen = sItems.getLength();
-+		for ( sal_Int32 index = 0; sText.getLength() && index < nLen; ++index )
-+		{
-+			if ( sItems[ index ].equals( sText ) )
-+			{
-+				OSL_TRACE("getListIndex returning %d", index );
-+				return uno::makeAny( index );
-+			}
-+				
-+		} 
-+ 	} 
-+	OSL_TRACE("getListIndex returning %d", -1 );
-+	return uno::makeAny( sal_Int32( -1 ) );
-+}
 +
-+// Value, [write]e.g. setValue sets the value in the drop down, and if the value is one
-+// of the values in the list then the selection is also set
-+void SAL_CALL 
- ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
- {
- 	m_xProps->setPropertyValue( sSourceName, _value );
- }
- 
-+// see Value
++    css::uno::Reference< css::beans::XPropertySet > mxModel;
++public:
++    UserFormGeometryHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::awt::XControl >& xControl );
++    virtual double getLeft();
++    virtual void setLeft( double nLeft );
++    virtual double getTop();
++    virtual void setTop( double nTop );
++    virtual double getHeight();
++    virtual void setHeight( double nHeight );
++    virtual double getWidth();
++    virtual void setWidth( double nWidth);
++};
 +
- ::rtl::OUString SAL_CALL 
- ScVbaComboBox::getText() throw (uno::RuntimeException)
- {
-@@ -80,63 +121,55 @@ ScVbaComboBox::setText( const ::rtl::OUString& _text ) throw (uno::RuntimeExcept
- void SAL_CALL 
- ScVbaComboBox::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
+ class ShapeHelper
  {
-+	mpListHelper->AddItem( pvargItem, pvargIndex );
-+}
- 
--	if ( pvargItem.hasValue()  )
-+void SAL_CALL 
-+ScVbaComboBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
- 	{
--		uno::Sequence< rtl::OUString > sList;
--		m_xProps->getPropertyValue( ITEMS ) >>= sList;
--
--		sal_Int32 nIndex = sList.getLength();
-+	mpListHelper->removeItem( index );
-+}
- 
--		if ( pvargIndex.hasValue() )
--			pvargIndex >>= nIndex;
-+void SAL_CALL 
-+ScVbaComboBox::Clear(  ) throw (uno::RuntimeException)
-+		{
-+	mpListHelper->Clear();
-+		}
+ protected:
+@@ -250,7 +339,7 @@
+ 	} // openoffice
+ } // org
  
--		rtl::OUString sString;
--		pvargItem >>= sString;
-+void SAL_CALL
-+ScVbaComboBox::setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException)
-+{
-+	ScVbaControl::setRowSource( _rowsource );
-+	mpListHelper->setRowSource( _rowsource );
-+		}
+-namespace oo = org::openoffice;
++namespace ov = ooo::vba;
  
--		// if no index specified or item is to be appended to end of 
--		// list just realloc the array and set the last item
--		if ( nIndex  == sList.getLength() )
-+sal_Int32 SAL_CALL
-+ScVbaComboBox::getListCount() throw (uno::RuntimeException)
- 		{
--			sal_Int32 nOldSize = sList.getLength();
--			sList.realloc( nOldSize + 1 );
--			sList[ nOldSize ] = sString; 
-+	return mpListHelper->getListCount();
- 		}
--		else
--		{
--			// just copy those elements above the one to be inserted
--			std::vector< rtl::OUString > sVec;
--			// reserve just the amount we need to copy
--			sVec.reserve( sList.getLength() - nIndex );
--
--			// point at first element to copy
--			rtl::OUString* pString = sList.getArray() + nIndex;
--			const rtl::OUString* pEndString = sList.getArray() + sList.getLength();
--			// insert the new element
--			sVec.push_back( sString );
--			// copy elements	
--			for ( ; pString != pEndString; ++pString )
--				sVec.push_back( *pString );
- 		
--			sList.realloc(  sList.getLength() + 1 );
--
--			// point at first element to be overwritten
--			pString = sList.getArray() + nIndex;
--			pEndString = sList.getArray() + sList.getLength();
--			std::vector< rtl::OUString >::iterator it = sVec.begin();
--			for ( ; pString != pEndString; ++pString, ++it)
--				*pString = *it;	
--			//
-+uno::Any SAL_CALL 
-+ScVbaComboBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
-+		{
-+	return mpListHelper->List( pvargIndex, pvarColumn );
- 		}
+ #ifdef DEBUG
+ #  define SC_VBA_FIXME(a) OSL_TRACE( a )
+Index: sc/source/ui/vba/vbapictureformat.cxx
+===================================================================
+--- sc/source/ui/vba/vbapictureformat.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapictureformat.cxx	(.../cws/npower11)	(revision 266650)
+@@ -29,10 +29,10 @@
+  ************************************************************************/
+ #include "vbapictureformat.hxx"
  
--		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
--		
-+rtl::OUString& 
-+ScVbaComboBox::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox") );
-+	return sImplName;
- 	}
--}
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ using namespace com::sun::star;
  
--void SAL_CALL 
--ScVbaComboBox::Clear(  ) throw (uno::RuntimeException)
-+uno::Sequence< rtl::OUString > 
-+ScVbaComboBox::getServiceNames()
- {
--	setValue( uno::makeAny( rtl::OUString() ) );
--	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ComboBox" ) );
-+}
-+	return aServiceNames;
+-ScVbaPictureFormat::ScVbaPictureFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,
++ScVbaPictureFormat::ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent,
+     const css::uno::Reference< css::uno::XComponentContext >& xContext,
+     uno::Reference< drawing::XShape > xShape ) 
+     throw( lang::IllegalArgumentException ) : ScVbaPictureFormat_BASE( xParent, xContext ), m_xShape( xShape )
+@@ -141,7 +141,7 @@
+     if ( aServiceNames.getLength() == 0 )
+     {
+         aServiceNames.realloc( 1 );
+-        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.PictureFormat" ) );
++        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.PictureFormat" ) );
+     }
+     return aServiceNames;
  }
-diff --git sc/source/ui/vba/vbacombobox.hxx sc/source/ui/vba/vbacombobox.hxx
-index 7caa4f3..45996e2 100644
---- sc/source/ui/vba/vbacombobox.hxx
-+++ sc/source/ui/vba/vbacombobox.hxx
-@@ -33,33 +33,30 @@
+Index: sc/source/ui/vba/vbacontrol.hxx
+===================================================================
+--- sc/source/ui/vba/vbacontrol.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacontrol.hxx	(.../cws/npower11)	(revision 266650)
+@@ -35,40 +35,34 @@
  #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
  #include <com/sun/star/script/XDefaultProperty.hpp>
--#include <org/openoffice/msforms/XComboBox.hpp>
-+#include <ooo/vba/msforms/XComboBox.hpp>
- #include <comphelper/proparrhlp.hxx>
- #include <comphelper/propertycontainer.hxx>
- #include <com/sun/star/beans/PropertyAttribute.hpp>
+ #include <com/sun/star/drawing/XControlShape.hpp>
++#include <com/sun/star/awt/XControl.hpp>
+ #include <com/sun/star/awt/XWindowPeer.hpp>
+-#include <org/openoffice/msforms/XControl.hpp>
++#include <ooo/vba/msforms/XControl.hpp>
  
- #include "vbacontrol.hxx"
-+#include "vbalistcontrolhelper.hxx"
  #include "vbahelper.hxx"
++#include "vbahelperinterface.hxx"
  
--typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
-+typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
- class ScVbaComboBox : public ComboBoxImpl_BASE
- {		
--
--	//css::uno::Reference< css::uno::XComponentContext > m_xContext;
--	//css::uno::Reference< css::beans::XPropertySet > m_xProps;
-+	std::auto_ptr< ListControlHelper > mpListHelper;
- 	rtl::OUString sSourceName; 
- 	rtl::OUString msDftPropName;
-+	bool mbDialogType;
+-typedef ::cppu::WeakImplHelper1< oo::msforms::XControl > ControlImpl_BASE;
++//typedef ::cppu::WeakImplHelper1< ov::msforms::XControl > ControlImpl_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::msforms::XControl > ControlImpl_BASE;
  
--	
+ class ScVbaControl : public ControlImpl_BASE
+ {
+-/* this will cause error when the sheet is invisible.
+ private:
+-    css::uno::Reference< css::awt::XWindowPeer > m_xWindowPeer;
+-*/
+-private:
+-    css::uno::Reference< css::awt::XWindowPeer > getWindowPeer( const css::uno::Reference< css::drawing::XControlShape >& xControlShape ) throw (css::uno::RuntimeException);
+     com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > m_xEventListener;
+ protected:
+-    css::uno::Reference< css::uno::XComponentContext > m_xContext;
++    std::auto_ptr< ov::AbstractGeometryAttributes > mpGeometryHelper;
+     css::uno::Reference< css::beans::XPropertySet > m_xProps;
+-    css::uno::Reference< css::drawing::XControlShape > m_xControlShape;
+-protected:
+-    ScVbaControl(){ m_xContext = 0; m_xProps = 0; m_xControlShape = 0; }
+-    void SetControl( const css::uno::Reference< css::uno::XComponentContext > xContext, 
+-                const css::uno::Reference< css::drawing::XControlShape > xControlShape );
+-    void SetControl( const css::uno::Reference< css::uno::XComponentContext > xContext, 
+-                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:
--	ScVbaComboBox( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
+-    ScVbaControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
 -                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
--    ScVbaComboBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-    ScVbaControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
 -                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
--                    const css::uno::Reference< css::drawing::XControlShape> xControlShape );
--
-+	ScVbaComboBox( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pGeomHelper, bool bDialogType = false );
- 
- 	// Attributes
-+	virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
-+	virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setListIndex( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- 	virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
-@@ -67,10 +64,17 @@ public:
- 
- 	// Methods
- 	virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Clear(  ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
-+	// XControl
+-                    const css::uno::Reference< css::drawing::XControlShape > xControlShape );
++    ScVbaControl( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pHelper );
+     virtual ~ScVbaControl();
++    // This class will own the helper, so make sure it is allocated from 
++    // the heap
++    void setGeometryHelper( ov::AbstractGeometryAttributes* pHelper );
+     // 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 +76,20 @@
+     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);
+ 
+-    //remove resouce because org.openoffice.excel.XControl is a wrapper of com.sun.star.drawing.XControlShape
++    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);
++    virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setName( const rtl::OUString& _name ) throw (css::uno::RuntimeException);
++    //remove resouce because ooo.vba.excel.XControl is a wrapper of com.sun.star.drawing.XControlShape
+     virtual void removeResouce() throw( css::uno::RuntimeException );
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
  
- 	// XDefaultProperty
-         ::rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-+	//XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ 
+@@ -92,16 +97,15 @@
+ {
+ public:
+     ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
+-    ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
+-                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
+-                    const css::uno::Reference< css::drawing::XControlShape > xControlShape );
+-    ScVbaControl* createControl( const sal_Int16 nClassID )  throw ( css::uno::RuntimeException );
++                    const css::uno::Reference< css::uno::XInterface >& xControl, 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 );
++    ScVbaControl* createControl( const css::uno::Reference< css::drawing::XControlShape >&, const css::uno::Reference< css::uno::XInterface >& )  throw ( css::uno::RuntimeException );
+     css::uno::Reference< css::uno::XComponentContext > m_xContext;
+-    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 //
-diff --git sc/source/ui/vba/vbacommandbar.cxx sc/source/ui/vba/vbacommandbar.cxx
-new file mode 100644
-index 0000000..b0ececd
---- /dev/null
-+++ sc/source/ui/vba/vbacommandbar.cxx
-@@ -0,0 +1,329 @@
+ #endif//SC_VBA_CONTROL_HXX
+Index: sc/source/ui/vba/vbacommandbars.cxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbars.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacommandbars.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,247 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -14230,2660 +9229,3472 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
-+#include <com/sun/star/frame/XFrame.hpp>
++#include <com/sun/star/lang/XServiceInfo.hpp>
 +#include <com/sun/star/frame/XDesktop.hpp>
-+#include <com/sun/star/frame/XLayoutManager.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
 +
++#include "vbacommandbars.hxx"
 +#include "vbacommandbar.hxx"
-+#include "vbacommandbarcontrols.hxx"
-+#include "vbahelper.hxx"
-+
 +
 +using namespace com::sun::star;
 +using namespace ooo::vba;
 +
-+ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw (uno::RuntimeException) : CommandBar_BASE( xParent, xContext )
++typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarEnumeration_BASE;
++
++static rtl::OUString sSpreadsheetDocumentUrl( rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" ) );
++static rtl::OUString sTextDocumentUrl( rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" ) );
++static rtl::OUString sWindowStateConfUrl( rtl::OUString::createFromAscii( "com.sun.star.ui.WindowStateConfiguration" ) );
++
++class CommandBarEnumeration : public CommandBarEnumeration_BASE
 +{
-+    // it's a menu bar
-+    // only supporting factory menus ( no custom menus )
-+    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
-+    initCommandBar();
-+    switch( nModuleType )
++    uno::Reference< uno::XComponentContext > m_xContext;
++    uno::Reference< XCommandBars > m_xCommandBars;
++    uno::Sequence< rtl::OUString > m_sNames;
++    sal_Int32 m_nCurrentPosition;
++public:
++    CommandBarEnumeration( const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< XCommandBars > xCommandBars, const uno::Sequence< rtl::OUString > sNames ) : m_xContext( xContext ), m_xCommandBars( xCommandBars ), m_sNames( sNames ), m_nCurrentPosition( 0 )
 +    {
-+        case 0:
-+            m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" );
-+            break;
-+        case 1:
-+            m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" );
-+            break;
-+        default:
-+            m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" );
 +    }
-+    getMenuSettings();
-+    m_bIsMenu = sal_True;
-+    m_bCustom = sal_False;
-+}
-+ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sToolBarName, sal_Bool bTemporary, sal_Bool bCreate ) throw (uno::RuntimeException) :  CommandBar_BASE( xParent, xContext )
-+{
-+    // it's a tool bar
-+    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
-+    initCommandBar();
-+    m_bTemporary = bTemporary;
-+    m_bCreate = bCreate;
-+    // get OOo ToolBarName
-+    CommandBarNameMap::const_iterator iter = mCommandBarNameMap.find( sToolBarName.toAsciiLowerCase() );
-+    if( iter != mCommandBarNameMap.end() )
++    virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
 +    {
-+        m_sToolBarName = iter->second;
++        if( m_nCurrentPosition < m_sNames.getLength() )
++            return sal_True;
++        return sal_False;
 +    }
-+    else
++    virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
 +    {
-+        m_sToolBarName = sToolBarName;
++        if( hasMoreElements() )
++        {
++            rtl::OUString sName( m_sNames[ m_nCurrentPosition ] );
++            m_nCurrentPosition = m_nCurrentPosition + 1;
++            if( sName.indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 ) 
++            {
++                sal_Int32 nLastIndex = sName.lastIndexOf( rtl::OUString::createFromAscii( "/" ) );
++                if( ( nLastIndex != -1 ) && ( ( nLastIndex + 1 ) < sName.getLength() ) )
++                {
++                   sName = sName.copy( nLastIndex + 1);
++                   if( sName.getLength() > 0 )
++                   {
++                        uno::Reference< XHelperInterface > xHelperInterface( m_xCommandBars, uno::UNO_QUERY_THROW );
++                        uno::Reference< XCommandBar > xCommandBar( new ScVbaCommandBar( xHelperInterface, m_xContext, sName, sal_True, sal_False ) );
++                        if( xCommandBar.is() )
++                            return uno::makeAny( xCommandBar );
++                        else
++                            return nextElement();
++                    }
++                    else
++                        return nextElement();
++                    }
++             }
++             else
++                return nextElement();
++        }
++        else
++            throw container::NoSuchElementException();
++        return uno::Any();
 +    }
-+    m_sUIName = m_sToolBarName;
-+    m_bIsMenu = sal_False;
-+    getToolBarSettings( m_sToolBarName );
-+}
-+void
-+ScVbaCommandBar::initCommandBar() throw (uno::RuntimeException)
++};
++
++
++ScVbaCommandBars::ScVbaCommandBars( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< container::XIndexAccess > xIndexAccess ) : CommandBars_BASE( xParent, xContext, xIndexAccess )
 +{
-+    m_pScVbaCommandBars = dynamic_cast< ScVbaCommandBars* >( m_xParentHardRef.get() );
-+    if ( !m_pScVbaCommandBars )
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Parent needs to be a ScVbaCommandBars"), uno::Reference< uno::XInterface >() );
-+    m_bIsMenu = sal_False;
-+    m_bCustom = sal_False;
-+    m_bTemporary = sal_True;
-+    m_sToolBarName = rtl::OUString::createFromAscii("");
-+    m_sUIName = rtl::OUString::createFromAscii("");
-+    m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" );
++    retrieveObjects();
 +}
 +void
-+ScVbaCommandBar::getToolBarSettings( rtl::OUString sToolBarName ) throw( uno::RuntimeException )
++ScVbaCommandBars::retrieveObjects() throw ( uno::RuntimeException )
 +{
-+    rtl::OUString sFactoryToolBar = rtl::OUString::createFromAscii("private:resource/toolbar/") + sToolBarName.toAsciiLowerCase();
-+    rtl::OUString sCustomToolBar = rtl::OUString::createFromAscii("private:resource/toolbar/custom_toolbar_") + sToolBarName;
-+    uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
-+    uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xUICfgManagerSup( xMSF->createInstance(rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier") ), uno::UNO_QUERY_THROW );
-+    m_xUICfgManager.set( xUICfgManagerSup->getUIConfigurationManager( m_pScVbaCommandBars->GetModuleName() ), uno::UNO_QUERY_THROW );
-+    m_xUICfgPers.set( m_xUICfgManager, uno::UNO_QUERY_THROW );
-+    if( m_xUICfgManager->hasSettings( sFactoryToolBar ) )
-+    {
-+        // exsiting standard ToolBar
-+        m_xBarSettings.set( m_xUICfgManager->getSettings( sFactoryToolBar, sal_True ), uno::UNO_QUERY_THROW );
-+        m_sToolBarName = sFactoryToolBar;
-+    }
-+    else if( m_xUICfgManager->hasSettings( sCustomToolBar ) )
++    uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument(), uno::UNO_QUERY_THROW );
++    if( xServiceInfo->supportsService( sSpreadsheetDocumentUrl ) )
 +    {
-+        // exisiting custom ToolBar
-+        m_xBarSettings.set( m_xUICfgManager->getSettings( sCustomToolBar, sal_True ), uno::UNO_QUERY_THROW );
-+        m_sToolBarName = sCustomToolBar;
-+        m_bCustom = sal_True;
++        m_sModuleName = sSpreadsheetDocumentUrl;
 +    }
-+    else if( m_bCreate )
++    else if( xServiceInfo->supportsService( sTextDocumentUrl ) )
 +    {
-+        // new custom ToolBar
-+        m_xBarSettings.set( m_xUICfgManager->createSettings(), uno::UNO_QUERY_THROW );
-+        m_sToolBarName = sCustomToolBar;
-+        m_bCustom = sal_True;
-+        addCustomBar();
++        m_sModuleName = sTextDocumentUrl;
 +    }
 +    else
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii("ToolBar do not exist"), uno::Reference< uno::XInterface >() );
-+    if( m_pScVbaCommandBars->GetWindows()->hasByName( m_sToolBarName ) )
-+    {
-+        uno::Any aToolBar = m_pScVbaCommandBars->GetWindows()->getByName( m_sToolBarName );
-+        aToolBar >>= m_aToolBar; 
-+    }
++        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Unsupported Document" ), uno::Reference< uno::XInterface >() );
++    
++    uno::Reference < lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
++    uno::Reference < container::XNameAccess > xNameAccess( xMSF->createInstance( sWindowStateConfUrl ), uno::UNO_QUERY_THROW );
++    m_xNameAccess.set( xNameAccess->getByName( m_sModuleName ), uno::UNO_QUERY_THROW );
 +}
-+void
-+ScVbaCommandBar::addCustomBar()
-+{
-+    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    xPropertySet->setPropertyValue(rtl::OUString::createFromAscii("UIName"), uno::makeAny( m_sUIName ));
 +
-+    if( m_xUICfgManager->hasSettings(m_sToolBarName) )
-+    {
-+        m_xUICfgManager->replaceSettings( m_sToolBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+    }
-+    else
-+    {
-+        m_xUICfgManager->insertSettings( m_sToolBarName,  uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+    }
-+    if( !m_bTemporary )
-+    {
-+        m_xUICfgPers->store();
-+    }
++// XEnumerationAccess
++uno::Type SAL_CALL 
++ScVbaCommandBars::getElementType() throw ( uno::RuntimeException )
++{
++    return XCommandBars::static_type( 0 );
 +}
-+void 
-+ScVbaCommandBar::getMenuSettings()
++uno::Reference< container::XEnumeration >
++ScVbaCommandBars::createEnumeration() throw ( uno::RuntimeException )
 +{
-+    try
-+    {
-+        rtl::OUString sMenuBar = rtl::OUString::createFromAscii( "private:resource/menubar/menubar" );
-+        uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
-+        uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xUICfgManagerSup( xMSF->createInstance(rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier") ), uno::UNO_QUERY_THROW );
-+        m_xUICfgManager.set( xUICfgManagerSup->getUIConfigurationManager( m_sMenuModuleName ), uno::UNO_QUERY_THROW );
-+        m_xUICfgPers.set( m_xUICfgManager, uno::UNO_QUERY_THROW );
-+        m_xBarSettings.set( m_xUICfgManager->getSettings( sMenuBar, sal_True ), uno::UNO_QUERY_THROW );
-+    } 
-+    catch ( uno::Exception e)
-+    {
-+        OSL_TRACE( "getMenuSetting got a error\n" );
-+    }
++    return uno::Reference< container::XEnumeration >( new CommandBarEnumeration( mxContext, this, m_xNameAccess->getElementNames() ) );
 +}
-+::rtl::OUString SAL_CALL
-+ScVbaCommandBar::getName() throw ( uno::RuntimeException )
++
++uno::Any
++ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
 +{
-+    // This will get a "NULL length string" when Name is not set. 
-+    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    uno::Any aName = xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") );
-+    rtl::OUString sName;
-+    aName >>= sName;
-+    if( sName.getLength() < 1 && !m_bIsMenu )
++    // aSource should be a name at this time, because of the class is API wrapper.
++    rtl::OUString sToolBarName;
++    if( aSource >>= sToolBarName )
 +    {
-+        uno::Reference< container::XNameAccess > xNameAccess( m_pScVbaCommandBars->GetWindows(), uno::UNO_QUERY_THROW );
-+        if( xNameAccess->hasByName( m_sToolBarName ) )
++        sToolBarName = sToolBarName.toAsciiLowerCase();
++        if( sToolBarName.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii("Worksheet Menu Bar") ) )
++        {
++            return uno::makeAny( uno::Reference< XCommandBar > ( new ScVbaCommandBar( this, mxContext, 0 ) ) );
++        }
++        else if( sToolBarName.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii("Menu Bar") ) )
 +        {
-+            beans::PropertyValues aToolBar; 
-+            xNameAccess->getByName( m_sToolBarName ) >>= aToolBar;
-+            sal_Int32 nCount = aToolBar.getLength();
-+            beans::PropertyValue aPropertyValue;
-+            for( sal_Int32 i = 0; i < nCount; i++ )
-+            {
-+                aPropertyValue = aToolBar[i];
-+                if( aPropertyValue.Name.equals( rtl::OUString::createFromAscii("UIName") ) )
-+                {
-+                    aPropertyValue.Value >>= sName;
-+                    return sName;
-+                }
-+            }
++            return uno::makeAny( uno::Reference< XCommandBar > ( new ScVbaCommandBar( this, mxContext, 1 ) ) );
++        }
++        else if( checkToolBarExist( sToolBarName ) )
++        {
++            return uno::makeAny( uno::Reference< XCommandBar > (new ScVbaCommandBar( this, mxContext, sToolBarName, sal_True, sal_False ) ) );
 +        }
 +    }
-+    return sName;
++    return uno::Any();
 +}
-+void SAL_CALL 
-+ScVbaCommandBar::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException)
++
++// XCommandBars
++uno::Reference< XCommandBar > SAL_CALL 
++ScVbaCommandBars::Add( const css::uno::Any& Name, const css::uno::Any& /*Position*/, const css::uno::Any& /*MenuBar*/, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
 +{
-+    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("UIName"), uno::makeAny( _name ) );
-+    uno::Reference< container::XIndexAccess > xIndexAccess( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    
-+    if( m_xUICfgManager->hasSettings( m_sToolBarName ) )
-+    {
-+        m_xUICfgManager->replaceSettings( m_sToolBarName, xIndexAccess );
-+    }
-+    else
++    // Position - MsoBar MenuBar - sal_Bool
++    // Currently only the Name is supported.
++    rtl::OUString sName;
++    if( !( Name >>= sName ) )
 +    {
-+        // toolbar not found
++        sName = rtl::OUString::createFromAscii("Custom1");
 +    }
-+    if( !m_bTemporary )
++    sal_Bool bTemporary = false;
++    if( !( Temporary >>= bTemporary ) )
 +    {
-+        m_xUICfgPers->store();
++        bTemporary = sal_True;
 +    }
++    return uno::Reference< XCommandBar >( new ScVbaCommandBar( this, mxContext, sName.toAsciiLowerCase(), bTemporary, sal_True ) );
 +}
-+::sal_Bool SAL_CALL 
-+ScVbaCommandBar::getVisible() throw (uno::RuntimeException)
++sal_Int32 SAL_CALL 
++ScVbaCommandBars::getCount() throw(css::uno::RuntimeException)
 +{
-+    sal_Bool bVisible = sal_False;
-+    try
++    // Filter out all toolbars from the window collection
++    sal_Int32 nCount = 0;
++    uno::Sequence< ::rtl::OUString > allNames = m_xNameAccess->getElementNames();
++    for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
 +    {
-+        sal_Int32 i = 0;
-+        while( !m_aToolBar[i].Name.equals( rtl::OUString::createFromAscii( "Visible" ) ) )
++        if(allNames[i].indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
 +        {
-+            i++;
++            nCount++;
 +        }
-+        m_aToolBar[i].Value >>= bVisible;
-+    }
-+    catch ( uno::Exception e )
-+    {
 +    }
-+    return bVisible;
++    return nCount;
 +}
-+void SAL_CALL 
-+ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
++
++// ScVbaCollectionBaseImpl
++uno::Any SAL_CALL
++ScVbaCommandBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw( uno::RuntimeException )
 +{
-+    try
-+    {
-+        uno::Reference< frame::XFrame > xFrame( getCurrentDocument()->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW ); 
-+        uno::Reference< beans::XPropertySet > xPropertySet( xFrame, uno::UNO_QUERY_THROW );
-+        uno::Reference< frame::XLayoutManager > xLayoutManager( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("LayoutManager") ), uno::UNO_QUERY_THROW );
-+        if( _visible )
-+        {
-+            xLayoutManager->createElement( m_sToolBarName );
-+            xLayoutManager->showElement( m_sToolBarName );
-+        }
-+        else
-+        {
-+            xLayoutManager->hideElement( m_sToolBarName );
-+            xLayoutManager->destroyElement( m_sToolBarName );
-+        }
-+    }
-+    catch( uno::Exception e )
++    if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
 +    {
-+        OSL_TRACE( "SetVisible get an exception\n" );
++        return createCollectionObject( aIndex );    
 +    }
++    return uno::Any();
 +}
-+void SAL_CALL 
-+ScVbaCommandBar::Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++
++sal_Bool
++ScVbaCommandBars::checkToolBarExist( rtl::OUString sToolBarName )
 +{
-+    if( m_bCustom )
++    CommandBarNameMap::const_iterator iter = mCommandBarNameMap.find( sToolBarName.toAsciiLowerCase() );
++    if( iter != mCommandBarNameMap.end() )
 +    {
-+        if( m_xUICfgManager->hasSettings( m_sToolBarName ) )
++        return sal_True;
++    }    
++    uno::Sequence< ::rtl::OUString > allNames = m_xNameAccess->getElementNames();
++    for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
++    {
++        if(allNames[i].indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
 +        {
-+            m_xUICfgManager->removeSettings(m_sToolBarName);
-+            // make it permanent
-+            if( !m_bTemporary )
++            if( allNames[i].indexOf( sToolBarName ) != -1 )
 +            {
-+                m_xUICfgPers->store();
++                return sal_True;
 +            }
 +        }
-+        else
-+        {
-+            // toolbar not found
-+            // TODO throw Error
-+        }
-+        uno::Reference< container::XNameContainer > xNameContainer( m_pScVbaCommandBars->GetWindows(), uno::UNO_QUERY_THROW );
-+        if( xNameContainer->hasByName( m_sToolBarName ) )
-+        {
-+            xNameContainer->removeByName( m_sToolBarName );
-+        }
-+    }
-+}
-+uno::Any SAL_CALL 
-+ScVbaCommandBar::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
-+{
-+    sal_Int32 nIndex;
-+    uno::Reference< XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
-+    if( aIndex.hasValue() )
-+    {
-+        if( aIndex >>= nIndex )
-+        {
-+            uno::Reference< XCommandBarControl > xCommandBarControl( xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW );
-+            return uno::makeAny( xCommandBarControl );
-+        }
-+        else
-+            throw uno::RuntimeException( rtl::OUString::createFromAscii(  "invalid index" ), uno::Reference< uno::XInterface >() );
 +    }
-+    return uno::makeAny( xCommandBarControls );
++    return sal_False;
 +}
++    
++// XHelperInterface
 +rtl::OUString& 
-+ScVbaCommandBar::getServiceImplName()
++ScVbaCommandBars::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBar") );
-+	return sImplName;
++    static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBars") );
++    return sImplName;
 +}
 +uno::Sequence<rtl::OUString> 
-+ScVbaCommandBar::getServiceNames()
++ScVbaCommandBars::getServiceNames()
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBar" ) );
-+	}
-+	return aServiceNames;
++    static uno::Sequence< rtl::OUString > aServiceNames;
++    if ( aServiceNames.getLength() == 0 )
++    {
++        aServiceNames.realloc( 1 );
++        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBars" ) );
++    }
++    return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbacommandbar.hxx sc/source/ui/vba/vbacommandbar.hxx
-new file mode 100644
-index 0000000..286bed1
---- /dev/null
-+++ sc/source/ui/vba/vbacommandbar.hxx
-@@ -0,0 +1,105 @@
++
+Index: sc/source/ui/vba/vbaformat.cxx
+===================================================================
+--- sc/source/ui/vba/vbaformat.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaformat.cxx	(.../cws/npower11)	(revision 266650)
+@@ -28,11 +28,11 @@
+  *
+  ************************************************************************/
+ #include "vbaformat.hxx"
+-#include <org/openoffice/excel/XStyle.hpp>
+-#include <org/openoffice/excel/XlVAlign.hpp>
+-#include <org/openoffice/excel/XlHAlign.hpp>
+-#include <org/openoffice/excel/XlOrientation.hpp>
+-#include <org/openoffice/excel/Constants.hpp>
++#include <ooo/vba/excel/XStyle.hpp>
++#include <ooo/vba/excel/XlVAlign.hpp>
++#include <ooo/vba/excel/XlHAlign.hpp>
++#include <ooo/vba/excel/XlOrientation.hpp>
++#include <ooo/vba/excel/Constants.hpp>
+ #include <com/sun/star/table/CellVertJustify.hpp>
+ #include <com/sun/star/table/CellHoriJustify.hpp>
+ #include <com/sun/star/table/CellOrientation.hpp>
+@@ -49,14 +49,14 @@
+ 
+ #include "unonames.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ #define FORMATSTRING "FormatString"
+ #define LOCALE "Locale"
+ 
+ template< typename Ifc1 >
+-ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( sal_False )
++ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( sal_False )
+ {
+ 	try
+ 	{
+@@ -342,7 +342,7 @@
+ ScVbaFormat<Ifc1>::Borders( const uno::Any& Index ) throw (script::BasicErrorException, uno::RuntimeException )
+ {
+ 	ScVbaPalette aPalette( getDocShell( mxModel ) );	
+-	uno::Reference< vba::XCollection > xColl =  new ScVbaBorders( thisHelperIface(), ScVbaFormat_BASE::mxContext, uno::Reference< table::XCellRange >( mxPropertySet, uno::UNO_QUERY_THROW ), aPalette );
++	uno::Reference< XCollection > xColl =  new ScVbaBorders( thisHelperIface(), ScVbaFormat_BASE::mxContext, uno::Reference< table::XCellRange >( mxPropertySet, uno::UNO_QUERY_THROW ), aPalette );
+ 
+ 	if ( Index.hasValue() )
+ 	{ 
+@@ -791,7 +791,7 @@
+         if ( aServiceNames.getLength() == 0 )
+         {
+                 aServiceNames.realloc( 1 );
+-                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Format" ) );
++                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Format" ) );
+         }
+         return aServiceNames;
+ }
+Index: sc/source/ui/vba/makefile.mk
+===================================================================
+--- sc/source/ui/vba/makefile.mk	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/makefile.mk	(.../cws/npower11)	(revision 266650)
+@@ -84,13 +84,16 @@
+ 		$(SLO)$/vbacombobox.obj \
+ 		$(SLO)$/vbavalidation.obj \
+                 $(SLO)$/vbacontrol.obj \
++                $(SLO)$/vbacontrols.obj \
+                 $(SLO)$/vbaoleobject.obj \
+                 $(SLO)$/vbaoleobjects.obj \
+                 $(SLO)$/vbabutton.obj \
+                 $(SLO)$/vbalabel.obj \
+                 $(SLO)$/vbatextbox.obj \
++                $(SLO)$/vbatextboxshape.obj \
+                 $(SLO)$/vbaradiobutton.obj \
+                 $(SLO)$/vbalistbox.obj \
++		$(SLO)$/vbalistcontrolhelper.obj \
+                 $(SLO)$/vbapropvalue.obj \
+                 $(SLO)$/vbapane.obj \
+                 $(SLO)$/vbashape.obj \
+@@ -112,8 +115,26 @@
+                 $(SLO)$/vbaformatconditions.obj \
+                 $(SLO)$/vbastyle.obj \
+                 $(SLO)$/vbastyles.obj \
+-		$(SLO)$/service.obj \
+- 
++                $(SLO)$/vbaassistant.obj \
++                $(SLO)$/vbauserform.obj \
++                $(SLO)$/vbacheckbox.obj \
++                $(SLO)$/vbatogglebutton.obj \
++                $(SLO)$/vbaframe.obj \
++                $(SLO)$/vbascrollbar.obj \
++                $(SLO)$/vbaprogressbar.obj \
++				$(SLO)$/vbamultipage.obj \
++				$(SLO)$/vbapages.obj \
++                $(SLO)$/vbacommandbarcontrol.obj \
++                $(SLO)$/vbacommandbarcontrols.obj \
++                $(SLO)$/vbacommandbar.obj \
++                $(SLO)$/vbacommandbars.obj \
++		        $(SLO)$/vbahyperlink.obj \
++        		$(SLO)$/vbapagesetup.obj \
++		        $(SLO)$/vbapagebreak.obj \
++        		$(SLO)$/vbapagebreaks.obj \
++		        $(SLO)$/vbaspinbutton.obj \
++		        $(SLO)$/vbaimage.obj \
++				$(SLO)$/service.obj
+ 
+ # --- Targets ------------------------------------------------------
+ 
+Index: sc/source/ui/vba/vbapivottables.cxx
+===================================================================
+--- sc/source/ui/vba/vbapivottables.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapivottables.cxx	(.../cws/npower11)	(revision 266650)
+@@ -30,11 +30,11 @@
+ #include "vbapivottables.hxx"
+ #include "vbapivottable.hxx"
+ #include <com/sun/star/sheet/XDataPilotTable.hpp>
+-#include <org/openoffice/excel/XPivotTable.hpp>
++#include <ooo/vba/excel/XPivotTable.hpp>
+ 
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+ uno::Any DataPilotToPivotTable( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext )
+ {
+@@ -54,7 +54,7 @@
+ 
+ };
+ 
+-ScVbaPivotTables::ScVbaPivotTables( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  ):  ScVbaPivotTables_BASE( xParent, xContext, xIndexAccess ) 
++ScVbaPivotTables::ScVbaPivotTables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  ):  ScVbaPivotTables_BASE( xParent, xContext, xIndexAccess ) 
+ {
+ }
+ 
+@@ -91,7 +91,7 @@
+ 	if ( sNames.getLength() == 0 )
+ 	{
+ 		sNames.realloc( 1 );
+-		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PivotTables") );
++		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTables") );
+ 	}
+ 	return sNames;
+ }
+Index: sc/source/ui/vba/vbapagesetup.cxx
+===================================================================
+--- sc/source/ui/vba/vbapagesetup.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbapagesetup.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,892 @@
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile$
++ * $Revision$
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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_COMMANDBAR_HXX
-+#define SC_VBA_COMMANDBAR_HXX
++#include "vbapagesetup.hxx"
++#include "cellsuno.hxx"
++#include "convuno.hxx"
++#include "rangelst.hxx"
++#include <com/sun/star/sheet/XPrintAreas.hpp>
++#include <com/sun/star/sheet/XHeaderFooterContent.hpp>
++#include <com/sun/star/text/XText.hpp>
++#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
++#include <ooo/vba/excel/XlPageOrientation.hpp>
++#include <ooo/vba/excel/XlOrder.hpp>
++#include <ooo/vba/excel/Constants.hpp>
 +
-+#include <ooo/vba/XCommandBar.hpp>
-+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-+#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
-+#include <com/sun/star/container/XIndexContainer.hpp>
-+#include <com/sun/star/beans/PropertyValues.hpp>
++using namespace ::com::sun::star;
++using namespace ::ooo::vba;
 +
-+#include "vbahelperinterface.hxx"
-+#include "vbacommandbars.hxx"
++#define ZOOM_IN 10
++#define ZOOM_MAX 400
 +
-+#include <map>
-+typedef std::map< const rtl::OUString, rtl::OUString > CommandBarNameMap;
-+typedef std::pair< const rtl::OUString, rtl::OUString > CommandBarNamePair;
-+const CommandBarNamePair namePair[] = { 
-+    CommandBarNamePair(  rtl::OUString::createFromAscii("standard"), rtl::OUString::createFromAscii("standardbar") ),
-+    CommandBarNamePair(  rtl::OUString::createFromAscii("formatting"), rtl::OUString::createFromAscii("formatobjectbar") ),
-+};
-+static const CommandBarNameMap mCommandBarNameMap( namePair, ( namePair + sizeof(namePair) / sizeof(namePair[0]) ) );
++bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, ScRange& refRange, ScRangeList& aCellRanges, formula::FormulaGrammar::AddressConvention aConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException );
 +
++ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent, 
++				const uno::Reference< uno::XComponentContext >& xContext,
++				const uno::Reference< sheet::XSpreadsheet >& xSheet,
++				const uno::Reference< frame::XModel >& xModel) throw (uno::RuntimeException):
++	   	ScVbaPageSetup_BASE( xParent, xContext ),
++		mxSheet( xSheet ), mxModel( xModel )
++{
++    // query for current page style
++    uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW );
++    uno::Any aValue = xSheetProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageStyle" )));
++    rtl::OUString aStyleName;
++    aValue >>= aStyleName;
 +
-+typedef InheritedHelperInterfaceImpl1< ov::XCommandBar > CommandBar_BASE;
++    uno::Reference< style::XStyleFamiliesSupplier > xStyleFamiliesSup( mxModel, uno::UNO_QUERY_THROW );
++    uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies();
++    uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles"))), uno::UNO_QUERY_THROW );
++    mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW );
++}		
 +
-+class ScVbaCommandBar : public CommandBar_BASE
++rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeException)
 +{
-+private:
-+    rtl::OUString       m_sToolBarName;
-+    rtl::OUString       m_sMenuModuleName;
-+    rtl::OUString       m_sUIName;
-+    sal_Bool            m_bTemporary;
-+    sal_Bool            m_bIsMenu;
-+    sal_Bool            m_bCustom;
-+    sal_Bool            m_bCreate;
-+    ScVbaCommandBars*   m_pScVbaCommandBars;
-+    css::beans::PropertyValues  m_aToolBar;
-+    // hard reference for parent
-+    css::uno::Reference< ov::XHelperInterface >               m_xParentHardRef;
-+    css::uno::Reference< css::ui::XUIConfigurationManager >         m_xUICfgManager;
-+    css::uno::Reference< css::ui::XUIConfigurationPersistence >     m_xUICfgPers;
-+    css::uno::Reference< css::container::XIndexContainer >          m_xBarSettings;
-+    void initCommandBar() throw( css::uno::RuntimeException );
-+protected:
-+    void getToolBarSettings( rtl::OUString sToolBarName ) throw( css::uno::RuntimeException );
-+    void getMenuSettings();
-+    void addCustomBar();
-+public:
-+    ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw( css::uno::RuntimeException );
-+    ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sToolBarName, sal_Bool bTemporary, sal_Bool bCreate ) throw( css::uno::RuntimeException );
++    String aPrintArea;
++    uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
++    uno::Sequence< table::CellRangeAddress > aSeq = xPrintAreas->getPrintAreas();
++    sal_Int32 nCount = aSeq.getLength();
++    if( nCount )
++    {
++        ScAddress::Details aDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
++        USHORT nFlags = SCA_VALID;
++        nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE );
++		ScRangeList aRangeList;
++		for( sal_Int32 i=0; i<nCount; i++ )
++		{
++			ScRange aRange;
++			ScUnoConversion::FillScRange( aRange, aSeq[i] );
++			aRangeList.Append( aRange );
++		}
++		ScDocument* pDoc = getDocShell( mxModel )->GetDocument();
++		aRangeList.Format( aPrintArea, nFlags, pDoc, formula::FormulaGrammar::CONV_XL_A1, ','  );
++    }
 +    
-+    sal_Bool IsMenu() { return m_bIsMenu; };
-+    css::uno::Reference< css::ui::XUIConfigurationManager > GetUICfgManager() { return m_xUICfgManager; };
-+    css::uno::Reference< css::ui::XUIConfigurationPersistence > GetUICfgPers() { return m_xUICfgPers; };
-+    css::uno::Reference< css::container::XIndexContainer > GetBarSettings() { return m_xBarSettings; };
-+    rtl::OUString GetToolBarName() { return m_sToolBarName; };
-+
-+    // Attributes
-+    virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setName( const ::rtl::OUString& _name ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
-+
-+    // Methods
-+    virtual void SAL_CALL Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif//SC_VBA_COMMANDBAR_HXX
-diff --git sc/source/ui/vba/vbacommandbarcontrol.cxx sc/source/ui/vba/vbacommandbarcontrol.cxx
-new file mode 100644
-index 0000000..afefd7b
---- /dev/null
-+++ sc/source/ui/vba/vbacommandbarcontrol.cxx
-@@ -0,0 +1,403 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "vbacommandbarcontrol.hxx"
++    return aPrintArea;
++}
 +
-+using namespace com::sun::star;
-+using namespace ooo::vba;
++void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException)
++{
++    uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
++    if( rAreas.getLength() == 0 ||
++        rAreas.equalsIgnoreAsciiCase ( rtl::OUString::createFromAscii("FALSE") ) )
++    {
++        // print the whole sheet
++        uno::Sequence< table::CellRangeAddress > aSeq;
++        xPrintAreas->setPrintAreas( aSeq );
++    }
++    else
++    {
++		ScRangeList aCellRanges;
++		ScRange aRange;
++		if( getScRangeListForAddress( rAreas, getDocShell( mxModel ) , aRange, aCellRanges ) ) 
++		{
++			uno::Sequence< table::CellRangeAddress > aSeq( aCellRanges.Count() );
++			USHORT i=0;
++			for( ScRange* pRange = aCellRanges.First(); pRange; pRange = aCellRanges.Next() )
++			{
++				table::CellRangeAddress aRangeAddress;
++				ScUnoConversion::FillApiRange( aRangeAddress, *pRange );
++				aSeq[ i++ ] = aRangeAddress;
++			}
++			xPrintAreas->setPrintAreas( aSeq );
++		}
++    }
++}
 +
-+uno::Any lcl_getPropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName )
++double SAL_CALL ScVbaPageSetup::getTopMargin() throw (css::uno::RuntimeException)
 +{
-+    sal_Int32 nCount = aPropertyValues.getLength();
-+    for( sal_Int32 i = 0; i < nCount; i++ )
++    sal_Bool headerOn = sal_False;
++    sal_Int32 topMargin = 0;
++    sal_Int32 headerHeight = 0;
++
++    try
 +    {
-+        if( aPropertyValues[i].Name.equalsIgnoreAsciiCase( sPropertyName ) )
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")));
++        aValue >>= headerOn;
++
++        aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
++        aValue >>= topMargin;
++
++        if( headerOn )
 +        {
-+            return aPropertyValues[i].Value;
++            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
++            aValue >>= headerHeight;
++            topMargin += headerHeight;
 +        }
 +    }
-+    return uno::Any();
++    catch( uno::Exception& )
++    {
++    }
++    
++    return Millimeter::getInPoints( topMargin );
 +}
 +
-+beans::PropertyValues lcl_repalcePropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName, uno::Any aValue )
++void SAL_CALL ScVbaPageSetup::setTopMargin( double margin ) throw (css::uno::RuntimeException)
 +{
-+    sal_Int32 nCount = aPropertyValues.getLength();
-+    for( sal_Int32 i = 0; i < nCount; i++ )
++    sal_Int32 topMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
++    sal_Bool headerOn = sal_False;
++    sal_Int32 headerHeight = 0;
++
++    try
 +    {
-+        if( aPropertyValues[i].Name.equalsIgnoreAsciiCase( sPropertyName ) )
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")));
++        aValue >>= headerOn;
++        
++        if( headerOn )
 +        {
-+            aPropertyValues[i].Value = aValue;
-+            return aPropertyValues;
++            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
++            aValue >>= headerHeight;
++            topMargin -= headerHeight;
 +        }
++
++        aValue <<= topMargin;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
++    }
++    catch( uno::Exception& )
++    {
 +    }
-+    return aPropertyValues;
 +}
 +
-+ScVbaCommandBarControl::ScVbaCommandBarControl( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sName ) throw (uno::RuntimeException) : CommandBarControl_BASE( xParent, xContext ), m_sName( sName )
++double SAL_CALL ScVbaPageSetup::getBottomMargin() throw (css::uno::RuntimeException)
 +{
-+    // exsiting CommandBarBarControl
-+    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
-+    initObjects();
-+    if( m_xBarSettings->hasElements() )
++    sal_Bool footerOn = sal_False;
++    sal_Int32 bottomMargin = 0;
++    sal_Int32 footerHeight = 0;
++
++    try
 +    {
-+        ScVbaCommandBarControl* pParentCommandBarControl = m_pCommandBarControls->GetParentCommandBarControl();
-+        if( pParentCommandBarControl )
-+        {
-+            beans::PropertyValues aPropertyValues;
-+            pParentCommandBarControl->GetCurrentSettings()->getByIndex( pParentCommandBarControl->GetPosition() ) >>= aPropertyValues;
-+            pParentCommandBarControl->SetPropertyValues( aPropertyValues );
-+            m_xCurrentSettings.set( lcl_getPropertyValue( pParentCommandBarControl->GetPropertyValues(), rtl::OUString::createFromAscii( "ItemDescriptorContainer" ) ), uno::UNO_QUERY_THROW );
-+        }
-+        if( !m_xCurrentSettings.is() )
-+        {
-+            m_xCurrentSettings.set( m_xUICfgManager->getSettings( m_pCommandBarControls->GetParentToolBarName(), sal_True ), uno::UNO_QUERY_THROW );
-+        }
-+        for( sal_Int32 i = 0; i < m_xCurrentSettings->getCount(); i++ )
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
++        aValue >>= footerOn;
++
++        aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
++        aValue >>= bottomMargin;
++
++        if( footerOn )
 +        {
-+            beans::PropertyValues aPropertyValuesTemp;
-+            m_xCurrentSettings->getByIndex( i ) >>= aPropertyValuesTemp;
-+            // Label always empty in OOo
-+            rtl::OUString sLabel;
-+            lcl_getPropertyValue( aPropertyValuesTemp, rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
-+            if( sLabel.equalsIgnoreAsciiCase( sName ) )
-+            {
-+                m_nPosition = i;
-+                break;
-+            }
-+            // using CammandURL to find
-+            rtl::OUString sCommandURL;
-+            lcl_getPropertyValue( aPropertyValuesTemp, rtl::OUString::createFromAscii( "CommandURL" ) ) >>= sCommandURL;
-+            sal_Int32 nLastIndex = sCommandURL.lastIndexOf( rtl::OUString::createFromAscii(":") );
-+            if( ( nLastIndex != -1 ) && ( ( nLastIndex + 1 ) < sCommandURL.getLength() ) )
-+            {
-+                sCommandURL = sCommandURL.copy( nLastIndex + 1 );
-+            }
-+            if( sCommandURL.equalsIgnoreAsciiCase( sName ) )
-+            {
-+                m_nPosition = i;
-+                break;
-+            }
++            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
++            aValue >>= footerHeight;
++            bottomMargin += footerHeight;
 +        }
-+        if( m_nPosition  == -1 )
-+            throw uno::RuntimeException( rtl::OUString::createFromAscii("The CommandBarControl do not exist"), uno::Reference< uno::XInterface >() );
-+    }
-+    if( m_bIsMenu )
-+    {
-+        m_sBarName = rtl::OUString::createFromAscii("private:resource/menubar/menubar");
 +    }
-+    else
++    catch( uno::Exception& )
 +    {
-+        m_sBarName = m_pCommandBarControls->GetParentToolBarName();
 +    }
-+    m_bTemporary = sal_True;
++    
++    return Millimeter::getInPoints( bottomMargin );
 +}
-+ScVbaCommandBarControl::ScVbaCommandBarControl( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sName, rtl::OUString sCommand, sal_Int32 nPosition, sal_Bool bTemporary ) throw (uno::RuntimeException) :  CommandBarControl_BASE( xParent, xContext ), m_nPosition( nPosition ), m_bTemporary( bTemporary )
++
++void SAL_CALL ScVbaPageSetup::setBottomMargin( double margin ) throw (css::uno::RuntimeException)
 +{
-+    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
-+    initObjects();
-+    if( sName.getLength() > 0 )
-+    {
-+        m_sName = sName;
-+    }
-+    if( sCommand.getLength() > 0 )
++    sal_Int32 bottomMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
++    sal_Bool footerOn = sal_False;
++    sal_Int32 footerHeight = 0;
++
++    try
 +    {
-+        m_sCommand = sCommand;
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
++        aValue >>= footerOn;
++        
++        if( footerOn )
++        {
++            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
++            aValue >>= footerHeight;
++            bottomMargin -= footerHeight;
++        }
++
++        aValue <<= bottomMargin;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
 +    }
-+    else
++    catch( uno::Exception& )
 +    {
-+        m_sCommand = rtl::OUString::createFromAscii("vnd.openoffice.org:") + sName;
 +    }
-+    if( m_bIsMenu )
++}
++
++double SAL_CALL ScVbaPageSetup::getRightMargin() throw (css::uno::RuntimeException)
++{
++    sal_Int32 rightMargin = 0;
++    try
 +    {
-+        m_sBarName = rtl::OUString::createFromAscii("private:resource/menubar/menubar");
-+        createNewMenuBarControl();
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")));
++        aValue >>= rightMargin;
 +    }
-+    else
++    catch( uno::Exception& )
 +    {
-+        m_sBarName = m_pCommandBarControls->GetParentToolBarName();
-+        createNewToolBarControl();
 +    }
++    
++    return Millimeter::getInPoints( rightMargin );;
 +}
 +
-+void
-+ScVbaCommandBarControl::initObjects() throw (uno::RuntimeException)
++void SAL_CALL ScVbaPageSetup::setRightMargin( double margin ) throw (css::uno::RuntimeException)
 +{
-+    m_pCommandBarControls = dynamic_cast< ScVbaCommandBarControls* >( m_xParentHardRef.get() );
-+    if( !m_pCommandBarControls )
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Parent needs to be a ScVbaCommandBarControls"), uno::Reference< uno::XInterface >() );
-+    m_xUICfgManager.set( m_pCommandBarControls->GetUICfgManager(), uno::UNO_QUERY_THROW );
-+    m_xUICfgPers.set( m_pCommandBarControls->GetUICfgPers(), uno::UNO_QUERY_THROW );
-+    m_xBarSettings.set( m_pCommandBarControls->GetBarSettings(), uno::UNO_QUERY_THROW );
-+    m_bIsMenu = m_pCommandBarControls->IsMenu();
-+    m_sName = rtl::OUString::createFromAscii( "Custom" );
-+    m_nPosition = -1;
++    sal_Int32 rightMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
++    try
++    {
++        uno::Any aValue;
++        aValue <<= rightMargin;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aValue );
++    }
++    catch( uno::Exception& )
++    {
++    }
++
 +}
 +
-+void
-+ScVbaCommandBarControl::createNewMenuBarControl()
++double SAL_CALL ScVbaPageSetup::getLeftMargin() throw (css::uno::RuntimeException)
 +{
-+    uno::Sequence< beans::PropertyValue > aPropertys(4);
-+    aPropertys[0].Name = rtl::OUString::createFromAscii("CommandURL");
-+    aPropertys[0].Value <<= m_sCommand; 
-+    aPropertys[1].Name = rtl::OUString::createFromAscii("Label");
-+    aPropertys[1].Value <<= m_sName; 
-+    aPropertys[2].Name = rtl::OUString::createFromAscii("Type");
-+    aPropertys[2].Value <<= m_nType; 
-+    aPropertys[3].Name = rtl::OUString::createFromAscii("ItemDescriptorContainer");
-+
-+    m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
-+    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    rtl::OUString sUIName;
-+    xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") ) >>= sUIName;
-+
-+    uno::Reference< lang::XSingleComponentFactory > xMenuMSF( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    if( m_pCommandBarControls->GetParentCommandBar() != NULL )
-+    {
-+        // create a new menu
-+        m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
-+        m_xCurrentSettings.set( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    }
-+    else if( m_pCommandBarControls->GetParentCommandBarControl() != NULL )
++    sal_Int32 leftMargin = 0;
++    try
 +    {
-+        // create a new menu entry
-+        // change the parent MenuItem to a PopupMenu
-+        ScVbaCommandBarControl* pPc = m_pCommandBarControls->GetParentCommandBarControl();
-+        beans::PropertyValues aPropertyValues;
-+        pPc->GetCurrentSettings()->getByIndex( pPc->GetPosition() ) >>= aPropertyValues;
-+        pPc->SetPropertyValues( aPropertyValues );
-+        
-+        // has the property already been set?
-+        if( lcl_getPropertyValue( pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer") ).hasValue() )
-+        {
-+            lcl_repalcePropertyValue(  pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer"), uno::makeAny( xMenuMSF->createInstanceWithContext( mxContext ) ) );
-+            pPc->GetCurrentSettings()->replaceByIndex( pPc->GetPosition(), uno::makeAny( pPc->GetPropertyValues() ) );
-+        }
-+        m_xCurrentSettings.set( lcl_getPropertyValue( pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer") ), uno::UNO_QUERY_THROW );
-+        m_xCurrentSettings->insertByIndex( m_nPosition, uno::makeAny( m_aPropertyValues ) );
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")));
++        aValue >>= leftMargin;
 +    }
-+    if( m_xUICfgManager->hasSettings( m_sBarName ) )
++    catch( uno::Exception& )
 +    {
-+        m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
 +    }
-+    else
++    
++    return Millimeter::getInPoints( leftMargin );;
++}
++
++void SAL_CALL ScVbaPageSetup::setLeftMargin( double margin ) throw (css::uno::RuntimeException)
++{
++    sal_Int32 leftMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
++    try
 +    {
-+        m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++        uno::Any aValue;
++        aValue <<= leftMargin;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aValue );
 +    }
-+    if( !m_bTemporary )
++    catch( uno::Exception& )
 +    {
-+        m_xUICfgPers->store();
 +    }
 +}
 +
-+void
-+ScVbaCommandBarControl::createNewToolBarControl()
++double SAL_CALL ScVbaPageSetup::getHeaderMargin() throw (css::uno::RuntimeException)
 +{
-+    uno::Sequence< beans::PropertyValue > aPropertys(4);
-+    aPropertys[0].Name = rtl::OUString::createFromAscii("CommandURL");
-+    aPropertys[0].Value <<= m_sCommand; 
-+    aPropertys[1].Name = rtl::OUString::createFromAscii("Label");
-+    aPropertys[1].Value <<= m_sName; 
-+    aPropertys[2].Name = rtl::OUString::createFromAscii("Type");
-+    aPropertys[2].Value <<= m_nType; 
-+    aPropertys[3].Name = rtl::OUString::createFromAscii("IsVisible");
-+    aPropertys[3].Value <<= sal_True; 
-+
-+    m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
-+    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    rtl::OUString sUIName;
-+    xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") ) >>= sUIName;
-+
-+    m_xCurrentSettings.set( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    if( m_xUICfgManager->hasSettings( m_sBarName ) )
-+    {
-+        m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+    }
-+    else
++    sal_Int32 headerMargin = 0;
++    try
 +    {
-+        m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
++        aValue >>= headerMargin;
 +    }
-+    if( !m_bTemporary )
++    catch( uno::Exception& )
 +    {
-+        m_xUICfgPers->store();
 +    }
++    
++    return Millimeter::getInPoints( headerMargin );;
 +}
 +
-+::rtl::OUString SAL_CALL
-+ScVbaCommandBarControl::getCaption() throw ( uno::RuntimeException )
++void SAL_CALL ScVbaPageSetup::setHeaderMargin( double margin ) throw (css::uno::RuntimeException)
 +{
-+    // "Label" always empty
-+    rtl::OUString sCaption;
-+    beans::PropertyValues aPropertyValues;
-+    if( m_xCurrentSettings.is() )
++    sal_Int32 headerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
++    try
 +    {
-+        m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
-+        lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label") ) >>= sCaption;
++        uno::Any aValue;
++        aValue <<= headerMargin;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
 +    }
-+    else if( m_xBarSettings.is() )
++    catch( uno::Exception& )
 +    {
-+        m_xBarSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
-+        lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label") ) >>= sCaption;
 +    }
-+    return sCaption;
 +}
-+void SAL_CALL 
-+ScVbaCommandBarControl::setCaption( const ::rtl::OUString& _caption ) throw (uno::RuntimeException)
++
++double SAL_CALL ScVbaPageSetup::getFooterMargin() throw (css::uno::RuntimeException)
 +{
-+    if( m_xCurrentSettings.is() )
++    sal_Int32 footerMargin = 0;
++    try
 +    {
-+        beans::PropertyValues aPropertyValues;
-+        m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
-+        beans::PropertyValues aNewPropertyValues;
-+        aNewPropertyValues = lcl_repalcePropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label"), uno::makeAny( _caption ) );
-+        m_xCurrentSettings->replaceByIndex( m_nPosition, uno::makeAny( aNewPropertyValues ) );
-+        if( m_xUICfgManager->hasSettings( m_sBarName ) )
-+        {
-+            m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+        }
-+        else
-+        {
-+            m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+        }
-+        // make it permanent
-+        if( !m_bTemporary )
-+        {
-+            m_xUICfgPers->store();
-+        }
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
++        aValue >>= footerMargin;
 +    }
-+}
-+::rtl::OUString SAL_CALL 
-+ScVbaCommandBarControl::getOnAction() throw (uno::RuntimeException)
-+{
-+    if( m_xCurrentSettings.is() )
++    catch( uno::Exception& )
 +    {
-+        beans::PropertyValues aPropertyValues;
-+        m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
-+        rtl::OUString sCommandURL;
-+        lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii( "CommandURL" ) ) >>= sCommandURL;
-+        return sCommandURL;
 +    }
-+    return ::rtl::OUString();
++    
++    return Millimeter::getInPoints( footerMargin );;
 +}
-+void SAL_CALL 
-+ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (uno::RuntimeException)
++
++void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::uno::RuntimeException)
 +{
-+    if( m_xCurrentSettings.is() )
++    sal_Int32 footerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
++    try
++    {
++        uno::Any aValue;
++        aValue <<= footerMargin;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
++    }
++    catch( uno::Exception& )
 +    {
-+        beans::PropertyValues aPropertyValues;
-+        m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
-+        beans::PropertyValues aNewPropertyValues;
-+        aNewPropertyValues = lcl_repalcePropertyValue( aPropertyValues, rtl::OUString::createFromAscii("CommandURL"), uno::makeAny( _onaction ) );
-+        m_xCurrentSettings->replaceByIndex( m_nPosition, uno::makeAny( aNewPropertyValues ) );
-+        if( m_xUICfgManager->hasSettings( m_sBarName ) )
-+        {
-+            m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+        }
-+        else
-+        {
-+            m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+        }
-+        // make it permanent
-+        if( !m_bTemporary )
-+        {
-+            m_xUICfgPers->store();
-+        }
 +    }
 +}
-+::sal_Bool SAL_CALL 
-+ScVbaCommandBarControl::getVisible() throw (uno::RuntimeException)
-+{
-+    // not possible in UNO?
-+    return sal_True;
-+}
-+void SAL_CALL 
-+ScVbaCommandBarControl::setVisible( ::sal_Bool /*_visible*/ ) throw (uno::RuntimeException)
-+{
-+    // "IsVisilbe"
-+}
-+void SAL_CALL 
-+ScVbaCommandBarControl::Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++
++sal_Int32 SAL_CALL ScVbaPageSetup::getOrientation() throw (css::uno::RuntimeException)
 +{
-+    if( m_xCurrentSettings.is() )
++    sal_Int32 orientation = excel::XlPageOrientation::xlPortrait;
++    try
 +    {
-+        m_xCurrentSettings->removeByIndex( m_nPosition );
++        sal_Bool isLandscape = sal_False;
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
++        aValue >>= isLandscape;
 +
-+        if( m_xUICfgManager->hasSettings( m_sBarName ) )
-+        {
-+            m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+        }
-+        else
-+        {
-+            m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
-+        }
-+        // make it permanent
-+        if( !m_bTemporary )
++        if( isLandscape )
 +        {
-+            m_xUICfgPers->store();
++            orientation = excel::XlPageOrientation::xlLandscape;
 +        }
 +    }
-+}
-+uno::Any SAL_CALL 
-+ScVbaCommandBarControl::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
-+{
-+    sal_Int32 nIndex;
-+    uno::Reference< XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
-+    if( aIndex.hasValue() )
++    catch( uno::Exception& )
 +    {
-+        if( aIndex >>= nIndex )
-+        {
-+            uno::Reference< XCommandBarControl > xCommandBarControl( xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW );
-+            return uno::makeAny( xCommandBarControl );
-+        }
-+        else
-+            throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid index" ), uno::Reference< uno::XInterface >() );
 +    }
-+    return uno::makeAny( xCommandBarControls );
-+}
-+rtl::OUString& 
-+ScVbaCommandBarControl::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControl") );
-+	return sImplName;
++    return orientation;
 +}
-+uno::Sequence<rtl::OUString> 
-+ScVbaCommandBarControl::getServiceNames()
++
++void SAL_CALL ScVbaPageSetup::setOrientation( sal_Int32 orientation ) throw (css::uno::RuntimeException)
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBarControl" ) );
-+	}
-+	return aServiceNames;
-+}
-diff --git sc/source/ui/vba/vbacommandbarcontrol.hxx sc/source/ui/vba/vbacommandbarcontrol.hxx
-new file mode 100644
-index 0000000..8aec911
---- /dev/null
-+++ sc/source/ui/vba/vbacommandbarcontrol.hxx
-@@ -0,0 +1,90 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_COMMANDBARCONTROL_HXX
-+#define SC_VBA_COMMANDBARCONTROL_HXX
++    if( ( orientation != excel::XlPageOrientation::xlPortrait ) &&
++        ( orientation != excel::XlPageOrientation::xlLandscape ) )
++    {
++        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++    }
 +
-+#include <ooo/vba/XCommandBarControl.hpp>
++    try
++    {
++        sal_Bool isLandscape = sal_False;
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
++        aValue >>= isLandscape;
++
++        sal_Bool switchOrientation = sal_False;
++        if(( isLandscape && orientation != excel::XlPageOrientation::xlLandscape ) || 
++            ( !isLandscape && orientation != excel::XlPageOrientation::xlPortrait ))
++        {
++            switchOrientation = sal_True;
++        }
 +
-+#include "vbahelperinterface.hxx"
-+#include "vbacommandbarcontrols.hxx"
++        if( switchOrientation )
++        {
++            aValue <<= !isLandscape;
++            uno::Any aHeight = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height")));
++            uno::Any aWidth = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width")));
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")), aValue );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width")),  aHeight );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height")), aWidth );
++        }
 +
-+typedef InheritedHelperInterfaceImpl1< ov::XCommandBarControl > CommandBarControl_BASE;
++        if( isLandscape )
++        {
++            orientation = excel::XlPageOrientation::xlLandscape;
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
 +
-+class ScVbaCommandBarControl : public CommandBarControl_BASE
++uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException)
 +{
-+private:
-+    rtl::OUString       m_sName;
-+    rtl::OUString       m_sBarName;
-+    rtl::OUString       m_sCommand;
-+    sal_Int32           m_nType;
-+    sal_Int32           m_nPosition;
-+    sal_Bool            m_bTemporary;
-+    sal_Bool            m_bIsMenu;
-+    ScVbaCommandBarControls*        m_pCommandBarControls;
-+    css::uno::Reference< ov::XHelperInterface >               m_xParentHardRef;
-+    css::uno::Reference< css::ui::XUIConfigurationManager >         m_xUICfgManager;
-+    css::uno::Reference< css::ui::XUIConfigurationPersistence >     m_xUICfgPers;
-+    css::uno::Reference< css::container::XIndexContainer >          m_xBarSettings;
-+    css::uno::Reference< css::container::XIndexContainer >          m_xCurrentSettings;
-+    css::beans::PropertyValues                                      m_aPropertyValues;
-+    
-+    void initObjects() throw (css::uno::RuntimeException);
-+    void createNewMenuBarControl();
-+    void createNewToolBarControl();
-+public:
-+    ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sName ) throw (css::uno::RuntimeException);
-+    ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sName, rtl::OUString sCommand, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException);
-+    sal_Int32 GetPosition() { return m_nPosition; };
-+    css::uno::Reference< css::container::XIndexContainer > GetCurrentSettings() { return m_xCurrentSettings; };
-+    css::beans::PropertyValues GetPropertyValues() { return m_aPropertyValues; };
-+    void SetPropertyValues( css::beans::PropertyValues aPropertyValues ) { m_aPropertyValues = aPropertyValues; };
-+    
-+    // Attributes
-+    virtual ::rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (css::uno::RuntimeException);
-+    virtual ::rtl::OUString SAL_CALL getOnAction() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setOnAction( const ::rtl::OUString& _onaction ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
++    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")));
++}
 +
-+    // Methods
-+    virtual void SAL_CALL Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException)
++{
++    USHORT scaleToPageY = 0;
++    try
++    {
++        sal_Bool aValue;
++        if( fitToPagesTall.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesTall >>= aValue))
++        {
++            fitToPagesTall >>= scaleToPageY;
++        }
 +
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif//SC_VBA_COMMANDBARCONTROL_HXX
-diff --git sc/source/ui/vba/vbacommandbarcontrols.cxx sc/source/ui/vba/vbacommandbarcontrols.cxx
-new file mode 100644
-index 0000000..9bcace5
---- /dev/null
-+++ sc/source/ui/vba/vbacommandbarcontrols.cxx
-@@ -0,0 +1,247 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "vbacommandbarcontrols.hxx"
-+#include "vbacommandbarcontrol.hxx"
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( scaleToPageY ));
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
 +
-+using namespace com::sun::star;
-+using namespace ooo::vba;
++uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeException)
++{
++    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")));
++}
 +
-+typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarControlEnumeration_BASE;
-+class CommandBarControlEnumeration : public CommandBarControlEnumeration_BASE
++void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException)
 +{
-+    //uno::Reference< uno::XComponentContext > m_xContext;
-+    ScVbaCommandBarControls* m_pCommandBarControls;
-+    sal_Int32 m_nCurrentPosition;
-+public:
-+    CommandBarControlEnumeration( ScVbaCommandBarControls* pCommandBarControls ) : m_pCommandBarControls( pCommandBarControls ), m_nCurrentPosition( 0 ) {}
-+    virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
-+    {
-+        if( m_nCurrentPosition < m_pCommandBarControls->getCount() )
-+            return sal_True;
-+        return sal_False;
-+    }
-+    virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
++    USHORT scaleToPageX = 0;
++    try
 +    {
-+        if( hasMoreElements() )
++        sal_Bool aValue = sal_False;
++        if( fitToPagesWide.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesWide >>= aValue))
 +        {
-+            rtl::OUString sName = m_pCommandBarControls->GetControlNameByIndex( m_nCurrentPosition );
-+            m_nCurrentPosition = m_nCurrentPosition + 1;
-+            if( sName.getLength() > 0 )
-+                return m_pCommandBarControls->createCollectionObject( uno::makeAny( sName ) );
-+            else
-+                return nextElement();
++            fitToPagesWide >>= scaleToPageX;
 +        }
-+        else
-+            throw container::NoSuchElementException();
-+        return uno::Any();
++
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( scaleToPageX ));
 +    }
-+};
++    catch( uno::Exception& )
++    {
++    }
++}
 +
-+ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< container::XIndexAccess> xIndexAccess ) throw (uno::RuntimeException) : CommandBarControls_BASE( xParent, xContext, xIndexAccess )
++uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException)
 +{
-+    m_bIsMenu = sal_False;
-+    m_bHasElements = sal_False;
-+    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
-+    m_pCommandBar = dynamic_cast< ScVbaCommandBar* >( m_xParentHardRef.get() );
-+    m_pCommandBarControl = dynamic_cast< ScVbaCommandBarControl* >( m_xParentHardRef.get() );
-+    if( m_pCommandBar )
++    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")));
++}
++
++void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException)
++{
++    USHORT pageScale = 0;
++    try
 +    {
-+        m_xUICfgManager.set( m_pCommandBar->GetUICfgManager(), uno::UNO_QUERY_THROW );
-+        m_xUICfgPers.set( m_pCommandBar->GetUICfgPers(), uno::UNO_QUERY_THROW );
-+        m_xBarSettings.set( m_pCommandBar->GetBarSettings(), uno::UNO_QUERY_THROW );
-+        m_bIsMenu = m_pCommandBar->IsMenu();
-+        if( m_xBarSettings->hasElements() )
++		if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN )
++		{
++		    sal_Bool aValue = sal_False;
++		    zoom >>= aValue;
++		    if( aValue )
++		    {
++                DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++		    }
++		}
++        else
 +        {
-+            m_bHasElements = sal_True;
++            zoom >>= pageScale;
++            if(( pageScale < ZOOM_IN )||( pageScale > ZOOM_MAX ))
++            {
++                DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++            }
 +        }
++
++        // these only exist in S08
++        USHORT nScale = 0;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPages")), uno::makeAny( nScale ));
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( nScale ));
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( nScale ));
 +    }
-+    else if( m_pCommandBarControl )
++    catch( beans::UnknownPropertyException& )
 +    {
++        if( pageScale == 0 )
++        {
++            DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++        }
 +    }
-+    else
++    catch( uno::Exception& )
 +    {
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii("Parent needs to be a ScVbaCommandBar or a ScVbaCommandBarControl"), uno::Reference< uno::XInterface >() );
 +    }
++
++    mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")), uno::makeAny( pageScale ));
 +}
-+rtl::OUString
-+ScVbaCommandBarControls::GetControlNameByIndex( const sal_Int32 nIndex ) throw ( uno::RuntimeException )
++
++rtl::OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeException)
 +{
-+    sal_Int32 nCount = 0;
-+    if( m_bHasElements )
++    rtl::OUString leftHeader;
++    try
 +    {
-+        sal_Int32 nBarSettingsCount = m_xBarSettings->getCount();
-+        for( sal_Int32 i = 0; i < nBarSettingsCount; i++ )
++        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
++        if( xHeaderContent.is() )
 +        {
-+            beans::PropertyValues aMenuValues;
-+            m_xBarSettings->getByIndex( i ) >>= aMenuValues;
-+            for( sal_Int32 j = 0; j < aMenuValues.getLength(); j++ )
-+            {
-+                if( aMenuValues[j].Name.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "CommandURL" ) ) )
-+                {
-+                    nCount++;
-+                    if( nIndex == nCount )
-+                    {
-+                        rtl::OUString sCommandURL;
-+                        aMenuValues[j].Value >>= sCommandURL;
-+                        sal_Int32 nLastIndex = sCommandURL.lastIndexOf( rtl::OUString::createFromAscii(":") );
-+                        if( ( nLastIndex != -1 ) && ( ( nLastIndex +1 ) < sCommandURL.getLength() ) )
-+                        {
-+                            sCommandURL = sCommandURL.copy( nLastIndex + 1 );
-+                            return sCommandURL;
-+                        }
-+                    }
-+                }
-+            }
-+        } 
++            uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
++            leftHeader = xText->getString();
++        }
++    }
++    catch( uno::Exception& )
++    {
 +    }
-+    else
-+        throw  uno::RuntimeException( rtl::OUString::createFromAscii( "Out of bound" ), uno::Reference< uno::XInterface >() );
-+    return rtl::OUString();
++
++    return leftHeader;
 +}
 +
-+// Attributes
-+sal_Int32 SAL_CALL 
-+ScVbaCommandBarControls::getCount() throw (uno::RuntimeException)
++void SAL_CALL ScVbaPageSetup::setLeftHeader( const rtl::OUString& leftHeader) throw (css::uno::RuntimeException)
 +{
-+    sal_Int32 nCount = 0;
-+    if( m_bHasElements )
++    try
 +    {
-+        sal_Int32 nBarSettingsCount = m_xBarSettings->getCount();
-+        for( sal_Int32 i = 0; i < nBarSettingsCount; i++ )
++        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
++        if( xHeaderContent.is() )
 +        {
-+            beans::PropertyValues aMenuValues;
-+            m_xBarSettings->getByIndex( i ) >>= aMenuValues;
-+            for( sal_Int32 j = 0; j < aMenuValues.getLength(); j++ )
-+            {
-+                if( aMenuValues[j].Name.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "CommandURL" ) ) )
-+                {
-+                    nCount++;
-+                }
-+            }
-+        } 
++            uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
++            xText->setString( leftHeader );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) ); 
++        }
++    }
++    catch( uno::Exception& )
++    {
 +    }
-+    return nCount;
-+}
-+// XEnumerationAccess
-+uno::Type SAL_CALL
-+ScVbaCommandBarControls::getElementType() throw ( uno::RuntimeException )
-+{
-+    return XCommandBarControls::static_type( 0 );
-+}
-+uno::Reference< container::XEnumeration >
-+ScVbaCommandBarControls::createEnumeration() throw ( uno::RuntimeException )
-+{
-+    return uno::Reference< container::XEnumeration >( new CommandBarControlEnumeration( this ) );
-+}
-+uno::Any
-+ScVbaCommandBarControls::createCollectionObject( const uno::Any& aSource )
-+{
-+    // only surport the aSource as a name string, because this class is a API wrapper
-+    rtl::OUString sName;
-+    if( aSource >>= sName )
-+        return uno::makeAny( uno::Reference< XCommandBarControl > ( new ScVbaCommandBarControl( this, mxContext, sName ) ) );
-+    return uno::Any();
 +}
 +
-+// Methods
-+uno::Any SAL_CALL 
-+ScVbaCommandBarControls::Item( const uno::Any& aIndex, const uno::Any& /*aIndex*/ ) throw (uno::RuntimeException)
++rtl::OUString SAL_CALL ScVbaPageSetup::getCenterHeader() throw (css::uno::RuntimeException)
 +{
-+    if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
++    rtl::OUString centerHeader;
++    try
 +    {
-+        return createCollectionObject( aIndex );
-+    } 
-+    sal_Int32 nIndex = 0;
-+    if( aIndex >>= nIndex )
++        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
++        if( xHeaderContent.is() )
++        {
++            uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
++            centerHeader = xText->getString();
++        }
++    }
++    catch( uno::Exception& )
 +    {
-+        return createCollectionObject( uno::makeAny( GetControlNameByIndex( nIndex ) ) );
 +    }
-+    
-+    return uno::Any();
++
++    return centerHeader;
 +}
-+uno::Reference< 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)
++
++void SAL_CALL ScVbaPageSetup::setCenterHeader( const rtl::OUString& centerHeader) throw (css::uno::RuntimeException)
 +{
-+    // Parameter is not supported
-+    // the following name needs to be individually created;
-+    rtl::OUString sCaption( rtl::OUString::createFromAscii("custom Control") );
-+    rtl::OUString sCommand( rtl::OUString::createFromAscii("macro:///Standard.Module1.Test()") );
-+    sal_Int32 nType =0;
-+    sal_Int32 nPosition = 0;
-+    sal_Int32 nId;
-+    sal_Bool bTemporary = sal_True;
-+    
-+    if( Type.hasValue() )
-+        if( Type >>= nType )
-+        {
-+            // evalute the type of the new control
-+        }
-+    if( Id.hasValue() )
-+        if( Id >>= nId )
-+        {
-+            // evalute the action of the new control
-+        }
-+    if( Before.hasValue() )
-+        if( Before >>= nPosition )
-+        {
-+            // evalute the position of the new Control
-+        }
-+    if( Temporary.hasValue() )
-+        if( Temporary >>= bTemporary )
++    try
++    {
++        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
++        if( xHeaderContent.is() )
 +        {
-+            // evalute the temporary of the new Control
++            uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
++            xText->setString( centerHeader );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) ); 
 +        }
-+    return uno::Reference< XCommandBarControl > ( new ScVbaCommandBarControl( this, mxContext, sCaption, sCommand, nPosition, bTemporary ) );
++    }
++    catch( uno::Exception& )
++    {
++    }
 +}
-+   
-+// XHelperInterface
-+rtl::OUString& 
-+ScVbaCommandBarControls::getServiceImplName()
++
++rtl::OUString SAL_CALL ScVbaPageSetup::getRightHeader() throw (css::uno::RuntimeException)
 +{
-+    static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControls") );
-+    return sImplName;
++    rtl::OUString rightHeader;
++    try
++    {
++        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
++        if( xHeaderContent.is() )
++        {
++            uno::Reference< text::XText > xText = xHeaderContent->getRightText();
++            rightHeader = xText->getString();
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
++
++    return rightHeader;
 +}
-+uno::Sequence<rtl::OUString> 
-+ScVbaCommandBarControls::getServiceNames()
++
++void SAL_CALL ScVbaPageSetup::setRightHeader( const rtl::OUString& rightHeader) throw (css::uno::RuntimeException)
 +{
-+    static uno::Sequence< rtl::OUString > aServiceNames;
-+    if ( aServiceNames.getLength() == 0 )
++    try
++    {
++        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
++        if( xHeaderContent.is() )
++        {
++            uno::Reference< text::XText > xText = xHeaderContent->getRightText();
++            xText->setString( rightHeader );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) ); 
++        }
++    }
++    catch( uno::Exception& )
 +    {
-+        aServiceNames.realloc( 1 );
-+        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBarControls" ) );
 +    }
-+    return aServiceNames;
 +}
 +
-diff --git sc/source/ui/vba/vbacommandbarcontrols.hxx sc/source/ui/vba/vbacommandbarcontrols.hxx
-new file mode 100644
-index 0000000..9ee0322
---- /dev/null
-+++ sc/source/ui/vba/vbacommandbarcontrols.hxx
-@@ -0,0 +1,90 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_COMMANDBARCONTROLS_HXX
-+#define SC_VBA_COMMANDBARCONTROLS_HXX
-+
-+#include <ooo/vba/XCommandBarControls.hpp>
-+
-+#include "vbahelperinterface.hxx"
-+#include "vbacommandbar.hxx"
-+#include "vbacollectionimpl.hxx"
-+
-+class ScVbaCommandBarControl;
-+
-+typedef CollTestImplHelper< ov::XCommandBarControls > CommandBarControls_BASE;
-+
-+class ScVbaCommandBarControls : public CommandBarControls_BASE
++rtl::OUString SAL_CALL ScVbaPageSetup::getLeftFooter() throw (css::uno::RuntimeException)
 +{
-+private:
-+    sal_Bool                    m_bIsMenu;
-+    sal_Bool                    m_bHasElements;
-+    ScVbaCommandBar*            m_pCommandBar; 
-+    ScVbaCommandBarControl*     m_pCommandBarControl; 
-+    css::uno::Reference< ov::XHelperInterface >               m_xParentHardRef;
-+    css::uno::Reference< css::ui::XUIConfigurationManager >         m_xUICfgManager;
-+    css::uno::Reference< css::ui::XUIConfigurationPersistence >     m_xUICfgPers;
-+    css::uno::Reference< css::container::XIndexContainer >          m_xBarSettings;
-+
-+public:
-+    ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::container::XIndexAccess > xIndexAccess ) throw( css::uno::RuntimeException );
-+    css::uno::Reference< css::ui::XUIConfigurationManager > GetUICfgManager() { return m_xUICfgManager; };
-+    css::uno::Reference< css::ui::XUIConfigurationPersistence > GetUICfgPers() { return m_xUICfgPers; };
-+    css::uno::Reference< css::container::XIndexContainer >  GetBarSettings() { return m_xBarSettings; };
-+    sal_Bool IsMenu() { return m_bIsMenu; };
-+    ScVbaCommandBar* GetParentCommandBar() { return m_pCommandBar; };
-+    ScVbaCommandBarControl* GetParentCommandBarControl() { return m_pCommandBarControl; };
-+    rtl::OUString GetParentToolBarName() 
-+    { 
-+        if( m_pCommandBar ) return m_pCommandBar->GetToolBarName();
-+        else return rtl::OUString();
++    rtl::OUString leftFooter;
++    try
++    {
++        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
++        if( xFooterContent.is() )
++        {
++            uno::Reference< text::XText > xText = xFooterContent->getLeftText();
++            leftFooter = xText->getString();
++        }
++    }
++    catch( uno::Exception& )
++    {
 +    }
-+    rtl::OUString GetControlNameByIndex( const sal_Int32 nIndex ) throw ( css::uno::RuntimeException );
-+
-+    // Attributes
-+    virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
-+    // XEnumerationAccess
-+    virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
-+    virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
 +
-+    // Methods     
-+    virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index, const css::uno::Any& /*Index2*/ ) throw (css::uno::RuntimeException); 
-+    virtual css::uno::Reference< ov::XCommandBarControl > SAL_CALL Add( const css::uno::Any& Type, const css::uno::Any& Id, const css::uno::Any& Parameter, const css::uno::Any& Before, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+    // XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
++    return leftFooter;
++}
 +
-+#endif//SC_VBA_COMMANDBARCONTROLS_HXX
-diff --git sc/source/ui/vba/vbacommandbars.cxx sc/source/ui/vba/vbacommandbars.cxx
-new file mode 100644
-index 0000000..2933ec9
---- /dev/null
-+++ sc/source/ui/vba/vbacommandbars.cxx
-@@ -0,0 +1,247 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include <com/sun/star/lang/XServiceInfo.hpp>
-+#include <com/sun/star/frame/XDesktop.hpp>
-+#include <com/sun/star/container/XNameAccess.hpp>
++void SAL_CALL ScVbaPageSetup::setLeftFooter( const rtl::OUString& leftFooter) throw (css::uno::RuntimeException)
++{
++    try
++    {
++        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
++        if( xFooterContent.is() )
++        {
++            uno::Reference< text::XText > xText = xFooterContent->getLeftText();
++            xText->setString( leftFooter );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) ); 
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
 +
-+#include "vbacommandbars.hxx"
-+#include "vbacommandbar.hxx"
++rtl::OUString SAL_CALL ScVbaPageSetup::getCenterFooter() throw (css::uno::RuntimeException)
++{
++    rtl::OUString centerFooter;
++    try
++    {
++        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
++        if( xFooterContent.is() )
++        {
++            uno::Reference< text::XText > xText = xFooterContent->getCenterText();
++            centerFooter = xText->getString();
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
 +
-+using namespace com::sun::star;
-+using namespace ooo::vba;
++    return centerFooter;
++}
 +
-+typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarEnumeration_BASE;
++void SAL_CALL ScVbaPageSetup::setCenterFooter( const rtl::OUString& centerFooter) throw (css::uno::RuntimeException)
++{
++    try
++    {
++        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
++        if( xFooterContent.is() )
++        {
++            uno::Reference< text::XText > xText = xFooterContent->getCenterText();
++            xText->setString( centerFooter );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) ); 
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
 +
-+static rtl::OUString sSpreadsheetDocumentUrl( rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" ) );
-+static rtl::OUString sTextDocumentUrl( rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" ) );
-+static rtl::OUString sWindowStateConfUrl( rtl::OUString::createFromAscii( "com.sun.star.ui.WindowStateConfiguration" ) );
++}
 +
-+class CommandBarEnumeration : public CommandBarEnumeration_BASE
++rtl::OUString SAL_CALL ScVbaPageSetup::getRightFooter() throw (css::uno::RuntimeException)
 +{
-+    uno::Reference< uno::XComponentContext > m_xContext;
-+    uno::Reference< XCommandBars > m_xCommandBars;
-+    uno::Sequence< rtl::OUString > m_sNames;
-+    sal_Int32 m_nCurrentPosition;
-+public:
-+    CommandBarEnumeration( const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< XCommandBars > xCommandBars, const uno::Sequence< rtl::OUString > sNames ) : m_xContext( xContext ), m_xCommandBars( xCommandBars ), m_sNames( sNames ), m_nCurrentPosition( 0 )
++    rtl::OUString rightFooter;
++    try
 +    {
++        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
++        if( xFooterContent.is() )
++        {
++            uno::Reference< text::XText > xText = xFooterContent->getRightText();
++            rightFooter = xText->getString();
++        }
 +    }
-+    virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
++    catch( uno::Exception& )
 +    {
-+        if( m_nCurrentPosition < m_sNames.getLength() )
-+            return sal_True;
-+        return sal_False;
 +    }
-+    virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
++
++    return rightFooter;
++}
++
++void SAL_CALL ScVbaPageSetup::setRightFooter( const rtl::OUString& rightFooter) throw (css::uno::RuntimeException)
++{
++    try
 +    {
-+        if( hasMoreElements() )
++        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
++        if( xFooterContent.is() )
 +        {
-+            rtl::OUString sName( m_sNames[ m_nCurrentPosition ] );
-+            m_nCurrentPosition = m_nCurrentPosition + 1;
-+            if( sName.indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 ) 
-+            {
-+                sal_Int32 nLastIndex = sName.lastIndexOf( rtl::OUString::createFromAscii( "/" ) );
-+                if( ( nLastIndex != -1 ) && ( ( nLastIndex + 1 ) < sName.getLength() ) )
-+                {
-+                   sName = sName.copy( nLastIndex + 1);
-+                   if( sName.getLength() > 0 )
-+                   {
-+                        uno::Reference< XHelperInterface > xHelperInterface( m_xCommandBars, uno::UNO_QUERY_THROW );
-+                        uno::Reference< XCommandBar > xCommandBar( new ScVbaCommandBar( xHelperInterface, m_xContext, sName, sal_True, sal_False ) );
-+                        if( xCommandBar.is() )
-+                            return uno::makeAny( xCommandBar );
-+                        else
-+                            return nextElement();
-+                    }
-+                    else
-+                        return nextElement();
-+                    }
-+             }
-+             else
-+                return nextElement();
++            uno::Reference< text::XText > xText = xFooterContent->getRightText();
++            xText->setString( rightFooter );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) ); 
 +        }
-+        else
-+            throw container::NoSuchElementException();
-+        return uno::Any();
 +    }
-+};
++    catch( uno::Exception& )
++    {
++    }
++}
++
++sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
++{
++    sal_Int32 order = excel::XlOrder::xlDownThenOver;
++    try
++    {
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")));
++        sal_Bool bPrintDownFirst = sal_False;
++        aValue >>= bPrintDownFirst;
++        if( !bPrintDownFirst )
++            order = excel::XlOrder::xlOverThenDown;
++    }
++    catch( uno::Exception& )
++    {
++    }
 +
++    return order;
++}
 +
-+ScVbaCommandBars::ScVbaCommandBars( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< container::XIndexAccess > xIndexAccess ) : CommandBars_BASE( xParent, xContext, xIndexAccess )
++void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::RuntimeException)
 +{
-+    retrieveObjects();
++    sal_Bool bOrder = sal_True;
++    switch( order )
++    {
++        case excel::XlOrder::xlDownThenOver:
++            break;
++        case excel::XlOrder::xlOverThenDown:
++            bOrder = sal_False;
++            break;
++        default:
++            DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++    }
++
++    try
++    {
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")), uno::makeAny( bOrder ));
++    }
++    catch( uno::Exception& )
++    {
++    }
 +}
-+void
-+ScVbaCommandBars::retrieveObjects() throw ( uno::RuntimeException )
++
++sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() throw (css::uno::RuntimeException)
 +{
-+    uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument(), uno::UNO_QUERY_THROW );
-+    if( xServiceInfo->supportsService( sSpreadsheetDocumentUrl ) )
++    sal_Int16 number = 0;
++    try
 +    {
-+        m_sModuleName = sSpreadsheetDocumentUrl;
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")));
++        aValue >>= number;
 +    }
-+    else if( xServiceInfo->supportsService( sTextDocumentUrl ) )
++    catch( uno::Exception& )
 +    {
-+        m_sModuleName = sTextDocumentUrl;
 +    }
-+    else
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Unsupported Document" ), uno::Reference< uno::XInterface >() );
-+    
-+    uno::Reference < lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
-+    uno::Reference < container::XNameAccess > xNameAccess( xMSF->createInstance( sWindowStateConfUrl ), uno::UNO_QUERY_THROW );
-+    m_xNameAccess.set( xNameAccess->getByName( m_sModuleName ), uno::UNO_QUERY_THROW );
++
++    if( number ==0 )
++    {
++        number = excel::Constants::xlAutomatic;
++    }
++
++    return number;
 +}
 +
-+// XEnumerationAccess
-+uno::Type SAL_CALL 
-+ScVbaCommandBars::getElementType() throw ( uno::RuntimeException )
++void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) throw (css::uno::RuntimeException)
 +{
-+    return XCommandBars::static_type( 0 );
++    if( firstPageNumber < 0 )
++        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++    if( firstPageNumber == excel::Constants::xlAutomatic )
++        firstPageNumber = 0;
++
++    try
++    {
++        uno::Any aValue;
++        aValue <<= (sal_Int16)firstPageNumber;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
++    }
++    catch( uno::Exception& )
++    {
++    }
 +}
-+uno::Reference< container::XEnumeration >
-+ScVbaCommandBars::createEnumeration() throw ( uno::RuntimeException )
++
++sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::RuntimeException)
 +{
-+    return uno::Reference< container::XEnumeration >( new CommandBarEnumeration( mxContext, this, m_xNameAccess->getElementNames() ) );
++    sal_Bool centerVertically = sal_False;
++    try
++    {
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")));
++        aValue >>= centerVertically;
++    }
++    catch( uno::Exception& )
++    {
++    }
++    return centerVertically;
 +}
 +
-+uno::Any
-+ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
++void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) throw (css::uno::RuntimeException)
 +{
-+    // aSource should be a name at this time, because of the class is API wrapper.
-+    rtl::OUString sToolBarName;
-+    if( aSource >>= sToolBarName )
++    try
++    {
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")), uno::makeAny( centerVertically ));
++    }
++    catch( uno::Exception& )
 +    {
-+        sToolBarName = sToolBarName.toAsciiLowerCase();
-+        if( sToolBarName.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii("Worksheet Menu Bar") ) )
-+        {
-+            return uno::makeAny( uno::Reference< XCommandBar > ( new ScVbaCommandBar( this, mxContext, 0 ) ) );
-+        }
-+        else if( sToolBarName.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii("Menu Bar") ) )
-+        {
-+            return uno::makeAny( uno::Reference< XCommandBar > ( new ScVbaCommandBar( this, mxContext, 1 ) ) );
-+        }
-+        else if( checkToolBarExist( sToolBarName ) )
-+        {
-+            return uno::makeAny( uno::Reference< XCommandBar > (new ScVbaCommandBar( this, mxContext, sToolBarName, sal_True, sal_False ) ) );
-+        }
 +    }
-+    return uno::Any();
 +}
 +
-+// XCommandBars
-+uno::Reference< XCommandBar > SAL_CALL 
-+ScVbaCommandBars::Add( const css::uno::Any& Name, const css::uno::Any& /*Position*/, const css::uno::Any& /*MenuBar*/, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::RuntimeException)
 +{
-+    // Position - MsoBar MenuBar - sal_Bool
-+    // Currently only the Name is supported.
-+    rtl::OUString sName;
-+    if( !( Name >>= sName ) )
++    sal_Bool centerHorizontally = sal_False;
++    try
 +    {
-+        sName = rtl::OUString::createFromAscii("Custom1");
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")));
++        aValue >>= centerHorizontally;
 +    }
-+    sal_Bool bTemporary = false;
-+    if( !( Temporary >>= bTemporary ) )
++    catch( uno::Exception& )
 +    {
-+        bTemporary = sal_True;
 +    }
-+    return uno::Reference< XCommandBar >( new ScVbaCommandBar( this, mxContext, sName.toAsciiLowerCase(), bTemporary, sal_True ) );
++    return centerHorizontally;
 +}
-+sal_Int32 SAL_CALL 
-+ScVbaCommandBars::getCount() throw(css::uno::RuntimeException)
++
++void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally) throw (css::uno::RuntimeException)
 +{
-+    // Filter out all toolbars from the window collection
-+    sal_Int32 nCount = 0;
-+    uno::Sequence< ::rtl::OUString > allNames = m_xNameAccess->getElementNames();
-+    for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
++    try
++    {
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")), uno::makeAny( centerHorizontally ));
++    }
++    catch( uno::Exception& )
 +    {
-+        if(allNames[i].indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
-+        {
-+            nCount++;
-+        }
 +    }
-+    return nCount;
 +}
 +
-+// ScVbaCollectionBaseImpl
-+uno::Any SAL_CALL
-+ScVbaCommandBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw( uno::RuntimeException )
++sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException)
 +{
-+    if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
++    sal_Bool printHeadings = sal_False;
++    try
 +    {
-+        return createCollectionObject( aIndex );    
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
++        aValue >>= printHeadings;
 +    }
-+    return uno::Any();
++    catch( uno::Exception& )
++    {
++    }
++    return printHeadings;
 +}
 +
-+sal_Bool
-+ScVbaCommandBars::checkToolBarExist( rtl::OUString sToolBarName )
++void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (css::uno::RuntimeException)
 +{
-+    CommandBarNameMap::const_iterator iter = mCommandBarNameMap.find( sToolBarName.toAsciiLowerCase() );
-+    if( iter != mCommandBarNameMap.end() )
++    try
 +    {
-+        return sal_True;
-+    }    
-+    uno::Sequence< ::rtl::OUString > allNames = m_xNameAccess->getElementNames();
-+    for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")), uno::makeAny( printHeadings ));
++    }
++    catch( uno::Exception& )
 +    {
-+        if(allNames[i].indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
-+        {
-+            if( allNames[i].indexOf( sToolBarName ) != -1 )
-+            {
-+                return sal_True;
-+            }
-+        }
 +    }
-+    return sal_False;
 +}
-+    
-+// XHelperInterface
++
 +rtl::OUString& 
-+ScVbaCommandBars::getServiceImplName()
++ScVbaPageSetup::getServiceImplName()
 +{
-+    static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBars") );
-+    return sImplName;
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageSetup") );
++	return sImplName;
 +}
-+uno::Sequence<rtl::OUString> 
-+ScVbaCommandBars::getServiceNames()
++
++uno::Sequence< rtl::OUString > 
++ScVbaPageSetup::getServiceNames()
 +{
-+    static uno::Sequence< rtl::OUString > aServiceNames;
-+    if ( aServiceNames.getLength() == 0 )
-+    {
-+        aServiceNames.realloc( 1 );
-+        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBars" ) );
-+    }
-+    return aServiceNames;
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageSetup" ) );
++	}
++	return aServiceNames;
 +}
-+
-diff --git sc/source/ui/vba/vbacommandbars.hxx sc/source/ui/vba/vbacommandbars.hxx
-new file mode 100644
-index 0000000..a05e22b
---- /dev/null
-+++ sc/source/ui/vba/vbacommandbars.hxx
-@@ -0,0 +1,79 @@
+Index: sc/source/ui/vba/vbaborders.cxx
+===================================================================
+--- sc/source/ui/vba/vbaborders.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaborders.cxx	(.../cws/npower11)	(revision 266650)
+@@ -30,10 +30,10 @@
+ #include "vbaborders.hxx"
+ 
+ #include <cppuhelper/implbase3.hxx>
+-#include <org/openoffice/excel/XlBordersIndex.hpp>
+-#include <org/openoffice/excel/XlBorderWeight.hpp>
+-#include <org/openoffice/excel/XlLineStyle.hpp>
+-#include <org/openoffice/excel/XlColorIndex.hpp>
++#include <ooo/vba/excel/XlBordersIndex.hpp>
++#include <ooo/vba/excel/XlBorderWeight.hpp>
++#include <ooo/vba/excel/XlLineStyle.hpp>
++#include <ooo/vba/excel/XlColorIndex.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ #include <com/sun/star/table/TableBorder.hpp>
+ #include <com/sun/star/table/XColumnRowRange.hpp>
+@@ -41,8 +41,8 @@
+ #include "vbapalette.hxx"
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
+-using namespace ::org::openoffice::excel;
++using namespace ::ooo::vba;
++using namespace ::ooo::vba::excel;
+ 
+ 
+ typedef ::cppu::WeakImplHelper1<container::XIndexAccess > RangeBorders_Base;
+@@ -165,12 +165,12 @@
+ 		if ( aServiceNames.getLength() == 0 )
+ 		{
+ 			aServiceNames.realloc( 1 );
+-			aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Border" ) );
++			aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Border" ) );
+ 		}
+ 		return aServiceNames;		
+ 	}
+ public:
+-	ScVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, ScVbaPalette& rPalette) : ScVbaBorder_Base( uno::Reference< vba::XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {}  	
++	ScVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, ScVbaPalette& rPalette) : ScVbaBorder_Base( uno::Reference< XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {}  	
+ 
+ 	// XBorder
+ 	uno::Any SAL_CALL getColor() throw (uno::RuntimeException)
+@@ -383,7 +383,7 @@
+ 	}
+ };
+ 
+-ScVbaBorders::ScVbaBorders( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, ScVbaPalette& rPalette  ):  ScVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ), bRangeIsSingleCell( false ) 
++ScVbaBorders::ScVbaBorders( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, ScVbaPalette& rPalette  ):  ScVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ), bRangeIsSingleCell( false ) 
+ {
+ 	uno::Reference< table::XColumnRowRange > xColumnRowRange(xRange, uno::UNO_QUERY_THROW );
+ 	if ( xColumnRowRange->getRows()->getCount() == 1 && xColumnRowRange->getColumns()->getCount() == 1 )	
+@@ -571,7 +571,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Borders" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Borders" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbarange.hxx
+===================================================================
+--- sc/source/ui/vba/vbarange.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbarange.hxx	(.../cws/npower11)	(revision 266650)
+@@ -1,275 +1,282 @@
+-/*************************************************************************
+- *
+- * 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: vbarange.hxx,v $
+- * $Revision: 1.6 $
+- *
+- * 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_RANGE_HXX
+-#define SC_VBA_RANGE_HXX
+-
+-#include <cppuhelper/implbase4.hxx>
+-#include <com/sun/star/container/XEnumerationAccess.hpp>
+-
+-#include <org/openoffice/excel/XRange.hpp>
+-#include <com/sun/star/table/XCellRange.hpp>
+-#include <org/openoffice/excel/XFont.hpp>
+-#include <org/openoffice/excel/XComment.hpp>
+-#include <org/openoffice/vba/XCollection.hpp>
+-#include <org/openoffice/excel/XlPasteType.hdl>
+-#include <org/openoffice/excel/XlPasteSpecialOperation.hdl>
+-
+-#include <comphelper/proparrhlp.hxx>
+-#include <comphelper/propertycontainer.hxx>
+-#include <com/sun/star/beans/XPropertySet.hpp>
+-#include <com/sun/star/beans/PropertyAttribute.hpp>
+-#include <com/sun/star/script/XDefaultMethod.hpp>
+-#include <com/sun/star/script/XDefaultProperty.hpp>
+-#include <com/sun/star/sheet/FillDateMode.hpp>
+-#include <com/sun/star/sheet/FillMode.hpp>
+-#include <com/sun/star/sheet/FillDirection.hpp>
+-#include <com/sun/star/sheet/XSpreadsheet.hpp>
+-#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
+-
+-//#include "vbahelperinterface.hxx"
+-#include "vbaformat.hxx"
+-
+-class ScTableSheetsObj;
+-class ScCellRangesBase;
+-
+-//typedef InheritedHelperInterfaceImpl1< oo::excel::XRange >  ScVbaRange_BASE;
+-typedef ScVbaFormat< oo::excel::XRange > ScVbaRange_BASE;
+-
+-class ArrayVisitor
+-{
+-public:
+-	virtual void visitNode( sal_Int32 x, sal_Int32 y, const css::uno::Reference< css::table::XCell >& xCell ) = 0;
+-	virtual	~ArrayVisitor(){}
+-};
+-
+-class ValueSetter : public ArrayVisitor
+-{
+-public:
+-	virtual bool processValue( const css::uno::Any& aValue, const css::uno::Reference< css::table::XCell >& xCell ) = 0;
+-
+-
+-};
+-
+-class ValueGetter : public ArrayVisitor
+-{
+-	
+-public:
+-	virtual void processValue( sal_Int32 x, sal_Int32 y, const css::uno::Any& aValue ) = 0;
+-	virtual const css::uno::Any& getValue() const = 0;
+-};
+-
+-
+-
+-class ScVbaRange : public ScVbaRange_BASE
+-{
+-	css::uno::Reference< oo::vba::XCollection > m_Areas;
+-	css::uno::Reference< oo::vba::XCollection > m_Borders;
+-	css::uno::Reference< css::table::XCellRange > mxRange;
+-	css::uno::Reference< css::sheet::XSheetCellRangeContainer > mxRanges;
+-	sal_Bool mbIsRows;
+-	sal_Bool mbIsColumns;
+-	css::uno::Reference< oo::excel::XValidation > m_xValidation;
+-	double getCalcColWidth( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException);
+-	double getCalcRowHeight( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException);
+-	void visitArray( ArrayVisitor& vistor );
+-
+-	css::uno::Reference< oo::excel::XRange > getEntireColumnOrRow( bool bColumn = true ) throw( css::uno::RuntimeException );
+-
+-	void fillSeries(  css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue ) throw( css::uno::RuntimeException );	 
+-
+-	void ClearContents( sal_Int32 nFlags ) throw (css::uno::RuntimeException);
+-	virtual void   setValue( const css::uno::Any& aValue, ValueSetter& setter) throw ( css::uno::RuntimeException);
+-	virtual css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
+-	virtual void   setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException);
+-	css::uno::Reference< oo::excel::XRange > getArea( sal_Int32 nIndex  ) throw( css::uno::RuntimeException );
+-	ScCellRangesBase* getCellRangesBase() throw ( css::uno::RuntimeException );
+-	SfxItemSet* getCurrentDataSet( )  throw ( css::uno::RuntimeException );
+-	css::uno::Reference< oo::vba::XCollection >& getBorders();
+-	void groupUnGroup( bool bUnGroup = false ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
+-	css::uno::Reference< oo::excel::XRange > PreviousNext( bool bIsPrevious );
+-	css::uno::Reference< oo::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );
+-	css::awt::Point getPosition() throw ( css::uno::RuntimeException );
+-public:
+-	ScVbaRange( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
+-	ScVbaRange( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
+-	ScVbaRange( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
+-
+-	ScDocument* getScDocument();
+-	ScDocShell* getScDocShell();
+-
+-	virtual ~ScVbaRange();
+-	virtual css::uno::Reference< oo::vba::XHelperInterface > thisHelperIface() { return this; }
+-	bool isSingleCellRange(); 
+-	css::uno::Reference< oo::excel::XRange > intersect( const css::uno::Reference< oo::excel::XRange >& xRange ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-        static css::uno::Reference< oo::excel::XRange > getRangeObjectForName( const css::uno::Reference< css::uno::XComponentContext >& xContext, const rtl::OUString& sRangeName, ScDocShell* pDocSh, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1  ) throw ( css::uno::RuntimeException );
+-
+-    // Attributes
+-	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
+-	virtual void   SAL_CALL setValue( const css::uno::Any& aValue ) throw ( css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getFormula() throw (css::uno::RuntimeException);
+-	virtual void   SAL_CALL setFormula( const css::uno::Any& rFormula ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getFormulaArray() throw (css::uno::RuntimeException);
+-	virtual void   SAL_CALL setFormulaArray(const css::uno::Any& rFormula) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getFormulaR1C1() throw (css::uno::RuntimeException);
+-	virtual void   SAL_CALL setFormulaR1C1( const css::uno::Any &rFormula ) throw (css::uno::RuntimeException);
+-	virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+-	virtual ::sal_Int32 SAL_CALL getRow() throw (css::uno::RuntimeException);
+-	virtual ::sal_Int32 SAL_CALL getColumn() throw (css::uno::RuntimeException);
+-	virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+-    using ScVbaRange_BASE::setNumberFormat;
+-	virtual void SAL_CALL setNumberFormat( const css::uno::Any& rNumberFormat ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getNumberFormat() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL setMergeCells( const css::uno::Any& bMerge ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getMergeCells() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL setWrapText( const css::uno::Any& bIsWrapped ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getWrapText() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getEntireRow() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getEntireColumn() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XComment > SAL_CALL getComment() throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getHidden() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL setHidden( const css::uno::Any& _hidden ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getColumnWidth() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL setColumnWidth( const css::uno::Any& _columnwidth ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getRowHeight() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL setRowHeight( const css::uno::Any& _rowheight ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getWidth() throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getHeight() throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getTop() throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getLeft() throw (css::uno::RuntimeException);
+-	
+-	virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getWorksheet() throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getPageBreak() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL setPageBreak( const css::uno::Any& _pagebreak ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XValidation > SAL_CALL getValidation() throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getFormulaHidden() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL setFormulaHidden(const css::uno::Any& aHidden) throw (css::script::BasicErrorException, css::uno::RuntimeException);	
+-	// Methods
+-	sal_Bool IsRows() { return mbIsRows; }
+-	sal_Bool IsColumns() { return mbIsColumns; }
+-	virtual css::uno::Reference< oo::excel::XComment > SAL_CALL AddComment( const css::uno::Any& Text ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Clear() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL ClearComments() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL ClearContents() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL ClearFormats() throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL HasFormula() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL FillLeft() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL FillRight() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL FillUp() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL FillDown() throw (css::uno::RuntimeException);
+-	virtual	css::uno::Reference< oo::excel::XRange > SAL_CALL Offset( const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset )
+-														   throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL CurrentRegion() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL CurrentArray() throw (css::uno::RuntimeException);
+-	virtual ::rtl::OUString SAL_CALL Characters( const css::uno::Any& nIndex, const css::uno::Any& nCount ) 
+-												 throw (css::uno::RuntimeException);
+-
+-	virtual ::rtl::OUString SAL_CALL Address( const css::uno::Any& RowAbsolute, const css::uno::Any& ColumnAbsolute, const css::uno::Any& ReferenceStyle, const css::uno::Any& External, const css::uno::Any& RelativeTo ) throw (css::uno::RuntimeException);
+-
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) 
+-														  throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange >  SAL_CALL Rows( const css::uno::Any& nIndex ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange >  SAL_CALL Columns( const css::uno::Any &nIndex ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Copy( const css::uno::Any& Destination ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Cut( const css::uno::Any& Destination ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Resize( const css::uno::Any& RowSize, const css::uno::Any& ColumnSize ) 
+-														   throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XFont > SAL_CALL Font() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XInterior > SAL_CALL Interior(  ) throw ( css::script::BasicErrorException, css::uno::RuntimeException) ;
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2, bool bForceUseInpuRangeTab ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getCellRange(  ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL PasteSpecial( const css::uno::Any& Paste, const css::uno::Any& Operation, const css::uno::Any& SkipBlanks, const css::uno::Any& Transpose ) throw (css::uno::RuntimeException);
+-	virtual ::sal_Bool SAL_CALL Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replacement, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat, const css::uno::Any& ReplaceFormat ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Sort( const css::uno::Any& Key1, const css::uno::Any& Order1, const css::uno::Any& Key2, const css::uno::Any& Type, const css::uno::Any& Order2, const css::uno::Any& Key3, const css::uno::Any& Order3, const css::uno::Any& Header, const css::uno::Any& OrderCustom, const css::uno::Any& MatchCase, const css::uno::Any& Orientation, const css::uno::Any& SortMethod,  const css::uno::Any& DataOption1, const css::uno::Any& DataOption2, const css::uno::Any& DataOption3 ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL End( ::sal_Int32 Direction )  throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Delete( const css::uno::Any& Shift ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL Areas( const css::uno::Any& ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL BorderAround( const css::uno::Any& LineStyle, 
+-                const css::uno::Any& Weight, const css::uno::Any& ColorIndex, const css::uno::Any& Color ) throw (css::uno::RuntimeException);
+-    virtual void SAL_CALL TextToColumns( const css::uno::Any& Destination, const css::uno::Any& DataType, const css::uno::Any& TextQualifier,
+-                const css::uno::Any& ConsecutinveDelimiter, const css::uno::Any& Tab, const css::uno::Any& Semicolon, const css::uno::Any& Comma, 
+-                const css::uno::Any& Space, const css::uno::Any& Other, const css::uno::Any& OtherChar, const css::uno::Any& FieldInfo,
+-                const css::uno::Any& DecimalSeparator, const css::uno::Any& ThousandsSeparator, const css::uno::Any& TrailingMinusNumbers ) throw (css::uno::RuntimeException);
+-
+-	virtual void SAL_CALL AutoFilter( const css::uno::Any& Field, const css::uno::Any& Criteria1, const css::uno::Any& Operator, const css::uno::Any& Criteria2, const css::uno::Any& VisibleDropDown ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Insert( const css::uno::Any& Shift, const css::uno::Any& CopyOrigin ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL Autofit() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL AutoFill( const css::uno::Reference< oo::excel::XRange >& Destination, const css::uno::Any& Type ) throw (css::uno::RuntimeException) ;
+-	 void SAL_CALL Calculate(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
+-	virtual void SAL_CALL AutoOutline(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Item( const ::css::uno::Any& row, const css::uno::Any& column ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL ClearOutline(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL Ungroup(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL Group(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL Merge( const css::uno::Any& Across ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL UnMerge(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL getStyle() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL setStyle( const css::uno::Any& _style ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Next() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Previous() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL RemoveSubtotal(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual void SAL_CALL Subtotal( ::sal_Int32 GroupBy, ::sal_Int32 Function, const css::uno::Sequence< ::sal_Int32 >& TotalList, const css::uno::Any& Replace, const css::uno::Any& PageBreaks, const css::uno::Any& SummaryBelowData ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	// XEnumerationAccess
+-	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+-	// XElementAccess
+-	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException)
+-	{
+-		return oo::excel::XRange::static_type(0);
+-
+-	}
+-	virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException);
+-	// XDefaultMethod
+-	::rtl::OUString SAL_CALL getDefaultMethodName(  ) throw (css::uno::RuntimeException);
+-        // XDefaultProperty
+-        ::rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+-
+-
+-// #TODO completely rewrite ScVbaRange, its become a hackfest
+-// it needs to be closer to ScCellRangeBase in that the underlying
+-// object model should probably be a ScRangelst. 
+-//     * would be nice to be able to construct a range from an addres only
+-//     * or a list of address ( multi-area )
+-//     * object should be a lightweight as possible
+-//     * we shouldn't need hacks like this below
+-	static css::uno::Reference< oo::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
+-	virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< oo::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );  
+-	// XHelperInterface
+-	virtual rtl::OUString& getServiceImplName();
+-	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+-};
+-#endif /* SC_VBA_RANGE_HXX */
+-
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
++ * $RCSfile: vbarange.hxx,v $
++ * $Revision: 1.6 $
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * This file is part of OpenOffice.org.
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * 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.
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * 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 along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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_COMMANDBARS_HXX
-+#define SC_VBA_COMMANDBARS_HXX
++#ifndef SC_VBA_RANGE_HXX
++#define SC_VBA_RANGE_HXX
 +
-+#include <ooo/vba/XCommandBar.hpp>
-+#include <ooo/vba/XCommandBars.hpp>
-+#include <com/sun/star/container/XNameAccess.hpp>
++#include <cppuhelper/implbase4.hxx>
++#include <com/sun/star/container/XEnumerationAccess.hpp>
 +
-+#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/excel/XRange.hpp>
++#include <com/sun/star/table/XCellRange.hpp>
++#include <ooo/vba/excel/XFont.hpp>
++#include <ooo/vba/excel/XComment.hpp>
++#include <ooo/vba/XCollection.hpp>
++#include <ooo/vba/excel/XlPasteType.hdl>
++#include <ooo/vba/excel/XlPasteSpecialOperation.hdl>
 +
-+#include "vbahelperinterface.hxx"
-+#include "vbacollectionimpl.hxx"
++#include <comphelper/proparrhlp.hxx>
++#include <comphelper/propertycontainer.hxx>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <com/sun/star/beans/PropertyAttribute.hpp>
++#include <com/sun/star/script/XDefaultMethod.hpp>
++#include <com/sun/star/script/XDefaultProperty.hpp>
++#include <com/sun/star/sheet/FillDateMode.hpp>
++#include <com/sun/star/sheet/FillMode.hpp>
++#include <com/sun/star/sheet/FillDirection.hpp>
++#include <com/sun/star/sheet/XSpreadsheet.hpp>
++#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
 +
-+typedef CollTestImplHelper< ov::XCommandBars > CommandBars_BASE;
++//#include "vbahelperinterface.hxx"
++#include "vbaformat.hxx"
 +
-+class ScVbaCommandBars : public CommandBars_BASE
++class ScTableSheetsObj;
++class ScCellRangesBase;
++class ScCellRangeObj;
++
++//typedef InheritedHelperInterfaceImpl1< ov::excel::XRange >  ScVbaRange_BASE;
++typedef ScVbaFormat< ov::excel::XRange > ScVbaRange_BASE;
++
++class ArrayVisitor
 +{
-+private:
-+    css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
-+    rtl::OUString m_sModuleName;
-+    void retrieveObjects() throw( css::uno::RuntimeException );
 +public:
-+    ScVbaCommandBars( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::container::XIndexAccess > xIndexAccess );
++	virtual void visitNode( sal_Int32 x, sal_Int32 y, const css::uno::Reference< css::table::XCell >& xCell ) = 0;
++	virtual	~ArrayVisitor(){}
++};
++
++class ValueSetter : public ArrayVisitor
++{
++public:
++	virtual bool processValue( const css::uno::Any& aValue, const css::uno::Reference< css::table::XCell >& xCell ) = 0;
 +
-+    sal_Bool checkToolBarExist( rtl::OUString sToolBarName );
-+    rtl::OUString GetModuleName(){ return m_sModuleName; };
-+    css::uno::Reference< css::container::XNameAccess > GetWindows() 
-+    { 
-+        retrieveObjects();
-+        return m_xNameAccess; 
-+    };
-+    // XCommandBars
-+    virtual css::uno::Reference< ov::XCommandBar > SAL_CALL Add( const css::uno::Any& Name, const css::uno::Any& Position, const css::uno::Any& MenuBar, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+    // XEnumerationAccess
-+    virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
-+    virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
 +
-+    virtual sal_Int32 SAL_CALL getCount() throw(css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL Item( const css::uno::Any& aIndex, const css::uno::Any& /*aIndex2*/ ) throw( css::uno::RuntimeException);
-+    // XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
 +};
 +
-+#endif//SC_VBA_COMMANDBARS_HXX
-diff --git sc/source/ui/vba/vbacomment.cxx sc/source/ui/vba/vbacomment.cxx
-index 192db3d..e8ca951 100644
---- sc/source/ui/vba/vbacomment.cxx
-+++ sc/source/ui/vba/vbacomment.cxx
-@@ -29,7 +29,7 @@
++class ValueGetter : public ArrayVisitor
++{
++	
++public:
++	virtual void processValue( sal_Int32 x, sal_Int32 y, const css::uno::Any& aValue ) = 0;
++	virtual const css::uno::Any& getValue() const = 0;
++};
++
++
++
++class ScVbaRange : public ScVbaRange_BASE
++{
++	css::uno::Reference< ov::XCollection > m_Areas;
++	css::uno::Reference< ov::XCollection > m_Borders;
++	css::uno::Reference< css::table::XCellRange > mxRange;
++	css::uno::Reference< css::sheet::XSheetCellRangeContainer > mxRanges;
++	sal_Bool mbIsRows;
++	sal_Bool mbIsColumns;
++	css::uno::Reference< ov::excel::XValidation > m_xValidation;
++	double getCalcColWidth( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException);
++	double getCalcRowHeight( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException);
++	void visitArray( ArrayVisitor& vistor );
++
++	css::uno::Reference< ov::excel::XRange > getEntireColumnOrRow( bool bColumn = true ) throw( css::uno::RuntimeException );
++
++	void fillSeries(  css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue ) throw( css::uno::RuntimeException );	 
++
++	void ClearContents( sal_Int32 nFlags ) throw (css::uno::RuntimeException);
++	virtual void   setValue( const css::uno::Any& aValue, ValueSetter& setter) throw ( css::uno::RuntimeException);
++	virtual css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
++	virtual void   setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException);
++	css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex  ) throw( css::uno::RuntimeException );
++	ScCellRangesBase* getCellRangesBase() throw ( css::uno::RuntimeException );
++	ScCellRangeObj* getCellRangeObj( )  throw ( css::uno::RuntimeException );
++	SfxItemSet* getCurrentDataSet( )  throw ( css::uno::RuntimeException );
++	css::uno::Reference< ov::XCollection >& getBorders();
++	void groupUnGroup( bool bUnGroup = false ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
++ 	css::uno::Reference< ov::excel::XRange > PreviousNext( bool bIsPrevious );
++ 	css::uno::Reference< ov::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );
++	css::awt::Point getPosition() throw ( css::uno::RuntimeException );
++public:
++	ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
++	ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
++	ScVbaRange( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
++
++	ScDocument* getScDocument();
++	ScDocShell* getScDocShell();
++
++	virtual ~ScVbaRange();
++ 	virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() { return this; }
++	bool isSingleCellRange(); 
++        static css::uno::Reference< ov::excel::XRange > getRangeObjectForName( const css::uno::Reference< css::uno::XComponentContext >& xContext, const rtl::OUString& sRangeName, ScDocShell* pDocSh, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1  ) throw ( css::uno::RuntimeException );
++
++    // Attributes
++	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
++	virtual void   SAL_CALL setValue( const css::uno::Any& aValue ) throw ( css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getFormula() throw (css::uno::RuntimeException);
++	virtual void   SAL_CALL setFormula( const css::uno::Any& rFormula ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getFormulaArray() throw (css::uno::RuntimeException);
++	virtual void   SAL_CALL setFormulaArray(const css::uno::Any& rFormula) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getFormulaR1C1() throw (css::uno::RuntimeException);
++	virtual void   SAL_CALL setFormulaR1C1( const css::uno::Any &rFormula ) throw (css::uno::RuntimeException);
++	virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
++	virtual ::sal_Int32 SAL_CALL getRow() throw (css::uno::RuntimeException);
++	virtual ::sal_Int32 SAL_CALL getColumn() throw (css::uno::RuntimeException);
++	virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
++    using ScVbaRange_BASE::setNumberFormat;
++	virtual void SAL_CALL setNumberFormat( const css::uno::Any& rNumberFormat ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getNumberFormat() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL setMergeCells( const css::uno::Any& bMerge ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getMergeCells() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL setWrapText( const css::uno::Any& bIsWrapped ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getWrapText() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireRow() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireColumn() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XComment > SAL_CALL getComment() throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getHidden() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setHidden( const css::uno::Any& _hidden ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getColumnWidth() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setColumnWidth( const css::uno::Any& _columnwidth ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getRowHeight() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setRowHeight( const css::uno::Any& _rowheight ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getWidth() throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getHeight() throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getTop() throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getLeft() throw (css::uno::RuntimeException);
++	
++	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getWorksheet() throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getPageBreak() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setPageBreak( const css::uno::Any& _pagebreak ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XValidation > SAL_CALL getValidation() throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getFormulaHidden() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL setFormulaHidden(const css::uno::Any& aHidden) throw (css::script::BasicErrorException, css::uno::RuntimeException);	
++	//virtual css::uno::Any SAL_CALL getLocked() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	//virtual void SAL_CALL setLocked(const css::uno::Any& aLocked) throw (css::script::BasicErrorException, css::uno::RuntimeException);	
++	virtual css::uno::Any SAL_CALL getShowDetail() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setShowDetail(const css::uno::Any& aShowDetail) throw (css::uno::RuntimeException);	
++	// Methods
++	sal_Bool IsRows() { return mbIsRows; }
++	sal_Bool IsColumns() { return mbIsColumns; }
++	virtual css::uno::Reference< ov::excel::XComment > SAL_CALL AddComment( const css::uno::Any& Text ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Clear() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL ClearComments() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL ClearContents() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL ClearFormats() throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL HasFormula() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL FillLeft() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL FillRight() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL FillUp() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL FillDown() throw (css::uno::RuntimeException);
++	virtual	css::uno::Reference< ov::excel::XRange > SAL_CALL Offset( const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset )
++														   throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentRegion() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentArray() throw (css::uno::RuntimeException);
++	virtual ::rtl::OUString SAL_CALL Characters( const css::uno::Any& nIndex, const css::uno::Any& nCount ) 
++												 throw (css::uno::RuntimeException);
++
++	virtual ::rtl::OUString SAL_CALL Address( const css::uno::Any& RowAbsolute, const css::uno::Any& ColumnAbsolute, const css::uno::Any& ReferenceStyle, const css::uno::Any& External, const css::uno::Any& RelativeTo ) throw (css::uno::RuntimeException);
++
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) 
++														  throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange >  SAL_CALL Rows( const css::uno::Any& nIndex ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange >  SAL_CALL Columns( const css::uno::Any &nIndex ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Copy( const css::uno::Any& Destination ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Cut( const css::uno::Any& Destination ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Resize( const css::uno::Any& RowSize, const css::uno::Any& ColumnSize ) 
++														   throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XFont > SAL_CALL Font() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior(  ) throw ( css::script::BasicErrorException, css::uno::RuntimeException) ;
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2, bool bForceUseInpuRangeTab ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getCellRange(  ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL PasteSpecial( const css::uno::Any& Paste, const css::uno::Any& Operation, const css::uno::Any& SkipBlanks, const css::uno::Any& Transpose ) throw (css::uno::RuntimeException);
++	virtual ::sal_Bool SAL_CALL Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replacement, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat, const css::uno::Any& ReplaceFormat ) throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Find( const css::uno::Any& What, const css::uno::Any& After, const css::uno::Any& LookIn, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& SearchDirection, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Sort( const css::uno::Any& Key1, const css::uno::Any& Order1, const css::uno::Any& Key2, const css::uno::Any& Type, const css::uno::Any& Order2, const css::uno::Any& Key3, const css::uno::Any& Order3, const css::uno::Any& Header, const css::uno::Any& OrderCustom, const css::uno::Any& MatchCase, const css::uno::Any& Orientation, const css::uno::Any& SortMethod,  const css::uno::Any& DataOption1, const css::uno::Any& DataOption2, const css::uno::Any& DataOption3 ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL End( ::sal_Int32 Direction )  throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Delete( const css::uno::Any& Shift ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL Areas( const css::uno::Any& ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL BorderAround( const css::uno::Any& LineStyle, 
++                const css::uno::Any& Weight, const css::uno::Any& ColorIndex, const css::uno::Any& Color ) throw (css::uno::RuntimeException);
++    virtual void SAL_CALL TextToColumns( const css::uno::Any& Destination, const css::uno::Any& DataType, const css::uno::Any& TextQualifier,
++                const css::uno::Any& ConsecutinveDelimiter, const css::uno::Any& Tab, const css::uno::Any& Semicolon, const css::uno::Any& Comma, 
++                const css::uno::Any& Space, const css::uno::Any& Other, const css::uno::Any& OtherChar, const css::uno::Any& FieldInfo,
++                const css::uno::Any& DecimalSeparator, const css::uno::Any& ThousandsSeparator, const css::uno::Any& TrailingMinusNumbers ) throw (css::uno::RuntimeException);
++
++	virtual void SAL_CALL AutoFilter( const css::uno::Any& Field, const css::uno::Any& Criteria1, const css::uno::Any& Operator, const css::uno::Any& Criteria2, const css::uno::Any& VisibleDropDown ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Insert( const css::uno::Any& Shift, const css::uno::Any& CopyOrigin ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Autofit() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL AutoFill( const css::uno::Reference< ov::excel::XRange >& Destination, const css::uno::Any& Type ) throw (css::uno::RuntimeException) ;
++	 void SAL_CALL Calculate(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
++	virtual void SAL_CALL AutoOutline(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Item( const ::css::uno::Any& row, const css::uno::Any& column ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL ClearOutline(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL Ungroup(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL Group(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL Merge( const css::uno::Any& Across ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL UnMerge(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getStyle() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setStyle( const css::uno::Any& _style ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Next() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Previous() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL RemoveSubtotal(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL MergeArea() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL Subtotal( ::sal_Int32 GroupBy, ::sal_Int32 Function, const css::uno::Sequence< ::sal_Int32 >& TotalList, const css::uno::Any& Replace, const css::uno::Any& PageBreaks, const css::uno::Any& SummaryBelowData ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	// XEnumerationAccess
++	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
++	// XElementAccess
++	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException)
++	{
++		return ov::excel::XRange::static_type(0);
++
++	}
++	virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException);
++	// XDefaultMethod
++	::rtl::OUString SAL_CALL getDefaultMethodName(  ) throw (css::uno::RuntimeException);
++        // XDefaultProperty
++        ::rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++
++
++// #TODO completely rewrite ScVbaRange, its become a hackfest
++// it needs to be closer to ScCellRangeBase in that the underlying
++// object model should probably be a ScRangelst. 
++//     * would be nice to be able to construct a range from an addres only
++//     * or a list of address ( multi-area )
++//     * object should be a lightweight as possible
++//     * we shouldn't need hacks like this below
++	static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
++	virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );  
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif /* SC_VBA_RANGE_HXX */
++
+Index: sc/source/ui/vba/vbaworkbook.hxx
+===================================================================
+--- sc/source/ui/vba/vbaworkbook.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaworkbook.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,12 +31,12 @@
+ #define SC_VBA_WORKBOOK_HXX
+ 
+ #include <com/sun/star/frame/XModel.hpp>
+-#include <org/openoffice/excel/XWorkbook.hpp>
++#include <ooo/vba/excel/XWorkbook.hpp>
+ #include "vbahelperinterface.hxx"
+ 
+ class ScModelObj;
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XWorkbook > ScVbaWorkbook_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XWorkbook > ScVbaWorkbook_BASE;
+ 
+ class ScVbaWorkbook : public ScVbaWorkbook_BASE
+ {
+@@ -47,9 +47,9 @@
+ protected:
+ 
+ 	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
+-	ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
++	ScVbaWorkbook( 	const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
+ public:
+-	ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
++	ScVbaWorkbook( 	const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ 			css::uno::Reference< css::frame::XModel > xModel );
+ 	ScVbaWorkbook( 	css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
+ 	virtual ~ScVbaWorkbook() {}
+@@ -59,7 +59,7 @@
+ 	virtual ::rtl::OUString SAL_CALL getPath() throw (css::uno::RuntimeException);
+ 	virtual ::rtl::OUString SAL_CALL getFullName() throw (css::uno::RuntimeException);
+ 	virtual ::sal_Bool SAL_CALL getProtectStructure() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
+ 	virtual sal_Bool SAL_CALL getSaved() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setSaved( sal_Bool bSave ) throw (css::uno::RuntimeException);
+ 
+@@ -75,7 +75,7 @@
+ 	virtual void SAL_CALL Save() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
+     // Amelia Wang
+-    virtual css::uno::Any SAL_CALL Names( ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ 
+ 	virtual css::uno::Any SAL_CALL Styles( const css::uno::Any& Item ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL ResetColors(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbatextbox.hxx
+===================================================================
+--- sc/source/ui/vba/vbatextbox.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbatextbox.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,24 +30,28 @@
+ #ifndef SC_VBA_TEXTBOX_HXX
+ #define SC_VBA_TEXTBOX_HXX
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/msforms/XTextBox.hpp>
++#include <ooo/vba/msforms/XTextBox.hpp>
+ #include "vbacontrol.hxx"
+ #include "vbahelper.hxx"
+ 
+-typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XTextBox > TextBoxImpl_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XTextBox > TextBoxImpl_BASE;
+ 
+ class ScVbaTextBox : public TextBoxImpl_BASE
+ {
++    bool mbDialog;
+ public:
+-    ScVbaTextBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
++    ScVbaTextBox( const css::uno::Reference< ov::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, ov::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);
+     virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException);
+     virtual sal_Int32 SAL_CALL getMaxLength() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setMaxLength( sal_Int32 _maxlength ) throw (css::uno::RuntimeException);
+     virtual sal_Bool SAL_CALL getMultiline() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeException);
+-
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
+ #endif //SC_VBA_TEXTBOX_HXX
+Index: sc/source/ui/vba/vbaformatcondition.hxx
+===================================================================
+--- sc/source/ui/vba/vbaformatcondition.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaformatcondition.hxx	(.../cws/npower11)	(revision 266650)
+@@ -29,9 +29,9 @@
   ************************************************************************/
- #include "vbacomment.hxx"
+ #ifndef SC_VBA_FORMATCONDITION_HXX
+ #define SC_VBA_FORMATCONDITION_HXX
+-#include <org/openoffice/excel/XFormatCondition.hpp>
+-#include <org/openoffice/excel/XFormatConditions.hpp>
+-#include <org/openoffice/excel/XStyle.hpp>
++#include <ooo/vba/excel/XFormatCondition.hpp>
++#include <ooo/vba/excel/XFormatConditions.hpp>
++#include <ooo/vba/excel/XStyle.hpp>
+ #include <com/sun/star/frame/XModel.hpp> 
+ #include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
+ #include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
+@@ -39,18 +39,18 @@
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ #include "vbacondition.hxx"
  
--#include <org/openoffice/excel/XlCreator.hpp>
-+#include <ooo/vba/excel/XlCreator.hpp>
- #include <com/sun/star/sheet/XSpreadsheet.hpp>
- #include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
- #include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
-@@ -42,10 +42,10 @@
- #include "vbacomments.hxx"
+-typedef ScVbaCondition< oo::excel::XFormatCondition >  ScVbaFormatCondition_BASE;
++typedef ScVbaCondition< ov::excel::XFormatCondition >  ScVbaFormatCondition_BASE;
+ class ScVbaFormatCondition : public ScVbaFormatCondition_BASE
+ {
+ protected:
+ 	rtl::OUString msStyleName;
+ 	css::uno::Reference< css::sheet::XSheetConditionalEntry > mxSheetConditionalEntry;    
+ 	css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries;    
+-	css::uno::Reference< oo::excel::XFormatConditions> moFormatConditions;
+-	css::uno::Reference< oo::excel::XStyle > mxStyle;
++	css::uno::Reference< ov::excel::XFormatConditions> moFormatConditions;
++	css::uno::Reference< ov::excel::XStyle > mxStyle;
+ 	css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet;
+ public:
+-	ScVbaFormatCondition(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, const css::uno::Reference< oo::excel::XStyle >&,  const css::uno::Reference< oo::excel::XFormatConditions >& _xFormatConditions, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException );
++	ScVbaFormatCondition(  const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, const css::uno::Reference< ov::excel::XStyle >&,  const css::uno::Reference< ov::excel::XFormatConditions >& _xFormatConditions, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException );
  
+ 	void notifyRange() throw ( css::script::BasicErrorException );
+ 	static css::sheet::ConditionOperator retrieveAPIType(sal_Int32 _nVBAType, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition ) throw( css::script::BasicErrorException );
+@@ -63,9 +63,9 @@
+ 	virtual ::sal_Int32 SAL_CALL Operator(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual void setFormula1( const css::uno::Any& _aFormula1) throw ( css::script::BasicErrorException );
+ 	virtual void setFormula2( const css::uno::Any& _aFormula2) throw ( css::script::BasicErrorException );
+-	virtual css::uno::Reference< ::org::openoffice::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& Index ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< ::org::openoffice::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	// XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+Index: sc/source/ui/vba/vbaaxis.cxx
+===================================================================
+--- sc/source/ui/vba/vbaaxis.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaaxis.cxx	(.../cws/npower11)	(revision 266650)
+@@ -29,21 +29,21 @@
+  ************************************************************************/
  
+ #include "vbaaxis.hxx"
+-#include <org/openoffice/excel/XlAxisCrosses.hpp>
+-#include <org/openoffice/excel/XlAxisType.hpp>
+-#include <org/openoffice/excel/XlScaleType.hpp>
++#include <ooo/vba/excel/XlAxisCrosses.hpp>
++#include <ooo/vba/excel/XlAxisType.hpp>
++#include <ooo/vba/excel/XlScaleType.hpp>
+ #include "vbaaxistitle.hxx"
+ #include "vbachart.hxx"
+ using namespace ::com::sun::star;
 -using namespace ::org::openoffice;
+-using namespace ::org::openoffice::excel::XlAxisCrosses;
+-using namespace ::org::openoffice::excel::XlAxisType;
+-using namespace ::org::openoffice::excel::XlScaleType;
 +using namespace ::ooo::vba;
- using namespace ::com::sun::star;
++using namespace ::ooo::vba::excel::XlAxisCrosses;
++using namespace ::ooo::vba::excel::XlAxisType;
++using namespace ::ooo::vba::excel::XlScaleType;
  
--ScVbaComment::ScVbaComment( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ) throw( lang::IllegalArgumentException )
-+ScVbaComment::ScVbaComment( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ) throw( lang::IllegalArgumentException )
- : ScVbaComment_BASE( xParent, xContext ), mxRange( xRange )
+ const rtl::OUString ORIGIN( RTL_CONSTASCII_USTRINGPARAM("Origin") );
+ const rtl::OUString AUTOORIGIN( RTL_CONSTASCII_USTRINGPARAM("AutoOrigin") );
+-const rtl::OUString MIN( RTL_CONSTASCII_USTRINGPARAM("AutoOrigin") );
+-const rtl::OUString MAX( RTL_CONSTASCII_USTRINGPARAM("AutoOrigin") );
++const rtl::OUString VBA_MIN( RTL_CONSTASCII_USTRINGPARAM("Max") );
++const rtl::OUString VBA_MAX( RTL_CONSTASCII_USTRINGPARAM("Min") );
+ ScVbaChart* 
+ ScVbaAxis::getChartPtr() throw( uno::RuntimeException )
  {
- 	if  ( !xRange.is() )
-@@ -103,7 +103,7 @@ ScVbaComment::getCommentByIndex( sal_Int32 Index ) throw (uno::RuntimeException)
+@@ -63,7 +63,7 @@
+ 	return sal_True;
+ }
+ 
+-ScVbaAxis::ScVbaAxis( const uno::Reference< vba::XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup  ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False ) 
++ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup  ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False ) 
  {
- 	uno::Reference< container::XIndexAccess > xIndexAccess( getAnnotations(), uno::UNO_QUERY_THROW );
- 	// parent is sheet ( parent of the range which is the parent of the comment )
--	uno::Reference< vba::XCollection > xColl(  new ScVbaComments( getParent()->getParent(), mxContext, xIndexAccess ) );
-+	uno::Reference< XCollection > xColl(  new ScVbaComments( getParent()->getParent(), mxContext, xIndexAccess ) );
+ 	oShapeHelper.reset( new ShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, uno::UNO_QUERY ) ) );
+ 	moChartParent.set( xParent, uno::UNO_QUERY_THROW  );
+@@ -78,7 +78,7 @@
+ 	xComponent->dispose();
+ }
  
- 	return uno::Reference< excel::XComment > ( xColl->Item( uno::makeAny( Index ), uno::Any() ), uno::UNO_QUERY_THROW );
-  }
-@@ -213,7 +213,7 @@ ScVbaComment::getServiceNames()
+- uno::Reference< ::org::openoffice::excel::XAxisTitle > SAL_CALL 
++ uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL 
+ ScVbaAxis::getAxisTitle(  ) throw (script::BasicErrorException, uno::RuntimeException)
+ {
+ 	uno::Reference< excel::XAxisTitle > xAxisTitle;
+@@ -137,12 +137,12 @@
+ 				bCrossesAreCustomized = sal_False;
+ 				return;
+ 			case xlAxisCrossesMinimum:                     // The axis crosses at the minimum value. 
+-				mxPropertySet->getPropertyValue(MIN) >>= fNum;
++				mxPropertySet->getPropertyValue(VBA_MIN) >>= fNum;
+ 				setCrossesAt( fNum );
+ 				bCrossesAreCustomized = sal_False;
+ 				break;
+ 			case xlAxisCrossesMaximum:                     // The axis crosses at the maximum value. 
+-				mxPropertySet->getPropertyValue(MAX) >>= fNum;
++				mxPropertySet->getPropertyValue(VBA_MAX) >>= fNum;
+ 				setCrossesAt(fNum);
+ 				bCrossesAreCustomized = sal_False;
+ 				break;
+@@ -177,7 +177,7 @@
+ 				mxPropertySet->getPropertyValue(ORIGIN) >>= forigin;
+ //obsolete      double fmax = AnyConverter.toDouble(mxPropertySet.getPropertyValue("Max"));
+ 				double fmin = 0.0;
+-				mxPropertySet->getPropertyValue(MIN) >>= fmin;
++				mxPropertySet->getPropertyValue(VBA_MIN) >>= fmin;
+ 				if (forigin == fmin)
+ 					nCrosses = xlAxisCrossesMinimum;
+ 				else
+@@ -666,7 +666,7 @@
  	if ( aServiceNames.getLength() == 0 )
  	{
  		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.ScVbaComment" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ScVbaComment" ) );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Axis" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Axis" ) );
  	}
  	return aServiceNames;
  }
-diff --git sc/source/ui/vba/vbacomment.hxx sc/source/ui/vba/vbacomment.hxx
-index f1d469f..8baae1c 100644
---- sc/source/ui/vba/vbacomment.hxx
-+++ sc/source/ui/vba/vbacomment.hxx
-@@ -32,8 +32,8 @@
- 
- #include <cppuhelper/implbase1.hxx>
+Index: sc/source/ui/vba/vbashape.hxx
+===================================================================
+--- sc/source/ui/vba/vbashape.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbashape.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,38 +30,39 @@
+ #ifndef SC_VBA_SHAPE_HXX
+ #define SC_VBA_SHAPE_HXX
  
--#include <org/openoffice/excel/XComment.hpp>
--#include <org/openoffice/excel/XApplication.hpp>
-+#include <ooo/vba/excel/XComment.hpp>
-+#include <ooo/vba/excel/XApplication.hpp>
- #include <com/sun/star/sheet/XSheetAnnotations.hpp>
- #include <com/sun/star/sheet/XSheetAnnotation.hpp>
- #include <com/sun/star/table/XCellRange.hpp>
-@@ -41,7 +41,7 @@
+-#include <org/openoffice/office/MsoShapeType.hpp>
++#include <ooo/vba/office/MsoShapeType.hpp>
+ #include <com/sun/star/drawing/XShape.hpp>
+ #include <com/sun/star/drawing/XShapes.hpp>
+ #include <com/sun/star/lang/XEventListener.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+-#include <org/openoffice/msforms/XShape.hpp>
+-#include <org/openoffice/msforms/XLineFormat.hpp>
++#include <ooo/vba/msforms/XShape.hpp>
++#include <ooo/vba/msforms/XLineFormat.hpp>
+ #include <cppuhelper/implbase2.hxx>
  
  #include "vbahelperinterface.hxx"
  
--typedef InheritedHelperInterfaceImpl1< oo::excel::XComment > ScVbaComment_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XComment > ScVbaComment_BASE;
+-typedef  ::cppu::WeakImplHelper2< oo::msforms::XShape, css::lang::XEventListener > ListeningShape;
++typedef  ::cppu::WeakImplHelper2< ov::msforms::XShape, css::lang::XEventListener > ListeningShape;
  
- class ScVbaComment : public ScVbaComment_BASE
+ typedef InheritedHelperInterfaceImpl< ListeningShape > ScVbaShape_BASE;
+ 
+ class ScVbaShape : public ScVbaShape_BASE
  {
-@@ -51,9 +51,9 @@ private:
- 	css::uno::Reference< css::sheet::XSheetAnnotation > SAL_CALL getAnnotation() throw (css::uno::RuntimeException);
- 	css::uno::Reference< css::sheet::XSheetAnnotations > SAL_CALL getAnnotations() throw (css::uno::RuntimeException);
- 	sal_Int32 SAL_CALL getAnnotationIndex() throw (css::uno::RuntimeException);
--	css::uno::Reference< oo::excel::XComment > SAL_CALL getCommentByIndex( sal_Int32 Index ) throw (css::uno::RuntimeException);
-+	css::uno::Reference< ov::excel::XComment > SAL_CALL getCommentByIndex( sal_Int32 Index ) throw (css::uno::RuntimeException);
++friend class ConcreteXShapeHelper; // perhaps an accessor would be better
+ private:
++protected:
+     css::uno::Reference< css::drawing::XShape > m_xShape;
+     css::uno::Reference< css::drawing::XShapes > m_xShapes;
+     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
+     sal_Int32 m_nType;
+     css::uno::Any m_aRange;
+-protected:
+ 	virtual void addListeners();
+ 	virtual void removeShapeListener() throw( css::uno::RuntimeException );
+ 	virtual void removeShapesListener() throw( css::uno::RuntimeException );
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
  public:
--    ScVbaComment( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::lang::IllegalArgumentException );
-+    ScVbaComment( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::lang::IllegalArgumentException );
- 
-     virtual ~ScVbaComment() {}
- 
-@@ -65,8 +65,8 @@ public:
+-    ScVbaShape( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape, const css::uno::Reference< css::drawing::XShapes > xShapes, sal_Int32 nType ) throw ( css::lang::IllegalArgumentException );
+-    ScVbaShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape ) throw ( css::lang::IllegalArgumentException );
++    ScVbaShape( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, sal_Int32 nType ) throw ( css::lang::IllegalArgumentException );
++    ScVbaShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape ) throw ( css::lang::IllegalArgumentException );
+     virtual ~ScVbaShape();
+     css::uno::Any getRange() { return m_aRange; };
+     void setRange( css::uno::Any aRange ) { m_aRange = aRange; };
+@@ -85,12 +86,12 @@
+     virtual sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
+     virtual double SAL_CALL getRotation() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setRotation( double _rotation ) throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::msforms::XLineFormat > SAL_CALL getLine() throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::msforms::XFillFormat > SAL_CALL getFill() throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::msforms::XPictureFormat > SAL_CALL getPictureFormat() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::msforms::XLineFormat > SAL_CALL getLine() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::msforms::XFillFormat > SAL_CALL getFill() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::msforms::XPictureFormat > SAL_CALL getPictureFormat() throw (css::uno::RuntimeException);
  
      // Methods
+-    virtual css::uno::Reference< oo::excel::XTextFrame > SAL_CALL TextFrame(  ) throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::excel::XTextFrame > SAL_CALL TextFrame(  ) throw (css::uno::RuntimeException);
      virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::excel::XComment > SAL_CALL Next() throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::excel::XComment > SAL_CALL Previous() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Next() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Previous() throw (css::uno::RuntimeException);
-     virtual rtl::OUString SAL_CALL Text( const css::uno::Any& Text, const css::uno::Any& Start, const css::uno::Any& Overwrite ) throw (css::uno::RuntimeException);
-     // XHelperInterface
-     virtual rtl::OUString& getServiceImplName();
-diff --git sc/source/ui/vba/vbacomments.cxx sc/source/ui/vba/vbacomments.cxx
-index c5558cb..538f88a 100644
---- sc/source/ui/vba/vbacomments.cxx
-+++ sc/source/ui/vba/vbacomments.cxx
-@@ -34,7 +34,7 @@
- 
- #include "vbaglobals.hxx"
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
- uno::Any AnnotationToComment( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext )
-@@ -44,7 +44,7 @@ uno::Any AnnotationToComment( const uno::Any& aSource, uno::Reference< uno::XCom
- 	uno::Reference< table::XCellRange > xCellRange( xChild->getParent(), uno::UNO_QUERY_THROW );
- 
- 	// #FIXME needs to find the correct Parent
--	return uno::makeAny( uno::Reference< excel::XComment > ( new ScVbaComment( uno::Reference< vba::XHelperInterface >(), xContext, xCellRange ) ) );
-+	return uno::makeAny( uno::Reference< excel::XComment > ( new ScVbaComment( uno::Reference< XHelperInterface >(), xContext, xCellRange ) ) );
- }
- 
- class CommentEnumeration : public EnumerationHelperImpl
-@@ -59,7 +59,7 @@ public:
- 
- };
- 
--ScVbaComments::ScVbaComments( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  )
-+ScVbaComments::ScVbaComments( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  )
- : ScVbaComments_BASE( xParent, xContext, xIndexAccess )
+     virtual void SAL_CALL ZOrder( sal_Int32 ZOrderCmd ) throw (css::uno::RuntimeException);
+     virtual void SAL_CALL IncrementRotation( double Increment ) throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/service.cxx
+===================================================================
+--- sc/source/ui/vba/service.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/service.cxx	(.../cws/npower11)	(revision 266650)
+@@ -53,13 +53,23 @@
  {
+ extern sdecl::ServiceDecl const serviceDecl;
  }
-@@ -100,7 +100,7 @@ ScVbaComments::getServiceNames()
- 	if ( sNames.getLength() == 0 )
- 	{
- 		sNames.realloc( 1 );
--		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Comments") );
-+		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Comments") );
- 	}
- 	return sNames;
++namespace window 
++{
++extern sdecl::ServiceDecl const serviceDecl;
++}
+ namespace globals
+ {
+ extern sdecl::ServiceDecl const serviceDecl;
  }
-diff --git sc/source/ui/vba/vbacomments.hxx sc/source/ui/vba/vbacomments.hxx
-index ababb6f..0f9d740 100644
---- sc/source/ui/vba/vbacomments.hxx
-+++ sc/source/ui/vba/vbacomments.hxx
-@@ -32,18 +32,18 @@
++namespace  userform
++{
++extern sdecl::ServiceDecl const serviceDecl;
++}
++namespace hyperlink 
++{
++extern sdecl::ServiceDecl const serviceDecl;
++}
  
- #include <cppuhelper/implbase1.hxx>
+-
+-
+ extern "C"
+ {
+     SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( 
+@@ -76,7 +86,7 @@
  
--#include <org/openoffice/excel/XComments.hpp>
-+#include <ooo/vba/excel/XComments.hpp>
+ 	// Component registration
+         if ( component_writeInfoHelper( pServiceManager, pRegistryKey, 
+-		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl ) )
++		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl ) )
+ 		{
+ 			// Singleton registration
+ 			try
+@@ -85,9 +95,9 @@
+ 					reinterpret_cast< registry::XRegistryKey * >(pRegistryKey);
+ 
+ 				Reference< registry::XRegistryKey >xKey = pKey->createKey(
+-					rtl::OUString::createFromAscii( ("org.openoffice.vba.Globals/UNO/SINGLETONS/org.openoffice.vba.theGlobals") ) );
++					rtl::OUString::createFromAscii( ("ooo.vba.Globals/UNO/SINGLETONS/ooo.vba.theGlobals") ) );
+ 				xKey->setStringValue( ::rtl::OUString::createFromAscii( 
+-					("org.openoffice.vba.Globals") ) );
++					("ooo.vba.Globals") ) );
+ 				return sal_True;
+ 			}
+ 			catch( uno::Exception& /*e*/ )
+@@ -104,7 +114,7 @@
+     {
+ 		OSL_TRACE("In component_getFactory for %s", pImplName );
+ 	void* pRet =  component_getFactoryHelper(
+-        	pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl );
++        	pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl );
+ 	OSL_TRACE("Ret is 0x%x", pRet);
+ 	return pRet;
+     }
+Index: sc/source/ui/vba/vbauserform.hxx
+===================================================================
+--- sc/source/ui/vba/vbauserform.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbauserform.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,78 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_USERFORM_HXX
++#define SC_VBA_USERFORM_HXX
++
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/msforms/XUserForm.hpp>
++#include <com/sun/star/awt/XDialog.hpp>
++#include <com/sun/star/frame/XModel.hpp>
++
++#include "vbahelperinterface.hxx"
++#include "vbacontrol.hxx"
++
++//typedef InheritedHelperInterfaceImpl1< ov::msforms::XUserForm > ScVbaUserForm_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XUserForm > ScVbaUserForm_BASE;
++
++class ScVbaUserForm : public ScVbaUserForm_BASE
++{
++private:
++    css::uno::Reference< css::awt::XDialog > m_xDialog;
++    ScDocShell* m_pDocShell;
++    bool mbDispose;
++protected:
++public:
++    ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
++    virtual ~ScVbaUserForm();
++    // XUserForm
++    virtual void SAL_CALL RePaint(  ) throw (css::uno::RuntimeException);
++    virtual void SAL_CALL Show(  ) throw (css::uno::RuntimeException);
++    // XIntrospection
++    virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection(  ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
++    virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
++    virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
++    virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
++    virtual ::rtl::OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException);
++    virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException);
++    virtual void SAL_CALL Hide(  ) throw (css::uno::RuntimeException);
++    virtual void SAL_CALL UnloadObject(  ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& index ) throw (css::uno::RuntimeException);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif
+Index: sc/source/ui/vba/vbanames.hxx
+===================================================================
+--- sc/source/ui/vba/vbanames.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbanames.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,13 +30,13 @@
+ #ifndef SC_VBA_NAMES_HXX
+ #define SC_VBA_NAMES_HXX
  
- #include "vbahelper.hxx"
+-#include <org/openoffice/excel/XNames.hpp>
+-#include <org/openoffice/vba/XCollection.hpp>
++#include <ooo/vba/excel/XNames.hpp>
++#include <ooo/vba/XCollection.hpp>
+ #include <com/sun/star/container/XEnumerationAccess.hpp>
+ #include <com/sun/star/sheet/XNamedRanges.hpp>
  #include "vbacollectionimpl.hxx"
- #include "vbacomment.hxx"
  
--typedef CollTestImplHelper< oo::excel::XComments > ScVbaComments_BASE;
-+typedef CollTestImplHelper< ov::excel::XComments > ScVbaComments_BASE;
+-typedef CollTestImplHelper< oo::excel::XNames > ScVbaNames_BASE;
++typedef CollTestImplHelper< ov::excel::XNames > ScVbaNames_BASE;
  
- class ScVbaComments : public ScVbaComments_BASE
+ class ScVbaNames : public ScVbaNames_BASE
  {
- public:
--    ScVbaComments( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
-+    ScVbaComments( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
- 
-     virtual ~ScVbaComments() {}
- 
-diff --git sc/source/ui/vba/vbacondition.cxx sc/source/ui/vba/vbacondition.cxx
-index d893bb5..4ffc313 100644
---- sc/source/ui/vba/vbacondition.cxx
-+++ sc/source/ui/vba/vbacondition.cxx
-@@ -29,18 +29,18 @@
-  ************************************************************************/
- 
- #include "vbacondition.hxx"
--#include <org/openoffice/excel/XlFormatConditionOperator.hpp>
--#include <org/openoffice/excel/XFormatCondition.hpp>
-+#include <ooo/vba/excel/XlFormatConditionOperator.hpp>
-+#include <ooo/vba/excel/XFormatCondition.hpp>
- #include <com/sun/star/table/XCellRange.hpp>
- #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
- const sal_Int32 ISFORMULA = 98765432;
+@@ -47,7 +47,7 @@
+ 	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
  
- template< typename Ifc1 >
--ScVbaCondition< Ifc1 >::ScVbaCondition(  const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetCondition >& _xSheetCondition ) : ScVbaCondition_BASE( xParent, xContext ), mxSheetCondition( _xSheetCondition )
-+ScVbaCondition< Ifc1 >::ScVbaCondition(  const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetCondition >& _xSheetCondition ) : ScVbaCondition_BASE( xParent, xContext ), mxSheetCondition( _xSheetCondition )
- {
- 	mxAddressable.set( xParent, uno::UNO_QUERY_THROW ); 
- }
-diff --git sc/source/ui/vba/vbacondition.hxx sc/source/ui/vba/vbacondition.hxx
-index abb5124..9f01951 100644
---- sc/source/ui/vba/vbacondition.hxx
-+++ sc/source/ui/vba/vbacondition.hxx
-@@ -42,7 +42,7 @@ protected:
- 	css::uno::Reference< css::sheet::XCellRangeAddressable > mxAddressable;
- 	css::uno::Reference< css::sheet::XSheetCondition > mxSheetCondition;
  public:
--	ScVbaCondition(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition );
-+	ScVbaCondition(  const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition );
- 
- 	static css::sheet::ConditionOperator retrieveAPIOperator( const css::uno::Any& _aOperator) throw ( css::script::BasicErrorException );
- 
-diff --git sc/source/ui/vba/vbacontrol.cxx sc/source/ui/vba/vbacontrol.cxx
-index da36487..a84703c 100644
---- sc/source/ui/vba/vbacontrol.cxx
-+++ sc/source/ui/vba/vbacontrol.cxx
-@@ -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,48 @@
- #include "vbatextbox.hxx"
- #include "vbaradiobutton.hxx"
- #include "vbalistbox.hxx"
-+#include "vbatogglebutton.hxx"
-+#include "vbacheckbox.hxx"
-+#include "vbaframe.hxx"
-+#include "vbascrollbar.hxx"
-+#include "vbaprogressbar.hxx"
-+#include "vbamultipage.hxx"
-+#include "vbaspinbutton.hxx"
-+#include "vbaimage.hxx"
- 
- 
- using namespace com::sun::star;
--using namespace org::openoffice;
--
--sal_Int32 pt2mm( double pt );
--double mm2pt( sal_Int32 mm );
-+using namespace ooo::vba;
- 
- uno::Reference< css::awt::XWindowPeer > 
--ScVbaControl::getWindowPeer( const uno::Reference< ::drawing::XControlShape >& xControlShape ) throw (uno::RuntimeException)
--{
--    uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), 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;
-+ScVbaControl::getWindowPeer() throw (uno::RuntimeException)
+-	ScVbaNames( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
++	ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
+ 	
+ 	ScDocument* getScDocument();
+ 	ScDocShell* getScDocShell();
+Index: sc/source/ui/vba/vbacommandbarcontrol.hxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbarcontrol.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacommandbarcontrol.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,90 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_COMMANDBARCONTROL_HXX
++#define SC_VBA_COMMANDBARCONTROL_HXX
++
++#include <ooo/vba/XCommandBarControl.hpp>
++
++#include "vbahelperinterface.hxx"
++#include "vbacommandbarcontrols.hxx"
++
++typedef InheritedHelperInterfaceImpl1< ov::XCommandBarControl > CommandBarControl_BASE;
++
++class ScVbaCommandBarControl : public CommandBarControl_BASE
 +{
-+    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
++private:
++    rtl::OUString       m_sName;
++    rtl::OUString       m_sBarName;
++    rtl::OUString       m_sCommand;
++    sal_Int32           m_nType;
++    sal_Int32           m_nPosition;
++    sal_Bool            m_bTemporary;
++    sal_Bool            m_bIsMenu;
++    ScVbaCommandBarControls*        m_pCommandBarControls;
++    css::uno::Reference< ov::XHelperInterface >               m_xParentHardRef;
++    css::uno::Reference< css::ui::XUIConfigurationManager >         m_xUICfgManager;
++    css::uno::Reference< css::ui::XUIConfigurationPersistence >     m_xUICfgPers;
++    css::uno::Reference< css::container::XIndexContainer >          m_xBarSettings;
++    css::uno::Reference< css::container::XIndexContainer >          m_xCurrentSettings;
++    css::beans::PropertyValues                                      m_aPropertyValues;
++    
++    void initObjects() throw (css::uno::RuntimeException);
++    void createNewMenuBarControl();
++    void createNewToolBarControl();
++public:
++    ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sName ) throw (css::uno::RuntimeException);
++    ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sName, rtl::OUString sCommand, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException);
++    sal_Int32 GetPosition() { return m_nPosition; };
++    css::uno::Reference< css::container::XIndexContainer > GetCurrentSettings() { return m_xCurrentSettings; };
++    css::beans::PropertyValues GetPropertyValues() { return m_aPropertyValues; };
++    void SetPropertyValues( css::beans::PropertyValues aPropertyValues ) { m_aPropertyValues = aPropertyValues; };
++    
++    // Attributes
++    virtual ::rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (css::uno::RuntimeException);
++    virtual ::rtl::OUString SAL_CALL getOnAction() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setOnAction( const ::rtl::OUString& _onaction ) throw (css::uno::RuntimeException);
++    virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
 +
-+    uno::Reference< awt::XControlModel > xControlModel;
-+    uno::Reference< css::awt::XWindowPeer >  xWinPeer;
-+    if ( !xControlShape.is() ) 
-+    { 
-+        // would seem to be a Userform control
-+        uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY_THROW );
-+        xWinPeer =  xControl->getPeer();
-+	return xWinPeer;
-+    }
-+    // form control
-+    xControlModel.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
++    // Methods
++    virtual void SAL_CALL Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
 +
-+    uno::Reference< view::XControlAccess > xControlAccess( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
-     try
-     {
--        xControl.set( xControlAccess->getControl( xControlModel ), uno::UNO_QUERY );
-+        uno::Reference< awt::XControl > xControl( xControlAccess->getControl( xControlModel ), uno::UNO_QUERY );
-+        xWinPeer =  xControl->getPeer();
-     }
-     catch( uno::Exception )
-     {
-         throw uno::RuntimeException( rtl::OUString::createFromAscii( "The Control does not exsit" ),
-                 uno::Reference< uno::XInterface >() );
-     }
--    return xControl->getPeer();
-+    return xWinPeer;
- }
- 
- //ScVbaControlListener
-@@ -106,67 +125,44 @@ ScVbaControlListener::disposing( const lang::EventObject& ) throw( uno::RuntimeE
- 
- //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< 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 );
--    uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
--    m_xProps.set( xProps, uno::UNO_QUERY_THROW );
-     //add listener
-     m_xEventListener.set( new ScVbaControlListener( this ) );
--    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
-+    setGeometryHelper( pGeomHelper );
-+    uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
-     xComponent->addEventListener( m_xEventListener );
-+   
-+    //init m_xProps
-+    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY ) ;
-+    uno::Reference< awt::XControl> xUserFormControl( m_xControl, uno::UNO_QUERY ) ;
-+    if ( xControlShape.is() ) // form control
-+        m_xProps.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
-+    else if ( xUserFormControl.is() ) // userform control
-+        m_xProps.set( xUserFormControl->getModel(), uno::UNO_QUERY_THROW );
- }
- 
- ScVbaControl::~ScVbaControl()
- {
--    if( m_xControlShape.is() )
-+    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 );
-     }
- }
- 
--void ScVbaControl::removeResouce() throw( uno::RuntimeException )
--{
--    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
--    xComponent->removeEventListener( m_xEventListener );
--    m_xControlShape = NULL;
--    m_xProps = NULL;
--}
--
--
--ScVbaControl::ScVbaControl( 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 )
--{
--    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 )
- {
--    m_xEventListener.set( new ScVbaControlListener( this ) );
--    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
--    m_xContext.set( xContext, uno::UNO_QUERY_THROW );
--    m_xControlShape.set( xControlShape, uno::UNO_QUERY_THROW );
--    //init m_xProps
--    uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
--    uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
--    m_xProps = xProps;
-+    mpGeometryHelper.reset( pHelper );
- }
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif//SC_VBA_COMMANDBARCONTROL_HXX
+Index: sc/source/ui/vba/vbaaxistitle.hxx
+===================================================================
+--- sc/source/ui/vba/vbaaxistitle.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaaxistitle.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,14 +32,14 @@
  
--void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext, 
--        const uno::Reference< beans::XPropertySet > xProps, 
--        const uno::Reference< drawing::XControlShape > xControlShape )
-+void ScVbaControl::removeResouce() throw( uno::RuntimeException )
- {
--    m_xEventListener.set( new ScVbaControlListener( this ) );
--    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
--    m_xContext.set( xContext, uno::UNO_QUERY_THROW );
--    m_xProps.set( xProps, uno::UNO_QUERY_THROW );
--    m_xControlShape.set( xControlShape, uno::UNO_QUERY_THROW );
-+    uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
-+    xComponent->removeEventListener( m_xEventListener );
-+    m_xControl= NULL;
-+    m_xProps = NULL;
- }
+ #include "vbatitle.hxx"
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/excel/XAxisTitle.hpp>
++#include <ooo/vba/excel/XAxisTitle.hpp>
  
- //In design model has different behavior
-@@ -189,132 +185,283 @@ void SAL_CALL ScVbaControl::setEnabled( sal_Bool bVisible ) throw (uno::RuntimeE
+-typedef  TitleImpl< cppu::WeakImplHelper1< oo::excel::XAxisTitle > > AxisTitleBase;
++typedef  TitleImpl< cppu::WeakImplHelper1< ov::excel::XAxisTitle > > AxisTitleBase;
  
- sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException)
+ class ScVbaAxisTitle : public AxisTitleBase
  {
--    uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer( m_xControlShape ), uno::UNO_QUERY_THROW );
-+    uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer(), uno::UNO_QUERY_THROW );
-     return xWindow2->isVisible();
- }
+ public:
+-        ScVbaAxisTitle( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape );
++        ScVbaAxisTitle( const css::uno::Reference< ov::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape );
+         // XHelperInterface
+         virtual rtl::OUString& getServiceImplName();
+         virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+Index: sc/source/ui/vba/vbacharacters.cxx
+===================================================================
+--- sc/source/ui/vba/vbacharacters.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacharacters.cxx	(.../cws/npower11)	(revision 266650)
+@@ -33,10 +33,10 @@
+ #include "vbafont.hxx"
  
- void SAL_CALL ScVbaControl::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
- {
--    uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer( m_xControlShape ), uno::UNO_QUERY_THROW );
-+    uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer(), uno::UNO_QUERY_THROW );
-     xWindow2->setVisible( bVisible );
- }
- double SAL_CALL ScVbaControl::getHeight() throw (uno::RuntimeException)
- {
--    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
--    return mm2pt( xShape->getSize().Height ) / 100;
-+    return mpGeometryHelper->getHeight();
- }
- void SAL_CALL ScVbaControl::setHeight( double _height ) throw (uno::RuntimeException)
- {
--    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
--    awt::Size aSize( xShape->getSize() );
--    aSize.Height = pt2mm( _height ) * 100;
--    xShape->setSize( aSize );
-+    mpGeometryHelper->setHeight( _height );
- }
  
- double SAL_CALL ScVbaControl::getWidth() throw (uno::RuntimeException)
- {
--    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
--    return mm2pt( xShape->getSize().Width ) / 100;
-+    return mpGeometryHelper->getWidth();
- }
- void SAL_CALL ScVbaControl::setWidth( double _width ) throw (uno::RuntimeException)
- {
--    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
--    awt::Size aSize( xShape->getSize() );
--    aSize.Width = pt2mm( _width ) * 100;
--    xShape->setSize( aSize );
-+    mpGeometryHelper->setWidth( _width );
- }
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
  
- double SAL_CALL
- ScVbaControl::getLeft() throw (uno::RuntimeException)
+-ScVbaCharacters::ScVbaCharacters( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const uno::Reference< text::XSimpleText>& xRange,const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool Replace  ) throw ( css::lang::IllegalArgumentException ) : ScVbaCharacters_BASE( xParent, xContext ), m_xSimpleText(xRange), m_aPalette( dPalette),  nLength(-1), nStart(1), bReplace( Replace )
++ScVbaCharacters::ScVbaCharacters( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const uno::Reference< text::XSimpleText>& xRange,const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool Replace  ) throw ( css::lang::IllegalArgumentException ) : ScVbaCharacters_BASE( xParent, xContext ), m_xSimpleText(xRange), m_aPalette( dPalette),  nLength(-1), nStart(1), bReplace( Replace )
  {
--    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
--    return mm2pt( xShape->getPosition().X / 100 );
-+    return mpGeometryHelper->getLeft();
+ 	Start >>= nStart;
+ 	if ( nStart < 1 )
+@@ -46,7 +46,12 @@
+ 	uno::Reference< text::XTextCursor > xTextCursor( m_xSimpleText->createTextCursor(), uno::UNO_QUERY_THROW );
+ 	xTextCursor->collapseToStart();
+ 	if ( nStart )
++	{
++		if ( ( nStart + 1 ) > m_xSimpleText->getString().getLength() )
++			//nStart = m_xSimpleText->getString().getLength();
++			xTextCursor->gotoEnd( sal_False );
+ 		xTextCursor->goRight( nStart, sal_False );
++	}
+ 	if ( nLength < 0 ) // expand to end
+ 		xTextCursor->gotoEnd( sal_True );
+ 	else
+@@ -127,7 +132,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Characters" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Characters" ) );
+ 	}
+ 	return aServiceNames;
  }
+Index: sc/source/ui/vba/vbapropvalue.hxx
+===================================================================
+--- sc/source/ui/vba/vbapropvalue.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapropvalue.hxx	(.../cws/npower11)	(revision 266650)
+@@ -29,12 +29,12 @@
+  ************************************************************************/
+ #ifndef SC_VBA_PROPVALULE_HXX
+ #define SC_VBA_PROPVALULE_HXX
+-#include <org/openoffice/vba/XPropValue.hpp>
++#include <ooo/vba/XPropValue.hpp>
+ #include <cppuhelper/implbase1.hxx>
  
- void SAL_CALL
- ScVbaControl::setLeft( double _left ) throw (uno::RuntimeException)
- {
--    awt::Point oldPosition;
--    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
--    oldPosition = xShape->getPosition();
--    oldPosition.X = pt2mm( _left ) * 100;
--    xShape->setPosition( oldPosition );
-+    mpGeometryHelper->setLeft( _left );
- 
- }
+ #include "vbahelper.hxx"
  
- double SAL_CALL
- ScVbaControl::getTop() throw (uno::RuntimeException)
- {
--    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
--    return mm2pt( xShape->getPosition().Y / 100 );
-+    return mpGeometryHelper->getTop();
- }
+-typedef ::cppu::WeakImplHelper1< oo::vba::XPropValue > PropValueImpl_BASE;
++typedef ::cppu::WeakImplHelper1< ov::XPropValue > PropValueImpl_BASE;
  
- void SAL_CALL
- ScVbaControl::setTop( double _top ) throw (uno::RuntimeException)
+ class PropListener 
  {
--    awt::Point oldPosition;
--    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
--    oldPosition = xShape->getPosition();
--    oldPosition.Y = pt2mm( _top ) * 100;;
--    xShape->setPosition( oldPosition );
-+    mpGeometryHelper->setTop( _top );
- }
+Index: sc/source/ui/vba/vbastyles.cxx
+===================================================================
+--- sc/source/ui/vba/vbastyles.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbastyles.cxx	(.../cws/npower11)	(revision 266650)
+@@ -30,12 +30,12 @@
+ #include "vbastyles.hxx"
+ #include "vbastyle.hxx"
  
--//ScVbaControlFactory
-+uno::Reference< uno::XInterface > SAL_CALL
-+ScVbaControl::getObject() throw (uno::RuntimeException)
-+{
-+	uno::Reference< msforms::XControl > xRet( this );
-+	return xRet;
-+}
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
  
--ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XControlShape >& xControlShape ): m_xContext( xContext ), m_xControlShape( xControlShape )
-+void SAL_CALL ScVbaControl::SetFocus() throw (uno::RuntimeException) 
+ static rtl::OUString SDEFAULTCELLSTYLENAME( RTL_CONSTASCII_USTRINGPARAM("Default") );
+ css::uno::Any
+-lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel )
++lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel )
  {
--    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();
+ 	uno::Reference< beans::XPropertySet > xStyleProps( aObject, uno::UNO_QUERY_THROW );
+ 	uno::Reference< excel::XStyle > xStyle( new ScVbaStyle( xParent, xContext, xStyleProps, xModel ) ); 
+@@ -43,7 +43,7 @@
  }
  
--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 )
-+rtl::OUString SAL_CALL 
-+ScVbaControl::getControlSource() throw (uno::RuntimeException)
+ 
+-ScVbaStyles::ScVbaStyles( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException ) : ScVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( ScVbaStyle::getStylesNameContainer( xModel ), uno::UNO_QUERY_THROW ) ), mxModel( xModel ), mxParent( xParent )
++ScVbaStyles::ScVbaStyles( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException ) : ScVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( ScVbaStyle::getStylesNameContainer( xModel ), uno::UNO_QUERY_THROW ) ), mxModel( xModel ), mxParent( xParent )
  {
-+// #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
+ 	try
+ 	{    
+@@ -78,13 +78,13 @@
+ class EnumWrapper : public EnumerationHelper_BASE
+ {
+         uno::Reference<container::XIndexAccess > m_xIndexAccess;
+-        uno::Reference<vba::XHelperInterface > m_xParent;
++        uno::Reference<XHelperInterface > m_xParent;
+         uno::Reference<uno::XComponentContext > m_xContext;
+         uno::Reference<frame::XModel > m_xModel;
+ 
+         sal_Int32 nIndex;
+ public:
+-        EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference<vba::XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference<frame::XModel >& xModel ) : m_xIndexAccess( xIndexAccess ), m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel ), nIndex( 0 ) {}
++        EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference<XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference<frame::XModel >& xModel ) : m_xIndexAccess( xIndexAccess ), m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel ), nIndex( 0 ) {}
+         virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
+         {
+                 return ( nIndex < m_xIndexAccess->getCount() );
+@@ -178,7 +178,7 @@
+         if ( aServiceNames.getLength() == 0 )
+         {
+                 aServiceNames.realloc( 1 );
+-                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.XStyles" ) );
++                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XStyles" ) );
+         }
+         return aServiceNames;
  }
+Index: sc/source/ui/vba/vbaformatconditions.hxx
+===================================================================
+--- sc/source/ui/vba/vbaformatconditions.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaformatconditions.hxx	(.../cws/npower11)	(revision 266650)
+@@ -29,33 +29,33 @@
+  ************************************************************************/
+ #ifndef SC_VBA_FORMATCONDITIONS_HXX
+ #define SC_VBA_FORMATCONDITIONS_HXX
+-#include <org/openoffice/excel/XFormatConditions.hpp>
+-#include <org/openoffice/excel/XStyles.hpp>
+-#include <org/openoffice/excel/XRange.hpp>
++#include <ooo/vba/excel/XFormatConditions.hpp>
++#include <ooo/vba/excel/XStyles.hpp>
++#include <ooo/vba/excel/XRange.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ #include <com/sun/star/table/CellAddress.hpp>
+ #include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
+ #include "vbacollectionimpl.hxx"
  
--ScVbaControl* ScVbaControlFactory::createControl( const sal_Int16 nClassId )  throw (uno::RuntimeException)
-+void SAL_CALL 
-+ScVbaControl::setControlSource( const rtl::OUString& _controlsource ) throw (uno::RuntimeException)
+-typedef CollTestImplHelper< oo::excel::XFormatConditions > ScVbaFormatConditions_BASE;
++typedef CollTestImplHelper< ov::excel::XFormatConditions > ScVbaFormatConditions_BASE;
+ class ScVbaFormatConditions: public ScVbaFormatConditions_BASE
  {
--    switch( nClassId )
-+#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)
-     {
--        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 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 );
-+
-+			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& )
-+		{
-+}
-+	}
-+	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)
-+{
-+#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
-+}
-+
-+rtl::OUString SAL_CALL 
-+ScVbaControl::getName() throw (uno::RuntimeException)
-+{
-+	rtl::OUString sName;
-+	m_xProps->getPropertyValue
-+            (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) ) >>= sName;
-+	return sName;
+ 	css::table::CellAddress maCellAddress; 	
+ 	css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries;
+-	css::uno::Reference< oo::excel::XStyles > mxStyles;
+-	css::uno::Reference< oo::excel::XRange > mxRangeParent;
++	css::uno::Reference< ov::excel::XStyles > mxStyles;
++	css::uno::Reference< ov::excel::XRange > mxRangeParent;
+ 	css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet;
+ public:
+-	ScVbaFormatConditions( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntries >&, const css::uno::Reference< css::frame::XModel >&  );
++	ScVbaFormatConditions( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntries >&, const css::uno::Reference< css::frame::XModel >&  );
+ 	void notifyRange() throw ( css::script::BasicErrorException );
+-	virtual css::uno::Reference< oo::excel::XFormatCondition > Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2, const css::uno::Reference< oo::excel::XStyle >& _xCalcStyle ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XFormatCondition > Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2, const css::uno::Reference< ov::excel::XStyle >& _xCalcStyle ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	rtl::OUString getA1Formula(const css::uno::Any& _aFormula) throw ( css::script::BasicErrorException );
+ 	rtl::OUString getStyleName();
+ 	void removeFormatCondition( const rtl::OUString& _sStyleName, sal_Bool _bRemoveStyle) throw ( css::script::BasicErrorException );
+ 	css::uno::Reference< css::sheet::XSheetConditionalEntries > getSheetConditionalEntries() { return mxSheetConditionalEntries; }
+ 	// XFormatConditions
+ 	virtual void SAL_CALL Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XFormatCondition > SAL_CALL Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XFormatCondition > SAL_CALL Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	// XEnumerationAccess
+ 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);	
+Index: sc/source/ui/vba/vbaprogressbar.cxx
+===================================================================
+--- sc/source/ui/vba/vbaprogressbar.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaprogressbar.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,78 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "vbaprogressbar.hxx"
++#include <vector>
 +
-+}
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+void SAL_CALL
-+ScVbaControl::setName( const rtl::OUString& _name ) throw (uno::RuntimeException)
-+{
-+	m_xProps->setPropertyValue
-+            (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ), uno::makeAny( _name ) );
-+    }
-+//ScVbaControlFactory
++// uno servicename com.sun.star.awt.UnoControlProgressBarMode
++const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
 +
-+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)
++ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< ov::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 )
 +{
-+    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
-+    if ( xControlShape.is() ) // form controls
-+        return createControl( xControlShape, xParent );
-+    uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY );
-+    if ( !xControl.is() )
-+        throw uno::RuntimeException(); // really we should be more informative
-+    return createControl( xControl, xParent );
-+    
 +}
 +
-+ScVbaControl* ScVbaControlFactory::createControl(const uno::Reference< drawing::XControlShape >& xControlShape,  const uno::Reference< uno::XInterface >& /*xParent*/ )  throw (uno::RuntimeException)
++// Attributes
++uno::Any SAL_CALL 
++ScVbaProgressBar::getValue() throw (css::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") );
--    m_xProps->getPropertyValue( sClassId ) >>= nClassId;
-+    xProps->getPropertyValue( sClassId ) >>= nClassId;
-+    uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
-     switch( nClassId )
-     {
-         case form::FormComponentType::COMBOBOX:
--            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, 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, 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, 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, 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, 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, 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 support this Control Type." ), uno::Reference< uno::XInterface >() );
-+    }
++    return m_xProps->getPropertyValue( SVALUE );
 +}
 +
-+ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< awt::XControl >& xControl,  const uno::Reference< uno::XInterface >& xParent  )  throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
 +{
-+    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< 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, 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, 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, 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, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
-+        else
-+            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, 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, 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, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
-+    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") ) ) )
-+	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, 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, 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, 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, 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, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
-+    else
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
-+    return pControl;
- }
++    m_xProps->setPropertyValue( SVALUE,  _value );
++}
 +
 +rtl::OUString& 
-+ScVbaControl::getServiceImplName()
++ScVbaProgressBar::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControl") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
 +	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaControl::getServiceNames()
++ScVbaProgressBar::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Control" ) );
-+    }
-+	return aServiceNames;
-+}
-+
-+
-diff --git sc/source/ui/vba/vbacontrol.hxx sc/source/ui/vba/vbacontrol.hxx
-index e99c151..21c5de2 100644
---- sc/source/ui/vba/vbacontrol.hxx
-+++ sc/source/ui/vba/vbacontrol.hxx
-@@ -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>
-+#include <com/sun/star/awt/XControl.hpp>
- #include <com/sun/star/awt/XWindowPeer.hpp>
--#include <org/openoffice/msforms/XControl.hpp>
-+#include <ooo/vba/msforms/XControl.hpp>
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Label" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbaoleobjects.cxx
+===================================================================
+--- sc/source/ui/vba/vbaoleobjects.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaoleobjects.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,13 +31,13 @@
+ #include <com/sun/star/container/XEnumerationAccess.hpp>
+ #include <com/sun/star/drawing/XControlShape.hpp>
+ #include <com/sun/star/container/XNamed.hpp>
+-#include <org/openoffice/excel/XOLEObject.hpp>
++#include <ooo/vba/excel/XOLEObject.hpp>
+ 
+ #include "vbaoleobject.hxx"
+ #include "vbaoleobjects.hxx"
+ 
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ 
+ typedef ::cppu::WeakImplHelper1< container::XIndexAccess > XIndexAccess_BASE;
+ 
+@@ -85,12 +85,12 @@
+ class EnumWrapper : public EnumerationHelper_BASE
+ {
+ 
+-        uno::Reference<vba::XHelperInterface > m_xParent;
++        uno::Reference<XHelperInterface > m_xParent;
+         uno::Reference<uno::XComponentContext > m_xContext;
+         uno::Reference<container::XIndexAccess > m_xIndexAccess;
+         sal_Int32 nIndex;
+ public:
+-        EnumWrapper(  const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< container::XIndexAccess >& xIndexAccess ) :  m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
++        EnumWrapper(  const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< container::XIndexAccess >& xIndexAccess ) :  m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
+ 
+         virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
+         {
+@@ -102,7 +102,7 @@
+                 if ( nIndex < m_xIndexAccess->getCount() )
+ 		{
+ 			uno::Reference< drawing::XControlShape > xControlShape (  m_xIndexAccess->getByIndex( nIndex++ ), uno::UNO_QUERY_THROW );
+-        		return uno::makeAny( uno::Reference< oo::excel::XOLEObject >( new ScVbaOLEObject( m_xParent, m_xContext, xControlShape ) ) );
++        		return uno::makeAny( uno::Reference< ov::excel::XOLEObject >( new ScVbaOLEObject( m_xParent, m_xContext, xControlShape ) ) );
+ 		}
+                 throw container::NoSuchElementException();
+         }
+@@ -113,7 +113,7 @@
+ 	return new IndexAccessWrapper( xIndexAccess );
+ }
+ 
+-ScVbaOLEObjects::ScVbaOLEObjects( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
++ScVbaOLEObjects::ScVbaOLEObjects( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
+                 const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess )
+             : OLEObjectsImpl_BASE( xParent, xContext, oleObjectIndexWrapper( xIndexAccess  ) )
+ {
+@@ -131,7 +131,7 @@
+     {
+         uno::Reference< drawing::XControlShape > xControlShape( aSource, uno::UNO_QUERY_THROW );
+ 	// parent of OLEObject is the same parent as the collection ( e.g. the sheet )
+-        return uno::makeAny( uno::Reference< oo::excel::XOLEObject >( new ScVbaOLEObject( getParent(), mxContext, xControlShape ) ) );
++        return uno::makeAny( uno::Reference< ov::excel::XOLEObject >( new ScVbaOLEObject( getParent(), mxContext, xControlShape ) ) );
+     }
+     return uno::Any();
+ }
+@@ -166,7 +166,7 @@
+ uno::Type
+ ScVbaOLEObjects::getElementType() throw (uno::RuntimeException)
+ {
+-    return org::openoffice::excel::XOLEObject::static_type(0);
++    return ooo::vba::excel::XOLEObject::static_type(0);
+ }
+ rtl::OUString& 
+ ScVbaOLEObjects::getServiceImplName()
+@@ -182,7 +182,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.OLEObjects" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.OLEObjects" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbacharts.hxx
+===================================================================
+--- sc/source/ui/vba/vbacharts.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacharts.hxx	(.../cws/npower11)	(revision 266650)
+@@ -29,30 +29,30 @@
+  ************************************************************************/
+ #ifndef SC_VBA_CHARTS_HXX
+ #define SC_VBA_CHARTS_HXX
+-#include <org/openoffice/excel/XCharts.hpp>
++#include <ooo/vba/excel/XCharts.hpp>
+ #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+ #include"vbacollectionimpl.hxx"
+ #include "vbahelper.hxx"
+ #include <hash_map>
+ 
+-typedef CollTestImplHelper< oo::excel::XCharts > Charts_BASE;
++typedef CollTestImplHelper< ov::excel::XCharts > Charts_BASE;
+ 
+ class ScVbaCharts : public Charts_BASE
+ {		
+-	css::uno::Reference< oo::excel::XChart > xActiveChart;
++	css::uno::Reference< ov::excel::XChart > xActiveChart;
+ 	css::uno::Reference< css::sheet::XSpreadsheetDocument > xSpreadsheetDocument;
+ 	css::uno::Reference< css::lang::XComponent > xComponent;
+ public:
+-	ScVbaCharts( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext );
++	ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext );
+ 	// XCharts
+ 	virtual css::uno::Any SAL_CALL Add() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XChart > SAL_CALL getActiveChart(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getActiveChart(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	// XCollection
+ 	::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ 	// XEnumerationAccess
+ 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+ 	// XElementAccess
+-	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) { return oo::excel::XChart::static_type(0); }
++	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) { return ov::excel::XChart::static_type(0); }
+ 	// ScVbaCollectionBaseImpl	
+ 	virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); 
+ 	// Charts_BASE or HelperInterface
+Index: sc/source/ui/vba/vbapivotcache.hxx
+===================================================================
+--- sc/source/ui/vba/vbapivotcache.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapivotcache.hxx	(.../cws/npower11)	(revision 266650)
+@@ -33,16 +33,16 @@
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/sheet/XDataPilotTable.hpp>
+ 
+-#include <org/openoffice/excel/XPivotCache.hpp>
++#include <ooo/vba/excel/XPivotCache.hpp>
+ #include "vbahelperinterface.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1<oo::excel::XPivotCache > PivotCacheImpl_BASE;
++typedef InheritedHelperInterfaceImpl1<ov::excel::XPivotCache > PivotCacheImpl_BASE;
+ 
+ class ScVbaPivotCache : public PivotCacheImpl_BASE
+ {		
+ 	css::uno::Reference< css::sheet::XDataPilotTable > m_xTable;
+ public:
+-	ScVbaPivotCache( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable );
++	ScVbaPivotCache( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable );
+ 	virtual void SAL_CALL Refresh() throw (css::uno::RuntimeException);
+ 	// XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+Index: sc/source/ui/vba/vbapalette.cxx
+===================================================================
+--- sc/source/ui/vba/vbapalette.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapalette.cxx	(.../cws/npower11)	(revision 266650)
+@@ -33,7 +33,7 @@
+ 
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+ /** Standard EGA colors, bright. */
+ #define EXC_PALETTE_EGA_COLORS_LIGHT \
+Index: sc/source/ui/vba/vbawsfunction.cxx
+===================================================================
+--- sc/source/ui/vba/vbawsfunction.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbawsfunction.cxx	(.../cws/npower11)	(revision 266650)
+@@ -42,13 +42,13 @@
+ #include <comphelper/anytostring.hxx>
+ 
+ #include "vbawsfunction.hxx"
++#include "compiler.hxx"
+ 
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ 
+-ScVbaWSFunction::ScVbaWSFunction( const uno::Reference< vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext): ScVbaWSFunction_BASE( xParent, xContext )
++ScVbaWSFunction::ScVbaWSFunction( const uno::Reference< XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext): ScVbaWSFunction_BASE( xParent, xContext )
+ {
+-	m_xNameAccess.set(  mxContext->getServiceManager()->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.FunctionDescriptions") ), mxContext ), uno::UNO_QUERY_THROW );
+ }
+ 
+ 
+@@ -86,7 +86,25 @@
+ 	for ( int count=0; count < aParamTemp.getLength(); ++count )
+ 		OSL_TRACE("Param[%d] is %s",
+ 			count, rtl::OUStringToOString( comphelper::anyToString( aParamTemp[count] ), RTL_TEXTENCODING_UTF8 ).getStr()  );
+-	return xFunctionAccess->callFunction(FunctionName,aParamTemp);
++	
++	uno::Any aRet = xFunctionAccess->callFunction(FunctionName,aParamTemp);
++	// MATCH function should alwayse return a double value, but currently if the first argument is XCellRange, MATCH function returns an array instead of a double value. Don't know why?
++	// To fix this issue in safe, current solution is to convert this array to a double value just for MATCH function.
++	String aUpper( FunctionName );
++	ScCompiler aCompiler( NULL, ScAddress() ); 
++	OpCode eOp = aCompiler.GetEnglishOpCode( aUpper.ToUpperAscii() );
++	if( eOp == ocMatch )
++	{
++		double fVal = 0.0;
++		if( aRet >>= fVal )
++			return aRet;
++		uno::Sequence< uno::Sequence< uno::Any > > aSequence;
++		if( !( ( aRet >>= aSequence ) && ( aSequence.getLength() > 0 ) &&
++			( aSequence[0].getLength() > 0 ) && ( aSequence[0][0] >>= fVal ) ) )
++				throw uno::RuntimeException();
++		aRet <<= fVal;
++	}
++	return aRet;
+ }
  
- #include "vbahelper.hxx"
-+#include "vbahelperinterface.hxx"
+ void SAL_CALL
+@@ -107,7 +125,11 @@
+ 	sal_Bool bIsFound = sal_False;
+ 	try 
+ 	{
+-		if ( m_xNameAccess->hasByName( Name ) )
++		// the function name contained in the com.sun.star.sheet.FunctionDescription service is alwayse localized.
++		// but the function name used in WorksheetFunction is a programmatic name (seems English).
++		// So m_xNameAccess->hasByName( Name ) may fail to find name when a function name has a localized name.
++		ScCompiler aCompiler( NULL, ScAddress() ); 
++		if( aCompiler.IsEnglishSymbol( Name ) )
+ 			bIsFound = sal_True;
+ 	}
+ 	catch( uno::Exception& /*e*/ )
+@@ -146,7 +168,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.WorksheetFunction" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.WorksheetFunction" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbacomment.cxx
+===================================================================
+--- sc/source/ui/vba/vbacomment.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacomment.cxx	(.../cws/npower11)	(revision 266650)
+@@ -29,7 +29,7 @@
+  ************************************************************************/
+ #include "vbacomment.hxx"
  
--typedef ::cppu::WeakImplHelper1< oo::msforms::XControl > ControlImpl_BASE;
-+//typedef ::cppu::WeakImplHelper1< ov::msforms::XControl > ControlImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::msforms::XControl > ControlImpl_BASE;
+-#include <org/openoffice/excel/XlCreator.hpp>
++#include <ooo/vba/excel/XlCreator.hpp>
+ #include <com/sun/star/sheet/XSpreadsheet.hpp>
+ #include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
+ #include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
+@@ -42,10 +42,10 @@
+ #include "vbacomments.hxx"
  
- class ScVbaControl : public ControlImpl_BASE
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+-ScVbaComment::ScVbaComment( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ) throw( lang::IllegalArgumentException )
++ScVbaComment::ScVbaComment( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ) throw( lang::IllegalArgumentException )
+ : ScVbaComment_BASE( xParent, xContext ), mxRange( xRange )
+ {
+ 	if  ( !xRange.is() )
+@@ -103,7 +103,7 @@
+ {
+ 	uno::Reference< container::XIndexAccess > xIndexAccess( getAnnotations(), uno::UNO_QUERY_THROW );
+ 	// parent is sheet ( parent of the range which is the parent of the comment )
+-	uno::Reference< vba::XCollection > xColl(  new ScVbaComments( getParent()->getParent(), mxContext, xIndexAccess ) );
++	uno::Reference< XCollection > xColl(  new ScVbaComments( getParent()->getParent(), mxContext, xIndexAccess ) );
+ 
+ 	return uno::Reference< excel::XComment > ( xColl->Item( uno::makeAny( Index ), uno::Any() ), uno::UNO_QUERY_THROW );
+  }
+@@ -213,7 +213,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.ScVbaComment" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ScVbaComment" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbafillformat.hxx
+===================================================================
+--- sc/source/ui/vba/vbafillformat.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbafillformat.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,17 +32,17 @@
+ 
+ #include <com/sun/star/drawing/XShape.hpp>
+ #include <com/sun/star/drawing/FillStyle.hpp>
+-#include <org/openoffice/msforms/XFillFormat.hpp>
++#include <ooo/vba/msforms/XFillFormat.hpp>
+ #include "vbahelperinterface.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::msforms::XFillFormat > ScVbaFillFormat_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::msforms::XFillFormat > ScVbaFillFormat_BASE;
+ 
+ class ScVbaFillFormat : public ScVbaFillFormat_BASE
  {
--/* this will cause error when the sheet is invisible.
  private:
--    css::uno::Reference< css::awt::XWindowPeer > m_xWindowPeer;
--*/
--private:
--    css::uno::Reference< css::awt::XWindowPeer > getWindowPeer( const css::uno::Reference< css::drawing::XControlShape >& xControlShape ) throw (css::uno::RuntimeException);
-     com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > m_xEventListener;
- protected:
--    css::uno::Reference< css::uno::XComponentContext > m_xContext;
-+    std::auto_ptr< ov::AbstractGeometryAttributes > mpGeometryHelper;
-     css::uno::Reference< css::beans::XPropertySet > m_xProps;
--    css::uno::Reference< css::drawing::XControlShape > m_xControlShape;
--protected:
--    ScVbaControl(){ m_xContext = 0; m_xProps = 0; m_xControlShape = 0; }
--    void SetControl( const css::uno::Reference< css::uno::XComponentContext > xContext, 
--                const css::uno::Reference< css::drawing::XControlShape > xControlShape );
--    void SetControl( const css::uno::Reference< css::uno::XComponentContext > xContext, 
--                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);
+     css::uno::Reference< css::drawing::XShape > m_xShape;
+     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
+-    css::uno::Reference< oo::msforms::XColorFormat > m_xColorFormat;
++    css::uno::Reference< ov::msforms::XColorFormat > m_xColorFormat;
+     css::drawing::FillStyle m_nFillStyle;
+     sal_Int32 m_nForeColor;
+     sal_Int32 m_nBackColor;
+@@ -54,7 +54,7 @@
+     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ 
  public:
--    ScVbaControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
--    ScVbaControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
--                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
--                    const css::uno::Reference< css::drawing::XControlShape > xControlShape );
-+    ScVbaControl( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pHelper );
-     virtual ~ScVbaControl();
-+    // This class will own the helper, so make sure it is allocated from 
-+    // the heap
-+    void setGeometryHelper( ov::AbstractGeometryAttributes* pHelper );
-     // 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 +76,20 @@ 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);
+-    ScVbaFillFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
++    ScVbaFillFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
+ 
+     void setForeColorAndInternalStyle( sal_Int32 nForeColor ) throw (css::uno::RuntimeException);
+     // Attributes
+@@ -66,8 +66,8 @@
+     // Methods
+     virtual void SAL_CALL Solid() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL TwoColorGradient( sal_Int32 style, sal_Int32 variant ) throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
+ 
+ };
+ 
+Index: sc/source/ui/vba/vbastyle.hxx
+===================================================================
+--- sc/source/ui/vba/vbastyle.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbastyle.hxx	(.../cws/npower11)	(revision 266650)
+@@ -29,14 +29,14 @@
+  ************************************************************************/
+ #ifndef SC_VBA_STYLE_HXX
+ #define SC_VBA_STYLE_HXX
+-#include <org/openoffice/excel/XStyle.hpp>
++#include <ooo/vba/excel/XStyle.hpp>
+ #include <com/sun/star/style/XStyle.hpp>
+ #include <com/sun/star/frame/XModel.hpp>
+ #include <com/sun/star/container/XNameContainer.hpp>
+ #include "vbaformat.hxx"
+ 
+ 
+-typedef ScVbaFormat< oo::excel::XStyle > ScVbaStyle_BASE;
++typedef ScVbaFormat< ov::excel::XStyle > ScVbaStyle_BASE;
+ 
+ class ScVbaStyle : public ScVbaStyle_BASE
+ {
+@@ -46,11 +46,11 @@
+ 	css::uno::Reference< css::container::XNameContainer > mxStyleFamilyNameContainer;
+ 	void initialise() throw ( css::uno::RuntimeException );
+ public:
+-	ScVbaStyle( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
+-	ScVbaStyle( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
++	ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
++	ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
+ 	virtual ~ScVbaStyle(){}
+ 	static css::uno::Reference< css::container::XNameAccess > getStylesNameContainer( const css::uno::Reference< css::frame::XModel >& xModel ) throw( css::uno::RuntimeException );
+-	virtual css::uno::Reference< oo::vba::XHelperInterface > thisHelperIface() { return this; };
++	virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() { return this; };
+ 	// XStyle Methods
+ 	virtual ::sal_Bool SAL_CALL BuiltIn() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual void SAL_CALL setName( const ::rtl::OUString& Name ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+@@ -63,9 +63,9 @@
+ 	virtual css::uno::Any SAL_CALL getMergeCells(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ /*
+ 	// XFormat
+-	virtual css::uno::Reference< ::org::openoffice::excel::XBorders > SAL_CALL Borders(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
+-	virtual css::uno::Reference< ::org::openoffice::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
+-	virtual css::uno::Reference< ::org::openoffice::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
++	virtual css::uno::Reference< ::ooo::vba::excel::XBorders > SAL_CALL Borders(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
++	virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
++	virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
+ 	virtual void SAL_CALL setNumberFormat( const css::uno::Any& NumberFormat ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
+ 	virtual css::uno::Any SAL_CALL getNumberFormat(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
+ 	virtual void SAL_CALL setNumberFormatLocal( const css::uno::Any& NumberFormatLocal ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
+Index: sc/source/ui/vba/vbaoleobject.cxx
+===================================================================
+--- sc/source/ui/vba/vbaoleobject.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaoleobject.cxx	(.../cws/npower11)	(revision 266650)
+@@ -37,7 +37,7 @@
+ #include "vbaoleobject.hxx"
+ 
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ 
+ 
+ sal_Int32 pt2mm( double pt ) //1/100mm
+@@ -51,7 +51,7 @@
+ }
+ 
+ 
+-ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
++ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
+             css::uno::Reference< css::drawing::XControlShape > xControlShape )
+ : OLEObjectImpl_BASE( xParent, xContext ), m_xControlShape( xControlShape )
+ {
+@@ -181,7 +181,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.OLEObject" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.OLEObject" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbawindow.cxx
+===================================================================
+--- sc/source/ui/vba/vbawindow.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbawindow.cxx	(.../cws/npower11)	(revision 266650)
+@@ -27,6 +27,7 @@
+  * for a copy of the LGPLv3 License.
+  *
+  ************************************************************************/
++#include "helperdecl.hxx"
+ #include "vbawindow.hxx"
+ #include "vbaworksheets.hxx"
+ #include "vbaworksheet.hxx"
+@@ -36,8 +37,12 @@
+ #include <com/sun/star/container/XNamed.hpp>
+ #include <com/sun/star/view/DocumentZoomType.hpp>
+ #include <com/sun/star/table/CellRangeAddress.hpp>
+-#include <org/openoffice/excel/XlWindowState.hpp>
+-#include <org/openoffice/excel/Constants.hpp>
++#include <ooo/vba/excel/XlWindowState.hpp>
++#include <ooo/vba/excel/XlWindowView.hpp>
++#include <ooo/vba/excel/Constants.hpp>
++#include <com/sun/star/awt/XWindow.hpp>
++#include <com/sun/star/awt/XWindow2.hpp>
++#include <com/sun/star/awt/PosSize.hpp>
+ 
+ #include <docsh.hxx>
+ #include <tabvwsh.hxx>
+@@ -49,8 +54,8 @@
+ #include "unonames.hxx"
  
--    //remove resouce because org.openoffice.excel.XControl is a wrapper of com.sun.star.drawing.XControlShape
-+    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);
-+    virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setName( const rtl::OUString& _name ) throw (css::uno::RuntimeException);
-+    //remove resouce because ooo.vba.excel.XControl is a wrapper of com.sun.star.drawing.XControlShape
-     virtual void removeResouce() throw( css::uno::RuntimeException );
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- };
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
+-using namespace ::org::openoffice::excel::XlWindowState;
++using namespace ::ooo::vba;
++using namespace ::ooo::vba::excel::XlWindowState;
  
+ typedef  std::hash_map< rtl::OUString,
+ SCTAB, ::rtl::OUStringHash,
+@@ -92,7 +97,7 @@
+ 			throw container::NoSuchElementException();
+ 		}
+ 		// #FIXME needs ThisWorkbook as parent
+-		return uno::makeAny( uno::Reference< excel::XWorksheet > ( new ScVbaWorksheet( uno::Reference< vba::XHelperInterface >(), m_xContext, *(m_it++), m_xModel ) ) );
++		return uno::makeAny( uno::Reference< excel::XWorksheet > ( new ScVbaWorksheet( uno::Reference< XHelperInterface >(), m_xContext, *(m_it++), m_xModel ) ) );
+ 	}
+ 
+ 
+@@ -197,9 +202,21 @@
  
-@@ -92,16 +97,15 @@ class ScVbaControlFactory
- {
- public:
-     ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
--    ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
--                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
--                    const css::uno::Reference< css::drawing::XControlShape > xControlShape );
--    ScVbaControl* createControl( const sal_Int16 nClassID )  throw ( css::uno::RuntimeException );
-+                    const css::uno::Reference< css::uno::XInterface >& xControl, 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 );
-+    ScVbaControl* createControl( const css::uno::Reference< css::drawing::XControlShape >&, const css::uno::Reference< css::uno::XInterface >& )  throw ( css::uno::RuntimeException );
-     css::uno::Reference< css::uno::XComponentContext > m_xContext;
--    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
-diff --git sc/source/ui/vba/vbacontrols.cxx sc/source/ui/vba/vbacontrols.cxx
-new file mode 100644
-index 0000000..e9dc0a7
---- /dev/null
-+++ sc/source/ui/vba/vbacontrols.cxx
-@@ -0,0 +1,227 @@
-+/*************************************************************************
-+ *
-+ * 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 "vbacontrols.hxx"
-+#include "vbacontrol.hxx"
-+#include <cppuhelper/implbase2.hxx>
-+#include <com/sun/star/awt/XControlContainer.hpp>
-+#include <hash_map>
-+
-+using namespace com::sun::star;
-+using namespace ooo::vba;
-+
-+
-+typedef ::cppu::WeakImplHelper2< container::XNameAccess, container::XIndexAccess > ArrayWrapImpl;
-+
-+typedef  std::hash_map< rtl::OUString, sal_Int32, ::rtl::OUStringHash,
-+    ::std::equal_to< ::rtl::OUString >  > ControlIndexMap;
-+typedef  std::vector< uno::Reference< awt::XControl > > ControlVec;
+-ScVbaWindow::ScVbaWindow( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext ), m_xModel( xModel ) 
++ScVbaWindow::ScVbaWindow( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext ), m_xModel( xModel ) 
+ {
+-	uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++    init();
++}
 +
-+class ControlArrayWrapper : public ArrayWrapImpl
++ScVbaWindow::ScVbaWindow( uno::Sequence< uno::Any > const & args, uno::Reference< uno::XComponentContext > const & xContext )  
++        : WindowImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ),
++          m_xModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
 +{
-+    uno::Reference< awt::XControlContainer > mxDialog;
-+    uno::Sequence< ::rtl::OUString > msNames;
-+    ControlVec mControls;
-+    ControlIndexMap mIndices;
-+
-+    rtl::OUString getControlName( const uno::Reference< awt::XControl >& xCtrl )
-+    {
-+        uno::Reference< beans::XPropertySet > xProp( xCtrl->getModel(), uno::UNO_QUERY );
-+        rtl::OUString sName;
-+        xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) ) >>= sName;
-+        return sName;
-+    }
-+
-+public:
-+
-+    ControlArrayWrapper( const uno::Reference< awt::XControl >& xDialog )
-+    {
-+        mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
-+        uno::Sequence< uno::Reference< awt::XControl > > sXControls = mxDialog->getControls();
-+    
-+        msNames.realloc( sXControls.getLength() );
-+        for ( sal_Int32 i = 0; i < sXControls.getLength(); ++i )
-+        {
-+            uno::Reference< awt::XControl > xCtrl = sXControls[ i ];
-+            msNames[ i ] = getControlName( xCtrl );
-+            mControls.push_back( xCtrl );
-+            mIndices[ msNames[ i ] ] = i;
-+        }
-+    }
-+    
-+    // XElementAccess
-+    virtual uno::Type SAL_CALL getElementType(  ) throw (uno::RuntimeException)
-+    {
-+        return awt::XControl::static_type(0);
-+    }
-+    
-+    virtual ::sal_Bool SAL_CALL hasElements(  ) throw (uno::RuntimeException) 
-+    {
-+        return ( mControls.size() > 0 );
-+    }
-+    
-+    // XNameAcess 
-+    virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
-+    {
-+        if ( !hasByName( aName ) )
-+            throw container::NoSuchElementException();
-+        return getByIndex( mIndices[ aName ] );
-+    }
-+    
-+    virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames(  ) throw (uno::RuntimeException)
-+    {
-+        return msNames;
-+    }
-+    
-+    virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException)
-+    {
-+        ControlIndexMap::iterator it = mIndices.find( aName );
-+        return it != mIndices.end();
-+    }
-+    
-+    // XElementAccess
-+    virtual ::sal_Int32 SAL_CALL getCount(  ) throw (css::uno::RuntimeException)
-+    {
-+        return mControls.size();
-+    }
-+    
-+    virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
-+    {
-+        if ( Index < 0 || Index >= static_cast< sal_Int32 >( mControls.size() ) )
-+            throw lang::IndexOutOfBoundsException();
-+        return uno::makeAny( mControls[ Index ] );
-+    }
-+};
-+
++    init();
++}
++void
++ScVbaWindow::init()
++{
++	uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ 	m_xViewPane.set( xController, uno::UNO_QUERY_THROW );
+ 	m_xViewFreezable.set( xController, uno::UNO_QUERY_THROW );
+ 	m_xViewSplitable.set( xController, uno::UNO_QUERY_THROW );
+@@ -232,10 +249,10 @@
+ {
+ 	uno::Reference< container::XEnumerationAccess > xEnumAccess( new SelectedSheetsEnumAccess( mxContext, m_xModel  ) );
+ 	// #FIXME needs a workbook as a parent
+-	uno::Reference< excel::XWorksheets > xSheets(  new ScVbaWorksheets( uno::Reference< vba::XHelperInterface >(), mxContext, xEnumAccess, m_xModel ) );
++	uno::Reference< excel::XWorksheets > xSheets(  new ScVbaWorksheets( uno::Reference< XHelperInterface >(), mxContext, xEnumAccess, m_xModel ) );
+ 	if ( aIndex.hasValue() )
+ 	{
+-		uno::Reference< vba::XCollection > xColl( xSheets, uno::UNO_QUERY_THROW );
++		uno::Reference< XCollection > xColl( xSheets, uno::UNO_QUERY_THROW );
+ 		return xColl->Item( aIndex, uno::Any() );	
+ 	}
+ 	return uno::makeAny( xSheets ); 	
+@@ -289,8 +306,8 @@
+ 		if ( ( nCrudLen + nCrudIndex ) == sTitle.getLength() )
+ 		{
+ 			sTitle = sTitle.copy( 0, nCrudIndex );
+-            uno::Reference< oo::vba::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
+-			ScVbaWorkbook workbook( uno::Reference< vba::XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
++            uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
++			ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
+ 			rtl::OUString sName = workbook.getName();
+ 			// rather bizare hack to make sure the name behavior
+ 			// is like XL
+@@ -427,8 +444,8 @@
+ void
+ ScVbaWindow::Activate() throw (css::uno::RuntimeException)
+ {
+-    uno::Reference< oo::vba::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
+-	ScVbaWorkbook workbook( uno::Reference< vba::XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
++    uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
++	ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
+ 
+ 	workbook.Activate();
+ }
+@@ -436,13 +453,13 @@
+ void
+ ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const uno::Any& RouteWorkBook ) throw (uno::RuntimeException)
+ {
+-    uno::Reference< oo::vba::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
+-	ScVbaWorkbook workbook( uno::Reference< vba::XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
++    uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
++	ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
+ 	workbook.Close(SaveChanges, FileName, RouteWorkBook );
+ }
+ 
+-uno::Reference< excel::XPane > 
+-ScVbaWindow::ActivePane() 
++uno::Reference< excel::XPane > SAL_CALL
++ScVbaWindow::ActivePane() throw (script::BasicErrorException, uno::RuntimeException) 
+ { 
+ 	return new ScVbaPane( mxContext, m_xViewPane ); 
+ }
+@@ -629,7 +646,8 @@
+ 	if( getSplitColumn() != _splitcolumn )
+ 	{
+ 		sal_Bool bFrozen = getFreezePanes();
+-		m_xViewFreezable->freezeAtPosition( _splitcolumn, 0 );
++		sal_Int32 nRow = getSplitRow();
++		m_xViewFreezable->freezeAtPosition( _splitcolumn, nRow );
+ 		SplitAtDefinedPosition( !bFrozen );
+ 	}
+ }
+@@ -646,13 +664,14 @@
+ ScVbaWindow::setSplitHorizontal( double _splithorizontal ) throw (uno::RuntimeException)
+ {
+ 	double fHoriPixels = PointsToPixels( m_xDevice, _splithorizontal, sal_True );
+-   m_xViewSplitable->splitAtPosition( (int) fHoriPixels, 0 );	
++   m_xViewSplitable->splitAtPosition( static_cast<sal_Int32>( fHoriPixels ), 0 );	
+ }
+ 
+ sal_Int32 SAL_CALL 
+ ScVbaWindow::getSplitRow() throw (uno::RuntimeException)
+ {
+-	return m_xViewSplitable->getSplitRow();	
++	sal_Int32 nValue = m_xViewSplitable->getSplitRow();
++	return nValue ? nValue - 1 : nValue;	
+ }
+ 
+ void SAL_CALL 
+@@ -661,7 +680,8 @@
+ 	if( getSplitRow() != _splitrow )
+ 	{
+ 		sal_Bool bFrozen = getFreezePanes();
+-		m_xViewFreezable->freezeAtPosition( 0, _splitrow );
++		sal_Int32 nColumn = getSplitColumn();
++		m_xViewFreezable->freezeAtPosition( nColumn , _splitrow );
+ 		SplitAtDefinedPosition( !bFrozen );
+ 	}
+ }
+@@ -736,6 +756,184 @@
+ 	}			
+ }
+ 
++uno::Reference< excel::XWorksheet > SAL_CALL 
++ScVbaWindow::ActiveSheet(  ) throw (script::BasicErrorException, uno::RuntimeException)
++{
++	return ScVbaGlobals::getGlobalsImpl(mxContext)->getApplication()->getActiveSheet();
++}
 +
-+class ControlsEnumWrapper : public EnumerationHelper_BASE
++uno::Any SAL_CALL
++ScVbaWindow::getView() throw (uno::RuntimeException)
 +{
-+    uno::Reference<XHelperInterface > m_xParent;
-+    uno::Reference<uno::XComponentContext > m_xContext;
-+    uno::Reference<container::XIndexAccess > m_xIndexAccess;
-+    uno::Reference<awt::XControl > m_xDlg;
-+    sal_Int32 nIndex;
++	// not supported now	
++	sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;	
++	return uno::makeAny( nWindowView );	
++}
 +
-+public:
++void SAL_CALL
++ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException)
++{
++	sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;
++	_view >>= nWindowView;
++	USHORT nSlot = FID_NORMALVIEWMODE;
++	switch ( nWindowView )
++	{
++		case excel::XlWindowView::xlNormalView:
++			nSlot = FID_NORMALVIEWMODE;
++			break;
++		case excel::XlWindowView::xlPageBreakPreview:
++			nSlot = FID_PAGEBREAKMODE;
++			break;
++		default:
++			DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++	}
++	dispatchExecute( m_xModel, nSlot );
++}
 +
-+    ControlsEnumWrapper(  const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference< awt::XControl >& xDlg ) :  m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), m_xDlg( xDlg ), nIndex( 0 ) {}
++sal_Bool SAL_CALL
++ScVbaWindow::getVisible() throw (uno::RuntimeException)
++{
++	sal_Bool bVisible = sal_True;	
++	uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++	uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
++	uno::Reference< css::awt::XWindow2 > xWindow2 (xWindow, uno::UNO_QUERY_THROW );
++	if( xWindow2.is() )
++	{
++		bVisible = xWindow2->isVisible();	
++	}
++	return bVisible;
++}
 +
-+    virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
-+    {
-+        return ( nIndex < m_xIndexAccess->getCount() );
-+    }
++void SAL_CALL
++ScVbaWindow::setVisible(sal_Bool _visible) throw (uno::RuntimeException)
++{
++	uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++	uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
++	if( xWindow.is() )
++	{
++		xWindow->setVisible( _visible );	
++	}
++}
 +
-+    virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
-+    {
-+        if ( nIndex < m_xIndexAccess->getCount() )
-+        {
-+            uno::Reference< frame::XModel > xModel;
-+            uno::Reference< uno::XInterface > xControl;
-+            m_xIndexAccess->getByIndex( nIndex++ ) >>= xControl;
-+            // Create control from awt::XControl
-+            ScVbaControlFactory aFac( m_xContext, xControl,  xModel );
-+            uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( m_xDlg->getModel() ) );
-+            return uno::makeAny( xVBAControl );
-+        }
-+        throw container::NoSuchElementException();
-+    }
++css::awt::Rectangle getPosSize( const uno::Reference< frame::XModel >& xModel )
++{
++	css::awt::Rectangle aRect;
++	uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++	uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
++	if( xWindow.is() )
++	{
++		aRect = xWindow->getPosSize();
++	}
++	return aRect;
++}
 +
-+};
++void setPosSize( const uno::Reference< frame::XModel >& xModel, sal_Int32 nValue, USHORT nFlag )
++{
++	uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++	uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
++	if( xWindow.is() )
++	{
++		css::awt::Rectangle aRect = xWindow->getPosSize();
++		switch( nFlag )
++		{
++			case css::awt::PosSize::X:
++				xWindow->setPosSize( nValue, aRect.Y,	0, 0, css::awt::PosSize::X );
++				break;
++			case css::awt::PosSize::Y:
++				xWindow->setPosSize( aRect.X, nValue,	0, 0, css::awt::PosSize::Y );
++				break;
++			case css::awt::PosSize::WIDTH:
++				xWindow->setPosSize( 0, 0,	nValue, aRect.Height, css::awt::PosSize::WIDTH );
++				break;
++			case css::awt::PosSize::HEIGHT:
++				xWindow->setPosSize( 0, 0,	aRect.Width, nValue, css::awt::PosSize::HEIGHT );
++				break;
++			default:
++				break;
++		}
++	}
++}	
 +
++sal_Int32 SAL_CALL 
++ScVbaWindow::getHeight() throw (uno::RuntimeException)
++{
++	css::awt::Rectangle aRect = getPosSize(m_xModel);
++	return aRect.Height;
++}
 +
-+uno::Reference<container::XIndexAccess >
-+lcl_controlsWrapper( const uno::Reference< awt::XControl >& xDlg )
++void SAL_CALL 
++ScVbaWindow::setHeight( sal_Int32 _height ) throw (uno::RuntimeException)
 +{
-+    return new ControlArrayWrapper( xDlg );
++	setPosSize(m_xModel, _height, css::awt::PosSize::HEIGHT);
 +}
 +
-+ScVbaControls::ScVbaControls( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
-+                const css::uno::Reference< awt::XControl >& xDialog )
-+            : ControlsImpl_BASE( xParent, xContext, lcl_controlsWrapper( xDialog  ) )
++sal_Int32 SAL_CALL 
++ScVbaWindow::getLeft() throw (uno::RuntimeException)
 +{
-+    mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
++	css::awt::Rectangle aRect = getPosSize(m_xModel);
++	return aRect.X;
 +}
 +
-+uno::Reference< container::XEnumeration >
-+ScVbaControls::createEnumeration() throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaWindow::setLeft( sal_Int32 _left ) throw (uno::RuntimeException)
 +{
-+    uno::Reference< container::XEnumeration > xEnum( new ControlsEnumWrapper( mxParent, mxContext, m_xIndexAccess, mxDialog ) );
-+    if ( !xEnum.is() )
-+        throw uno::RuntimeException();
-+    return xEnum;
++	setPosSize(m_xModel, _left, css::awt::PosSize::X);
++}
++sal_Int32 SAL_CALL 
++ScVbaWindow::getTop() throw (uno::RuntimeException)
++{
++	css::awt::Rectangle aRect = getPosSize(m_xModel);
++	return aRect.Y;
 +}
 +
-+uno::Any
-+ScVbaControls::createCollectionObject( const css::uno::Any& aSource )
++void SAL_CALL 
++ScVbaWindow::setTop( sal_Int32 _top ) throw (uno::RuntimeException)
 +{
-+    // Create control from awt::XControl
-+    uno::Reference< awt::XControl > xControl;
-+    aSource >>= xControl;
-+    uno::Reference< frame::XModel > xModel;
-+    ScVbaControlFactory aFac( mxContext, xControl,  xModel );
-+    uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( mxDialog->getModel() ) );
-+    return uno::makeAny( xVBAControl );
++	setPosSize(m_xModel, _top, css::awt::PosSize::Y);
++}
++sal_Int32 SAL_CALL 
++ScVbaWindow::getWidth() throw (uno::RuntimeException)
++{
++	css::awt::Rectangle aRect = getPosSize(m_xModel);
++	return aRect.Width;
 +}
 +
 +void SAL_CALL 
-+ScVbaControls::Move( double cx, double cy ) throw (uno::RuntimeException)
++ScVbaWindow::setWidth( sal_Int32 _width ) throw (uno::RuntimeException)
 +{
-+    uno::Reference< container::XEnumeration > xEnum( createEnumeration() );
-+    while ( xEnum->hasMoreElements() )
-+    {
-+        uno::Reference< msforms::XControl > xControl( xEnum->nextElement(), uno::UNO_QUERY_THROW );
-+        xControl->setLeft( xControl->getLeft() + cx );
-+        xControl->setTop( xControl->getTop() + cy ); 
-+    }
++	setPosSize(m_xModel, _width, css::awt::PosSize::WIDTH);
 +}
 +
-+uno::Type
-+ScVbaControls::getElementType() throw (uno::RuntimeException)
++sal_Int32 SAL_CALL 
++ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException)
 +{
-+    return ooo::vba::msforms::XControl::static_type(0);
++	sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
++	double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterX/100000);
++	return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
 +}
-+rtl::OUString& 
-+ScVbaControls::getServiceImplName()
++
++sal_Int32 SAL_CALL 
++ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControls") );
-+	return sImplName;
++	sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
++	double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterY/100000);
++	return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
 +}
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaControls::getServiceNames()
++void SAL_CALL 
++ScVbaWindow::PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Controls" ) );
-+	}
-+	return aServiceNames;
++	// need test, print current active sheet	
++	PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, m_xModel, sal_True );
++}
++
++void SAL_CALL 
++ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++{
++	// need test, print preview current active sheet	
++	PrintPreviewHelper( EnableChanges, m_xModel );	
++}
++
+ rtl::OUString& 
+ ScVbaWindow::getServiceImplName()
+ {
+@@ -750,7 +948,16 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Window" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Window" ) );
+ 	}
+ 	return aServiceNames;
+ }
++namespace window
++{
++namespace sdecl = comphelper::service_decl;
++sdecl::vba_service_class_<ScVbaWindow, sdecl::with_args<true> > serviceImpl;
++extern sdecl::ServiceDecl const serviceDecl(
++    serviceImpl,
++    "ScVbaWindow",
++    "ooo.vba.excel.Window" );
 +}
-diff --git sc/source/ui/vba/vbacontrols.hxx sc/source/ui/vba/vbacontrols.hxx
-new file mode 100644
-index 0000000..31ab049
---- /dev/null
-+++ sc/source/ui/vba/vbacontrols.hxx
+Index: sc/source/ui/vba/vbacontrols.hxx
+===================================================================
+--- sc/source/ui/vba/vbacontrols.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacontrols.hxx	(.../cws/npower11)	(revision 266650)
 @@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
@@ -16947,712 +12758,1136 @@
 +};
 +#endif //SC_VBA_OLEOBJECTS_HXX
 +
-diff --git sc/source/ui/vba/vbadialog.cxx sc/source/ui/vba/vbadialog.cxx
-index c3e84b6..6037390 100644
---- sc/source/ui/vba/vbadialog.cxx
-+++ sc/source/ui/vba/vbadialog.cxx
-@@ -31,7 +31,7 @@
+Index: sc/source/ui/vba/vbaseriescollection.hxx
+===================================================================
+--- sc/source/ui/vba/vbaseriescollection.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaseriescollection.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,20 +30,20 @@
+ #ifndef SC_VBA_SERIESCOLLECTION_HXX
+ #define SC_VBA_SERIESCOLLECTION_HXX
  
- #include <com/sun/star/lang/XMultiComponentFactory.hpp>
- #include <com/sun/star/frame/XModel.hpp>
--#include <org/openoffice/excel/XApplication.hpp>
-+#include <ooo/vba/excel/XApplication.hpp>
+-#include <org/openoffice/excel/XSeriesCollection.hpp>
++#include <ooo/vba/excel/XSeriesCollection.hpp>
+ #include "vbahelperinterface.hxx"
+ #include "vbacollectionimpl.hxx"
+ #include "vbahelper.hxx"
  
- #include <tools/string.hxx>
  
-@@ -39,7 +39,7 @@
- #include "vbadialog.hxx"
- #include "vbaglobals.hxx"
+-typedef CollTestImplHelper< oo::excel::XSeriesCollection > SeriesCollection_BASE;
++typedef CollTestImplHelper< ov::excel::XSeriesCollection > SeriesCollection_BASE;
+ 
+ class ScVbaSeriesCollection : public SeriesCollection_BASE
+ {		
+ 	css::uno::Reference< css::uno::XComponentContext > m_xContext;
  
+ public:
+-	ScVbaSeriesCollection( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
++	ScVbaSeriesCollection( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ 	// XEnumerationAccess
+ 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbalistcontrolhelper.cxx
+===================================================================
+--- sc/source/ui/vba/vbalistcontrolhelper.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbalistcontrolhelper.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,145 @@
++#include <vbalistcontrolhelper.hxx>
++
++using namespace com::sun::star;
++using namespace ooo::vba;
++
++const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
++
++void SAL_CALL 
++ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
++{
++	if ( pvargItem.hasValue()  )
++	{
++		uno::Sequence< rtl::OUString > sList;
++		m_xProps->getPropertyValue( ITEMS ) >>= sList;
++
++		sal_Int32 nIndex = sList.getLength();
++
++		if ( pvargIndex.hasValue() )
++			pvargIndex >>= nIndex;
++
++		rtl::OUString sString = getAnyAsString( pvargItem );
++
++		// if no index specified or item is to be appended to end of 
++		// list just realloc the array and set the last item
++		if ( nIndex  == sList.getLength() )
++		{
++			sal_Int32 nOldSize = sList.getLength();
++			sList.realloc( nOldSize + 1 );
++			sList[ nOldSize ] = sString; 
++		}
++		else
++		{
++			// just copy those elements above the one to be inserted
++			std::vector< rtl::OUString > sVec;
++			// reserve just the amount we need to copy
++			sVec.reserve( sList.getLength() - nIndex );
++
++			// point at first element to copy
++			rtl::OUString* pString = sList.getArray() + nIndex;
++			const rtl::OUString* pEndString = sList.getArray() + sList.getLength();
++			// insert the new element
++			sVec.push_back( sString );
++			// copy elements	
++			for ( ; pString != pEndString; ++pString )
++				sVec.push_back( *pString );
++		
++			sList.realloc(  sList.getLength() + 1 );
++
++			// point at first element to be overwritten
++			pString = sList.getArray() + nIndex;
++			pEndString = sList.getArray() + sList.getLength();
++			std::vector< rtl::OUString >::iterator it = sVec.begin();
++			for ( ; pString != pEndString; ++pString, ++it)
++				*pString = *it;	
++			//
++		}
++
++		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
++		
++	}
++}
++
++void SAL_CALL 
++ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
++{
++    sal_Int32 nIndex = 0;
++    // for int index
++	if ( index >>= nIndex  )
++	{
++		uno::Sequence< rtl::OUString > sList;
++		m_xProps->getPropertyValue( ITEMS ) >>= sList;
++        if( nIndex < 0 || nIndex > ( sList.getLength() - 1 ) )
++            throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid index" ), uno::Reference< uno::XInterface > () );
++        if( sList.hasElements() )
++        {
++            if( sList.getLength() == 1 )
++            {
++                Clear();
++                return;
++            }
++            for( sal_Int32 i = nIndex; i < ( sList.getLength()-1 ); i++ )
++            {
++                sList[i] = sList[i+1];
++            }
++			sList.realloc(  sList.getLength() - 1 );
++		}
++
++		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
++	}
++}
++
++void SAL_CALL 
++ListControlHelper::Clear(  ) throw (uno::RuntimeException)
++{
++	// urk, setValue doesn't seem to work !!
++	//setValue( uno::makeAny( sal_Int16() ) );
++	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
++}
++
++void SAL_CALL
++ListControlHelper::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
++{
++	if ( _rowsource.getLength() == 0 )
++		Clear();
++}
++
++sal_Int32 SAL_CALL
++ListControlHelper::getListCount() throw (uno::RuntimeException)
++{
++    uno::Sequence< rtl::OUString > sList;
++    m_xProps->getPropertyValue( ITEMS ) >>= sList;
++    return sList.getLength();
++}
++
++uno::Any SAL_CALL 
++ListControlHelper::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
++{
++    uno::Sequence< rtl::OUString > sList;
++    m_xProps->getPropertyValue( ITEMS ) >>= sList;
++    sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() );
++    uno::Any aRet;
++    if ( pvargIndex.hasValue() )
++    {
++        sal_Int16 nIndex = -1;
++        pvargIndex >>= nIndex;
++        if( nIndex < 0 || nIndex >= nLength )
++            throw uno::RuntimeException( rtl::OUString::createFromAscii(
++                    "Bad row Index" ), uno::Reference< uno::XInterface >() );       
++        aRet <<= sList[ nIndex ];
++    }
++    else if ( pvarColumn.hasValue() ) // pvarColumn on its own would be bad
++            throw uno::RuntimeException( rtl::OUString::createFromAscii(
++                    "Bad column Index" ), uno::Reference< uno::XInterface >() );       
++    else // List() ( e.g. no args )
++    {
++        uno::Sequence< uno::Sequence< rtl::OUString > > sReturnArray( nLength );
++        for ( sal_Int32 i = 0; i < nLength; ++i )
++        {
++            sReturnArray[ i ].realloc( 10 );
++            sReturnArray[ i ][ 0 ] = sList[ i ];
++        }        
++        aRet = uno::makeAny( sReturnArray );
++    }
++    return aRet;
++}
+Index: sc/source/ui/vba/vbacollectionimpl.cxx
+===================================================================
+--- sc/source/ui/vba/vbacollectionimpl.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacollectionimpl.cxx	(.../cws/npower11)	(revision 266650)
+@@ -30,7 +30,7 @@
+ #include <vbacollectionimpl.hxx>
+ #include "vbaglobals.hxx"
+ using namespace ::com::sun::star;
 -using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
- using namespace ::com::sun::star;
  
- // fails silently
-@@ -113,7 +113,7 @@ ScVbaDialog::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PivotTable" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTable" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbadialog.hxx sc/source/ui/vba/vbadialog.hxx
-index c65b3f0..94d8114 100644
---- sc/source/ui/vba/vbadialog.hxx
-+++ sc/source/ui/vba/vbadialog.hxx
-@@ -33,20 +33,20 @@
- #include <cppuhelper/implbase1.hxx>
  
- #include <com/sun/star/uno/XComponentContext.hpp>
--#include <org/openoffice/vba/XGlobals.hpp>
--#include <org/openoffice/excel/XApplication.hpp>
--#include <org/openoffice/excel/XDialog.hpp>
-+#include <ooo/vba/XGlobals.hpp>
-+#include <ooo/vba/excel/XApplication.hpp>
-+#include <ooo/vba/excel/XDialog.hpp>
-  
- #include "vbahelperinterface.hxx"
- #include "vbadialog.hxx"
+ ScVbaCollectionBaseImpl::ScVbaCollectionBaseImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ) throw (uno::RuntimeException) : m_xContext( xContext ), m_xIndexAccess( xIndexAccess )
+Index: sc/source/ui/vba/vbatogglebutton.hxx
+===================================================================
+--- sc/source/ui/vba/vbatogglebutton.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbatogglebutton.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,63 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_TOGGLEBUTTON_HXX
++#define SC_VBA_TOGGLEBUTTON_HXX
++#include <cppuhelper/implbase2.hxx>
++#include <ooo/vba/msforms/XToggleButton.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XToggleButton, css::script::XDefaultProperty  > ToggleButtonImpl_BASE;
++
++class ScVbaToggleButton : public ToggleButtonImpl_BASE
++{
++	rtl::OUString msDftPropName;
++public:
++    ScVbaToggleButton( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pGeomHelper );
++    ~ScVbaToggleButton();
++   // Attributes
++    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
++
++    virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    // XDefaultProperty
++    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++};
++#endif //SC_VBA_TOGGLEBUTTON_HXX
+Index: sc/source/ui/vba/vbalistbox.cxx
+===================================================================
+--- sc/source/ui/vba/vbalistbox.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbalistbox.cxx	(.../cws/npower11)	(revision 266650)
+@@ -33,35 +33,54 @@
+ #include "vbapropvalue.hxx"
+ #include <vector>
+ #include <comphelper/anytostring.hxx>
++#include <com/sun/star/script/ArrayWrapper.hpp>
+ 
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
  
--typedef InheritedHelperInterfaceImpl1< oo::excel::XDialog > ScVbaDialog_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XDialog > ScVbaDialog_BASE;
+-const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
++const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
++const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
+ const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
  
- class ScVbaDialog : public ScVbaDialog_BASE
+ 
+-ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ListBoxImpl_BASE( xContext, xControlShape )
++ScVbaListBox::ScVbaListBox( const uno::Reference< 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 )
  {
- 	sal_Int32 mnIndex;
- public:
--	ScVbaDialog( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, sal_Int32 nIndex, const css::uno::Reference< css::uno::XComponentContext > xContext ):ScVbaDialog_BASE( xParent, xContext ), mnIndex( nIndex ) {}
-+	ScVbaDialog( const css::uno::Reference< ov::XHelperInterface >& xParent, sal_Int32 nIndex, const css::uno::Reference< css::uno::XComponentContext > xContext ):ScVbaDialog_BASE( xParent, xContext ), mnIndex( nIndex ) {}
- 	virtual ~ScVbaDialog() {}
+-	// grab the default value property name
+-	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
++    mpListHelper.reset( new ListControlHelper( m_xProps ) );
+ }
  
- 	// Methods
-diff --git sc/source/ui/vba/vbadialogs.cxx sc/source/ui/vba/vbadialogs.cxx
-index c176964..e25cf7c 100644
---- sc/source/ui/vba/vbadialogs.cxx
-+++ sc/source/ui/vba/vbadialogs.cxx
-@@ -31,8 +31,8 @@
+-ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ListBoxImpl_BASE( xContext, xPropSet, xControlShape )
++// Attributes
++void SAL_CALL 
++ScVbaListBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeException)
+ {
+-	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
++    sal_Int32 nIndex = 0;
++    _value >>= nIndex;
++    Selected( nIndex );
+ }
  
- #include <com/sun/star/lang/XMultiComponentFactory.hpp>
- #include <com/sun/star/frame/XModel.hpp>
--#include <org/openoffice/excel/XApplication.hpp>
--#include <org/openoffice/excel/XDialog.hpp>
-+#include <ooo/vba/excel/XApplication.hpp>
-+#include <ooo/vba/excel/XDialog.hpp>
++uno::Any SAL_CALL 
++ScVbaListBox::getListIndex() throw (uno::RuntimeException)
++{
++    uno::Sequence< sal_Int16 > sSelection;
++    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
++    if ( sSelection.getLength() == 0 )
++        return uno::Any( sal_Int32( -1 ) );
++    return uno::Any( sSelection[ 0 ] );
++}
  
- #include <tools/string.hxx>
+-// Attributes
+ uno::Any SAL_CALL 
+ ScVbaListBox::getValue() throw (uno::RuntimeException)
+ {
++    uno::Sequence< sal_Int16 > sSelection;
++    uno::Sequence< rtl::OUString > sItems;
++    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
++    m_xProps->getPropertyValue( ITEMS ) >>= sItems;
+     if( getMultiSelect() )
+         throw uno::RuntimeException( rtl::OUString::createFromAscii(
+                     "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
+-    uno::Reference< form::validation::XValidatableFormComponent > xValidatableFormComponent( m_xProps, uno::UNO_QUERY_THROW );
+-    return xValidatableFormComponent->getCurrentValue();
++    uno::Any aRet;
++    if ( sSelection.getLength() )
++        aRet = uno::makeAny( sItems[ sSelection[ 0 ] ] ); 
++    return aRet;
+ }
  
-@@ -41,7 +41,7 @@
- #include "vbaglobals.hxx"
- #include "vbadialog.hxx"
+ void SAL_CALL 
+@@ -91,18 +110,17 @@
+         throw uno::RuntimeException( rtl::OUString::createFromAscii(
+                     "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
  
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
+-    nList.realloc( 1 );
+-    nList[0] = nValue;
+-            
+-	m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
++    uno::Sequence< sal_Int16 > nSelectedIndices(1);
++    nSelectedIndices[ 0 ] = nValue;
++    m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nSelectedIndices ) ); 
++    m_xProps->setPropertyValue( TEXT, uno::makeAny( sValue ) ); 
+ }
  
- void
-@@ -62,7 +62,7 @@ ScVbaDialogs::Item( const uno::Any &aItem ) throw (uno::RuntimeException)
+ ::rtl::OUString SAL_CALL 
+ ScVbaListBox::getText() throw (uno::RuntimeException)
  {
- 	sal_Int32 nIndex = 0;
- 	aItem >>= nIndex;
--	uno::Reference< excel::XDialog > aDialog( new ScVbaDialog( uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), nIndex, mxContext ) );
-+	uno::Reference< excel::XDialog > aDialog( new ScVbaDialog( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), nIndex, mxContext ) );
- 	return uno::Any( aDialog );
- }
- rtl::OUString& 
-@@ -79,7 +79,7 @@ ScVbaDialogs::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheet" ) );
- 	}
- 	return aServiceNames;
+ 	rtl::OUString result;
+-    uno::Reference< form::validation::XValidatableFormComponent > xValidatableFormComponent( m_xProps, uno::UNO_QUERY_THROW );
+-    xValidatableFormComponent->getCurrentValue() >>= result;
++	getValue() >>= result;
+ 	return result;
  }
-diff --git sc/source/ui/vba/vbadialogs.hxx sc/source/ui/vba/vbadialogs.hxx
-index 53f8d06..fe9a32c 100644
---- sc/source/ui/vba/vbadialogs.hxx
-+++ sc/source/ui/vba/vbadialogs.hxx
-@@ -33,18 +33,18 @@
- #include <cppuhelper/implbase1.hxx>
  
- #include <com/sun/star/uno/XComponentContext.hpp>
--#include <org/openoffice/excel/XDialogs.hpp>
--#include <org/openoffice/vba/XCollection.hpp>
-+#include <ooo/vba/excel/XDialogs.hpp>
-+#include <ooo/vba/XCollection.hpp>
- #include "vbahelperinterface.hxx" 
- 
- class ScModelObj;
- 
--typedef InheritedHelperInterfaceImpl1< oo::excel::XDialogs > ScVbaDialogs_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XDialogs > ScVbaDialogs_BASE;
+@@ -125,106 +143,45 @@
+ {
+     m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ), uno::makeAny( _multiselect ) );
+ }
+-/*
+-css::uno::Sequence< sal_Bool > SAL_CALL 
+-ScVbaListBox::getSelected() throw (css::uno::RuntimeException)
+-{
+-    uno::Sequence< rtl::OUString > sList;
+-    uno::Sequence< sal_Int16 > nList;
+-    m_xProps->getPropertyValue( ITEMS ) >>= sList;
+-    uno::Sequence< sal_Bool > bSelected( sList.getLength() );
+-    for( sal_Int16 i = 0; i < bSelected.getLength(); i++ )
+-        bSelected[i] = sal_False;
+-    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
+-    for( sal_Int16 i = 0; i < nList.getLength(); i++ )
+-    {
+-        bSelected[nList[i]] = sal_True;
+-    }
+-    return bSelected;
+-}
  
- class ScVbaDialogs : public ScVbaDialogs_BASE
+-void SAL_CALL 
+-ScVbaListBox::setSelected( const css::uno::Sequence< sal_Bool >& _selected ) throw (css::uno::RuntimeException)
+-{
+-}
+-*/
+ css::uno::Any SAL_CALL 
+ ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
  {
- public:
--	ScVbaDialogs( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext ): ScVbaDialogs_BASE( xParent, xContext ) {} 
-+	ScVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext ): ScVbaDialogs_BASE( xParent, xContext ) {} 
- 	virtual ~ScVbaDialogs() {}
+     uno::Sequence< rtl::OUString > sList;
+     m_xProps->getPropertyValue( ITEMS ) >>= sList;
+     sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() );
+-    sal_Int16 nIndex = m_nIndex;
+-    if( 0 > nIndex && nLength < nIndex )
++    // no choice but to do a horror cast as internally
++    // the indices are but sal_Int16 
++    sal_Int16 nIndex = static_cast< sal_Int16 >( index );
++    if( nIndex < 0 || nIndex >= nLength )
+         throw uno::RuntimeException( rtl::OUString::createFromAscii(
+                     "Error Number." ), uno::Reference< uno::XInterface >() );
+-    m_nIndex = static_cast< sal_Int16 >( index );
+-    return uno::makeAny( uno::Reference< vba::XPropValue > ( new ScVbaPropValue( this ) ) );
++    m_nIndex = nIndex;
++    return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) );
+ }
  
- 	// XCollection
-diff --git sc/source/ui/vba/vbafillformat.cxx sc/source/ui/vba/vbafillformat.cxx
-index 1b10ec8..ed7fcd2 100644
---- sc/source/ui/vba/vbafillformat.cxx
-+++ sc/source/ui/vba/vbafillformat.cxx
-@@ -30,14 +30,14 @@
- #include <com/sun/star/beans/XPropertySet.hpp>
- #include <com/sun/star/awt/Gradient.hpp>
- #include <com/sun/star/awt/GradientStyle.hpp>
--#include <org/openoffice/office/MsoGradientStyle.hpp>
-+#include <ooo/vba/office/MsoGradientStyle.hpp>
- #include "vbafillformat.hxx"
- #include "vbacolorformat.hxx"
+ // Methods
+ void SAL_CALL 
+ ScVbaListBox::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
+ {
+-	if ( pvargItem.hasValue()  )
+-	{
+-		uno::Sequence< rtl::OUString > sList;
+-		m_xProps->getPropertyValue( ITEMS ) >>= sList;
+-
+-		sal_Int32 nIndex = sList.getLength();
+-
+-		if ( pvargIndex.hasValue() )
+-			pvargIndex >>= nIndex;
+-
+-		rtl::OUString sString = getAnyAsString( pvargItem );
+-
+-		// if no index specified or item is to be appended to end of 
+-		// list just realloc the array and set the last item
+-		if ( nIndex  == sList.getLength() )
+-		{
+-			sal_Int32 nOldSize = sList.getLength();
+-			sList.realloc( nOldSize + 1 );
+-			sList[ nOldSize ] = sString; 
++	mpListHelper->AddItem( pvargItem, pvargIndex );
+ 		}
+-		else
+-		{
+-			// just copy those elements above the one to be inserted
+-			std::vector< rtl::OUString > sVec;
+-			// reserve just the amount we need to copy
+-			sVec.reserve( sList.getLength() - nIndex );
  
--using namespace org::openoffice;
-+using namespace ooo::vba;
- using namespace com::sun::star;
+-			// point at first element to copy
+-			rtl::OUString* pString = sList.getArray() + nIndex;
+-			const rtl::OUString* pEndString = sList.getArray() + sList.getLength();
+-			// insert the new element
+-			sVec.push_back( sString );
+-			// copy elements	
+-			for ( ; pString != pEndString; ++pString )
+-				sVec.push_back( *pString );
+-		
+-			sList.realloc(  sList.getLength() + 1 );
+-
+-			// point at first element to be overwritten
+-			pString = sList.getArray() + nIndex;
+-			pEndString = sList.getArray() + sList.getLength();
+-			std::vector< rtl::OUString >::iterator it = sVec.begin();
+-			for ( ; pString != pEndString; ++pString, ++it)
+-				*pString = *it;	
+-			//
+-		}
+-
+-		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
+-		
+-	}
++void SAL_CALL 
++ScVbaListBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
++{
++	mpListHelper->removeItem( index );
+ }
  
--ScVbaFillFormat::ScVbaFillFormat( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaFillFormat_BASE( xParent, xContext ), m_xShape( xShape )
-+ScVbaFillFormat::ScVbaFillFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaFillFormat_BASE( xParent, xContext ), m_xShape( xShape )
+ void SAL_CALL 
+ ScVbaListBox::Clear(  ) throw (uno::RuntimeException)
  {
-     m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
-     m_nFillStyle = drawing::FillStyle_SOLID;
-@@ -195,7 +195,7 @@ ScVbaFillFormat::getServiceNames()
-     if ( aServiceNames.getLength() == 0 )
-     {
-         aServiceNames.realloc( 1 );
--        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.FillFormat" ) );
-+        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.FillFormat" ) );
+-	// urk, setValue doesn't seem to work !!
+-	//setValue( uno::makeAny( sal_Int16() ) );
+-	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
++	mpListHelper->Clear();
+ }
++
++// this is called when something like the following vba code is used
++// to set the selected state of particular entries in the Listbox
++// ListBox1.Selected( 3 ) = false
+ //PropListener
+ void 
+ ScVbaListBox::setValueEvent( const uno::Any& value )
+@@ -234,7 +191,7 @@
+         throw uno::RuntimeException( rtl::OUString::createFromAscii(
+                     "Invalid type\n. need boolean." ), uno::Reference< uno::XInterface >() );
+     uno::Sequence< sal_Int16 > nList;
+-    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
++    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList;
+     sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
+     sal_Int16 nIndex = m_nIndex;
+     for( sal_Int16 i = 0; i < nLength; i++ )
+@@ -250,7 +207,8 @@
+                     nList[i] = nList[i + 1];
+                 }
+                 nList.realloc( nLength - 1 );
+-                m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
++                //m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
++		m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nList ) );
+                 return;
+             }
+         }
+@@ -271,6 +229,10 @@
      }
-     return aServiceNames;
  }
-diff --git sc/source/ui/vba/vbafillformat.hxx sc/source/ui/vba/vbafillformat.hxx
-index 9531e4f..88fcfc0 100644
---- sc/source/ui/vba/vbafillformat.hxx
-+++ sc/source/ui/vba/vbafillformat.hxx
-@@ -32,17 +32,17 @@
- 
- #include <com/sun/star/drawing/XShape.hpp>
- #include <com/sun/star/drawing/FillStyle.hpp>
--#include <org/openoffice/msforms/XFillFormat.hpp>
-+#include <ooo/vba/msforms/XFillFormat.hpp>
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1< oo::msforms::XFillFormat > ScVbaFillFormat_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::msforms::XFillFormat > ScVbaFillFormat_BASE;
  
- class ScVbaFillFormat : public ScVbaFillFormat_BASE
++// this is called when something like the following vba code is used
++// to determine the selected state of particular entries in the Listbox
++// msgbox ListBox1.Selected( 3 )
++
+ css::uno::Any 
+ ScVbaListBox::getValueEvent()
  {
- private:
-     css::uno::Reference< css::drawing::XShape > m_xShape;
-     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
--    css::uno::Reference< oo::msforms::XColorFormat > m_xColorFormat;
-+    css::uno::Reference< ov::msforms::XColorFormat > m_xColorFormat;
-     css::drawing::FillStyle m_nFillStyle;
-     sal_Int32 m_nForeColor;
-     sal_Int32 m_nBackColor;
-@@ -54,7 +54,7 @@ protected:
-     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- 
- public:
--    ScVbaFillFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
-+    ScVbaFillFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
- 
-     void setForeColorAndInternalStyle( sal_Int32 nForeColor ) throw (css::uno::RuntimeException);
-     // Attributes
-@@ -66,8 +66,8 @@ public:
-     // Methods
-     virtual void SAL_CALL Solid() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL TwoColorGradient( sal_Int32 style, sal_Int32 variant ) throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
- 
- };
+@@ -287,3 +249,41 @@
  
-diff --git sc/source/ui/vba/vbafont.cxx sc/source/ui/vba/vbafont.cxx
-index 12479ff..2f420d5 100644
---- sc/source/ui/vba/vbafont.cxx
-+++ sc/source/ui/vba/vbafont.cxx
-@@ -32,13 +32,18 @@
- #include <com/sun/star/awt/FontUnderline.hpp>
- #include <com/sun/star/awt/FontStrikeout.hpp>
- #include <com/sun/star/awt/FontSlant.hpp>
--#include <org/openoffice/excel/XlColorIndex.hpp>
--#include <org/openoffice/excel/XlUnderlineStyle.hpp>
-+#include <com/sun/star/text/XSimpleText.hpp>
-+#include <com/sun/star/table/XCellRange.hpp>
-+#include <com/sun/star/table/XCell.hpp>
-+#include <com/sun/star/table/XColumnRowRange.hpp>
-+#include <ooo/vba/excel/XlColorIndex.hpp>
-+#include <ooo/vba/excel/XlUnderlineStyle.hpp>
- #include <svtools/itemset.hxx>
- #include "vbafont.hxx"
- #include "scitems.hxx"
-+#include "cellsuno.hxx"
+     return uno::makeAny( sal_False );
+ }
++
++void SAL_CALL
++ScVbaListBox::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
++{
++	ScVbaControl::setRowSource( _rowsource );
++	mpListHelper->setRowSource( _rowsource );
++}
++
++sal_Int32 SAL_CALL
++ScVbaListBox::getListCount() throw (uno::RuntimeException)
++{
++	return mpListHelper->getListCount();
++}
++
++uno::Any SAL_CALL 
++ScVbaListBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
++{
++	return mpListHelper->List( pvargIndex, pvarColumn );
++}
++
++rtl::OUString& 
++ScVbaListBox::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaListBox") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaListBox::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ScVbaListBox" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbalabel.hxx
+===================================================================
+--- sc/source/ui/vba/vbalabel.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbalabel.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,20 +30,27 @@
+ #ifndef SC_VBA_LABEL_HXX
+ #define SC_VBA_LABEL_HXX
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/msforms/XLabel.hpp>
++#include <ooo/vba/msforms/XLabel.hpp>
  
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
+ #include "vbacontrol.hxx"
+ #include "vbahelper.hxx"
++#include <cppuhelper/implbase2.hxx>
  
- // use local constants there is no need to expose these constants
-@@ -64,14 +69,58 @@ const sal_Int8 SUBSCRIPTHEIGHT = 58;
- // specifies a hight of normal font
- const short NORMALHEIGHT = 100;
+-typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XLabel > LabelImpl_BASE;
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XLabel, css::script::XDefaultProperty  > LabelImpl_BASE;
  
--ScVbaFont::ScVbaFont( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, uno::Reference< beans::XPropertySet > xPropertySet, SfxItemSet* pDataSet  ) throw ( uno::RuntimeException ) : ScVbaFont_BASE( xParent, xContext ), mxFont( xPropertySet, css::uno::UNO_QUERY_THROW ), mPalette( dPalette ),  mpDataSet( pDataSet )
-+ScVbaFont::ScVbaFont( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, uno::Reference< beans::XPropertySet > xPropertySet, ScCellRangeObj* pRangeObj  ) throw ( uno::RuntimeException ) : ScVbaFont_BASE( xParent, xContext ), mxFont( xPropertySet, css::uno::UNO_QUERY_THROW ), mPalette( dPalette ),  mpRangeObj( pRangeObj )
+ class ScVbaLabel : public LabelImpl_BASE
  {
- }
- 
-+SfxItemSet*  
-+ScVbaFont::GetDataSet()
+ public:
+-    ScVbaLabel( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
++    ScVbaLabel( const css::uno::Reference< ov::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, ov::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);
+     virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    // XDefaultProperty
++    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ };
+ #endif //SC_VBA_LABEL_HXX
+Index: sc/source/ui/vba/vbapagebreak.hxx
+===================================================================
+--- sc/source/ui/vba/vbapagebreak.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbapagebreak.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,87 @@
++/*************************************************************************
++ *
++ * 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_PAGEBREAK_HXX
++#define SC_VBA_PAGEBREAK_HXX
++
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/excel/XPageBreak.hpp>
++#include <ooo/vba/excel/XHPageBreak.hpp>
++#include <ooo/vba/excel/XRange.hpp>
++#include <com/sun/star/uno/XComponentContext.hpp>
++#include <com/sun/star/script/BasicErrorException.hpp>
++#include <com/sun/star/sheet/TablePageBreakData.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include "vbahelperinterface.hxx"
++
++template< typename Ifc1 >
++class ScVbaPageBreak : public InheritedHelperInterfaceImpl1< Ifc1 >
 +{
-+    SfxItemSet* pDataSet = ScVbaCellRangeAccess::GetDataSet( mpRangeObj );
-+    return pDataSet;
-+}
++typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE;
++protected:
++	css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet;
++    css::sheet::TablePageBreakData maTablePageBreakData;
++public:
++	ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, 
++                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
++            		css::uno::Reference< css::beans::XPropertySet >& xProps,
++                    css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException);
++	virtual ~ScVbaPageBreak(){}
++	
++	virtual sal_Int32 SAL_CALL getType( ) throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setType(sal_Int32 type) throw (css::uno::RuntimeException);
 +
-+ScVbaFont::~ScVbaFont()
++    virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::excel::XRange> SAL_CALL Location() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++
++
++typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE;
++
++class ScVbaHPageBreak :  public ScVbaHPageBreak_BASE
 +{
-+}
++public:
++	ScVbaHPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, 
++                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
++            		css::uno::Reference< css::beans::XPropertySet >& xProps,
++                    css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException):
++              ScVbaHPageBreak_BASE( xParent,xContext,xProps,aTablePageBreakData ){}
++            
++	virtual ~ScVbaHPageBreak(){}
++	
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
 +
++#endif
+Index: sc/source/ui/vba/vbamultipage.cxx
+===================================================================
+--- sc/source/ui/vba/vbamultipage.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbamultipage.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,132 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "vbamultipage.hxx"
++#include <ooo/vba/XCollection.hpp>
++#include "vbapages.hxx"
++#include <vector>
 +
-+uno::Reference< beans::XPropertySet > lcl_TextProperties( uno::Reference< table::XCell >& xIf ) throw ( uno::RuntimeException )
-+{
-+	uno::Reference< text::XTextRange > xTxtRange( xIf, uno::UNO_QUERY_THROW );
-+	uno::Reference< text::XSimpleText > xTxt( xTxtRange->getText(), uno::UNO_QUERY_THROW ) ;
-+	uno::Reference< beans::XPropertySet > xProps( xTxt->createTextCursor(), uno::UNO_QUERY_THROW );
-+	return xProps;
-+}
- void SAL_CALL
- ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeException )
- {
-+	// #FIXEME create some sort of generic get/set code where 
-+	// you can pass a functor
-+	// get/set - Super/sub script code is exactly the same
-+	// except for the call applied at each cell position
-+        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
-+        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
-+	if ( !xCell.is() )
-+	{
-+		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
-+		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
-+		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
-+		for ( sal_Int32 col = 0; col < nCols; ++col )
-+		{
-+			for ( sal_Int32 row = 0; row < nRows; ++row )
-+			{
-+				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW );
-+				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
-+				aFont.setSuperscript( aValue );
-+			}
-+		}
-+		return;
- 
-+	}
-+        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
- 	sal_Bool bValue = sal_False;
- 	aValue >>= bValue;
- 	sal_Int16 nValue = NORMAL;
-@@ -82,21 +131,68 @@ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeExceptio
- 		nValue = SUPERSCRIPT;
- 	        nValue2 = SUPERSCRIPTHEIGHT;
- 	}
--	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
-- 	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
-+	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
-+ 	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
- }
- 
- uno::Any SAL_CALL
- ScVbaFont::getSuperscript() throw ( uno::RuntimeException )
- {
-+        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
-+        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
-+	if ( !xCell.is() )
-+	{
-+		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
-+		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
-+		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
-+		uno::Any aRes;
-+		for ( sal_Int32 col = 0; col < nCols; ++col )
-+		{
-+			for ( sal_Int32 row = 0; row < nRows; ++row )
-+			{
-+				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW );
-+				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
-+				if ( !col && !row )
-+					aRes = aFont.getSuperscript();
-+				else if ( aRes != aFont.getSuperscript() )
-+					return aNULL();
-+			}
-+		}
-+		return aRes;
++// uno servicename com.sun.star.awt.UnoControlProgressBarMode
++const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
++const rtl::OUString SVALUEMAX( RTL_CONSTASCII_USTRINGPARAM("ProgressValueMax") );
++const rtl::OUString SSTEP( RTL_CONSTASCII_USTRINGPARAM("Step") );
 +
-+	}
-+        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
-+	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
- 	short nValue = 0;
--	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
-+	xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
- 	return uno::makeAny( ( nValue == SUPERSCRIPT ) );
- }
- 
- void SAL_CALL
- ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException )
- {
-+        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
-+        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
-+	if ( !xCell.is() )
++typedef cppu::WeakImplHelper1< container::XIndexAccess > PagesImpl_Base;
++class PagesImpl : public PagesImpl_Base
++{
++	sal_Int32 mnPages;
++public:
++	PagesImpl( sal_Int32 nPages ) : mnPages( nPages ) {}
++	virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException) { return mnPages; }
++	virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, ::uno::RuntimeException)
 +	{
-+		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
-+		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
-+		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
-+		for ( sal_Int32 col = 0; col < nCols; ++col )
-+		{
-+			for ( sal_Int32 row = 0; row < nRows; ++row )
-+			{
-+				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW );
-+				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
-+				aFont.setSubscript( aValue );
-+			}
-+		}
-+		return;
-+
++		if ( Index < 0 || Index > mnPages )
++			throw lang::IndexOutOfBoundsException();
++		return uno::makeAny( uno::Reference< uno::XInterface >() );
 +	}
-+        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
-+	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
-+
- 	sal_Bool bValue = sal_False;
- 	aValue >>= bValue;
- 	sal_Int16 nValue = NORMAL;
-@@ -108,16 +204,42 @@ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException
- 	        nValue2 = SUBSCRIPTHEIGHT;
- 	}
- 
-- 	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
--	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
-+ 	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
-+	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
- 
- }
- 
- uno::Any SAL_CALL
- ScVbaFont::getSubscript() throw ( uno::RuntimeException )
- {
-+        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
-+        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
-+	if ( !xCell.is() )
++	// XElementAccess
++	virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException)
 +	{
-+		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
-+		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
-+		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
-+		uno::Any aRes;
-+		for ( sal_Int32 col = 0; col < nCols; ++col )
-+		{
-+			for ( sal_Int32 row = 0; row < nRows; ++row )
-+			{
-+				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW );
-+				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
-+				if ( !col && !row )
-+					aRes = aFont.getSubscript();
-+				else if ( aRes != aFont.getSubscript() )
-+					return aNULL();
-+			}
-+		}
-+		return aRes;
-+
++		// no Pages object yet #FIXME
++		//return msforms::XPage::static_type(0);
++		return uno::XInterface::static_type(0);
 +	}
-+        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
-+	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
-+
- 	short nValue = NORMAL;
--	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
-+	xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
- 	return uno::makeAny( ( nValue == SUBSCRIPT ) );
- }
- 
-@@ -130,8 +252,8 @@ ScVbaFont::setSize( const uno::Any& aValue ) throw( uno::RuntimeException )
- uno::Any SAL_CALL
- ScVbaFont::getSize() throw ( uno::RuntimeException )
- {
--	if ( mpDataSet )
--		if (  mpDataSet->GetItemState( ATTR_FONT_HEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
- 			return aNULL();
-         return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharHeight" ) ) );
- }
-@@ -159,8 +281,8 @@ uno::Any SAL_CALL
- ScVbaFont::getColorIndex() throw ( uno::RuntimeException )
- {
- 	sal_Int32 nColor = 0;
--	if ( mpDataSet )
--		if (  mpDataSet->GetItemState( ATTR_FONT_COLOR, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT_COLOR, TRUE, NULL) == SFX_ITEM_DONTCARE )
- 			return aNULL();
- 
- 	// getColor returns Xl ColorValue, need to convert it to OO val
-@@ -224,22 +346,54 @@ ScVbaFont::getStandardFont() throw ( uno::RuntimeException )
- }
- 
- void SAL_CALL
--ScVbaFont::setFontStyle( const uno::Any& /*aValue*/ ) throw( uno::RuntimeException )
-+ScVbaFont::setFontStyle( const uno::Any& aValue ) throw( uno::RuntimeException )
- {
--//XXX #TODO# #FIXME#
--	//mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharSize" ) ), ( uno::Any )aValue );
--	throw uno::RuntimeException(
--		rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setFontStyle not supported") ), uno::Reference< uno::XInterface >() );
-+    sal_Bool bBold = sal_False;
-+    sal_Bool bItalic = sal_False;
++	virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
++	{
++		return ( mnPages > 0 );
++	}
++};
++uno::Reference< container::XIndexAccess > 
++ScVbaMultiPage::getPages( sal_Int32 nPages )
++{
++	return new PagesImpl( nPages );
++}
 +
-+    rtl::OUString aStyles;
-+    aValue >>= aStyles;
++ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< ov::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
++    setValue(getValue());
++}
 +
-+    std::vector< rtl::OUString > aTokens;
-+    sal_Int32 nIndex = 0;
-+    do
-+    {
-+        rtl::OUString aToken = aStyles.getToken( 0, ' ', nIndex );
-+        aTokens.push_back( aToken );
-+    }while( nIndex >= 0 );
-+    
-+    std::vector< rtl::OUString >::iterator it;
-+    for( it = aTokens.begin(); it != aTokens.end(); ++it )
-+    {
-+        if( (*it).equalsIgnoreAsciiCaseAscii( "Bold" ) )
-+            bBold = sal_True;
++// Attributes
++sal_Int32 SAL_CALL 
++ScVbaMultiPage::getValue() throw (css::uno::RuntimeException)
++{
++    sal_Int32 nValue = 0;
++    m_xProps->getPropertyValue( SVALUE ) >>= nValue;
++    return nValue;
++}
 +
-+        if( (*it).equalsIgnoreAsciiCaseAscii( "Italic" ) )
-+            bItalic = sal_True;
++void SAL_CALL 
++ScVbaMultiPage::setValue( const sal_Int32 _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++    // track change in dialog ( dialog value is 1 based, 0 is a special value )
++    m_xProps->setPropertyValue( SVALUE, uno::makeAny( _value ) );
++    mxDialogProps->setPropertyValue( SSTEP, uno::makeAny( _value + 1) );
 +}
 +
-+    setBold( uno::makeAny( bBold ) );
-+    setItalic( uno::makeAny( bItalic ) );
- }
++
++rtl::OUString& 
++ScVbaMultiPage::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage") );
++	return sImplName;
++}
++
++uno::Any SAL_CALL 
++ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException)
++{
++	sal_Int32 nValue = 0;
++	m_xProps->getPropertyValue( SVALUEMAX ) >>= nValue;
++	uno::Reference< XCollection > xColl( new ScVbaPages( this, mxContext, getPages( nValue ) ) );
++	if ( !index.hasValue() )
++		return uno::makeAny( xColl );
++	return xColl->Item( uno::makeAny( index ), uno::Any() );
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaMultiPage::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.MultiPage" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbashapes.hxx
+===================================================================
+--- sc/source/ui/vba/vbashapes.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbashapes.hxx	(.../cws/npower11)	(revision 266650)
+@@ -33,13 +33,13 @@
+ #include <com/sun/star/drawing/XShapes.hpp>
+ #include <com/sun/star/drawing/XDrawPage.hpp>
+ #include <com/sun/star/container/XIndexAccess.hpp>
+-#include <org/openoffice/msforms/XShapes.hpp>
++#include <ooo/vba/msforms/XShapes.hpp>
  
+ #include "vbahelperinterface.hxx"
  
- uno::Any SAL_CALL
- ScVbaFont::getFontStyle() throw ( uno::RuntimeException )
- {
--//XXX
--	throw uno::RuntimeException(
--		rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getFontStyle not supported") ), uno::Reference< uno::XInterface >() );
--	// return uno::Any();
-+    rtl::OUStringBuffer aStyles;
-+    sal_Bool bValue = sal_False;
-+    getBold() >>= bValue;
-+    if( bValue )
-+        aStyles.appendAscii("Bold");
-+    
-+    getItalic() >>= bValue;
-+    if( bValue )
-+    {
-+        if( aStyles.getLength() )
-+            aStyles.appendAscii(" ");
-+        aStyles.appendAscii("Italic");
-+}
-+    return uno::makeAny( aStyles.makeStringAndClear() );
- }
+ #include "vbacollectionimpl.hxx"
  
- void SAL_CALL
-@@ -257,8 +411,8 @@ ScVbaFont::setBold( const uno::Any& aValue ) throw( uno::RuntimeException )
- uno::Any SAL_CALL
- ScVbaFont::getBold() throw ( uno::RuntimeException )
- {
--	if ( mpDataSet )
--		if (  mpDataSet->GetItemState( ATTR_FONT_WEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
- 			return aNULL();
+-typedef CollTestImplHelper< oo::msforms::XShapes > ScVbaShapes_BASE;
++typedef CollTestImplHelper< ov::msforms::XShapes > ScVbaShapes_BASE;
  
- 	double fValue = 0.0;
-@@ -303,8 +457,8 @@ ScVbaFont::setUnderline( const uno::Any& aValue ) throw ( uno::RuntimeException
- uno::Any SAL_CALL
- ScVbaFont::getUnderline() throw ( uno::RuntimeException )
+ class ScVbaShapes : public ScVbaShapes_BASE
  {
--	if ( mpDataSet )
--		if (  mpDataSet->GetItemState( ATTR_FONT_UNDERLINE, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, TRUE, NULL) == SFX_ITEM_DONTCARE )
- 			return aNULL();
+@@ -57,10 +57,10 @@
+     css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, css::uno::Any aRange ) throw (css::uno::RuntimeException);
+     rtl::OUString createName( rtl::OUString sName );
+     //TODO helperapi using a writer document
+-    //css::awt::Point calculateTopLeftMargin( css::uno::Reference< oo::vba::XHelperInterface > xDocument );
++    //css::awt::Point calculateTopLeftMargin( css::uno::Reference< ov::XHelperInterface > xDocument );
+     
+ public:
+-    ScVbaShapes( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes );
++    ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes );
+     static void setDefaultShapeProperties( css::uno::Reference< css::drawing::XShape > xShape ) throw (css::uno::RuntimeException);
+     static void setShape_NameProperty( css::uno::Reference< css::drawing::XShape > xShape, rtl::OUString sName );
+     //XEnumerationAccess
+@@ -71,7 +71,7 @@
+     //helper::calc
+     virtual css::uno::Any SAL_CALL AddLine( sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_Int32 endY ) throw (css::uno::RuntimeException);
+     virtual css::uno::Any SAL_CALL AddShape( sal_Int32 _nType, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::msforms::XShapeRange > SAL_CALL Range( const css::uno::Any& shapes ) throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::msforms::XShapeRange > SAL_CALL Range( const css::uno::Any& shapes ) throw (css::uno::RuntimeException);
+     // ScVbaCollectionBaseImpl
+     virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+     virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbapane.hxx
+===================================================================
+--- sc/source/ui/vba/vbapane.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapane.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,11 +32,11 @@
  
- 	sal_Int32 nValue = awt::FontUnderline::NONE;
-@@ -341,8 +495,8 @@ ScVbaFont::setStrikethrough( const uno::Any& aValue ) throw ( uno::RuntimeExcept
- uno::Any SAL_CALL
- ScVbaFont::getStrikethrough() throw ( uno::RuntimeException )
- {
--	if ( mpDataSet )
--		if (  mpDataSet->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, NULL) == SFX_ITEM_DONTCARE )
- 			return aNULL();
- 	short nValue = 0;
- 	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharStrikeout" ) ) ) >>= nValue;
-@@ -358,8 +512,8 @@ ScVbaFont::setShadow( const uno::Any& aValue ) throw ( uno::RuntimeException )
- uno::Any SAL_CALL
- ScVbaFont::getShadow() throw (uno::RuntimeException)
- {
--	if ( mpDataSet )
--		if (  mpDataSet->GetItemState( ATTR_FONT_SHADOWED, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, TRUE, NULL) == SFX_ITEM_DONTCARE )
- 			return aNULL();
- 	return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharShadowed" ) ) );
- }
-@@ -378,13 +532,13 @@ ScVbaFont::setItalic( const uno::Any& aValue ) throw ( uno::RuntimeException )
- uno::Any SAL_CALL
- ScVbaFont::getItalic() throw ( uno::RuntimeException )
- {
--	if ( mpDataSet )
--		if (  mpDataSet->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE )
- 			return aNULL();
+ #include<cppuhelper/implbase1.hxx>
+ #include<com/sun/star/sheet/XViewPane.hpp>
+-#include<org/openoffice/excel/XPane.hpp>
++#include<ooo/vba/excel/XPane.hpp>
  
--	short nValue = 0;
--	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ) >>= nValue;
--	return uno::makeAny( nValue == awt::FontSlant_ITALIC );
-+    awt::FontSlant aFS;
-+	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ) >>= aFS;
-+	return uno::makeAny( aFS == awt::FontSlant_ITALIC );
- }
+ #include"vbahelper.hxx"
  
- void  SAL_CALL
-@@ -398,8 +552,8 @@ ScVbaFont::setName( const uno::Any& aValue ) throw ( uno::RuntimeException )
- uno::Any SAL_CALL
- ScVbaFont::getName() throw ( uno::RuntimeException )
+-typedef cppu::WeakImplHelper1< oo::excel::XPane > PaneImpl_Base;
++typedef cppu::WeakImplHelper1< ov::excel::XPane > PaneImpl_Base;
+ 
+ class ScVbaPane : public PaneImpl_Base
  {
--	if ( mpDataSet )
--		if (  mpDataSet->GetItemState( ATTR_FONT, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT, TRUE, NULL) == SFX_ITEM_DONTCARE )
- 			return aNULL();
- 	return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontName" ) ) );
- }
-@@ -416,6 +570,22 @@ ScVbaFont::setColor( const uno::Any& _color  ) throw (uno::RuntimeException)
+Index: sc/source/ui/vba/vbapictureformat.hxx
+===================================================================
+--- sc/source/ui/vba/vbapictureformat.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapictureformat.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,10 +32,10 @@
+ 
+ #include <com/sun/star/drawing/XShape.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+-#include <org/openoffice/msforms/XPictureFormat.hpp>
++#include <ooo/vba/msforms/XPictureFormat.hpp>
+ #include "vbahelperinterface.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::msforms::XPictureFormat > ScVbaPictureFormat_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::msforms::XPictureFormat > ScVbaPictureFormat_BASE;
+ 
+ class ScVbaPictureFormat : public ScVbaPictureFormat_BASE
  {
- 	mxFont->setPropertyValue(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" ) ) , XLRGBToOORGB(_color));
- }
-+
-+void  SAL_CALL
-+ScVbaFont::setOutlineFont( const uno::Any& aValue ) throw ( uno::RuntimeException )
-+{
-+	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ), aValue );
-+}
-+
-+uno::Any SAL_CALL
-+ScVbaFont::getOutlineFont() throw (uno::RuntimeException)
-+{
-+	if ( GetDataSet() )
-+		if (  GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, TRUE, NULL) == SFX_ITEM_DONTCARE )
-+			return aNULL();
-+	return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ) );
-+}
-+
- rtl::OUString&
- ScVbaFont::getServiceImplName()
+@@ -48,7 +48,7 @@
+ private:
+     void checkParameterRangeInDouble( double nRange, double nMin, double nMax ) throw (css::uno::RuntimeException);
+ public:
+-    ScVbaPictureFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > xShape ) throw( css::lang::IllegalArgumentException );
++    ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > xShape ) throw( css::lang::IllegalArgumentException );
+ 
+     // Attributes
+     virtual double SAL_CALL getBrightness() throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbawindows.cxx
+===================================================================
+--- sc/source/ui/vba/vbawindows.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbawindows.cxx	(.../cws/npower11)	(revision 266650)
+@@ -40,16 +40,16 @@
+ //#include "vbaworkbook.hxx"
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+ typedef  std::hash_map< rtl::OUString,
+ sal_Int32, ::rtl::OUStringHash,
+ ::std::equal_to< ::rtl::OUString > > NameIndexHash;
+ 
+ 
+-uno::Reference< vba::XHelperInterface > lcl_createWorkbookHIParent( const uno::Reference< frame::XModel >& xModel, const uno::Reference< uno::XComponentContext >& xContext )
++uno::Reference< XHelperInterface > lcl_createWorkbookHIParent( const uno::Reference< frame::XModel >& xModel, const uno::Reference< uno::XComponentContext >& xContext )
  {
-@@ -430,7 +600,7 @@ ScVbaFont::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Font" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Font" ) );
- 	}
- 	return aServiceNames;
+-	return new ScVbaWorkbook( uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext,  xModel );
++	return new ScVbaWorkbook( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext,  xModel );
  }
-diff --git sc/source/ui/vba/vbafont.hxx sc/source/ui/vba/vbafont.hxx
-index 665e060..f73d729 100644
---- sc/source/ui/vba/vbafont.hxx
-+++ sc/source/ui/vba/vbafont.hxx
-@@ -32,23 +32,25 @@
  
- #include <cppuhelper/implbase1.hxx>
+ uno::Any ComponentToWindow( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext )
+@@ -139,7 +139,7 @@
+ 			{
+ 				m_windows.push_back( xNext );
+ 				uno::Reference< frame::XModel > xModel( xNext, uno::UNO_QUERY_THROW ); // that the spreadsheetdocument is a xmodel is a given
+-                uno::Reference< vba::XHelperInterface > xTemp;  // temporary needed for g++ 3.3.5
++                uno::Reference< XHelperInterface > xTemp;  // temporary needed for g++ 3.3.5
+ 				ScVbaWindow window( xTemp,  m_xContext, xModel );
+ 				rtl::OUString sCaption;
+ 				window.getCaption() >>= sCaption;
+@@ -208,7 +208,7 @@
+ };
  
--#include <org/openoffice/excel/XFont.hpp>
-+#include <ooo/vba/excel/XFont.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
- #include "vbahelperinterface.hxx"
- #include "vbapalette.hxx"
  
- class ScTableSheetsObj;
-+class ScCellRangeObj;
+-ScVbaWindows::ScVbaWindows( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  ):  ScVbaWindows_BASE( xParent, xContext, xIndexAccess ) 
++ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  ):  ScVbaWindows_BASE( xParent, xContext, xIndexAccess ) 
+ {
+ }
  
--typedef  InheritedHelperInterfaceImpl1< oo::excel::XFont > ScVbaFont_BASE;
-+typedef  InheritedHelperInterfaceImpl1< ov::excel::XFont > ScVbaFont_BASE;
+@@ -230,11 +230,11 @@
+ 	return excel::XWindows::static_type(0);
+ }
  
- class ScVbaFont : public ScVbaFont_BASE
+-uno::Reference< vba::XCollection >
++uno::Reference< XCollection >
+ ScVbaWindows::Windows( const css::uno::Reference< css::uno::XComponentContext >& xContext )
  {
-     css::uno::Reference< css::beans::XPropertySet > mxFont;
-     ScVbaPalette mPalette;
--    SfxItemSet* mpDataSet;
-+    ScCellRangeObj* mpRangeObj;
-+    SfxItemSet*  GetDataSet();
- public:
--	ScVbaFont( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, css::uno::Reference< css::beans::XPropertySet > xPropertySet, SfxItemSet* pDataSet = NULL ) throw ( css::uno::RuntimeException );
--	virtual ~ScVbaFont() {}
-+	ScVbaFont( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, css::uno::Reference< css::beans::XPropertySet > xPropertySet, ScCellRangeObj* pRangeObj = NULL ) throw ( css::uno::RuntimeException );
-+	virtual ~ScVbaFont();// {}
- 
- 	// Attributes
-     virtual css::uno::Any SAL_CALL getSize() throw (css::uno::RuntimeException);
-@@ -79,6 +81,8 @@ public:
-     virtual void SAL_CALL setName( const css::uno::Any& _name ) throw (css::uno::RuntimeException);
-     virtual css::uno::Any SAL_CALL getColor() throw (css::uno::RuntimeException) ;
-     virtual void SAL_CALL setColor( const css::uno::Any& _color ) throw (css::uno::RuntimeException) ;
-+    virtual css::uno::Any SAL_CALL getOutlineFont() throw (css::uno::RuntimeException) ;
-+    virtual void SAL_CALL setOutlineFont( const css::uno::Any& _outlinefont ) throw (css::uno::RuntimeException) ;
-     // XHelperInterface
-     virtual rtl::OUString& getServiceImplName();
-     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-diff --git sc/source/ui/vba/vbaformat.cxx sc/source/ui/vba/vbaformat.cxx
-index b08d516..16cbf3a 100644
---- sc/source/ui/vba/vbaformat.cxx
-+++ sc/source/ui/vba/vbaformat.cxx
-@@ -28,11 +28,11 @@
-  *
-  ************************************************************************/
- #include "vbaformat.hxx"
--#include <org/openoffice/excel/XStyle.hpp>
--#include <org/openoffice/excel/XlVAlign.hpp>
--#include <org/openoffice/excel/XlHAlign.hpp>
--#include <org/openoffice/excel/XlOrientation.hpp>
--#include <org/openoffice/excel/Constants.hpp>
-+#include <ooo/vba/excel/XStyle.hpp>
-+#include <ooo/vba/excel/XlVAlign.hpp>
-+#include <ooo/vba/excel/XlHAlign.hpp>
-+#include <ooo/vba/excel/XlOrientation.hpp>
-+#include <ooo/vba/excel/Constants.hpp>
- #include <com/sun/star/table/CellVertJustify.hpp>
- #include <com/sun/star/table/CellHoriJustify.hpp>
- #include <com/sun/star/table/CellOrientation.hpp>
-@@ -49,14 +49,14 @@
+ 	uno::Reference< container::XIndexAccess > xIndex( new WindowsAccessImpl( xContext ) );
+-	return  new ScVbaWindows( uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext , xIndex );	
++	return  new ScVbaWindows( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext , xIndex );	
+ }
  
- #include "unonames.hxx"
+ void SAL_CALL 
+@@ -258,7 +258,7 @@
+ 	if ( sNames.getLength() == 0 )
+ 	{
+ 		sNames.realloc( 1 );
+-		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Windows") );
++		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Windows") );
+ 	}
+ 	return sNames;
+ }
+Index: sc/source/ui/vba/vbaradiobutton.cxx
+===================================================================
+--- sc/source/ui/vba/vbaradiobutton.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaradiobutton.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,12 +31,12 @@
+ #include <vector>
  
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
  
- #define FORMATSTRING "FormatString"
- #define LOCALE "Locale"
  
- template< typename Ifc1 >
--ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( sal_False )
-+ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( sal_False )
+ 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< 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 )
  {
- 	try
- 	{
-@@ -342,7 +342,7 @@ uno::Any SAL_CALL
- ScVbaFormat<Ifc1>::Borders( const uno::Any& Index ) throw (script::BasicErrorException, uno::RuntimeException )
+ }
+ 
+@@ -55,22 +55,53 @@
+     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ }
+ 
+-sal_Bool SAL_CALL 
++uno::Any SAL_CALL 
+ ScVbaRadioButton::getValue() throw (css::uno::RuntimeException)
  {
- 	ScVbaPalette aPalette( getDocShell( mxModel ) );	
--	uno::Reference< vba::XCollection > xColl =  new ScVbaBorders( thisHelperIface(), ScVbaFormat_BASE::mxContext, uno::Reference< table::XCellRange >( mxPropertySet, uno::UNO_QUERY_THROW ), aPalette );
-+	uno::Reference< XCollection > xColl =  new ScVbaBorders( thisHelperIface(), ScVbaFormat_BASE::mxContext, uno::Reference< table::XCellRange >( mxPropertySet, uno::UNO_QUERY_THROW ), aPalette );
+-    sal_Bool bValue = sal_False;
+     sal_Int16 nValue = -1;
+     m_xProps->getPropertyValue( STATE ) >>= nValue;
+     if( nValue != 0 )
+-        bValue = sal_True;
+-    return bValue;
++        nValue = -1;
++//    return uno::makeAny( nValue ); 
++// I must be missing something MSO says value should be -1 if selected, 0 if not
++// selected
++    return uno::makeAny( ( nValue == -1 ) ? sal_True : sal_False ); 
++
+ }
  
- 	if ( Index.hasValue() )
- 	{ 
-@@ -791,7 +791,7 @@ ScVbaFormat<Ifc1>::getServiceNames()
-         if ( aServiceNames.getLength() == 0 )
-         {
-                 aServiceNames.realloc( 1 );
--                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Format" ) );
-+                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Format" ) );
-         }
-         return aServiceNames;
+ void SAL_CALL 
+-ScVbaRadioButton::setValue( sal_Bool _value ) throw (css::uno::RuntimeException)
++ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
+ {
+     sal_Int16 nValue = 0;
+-    if( _value )
++    sal_Bool bValue = sal_False;
++    if( _value >>= nValue )
++    {
++        if( nValue == -1)
+         nValue = 1;
++    }
++    else if ( _value >>= bValue )
++    {
++        if ( bValue )
++            nValue = 1;
++    }
+     m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
  }
-diff --git sc/source/ui/vba/vbaformat.hxx sc/source/ui/vba/vbaformat.hxx
-index e9f4aa0..a88687d 100644
---- sc/source/ui/vba/vbaformat.hxx
-+++ sc/source/ui/vba/vbaformat.hxx
++
++rtl::OUString& 
++ScVbaRadioButton::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaRadioButton::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.RadioButton" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbacommandbars.hxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbars.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacommandbars.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,79 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_COMMANDBARS_HXX
++#define SC_VBA_COMMANDBARS_HXX
++
++#include <ooo/vba/XCommandBar.hpp>
++#include <ooo/vba/XCommandBars.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
++
++#include <cppuhelper/implbase1.hxx>
++
++#include "vbahelperinterface.hxx"
++#include "vbacollectionimpl.hxx"
++
++typedef CollTestImplHelper< ov::XCommandBars > CommandBars_BASE;
++
++class ScVbaCommandBars : public CommandBars_BASE
++{
++private:
++    css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
++    rtl::OUString m_sModuleName;
++    void retrieveObjects() throw( css::uno::RuntimeException );
++public:
++    ScVbaCommandBars( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::container::XIndexAccess > xIndexAccess );
++
++    sal_Bool checkToolBarExist( rtl::OUString sToolBarName );
++    rtl::OUString GetModuleName(){ return m_sModuleName; };
++    css::uno::Reference< css::container::XNameAccess > GetWindows() 
++    { 
++        retrieveObjects();
++        return m_xNameAccess; 
++    };
++    // XCommandBars
++    virtual css::uno::Reference< ov::XCommandBar > SAL_CALL Add( const css::uno::Any& Name, const css::uno::Any& Position, const css::uno::Any& MenuBar, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++    // XEnumerationAccess
++    virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
++    virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
++
++    virtual sal_Int32 SAL_CALL getCount() throw(css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL Item( const css::uno::Any& aIndex, const css::uno::Any& /*aIndex2*/ ) throw( css::uno::RuntimeException);
++    // XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++
++#endif//SC_VBA_COMMANDBARS_HXX
+Index: sc/source/ui/vba/vbaformat.hxx
+===================================================================
+--- sc/source/ui/vba/vbaformat.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaformat.hxx	(.../cws/npower11)	(revision 266650)
 @@ -29,7 +29,7 @@
   ************************************************************************/
  #ifndef SC_VBA_FORMAT_HXX
@@ -17662,7 +13897,7 @@
  #include <com/sun/star/beans/XPropertySet.hpp>
  #include <com/sun/star/util/XNumberFormatsSupplier.hpp> 
  #include <com/sun/star/util/XNumberFormats.hpp>
-@@ -64,16 +64,16 @@ protected:
+@@ -64,16 +64,16 @@
  	void initializeNumberFormats() throw ( css::script::BasicErrorException );
  	void setNumberFormat( css::lang::Locale _aLocale, const rtl::OUString& _sFormatString) throw( css::script::BasicErrorException );
  public:
@@ -17683,225 +13918,151 @@
  	virtual void SAL_CALL setNumberFormat( const css::uno::Any& NumberFormat ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
  	virtual css::uno::Any SAL_CALL getNumberFormat(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
  	virtual void SAL_CALL setNumberFormatLocal( const css::uno::Any& NumberFormatLocal ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbaformatcondition.cxx sc/source/ui/vba/vbaformatcondition.cxx
-index 29d1e76..047522a 100644
---- sc/source/ui/vba/vbaformatcondition.cxx
-+++ sc/source/ui/vba/vbaformatcondition.cxx
-@@ -29,9 +29,9 @@
-  ************************************************************************/
- #include "vbaformatcondition.hxx"
- #include "vbaformatconditions.hxx"
--#include <org/openoffice/excel/XlFormatConditionType.hpp>
-+#include <ooo/vba/excel/XlFormatConditionType.hpp>
+Index: sc/source/ui/vba/vbaworksheets.cxx
+===================================================================
+--- sc/source/ui/vba/vbaworksheets.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaworksheets.cxx	(.../cws/npower11)	(revision 266650)
+@@ -48,7 +48,7 @@
+ #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ 
+-#include <org/openoffice/excel/XApplication.hpp>
++#include <ooo/vba/excel/XApplication.hpp>
+ #include <tools/string.hxx>
+ #include "tabvwsh.hxx"
+ 
+@@ -56,7 +56,7 @@
+ #include "vbaworksheet.hxx"
+ #include "vbaworkbook.hxx"
  
 -using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
  using namespace ::com::sun::star;
  
- ScVbaFormatConditions* 
-@@ -42,7 +42,7 @@ lcl_getScVbaFormatConditionsPtr( const uno::Reference< excel::XFormatConditions
- 		DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString() );
- 	return pFormatConditions;
- }
--ScVbaFormatCondition::ScVbaFormatCondition(  const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, const uno::Reference< excel::XStyle >& _xStyle, const uno::Reference< excel::XFormatConditions >& _xFormatConditions, const uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException ) : ScVbaFormatCondition_BASE( xParent, xContext, uno::Reference< sheet::XSheetCondition >( _xSheetConditionalEntry, css::uno::UNO_QUERY_THROW ) ), moFormatConditions( _xFormatConditions ), mxStyle( _xStyle ), mxParentRangePropertySet( _xPropertySet )
-+ScVbaFormatCondition::ScVbaFormatCondition(  const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, const uno::Reference< excel::XStyle >& _xStyle, const uno::Reference< excel::XFormatConditions >& _xFormatConditions, const uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException ) : ScVbaFormatCondition_BASE( xParent, xContext, uno::Reference< sheet::XSheetCondition >( _xSheetConditionalEntry, css::uno::UNO_QUERY_THROW ) ), moFormatConditions( _xFormatConditions ), mxStyle( _xStyle ), mxParentRangePropertySet( _xPropertySet )
+ 
+@@ -148,9 +148,9 @@
+ class SheetsEnumeration : public EnumerationHelperImpl
  {
-         mxSheetConditionalEntries = lcl_getScVbaFormatConditionsPtr( moFormatConditions )->getSheetConditionalEntries();
+ 	uno::Reference< frame::XModel > m_xModel;
+-	uno::WeakReference< vba::XHelperInterface > m_xParent;
++	uno::WeakReference< XHelperInterface > m_xParent;
+ public:
+-	SheetsEnumeration( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel  ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ) {}
++	SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel  ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ) {}
  
-@@ -173,7 +173,7 @@ ScVbaFormatCondition::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.FormatCondition" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.FormatCondition" ) );
- 	}
- 	return aServiceNames;
+ 	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) 
+ 	{ 
+@@ -160,11 +160,11 @@
+ 
+ };
+ 
+-ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext,  xSheets ), mxModel( xModel ), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) 
++ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext,  xSheets ), mxModel( xModel ), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) 
+ {
  }
-diff --git sc/source/ui/vba/vbaformatcondition.hxx sc/source/ui/vba/vbaformatcondition.hxx
-index d80450c..efa392a 100644
---- sc/source/ui/vba/vbaformatcondition.hxx
-+++ sc/source/ui/vba/vbaformatcondition.hxx
-@@ -29,9 +29,9 @@
-  ************************************************************************/
- #ifndef SC_VBA_FORMATCONDITION_HXX
- #define SC_VBA_FORMATCONDITION_HXX
--#include <org/openoffice/excel/XFormatCondition.hpp>
--#include <org/openoffice/excel/XFormatConditions.hpp>
--#include <org/openoffice/excel/XStyle.hpp>
-+#include <ooo/vba/excel/XFormatCondition.hpp>
-+#include <ooo/vba/excel/XFormatConditions.hpp>
-+#include <ooo/vba/excel/XStyle.hpp>
- #include <com/sun/star/frame/XModel.hpp> 
- #include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
- #include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
-@@ -39,18 +39,18 @@
- #include <com/sun/star/beans/XPropertySet.hpp>
- #include "vbacondition.hxx"
  
--typedef ScVbaCondition< oo::excel::XFormatCondition >  ScVbaFormatCondition_BASE;
-+typedef ScVbaCondition< ov::excel::XFormatCondition >  ScVbaFormatCondition_BASE;
- class ScVbaFormatCondition : public ScVbaFormatCondition_BASE
+-ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, const uno::Reference< frame::XModel >& xModel  ):  ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(xModel) 
++ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, const uno::Reference< frame::XModel >& xModel  ):  ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(xModel) 
  {
- protected:
- 	rtl::OUString msStyleName;
- 	css::uno::Reference< css::sheet::XSheetConditionalEntry > mxSheetConditionalEntry;    
- 	css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries;    
--	css::uno::Reference< oo::excel::XFormatConditions> moFormatConditions;
--	css::uno::Reference< oo::excel::XStyle > mxStyle;
-+	css::uno::Reference< ov::excel::XFormatConditions> moFormatConditions;
-+	css::uno::Reference< ov::excel::XStyle > mxStyle;
- 	css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet;
- public:
--	ScVbaFormatCondition(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, const css::uno::Reference< oo::excel::XStyle >&,  const css::uno::Reference< oo::excel::XFormatConditions >& _xFormatConditions, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException );
-+	ScVbaFormatCondition(  const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, const css::uno::Reference< ov::excel::XStyle >&,  const css::uno::Reference< ov::excel::XFormatConditions >& _xFormatConditions, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException );
+ }
  
- 	void notifyRange() throw ( css::script::BasicErrorException );
- 	static css::sheet::ConditionOperator retrieveAPIType(sal_Int32 _nVBAType, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition ) throw( css::script::BasicErrorException );
-@@ -63,9 +63,9 @@ public:
- 	virtual ::sal_Int32 SAL_CALL Operator(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void setFormula1( const css::uno::Any& _aFormula1) throw ( css::script::BasicErrorException );
- 	virtual void setFormula2( const css::uno::Any& _aFormula2) throw ( css::script::BasicErrorException );
--	virtual css::uno::Reference< ::org::openoffice::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& Index ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< ::org::openoffice::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	// XHelperInterface
- 	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-diff --git sc/source/ui/vba/vbaformatconditions.cxx sc/source/ui/vba/vbaformatconditions.cxx
-index 99515e5..26d8b67 100644
---- sc/source/ui/vba/vbaformatconditions.cxx
-+++ sc/source/ui/vba/vbaformatconditions.cxx
-@@ -28,7 +28,7 @@
-  *
-  ************************************************************************/
+@@ -393,7 +393,7 @@
+ 			}
+ 		}  
+ 		uno::Reference< container::XIndexAccess > xIndexAccess = new SheetCollectionHelper( mSheets );
+-		uno::Reference< vba::XCollection > xSelectedSheets(  new ScVbaWorksheets( this->getParent(), mxContext, xIndexAccess, mxModel ) );
++		uno::Reference< XCollection > xSelectedSheets(  new ScVbaWorksheets( this->getParent(), mxContext, xIndexAccess, mxModel ) );
+ 		return uno::makeAny( xSelectedSheets );
+ 	}
+ 	return 	ScVbaWorksheets_BASE::Item( Index, Index2 );
+@@ -419,7 +419,7 @@
+ 	if ( sNames.getLength() == 0 )
+ 	{
+ 		sNames.realloc( 1 );
+-		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheets") );
++		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheets") );
+ 	}
+ 	return sNames;
+ }
+Index: sc/source/ui/vba/vbatextframe.cxx
+===================================================================
+--- sc/source/ui/vba/vbatextframe.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbatextframe.cxx	(.../cws/npower11)	(revision 266650)
+@@ -32,10 +32,10 @@
+ #include "vbatextframe.hxx"
+ #include "vbacharacters.hxx"
  
--#include <org/openoffice/excel/XRange.hpp>
-+#include <ooo/vba/excel/XRange.hpp>
- #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
- #include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
- #include <vector>
-@@ -36,7 +36,7 @@
- #include "vbaformatcondition.hxx"
- #include "vbaworkbook.hxx"
- #include "vbastyles.hxx"
 -using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
  using namespace ::com::sun::star;
  
- typedef std::vector< beans::PropertyValue > VecPropValues;
-@@ -47,10 +47,10 @@ static rtl::OUString FORMULA2( RTL_CONSTASCII_USTRINGPARAM("Formula2") );
- static rtl::OUString STYLENAME( RTL_CONSTASCII_USTRINGPARAM("StyleName") );
- static rtl::OUString sStyleNamePrefix( RTL_CONSTASCII_USTRINGPARAM("Excel_CondFormat") );
- 
--ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& xModel ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries )
-+ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& xModel ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries )
+-ScVbaTextFrame::ScVbaTextFrame( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< drawing::XShape > xShape ) : ScVbaTextFrame_BASE( xParent, xContext ), m_xShape( xShape )
++ScVbaTextFrame::ScVbaTextFrame( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< drawing::XShape > xShape ) : ScVbaTextFrame_BASE( xParent, xContext ), m_xShape( xShape )
  {
- 	mxRangeParent.set( xParent, uno::UNO_QUERY_THROW );
--	uno::Reference< excel::XWorkbook > xWorkbook = new ScVbaWorkbook(  uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
-+	uno::Reference< excel::XWorkbook > xWorkbook = new ScVbaWorkbook(  uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
- 	mxStyles.set( xWorkbook->Styles( uno::Any() ), uno::UNO_QUERY_THROW );
- 	uno::Reference< sheet::XCellRangeAddressable > xCellRange( mxRangeParent->getCellRange(), uno::UNO_QUERY_THROW );
- 	mxParentRangePropertySet.set( xCellRange, uno::UNO_QUERY_THROW );
-@@ -89,7 +89,7 @@ ScVbaFormatConditions::getElementType() throw (css::uno::RuntimeException)
+     m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
  }
+@@ -142,14 +142,14 @@
  
  
--uno::Any xSheetConditionToFormatCondition( const uno::Reference< vba::XHelperInterface >& xRangeParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xFormatConditions, const uno::Reference< beans::XPropertySet >& xRangeProps,  const uno::Any& aObject ) 
-+uno::Any xSheetConditionToFormatCondition( const uno::Reference< XHelperInterface >& xRangeParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xFormatConditions, const uno::Reference< beans::XPropertySet >& xRangeProps,  const uno::Any& aObject ) 
- {
- 	uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry;
- 	aObject >>= xSheetConditionalEntry;
-@@ -102,7 +102,7 @@ uno::Any xSheetConditionToFormatCondition( const uno::Reference< vba::XHelperInt
- uno::Any 
- ScVbaFormatConditions::createCollectionObject(const uno::Any& aObject )
+ // Methods
+-uno::Reference< oo::excel::XCharacters > SAL_CALL 
++uno::Reference< ov::excel::XCharacters > SAL_CALL 
+ ScVbaTextFrame::Characters() throw (uno::RuntimeException)
  {
--	return xSheetConditionToFormatCondition( uno::Reference< vba::XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, mxStyles, this, mxParentRangePropertySet, aObject );
-+	return xSheetConditionToFormatCondition( uno::Reference< XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, mxStyles, this, mxParentRangePropertySet, aObject );
+     uno::Reference< text::XSimpleText > xSimpleText( m_xShape, uno::UNO_QUERY_THROW );
+     ScVbaPalette aPalette( SfxObjectShell::Current() );
+     uno::Any aStart( sal_Int32( 1 ) );
+     uno::Any aLength(sal_Int32( -1 ) );
+-    return uno::Reference< oo::excel::XCharacters >( new ScVbaCharacters( this, mxContext, aPalette, xSimpleText, aStart, aLength, sal_True ) );
++    return uno::Reference< ov::excel::XCharacters >( new ScVbaCharacters( this, mxContext, aPalette, xSimpleText, aStart, aLength, sal_True ) );
  }
  
- class EnumWrapper : public EnumerationHelper_BASE
-@@ -125,7 +125,7 @@ public:
-         virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
-         {
-                 if ( nIndex < m_xIndexAccess->getCount() )
--                        return xSheetConditionToFormatCondition( uno::Reference< vba::XHelperInterface >( m_xParentRange, uno::UNO_QUERY_THROW ), m_xContext, m_xStyles, m_xParentCollection, m_xProps, m_xIndexAccess->getByIndex( nIndex++ ) );
-+                        return xSheetConditionToFormatCondition( uno::Reference< XHelperInterface >( m_xParentRange, uno::UNO_QUERY_THROW ), m_xContext, m_xStyles, m_xParentCollection, m_xProps, m_xIndexAccess->getByIndex( nIndex++ ) );
-                 throw container::NoSuchElementException();
-         }
- };
-@@ -199,7 +199,7 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons
- 			uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW );
- 			if (xSheetConditionalEntry->getStyleName().equals(sStyleName))
- 			{
--				xFormatCondition =  new ScVbaFormatCondition(uno::Reference< vba::XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, xSheetConditionalEntry, xStyle, this, mxParentRangePropertySet);
-+				xFormatCondition =  new ScVbaFormatCondition(uno::Reference< XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, xSheetConditionalEntry, xStyle, this, mxParentRangePropertySet);
- 				notifyRange();
- 				return xFormatCondition;
- 			}
-@@ -296,7 +296,7 @@ ScVbaFormatConditions::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.FormatConditions" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.FormatConditions" ) );
- 	}
- 	return aServiceNames;
+ rtl::OUString&
+@@ -166,7 +166,7 @@
+     if ( aServiceNames.getLength() == 0 )
+     {
+         aServiceNames.realloc( 1 );
+-        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.TextFrame" ) );
++        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.TextFrame" ) );
+     }
+     return aServiceNames;
  }
-diff --git sc/source/ui/vba/vbaformatconditions.hxx sc/source/ui/vba/vbaformatconditions.hxx
-index 5a1e0ae..efdfce5 100644
---- sc/source/ui/vba/vbaformatconditions.hxx
-+++ sc/source/ui/vba/vbaformatconditions.hxx
-@@ -29,33 +29,33 @@
-  ************************************************************************/
- #ifndef SC_VBA_FORMATCONDITIONS_HXX
- #define SC_VBA_FORMATCONDITIONS_HXX
--#include <org/openoffice/excel/XFormatConditions.hpp>
--#include <org/openoffice/excel/XStyles.hpp>
--#include <org/openoffice/excel/XRange.hpp>
-+#include <ooo/vba/excel/XFormatConditions.hpp>
-+#include <ooo/vba/excel/XStyles.hpp>
-+#include <ooo/vba/excel/XRange.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
- #include <com/sun/star/table/CellAddress.hpp>
- #include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
- #include "vbacollectionimpl.hxx"
+Index: sc/source/ui/vba/vbadialog.cxx
+===================================================================
+--- sc/source/ui/vba/vbadialog.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbadialog.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,7 +31,7 @@
  
--typedef CollTestImplHelper< oo::excel::XFormatConditions > ScVbaFormatConditions_BASE;
-+typedef CollTestImplHelper< ov::excel::XFormatConditions > ScVbaFormatConditions_BASE;
- class ScVbaFormatConditions: public ScVbaFormatConditions_BASE
- {
- 	css::table::CellAddress maCellAddress; 	
- 	css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries;
--	css::uno::Reference< oo::excel::XStyles > mxStyles;
--	css::uno::Reference< oo::excel::XRange > mxRangeParent;
-+	css::uno::Reference< ov::excel::XStyles > mxStyles;
-+	css::uno::Reference< ov::excel::XRange > mxRangeParent;
- 	css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet;
- public:
--	ScVbaFormatConditions( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntries >&, const css::uno::Reference< css::frame::XModel >&  );
-+	ScVbaFormatConditions( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntries >&, const css::uno::Reference< css::frame::XModel >&  );
- 	void notifyRange() throw ( css::script::BasicErrorException );
--	virtual css::uno::Reference< oo::excel::XFormatCondition > Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2, const css::uno::Reference< oo::excel::XStyle >& _xCalcStyle ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XFormatCondition > Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2, const css::uno::Reference< ov::excel::XStyle >& _xCalcStyle ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	rtl::OUString getA1Formula(const css::uno::Any& _aFormula) throw ( css::script::BasicErrorException );
- 	rtl::OUString getStyleName();
- 	void removeFormatCondition( const rtl::OUString& _sStyleName, sal_Bool _bRemoveStyle) throw ( css::script::BasicErrorException );
- 	css::uno::Reference< css::sheet::XSheetConditionalEntries > getSheetConditionalEntries() { return mxSheetConditionalEntries; }
- 	// XFormatConditions
- 	virtual void SAL_CALL Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XFormatCondition > SAL_CALL Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XFormatCondition > SAL_CALL Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	// XEnumerationAccess
- 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
- 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);	
-diff --git sc/source/ui/vba/vbaframe.cxx sc/source/ui/vba/vbaframe.cxx
-new file mode 100644
-index 0000000..b2827d0
---- /dev/null
-+++ sc/source/ui/vba/vbaframe.cxx
-@@ -0,0 +1,93 @@
+ #include <com/sun/star/lang/XMultiComponentFactory.hpp>
+ #include <com/sun/star/frame/XModel.hpp>
+-#include <org/openoffice/excel/XApplication.hpp>
++#include <ooo/vba/excel/XApplication.hpp>
+ 
+ #include <tools/string.hxx>
+ 
+@@ -39,7 +39,7 @@
+ #include "vbadialog.hxx"
+ #include "vbaglobals.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ // fails silently
+@@ -113,7 +113,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PivotTable" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTable" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbapages.cxx
+===================================================================
+--- sc/source/ui/vba/vbapages.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbapages.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,81 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -17936,2075 +14097,3459 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbaframe.hxx"
-+#include <vector>
-+
-+using namespace com::sun::star;
-+using namespace ooo::vba;
-+
++#include "vbapages.hxx"
 +
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+ScVbaFrame::ScVbaFrame( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : FrameImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-+{
-+}
++using namespace ::ooo::vba;
++using namespace ::com::sun::star;
++using namespace ::vos;
 +
-+// Attributes
-+rtl::OUString SAL_CALL 
-+ScVbaFrame::getCaption() throw (css::uno::RuntimeException)
++ScVbaPages::ScVbaPages( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xPages ) throw( lang::IllegalArgumentException ) : ScVbaPages_BASE( xParent, xContext, xPages )
 +{
-+    rtl::OUString Label;
-+    m_xProps->getPropertyValue( LABEL ) >>= Label;
-+    return Label;
 +}
 +
-+void SAL_CALL 
-+ScVbaFrame::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++uno::Type SAL_CALL 
++ScVbaPages::getElementType() throw (uno::RuntimeException)
 +{
-+    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
++	// return msforms::XPage::static_type(0); 
++	return uno::XInterface::static_type(0); 
 +}
 +
-+uno::Any SAL_CALL 
-+ScVbaFrame::getValue() throw (css::uno::RuntimeException)
++uno::Any 
++ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
 +{
-+    return uno::makeAny( getCaption() );
++	return aSource;
 +}
 +
-+void SAL_CALL 
-+ScVbaFrame::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++rtl::OUString& 
++ScVbaPages::getServiceImplName()
 +{
-+    rtl::OUString sCaption;
-+    _value >>= sCaption;
-+    setCaption( sCaption ); 
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPages") );
++	return sImplName;
 +}
 +
-+rtl::OUString& 
-+ScVbaFrame::getServiceImplName()
++uno::Reference< container::XEnumeration > SAL_CALL 
++ScVbaPages::createEnumeration() throw (uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFrame") );
-+	return sImplName;
++	return uno::Reference< container::XEnumeration >();
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaFrame::getServiceNames()
++ScVbaPages::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Pages" ) );
 +	}
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbaframe.hxx sc/source/ui/vba/vbaframe.hxx
-new file mode 100644
-index 0000000..6020457
---- /dev/null
-+++ sc/source/ui/vba/vbaframe.hxx
-@@ -0,0 +1,58 @@
+Index: sc/source/ui/vba/vbapivottables.hxx
+===================================================================
+--- sc/source/ui/vba/vbapivottables.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapivottables.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,7 +32,7 @@
+ 
+ #include <cppuhelper/implbase1.hxx>
+ 
+-#include <org/openoffice/excel/XPivotTables.hpp>
++#include <ooo/vba/excel/XPivotTables.hpp>
+ #include <com/sun/star/container/XEnumerationAccess.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+  
+@@ -41,14 +41,14 @@
+ #include "vbacollectionimpl.hxx"
+ 
+ 
+-typedef CollTestImplHelper< oo::excel::XPivotTables > ScVbaPivotTables_BASE;
++typedef CollTestImplHelper< ov::excel::XPivotTables > ScVbaPivotTables_BASE;
+ 
+ class ScVbaPivotTables : public ScVbaPivotTables_BASE
+ {
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ 
+ public:
+-	ScVbaPivotTables( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
++	ScVbaPivotTables( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
+ 	virtual ~ScVbaPivotTables() {}
+ 
+ 	// XEnumerationAccess
+Index: sc/source/ui/vba/vbapagesetup.hxx
+===================================================================
+--- sc/source/ui/vba/vbapagesetup.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbapagesetup.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,104 @@
++/*************************************************************************
++ *
++ * 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_PAGESETUP_HXX
++#define SC_VBA_PAGESETUP_HXX
++
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/excel/XPageSetup.hpp>
++#include <com/sun/star/uno/XComponentContext.hpp>
++#include <com/sun/star/sheet/XSpreadsheet.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include "vbahelperinterface.hxx"
++
++typedef InheritedHelperInterfaceImpl1< ov::excel::XPageSetup > ScVbaPageSetup_BASE;
++
++class ScVbaPageSetup :  public ScVbaPageSetup_BASE 
++{
++    css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
++    css::uno::Reference< css::beans::XPropertySet > mxPageProps;
++    css::uno::Reference< css::frame::XModel > mxModel;
++public:
++	ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent, 
++                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
++		            const css::uno::Reference< css::sheet::XSpreadsheet>& xSheet,
++                    const css::uno::Reference< css::frame::XModel >& xModlel) throw (css::uno::RuntimeException); 
++	virtual ~ScVbaPageSetup(){}
++    
++    // Attribute
++	virtual rtl::OUString SAL_CALL getPrintArea() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException);
++	virtual double SAL_CALL getTopMargin() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setTopMargin( double margin ) throw (css::uno::RuntimeException);
++	virtual double SAL_CALL getBottomMargin() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setBottomMargin( double margin ) throw (css::uno::RuntimeException);
++	virtual double SAL_CALL getRightMargin() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setRightMargin( double margin ) throw (css::uno::RuntimeException);
++	virtual double SAL_CALL getLeftMargin() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setLeftMargin( double margin ) throw (css::uno::RuntimeException);
++	virtual double SAL_CALL getHeaderMargin() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setHeaderMargin( double margin ) throw (css::uno::RuntimeException);
++	virtual double SAL_CALL getFooterMargin() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setFooterMargin( double margin ) throw (css::uno::RuntimeException);
++	virtual sal_Int32 SAL_CALL getOrientation() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setOrientation( sal_Int32 orientation ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getFitToPagesTall() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setFitToPagesTall( const css::uno::Any& fitToPagesTall ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getFitToPagesWide() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setFitToPagesWide( const css::uno::Any& fitToPagesWide ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL getZoom() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setZoom( const css::uno::Any& zoom ) throw (css::uno::RuntimeException);
++	virtual rtl::OUString SAL_CALL getLeftHeader() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setLeftHeader( const rtl::OUString& leftHeader ) throw (css::uno::RuntimeException);
++	virtual rtl::OUString SAL_CALL getCenterHeader() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setCenterHeader( const rtl::OUString& centerHeader ) throw (css::uno::RuntimeException);
++	virtual rtl::OUString SAL_CALL getRightHeader() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setRightHeader( const rtl::OUString& rightHeader ) throw (css::uno::RuntimeException);
++	virtual rtl::OUString SAL_CALL getLeftFooter() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setLeftFooter( const rtl::OUString& leftFooter ) throw (css::uno::RuntimeException);
++	virtual rtl::OUString SAL_CALL getCenterFooter() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setCenterFooter( const rtl::OUString& centerFooter ) throw (css::uno::RuntimeException);
++	virtual rtl::OUString SAL_CALL getRightFooter() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setRightFooter( const rtl::OUString& rightFooter ) throw (css::uno::RuntimeException);
++	virtual sal_Int32 SAL_CALL getOrder() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setOrder( sal_Int32 order ) throw (css::uno::RuntimeException);
++	virtual sal_Int32 SAL_CALL getFirstPageNumber() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setFirstPageNumber( sal_Int32 firstPageNumber ) throw (css::uno::RuntimeException);
++	virtual sal_Bool SAL_CALL getCenterVertically() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setCenterVertically( sal_Bool centerVertically ) throw (css::uno::RuntimeException);
++	virtual sal_Bool SAL_CALL getCenterHorizontally() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setCenterHorizontally( sal_Bool centerHorizontally ) throw (css::uno::RuntimeException);
++	virtual sal_Bool SAL_CALL getPrintHeadings() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setPrintHeadings( sal_Bool printHeadings ) throw (css::uno::RuntimeException);
++
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif
+Index: sc/source/ui/vba/vbaapplication.cxx
+===================================================================
+--- sc/source/ui/vba/vbaapplication.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaapplication.cxx	(.../cws/npower11)	(revision 266650)
+@@ -1,959 +1,1298 @@
+-/*************************************************************************
+- *
+- * 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: vbaapplication.cxx,v $
+- * $Revision: 1.7 $
+- *
+- * 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 <stdio.h>
+-
+-
+-#include<com/sun/star/sheet/XSpreadsheetView.hpp>
+-#include <com/sun/star/sheet/XSpreadsheets.hpp>
+-#include<com/sun/star/view/XSelectionSupplier.hpp>
+-#include <com/sun/star/lang/XServiceInfo.hpp>
+-#include<org/openoffice/excel/XlCalculation.hpp>
+-#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
+-#include <com/sun/star/sheet/XCalculatable.hpp>
+-#include <com/sun/star/frame/XLayoutManager.hpp>
+-#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+-#include <com/sun/star/task/XStatusIndicator.hpp>
+-#include <org/openoffice/excel/XlMousePointer.hpp>
+-#include <com/sun/star/sheet/XNamedRanges.hpp>
+-
+-#include "vbaapplication.hxx"
+-#include "vbaworkbooks.hxx"
+-#include "vbaworkbook.hxx"
+-#include "vbaworksheets.hxx"
+-#include "vbarange.hxx"
+-#include "vbawsfunction.hxx"
+-#include "vbadialogs.hxx"
+-#include "vbawindow.hxx"
+-#include "vbawindows.hxx"
+-#include "vbaglobals.hxx"
+-#include "tabvwsh.hxx"
+-#include "gridwin.hxx"
+-#include "vbanames.hxx"
+-#include "vbashape.hxx"
+-#include "sc.hrc"
+-
+-#include <osl/file.hxx>
+-
+-#include <sfx2/request.hxx>
+-#include <sfx2/objsh.hxx>
+-#include <sfx2/viewfrm.hxx>
+-#include <sfx2/app.hxx>
+-
+-#include <toolkit/awt/vclxwindow.hxx>
+-#include <toolkit/helper/vclunohelper.hxx>
+-
+-#include <tools/diagnose_ex.h>
+-
+-#include <docuno.hxx>
+-
+-#include <basic/sbx.hxx>
+-#include <basic/sbstar.hxx>
+-#include <basic/sbuno.hxx>
+-#include <basic/sbmeth.hxx>
+-
+-using namespace ::org::openoffice;
+-using namespace ::com::sun::star;
+-
+-// #TODO is this defined somewhere else?
+-#if ( defined UNX ) || ( defined OS2 ) //unix
+-#define FILE_PATH_SEPERATOR "/"
+-#else // windows
+-#define FILE_PATH_SEPERATOR "\\"
+-#endif 
+-
+-#define EXCELVERSION "11.0"
+-
+-class ActiveWorkbook : public ScVbaWorkbook
+-{
+-protected:
+-	virtual uno::Reference< frame::XModel > getModel()
+-	{ 	
+-		return getCurrentDocument(); 
+-	}
+-public:
+-	ActiveWorkbook( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext) : ScVbaWorkbook(  xParent, xContext ){}
+-};
+-
+-ScVbaApplication::ScVbaApplication( uno::Reference<uno::XComponentContext >& xContext ): ScVbaApplication_BASE( uno::Reference< vba::XHelperInterface >(), xContext ), m_xCalculation( excel::XlCalculation::xlCalculationAutomatic )
+-{
+-}
+-
+-ScVbaApplication::~ScVbaApplication()
+-{
+-}
+-	
+-
+-
+-uno::Reference< excel::XWorkbook >
+-ScVbaApplication::getActiveWorkbook() throw (uno::RuntimeException)
+-{
+-	return new ActiveWorkbook( this, mxContext ); 
+-}
+-uno::Reference< excel::XWorkbook > SAL_CALL 
+-ScVbaApplication::getThisWorkbook() throw (uno::RuntimeException)
+-{
+-	return getActiveWorkbook();
+-}
+-
+-uno::Any SAL_CALL
+-ScVbaApplication::getSelection() throw (uno::RuntimeException)
+-{
+-    uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
+-    rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
+-    if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
+-    {
+-        uno::Reference< drawing::XShapes > xShapes( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
+-        uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
+-        uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
+-        return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, ScVbaShape::getType( xShape ) ) ) );
+-    }
+-    else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
+-             xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
+-    {
+-	    uno::Reference< table::XCellRange > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
+-	    if ( !xRange.is() )
+-	    {
+-		    uno::Reference< sheet::XSheetCellRangeContainer > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
+-		    if ( xRanges.is() )
+-			    return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( this, mxContext, xRanges ) ) );
+-
+-	    }
+-	    return uno::makeAny( uno::Reference< excel::XRange >(new ScVbaRange( this, mxContext, xRange ) ) );
+-    }
+-    else
+-    {
+-        throw uno::RuntimeException( sImpementaionName + rtl::OUString::createFromAscii(" donot be surpported"), uno::Reference< uno::XInterface >() );
+-    }
+-}
+-
+-uno::Reference< excel::XRange >
+-ScVbaApplication::getActiveCell() throw (uno::RuntimeException )
+-{
+-	uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
+-	uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW);
+-	ScTabViewShell* pViewShell = getCurrentBestViewShell();
+-	if ( !pViewShell )
+-		throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewShell available"), uno::Reference< uno::XInterface >() );
+-	ScViewData* pTabView = pViewShell->GetViewData();
+-	if ( !pTabView )
+-		throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewData available"), uno::Reference< uno::XInterface >() );
+-
+-	sal_Int32 nCursorX = pTabView->GetCurX();
+-	sal_Int32 nCursorY = pTabView->GetCurY();
+-
+-	return  new ScVbaRange( this, mxContext, xRange->getCellRangeByPosition( nCursorX, nCursorY, nCursorX, nCursorY ) );
+-}
+-
+-sal_Bool
+-ScVbaApplication::getScreenUpdating() throw (uno::RuntimeException)
+-{
+-	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-	return !xModel->hasControllersLocked();
+-}
+-
+-void
+-ScVbaApplication::setScreenUpdating(sal_Bool bUpdate) throw (uno::RuntimeException)
+-{
+-	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-	if (bUpdate)
+-		xModel->unlockControllers();
+-	else
+-		xModel->lockControllers();
+-}
+-
+-sal_Bool
+-ScVbaApplication::getDisplayStatusBar() throw (uno::RuntimeException)
+-{
+-	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-    uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
+-    uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
+-
+-    if( xProps.is() ){
+-        uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ), uno::UNO_QUERY_THROW );
+-        rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
+-        if( xLayoutManager.is() && xLayoutManager->isElementVisible( url ) ){
+-            return sal_True;
+-        }
+-    }
+-    return sal_False;
+-}
+-
+-void
+-ScVbaApplication::setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (uno::RuntimeException)
+-{
+-	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-    uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
+-    uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
+-
+-    if( xProps.is() ){
+-        uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ), uno::UNO_QUERY_THROW );
+-        rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
+-        if( xLayoutManager.is() ){
+-            if( bDisplayStatusBar && !xLayoutManager->isElementVisible( url ) ){
+-                if( !xLayoutManager->showElement( url ) )
+-                    xLayoutManager->createElement( url );
+-                return;
+-            }
+-            else if( !bDisplayStatusBar && xLayoutManager->isElementVisible( url ) ){
+-                xLayoutManager->hideElement( url ); 
+-                return;
+-            }
+-        }
+-    }
+-    return;
+-}
+-
+-uno::Any SAL_CALL
+-ScVbaApplication::Workbooks( const uno::Any& aIndex ) throw (uno::RuntimeException)
+-{
+-	uno::Reference< vba::XCollection > xWorkBooks( new ScVbaWorkbooks( this, mxContext ) );
+-	if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
+-	{
+-		// void then somebody did Workbooks.something in vba
+-	    return uno::Any( xWorkBooks );
+-	}
+-
+-	return uno::Any ( xWorkBooks->Item( aIndex, uno::Any() ) );
+-}
+-
+-uno::Any SAL_CALL
+-ScVbaApplication::Worksheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
+-{
+-    uno::Reference< excel::XWorkbook > xWorkbook( getActiveWorkbook(), uno::UNO_QUERY );
+-        uno::Any result;
+-    if ( xWorkbook.is() )
+-        result  = xWorkbook->Worksheets( aIndex );
+-
+-    else
+-        // Fixme - check if this is reasonable/desired behavior
+-        throw uno::RuntimeException( rtl::OUString::createFromAscii(
+-            "No ActiveWorkBook available" ), uno::Reference< uno::XInterface >() );
+-
+-	return result;
+-}
+-
+-uno::Any SAL_CALL
+-ScVbaApplication::WorksheetFunction( ) throw (::com::sun::star::uno::RuntimeException)
+-{
+-        return uno::makeAny( uno::Reference< script::XInvocation >( new ScVbaWSFunction( this, mxContext) ) );
+-}
+-
+-uno::Any SAL_CALL 
+-ScVbaApplication::Evaluate( const ::rtl::OUString& Name ) throw (uno::RuntimeException)
+-{
+-	// #TODO Evaluate allows other things to be evaluated, e.g. functions
+-	// I think ( like SIN(3) etc. ) need to investigate that
+-	// named Ranges also? e.g. [MyRange] if so need a list of named ranges
+-	uno::Any aVoid;
+-	return uno::Any( getActiveWorkbook()->getActiveSheet()->Range( uno::Any( Name ), aVoid ) );	
+-}
+-
+-uno::Any 
+-ScVbaApplication::Dialogs( const uno::Any &aIndex ) throw (uno::RuntimeException)
+-{
+-	uno::Reference< excel::XDialogs > xDialogs( new ScVbaDialogs( uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), mxContext ) );
+-	if( !aIndex.hasValue() )
+-		return uno::Any( xDialogs );
+-	return uno::Any( xDialogs->Item( aIndex ) );
+-}
+-
+-uno::Reference< excel::XWindow > SAL_CALL 
+-ScVbaApplication::getActiveWindow() throw (uno::RuntimeException)
+-{
+-	// #FIXME sofar can't determine Parent
+-	return new ScVbaWindow( uno::Reference< vba::XHelperInterface >(), mxContext, getCurrentDocument() );
+-}
+-
+-uno::Any SAL_CALL 
+-ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
+-{
+-	//# FIXME TODO, implementation
+-	uno::Any result;
+-	result <<= sal_False;
+-	return result;
+-}
+-
+-::rtl::OUString
+-ScVbaApplication::getVersion() throw (uno::RuntimeException)
+-{
+-	return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(EXCELVERSION));
+-}
+-
+-void SAL_CALL 
+-ScVbaApplication::setCutCopyMode( const uno::Any& /*_cutcopymode*/ ) throw (uno::RuntimeException)
+-{
+-	//# FIXME TODO, implementation
+-}
+-
+-uno::Any SAL_CALL
+-ScVbaApplication::getStatusBar() throw (uno::RuntimeException)
+-{
+-	return uno::makeAny( !getDisplayStatusBar() );
+-}
+-
+-void SAL_CALL 
+-ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::RuntimeException)
+-{
+-    rtl::OUString sText;
+-    sal_Bool bDefault = sal_False;
+-	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-    uno::Reference< task::XStatusIndicatorSupplier > xStatusIndicatorSupplier( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+-    uno::Reference< task::XStatusIndicator > xStatusIndicator( xStatusIndicatorSupplier->getStatusIndicator(), uno::UNO_QUERY_THROW );
+-    if( _statusbar >>= sText )
+-    {
+-        setDisplayStatusBar( sal_True );
+-        xStatusIndicator->start( sText, 100 );
+-        //xStatusIndicator->setText( sText );
+-    }
+-    else if( _statusbar >>= bDefault )
+-    {
+-        if( bDefault == sal_False )
+-        {
+-            xStatusIndicator->end();
+-            setDisplayStatusBar( sal_True );
+-        }
+-    }
+-    else
+-        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid prarameter. It should be a string or False" ),
+-            uno::Reference< uno::XInterface >() );
+-}
+-
+-double SAL_CALL 
+-ScVbaApplication::CountA( const uno::Any& arg1 ) throw (uno::RuntimeException)
+-{
+-	double result = 0;
+-	uno::Reference< script::XInvocation > xInvoc( WorksheetFunction(), uno::UNO_QUERY_THROW );
+-	if  ( xInvoc.is() )
+-	{
+-		static rtl::OUString FunctionName( RTL_CONSTASCII_USTRINGPARAM("CountA" ) );
+-		uno::Sequence< uno::Any > Params(1);
+-		Params[0] = arg1;
+-		uno::Sequence< sal_Int16 > OutParamIndex;
+-		uno::Sequence< uno::Any > OutParam;
+-		xInvoc->invoke( FunctionName, Params, OutParamIndex, OutParam ) >>= result;
+-	}
+-	return result;
+-}
+-
+-::sal_Int32 SAL_CALL 
+-ScVbaApplication::getCalculation() throw (uno::RuntimeException)
+-{
+-	uno::Reference<sheet::XCalculatable> xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW);
+-	if(xCalc->isAutomaticCalculationEnabled())
+-		return excel::XlCalculation::xlCalculationAutomatic;
+-	else
+-		return excel::XlCalculation::xlCalculationManual;
+-}
+-
+-void SAL_CALL 
+-ScVbaApplication::setCalculation( ::sal_Int32 _calculation ) throw (uno::RuntimeException)
+-{
+-	uno::Reference< sheet::XCalculatable > xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW);
+-	switch(_calculation)
+-	{
+-		case excel::XlCalculation::xlCalculationManual:
+-			xCalc->enableAutomaticCalculation(sal_False);
+-			break;
+-		case excel::XlCalculation::xlCalculationAutomatic:
+-		case excel::XlCalculation::xlCalculationSemiautomatic:
+-			xCalc->enableAutomaticCalculation(sal_True);
+-			break;
+-	}
+-}
+-
+-uno::Any SAL_CALL 
+-ScVbaApplication::Windows( const uno::Any& aIndex  ) throw (uno::RuntimeException)
+-{
+-	uno::Reference< vba::XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
+-	if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
+-		return uno::Any( xWindows );
+-	return uno::Any( xWindows->Item( aIndex, uno::Any() ) );	
+-}
+-void SAL_CALL 
+-ScVbaApplication::wait( double time ) throw (uno::RuntimeException)
+-{
+-	StarBASIC* pBasic = SFX_APP()->GetBasic();
+-	SFX_APP()->EnterBasicCall();
+-	SbxArrayRef aArgs = new SbxArray;
+-	SbxVariableRef aRef = new SbxVariable;
+-	aRef->PutDouble( time );
+-	aArgs->Put(  aRef, 1 );
+-	SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WaitUntil") ), SbxCLASS_METHOD );
+-	
+-	if ( pMeth )
+-	{
+-		pMeth->SetParameters( aArgs );
+-		SbxVariableRef refTemp = pMeth;
+-		// forces a broadcast
+-		SbxVariableRef pNew = new  SbxMethod( *((SbxMethod*)pMeth));
+-	}
+-	SFX_APP()->LeaveBasicCall();
+-
+-}
+-
+-uno::Any SAL_CALL 
+-ScVbaApplication::Range( const uno::Any& Cell1, const uno::Any& Cell2 ) throw (uno::RuntimeException)
+-{
+-	uno::Reference< excel::XRange > xVbRange = ScVbaRange::ApplicationRange( mxContext, Cell1, Cell2 ); 
+-	return uno::makeAny( xVbRange ); 
+-}
+-
+-uno::Any SAL_CALL
+-ScVbaApplication::Names( ) throw ( uno::RuntimeException )
+-{
+-    uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-    uno::Reference< sheet::XNamedRanges > xNamedRanges( getActiveSheet() , uno::UNO_QUERY_THROW );
+-    css::uno::Reference< excel::XNames > xNames ( new ScVbaNames( this , mxContext , xNamedRanges , xModel ) );
+-        return uno::makeAny( xNames );
+-}
+-
+-
+-uno::Reference< excel::XWorksheet > SAL_CALL 
+-ScVbaApplication::getActiveSheet() throw (uno::RuntimeException)
+-{
+-    uno::Reference< excel::XWorksheet > result;
+-    uno::Reference< excel::XWorkbook > xWorkbook( getActiveWorkbook(), uno::UNO_QUERY );
+-    if ( xWorkbook.is() )
+-    {
+-        uno::Reference< excel::XWorksheet > xWorksheet( 
+-            xWorkbook->getActiveSheet(), uno::UNO_QUERY );
+-        if ( xWorksheet.is() )
+-        {
+-            result = xWorksheet;
+-        }	
+-    }
+-
+-    if ( !result.is() )
+-    {
+-        // Fixme - check if this is reasonable/desired behavior
+-        throw uno::RuntimeException( rtl::OUString::createFromAscii(
+-            "No activeSheet available" ), uno::Reference< uno::XInterface >() );
+-    }
+-    return result;
+-	
+-}
+-
+-/*******************************************************************************
+- *  In msdn: 
+- *  Reference   Optional Variant. The destination. Can be a Range 
+- *  object, a string that contains a cell reference in R1C1-style notation,
+- *  or a string that contains a Visual Basic procedure name.
+- *  Scroll   Optional Variant. True to scrol, False to not scroll through 
+- *  the window. The default is False.
+- *  Parser is split to three parts, Range, R1C1 string and procedure name.
+- *  by test excel, it seems Scroll no effect. ??? 
+-*******************************************************************************/
+-void SAL_CALL 
+-ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) throw (uno::RuntimeException)
+-{
+-    //test Scroll is a boolean
+-    sal_Bool bScroll = sal_False;
+-    //R1C1-style string or a string of procedure name.
+-    
+-    if( Scroll.hasValue() )
+-    {
+-        sal_Bool aScroll = sal_False;
+-        if( Scroll >>= aScroll )
+-        {
+-            bScroll = aScroll;
+-        }
+-        else
+-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "sencond parameter should be boolean" ),
+-                    uno::Reference< uno::XInterface >() );
+-    }
+-
+-    rtl::OUString sRangeName;
+-    if( Reference >>= sRangeName )
+-    {
+-        uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-        uno::Reference< sheet::XSpreadsheetView > xSpreadsheet(
+-                xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+-        uno::Reference< sheet::XSpreadsheet > xDoc = xSpreadsheet->getActiveSheet();
+-
+-        ScTabViewShell* pShell = getCurrentBestViewShell();
+-        ScGridWindow* gridWindow = (ScGridWindow*)pShell->GetWindow(); 
+-        try
+-        {
+-            uno::Reference< excel::XRange > xVbaSheetRange = ScVbaRange::getRangeObjectForName( mxContext, sRangeName, getDocShell( xModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
+-;
+-            if( bScroll )
+-            {
+-                xVbaSheetRange->Select();
+-                uno::Reference< excel::XWindow >  xWindow = getActiveWindow();
+-                ScSplitPos eWhich = pShell->GetViewData()->GetActivePart();
+-                sal_Int32 nValueX = pShell->GetViewData()->GetPosX(WhichH(eWhich));
+-                sal_Int32 nValueY = pShell->GetViewData()->GetPosY(WhichV(eWhich));
+-                xWindow->SmallScroll( uno::makeAny( (sal_Int16)(xVbaSheetRange->getRow() - 1) ), 
+-                         uno::makeAny( (sal_Int16)nValueY ),
+-                         uno::makeAny( (sal_Int16)(xVbaSheetRange->getColumn() - 1)  ), 
+-                         uno::makeAny( (sal_Int16)nValueX ) );
+-                gridWindow->GrabFocus();
+-            }
+-            else
+-            {
+-                xVbaSheetRange->Select();
+-                gridWindow->GrabFocus();
+-            }
+-        }
+-        catch( uno::RuntimeException )
+-        {
+-            //maybe this should be a procedure name
+-            //TODO for procedure name
+-            //browse::XBrowseNodeFactory is a singlton. OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory")
+-            //and the createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) to get a root browse::XBrowseNode.
+-            //for query XInvocation interface.
+-            //but how to directly get the XInvocation?
+-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid reference for range name, it should be procedure name" ),
+-                    uno::Reference< uno::XInterface >() );
+-        }
+-        return;
+-    }
+-    uno::Reference< excel::XRange > xRange;
+-    if( Reference >>= xRange )
+-    {
+-        uno::Reference< excel::XRange > xVbaRange( Reference, uno::UNO_QUERY );
+-        ScTabViewShell* pShell = getCurrentBestViewShell();
+-        ScGridWindow* gridWindow = (ScGridWindow*)pShell->GetWindow(); 
+-        if ( xVbaRange.is() )
+-        {
+-            //TODO bScroll should be using, In this time, it doesenot have effection
+-            if( bScroll )
+-            {
+-                xVbaRange->Select();
+-                uno::Reference< excel::XWindow >  xWindow = getActiveWindow();
+-                ScSplitPos eWhich = pShell->GetViewData()->GetActivePart();
+-                sal_Int32 nValueX = pShell->GetViewData()->GetPosX(WhichH(eWhich));
+-                sal_Int32 nValueY = pShell->GetViewData()->GetPosY(WhichV(eWhich));
+-                xWindow->SmallScroll( uno::makeAny( (sal_Int16)(xVbaRange->getRow() - 1) ), 
+-                         uno::makeAny( (sal_Int16)nValueY ),
+-                         uno::makeAny( (sal_Int16)(xVbaRange->getColumn() - 1)  ), 
+-                         uno::makeAny( (sal_Int16)nValueX ) );
+-                gridWindow->GrabFocus();
+-            }
+-            else
+-            {
+-                xVbaRange->Select();
+-                gridWindow->GrabFocus();
+-            }
+-        }
+-        return;
+-    }
+-    throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid reference or name" ),
+-            uno::Reference< uno::XInterface >() );
+-}
+-
+-namespace
+-{
+-    static uno::Reference< frame::XController > lcl_getCurrentController()
+-    {
+-        const uno::Reference< frame::XModel > xWorkingDoc( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
+-        uno::Reference< frame::XController > xController;
+-        if ( xWorkingDoc.is() )
+-            xController.set( xWorkingDoc->getCurrentController(), uno::UNO_SET_THROW );
+-        else
+-            xController.set( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY_THROW );
+-        return xController;
+-    }
+-}
+-
+-sal_Int32 SAL_CALL
+-ScVbaApplication::getCursor() throw (uno::RuntimeException)
+-{
+-    sal_Int32 nPointerStyle( POINTER_ARROW );
+-    try
+-    {
+-        const uno::Reference< frame::XController > xController( lcl_getCurrentController(),     uno::UNO_SET_THROW );
+-        const uno::Reference< frame::XFrame >      xFrame     ( xController->getFrame(),        uno::UNO_SET_THROW );
+-        const uno::Reference< awt::XWindow >       xWindow    ( xFrame->getContainerWindow(),   uno::UNO_SET_THROW );
+-        // why the heck isn't there an XWindowPeer::getPointer, but a setPointer only?
+-        const Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
+-        if ( pWindow )
+-            nPointerStyle = pWindow->GetSystemWindow()->GetPointer().GetStyle();
+-    }
+-    catch( const uno::Exception& )
+-    {
+-    	DBG_UNHANDLED_EXCEPTION();
+-    }
+-
+-    switch( nPointerStyle )
+-    {
+-        case POINTER_ARROW:
+-            return excel::XlMousePointer::xlNorthwestArrow;
+-        case POINTER_NULL:
+-            return excel::XlMousePointer::xlDefault;
+-        case POINTER_WAIT:
+-            return excel::XlMousePointer::xlWait;
+-        case POINTER_TEXT:
+-            return excel::XlMousePointer::xlIBeam;
+-        default:
+-            return excel::XlMousePointer::xlDefault;
+-    }
+-}
+-
+-void SAL_CALL 
+-ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
+-{
+-    try
+-    {
+-        ::std::vector< uno::Reference< frame::XController > > aControllers;
+-
+-        const uno::Reference< frame::XModel2 > xModel2( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
+-        if ( xModel2.is() )
+-        {
+-            const uno::Reference< container::XEnumeration > xEnumControllers( xModel2->getControllers(), uno::UNO_SET_THROW );
+-            while ( xEnumControllers->hasMoreElements() )
+-            {
+-                const uno::Reference< frame::XController > xController( xEnumControllers->nextElement(), uno::UNO_QUERY_THROW );
+-                aControllers.push_back( xController );
+-            }
+-        }
+-        else
+-        {
+-            const uno::Reference< frame::XModel > xModel( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
+-            if ( xModel.is() )
+-            {
+-                const uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW );
+-                aControllers.push_back( xController );
+-            }
+-            else
+-            {
+-                const uno::Reference< frame::XController > xController( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY_THROW );
+-                aControllers.push_back( xController );
+-            }
+-        }
+-
+-        for (   ::std::vector< uno::Reference< frame::XController > >::const_iterator controller = aControllers.begin();
+-                controller != aControllers.end();
+-                ++controller
+-            )
+-        {
+-            const uno::Reference< frame::XFrame >      xFrame     ( (*controller)->getFrame(),       uno::UNO_SET_THROW   );
+-            const uno::Reference< awt::XWindow >       xWindow    ( xFrame->getContainerWindow(),    uno::UNO_SET_THROW   );
+-
+-            Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
+-            OSL_ENSURE( pWindow, "ScVbaApplication::setCursor: no window!" );
+-            if ( !pWindow )
+-                continue;
+-
+-            switch( _cursor )
+-            {
+-                case excel::XlMousePointer::xlNorthwestArrow:
+-                {
+-                    const Pointer& rPointer( POINTER_ARROW );
+-                    pWindow->GetSystemWindow()->SetPointer( rPointer );
+-                    pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_False );
+-                    break;
+-                }
+-                case excel::XlMousePointer::xlWait:
+-                case excel::XlMousePointer::xlIBeam:
+-                {
+-                    const Pointer& rPointer( static_cast< PointerStyle >( _cursor ) );
+-                    //It will set the edit window, toobar and statusbar's mouse pointer.
+-                    pWindow->GetSystemWindow()->SetPointer( rPointer );
+-                    pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_True );
+-                    //It only set the edit window's mouse pointer
+-                    //pWindow->.SetPointer( rPointer );
+-                    //pWindow->.EnableChildPointerOverwrite( sal_True );
+-                    //printf("\nset Cursor...%d\n", pWindow->.GetType());
+-                    break;
+-                }
+-                case excel::XlMousePointer::xlDefault:
+-                {
+-                    const Pointer& rPointer( POINTER_NULL );
+-                    pWindow->GetSystemWindow()->SetPointer( rPointer );
+-                    pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_False );
+-                    break;
+-                }
+-                default:
+-                    throw uno::RuntimeException( rtl::OUString( 
+-                            RTL_CONSTASCII_USTRINGPARAM("Unknown value for Cursor pointer")), uno::Reference< uno::XInterface >() );
+-                    // TODO: isn't this a flaw in the API? It should be allowed to throw an
+-                    // IllegalArgumentException, or so
+-            }
+-        }
+-    }
+-    catch( const uno::Exception& )
+-    {
+-    	DBG_UNHANDLED_EXCEPTION();
+-    }
+-}
+-
+-// #TODO perhaps we should switch the return type depending of the filter 
+-// type, e.g. return Calc for Calc and Excel if its an imported doc
+-rtl::OUString SAL_CALL
+-ScVbaApplication::getName() throw (uno::RuntimeException)
+-{
+-	static rtl::OUString appName( RTL_CONSTASCII_USTRINGPARAM("Microsoft Excel" ) );
+-	return appName;
+-}
+-
+-// #TODO #FIXME get/setDisplayAlerts are just stub impl 
+-void SAL_CALL
+-ScVbaApplication::setDisplayAlerts(sal_Bool /*displayAlerts*/) throw (uno::RuntimeException)
+-{
+-}
+-
+-sal_Bool SAL_CALL
+-ScVbaApplication::getDisplayAlerts() throw (uno::RuntimeException)
+-{
+-	return sal_True;
+-}
+-void SAL_CALL
+-ScVbaApplication::Calculate() throw(  script::BasicErrorException , uno::RuntimeException )
+-{
+-	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-	uno::Reference< sheet::XCalculatable > xCalculatable( getCurrentDocument(), uno::UNO_QUERY_THROW );
+-	xCalculatable->calculateAll();
+-}
+-
+-uno::Reference< beans::XPropertySet > lcl_getPathSettingsService( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException )
+-{
+-	static uno::Reference< beans::XPropertySet >  xPathSettings;
+-	if ( !xPathSettings.is() )
+-	{
+-		uno::Reference< lang::XMultiComponentFactory > xSMgr( xContext->getServiceManager(), uno::UNO_QUERY_THROW );
+-		xPathSettings.set( xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.util.PathSettings"), xContext), uno::UNO_QUERY_THROW );
+-	}
+-	return xPathSettings;
+-}
+-rtl::OUString ScVbaApplication::getOfficePath( const rtl::OUString& _sPathType ) throw ( uno::RuntimeException )
+-{
+-	rtl::OUString sRetPath;
+-	uno::Reference< beans::XPropertySet > xProps = lcl_getPathSettingsService( mxContext );
+-	try
+-	{
+-		rtl::OUString sUrl;
+-	 	xProps->getPropertyValue( _sPathType ) >>= sUrl;
+-
+-		// if its a list of paths then use the last one
+-		sal_Int32 nIndex =  sUrl.lastIndexOf( ';' ) ;
+-		if ( nIndex > 0 )
+-			sUrl = sUrl.copy( nIndex + 1 ); 	
+-		::osl::File::getSystemPathFromFileURL( sUrl, sRetPath );
+-	}
+-	catch (uno::Exception&)
+-	{
+-		DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());    
+-	}		
+-	return sRetPath;
+-}
+-void SAL_CALL 
+-ScVbaApplication::setDefaultFilePath( const ::rtl::OUString& DefaultFilePath ) throw (script::BasicErrorException, uno::RuntimeException)
+-{
+-	uno::Reference< beans::XPropertySet > xProps = lcl_getPathSettingsService( mxContext );
+-	rtl::OUString aURL;
+-	osl::FileBase::getFileURLFromSystemPath( DefaultFilePath, aURL );
+-	xProps->setPropertyValue(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Work")), uno::makeAny( aURL ) );
+-
+-	
+-}
+-
+-::rtl::OUString SAL_CALL 
+-ScVbaApplication::getDefaultFilePath(  ) throw (script::BasicErrorException, uno::RuntimeException)
+-{
+-	return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Work")));
+-}
+-
+-::rtl::OUString SAL_CALL 
+-ScVbaApplication::LibraryPath(  ) throw (script::BasicErrorException, uno::RuntimeException)
+-{
+-	return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Basic")));
+-}
+-
+-::rtl::OUString SAL_CALL 
+-ScVbaApplication::TemplatesPath(  ) throw (script::BasicErrorException, uno::RuntimeException)
+-{
+-	return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Template")));
+-}
+-
+-::rtl::OUString SAL_CALL 
+-ScVbaApplication::PathSeparator(  ) throw (script::BasicErrorException, uno::RuntimeException)
+-{
+-	static rtl::OUString sPathSep( RTL_CONSTASCII_USTRINGPARAM( FILE_PATH_SEPERATOR ) );
+-	return sPathSep;
+-}
+-
+-uno::Reference< excel::XRange > SAL_CALL 
+-ScVbaApplication::Intersect( const uno::Reference< excel::XRange >& Arg1, const uno::Reference< excel::XRange >& Arg2, const uno::Any& Arg3, const uno::Any& Arg4, const uno::Any& Arg5, const uno::Any& Arg6, const uno::Any& Arg7, const uno::Any& Arg8, const uno::Any& Arg9, const uno::Any& Arg10, const uno::Any& Arg11, const uno::Any& Arg12, const uno::Any& Arg13, const uno::Any& Arg14, const uno::Any& Arg15, const uno::Any& Arg16, const uno::Any& Arg17, const uno::Any& Arg18, const uno::Any& Arg19, const uno::Any& Arg20, const uno::Any& Arg21, const uno::Any& Arg22, const uno::Any& Arg23, const uno::Any& Arg24, const uno::Any& Arg25, const uno::Any& Arg26, const uno::Any& Arg27, const uno::Any& Arg28, const uno::Any& Arg29, const uno::Any& Arg30 ) throw (script::BasicErrorException, uno::RuntimeException)
+-{
+-	std::vector< uno::Reference< excel::XRange > > vRanges;
+-	if ( !Arg1.is() || !Arg2.is() )
+-		DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
+-
+-	vRanges.push_back( Arg1 );
+-	vRanges.push_back( Arg2 );
+-
+-	if ( Arg3.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg3, uno::UNO_QUERY_THROW ) );
+-	if ( Arg4.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg4, uno::UNO_QUERY_THROW ) );
+-	if ( Arg5.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg5, uno::UNO_QUERY_THROW ) );
+-	if ( Arg6.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg6, uno::UNO_QUERY_THROW ) );
+-	if ( Arg7.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg7, uno::UNO_QUERY_THROW ) );
+-	if ( Arg8.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg8, uno::UNO_QUERY_THROW ) );
+-	if ( Arg9.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg9, uno::UNO_QUERY_THROW ) );
+-	if ( Arg10.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg10, uno::UNO_QUERY_THROW ) );
+-	if ( Arg11.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg11, uno::UNO_QUERY_THROW ) );
+-	if ( Arg12.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg12, uno::UNO_QUERY_THROW ) );
+-	if ( Arg13.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg13, uno::UNO_QUERY_THROW ) );
+-	if ( Arg14.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg14, uno::UNO_QUERY_THROW ) );
+-	if ( Arg15.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg15, uno::UNO_QUERY_THROW ) );
+-	if ( Arg16.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg16, uno::UNO_QUERY_THROW ) );
+-	if ( Arg17.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg17, uno::UNO_QUERY_THROW ) );
+-	if ( Arg18.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg18, uno::UNO_QUERY_THROW ) );
+-	if ( Arg19.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg19, uno::UNO_QUERY_THROW ) );
+-	if ( Arg20.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg20, uno::UNO_QUERY_THROW ) );
+-	if ( Arg21.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg21, uno::UNO_QUERY_THROW ) );
+-	if ( Arg22.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg22, uno::UNO_QUERY_THROW ) );
+-	if ( Arg23.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg23, uno::UNO_QUERY_THROW ) );
+-	if ( Arg24.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg24, uno::UNO_QUERY_THROW ) );
+-	if ( Arg25.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg25, uno::UNO_QUERY_THROW ) );
+-	if ( Arg26.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg26, uno::UNO_QUERY_THROW ) );
+-	if ( Arg27.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg27, uno::UNO_QUERY_THROW ) );
+-	if ( Arg28.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg28, uno::UNO_QUERY_THROW ) );
+-	if ( Arg29.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg29, uno::UNO_QUERY_THROW ) );
+-	if ( Arg30.hasValue() )
+-		vRanges.push_back( uno::Reference< excel::XRange >( Arg30, uno::UNO_QUERY_THROW ) );
+-
+-	std::vector< uno::Reference< excel::XRange > >::iterator it = vRanges.begin();
+-	std::vector< uno::Reference< excel::XRange > >::iterator it_end = vRanges.end();
+-
+-	uno::Reference< excel::XRange > xRefRange( *it );
+-	++it;
+-	for ( ; it != it_end; ++it )
+-	{
+-		ScVbaRange* pRange = dynamic_cast< ScVbaRange * >( xRefRange.get());
+-		if ( pRange )
+-			xRefRange = pRange->intersect( *it );
+-		if ( !xRefRange.is() )
+-			return uno::Reference< excel::XRange >();
+-	}
+-	return xRefRange;
+-}
+-
+-void
+-ScVbaApplication::Volatile( const uno::Any& aVolatile )  throw ( uno::RuntimeException )
+-{
+-	sal_Bool bVolatile = sal_True;
+-	aVolatile >>= bVolatile;
+-	return; 
+-/*
+-	if ( bVolatile )
+-		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Volatile - not supported" ) ), uno::Reference< uno::XInterface >() );
+-	// bVoloatile is false - currently this only would make sense if 
+-	// the autocalculate mode is set to be true.
+-
+-	// so really this is crap, #TODO try and understand how ( or if ) 
+-	// the calculation mode and volatile interoperate
+-	if ( ! getCalculation() == excel::XlCalculation::xlCalculationAutomatic )
+-		setCalculation(  excel::XlCalculation::xlCalculationAutomatic );
+-*/
+-}
+-
+-void SAL_CALL
+-ScVbaApplication::DoEvents() throw ( uno::RuntimeException )
+-{
+-}
+-
+-::sal_Bool SAL_CALL 
+-ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
+-{
+-	sal_Bool bRes = sal_False;
+-	ScTabViewShell* pViewShell = getCurrentBestViewShell();
+-	if ( pViewShell )
+-	{
+-		SfxBoolItem sfxFormBar( FID_TOGGLEINPUTLINE);
+-		SfxAllItemSet reqList(  SFX_APP()->GetPool() );
+-		reqList.Put( sfxFormBar );
+-
+-		pViewShell->GetState( reqList );
+-		const SfxPoolItem *pItem=0;
+-		if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, sal_False, &pItem ) == SFX_ITEM_SET )
+-			bRes =   ((SfxBoolItem*)pItem)->GetValue();
+-	}
+-	return bRes;
+-}
+-
+-void SAL_CALL 
+-ScVbaApplication::setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException )
+-{
+-	ScTabViewShell* pViewShell = getCurrentBestViewShell();
+-	if ( pViewShell && ( _displayformulabar !=  getDisplayFormulaBar() ) )
+-	{
+-		SfxBoolItem sfxFormBar( FID_TOGGLEINPUTLINE, _displayformulabar);
+-		SfxAllItemSet reqList(  SFX_APP()->GetPool() );
+-		SfxRequest aReq( FID_TOGGLEINPUTLINE, 0, reqList );
+-		pViewShell->Execute( aReq );
+-	}	
+-}
+-
+-rtl::OUString& 
+-ScVbaApplication::getServiceImplName()
+-{
+-	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaApplication") );
+-	return sImplName;
+-}
+-
+-uno::Sequence< rtl::OUString > 
+-ScVbaApplication::getServiceNames()
+-{
+-	static uno::Sequence< rtl::OUString > aServiceNames;
+-	if ( aServiceNames.getLength() == 0 )
+-	{
+-		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Application" ) );
+-	}
+-	return aServiceNames;
+-}
 +/*************************************************************************
 + *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
++ * $RCSfile: vbaapplication.cxx,v $
++ * $Revision: 1.7 $
 + *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
++ * This file is part of OpenOffice.org.
 + *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
++ * 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.
 + *
-+ ************************************************************************/
-+#ifndef SC_VBA_FRAME_HXX
-+#define SC_VBA_FRAME_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/msforms/XLabel.hpp>
-+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XLabel > FrameImpl_BASE;
-+
-+class ScVbaFrame : public FrameImpl_BASE
-+{
-+public:
-+    ScVbaFrame(  const css::uno::Reference< ov::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, ov::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);
-+    virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif //SC_VBA_LABEL_HXX
-diff --git sc/source/ui/vba/vbaglobals.cxx sc/source/ui/vba/vbaglobals.cxx
-index 7ec0d63..bfc291f 100644
---- sc/source/ui/vba/vbaglobals.cxx
-+++ sc/source/ui/vba/vbaglobals.cxx
-@@ -41,7 +41,7 @@
- #include <cppuhelper/bootstrap.hxx>
- using namespace ::com::sun::star;
- using namespace ::com::sun::star::uno;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- 
- 
- 
-@@ -62,12 +62,12 @@ ScVbaGlobals::~ScVbaGlobals()
- }
- 
- // Will throw if singleton can't be accessed 
--uno::Reference< vba::XGlobals >
-+uno::Reference< XGlobals >
- ScVbaGlobals::getGlobalsImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException )
- {
--	uno::Reference< vba::XGlobals > xGlobals( 
-+	uno::Reference< XGlobals > xGlobals( 
- 		xContext->getValueByName( ::rtl::OUString::createFromAscii( 
--			"/singletons/org.openoffice.vba.theGlobals") ), uno::UNO_QUERY);
-+			"/singletons/ooo.vba.theGlobals") ), uno::UNO_QUERY);
- 
- 	if ( !xGlobals.is() )
- 	{
-@@ -153,9 +153,9 @@ ScVbaGlobals::Range( const uno::Any& Cell1, const uno::Any& Cell2 ) throw (uno::
- }
- 
- uno::Any SAL_CALL
--ScVbaGlobals::Names( ) throw ( uno::RuntimeException )
-+ScVbaGlobals::Names( const css::uno::Any& aIndex ) throw ( uno::RuntimeException )
- {
--	return getApplication()->Names();
-+	return getApplication()->Names( aIndex );
- }
- 
- namespace globals
-@@ -165,6 +165,6 @@ sdecl::class_<ScVbaGlobals, sdecl::with_args<false> > serviceImpl;
- extern sdecl::ServiceDecl const serviceDecl(
-     serviceImpl,
-     "ScVbaGlobals",
--    "org.openoffice.vba.Globals" );
-+    "ooo.vba.Globals" );
- }
- 
-diff --git sc/source/ui/vba/vbaglobals.hxx sc/source/ui/vba/vbaglobals.hxx
-index 85760b4..0e9e3a5 100644
---- sc/source/ui/vba/vbaglobals.hxx
-+++ sc/source/ui/vba/vbaglobals.hxx
-@@ -33,7 +33,7 @@
- #include <com/sun/star/lang/XServiceInfo.hpp>
- #include <com/sun/star/lang/XInitialization.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
--#include <org/openoffice/vba/XGlobals.hpp>
-+#include <ooo/vba/XGlobals.hpp>
- 
- #include <cppuhelper/implbase1.hxx>
- #include "vbahelper.hxx"
-@@ -43,33 +43,33 @@
-     // =============================================================================
- 
-     typedef ::cppu::WeakImplHelper1<    
--        oo::vba::XGlobals > ScVbaGlobals_BASE;
-+ ov::XGlobals > ScVbaGlobals_BASE;
- 
- 
-     class ScVbaGlobals : public ScVbaGlobals_BASE
-     {
-     private:
-             css::uno::Reference< css::uno::XComponentContext > m_xContext;
--            css::uno::Reference< oo::excel::XApplication > mxApplication;
-+            css::uno::Reference< ov::excel::XApplication > mxApplication;
-     public:
- 	
-         ScVbaGlobals(
-             css::uno::Reference< css::uno::XComponentContext >const& rxContext );
-         virtual ~ScVbaGlobals();
- 
--		static 	css::uno::Reference< oo::vba::XGlobals > getGlobalsImpl(const css::uno::Reference< css::uno::XComponentContext >& ) throw (css::uno::RuntimeException);
-+		static 	css::uno::Reference< ov::XGlobals > getGlobalsImpl(const css::uno::Reference< css::uno::XComponentContext >& ) throw (css::uno::RuntimeException);
- 
-         // XGlobals
-         virtual css::uno::Reference<
--                        oo::excel::XApplication > SAL_CALL getApplication()
-+ ov::excel::XApplication > SAL_CALL getApplication()
-                         throw (css::uno::RuntimeException);
--        virtual css::uno::Reference< oo::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
--        virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
-+        virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
-+        virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
-         virtual css::uno::Any SAL_CALL WorkSheets(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
-         virtual css::uno::Any SAL_CALL WorkBooks(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Sheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Sequence< css::uno::Any > SAL_CALL getGlobals(  ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
--	virtual css::uno::Any SAL_CALL Names( ) throw ( css::uno::RuntimeException );
-+	virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw ( css::uno::RuntimeException );
-     };
- #endif // 
-diff --git sc/source/ui/vba/vbahelper.cxx sc/source/ui/vba/vbahelper.cxx
-index 25a42da..c26a515 100644
---- sc/source/ui/vba/vbahelper.cxx
-+++ sc/source/ui/vba/vbahelper.cxx
-@@ -37,6 +37,7 @@
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/lang/XMultiComponentFactory.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
-+#include <com/sun/star/beans/XIntrospection.hpp>
- 
- #include <comphelper/processfactory.hxx>
- 
-@@ -57,9 +58,11 @@
- #include "tabvwsh.hxx"
- #include "transobj.hxx"
- #include "scmod.hxx"
--
++ * 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 <stdio.h>
++
++
++#include<com/sun/star/sheet/XSpreadsheetView.hpp>
++#include <com/sun/star/sheet/XSpreadsheets.hpp>
++#include<com/sun/star/view/XSelectionSupplier.hpp>
++#include <com/sun/star/lang/XServiceInfo.hpp>
++#include<ooo/vba/excel/XlCalculation.hpp>
++#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
++#include <com/sun/star/sheet/XCalculatable.hpp>
++#include <com/sun/star/frame/XLayoutManager.hpp>
++#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
++#include <com/sun/star/task/XStatusIndicator.hpp>
++#include <ooo/vba/excel/XlMousePointer.hpp>
++#include <com/sun/star/sheet/XNamedRanges.hpp>
++#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
++
++#include "vbaapplication.hxx"
++#include "vbaworkbooks.hxx"
++#include "vbaworkbook.hxx"
++#include "vbaworksheets.hxx"
++#include "vbarange.hxx"
++#include "vbawsfunction.hxx"
++#include "vbadialogs.hxx"
++#include "vbawindow.hxx"
++#include "vbawindows.hxx"
++#include "vbaglobals.hxx"
++#include "tabvwsh.hxx"
++#include "gridwin.hxx"
++#include "vbanames.hxx"
 +#include "vbashape.hxx"
-+#include "unonames.hxx"
++#include "vbatextboxshape.hxx"
++#include "vbaassistant.hxx"
++#include "vbacommandbars.hxx"
++#include "sc.hrc"
++
++#include <osl/file.hxx>
++
++#include <sfx2/request.hxx>
++#include <sfx2/objsh.hxx>
++#include <sfx2/viewfrm.hxx>
++#include <sfx2/app.hxx>
++
++#include <toolkit/awt/vclxwindow.hxx>
++#include <toolkit/helper/vclunohelper.hxx>
++
++#include <tools/diagnose_ex.h>
++
++#include <docuno.hxx>
++
++#include <basic/sbx.hxx>
++#include <basic/sbstar.hxx>
++#include <basic/sbuno.hxx>
++#include <basic/sbmeth.hxx>
++
++#include "convuno.hxx"
 +#include "cellsuno.hxx"
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
++#include "docsh.hxx"
++
 +using namespace ::ooo::vba;
- 
- #define POINTTO100THMILLIMETERFACTOR 35.27778
- void unoToSbxValue( SbxVariable* pVar, const uno::Any& aValue );
-@@ -67,13 +70,25 @@ void unoToSbxValue( SbxVariable* pVar, const uno::Any& aValue );
- uno::Any sbxToUnoValue( SbxVariable* pVar );
- 
- 
--namespace org
-+namespace ooo
- {
--namespace openoffice
-+namespace vba
- {
- 
- const double Millimeter::factor =  35.27778;
- 
-+uno::Reference< beans::XIntrospectionAccess >
-+getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
++using namespace ::com::sun::star;
++
++// Enable our own join detection for Intersection and Union
++// should be more efficient than using ScRangeList::Join ( because
++// we already are testing the same things )
++
++#define OWN_JOIN 1
++
++// #TODO is this defined somewhere else?
++#if ( defined UNX ) || ( defined OS2 ) //unix
++#define FILE_PATH_SEPERATOR "/"
++#else // windows
++#define FILE_PATH_SEPERATOR "\\"
++#endif 
++
++#define EXCELVERSION "11.0"
++
++class ActiveWorkbook : public ScVbaWorkbook
 +{
-+	static uno::Reference< beans::XIntrospection > xIntrospection;
-+	if( !xIntrospection.is() )
-+	{
-+		uno::Reference< lang::XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
-+		xIntrospection.set( xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.beans.Introspection") ), uno::UNO_QUERY_THROW );
++protected:
++	virtual uno::Reference< frame::XModel > getModel()
++	{ 	
++		return getCurrentDocument(); 
 +	}
-+	return xIntrospection->inspect( aObject );
-+}
++public:
++	ActiveWorkbook( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext) : ScVbaWorkbook(  xParent, xContext ){}
++};
 +
- uno::Reference< script::XTypeConverter >
- getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
- {
-@@ -215,11 +230,27 @@ dispatchRequests (uno::Reference< frame::XModel>& xModel,rtl::OUString & aUrl)
- }
- 
- 
-+void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall)
-+{
-+	ScTabViewShell* pViewShell = getBestViewShell( xModel );
-+	SfxViewFrame* pViewFrame = NULL;
-+	if ( pViewShell )
-+		pViewFrame = pViewShell->GetViewFrame();
-+	if ( pViewFrame )
-+	{
-+		SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
-+		if( pDispatcher )
-+		{
-+			pDispatcher->Execute( nSlot , nCall );
-+		}
-+	}	
-+}
-+		
- void
- implnPaste()
- {
- 	PasteCellsWarningReseter resetWarningBox;
--	ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
-+	ScTabViewShell* pViewShell = getCurrentBestViewShell();
- 	if ( pViewShell )
- 	{
- 		pViewShell->PasteFromSystem();
-@@ -515,6 +546,11 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
- 	//   of this method
- }
- 
-+ void PrintPreviewHelper( const css::uno::Any& /*EnableChanges*/, css::uno::Reference< css::frame::XModel >& xModel )
++ScVbaApplication::ScVbaApplication( uno::Reference<uno::XComponentContext >& xContext ): ScVbaApplication_BASE( uno::Reference< XHelperInterface >(), xContext ), m_xCalculation( excel::XlCalculation::xlCalculationAutomatic )
 +{
-+	dispatchExecute( xModel, SID_VIEWSHELL1 );
 +}
 +
- rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
- {
- 	uno::Type aType = pvargItem.getValueType();
-@@ -728,5 +764,65 @@ double PixelsToPoints( css::uno::Reference< css::awt::XDevice >& xDevice, double
- 	return (fPixels/fConvertFactor)/POINTTO100THMILLIMETERFACTOR;
- }
- 
-+ConcreteXShapeGeometryAttributes::ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape )
++ScVbaApplication::~ScVbaApplication()
 +{
-+	m_xShape = new ScVbaShape( xContext, xShape );
 +}
++	
 +
-+#define VBA_LEFT "PositionX"
-+#define VBA_TOP "PositionY"
-+UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComponentContext >& /*xContext*/, const uno::Reference< awt::XControl >& xControl )
++
++uno::Reference< excel::XWorkbook >
++ScVbaApplication::getActiveWorkbook() throw (uno::RuntimeException)
 +{
-+    mxModel.set( xControl->getModel(), uno::UNO_QUERY_THROW );
++	return new ActiveWorkbook( this, mxContext ); 
 +}
-+    double UserFormGeometryHelper::getLeft()
-+    {
-+	sal_Int32 nLeft = 0;
-+	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft;	
-+	return Millimeter::getInPoints( nLeft );
-+    }
-+    void UserFormGeometryHelper::setLeft( double nLeft )
-+    {
-+        mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nLeft ) ) );
-+    }
-+    double UserFormGeometryHelper::getTop()
-+    {
-+	sal_Int32 nTop = 0;
-+	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	VBA_TOP ) ) ) >>= nTop;	
-+	return Millimeter::getInPoints( nTop );
-+    }
-+    void UserFormGeometryHelper::setTop( double nTop )
-+    {
-+	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	VBA_TOP ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) );
-+    }
-+    double UserFormGeometryHelper::getHeight()
-+    {
-+	sal_Int32 nHeight = 0;
-+	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLHGT ) ) ) >>= nHeight;	
-+	return Millimeter::getInPoints( nHeight );
-+    }
-+    void UserFormGeometryHelper::setHeight( double nHeight )
-+    {
-+	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLHGT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) );
-+    }
-+    double UserFormGeometryHelper::getWidth()
-+    {
-+	sal_Int32 nWidth = 0;
-+	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLWID ) ) ) >>= nWidth;	
-+	return Millimeter::getInPoints( nWidth );
-+    }
-+    void UserFormGeometryHelper::setWidth( double nWidth)
-+    {
-+	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLWID ) ), uno::makeAny(  Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) );
-+    }
-+
-+SfxItemSet*
-+ScVbaCellRangeAccess::GetDataSet( ScCellRangeObj* pRangeObj )
++uno::Reference< excel::XWorkbook > SAL_CALL 
++ScVbaApplication::getThisWorkbook() throw (uno::RuntimeException)
 +{
-+	SfxItemSet* pDataSet = pRangeObj ? pRangeObj->GetCurrentDataSet( true ) : NULL ;
-+	return pDataSet;
-+	
++	return getActiveWorkbook();
 +}
 +
- } // openoffice
- } //org
-diff --git sc/source/ui/vba/vbahelper.hxx sc/source/ui/vba/vbahelper.hxx
-index f57dffb..9dbda9b 100644
---- sc/source/ui/vba/vbahelper.hxx
-+++ sc/source/ui/vba/vbahelper.hxx
-@@ -31,20 +31,25 @@
- #define SC_VBA_HELPER_HXX
- 
- #include <com/sun/star/drawing/XShape.hpp>
-+#include <com/sun/star/beans/XIntrospectionAccess.hpp>
- #include <com/sun/star/script/BasicErrorException.hpp>
- #include <com/sun/star/script/XTypeConverter.hpp>
- #include <com/sun/star/lang/IllegalArgumentException.hpp>
-+#include <com/sun/star/awt/XControl.hpp>
- #include <com/sun/star/awt/XDevice.hpp>
- #include <basic/sberrors.hxx>
- #include <cppuhelper/implbase1.hxx>
- #include <com/sun/star/frame/XModel.hpp>
- #include <docsh.hxx>
-+#include <sfx2/dispatch.hxx>
-+#include <ooo/vba/msforms/XShape.hpp>
-+#include "cellsuno.hxx"
- 
- namespace css = ::com::sun::star;
- 
--namespace org 
-+namespace ooo 
- {
--	namespace openoffice 
-+	namespace vba 
- 	{
- 		template < class T > 
- 		css::uno::Reference< T > getXSomethingFromArgs( css::uno::Sequence< css::uno::Any > const & args, sal_Int32 nPos, bool bCanBeNull = true ) throw (css::lang::IllegalArgumentException)
-@@ -56,10 +61,12 @@ namespace org
- 				throw css::lang::IllegalArgumentException();
- 			return aSomething;
- 		}
-+		css::uno::Reference< css::beans::XIntrospectionAccess > getIntrospectionAccess( const css::uno::Any& aObject ) throw (css::uno::RuntimeException);
- 		css::uno::Reference< css::script::XTypeConverter > getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
- 
- 		void dispatchRequests (css::uno::Reference< css::frame::XModel>& xModel,rtl::OUString & aUrl) ;
- 		void dispatchRequests (css::uno::Reference< css::frame::XModel>& xModel,rtl::OUString & aUrl, css::uno::Sequence< css::beans::PropertyValue >& sProps ) ;
-+		void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall = SFX_CALLMODE_SYNCHRON );
- 		void implnCopy();
- 		void implnPaste();
- 		void implnCut();
-@@ -79,6 +86,7 @@ namespace org
- 		// contains an empty object reference
- 		const css::uno::Any& aNULL();
- 		void PrintOutHelper( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, css::uno::Reference< css::frame::XModel >& xModel, sal_Bool bSelection  );
-+		void PrintPreviewHelper( const css::uno::Any& EnableChanges, css::uno::Reference< css::frame::XModel >& xModel );
- 
- 		rtl::OUString getAnyAsString( const css::uno::Any& pvargItem ) throw ( css::uno::RuntimeException );
- 		rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike = false); // needs to be in an uno service ( already this code is duplicated in basic )
-@@ -86,6 +94,13 @@ namespace org
- 	double PointsToPixels( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
- 	double PixelsToPoints( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
- 
-+
-+class ScVbaCellRangeAccess
++uno::Reference< XAssistant > SAL_CALL
++ScVbaApplication::getAssistant() throw (uno::RuntimeException)
 +{
-+public:
-+    static SfxItemSet* GetDataSet( ScCellRangeObj* pRangeObj );
-+};
-+
- class Millimeter
- {
- //Factor to translate between points and hundredths of millimeters:
-@@ -136,6 +151,80 @@ public:
- 		return points;
- 	}
- };
++    return uno::Reference< XAssistant >( new ScVbaAssistant( this, mxContext ) );
++}
 +
-+class AbstractGeometryAttributes // probably should replace the ShapeHelper below
++uno::Any SAL_CALL
++ScVbaApplication::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
 +{
-+public:
-+    virtual ~AbstractGeometryAttributes() {}
-+    virtual double getLeft() = 0;
-+    virtual void setLeft( double ) = 0;
-+    virtual double getTop() = 0;
-+    virtual void setTop( double ) = 0;
-+    virtual double getHeight() = 0;
-+    virtual void setHeight( double ) = 0;
-+    virtual double getWidth() = 0;
-+    virtual void setWidth( double ) = 0;
-+};
++    uno::Reference< XCommandBars > xCommandBars( new ScVbaCommandBars( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
++    if( aIndex.hasValue() )
++        return uno::makeAny( xCommandBars->Item( aIndex, uno::Any() ) );
++    return uno::makeAny( xCommandBars );
++}
 +
-+class ConcreteXShapeGeometryAttributes : public AbstractGeometryAttributes
++uno::Any SAL_CALL
++ScVbaApplication::getSelection() throw (uno::RuntimeException)
 +{
-+public:
-+    css::uno::Reference< ooo::vba::msforms::XShape > m_xShape; 
-+    ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape );
-+    virtual double getLeft()
-+    {
-+        return m_xShape->getLeft();
-+    }
-+    virtual void setLeft( double nLeft )
-+    {
-+        m_xShape->setLeft( nLeft );
++    OSL_TRACE("** ScVbaApplication::getSelection() ** ");
++    uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
++    rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
++    if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
++    {
++        uno::Reference< drawing::XShapes > xShapes( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
++        uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
++        uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
++	// if ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape
++	// and the uno object implements the com.sun.star.drawing.Text service
++	// return a textboxshape object
++	if ( ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape )
++	{
++		uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
++		if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) )  )
++		{
++        		return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
++		}
++	}
++        return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, ScVbaShape::getType( xShape ) ) ) );
 +    }
-+    virtual double getTop()
++    else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
++             xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
 +    {
-+        return m_xShape->getTop();
++	    uno::Reference< table::XCellRange > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
++	    if ( !xRange.is() )
++	    {
++		    uno::Reference< sheet::XSheetCellRangeContainer > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
++		    if ( xRanges.is() )
++			    return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( this, mxContext, xRanges ) ) );
++
++	    }
++	    return uno::makeAny( uno::Reference< excel::XRange >(new ScVbaRange( this, mxContext, xRange ) ) );
 +    }
-+    virtual void setTop( double nTop )
++    else
 +    {
-+        m_xShape->setTop( nTop );
++        throw uno::RuntimeException( sImpementaionName + rtl::OUString::createFromAscii(" donot be surpported"), uno::Reference< uno::XInterface >() );
 +    }
++}
 +
-+    virtual double getHeight()
-+    {
-+        return m_xShape->getHeight();
++uno::Reference< excel::XRange >
++ScVbaApplication::getActiveCell() throw (uno::RuntimeException )
++{
++	uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
++	uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW);
++	ScTabViewShell* pViewShell = getCurrentBestViewShell();
++	if ( !pViewShell )
++		throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewShell available"), uno::Reference< uno::XInterface >() );
++	ScViewData* pTabView = pViewShell->GetViewData();
++	if ( !pTabView )
++		throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewData available"), uno::Reference< uno::XInterface >() );
++
++	sal_Int32 nCursorX = pTabView->GetCurX();
++	sal_Int32 nCursorY = pTabView->GetCurY();
++
++	return  new ScVbaRange( this, mxContext, xRange->getCellRangeByPosition( nCursorX, nCursorY, nCursorX, nCursorY ) );
++}
++
++sal_Bool
++ScVbaApplication::getScreenUpdating() throw (uno::RuntimeException)
++{
++	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++	return !xModel->hasControllersLocked();
++}
++
++void
++ScVbaApplication::setScreenUpdating(sal_Bool bUpdate) throw (uno::RuntimeException)
++{
++	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++	if (bUpdate)
++		xModel->unlockControllers();
++	else
++		xModel->lockControllers();
++}
++
++sal_Bool
++ScVbaApplication::getDisplayStatusBar() throw (uno::RuntimeException)
++{
++	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++    uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
++    uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
++
++    if( xProps.is() ){
++        uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ), uno::UNO_QUERY_THROW );
++        rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
++        if( xLayoutManager.is() && xLayoutManager->isElementVisible( url ) ){
++            return sal_True;
++        }
 +    }
-+    virtual void setHeight( double nHeight )
-+    {
-+        m_xShape->setHeight( nHeight );
++    return sal_False;
++}
++
++void
++ScVbaApplication::setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (uno::RuntimeException)
++{
++	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++    uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
++    uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
++
++    if( xProps.is() ){
++        uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ), uno::UNO_QUERY_THROW );
++        rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
++        if( xLayoutManager.is() ){
++            if( bDisplayStatusBar && !xLayoutManager->isElementVisible( url ) ){
++                if( !xLayoutManager->showElement( url ) )
++                    xLayoutManager->createElement( url );
++                return;
++            }
++            else if( !bDisplayStatusBar && xLayoutManager->isElementVisible( url ) ){
++                xLayoutManager->hideElement( url ); 
++                return;
++            }
++        }
 +    }
-+    virtual double getWidth()
-+    {
-+        return m_xShape->getWidth();
++    return;
++}
++
++uno::Any SAL_CALL
++ScVbaApplication::Workbooks( const uno::Any& aIndex ) throw (uno::RuntimeException)
++{
++	uno::Reference< XCollection > xWorkBooks( new ScVbaWorkbooks( this, mxContext ) );
++	if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
++	{
++		// void then somebody did Workbooks.something in vba
++	    return uno::Any( xWorkBooks );
++	}
++
++	return uno::Any ( xWorkBooks->Item( aIndex, uno::Any() ) );
++}
++
++uno::Any SAL_CALL
++ScVbaApplication::Worksheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
++{
++    uno::Reference< excel::XWorkbook > xWorkbook( getActiveWorkbook(), uno::UNO_QUERY );
++        uno::Any result;
++    if ( xWorkbook.is() )
++        result  = xWorkbook->Worksheets( aIndex );
++
++    else
++        // Fixme - check if this is reasonable/desired behavior
++        throw uno::RuntimeException( rtl::OUString::createFromAscii(
++            "No ActiveWorkBook available" ), uno::Reference< uno::XInterface >() );
++
++	return result;
++}
++
++uno::Any SAL_CALL
++ScVbaApplication::WorksheetFunction( ) throw (::com::sun::star::uno::RuntimeException)
++{
++        return uno::makeAny( uno::Reference< script::XInvocation >( new ScVbaWSFunction( this, mxContext) ) );
++}
++
++uno::Any SAL_CALL 
++ScVbaApplication::Evaluate( const ::rtl::OUString& Name ) throw (uno::RuntimeException)
++{
++	// #TODO Evaluate allows other things to be evaluated, e.g. functions
++	// I think ( like SIN(3) etc. ) need to investigate that
++	// named Ranges also? e.g. [MyRange] if so need a list of named ranges
++	uno::Any aVoid;
++	return uno::Any( getActiveWorkbook()->getActiveSheet()->Range( uno::Any( Name ), aVoid ) );	
++}
++
++uno::Any 
++ScVbaApplication::Dialogs( const uno::Any &aIndex ) throw (uno::RuntimeException)
++{
++	uno::Reference< excel::XDialogs > xDialogs( new ScVbaDialogs( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), mxContext ) );
++	if( !aIndex.hasValue() )
++		return uno::Any( xDialogs );
++	return uno::Any( xDialogs->Item( aIndex ) );
++}
++
++uno::Reference< excel::XWindow > SAL_CALL 
++ScVbaApplication::getActiveWindow() throw (uno::RuntimeException)
++{
++	// #FIXME sofar can't determine Parent
++	return new ScVbaWindow( uno::Reference< XHelperInterface >(), mxContext, getCurrentDocument() );
++}
++
++uno::Any SAL_CALL 
++ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
++{
++	//# FIXME TODO, implementation
++	uno::Any result;
++	result <<= sal_False;
++	return result;
++}
++
++::rtl::OUString
++ScVbaApplication::getVersion() throw (uno::RuntimeException)
++{
++	return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(EXCELVERSION));
++}
++
++void SAL_CALL 
++ScVbaApplication::setCutCopyMode( const uno::Any& /*_cutcopymode*/ ) throw (uno::RuntimeException)
++{
++	//# FIXME TODO, implementation
++}
++
++uno::Any SAL_CALL
++ScVbaApplication::getStatusBar() throw (uno::RuntimeException)
++{
++	return uno::makeAny( !getDisplayStatusBar() );
++}
++
++void SAL_CALL 
++ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::RuntimeException)
++{
++    rtl::OUString sText;
++    sal_Bool bDefault = sal_False;
++	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++    uno::Reference< task::XStatusIndicatorSupplier > xStatusIndicatorSupplier( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++    uno::Reference< task::XStatusIndicator > xStatusIndicator( xStatusIndicatorSupplier->getStatusIndicator(), uno::UNO_QUERY_THROW );
++    if( _statusbar >>= sText )
++    {
++        setDisplayStatusBar( sal_True );
++        xStatusIndicator->start( sText, 100 );
++        //xStatusIndicator->setText( sText );
 +    }
-+    virtual void setWidth( double nWidth)
++    else if( _statusbar >>= bDefault )
 +    {
-+        m_xShape->setHeight( nWidth );
++        if( bDefault == sal_False )
++        {
++            xStatusIndicator->end();
++            setDisplayStatusBar( sal_True );
++        }
 +    }
++    else
++        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid prarameter. It should be a string or False" ),
++            uno::Reference< uno::XInterface >() );
++}
 +
-+   
-+};
-+#define VBA_LEFT "PositionX"
-+#define VBA_TOP "PositionY"
-+class UserFormGeometryHelper : public AbstractGeometryAttributes
++double SAL_CALL 
++ScVbaApplication::CountA( const uno::Any& arg1 ) throw (uno::RuntimeException)
 +{
++	double result = 0;
++	uno::Reference< script::XInvocation > xInvoc( WorksheetFunction(), uno::UNO_QUERY_THROW );
++	if  ( xInvoc.is() )
++	{
++		static rtl::OUString FunctionName( RTL_CONSTASCII_USTRINGPARAM("CountA" ) );
++		uno::Sequence< uno::Any > Params(1);
++		Params[0] = arg1;
++		uno::Sequence< sal_Int16 > OutParamIndex;
++		uno::Sequence< uno::Any > OutParam;
++		xInvoc->invoke( FunctionName, Params, OutParamIndex, OutParam ) >>= result;
++	}
++	return result;
++}
 +
-+    css::uno::Reference< css::beans::XPropertySet > mxModel;
-+public:
-+    UserFormGeometryHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::awt::XControl >& xControl );
-+    virtual double getLeft();
-+    virtual void setLeft( double nLeft );
-+    virtual double getTop();
-+    virtual void setTop( double nTop );
-+    virtual double getHeight();
-+    virtual void setHeight( double nHeight );
-+    virtual double getWidth();
-+    virtual void setWidth( double nWidth);
-+};
++::sal_Int32 SAL_CALL 
++ScVbaApplication::getCalculation() throw (uno::RuntimeException)
++{
++	uno::Reference<sheet::XCalculatable> xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW);
++	if(xCalc->isAutomaticCalculationEnabled())
++		return excel::XlCalculation::xlCalculationAutomatic;
++	else
++		return excel::XlCalculation::xlCalculationManual;
++}
 +
- class ShapeHelper
- {
- protected:
-@@ -250,7 +339,7 @@ public:
- 	} // openoffice
- } // org
- 
--namespace oo = org::openoffice;
-+namespace ov = ooo::vba;
- 
- #ifdef DEBUG
- #  define SC_VBA_FIXME(a) OSL_TRACE( a )
-diff --git sc/source/ui/vba/vbahelperinterface.hxx sc/source/ui/vba/vbahelperinterface.hxx
-index 6802426..693706e 100644
---- sc/source/ui/vba/vbahelperinterface.hxx
-+++ sc/source/ui/vba/vbahelperinterface.hxx
-@@ -31,7 +31,7 @@
- #define SC_VBA_HELPERINTERFACE_HXX
- 
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/vba/XHelperInterface.hpp>
-+#include <ooo/vba/XHelperInterface.hpp>
- #include "vbahelper.hxx"
- #include "vbaglobals.hxx"
- 
-@@ -61,17 +61,17 @@
- //     virtual OUString getName();  
- // }
- //
--const ::rtl::OUString sHelperServiceName( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.HelperServiceBase" ) );
-+const ::rtl::OUString sHelperServiceName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.HelperServiceBase" ) );
- 
- template< typename Ifc1 >
- class InheritedHelperInterfaceImpl : public Ifc1
- {
- protected: 
--	css::uno::WeakReference< oo::vba::XHelperInterface > mxParent;
-+	css::uno::WeakReference< ov::XHelperInterface > mxParent;
- 	css::uno::Reference< css::uno::XComponentContext > mxContext;
- public:
- 	InheritedHelperInterfaceImpl() {}
--	InheritedHelperInterfaceImpl( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : mxParent( xParent ), mxContext( xContext ) {}
-+	InheritedHelperInterfaceImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : mxParent( xParent ), mxContext( xContext ) {}
- 	virtual rtl::OUString& getServiceImplName() = 0;
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames() = 0;
- 
-@@ -80,7 +80,7 @@ public:
- 	{
- 		return 0x53756E4F;
- 	}
--	virtual css::uno::Reference< oo::vba::XHelperInterface > SAL_CALL getParent(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return mxParent; }
-+	virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return mxParent; }
- 	
- 	virtual css::uno::Any SAL_CALL Application(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return  css::uno::makeAny( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication() ); }
- 
-@@ -110,7 +110,7 @@ class InheritedHelperInterfaceImpl1 : public InheritedHelperInterfaceImpl< ::cpp
- {
- typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > > Base;
- public:
--	InheritedHelperInterfaceImpl1< Ifc1 > ( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}	
-+	InheritedHelperInterfaceImpl1< Ifc1 > ( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}	
- 
- };
- #endif
-diff --git sc/source/ui/vba/vbahyperlink.cxx sc/source/ui/vba/vbahyperlink.cxx
-new file mode 100644
-index 0000000..4b95eb7
---- /dev/null
-+++ sc/source/ui/vba/vbahyperlink.cxx
-@@ -0,0 +1,139 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "helperdecl.hxx"
-+#include "vbahyperlink.hxx"
-+#include <com/sun/star/container/XIndexAccess.hpp>
-+#include <com/sun/star/text/XTextFieldsSupplier.hpp> 
-+#include <com/sun/star/container/XEnumerationAccess.hpp> 
-+#include "vbarange.hxx"
++void SAL_CALL 
++ScVbaApplication::setCalculation( ::sal_Int32 _calculation ) throw (uno::RuntimeException)
++{
++	uno::Reference< sheet::XCalculatable > xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW);
++	switch(_calculation)
++	{
++		case excel::XlCalculation::xlCalculationManual:
++			xCalc->enableAutomaticCalculation(sal_False);
++			break;
++		case excel::XlCalculation::xlCalculationAutomatic:
++		case excel::XlCalculation::xlCalculationSemiautomatic:
++			xCalc->enableAutomaticCalculation(sal_True);
++			break;
++	}
++}
 +
-+using namespace ::ooo::vba;
-+using namespace ::com::sun::star;
++uno::Any SAL_CALL 
++ScVbaApplication::Windows( const uno::Any& aIndex  ) throw (uno::RuntimeException)
++{
++	uno::Reference< XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
++	if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
++		return uno::Any( xWindows );
++	return uno::Any( xWindows->Item( aIndex, uno::Any() ) );	
++}
++void SAL_CALL 
++ScVbaApplication::wait( double time ) throw (uno::RuntimeException)
++{
++	StarBASIC* pBasic = SFX_APP()->GetBasic();
++	SFX_APP()->EnterBasicCall();
++	SbxArrayRef aArgs = new SbxArray;
++	SbxVariableRef aRef = new SbxVariable;
++	aRef->PutDouble( time );
++	aArgs->Put(  aRef, 1 );
++	SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WaitUntil") ), SbxCLASS_METHOD );
++	
++	if ( pMeth )
++	{
++		pMeth->SetParameters( aArgs );
++		SbxVariableRef refTemp = pMeth;
++		// forces a broadcast
++		SbxVariableRef pNew = new  SbxMethod( *((SbxMethod*)pMeth));
++	}
++	SFX_APP()->LeaveBasicCall();
 +
-+ScVbaHyperlink::ScVbaHyperlink( uno::Sequence< uno::Any> const & args,
-+    uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) :  HyperlinkImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxCell( getXSomethingFromArgs< table::XCell >( args, 1, false ) )
++}
++
++uno::Any SAL_CALL 
++ScVbaApplication::Range( const uno::Any& Cell1, const uno::Any& Cell2 ) throw (uno::RuntimeException)
 +{
-+	mxCell = getXSomethingFromArgs< table::XCell >( args, 1, false );
-+	uno::Reference< text::XTextFieldsSupplier > xTextFields( mxCell, uno::UNO_QUERY_THROW );
-+	uno::Reference< container::XIndexAccess > xIndex( xTextFields->getTextFields(), uno::UNO_QUERY_THROW );
-+	mxTextField.set( xIndex->getByIndex(0), uno::UNO_QUERY_THROW );
++	uno::Reference< excel::XRange > xVbRange = ScVbaRange::ApplicationRange( mxContext, Cell1, Cell2 ); 
++	return uno::makeAny( xVbRange ); 
++}
++
++uno::Any SAL_CALL
++ScVbaApplication::Names( const css::uno::Any& aIndex ) throw ( uno::RuntimeException )
++{
++    uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++    uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
++    uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("NamedRanges")) , uno::UNO_QUERY_THROW );
++    css::uno::Reference< excel::XNames > xNames ( new ScVbaNames( this , mxContext , xNamedRanges , xModel ) );
++    if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
++    {
++        return uno::Any( xNames );
++}
++    return uno::Any( xNames->Item( aIndex, uno::Any() ) );
 +}
 +
-+ScVbaHyperlink::~ScVbaHyperlink()
++
++uno::Reference< excel::XWorksheet > SAL_CALL 
++ScVbaApplication::getActiveSheet() throw (uno::RuntimeException)
 +{
++    uno::Reference< excel::XWorksheet > result;
++    uno::Reference< excel::XWorkbook > xWorkbook( getActiveWorkbook(), uno::UNO_QUERY );
++    if ( xWorkbook.is() )
++    {
++        uno::Reference< excel::XWorksheet > xWorksheet( 
++            xWorkbook->getActiveSheet(), uno::UNO_QUERY );
++        if ( xWorksheet.is() )
++        {
++            result = xWorksheet;
++        }	
++    }
++
++    if ( !result.is() )
++    {
++        // Fixme - check if this is reasonable/desired behavior
++        throw uno::RuntimeException( rtl::OUString::createFromAscii(
++            "No activeSheet available" ), uno::Reference< uno::XInterface >() );
++    }
++    return result;
++	
 +}
 +
-+::rtl::OUString
-+ScVbaHyperlink::getAddress() throw (css::uno::RuntimeException)
++/*******************************************************************************
++ *  In msdn: 
++ *  Reference   Optional Variant. The destination. Can be a Range 
++ *  object, a string that contains a cell reference in R1C1-style notation,
++ *  or a string that contains a Visual Basic procedure name.
++ *  Scroll   Optional Variant. True to scrol, False to not scroll through 
++ *  the window. The default is False.
++ *  Parser is split to three parts, Range, R1C1 string and procedure name.
++ *  by test excel, it seems Scroll no effect. ??? 
++*******************************************************************************/
++void SAL_CALL 
++ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) throw (uno::RuntimeException)
 +{
-+	rtl::OUString aAddress;
-+	uno::Any aValue = mxTextField->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ) );
-+	aValue >>= aAddress;
-+	return aAddress;
++    //test Scroll is a boolean
++    sal_Bool bScroll = sal_False;
++    //R1C1-style string or a string of procedure name.
++    
++    if( Scroll.hasValue() )
++    {
++        sal_Bool aScroll = sal_False;
++        if( Scroll >>= aScroll )
++        {
++            bScroll = aScroll;
++        }
++        else
++            throw uno::RuntimeException( rtl::OUString::createFromAscii( "sencond parameter should be boolean" ),
++                    uno::Reference< uno::XInterface >() );
++    }
++
++    rtl::OUString sRangeName;
++    if( Reference >>= sRangeName )
++    {
++        uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++        uno::Reference< sheet::XSpreadsheetView > xSpreadsheet(
++                xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++        uno::Reference< sheet::XSpreadsheet > xDoc = xSpreadsheet->getActiveSheet();
++
++        ScTabViewShell* pShell = getCurrentBestViewShell();
++        ScGridWindow* gridWindow = (ScGridWindow*)pShell->GetWindow(); 
++        try
++        {
++            uno::Reference< excel::XRange > xVbaSheetRange = ScVbaRange::getRangeObjectForName( mxContext, sRangeName, getDocShell( xModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
++;
++            if( bScroll )
++            {
++                xVbaSheetRange->Select();
++                uno::Reference< excel::XWindow >  xWindow = getActiveWindow();
++                ScSplitPos eWhich = pShell->GetViewData()->GetActivePart();
++                sal_Int32 nValueX = pShell->GetViewData()->GetPosX(WhichH(eWhich));
++                sal_Int32 nValueY = pShell->GetViewData()->GetPosY(WhichV(eWhich));
++                xWindow->SmallScroll( uno::makeAny( (sal_Int16)(xVbaSheetRange->getRow() - 1) ), 
++                         uno::makeAny( (sal_Int16)nValueY ),
++                         uno::makeAny( (sal_Int16)(xVbaSheetRange->getColumn() - 1)  ), 
++                         uno::makeAny( (sal_Int16)nValueX ) );
++                gridWindow->GrabFocus();
++            }
++            else
++            {
++                xVbaSheetRange->Select();
++                gridWindow->GrabFocus();
++            }
++        }
++        catch( uno::RuntimeException )
++        {
++            //maybe this should be a procedure name
++            //TODO for procedure name
++            //browse::XBrowseNodeFactory is a singlton. OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory")
++            //and the createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) to get a root browse::XBrowseNode.
++            //for query XInvocation interface.
++            //but how to directly get the XInvocation?
++            throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid reference for range name, it should be procedure name" ),
++                    uno::Reference< uno::XInterface >() );
++        }
++        return;
++    }
++    uno::Reference< excel::XRange > xRange;
++    if( Reference >>= xRange )
++    {
++        uno::Reference< excel::XRange > xVbaRange( Reference, uno::UNO_QUERY );
++        ScTabViewShell* pShell = getCurrentBestViewShell();
++        ScGridWindow* gridWindow = (ScGridWindow*)pShell->GetWindow(); 
++        if ( xVbaRange.is() )
++        {
++            //TODO bScroll should be using, In this time, it doesenot have effection
++            if( bScroll )
++            {
++                xVbaRange->Select();
++                uno::Reference< excel::XWindow >  xWindow = getActiveWindow();
++                ScSplitPos eWhich = pShell->GetViewData()->GetActivePart();
++                sal_Int32 nValueX = pShell->GetViewData()->GetPosX(WhichH(eWhich));
++                sal_Int32 nValueY = pShell->GetViewData()->GetPosY(WhichV(eWhich));
++                xWindow->SmallScroll( uno::makeAny( (sal_Int16)(xVbaRange->getRow() - 1) ), 
++                         uno::makeAny( (sal_Int16)nValueY ),
++                         uno::makeAny( (sal_Int16)(xVbaRange->getColumn() - 1)  ), 
++                         uno::makeAny( (sal_Int16)nValueX ) );
++                gridWindow->GrabFocus();
++            }
++            else
++            {
++                xVbaRange->Select();
++                gridWindow->GrabFocus();
++            }
++        }
++        return;
++    }
++    throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid reference or name" ),
++            uno::Reference< uno::XInterface >() );
 +}
 +
-+void
-+ScVbaHyperlink::setAddress( const ::rtl::OUString & rAddress ) throw (css::uno::RuntimeException)
++namespace
 +{
-+	uno::Any aValue;
-+	aValue <<= rAddress;
-+	mxTextField->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ), aValue );
++    static uno::Reference< frame::XController > lcl_getCurrentController()
++    {
++        const uno::Reference< frame::XModel > xWorkingDoc( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
++        uno::Reference< frame::XController > xController;
++        if ( xWorkingDoc.is() )
++            xController.set( xWorkingDoc->getCurrentController(), uno::UNO_SET_THROW );
++        else
++            xController.set( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY_THROW );
++        return xController;
++    }
 +}
 +
-+::rtl::OUString
-+ScVbaHyperlink::getName() throw (css::uno::RuntimeException)
++sal_Int32 SAL_CALL
++ScVbaApplication::getCursor() throw (uno::RuntimeException)
 +{
-+	// it seems this attribute is same as TextToDisplay
-+	return getTextToDisplay();
++    sal_Int32 nPointerStyle( POINTER_ARROW );
++    try
++    {
++        const uno::Reference< frame::XController > xController( lcl_getCurrentController(),     uno::UNO_SET_THROW );
++        const uno::Reference< frame::XFrame >      xFrame     ( xController->getFrame(),        uno::UNO_SET_THROW );
++        const uno::Reference< awt::XWindow >       xWindow    ( xFrame->getContainerWindow(),   uno::UNO_SET_THROW );
++        // why the heck isn't there an XWindowPeer::getPointer, but a setPointer only?
++        const Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
++        if ( pWindow )
++            nPointerStyle = pWindow->GetSystemWindow()->GetPointer().GetStyle();
++    }
++    catch( const uno::Exception& )
++    {
++    	DBG_UNHANDLED_EXCEPTION();
++    }
++
++    switch( nPointerStyle )
++    {
++        case POINTER_ARROW:
++            return excel::XlMousePointer::xlNorthwestArrow;
++        case POINTER_NULL:
++            return excel::XlMousePointer::xlDefault;
++        case POINTER_WAIT:
++            return excel::XlMousePointer::xlWait;
++        case POINTER_TEXT:
++            return excel::XlMousePointer::xlIBeam;
++        default:
++            return excel::XlMousePointer::xlDefault;
++    }
 +}
 +
-+void
-+ScVbaHyperlink::setName( const ::rtl::OUString &  rName ) throw (css::uno::RuntimeException)
++void SAL_CALL 
++ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
 +{
-+	setTextToDisplay( rName );
++    try
++    {
++        ::std::vector< uno::Reference< frame::XController > > aControllers;
++
++        const uno::Reference< frame::XModel2 > xModel2( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
++        if ( xModel2.is() )
++        {
++            const uno::Reference< container::XEnumeration > xEnumControllers( xModel2->getControllers(), uno::UNO_SET_THROW );
++            while ( xEnumControllers->hasMoreElements() )
++            {
++                const uno::Reference< frame::XController > xController( xEnumControllers->nextElement(), uno::UNO_QUERY_THROW );
++                aControllers.push_back( xController );
++            }
++        }
++        else
++        {
++            const uno::Reference< frame::XModel > xModel( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
++            if ( xModel.is() )
++            {
++                const uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW );
++                aControllers.push_back( xController );
++            }
++            else
++            {
++                const uno::Reference< frame::XController > xController( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY_THROW );
++                aControllers.push_back( xController );
++            }
++        }
++
++        for (   ::std::vector< uno::Reference< frame::XController > >::const_iterator controller = aControllers.begin();
++                controller != aControllers.end();
++                ++controller
++            )
++        {
++            const uno::Reference< frame::XFrame >      xFrame     ( (*controller)->getFrame(),       uno::UNO_SET_THROW   );
++            const uno::Reference< awt::XWindow >       xWindow    ( xFrame->getContainerWindow(),    uno::UNO_SET_THROW   );
++
++            Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
++            OSL_ENSURE( pWindow, "ScVbaApplication::setCursor: no window!" );
++            if ( !pWindow )
++                continue;
++
++            switch( _cursor )
++            {
++                case excel::XlMousePointer::xlNorthwestArrow:
++                {
++                    const Pointer& rPointer( POINTER_ARROW );
++                    pWindow->GetSystemWindow()->SetPointer( rPointer );
++                    pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_False );
++                    break;
++                }
++                case excel::XlMousePointer::xlWait:
++                case excel::XlMousePointer::xlIBeam:
++                {
++                    const Pointer& rPointer( static_cast< PointerStyle >( _cursor ) );
++                    //It will set the edit window, toobar and statusbar's mouse pointer.
++                    pWindow->GetSystemWindow()->SetPointer( rPointer );
++                    pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_True );
++                    //It only set the edit window's mouse pointer
++                    //pWindow->.SetPointer( rPointer );
++                    //pWindow->.EnableChildPointerOverwrite( sal_True );
++                    //printf("\nset Cursor...%d\n", pWindow->.GetType());
++                    break;
++                }
++                case excel::XlMousePointer::xlDefault:
++                {
++                    const Pointer& rPointer( POINTER_NULL );
++                    pWindow->GetSystemWindow()->SetPointer( rPointer );
++                    pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_False );
++                    break;
++                }
++                default:
++                    throw uno::RuntimeException( rtl::OUString( 
++                            RTL_CONSTASCII_USTRINGPARAM("Unknown value for Cursor pointer")), uno::Reference< uno::XInterface >() );
++                    // TODO: isn't this a flaw in the API? It should be allowed to throw an
++                    // IllegalArgumentException, or so
++            }
++        }
++    }
++    catch( const uno::Exception& )
++    {
++    	DBG_UNHANDLED_EXCEPTION();
++    }
 +}
 +
-+::rtl::OUString
-+ScVbaHyperlink::getTextToDisplay() throw (css::uno::RuntimeException)
++// #TODO perhaps we should switch the return type depending of the filter 
++// type, e.g. return Calc for Calc and Excel if its an imported doc
++rtl::OUString SAL_CALL
++ScVbaApplication::getName() throw (uno::RuntimeException)
 +{
-+	rtl::OUString aTextToDisplay;
-+	uno::Any aValue = mxTextField->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ) );
-+	aValue >>= aTextToDisplay;
-+	return aTextToDisplay;
++	static rtl::OUString appName( RTL_CONSTASCII_USTRINGPARAM("Microsoft Excel" ) );
++	return appName;
 +}
 +
-+void
-+ScVbaHyperlink::setTextToDisplay( const ::rtl::OUString & rTextToDisplay ) throw (css::uno::RuntimeException)
++// #TODO #FIXME get/setDisplayAlerts are just stub impl 
++void SAL_CALL
++ScVbaApplication::setDisplayAlerts(sal_Bool /*displayAlerts*/) throw (uno::RuntimeException)
 +{
-+	uno::Any aValue;
-+	aValue <<= rTextToDisplay;
-+	mxTextField->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ), aValue );
 +}
 +
-+css::uno::Reference< ov::excel::XRange > SAL_CALL ScVbaHyperlink::Range() throw (css::uno::RuntimeException)
++sal_Bool SAL_CALL
++ScVbaApplication::getDisplayAlerts() throw (uno::RuntimeException)
 +{
-+	uno::Reference< table::XCellRange > xRange( mxCell,uno::UNO_QUERY_THROW );
-+	// FIXME: need to pass current worksheet as the parent of XRange.
-+	return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface > (), mxContext, xRange ) );
++	return sal_True;
 +}
-+
-+rtl::OUString&
-+ScVbaHyperlink::getServiceImplName()
++void SAL_CALL
++ScVbaApplication::Calculate() throw(  script::BasicErrorException , uno::RuntimeException )
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHyperlink") );
-+	return sImplName;
++	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++	uno::Reference< sheet::XCalculatable > xCalculatable( getCurrentDocument(), uno::UNO_QUERY_THROW );
++	xCalculatable->calculateAll();
 +}
 +
-+uno::Sequence< rtl::OUString >
-+ScVbaHyperlink::getServiceNames()
++uno::Reference< beans::XPropertySet > lcl_getPathSettingsService( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException )
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
++	static uno::Reference< beans::XPropertySet >  xPathSettings;
++	if ( !xPathSettings.is() )
 +	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Hyperlink" ) );
++		uno::Reference< lang::XMultiComponentFactory > xSMgr( xContext->getServiceManager(), uno::UNO_QUERY_THROW );
++		xPathSettings.set( xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.util.PathSettings"), xContext), uno::UNO_QUERY_THROW );
 +	}
-+	return aServiceNames;
-+}
-+
-+namespace hyperlink
-+{
-+namespace sdecl = comphelper::service_decl;
-+sdecl::vba_service_class_<ScVbaHyperlink, sdecl::with_args<true> > serviceImpl;
-+extern sdecl::ServiceDecl const serviceDecl(
-+    serviceImpl,
-+    "ScVbaHyperlink",
-+    "ooo.vba.excel.Hyperlink" );
++	return xPathSettings;
 +}
-diff --git sc/source/ui/vba/vbahyperlink.hxx sc/source/ui/vba/vbahyperlink.hxx
-new file mode 100644
-index 0000000..aad0a87
---- /dev/null
-+++ sc/source/ui/vba/vbahyperlink.hxx
-@@ -0,0 +1,72 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_HYPERLINK_HXX
-+#define SC_VBA_HYPERLINK_HXX
-+
-+#include <ooo/vba/excel/XHyperlink.hpp>
-+#include <com/sun/star/table/XCell.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <ooo/vba/excel/XRange.hpp>
-+
-+#include "vbahelperinterface.hxx"
-+
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XHyperlink > HyperlinkImpl_BASE;
-+
-+class ScVbaHyperlink : public HyperlinkImpl_BASE 
++rtl::OUString ScVbaApplication::getOfficePath( const rtl::OUString& _sPathType ) throw ( uno::RuntimeException )
 +{
-+	css::uno::Reference< css::table::XCell > mxCell;
-+	css::uno::Reference< css::beans::XPropertySet > mxTextField;
-+
-+public:
-+	ScVbaHyperlink( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ) throw ( css::lang::IllegalArgumentException );
-+	virtual ~ScVbaHyperlink();
-+
-+	// Attributes
-+	virtual ::rtl::OUString SAL_CALL getAddress() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setAddress( const ::rtl::OUString &rAddress ) throw (css::uno::RuntimeException);
-+	virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setName( const ::rtl::OUString &rName ) throw (css::uno::RuntimeException);
-+	virtual ::rtl::OUString SAL_CALL getTextToDisplay() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setTextToDisplay( const ::rtl::OUString &rTextToDisplay ) throw (css::uno::RuntimeException);
-+	
-+	// Methods
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range() throw (css::uno::RuntimeException);
-+
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif /* SC_VBA_HYPERLINK_HXX */
-+
-diff --git sc/source/ui/vba/vbaimage.cxx sc/source/ui/vba/vbaimage.cxx
-new file mode 100644
-index 0000000..847a08a
---- /dev/null
-+++ sc/source/ui/vba/vbaimage.cxx
-@@ -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>
++	rtl::OUString sRetPath;
++	uno::Reference< beans::XPropertySet > xProps = lcl_getPathSettingsService( mxContext );
++	try
++	{
++		rtl::OUString sUrl;
++	 	xProps->getPropertyValue( _sPathType ) >>= sUrl;
 +
-+using namespace com::sun::star;
-+using namespace ooo::vba;
++		// if its a list of paths then use the last one
++		sal_Int32 nIndex =  sUrl.lastIndexOf( ';' ) ;
++		if ( nIndex > 0 )
++			sUrl = sUrl.copy( nIndex + 1 ); 	
++		::osl::File::getSystemPathFromFileURL( sUrl, sRetPath );
++	}
++	catch (uno::Exception&)
++	{
++		DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());    
++	}		
++	return sRetPath;
++}
++void SAL_CALL 
++ScVbaApplication::setDefaultFilePath( const ::rtl::OUString& DefaultFilePath ) throw (script::BasicErrorException, uno::RuntimeException)
++{
++	uno::Reference< beans::XPropertySet > xProps = lcl_getPathSettingsService( mxContext );
++	rtl::OUString aURL;
++	osl::FileBase::getFileURLFromSystemPath( DefaultFilePath, aURL );
++	xProps->setPropertyValue(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Work")), uno::makeAny( aURL ) );
 +
++	
++}
 +
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+ScVbaImage::ScVbaImage( const uno::Reference< 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 SAL_CALL 
++ScVbaApplication::getDefaultFilePath(  ) throw (script::BasicErrorException, uno::RuntimeException)
 +{
++	return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Work")));
 +}
 +
-+rtl::OUString& 
-+ScVbaImage::getServiceImplName()
++::rtl::OUString SAL_CALL 
++ScVbaApplication::LibraryPath(  ) throw (script::BasicErrorException, uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaImage") );
-+	return sImplName;
++	return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Basic")));
 +}
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaImage::getServiceNames()
++::rtl::OUString SAL_CALL 
++ScVbaApplication::TemplatesPath(  ) throw (script::BasicErrorException, uno::RuntimeException)
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Image" ) );
-+	}
-+	return aServiceNames;
++	return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Template")));
 +}
-diff --git sc/source/ui/vba/vbaimage.hxx sc/source/ui/vba/vbaimage.hxx
-new file mode 100644
-index 0000000..2a8ba10
---- /dev/null
-+++ sc/source/ui/vba/vbaimage.hxx
-@@ -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 <ooo/vba/msforms/XImage.hpp>
-+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XImage > ImageImpl_BASE;
 +
-+class ScVbaImage : public ImageImpl_BASE
++::rtl::OUString SAL_CALL 
++ScVbaApplication::PathSeparator(  ) throw (script::BasicErrorException, uno::RuntimeException)
 +{
-+public:
-+    ScVbaImage( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pGeomHelper  );
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif //SC_VBA_IMAGE_HXX
-diff --git sc/source/ui/vba/vbainterior.cxx sc/source/ui/vba/vbainterior.cxx
-index bd17631..2dde49a 100644
---- sc/source/ui/vba/vbainterior.cxx
-+++ sc/source/ui/vba/vbainterior.cxx
-@@ -34,8 +34,11 @@
- #include <com/sun/star/beans/XIntrospectionAccess.hpp>
- #include <com/sun/star/reflection/XIdlMethod.hpp>
- #include <com/sun/star/beans/MethodConcept.hpp>
-+#include <com/sun/star/beans/NamedValue.hpp>
-+#include <com/sun/star/xml/AttributeData.hpp>
- 
--#include <org/openoffice/excel/XlColorIndex.hpp>
-+#include <ooo/vba/excel/XlColorIndex.hpp>
-+#include <ooo/vba/excel/XlPattern.hpp>
- 
- #include <comphelper/processfactory.hxx>
- #include <cppuhelper/queryinterface.hxx>
-@@ -44,12 +47,53 @@
- 
- #include "vbainterior.hxx"
- #include "vbapalette.hxx"
++	static rtl::OUString sPathSep( RTL_CONSTASCII_USTRINGPARAM( FILE_PATH_SEPERATOR ) );
++	return sPathSep;
++}
 +
-+#define STATIC_TABLE_SIZE( array )  (sizeof(array)/sizeof(*(array)))
-+#define COLORMAST 0xFFFFFF
-+const sal_uInt16 EXC_COLOR_WINDOWBACK = 65;
-+typedef std::map< sal_Int32, sal_Int32 >  PatternMap;
-+typedef std::pair< sal_Int32, sal_Int32 > PatternPair;
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
-+using namespace ::ooo::vba::excel::XlPattern;
- static const rtl::OUString BACKCOLOR( RTL_CONSTASCII_USTRINGPARAM( "CellBackColor" ) );
-+static const rtl::OUString PATTERN( RTL_CONSTASCII_USTRINGPARAM( "Pattern" ) );
-+static const rtl::OUString PATTERNCOLOR( RTL_CONSTASCII_USTRINGPARAM( "PatternColor" ) );
++typedef std::list< ScRange > Ranges;
++typedef std::list< ScRangeList > RangesList;
 +
-+PatternMap lcl_getPatternMap()
++void lcl_addRangesToVec( RangesList& vRanges, const uno::Any& aArg ) throw ( script::BasicErrorException, uno::RuntimeException )
 +{
-+    PatternMap aPatternMap;
-+    aPatternMap.insert( PatternPair( xlPatternAutomatic, 0 ) );
-+    aPatternMap.insert( PatternPair( xlPatternChecker, 9 ) );
-+    aPatternMap.insert( PatternPair( xlPatternCrissCross, 16 ) );
-+    aPatternMap.insert( PatternPair( xlPatternDown, 7 ) );
-+    aPatternMap.insert( PatternPair( xlPatternGray16, 17 ) );
-+    aPatternMap.insert( PatternPair( xlPatternGray25, 4 ) );
-+    aPatternMap.insert( PatternPair( xlPatternGray50, 2 ) );
-+    aPatternMap.insert( PatternPair( xlPatternGray75, 3 ) );
-+    aPatternMap.insert( PatternPair( xlPatternGray8, 18 ) );
-+    aPatternMap.insert( PatternPair( xlPatternGrid, 15 ) );
-+    aPatternMap.insert( PatternPair( xlPatternHorizontal, 5 ) );
-+    aPatternMap.insert( PatternPair( xlPatternLightDown, 13 ) );
-+    aPatternMap.insert( PatternPair( xlPatternLightHorizontal, 11 ) );
-+    aPatternMap.insert( PatternPair( xlPatternLightUp, 14 ) );
-+    aPatternMap.insert( PatternPair( xlPatternLightVertical, 12 ) );
-+    aPatternMap.insert( PatternPair( xlPatternNone, 0 ) );
-+    aPatternMap.insert( PatternPair( xlPatternSemiGray75, 10 ) );
-+    aPatternMap.insert( PatternPair( xlPatternSolid, 0 ) );
-+    aPatternMap.insert( PatternPair( xlPatternUp, 8 ) );
-+    aPatternMap.insert( PatternPair( xlPatternVertical, 6 ) );
-+    return aPatternMap;
++	ScRangeList theRanges;
++	uno::Reference< excel::XRange > xRange( aArg, uno::UNO_QUERY_THROW );
++	uno::Reference< XCollection > xCol( xRange->Areas( uno::Any() ), uno::UNO_QUERY_THROW );
++	sal_Int32 nCount = xCol->getCount();
++	for( sal_Int32 i = 1; i <= nCount; ++i )
++	{
++		uno::Reference< excel::XRange > xAreaRange( xCol->Item( uno::makeAny( sal_Int32(i) ), uno::Any() ), uno::UNO_QUERY_THROW );
++		uno::Reference< sheet::XCellRangeAddressable > xAddressable( xAreaRange->getCellRange(), uno::UNO_QUERY_THROW );
++		table::CellRangeAddress addr = xAddressable->getRangeAddress(); 
++		ScRange refRange;
++		ScUnoConversion::FillScRange( refRange, addr );
++		theRanges.Append( refRange );
++	}
++	vRanges.push_back( theRanges );
 +}
 +
-+static PatternMap aPatternMap( lcl_getPatternMap() );
- 
--ScVbaInterior::ScVbaInterior( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >&  xProps, ScDocument* pScDoc ) throw ( lang::IllegalArgumentException) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(xProps), m_pScDoc( pScDoc )
-+ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >&  xProps, ScDocument* pScDoc ) throw ( lang::IllegalArgumentException) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(xProps), m_pScDoc( pScDoc )
- {
-+    // auto color
-+    //m_aPattColor.SetColor( (sal_uInt32)0xFFFFFFFF );
-+    m_aPattColor.SetColor( (sal_uInt32)0x0 );
-+    m_nPattern = 0L;
- 	if ( !m_xProps.is() )
- 		throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "properties") ), uno::Reference< uno::XInterface >(), 2 ); 
- }
-@@ -57,15 +101,50 @@ ScVbaInterior::ScVbaInterior( const uno::Reference< vba::XHelperInterface >& xPa
- uno::Any
- ScVbaInterior::getColor() throw (uno::RuntimeException) 
- {
--	uno::Any aAny;
--	aAny = OORGBToXLRGB( m_xProps->getPropertyValue( BACKCOLOR ) );
--	return aAny;
-+    Color aBackColor( GetBackColor() );
-+	return uno::makeAny( OORGBToXLRGB( aBackColor.GetColor() ) );
- }
-  
- void 
- ScVbaInterior::setColor( const uno::Any& _color  ) throw (uno::RuntimeException)
- {
--	m_xProps->setPropertyValue( BACKCOLOR , XLRGBToOORGB(_color));
-+    sal_Int32 nColor = 0;
-+    if( _color >>= nColor )
-+    {
-+        SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( XLRGBToOORGB( nColor ) ) );
-+	    //m_xProps->setPropertyValue( BACKCOLOR , XLRGBToOORGB(_color));
-+        SetMixedColor();
-+}
++void lcl_addRangeToVec( Ranges& vRanges, const uno::Any& aArg ) throw ( script::BasicErrorException, uno::RuntimeException )
++{
++	uno::Reference< excel::XRange > xRange( aArg, uno::UNO_QUERY_THROW );
++	uno::Reference< XCollection > xCol( xRange->Areas( uno::Any() ), uno::UNO_QUERY_THROW );
++	sal_Int32 nCount = xCol->getCount();
++	for( sal_Int32 i = 1; i <= nCount; ++i )
++	{
++		uno::Reference< excel::XRange > xAreaRange( xCol->Item( uno::makeAny( sal_Int32(i) ), uno::Any() ), uno::UNO_QUERY_THROW );
++		uno::Reference< sheet::XCellRangeAddressable > xAddressable( xAreaRange->getCellRange(), uno::UNO_QUERY_THROW );
++		table::CellRangeAddress addr = xAddressable->getRangeAddress(); 
++		ScRange refRange;
++		ScUnoConversion::FillScRange( refRange, addr );
++		vRanges.push_back( refRange );
++	}
 +}
 +
-+void
-+ScVbaInterior::SetMixedColor()
++bool lcl_canJoin( ScRange& r1, ScRange& r2 )
 +{
-+    // pattern
-+    uno::Any aPattern = GetUserDefinedAttributes( PATTERN );
-+    if( aPattern.hasValue() )
-+    {
-+        m_nPattern = GetAttributeData( aPattern );
-+    }
-+    sal_Int32 nPattern = aPatternMap[ m_nPattern ];
-+    // pattern color
-+    uno::Any aPatternColor = GetUserDefinedAttributes( PATTERNCOLOR );
-+    if( aPatternColor.hasValue() )
-+    {
-+        sal_uInt32 nPatternColor = GetAttributeData( aPatternColor );
-+        m_aPattColor.SetColor( nPatternColor );
-+    }
-+    sal_Int32 nPatternColor = m_aPattColor.GetColor();
-+    // back color
-+    Color aBackColor( GetBackColor() );
-+    // set mixed color
-+    Color aMixedColor;
-+    if( nPattern > 0 )
-+        aMixedColor = GetPatternColor( Color(nPatternColor), aBackColor, (sal_uInt32)nPattern );
-+    else
-+        aMixedColor = GetPatternColor( aBackColor, aBackColor, (sal_uInt32)nPattern );
-+    sal_Int32 nMixedColor = aMixedColor.GetColor() & COLORMAST;
-+	m_xProps->setPropertyValue( BACKCOLOR , uno::makeAny( nMixedColor ) );
- }
- 
- uno::Reference< container::XIndexAccess >
-@@ -83,28 +162,28 @@ ScVbaInterior::setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno
- {
- 	sal_Int32 nIndex = 0;
- 	_colorindex >>= nIndex;
-+	
-+	// setColor expects colors in XL RGB values
-+	// #FIXME this is daft we convert OO RGB val to XL RGB val and
-+	// then back again to OO RGB value
-+	setColor( OORGBToXLRGB( GetIndexColor( nIndex ) ) );
++	bool bCanJoin = false;
++	SCCOL startEndColDiff = r2.aStart.Col() - r1.aEnd.Col(); 
++	SCROW startEndRowDiff = r2.aStart.Row() - r1.aEnd.Row(); 
++	SCCOL startColDiff = r2.aStart.Col() - r1.aStart.Col();
++	SCCOL endColDiff = r2.aEnd.Col() - r1.aEnd.Col();
++	SCROW startRowDiff =  r2.aStart.Row() - r1.aStart.Row();
++	SCROW endRowDiff = r2.aEnd.Row() - r1.aEnd.Row();
++	if ( ( startRowDiff == endRowDiff ) && startRowDiff == 0 && startColDiff >=0 && endColDiff > 0 && ( startEndColDiff <= 1 && startEndColDiff >= -r1.aEnd.Col() ) )
++		bCanJoin = true;
++	else if ( ( startColDiff == endColDiff ) && startColDiff == 0 && startRowDiff >= 0 && endRowDiff > 0 && ( startEndRowDiff <= 1 && startEndRowDiff  >= -r1.aEnd.Row() ) )
++		bCanJoin = true;
++#ifdef DEBUG
++	String sr1;
++	String sr2;
++	r1.Format( sr1, SCA_VALID ) ;
++	r2.Format( sr2, SCA_VALID ) ;
++	OSL_TRACE(" canJoin address %s with %s %s ( startRowDiff(%d), endRowDiff(%d), startColDiff(%d) endColDiff(%d) startEndRowDiff(%d), startEndColDiff(%d) ", 
++		rtl::OUStringToOString( sr1, RTL_TEXTENCODING_UTF8 ).getStr(),
++		rtl::OUStringToOString( sr2, RTL_TEXTENCODING_UTF8 ).getStr(), bCanJoin ? "true" : "false", startRowDiff, endRowDiff, startColDiff, endColDiff, startEndRowDiff, startEndColDiff );
++#endif
++	return bCanJoin;
++}
++// strips out ranges that contain other ranges, also
++// if the borders of the intersecting ranges are alligned 
++// then the the range is extended to the larger
++// e.g. Range("A4:D10"), Range("B4:E10") would be combined
++// to Range("A4:E10")
++void lcl_strip_containedRanges( Ranges& vRanges )
++{
++	// get rid of ranges that are surrounded by other ranges
++	for( Ranges::iterator it = vRanges.begin(); it != vRanges.end(); ++it )
++	{
++		for( Ranges::iterator it_inner = vRanges.begin(); it_inner != vRanges.end(); ++it_inner )
++		{
++			if ( it != it_inner )
++			{
++#ifdef DEBUG
++			String r1;
++			String r2;
++			it->Format( r1, SCA_VALID ) ;
++			it_inner->Format( r2, SCA_VALID ) ;
++			OSL_TRACE( "try strip/join address %s with %s ", 
++				rtl::OUStringToOString( r1, RTL_TEXTENCODING_UTF8 ).getStr(),
++				rtl::OUStringToOString( r2, RTL_TEXTENCODING_UTF8 ).getStr() );
++#endif
++				if ( it->In( *it_inner ) )
++					it_inner = vRanges.erase( it_inner );
++				else if ( it_inner->In( *it ) )
++					it = vRanges.erase( it );
++#ifndef OWN_JOIN
++				else if ( (*it_inner).aStart.Row() == (*it).aStart.Row() 
++				&& (*it_inner).aEnd.Row() == (*it).aEnd.Row() )
++				{
++					it->ExtendTo( *it_inner );
++					it_inner = vRanges.erase( it_inner );
++				}
++#else
++				else if ( lcl_canJoin( *it, *it_inner ) )
++				{
++					it->ExtendTo( *it_inner );
++					it_inner = vRanges.erase( it_inner );
++				}
++				else if ( lcl_canJoin( *it_inner, *it) )
++				{
++					it_inner->ExtendTo( *it );
++					it = vRanges.erase( it );
++				}
++#endif
++			}
++		}
++	}
++    
 +}
-+uno::Any
-+ScVbaInterior::GetIndexColor( const sal_Int32& nColorIndex )
++
++Ranges
++lcl_intersectionImpl( ScRangeList& rl1, ScRangeList& rl2 )
 +{
-+	sal_Int32 nIndex = nColorIndex;
- 	// #FIXME  xlColorIndexAutomatic & xlColorIndexNone are not really
- 	// handled properly here
--	
- 	if ( !nIndex || ( nIndex == excel::XlColorIndex::xlColorIndexAutomatic ) || ( nIndex == excel::XlColorIndex::xlColorIndexNone )  )
- 		nIndex = 2; // default is white ( this maybe will probably break, e.g. we may at some stage need to know what this interior is,  a cell or something else and then pick a default colour based on that )
- 	--nIndex; // OOo indices are zero bases
- 	uno::Reference< container::XIndexAccess > xIndex = getPalette();
--	// setColor expects colors in XL RGB values
--	// #FIXME this is daft we convert OO RGB val to XL RGB val and
--	// then back again to OO RGB value
--	setColor( OORGBToXLRGB(xIndex->getByIndex( nIndex )) );
-+    return xIndex->getByIndex( nIndex );
- }
- 
--uno::Any SAL_CALL 
--ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
-+sal_Int32
-+ScVbaInterior::GetColorIndex( const sal_Int32 nColor )
- {
--	sal_Int32 nColor = 0;
--	// getColor returns Xl ColorValue, need to convert it to OO val
--	// as the palette deals with OO RGB values 
--	// #FIXME this is daft in getColor we convert OO RGB val to XL RGB val 
--	// and then back again to OO RGB value
--	XLRGBToOORGB( getColor() ) >>= nColor; 
- 	uno::Reference< container::XIndexAccess > xIndex = getPalette();
- 	sal_Int32 nElems = xIndex->getCount();
- 	sal_Int32 nIndex = -1;
-@@ -118,7 +197,187 @@ ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
- 			break;
- 		}
- 	}     
--	return uno::makeAny( nIndex );
-+    return nIndex;
++	Ranges intersections;
++	for ( USHORT x = 0 ; x < rl1.Count(); ++x )
++	{
++		for ( USHORT y = 0 ; y < rl2.Count(); ++y )
++		{
++#ifdef DEBUG
++			String r1;
++			String r2;
++			rl1.GetObject( x )->Format( r1, SCA_VALID ) ;
++			rl2.GetObject( y )->Format( r2, SCA_VALID ) ;
++			OSL_TRACE( "comparing address %s with %s ", 
++				rtl::OUStringToOString( r1, RTL_TEXTENCODING_UTF8 ).getStr(),
++				rtl::OUStringToOString( r2, RTL_TEXTENCODING_UTF8 ).getStr() );
++#endif
++			if( rl1.GetObject( x )->Intersects( *rl2.GetObject( y ) ) )
++			{     
++				ScRange aIntersection = ScRange( Max( rl1.GetObject( x )->aStart.Col(), rl2.GetObject( y )->aStart.Col() ),
++					Max( rl1.GetObject( x )->aStart.Row(), rl2.GetObject( y )->aStart.Row() ),
++					Max( rl1.GetObject( x )->aStart.Tab(), rl2.GetObject( y )->aStart.Tab() ),
++					Min( rl1.GetObject( x )->aEnd.Col(), rl2.GetObject( y )->aEnd.Col() ),
++					Min( rl1.GetObject( x )->aEnd.Row(), rl2.GetObject( y )->aEnd.Row() ),
++						Min( rl1.GetObject( x )->aEnd.Tab(), rl2.GetObject( y )->aEnd.Tab() ) );
++				intersections.push_back( aIntersection );
++			}
++		}
++	}
++	lcl_strip_containedRanges( intersections );
++	return intersections;
 +}
 +
-+uno::Any SAL_CALL 
-+ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
++// Intersection of a set of ranges ( where each range is represented by a ScRangeList e.g.
++// any range can be a multi-area range )
++// An intersection is performed between each range in the set of ranges. 
++// The resulting set of intersections is then processed to strip out any 
++// intersections that contain other intersections ( and also ranges that directly line up
++// are joined ) ( see lcl_strip_containedRanges )
++RangesList lcl_intersections( RangesList& vRanges )
 +{
-+	sal_Int32 nColor = 0;
-+	// getColor returns Xl ColorValue, need to convert it to OO val
-+	// as the palette deals with OO RGB values 
-+	// #FIXME this is daft in getColor we convert OO RGB val to XL RGB val 
-+	// and then back again to OO RGB value
-+	XLRGBToOORGB( getColor() ) >>= nColor; 
-+     
-+	return uno::makeAny( GetIndexColor( nColor ) );
++	RangesList intersections;
++	for( RangesList::iterator it = vRanges.begin(); it != vRanges.end(); ++it )
++	{
++		Ranges intermediateList;
++		for( RangesList::iterator it_inner = vRanges.begin(); it_inner != vRanges.end(); ++it_inner )
++		{
++			if ( it != it_inner )
++			{
++				Ranges ranges = lcl_intersectionImpl( *it, *it_inner );
++				for ( Ranges::iterator range_it = ranges.begin(); range_it != ranges.end(); ++range_it )
++					intermediateList.push_back( *range_it );					
++			}
++		}
++		it = vRanges.erase( it ); // remove it so we don't include it in the next pass.
++
++		ScRangeList argIntersect;
++		lcl_strip_containedRanges( intermediateList );
++
++		for( Ranges::iterator it_inter = intermediateList.begin(); it_inter != intermediateList.end(); ++it_inter )
++#ifndef OWN_JOIN
++			argIntersect.Join( *it_inter );
++#else
++			argIntersect.Append( *it_inter );
++#endif
++
++		intersections.push_back( argIntersect );
++	}
++	return intersections;
 +}
-+Color
-+ScVbaInterior::GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern )
++
++uno::Reference< excel::XRange > SAL_CALL 
++ScVbaApplication::Intersect( const uno::Reference< excel::XRange >& Arg1, const uno::Reference< excel::XRange >& Arg2, const uno::Any& Arg3, const uno::Any& Arg4, const uno::Any& Arg5, const uno::Any& Arg6, const uno::Any& Arg7, const uno::Any& Arg8, const uno::Any& Arg9, const uno::Any& Arg10, const uno::Any& Arg11, const uno::Any& Arg12, const uno::Any& Arg13, const uno::Any& Arg14, const uno::Any& Arg15, const uno::Any& Arg16, const uno::Any& Arg17, const uno::Any& Arg18, const uno::Any& Arg19, const uno::Any& Arg20, const uno::Any& Arg21, const uno::Any& Arg22, const uno::Any& Arg23, const uno::Any& Arg24, const uno::Any& Arg25, const uno::Any& Arg26, const uno::Any& Arg27, const uno::Any& Arg28, const uno::Any& Arg29, const uno::Any& Arg30 ) throw (script::BasicErrorException, uno::RuntimeException)
 +{
-+    // 0x00 == 0% transparence (full rPattColor)
-+    // 0x80 == 100% transparence (full rBackColor)
-+    static const sal_uInt8 pnRatioTable[] =
-+    {
-+        0x80, 0x00, 0x40, 0x20, 0x60, 0x40, 0x40, 0x40,     // 00 - 07
-+        0x40, 0x40, 0x20, 0x60, 0x60, 0x60, 0x60, 0x48,     // 08 - 15
-+        0x50, 0x70, 0x78                                    // 16 - 18
-+    };
-+    return ( nXclPattern < STATIC_TABLE_SIZE( pnRatioTable ) ) ?
-+        GetMixedColor( rPattColor, rBackColor, pnRatioTable[ nXclPattern ] ) : rPattColor;
++	if ( !Arg1.is() || !Arg2.is() )
++		DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++
++	RangesList vRanges;
++	lcl_addRangesToVec( vRanges, uno::makeAny( Arg1 ) );
++	lcl_addRangesToVec( vRanges, uno::makeAny( Arg2 ) );
++
++	if ( Arg3.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg3 );
++	if ( Arg4.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg4 );
++	if ( Arg5.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg5 );
++	if ( Arg6.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg6 );
++	if ( Arg7.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg7 );
++	if ( Arg8.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg8 );
++	if ( Arg9.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg9 );
++	if ( Arg10.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg10 );
++	if ( Arg11.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg11 );
++	if ( Arg12.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg12 );
++	if ( Arg13.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg13 );
++	if ( Arg14.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg14 );
++	if ( Arg15.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg15 );
++	if ( Arg16.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg16 );
++	if ( Arg17.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg17 );
++	if ( Arg18.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg18 );
++	if ( Arg19.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg19 );
++	if ( Arg20.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg20 );
++	if ( Arg21.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg21 );
++	if ( Arg22.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg22 );
++	if ( Arg23.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg23 );
++	if ( Arg24.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg24 );
++	if ( Arg25.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg25 );
++	if ( Arg26.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg26 );
++	if ( Arg27.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg27 );
++	if ( Arg28.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg28 );
++	if ( Arg29.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg29 );
++	if ( Arg30.hasValue() )
++		lcl_addRangesToVec( vRanges, Arg30 );
++
++	uno::Reference< excel::XRange > xRefRange; 
++
++	ScRangeList aCellRanges;
++	// first pass - gets the set of all possible interections of Arg1..ArgN
++	RangesList intersections = lcl_intersections( vRanges );
++	// second pass - gets the intersections of the intersections ( don't ask, but this
++	// is what seems to happen )
++	if ( intersections.size() > 1)
++		intersections = lcl_intersections( intersections );
++	for( RangesList::iterator it = intersections.begin(); it != intersections.end(); ++it )
++	{
++		for ( USHORT x = 0 ; x < it->Count(); ++x )
++#ifndef OWN_JOIN
++			aCellRanges.Join( *it->GetObject(x) );
++#else
++			aCellRanges.Append( *it->GetObject(x) );
++#endif
++	}
++
++	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++	ScDocShell* pDocShell = getDocShell( xModel );
++	if ( aCellRanges.Count() == 1 )
++	{
++		xRefRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
++	}
++	else if ( aCellRanges.Count() > 1 )
++	{
++		uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
++		xRefRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xRanges );
++
++	}
++	return xRefRange;
 +}
-+Color
-+ScVbaInterior::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans )
++
++uno::Reference< excel::XRange > SAL_CALL 
++ScVbaApplication::Union( const uno::Reference< excel::XRange >& Arg1, const uno::Reference< excel::XRange >& Arg2, const uno::Any& Arg3, const uno::Any& Arg4, const uno::Any& Arg5, const uno::Any& Arg6, const uno::Any& Arg7, const uno::Any& Arg8, const uno::Any& Arg9, const uno::Any& Arg10, const uno::Any& Arg11, const uno::Any& Arg12, const uno::Any& Arg13, const uno::Any& Arg14, const uno::Any& Arg15, const uno::Any& Arg16, const uno::Any& Arg17, const uno::Any& Arg18, const uno::Any& Arg19, const uno::Any& Arg20, const uno::Any& Arg21, const uno::Any& Arg22, const uno::Any& Arg23, const uno::Any& Arg24, const uno::Any& Arg25, const uno::Any& Arg26, const uno::Any& Arg27, const uno::Any& Arg28, const uno::Any& Arg29, const uno::Any& Arg30 ) throw (script::BasicErrorException, uno::RuntimeException)
 +{
-+    return Color( 
-+        nTrans,
-+        GetMixedColorComp( rFore.GetRed(), rBack.GetRed(), nTrans ),
-+        GetMixedColorComp( rFore.GetGreen(), rBack.GetGreen(), nTrans ),
-+        GetMixedColorComp( rFore.GetBlue(), rBack.GetBlue(), nTrans ));
++	if ( !Arg1.is() || !Arg2.is() )
++		DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++
++	uno::Reference< excel::XRange > xRange;
++	Ranges vRanges;
++	lcl_addRangeToVec( vRanges, uno::makeAny( Arg1 ) );
++	lcl_addRangeToVec( vRanges, uno::makeAny( Arg2 ) );
++
++	if ( Arg3.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg3 );
++	if ( Arg4.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg4 );
++	if ( Arg5.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg5 );
++	if ( Arg6.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg6 );
++	if ( Arg7.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg7 );
++	if ( Arg8.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg8 );
++	if ( Arg9.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg9 );
++	if ( Arg10.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg10 );
++	if ( Arg11.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg11 );
++	if ( Arg12.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg12 );
++	if ( Arg13.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg13 );
++	if ( Arg14.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg14 );
++	if ( Arg15.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg15 );
++	if ( Arg16.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg16 );
++	if ( Arg17.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg17 );
++	if ( Arg18.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg18 );
++	if ( Arg19.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg19 );
++	if ( Arg20.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg20 );
++	if ( Arg21.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg21 );
++	if ( Arg22.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg22 );
++	if ( Arg23.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg23 );
++	if ( Arg24.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg24 );
++	if ( Arg25.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg25 );
++	if ( Arg26.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg26 );
++	if ( Arg27.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg27 );
++	if ( Arg28.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg28 );
++	if ( Arg29.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg29 );
++	if ( Arg30.hasValue() )
++		lcl_addRangeToVec( vRanges, Arg30 );
++
++	ScRangeList aCellRanges;
++	lcl_strip_containedRanges( vRanges );
++
++	for( Ranges::iterator it = vRanges.begin(); it != vRanges.end(); ++it )
++		aCellRanges.Append( *it );
++
++	uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++    ScDocShell* pDocShell = getDocShell( xModel ); 
++	if ( aCellRanges.Count() == 1 ) 
++	{
++	// normal range
++		xRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
++	}
++	else if ( aCellRanges.Count() > 1 ) // Multi-Area
++	{
++		uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
++    	xRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xRanges );
++	}
++	
++    // #FIXME need proper (WorkSheet) parent
++	return xRange;
 +}
-+sal_uInt8
-+ScVbaInterior::GetMixedColorComp(  sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans )
++
++void
++ScVbaApplication::Volatile( const uno::Any& aVolatile )  throw ( uno::RuntimeException )
 +{
-+    sal_uInt32 nTemp = ((static_cast< sal_Int32 >( nBack ) - nFore) * nTrans) / 0x80 + nFore;
-+    return static_cast< sal_uInt8 >( nTemp );
++	sal_Bool bVolatile = sal_True;
++	aVolatile >>= bVolatile;
++	return; 
++/*
++	if ( bVolatile )
++		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Volatile - not supported" ) ), uno::Reference< uno::XInterface >() );
++	// bVoloatile is false - currently this only would make sense if 
++	// the autocalculate mode is set to be true.
++
++	// so really this is crap, #TODO try and understand how ( or if ) 
++	// the calculation mode and volatile interoperate
++	if ( ! getCalculation() == excel::XlCalculation::xlCalculationAutomatic )
++		setCalculation(  excel::XlCalculation::xlCalculationAutomatic );
++*/
 +}
-+uno::Reference< container::XNameContainer >
-+ScVbaInterior::GetAttributeContainer()
++
++void SAL_CALL
++ScVbaApplication::DoEvents() throw ( uno::RuntimeException )
 +{
-+    return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue( rtl::OUString::createFromAscii( "UserDefinedAttributes" ) ), uno::UNO_QUERY_THROW );
 +}
-+sal_Int32
-+ScVbaInterior::GetAttributeData( uno::Any aValue )
++
++::sal_Bool SAL_CALL 
++ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
 +{
-+    xml::AttributeData aDataValue;
-+    if( aValue >>= aDataValue )
-+    {
-+        return aDataValue.Value.toInt32();
-+    }
-+    return sal_Int32( 0 );
++	sal_Bool bRes = sal_False;
++	ScTabViewShell* pViewShell = getCurrentBestViewShell();
++	if ( pViewShell )
++	{
++		SfxBoolItem sfxFormBar( FID_TOGGLEINPUTLINE);
++		SfxAllItemSet reqList(  SFX_APP()->GetPool() );
++		reqList.Put( sfxFormBar );
++
++		pViewShell->GetState( reqList );
++		const SfxPoolItem *pItem=0;
++		if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, sal_False, &pItem ) == SFX_ITEM_SET )
++			bRes =   ((SfxBoolItem*)pItem)->GetValue();
++	}
++	return bRes;
 +}
-+uno::Any
-+ScVbaInterior::SetAttributeData( sal_Int32 nValue )
++
++void SAL_CALL 
++ScVbaApplication::setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException )
 +{
-+    xml::AttributeData aAttributeData;
-+    //aAttributeData.Namespace = rtl::OUString::createFromAscii( "ooo.vba.excel.CellPatten");
-+    aAttributeData.Type = rtl::OUString::createFromAscii( "sal_Int32" );
-+    aAttributeData.Value = rtl::OUString::valueOf( nValue );
-+    return uno::makeAny( aAttributeData );
++	ScTabViewShell* pViewShell = getCurrentBestViewShell();
++	if ( pViewShell && ( _displayformulabar !=  getDisplayFormulaBar() ) )
++	{
++		SfxBoolItem sfxFormBar( FID_TOGGLEINPUTLINE, _displayformulabar);
++		SfxAllItemSet reqList(  SFX_APP()->GetPool() );
++		SfxRequest aReq( FID_TOGGLEINPUTLINE, 0, reqList );
++		pViewShell->Execute( aReq );
++	}	
 +}
-+uno::Any
-+ScVbaInterior::GetUserDefinedAttributes( const rtl::OUString& sName )
++
++rtl::OUString& 
++ScVbaApplication::getServiceImplName()
 +{
-+    uno::Reference< container::XNameContainer > xNameContainer( GetAttributeContainer(), uno::UNO_QUERY_THROW );
-+    if( xNameContainer->hasByName( sName ) )
-+    {
-+        return xNameContainer->getByName( sName );
-+    }
-+    return uno::Any();
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaApplication") );
++	return sImplName;
 +}
-+void
-+ScVbaInterior::SetUserDefinedAttributes( const rtl::OUString& sName, const uno::Any& aValue )
++
++uno::Sequence< rtl::OUString > 
++ScVbaApplication::getServiceNames()
 +{
-+    if( aValue.hasValue() )
-+    {
-+        uno::Reference< container::XNameContainer > xNameContainer( GetAttributeContainer(), uno::UNO_QUERY_THROW );
-+        if( xNameContainer->hasByName( sName ) )
-+            xNameContainer->removeByName( sName );
-+        xNameContainer->insertByName( sName, aValue );
-+        m_xProps->setPropertyValue( rtl::OUString::createFromAscii( "UserDefinedAttributes" ), uno::makeAny( xNameContainer ) );
-+    }
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Application" ) );
++	}
++	return aServiceNames;
 +}
-+// OOo do not support below API
-+uno::Any SAL_CALL 
-+ScVbaInterior::getPattern() throw (uno::RuntimeException)
+Index: sc/source/ui/vba/vbapagebreaks.cxx
+===================================================================
+--- sc/source/ui/vba/vbapagebreaks.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbapagebreaks.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,269 @@
++/*************************************************************************
++ *
++ * 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 "vbapagebreaks.hxx"
++#include "vbapagebreak.hxx"
++#include <ooo/vba/excel/XWorksheet.hpp>
++using namespace ::com::sun::star;
++using namespace ::ooo::vba;
++
++typedef ::cppu::WeakImplHelper1<container::XIndexAccess > RangePageBreaks_Base;
++class RangePageBreaks : public RangePageBreaks_Base
 +{
-+    // XlPattern
-+    uno::Any aPattern = GetUserDefinedAttributes( PATTERN );
-+    if( aPattern.hasValue() )
-+        return uno::makeAny( GetAttributeData( aPattern ) );
-+    return uno::makeAny( excel::XlPattern::xlPatternNone );
-+}
-+void SAL_CALL 
-+ScVbaInterior::setPattern( const uno::Any& _pattern ) throw (uno::RuntimeException)
++private:
++	uno::Reference< XHelperInterface > mxParent;
++	uno::Reference< uno::XComponentContext > mxContext;
++	uno::Reference< sheet::XSheetPageBreak > mxSheetPageBreak;
++	sal_Bool m_bColumn;
++
++public:
++	RangePageBreaks( const uno::Reference< XHelperInterface >& xParent,
++					 const uno::Reference< uno::XComponentContext >& xContext,
++					 uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak,
++					 sal_Bool bColumn ) : mxParent( xParent ), mxContext( xContext ), mxSheetPageBreak( xSheetPageBreak ), m_bColumn( bColumn )
++	{
++	}
++
++	sal_Int32 getAPIStartofRange( const uno::Reference< excel::XRange >& xRange ) throw (css::uno::RuntimeException)
++	{
++		if( m_bColumn )
++			return xRange->getColumn() - 1;
++		return xRange->getRow() - 1;
++	}
++
++	sal_Int32 getAPIEndIndexofRange( const uno::Reference< excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (uno::RuntimeException)
++	{
++		if( m_bColumn )
++			return nUsedStart + xRange->Columns( uno::Any() )->getCount();
++	    return nUsedStart + xRange->Rows( uno::Any() )->getCount();
++	}
++
++	uno::Sequence<sheet::TablePageBreakData> getAllPageBreaks() throw (uno::RuntimeException)
++	{
++		if( m_bColumn )
++			return mxSheetPageBreak->getColumnPageBreaks();
++    	return mxSheetPageBreak->getRowPageBreaks();
++	}
++
++	uno::Reference<container::XIndexAccess> getRowColContainer() throw (uno::RuntimeException)
++	{
++		uno::Reference< table::XColumnRowRange > xColumnRowRange( mxSheetPageBreak, uno::UNO_QUERY_THROW );
++    	uno::Reference<container::XIndexAccess> xIndexAccess;
++		if( m_bColumn )
++			xIndexAccess.set( xColumnRowRange->getColumns(), uno::UNO_QUERY_THROW );
++		else
++			xIndexAccess.set( xColumnRowRange->getRows(), uno::UNO_QUERY_THROW );
++    	return xIndexAccess;
++	}
++
++	sheet::TablePageBreakData getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException);
++	uno::Any Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++
++	// XIndexAccess
++	virtual sal_Int32 SAL_CALL getCount(  ) throw (uno::RuntimeException);
++	virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
++	virtual uno::Type SAL_CALL getElementType(  ) throw (uno::RuntimeException)
++	{
++		//if( m_bColumn )
++			// return excel::XVPageBreak::static_type(0);
++		return  excel::XHPageBreak::static_type(0);
++	}
++	virtual sal_Bool SAL_CALL hasElements(  ) throw (uno::RuntimeException)
++	{
++		return sal_True;
++	}
++};
++
++/** @TODO Unlike MS Excel this method only considers the pagebreaks that intersect the used range
++*  To become completely compatible the print area has to be considered. As far as I found out this printarea
++*  also considers the position and sizes of shapes and manually inserted page breaks
++*  Note: In MS  there is a limit of 1026 horizontal page breaks per sheet.
++*/    
++sal_Int32 SAL_CALL RangePageBreaks::getCount(  ) throw (uno::RuntimeException)
 +{
-+    if( _pattern >>= m_nPattern )
++    sal_Int32 nCount = 0;
++    uno::Reference< excel::XWorksheet > xWorksheet( mxParent, uno::UNO_QUERY_THROW );
++    uno::Reference< excel::XRange > xRange = xWorksheet->getUsedRange();
++    sal_Int32 nUsedStart = getAPIStartofRange( xRange );
++    sal_Int32 nUsedEnd = getAPIEndIndexofRange( xRange, nUsedStart );
++    uno::Sequence<sheet::TablePageBreakData> aTablePageBreakData = getAllPageBreaks();
++
++    sal_Int32 nLength = aTablePageBreakData.getLength();
++    for( sal_Int32 i=0; i<nLength; i++ )
 +    {
-+        SetUserDefinedAttributes( PATTERN, SetAttributeData( m_nPattern ) );
-+        SetMixedColor();
++        sal_Int32 nPos = aTablePageBreakData[i].Position;
++        if( nPos > nUsedEnd )
++            return nCount;
++        if( nPos >= nUsedStart )
++            nCount++;
 +    }
-+    else
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern index" ), uno::Reference< uno::XInterface >() );
++
++    return nCount;
 +}
-+Color
-+ScVbaInterior::GetBackColor()
++
++uno::Any SAL_CALL RangePageBreaks::getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
 +{
-+    sal_Int32 nColor = 0;
-+    Color aBackColor;
-+    uno::Any aColor = GetUserDefinedAttributes( BACKCOLOR ); 
-+    if( aColor.hasValue() )
-+    {
-+        nColor = GetAttributeData( aColor );
-+        aBackColor.SetColor( nColor );
-+    }
-+    else
++    if( (Index < getCount()) && ( Index >= 0 ))
 +    {
-+	    uno::Any aAny;
-+	    aAny = OORGBToXLRGB( m_xProps->getPropertyValue( BACKCOLOR ) );
-+        if( aAny >>= nColor )
++        sheet::TablePageBreakData aTablePageBreakData = getTablePageBreakData( Index );
++        uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer();
++        sal_Int32 nPos = aTablePageBreakData.Position;
++        if( (nPos < xIndexAccess->getCount()) && (nPos > -1) )
 +        {
-+            nColor = XLRGBToOORGB( nColor );
-+            aBackColor.SetColor( nColor );
-+            SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( nColor ) );
++            uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nPos), uno::UNO_QUERY_THROW );
++			//if( m_bColumn )
++			//	return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
++			return uno::makeAny( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
 +        }
 +    }
-+    return aBackColor;
++	throw lang::IndexOutOfBoundsException();
 +}
-+uno::Any SAL_CALL 
-+ScVbaInterior::getPatternColor() throw (uno::RuntimeException)
++
++sheet::TablePageBreakData RangePageBreaks::getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException)
 +{
-+    // 0 is the default color. no filled.
-+    uno::Any aPatternColor = GetUserDefinedAttributes( PATTERNCOLOR );
-+    if( aPatternColor.hasValue() )
++    sal_Int32 index = -1;
++    sheet::TablePageBreakData aTablePageBreakData;
++    uno::Reference< excel::XWorksheet > xWorksheet( mxParent, uno::UNO_QUERY_THROW );
++    uno::Reference< excel::XRange > xRange = xWorksheet->getUsedRange();
++    sal_Int32 nUsedStart = getAPIStartofRange( xRange );
++    sal_Int32 nUsedEnd = getAPIEndIndexofRange( xRange, nUsedStart );
++    uno::Sequence<sheet::TablePageBreakData> aTablePageBreakDataList = getAllPageBreaks();
++
++    sal_Int32 nLength = aTablePageBreakDataList.getLength();
++    for( sal_Int32 i=0; i<nLength; i++ )
 +    {
-+        sal_uInt32 nPatternColor = GetAttributeData( aPatternColor );
-+        return uno::makeAny( OORGBToXLRGB( nPatternColor ) );
++        aTablePageBreakData = aTablePageBreakDataList[i];
++        sal_Int32 nPos = aTablePageBreakData.Position;
++        if( nPos >= nUsedStart )
++            index++;
++        if( nPos > nUsedEnd )
++            DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
++        if( index == nAPIItemIndex )
++            return aTablePageBreakData;
 +    }
-+    return uno::makeAny( sal_Int32( 0 ) );
++
++    return aTablePageBreakData;
 +}
-+void SAL_CALL 
-+ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::RuntimeException)
++
++uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException)
 +{
-+    sal_Int32 nPattColor = 0;
-+    if( _patterncolor >>= nPattColor )
++    uno::Reference< excel::XRange > xRange;
++    Before >>= xRange;
++    if( !xRange.is() )
 +    {
-+        SetUserDefinedAttributes( PATTERNCOLOR, SetAttributeData( XLRGBToOORGB( nPattColor ) ) );
-+        SetMixedColor();
-+    }
-+    else
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() );
++		DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
++	}
++
++	sal_Int32 nAPIRowColIndex = getAPIStartofRange( xRange );
++	uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer();
++	uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nAPIRowColIndex), uno::UNO_QUERY_THROW );
++	xRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_True));
++	sheet::TablePageBreakData aTablePageBreakData;
++	aTablePageBreakData.ManualBreak = sal_True;
++	aTablePageBreakData.Position = nAPIRowColIndex;
++	//if( m_bColumn )
++	//	return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
++	return uno::makeAny( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
 +}
-+uno::Any SAL_CALL 
-+ScVbaInterior::getPatternColorIndex() throw (uno::RuntimeException)
++
++
++class RangePageBreaksEnumWrapper : public EnumerationHelper_BASE
++{
++	uno::Reference<container::XIndexAccess > m_xIndexAccess;
++	sal_Int32 nIndex;
++public:
++	RangePageBreaksEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
++	virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
++	{
++		return ( nIndex < m_xIndexAccess->getCount() );
++	}
++
++	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
++	{
++		if ( nIndex < m_xIndexAccess->getCount() )
++			return m_xIndexAccess->getByIndex( nIndex++ );
++		throw container::NoSuchElementException();
++	}
++};
++
++ScVbaHPageBreaks::ScVbaHPageBreaks( const uno::Reference< XHelperInterface >& xParent, 
++                                    const uno::Reference< uno::XComponentContext >& xContext,
++            		                uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak) throw (uno::RuntimeException):
++                          ScVbaHPageBreaks_BASE( xParent,xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, sal_False )), 
++						  mxSheetPageBreak( xSheetPageBreak )
 +{
-+	sal_Int32 nColor = 0;
-+	XLRGBToOORGB( getPatternColor() ) >>= nColor; 
-+     
-+	return uno::makeAny( GetIndexColor( nColor ) );
 +}
-+void SAL_CALL 
-+ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw (uno::RuntimeException)
++
++uno::Any SAL_CALL ScVbaHPageBreaks::Add( const uno::Any& Before) throw ( script::BasicErrorException, uno::RuntimeException)
 +{
-+    sal_Int32 nColorIndex = 0;
-+    if( _patterncolorindex >>= nColorIndex )
-+    {
-+        if( nColorIndex == 0 )
-+            return;
-+        sal_Int32 nPattColor = 0;
-+        GetIndexColor( nColorIndex ) >>= nPattColor;
-+        setPatternColor( uno::makeAny( OORGBToXLRGB( nPattColor ) ) );
-+    }
-+    else
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() );
- }
- 
- rtl::OUString& 
-@@ -135,7 +394,7 @@ ScVbaInterior::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Interior" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Interior" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbainterior.hxx sc/source/ui/vba/vbainterior.hxx
-index dc492d0..ee8175f 100644
---- sc/source/ui/vba/vbainterior.hxx
-+++ sc/source/ui/vba/vbainterior.hxx
-@@ -30,7 +30,7 @@
- #ifndef SC_VBA_INTERIOR_HXX
- #define SC_VBA_INTERIOR_HXX
- 
--#include <org/openoffice/excel/XInterior.hpp>
-+#include <ooo/vba/excel/XInterior.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
- #include <com/sun/star/container/XIndexAccess.hpp>
-@@ -40,16 +40,31 @@
- 
- class ScDocument;
- 
--typedef InheritedHelperInterfaceImpl1< oo::excel::XInterior > ScVbaInterior_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XInterior > ScVbaInterior_BASE;
- 
- class ScVbaInterior :  public ScVbaInterior_BASE
- {
- 	css::uno::Reference< css::beans::XPropertySet > m_xProps;
- 	ScDocument* m_pScDoc;
-+    Color m_aPattColor;
-+    sal_Int32 m_nPattern; 
- 
-         css::uno::Reference< css::container::XIndexAccess > getPalette(); 
-+    css::uno::Reference< css::container::XNameContainer > GetAttributeContainer();
-+    css::uno::Any SetAttributeData( sal_Int32 nValue );
-+    sal_Int32 GetAttributeData( css::uno::Any aValue );
-+    Color GetBackColor();
-+protected:
-+    Color GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern );
-+    Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans );
-+    sal_uInt8 GetMixedColorComp( sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans );
-+    css::uno::Any GetIndexColor( const sal_Int32& nColorIndex );
-+    sal_Int32 GetColorIndex( const sal_Int32 nColor );
-+    css::uno::Any GetUserDefinedAttributes( const rtl::OUString& sName );
-+    void SetUserDefinedAttributes( const rtl::OUString& sName, const css::uno::Any& aValue );
-+    void SetMixedColor();
- public:
--        ScVbaInterior( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+        ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext,
-                  const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = NULL) throw ( css::lang::IllegalArgumentException);
- 
-         virtual ~ScVbaInterior(){}
-@@ -59,6 +74,12 @@ public:
- 
- 	virtual css::uno::Any SAL_CALL getColorIndex() throw ( css::uno::RuntimeException);
- 	virtual void SAL_CALL setColorIndex( const css::uno::Any& _colorindex ) throw ( css::uno::RuntimeException );
-+    virtual css::uno::Any SAL_CALL getPattern() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setPattern( const css::uno::Any& _pattern ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL getPatternColor() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setPatternColor( const css::uno::Any& _patterncolor ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL getPatternColorIndex() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setPatternColorIndex( const css::uno::Any& _patterncolorindex ) throw (css::uno::RuntimeException); 
- 	//XHelperInterface
- 	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-diff --git sc/source/ui/vba/vbalabel.cxx sc/source/ui/vba/vbalabel.cxx
-index b067f1f..a5fa3c1 100644
---- sc/source/ui/vba/vbalabel.cxx
-+++ sc/source/ui/vba/vbalabel.cxx
-@@ -31,11 +31,11 @@
- #include <vector>
- 
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
- 
- 
- 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< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
- {
- }
- 
-@@ -53,3 +53,36 @@ ScVbaLabel::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star:
- {
-     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
- }
-+uno::Any SAL_CALL 
-+ScVbaLabel::getValue() throw (css::uno::RuntimeException)
++	RangePageBreaks* pPageBreaks = dynamic_cast< RangePageBreaks* >( m_xIndexAccess.get() );
++	if( pPageBreaks )
++	{
++		return pPageBreaks->Add( Before );
++	}
++	return uno::Any();
++}
++
++uno::Reference< container::XEnumeration >
++ScVbaHPageBreaks::createEnumeration() throw (uno::RuntimeException)
 +{
-+    return uno::makeAny( getCaption() );
++	return new RangePageBreaksEnumWrapper( m_xIndexAccess );
 +}
 +
-+void SAL_CALL 
-+ScVbaLabel::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++uno::Any
++ScVbaHPageBreaks::createCollectionObject( const css::uno::Any& aSource )
 +{
-+    rtl::OUString sCaption;
-+    _value >>= sCaption;
-+    setCaption( sCaption ); 
++	return aSource; // its already a pagebreak object
 +}
 +
++uno::Type 
++ScVbaHPageBreaks::getElementType() throw (uno::RuntimeException)
++{
++	return excel::XHPageBreak::static_type(0);
++}
 +
 +rtl::OUString& 
-+ScVbaLabel::getServiceImplName()
++ScVbaHPageBreaks::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreaks") );
 +	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaLabel::getServiceNames()
++ScVbaHPageBreaks::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Label" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.HPageBreaks" ) );
 +	}
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbalabel.hxx sc/source/ui/vba/vbalabel.hxx
-index 57bc956..d6846a4 100644
---- sc/source/ui/vba/vbalabel.hxx
-+++ sc/source/ui/vba/vbalabel.hxx
-@@ -30,20 +30,27 @@
- #ifndef SC_VBA_LABEL_HXX
- #define SC_VBA_LABEL_HXX
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/msforms/XLabel.hpp>
-+#include <ooo/vba/msforms/XLabel.hpp>
- 
- #include "vbacontrol.hxx"
- #include "vbahelper.hxx"
-+#include <cppuhelper/implbase2.hxx>
- 
--typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XLabel > LabelImpl_BASE;
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XLabel, css::script::XDefaultProperty  > LabelImpl_BASE;
- 
- class ScVbaLabel : public LabelImpl_BASE
- {
- public:
--    ScVbaLabel( const css::uno::Reference< css::uno::XComponentContext >& xContext,
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaLabel( const css::uno::Reference< ov::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, ov::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);
-     virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+    // XDefaultProperty
-+    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
- };
- #endif //SC_VBA_LABEL_HXX
-diff --git sc/source/ui/vba/vbalineformat.cxx sc/source/ui/vba/vbalineformat.cxx
-index 00b8b92..7c9610f 100644
---- sc/source/ui/vba/vbalineformat.cxx
-+++ sc/source/ui/vba/vbalineformat.cxx
-@@ -27,19 +27,19 @@
-  * for a copy of the LGPLv3 License.
-  *
-  ************************************************************************/
--#include <org/openoffice/office/MsoArrowheadStyle.hpp>
--#include <org/openoffice/office/MsoArrowheadLength.hpp>
--#include <org/openoffice/office/MsoArrowheadWidth.hpp>
--#include <org/openoffice/office/MsoLineDashStyle.hpp>
-+#include <ooo/vba/office/MsoArrowheadStyle.hpp>
-+#include <ooo/vba/office/MsoArrowheadLength.hpp>
-+#include <ooo/vba/office/MsoArrowheadWidth.hpp>
-+#include <ooo/vba/office/MsoLineDashStyle.hpp>
- #include <com/sun/star/drawing/LineStyle.hpp>
- #include <com/sun/star/drawing/LineDash.hpp>
- #include "vbalineformat.hxx"
- #include "vbacolorformat.hxx"
- 
--using namespace org::openoffice;
-+using namespace ooo::vba;
- using namespace com::sun::star;
- 
--ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaLineFormat_BASE( xParent, xContext ), m_xShape( xShape ) 
-+ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaLineFormat_BASE( xParent, xContext ), m_xShape( xShape ) 
- {
-     m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
-     m_nLineDashStyle = office::MsoLineDashStyle::msoLineSolid;
-@@ -450,7 +450,7 @@ ScVbaLineFormat::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.LineFormat" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.LineFormat" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbalineformat.hxx sc/source/ui/vba/vbalineformat.hxx
-index ff647ea..edfa47a 100644
---- sc/source/ui/vba/vbalineformat.hxx
-+++ sc/source/ui/vba/vbalineformat.hxx
-@@ -32,10 +32,10 @@
- 
- #include <com/sun/star/drawing/XShape.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/msforms/XLineFormat.hpp>
-+#include <ooo/vba/msforms/XLineFormat.hpp>
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1< oo::msforms::XLineFormat > ScVbaLineFormat_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::msforms::XLineFormat > ScVbaLineFormat_BASE;
- 
- class ScVbaLineFormat : public ScVbaLineFormat_BASE
- {
-@@ -51,7 +51,7 @@ protected:
-     rtl::OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (css::uno::RuntimeException);
-     sal_Int32 calculateArrowheadSize();
- public:
--    ScVbaLineFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
-+    ScVbaLineFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
- 
-     // Attributes
-     virtual sal_Int32 SAL_CALL getBeginArrowheadStyle() throw (css::uno::RuntimeException);
-@@ -78,8 +78,8 @@ public:
-     virtual void SAL_CALL setDashStyle( sal_Int32 _dashstyle ) throw (css::uno::RuntimeException);
- 
-     // Methods
--    virtual css::uno::Reference< oo::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
- };
- 
- #endif//SC_VBA_XLINEFORMAT_HXX
-diff --git sc/source/ui/vba/vbalistbox.cxx sc/source/ui/vba/vbalistbox.cxx
-index 3879ba0..2ca835f 100644
---- sc/source/ui/vba/vbalistbox.cxx
-+++ sc/source/ui/vba/vbalistbox.cxx
-@@ -33,35 +33,54 @@
- #include "vbapropvalue.hxx"
- #include <vector>
- #include <comphelper/anytostring.hxx>
-+#include <com/sun/star/script/ArrayWrapper.hpp>
- 
- using namespace com::sun::star;
--using namespace org::openoffice;
++
+Index: sc/source/ui/vba/vbaspinbutton.cxx
+===================================================================
+--- sc/source/ui/vba/vbaspinbutton.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaspinbutton.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,109 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "vbaspinbutton.hxx"
++#include <vector>
++
++using namespace com::sun::star;
 +using namespace ooo::vba;
- 
--const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
-+const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
-+const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
- const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
- 
- 
--ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ListBoxImpl_BASE( xContext, xControlShape )
-+ScVbaListBox::ScVbaListBox( const uno::Reference< 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;
-+    mpListHelper.reset( new ListControlHelper( m_xProps ) );
- }
- 
--ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ListBoxImpl_BASE( xContext, xPropSet, xControlShape )
++
++
++const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
++const static rtl::OUString SPINVALUE( RTL_CONSTASCII_USTRINGPARAM("SpinValue") );
++const static rtl::OUString SPINMAX( RTL_CONSTASCII_USTRINGPARAM("SpinValueMax") );
++const static rtl::OUString SPINMIN( RTL_CONSTASCII_USTRINGPARAM("SpinValueMin") );
++
++ScVbaSpinButton::ScVbaSpinButton(  const css::uno::Reference< ov::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 )
++{
++}
++
 +// Attributes
-+void SAL_CALL 
-+ScVbaListBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeException)
- {
--	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
-+    sal_Int32 nIndex = 0;
-+    _value >>= nIndex;
-+    Selected( nIndex );
- }
- 
 +uno::Any SAL_CALL 
-+ScVbaListBox::getListIndex() throw (uno::RuntimeException)
++ScVbaSpinButton::getValue() throw (css::uno::RuntimeException)
 +{
-+    uno::Sequence< sal_Int16 > sSelection;
-+    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
-+    if ( sSelection.getLength() == 0 )
-+        return uno::Any( sal_Int32( -1 ) );
-+    return uno::Any( sSelection[ 0 ] );
++    return  m_xProps->getPropertyValue( SPINVALUE );
 +}
++
++void SAL_CALL 
++ScVbaSpinButton::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SPINVALUE, _value );
++}
++
++::sal_Int32 SAL_CALL 
++ScVbaSpinButton::getMax() throw (uno::RuntimeException)
++{
++    sal_Int32 nMax = 0;
++    m_xProps->getPropertyValue( SPINMAX ) >>= nMax;
++    return nMax;
++}
++
++void SAL_CALL 
++ScVbaSpinButton::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SPINMAX, uno::makeAny( nVal ) ); 
++}
++
++::sal_Int32 SAL_CALL 
++ScVbaSpinButton::getMin() throw (uno::RuntimeException)
++{
++    sal_Int32 nVal = 0;
++    m_xProps->getPropertyValue( SPINMIN ) >>= nVal;
++    return nVal;
++}
++
++void SAL_CALL 
++ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) ); 
++}
++
++rtl::OUString& 
++ScVbaSpinButton::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSpinButton") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaSpinButton::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbaborders.hxx
+===================================================================
+--- sc/source/ui/vba/vbaborders.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaborders.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,7 +31,7 @@
+ #define SC_VBA_BORDERS_HXX
  
--// Attributes
- uno::Any SAL_CALL 
- ScVbaListBox::getValue() throw (uno::RuntimeException)
- {
-+    uno::Sequence< sal_Int16 > sSelection;
-+    uno::Sequence< rtl::OUString > sItems;
-+    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
-+    m_xProps->getPropertyValue( ITEMS ) >>= sItems;
-     if( getMultiSelect() )
-         throw uno::RuntimeException( rtl::OUString::createFromAscii(
-                     "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
--    uno::Reference< form::validation::XValidatableFormComponent > xValidatableFormComponent( m_xProps, uno::UNO_QUERY_THROW );
--    return xValidatableFormComponent->getCurrentValue();
-+    uno::Any aRet;
-+    if ( sSelection.getLength() )
-+        aRet = uno::makeAny( sItems[ sSelection[ 0 ] ] ); 
-+    return aRet;
- }
- 
- void SAL_CALL 
-@@ -91,18 +110,17 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
-         throw uno::RuntimeException( rtl::OUString::createFromAscii(
-                     "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
- 
--    nList.realloc( 1 );
--    nList[0] = nValue;
--            
--	m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
-+    uno::Sequence< sal_Int16 > nSelectedIndices(1);
-+    nSelectedIndices[ 0 ] = nValue;
-+    m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nSelectedIndices ) ); 
-+    m_xProps->setPropertyValue( TEXT, uno::makeAny( sValue ) ); 
- }
- 
- ::rtl::OUString SAL_CALL 
- ScVbaListBox::getText() throw (uno::RuntimeException)
- {
- 	rtl::OUString result;
--    uno::Reference< form::validation::XValidatableFormComponent > xValidatableFormComponent( m_xProps, uno::UNO_QUERY_THROW );
--    xValidatableFormComponent->getCurrentValue() >>= result;
-+	getValue() >>= result;
- 	return result;
- }
- 
-@@ -125,106 +143,45 @@ ScVbaListBox::setMultiSelect( sal_Bool _multiselect ) throw (css::uno::RuntimeEx
- {
-     m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ), uno::makeAny( _multiselect ) );
- }
--/*
--css::uno::Sequence< sal_Bool > SAL_CALL 
--ScVbaListBox::getSelected() throw (css::uno::RuntimeException)
--{
--    uno::Sequence< rtl::OUString > sList;
--    uno::Sequence< sal_Int16 > nList;
--    m_xProps->getPropertyValue( ITEMS ) >>= sList;
--    uno::Sequence< sal_Bool > bSelected( sList.getLength() );
--    for( sal_Int16 i = 0; i < bSelected.getLength(); i++ )
--        bSelected[i] = sal_False;
--    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
--    for( sal_Int16 i = 0; i < nList.getLength(); i++ )
--    {
--        bSelected[nList[i]] = sal_True;
--    }
--    return bSelected;
--}
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/excel/XBorders.hpp>
++#include <ooo/vba/excel/XBorders.hpp>
  
--void SAL_CALL 
--ScVbaListBox::setSelected( const css::uno::Sequence< sal_Bool >& _selected ) throw (css::uno::RuntimeException)
--{
--}
--*/
- css::uno::Any SAL_CALL 
- ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
- {
-     uno::Sequence< rtl::OUString > sList;
-     m_xProps->getPropertyValue( ITEMS ) >>= sList;
-     sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() );
--    sal_Int16 nIndex = m_nIndex;
--    if( 0 > nIndex && nLength < nIndex )
-+    // no choice but to do a horror cast as internally
-+    // the indices are but sal_Int16 
-+    sal_Int16 nIndex = static_cast< sal_Int16 >( index );
-+    if( nIndex < 0 || nIndex >= nLength )
-         throw uno::RuntimeException( rtl::OUString::createFromAscii(
-                     "Error Number." ), uno::Reference< uno::XInterface >() );
--    m_nIndex = static_cast< sal_Int16 >( index );
--    return uno::makeAny( uno::Reference< vba::XPropValue > ( new ScVbaPropValue( this ) ) );
-+    m_nIndex = nIndex;
-+    return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) );
- }
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/table/XCellRange.hpp>
+@@ -40,7 +40,7 @@
+  
+ #include "vbacollectionimpl.hxx"
  
- // Methods
- void SAL_CALL 
- ScVbaListBox::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
+-typedef CollTestImplHelper< oo::excel::XBorders > ScVbaBorders_BASE;
++typedef CollTestImplHelper< ov::excel::XBorders > ScVbaBorders_BASE;
+ class ScVbaPalette;
+ class ScVbaBorders : public ScVbaBorders_BASE
  {
--	if ( pvargItem.hasValue()  )
--	{
--		uno::Sequence< rtl::OUString > sList;
--		m_xProps->getPropertyValue( ITEMS ) >>= sList;
--
--		sal_Int32 nIndex = sList.getLength();
--
--		if ( pvargIndex.hasValue() )
--			pvargIndex >>= nIndex;
--
--		rtl::OUString sString = getAnyAsString( pvargItem );
--
--		// if no index specified or item is to be appended to end of 
--		// list just realloc the array and set the last item
--		if ( nIndex  == sList.getLength() )
--		{
--			sal_Int32 nOldSize = sList.getLength();
--			sList.realloc( nOldSize + 1 );
--			sList[ nOldSize ] = sString; 
-+	mpListHelper->AddItem( pvargItem, pvargIndex );
- 		}
--		else
--		{
--			// just copy those elements above the one to be inserted
--			std::vector< rtl::OUString > sVec;
--			// reserve just the amount we need to copy
--			sVec.reserve( sList.getLength() - nIndex );
--
--			// point at first element to copy
--			rtl::OUString* pString = sList.getArray() + nIndex;
--			const rtl::OUString* pEndString = sList.getArray() + sList.getLength();
--			// insert the new element
--			sVec.push_back( sString );
--			// copy elements	
--			for ( ; pString != pEndString; ++pString )
--				sVec.push_back( *pString );
--		
--			sList.realloc(  sList.getLength() + 1 );
- 
--			// point at first element to be overwritten
--			pString = sList.getArray() + nIndex;
--			pEndString = sList.getArray() + sList.getLength();
--			std::vector< rtl::OUString >::iterator it = sVec.begin();
--			for ( ; pString != pEndString; ++pString, ++it)
--				*pString = *it;	
--			//
-+void SAL_CALL 
-+ScVbaListBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
-+		{
-+	mpListHelper->removeItem( index );
- 		}
+@@ -49,7 +49,7 @@
+ 	bool bRangeIsSingleCell;
+ 	css::uno::Reference< css::beans::XPropertySet > m_xProps;
+ public:
+-	ScVbaBorders( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::table::XCellRange >& xRange, ScVbaPalette& rPalette );
++	ScVbaBorders( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::table::XCellRange >& xRange, ScVbaPalette& rPalette );
+ 	virtual ~ScVbaBorders() {}
  
--		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
--		
--	}
--}
--
- void SAL_CALL 
- ScVbaListBox::Clear(  ) throw (uno::RuntimeException)
- {
--	// urk, setValue doesn't seem to work !!
--	//setValue( uno::makeAny( sal_Int16() ) );
--	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
-+	mpListHelper->Clear();
- }
+ 	// XEnumerationAccess
+Index: sc/source/ui/vba/vbahyperlink.cxx
+===================================================================
+--- sc/source/ui/vba/vbahyperlink.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbahyperlink.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,139 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "helperdecl.hxx"
++#include "vbahyperlink.hxx"
++#include <com/sun/star/container/XIndexAccess.hpp>
++#include <com/sun/star/text/XTextFieldsSupplier.hpp> 
++#include <com/sun/star/container/XEnumerationAccess.hpp> 
++#include "vbarange.hxx"
 +
-+// this is called when something like the following vba code is used
-+// to set the selected state of particular entries in the Listbox
-+// ListBox1.Selected( 3 ) = false
- //PropListener
- void 
- ScVbaListBox::setValueEvent( const uno::Any& value )
-@@ -234,7 +191,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
-         throw uno::RuntimeException( rtl::OUString::createFromAscii(
-                     "Invalid type\n. need boolean." ), uno::Reference< uno::XInterface >() );
-     uno::Sequence< sal_Int16 > nList;
--    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
-+    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList;
-     sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
-     sal_Int16 nIndex = m_nIndex;
-     for( sal_Int16 i = 0; i < nLength; i++ )
-@@ -250,7 +207,8 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
-                     nList[i] = nList[i + 1];
-                 }
-                 nList.realloc( nLength - 1 );
--                m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
-+                //m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
-+		m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nList ) );
-                 return;
-             }
-         }
-@@ -271,6 +229,10 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
-     }
- }
- 
-+// this is called when something like the following vba code is used
-+// to determine the selected state of particular entries in the Listbox
-+// msgbox ListBox1.Selected( 3 )
++using namespace ::ooo::vba;
++using namespace ::com::sun::star;
++
++ScVbaHyperlink::ScVbaHyperlink( uno::Sequence< uno::Any> const & args,
++    uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) :  HyperlinkImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxCell( getXSomethingFromArgs< table::XCell >( args, 1, false ) )
++{
++	mxCell = getXSomethingFromArgs< table::XCell >( args, 1, false );
++	uno::Reference< text::XTextFieldsSupplier > xTextFields( mxCell, uno::UNO_QUERY_THROW );
++	uno::Reference< container::XIndexAccess > xIndex( xTextFields->getTextFields(), uno::UNO_QUERY_THROW );
++	mxTextField.set( xIndex->getByIndex(0), uno::UNO_QUERY_THROW );
++}
++
++ScVbaHyperlink::~ScVbaHyperlink()
++{
++}
++
++::rtl::OUString
++ScVbaHyperlink::getAddress() throw (css::uno::RuntimeException)
++{
++	rtl::OUString aAddress;
++	uno::Any aValue = mxTextField->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ) );
++	aValue >>= aAddress;
++	return aAddress;
++}
 +
- css::uno::Any 
- ScVbaListBox::getValueEvent()
- {
-@@ -287,3 +249,41 @@ ScVbaListBox::getValueEvent()
- 
-     return uno::makeAny( sal_False );
- }
++void
++ScVbaHyperlink::setAddress( const ::rtl::OUString & rAddress ) throw (css::uno::RuntimeException)
++{
++	uno::Any aValue;
++	aValue <<= rAddress;
++	mxTextField->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ), aValue );
++}
 +
-+void SAL_CALL
-+ScVbaListBox::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
++::rtl::OUString
++ScVbaHyperlink::getName() throw (css::uno::RuntimeException)
 +{
-+	ScVbaControl::setRowSource( _rowsource );
-+	mpListHelper->setRowSource( _rowsource );
++	// it seems this attribute is same as TextToDisplay
++	return getTextToDisplay();
 +}
 +
-+sal_Int32 SAL_CALL
-+ScVbaListBox::getListCount() throw (uno::RuntimeException)
++void
++ScVbaHyperlink::setName( const ::rtl::OUString &  rName ) throw (css::uno::RuntimeException)
 +{
-+	return mpListHelper->getListCount();
++	setTextToDisplay( rName );
 +}
 +
-+uno::Any SAL_CALL 
-+ScVbaListBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
++::rtl::OUString
++ScVbaHyperlink::getTextToDisplay() throw (css::uno::RuntimeException)
 +{
-+	return mpListHelper->List( pvargIndex, pvarColumn );
++	rtl::OUString aTextToDisplay;
++	uno::Any aValue = mxTextField->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ) );
++	aValue >>= aTextToDisplay;
++	return aTextToDisplay;
 +}
 +
-+rtl::OUString& 
-+ScVbaListBox::getServiceImplName()
++void
++ScVbaHyperlink::setTextToDisplay( const ::rtl::OUString & rTextToDisplay ) throw (css::uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaListBox") );
++	uno::Any aValue;
++	aValue <<= rTextToDisplay;
++	mxTextField->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ), aValue );
++}
++
++css::uno::Reference< ov::excel::XRange > SAL_CALL ScVbaHyperlink::Range() throw (css::uno::RuntimeException)
++{
++	uno::Reference< table::XCellRange > xRange( mxCell,uno::UNO_QUERY_THROW );
++	// FIXME: need to pass current worksheet as the parent of XRange.
++	return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface > (), mxContext, xRange ) );
++}
++
++rtl::OUString&
++ScVbaHyperlink::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHyperlink") );
 +	return sImplName;
 +}
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaListBox::getServiceNames()
++uno::Sequence< rtl::OUString >
++ScVbaHyperlink::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ScVbaListBox" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Hyperlink" ) );
 +	}
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbalistbox.hxx sc/source/ui/vba/vbalistbox.hxx
-index 4db0b88..1848ba6 100644
---- sc/source/ui/vba/vbalistbox.hxx
-+++ sc/source/ui/vba/vbalistbox.hxx
-@@ -32,31 +32,31 @@
- #include <cppuhelper/implbase2.hxx>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/script/XDefaultProperty.hpp>
--#include <org/openoffice/msforms/XListBox.hpp>
-+#include <ooo/vba/msforms/XListBox.hpp>
- #include <com/sun/star/beans/PropertyAttribute.hpp>
- 
- #include "vbacontrol.hxx"
- #include "vbapropvalue.hxx"
-+#include "vbalistcontrolhelper.hxx"
- #include "vbahelper.hxx"
- 
--typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::msforms::XListBox, css::script::XDefaultProperty > ListBoxImpl_BASE;
-+typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XListBox, css::script::XDefaultProperty > ListBoxImpl_BASE;
- class ScVbaListBox : public ListBoxImpl_BASE
-     ,public PropListener
- {		
-+	std::auto_ptr< ListControlHelper > mpListHelper;
- 	rtl::OUString sSourceName; 
- 	rtl::OUString msDftPropName;
++
++namespace hyperlink
++{
++namespace sdecl = comphelper::service_decl;
++sdecl::vba_service_class_<ScVbaHyperlink, sdecl::with_args<true> > serviceImpl;
++extern sdecl::ServiceDecl const serviceDecl(
++    serviceImpl,
++    "ScVbaHyperlink",
++    "ooo.vba.excel.Hyperlink" );
++}
+Index: sc/source/ui/vba/vbafont.cxx
+===================================================================
+--- sc/source/ui/vba/vbafont.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbafont.cxx	(.../cws/npower11)	(revision 266650)
+@@ -32,13 +32,18 @@
+ #include <com/sun/star/awt/FontUnderline.hpp>
+ #include <com/sun/star/awt/FontStrikeout.hpp>
+ #include <com/sun/star/awt/FontSlant.hpp>
+-#include <org/openoffice/excel/XlColorIndex.hpp>
+-#include <org/openoffice/excel/XlUnderlineStyle.hpp>
++#include <com/sun/star/text/XSimpleText.hpp>
++#include <com/sun/star/table/XCellRange.hpp>
++#include <com/sun/star/table/XCell.hpp>
++#include <com/sun/star/table/XColumnRowRange.hpp>
++#include <ooo/vba/excel/XlColorIndex.hpp>
++#include <ooo/vba/excel/XlUnderlineStyle.hpp>
+ #include <svtools/itemset.hxx>
+ #include "vbafont.hxx"
+ #include "scitems.hxx"
++#include "cellsuno.hxx"
  
-     sal_Int16 m_nIndex;
- 	
- public:
--	ScVbaListBox( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
--    ScVbaListBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
--                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
--                    const css::uno::Reference< css::drawing::XControlShape> xControlShape );
--
-+	ScVbaListBox( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pGeomHelper );
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
  
- 	// Attributes
-+	virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setListIndex( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
-+	virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- 	virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
-@@ -67,12 +67,19 @@ public:
+ // use local constants there is no need to expose these constants
+@@ -64,14 +69,58 @@
+ // specifies a hight of normal font
+ const short NORMALHEIGHT = 100;
  
- 	// Methods
- 	virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Clear(  ) throw (css::uno::RuntimeException);
--
-+	virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
-+	// XControl
-+    virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
+-ScVbaFont::ScVbaFont( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, uno::Reference< beans::XPropertySet > xPropertySet, SfxItemSet* pDataSet  ) throw ( uno::RuntimeException ) : ScVbaFont_BASE( xParent, xContext ), mxFont( xPropertySet, css::uno::UNO_QUERY_THROW ), mPalette( dPalette ),  mpDataSet( pDataSet )
++ScVbaFont::ScVbaFont( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, uno::Reference< beans::XPropertySet > xPropertySet, ScCellRangeObj* pRangeObj  ) throw ( uno::RuntimeException ) : ScVbaFont_BASE( xParent, xContext ), mxFont( xPropertySet, css::uno::UNO_QUERY_THROW ), mPalette( dPalette ),  mpRangeObj( pRangeObj )
+ {
+ }
  
- 	// XDefaultProperty
-     rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-     
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();    
-+
-     //PropListener
-     virtual void setValueEvent( const css::uno::Any& value );
-     virtual css::uno::Any getValueEvent();
-diff --git sc/source/ui/vba/vbalistcontrolhelper.cxx sc/source/ui/vba/vbalistcontrolhelper.cxx
-new file mode 100644
-index 0000000..620734a
---- /dev/null
-+++ sc/source/ui/vba/vbalistcontrolhelper.cxx
-@@ -0,0 +1,145 @@
-+#include <vbalistcontrolhelper.hxx>
++SfxItemSet*  
++ScVbaFont::GetDataSet()
++{
++    SfxItemSet* pDataSet = ScVbaCellRangeAccess::GetDataSet( mpRangeObj );
++    return pDataSet;
++}
 +
-+using namespace com::sun::star;
-+using namespace ooo::vba;
++ScVbaFont::~ScVbaFont()
++{
++}
 +
-+const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
 +
-+void SAL_CALL 
-+ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
++uno::Reference< beans::XPropertySet > lcl_TextProperties( uno::Reference< table::XCell >& xIf ) throw ( uno::RuntimeException )
 +{
-+	if ( pvargItem.hasValue()  )
++	uno::Reference< text::XTextRange > xTxtRange( xIf, uno::UNO_QUERY_THROW );
++	uno::Reference< text::XSimpleText > xTxt( xTxtRange->getText(), uno::UNO_QUERY_THROW ) ;
++	uno::Reference< beans::XPropertySet > xProps( xTxt->createTextCursor(), uno::UNO_QUERY_THROW );
++	return xProps;
++}
+ void SAL_CALL
+ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeException )
+ {
++	// #FIXEME create some sort of generic get/set code where 
++	// you can pass a functor
++	// get/set - Super/sub script code is exactly the same
++	// except for the call applied at each cell position
++        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
++        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
++	if ( !xCell.is() )
 +	{
-+		uno::Sequence< rtl::OUString > sList;
-+		m_xProps->getPropertyValue( ITEMS ) >>= sList;
-+
-+		sal_Int32 nIndex = sList.getLength();
-+
-+		if ( pvargIndex.hasValue() )
-+			pvargIndex >>= nIndex;
-+
-+		rtl::OUString sString = getAnyAsString( pvargItem );
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
++		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
++		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
++		for ( sal_Int32 col = 0; col < nCols; ++col )
++		{
++			for ( sal_Int32 row = 0; row < nRows; ++row )
++			{
++				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW );
++				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
++				aFont.setSuperscript( aValue );
++			}
++		}
++		return;
+ 
++	}
++        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
 +
-+		// if no index specified or item is to be appended to end of 
-+		// list just realloc the array and set the last item
-+		if ( nIndex  == sList.getLength() )
++	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
+ 	sal_Bool bValue = sal_False;
+ 	aValue >>= bValue;
+ 	sal_Int16 nValue = NORMAL;
+@@ -82,21 +131,68 @@
+ 		nValue = SUPERSCRIPT;
+ 	        nValue2 = SUPERSCRIPTHEIGHT;
+ 	}
+-	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
+- 	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
++	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
++ 	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
+ }
+ 
+ uno::Any SAL_CALL
+ ScVbaFont::getSuperscript() throw ( uno::RuntimeException )
+ {
++        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
++        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
++	if ( !xCell.is() )
++	{
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
++		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
++		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
++		uno::Any aRes;
++		for ( sal_Int32 col = 0; col < nCols; ++col )
 +		{
-+			sal_Int32 nOldSize = sList.getLength();
-+			sList.realloc( nOldSize + 1 );
-+			sList[ nOldSize ] = sString; 
++			for ( sal_Int32 row = 0; row < nRows; ++row )
++			{
++				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW );
++				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
++				if ( !col && !row )
++					aRes = aFont.getSuperscript();
++				else if ( aRes != aFont.getSuperscript() )
++					return aNULL();
++			}
 +		}
-+		else
-+		{
-+			// just copy those elements above the one to be inserted
-+			std::vector< rtl::OUString > sVec;
-+			// reserve just the amount we need to copy
-+			sVec.reserve( sList.getLength() - nIndex );
-+
-+			// point at first element to copy
-+			rtl::OUString* pString = sList.getArray() + nIndex;
-+			const rtl::OUString* pEndString = sList.getArray() + sList.getLength();
-+			// insert the new element
-+			sVec.push_back( sString );
-+			// copy elements	
-+			for ( ; pString != pEndString; ++pString )
-+				sVec.push_back( *pString );
-+		
-+			sList.realloc(  sList.getLength() + 1 );
++		return aRes;
 +
-+			// point at first element to be overwritten
-+			pString = sList.getArray() + nIndex;
-+			pEndString = sList.getArray() + sList.getLength();
-+			std::vector< rtl::OUString >::iterator it = sVec.begin();
-+			for ( ; pString != pEndString; ++pString, ++it)
-+				*pString = *it;	
-+			//
++	}
++        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
++	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
+ 	short nValue = 0;
+-	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
++	xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
+ 	return uno::makeAny( ( nValue == SUPERSCRIPT ) );
+ }
+ 
+ void SAL_CALL
+ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException )
+ {
++        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
++        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
++	if ( !xCell.is() )
++	{
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
++		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
++		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
++		for ( sal_Int32 col = 0; col < nCols; ++col )
++		{
++			for ( sal_Int32 row = 0; row < nRows; ++row )
++			{
++				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW );
++				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
++				aFont.setSubscript( aValue );
++			}
 +		}
++		return;
 +
-+		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
-+		
 +	}
-+}
++        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
++	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
 +
-+void SAL_CALL 
-+ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
-+{
-+    sal_Int32 nIndex = 0;
-+    // for int index
-+	if ( index >>= nIndex  )
+ 	sal_Bool bValue = sal_False;
+ 	aValue >>= bValue;
+ 	sal_Int16 nValue = NORMAL;
+@@ -108,16 +204,42 @@
+ 	        nValue2 = SUBSCRIPTHEIGHT;
+ 	}
+ 
+- 	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
+-	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
++ 	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
++	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
+ 
+ }
+ 
+ uno::Any SAL_CALL
+ ScVbaFont::getSubscript() throw ( uno::RuntimeException )
+ {
++        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
++        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
++	if ( !xCell.is() )
 +	{
-+		uno::Sequence< rtl::OUString > sList;
-+		m_xProps->getPropertyValue( ITEMS ) >>= sList;
-+        if( nIndex < 0 || nIndex > ( sList.getLength() - 1 ) )
-+            throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid index" ), uno::Reference< uno::XInterface > () );
-+        if( sList.hasElements() )
-+        {
-+            if( sList.getLength() == 1 )
-+            {
-+                Clear();
-+                return;
-+            }
-+            for( sal_Int32 i = nIndex; i < ( sList.getLength()-1 ); i++ )
-+            {
-+                sList[i] = sList[i+1];
-+            }
-+			sList.realloc(  sList.getLength() - 1 );
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
++		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
++		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
++		uno::Any aRes;
++		for ( sal_Int32 col = 0; col < nCols; ++col )
++		{
++			for ( sal_Int32 row = 0; row < nRows; ++row )
++			{
++				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW );
++				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
++				if ( !col && !row )
++					aRes = aFont.getSubscript();
++				else if ( aRes != aFont.getSubscript() )
++					return aNULL();
++			}
 +		}
++		return aRes;
 +
-+		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
 +	}
-+}
++        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
++	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
 +
-+void SAL_CALL 
-+ListControlHelper::Clear(  ) throw (uno::RuntimeException)
-+{
-+	// urk, setValue doesn't seem to work !!
-+	//setValue( uno::makeAny( sal_Int16() ) );
-+	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
-+}
+ 	short nValue = NORMAL;
+-	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
++	xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
+ 	return uno::makeAny( ( nValue == SUBSCRIPT ) );
+ }
+ 
+@@ -130,8 +252,8 @@
+ uno::Any SAL_CALL
+ ScVbaFont::getSize() throw ( uno::RuntimeException )
+ {
+-	if ( mpDataSet )
+-		if (  mpDataSet->GetItemState( ATTR_FONT_HEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ 			return aNULL();
+         return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharHeight" ) ) );
+ }
+@@ -159,8 +281,8 @@
+ ScVbaFont::getColorIndex() throw ( uno::RuntimeException )
+ {
+ 	sal_Int32 nColor = 0;
+-	if ( mpDataSet )
+-		if (  mpDataSet->GetItemState( ATTR_FONT_COLOR, TRUE, NULL) == SFX_ITEM_DONTCARE )
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT_COLOR, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ 			return aNULL();
+ 
+ 	// getColor returns Xl ColorValue, need to convert it to OO val
+@@ -224,22 +346,54 @@
+ }
+ 
+ void SAL_CALL
+-ScVbaFont::setFontStyle( const uno::Any& /*aValue*/ ) throw( uno::RuntimeException )
++ScVbaFont::setFontStyle( const uno::Any& aValue ) throw( uno::RuntimeException )
+ {
+-//XXX #TODO# #FIXME#
+-	//mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharSize" ) ), ( uno::Any )aValue );
+-	throw uno::RuntimeException(
+-		rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setFontStyle not supported") ), uno::Reference< uno::XInterface >() );
++    sal_Bool bBold = sal_False;
++    sal_Bool bItalic = sal_False;
 +
-+void SAL_CALL
-+ListControlHelper::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
-+{
-+	if ( _rowsource.getLength() == 0 )
-+		Clear();
-+}
++    rtl::OUString aStyles;
++    aValue >>= aStyles;
++
++    std::vector< rtl::OUString > aTokens;
++    sal_Int32 nIndex = 0;
++    do
++    {
++        rtl::OUString aToken = aStyles.getToken( 0, ' ', nIndex );
++        aTokens.push_back( aToken );
++    }while( nIndex >= 0 );
++    
++    std::vector< rtl::OUString >::iterator it;
++    for( it = aTokens.begin(); it != aTokens.end(); ++it )
++    {
++        if( (*it).equalsIgnoreAsciiCaseAscii( "Bold" ) )
++            bBold = sal_True;
++
++        if( (*it).equalsIgnoreAsciiCaseAscii( "Italic" ) )
++            bItalic = sal_True;
++    }
++
++    setBold( uno::makeAny( bBold ) );
++    setItalic( uno::makeAny( bItalic ) );
+ }
+ 
+ 
+ uno::Any SAL_CALL
+ ScVbaFont::getFontStyle() throw ( uno::RuntimeException )
+ {
+-//XXX
+-	throw uno::RuntimeException(
+-		rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getFontStyle not supported") ), uno::Reference< uno::XInterface >() );
+-	// return uno::Any();
++    rtl::OUStringBuffer aStyles;
++    sal_Bool bValue = sal_False;
++    getBold() >>= bValue;
++    if( bValue )
++        aStyles.appendAscii("Bold");
++    
++    getItalic() >>= bValue;
++    if( bValue )
++    {
++        if( aStyles.getLength() )
++            aStyles.appendAscii(" ");
++        aStyles.appendAscii("Italic");
++    }
++    return uno::makeAny( aStyles.makeStringAndClear() );
+ }
+ 
+ void SAL_CALL
+@@ -257,8 +411,8 @@
+ uno::Any SAL_CALL
+ ScVbaFont::getBold() throw ( uno::RuntimeException )
+ {
+-	if ( mpDataSet )
+-		if (  mpDataSet->GetItemState( ATTR_FONT_WEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ 			return aNULL();
+ 
+ 	double fValue = 0.0;
+@@ -303,8 +457,8 @@
+ uno::Any SAL_CALL
+ ScVbaFont::getUnderline() throw ( uno::RuntimeException )
+ {
+-	if ( mpDataSet )
+-		if (  mpDataSet->GetItemState( ATTR_FONT_UNDERLINE, TRUE, NULL) == SFX_ITEM_DONTCARE )
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ 			return aNULL();
+ 
+ 	sal_Int32 nValue = awt::FontUnderline::NONE;
+@@ -341,8 +495,8 @@
+ uno::Any SAL_CALL
+ ScVbaFont::getStrikethrough() throw ( uno::RuntimeException )
+ {
+-	if ( mpDataSet )
+-		if (  mpDataSet->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, NULL) == SFX_ITEM_DONTCARE )
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ 			return aNULL();
+ 	short nValue = 0;
+ 	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharStrikeout" ) ) ) >>= nValue;
+@@ -358,8 +512,8 @@
+ uno::Any SAL_CALL
+ ScVbaFont::getShadow() throw (uno::RuntimeException)
+ {
+-	if ( mpDataSet )
+-		if (  mpDataSet->GetItemState( ATTR_FONT_SHADOWED, TRUE, NULL) == SFX_ITEM_DONTCARE )
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ 			return aNULL();
+ 	return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharShadowed" ) ) );
+ }
+@@ -378,13 +532,13 @@
+ uno::Any SAL_CALL
+ ScVbaFont::getItalic() throw ( uno::RuntimeException )
+ {
+-	if ( mpDataSet )
+-		if (  mpDataSet->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE )
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ 			return aNULL();
+ 
+-	short nValue = 0;
+-	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ) >>= nValue;
+-	return uno::makeAny( nValue == awt::FontSlant_ITALIC );
++    awt::FontSlant aFS;
++	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ) >>= aFS;
++	return uno::makeAny( aFS == awt::FontSlant_ITALIC );
+ }
+ 
+ void  SAL_CALL
+@@ -398,8 +552,8 @@
+ uno::Any SAL_CALL
+ ScVbaFont::getName() throw ( uno::RuntimeException )
+ {
+-	if ( mpDataSet )
+-		if (  mpDataSet->GetItemState( ATTR_FONT, TRUE, NULL) == SFX_ITEM_DONTCARE )
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ 			return aNULL();
+ 	return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontName" ) ) );
+ }
+@@ -416,6 +570,22 @@
+ {
+ 	mxFont->setPropertyValue(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" ) ) , XLRGBToOORGB(_color));
+ }
 +
-+sal_Int32 SAL_CALL
-+ListControlHelper::getListCount() throw (uno::RuntimeException)
++void  SAL_CALL
++ScVbaFont::setOutlineFont( const uno::Any& aValue ) throw ( uno::RuntimeException )
 +{
-+    uno::Sequence< rtl::OUString > sList;
-+    m_xProps->getPropertyValue( ITEMS ) >>= sList;
-+    return sList.getLength();
++	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ), aValue );
 +}
 +
-+uno::Any SAL_CALL 
-+ListControlHelper::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
++uno::Any SAL_CALL
++ScVbaFont::getOutlineFont() throw (uno::RuntimeException)
 +{
-+    uno::Sequence< rtl::OUString > sList;
-+    m_xProps->getPropertyValue( ITEMS ) >>= sList;
-+    sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() );
-+    uno::Any aRet;
-+    if ( pvargIndex.hasValue() )
-+    {
-+        sal_Int16 nIndex = -1;
-+        pvargIndex >>= nIndex;
-+        if( nIndex < 0 || nIndex >= nLength )
-+            throw uno::RuntimeException( rtl::OUString::createFromAscii(
-+                    "Bad row Index" ), uno::Reference< uno::XInterface >() );       
-+        aRet <<= sList[ nIndex ];
-+    }
-+    else if ( pvarColumn.hasValue() ) // pvarColumn on its own would be bad
-+            throw uno::RuntimeException( rtl::OUString::createFromAscii(
-+                    "Bad column Index" ), uno::Reference< uno::XInterface >() );       
-+    else // List() ( e.g. no args )
-+    {
-+        uno::Sequence< uno::Sequence< rtl::OUString > > sReturnArray( nLength );
-+        for ( sal_Int32 i = 0; i < nLength; ++i )
-+        {
-+            sReturnArray[ i ].realloc( 10 );
-+            sReturnArray[ i ][ 0 ] = sList[ i ];
-+        }        
-+        aRet = uno::makeAny( sReturnArray );
-+    }
-+    return aRet;
++	if ( GetDataSet() )
++		if (  GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, TRUE, NULL) == SFX_ITEM_DONTCARE )
++			return aNULL();
++	return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ) );
 +}
-diff --git sc/source/ui/vba/vbalistcontrolhelper.hxx sc/source/ui/vba/vbalistcontrolhelper.hxx
-new file mode 100644
-index 0000000..34d42ce
---- /dev/null
-+++ sc/source/ui/vba/vbalistcontrolhelper.hxx
-@@ -0,0 +1,20 @@
-+#ifndef SC_VBA_LISTCONTROLHELPER
-+#define SC_VBA_LISTCONTROLHELPER
-+
-+#include "vbahelper.hxx"
-+
-+class ListControlHelper
-+{
-+	css::uno::Reference< css::beans::XPropertySet > m_xProps;
 +
-+public:
-+	ListControlHelper( const css::uno::Reference< css::beans::XPropertySet >& rxControl ) : m_xProps( rxControl ){}
-+	virtual ~ListControlHelper() {}
-+	virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);   
-+    	virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
-+	virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
-+	virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL Clear(  ) throw (css::uno::RuntimeException);
-+};
-+#endif
-diff --git sc/source/ui/vba/vbamultipage.cxx sc/source/ui/vba/vbamultipage.cxx
-new file mode 100644
-index 0000000..118e005
---- /dev/null
-+++ sc/source/ui/vba/vbamultipage.cxx
-@@ -0,0 +1,132 @@
+ rtl::OUString&
+ ScVbaFont::getServiceImplName()
+ {
+@@ -430,7 +600,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Font" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Font" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbaaxis.hxx
+===================================================================
+--- sc/source/ui/vba/vbaaxis.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaaxis.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,15 +30,15 @@
+ #ifndef SC_VBA_AXIS_HXX
+ #define SC_VBA_AXOS_HXX
+ #include <com/sun/star/beans/XPropertySet.hpp>
+-#include <org/openoffice/excel/XAxis.hpp>
+-#include <org/openoffice/excel/XChart.hpp>
++#include <ooo/vba/excel/XAxis.hpp>
++#include <ooo/vba/excel/XChart.hpp>
+ #include "vbahelperinterface.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XAxis >  ScVbaAxis_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XAxis >  ScVbaAxis_BASE;
+ class ScVbaChart;
+ class ScVbaAxis : public ScVbaAxis_BASE
+ {
+-	css::uno::Reference< oo::excel::XChart > moChartParent;
++	css::uno::Reference< ov::excel::XChart > moChartParent;
+ 	css::uno::Reference< css::beans::XPropertySet > mxPropertySet;
+ 	sal_Int32 mnType;
+ 	sal_Int32 mnGroup;
+@@ -46,13 +46,13 @@
+ 	sal_Bool bCrossesAreCustomized; 
+ 	ScVbaChart* getChartPtr() throw( css::uno::RuntimeException );
+ 	sal_Bool isValueAxis() throw( css::script::BasicErrorException );
+-	std::auto_ptr<oo::ShapeHelper> oShapeHelper;
++	std::auto_ptr<ov::ShapeHelper> oShapeHelper;
+ 	
+ public:
+-	ScVbaAxis( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup );
++	ScVbaAxis( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup );
+ 	// Methods
+ 	virtual void SAL_CALL Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< ::org::openoffice::excel::XAxisTitle > SAL_CALL getAxisTitle(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL getAxisTitle(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual void SAL_CALL setDisplayUnit( ::sal_Int32 DisplayUnit ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual ::sal_Int32 SAL_CALL getDisplayUnit(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual void SAL_CALL setCrosses( ::sal_Int32 Crosses ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbaassistant.cxx
+===================================================================
+--- sc/source/ui/vba/vbaassistant.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaassistant.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,140 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -20039,1192 +17584,1464 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbamultipage.hxx"
-+#include <ooo/vba/XCollection.hpp>
-+#include "vbapages.hxx"
-+#include <vector>
++#include <sfx2/app.hxx>
++#include <svtools/helpopt.hxx>
++
++#include <ooo/vba/office/MsoAnimationType.hpp>
++
++#include"vbaassistant.hxx"
++
 +
 +using namespace com::sun::star;
 +using namespace ooo::vba;
 +
-+// uno servicename com.sun.star.awt.UnoControlProgressBarMode
-+const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
-+const rtl::OUString SVALUEMAX( RTL_CONSTASCII_USTRINGPARAM("ProgressValueMax") );
-+const rtl::OUString SSTEP( RTL_CONSTASCII_USTRINGPARAM("Step") );
++using namespace ooo::vba::office::MsoAnimationType;
 +
-+typedef cppu::WeakImplHelper1< container::XIndexAccess > PagesImpl_Base;
-+class PagesImpl : public PagesImpl_Base
++ScVbaAssistant::ScVbaAssistant( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext ): ScVbaAssistantImpl_BASE( xParent, xContext )
 +{
-+	sal_Int32 mnPages;
-+public:
-+	PagesImpl( sal_Int32 nPages ) : mnPages( nPages ) {}
-+	virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException) { return mnPages; }
-+	virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, ::uno::RuntimeException)
-+	{
-+		if ( Index < 0 || Index > mnPages )
-+			throw lang::IndexOutOfBoundsException();
-+		return uno::makeAny( uno::Reference< uno::XInterface >() );
-+	}
-+	// XElementAccess
-+	virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException)
-+	{
-+		// no Pages object yet #FIXME
-+		//return msforms::XPage::static_type(0);
-+		return uno::XInterface::static_type(0);
-+	}
-+	virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
-+	{
-+		return ( mnPages > 0 );
-+	}
-+};
-+uno::Reference< container::XIndexAccess > 
-+ScVbaMultiPage::getPages( sal_Int32 nPages )
++    m_bIsVisible = sal_False;
++    m_nPointsLeft = 795;
++    m_nPointsTop = 248;
++    m_sName = rtl::OUString::createFromAscii( "Clippit" );
++    m_nAnimation = msoAnimationIdle;
++}
++
++ScVbaAssistant::~ScVbaAssistant()
 +{
-+	return new PagesImpl( nPages );
 +}
 +
-+ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< ov::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 )
++sal_Bool SAL_CALL ScVbaAssistant::getVisible() throw (uno::RuntimeException)
 +{
-+    mxDialogProps.set( xDialog, uno::UNO_QUERY_THROW );
-+    // set dialog step to value of multipage pseudo model
-+    setValue(getValue());
++    return m_bIsVisible;
 +}
 +
-+// Attributes
-+sal_Int32 SAL_CALL 
-+ScVbaMultiPage::getValue() throw (css::uno::RuntimeException)
++void SAL_CALL ScVbaAssistant::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
 +{
-+    sal_Int32 nValue = 0;
-+    m_xProps->getPropertyValue( SVALUE ) >>= nValue;
-+    return nValue;
++    m_bIsVisible = bVisible;
++}
++
++sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException)
++{
++    if( SvtHelpOptions().IsHelpAgentAutoStartMode() )
++        return sal_True;
++    else
++        return sal_False;
++}
++
++void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException)
++{
++    SvtHelpOptions().SetHelpAgentAutoStartMode( bOn );
++    setVisible( bOn );
++}
++
++
++::sal_Int32 SAL_CALL 
++ScVbaAssistant::getTop() throw (css::uno::RuntimeException)
++{
++    return m_nPointsTop;
++}
++void SAL_CALL 
++ScVbaAssistant::setTop( ::sal_Int32 _top ) throw (css::uno::RuntimeException)
++{
++    m_nPointsTop = _top;
++}
++::sal_Int32 SAL_CALL 
++ScVbaAssistant::getLeft() throw (css::uno::RuntimeException)
++{
++    return m_nPointsLeft;
++}
++void SAL_CALL 
++ScVbaAssistant::setLeft( ::sal_Int32 _left ) throw (css::uno::RuntimeException)
++{
++    m_nPointsLeft = _left;
++}
++::sal_Int32 SAL_CALL 
++ScVbaAssistant::getAnimation() throw (css::uno::RuntimeException)
++{
++    return m_nAnimation;
 +}
-+
 +void SAL_CALL 
-+ScVbaMultiPage::setValue( const sal_Int32 _value ) throw (::com::sun::star::uno::RuntimeException)
++ScVbaAssistant::setAnimation( ::sal_Int32 _animation ) throw (css::uno::RuntimeException)
 +{
-+    // track change in dialog ( dialog value is 1 based, 0 is a special value )
-+    m_xProps->setPropertyValue( SVALUE, uno::makeAny( _value ) );
-+    mxDialogProps->setPropertyValue( SSTEP, uno::makeAny( _value + 1) );
++    m_nAnimation = _animation;
 +}
 +
-+
-+rtl::OUString& 
-+ScVbaMultiPage::getServiceImplName()
++::rtl::OUString SAL_CALL 
++ScVbaAssistant::Name(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage") );
-+	return sImplName;
++    return m_sName;
 +}
 +
-+uno::Any SAL_CALL 
-+ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException)
++rtl::OUString& 
++ScVbaAssistant::getServiceImplName()
 +{
-+	sal_Int32 nValue = 0;
-+	m_xProps->getPropertyValue( SVALUEMAX ) >>= nValue;
-+	uno::Reference< XCollection > xColl( new ScVbaPages( this, mxContext, getPages( nValue ) ) );
-+	if ( !index.hasValue() )
-+		return uno::makeAny( xColl );
-+	return xColl->Item( uno::makeAny( index ), uno::Any() );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAssistant") );
++	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaMultiPage::getServiceNames()
++ScVbaAssistant::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.MultiPage" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.Assistant" ) );
 +	}
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbamultipage.hxx sc/source/ui/vba/vbamultipage.hxx
-new file mode 100644
-index 0000000..03db35d
---- /dev/null
-+++ sc/source/ui/vba/vbamultipage.hxx
-@@ -0,0 +1,65 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_MULTIPAGE_HXX
-+#define SC_VBA_MULTIPAGE_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/msforms/XMultiPage.hpp>
-+#include <com/sun/star/container/XIndexAccess.hpp>
-+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+//#include <cppuhelper/implbase2.hxx>
-+#include <cppuhelper/implbase1.hxx>
-+
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XMultiPage > MultiPageImpl_BASE;
-+
-+class ScVbaMultiPage : public MultiPageImpl_BASE
-+{
-+    css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
-+    css::uno::Reference< css::beans::XPropertySet > mxDialogProps;
-+public:
-+    ScVbaMultiPage( const css::uno::Reference< ov::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, ov::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( sal_Int32 _value ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL Pages( const css::uno::Any& index ) throw (css::uno::RuntimeException);
-+
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+    // XDefaultProperty
-+    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-+};
-+#endif //SC_VBA_LABEL_HXX
-diff --git sc/source/ui/vba/vbaname.cxx sc/source/ui/vba/vbaname.cxx
-index 862adde..3fdc003 100644
---- sc/source/ui/vba/vbaname.cxx
-+++ sc/source/ui/vba/vbaname.cxx
-@@ -31,6 +31,7 @@
- 
- #include <com/sun/star/table/XCellRange.hpp>
- #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-+#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
- 
- #include "vbaname.hxx"
- #include "vbarange.hxx"
-@@ -41,10 +42,10 @@
- #include "tabvwsh.hxx"
- #include "viewdata.hxx"
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
--ScVbaName::ScVbaName(const css::uno::Reference< oo::vba::XHelperInterface >& xParent, 
-+ScVbaName::ScVbaName(const css::uno::Reference< ov::XHelperInterface >& xParent, 
- 			const css::uno::Reference< css::uno::XComponentContext >& xContext,
- 			const css::uno::Reference< css::sheet::XNamedRange >& xName,
- 			const css::uno::Reference< css::sheet::XNamedRanges >& xNames,
-@@ -60,7 +61,7 @@ ScVbaName::~ScVbaName()
- {
- }
- 
--css::uno::Reference< oo::excel::XWorksheet >
-+css::uno::Reference< ov::excel::XWorksheet >
- ScVbaName::getWorkSheet() throw (css::uno::RuntimeException)
- {
- 	return ScVbaGlobals::getGlobalsImpl( mxContext )->getActiveSheet();
-@@ -110,17 +111,37 @@ ScVbaName::getValue() throw (css::uno::RuntimeException)
- {
- 	::rtl::OUString sValue = mxNamedRange->getContent();
- 	::rtl::OUString sSheetName = getWorkSheet()->getName();
--	if ( sValue.toChar() == '$' )
-+    ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( ";" );
-+    ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( "," );
-+    ::rtl::OUString sResult;
-+    sal_Int32 nFrom = 0;
-+    sal_Int32 nTo = 0;
-+    nTo = sValue.indexOf( sSegmentation, nFrom );
-+    while ( nTo != -1 )
- 	{
--		::rtl::OUString sTmp = sValue.copy(1);
--		sValue = sTmp;
-+        ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
-+        if ( sTmpValue.toChar() == '$' )
-+        {
-+            ::rtl::OUString sTmp = sTmpValue.copy( 1 );
-+            sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
-+            sResult += sTmp; 
-+            sResult += sNewSegmentation;
- 	}
--	sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
--	if (sValue.indexOf('=') != 0)
-+        nFrom = nTo + 1;
-+        nTo = sValue.indexOf( sSegmentation, nFrom );
-+    }
-+    ::rtl::OUString sTmpValue = sValue.copy( nFrom );
-+	if ( sTmpValue.toChar() == '$' )
- 	{
--		sValue = ::rtl::OUString::createFromAscii("=") + sValue;
-+		::rtl::OUString sTmp = sTmpValue.copy(1);
-+        sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
-+		sResult += sTmp;
- 	}
--	return sValue;
-+	if (sResult.indexOf('=') != 0)
-+	{
-+		sResult = ::rtl::OUString::createFromAscii("=") + sResult;
-+}
-+	return sResult;
- }
- 
- void 
-@@ -128,17 +149,38 @@ ScVbaName::setValue( const ::rtl::OUString & rValue ) throw (css::uno::RuntimeEx
- {
- 	::rtl::OUString sSheetName = getWorkSheet()->getName();
- 	::rtl::OUString sValue = rValue;
-+    ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( "," );
-+    ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( ";" );
-+    ::rtl::OUString sResult;
-+    sal_Int32 nFrom = 0;
-+    sal_Int32 nTo = 0;
- 	if (sValue.indexOf('=') == 0)
- 	{
- 		::rtl::OUString sTmp = sValue.copy(1);
- 		sValue = sTmp;
- 	}
--	if (sValue.copy(0, sSheetName.getLength()).equals(sSheetName))
-+    nTo = sValue.indexOf( sSegmentation, nFrom );
-+    while ( nTo != -1 )
-+	{
-+        ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
-+        sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
-+        if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
-+        {
-+            sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
-+	}
-+        sTmpValue += sNewSegmentation;
-+        sResult += sTmpValue;
-+        nFrom = nTo + 1;
-+        nTo = sValue.indexOf( sSegmentation, nFrom );
-+}
-+    ::rtl::OUString sTmpValue = sValue.copy( nFrom );
-+	sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
-+	if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
- 	{
--		sValue = ::rtl::OUString::createFromAscii("$") + sSheetName;
-+		sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
- 	}
--	sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
--	mxNamedRange->setContent(sValue);
-+    sResult += sTmpValue;
-+	mxNamedRange->setContent(sResult);
- }
- 
- ::rtl::OUString 
-@@ -189,15 +231,15 @@ ScVbaName::setRefersToR1C1Local( const ::rtl::OUString & rRefersTo ) throw (css:
- 	setRefersTo( rRefersTo );
- }
- 
--css::uno::Reference< oo::excel::XRange >
-+css::uno::Reference< ov::excel::XRange >
- ScVbaName::getRefersToRange() throw (css::uno::RuntimeException)
- {
--	css::uno::Reference< oo::excel::XRange > xRange;
-+    uno::Reference< ov::excel::XRange > xRange = ScVbaRange::getRangeObjectForName( mxContext, mxNamedRange->getName(), getDocShell( mxModel ), ::formula::FormulaGrammar::CONV_XL_R1C1 );
- 	return xRange;
- }
- 
- void
--ScVbaName::setRefersToRange( const css::uno::Reference< oo::excel::XRange > /*rRange*/ ) throw (css::uno::RuntimeException)
-+ScVbaName::setRefersToRange( const css::uno::Reference< ov::excel::XRange > /*rRange*/ ) throw (css::uno::RuntimeException)
- {
- }
- 
-@@ -221,7 +263,7 @@ ScVbaName::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Name" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Name" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbaname.hxx sc/source/ui/vba/vbaname.hxx
-index 45fa2bb..fcd1a7d 100644
---- sc/source/ui/vba/vbaname.hxx
-+++ sc/source/ui/vba/vbaname.hxx
-@@ -30,13 +30,13 @@
- #ifndef SC_VBA_NAME_HXX
- #define SC_VBA_NAME_HXX
- 
--#include <org/openoffice/excel/XName.hpp>
-+#include <ooo/vba/excel/XName.hpp>
- #include <com/sun/star/sheet/XNamedRange.hpp>
- #include <com/sun/star/sheet/XNamedRanges.hpp>
- 
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1< oo::excel::XName > NameImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XName > NameImpl_BASE;
- 
- class ScVbaName : public NameImpl_BASE 
- {
-@@ -48,10 +48,10 @@ class ScVbaName : public NameImpl_BASE
+Index: sc/source/ui/vba/vbabutton.cxx
+===================================================================
+--- sc/source/ui/vba/vbabutton.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbabutton.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,11 +31,11 @@
+ #include <vector>
  
- protected:
- 	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
--	virtual css::uno::Reference< oo::excel::XWorksheet > getWorkSheet() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XWorksheet > getWorkSheet() throw (css::uno::RuntimeException);
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
  
- public:
--	ScVbaName( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
-+	ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
- 	virtual ~ScVbaName();
  
- 	// Attributes
-@@ -71,8 +71,8 @@ public:
- 	virtual void SAL_CALL setRefersToR1C1( const ::rtl::OUString &rRefersTo ) throw (css::uno::RuntimeException);
- 	virtual ::rtl::OUString SAL_CALL getRefersToR1C1Local() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setRefersToR1C1Local( const ::rtl::OUString &rRefersTo ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getRefersToRange() throw (css::uno::RuntimeException);
--	virtual void SAL_CALL setRefersToRange( const css::uno::Reference< oo::excel::XRange > xRange ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getRefersToRange() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setRefersToRange( const css::uno::Reference< ov::excel::XRange > xRange ) throw (css::uno::RuntimeException);
+ 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< 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 )
+ {
+ }
  
- 	// Methods
- 	virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbanames.cxx sc/source/ui/vba/vbanames.cxx
-index c733bcc..1e40d55 100644
---- sc/source/ui/vba/vbanames.cxx
-+++ sc/source/ui/vba/vbanames.cxx
-@@ -42,16 +42,16 @@
- #include "tabvwsh.hxx"
- #include "viewdata.hxx"
+@@ -53,3 +53,22 @@
+ {
+     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ }
++
++rtl::OUString& 
++ScVbaButton::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaButton") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaButton::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Button" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbashaperange.cxx
+===================================================================
+--- sc/source/ui/vba/vbashaperange.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbashaperange.cxx	(.../cws/npower11)	(revision 266650)
+@@ -33,16 +33,16 @@
+ #include "vbashaperange.hxx"
+ #include "vbashape.hxx"
  
 -using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
  using namespace ::com::sun::star;
  
- class NamesEnumeration : public EnumerationHelperImpl
+ class VbShapeRangeEnumHelper : public EnumerationHelper_BASE
  {
- 	uno::Reference< frame::XModel > m_xModel;
--	uno::WeakReference< vba::XHelperInterface > m_xParent;
-+	uno::WeakReference< XHelperInterface > m_xParent;
- 	uno::Reference< sheet::XNamedRanges > m_xNames;
+-        uno::Reference< vba::XCollection > m_xParent;
++        uno::Reference< XCollection > m_xParent;
+         uno::Reference<container::XIndexAccess > m_xIndexAccess;
+         sal_Int32 nIndex;
  public:
--	NamesEnumeration( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ), m_xNames( xNames ) {}
-+	NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ), m_xNames( xNames ) {}
+-	VbShapeRangeEnumHelper( const uno::Reference< vba::XCollection >& xParent,  const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
++	VbShapeRangeEnumHelper( const uno::Reference< XCollection >& xParent,  const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
+         virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
+         {
+                 return ( nIndex < m_xIndexAccess->getCount() );
+@@ -57,7 +57,7 @@
  
- 	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- 	{
-@@ -62,7 +62,7 @@ public:
  };
  
- 
--ScVbaNames::ScVbaNames(const css::uno::Reference< oo::vba::XHelperInterface >& xParent, 
-+ScVbaNames::ScVbaNames(const css::uno::Reference< ov::XHelperInterface >& xParent, 
- 			const css::uno::Reference< css::uno::XComponentContext >& xContext,
- 			const css::uno::Reference< css::sheet::XNamedRanges >& xNames,
- 			const css::uno::Reference< css::frame::XModel >& xModel ):
-@@ -70,6 +70,7 @@ ScVbaNames::ScVbaNames(const css::uno::Reference< oo::vba::XHelperInterface >& x
- 			mxModel( xModel ),
- 			mxNames( xNames )
+-ScVbaShapeRange::ScVbaShapeRange( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xShapes, const uno::Reference< drawing::XDrawPage >& xDrawPage ) : ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage( xDrawPage ), m_nShapeGroupCount(0)
++ScVbaShapeRange::ScVbaShapeRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xShapes, const uno::Reference< drawing::XDrawPage >& xDrawPage ) : ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage( xDrawPage ), m_nShapeGroupCount(0)
  {
-+    m_xNameAccess.set( xNames, uno::UNO_QUERY_THROW );
  }
  
- ScVbaNames::~ScVbaNames()
-@@ -169,7 +170,7 @@ ScVbaNames::Add( const css::uno::Any& Name ,
- css::uno::Type 
- ScVbaNames::getElementType() throw( css::uno::RuntimeException )
- {
--	return oo::excel::XName::static_type(0);
-+	return ov::excel::XName::static_type(0);
+@@ -146,7 +146,7 @@
+ 	uno::Reference< drawing::XShape > xShape( aSource, uno::UNO_QUERY_THROW );
+ 	// #TODO  #FIXME Shape parent should always be the sheet the shapes belong 
+ 	// to 
+-	uno::Reference< msforms::XShape > xVbShape( new ScVbaShape( uno::Reference< vba::XHelperInterface >(), mxContext, xShape, getShapes(), ScVbaShape::getType( xShape ) ) ); 
++	uno::Reference< msforms::XShape > xVbShape( new ScVbaShape( uno::Reference< XHelperInterface >(), mxContext, xShape, getShapes(), ScVbaShape::getType( xShape ) ) ); 
+         return uno::makeAny( xVbShape );
  }
  
- uno::Reference< container::XEnumeration >
-@@ -205,7 +206,7 @@ ScVbaNames::getServiceNames()
+@@ -164,7 +164,7 @@
  	if ( aServiceNames.getLength() == 0 )
  	{
  		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.NamedRanges" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.NamedRanges" ) );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.ShapeRange" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.ShapeRange" ) );
  	}
  	return aServiceNames;
  }
-diff --git sc/source/ui/vba/vbanames.hxx sc/source/ui/vba/vbanames.hxx
-index ba45695..5b53ab0 100644
---- sc/source/ui/vba/vbanames.hxx
-+++ sc/source/ui/vba/vbanames.hxx
-@@ -30,13 +30,13 @@
- #ifndef SC_VBA_NAMES_HXX
- #define SC_VBA_NAMES_HXX
+Index: sc/source/ui/vba/vbadialogs.cxx
+===================================================================
+--- sc/source/ui/vba/vbadialogs.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbadialogs.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,8 +31,8 @@
  
--#include <org/openoffice/excel/XNames.hpp>
--#include <org/openoffice/vba/XCollection.hpp>
-+#include <ooo/vba/excel/XNames.hpp>
-+#include <ooo/vba/XCollection.hpp>
- #include <com/sun/star/container/XEnumerationAccess.hpp>
- #include <com/sun/star/sheet/XNamedRanges.hpp>
- #include "vbacollectionimpl.hxx"
+ #include <com/sun/star/lang/XMultiComponentFactory.hpp>
+ #include <com/sun/star/frame/XModel.hpp>
+-#include <org/openoffice/excel/XApplication.hpp>
+-#include <org/openoffice/excel/XDialog.hpp>
++#include <ooo/vba/excel/XApplication.hpp>
++#include <ooo/vba/excel/XDialog.hpp>
  
--typedef CollTestImplHelper< oo::excel::XNames > ScVbaNames_BASE;
-+typedef CollTestImplHelper< ov::excel::XNames > ScVbaNames_BASE;
+ #include <tools/string.hxx>
  
- class ScVbaNames : public ScVbaNames_BASE
- {
-@@ -47,7 +47,7 @@ protected:
- 	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
+@@ -41,7 +41,7 @@
+ #include "vbaglobals.hxx"
+ #include "vbadialog.hxx"
  
- public:
--	ScVbaNames( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
-+	ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
- 	
- 	ScDocument* getScDocument();
- 	ScDocShell* getScDocShell();
-diff --git sc/source/ui/vba/vbaoleobject.cxx sc/source/ui/vba/vbaoleobject.cxx
-index 8fa24c3..cbd1669 100644
---- sc/source/ui/vba/vbaoleobject.cxx
-+++ sc/source/ui/vba/vbaoleobject.cxx
-@@ -37,7 +37,7 @@
- #include "vbaoleobject.hxx"
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ void
+@@ -62,7 +62,7 @@
+ {
+ 	sal_Int32 nIndex = 0;
+ 	aItem >>= nIndex;
+-	uno::Reference< excel::XDialog > aDialog( new ScVbaDialog( uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), nIndex, mxContext ) );
++	uno::Reference< excel::XDialog > aDialog( new ScVbaDialog( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), nIndex, mxContext ) );
+ 	return uno::Any( aDialog );
+ }
+ rtl::OUString& 
+@@ -79,7 +79,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheet" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbascrollbar.cxx
+===================================================================
+--- sc/source/ui/vba/vbascrollbar.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbascrollbar.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,139 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "vbascrollbar.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace ooo::vba;
++
++
++const static rtl::OUString LARGECHANGE( RTL_CONSTASCII_USTRINGPARAM("BlockIncrement") );
++const static rtl::OUString SMALLCHANGE( RTL_CONSTASCII_USTRINGPARAM("LineIncrement") );
++const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
++const static rtl::OUString SCROLLVALUE( RTL_CONSTASCII_USTRINGPARAM("ScrollValue") );
++const static rtl::OUString SCROLLMAX( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") );
++const static rtl::OUString SCROLLMIN( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMin") );
++
++ScVbaScrollBar::ScVbaScrollBar(  const css::uno::Reference< ov::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 )
++{
++}
++
++// Attributes
++uno::Any SAL_CALL 
++ScVbaScrollBar::getValue() throw (css::uno::RuntimeException)
++{
++    return  m_xProps->getPropertyValue( SCROLLVALUE );
++}
++
++void SAL_CALL 
++ScVbaScrollBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SCROLLVALUE, _value );
++}
++
++::sal_Int32 SAL_CALL 
++ScVbaScrollBar::getMax() throw (uno::RuntimeException)
++{
++    sal_Int32 nMax = 0;
++    m_xProps->getPropertyValue( SCROLLMAX ) >>= nMax;
++    return nMax;
++}
++
++void SAL_CALL 
++ScVbaScrollBar::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SCROLLMAX, uno::makeAny( nVal ) ); 
++}
++
++::sal_Int32 SAL_CALL 
++ScVbaScrollBar::getMin() throw (uno::RuntimeException)
++{
++    sal_Int32 nVal = 0;
++    m_xProps->getPropertyValue( SCROLLMIN ) >>= nVal;
++    return nVal;
++}
++
++void SAL_CALL 
++ScVbaScrollBar::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SCROLLMIN, uno::makeAny( nVal ) ); 
++}
++
++void SAL_CALL 
++ScVbaScrollBar::setLargeChange( ::sal_Int32 _largechange ) throw (uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( LARGECHANGE, uno::makeAny( _largechange ) );
++}
++
++::sal_Int32 SAL_CALL 
++ScVbaScrollBar::getLargeChange() throw (uno::RuntimeException)
++{
++    sal_Int32 nVal = 0;
++    m_xProps->getPropertyValue( LARGECHANGE ) >>= nVal;
++    return nVal;
++}
++
++::sal_Int32 SAL_CALL 
++ScVbaScrollBar::getSmallChange() throw (uno::RuntimeException)
++{
++    sal_Int32 nSmallChange = 0;
++    m_xProps->getPropertyValue( SMALLCHANGE ) >>= nSmallChange;
++    return nSmallChange;
++}
++
++void SAL_CALL 
++ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange ) throw (uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SMALLCHANGE, uno::makeAny( _smallchange ) );
++}
++
++rtl::OUString& 
++ScVbaScrollBar::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaScrollBar") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaScrollBar::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbaglobals.cxx
+===================================================================
+--- sc/source/ui/vba/vbaglobals.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaglobals.cxx	(.../cws/npower11)	(revision 266650)
+@@ -41,7 +41,7 @@
+ #include <cppuhelper/bootstrap.hxx>
+ using namespace ::com::sun::star;
+ using namespace ::com::sun::star::uno;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
  
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
  
  
- sal_Int32 pt2mm( double pt ) //1/100mm
-@@ -51,7 +51,7 @@ double mm2pt( sal_Int32 mm )
+@@ -62,12 +62,12 @@
  }
  
- 
--ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
-+ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
-             css::uno::Reference< css::drawing::XControlShape > xControlShape )
- : OLEObjectImpl_BASE( xParent, xContext ), m_xControlShape( xControlShape )
+ // Will throw if singleton can't be accessed 
+-uno::Reference< vba::XGlobals >
++uno::Reference< XGlobals >
+ ScVbaGlobals::getGlobalsImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException )
  {
-@@ -181,7 +181,7 @@ ScVbaOLEObject::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
+-	uno::Reference< vba::XGlobals > xGlobals( 
++	uno::Reference< XGlobals > xGlobals( 
+ 		xContext->getValueByName( ::rtl::OUString::createFromAscii( 
+-			"/singletons/org.openoffice.vba.theGlobals") ), uno::UNO_QUERY);
++			"/singletons/ooo.vba.theGlobals") ), uno::UNO_QUERY);
+ 
+ 	if ( !xGlobals.is() )
  	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.OLEObject" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.OLEObject" ) );
- 	}
- 	return aServiceNames;
+@@ -153,9 +153,9 @@
  }
-diff --git sc/source/ui/vba/vbaoleobject.hxx sc/source/ui/vba/vbaoleobject.hxx
-index ea37474..868de87 100644
---- sc/source/ui/vba/vbaoleobject.hxx
-+++ sc/source/ui/vba/vbaoleobject.hxx
-@@ -33,11 +33,11 @@
- #include <cppuhelper/implbase1.hxx>
- #include <com/sun/star/drawing/XControlShape.hpp>
- #include <com/sun/star/awt/XWindowPeer.hpp>
--#include <org/openoffice/excel/XOLEObject.hpp>
-+#include <ooo/vba/excel/XOLEObject.hpp>
- 
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1< oo::excel::XOLEObject > OLEObjectImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XOLEObject > OLEObjectImpl_BASE;
- 
- class ScVbaOLEObject : public OLEObjectImpl_BASE
- {
-@@ -47,7 +47,7 @@ protected:
- 	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- public:
--    ScVbaOLEObject( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+    ScVbaOLEObject( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
-             css::uno::Reference< css::drawing::XControlShape > xControlShape );
- 
-     // XOLEObject Attributes
-diff --git sc/source/ui/vba/vbaoleobjects.cxx sc/source/ui/vba/vbaoleobjects.cxx
-index 04392de..5fcf9e2 100644
---- sc/source/ui/vba/vbaoleobjects.cxx
-+++ sc/source/ui/vba/vbaoleobjects.cxx
-@@ -31,13 +31,13 @@
- #include <com/sun/star/container/XEnumerationAccess.hpp>
- #include <com/sun/star/drawing/XControlShape.hpp>
- #include <com/sun/star/container/XNamed.hpp>
--#include <org/openoffice/excel/XOLEObject.hpp>
-+#include <ooo/vba/excel/XOLEObject.hpp>
- 
- #include "vbaoleobject.hxx"
- #include "vbaoleobjects.hxx"
  
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
- 
- typedef ::cppu::WeakImplHelper1< container::XIndexAccess > XIndexAccess_BASE;
- 
-@@ -85,12 +85,12 @@ public:
- class EnumWrapper : public EnumerationHelper_BASE
+ uno::Any SAL_CALL
+-ScVbaGlobals::Names( ) throw ( uno::RuntimeException )
++ScVbaGlobals::Names( const css::uno::Any& aIndex ) throw ( uno::RuntimeException )
  {
- 
--        uno::Reference<vba::XHelperInterface > m_xParent;
-+        uno::Reference<XHelperInterface > m_xParent;
-         uno::Reference<uno::XComponentContext > m_xContext;
-         uno::Reference<container::XIndexAccess > m_xIndexAccess;
-         sal_Int32 nIndex;
- public:
--        EnumWrapper(  const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< container::XIndexAccess >& xIndexAccess ) :  m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
-+        EnumWrapper(  const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< container::XIndexAccess >& xIndexAccess ) :  m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
- 
-         virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
-         {
-@@ -102,7 +102,7 @@ public:
-                 if ( nIndex < m_xIndexAccess->getCount() )
- 		{
- 			uno::Reference< drawing::XControlShape > xControlShape (  m_xIndexAccess->getByIndex( nIndex++ ), uno::UNO_QUERY_THROW );
--        		return uno::makeAny( uno::Reference< oo::excel::XOLEObject >( new ScVbaOLEObject( m_xParent, m_xContext, xControlShape ) ) );
-+        		return uno::makeAny( uno::Reference< ov::excel::XOLEObject >( new ScVbaOLEObject( m_xParent, m_xContext, xControlShape ) ) );
- 		}
-                 throw container::NoSuchElementException();
-         }
-@@ -113,7 +113,7 @@ uno::Reference< container::XIndexAccess > oleObjectIndexWrapper( const uno::Refe
- 	return new IndexAccessWrapper( xIndexAccess );
+-	return getApplication()->Names();
++	return getApplication()->Names( aIndex );
  }
  
--ScVbaOLEObjects::ScVbaOLEObjects( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
-+ScVbaOLEObjects::ScVbaOLEObjects( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
-                 const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess )
-             : OLEObjectsImpl_BASE( xParent, xContext, oleObjectIndexWrapper( xIndexAccess  ) )
- {
-@@ -131,7 +131,7 @@ ScVbaOLEObjects::createCollectionObject( const css::uno::Any& aSource )
-     {
-         uno::Reference< drawing::XControlShape > xControlShape( aSource, uno::UNO_QUERY_THROW );
- 	// parent of OLEObject is the same parent as the collection ( e.g. the sheet )
--        return uno::makeAny( uno::Reference< oo::excel::XOLEObject >( new ScVbaOLEObject( getParent(), mxContext, xControlShape ) ) );
-+        return uno::makeAny( uno::Reference< ov::excel::XOLEObject >( new ScVbaOLEObject( getParent(), mxContext, xControlShape ) ) );
-     }
-     return uno::Any();
- }
-@@ -166,7 +166,7 @@ ScVbaOLEObjects::getItemByStringIndex( const rtl::OUString& sIndex ) throw (uno:
- uno::Type
- ScVbaOLEObjects::getElementType() throw (uno::RuntimeException)
- {
--    return org::openoffice::excel::XOLEObject::static_type(0);
-+    return ooo::vba::excel::XOLEObject::static_type(0);
- }
- rtl::OUString& 
- ScVbaOLEObjects::getServiceImplName()
-@@ -182,7 +182,7 @@ ScVbaOLEObjects::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.OLEObjects" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.OLEObjects" ) );
- 	}
- 	return aServiceNames;
+ namespace globals
+@@ -165,6 +165,6 @@
+ extern sdecl::ServiceDecl const serviceDecl(
+     serviceImpl,
+     "ScVbaGlobals",
+-    "org.openoffice.vba.Globals" );
++    "ooo.vba.Globals" );
  }
-diff --git sc/source/ui/vba/vbaoleobjects.hxx sc/source/ui/vba/vbaoleobjects.hxx
-index f5939f8..a00d193 100644
---- sc/source/ui/vba/vbaoleobjects.hxx
-+++ sc/source/ui/vba/vbaoleobjects.hxx
-@@ -31,12 +31,12 @@
- #define SC_VBA_OLEOBJECTS_HXX
+ 
+Index: sc/source/ui/vba/vbacharacters.hxx
+===================================================================
+--- sc/source/ui/vba/vbacharacters.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacharacters.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,13 +32,13 @@
  
  #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/excel/XOLEObjects.hpp>
-+#include <ooo/vba/excel/XOLEObjects.hpp>
  
- #include "vbacollectionimpl.hxx"
- #include "vbahelper.hxx"
+-#include <org/openoffice/excel/XCharacters.hpp>
++#include <ooo/vba/excel/XCharacters.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/text/XSimpleText.hpp>
  
--typedef CollTestImplHelper< oo::excel::XOLEObjects > OLEObjectsImpl_BASE;
-+typedef CollTestImplHelper< ov::excel::XOLEObjects > OLEObjectsImpl_BASE;
+ #include "vbahelperinterface.hxx"
+ #include "vbapalette.hxx"
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XCharacters > ScVbaCharacters_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XCharacters > ScVbaCharacters_BASE;
  
- class ScVbaOLEObjects : public OLEObjectsImpl_BASE
+ class ScVbaCharacters : public ScVbaCharacters_BASE
  {
-@@ -45,7 +45,7 @@ protected:
- 	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+@@ -51,7 +51,7 @@
+     // Add becuase of MSO has diferent behavior.
+     sal_Bool bReplace;
  public:
--    ScVbaOLEObjects( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
-+    ScVbaOLEObjects( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
-                     const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
- 
-     // XEnumerationAccess
-diff --git sc/source/ui/vba/vbaoutline.cxx sc/source/ui/vba/vbaoutline.cxx
-index 765b3ac..83c30bf 100644
---- sc/source/ui/vba/vbaoutline.cxx
-+++ sc/source/ui/vba/vbaoutline.cxx
-@@ -29,7 +29,7 @@
-  ************************************************************************/
- #include "vbaoutline.hxx"
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- 
- void
- ScVbaOutline::ShowLevels( const uno::Any& RowLevels, const uno::Any& ColumnLevels ) throw (uno::RuntimeException) 
-@@ -62,7 +62,7 @@ ScVbaOutline::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Outline" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Outline" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbaoutline.hxx sc/source/ui/vba/vbaoutline.hxx
-index 812a019..b8f4ece 100644
---- sc/source/ui/vba/vbaoutline.hxx
-+++ sc/source/ui/vba/vbaoutline.hxx
-@@ -32,17 +32,17 @@
- 
- #include <com/sun/star/sheet/XSheetOutline.hpp>
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/excel/XOutline.hpp>
-+#include <ooo/vba/excel/XOutline.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include "vbahelperinterface.hxx"
+-	ScVbaCharacters( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,  const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool bReplace = sal_False  ) throw ( css::lang::IllegalArgumentException );
++	ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,  const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool bReplace = sal_False  ) throw ( css::lang::IllegalArgumentException );
  
--typedef InheritedHelperInterfaceImpl1< oo::excel::XOutline > ScVbaOutline_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XOutline > ScVbaOutline_BASE;
+ 	virtual ~ScVbaCharacters() {}
+ 	// Attributes
+@@ -60,8 +60,8 @@
+ 	virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ 	virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+-	virtual void SAL_CALL setFont( const css::uno::Reference< oo::excel::XFont >& _font ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setFont( const css::uno::Reference< ov::excel::XFont >& _font ) throw (css::uno::RuntimeException);
  
- class ScVbaOutline :  public ScVbaOutline_BASE 
- {
- 	css::uno::Reference< css::sheet::XSheetOutline > mxOutline;
- public:
--	ScVbaOutline( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+	ScVbaOutline( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
- 		 css::uno::Reference<css::sheet::XSheetOutline> outline): ScVbaOutline_BASE( xParent, xContext) , mxOutline(outline)
- 	{}
- 	virtual ~ScVbaOutline(){}
-diff --git sc/source/ui/vba/vbapagebreak.cxx sc/source/ui/vba/vbapagebreak.cxx
-new file mode 100644
-index 0000000..581e5bd
---- /dev/null
-+++ sc/source/ui/vba/vbapagebreak.cxx
-@@ -0,0 +1,141 @@
+ 	// Methods
+ 	virtual void SAL_CALL Insert( const ::rtl::OUString& String ) throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbacheckbox.cxx
+===================================================================
+--- sc/source/ui/vba/vbacheckbox.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacheckbox.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,110 @@
 +/*************************************************************************
 + *
-+ * 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$
++ *
++ *  last change: $Author$ $Date$
 + *
-+ * OpenOffice.org - a multi-platform office productivity suite
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
 + *
-+ * $RCSfile$
-+ * $Revision$
 + *
-+ * This file is part of OpenOffice.org.
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
 + *
-+ * 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.
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
 + *
-+ * 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).
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
 + *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbapagebreak.hxx"
-+#include "vbarange.hxx"
-+#include <ooo/vba/excel/XlPageBreak.hpp>
-+using namespace ::com::sun::star;
-+using namespace ::ooo::vba;
-+
-+template< typename Ifc1 >
-+ScVbaPageBreak<Ifc1>::ScVbaPageBreak( const uno::Reference< XHelperInterface >& xParent, 
-+                    const uno::Reference< uno::XComponentContext >& xContext,
-+            		uno::Reference< beans::XPropertySet >& xProps,
-+                    sheet::TablePageBreakData aTablePageBreakData) throw (uno::RuntimeException):
-+            ScVbaPageBreak_BASE( xParent, xContext ),
-+            mxRowColPropertySet( xProps ),
-+            maTablePageBreakData( aTablePageBreakData )
-+{
-+}
++#include "vbacheckbox.hxx"
++#include <vector>
 +
-+template< typename Ifc1 >
-+sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) 
-+{
-+    uno::Any aValue = mxRowColPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )));
-+    sal_Bool hasPageBreak = sal_False;
-+    aValue >>= hasPageBreak;
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+    if( !hasPageBreak )
-+        return excel::XlPageBreak::xlPageBreakNone;
-+    
-+    if( maTablePageBreakData.ManualBreak )
-+        return excel::XlPageBreak::xlPageBreakManual;
-+    
-+    return excel::XlPageBreak::xlPageBreakAutomatic;
-+}
 +
-+template< typename Ifc1 >
-+void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) 
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
++ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
-+    if( (type != excel::XlPageBreak::xlPageBreakNone) && 
-+        (type != excel::XlPageBreak::xlPageBreakManual) &&
-+        (type != excel::XlPageBreak::xlPageBreakAutomatic) )
-+    {
-+        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+    }
-+
-+    if( type == excel::XlPageBreak::xlPageBreakNone )
-+    {
-+        mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
-+        return;
-+    }
-+
-+    mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_True));
-+    if( type == excel::XlPageBreak::xlPageBreakManual )
-+        maTablePageBreakData.ManualBreak = sal_True;
-+    else
-+        maTablePageBreakData.ManualBreak = sal_False;
 +}
 +
-+template< typename Ifc1 >
-+void ScVbaPageBreak<Ifc1>::Delete() throw ( script::BasicErrorException, uno::RuntimeException)
++// Attributes
++rtl::OUString SAL_CALL 
++ScVbaCheckbox::getCaption() throw (css::uno::RuntimeException)
 +{
-+    mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
++    rtl::OUString Label;
++    m_xProps->getPropertyValue( LABEL ) >>= Label;
++    return Label;
 +}
 +
-+template< typename Ifc1 >
-+uno::Reference< excel::XRange> ScVbaPageBreak<Ifc1>::Location() throw ( script::BasicErrorException, uno::RuntimeException)
++void SAL_CALL 
++ScVbaCheckbox::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
 +{
-+    uno::Reference< table::XCellRange > xRange( mxRowColPropertySet, uno::UNO_QUERY_THROW );
-+    return new ScVbaRange( ScVbaPageBreak_BASE::getParent(), ScVbaPageBreak_BASE::mxContext, xRange);
++    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
 +}
 +
-+template< typename Ifc1 >
-+rtl::OUString& 
-+ScVbaPageBreak<Ifc1>::getServiceImplName()
++uno::Any SAL_CALL 
++ScVbaCheckbox::getValue() throw (css::uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageBreak") );
-+	return sImplName;
++    sal_Int16 nValue = -1;
++    m_xProps->getPropertyValue( STATE ) >>= nValue;
++    if( nValue != 0 )
++        nValue = -1;
++//    return uno::makeAny( nValue ); 
++// I must be missing something MSO says value should be -1 if selected, 0 if not
++// selected
++    return uno::makeAny( ( nValue == -1 ) ? sal_True : sal_False ); 
 +}
 +
-+template< typename Ifc1 >
-+uno::Sequence< rtl::OUString > 
-+ScVbaPageBreak<Ifc1>::getServiceNames()
++void SAL_CALL 
++ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageBreak" ) );
-+	}
-+	return aServiceNames;
++    sal_Int16 nValue = 0;
++    sal_Bool bValue = false;
++    if( _value >>= nValue )
++    {
++        if( nValue == -1)
++            nValue = 1;
++    }
++    else if ( _value >>= bValue )
++    {
++        if ( bValue )
++            nValue = 1;
++    }
++    m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
 +}
-+
-+template class ScVbaPageBreak< excel::XHPageBreak >;
-+
-+/* class ScVbaHPageBreak */
 +rtl::OUString& 
-+ScVbaHPageBreak::getServiceImplName()
++ScVbaCheckbox::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreak") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCheckbox") );
 +	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaHPageBreak::getServiceNames()
++ScVbaCheckbox::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.HPageBreak" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.CheckBox" ) );
 +	}
 +	return aServiceNames;
 +}
-+
-diff --git sc/source/ui/vba/vbapagebreak.hxx sc/source/ui/vba/vbapagebreak.hxx
-new file mode 100644
-index 0000000..a07cfda
---- /dev/null
-+++ sc/source/ui/vba/vbapagebreak.hxx
-@@ -0,0 +1,87 @@
+Index: sc/source/ui/vba/vbastyles.hxx
+===================================================================
+--- sc/source/ui/vba/vbastyles.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbastyles.hxx	(.../cws/npower11)	(revision 266650)
+@@ -29,25 +29,25 @@
+  ************************************************************************/
+ #ifndef SC_VBA_STYLES_HXX
+ #define SC_VBA_STYLES_HXX
+-#include <org/openoffice/excel/XStyles.hpp>
++#include <ooo/vba/excel/XStyles.hpp>
+ #include <com/sun/star/container/XNameContainer.hpp>
+ #include "vbacollectionimpl.hxx"
+ 
+-typedef CollTestImplHelper< oo::excel::XStyles > ScVbaStyles_BASE;
++typedef CollTestImplHelper< ov::excel::XStyles > ScVbaStyles_BASE;
+ class ScVbaStyles: public ScVbaStyles_BASE
+ {
+ 	css::uno::Reference< css::frame::XModel > mxModel;
+ 	// hard ref to parent ( perhaps we should try this in the 
+ 	// XHelperInterface itself
+-	css::uno::Reference< oo::vba::XHelperInterface > mxParent;
++	css::uno::Reference< ov::XHelperInterface > mxParent;
+ 	css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF;
+ 	css::uno::Reference< css::container::XNameContainer > mxNameContainerCellStyles;
+ public:
+-	ScVbaStyles( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::script::BasicErrorException );
++	ScVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::script::BasicErrorException );
+ 	css::uno::Sequence< rtl::OUString > getStyleNames() throw ( css::uno::RuntimeException );
+ 	void Delete(const rtl::OUString _sStyleName) throw ( css::script::BasicErrorException );
+ 	// XStyles
+-	 virtual css::uno::Reference< oo::excel::XStyle > SAL_CALL Add( const ::rtl::OUString& Name, const css::uno::Any& BasedOn ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	 virtual css::uno::Reference< ov::excel::XStyle > SAL_CALL Add( const ::rtl::OUString& Name, const css::uno::Any& BasedOn ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	// XEnumerationAccess
+ 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);	
+Index: sc/source/ui/vba/vbavalidation.cxx
+===================================================================
+--- sc/source/ui/vba/vbavalidation.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbavalidation.cxx	(.../cws/npower11)	(revision 266650)
+@@ -32,13 +32,13 @@
+ #include <com/sun/star/sheet/ValidationType.hpp>
+ #include <com/sun/star/sheet/ValidationAlertStyle.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+-#include <org/openoffice/excel/XlDVType.hpp>
+-#include <org/openoffice/excel/XlFormatConditionOperator.hpp>
+-#include <org/openoffice/excel/XlDVAlertStyle.hpp>
++#include <ooo/vba/excel/XlDVType.hpp>
++#include <ooo/vba/excel/XlFormatConditionOperator.hpp>
++#include <ooo/vba/excel/XlDVAlertStyle.hpp>
+ 
+ #include "unonames.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ const static rtl::OUString VALIDATION( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_VALIDAT ) );
+@@ -330,7 +330,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Validation" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Validation" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbaoleobjects.hxx
+===================================================================
+--- sc/source/ui/vba/vbaoleobjects.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaoleobjects.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,12 +31,12 @@
+ #define SC_VBA_OLEOBJECTS_HXX
+ 
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/excel/XOLEObjects.hpp>
++#include <ooo/vba/excel/XOLEObjects.hpp>
+ 
+ #include "vbacollectionimpl.hxx"
+ #include "vbahelper.hxx"
+ 
+-typedef CollTestImplHelper< oo::excel::XOLEObjects > OLEObjectsImpl_BASE;
++typedef CollTestImplHelper< ov::excel::XOLEObjects > OLEObjectsImpl_BASE;
+ 
+ class ScVbaOLEObjects : public OLEObjectsImpl_BASE
+ {
+@@ -45,7 +45,7 @@
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ public:
+-    ScVbaOLEObjects( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
++    ScVbaOLEObjects( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
+                     const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
+ 
+     // XEnumerationAccess
+Index: sc/source/ui/vba/vbaprogressbar.hxx
+===================================================================
+--- sc/source/ui/vba/vbaprogressbar.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaprogressbar.hxx	(.../cws/npower11)	(revision 266650)
+@@ -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$
++ *
++ *  last change: $Author$ $Date$
 + *
-+ * OpenOffice.org - a multi-platform office productivity suite
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
 + *
-+ * $RCSfile$
-+ * $Revision$
 + *
-+ * This file is part of OpenOffice.org.
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
 + *
-+ * 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.
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
 + *
-+ * 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).
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
 + *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_PAGEBREAK_HXX
-+#define SC_VBA_PAGEBREAK_HXX
-+
++#ifndef SC_VBA_PROGRESSBAR_HXX
++#define SC_VBA_PROGRESSBAR_HXX
 +#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/excel/XPageBreak.hpp>
-+#include <ooo/vba/excel/XHPageBreak.hpp>
-+#include <ooo/vba/excel/XRange.hpp>
-+#include <com/sun/star/uno/XComponentContext.hpp>
-+#include <com/sun/star/script/BasicErrorException.hpp>
-+#include <com/sun/star/sheet/TablePageBreakData.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include "vbahelperinterface.hxx"
-+
-+template< typename Ifc1 >
-+class ScVbaPageBreak : public InheritedHelperInterfaceImpl1< Ifc1 >
-+{
-+typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE;
-+protected:
-+	css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet;
-+    css::sheet::TablePageBreakData maTablePageBreakData;
-+public:
-+	ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, 
-+                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+            		css::uno::Reference< css::beans::XPropertySet >& xProps,
-+                    css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException);
-+	virtual ~ScVbaPageBreak(){}
-+	
-+	virtual sal_Int32 SAL_CALL getType( ) throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setType(sal_Int32 type) throw (css::uno::RuntimeException);
-+
-+    virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::excel::XRange> SAL_CALL Location() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
++#include <ooo/vba/msforms/XProgressBar.hpp>
 +
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++#include <cppuhelper/implbase2.hxx>
 +
-+typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE;
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XProgressBar, css::script::XDefaultProperty  > ProgressBarImpl_BASE;
 +
-+class ScVbaHPageBreak :  public ScVbaHPageBreak_BASE
++class ScVbaProgressBar : public ProgressBarImpl_BASE
 +{
 +public:
-+	ScVbaHPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, 
-+                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+            		css::uno::Reference< css::beans::XPropertySet >& xProps,
-+                    css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException):
-+              ScVbaHPageBreak_BASE( xParent,xContext,xProps,aTablePageBreakData ){}
-+            
-+	virtual ~ScVbaHPageBreak(){}
-+	
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    ScVbaProgressBar( const css::uno::Reference< ov::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, ov::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);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    // XDefaultProperty
++    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
 +};
-+
-+#endif
-diff --git sc/source/ui/vba/vbapagebreaks.cxx sc/source/ui/vba/vbapagebreaks.cxx
-new file mode 100644
-index 0000000..8859ca6
---- /dev/null
-+++ sc/source/ui/vba/vbapagebreaks.cxx
-@@ -0,0 +1,269 @@
++#endif //SC_VBA_LABEL_HXX
+Index: sc/source/ui/vba/vbacommandbar.cxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbar.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacommandbar.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,329 @@
 +/*************************************************************************
 + *
-+ * 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
 + *
-+ * OpenOffice.org - a multi-platform office productivity suite
++ *  $RCSfile$
 + *
-+ * $RCSfile$
-+ * $Revision$
++ *  $Revision$
 + *
-+ * This file is part of OpenOffice.org.
++ *  last change: $Author$ $Date$
 + *
-+ * 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.
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
 + *
-+ * 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.
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbapagebreaks.hxx"
-+#include "vbapagebreak.hxx"
-+#include <ooo/vba/excel/XWorksheet.hpp>
-+using namespace ::com::sun::star;
-+using namespace ::ooo::vba;
++#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
++#include <com/sun/star/frame/XFrame.hpp>
++#include <com/sun/star/frame/XDesktop.hpp>
++#include <com/sun/star/frame/XLayoutManager.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
 +
-+typedef ::cppu::WeakImplHelper1<container::XIndexAccess > RangePageBreaks_Base;
-+class RangePageBreaks : public RangePageBreaks_Base
++#include "vbacommandbar.hxx"
++#include "vbacommandbarcontrols.hxx"
++#include "vbahelper.hxx"
++
++
++using namespace com::sun::star;
++using namespace ooo::vba;
++
++ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw (uno::RuntimeException) : CommandBar_BASE( xParent, xContext )
++{
++    // it's a menu bar
++    // only supporting factory menus ( no custom menus )
++    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
++    initCommandBar();
++    switch( nModuleType )
++    {
++        case 0:
++            m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" );
++            break;
++        case 1:
++            m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" );
++            break;
++        default:
++            m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" );
++    }
++    getMenuSettings();
++    m_bIsMenu = sal_True;
++    m_bCustom = sal_False;
++}
++ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sToolBarName, sal_Bool bTemporary, sal_Bool bCreate ) throw (uno::RuntimeException) :  CommandBar_BASE( xParent, xContext )
++{
++    // it's a tool bar
++    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
++    initCommandBar();
++    m_bTemporary = bTemporary;
++    m_bCreate = bCreate;
++    // get OOo ToolBarName
++    CommandBarNameMap::const_iterator iter = mCommandBarNameMap.find( sToolBarName.toAsciiLowerCase() );
++    if( iter != mCommandBarNameMap.end() )
++    {
++        m_sToolBarName = iter->second;
++    }
++    else
++    {
++        m_sToolBarName = sToolBarName;
++    }
++    m_sUIName = m_sToolBarName;
++    m_bIsMenu = sal_False;
++    getToolBarSettings( m_sToolBarName );
++}
++void
++ScVbaCommandBar::initCommandBar() throw (uno::RuntimeException)
++{
++    m_pScVbaCommandBars = dynamic_cast< ScVbaCommandBars* >( m_xParentHardRef.get() );
++    if ( !m_pScVbaCommandBars )
++        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Parent needs to be a ScVbaCommandBars"), uno::Reference< uno::XInterface >() );
++    m_bIsMenu = sal_False;
++    m_bCustom = sal_False;
++    m_bTemporary = sal_True;
++    m_sToolBarName = rtl::OUString::createFromAscii("");
++    m_sUIName = rtl::OUString::createFromAscii("");
++    m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" );
++}
++void
++ScVbaCommandBar::getToolBarSettings( rtl::OUString sToolBarName ) throw( uno::RuntimeException )
++{
++    rtl::OUString sFactoryToolBar = rtl::OUString::createFromAscii("private:resource/toolbar/") + sToolBarName.toAsciiLowerCase();
++    rtl::OUString sCustomToolBar = rtl::OUString::createFromAscii("private:resource/toolbar/custom_toolbar_") + sToolBarName;
++    uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
++    uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xUICfgManagerSup( xMSF->createInstance(rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier") ), uno::UNO_QUERY_THROW );
++    m_xUICfgManager.set( xUICfgManagerSup->getUIConfigurationManager( m_pScVbaCommandBars->GetModuleName() ), uno::UNO_QUERY_THROW );
++    m_xUICfgPers.set( m_xUICfgManager, uno::UNO_QUERY_THROW );
++    if( m_xUICfgManager->hasSettings( sFactoryToolBar ) )
++    {
++        // exsiting standard ToolBar
++        m_xBarSettings.set( m_xUICfgManager->getSettings( sFactoryToolBar, sal_True ), uno::UNO_QUERY_THROW );
++        m_sToolBarName = sFactoryToolBar;
++    }
++    else if( m_xUICfgManager->hasSettings( sCustomToolBar ) )
++    {
++        // exisiting custom ToolBar
++        m_xBarSettings.set( m_xUICfgManager->getSettings( sCustomToolBar, sal_True ), uno::UNO_QUERY_THROW );
++        m_sToolBarName = sCustomToolBar;
++        m_bCustom = sal_True;
++    }
++    else if( m_bCreate )
++    {
++        // new custom ToolBar
++        m_xBarSettings.set( m_xUICfgManager->createSettings(), uno::UNO_QUERY_THROW );
++        m_sToolBarName = sCustomToolBar;
++        m_bCustom = sal_True;
++        addCustomBar();
++    }
++    else
++        throw uno::RuntimeException( rtl::OUString::createFromAscii("ToolBar do not exist"), uno::Reference< uno::XInterface >() );
++    if( m_pScVbaCommandBars->GetWindows()->hasByName( m_sToolBarName ) )
++    {
++        uno::Any aToolBar = m_pScVbaCommandBars->GetWindows()->getByName( m_sToolBarName );
++        aToolBar >>= m_aToolBar; 
++    }
++}
++void
++ScVbaCommandBar::addCustomBar()
 +{
-+private:
-+	uno::Reference< XHelperInterface > mxParent;
-+	uno::Reference< uno::XComponentContext > mxContext;
-+	uno::Reference< sheet::XSheetPageBreak > mxSheetPageBreak;
-+	sal_Bool m_bColumn;
-+
-+public:
-+	RangePageBreaks( const uno::Reference< XHelperInterface >& xParent,
-+					 const uno::Reference< uno::XComponentContext >& xContext,
-+					 uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak,
-+					 sal_Bool bColumn ) : mxParent( xParent ), mxContext( xContext ), mxSheetPageBreak( xSheetPageBreak ), m_bColumn( bColumn )
-+	{
-+	}
-+
-+	sal_Int32 getAPIStartofRange( const uno::Reference< excel::XRange >& xRange ) throw (css::uno::RuntimeException)
-+	{
-+		if( m_bColumn )
-+			return xRange->getColumn() - 1;
-+		return xRange->getRow() - 1;
-+	}
-+
-+	sal_Int32 getAPIEndIndexofRange( const uno::Reference< excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (uno::RuntimeException)
-+	{
-+		if( m_bColumn )
-+			return nUsedStart + xRange->Columns( uno::Any() )->getCount();
-+	    return nUsedStart + xRange->Rows( uno::Any() )->getCount();
-+	}
-+
-+	uno::Sequence<sheet::TablePageBreakData> getAllPageBreaks() throw (uno::RuntimeException)
-+	{
-+		if( m_bColumn )
-+			return mxSheetPageBreak->getColumnPageBreaks();
-+    	return mxSheetPageBreak->getRowPageBreaks();
-+	}
-+
-+	uno::Reference<container::XIndexAccess> getRowColContainer() throw (uno::RuntimeException)
-+	{
-+		uno::Reference< table::XColumnRowRange > xColumnRowRange( mxSheetPageBreak, uno::UNO_QUERY_THROW );
-+    	uno::Reference<container::XIndexAccess> xIndexAccess;
-+		if( m_bColumn )
-+			xIndexAccess.set( xColumnRowRange->getColumns(), uno::UNO_QUERY_THROW );
-+		else
-+			xIndexAccess.set( xColumnRowRange->getRows(), uno::UNO_QUERY_THROW );
-+    	return xIndexAccess;
-+	}
-+
-+	sheet::TablePageBreakData getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException);
-+	uno::Any Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+
-+	// XIndexAccess
-+	virtual sal_Int32 SAL_CALL getCount(  ) throw (uno::RuntimeException);
-+	virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
-+	virtual uno::Type SAL_CALL getElementType(  ) throw (uno::RuntimeException)
-+	{
-+		//if( m_bColumn )
-+			// return excel::XVPageBreak::static_type(0);
-+		return  excel::XHPageBreak::static_type(0);
-+	}
-+	virtual sal_Bool SAL_CALL hasElements(  ) throw (uno::RuntimeException)
-+	{
-+		return sal_True;
-+	}
-+};
++    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
++    xPropertySet->setPropertyValue(rtl::OUString::createFromAscii("UIName"), uno::makeAny( m_sUIName ));
 +
-+/** @TODO Unlike MS Excel this method only considers the pagebreaks that intersect the used range
-+*  To become completely compatible the print area has to be considered. As far as I found out this printarea
-+*  also considers the position and sizes of shapes and manually inserted page breaks
-+*  Note: In MS  there is a limit of 1026 horizontal page breaks per sheet.
-+*/    
-+sal_Int32 SAL_CALL RangePageBreaks::getCount(  ) throw (uno::RuntimeException)
++    if( m_xUICfgManager->hasSettings(m_sToolBarName) )
++    {
++        m_xUICfgManager->replaceSettings( m_sToolBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++    }
++    else
++    {
++        m_xUICfgManager->insertSettings( m_sToolBarName,  uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++    }
++    if( !m_bTemporary )
++    {
++        m_xUICfgPers->store();
++    }
++}
++void 
++ScVbaCommandBar::getMenuSettings()
 +{
-+    sal_Int32 nCount = 0;
-+    uno::Reference< excel::XWorksheet > xWorksheet( mxParent, uno::UNO_QUERY_THROW );
-+    uno::Reference< excel::XRange > xRange = xWorksheet->getUsedRange();
-+    sal_Int32 nUsedStart = getAPIStartofRange( xRange );
-+    sal_Int32 nUsedEnd = getAPIEndIndexofRange( xRange, nUsedStart );
-+    uno::Sequence<sheet::TablePageBreakData> aTablePageBreakData = getAllPageBreaks();
-+
-+    sal_Int32 nLength = aTablePageBreakData.getLength();
-+    for( sal_Int32 i=0; i<nLength; i++ )
++    try
 +    {
-+        sal_Int32 nPos = aTablePageBreakData[i].Position;
-+        if( nPos > nUsedEnd )
-+            return nCount;
-+        if( nPos >= nUsedStart )
-+            nCount++;
++        rtl::OUString sMenuBar = rtl::OUString::createFromAscii( "private:resource/menubar/menubar" );
++        uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
++        uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xUICfgManagerSup( xMSF->createInstance(rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier") ), uno::UNO_QUERY_THROW );
++        m_xUICfgManager.set( xUICfgManagerSup->getUIConfigurationManager( m_sMenuModuleName ), uno::UNO_QUERY_THROW );
++        m_xUICfgPers.set( m_xUICfgManager, uno::UNO_QUERY_THROW );
++        m_xBarSettings.set( m_xUICfgManager->getSettings( sMenuBar, sal_True ), uno::UNO_QUERY_THROW );
++    } 
++    catch ( uno::Exception e)
++    {
++        OSL_TRACE( "getMenuSetting got a error\n" );
 +    }
-+
-+    return nCount;
 +}
-+
-+uno::Any SAL_CALL RangePageBreaks::getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
++::rtl::OUString SAL_CALL
++ScVbaCommandBar::getName() throw ( uno::RuntimeException )
 +{
-+    if( (Index < getCount()) && ( Index >= 0 ))
++    // This will get a "NULL length string" when Name is not set. 
++    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
++    uno::Any aName = xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") );
++    rtl::OUString sName;
++    aName >>= sName;
++    if( sName.getLength() < 1 && !m_bIsMenu )
 +    {
-+        sheet::TablePageBreakData aTablePageBreakData = getTablePageBreakData( Index );
-+        uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer();
-+        sal_Int32 nPos = aTablePageBreakData.Position;
-+        if( (nPos < xIndexAccess->getCount()) && (nPos > -1) )
++        uno::Reference< container::XNameAccess > xNameAccess( m_pScVbaCommandBars->GetWindows(), uno::UNO_QUERY_THROW );
++        if( xNameAccess->hasByName( m_sToolBarName ) )
 +        {
-+            uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nPos), uno::UNO_QUERY_THROW );
-+			//if( m_bColumn )
-+			//	return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
-+			return uno::makeAny( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
++            beans::PropertyValues aToolBar; 
++            xNameAccess->getByName( m_sToolBarName ) >>= aToolBar;
++            sal_Int32 nCount = aToolBar.getLength();
++            beans::PropertyValue aPropertyValue;
++            for( sal_Int32 i = 0; i < nCount; i++ )
++            {
++                aPropertyValue = aToolBar[i];
++                if( aPropertyValue.Name.equals( rtl::OUString::createFromAscii("UIName") ) )
++                {
++                    aPropertyValue.Value >>= sName;
++                    return sName;
++                }
++            }
++        }
++    }
++    return sName;
++}
++void SAL_CALL 
++ScVbaCommandBar::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException)
++{
++    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
++    xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("UIName"), uno::makeAny( _name ) );
++    uno::Reference< container::XIndexAccess > xIndexAccess( m_xBarSettings, uno::UNO_QUERY_THROW );
++    
++    if( m_xUICfgManager->hasSettings( m_sToolBarName ) )
++    {
++        m_xUICfgManager->replaceSettings( m_sToolBarName, xIndexAccess );
++    }
++    else
++    {
++        // toolbar not found
++    }
++    if( !m_bTemporary )
++    {
++        m_xUICfgPers->store();
++    }
++}
++::sal_Bool SAL_CALL 
++ScVbaCommandBar::getVisible() throw (uno::RuntimeException)
++{
++    sal_Bool bVisible = sal_False;
++    try
++    {
++        sal_Int32 i = 0;
++        while( !m_aToolBar[i].Name.equals( rtl::OUString::createFromAscii( "Visible" ) ) )
++        {
++            i++;
++        }
++        m_aToolBar[i].Value >>= bVisible;
++    }
++    catch ( uno::Exception e )
++    {
++    }
++    return bVisible;
++}
++void SAL_CALL 
++ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
++{
++    try
++    {
++        uno::Reference< frame::XFrame > xFrame( getCurrentDocument()->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW ); 
++        uno::Reference< beans::XPropertySet > xPropertySet( xFrame, uno::UNO_QUERY_THROW );
++        uno::Reference< frame::XLayoutManager > xLayoutManager( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("LayoutManager") ), uno::UNO_QUERY_THROW );
++        if( _visible )
++        {
++            xLayoutManager->createElement( m_sToolBarName );
++            xLayoutManager->showElement( m_sToolBarName );
++        }
++        else
++        {
++            xLayoutManager->hideElement( m_sToolBarName );
++            xLayoutManager->destroyElement( m_sToolBarName );
++        }
++    }
++    catch( uno::Exception e )
++    {
++        OSL_TRACE( "SetVisible get an exception\n" );
++    }
++}
++void SAL_CALL 
++ScVbaCommandBar::Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++{
++    if( m_bCustom )
++    {
++        if( m_xUICfgManager->hasSettings( m_sToolBarName ) )
++        {
++            m_xUICfgManager->removeSettings(m_sToolBarName);
++            // make it permanent
++            if( !m_bTemporary )
++            {
++                m_xUICfgPers->store();
++            }
++        }
++        else
++        {
++            // toolbar not found
++            // TODO throw Error
++        }
++        uno::Reference< container::XNameContainer > xNameContainer( m_pScVbaCommandBars->GetWindows(), uno::UNO_QUERY_THROW );
++        if( xNameContainer->hasByName( m_sToolBarName ) )
++        {
++            xNameContainer->removeByName( m_sToolBarName );
++        }
++    }
++}
++uno::Any SAL_CALL 
++ScVbaCommandBar::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
++{
++    sal_Int32 nIndex;
++    uno::Reference< XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
++    if( aIndex.hasValue() )
++    {
++        if( aIndex >>= nIndex )
++        {
++            uno::Reference< XCommandBarControl > xCommandBarControl( xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW );
++            return uno::makeAny( xCommandBarControl );
 +        }
++        else
++            throw uno::RuntimeException( rtl::OUString::createFromAscii(  "invalid index" ), uno::Reference< uno::XInterface >() );
 +    }
-+	throw lang::IndexOutOfBoundsException();
++    return uno::makeAny( xCommandBarControls );
 +}
-+
-+sheet::TablePageBreakData RangePageBreaks::getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException)
++rtl::OUString& 
++ScVbaCommandBar::getServiceImplName()
 +{
-+    sal_Int32 index = -1;
-+    sheet::TablePageBreakData aTablePageBreakData;
-+    uno::Reference< excel::XWorksheet > xWorksheet( mxParent, uno::UNO_QUERY_THROW );
-+    uno::Reference< excel::XRange > xRange = xWorksheet->getUsedRange();
-+    sal_Int32 nUsedStart = getAPIStartofRange( xRange );
-+    sal_Int32 nUsedEnd = getAPIEndIndexofRange( xRange, nUsedStart );
-+    uno::Sequence<sheet::TablePageBreakData> aTablePageBreakDataList = getAllPageBreaks();
-+
-+    sal_Int32 nLength = aTablePageBreakDataList.getLength();
-+    for( sal_Int32 i=0; i<nLength; i++ )
-+    {
-+        aTablePageBreakData = aTablePageBreakDataList[i];
-+        sal_Int32 nPos = aTablePageBreakData.Position;
-+        if( nPos >= nUsedStart )
-+            index++;
-+        if( nPos > nUsedEnd )
-+            DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
-+        if( index == nAPIItemIndex )
-+            return aTablePageBreakData;
-+    }
-+
-+    return aTablePageBreakData;
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBar") );
++	return sImplName;
 +}
-+
-+uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException)
++uno::Sequence<rtl::OUString> 
++ScVbaCommandBar::getServiceNames()
 +{
-+    uno::Reference< excel::XRange > xRange;
-+    Before >>= xRange;
-+    if( !xRange.is() )
-+    {
-+		DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBar" ) );
 +	}
-+
-+	sal_Int32 nAPIRowColIndex = getAPIStartofRange( xRange );
-+	uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer();
-+	uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nAPIRowColIndex), uno::UNO_QUERY_THROW );
-+	xRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_True));
-+	sheet::TablePageBreakData aTablePageBreakData;
-+	aTablePageBreakData.ManualBreak = sal_True;
-+	aTablePageBreakData.Position = nAPIRowColIndex;
-+	//if( m_bColumn )
-+	//	return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
-+	return uno::makeAny( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
++	return aServiceNames;
 +}
+Index: sc/source/ui/vba/vbacharttitle.cxx
+===================================================================
+--- sc/source/ui/vba/vbacharttitle.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacharttitle.cxx	(.../cws/npower11)	(revision 266650)
+@@ -29,10 +29,10 @@
+  ************************************************************************/
+ #include "vbacharttitle.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+-ScVbaChartTitle::ScVbaChartTitle( const uno::Reference< vba::XHelperInterface >& xParent,  const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& _xTitleShape ) :  ChartTitleBase( xParent, xContext, _xTitleShape )
++ScVbaChartTitle::ScVbaChartTitle( const uno::Reference< XHelperInterface >& xParent,  const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& _xTitleShape ) :  ChartTitleBase( xParent, xContext, _xTitleShape )
+ {
+ }
+ 
+@@ -51,7 +51,7 @@
+ 	{
+ 		uno::Sequence< rtl::OUString > BaseServiceNames = ChartTitleBase::getServiceNames();
+ 		aServiceNames.realloc( BaseServiceNames.getLength() + 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Chart" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Chart" ) );
+ 		for ( sal_Int32 index = 1; index < (BaseServiceNames.getLength() + 1); ++index )
+ 			aServiceNames[ index ] = BaseServiceNames[ index ];
+ 	}
+Index: sc/source/ui/vba/vbawsfunction.hxx
+===================================================================
+--- sc/source/ui/vba/vbawsfunction.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbawsfunction.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,20 +30,19 @@
+ #ifndef SC_VBA_INTERIOR_HXX
+ #define SC_VBA_INTERIOR_HXX
+ 
+-#include <org/openoffice/excel/XWorksheetFunction.hpp>
++#include <ooo/vba/excel/XWorksheetFunction.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include "vbarange.hxx"
+ 
+ #include <com/sun/star/beans/XExactName.hpp>
+ #include <com/sun/star/container/XNameAccess.hpp>
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XWorksheetFunction > ScVbaWSFunction_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XWorksheetFunction > ScVbaWSFunction_BASE;
+ 
+ class ScVbaWSFunction :  public ScVbaWSFunction_BASE
+ {
+-	css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
+ public:
+-	ScVbaWSFunction( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
++	ScVbaWSFunction( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
+ 	virtual ~ScVbaWSFunction(){}
+ 
+ 	virtual css::uno::Reference< css::beans::XIntrospectionAccess >  SAL_CALL getIntrospection(void)  throw(css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbacomment.hxx
+===================================================================
+--- sc/source/ui/vba/vbacomment.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacomment.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,8 +32,8 @@
+ 
+ #include <cppuhelper/implbase1.hxx>
+ 
+-#include <org/openoffice/excel/XComment.hpp>
+-#include <org/openoffice/excel/XApplication.hpp>
++#include <ooo/vba/excel/XComment.hpp>
++#include <ooo/vba/excel/XApplication.hpp>
+ #include <com/sun/star/sheet/XSheetAnnotations.hpp>
+ #include <com/sun/star/sheet/XSheetAnnotation.hpp>
+ #include <com/sun/star/table/XCellRange.hpp>
+@@ -41,7 +41,7 @@
+ 
+ #include "vbahelperinterface.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XComment > ScVbaComment_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XComment > ScVbaComment_BASE;
+ 
+ class ScVbaComment : public ScVbaComment_BASE
+ {
+@@ -51,9 +51,9 @@
+ 	css::uno::Reference< css::sheet::XSheetAnnotation > SAL_CALL getAnnotation() throw (css::uno::RuntimeException);
+ 	css::uno::Reference< css::sheet::XSheetAnnotations > SAL_CALL getAnnotations() throw (css::uno::RuntimeException);
+ 	sal_Int32 SAL_CALL getAnnotationIndex() throw (css::uno::RuntimeException);
+-	css::uno::Reference< oo::excel::XComment > SAL_CALL getCommentByIndex( sal_Int32 Index ) throw (css::uno::RuntimeException);
++	css::uno::Reference< ov::excel::XComment > SAL_CALL getCommentByIndex( sal_Int32 Index ) throw (css::uno::RuntimeException);
+ public:
+-    ScVbaComment( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::lang::IllegalArgumentException );
++    ScVbaComment( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::lang::IllegalArgumentException );
+ 
+     virtual ~ScVbaComment() {}
+ 
+@@ -65,8 +65,8 @@
+ 
+     // Methods
+     virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::excel::XComment > SAL_CALL Next() throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< oo::excel::XComment > SAL_CALL Previous() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Next() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Previous() throw (css::uno::RuntimeException);
+     virtual rtl::OUString SAL_CALL Text( const css::uno::Any& Text, const css::uno::Any& Start, const css::uno::Any& Overwrite ) throw (css::uno::RuntimeException);
+     // XHelperInterface
+     virtual rtl::OUString& getServiceImplName();
+Index: sc/source/ui/vba/vbaoleobject.hxx
+===================================================================
+--- sc/source/ui/vba/vbaoleobject.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaoleobject.hxx	(.../cws/npower11)	(revision 266650)
+@@ -33,11 +33,11 @@
+ #include <cppuhelper/implbase1.hxx>
+ #include <com/sun/star/drawing/XControlShape.hpp>
+ #include <com/sun/star/awt/XWindowPeer.hpp>
+-#include <org/openoffice/excel/XOLEObject.hpp>
++#include <ooo/vba/excel/XOLEObject.hpp>
+ 
+ #include "vbahelperinterface.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XOLEObject > OLEObjectImpl_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XOLEObject > OLEObjectImpl_BASE;
+ 
+ class ScVbaOLEObject : public OLEObjectImpl_BASE
+ {
+@@ -47,7 +47,7 @@
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ public:
+-    ScVbaOLEObject( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
++    ScVbaOLEObject( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
+             css::uno::Reference< css::drawing::XControlShape > xControlShape );
+ 
+     // XOLEObject Attributes
+Index: sc/source/ui/vba/vbawindow.hxx
+===================================================================
+--- sc/source/ui/vba/vbawindow.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbawindow.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,19 +30,19 @@
+ #ifndef SC_VBA_WINDOW_HXX
+ #define SC_VBA_WINDOW_HXX
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/excel/XWindow.hpp>
++#include <ooo/vba/excel/XWindow.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/sheet/XViewPane.hpp>
+ #include <com/sun/star/sheet/XViewFreezable.hpp>
+ #include <com/sun/star/sheet/XViewSplitable.hpp>
+ #include <com/sun/star/frame/XModel.hpp>
+-#include <org/openoffice/excel/XPane.hpp>
++#include <ooo/vba/excel/XPane.hpp>
+ #include <com/sun/star/awt/XDevice.hpp>
+ 
+ #include "vbahelperinterface.hxx"
+ #include "vbaworkbook.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1<oo::excel::XWindow > WindowImpl_BASE;
++typedef InheritedHelperInterfaceImpl1<ov::excel::XWindow > WindowImpl_BASE;
+ 
+ class ScVbaWindow : public WindowImpl_BASE
+ {		
+@@ -51,16 +51,21 @@
+ 	css::uno::Reference< css::sheet::XViewPane > m_xViewPane;
+ 	css::uno::Reference< css::sheet::XViewFreezable > m_xViewFreezable;
+ 	css::uno::Reference< css::sheet::XViewSplitable > m_xViewSplitable;
+-	css::uno::Reference< oo::excel::XPane > m_xPane;
++	css::uno::Reference< ov::excel::XPane > m_xPane;
+ 	css::uno::Reference< css::awt::XDevice > m_xDevice;
++    void init();
+ protected:
+ 	void SplitAtDefinedPosition(sal_Bool _bUnFreezePane);
+ public:	
+ 	void  Scroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft, bool bLargeScroll = false ) throw (css::uno::RuntimeException);	
+ public:
+-	ScVbaWindow( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
+- 	css::uno::Reference< oo::excel::XPane > ActivePane();
++	ScVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
++    ScVbaWindow( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext );
 +
+ 	// XWindow
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL ActiveCell(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
++ 	virtual css::uno::Reference< ov::excel::XPane > SAL_CALL ActivePane() throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL ActiveSheet(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
+ 	virtual void SAL_CALL setCaption( const css::uno::Any& _caption ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL getCaption() throw (css::uno::RuntimeException);
+ 	virtual ::sal_Bool SAL_CALL getDisplayGridlines() throw (css::uno::RuntimeException);
+@@ -77,6 +82,10 @@
+ 	virtual void SAL_CALL setDisplayWorkbookTabs( ::sal_Bool _bDisplayWorkbookTabs ) throw (css::uno::RuntimeException);
+ 	virtual ::sal_Bool SAL_CALL getFreezePanes() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setFreezePanes( ::sal_Bool _bFreezePanes ) throw (css::uno::RuntimeException);
++    virtual sal_Int32 SAL_CALL getHeight() throw (css::uno::RuntimeException) ;
++    virtual void SAL_CALL setHeight( sal_Int32 _height ) throw (css::uno::RuntimeException) ;
++    virtual sal_Int32 SAL_CALL getLeft() throw (css::uno::RuntimeException) ;
++    virtual void SAL_CALL setLeft( sal_Int32 _left ) throw (css::uno::RuntimeException) ;
+ 	virtual ::sal_Bool SAL_CALL getSplit() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setSplit( ::sal_Bool _bSplit ) throw (css::uno::RuntimeException);
+     virtual sal_Int32 SAL_CALL getSplitColumn() throw (css::uno::RuntimeException) ;
+@@ -91,6 +100,14 @@
+     virtual void SAL_CALL setScrollRow( const css::uno::Any& _scrollrow ) throw (css::uno::RuntimeException) ;
+     virtual css::uno::Any SAL_CALL getScrollColumn() throw (css::uno::RuntimeException) ;
+     virtual void SAL_CALL setScrollColumn( const css::uno::Any& _scrollcolumn ) throw (css::uno::RuntimeException) ;
++    virtual sal_Int32 SAL_CALL getTop() throw (css::uno::RuntimeException) ;
++    virtual void SAL_CALL setTop( sal_Int32 _top ) throw (css::uno::RuntimeException) ;
++    virtual css::uno::Any SAL_CALL getView() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setView( const css::uno::Any& _view ) throw (css::uno::RuntimeException);
++    virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
++    virtual sal_Int32 SAL_CALL getWidth() throw (css::uno::RuntimeException) ;
++    virtual void SAL_CALL setWidth( sal_Int32 _width ) throw (css::uno::RuntimeException) ;
+     virtual css::uno::Any SAL_CALL getWindowState() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setWindowState( const css::uno::Any& _windowstate ) throw (css::uno::RuntimeException);
+     virtual css::uno::Any SAL_CALL getZoom() throw (css::uno::RuntimeException);
+@@ -103,8 +120,11 @@
+ 	virtual void SAL_CALL ScrollWorkbookTabs( const css::uno::Any& Sheets, const css::uno::Any& Position ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Activate(  ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& FileName, const css::uno::Any& RouteWorkBook ) throw (css::uno::RuntimeException);
+-	 virtual css::uno::Reference< oo::excel::XRange > SAL_CALL ActiveCell(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
+ 	 virtual css::uno::Any SAL_CALL Selection(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
++	 virtual sal_Int32 SAL_CALL PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	 virtual sal_Int32 SAL_CALL PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	 virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	 virtual void SAL_CALL PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	// XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+Index: sc/source/ui/vba/vbatextboxshape.cxx
+===================================================================
+--- sc/source/ui/vba/vbatextboxshape.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbatextboxshape.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,74 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
 +
-+class RangePageBreaksEnumWrapper : public EnumerationHelper_BASE
-+{
-+	uno::Reference<container::XIndexAccess > m_xIndexAccess;
-+	sal_Int32 nIndex;
-+public:
-+	RangePageBreaksEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
-+	virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
-+	{
-+		return ( nIndex < m_xIndexAccess->getCount() );
-+	}
++#include "vbatextboxshape.hxx"
++#include "vbacharacters.hxx"
++#include <com/sun/star/text/XSimpleText.hpp>
++#include <vector>
 +
-+	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
-+	{
-+		if ( nIndex < m_xIndexAccess->getCount() )
-+			return m_xIndexAccess->getByIndex( nIndex++ );
-+		throw container::NoSuchElementException();
-+	}
-+};
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+ScVbaHPageBreaks::ScVbaHPageBreaks( const uno::Reference< XHelperInterface >& xParent, 
-+                                    const uno::Reference< uno::XComponentContext >& xContext,
-+            		                uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak) throw (uno::RuntimeException):
-+                          ScVbaHPageBreaks_BASE( xParent,xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, sal_False )), 
-+						  mxSheetPageBreak( xSheetPageBreak )
++ScVbaTextBoxShape::ScVbaTextBoxShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, const uno::Reference< frame::XModel >& xModel ) : TextBoxShapeImpl_BASE( uno::Reference< XHelperInterface >(), xContext, xShape, xShapes, ScVbaShape::getType( xShape )  )
 +{
++    m_xTextRange.set( xShape , uno::UNO_QUERY_THROW );
++    m_xModel.set( xModel );
 +}
 +
-+uno::Any SAL_CALL ScVbaHPageBreaks::Add( const uno::Any& Before) throw ( script::BasicErrorException, uno::RuntimeException)
++rtl::OUString SAL_CALL 
++ScVbaTextBoxShape::getText() throw (css::uno::RuntimeException)
 +{
-+	RangePageBreaks* pPageBreaks = dynamic_cast< RangePageBreaks* >( m_xIndexAccess.get() );
-+	if( pPageBreaks )
-+	{
-+		return pPageBreaks->Add( Before );
-+	}
-+	return uno::Any();
++    return m_xTextRange->getString();
 +}
 +
-+uno::Reference< container::XEnumeration >
-+ScVbaHPageBreaks::createEnumeration() throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaTextBoxShape::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
 +{
-+	return new RangePageBreaksEnumWrapper( m_xIndexAccess );
++    m_xTextRange->setString( _text );
 +}
 +
-+uno::Any
-+ScVbaHPageBreaks::createCollectionObject( const css::uno::Any& aSource )
++uno::Reference< excel::XCharacters > SAL_CALL 
++ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException)
 +{
-+	return aSource; // its already a pagebreak object
-+}
++    ScDocShell* pDocShell = getDocShell( m_xModel );
++    ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
 +
-+uno::Type 
-+ScVbaHPageBreaks::getElementType() throw (uno::RuntimeException)
-+{
-+	return excel::XHPageBreak::static_type(0);
-+}
++    if ( !pDoc )
++        throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
++    uno::Reference< text::XSimpleText > xSimple( m_xTextRange, uno::UNO_QUERY_THROW );
 +
-+rtl::OUString& 
-+ScVbaHPageBreaks::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreaks") );
-+	return sImplName;
++    ScVbaPalette aPalette( pDoc->GetDocumentShell() );
++    return  new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length, sal_True );
 +}
+Index: sc/source/ui/vba/vbalistcontrolhelper.hxx
+===================================================================
+--- sc/source/ui/vba/vbalistcontrolhelper.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbalistcontrolhelper.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,20 @@
++#ifndef SC_VBA_LISTCONTROLHELPER
++#define SC_VBA_LISTCONTROLHELPER
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaHPageBreaks::getServiceNames()
++#include "vbahelper.hxx"
++
++class ListControlHelper
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.HPageBreaks" ) );
-+	}
-+	return aServiceNames;
-+}
++	css::uno::Reference< css::beans::XPropertySet > m_xProps;
 +
-diff --git sc/source/ui/vba/vbapagebreaks.hxx sc/source/ui/vba/vbapagebreaks.hxx
-new file mode 100644
-index 0000000..530d82a
---- /dev/null
-+++ sc/source/ui/vba/vbapagebreaks.hxx
-@@ -0,0 +1,71 @@
++public:
++	ListControlHelper( const css::uno::Reference< css::beans::XPropertySet >& rxControl ) : m_xProps( rxControl ){}
++	virtual ~ListControlHelper() {}
++	virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);   
++    	virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
++	virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
++	virtual void SAL_CALL Clear(  ) throw (css::uno::RuntimeException);
++};
++#endif
+Index: sc/source/ui/vba/vbacollectionimpl.hxx
+===================================================================
+--- sc/source/ui/vba/vbacollectionimpl.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacollectionimpl.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,8 +30,8 @@
+ #ifndef SC_VBA_COLLECTION_IMPL_HXX
+ #define SC_VBA_COLLECTION_IMPL_HXX
+ 
+-#include <org/openoffice/vba/XCollection.hpp>
+-//#include <org/openoffice/vba/XCollectionTest.hpp>
++#include <ooo/vba/XCollection.hpp>
++//#include <ooo/vba/XCollectionTest.hpp>
+ #include <com/sun/star/container/XEnumerationAccess.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/script/XDefaultMethod.hpp>
+@@ -187,7 +187,7 @@
+ 		return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) );		
+ 	}
+ public:
+-	ScVbaCollectionBase( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ){ m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); }
++	ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ){ m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); }
+ 	//XCollection
+ 	virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException)
+ 	{
+@@ -235,14 +235,14 @@
+ 	
+ };
+ 
+-typedef ::cppu::WeakImplHelper1<oo::vba::XCollection> XCollection_InterfacesBASE;
++typedef ::cppu::WeakImplHelper1<ov::XCollection> XCollection_InterfacesBASE;
+ 
+ typedef ScVbaCollectionBase< XCollection_InterfacesBASE > CollImplBase1;
+ // compatible with the old collections ( pre XHelperInterface base class ) ( some internal objects still use this )
+ class ScVbaCollectionBaseImpl : public CollImplBase1
+ {
+ public:
+-	ScVbaCollectionBaseImpl( const css::uno::Reference< oo::vba::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : CollImplBase1( xParent, xContext, xIndexAccess){}
++	ScVbaCollectionBaseImpl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : CollImplBase1( xParent, xContext, xIndexAccess){}
+ 
+ };
+ 
+@@ -252,7 +252,7 @@
+ typedef ScVbaCollectionBase< ::cppu::WeakImplHelper1< Ifc >  > ImplBase1;
+ 
+ public:
+-	CollTestImplHelper( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,  const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : ImplBase1( xParent, xContext, xIndexAccess ) {}
++	CollTestImplHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,  const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : ImplBase1( xParent, xContext, xIndexAccess ) {}
+ };
+ 
+ 
+Index: sc/source/ui/vba/vbaimage.cxx
+===================================================================
+--- sc/source/ui/vba/vbaimage.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaimage.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -21250,145 +19067,103 @@
 + *
 + * 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_PAGEBREAKS_HXX
-+#define SC_VBA_PAGEBREAKS_HXX
-+
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/excel/XHPageBreaks.hpp>
-+#include <ooo/vba/excel/XHPageBreak.hpp>
-+#include <ooo/vba/excel/XRange.hpp>
-+#include <com/sun/star/uno/XComponentContext.hpp>
-+#include <com/sun/star/script/BasicErrorException.hpp>
-+#include <com/sun/star/sheet/XSheetPageBreak.hpp>
-+#include <com/sun/star/sheet/TablePageBreakData.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <com/sun/star/container/XIndexAccess.hpp>
-+#include <com/sun/star/table/XColumnRowRange.hpp>
-+#include "vbahelperinterface.hxx"
-+#include "vbacollectionimpl.hxx"
-+
-+typedef CollTestImplHelper< ov::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
-+
-+class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE
-+{
-+	css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak;
-+public:
-+	ScVbaHPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, 
-+                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+            		css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak) throw (css::uno::RuntimeException);
-+	virtual ~ScVbaHPageBreaks(){}
-+
-+    // XHPageBreaks 
-+    virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+
-+	// XEnumerationAccess
-+	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);	
-+	virtual css::uno::Any createCollectionObject(const css::uno::Any&);
-+
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+
-+#endif
-diff --git sc/source/ui/vba/vbapages.cxx sc/source/ui/vba/vbapages.cxx
-new file mode 100644
-index 0000000..658bf06
---- /dev/null
-+++ sc/source/ui/vba/vbapages.cxx
-@@ -0,0 +1,81 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "vbapages.hxx"
-+
-+using namespace ::ooo::vba;
-+using namespace ::com::sun::star;
-+using namespace ::vos;
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++#include "vbaimage.hxx"
++#include <vector>
 +
-+ScVbaPages::ScVbaPages( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xPages ) throw( lang::IllegalArgumentException ) : ScVbaPages_BASE( xParent, xContext, xPages )
-+{
-+}
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+uno::Type SAL_CALL 
-+ScVbaPages::getElementType() throw (uno::RuntimeException)
-+{
-+	// return msforms::XPage::static_type(0); 
-+	return uno::XInterface::static_type(0); 
-+}
 +
-+uno::Any 
-+ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++ScVbaImage::ScVbaImage( const uno::Reference< 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 )
 +{
-+	return aSource;
 +}
 +
 +rtl::OUString& 
-+ScVbaPages::getServiceImplName()
++ScVbaImage::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPages") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaImage") );
 +	return sImplName;
 +}
 +
-+uno::Reference< container::XEnumeration > SAL_CALL 
-+ScVbaPages::createEnumeration() throw (uno::RuntimeException)
-+{
-+	return uno::Reference< container::XEnumeration >();
-+}
-+
 +uno::Sequence< rtl::OUString > 
-+ScVbaPages::getServiceNames()
++ScVbaImage::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Pages" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Image" ) );
 +	}
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbapages.hxx sc/source/ui/vba/vbapages.hxx
-new file mode 100644
-index 0000000..6c7b23e
---- /dev/null
-+++ sc/source/ui/vba/vbapages.hxx
-@@ -0,0 +1,64 @@
+Index: sc/source/ui/vba/helperdecl.hxx
+===================================================================
+--- sc/source/ui/vba/helperdecl.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/helperdecl.hxx	(.../cws/npower11)	(revision 266650)
+@@ -28,7 +28,7 @@
+  *
+  ************************************************************************/
+ #include <comphelper/servicedecl.hxx>
+-#include <org/openoffice/vba/XHelperInterface.hpp>
++#include <ooo/vba/XHelperInterface.hpp>
+ 
+ namespace comphelper {
+ namespace service_decl {
+@@ -86,7 +86,7 @@
+                 css::uno::Reference<css::uno::XComponentContext>
+                 const& xContext ) const
+     {
+-        return css::uno::Reference< org::openoffice::vba::XHelperInterface >(new OwnServiceImpl<ImplT>( rServiceDecl, xContext ));
++        return css::uno::Reference< ooo::vba::XHelperInterface >(new OwnServiceImpl<ImplT>( rServiceDecl, xContext ));
+     }
+ };
+ 
+@@ -101,7 +101,7 @@
+                 css::uno::Reference<css::uno::XComponentContext>
+                 const& xContext ) const
+     {
+-        css::uno::Reference< org::openoffice::vba::XHelperInterface > xHelp(
++        css::uno::Reference< ooo::vba::XHelperInterface > xHelp(
+             new OwnServiceImpl<ImplT>( rServiceDecl, args, xContext ) );
+ 	css::uno::Reference< css::uno::XInterface > xIf( xHelp, css::uno::UNO_QUERY ) ;
+ 	return xIf;
+Index: sc/source/ui/vba/vbacondition.cxx
+===================================================================
+--- sc/source/ui/vba/vbacondition.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacondition.cxx	(.../cws/npower11)	(revision 266650)
+@@ -29,18 +29,18 @@
+  ************************************************************************/
+ 
+ #include "vbacondition.hxx"
+-#include <org/openoffice/excel/XlFormatConditionOperator.hpp>
+-#include <org/openoffice/excel/XFormatCondition.hpp>
++#include <ooo/vba/excel/XlFormatConditionOperator.hpp>
++#include <ooo/vba/excel/XFormatCondition.hpp>
+ #include <com/sun/star/table/XCellRange.hpp>
+ #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ const sal_Int32 ISFORMULA = 98765432;
+ 
+ template< typename Ifc1 >
+-ScVbaCondition< Ifc1 >::ScVbaCondition(  const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetCondition >& _xSheetCondition ) : ScVbaCondition_BASE( xParent, xContext ), mxSheetCondition( _xSheetCondition )
++ScVbaCondition< Ifc1 >::ScVbaCondition(  const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetCondition >& _xSheetCondition ) : ScVbaCondition_BASE( xParent, xContext ), mxSheetCondition( _xSheetCondition )
+ {
+ 	mxAddressable.set( xParent, uno::UNO_QUERY_THROW ); 
+ }
+Index: sc/source/ui/vba/vbacommandbarcontrols.cxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbarcontrols.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacommandbarcontrols.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,247 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -21423,1405 +19198,2572 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_PAGES_HXX
-+#define SC_VBA_PAGES_HXX
++#include "vbacommandbarcontrols.hxx"
++#include "vbacommandbarcontrol.hxx"
 +
-+#include <ooo/vba/office/MsoShapeType.hpp>
-+#include <com/sun/star/lang/XEventListener.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <ooo/vba/msforms/XPages.hpp>
-+#include <cppuhelper/implbase2.hxx>
-+#include <cppuhelper/implbase1.hxx>
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+#include "vbacollectionimpl.hxx"
-+typedef CollTestImplHelper< 
-+ov::msforms::XPages > ScVbaPages_BASE;
++typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarControlEnumeration_BASE;
++class CommandBarControlEnumeration : public CommandBarControlEnumeration_BASE
++{
++    //uno::Reference< uno::XComponentContext > m_xContext;
++    ScVbaCommandBarControls* m_pCommandBarControls;
++    sal_Int32 m_nCurrentPosition;
++public:
++    CommandBarControlEnumeration( ScVbaCommandBarControls* pCommandBarControls ) : m_pCommandBarControls( pCommandBarControls ), m_nCurrentPosition( 0 ) {}
++    virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
++    {
++        if( m_nCurrentPosition < m_pCommandBarControls->getCount() )
++            return sal_True;
++        return sal_False;
++    }
++    virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
++    {
++        if( hasMoreElements() )
++        {
++            rtl::OUString sName = m_pCommandBarControls->GetControlNameByIndex( m_nCurrentPosition );
++            m_nCurrentPosition = m_nCurrentPosition + 1;
++            if( sName.getLength() > 0 )
++                return m_pCommandBarControls->createCollectionObject( uno::makeAny( sName ) );
++            else
++                return nextElement();
++        }
++        else
++            throw container::NoSuchElementException();
++        return uno::Any();
++    }
++};
 +
-+class ScVbaPages : public ScVbaPages_BASE
++ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< container::XIndexAccess> xIndexAccess ) throw (uno::RuntimeException) : CommandBarControls_BASE( xParent, xContext, xIndexAccess )
++{
++    m_bIsMenu = sal_False;
++    m_bHasElements = sal_False;
++    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
++    m_pCommandBar = dynamic_cast< ScVbaCommandBar* >( m_xParentHardRef.get() );
++    m_pCommandBarControl = dynamic_cast< ScVbaCommandBarControl* >( m_xParentHardRef.get() );
++    if( m_pCommandBar )
++    {
++        m_xUICfgManager.set( m_pCommandBar->GetUICfgManager(), uno::UNO_QUERY_THROW );
++        m_xUICfgPers.set( m_pCommandBar->GetUICfgPers(), uno::UNO_QUERY_THROW );
++        m_xBarSettings.set( m_pCommandBar->GetBarSettings(), uno::UNO_QUERY_THROW );
++        m_bIsMenu = m_pCommandBar->IsMenu();
++        if( m_xBarSettings->hasElements() )
++        {
++            m_bHasElements = sal_True;
++        }
++    }
++    else if( m_pCommandBarControl )
++    {
++    }
++    else
++    {
++        throw uno::RuntimeException( rtl::OUString::createFromAscii("Parent needs to be a ScVbaCommandBar or a ScVbaCommandBarControl"), uno::Reference< uno::XInterface >() );
++    }
++}
++rtl::OUString
++ScVbaCommandBarControls::GetControlNameByIndex( const sal_Int32 nIndex ) throw ( uno::RuntimeException )
++{
++    sal_Int32 nCount = 0;
++    if( m_bHasElements )
++    {
++        sal_Int32 nBarSettingsCount = m_xBarSettings->getCount();
++        for( sal_Int32 i = 0; i < nBarSettingsCount; i++ )
++        {
++            beans::PropertyValues aMenuValues;
++            m_xBarSettings->getByIndex( i ) >>= aMenuValues;
++            for( sal_Int32 j = 0; j < aMenuValues.getLength(); j++ )
++            {
++                if( aMenuValues[j].Name.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "CommandURL" ) ) )
++                {
++                    nCount++;
++                    if( nIndex == nCount )
++                    {
++                        rtl::OUString sCommandURL;
++                        aMenuValues[j].Value >>= sCommandURL;
++                        sal_Int32 nLastIndex = sCommandURL.lastIndexOf( rtl::OUString::createFromAscii(":") );
++                        if( ( nLastIndex != -1 ) && ( ( nLastIndex +1 ) < sCommandURL.getLength() ) )
++                        {
++                            sCommandURL = sCommandURL.copy( nLastIndex + 1 );
++                            return sCommandURL;
++                        }
++                    }
++                }
++            }
++        } 
++    }
++    else
++        throw  uno::RuntimeException( rtl::OUString::createFromAscii( "Out of bound" ), uno::Reference< uno::XInterface >() );
++    return rtl::OUString();
++}
++
++// Attributes
++sal_Int32 SAL_CALL 
++ScVbaCommandBarControls::getCount() throw (uno::RuntimeException)
++{
++    sal_Int32 nCount = 0;
++    if( m_bHasElements )
++    {
++        sal_Int32 nBarSettingsCount = m_xBarSettings->getCount();
++        for( sal_Int32 i = 0; i < nBarSettingsCount; i++ )
++        {
++            beans::PropertyValues aMenuValues;
++            m_xBarSettings->getByIndex( i ) >>= aMenuValues;
++            for( sal_Int32 j = 0; j < aMenuValues.getLength(); j++ )
++            {
++                if( aMenuValues[j].Name.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "CommandURL" ) ) )
++                {
++                    nCount++;
++                }
++            }
++        } 
++    }
++    return nCount;
++}
++// XEnumerationAccess
++uno::Type SAL_CALL
++ScVbaCommandBarControls::getElementType() throw ( uno::RuntimeException )
++{
++    return XCommandBarControls::static_type( 0 );
++}
++uno::Reference< container::XEnumeration >
++ScVbaCommandBarControls::createEnumeration() throw ( uno::RuntimeException )
++{
++    return uno::Reference< container::XEnumeration >( new CommandBarControlEnumeration( this ) );
++}
++uno::Any
++ScVbaCommandBarControls::createCollectionObject( const uno::Any& aSource )
++{
++    // only surport the aSource as a name string, because this class is a API wrapper
++    rtl::OUString sName;
++    if( aSource >>= sName )
++        return uno::makeAny( uno::Reference< XCommandBarControl > ( new ScVbaCommandBarControl( this, mxContext, sName ) ) );
++    return uno::Any();
++}
++
++// Methods
++uno::Any SAL_CALL 
++ScVbaCommandBarControls::Item( const uno::Any& aIndex, const uno::Any& /*aIndex*/ ) throw (uno::RuntimeException)
++{
++    if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
++    {
++        return createCollectionObject( aIndex );
++    } 
++    sal_Int32 nIndex = 0;
++    if( aIndex >>= nIndex )
++    {
++        return createCollectionObject( uno::makeAny( GetControlNameByIndex( nIndex ) ) );
++    }
++    
++    return uno::Any();
++}
++uno::Reference< 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)
 +{
-+protected:
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+public:
-+    ScVbaPages( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xPages ) throw ( css::lang::IllegalArgumentException );
-+    virtual ~ScVbaPages() {}
-+        // XEnumerationAccess
-+    virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
-+     // ScVbaPages_BASE
-+     virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
-+
-+};
-+#endif//SC_VBA_SHAPE_HXX
-diff --git sc/source/ui/vba/vbapagesetup.cxx sc/source/ui/vba/vbapagesetup.cxx
-new file mode 100644
-index 0000000..33d3128
---- /dev/null
-+++ sc/source/ui/vba/vbapagesetup.cxx
-@@ -0,0 +1,892 @@
-+/*************************************************************************
-+ *
-+ * 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 "vbapagesetup.hxx"
-+#include "cellsuno.hxx"
-+#include "convuno.hxx"
-+#include "rangelst.hxx"
-+#include <com/sun/star/sheet/XPrintAreas.hpp>
-+#include <com/sun/star/sheet/XHeaderFooterContent.hpp>
-+#include <com/sun/star/text/XText.hpp>
-+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
-+#include <com/sun/star/container/XNameAccess.hpp>
-+#include <ooo/vba/excel/XlPageOrientation.hpp>
-+#include <ooo/vba/excel/XlOrder.hpp>
-+#include <ooo/vba/excel/Constants.hpp>
++    // Parameter is not supported
++    // the following name needs to be individually created;
++    rtl::OUString sCaption( rtl::OUString::createFromAscii("custom Control") );
++    rtl::OUString sCommand( rtl::OUString::createFromAscii("macro:///Standard.Module1.Test()") );
++    sal_Int32 nType =0;
++    sal_Int32 nPosition = 0;
++    sal_Int32 nId;
++    sal_Bool bTemporary = sal_True;
++    
++    if( Type.hasValue() )
++        if( Type >>= nType )
++        {
++            // evalute the type of the new control
++        }
++    if( Id.hasValue() )
++        if( Id >>= nId )
++        {
++            // evalute the action of the new control
++        }
++    if( Before.hasValue() )
++        if( Before >>= nPosition )
++        {
++            // evalute the position of the new Control
++        }
++    if( Temporary.hasValue() )
++        if( Temporary >>= bTemporary )
++        {
++            // evalute the temporary of the new Control
++        }
++    return uno::Reference< XCommandBarControl > ( new ScVbaCommandBarControl( this, mxContext, sCaption, sCommand, nPosition, bTemporary ) );
++}
++   
++// XHelperInterface
++rtl::OUString& 
++ScVbaCommandBarControls::getServiceImplName()
++{
++    static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControls") );
++    return sImplName;
++}
++uno::Sequence<rtl::OUString> 
++ScVbaCommandBarControls::getServiceNames()
++{
++    static uno::Sequence< rtl::OUString > aServiceNames;
++    if ( aServiceNames.getLength() == 0 )
++    {
++        aServiceNames.realloc( 1 );
++        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBarControls" ) );
++    }
++    return aServiceNames;
++}
 +
-+using namespace ::com::sun::star;
+Index: sc/source/ui/vba/vbacolorformat.cxx
+===================================================================
+--- sc/source/ui/vba/vbacolorformat.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacolorformat.cxx	(.../cws/npower11)	(revision 266650)
+@@ -28,10 +28,10 @@
+  *
+  ************************************************************************/
+ #include <com/sun/star/beans/XPropertySet.hpp>
+-#include <org/openoffice/msforms/XLineFormat.hpp>
++#include <ooo/vba/msforms/XLineFormat.hpp>
+ #include "vbacolorformat.hxx"
+ 
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ using namespace com::sun::star;
+ 
+ sal_Int32
+@@ -51,13 +51,13 @@
+     };
+     return COLORINDIZES[nIndex];
+ }
+-ScVbaColorFormat::ScVbaColorFormat( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< vba::XHelperInterface > xInternalParent, const uno::Reference< drawing::XShape > xShape, const sal_Int16 nColorFormatType ) : ScVbaColorFormat_BASE( xParent, xContext ), m_xInternalParent( xInternalParent ), m_xShape( xShape ), m_nColorFormatType( nColorFormatType )
++ScVbaColorFormat::ScVbaColorFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XHelperInterface > xInternalParent, const uno::Reference< drawing::XShape > xShape, const sal_Int16 nColorFormatType ) : ScVbaColorFormat_BASE( xParent, xContext ), m_xInternalParent( xInternalParent ), m_xShape( xShape ), m_nColorFormatType( nColorFormatType )
+ {
+     m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
+     m_nFillFormatBackColor = 0;
+     try
+     {
+-        uno::Reference< oo::msforms::XFillFormat > xFillFormat( xInternalParent, uno::UNO_QUERY_THROW );
++        uno::Reference< ov::msforms::XFillFormat > xFillFormat( xInternalParent, uno::UNO_QUERY_THROW );
+         m_pFillFormat = ( ScVbaFillFormat* )( xFillFormat.get() );
+     }catch ( uno::RuntimeException  e )
+     {
+@@ -183,7 +183,7 @@
+     if ( aServiceNames.getLength() == 0 )
+     {
+         aServiceNames.realloc( 1 );
+-        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.ColorFormat" ) );
++        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ColorFormat" ) );
+     }
+     return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbachartobject.cxx
+===================================================================
+--- sc/source/ui/vba/vbachartobject.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbachartobject.cxx	(.../cws/npower11)	(revision 266650)
+@@ -37,12 +37,12 @@
+ #include "vbachartobjects.hxx"
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
+ 
+ const rtl::OUString CHART_NAME( RTL_CONSTASCII_USTRINGPARAM("Name") );
+ const rtl::OUString PERSIST_NAME( RTL_CONSTASCII_USTRINGPARAM("PersistName") );
+ 
+-ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart( _xTableChart ), xDrawPageSupplier( _xDrawPageSupplier )
++ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart( _xTableChart ), xDrawPageSupplier( _xDrawPageSupplier )
+ {
+         xDrawPage = xDrawPageSupplier->getDrawPage();        
+         xEmbeddedObjectSupplier.set( xTableChart, uno::UNO_QUERY_THROW );
+@@ -152,7 +152,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.ChartObject" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ChartObject" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbalistbox.hxx
+===================================================================
+--- sc/source/ui/vba/vbalistbox.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbalistbox.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,31 +32,31 @@
+ #include <cppuhelper/implbase2.hxx>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/script/XDefaultProperty.hpp>
+-#include <org/openoffice/msforms/XListBox.hpp>
++#include <ooo/vba/msforms/XListBox.hpp>
+ #include <com/sun/star/beans/PropertyAttribute.hpp>
+ 
+ #include "vbacontrol.hxx"
+ #include "vbapropvalue.hxx"
++#include "vbalistcontrolhelper.hxx"
+ #include "vbahelper.hxx"
+ 
+-typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::msforms::XListBox, css::script::XDefaultProperty > ListBoxImpl_BASE;
++typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XListBox, css::script::XDefaultProperty > ListBoxImpl_BASE;
+ class ScVbaListBox : public ListBoxImpl_BASE
+     ,public PropListener
+ {		
++	std::auto_ptr< ListControlHelper > mpListHelper;
+ 	rtl::OUString sSourceName; 
+ 	rtl::OUString msDftPropName;
+ 
+     sal_Int16 m_nIndex;
+ 	
+ public:
+-	ScVbaListBox( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
+-    ScVbaListBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
+-                    const css::uno::Reference< css::drawing::XControlShape> xControlShape );
++	ScVbaListBox( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pGeomHelper );
+ 
+-
+ 	// Attributes
++	virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setListIndex( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
++	virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
+ 	virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+@@ -67,12 +67,19 @@
+ 
+ 	// Methods
+ 	virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
++    virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Clear(  ) throw (css::uno::RuntimeException);
++	virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
++	// XControl
++    virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
+ 
+-
+ 	// XDefaultProperty
+     rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+     
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();    
 +
-+#define ZOOM_IN 10
-+#define ZOOM_MAX 400
-+
-+bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, ScRange& refRange, ScRangeList& aCellRanges, ::formula::FormulaGrammar::AddressConvention aConv = ::formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException );
+     //PropListener
+     virtual void setValueEvent( const css::uno::Any& value );
+     virtual css::uno::Any getValueEvent();
+Index: sc/source/ui/vba/vbainterior.cxx
+===================================================================
+--- sc/source/ui/vba/vbainterior.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbainterior.cxx	(.../cws/npower11)	(revision 266650)
+@@ -34,8 +34,11 @@
+ #include <com/sun/star/beans/XIntrospectionAccess.hpp>
+ #include <com/sun/star/reflection/XIdlMethod.hpp>
+ #include <com/sun/star/beans/MethodConcept.hpp>
++#include <com/sun/star/beans/NamedValue.hpp>
++#include <com/sun/star/xml/AttributeData.hpp>
+ 
+-#include <org/openoffice/excel/XlColorIndex.hpp>
++#include <ooo/vba/excel/XlColorIndex.hpp>
++#include <ooo/vba/excel/XlPattern.hpp>
+ 
+ #include <comphelper/processfactory.hxx>
+ #include <cppuhelper/queryinterface.hxx>
+@@ -44,12 +47,53 @@
+ 
+ #include "vbainterior.hxx"
+ #include "vbapalette.hxx"
 +
-+ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent, 
-+				const uno::Reference< uno::XComponentContext >& xContext,
-+				const uno::Reference< sheet::XSpreadsheet >& xSheet,
-+				const uno::Reference< frame::XModel >& xModel) throw (uno::RuntimeException):
-+	   	ScVbaPageSetup_BASE( xParent, xContext ),
-+		mxSheet( xSheet ), mxModel( xModel )
-+{
-+    // query for current page style
-+    uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW );
-+    uno::Any aValue = xSheetProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageStyle" )));
-+    rtl::OUString aStyleName;
-+    aValue >>= aStyleName;
++#define STATIC_TABLE_SIZE( array )  (sizeof(array)/sizeof(*(array)))
++#define COLORMAST 0xFFFFFF
++const sal_uInt16 EXC_COLOR_WINDOWBACK = 65;
++typedef std::map< sal_Int32, sal_Int32 >  PatternMap;
++typedef std::pair< sal_Int32, sal_Int32 > PatternPair;
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
++using namespace ::ooo::vba::excel::XlPattern;
+ static const rtl::OUString BACKCOLOR( RTL_CONSTASCII_USTRINGPARAM( "CellBackColor" ) );
++static const rtl::OUString PATTERN( RTL_CONSTASCII_USTRINGPARAM( "Pattern" ) );
++static const rtl::OUString PATTERNCOLOR( RTL_CONSTASCII_USTRINGPARAM( "PatternColor" ) );
+ 
+-ScVbaInterior::ScVbaInterior( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >&  xProps, ScDocument* pScDoc ) throw ( lang::IllegalArgumentException) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(xProps), m_pScDoc( pScDoc )
++PatternMap lcl_getPatternMap()
+ {
++    PatternMap aPatternMap;
++    aPatternMap.insert( PatternPair( xlPatternAutomatic, 0 ) );
++    aPatternMap.insert( PatternPair( xlPatternChecker, 9 ) );
++    aPatternMap.insert( PatternPair( xlPatternCrissCross, 16 ) );
++    aPatternMap.insert( PatternPair( xlPatternDown, 7 ) );
++    aPatternMap.insert( PatternPair( xlPatternGray16, 17 ) );
++    aPatternMap.insert( PatternPair( xlPatternGray25, 4 ) );
++    aPatternMap.insert( PatternPair( xlPatternGray50, 2 ) );
++    aPatternMap.insert( PatternPair( xlPatternGray75, 3 ) );
++    aPatternMap.insert( PatternPair( xlPatternGray8, 18 ) );
++    aPatternMap.insert( PatternPair( xlPatternGrid, 15 ) );
++    aPatternMap.insert( PatternPair( xlPatternHorizontal, 5 ) );
++    aPatternMap.insert( PatternPair( xlPatternLightDown, 13 ) );
++    aPatternMap.insert( PatternPair( xlPatternLightHorizontal, 11 ) );
++    aPatternMap.insert( PatternPair( xlPatternLightUp, 14 ) );
++    aPatternMap.insert( PatternPair( xlPatternLightVertical, 12 ) );
++    aPatternMap.insert( PatternPair( xlPatternNone, 0 ) );
++    aPatternMap.insert( PatternPair( xlPatternSemiGray75, 10 ) );
++    aPatternMap.insert( PatternPair( xlPatternSolid, 0 ) );
++    aPatternMap.insert( PatternPair( xlPatternUp, 8 ) );
++    aPatternMap.insert( PatternPair( xlPatternVertical, 6 ) );
++    return aPatternMap;
++}
 +
-+    uno::Reference< style::XStyleFamiliesSupplier > xStyleFamiliesSup( mxModel, uno::UNO_QUERY_THROW );
-+    uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies();
-+    uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles"))), uno::UNO_QUERY_THROW );
-+    mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW );
-+}		
++static PatternMap aPatternMap( lcl_getPatternMap() );
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeException)
++ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >&  xProps, ScDocument* pScDoc ) throw ( lang::IllegalArgumentException) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(xProps), m_pScDoc( pScDoc )
 +{
-+    String aPrintArea;
-+    uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
-+    uno::Sequence< table::CellRangeAddress > aSeq = xPrintAreas->getPrintAreas();
-+    sal_Int32 nCount = aSeq.getLength();
-+    if( nCount )
++    // auto color
++    //m_aPattColor.SetColor( (sal_uInt32)0xFFFFFFFF );
++    m_aPattColor.SetColor( (sal_uInt32)0x0 );
++    m_nPattern = 0L;
+ 	if ( !m_xProps.is() )
+ 		throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "properties") ), uno::Reference< uno::XInterface >(), 2 ); 
+ }
+@@ -57,17 +101,52 @@
+ uno::Any
+ ScVbaInterior::getColor() throw (uno::RuntimeException) 
+ {
+-	uno::Any aAny;
+-	aAny = OORGBToXLRGB( m_xProps->getPropertyValue( BACKCOLOR ) );
+-	return aAny;
++    Color aBackColor( GetBackColor() );
++	return uno::makeAny( OORGBToXLRGB( aBackColor.GetColor() ) );
+ }
+  
+ void 
+ ScVbaInterior::setColor( const uno::Any& _color  ) throw (uno::RuntimeException)
+ {
+-	m_xProps->setPropertyValue( BACKCOLOR , XLRGBToOORGB(_color));
++    sal_Int32 nColor = 0;
++    if( _color >>= nColor )
 +    {
-+        ScAddress::Details aDetails( ::formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
-+        USHORT nFlags = SCA_VALID;
-+        nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE );
-+		ScRangeList aRangeList;
-+		for( sal_Int32 i=0; i<nCount; i++ )
-+		{
-+			ScRange aRange;
-+			ScUnoConversion::FillScRange( aRange, aSeq[i] );
-+			aRangeList.Append( aRange );
-+		}
-+		ScDocument* pDoc = getDocShell( mxModel )->GetDocument();
-+		aRangeList.Format( aPrintArea, nFlags, pDoc, ::formula::FormulaGrammar::CONV_XL_A1, ','  );
++        SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( XLRGBToOORGB( nColor ) ) );
++	    //m_xProps->setPropertyValue( BACKCOLOR , XLRGBToOORGB(_color));
++        SetMixedColor();
 +    }
-+    
-+    return aPrintArea;
-+}
-+
-+void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException)
+ }
+ 
++void
++ScVbaInterior::SetMixedColor()
 +{
-+    uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
-+    if( rAreas.getLength() == 0 ||
-+        rAreas.equalsIgnoreAsciiCase ( rtl::OUString::createFromAscii("FALSE") ) )
++    // pattern
++    uno::Any aPattern = GetUserDefinedAttributes( PATTERN );
++    if( aPattern.hasValue() )
 +    {
-+        // print the whole sheet
-+        uno::Sequence< table::CellRangeAddress > aSeq;
-+        xPrintAreas->setPrintAreas( aSeq );
++        m_nPattern = GetAttributeData( aPattern );
 +    }
-+    else
++    sal_Int32 nPattern = aPatternMap[ m_nPattern ];
++    // pattern color
++    uno::Any aPatternColor = GetUserDefinedAttributes( PATTERNCOLOR );
++    if( aPatternColor.hasValue() )
 +    {
-+		ScRangeList aCellRanges;
-+		ScRange aRange;
-+		if( getScRangeListForAddress( rAreas, getDocShell( mxModel ) , aRange, aCellRanges ) ) 
-+		{
-+			uno::Sequence< table::CellRangeAddress > aSeq( aCellRanges.Count() );
-+			USHORT i=0;
-+			for( ScRange* pRange = aCellRanges.First(); pRange; pRange = aCellRanges.Next() )
-+			{
-+				table::CellRangeAddress aRangeAddress;
-+				ScUnoConversion::FillApiRange( aRangeAddress, *pRange );
-+				aSeq[ i++ ] = aRangeAddress;
-+			}
-+			xPrintAreas->setPrintAreas( aSeq );
-+		}
++        sal_uInt32 nPatternColor = GetAttributeData( aPatternColor );
++        m_aPattColor.SetColor( nPatternColor );
 +    }
++    sal_Int32 nPatternColor = m_aPattColor.GetColor();
++    // back color
++    Color aBackColor( GetBackColor() );
++    // set mixed color
++    Color aMixedColor;
++    if( nPattern > 0 )
++        aMixedColor = GetPatternColor( Color(nPatternColor), aBackColor, (sal_uInt32)nPattern );
++    else
++        aMixedColor = GetPatternColor( aBackColor, aBackColor, (sal_uInt32)nPattern );
++    sal_Int32 nMixedColor = aMixedColor.GetColor() & COLORMAST;
++	m_xProps->setPropertyValue( BACKCOLOR , uno::makeAny( nMixedColor ) );
 +}
 +
-+double SAL_CALL ScVbaPageSetup::getTopMargin() throw (css::uno::RuntimeException)
+ uno::Reference< container::XIndexAccess >
+ ScVbaInterior::getPalette()
+ {
+@@ -83,28 +162,28 @@
+ {
+ 	sal_Int32 nIndex = 0;
+ 	_colorindex >>= nIndex;
++	
++	// setColor expects colors in XL RGB values
++	// #FIXME this is daft we convert OO RGB val to XL RGB val and
++	// then back again to OO RGB value
++	setColor( OORGBToXLRGB( GetIndexColor( nIndex ) ) );
++}
++uno::Any
++ScVbaInterior::GetIndexColor( const sal_Int32& nColorIndex )
 +{
-+    sal_Bool headerOn = sal_False;
-+    sal_Int32 topMargin = 0;
-+    sal_Int32 headerHeight = 0;
-+
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")));
-+        aValue >>= headerOn;
-+
-+        aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
-+        aValue >>= topMargin;
-+
-+        if( headerOn )
-+        {
-+            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
-+            aValue >>= headerHeight;
-+            topMargin += headerHeight;
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    
-+    return Millimeter::getInPoints( topMargin );
++	sal_Int32 nIndex = nColorIndex;
+ 	// #FIXME  xlColorIndexAutomatic & xlColorIndexNone are not really
+ 	// handled properly here
+-	
+ 	if ( !nIndex || ( nIndex == excel::XlColorIndex::xlColorIndexAutomatic ) || ( nIndex == excel::XlColorIndex::xlColorIndexNone )  )
+ 		nIndex = 2; // default is white ( this maybe will probably break, e.g. we may at some stage need to know what this interior is,  a cell or something else and then pick a default colour based on that )
+ 	--nIndex; // OOo indices are zero bases
+ 	uno::Reference< container::XIndexAccess > xIndex = getPalette();
+-	// setColor expects colors in XL RGB values
+-	// #FIXME this is daft we convert OO RGB val to XL RGB val and
+-	// then back again to OO RGB value
+-	setColor( OORGBToXLRGB(xIndex->getByIndex( nIndex )) );
++    return xIndex->getByIndex( nIndex );
+ }
+ 
+-uno::Any SAL_CALL 
+-ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
++sal_Int32
++ScVbaInterior::GetColorIndex( const sal_Int32 nColor )
+ {
+-	sal_Int32 nColor = 0;
+-	// getColor returns Xl ColorValue, need to convert it to OO val
+-	// as the palette deals with OO RGB values 
+-	// #FIXME this is daft in getColor we convert OO RGB val to XL RGB val 
+-	// and then back again to OO RGB value
+-	XLRGBToOORGB( getColor() ) >>= nColor; 
+ 	uno::Reference< container::XIndexAccess > xIndex = getPalette();
+ 	sal_Int32 nElems = xIndex->getCount();
+ 	sal_Int32 nIndex = -1;
+@@ -118,9 +197,189 @@
+ 			break;
+ 		}
+ 	}     
+-	return uno::makeAny( nIndex );
++    return nIndex;
+ }
+ 
++uno::Any SAL_CALL 
++ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
++{
++	sal_Int32 nColor = 0;
++	// getColor returns Xl ColorValue, need to convert it to OO val
++	// as the palette deals with OO RGB values 
++	// #FIXME this is daft in getColor we convert OO RGB val to XL RGB val 
++	// and then back again to OO RGB value
++	XLRGBToOORGB( getColor() ) >>= nColor; 
++     
++	return uno::makeAny( GetIndexColor( nColor ) );
 +}
-+
-+void SAL_CALL ScVbaPageSetup::setTopMargin( double margin ) throw (css::uno::RuntimeException)
++Color
++ScVbaInterior::GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern )
 +{
-+    sal_Int32 topMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    sal_Bool headerOn = sal_False;
-+    sal_Int32 headerHeight = 0;
-+
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")));
-+        aValue >>= headerOn;
-+        
-+        if( headerOn )
-+        {
-+            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
-+            aValue >>= headerHeight;
-+            topMargin -= headerHeight;
-+        }
-+
-+        aValue <<= topMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
++    // 0x00 == 0% transparence (full rPattColor)
++    // 0x80 == 100% transparence (full rBackColor)
++    static const sal_uInt8 pnRatioTable[] =
 +    {
-+    }
++        0x80, 0x00, 0x40, 0x20, 0x60, 0x40, 0x40, 0x40,     // 00 - 07
++        0x40, 0x40, 0x20, 0x60, 0x60, 0x60, 0x60, 0x48,     // 08 - 15
++        0x50, 0x70, 0x78                                    // 16 - 18
++    };
++    return ( nXclPattern < STATIC_TABLE_SIZE( pnRatioTable ) ) ?
++        GetMixedColor( rPattColor, rBackColor, pnRatioTable[ nXclPattern ] ) : rPattColor;
 +}
-+
-+double SAL_CALL ScVbaPageSetup::getBottomMargin() throw (css::uno::RuntimeException)
++Color
++ScVbaInterior::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans )
 +{
-+    sal_Bool footerOn = sal_False;
-+    sal_Int32 bottomMargin = 0;
-+    sal_Int32 footerHeight = 0;
-+
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
-+        aValue >>= footerOn;
-+
-+        aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
-+        aValue >>= bottomMargin;
-+
-+        if( footerOn )
-+        {
-+            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
-+            aValue >>= footerHeight;
-+            bottomMargin += footerHeight;
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    
-+    return Millimeter::getInPoints( bottomMargin );
++    return Color( 
++        nTrans,
++        GetMixedColorComp( rFore.GetRed(), rBack.GetRed(), nTrans ),
++        GetMixedColorComp( rFore.GetGreen(), rBack.GetGreen(), nTrans ),
++        GetMixedColorComp( rFore.GetBlue(), rBack.GetBlue(), nTrans ));
 +}
-+
-+void SAL_CALL ScVbaPageSetup::setBottomMargin( double margin ) throw (css::uno::RuntimeException)
++sal_uInt8
++ScVbaInterior::GetMixedColorComp(  sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans )
 +{
-+    sal_Int32 bottomMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    sal_Bool footerOn = sal_False;
-+    sal_Int32 footerHeight = 0;
-+
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
-+        aValue >>= footerOn;
-+        
-+        if( footerOn )
-+        {
-+            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
-+            aValue >>= footerHeight;
-+            bottomMargin -= footerHeight;
-+        }
-+
-+        aValue <<= bottomMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++    sal_uInt32 nTemp = ((static_cast< sal_Int32 >( nBack ) - nFore) * nTrans) / 0x80 + nFore;
++    return static_cast< sal_uInt8 >( nTemp );
 +}
-+
-+double SAL_CALL ScVbaPageSetup::getRightMargin() throw (css::uno::RuntimeException)
++uno::Reference< container::XNameContainer >
++ScVbaInterior::GetAttributeContainer()
 +{
-+    sal_Int32 rightMargin = 0;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")));
-+        aValue >>= rightMargin;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    
-+    return Millimeter::getInPoints( rightMargin );;
++    return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue( rtl::OUString::createFromAscii( "UserDefinedAttributes" ) ), uno::UNO_QUERY_THROW );
 +}
-+
-+void SAL_CALL ScVbaPageSetup::setRightMargin( double margin ) throw (css::uno::RuntimeException)
++sal_Int32
++ScVbaInterior::GetAttributeData( uno::Any aValue )
 +{
-+    sal_Int32 rightMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= rightMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
++    xml::AttributeData aDataValue;
++    if( aValue >>= aDataValue )
 +    {
++        return aDataValue.Value.toInt32();
 +    }
-+
++    return sal_Int32( 0 );
 +}
-+
-+double SAL_CALL ScVbaPageSetup::getLeftMargin() throw (css::uno::RuntimeException)
++uno::Any
++ScVbaInterior::SetAttributeData( sal_Int32 nValue )
 +{
-+    sal_Int32 leftMargin = 0;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")));
-+        aValue >>= leftMargin;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    
-+    return Millimeter::getInPoints( leftMargin );;
++    xml::AttributeData aAttributeData;
++    //aAttributeData.Namespace = rtl::OUString::createFromAscii( "ooo.vba.excel.CellPatten");
++    aAttributeData.Type = rtl::OUString::createFromAscii( "sal_Int32" );
++    aAttributeData.Value = rtl::OUString::valueOf( nValue );
++    return uno::makeAny( aAttributeData );
 +}
-+
-+void SAL_CALL ScVbaPageSetup::setLeftMargin( double margin ) throw (css::uno::RuntimeException)
++uno::Any
++ScVbaInterior::GetUserDefinedAttributes( const rtl::OUString& sName )
 +{
-+    sal_Int32 leftMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= leftMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
++    uno::Reference< container::XNameContainer > xNameContainer( GetAttributeContainer(), uno::UNO_QUERY_THROW );
++    if( xNameContainer->hasByName( sName ) )
 +    {
++        return xNameContainer->getByName( sName );
 +    }
++    return uno::Any();
 +}
-+
-+double SAL_CALL ScVbaPageSetup::getHeaderMargin() throw (css::uno::RuntimeException)
++void
++ScVbaInterior::SetUserDefinedAttributes( const rtl::OUString& sName, const uno::Any& aValue )
 +{
-+    sal_Int32 headerMargin = 0;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
-+        aValue >>= headerMargin;
-+    }
-+    catch( uno::Exception& )
++    if( aValue.hasValue() )
 +    {
++        uno::Reference< container::XNameContainer > xNameContainer( GetAttributeContainer(), uno::UNO_QUERY_THROW );
++        if( xNameContainer->hasByName( sName ) )
++            xNameContainer->removeByName( sName );
++        xNameContainer->insertByName( sName, aValue );
++        m_xProps->setPropertyValue( rtl::OUString::createFromAscii( "UserDefinedAttributes" ), uno::makeAny( xNameContainer ) );
 +    }
-+    
-+    return Millimeter::getInPoints( headerMargin );;
 +}
-+
-+void SAL_CALL ScVbaPageSetup::setHeaderMargin( double margin ) throw (css::uno::RuntimeException)
++// OOo do not support below API
++uno::Any SAL_CALL 
++ScVbaInterior::getPattern() throw (uno::RuntimeException)
 +{
-+    sal_Int32 headerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= headerMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
++    // XlPattern
++    uno::Any aPattern = GetUserDefinedAttributes( PATTERN );
++    if( aPattern.hasValue() )
++        return uno::makeAny( GetAttributeData( aPattern ) );
++    return uno::makeAny( excel::XlPattern::xlPatternNone );
++}
++void SAL_CALL 
++ScVbaInterior::setPattern( const uno::Any& _pattern ) throw (uno::RuntimeException)
++{
++    if( _pattern >>= m_nPattern )
 +    {
++        SetUserDefinedAttributes( PATTERN, SetAttributeData( m_nPattern ) );
++        SetMixedColor();
 +    }
++    else
++        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern index" ), uno::Reference< uno::XInterface >() );
 +}
-+
-+double SAL_CALL ScVbaPageSetup::getFooterMargin() throw (css::uno::RuntimeException)
++Color
++ScVbaInterior::GetBackColor()
 +{
-+    sal_Int32 footerMargin = 0;
-+    try
++    sal_Int32 nColor = 0;
++    Color aBackColor;
++    uno::Any aColor = GetUserDefinedAttributes( BACKCOLOR ); 
++    if( aColor.hasValue() )
 +    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
-+        aValue >>= footerMargin;
++        nColor = GetAttributeData( aColor );
++        aBackColor.SetColor( nColor );
 +    }
-+    catch( uno::Exception& )
++    else
 +    {
++	    uno::Any aAny;
++	    aAny = OORGBToXLRGB( m_xProps->getPropertyValue( BACKCOLOR ) );
++        if( aAny >>= nColor )
++        {
++            nColor = XLRGBToOORGB( nColor );
++            aBackColor.SetColor( nColor );
++            SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( nColor ) );
++        }
 +    }
-+    
-+    return Millimeter::getInPoints( footerMargin );;
++    return aBackColor;
 +}
-+
-+void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::uno::RuntimeException)
++uno::Any SAL_CALL 
++ScVbaInterior::getPatternColor() throw (uno::RuntimeException)
 +{
-+    sal_Int32 footerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= footerMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
++    // 0 is the default color. no filled.
++    uno::Any aPatternColor = GetUserDefinedAttributes( PATTERNCOLOR );
++    if( aPatternColor.hasValue() )
 +    {
++        sal_uInt32 nPatternColor = GetAttributeData( aPatternColor );
++        return uno::makeAny( OORGBToXLRGB( nPatternColor ) );
 +    }
++    return uno::makeAny( sal_Int32( 0 ) );
 +}
-+
-+sal_Int32 SAL_CALL ScVbaPageSetup::getOrientation() throw (css::uno::RuntimeException)
++void SAL_CALL 
++ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::RuntimeException)
 +{
-+    sal_Int32 orientation = excel::XlPageOrientation::xlPortrait;
-+    try
++    sal_Int32 nPattColor = 0;
++    if( _patterncolor >>= nPattColor )
 +    {
-+        sal_Bool isLandscape = sal_False;
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
-+        aValue >>= isLandscape;
-+
-+        if( isLandscape )
-+        {
-+            orientation = excel::XlPageOrientation::xlLandscape;
-+        }
++        SetUserDefinedAttributes( PATTERNCOLOR, SetAttributeData( XLRGBToOORGB( nPattColor ) ) );
++        SetMixedColor();
 +    }
-+    catch( uno::Exception& )
++    else
++        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() );
++}
++uno::Any SAL_CALL 
++ScVbaInterior::getPatternColorIndex() throw (uno::RuntimeException)
++{
++	sal_Int32 nColor = 0;
++	XLRGBToOORGB( getPatternColor() ) >>= nColor; 
++     
++	return uno::makeAny( GetIndexColor( nColor ) );
++}
++void SAL_CALL 
++ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw (uno::RuntimeException)
++{
++    sal_Int32 nColorIndex = 0;
++    if( _patterncolorindex >>= nColorIndex )
 +    {
++        if( nColorIndex == 0 )
++            return;
++        sal_Int32 nPattColor = 0;
++        GetIndexColor( nColorIndex ) >>= nPattColor;
++        setPatternColor( uno::makeAny( OORGBToXLRGB( nPattColor ) ) );
 +    }
-+    return orientation;
++    else
++        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() );
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setOrientation( sal_Int32 orientation ) throw (css::uno::RuntimeException)
-+{
-+    if( ( orientation != excel::XlPageOrientation::xlPortrait ) &&
-+        ( orientation != excel::XlPageOrientation::xlLandscape ) )
-+    {
-+        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+    }
+ rtl::OUString& 
+ ScVbaInterior::getServiceImplName()
+ {
+@@ -135,7 +394,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Interior" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Interior" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbamultipage.hxx
+===================================================================
+--- sc/source/ui/vba/vbamultipage.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbamultipage.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,65 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_MULTIPAGE_HXX
++#define SC_VBA_MULTIPAGE_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/msforms/XMultiPage.hpp>
++#include <com/sun/star/container/XIndexAccess.hpp>
 +
-+    try
-+    {
-+        sal_Bool isLandscape = sal_False;
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
-+        aValue >>= isLandscape;
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++//#include <cppuhelper/implbase2.hxx>
++#include <cppuhelper/implbase1.hxx>
 +
-+        sal_Bool switchOrientation = sal_False;
-+        if(( isLandscape && orientation != excel::XlPageOrientation::xlLandscape ) || 
-+            ( !isLandscape && orientation != excel::XlPageOrientation::xlPortrait ))
-+        {
-+            switchOrientation = sal_True;
-+        }
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XMultiPage > MultiPageImpl_BASE;
 +
-+        if( switchOrientation )
-+        {
-+            aValue <<= !isLandscape;
-+            uno::Any aHeight = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height")));
-+            uno::Any aWidth = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width")));
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")), aValue );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width")),  aHeight );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height")), aWidth );
-+        }
++class ScVbaMultiPage : public MultiPageImpl_BASE
++{
++    css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
++    css::uno::Reference< css::beans::XPropertySet > mxDialogProps;
++public:
++    ScVbaMultiPage( const css::uno::Reference< ov::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, ov::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( sal_Int32 _value ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL Pages( const css::uno::Any& index ) throw (css::uno::RuntimeException);
++
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    // XDefaultProperty
++    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++};
++#endif //SC_VBA_LABEL_HXX
+Index: sc/source/ui/vba/vbawindows.hxx
+===================================================================
+--- sc/source/ui/vba/vbawindows.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbawindows.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,7 +31,7 @@
+ #define SC_VBA_WINDOWS_HXX
+ 
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/excel/XWindows.hpp>
++#include <ooo/vba/excel/XWindows.hpp>
+ 
+ #include <com/sun/star/uno/XComponentContext.hpp>
+  
+@@ -39,12 +39,12 @@
+ #include "vbacollectionimpl.hxx"
+ 
+ 
+-typedef CollTestImplHelper< oo::excel::XWindows > ScVbaWindows_BASE;
++typedef CollTestImplHelper< ov::excel::XWindows > ScVbaWindows_BASE;
+ 
+ class ScVbaWindows : public ScVbaWindows_BASE
+ {
+ public:
+-	ScVbaWindows( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
++	ScVbaWindows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
+ 	virtual ~ScVbaWindows() {}
+ 
+ 	// XEnumerationAccess
+@@ -57,7 +57,7 @@
+ 	// ScVbaCollectionBaseImpl	
+ 	virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); 
+ 
+-	static css::uno::Reference< oo::vba::XCollection > Windows(  const css::uno::Reference< css::uno::XComponentContext >& xContext );
++	static css::uno::Reference< ov::XCollection > Windows(  const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ 
+ 	// XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+Index: sc/source/ui/vba/vbaradiobutton.hxx
+===================================================================
+--- sc/source/ui/vba/vbaradiobutton.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaradiobutton.hxx	(.../cws/npower11)	(revision 266650)
+@@ -29,24 +29,27 @@
+  ************************************************************************/
+ #ifndef SC_VBA_RADIOBUTTON_HXX
+ #define SC_VBA_RADIOBUTTON_HXX
+-#include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/msforms/XRadioButton.hpp>
+-
++#include <ooo/vba/msforms/XRadioButton.hpp>
+ #include "vbacontrol.hxx"
+ #include "vbahelper.hxx"
++#include <cppuhelper/implbase2.hxx>
+ 
+-typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XRadioButton > RadioButtonImpl_BASE;
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XRadioButton, css::script::XDefaultProperty > RadioButtonImpl_BASE;
+ 
+ class ScVbaRadioButton : public RadioButtonImpl_BASE
+ {
+ public:
+-    ScVbaRadioButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+-                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
++    ScVbaRadioButton( const css::uno::Reference< ov::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, ov::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);
+-    virtual sal_Bool SAL_CALL getValue() throw (css::uno::RuntimeException);
+-    virtual void SAL_CALL setValue( sal_Bool _value ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setValue(const com::sun::star::uno::Any&) throw (css::uno::RuntimeException);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    // XDefaultProperty
++    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ 
+ };
+ #endif //SC_VBA_RADIOBUTTON_HXX
+Index: sc/source/ui/vba/vbaaxes.cxx
+===================================================================
+--- sc/source/ui/vba/vbaaxes.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaaxes.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,15 +31,15 @@
+ #include "vbaaxes.hxx"
+ #include "vbaaxis.hxx"
+ #include "vbachart.hxx"
+-#include <org/openoffice/excel/XlAxisType.hpp>
+-#include <org/openoffice/excel/XlAxisGroup.hpp>
+-#include <org/openoffice/excel/XAxis.hpp>
++#include <ooo/vba/excel/XlAxisType.hpp>
++#include <ooo/vba/excel/XlAxisGroup.hpp>
++#include <ooo/vba/excel/XAxis.hpp>
+ #include <map>
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
+-using namespace ::org::openoffice::excel::XlAxisType;
+-using namespace ::org::openoffice::excel::XlAxisGroup;
++using namespace ::ooo::vba;
++using namespace ::ooo::vba::excel::XlAxisType;
++using namespace ::ooo::vba::excel::XlAxisGroup;
+ 
+ // each 'Item' in the Axes collection is  indexed via 2 indexes,  group and type.
+ // We need to 'flatten' this into a single index in order to be able to wrap
+@@ -86,7 +86,7 @@
+ 	}
+ 	else
+ 		throw script::BasicErrorException( rtl::OUString(), NULL, SbERR_METHOD_FAILED, rtl::OUString());
+-	uno::Reference< vba::XHelperInterface > xParent( xChart, uno::UNO_QUERY_THROW );
++	uno::Reference< XHelperInterface > xParent( xChart, uno::UNO_QUERY_THROW );
+ 	return new ScVbaAxis( xParent, xContext, xAxisPropertySet, nType, nAxisGroup);
+ }
+ 
+@@ -146,7 +146,7 @@
+ }
+ 
+ // #FIXME The collection semantics will never work as this object is not yet initialised correctly
+-ScVbaAxes::ScVbaAxes( const uno::Reference< vba::XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< excel::XChart >& xChart ) : ScVbaAxes_BASE( xParent, xContext, createIndexWrapper( xChart, xContext )), moChartParent( xChart )
++ScVbaAxes::ScVbaAxes( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< excel::XChart >& xChart ) : ScVbaAxes_BASE( xParent, xContext, createIndexWrapper( xChart, xContext )), moChartParent( xChart )
+ {
+ }
+ 
+@@ -199,7 +199,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Axes" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Axes" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbachart.cxx
+===================================================================
+--- sc/source/ui/vba/vbachart.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbachart.cxx	(.../cws/npower11)	(revision 266650)
+@@ -40,10 +40,10 @@
+ #include <com/sun/star/chart/ChartSolidType.hpp>
+ #include <com/sun/star/chart/ChartDataRowSource.hpp>
+ #include <com/sun/star/chart/ChartDataCaption.hpp>
+-#include <org/openoffice/excel/XlChartType.hpp>
+-#include <org/openoffice/excel/XlRowCol.hpp>
+-#include <org/openoffice/excel/XlAxisType.hpp>
+-#include <org/openoffice/excel/XlAxisGroup.hpp>
++#include <ooo/vba/excel/XlChartType.hpp>
++#include <ooo/vba/excel/XlRowCol.hpp>
++#include <ooo/vba/excel/XlAxisType.hpp>
++#include <ooo/vba/excel/XlAxisGroup.hpp>
+ 
+ #include <basic/sberrors.hxx>
+ #include "vbachartobject.hxx"
+@@ -52,11 +52,11 @@
+ #include "vbaaxes.hxx"
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
+-using namespace ::org::openoffice::excel::XlChartType;
+-using namespace ::org::openoffice::excel::XlRowCol;
+-using namespace ::org::openoffice::excel::XlAxisType;
+-using namespace ::org::openoffice::excel::XlAxisGroup;
++using namespace ::ooo::vba;
++using namespace ::ooo::vba::excel::XlChartType;
++using namespace ::ooo::vba::excel::XlRowCol;
++using namespace ::ooo::vba::excel::XlAxisType;
++using namespace ::ooo::vba::excel::XlAxisGroup;
+ 
+ const rtl::OUString CHART_NAME( RTL_CONSTASCII_USTRINGPARAM("Name") );
+ // #TODO move this constant to vbaseries.[ch]xx ( when it exists )
+@@ -77,7 +77,7 @@
+ const rtl::OUString HASLEGEND( RTL_CONSTASCII_USTRINGPARAM("HasLegend") );
+ const rtl::OUString DATACAPTION( RTL_CONSTASCII_USTRINGPARAM("DataCaption") );
+ 
+-ScVbaChart::ScVbaChart( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart( _xTableChart )
++ScVbaChart::ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart( _xTableChart )
+ {
+ 	mxChartDocument.set( _xChartComponent, uno::UNO_QUERY_THROW ) ;
+ 	// #TODO is is possible that the XPropertySet interface is not set
+@@ -562,7 +562,7 @@
+ 	// them in the worksheets/sheets collections ), but.....???
+ 	// note: in vba for excel the parent of a Chart sheet is a workbook,
+ 	// e.g. 'ThisWorkbook'
+-	uno::Reference< vba::XHelperInterface > xParent( getParent() );
++	uno::Reference< XHelperInterface > xParent( getParent() );
+ 	ScVbaChartObject* pChartObj = static_cast< ScVbaChartObject* >( xParent.get() );
+ 	if ( pChartObj )
+ 		pChartObj->Activate();
+@@ -571,7 +571,7 @@
+ }
+ 
+ void SAL_CALL 
+-ScVbaChart::setSourceData( const css::uno::Reference< ::org::openoffice::excel::XRange >& _xCalcRange, const css::uno::Any& _aPlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++ScVbaChart::setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange >& _xCalcRange, const css::uno::Any& _aPlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+ {
+ 	try
+ 	{
+@@ -1156,7 +1156,7 @@
+ 
+ 
+ uno::Reference< excel::XDataLabels > 
+-ScVbaChart::DataLabels( const uno::Reference< oo::excel::XSeries > /*_oSeries*/ ) throw ( css::script::BasicErrorException )
++ScVbaChart::DataLabels( const uno::Reference< ov::excel::XSeries > /*_oSeries*/ ) throw ( css::script::BasicErrorException )
+ {
+ 	if ( true )
+ 		throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() );
+@@ -1249,7 +1249,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Chart" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Chart" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbaworksheets.hxx
+===================================================================
+--- sc/source/ui/vba/vbaworksheets.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaworksheets.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,18 +32,18 @@
+ 
+ #include <cppuhelper/implbase1.hxx>
+ 
+-#include <org/openoffice/excel/XWorksheets.hpp>
++#include <ooo/vba/excel/XWorksheets.hpp>
+ #include <com/sun/star/sheet/XSpreadsheets.hpp>
+ #include <com/sun/star/container/XEnumerationAccess.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+-#include <org/openoffice/vba/XGlobals.hpp>
++#include <ooo/vba/XGlobals.hpp>
+  
+ #include "vbacollectionimpl.hxx"
+ 
+ class ScModelObj;
+ 
+ 
+-typedef CollTestImplHelper< oo::excel::XWorksheets > ScVbaWorksheets_BASE;
++typedef CollTestImplHelper< ov::excel::XWorksheets > ScVbaWorksheets_BASE;
+ 
+ class ScVbaWorksheets : public ScVbaWorksheets_BASE
+ {
+@@ -53,8 +53,8 @@
+ 	// ScVbaWorksheets_BASE
+ 	virtual css::uno::Any getItemByStringIndex( const rtl::OUString& sIndex ) throw (css::uno::RuntimeException);
+ public:
+-	ScVbaWorksheets( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, const css::uno::Reference< css::frame::XModel >& xModel );
+-	ScVbaWorksheets( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum,  const css::uno::Reference< css::frame::XModel >& xModel );
++	ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, const css::uno::Reference< css::frame::XModel >& xModel );
++	ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum,  const css::uno::Reference< css::frame::XModel >& xModel );
+ 	virtual ~ScVbaWorksheets() {}
+ 
+ 	bool isSelectedSheets();
+Index: sc/source/ui/vba/vbatextframe.hxx
+===================================================================
+--- sc/source/ui/vba/vbatextframe.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbatextframe.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,18 +31,18 @@
+ #define SC_VBA_TEXTFRAME_HXX
+ #include <com/sun/star/drawing/XShape.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+-#include <org/openoffice/excel/XCharacters.hpp>
+-#include <org/openoffice/excel/XTextFrame.hpp>
++#include <ooo/vba/excel/XCharacters.hpp>
++#include <ooo/vba/excel/XTextFrame.hpp>
+ 
+ #include "vbahelperinterface.hxx"
+ #include "vbapalette.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XTextFrame > ScVbaTextFrame_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XTextFrame > ScVbaTextFrame_BASE;
+ 
+ class ScVbaTextFrame : public ScVbaTextFrame_BASE
+ {
+ private:
+-    css::uno::Reference< oo::excel::XCharacters > m_xCharacters;
++    css::uno::Reference< ov::excel::XCharacters > m_xCharacters;
+     css::uno::Reference< css::drawing::XShape > m_xShape;
+     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
+ protected:
+@@ -52,7 +52,7 @@
+     sal_Int32 getMargin( rtl::OUString sMarginType );
+     void setMargin( rtl::OUString sMarginType, float fMargin );
+ public:
+-    ScVbaTextFrame( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext , css::uno::Reference< css::drawing::XShape > xShape);
++    ScVbaTextFrame( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext , css::uno::Reference< css::drawing::XShape > xShape);
+     virtual ~ScVbaTextFrame() {}
+     // Attributes
+     virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException);
+@@ -67,7 +67,7 @@
+     virtual void SAL_CALL setMarginRight( float _marginright ) throw (css::uno::RuntimeException);
+ 
+     // Methods
+-    virtual css::uno::Reference< oo::excel::XCharacters > SAL_CALL Characters(  ) throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL Characters(  ) throw (css::uno::RuntimeException);
+ 
+ };
+ 
+Index: sc/source/ui/vba/vbadialog.hxx
+===================================================================
+--- sc/source/ui/vba/vbadialog.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbadialog.hxx	(.../cws/npower11)	(revision 266650)
+@@ -33,20 +33,20 @@
+ #include <cppuhelper/implbase1.hxx>
+ 
+ #include <com/sun/star/uno/XComponentContext.hpp>
+-#include <org/openoffice/vba/XGlobals.hpp>
+-#include <org/openoffice/excel/XApplication.hpp>
+-#include <org/openoffice/excel/XDialog.hpp>
++#include <ooo/vba/XGlobals.hpp>
++#include <ooo/vba/excel/XApplication.hpp>
++#include <ooo/vba/excel/XDialog.hpp>
+  
+ #include "vbahelperinterface.hxx"
+ #include "vbadialog.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XDialog > ScVbaDialog_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XDialog > ScVbaDialog_BASE;
+ 
+ class ScVbaDialog : public ScVbaDialog_BASE
+ {
+ 	sal_Int32 mnIndex;
+ public:
+-	ScVbaDialog( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, sal_Int32 nIndex, const css::uno::Reference< css::uno::XComponentContext > xContext ):ScVbaDialog_BASE( xParent, xContext ), mnIndex( nIndex ) {}
++	ScVbaDialog( const css::uno::Reference< ov::XHelperInterface >& xParent, sal_Int32 nIndex, const css::uno::Reference< css::uno::XComponentContext > xContext ):ScVbaDialog_BASE( xParent, xContext ), mnIndex( nIndex ) {}
+ 	virtual ~ScVbaDialog() {}
+ 
+ 	// Methods
+Index: sc/source/ui/vba/vbapages.hxx
+===================================================================
+--- sc/source/ui/vba/vbapages.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbapages.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,64 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_PAGES_HXX
++#define SC_VBA_PAGES_HXX
 +
-+        if( isLandscape )
-+        {
-+            orientation = excel::XlPageOrientation::xlLandscape;
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++#include <ooo/vba/office/MsoShapeType.hpp>
++#include <com/sun/star/lang/XEventListener.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <ooo/vba/msforms/XPages.hpp>
++#include <cppuhelper/implbase2.hxx>
++#include <cppuhelper/implbase1.hxx>
 +
-+uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException)
-+{
-+    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")));
-+}
++#include "vbacollectionimpl.hxx"
++typedef CollTestImplHelper< 
++ov::msforms::XPages > ScVbaPages_BASE;
 +
-+void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException)
++class ScVbaPages : public ScVbaPages_BASE
 +{
-+    USHORT scaleToPageY = 0;
-+    try
-+    {
-+        sal_Bool aValue;
-+        if( fitToPagesTall.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesTall >>= aValue))
-+        {
-+            fitToPagesTall >>= scaleToPageY;
-+        }
-+
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( scaleToPageY ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++protected:
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++public:
++    ScVbaPages( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xPages ) throw ( css::lang::IllegalArgumentException );
++    virtual ~ScVbaPages() {}
++        // XEnumerationAccess
++    virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
++     // ScVbaPages_BASE
++     virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
 +
-+uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeException)
-+{
-+    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")));
-+}
++};
++#endif//SC_VBA_SHAPE_HXX
+Index: sc/source/ui/vba/vbahelperinterface.hxx
+===================================================================
+--- sc/source/ui/vba/vbahelperinterface.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbahelperinterface.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,7 +31,7 @@
+ #define SC_VBA_HELPERINTERFACE_HXX
+ 
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/vba/XHelperInterface.hpp>
++#include <ooo/vba/XHelperInterface.hpp>
+ #include "vbahelper.hxx"
+ #include "vbaglobals.hxx"
+ 
+@@ -61,17 +61,17 @@
+ //     virtual OUString getName();  
+ // }
+ //
+-const ::rtl::OUString sHelperServiceName( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.HelperServiceBase" ) );
++const ::rtl::OUString sHelperServiceName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.HelperServiceBase" ) );
+ 
+ template< typename Ifc1 >
+ class InheritedHelperInterfaceImpl : public Ifc1
+ {
+ protected: 
+-	css::uno::WeakReference< oo::vba::XHelperInterface > mxParent;
++	css::uno::WeakReference< ov::XHelperInterface > mxParent;
+ 	css::uno::Reference< css::uno::XComponentContext > mxContext;
+ public:
+ 	InheritedHelperInterfaceImpl() {}
+-	InheritedHelperInterfaceImpl( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : mxParent( xParent ), mxContext( xContext ) {}
++	InheritedHelperInterfaceImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : mxParent( xParent ), mxContext( xContext ) {}
+ 	virtual rtl::OUString& getServiceImplName() = 0;
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames() = 0;
+ 
+@@ -80,7 +80,7 @@
+ 	{
+ 		return 0x53756E4F;
+ 	}
+-	virtual css::uno::Reference< oo::vba::XHelperInterface > SAL_CALL getParent(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return mxParent; }
++	virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return mxParent; }
+ 	
+ 	virtual css::uno::Any SAL_CALL Application(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return  css::uno::makeAny( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication() ); }
+ 
+@@ -110,7 +110,7 @@
+ {
+ typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > > Base;
+ public:
+-	InheritedHelperInterfaceImpl1< Ifc1 > ( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}	
++	InheritedHelperInterfaceImpl1< Ifc1 > ( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}	
+ 
+ };
+ #endif
+Index: sc/source/ui/vba/vbaapplication.hxx
+===================================================================
+--- sc/source/ui/vba/vbaapplication.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaapplication.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,13 +31,13 @@
+ #define SC_VBA_APPLICATION_HXX
+ 
+ 
+-#include <org/openoffice/excel/XWorksheetFunction.hpp>
+-#include <org/openoffice/excel/XApplication.hpp>
++#include <ooo/vba/excel/XWorksheetFunction.hpp>
++#include <ooo/vba/excel/XApplication.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ 
+ #include "vbahelperinterface.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XApplication > ScVbaApplication_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XApplication > ScVbaApplication_BASE;
+ 
+ class ScVbaApplication : public ScVbaApplication_BASE
+ {
+@@ -49,7 +49,7 @@
+ 	virtual ~ScVbaApplication();
+ 
+ 	// XHelperInterface ( parent is itself )
+-	virtual css::uno::Reference< oo::vba::XHelperInterface > SAL_CALL getParent(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return this; }
++	virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return this; }
+ 
+ 	// XApplication
+ 	virtual ::rtl::OUString SAL_CALL PathSeparator(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+@@ -64,10 +64,10 @@
+ 	virtual ::sal_Int32 SAL_CALL getCalculation() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setCalculation( ::sal_Int32 _calculation ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL getSelection() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getActiveCell() throw ( css::uno::RuntimeException);
+- virtual css::uno::Reference< oo::excel::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
+- virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getActiveCell() throw ( css::uno::RuntimeException);
++ virtual css::uno::Reference< ov::excel::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
++ virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
+ 	virtual sal_Bool SAL_CALL getScreenUpdating() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException);
+ 	virtual sal_Bool SAL_CALL getDisplayStatusBar() throw (css::uno::RuntimeException);
+@@ -75,7 +75,9 @@
+ 	virtual ::sal_Bool SAL_CALL getDisplayFormulaBar() throw ( css::uno::RuntimeException );
+ 	virtual void SAL_CALL setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException );
+ 
+-	virtual css::uno::Reference< oo::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Workbooks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Worksheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL WorksheetFunction( ) throw (css::uno::RuntimeException);
+@@ -94,10 +96,11 @@
+ 	virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL wait( double time ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL Names( ) throw ( css::uno::RuntimeException );
++	virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw ( css::uno::RuntimeException );
+ 	virtual void SAL_CALL GoTo( const css::uno::Any& Reference, const css::uno::Any& Scroll ) throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Calculate() throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< oo::excel::XRange >& Arg1, const css::uno::Reference< oo::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorEx
 ception, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorEx
 ception, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorExcept
 ion, css::uno::RuntimeException);
+ 	virtual void SAL_CALL Volatile( const css::uno::Any& Volatile ) throw (css::uno::RuntimeException );
+ 	virtual void SAL_CALL DoEvents() throw (css::uno::RuntimeException);
+ 	// XHelperInterface
+Index: sc/source/ui/vba/vbapagebreaks.hxx
+===================================================================
+--- sc/source/ui/vba/vbapagebreaks.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbapagebreaks.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,71 @@
++/*************************************************************************
++ *
++ * 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_PAGEBREAKS_HXX
++#define SC_VBA_PAGEBREAKS_HXX
 +
-+void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException)
-+{
-+    USHORT scaleToPageX = 0;
-+    try
-+    {
-+        sal_Bool aValue = sal_False;
-+        if( fitToPagesWide.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesWide >>= aValue))
-+        {
-+            fitToPagesWide >>= scaleToPageX;
-+        }
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/excel/XHPageBreaks.hpp>
++#include <ooo/vba/excel/XHPageBreak.hpp>
++#include <ooo/vba/excel/XRange.hpp>
++#include <com/sun/star/uno/XComponentContext.hpp>
++#include <com/sun/star/script/BasicErrorException.hpp>
++#include <com/sun/star/sheet/XSheetPageBreak.hpp>
++#include <com/sun/star/sheet/TablePageBreakData.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <com/sun/star/container/XIndexAccess.hpp>
++#include <com/sun/star/table/XColumnRowRange.hpp>
++#include "vbahelperinterface.hxx"
++#include "vbacollectionimpl.hxx"
 +
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( scaleToPageX ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++typedef CollTestImplHelper< ov::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
 +
-+uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException)
++class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE
 +{
-+    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")));
-+}
++	css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak;
++public:
++	ScVbaHPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, 
++                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
++            		css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak) throw (css::uno::RuntimeException);
++	virtual ~ScVbaHPageBreaks(){}
 +
-+void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException)
-+{
-+    USHORT pageScale = 0;
-+    try
-+    {
-+		if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN )
-+		{
-+		    sal_Bool aValue = sal_False;
-+		    zoom >>= aValue;
-+		    if( aValue )
-+		    {
-+                DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+		    }
-+		}
-+        else
-+        {
-+            zoom >>= pageScale;
-+            if(( pageScale < ZOOM_IN )||( pageScale > ZOOM_MAX ))
-+            {
-+                DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+            }
-+        }
++    // XHPageBreaks 
++    virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
 +
-+        // these only exist in S08
-+        USHORT nScale = 0;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPages")), uno::makeAny( nScale ));
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( nScale ));
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( nScale ));
-+    }
-+    catch( beans::UnknownPropertyException& )
-+    {
-+        if( pageScale == 0 )
-+        {
-+            DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++	// XEnumerationAccess
++	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);	
++	virtual css::uno::Any createCollectionObject(const css::uno::Any&);
 +
-+    mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")), uno::makeAny( pageScale ));
-+}
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeException)
-+{
-+    rtl::OUString leftHeader;
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
-+        if( xHeaderContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
-+            leftHeader = xText->getString();
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++#endif
+Index: sc/source/ui/vba/vbaspinbutton.hxx
+===================================================================
+--- sc/source/ui/vba/vbaspinbutton.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaspinbutton.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,61 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_SPINBUTTON_HXX
++#define SC_VBA_SPINBUTTON_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/msforms/XSpinButton.hpp>
 +
-+    return leftHeader;
-+}
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+void SAL_CALL ScVbaPageSetup::setLeftHeader( const rtl::OUString& leftHeader) throw (css::uno::RuntimeException)
-+{
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
-+        if( xHeaderContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
-+            xText->setString( leftHeader );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) ); 
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XSpinButton > SpinButtonImpl_BASE;
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getCenterHeader() throw (css::uno::RuntimeException)
++class ScVbaSpinButton : public SpinButtonImpl_BASE
 +{
-+    rtl::OUString centerHeader;
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
-+        if( xHeaderContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
-+            centerHeader = xText->getString();
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++public:
++    ScVbaSpinButton( const css::uno::Reference< ov::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, ov::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);
++    virtual ::sal_Int32 SAL_CALL getMax() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setMax( ::sal_Int32 _max ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getMin() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setMin( ::sal_Int32 _min ) throw (css::uno::RuntimeException);
 +
-+    return centerHeader;
-+}
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif //SC_VBA_SPINBUTTON_HXX
+Index: sc/source/ui/vba/vbahyperlink.hxx
+===================================================================
+--- sc/source/ui/vba/vbahyperlink.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbahyperlink.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,72 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_HYPERLINK_HXX
++#define SC_VBA_HYPERLINK_HXX
 +
-+void SAL_CALL ScVbaPageSetup::setCenterHeader( const rtl::OUString& centerHeader) throw (css::uno::RuntimeException)
-+{
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
-+        if( xHeaderContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
-+            xText->setString( centerHeader );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) ); 
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++#include <ooo/vba/excel/XHyperlink.hpp>
++#include <com/sun/star/table/XCell.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <ooo/vba/excel/XRange.hpp>
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getRightHeader() throw (css::uno::RuntimeException)
-+{
-+    rtl::OUString rightHeader;
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
-+        if( xHeaderContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xHeaderContent->getRightText();
-+            rightHeader = xText->getString();
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++#include "vbahelperinterface.hxx"
 +
-+    return rightHeader;
-+}
++typedef InheritedHelperInterfaceImpl1< ov::excel::XHyperlink > HyperlinkImpl_BASE;
 +
-+void SAL_CALL ScVbaPageSetup::setRightHeader( const rtl::OUString& rightHeader) throw (css::uno::RuntimeException)
++class ScVbaHyperlink : public HyperlinkImpl_BASE 
 +{
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
-+        if( xHeaderContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xHeaderContent->getRightText();
-+            xText->setString( rightHeader );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) ); 
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++	css::uno::Reference< css::table::XCell > mxCell;
++	css::uno::Reference< css::beans::XPropertySet > mxTextField;
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getLeftFooter() throw (css::uno::RuntimeException)
-+{
-+    rtl::OUString leftFooter;
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
-+        if( xFooterContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xFooterContent->getLeftText();
-+            leftFooter = xText->getString();
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++public:
++	ScVbaHyperlink( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ) throw ( css::lang::IllegalArgumentException );
++	virtual ~ScVbaHyperlink();
++
++	// Attributes
++	virtual ::rtl::OUString SAL_CALL getAddress() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setAddress( const ::rtl::OUString &rAddress ) throw (css::uno::RuntimeException);
++	virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setName( const ::rtl::OUString &rName ) throw (css::uno::RuntimeException);
++	virtual ::rtl::OUString SAL_CALL getTextToDisplay() throw (css::uno::RuntimeException);
++	virtual void SAL_CALL setTextToDisplay( const ::rtl::OUString &rTextToDisplay ) throw (css::uno::RuntimeException);
++	
++	// Methods
++	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range() throw (css::uno::RuntimeException);
++
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif /* SC_VBA_HYPERLINK_HXX */
++
+Index: sc/source/ui/vba/vbafont.hxx
+===================================================================
+--- sc/source/ui/vba/vbafont.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbafont.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,23 +32,25 @@
+ 
+ #include <cppuhelper/implbase1.hxx>
+ 
+-#include <org/openoffice/excel/XFont.hpp>
++#include <ooo/vba/excel/XFont.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ #include "vbahelperinterface.hxx"
+ #include "vbapalette.hxx"
+ 
+ class ScTableSheetsObj;
++class ScCellRangeObj;
+ 
+-typedef  InheritedHelperInterfaceImpl1< oo::excel::XFont > ScVbaFont_BASE;
++typedef  InheritedHelperInterfaceImpl1< ov::excel::XFont > ScVbaFont_BASE;
+ 
+ class ScVbaFont : public ScVbaFont_BASE
+ {
+     css::uno::Reference< css::beans::XPropertySet > mxFont;
+     ScVbaPalette mPalette;
+-    SfxItemSet* mpDataSet;
++    ScCellRangeObj* mpRangeObj;
++    SfxItemSet*  GetDataSet();
+ public:
+-	ScVbaFont( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, css::uno::Reference< css::beans::XPropertySet > xPropertySet, SfxItemSet* pDataSet = NULL ) throw ( css::uno::RuntimeException );
+-	virtual ~ScVbaFont() {}
++	ScVbaFont( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, css::uno::Reference< css::beans::XPropertySet > xPropertySet, ScCellRangeObj* pRangeObj = NULL ) throw ( css::uno::RuntimeException );
++	virtual ~ScVbaFont();// {}
+ 
+ 	// Attributes
+     virtual css::uno::Any SAL_CALL getSize() throw (css::uno::RuntimeException);
+@@ -79,6 +81,8 @@
+     virtual void SAL_CALL setName( const css::uno::Any& _name ) throw (css::uno::RuntimeException);
+     virtual css::uno::Any SAL_CALL getColor() throw (css::uno::RuntimeException) ;
+     virtual void SAL_CALL setColor( const css::uno::Any& _color ) throw (css::uno::RuntimeException) ;
++    virtual css::uno::Any SAL_CALL getOutlineFont() throw (css::uno::RuntimeException) ;
++    virtual void SAL_CALL setOutlineFont( const css::uno::Any& _outlinefont ) throw (css::uno::RuntimeException) ;
+     // XHelperInterface
+     virtual rtl::OUString& getServiceImplName();
+     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+Index: sc/source/ui/vba/vbaassistant.hxx
+===================================================================
+--- sc/source/ui/vba/vbaassistant.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaassistant.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,78 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_ASSISTANT_HXX
++#define SC_VBA_ASSISTANT_HXX
 +
-+    return leftFooter;
-+}
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/XAssistant.hpp>
 +
-+void SAL_CALL ScVbaPageSetup::setLeftFooter( const rtl::OUString& leftFooter) throw (css::uno::RuntimeException)
-+{
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
-+        if( xFooterContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xFooterContent->getLeftText();
-+            xText->setString( leftFooter );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) ); 
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++#include <sfx2/sfxhelp.hxx>
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getCenterFooter() throw (css::uno::RuntimeException)
-+{
-+    rtl::OUString centerFooter;
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
-+        if( xFooterContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xFooterContent->getCenterText();
-+            centerFooter = xText->getString();
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++#include "vbahelper.hxx"
++#include "vbahelperinterface.hxx"
 +
-+    return centerFooter;
-+}
++typedef ::cppu::WeakImplHelper1< ov::XAssistant > Assistant;
++typedef InheritedHelperInterfaceImpl< Assistant > ScVbaAssistantImpl_BASE;
 +
-+void SAL_CALL ScVbaPageSetup::setCenterFooter( const rtl::OUString& centerFooter) throw (css::uno::RuntimeException)
++class ScVbaAssistant : public ScVbaAssistantImpl_BASE
 +{
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
-+        if( xFooterContent.is() )
-+        {
-+            uno::Reference< text::XText > xText = xFooterContent->getCenterText();
-+            xText->setString( centerFooter );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) ); 
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++private:
++    sal_Bool        m_bIsVisible;
++    sal_Int32       m_nPointsLeft;
++    sal_Int32       m_nPointsTop;
++    rtl::OUString   m_sName;
++    sal_Int32       m_nAnimation;
++public:
++    ScVbaAssistant( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext );
++    virtual ~ScVbaAssistant();
++    // XAssistant 
++    virtual sal_Bool SAL_CALL getOn() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setOn( sal_Bool _on ) throw (css::uno::RuntimeException);
++    virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getTop() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setTop( ::sal_Int32 _top ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getLeft() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setLeft( ::sal_Int32 _left ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getAnimation() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setAnimation( ::sal_Int32 _animation ) throw (css::uno::RuntimeException);
 +
-+}
++    virtual ::rtl::OUString SAL_CALL Name(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getRightFooter() throw (css::uno::RuntimeException)
-+{
-+    rtl::OUString rightFooter;
-+    try
-+    {
-+        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
-+        if( xFooterContent.is() )
++#endif//SC_VBA_ASSISTANT_HXX
+Index: sc/source/ui/vba/vbaoutline.cxx
+===================================================================
+--- sc/source/ui/vba/vbaoutline.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaoutline.cxx	(.../cws/npower11)	(revision 266650)
+@@ -29,7 +29,7 @@
+  ************************************************************************/
+ #include "vbaoutline.hxx"
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+ void
+ ScVbaOutline::ShowLevels( const uno::Any& RowLevels, const uno::Any& ColumnLevels ) throw (uno::RuntimeException) 
+@@ -62,7 +62,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Outline" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Outline" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbaname.cxx
+===================================================================
+--- sc/source/ui/vba/vbaname.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaname.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,6 +31,7 @@
+ 
+ #include <com/sun/star/table/XCellRange.hpp>
+ #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
++#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
+ 
+ #include "vbaname.hxx"
+ #include "vbarange.hxx"
+@@ -41,10 +42,10 @@
+ #include "tabvwsh.hxx"
+ #include "viewdata.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+-ScVbaName::ScVbaName(const css::uno::Reference< oo::vba::XHelperInterface >& xParent, 
++ScVbaName::ScVbaName(const css::uno::Reference< ov::XHelperInterface >& xParent, 
+ 			const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ 			const css::uno::Reference< css::sheet::XNamedRange >& xName,
+ 			const css::uno::Reference< css::sheet::XNamedRanges >& xNames,
+@@ -60,7 +61,7 @@
+ {
+ }
+ 
+-css::uno::Reference< oo::excel::XWorksheet >
++css::uno::Reference< ov::excel::XWorksheet >
+ ScVbaName::getWorkSheet() throw (css::uno::RuntimeException)
+ {
+ 	return ScVbaGlobals::getGlobalsImpl( mxContext )->getActiveSheet();
+@@ -110,17 +111,37 @@
+ {
+ 	::rtl::OUString sValue = mxNamedRange->getContent();
+ 	::rtl::OUString sSheetName = getWorkSheet()->getName();
+-	if ( sValue.toChar() == '$' )
++    ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( ";" );
++    ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( "," );
++    ::rtl::OUString sResult;
++    sal_Int32 nFrom = 0;
++    sal_Int32 nTo = 0;
++    nTo = sValue.indexOf( sSegmentation, nFrom );
++    while ( nTo != -1 )
+ 	{
+-		::rtl::OUString sTmp = sValue.copy(1);
+-		sValue = sTmp;
++        ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
++        if ( sTmpValue.toChar() == '$' )
 +        {
-+            uno::Reference< text::XText > xText = xFooterContent->getRightText();
-+            rightFooter = xText->getString();
++            ::rtl::OUString sTmp = sTmpValue.copy( 1 );
++            sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
++            sResult += sTmp; 
++            sResult += sNewSegmentation;
 +        }
++        nFrom = nTo + 1;
++        nTo = sValue.indexOf( sSegmentation, nFrom );
 +    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+
-+    return rightFooter;
-+}
-+
-+void SAL_CALL ScVbaPageSetup::setRightFooter( const rtl::OUString& rightFooter) throw (css::uno::RuntimeException)
-+{
-+    try
++    ::rtl::OUString sTmpValue = sValue.copy( nFrom );
++	if ( sTmpValue.toChar() == '$' )
++	{
++		::rtl::OUString sTmp = sTmpValue.copy(1);
++        sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
++		sResult += sTmp;
+ 	}
+-	sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
+-	if (sValue.indexOf('=') != 0)
++	if (sResult.indexOf('=') != 0)
+ 	{
+-		sValue = ::rtl::OUString::createFromAscii("=") + sValue;
++		sResult = ::rtl::OUString::createFromAscii("=") + sResult;
+ 	}
+-	return sValue;
++	return sResult;
+ }
+ 
+ void 
+@@ -128,17 +149,38 @@
+ {
+ 	::rtl::OUString sSheetName = getWorkSheet()->getName();
+ 	::rtl::OUString sValue = rValue;
++    ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( "," );
++    ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( ";" );
++    ::rtl::OUString sResult;
++    sal_Int32 nFrom = 0;
++    sal_Int32 nTo = 0;
+ 	if (sValue.indexOf('=') == 0)
+ 	{
+ 		::rtl::OUString sTmp = sValue.copy(1);
+ 		sValue = sTmp;
+ 	}
+-	if (sValue.copy(0, sSheetName.getLength()).equals(sSheetName))
++    nTo = sValue.indexOf( sSegmentation, nFrom );
++    while ( nTo != -1 )
 +    {
-+        uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
-+        if( xFooterContent.is() )
++        ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
++        sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
++        if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
 +        {
-+            uno::Reference< text::XText > xText = xFooterContent->getRightText();
-+            xText->setString( rightFooter );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) ); 
++            sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
 +        }
++        sTmpValue += sNewSegmentation;
++        sResult += sTmpValue;
++        nFrom = nTo + 1;
++        nTo = sValue.indexOf( sSegmentation, nFrom );
 +    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
-+
-+sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
-+{
-+    sal_Int32 order = excel::XlOrder::xlDownThenOver;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")));
-+        sal_Bool bPrintDownFirst = sal_False;
-+        aValue >>= bPrintDownFirst;
-+        if( !bPrintDownFirst )
-+            order = excel::XlOrder::xlOverThenDown;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+
-+    return order;
-+}
++    ::rtl::OUString sTmpValue = sValue.copy( nFrom );
++	sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
++	if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
+ 	{
+-		sValue = ::rtl::OUString::createFromAscii("$") + sSheetName;
++		sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
+ 	}
+-	sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
+-	mxNamedRange->setContent(sValue);
++    sResult += sTmpValue;
++	mxNamedRange->setContent(sResult);
+ }
+ 
+ ::rtl::OUString 
+@@ -189,15 +231,15 @@
+ 	setRefersTo( rRefersTo );
+ }
+ 
+-css::uno::Reference< oo::excel::XRange >
++css::uno::Reference< ov::excel::XRange >
+ ScVbaName::getRefersToRange() throw (css::uno::RuntimeException)
+ {
+-	css::uno::Reference< oo::excel::XRange > xRange;
++    uno::Reference< ov::excel::XRange > xRange = ScVbaRange::getRangeObjectForName( mxContext, mxNamedRange->getName(), getDocShell( mxModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
+ 	return xRange;
+ }
+ 
+ void
+-ScVbaName::setRefersToRange( const css::uno::Reference< oo::excel::XRange > /*rRange*/ ) throw (css::uno::RuntimeException)
++ScVbaName::setRefersToRange( const css::uno::Reference< ov::excel::XRange > /*rRange*/ ) throw (css::uno::RuntimeException)
+ {
+ }
+ 
+@@ -221,7 +263,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Name" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Name" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbabutton.hxx
+===================================================================
+--- sc/source/ui/vba/vbabutton.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbabutton.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,20 +30,22 @@
+ #ifndef SC_VBA_BUTTON_HXX
+ #define SC_VBA_BUTTON_HXX
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/msforms/XButton.hpp>
++#include <ooo/vba/msforms/XButton.hpp>
+ 
+ #include "vbacontrol.hxx"
+ #include "vbahelper.hxx"
+ 
+-typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XButton > ButtonImpl_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XButton > ButtonImpl_BASE;
+ 
+ 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< ov::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, ov::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);
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
+ #endif //SC_VBA_BUTTON_HXX
+Index: sc/source/ui/vba/vbaworkbooks.cxx
+===================================================================
+--- sc/source/ui/vba/vbaworkbooks.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaworkbooks.cxx	(.../cws/npower11)	(revision 266650)
+@@ -60,7 +60,7 @@
+ 
+ #include <hash_map>
+ #include <osl/file.hxx>
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ const sal_Int16 CUSTOM_CHAR = 5;
+@@ -81,7 +81,7 @@
+ 	if( !xModel.is() )
+ 		return uno::Any();
+ 	
+-	ScVbaWorkbook *pWb = new ScVbaWorkbook(  uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
++	ScVbaWorkbook *pWb = new ScVbaWorkbook(  uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
+ 	return uno::Any( uno::Reference< excel::XWorkbook > (pWb) );
+ }
+ 
+@@ -238,7 +238,7 @@
+ 
+ };
+ 
+-ScVbaWorkbooks::ScVbaWorkbooks( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext ) : ScVbaWorkbooks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new WorkBooksAccessImpl( xContext ) ) )
++ScVbaWorkbooks::ScVbaWorkbooks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext ) : ScVbaWorkbooks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new WorkBooksAccessImpl( xContext ) ) )
+ {
+ }
+ // XEnumerationAccess
+@@ -459,7 +459,7 @@
+ 	if ( sNames.getLength() == 0 )
+ 	{
+ 		sNames.realloc( 1 );
+-		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbooks") );
++		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Workbooks") );
+ 	}
+ 	return sNames;
+ }
+Index: sc/source/ui/vba/vbashaperange.hxx
+===================================================================
+--- sc/source/ui/vba/vbashaperange.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbashaperange.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,11 +31,11 @@
+ #define SC_VBA_SHAPERANGE_HXX
+ 
+ #include <com/sun/star/drawing/XShapes.hpp>
+-#include <org/openoffice/msforms/XShapeRange.hpp>
++#include <ooo/vba/msforms/XShapeRange.hpp>
+ 
+ #include "vbacollectionimpl.hxx"
+ 
+-typedef CollTestImplHelper< oo::msforms::XShapeRange > ScVbaShapeRange_BASE;
++typedef CollTestImplHelper< ov::msforms::XShapeRange > ScVbaShapeRange_BASE;
+ 
+ class ScVbaShapeRange : public ScVbaShapeRange_BASE
+ {
+@@ -48,11 +48,11 @@
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ 	css::uno::Reference< css::drawing::XShapes > getShapes() throw (css::uno::RuntimeException) ;
+ public:
+-    ScVbaShapeRange( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::drawing::XDrawPage>& xDrawShape );
++    ScVbaShapeRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::drawing::XDrawPage>& xDrawShape );
+ 
+     // Methods
+     virtual void SAL_CALL Select(  ) throw (css::uno::RuntimeException);
+-    virtual css::uno::Reference< ::org::openoffice::msforms::XShape > SAL_CALL Group() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ::ooo::vba::msforms::XShape > SAL_CALL Group() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL IncrementRotation( double Increment ) throw (css::uno::RuntimeException);
+     virtual void SAL_CALL IncrementLeft( double Increment ) throw (css::uno::RuntimeException) ;
+     virtual void SAL_CALL IncrementTop( double Increment ) throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbacomments.cxx
+===================================================================
+--- sc/source/ui/vba/vbacomments.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacomments.cxx	(.../cws/npower11)	(revision 266650)
+@@ -34,7 +34,7 @@
+ 
+ #include "vbaglobals.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ uno::Any AnnotationToComment( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext )
+@@ -44,7 +44,7 @@
+ 	uno::Reference< table::XCellRange > xCellRange( xChild->getParent(), uno::UNO_QUERY_THROW );
+ 
+ 	// #FIXME needs to find the correct Parent
+-	return uno::makeAny( uno::Reference< excel::XComment > ( new ScVbaComment( uno::Reference< vba::XHelperInterface >(), xContext, xCellRange ) ) );
++	return uno::makeAny( uno::Reference< excel::XComment > ( new ScVbaComment( uno::Reference< XHelperInterface >(), xContext, xCellRange ) ) );
+ }
+ 
+ class CommentEnumeration : public EnumerationHelperImpl
+@@ -59,7 +59,7 @@
+ 
+ };
+ 
+-ScVbaComments::ScVbaComments( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  )
++ScVbaComments::ScVbaComments( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  )
+ : ScVbaComments_BASE( xParent, xContext, xIndexAccess )
+ {
+ }
+@@ -100,7 +100,7 @@
+ 	if ( sNames.getLength() == 0 )
+ 	{
+ 		sNames.realloc( 1 );
+-		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Comments") );
++		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Comments") );
+ 	}
+ 	return sNames;
+ }
+Index: sc/source/ui/vba/vbadialogs.hxx
+===================================================================
+--- sc/source/ui/vba/vbadialogs.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbadialogs.hxx	(.../cws/npower11)	(revision 266650)
+@@ -33,18 +33,18 @@
+ #include <cppuhelper/implbase1.hxx>
+ 
+ #include <com/sun/star/uno/XComponentContext.hpp>
+-#include <org/openoffice/excel/XDialogs.hpp>
+-#include <org/openoffice/vba/XCollection.hpp>
++#include <ooo/vba/excel/XDialogs.hpp>
++#include <ooo/vba/XCollection.hpp>
+ #include "vbahelperinterface.hxx" 
+ 
+ class ScModelObj;
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XDialogs > ScVbaDialogs_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XDialogs > ScVbaDialogs_BASE;
+ 
+ class ScVbaDialogs : public ScVbaDialogs_BASE
+ {
+ public:
+-	ScVbaDialogs( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext ): ScVbaDialogs_BASE( xParent, xContext ) {} 
++	ScVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext ): ScVbaDialogs_BASE( xParent, xContext ) {} 
+ 	virtual ~ScVbaDialogs() {}
+ 
+ 	// XCollection
+Index: sc/source/ui/vba/vbaglobals.hxx
+===================================================================
+--- sc/source/ui/vba/vbaglobals.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaglobals.hxx	(.../cws/npower11)	(revision 266650)
+@@ -33,7 +33,7 @@
+ #include <com/sun/star/lang/XServiceInfo.hpp>
+ #include <com/sun/star/lang/XInitialization.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+-#include <org/openoffice/vba/XGlobals.hpp>
++#include <ooo/vba/XGlobals.hpp>
+ 
+ #include <cppuhelper/implbase1.hxx>
+ #include "vbahelper.hxx"
+@@ -43,33 +43,33 @@
+     // =============================================================================
+ 
+     typedef ::cppu::WeakImplHelper1<    
+-        oo::vba::XGlobals > ScVbaGlobals_BASE;
++ ov::XGlobals > ScVbaGlobals_BASE;
+ 
+ 
+     class ScVbaGlobals : public ScVbaGlobals_BASE
+     {
+     private:
+             css::uno::Reference< css::uno::XComponentContext > m_xContext;
+-            css::uno::Reference< oo::excel::XApplication > mxApplication;
++            css::uno::Reference< ov::excel::XApplication > mxApplication;
+     public:
+ 	
+         ScVbaGlobals(
+             css::uno::Reference< css::uno::XComponentContext >const& rxContext );
+         virtual ~ScVbaGlobals();
+ 
+-		static 	css::uno::Reference< oo::vba::XGlobals > getGlobalsImpl(const css::uno::Reference< css::uno::XComponentContext >& ) throw (css::uno::RuntimeException);
++		static 	css::uno::Reference< ov::XGlobals > getGlobalsImpl(const css::uno::Reference< css::uno::XComponentContext >& ) throw (css::uno::RuntimeException);
+ 
+         // XGlobals
+         virtual css::uno::Reference<
+-                        oo::excel::XApplication > SAL_CALL getApplication()
++ ov::excel::XApplication > SAL_CALL getApplication()
+                         throw (css::uno::RuntimeException);
+-        virtual css::uno::Reference< oo::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
+-        virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
++        virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
++        virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
+         virtual css::uno::Any SAL_CALL WorkSheets(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+         virtual css::uno::Any SAL_CALL WorkBooks(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Sheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Sequence< css::uno::Any > SAL_CALL getGlobals(  ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Any SAL_CALL Names( ) throw ( css::uno::RuntimeException );
++	virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw ( css::uno::RuntimeException );
+     };
+ #endif // 
+Index: sc/source/ui/vba/vbascrollbar.hxx
+===================================================================
+--- sc/source/ui/vba/vbascrollbar.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbascrollbar.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,66 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_SCROLLBAR_HXX
++#define SC_VBA_SCROLLBAR_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/msforms/XScrollBar.hpp>
 +
-+void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::RuntimeException)
-+{
-+    sal_Bool bOrder = sal_True;
-+    switch( order )
-+    {
-+        case excel::XlOrder::xlDownThenOver:
-+            break;
-+        case excel::XlOrder::xlOverThenDown:
-+            bOrder = sal_False;
-+            break;
-+        default:
-+            DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+    }
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+    try
-+    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")), uno::makeAny( bOrder ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XScrollBar > ScrollBarImpl_BASE;
 +
-+sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() throw (css::uno::RuntimeException)
++class ScVbaScrollBar : public ScrollBarImpl_BASE
 +{
-+    sal_Int16 number = 0;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")));
-+        aValue >>= number;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+
-+    if( number ==0 )
-+    {
-+        number = excel::Constants::xlAutomatic;
-+    }
++public:
++    ScVbaScrollBar( const css::uno::Reference< ov::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, ov::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);
++    virtual ::sal_Int32 SAL_CALL getMax() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setMax( ::sal_Int32 _max ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getMin() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setMin( ::sal_Int32 _min ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getLargeChange() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setLargeChange( ::sal_Int32 _largechange ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getSmallChange() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setSmallChange( ::sal_Int32 _smallchange ) throw (css::uno::RuntimeException);
 +
-+    return number;
-+}
 +
-+void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) throw (css::uno::RuntimeException)
-+{
-+    if( firstPageNumber < 0 )
-+        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+    if( firstPageNumber == excel::Constants::xlAutomatic )
-+        firstPageNumber = 0;
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif //SC_VBA_LABEL_HXX
+Index: sc/source/ui/vba/vbaframe.cxx
+===================================================================
+--- sc/source/ui/vba/vbaframe.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaframe.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,93 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "vbaframe.hxx"
++#include <vector>
 +
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= (sal_Int16)firstPageNumber;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::RuntimeException)
-+{
-+    sal_Bool centerVertically = sal_False;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")));
-+        aValue >>= centerVertically;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    return centerVertically;
-+}
 +
-+void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) throw (css::uno::RuntimeException)
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++ScVbaFrame::ScVbaFrame( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : FrameImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
 +{
-+    try
-+    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")), uno::makeAny( centerVertically ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
 +}
 +
-+sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::RuntimeException)
++// Attributes
++rtl::OUString SAL_CALL 
++ScVbaFrame::getCaption() throw (css::uno::RuntimeException)
 +{
-+    sal_Bool centerHorizontally = sal_False;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")));
-+        aValue >>= centerHorizontally;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    return centerHorizontally;
++    rtl::OUString Label;
++    m_xProps->getPropertyValue( LABEL ) >>= Label;
++    return Label;
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally) throw (css::uno::RuntimeException)
++void SAL_CALL 
++ScVbaFrame::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
 +{
-+    try
-+    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")), uno::makeAny( centerHorizontally ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
 +}
 +
-+sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException)
++uno::Any SAL_CALL 
++ScVbaFrame::getValue() throw (css::uno::RuntimeException)
 +{
-+    sal_Bool printHeadings = sal_False;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
-+        aValue >>= printHeadings;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    return printHeadings;
++    return uno::makeAny( getCaption() );
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (css::uno::RuntimeException)
++void SAL_CALL 
++ScVbaFrame::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
 +{
-+    try
-+    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")), uno::makeAny( printHeadings ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++    rtl::OUString sCaption;
++    _value >>= sCaption;
++    setCaption( sCaption ); 
 +}
 +
 +rtl::OUString& 
-+ScVbaPageSetup::getServiceImplName()
++ScVbaFrame::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageSetup") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFrame") );
 +	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaPageSetup::getServiceNames()
++ScVbaFrame::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageSetup" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
 +	}
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbapagesetup.hxx sc/source/ui/vba/vbapagesetup.hxx
-new file mode 100644
-index 0000000..e60fc07
---- /dev/null
-+++ sc/source/ui/vba/vbapagesetup.hxx
-@@ -0,0 +1,104 @@
+Index: sc/source/ui/vba/vbacheckbox.hxx
+===================================================================
+--- sc/source/ui/vba/vbacheckbox.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacheckbox.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
 +/*************************************************************************
 + *
-+ * 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
 + *
-+ * OpenOffice.org - a multi-platform office productivity suite
++ *  $RCSfile$
 + *
-+ * $RCSfile$
-+ * $Revision$
++ *  $Revision$
 + *
-+ * This file is part of OpenOffice.org.
++ *  last change: $Author$ $Date$
 + *
-+ * 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.
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
 + *
-+ * 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.
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_PAGESETUP_HXX
-+#define SC_VBA_PAGESETUP_HXX
++#ifndef SC_VBA_CHECKBOX_HXX
++#define SC_VBA_CHECKBOX_HXX
++#include <cppuhelper/implbase2.hxx>
++#include <ooo/vba/msforms/XRadioButton.hpp>
 +
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/excel/XPageSetup.hpp>
-+#include <com/sun/star/uno/XComponentContext.hpp>
-+#include <com/sun/star/sheet/XSpreadsheet.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include "vbahelperinterface.hxx"
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XPageSetup > ScVbaPageSetup_BASE;
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XRadioButton, css::script::XDefaultProperty > CheckBoxImpl_BASE;
 +
-+class ScVbaPageSetup :  public ScVbaPageSetup_BASE 
++class ScVbaCheckbox : public CheckBoxImpl_BASE
 +{
-+    css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
-+    css::uno::Reference< css::beans::XPropertySet > mxPageProps;
-+    css::uno::Reference< css::frame::XModel > mxModel;
 +public:
-+	ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent, 
-+                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+		            const css::uno::Reference< css::sheet::XSpreadsheet>& xSheet,
-+                    const css::uno::Reference< css::frame::XModel >& xModlel) throw (css::uno::RuntimeException); 
-+	virtual ~ScVbaPageSetup(){}
-+    
-+    // Attribute
-+	virtual rtl::OUString SAL_CALL getPrintArea() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException);
-+	virtual double SAL_CALL getTopMargin() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setTopMargin( double margin ) throw (css::uno::RuntimeException);
-+	virtual double SAL_CALL getBottomMargin() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setBottomMargin( double margin ) throw (css::uno::RuntimeException);
-+	virtual double SAL_CALL getRightMargin() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setRightMargin( double margin ) throw (css::uno::RuntimeException);
-+	virtual double SAL_CALL getLeftMargin() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setLeftMargin( double margin ) throw (css::uno::RuntimeException);
-+	virtual double SAL_CALL getHeaderMargin() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setHeaderMargin( double margin ) throw (css::uno::RuntimeException);
-+	virtual double SAL_CALL getFooterMargin() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setFooterMargin( double margin ) throw (css::uno::RuntimeException);
-+	virtual sal_Int32 SAL_CALL getOrientation() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setOrientation( sal_Int32 orientation ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Any SAL_CALL getFitToPagesTall() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setFitToPagesTall( const css::uno::Any& fitToPagesTall ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Any SAL_CALL getFitToPagesWide() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setFitToPagesWide( const css::uno::Any& fitToPagesWide ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Any SAL_CALL getZoom() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setZoom( const css::uno::Any& zoom ) throw (css::uno::RuntimeException);
-+	virtual rtl::OUString SAL_CALL getLeftHeader() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setLeftHeader( const rtl::OUString& leftHeader ) throw (css::uno::RuntimeException);
-+	virtual rtl::OUString SAL_CALL getCenterHeader() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setCenterHeader( const rtl::OUString& centerHeader ) throw (css::uno::RuntimeException);
-+	virtual rtl::OUString SAL_CALL getRightHeader() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setRightHeader( const rtl::OUString& rightHeader ) throw (css::uno::RuntimeException);
-+	virtual rtl::OUString SAL_CALL getLeftFooter() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setLeftFooter( const rtl::OUString& leftFooter ) throw (css::uno::RuntimeException);
-+	virtual rtl::OUString SAL_CALL getCenterFooter() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setCenterFooter( const rtl::OUString& centerFooter ) throw (css::uno::RuntimeException);
-+	virtual rtl::OUString SAL_CALL getRightFooter() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setRightFooter( const rtl::OUString& rightFooter ) throw (css::uno::RuntimeException);
-+	virtual sal_Int32 SAL_CALL getOrder() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setOrder( sal_Int32 order ) throw (css::uno::RuntimeException);
-+	virtual sal_Int32 SAL_CALL getFirstPageNumber() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setFirstPageNumber( sal_Int32 firstPageNumber ) throw (css::uno::RuntimeException);
-+	virtual sal_Bool SAL_CALL getCenterVertically() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setCenterVertically( sal_Bool centerVertically ) throw (css::uno::RuntimeException);
-+	virtual sal_Bool SAL_CALL getCenterHorizontally() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setCenterHorizontally( sal_Bool centerHorizontally ) throw (css::uno::RuntimeException);
-+	virtual sal_Bool SAL_CALL getPrintHeadings() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setPrintHeadings( sal_Bool printHeadings ) throw (css::uno::RuntimeException);
-+
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    ScVbaCheckbox(  const css::uno::Reference< ov::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, ov::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);
++    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);
++    // XDefaultProperty
++    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
 +};
-+#endif
-diff --git sc/source/ui/vba/vbapalette.cxx sc/source/ui/vba/vbapalette.cxx
-index 51fe0fa..8f32414 100644
---- sc/source/ui/vba/vbapalette.cxx
-+++ sc/source/ui/vba/vbapalette.cxx
-@@ -33,7 +33,7 @@
- 
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- 
- /** Standard EGA colors, bright. */
- #define EXC_PALETTE_EGA_COLORS_LIGHT \
-diff --git sc/source/ui/vba/vbapane.cxx sc/source/ui/vba/vbapane.cxx
-index 73a91d4..b7f53a1 100644
---- sc/source/ui/vba/vbapane.cxx
-+++ sc/source/ui/vba/vbapane.cxx
-@@ -31,7 +31,7 @@
- #include<vbapane.hxx>
- 
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
- 
- /*
- ScVbaPane::ScVbaPane( uno::Reference< uno::XComponentContext > xContext, uno::Refrence< sheet::XViewPane > xViewPane )
-diff --git sc/source/ui/vba/vbapane.hxx sc/source/ui/vba/vbapane.hxx
-index c80e3d7..e7d8c9c 100644
---- sc/source/ui/vba/vbapane.hxx
-+++ sc/source/ui/vba/vbapane.hxx
-@@ -32,11 +32,11 @@
- 
- #include<cppuhelper/implbase1.hxx>
- #include<com/sun/star/sheet/XViewPane.hpp>
--#include<org/openoffice/excel/XPane.hpp>
-+#include<ooo/vba/excel/XPane.hpp>
- 
- #include"vbahelper.hxx"
- 
--typedef cppu::WeakImplHelper1< oo::excel::XPane > PaneImpl_Base;
-+typedef cppu::WeakImplHelper1< ov::excel::XPane > PaneImpl_Base;
- 
- class ScVbaPane : public PaneImpl_Base
- {
-diff --git sc/source/ui/vba/vbapictureformat.cxx sc/source/ui/vba/vbapictureformat.cxx
-index af27969..2663682 100644
---- sc/source/ui/vba/vbapictureformat.cxx
-+++ sc/source/ui/vba/vbapictureformat.cxx
-@@ -29,10 +29,10 @@
-  ************************************************************************/
- #include "vbapictureformat.hxx"
- 
--using namespace org::openoffice;
-+using namespace ooo::vba;
- using namespace com::sun::star;
- 
--ScVbaPictureFormat::ScVbaPictureFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,
-+ScVbaPictureFormat::ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent,
-     const css::uno::Reference< css::uno::XComponentContext >& xContext,
-     uno::Reference< drawing::XShape > xShape ) 
-     throw( lang::IllegalArgumentException ) : ScVbaPictureFormat_BASE( xParent, xContext ), m_xShape( xShape )
-@@ -141,7 +141,7 @@ ScVbaPictureFormat::getServiceNames()
-     if ( aServiceNames.getLength() == 0 )
-     {
-         aServiceNames.realloc( 1 );
--        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.PictureFormat" ) );
-+        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.PictureFormat" ) );
-     }
-     return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbapictureformat.hxx sc/source/ui/vba/vbapictureformat.hxx
-index 6e5038c..75d2360 100644
---- sc/source/ui/vba/vbapictureformat.hxx
-+++ sc/source/ui/vba/vbapictureformat.hxx
-@@ -32,10 +32,10 @@
- 
- #include <com/sun/star/drawing/XShape.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/msforms/XPictureFormat.hpp>
-+#include <ooo/vba/msforms/XPictureFormat.hpp>
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1< oo::msforms::XPictureFormat > ScVbaPictureFormat_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::msforms::XPictureFormat > ScVbaPictureFormat_BASE;
- 
- class ScVbaPictureFormat : public ScVbaPictureFormat_BASE
- {
-@@ -48,7 +48,7 @@ protected:
- private:
-     void checkParameterRangeInDouble( double nRange, double nMin, double nMax ) throw (css::uno::RuntimeException);
- public:
--    ScVbaPictureFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > xShape ) throw( css::lang::IllegalArgumentException );
-+    ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > xShape ) throw( css::lang::IllegalArgumentException );
- 
-     // Attributes
-     virtual double SAL_CALL getBrightness() throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbapivotcache.cxx sc/source/ui/vba/vbapivotcache.cxx
-index 081a9f4..43c0bf3 100644
---- sc/source/ui/vba/vbapivotcache.cxx
-+++ sc/source/ui/vba/vbapivotcache.cxx
-@@ -31,9 +31,9 @@
- 
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- 
--ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,  const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotCacheImpl_BASE( xParent, xContext ), m_xTable( xTable )
-+ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,  const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotCacheImpl_BASE( xParent, xContext ), m_xTable( xTable )
- {
- }
- 
-@@ -56,7 +56,7 @@ ScVbaPivotCache::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PivotCache" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotCache" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbapivotcache.hxx sc/source/ui/vba/vbapivotcache.hxx
-index fa12b85..2b370d3 100644
---- sc/source/ui/vba/vbapivotcache.hxx
-+++ sc/source/ui/vba/vbapivotcache.hxx
-@@ -33,16 +33,16 @@
++#endif //SC_VBA_CHECKBOX_HXX
+Index: sc/source/ui/vba/vbavalidation.hxx
+===================================================================
+--- sc/source/ui/vba/vbavalidation.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbavalidation.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,18 +31,18 @@
+ #define SC_VBA_VALIDATION_HXX
+ #include <cppuhelper/implbase1.hxx>
  #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/sheet/XDataPilotTable.hpp>
- 
--#include <org/openoffice/excel/XPivotCache.hpp>
-+#include <ooo/vba/excel/XPivotCache.hpp>
+-#include <org/openoffice/excel/XValidation.hpp>
++#include <ooo/vba/excel/XValidation.hpp>
+ #include <com/sun/star/table/XCellRange.hpp>
  #include "vbahelperinterface.hxx"
  
--typedef InheritedHelperInterfaceImpl1<oo::excel::XPivotCache > PivotCacheImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1<ov::excel::XPivotCache > PivotCacheImpl_BASE;
+-typedef InheritedHelperInterfaceImpl1<oo::excel::XValidation > ValidationImpl_BASE;
++typedef InheritedHelperInterfaceImpl1<ov::excel::XValidation > ValidationImpl_BASE;
  
- class ScVbaPivotCache : public PivotCacheImpl_BASE
+ class ScVbaValidation : public ValidationImpl_BASE
  {		
- 	css::uno::Reference< css::sheet::XDataPilotTable > m_xTable;
+ 	css::uno::Reference< css::table::XCellRange > m_xRange;
+ 	
  public:
--	ScVbaPivotCache( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable );
-+	ScVbaPivotCache( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable );
- 	virtual void SAL_CALL Refresh() throw (css::uno::RuntimeException);
- 	// XHelperInterface
- 	virtual rtl::OUString& getServiceImplName();
-diff --git sc/source/ui/vba/vbapivottable.cxx sc/source/ui/vba/vbapivottable.cxx
-index cc77c60..f9a52a9 100644
---- sc/source/ui/vba/vbapivottable.cxx
-+++ sc/source/ui/vba/vbapivottable.cxx
-@@ -32,9 +32,9 @@
- 
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
+-	ScVbaValidation( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange( xRange) {}
++	ScVbaValidation( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange( xRange) {}
+     // Attributes
+     virtual ::sal_Bool SAL_CALL getIgnoreBlank() throw (css::uno::RuntimeException);
+     virtual void SAL_CALL setIgnoreBlank( ::sal_Bool _ignoreblank ) throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbalineformat.cxx
+===================================================================
+--- sc/source/ui/vba/vbalineformat.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbalineformat.cxx	(.../cws/npower11)	(revision 266650)
+@@ -27,19 +27,19 @@
+  * for a copy of the LGPLv3 License.
+  *
+  ************************************************************************/
+-#include <org/openoffice/office/MsoArrowheadStyle.hpp>
+-#include <org/openoffice/office/MsoArrowheadLength.hpp>
+-#include <org/openoffice/office/MsoArrowheadWidth.hpp>
+-#include <org/openoffice/office/MsoLineDashStyle.hpp>
++#include <ooo/vba/office/MsoArrowheadStyle.hpp>
++#include <ooo/vba/office/MsoArrowheadLength.hpp>
++#include <ooo/vba/office/MsoArrowheadWidth.hpp>
++#include <ooo/vba/office/MsoLineDashStyle.hpp>
+ #include <com/sun/star/drawing/LineStyle.hpp>
+ #include <com/sun/star/drawing/LineDash.hpp>
+ #include "vbalineformat.hxx"
+ #include "vbacolorformat.hxx"
  
--ScVbaPivotTable::ScVbaPivotTable( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotTableImpl_BASE( uno::Reference< vba::XHelperInterface >(),  xContext), m_xTable( xTable )
-+ScVbaPivotTable::ScVbaPivotTable( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotTableImpl_BASE( uno::Reference< XHelperInterface >(),  xContext), m_xTable( xTable )
- {
- }
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ using namespace com::sun::star;
  
-@@ -43,7 +43,7 @@ ScVbaPivotTable::PivotCache() throw (uno::RuntimeException)
+-ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaLineFormat_BASE( xParent, xContext ), m_xShape( xShape ) 
++ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaLineFormat_BASE( xParent, xContext ), m_xShape( xShape ) 
  {
- 	// #FIXME with a quick example failed to determine what the parent
- 	// should be, leaving as null at the moment	
--	return new ScVbaPivotCache( uno::Reference< vba::XHelperInterface >(), mxContext, m_xTable );
-+	return new ScVbaPivotCache( uno::Reference< XHelperInterface >(), mxContext, m_xTable );
- }
- 
- rtl::OUString& 
-@@ -60,7 +60,7 @@ ScVbaPivotTable::getServiceNames()
+     m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
+     m_nLineDashStyle = office::MsoLineDashStyle::msoLineSolid;
+@@ -450,7 +450,7 @@
  	if ( aServiceNames.getLength() == 0 )
  	{
  		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PivotTable" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTable" ) );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.LineFormat" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.LineFormat" ) );
  	}
  	return aServiceNames;
  }
-diff --git sc/source/ui/vba/vbapivottable.hxx sc/source/ui/vba/vbapivottable.hxx
-index 55deb56..f105081 100644
---- sc/source/ui/vba/vbapivottable.hxx
-+++ sc/source/ui/vba/vbapivottable.hxx
-@@ -32,18 +32,18 @@
+Index: sc/source/ui/vba/vbacharttitle.hxx
+===================================================================
+--- sc/source/ui/vba/vbacharttitle.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacharttitle.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,15 +31,15 @@
+ #define SC_VBA_CHARTTITLE_HXX
+ #include "vbatitle.hxx"
  #include <cppuhelper/implbase1.hxx>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/sheet/XDataPilotTable.hpp>
--#include <org/openoffice/excel/XPivotTable.hpp>
-+#include <ooo/vba/excel/XPivotTable.hpp>
- #include "vbahelper.hxx"
- #include "vbahelperinterface.hxx"
+-#include <org/openoffice/excel/XChartTitle.hpp>
++#include <ooo/vba/excel/XChartTitle.hpp>
  
--typedef InheritedHelperInterfaceImpl1< oo::excel::XPivotTable >  PivotTableImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XPivotTable >  PivotTableImpl_BASE;
  
- class ScVbaPivotTable : public PivotTableImpl_BASE
- {		
- 	css::uno::Reference< css::sheet::XDataPilotTable > m_xTable;
+-typedef TitleImpl< cppu::WeakImplHelper1< oo::excel::XChartTitle > > ChartTitleBase;
++typedef TitleImpl< cppu::WeakImplHelper1< ov::excel::XChartTitle > > ChartTitleBase;
+ 
+ class ScVbaChartTitle : public ChartTitleBase
+ {
  public:
- 	ScVbaPivotTable( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable );
--	virtual css::uno::Reference< oo::excel::XPivotCache > SAL_CALL PivotCache(  ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XPivotCache > SAL_CALL PivotCache(  ) throw (css::uno::RuntimeException);
+-	ScVbaChartTitle( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape );
++	ScVbaChartTitle( const css::uno::Reference< ov::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape );
  	// XHelperInterface
  	virtual rtl::OUString& getServiceImplName();
  	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-diff --git sc/source/ui/vba/vbapivottables.cxx sc/source/ui/vba/vbapivottables.cxx
-index 43dcf53..234bb88 100644
---- sc/source/ui/vba/vbapivottables.cxx
-+++ sc/source/ui/vba/vbapivottables.cxx
-@@ -30,11 +30,11 @@
- #include "vbapivottables.hxx"
- #include "vbapivottable.hxx"
- #include <com/sun/star/sheet/XDataPilotTable.hpp>
--#include <org/openoffice/excel/XPivotTable.hpp>
-+#include <ooo/vba/excel/XPivotTable.hpp>
- 
+Index: sc/source/ui/vba/vbacombobox.cxx
+===================================================================
+--- sc/source/ui/vba/vbacombobox.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacombobox.cxx	(.../cws/npower11)	(revision 266650)
+@@ -31,25 +31,29 @@
+ #include <vector>
  
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
  
- uno::Any DataPilotToPivotTable( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext )
- {
-@@ -54,7 +54,7 @@ public:
  
- };
++//SelectedItems list of integer indexes
++//StringItemList list of items
++
++const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
++const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
++const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
+ const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
+-const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
  
--ScVbaPivotTables::ScVbaPivotTables( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  ):  ScVbaPivotTables_BASE( xParent, xContext, xIndexAccess ) 
-+ScVbaPivotTables::ScVbaPivotTables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  ):  ScVbaPivotTables_BASE( xParent, xContext, xIndexAccess ) 
+-ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ComboBoxImpl_BASE( xContext, xControlShape )
++ScVbaComboBox::ScVbaComboBox( const uno::Reference< 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 )
  {
++    	mpListHelper.reset( new ListControlHelper( m_xProps ) );
+ 	// grab the default value property name
+ 	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
  }
  
-@@ -91,7 +91,7 @@ ScVbaPivotTables::getServiceNames()
- 	if ( sNames.getLength() == 0 )
- 	{
- 		sNames.realloc( 1 );
--		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PivotTables") );
-+		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTables") );
- 	}
- 	return sNames;
- }
-diff --git sc/source/ui/vba/vbapivottables.hxx sc/source/ui/vba/vbapivottables.hxx
-index 22d1e21..28f1485 100644
---- sc/source/ui/vba/vbapivottables.hxx
-+++ sc/source/ui/vba/vbapivottables.hxx
-@@ -32,7 +32,7 @@
- 
- #include <cppuhelper/implbase1.hxx>
- 
--#include <org/openoffice/excel/XPivotTables.hpp>
-+#include <ooo/vba/excel/XPivotTables.hpp>
- #include <com/sun/star/container/XEnumerationAccess.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
-  
-@@ -41,14 +41,14 @@
- #include "vbacollectionimpl.hxx"
- 
+-ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ComboBoxImpl_BASE( xContext, xPropSet, xControlShape )
+-{
+-	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
+-}
++// Attributes
  
--typedef CollTestImplHelper< oo::excel::XPivotTables > ScVbaPivotTables_BASE;
-+typedef CollTestImplHelper< ov::excel::XPivotTables > ScVbaPivotTables_BASE;
  
- class ScVbaPivotTables : public ScVbaPivotTables_BASE
+-// Attributes
++// Value, [read] e.g. getValue returns the value of ooo Text propery e.g. the value in
++// the drop down
+ uno::Any SAL_CALL 
+ ScVbaComboBox::getValue() throw (uno::RuntimeException)
  {
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- 
- public:
--	ScVbaPivotTables( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
-+	ScVbaPivotTables( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
- 	virtual ~ScVbaPivotTables() {}
+@@ -57,11 +61,48 @@
+ }
  
- 	// XEnumerationAccess
-diff --git sc/source/ui/vba/vbaprogressbar.cxx sc/source/ui/vba/vbaprogressbar.cxx
-new file mode 100644
-index 0000000..77f3eca
---- /dev/null
-+++ sc/source/ui/vba/vbaprogressbar.cxx
-@@ -0,0 +1,78 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "vbaprogressbar.hxx"
-+#include <vector>
-+
-+using namespace com::sun::star;
-+using namespace ooo::vba;
-+
-+// uno servicename com.sun.star.awt.UnoControlProgressBarMode
-+const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
-+
-+ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< ov::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 )
+ void SAL_CALL 
++ScVbaComboBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeException)
 +{
++    uno::Sequence< sal_Int16 > sSelection(1);
++    _value >>= sSelection[ 0 ];
++    m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( sSelection ) );
 +}
 +
-+// Attributes
 +uno::Any SAL_CALL 
-+ScVbaProgressBar::getValue() throw (css::uno::RuntimeException)
++ScVbaComboBox::getListIndex() throw (uno::RuntimeException)
 +{
-+    return m_xProps->getPropertyValue( SVALUE );
++	uno::Sequence< rtl::OUString > sItems;
++	m_xProps->getPropertyValue( ITEMS ) >>= sItems;
++	// should really return the item that has focus regardless of
++	// it been selected
++	if ( sItems.getLength() > 0 )
++	{
++		rtl::OUString sText = getText();
++		sal_Int32 nLen = sItems.getLength();
++		for ( sal_Int32 index = 0; sText.getLength() && index < nLen; ++index )
++		{
++			if ( sItems[ index ].equals( sText ) )
++			{
++				OSL_TRACE("getListIndex returning %d", index );
++				return uno::makeAny( index );
++			}
++				
++		} 
++ 	} 
++	OSL_TRACE("getListIndex returning %d", -1 );
++	return uno::makeAny( sal_Int32( -1 ) );
 +}
 +
++// Value, [write]e.g. setValue sets the value in the drop down, and if the value is one
++// of the values in the list then the selection is also set
 +void SAL_CALL 
-+ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
+ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
+ {
+ 	m_xProps->setPropertyValue( sSourceName, _value );
+ }
+ 
++// see Value
++
+ ::rtl::OUString SAL_CALL 
+ ScVbaComboBox::getText() throw (uno::RuntimeException)
+ {
+@@ -80,63 +121,55 @@
+ void SAL_CALL 
+ ScVbaComboBox::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
+ {
++	mpListHelper->AddItem( pvargItem, pvargIndex );
++}
+ 
+-	if ( pvargItem.hasValue()  )
++void SAL_CALL 
++ScVbaComboBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
+ 	{
+-		uno::Sequence< rtl::OUString > sList;
+-		m_xProps->getPropertyValue( ITEMS ) >>= sList;
++	mpListHelper->removeItem( index );
++}
+ 
+-		sal_Int32 nIndex = sList.getLength();
+-
+-		if ( pvargIndex.hasValue() )
+-			pvargIndex >>= nIndex;
+-
+-		rtl::OUString sString;
+-		pvargItem >>= sString;
+-
+-		// if no index specified or item is to be appended to end of 
+-		// list just realloc the array and set the last item
+-		if ( nIndex  == sList.getLength() )
++void SAL_CALL 
++ScVbaComboBox::Clear(  ) throw (uno::RuntimeException)
+ 		{
+-			sal_Int32 nOldSize = sList.getLength();
+-			sList.realloc( nOldSize + 1 );
+-			sList[ nOldSize ] = sString; 
++	mpListHelper->Clear();
+ 		}
+-		else
+-		{
+-			// just copy those elements above the one to be inserted
+-			std::vector< rtl::OUString > sVec;
+-			// reserve just the amount we need to copy
+-			sVec.reserve( sList.getLength() - nIndex );
+ 
+-			// point at first element to copy
+-			rtl::OUString* pString = sList.getArray() + nIndex;
+-			const rtl::OUString* pEndString = sList.getArray() + sList.getLength();
+-			// insert the new element
+-			sVec.push_back( sString );
+-			// copy elements	
+-			for ( ; pString != pEndString; ++pString )
+-				sVec.push_back( *pString );
+-		
+-			sList.realloc(  sList.getLength() + 1 );
+-
+-			// point at first element to be overwritten
+-			pString = sList.getArray() + nIndex;
+-			pEndString = sList.getArray() + sList.getLength();
+-			std::vector< rtl::OUString >::iterator it = sVec.begin();
+-			for ( ; pString != pEndString; ++pString, ++it)
+-				*pString = *it;	
+-			//
++void SAL_CALL
++ScVbaComboBox::setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException)
++{
++	ScVbaControl::setRowSource( _rowsource );
++	mpListHelper->setRowSource( _rowsource );
+ 		}
+ 
+-		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
++sal_Int32 SAL_CALL
++ScVbaComboBox::getListCount() throw (uno::RuntimeException)
++{
++	return mpListHelper->getListCount();
++}
+ 		
++uno::Any SAL_CALL 
++ScVbaComboBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
 +{
-+    m_xProps->setPropertyValue( SVALUE,  _value );
-+}
++	return mpListHelper->List( pvargIndex, pvarColumn );
+ 	}
 +
 +rtl::OUString& 
-+ScVbaProgressBar::getServiceImplName()
++ScVbaComboBox::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox") );
 +	return sImplName;
-+}
-+
+ }
+ 
+-void SAL_CALL 
+-ScVbaComboBox::Clear(  ) throw (uno::RuntimeException)
 +uno::Sequence< rtl::OUString > 
-+ScVbaProgressBar::getServiceNames()
-+{
++ScVbaComboBox::getServiceNames()
+ {
+-	setValue( uno::makeAny( rtl::OUString() ) );
+-	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Label" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ComboBox" ) );
 +	}
 +	return aServiceNames;
-+}
-diff --git sc/source/ui/vba/vbaprogressbar.hxx sc/source/ui/vba/vbaprogressbar.hxx
-new file mode 100644
-index 0000000..d040f08
---- /dev/null
-+++ sc/source/ui/vba/vbaprogressbar.hxx
-@@ -0,0 +1,59 @@
+ }
+Index: sc/source/ui/vba/vbacommandbar.hxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbar.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacommandbar.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,105 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -22856,2359 +21798,5155 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_PROGRESSBAR_HXX
-+#define SC_VBA_PROGRESSBAR_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/msforms/XProgressBar.hpp>
++#ifndef SC_VBA_COMMANDBAR_HXX
++#define SC_VBA_COMMANDBAR_HXX
 +
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+#include <cppuhelper/implbase2.hxx>
++#include <ooo/vba/XCommandBar.hpp>
++#include <com/sun/star/ui/XUIConfigurationManager.hpp>
++#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
++#include <com/sun/star/container/XIndexContainer.hpp>
++#include <com/sun/star/beans/PropertyValues.hpp>
 +
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XProgressBar, css::script::XDefaultProperty  > ProgressBarImpl_BASE;
++#include "vbahelperinterface.hxx"
++#include "vbacommandbars.hxx"
 +
-+class ScVbaProgressBar : public ProgressBarImpl_BASE
-+{
-+public:
-+    ScVbaProgressBar( const css::uno::Reference< ov::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, ov::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);
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+    // XDefaultProperty
-+    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++#include <map>
++typedef std::map< const rtl::OUString, rtl::OUString > CommandBarNameMap;
++typedef std::pair< const rtl::OUString, rtl::OUString > CommandBarNamePair;
++const CommandBarNamePair namePair[] = { 
++    CommandBarNamePair(  rtl::OUString::createFromAscii("standard"), rtl::OUString::createFromAscii("standardbar") ),
++    CommandBarNamePair(  rtl::OUString::createFromAscii("formatting"), rtl::OUString::createFromAscii("formatobjectbar") ),
 +};
-+#endif //SC_VBA_LABEL_HXX
-diff --git sc/source/ui/vba/vbapropvalue.hxx sc/source/ui/vba/vbapropvalue.hxx
-index 1b01a90..d7ca6ad 100644
---- sc/source/ui/vba/vbapropvalue.hxx
-+++ sc/source/ui/vba/vbapropvalue.hxx
-@@ -29,12 +29,12 @@
-  ************************************************************************/
- #ifndef SC_VBA_PROPVALULE_HXX
- #define SC_VBA_PROPVALULE_HXX
--#include <org/openoffice/vba/XPropValue.hpp>
-+#include <ooo/vba/XPropValue.hpp>
- #include <cppuhelper/implbase1.hxx>
- 
- #include "vbahelper.hxx"
- 
--typedef ::cppu::WeakImplHelper1< oo::vba::XPropValue > PropValueImpl_BASE;
-+typedef ::cppu::WeakImplHelper1< ov::XPropValue > PropValueImpl_BASE;
- 
- class PropListener 
- {
-diff --git sc/source/ui/vba/vbaradiobutton.cxx sc/source/ui/vba/vbaradiobutton.cxx
-index 381b36b..5aa9d20 100644
---- sc/source/ui/vba/vbaradiobutton.cxx
-+++ sc/source/ui/vba/vbaradiobutton.cxx
-@@ -31,12 +31,12 @@
- #include <vector>
- 
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
- 
- 
- 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< 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 )
- {
- }
- 
-@@ -55,22 +55,53 @@ ScVbaRadioButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun:
-     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
- }
- 
--sal_Bool SAL_CALL 
-+uno::Any SAL_CALL 
- ScVbaRadioButton::getValue() throw (css::uno::RuntimeException)
- {
--    sal_Bool bValue = sal_False;
-     sal_Int16 nValue = -1;
-     m_xProps->getPropertyValue( STATE ) >>= nValue;
-     if( nValue != 0 )
--        bValue = sal_True;
--    return bValue;
-+        nValue = -1;
-+//    return uno::makeAny( nValue ); 
-+// I must be missing something MSO says value should be -1 if selected, 0 if not
-+// selected
-+    return uno::makeAny( ( nValue == -1 ) ? sal_True : sal_False ); 
-+
- }
- 
- void SAL_CALL 
--ScVbaRadioButton::setValue( sal_Bool _value ) throw (css::uno::RuntimeException)
-+ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
- {
-     sal_Int16 nValue = 0;
--    if( _value )
-+    sal_Bool bValue = sal_False;
-+    if( _value >>= nValue )
-+    {
-+        if( nValue == -1)
-         nValue = 1;
-+    }
-+    else if ( _value >>= bValue )
-+    {
-+        if ( bValue )
-+            nValue = 1;
-+    }
-     m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
- }
-+
-+rtl::OUString& 
-+ScVbaRadioButton::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton") );
-+	return sImplName;
-+}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaRadioButton::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.RadioButton" ) );
-+	}
-+	return aServiceNames;
-+}
-diff --git sc/source/ui/vba/vbaradiobutton.hxx sc/source/ui/vba/vbaradiobutton.hxx
-index 4ef4242..7203aed 100644
---- sc/source/ui/vba/vbaradiobutton.hxx
-+++ sc/source/ui/vba/vbaradiobutton.hxx
-@@ -29,24 +29,27 @@
-  ************************************************************************/
- #ifndef SC_VBA_RADIOBUTTON_HXX
- #define SC_VBA_RADIOBUTTON_HXX
--#include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/msforms/XRadioButton.hpp>
--
-+#include <ooo/vba/msforms/XRadioButton.hpp>
- #include "vbacontrol.hxx"
- #include "vbahelper.hxx"
-+#include <cppuhelper/implbase2.hxx>
- 
--typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XRadioButton > RadioButtonImpl_BASE;
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XRadioButton, css::script::XDefaultProperty > RadioButtonImpl_BASE;
- 
- class ScVbaRadioButton : public RadioButtonImpl_BASE
- {
- public:
--    ScVbaRadioButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaRadioButton( const css::uno::Reference< ov::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, ov::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);
--    virtual sal_Bool SAL_CALL getValue() throw (css::uno::RuntimeException);
--    virtual void SAL_CALL setValue( sal_Bool _value ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue(const com::sun::star::uno::Any&) throw (css::uno::RuntimeException);
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+    // XDefaultProperty
-+    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
- 
- };
- #endif //SC_VBA_RADIOBUTTON_HXX
-diff --git sc/source/ui/vba/vbarange.cxx sc/source/ui/vba/vbarange.cxx
-index bd16637..e7f6797 100644
---- sc/source/ui/vba/vbarange.cxx
-+++ sc/source/ui/vba/vbarange.cxx
-@@ -91,30 +91,31 @@
- #include <com/sun/star/sheet/XSubTotalDescriptor.hpp>
- #include <com/sun/star/sheet/GeneralFunction.hdl>
- 
--#include <org/openoffice/excel/XlPasteSpecialOperation.hpp>
--#include <org/openoffice/excel/XlPasteType.hpp>
--#include <org/openoffice/excel/Constants.hpp>
--#include <org/openoffice/excel/XlFindLookIn.hpp>
--#include <org/openoffice/excel/XlLookAt.hpp>
--#include <org/openoffice/excel/XlSearchOrder.hpp>
--#include <org/openoffice/excel/XlSortOrder.hpp>
--#include <org/openoffice/excel/XlYesNoGuess.hpp>
--#include <org/openoffice/excel/XlSortOrientation.hpp>
--#include <org/openoffice/excel/XlSortMethod.hpp>
--#include <org/openoffice/excel/XlDirection.hpp>
--#include <org/openoffice/excel/XlSortDataOption.hpp>
--#include <org/openoffice/excel/XlDeleteShiftDirection.hpp>
--#include <org/openoffice/excel/XlInsertShiftDirection.hpp>
--#include <org/openoffice/excel/XlReferenceStyle.hpp>
--#include <org/openoffice/excel/XlBordersIndex.hpp>
--#include <org/openoffice/excel/XlPageBreak.hpp>
--#include <org/openoffice/excel/XlAutoFilterOperator.hpp>
--#include <org/openoffice/excel/XlAutoFillType.hpp>
--#include <org/openoffice/excel/XlTextParsingType.hpp>
--#include <org/openoffice/excel/XlTextQualifier.hpp>
--#include <org/openoffice/excel/XlCellType.hpp>
--#include <org/openoffice/excel/XlSpecialCellsValue.hpp>
--#include <org/openoffice/excel/XlConsolidationFunction.hpp>
-+#include <ooo/vba/excel/XlPasteSpecialOperation.hpp>
-+#include <ooo/vba/excel/XlPasteType.hpp>
-+#include <ooo/vba/excel/Constants.hpp>
-+#include <ooo/vba/excel/XlFindLookIn.hpp>
-+#include <ooo/vba/excel/XlLookAt.hpp>
-+#include <ooo/vba/excel/XlSearchOrder.hpp>
-+#include <ooo/vba/excel/XlSortOrder.hpp>
-+#include <ooo/vba/excel/XlYesNoGuess.hpp>
-+#include <ooo/vba/excel/XlSortOrientation.hpp>
-+#include <ooo/vba/excel/XlSortMethod.hpp>
-+#include <ooo/vba/excel/XlDirection.hpp>
-+#include <ooo/vba/excel/XlSortDataOption.hpp>
-+#include <ooo/vba/excel/XlDeleteShiftDirection.hpp>
-+#include <ooo/vba/excel/XlInsertShiftDirection.hpp>
-+#include <ooo/vba/excel/XlReferenceStyle.hpp>
-+#include <ooo/vba/excel/XlBordersIndex.hpp>
-+#include <ooo/vba/excel/XlPageBreak.hpp>
-+#include <ooo/vba/excel/XlAutoFilterOperator.hpp>
-+#include <ooo/vba/excel/XlAutoFillType.hpp>
-+#include <ooo/vba/excel/XlTextParsingType.hpp>
-+#include <ooo/vba/excel/XlTextQualifier.hpp>
-+#include <ooo/vba/excel/XlCellType.hpp>
-+#include <ooo/vba/excel/XlSpecialCellsValue.hpp>
-+#include <ooo/vba/excel/XlConsolidationFunction.hpp>
-+#include <ooo/vba/excel/XlSearchDirection.hpp>
- 
- #include <scitems.hxx>
- #include <svx/srchitem.hxx>
-@@ -150,6 +151,7 @@
- #include "undodat.hxx"
- #include "dbdocfun.hxx"
- #include "patattr.hxx"
-+#include "olinetab.hxx"
- #include <comphelper/anytostring.hxx>
- 
- #include <global.hxx>
-@@ -162,10 +164,10 @@
- #include <com/sun/star/sheet/FunctionArgument.hpp>
- // end test includes
++static const CommandBarNameMap mCommandBarNameMap( namePair, ( namePair + sizeof(namePair) / sizeof(namePair[0]) ) );
++
++
++typedef InheritedHelperInterfaceImpl1< ov::XCommandBar > CommandBar_BASE;
++
++class ScVbaCommandBar : public CommandBar_BASE
++{
++private:
++    rtl::OUString       m_sToolBarName;
++    rtl::OUString       m_sMenuModuleName;
++    rtl::OUString       m_sUIName;
++    sal_Bool            m_bTemporary;
++    sal_Bool            m_bIsMenu;
++    sal_Bool            m_bCustom;
++    sal_Bool            m_bCreate;
++    ScVbaCommandBars*   m_pScVbaCommandBars;
++    css::beans::PropertyValues  m_aToolBar;
++    // hard reference for parent
++    css::uno::Reference< ov::XHelperInterface >               m_xParentHardRef;
++    css::uno::Reference< css::ui::XUIConfigurationManager >         m_xUICfgManager;
++    css::uno::Reference< css::ui::XUIConfigurationPersistence >     m_xUICfgPers;
++    css::uno::Reference< css::container::XIndexContainer >          m_xBarSettings;
++    void initCommandBar() throw( css::uno::RuntimeException );
++protected:
++    void getToolBarSettings( rtl::OUString sToolBarName ) throw( css::uno::RuntimeException );
++    void getMenuSettings();
++    void addCustomBar();
++public:
++    ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw( css::uno::RuntimeException );
++    ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sToolBarName, sal_Bool bTemporary, sal_Bool bCreate ) throw( css::uno::RuntimeException );
++    
++    sal_Bool IsMenu() { return m_bIsMenu; };
++    css::uno::Reference< css::ui::XUIConfigurationManager > GetUICfgManager() { return m_xUICfgManager; };
++    css::uno::Reference< css::ui::XUIConfigurationPersistence > GetUICfgPers() { return m_xUICfgPers; };
++    css::uno::Reference< css::container::XIndexContainer > GetBarSettings() { return m_xBarSettings; };
++    rtl::OUString GetToolBarName() { return m_sToolBarName; };
++
++    // Attributes
++    virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setName( const ::rtl::OUString& _name ) throw (css::uno::RuntimeException);
++    virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
++
++    // Methods
++    virtual void SAL_CALL Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif//SC_VBA_COMMANDBAR_HXX
+Index: sc/source/ui/vba/vbapivottable.cxx
+===================================================================
+--- sc/source/ui/vba/vbapivottable.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbapivottable.cxx	(.../cws/npower11)	(revision 266650)
+@@ -32,9 +32,9 @@
  
--#include <org/openoffice/excel/Range.hpp>
-+#include <ooo/vba/excel/Range.hpp>
- #include <com/sun/star/bridge/oleautomation/Date.hpp>
  
+ using namespace ::com::sun::star;
 -using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- using ::std::vector;
  
-@@ -203,15 +205,17 @@ uno::Any lcl_makeRange( uno::Reference< uno::XComponentContext >& xContext, cons
+-ScVbaPivotTable::ScVbaPivotTable( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotTableImpl_BASE( uno::Reference< vba::XHelperInterface >(),  xContext), m_xTable( xTable )
++ScVbaPivotTable::ScVbaPivotTable( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotTableImpl_BASE( uno::Reference< XHelperInterface >(),  xContext), m_xTable( xTable )
  {
- 	uno::Reference< table::XCellRange > xCellRange( aAny, uno::UNO_QUERY_THROW );
- 	// #FIXME need proper (WorkSheet) parent
--	return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xCellRange, bIsRows, bIsColumns ) ) );
-+	return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xCellRange, bIsRows, bIsColumns ) ) );
  }
  
--uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRanges >& xLocSheetCellRanges, ScDocShell* pDoc )
-+uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRanges >& xLocSheetCellRanges, ScDocShell* pDoc )
+@@ -43,7 +43,7 @@
  {
- 	uno::Reference< excel::XRange > xRange;
- 	uno::Sequence< table::CellRangeAddress  > sAddresses = xLocSheetCellRanges->getRangeAddresses();
- 	ScRangeList aCellRanges;
- 	sal_Int32 nLen = sAddresses.getLength();
-+	if ( nLen )
-+       	{ 
- 	for ( sal_Int32 index = 0; index < nLen; ++index )
+ 	// #FIXME with a quick example failed to determine what the parent
+ 	// should be, leaving as null at the moment	
+-	return new ScVbaPivotCache( uno::Reference< vba::XHelperInterface >(), mxContext, m_xTable );
++	return new ScVbaPivotCache( uno::Reference< XHelperInterface >(), mxContext, m_xTable );
+ }
+ 
+ rtl::OUString& 
+@@ -60,7 +60,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
  	{
- 		ScRange refRange;
-@@ -231,10 +235,11 @@ uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const uno::Re
- 		// #FIXME need proper (WorkSheet) parent
- 		xRange = new ScVbaRange( xParent, xContext, xRanges );
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PivotTable" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTable" ) );
  	}
-+	}
- 	return xRange;
+ 	return aServiceNames;
  }
+Index: sc/source/ui/vba/vbachartobjects.cxx
+===================================================================
+--- sc/source/ui/vba/vbachartobjects.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbachartobjects.cxx	(.../cws/npower11)	(revision 266650)
+@@ -33,7 +33,7 @@
+ #include <com/sun/star/table/XTableChartsSupplier.hpp>
+ #include <com/sun/star/table/XTableChart.hpp>
+ #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+-#include <org/openoffice/excel/XlChartType.hpp>
++#include <ooo/vba/excel/XlChartType.hpp>
  
--SfxItemSet*  ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
-+ScCellRangeObj*  ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException )
- {
- 	uno::Reference< uno::XInterface > xIf;
- 	if ( mxRanges.is() )
-@@ -242,8 +247,13 @@ SfxItemSet*  ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
- 	else 
- 		xIf.set( mxRange, uno::UNO_QUERY_THROW );
- 	ScCellRangeObj* pUnoCellRange = dynamic_cast< ScCellRangeObj* >( xIf.get() );
--	SfxItemSet* pDataSet = 	pUnoCellRange ? pUnoCellRange->GetCurrentDataSet( true ) : NULL ;
-+	return pUnoCellRange;
-+}
- 	
-+SfxItemSet*  ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
-+{
-+	ScCellRangeObj* pUnoCellRange = getCellRangeObj();
-+	SfxItemSet* pDataSet = ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
- 	if ( !pDataSet )
- 		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't access Itemset for range" ) ), uno::Reference< uno::XInterface >() );
- 	return pDataSet;	
-@@ -317,7 +327,7 @@ class ScVbaRangeAreas : public ScVbaCollectionBaseImpl
- 	bool mbIsRows;
- 	bool mbIsColumns;
- public:
--	ScVbaRangeAreas( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, bool bIsRows, bool bIsColumns ) : ScVbaCollectionBaseImpl( uno::Reference< vba::XHelperInterface >(), xContext, xIndexAccess ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {}
-+	ScVbaRangeAreas( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, bool bIsRows, bool bIsColumns ) : ScVbaCollectionBaseImpl( uno::Reference< XHelperInterface >(), xContext, xIndexAccess ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {}
  
- 	// XEnumerationAccess
- 	virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException);
-@@ -460,7 +470,7 @@ public:
- 		if ( pUnoCellRange )
- 		{
- 			
--			SfxItemSet* pDataSet = 	pUnoCellRange->GetCurrentDataSet( true );
-+			SfxItemSet* pDataSet = 	ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
- 			SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, TRUE, NULL);
- 			// one of the cells in the range is not like the other ;-)
- 			// so return a zero length format to indicate that
-@@ -527,10 +537,38 @@ sal_Int32 m_nArea;
- typedef ::cppu::WeakImplHelper1< container::XEnumeration > CellsEnumeration_BASE;
- typedef ::std::vector< CellPos > vCellPos;
+ #include "vbachartobjects.hxx"
+@@ -44,17 +44,17 @@
+ #include <basic/sberrors.hxx>
  
-+// #FIXME - QUICK
-+// we could probably could and should modify CellsEnumeration below
-+// to handle rows and columns ( but I do this seperately for now 
-+// and.. this class only handles singe areas ( does it have to handle
-+// multi area ranges?? ) 
-+class ColumnsRowEnumeration: public CellsEnumeration_BASE
-+{
-+	uno::Reference< uno::XComponentContext > mxContext;
-+        uno::Reference< excel::XRange > mxRange;
-+	sal_Int32 mMaxElems;
-+	sal_Int32 mCurElem;
-+        
-+public:
-+	ColumnsRowEnumeration( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XRange >& xRange, sal_Int32 nElems ) : mxContext( xContext ), mxRange( xRange ), mMaxElems( nElems ), mCurElem( 0 )
-+        {
-+	}
-+
-+	virtual ::sal_Bool SAL_CALL hasMoreElements() throw (::uno::RuntimeException){ return mCurElem < mMaxElems; }
-+
-+	virtual uno::Any SAL_CALL nextElement() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
-+	{
-+		if ( !hasMoreElements() )
-+			throw container::NoSuchElementException();
-+		sal_Int32 vbaIndex = 1 + mCurElem++; 
-+		return uno::makeAny( mxRange->Item( uno::makeAny( vbaIndex ), uno::Any() ) ); 
-+	}
-+};
-+
- class CellsEnumeration : public CellsEnumeration_BASE
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+ 
+ class ChartObjectEnumerationImpl : public EnumerationHelperImpl
  {
- 	uno::Reference< uno::XComponentContext > mxContext;
--	uno::Reference< vba::XCollection > m_xAreas;
-+	uno::Reference< XCollection > m_xAreas;
- 	vCellPos m_CellPositions;	
- 	vCellPos::const_iterator m_it; 
- 	uno::Reference< table::XCellRange > getArea( sal_Int32 nVBAIndex ) throw ( uno::RuntimeException )
-@@ -559,7 +597,7 @@ class CellsEnumeration : public CellsEnumeration_BASE
- 		}
- 	}
+ 	uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier;
+-	uno::Reference< vba::XHelperInterface > xParent;
++	uno::Reference< XHelperInterface > xParent;
+ 	
  public:
--	CellsEnumeration( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< vba::XCollection >& xAreas ): mxContext( xContext ), m_xAreas( xAreas )
-+	CellsEnumeration( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCollection >& xAreas ): mxContext( xContext ), m_xAreas( xAreas )
- 	{
- 		sal_Int32 nItems = m_xAreas->getCount();
- 		for ( sal_Int32 index=1; index <= nItems; ++index )
-@@ -579,7 +617,7 @@ public:
- 		uno::Reference< table::XCellRange > xRangeArea = getArea( aPos.m_nArea );
- 		uno::Reference< table::XCellRange > xCellRange( xRangeArea->getCellByPosition(  aPos.m_nCol, aPos.m_nRow ), uno::UNO_QUERY_THROW );
- 		// #FIXME need proper (WorkSheet) parent
--		return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< vba::XHelperInterface >(), mxContext, xCellRange ) ) );
-+		return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xCellRange ) ) );
  
- 	}
+-	ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< vba::XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ), xParent( _xParent ) {}
++	ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ), xParent( _xParent ) {}
+ 	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) 
+ 	{ 
+ 		uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+@@ -64,7 +64,7 @@
  };
-@@ -751,6 +789,7 @@ protected:
- 	bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell )
- 	{
- 		rtl::OUString sFormula;
-+		double aDblValue = 0.0;
- 		if ( aValue >>= sFormula )
- 		{
-             // convert to CONV_OOO style formula string because XCell::setFormula
-@@ -778,6 +817,11 @@ protected:
- 			xCell->setFormula( sFormula );
- 			return true;
- 		}
-+		else if ( aValue >>= aDblValue )
-+		{
-+			xCell->setValue( aDblValue );
-+			return true;
-+		}
- 		return false;
- 	}
- 		
-@@ -803,7 +847,7 @@ public:
- 		{
- 			ScRangeList aCellRanges = pUnoRangesBase->GetRangeList();	
- 			ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart );
--            aCompiler.SetGrammar(formula::FormulaGrammar::GRAM_DEFAULT);
-+            aCompiler.SetGrammar(formula::FormulaGrammar::GRAM_PODF_A1);
- 			aCompiler.CompileString( sVal );
- 			// set desired convention
-             aCompiler.SetGrammar( m_eGrammar );
-@@ -939,9 +983,9 @@ public:
- class AreasVisitor
+ 
+ 
+-ScVbaChartObjects::ScVbaChartObjects( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjects_BASE(_xParent, _xContext, css::uno::Reference< css::container::XIndexAccess >( _xTableCharts, css::uno::UNO_QUERY ) ), xTableCharts( _xTableCharts ) , xDrawPageSupplier( _xDrawPageSupplier )
++ScVbaChartObjects::ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjects_BASE(_xParent, _xContext, css::uno::Reference< css::container::XIndexAccess >( _xTableCharts, css::uno::UNO_QUERY ) ), xTableCharts( _xTableCharts ) , xDrawPageSupplier( _xDrawPageSupplier )
  {
- private:
--	uno::Reference< vba::XCollection > m_Areas;
-+	uno::Reference< XCollection > m_Areas;
- public:
--	AreasVisitor( const uno::Reference< vba::XCollection >& rAreas ):m_Areas( rAreas ){} 
-+	AreasVisitor( const uno::Reference< XCollection >& rAreas ):m_Areas( rAreas ){} 
- 	
- 	void visit( RangeProcessor& processor )
- 	{
-@@ -1000,7 +1044,7 @@ public:
-  sal_Int32 nEndColOffset = 0, sal_Int32 nEndRowOffset = 0 )
- 	{
- 		// #FIXME need proper (WorkSheet) parent
--		return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, 
-+		return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, 
- 			xRange->getCellRangeByPosition(
- 				xCellRangeAddressable->getRangeAddress().StartColumn + nStartColOffset,
- 				xCellRangeAddressable->getRangeAddress().StartRow + nStartRowOffset,
-@@ -1098,12 +1142,12 @@ getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const
+ 
+ }
+@@ -191,7 +191,7 @@
+ 	if ( sNames.getLength() == 0 )
  	{
- 		uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pDocSh, *aCellRanges.First() ) );
- 		// #FIXME need proper (WorkSheet) parent
--		return new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xRange );
-+		return new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xRange );
+ 		sNames.realloc( 1 );
+-		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.ChartObjects") );
++		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ChartObjects") );
  	}
- 	uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocSh, aCellRanges ) );
-  	
- 	// #FIXME need proper (WorkSheet) parent
--	return new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xRanges );
-+	return new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xRanges );
+ 	return sNames;
  }
+Index: sc/source/ui/vba/vbaworksheet.cxx
+===================================================================
+--- sc/source/ui/vba/vbaworksheet.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaworksheet.cxx	(.../cws/npower11)	(revision 266650)
+@@ -47,6 +47,7 @@
+ #include <com/sun/star/sheet/XSheetPastable.hpp>
+ #include <com/sun/star/sheet/XCellAddressable.hpp>
+ #include <com/sun/star/sheet/XSheetOutline.hpp>
++#include <com/sun/star/sheet/XSheetPageBreak.hpp>
+ #include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
+ #include <com/sun/star/util/XURLTransformer.hpp>
+ #include <com/sun/star/frame/XDispatchProvider.hpp>
+@@ -56,6 +57,7 @@
+ #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+ #include <com/sun/star/drawing/XControlShape.hpp>
+ #include <com/sun/star/form/FormComponentType.hpp>
++#include <com/sun/star/form/XFormsSupplier.hpp>
  
- css::uno::Reference< excel::XRange >
-@@ -1151,27 +1195,36 @@ table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam,
+ #include <comphelper/processfactory.hxx>
+ 
+@@ -84,12 +86,14 @@
+ #include "vbaoleobject.hxx"
+ #include "vbaoleobjects.hxx"
+ #include "vbashapes.hxx"
++#include "vbapagesetup.hxx"
++#include "vbapagebreaks.hxx"
  
+ #define STANDARDWIDTH 2267
+ #define STANDARDHEIGHT 427
+ #define DOESNOTEXIST -1
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ static bool
+ nameExists( uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc, ::rtl::OUString & name, SCTAB& nTab ) throw ( lang::IllegalArgumentException )
+ {
+@@ -190,17 +194,17 @@
+ 	return xModel;
  }
  
--uno::Reference< vba::XCollection >
-+uno::Reference< XCollection >
- lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno::Reference<uno::XComponentContext>& xContext,  const uno::Reference< table::XCellRange >& xRange  ) throw( uno::RuntimeException )
+-ScVbaWorksheet::ScVbaWorksheet( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : WorksheetImpl_BASE( xParent, xContext )
++ScVbaWorksheet::ScVbaWorksheet( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : WorksheetImpl_BASE( xParent, xContext )
+ {
+ }
+-ScVbaWorksheet::ScVbaWorksheet(const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
++ScVbaWorksheet::ScVbaWorksheet(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
+ 		const uno::Reference< sheet::XSpreadsheet >& xSheet, 
+ 		const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) : WorksheetImpl_BASE( xParent, xContext ), mxSheet( xSheet ), mxModel(xModel)
  {
--	uno::Reference< vba::XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW ); 
-+	uno::Reference< XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW ); 
- 	ScDocument* pDoc = getDocumentFromRange(xRange);
- 	if ( !pDoc )
- 		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
- 	ScVbaPalette aPalette( pDoc->GetDocumentShell() );
-- 	uno::Reference< vba::XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) );
-+ 	uno::Reference< XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) );
- 	return borders;
  }
  
- ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> const & args,
--    uno::Reference< uno::XComponentContext> const & xContext )  throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< vba::XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), getModelFromRange( getXSomethingFromArgs< table::XCellRange >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
-+    uno::Reference< uno::XComponentContext> const & xContext )  throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), getModelFromXIf( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
+ ScVbaWorksheet::ScVbaWorksheet( uno::Sequence< uno::Any> const & args,
+-    uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) :  WorksheetImpl_BASE( getXSomethingFromArgs< vba::XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
++    uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) :  WorksheetImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
  {
--	mxRange.set( mxPropertySet, uno::UNO_QUERY_THROW );
--	uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxContext, mxRange ) );
-+	mxRange.set( mxPropertySet, uno::UNO_QUERY );
-+	mxRanges.set( mxPropertySet, uno::UNO_QUERY );
-+	uno::Reference< container::XIndexAccess >  xIndex;
-+	if ( mxRange.is() )
-+	{
-+		xIndex = new SingleRangeIndexAccess( mxContext, mxRange );
-+	}
-+	else if ( mxRanges.is() )
-+	{
-+		xIndex.set( mxRanges, uno::UNO_QUERY_THROW );
-+	}
- 	m_Areas = new ScVbaRangeAreas( mxContext, xIndex, mbIsRows, mbIsColumns );
+ 	if ( args.getLength() < 2 )
+ 		throw lang::IllegalArgumentException();
+@@ -247,6 +251,12 @@
+ 			(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ), aValue);
  }
  
--ScVbaRange::ScVbaRange( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange, sal_Bool bIsRows, sal_Bool bIsColumns ) throw( lang::IllegalArgumentException )
-+ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange, sal_Bool bIsRows, sal_Bool bIsColumns ) throw( lang::IllegalArgumentException )
- : ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRange, uno::UNO_QUERY_THROW ), getModelFromRange( xRange), true ), mxRange( xRange ),
-                 mbIsRows( bIsRows ),
-                 mbIsColumns( bIsColumns )
-@@ -1186,7 +1239,7 @@ ScVbaRange::ScVbaRange( const uno::Reference< vba::XHelperInterface >& xParent,
++sal_Int16
++ScVbaWorksheet::getIndex() throw (uno::RuntimeException)
++{
++	return getSheetID() + 1;
++}
++
+ uno::Reference< excel::XRange > 
+ ScVbaWorksheet::getUsedRange() throw (uno::RuntimeException)
+ {
+@@ -266,6 +276,22 @@
+ 	return new ScVbaOutline( this, mxContext, xOutline);
+ }
  
++uno::Reference< excel::XPageSetup >
++ScVbaWorksheet::PageSetup( ) throw (uno::RuntimeException)
++{
++	return new ScVbaPageSetup( this, mxContext, getSheet(), getModel() );
++}
++
++uno::Any
++ScVbaWorksheet::HPageBreaks( const uno::Any& aIndex ) throw (uno::RuntimeException)
++{
++    uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak(getSheet(),uno::UNO_QUERY_THROW);
++    uno::Reference< excel::XHPageBreaks > xHPageBreaks( new ScVbaHPageBreaks( this, mxContext, xSheetPageBreak)); 
++   if ( aIndex.hasValue() )
++      return xHPageBreaks->Item( aIndex, uno::Any()); 
++   return uno::makeAny( xHPageBreaks );
++}
++
+ sal_Int32 
+ ScVbaWorksheet::getStandardWidth() throw (uno::RuntimeException)
+ {
+@@ -416,6 +442,7 @@
+ 		uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ 		uno::Reference<container::XNameContainer> xNameContainer(xSheets,uno::UNO_QUERY_THROW);
+ 		xNameContainer->removeByName(aSheetName);
++        mxSheet.clear();
+ 	}
  }
  
--ScVbaRange::ScVbaRange( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges,  sal_Bool bIsRows, sal_Bool bIsColumns  ) throw ( lang::IllegalArgumentException )
-+ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges,  sal_Bool bIsRows, sal_Bool bIsColumns  ) throw ( lang::IllegalArgumentException )
- : ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRanges, uno::UNO_QUERY_THROW ), getModelFromXIf( uno::Reference< uno::XInterface >( xRanges, uno::UNO_QUERY_THROW ) ), true ), mxRanges( xRanges ),mbIsRows( bIsRows ), mbIsColumns( bIsColumns )
+@@ -536,7 +563,7 @@
+ 	}
+ 	if ( Index.hasValue() )
+ 	{
+-		uno::Reference< vba::XCollection > xColl( mxCharts, uno::UNO_QUERY_THROW );
++		uno::Reference< XCollection > xColl( mxCharts, uno::UNO_QUERY_THROW );
+ 		return xColl->Item( Index, uno::Any() );
+ 	}
+ 	else
+@@ -551,7 +578,7 @@
+ 	uno::Reference< sheet::XDataPilotTablesSupplier > xTables(xSheet, uno::UNO_QUERY_THROW ) ;
+ 	uno::Reference< container::XIndexAccess > xIndexAccess( xTables->getDataPilotTables(), uno::UNO_QUERY_THROW );
  
+-	uno::Reference< vba::XCollection > xColl(  new ScVbaPivotTables( this, mxContext, xIndexAccess ) );
++	uno::Reference< XCollection > xColl(  new ScVbaPivotTables( this, mxContext, xIndexAccess ) );
+ 	if ( Index.hasValue() )
+ 		return xColl->Item( Index, uno::Any() );
+ 	return uno::makeAny( xColl );
+@@ -564,7 +591,7 @@
+ 	uno::Reference< sheet::XSheetAnnotationsSupplier > xAnnosSupp( xSheet, uno::UNO_QUERY_THROW );
+ 	uno::Reference< sheet::XSheetAnnotations > xAnnos( xAnnosSupp->getAnnotations(), uno::UNO_QUERY_THROW );
+ 	uno::Reference< container::XIndexAccess > xIndexAccess( xAnnos, uno::UNO_QUERY_THROW );
+-	uno::Reference< vba::XCollection > xColl(  new ScVbaComments( this, mxContext, xIndexAccess ) );
++	uno::Reference< XCollection > xColl(  new ScVbaComments( this, mxContext, xIndexAccess ) );
+ 	if ( Index.hasValue() )
+ 		return xColl->Item( Index, uno::Any() );
+ 	return uno::makeAny( xColl );
+@@ -656,29 +683,10 @@
+ uno::Any SAL_CALL 
+ ScVbaWorksheet::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
  {
-@@ -1199,7 +1252,7 @@ ScVbaRange::~ScVbaRange()
- {
+-/*	uno::Any aProp = getControl( aPropertyName );
+-
+-	if ( !aProp.hasValue() )
+-		throw beans::UnknownPropertyException(); // unsupported operation
+-	// #TODO we need a factory here when we support
+-	// more control types
+-	sal_Int32 nClassId = -1;	
+-	uno::Reference< beans::XPropertySet > xProps( aProp, uno::UNO_QUERY_THROW );	
+-	const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
+-	xProps->getPropertyValue( sClassId ) >>= nClassId;
+-    ScVbaControlFactory controlFactory( m_xContext, xProps, xControlShape );
+-    uno::Reference< vba::XControl > xControl( controlFactory.createControl( nClassId ) );
+-	if ( nClassId == form::FormComponentType::COMBOBOX )
+-	{
+-		uno::Reference< msforms::XComboBox > xCbx( new ScVbaComboBox( m_xContext, xProps ) ); 
+-		return uno::makeAny( xCbx );
+-	}
+-*/
+     uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW );
+-    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;
  }
  
--uno::Reference< vba::XCollection >& ScVbaRange::getBorders()
-+uno::Reference< XCollection >& ScVbaRange::getBorders()
+ ::sal_Bool SAL_CALL 
+@@ -686,82 +694,67 @@
  {
- 	if ( !m_Borders.is() )
- 	{
-@@ -1532,7 +1585,7 @@ ScVbaRange::fillSeries( sheet::FillDirection nFillDirection, sheet::FillMode nFi
- 	if ( m_Areas->getCount() > 1 )
- 	{
- 		// Multi-Area Range
--		uno::Reference< vba::XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW );
-+		uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW );
- 		for ( sal_Int32 index = 1; index <= xCollection->getCount(); ++index )
- 		{
- 			uno::Reference< excel::XRange > xRange( xCollection->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
-@@ -1739,7 +1792,7 @@ ScVbaRange::Address(  const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
- 	{
- 		// Multi-Area Range
- 		rtl::OUString sAddress;
--		uno::Reference< vba::XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW );
-+		uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW );
-                 uno::Any aExternalCopy = External;
- 		for ( sal_Int32 index = 1; index <= xCollection->getCount(); ++index )
- 		{
-@@ -1822,15 +1875,15 @@ ScVbaRange::Font() throw ( script::BasicErrorException, uno::RuntimeException)
- 		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
- 
- 	ScVbaPalette aPalette( pDoc->GetDocumentShell() );	
--	SfxItemSet* pSet = NULL;
-+	ScCellRangeObj* pRangeObj = NULL;
+ 	return sal_False;
+ }
+-::sal_Bool SAL_CALL 
+-ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
++
++uno::Reference< container::XNameAccess > 
++ScVbaWorksheet::getFormControls()
+ {
++	uno::Reference< container::XNameAccess > xFormControls;
  	try
  	{
--		pSet = getCurrentDataSet();
-+		pRangeObj = getCellRangeObj();
+-		if ( getControl( aName ).hasValue() )
+-			return sal_True;
++		uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
++		uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
++		uno::Reference< form::XFormsSupplier >  xFormSupplier( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
++    		uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
++		// get the www-standard container ( maybe we should access the 
++		// 'www-standard' by name rather than index, this seems an
++		// implementation detail
++		xFormControls.set( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
++		
  	}
- 	catch( uno::Exception& ) 
+ 	catch( uno::Exception& )
  	{
  	}
--	return  new ScVbaFont( this, mxContext, aPalette, xProps, pSet );
-+	return  new ScVbaFont( this, mxContext, aPalette, xProps, pRangeObj );
+-	return sal_False;
+-}
+-uno::Any 
+-ScVbaWorksheet::getControl( const ::rtl::OUString& sName )
+-{
+-	uno::Reference< sheet::XScenarioEnhanced > xIf( getSheet(), uno::UNO_QUERY_THROW );
+-	ScTableSheetObj* pTab= static_cast< ScTableSheetObj* >( xIf.get() );
+-	ScDocShell* pShell = NULL;
+-	if ( pTab ) 
+-		pShell = pTab->GetDocShell();
+-	if ( pShell )
+-	{
+-		ScDrawLayer* pDrawLayer = pShell->MakeDrawLayer();
+-		SCTAB nTab = 0;
+-		// make GetTab_Impl() public or this class a friend
+-		const ScRangeList& rRanges = pTab->GetRangeList();
+-		const ScRange* pFirst = rRanges.GetObject(0);
+-		if (pFirst)
+-			nTab = pFirst->aStart.Tab();
++	return xFormControls;
+ 
+-		SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
+-		if ( pPage )
+-		{
+-			ULONG nCount = pPage->GetObjCount(); 
+-			for ( ULONG index=0; index<nCount; ++index )
+-			{
+-				SdrObject* pObj = pPage->GetObj( index );
+-				if ( pObj )
+-				{
+-					
+-					SdrUnoObj* pUnoObj = PTR_CAST(SdrUnoObj, pObj);
+-					if ( pUnoObj )
+-					{
+-						uno::Reference< container::XNamed > xNamed( pUnoObj->GetUnoControlModel(), uno::UNO_QUERY_THROW );
+-						if ( sName.equals( xNamed->getName() ) )
+-							return uno::makeAny( xNamed );
+-					}
+ 				}
+-			}
+-		}
+-	}
+-
+-	return uno::Any();
++::sal_Bool SAL_CALL 
++ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
++{
++	uno::Reference< container::XNameAccess > xFormControls( getFormControls() );
++	if ( xFormControls.is() )
++		return xFormControls->hasByName( aName );
++	return sal_False;
  }
-                                                                                                                              
- uno::Reference< excel::XRange >
-@@ -1847,14 +1900,43 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
- 	}
  
- 	sal_Int32 nRow = 0, nColumn = 0;
--	sal_Bool bIsIndex = nRowIndex >>= nRow, bIsColumnIndex = nColumnIndex >>= nColumn;
-+                                                                                                                       
-+	sal_Bool bIsIndex = nRowIndex.hasValue();
-+	sal_Bool bIsColumnIndex = nColumnIndex.hasValue();
+ uno::Any
+ ScVbaWorksheet::getControlShape( const ::rtl::OUString& sName )
+ {
+-	//uno::Reference< sheet::XScenarioEnhanced > xIf( getSheet(), uno::UNO_QUERY_THROW );
+-    uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
+-    uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
+-    uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+-    uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPage, uno::UNO_QUERY_THROW );
++    // ideally we would get an XControl object but it appears an XControl
++    // implementation only exists for a Control implementation optained from the 
++    // view ( e.g. in basic you would get this from
++    // thiscomponent.currentcontroller.getControl( controlModel ) )
++    // and the thing to realise is that it is only possible to get an XControl
++    // for a currently displayed control :-( often we would want to modify 
++    // a control not on the active sheet. But.. you can always access the 
++    // XControlShape from the DrawPage whether that is the active drawpage or not
 +
-+	// Sometimes we might get a float or a double or whatever
-+	// set in the Any, we should convert as appropriate
-+	// #FIXME - perhaps worth turning this into some sort of
-+	// convertion routine e.g. bSuccess = getValueFromAny( nRow, nRowIndex, getCppuType((sal_Int32*)0) )
-+	if ( nRowIndex.hasValue() && !( nRowIndex >>= nRow ) )
-+	{
-+		uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
-+		uno::Any aConverted;
-+		try
-+		{
-+			aConverted = xConverter->convertTo( nRowIndex, getCppuType((sal_Int32*)0) );
-+			bIsIndex = ( aConverted >>= nRow );
-+		}
-+		catch( uno::Exception& ) {} // silence any errors
-+	}
-+	if ( bIsColumnIndex && !( nColumnIndex >>= nColumn ) )
-+	{
-+		uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
-+		uno::Any aConverted;
-+		try
-+		{
-+			aConverted = xConverter->convertTo( nColumnIndex, getCppuType((sal_Int32*)0) );
-+			bIsColumnIndex = ( aConverted >>= nColumn );
-+		}
-+		catch( uno::Exception& ) {} // silence any errors
-+	}
-                                                                                                                        
- 	RangeHelper thisRange( mxRange );
- 	table::CellRangeAddress thisRangeAddress =  thisRange.getCellRangeAddressable()->getRangeAddress();
- 	uno::Reference< table::XCellRange > xSheetRange = thisRange.getCellRangeFromSheet();
- 	if( !bIsIndex && !bIsColumnIndex ) // .Cells
- 		// #FIXE needs proper parent ( Worksheet )
--		return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< vba::XHelperInterface >(), mxContext, mxRange ) );
-+		return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, mxRange ) );
- 
- 	sal_Int32 nIndex = --nRow;
- 	if( bIsIndex && !bIsColumnIndex ) // .Cells(n)
-@@ -1890,6 +1972,19 @@ ScVbaRange::Select() throw (uno::RuntimeException)
- 			xSelection->select( uno::makeAny( mxRanges ) );
- 		else
- 			xSelection->select( uno::makeAny( mxRange ) );
-+		// set focus on document e.g.
-+		// ThisComponent.CurrentController.Frame.getContainerWindow.SetFocus
-+		try
-+		{
-+			uno::Reference< frame::XController > xController( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
-+			uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_QUERY_THROW );
-+			uno::Reference< awt::XWindow > xWin( xFrame->getContainerWindow(), uno::UNO_QUERY_THROW );
-+			xWin->setFocus();
-+	}
-+		catch( uno::Exception& )
-+		{
-+}
++    uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getSheet(), uno::UNO_QUERY_THROW );
++    uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
 +
+     sal_Int32 nCount = xIndexAccess->getCount();
+     for( int index = 0; index < nCount; index++ )
+     {
+         uno::Any aUnoObj =  xIndexAccess->getByIndex( index );
+-        uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY_THROW );
+-        uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl() );
+-        uno::Reference< container::XNamed > xNamed( xControlModel, uno::UNO_QUERY_THROW );
++ 		// It seems there are some drawing objects that can not query into Control shapes?
++        uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY );
++ 		if( xControlShape.is() )
++ 		{
++     	    uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+         if( sName.equals( xNamed->getName() ))
+         {
+             return aUnoObj;
+         }
+-
++ 		}
+     }
+     return uno::Any();
+ }
+@@ -793,7 +786,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheet" ) );
  	}
+ 	return aServiceNames;
  }
- 
-@@ -2687,6 +2782,167 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
- 	return sal_True; // always
+@@ -856,7 +849,30 @@
+ 	return xAddressable->getRangeAddress().Sheet;
  }
  
-+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)
++void SAL_CALL 
++ScVbaWorksheet::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, const uno::Any& IgnorePrintAreas ) throw (uno::RuntimeException)
 +{
-+    // return a Range object that represents the first cell where that information is found.
-+    rtl::OUString sWhat;
-+    sal_Int32 nWhat = 0;
-+    float fWhat = 0.0;
-+    
-+    // string.
-+    if( What >>= sWhat )
-+    {
-+        if( !sWhat.getLength() )
-+		    throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
-+    }
-+    else if( What >>= nWhat )
-+    {
-+        sWhat = rtl::OUString::valueOf( nWhat );
-+    }
-+    else if( What >>= fWhat )
-+    {
-+        sWhat = rtl::OUString::valueOf( fWhat );
-+    }
-+    else
-+	    throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
-+
-+    rtl::OUString sSearch = VBAToRegexp( sWhat );
++	sal_Int32 nTo = 0;
++	sal_Int32 nFrom = 0;
++	sal_Int16 nCopies = 1;
++	sal_Bool bCollate = sal_False;
++	sal_Bool bSelection = sal_False;
++    sal_Bool bIgnorePrintAreas = sal_False;
++	From >>= nFrom;
++	To >>= nTo;
++	Copies >>= nCopies;
++    IgnorePrintAreas >>= bIgnorePrintAreas;
++	if ( nCopies > 1 ) // Collate only useful when more that 1 copy
++		Collate >>= bCollate;
+ 
++	if ( !( nFrom || nTo ) )
++		bSelection = sal_True;
 +
-+	const SvxSearchItem& globalSearchOptions = ScGlobal::GetSearchItem();
-+	SvxSearchItem newOptions( globalSearchOptions );
++    uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );  
++	PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, xModel, bSelection );
++}
 +
-+	sal_Int16 nLookAt =  globalSearchOptions.GetWordOnly() ?  excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole; 
-+	sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns;
 +
-+	uno::Reference< util::XSearchable > xSearch( mxRange, uno::UNO_QUERY );
-+    if( xSearch.is() )
-+    {
-+        uno::Reference< util::XSearchDescriptor > xDescriptor = xSearch->createSearchDescriptor();
-+        xDescriptor->setSearchString( sSearch );
+ namespace worksheet
+ {
+ namespace sdecl = comphelper::service_decl;
+@@ -864,5 +880,5 @@
+ extern sdecl::ServiceDecl const serviceDecl(
+     serviceImpl,
+     "ScVbaWorksheet",
+-    "org.openoffice.excel.Worksheet" );
++    "ooo.vba.excel.Worksheet" );
+ }
+Index: sc/source/ui/vba/testvba/TestVBA.java
+===================================================================
+--- sc/source/ui/vba/testvba/TestVBA.java	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/testvba/TestVBA.java	(.../cws/npower11)	(revision 266650)
+@@ -1,198 +0,0 @@
+-//package org.openoffice.vba;
+-import com.sun.star.uno.UnoRuntime;
+-import com.sun.star.script.provider.*;
+-import com.sun.star.beans.XPropertySet;
+-import com.sun.star.uno.AnyConverter;
+-import java.io.File;
+-import java.io.InputStream;
+-import java.io.FileInputStream;
+-import java.io.FileOutputStream;
+-import java.io.OutputStream;
+-public class TestVBA
+-{
+-private com.sun.star.lang.XMultiComponentFactory xMCF = null;
+-private com.sun.star.uno.XComponentContext xContext = null;
+-private com.sun.star.frame.XComponentLoader xCompLoader = null;
+-private File outDir;
+-
+-public TestVBA( com.sun.star.uno.XComponentContext _xContext, com.sun.star.lang.XMultiComponentFactory _xMCF, com.sun.star.frame.XComponentLoader _xCompLoader, File _outDir 
+-) 
+-{
+-    xMCF = _xMCF;
+-    xContext = _xContext;
+-    xCompLoader = _xCompLoader;
+-    outDir = _outDir;
+-}
+-
+-public String getLogLocation() throws  com.sun.star.beans.UnknownPropertyException,  com.sun.star.lang.IllegalArgumentException, com.sun.star.lang.WrappedTargetException,  com.sun.star.uno.Exception
+-{
+-	XPropertySet pathSettings = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,  xMCF.createInstanceWithContext( "com.sun.star.comp.framework.PathSettings", xContext) );
+-        String sLogLocation = AnyConverter.toString ( pathSettings.getPropertyValue( "Work" ) );
+-        sLogLocation = sLogLocation + "/" + "HelperAPI-test.log";
+-	return sLogLocation;
+-}
+-
+-public void init()
+-{
+-    // blow away previous logs?
+-}
+-
+-public void traverse( File fileDirectory ) 
+-{
+-        if ( !fileDirectory.isDirectory() ) 
+-        {
+-            throw new IllegalArgumentException(
+-                "not a directory: " + fileDirectory.getName()
+-                );
+-        }
+-
+-        // Getting all files and directories in the current directory
+-        File[] entries = fileDirectory.listFiles();
+-
+-   	 
+-        // Iterating for each file and directory
+-        for ( int i = 0; i < entries.length; ++i ) 
+-        {
+-            // Testing, if the entry in the list is a directory
+-/*
+-            if ( entries[ i ].isDirectory() ) 
+-            {
+-                // ignore Recursive call for the new directory
+-                // traverse( entries[ i ] );
+-            } 
+-            else 
+-*/
+-            if ( !entries[ i ].isDirectory() &&
+-              entries[ i ].getName().endsWith(".xls") ) 
+-            {
+-                try 
+-                {
+-                    // Composing the URL by replacing all backslashs
+-                    String sUrl = "file:///"
+-                        + entries[ i ].getAbsolutePath().replace( '\\', '/' );
+-                    System.out.println( "processing " + sUrl );                   	 
+-                    // Loading the wanted document
+-                    com.sun.star.beans.PropertyValue propertyValues[] =
+-                        new com.sun.star.beans.PropertyValue[1];
+-                    propertyValues[0] = new com.sun.star.beans.PropertyValue();
+-                    propertyValues[0].Name = "Hidden";
+-                    propertyValues[0].Value = new Boolean(true);
+-                    propertyValues[0].Value = new Boolean(false);
+-
+-                    Object oDoc =
+-                        xCompLoader.loadComponentFromURL(
+-                            sUrl, "_blank", 0, propertyValues);
+-                    String logFileURL = getLogLocation();
+-                    java.net.URI logURI = new java.net.URI( logFileURL );
+-                    java.net.URL logURL = logURI.toURL();
+-                    try
+-                    {
+-                        XScriptProviderSupplier xSupplier =
+-                            (XScriptProviderSupplier)UnoRuntime.queryInterface(
+-                                XScriptProviderSupplier.class, oDoc ); 
+-			File logFile = new File( logURI );
+-                        if ( logFile.exists() )
+-                        {
+-                            if ( !logFile.delete() )
+-                                 throw new java.lang.RuntimeException("failed to delete " + logFileURL );
+-                        }
+-
+-                        XScriptProvider xProv = xSupplier.getScriptProvider();
+-                        XScript xScript = xProv.getScript("vnd.sun.star.script:Standard.TestMacros.Main?language=Basic&location=document");
+-                        System.out.println("Got script for doc " + entries[ i ] );
+-                        Object[][] out = new Object[1][0];
+-                        out[0] = new Object[0];
+-
+-                        short[][] num = new short[1][0];
+-                        num[0] = new short[0];
+-
+-                    	xScript.invoke(new Object[0], num, out); 
+-
+-			logFile = new File( logURI ); 
+-                       	System.out.println( "fileName is " + entries[ i ].getName().substring(0,  entries[ i ].getName().lastIndexOf( ".xls" ) ) );
+-                        File newLoc = new File( outDir,  entries[ i ].getName().substring(0,  entries[ i ].getName().lastIndexOf( ".xls" ) ) + ".log" );
+-			System.out.println("Moving logfile to " + newLoc.getAbsolutePath() );
+-			boolean ret = logFile.renameTo( newLoc );
+-           
+-			System.out.println("Have run and move of log file worked = " + ret );
+-                    }
+-                    catch ( Exception ex )
+-                    {
+-                       ex.printStackTrace(System.err);                    
+-                    
+-                    }
+-                    // interface is supported, otherwise use XComponent.dispose
+-                    com.sun.star.util.XCloseable xCloseable =
+-                        (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(
+-                            com.sun.star.util.XCloseable.class, oDoc);
+-                    
+-                    if ( xCloseable != null ) 
+-                    {
+-                        xCloseable.close(false);
+-                    } 
+-                    else 
+-                    {
+-                        com.sun.star.lang.XComponent xComp =
+-                            (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
+-                                com.sun.star.lang.XComponent.class, oDoc);
+-                        
+-                        xComp.dispose();
+-                    }
+-                }
+-                catch( Exception e ) 
+-                {
+-                    e.printStackTrace(System.err);                    
+-                }
+-                
+-            }
+-        }
+-}
+-public static void usage()
+-{
+-	System.out.println("usage: java  TestVba.java " +
+-                "\"<path to testdocument dir>\" " +
+-                " \"<output_directory>\"");
+-        System.exit(1);
+-
+-}
+-public static  void  main( String[] args )
+-{
+-	if ( !( args.length > 1 ) )
+-		usage();
+-	
+-	com.sun.star.uno.XComponentContext xContext = null;
+-            
+-        try 
+-	{
+-            // get the remote office component context
+-            xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
+-            System.out.println("Connected to a running office ...");
+-
+-            // get the remote office service manager
+-            com.sun.star.lang.XMultiComponentFactory xMCF =
+-                xContext.getServiceManager();
+-            
+-            Object oDesktop = xMCF.createInstanceWithContext(
+-                "com.sun.star.frame.Desktop", xContext);
+-        
+-            com.sun.star.frame.XComponentLoader  xCompLoader = (com.sun.star.frame.XComponentLoader)
+-                UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class,
+-                                          oDesktop);
+-           
+-            File testDir = new File(args[0]);
+-            File outDir = new File(args[1]);
+-            if ( !testDir.isDirectory() || !outDir.isDirectory() ) 
+-                usage();
+-            TestVBA inst = new TestVBA( xContext, xMCF, xCompLoader, outDir );
+-            inst.traverse( testDir );            
+-            System.out.println("Log dir is " + inst.getLogLocation() );
+-        
+-	}
+-	catch( Exception e )
+-	{
+-		System.out.println("Caught exception");
+-		System.out.println(e);
+-	}	
+-	System.exit(0);
+-}
+-}
+Index: sc/source/ui/vba/testvba/build.xml
+===================================================================
+--- sc/source/ui/vba/testvba/build.xml	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/testvba/build.xml	(.../cws/npower11)	(revision 266650)
+@@ -1,95 +0,0 @@
+-<!--
+-
+-  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: build.xml,v $
+- 
+-  $Revision: 1.3.138.1 $
+- 
+-  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.
+- 
+--->
+-<project name="testvba" default="all" basedir=".">
+-
+-  <!-- =================== Environmental Properties ======================= -->
+-
+-  <property name="prj" value=".."/>
+-  <property name="build.compiler"   value="classic"/>
+-  <property name="optimize"   value="off"/>
+-  <property name="debug"   value="on"/>
+-  <property name="jardir" value="${out}/class"/>
+-  <property name="bindir" value="${out}/bin"/>
+-
+-  <!-- ==================== build classpath setting ======================= -->
+-  <path id="idlclasspath">
+-    <pathelement location="${solar.jar}/jurt.jar"/>
+-    <pathelement location="${solar.jar}/unoil.jar"/>
+-    <pathelement location="${solar.jar}/juh.jar"/>
+-    <pathelement location="${solar.jar}/java_uno.jar"/>
+-    <pathelement location="${solar.jar}/ridl.jar"/>
+-  </path> 
+-
+-  <!-- ==================== build classpath setting ======================= -->
+-  <path id="clientclasspath">
+-    <pathelement location="${test.officepath}/program/classes/jurt.jar"/>
+-    <pathelement location="${test.officepath}/program/classes/unoil.jar"/>
+-    <pathelement location="${test.officepath}/program/classes/juh.jar"/>
+-    <pathelement location="${test.officepath}/program/classes/java_uno.jar"/>
+-    <pathelement location="${test.officepath}/program/classes/ridl.jar"/>
+-    <pathelement location="${out}/class"/>
+-  </path> 
+-
+- <property name="debugcp" refid="clientclasspath"/>
+-  <!-- ===================== Prepare Directories ========================= -->
+-  <target name="prepare">
+-    <mkdir dir="${jardir}"/>
+-  </target>
+-
+-  <!-- ======================== Compile Classes ========================== -->
+-  <target name="compile" depends="prepare">
+-    <javac srcdir="." destdir="${jardir}"
+-         includes="**/*.java" classpathref="idlclasspath"
+-         debug="${debug}" optimize="${optimize}" deprecation="off">
+-    </javac>
+-  </target>
+-
+-  <!-- ====================== Clean Generated Files ===================== -->
+-  <target name="clean">
+-    <delete dir="${jardir}"/>
+-  </target>
+-  <!-- ========================= All In One Build ======================= -->
+-
+-  <!-- 
+-  <target name="all" depends="compile"/>
+--->
+-
+-  <target name="all" depends="test"/>
+-
+-  <target name="test" depends="compile">
+-	<echo> testcp = ${debugcp}" 
+-	</echo>
+-       <java classname="TestVBA" fork="true" dir="." classpathref="clientclasspath">
+-         <arg value="${test.documents}"/>
+-         <arg value="${test.out}"/>
+-       </java>
+-  </target>
+-</project>
+Index: sc/source/ui/vba/testvba/TestDocuments/datevalue.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/datevalue.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+Added: svn:executable
+   + *
+
+Index: sc/source/ui/vba/testvba/TestDocuments/replace.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/replace.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+Added: svn:executable
+   + *
+
+Index: sc/source/ui/vba/testvba/TestDocuments/Template.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/Template.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+Added: svn:executable
+   + *
+
+Index: sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+Added: svn:executable
+   + *
+
+Index: sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/Ranges-2.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/Ranges-2.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/Ranges-3.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/Ranges-3.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/format.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/format.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/window2.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/window2.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+Added: svn:executable
+   + *
+
+Index: sc/source/ui/vba/testvba/TestDocuments/bytearraystring.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/bytearraystring.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+Added: svn:executable
+   + *
+
+Index: sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+Added: svn:executable
+   + *
+
+Index: sc/source/ui/vba/testvba/TestDocuments/range-4.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/range-4.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+Added: svn:executable
+   + *
+
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,8 @@
++Test run started : 19/06/2007 11:21:42
++----------------------------------------------------------------
++MyGoalseek-Issue
++ TEST START : MyGoalseek-Issue
++  ITEM Assertion OK : Variable Range value: 15
++END 'MyGoalseek-Issue' Symbol
++ TEST OK : MyGoalseek-Issue
++Test run finished : 19/06/2007 11:21:42
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,280 @@
++Test run started : 01/06/2007 11:28:58
++----------------------------------------------------------------
++ApplicationMethods
++ TEST START : ApplicationMethods
++  ITEM Assertion OK :  Name of Workbook is: Ranges.xls
++  ITEM Assertion OK :  Address of Application.Columns is: $A:$A
++  ITEM Assertion OK :  Address of Application.Rows is: $1:$1
++  ITEM Assertion OK :  Address of Application.Range is: $1:$1,$5:$7
++  ITEM Assertion OK :  Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
++  ITEM Assertion OK :  Please check manually: Library Path is: C:\Program Files\Microsoft Office\OFFICE11\LIBRARY
++  ITEM Assertion OK :  Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\Microsoft\Templates\
++  ITEM Assertion OK :  FileSeparator is \
++  ITEM Assertion OK :  Name of ActiveWorkbook is: Ranges.xls
++END 'ApplicationMethods' Symbol
++ TEST OK : ApplicationMethods
++----------------------------------------------------------------
++Insert-Issue
++ TEST START : Insert-Issue
++  ITEM Assertion OK : Insert with xlShiftToRight: 10
++END 'Insert-Issue' Symbol
++ TEST OK : Insert-Issue
++----------------------------------------------------------------
++MergeCells-Issue
++ TEST START : MergeCells-Issue
++  ITEM Assertion OK :  Range.MergeCells is True
++  ITEM Assertion OK : MergeCells is null: True
++  ITEM Assertion OK : RowCount after Merge: 6
++  ITEM Assertion OK :  Range.MergeCells is False
++  ITEM Assertion OK : MergeCells is null: False
++  ITEM Assertion OK : MergeCells of Second Area is null : True
++  ITEM Assertion OK : MergeCells of Ranges is Null: True
++  ITEM Assertion OK : RowCount after Merge: 7
++  ITEM Assertion OK :  Range.MergeCells is False
++  ITEM Assertion OK : MergeCells is null: False
++  ITEM Assertion OK : RowCount after Merge: 7
++END 'MergeCells-Issue' Symbol
++ TEST OK : MergeCells-Issue
++----------------------------------------------------------------
++Areas-Issue
++ TEST START : Areas-Issue
++  ITEM Assertion OK : Range Areas Count is2
++  ITEM Assertion OK : First Range Address is: $E$8:$G$13
++  ITEM Assertion OK : First Row is: 8
++  ITEM Assertion OK : First Column is: 5
++  ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
++  ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
++  ITEM Assertion OK : Range Count:53
++END 'Areas-Issue' Symbol
++ TEST OK : Areas-Issue
++----------------------------------------------------------------
++Fill-Methods-Issue
++ TEST START : Fill-Methods-Issue
++  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyRightFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyBottomFillValue
++END 'Fill-Methods-Issue' Symbol
++ TEST OK : Fill-Methods-Issue
++----------------------------------------------------------------
++Range/Item-Method-Issue
++ TEST START : Range/Item-Method-Issue
++  ITEM Assertion OK :  Range of multiple columns is: $A:$A,$C:$C
++  ITEM Assertion OK :  Range of multiple rows is: $1:$1,$5:$7
++  ITEM Assertion OK :  Range of several columns is: $C:$E,$D:$D
++  ITEM Assertion OK :  Range of several rows is: $5:$8,$6:$10
++  ITEM Assertion OK :  Range of several single cells is: $C$5,$E$8
++  ITEM Assertion OK :  Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK :  Range of a single Item Cell is: $E$21
++  ITEM Assertion OK :  Range of a single Item Cell is: $F$21
++  ITEM Assertion OK :  Range of a single Item Cell is: $F$10
++END 'Range/Item-Method-Issue' Symbol
++ TEST OK : Range/Item-Method-Issue
++----------------------------------------------------------------
++R1C1-Formulas-Issue
++ TEST START : R1C1-Formulas-Issue
++  ITEM Assertion OK :  R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
++  ITEM Assertion OK :  Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
++END 'R1C1-Formulas-Issue' Symbol
++ TEST OK : R1C1-Formulas-Issue
++----------------------------------------------------------------
++Verify_Delete
++ TEST START : Verify_Delete
++  ITEM Assertion OK : Ranges are intersecting: $G$13
++  ITEM Assertion OK : Delete with Default: $AJ$4
++  ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
++  ITEM Assertion OK : Delete with ShiftUp: $M$22
++END 'Verify_Delete' Symbol
++ TEST OK : Verify_Delete
++----------------------------------------------------------------
++Value-Issue
++ TEST START : Value-Issue
++  ITEM Assertion OK : Value of Range is: 12.3
++  ITEM Assertion OK : Text of Range is: 12.3
++  ITEM Assertion OK : Range has Formula: False
++  ITEM Assertion OK : Cell has Formula: False
++  ITEM Assertion OK : Text of Range is null: True
++  ITEM Assertion OK : Range has Formula: True
++  ITEM Assertion OK : Cell has Formula: True
++  ITEM Assertion OK : Value of Cell is: 12
++  ITEM Assertion OK : Application.Calculation is : -4135
++  ITEM Assertion OK : Calculation is automated: True
++  ITEM Assertion OK : Range has Formula: True
++  ITEM Assertion OK : Value of Cell is: 16
++  ITEM Assertion OK : Text of Cell is: 16
++  ITEM Assertion OK : Text of Cell is: 16
++  ITEM Assertion OK : Range has Formula after 'ClearContents: False
++  ITEM Assertion OK : Text of Cell is: 
++  ITEM Assertion OK : Text of Cell is: 
++END 'Value-Issue' Symbol
++ TEST OK : Value-Issue
++----------------------------------------------------------------
++AutoFit issue
++ TEST START : AutoFit issue
++  ITEM Assertion OK :  Columns.AutoFit: CurrentWidth is 673
++  ITEM Assertion OK :  Rows.AutoFit: CurrentHeight is 612
++END 'AutoFit issue' Symbol
++ TEST OK : AutoFit issue
++----------------------------------------------------------------
++Selections
++ TEST START : Selections
++  ITEM Assertion OK : ActiveCell is : $E$8
++  ITEM Assertion OK : Active Cell is : $E$8
++  ITEM Assertion OK : Number of Cells in Range: 53
++  ITEM Assertion OK : Number of Cells in Range: 53
++  ITEM Assertion OK : Number of Cells in Range: 53
++END 'Selections' Symbol
++ TEST OK : Selections
++----------------------------------------------------------------
++Offset-Resize
++ TEST START : Offset-Resize
++  ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
++  ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
++  ITEM Assertion OK :   Resized Range is : $A$20:$D$23
++END 'Offset-Resize' Symbol
++ TEST OK : Offset-Resize
++----------------------------------------------------------------
++Ranges-Address
++ TEST START : Ranges-Address
++  ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
++  ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
++  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++  ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
++END 'Ranges-Address' Symbol
++ TEST OK : Ranges-Address
++----------------------------------------------------------------
++Range-Address
++ TEST START : Range-Address
++  ITEM Assertion OK : Range Address is: $E$8:$G$13
++  ITEM Assertion OK : Range Address is: $E8:$G13
++  ITEM Assertion OK : Range Address is: E$8:G$13
++  ITEM Assertion OK : Range Address is: R8C5:R13C7
++  ITEM Assertion OK : Range Address is: $E$8:$G$13
++  ITEM Assertion OK : Range Address is: R8C5:R13C7
++  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
++END 'Range-Address' Symbol
++ TEST OK : Range-Address
++----------------------------------------------------------------
++Column-Address
++ TEST START : Column-Address
++  ITEM Assertion OK : Range Address is: $F$8:$F$13
++  ITEM Assertion OK : Range Address is: $F8:$F13
++  ITEM Assertion OK : Range Address is: F$8:F$13
++  ITEM Assertion OK : Range Address is: R8C6:R13C6
++  ITEM Assertion OK : Range Address is: $F$8:$F$13
++  ITEM Assertion OK : Range Address is: R8C6:R13C6
++  ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
++END 'Column-Address' Symbol
++ TEST OK : Column-Address
++----------------------------------------------------------------
++Row-Address
++ TEST START : Row-Address
++  ITEM Assertion OK : Range Address is: $E$9:$G$9
++  ITEM Assertion OK : Range Address is: $E9:$G9
++  ITEM Assertion OK : Range Address is: E$9:G$9
++  ITEM Assertion OK : Range Address is: R9C5:R9C7
++  ITEM Assertion OK : Range Address is: $E$9:$G$9
++  ITEM Assertion OK : Range Address is: R9C5:R9C7
++  ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
++END 'Row-Address' Symbol
++ TEST OK : Row-Address
++----------------------------------------------------------------
++SingleCell-Address
++ TEST START : SingleCell-Address
++  ITEM Assertion OK : Range Address is: $F$9
++  ITEM Assertion OK : Range Address is: $F9
++  ITEM Assertion OK : Range Address is: F$9
++  ITEM Assertion OK : Range Address is: R9C6
++  ITEM Assertion OK : Range Address is: $F$9
++  ITEM Assertion OK : Range Address is: R9C6
++  ITEM Assertion OK : Range Address is: R[7]C[4]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
++END 'SingleCell-Address' Symbol
++ TEST OK : SingleCell-Address
++----------------------------------------------------------------
++Heights and Widths
++ TEST START : Heights and Widths
++  ITEM Assertion OK : Range RowHeight is 40
++  ITEM Assertion OK : Range ColumnWidth is 50
++  ITEM Assertion OK : Range Height is 238
++  ITEM Assertion OK : Range Width is 798.75
++  ITEM Assertion OK : Range RowHeight is 50
++  ITEM Assertion OK : Range ColumnWidth is 50
++  ITEM Assertion OK : Range Height is 297
++  ITEM Assertion OK : Range Width is 798.75
++  ITEM Assertion OK : RowHeight is null: True
++  ITEM Assertion OK : ColumnWidth is null: True
++END 'Heights and Widths' Symbol
++ TEST OK : Heights and Widths
++----------------------------------------------------------------
++RangeRowColumn-Issue
++ TEST START : RangeRowColumn-Issue
++  ITEM Assertion OK : Row is: 8
++  ITEM Assertion OK : Column is: 5
++  ITEM Assertion OK : EntireRow.Columns.Count = 256
++  ITEM Assertion OK : EntireColumn.Rows.Count = 65536
++END 'RangeRowColumn-Issue' Symbol
++ TEST OK : RangeRowColumn-Issue
++----------------------------------------------------------------
++Replace-Issue
++ TEST START : Replace-Issue
++  ITEM Assertion OK : Value after Replace: YourValue
++  ITEM Assertion OK : Value after Replace: YourValue
++  ITEM Assertion OK : Value after Replace: ReplaceValue
++  ITEM Assertion OK : Value after Replace: New ReplaceValue
++  ITEM Assertion OK : Value after Replace: New ReplaceValue
++  ITEM Assertion OK : Value after Replace: New Replace
++  ITEM Assertion OK : Value after Replace: 
++END 'Replace-Issue' Symbol
++ TEST OK : Replace-Issue
++----------------------------------------------------------------
++Hidden-Issue
++ TEST START : Hidden-Issue
++  ITEM Assertion OK : -  Range.Rows.Hidden (set)
++  ITEM Assertion OK : -  Range.Rows.Hidden (get)
++  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (set)
++  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (get)
++  ITEM Assertion OK : -  Range.Columns.Hidden (set)
++  ITEM Assertion OK : -  Range.Columns.Hidden (get)
++  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (set)
++  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (get)
++END 'Hidden-Issue' Symbol
++ TEST OK : Hidden-Issue
++----------------------------------------------------------------
++End issue
++ TEST START : End issue
++  ITEM Assertion OK : -  = $E$48
++  ITEM Assertion OK : -  = $E$1
++  ITEM Assertion OK : -  = $E$3
++  ITEM Assertion OK : -  = $A$8
++  ITEM Assertion OK : -  = $B$8
++  ITEM Assertion OK : -  = $IV$8
++  ITEM Assertion OK : -  = $Z$8
++END 'End issue' Symbol
++ TEST OK : End issue
++----------------------------------------------------------------
++Outline issue
++ TEST START : Outline issue
++  ITEM Assertion OK : -  Range.clearOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++END 'Outline issue' Symbol
++ TEST OK : Outline issue
++----------------------------------------------------------------
++Validation
++ TEST START : Validation
++  ITEM Assertion OK : Validation Input Message is : Attention!
++  ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
++  ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
++  ITEM Assertion OK : Validation Error Message is : An Error occured
++  ITEM Assertion OK : Validation Error Title is : Microsoft Excel
++END 'Validation' Symbol
++ TEST OK : Validation
++Test run finished : 01/06/2007 11:29:00
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,64 @@
++Test run started : 31/05/2007 11:02:10
++BEGIN TestCalc
++ TEST START : RangeTest3
++  ITEM Assertion OK : - setFormulaR1C1
++  ITEM Assertion OK : - getFormulaR1C1
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy(Range("I10"))
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
++  ITEM Assertion OK : PasteSpecial 
++  ITEM Assertion OK : PasteSpecial SkipBlanks:=True
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
++  ITEM Assertion OK : PasteSpecial Transpose:=True
++  ITEM Assertion OK : ActiveWorkbook.Name
++  ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
++  ITEM Assertion OK : -  = Range("K22").End (xlDown)
++  ITEM Assertion OK : -  = Range("K22").End (xlUo)
++  ITEM Assertion OK : -  = Range("K22").End (xlToLeft)
++  ITEM Assertion OK : -  = Range("K22").End (xlRight)
++  ITEM Assertion OK : -  ActiveSpreadsheet.Next
++  ITEM Assertion OK : -  ActiveSpreadsheet.Next
++  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
++  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="="
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter 
++  ITEM Assertion OK : -  ActiveSheet.Resize.Select
++  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
++  ITEM Assertion OK : -  Application.GoTo Reference:="R[8]C[2]"
++  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Ungroup- please check visually
++  ITEM Assertion OK : -  Range.Ungroup - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.clearOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  ActiveSheet.UsedRange.Select
++  ITEM Assertion FAIL : -  Range("A13").AddIndent
++  ITEM Assertion OK : -  Range("A13").IndentLevel set
++  ITEM Assertion OK : -  Range("A13").IndentLevel get
++  ITEM Assertion OK : -  Range("A13").IndentLevel get
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Calculate
++  ITEM Assertion OK : Worksheet.Calculate
++  ITEM Assertion OK : - Application.Calculate
++  ITEM Assertion OK : Global.Calculate
++  ITEM Assertion OK : Calculation set
++  ITEM Assertion OK : -  = ActiveWorkbook.Colors(3) set
++  ITEM Assertion OK : -  = ActiveWorkbook.ResetColors
++  ITEM Assertion OK : -  = ActiveWorkbook.Colors(3) get
++  ITEM FAIL (RangeTest3)
++ TEST Not succesfully completed : RangeTest3
++END   TestCalc
++Test run finished : 31/05/2007 11:02:12
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
++Test run started : 17/07/2007 15:25:17
++----------------------------------------------------------------
++TestAddress
++ TEST START : TestAddress
++  ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
++  ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
++  ITEM Assertion OK : test3 Range ('e:f')  A1 style addressing
++  ITEM Assertion OK : test4 Range ('e:f')  R1C1 style addressing
++  ITEM Assertion OK : test5 Columns A1 style addressing
++  ITEM Assertion OK : test6 Columns R1C1 style addressing
++  ITEM Assertion OK : test7 Columns(3) A1 style addressing
++  ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
++  ITEM Assertion OK : test9 Columns('e') A1 style addressing
++  ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
++  ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
++  ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
++  ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
++  ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
++  ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
++  ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
++  ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
++  ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
++  ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
++  ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
++  ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
++  ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
++  ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
++  ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
++  ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
++  ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false 
++  ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false 
++  ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
++  ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++  ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
++  ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
++  ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
++  ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
++  ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
++  ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
++  ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
++  ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++  ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
++  ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
++  ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
++  ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
++  ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
++  ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
++  ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
++  ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
++  ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
++  ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
++  ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
++  ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
++Test Results
++============
 +
-+        uno::Reference< excel::XRange > xAfterRange;
-+        uno::Reference< table::XCellRange > xStartCell;
-+        if( After >>= xAfterRange )
-+        {
-+            // After must be a single cell in the range
-+            if( xAfterRange->getCount() > 1 )
-+		        throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be a single cell." )) , uno::Reference< uno::XInterface >() );
-+            uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY );
-+            if( !xCell.is() )
-+		        throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be in range." )) , uno::Reference< uno::XInterface >() );
-+            xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW );
-+        }
++Tests passed: 49
++Tests failed: 0
++
++END 'TestAddress
++ TEST OK : TestAddress
++Test run finished : 17/07/2007 15:25:19
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,45 @@
++Test run started : 17/07/2007 15:01:37
++----------------------------------------------------------------
++MiscRangeTests
++ TEST START : MiscRangeTests
++  ITEM Assertion OK : test 1
++  ITEM Assertion OK : test 2
++  ITEM Assertion OK : test 3
++  ITEM Assertion OK : test 4
++  ITEM Assertion OK : test 5
++  ITEM Assertion OK : test 6
++  ITEM Assertion OK : test 7
++  ITEM Assertion OK : test 8
++  ITEM Assertion OK : test 9
++  ITEM Assertion OK : test 10
++  ITEM Assertion OK : test 11
++  ITEM Assertion OK : test 12
++  ITEM Assertion OK : test 13
++  ITEM Assertion OK : test 14
++  ITEM Assertion OK : test 15
++  ITEM Assertion OK : test 16
++  ITEM Assertion OK : test 17
++  ITEM Assertion OK : test 18
++  ITEM Assertion OK : test 19
++  ITEM Assertion OK : test 20
++  ITEM Assertion OK : test 21
++  ITEM Assertion OK : test 22
++  ITEM Assertion OK : test 23
++  ITEM Assertion OK : test 24
++  ITEM Assertion OK : test 25
++  ITEM Assertion OK : test 26
++  ITEM Assertion OK : test 27
++  ITEM Assertion OK : test 28
++  ITEM Assertion OK : test 29
++  ITEM Assertion OK : test 30
++  ITEM Assertion OK : test 31
++No. tests: 31
++Summary
++=======
++Run:       31
++Passed:    31
++Failed:    0
++
++END 'MiscRangeTests
++ TEST OK : MiscRangeTests
++Test run finished : 17/07/2007 15:01:39
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,20 @@
++Test run started : 17/07/2007 17:36:22
++----------------------------------------------------------------
++TestAddress
++ TEST START : TestAddress
++  ITEM Assertion OK : test1 'starts with' string criteria
++  ITEM Assertion OK : test2 'not equal to' string criteria
++  ITEM Assertion OK : test3 'ends with' string criteria
++  ITEM Assertion OK : test4 field 'all' 
++  ITEM Assertion OK : test5 numeric '<15' 
++  ITEM Assertion OK : test6 numeric '>=15' 
++  ITEM Assertion OK : test7 numeric '<=12' 
++Test Results
++============
 +
-+        // LookIn
-+        if( LookIn.hasValue() )
-+        {
-+            sal_Int32 nLookIn = 0;
-+            if( LookIn >>= nLookIn )
-+            {
-+                sal_Int16 nSearchType = 0; 
-+                switch( nLookIn )
-+                {
-+                    case excel::XlFindLookIn::xlComments :
-+                        nSearchType = SVX_SEARCHIN_NOTE; // Notes
-+                    break;
-+                    case excel::XlFindLookIn::xlFormulas :
-+                        nSearchType = SVX_SEARCHIN_FORMULA;
-+                    break;
-+                    case excel::XlFindLookIn::xlValues :
-+                        nSearchType = SVX_SEARCHIN_VALUE;
-+                    break;
-+                    default:
-+		                throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookIn." )) , uno::Reference< uno::XInterface >() );
-+                }
-+                newOptions.SetCellType( nSearchType );
-+                xDescriptor->setPropertyValue( rtl::OUString::createFromAscii( "SearchType" ), uno::makeAny( nSearchType ) );
-+            }
-+        }
++Tests passed: 7
++Tests failed: 0
++
++END 'TestAddress
++ TEST OK : TestAddress
++Test run finished : 17/07/2007 17:36:23
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,68 @@
++Test run started : 18/06/2007 17:50:04
++----------------------------------------------------------------
++ClearFormtsIssue
++ TEST START : ClearFormtsIssue
++  ITEM Assertion OK : Range.Font.Bold is: True
++  ITEM Assertion OK : Range.Font.Bold is: False
++END 'ClearFormtsIssue' Symbol
++ TEST OK : ClearFormtsIssue
++----------------------------------------------------------------
++VerticalAlignment-Issue
++ TEST START : VerticalAlignment-Issue
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : Range.VeritcalAlignment is Null
++END 'VerticalAlignment-Issue' Symbol
++ TEST OK : VerticalAlignment-Issue
++----------------------------------------------------------------
++HorizontalAlignment-Issue
++ TEST START : HorizontalAlignment-Issue
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : Range.HorizontalAlignment is Null
++END 'HorizontalAlignment-Issue' Symbol
++ TEST OK : HorizontalAlignment-Issue
++----------------------------------------------------------------
++WrapText-Issue
++ TEST START : WrapText-Issue
++  ITEM Assertion OK : -  Range.WrapText (get)
++  ITEM Assertion OK : -  Range.WrapText (get)
++  ITEM Assertion OK : Range.WrapText is Null
++END 'WrapText-Issue' Symbol
++ TEST OK : WrapText-Issue
++----------------------------------------------------------------
++FontBorderIssues
++ TEST START : FontBorderIssues
++  ITEM Assertion OK : -  = Borders.Color (getColor)
++  ITEM Assertion OK : -  = Font.Color (getColor)
++END 'FontBorderIssues' Symbol
++ TEST OK : FontBorderIssues
++----------------------------------------------------------------
++RangeSizeIssues
++ TEST START : RangeSizeIssues
++  ITEM Assertion OK : Range.Left is: 114
++  ITEM Assertion OK : Range.Top is: 95.25
++  ITEM Assertion OK : Range.Width is: 216
++  ITEM Assertion OK : Range.Height is: 271.5
++END 'RangeSizeIssues' Symbol
++ TEST OK : RangeSizeIssues
++----------------------------------------------------------------
++ApplicationIssues
++ TEST START : ApplicationIssues
++  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
++END 'ApplicationIssues' Symbol
++ TEST OK : ApplicationIssues
++Test run finished : 18/06/2007 17:50:04
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
++Test run started : 30/05/2007 11:33:13
++BEGIN TestCalc
++ TEST START : RangeTest2
++  ITEM Assertion OK : -  Range("D15").Row 
++  ITEM Assertion OK : -  WorkSheet("D15").Range.Row 
++  ITEM Assertion OK : -  Range("D15").Column 
++  ITEM Assertion OK : -  Worksheet.Range("D15").Column 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Columns.Count 
++  ITEM Assertion OK : -  Range("D1").EntireColumn.Rows.Count 
++  ITEM Assertion OK : -  Range("D15").ClearContent
++  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (get)
++  ITEM Assertion OK : -  Range("B38").Orientation (get)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlDownward)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlUpward)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
++  ITEM Assertion OK : -  Range("B39").WrapText (get)
++  ITEM Assertion OK : -  Range("B39").WrapText (set)
++  ITEM Assertion OK : -  Range("B39").WrapText (set)
++  ITEM Assertion OK : -  Range("E39").MergeCells (get)
++  ITEM Assertion OK : -  Range("F39").MergeCells (get)
++  ITEM Assertion OK : -  Range("E39").MergeCells (set)
++  ITEM Assertion OK : -  Range("F39").MergeCells (set)
++  ITEM Assertion OK : -  Range("E39").MergeCells (set)
++  ITEM Assertion OK : -  Range("F39").MergeCells (set)
++  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
++  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
++  ITEM Assertion OK : -  Range("D41:D42").Replace  MatchCase:=False 
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM OK (RangeTest2)
++ TEST succesfully completed : RangeTest2
++END   TestCalc
++Test run finished : 30/05/2007 11:33:14
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,65 @@
++Test run started : 10/03/2008 15:15:19
++BEGIN TestCalc
++ TEST START : RangeTest3
++  ITEM Assertion OK : - setFormulaR1C1
++  ITEM Assertion OK : - getFormulaR1C1
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy(Range("I10"))
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
++  ITEM Assertion OK : PasteSpecial 
++  ITEM Assertion OK : PasteSpecial SkipBlanks:=True
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
++  ITEM Assertion OK : PasteSpecial Transpose:=True
++  ITEM Assertion FAIL : ActiveWorkbook.FileFormat
++  ITEM Assertion OK : ActiveWorkbook.Name
++  ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
++  ITEM Assertion FAIL : -  = ActiveWorkbook.Colors(3) set
++  ITEM Assertion OK : -  = ActiveWorkbook.ResetColors
++  ITEM Assertion OK : -  = ActiveWorkbook.Colors(3) get
++  ITEM Assertion OK : -  = Range("K22").End (xlDown)
++  ITEM Assertion OK : -  = Range("K22").End (xlUo)
++  ITEM Assertion OK : -  = Range("K22").End (xlToLeft)
++  ITEM Assertion OK : -  = Range("K22").End (xlRight)
++  ITEM Assertion OK : -  ActiveSpreadsheet.Next
++  ITEM Assertion OK : -  ActiveSpreadsheet.Next
++  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
++  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="="
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter 
++  ITEM Assertion OK : -  ActiveSheet.Resize.Select
++  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
++  ITEM Assertion FAIL : -  Application.GoTo Reference:="R[8]C[2]"
++  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Ungroup- please check visually
++  ITEM Assertion OK : -  Range.Ungroup - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.clearOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  ActiveSheet.UsedRange.Select
++  ITEM Assertion OK : -  Range("A13").AddIndent
++  ITEM Assertion OK : -  Range("A13").IndentLevel set
++  ITEM Assertion OK : -  Range("A13").IndentLevel get
++  ITEM Assertion OK : -  Range("A13").IndentLevel get
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Calculate
++  ITEM Assertion OK : Worksheet.Calculate
++  ITEM Assertion OK : - Application.Calculate
++  ITEM Assertion OK : Global.Calculate
++  ITEM Assertion OK : Calculation set
++  ITEM FAIL (RangeTest3)
++ TEST Not succesfully completed : RangeTest3
++END   TestCalc
++Test run finished : 10/03/2008 15:15:21
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,10 @@
++Test run started : 07/24/2008 05:06:12 PM
++----------------------------------------------------------------
++ TEST START : PageBreaks-Issue
++  ITEM Assertion OK : HPageBreaks.Count is 3
++  ITEM Assertion OK : HPageBreak.Type is -4135
++  ITEM Assertion OK : HPageBreak.Location: Range.Row is 5
++  ITEM Assertion OK : HPageBreak.Delete: HPageBreaks.Count is 2
++END 'PageBreaks-Issue' Symbol
++ TEST OK : PageBreaks-Issue
++Test run finished : 07/24/2008 05:06:13 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
++Test run started : 05/29/2008 02:51:22 PM
++BEGIN String Plus Double
++ TEST START : double = string + double
++The next compute raises error: s = null, d = null, r = s + d
++  ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
++  ITEM Assertion OK : s = null, d = null, r = s & d .The result is: 0
++The next compute raises error: s = null, d = 20, r = s + d
++  ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: -1
++  ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
++  ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
++  ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 100
++  ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 30
++  ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
++The next compute raises error: s = 'abc', d = null, r = s + d
++  ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
++The next compute raises error: s = 'abc', d = null, r = s & d
++  ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: -1
++The next compute raises error: s = 'abc', d = 20, r = s + d
++  ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
++The next compute raises error: s = 'abc', d = 20, r = s & d
++  ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: -1
++ TEST OK : double = string + double
++ TEST START : string = string + double
++The next compute raises error: s = null, d = null, r = s + d
++  ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
++  ITEM Assertion OK : s = null, d = null, r = s & d .The result is: 0
++The next compute raises error: s = null, d = 20, r = s + d
++  ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: -1
++  ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
++  ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
++  ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 100
++  ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 30
++  ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
++The next compute raises error: s = 'abc', d = null, r = s + d
++  ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
++  ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: abc0
++The next compute raises error: s = 'abc', d = 20, r = s + d
++  ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
++  ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: abc20
++ TEST OK : string = string + double
++ TEST START : double = string + string
++The next compute raises error: s = null, d = null, r = s + d
++  ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
++The next compute raises error: s = null, d = null, r = s & d
++  ITEM Assertion OK : s = null, d = null, r = s & d .The result is: -1
++  ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: 20
++  ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
++  ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
++  ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 10
++  ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 1020
++  ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
++The next compute raises error: s = 'abc', d = null, r = s + d
++  ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
++The next compute raises error: s = 'abc', d = null, r = s & d
++  ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: -1
++The next compute raises error: s = 'abc', d = 20, r = s + d
++  ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
++The next compute raises error: s = 'abc', d = 20, r = s & d
++  ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: -1
++ TEST OK : double = string + string
++END  String Plus Double
++Test run finished : 05/29/2008 02:51:22 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,46 @@
++Test run started : 05/29/2008 02:55:00 PM
++----------------------------------------------------------------
++ TEST START : Window-Issue
++  ITEM Assertion OK : Window.Left is: 0 (Test only applies to maximized Window)
++  ITEM Assertion OK : Window.Top is: 21 (Test only applies to maximized Window)
++  ITEM Assertion OK : Window.Width is: 1280 (Test only applies to maximized Window)
++  ITEM Assertion OK : Window.Height is: 752 (Test only applies to maximized Window)
++  ITEM Assertion OK : Window.ScrollColumn is: 100
++  ITEM Assertion OK : Window.ScrollColumn is: 1
++  ITEM Assertion OK : Window.ScrollRow is: 100
++  ITEM Assertion OK : Window.ScrollRow is: 1
++  ITEM Assertion OK : Window.LargeScroll(Down): ScrollRow is: 94 (Test may only apply to maximized Window)
++  ITEM Assertion OK : Window.LargeScroll(Up): ScrollRow is: 1
++  ITEM Assertion OK : Window.LargeScroll(ToRight): ScrollColumn is: 58 (Test may only apply to maximized Window)
++  ITEM Assertion OK : Window.LargeScroll(ToLeft): ScrollColumn is: 1
++  ITEM Assertion OK : Window.SmallScroll(ToRight): ScrollColumn is: 4 (Test may only apply to maximized Window)
++  ITEM Assertion OK : Window.SmallScroll(ToLeft): ScrollColumn is: 1
++  ITEM Assertion OK : Window.DisplayWorkBookTabs is: False
++  ITEM Assertion OK : Window.DisplayWorkBookTabs is: True
++  ITEM Assertion OK : Window.DisplayVerticalScrollBar is: True
++  ITEM Assertion OK : Window.DisplayVerticalScrollBar is: False
++  ITEM Assertion OK : Window.DisplayHorizontalScrollBar is: False
++  ITEM Assertion OK : Window.DisplayHorizontalScrollBar is: True
++  ITEM Assertion OK : Window.DisplayHeadings is: False
++  ITEM Assertion OK : Window.DisplayHeadings is: True
++  ITEM Assertion OK : Window.DisplayOutline is: False
++  ITEM Assertion OK : Window.DisplayOutline is: True
++  ITEM Assertion OK : Window.Visible is: False
++  ITEM Assertion OK : Window.Visible is: True
++  ITEM Assertion OK : Window.Caption is: MyCaption
++  ITEM Assertion OK : Pane.ScrollColumn is: 100
++  ITEM Assertion OK : Pane.ScrollColumn is: 1
++  ITEM Assertion OK : Pane.ScrollRow is: 100
++  ITEM Assertion OK : Pane.ScrollRow is: 1
++  ITEM Assertion OK : Pane.LargeScroll(Down): ScrollRow is: 94 (Test may only apply to maximized Window)
++  ITEM Assertion OK : Pane.LargeScroll(Up): ScrollRow is: 1
++  ITEM Assertion OK : Pane.LargeScroll(ToRight): ScrollColumn is: 58 (Test may only apply to maximized Window)
++  ITEM Assertion OK : Pane.LargeScroll(ToLeft): ScrollColumn is: 1
++  ITEM Assertion OK : Pane.SmallScroll(ToRight): ScrollColumn is: 4 (Test may only apply to maximized Window)
++  ITEM Assertion OK : Pane.SmallScroll(ToLeft): ScrollColumn is: 1
++  ITEM Assertion OK : Window Selection: $A$2:$D$5
++  ITEM Assertion OK : ActiveSheet name of Window: Sheet1
++  ITEM Assertion OK : Window ActiveCell: $A$1
++END 'Window-Issue' Symbol
++ TEST OK : Window-Issue
++Test run finished : 05/29/2008 02:55:01 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,11 @@
++Test run started : 12/10/2007 11:26:43 AM
++BEGIN Partition
++ TEST START : Test Partition function
++  ITEM Assertion OK : the number 20 occurs in the range:20:24
++  ITEM Assertion OK : the number 20 occurs in the range: 20: 20
++  ITEM Assertion OK : the number 120 occurs in the range:100:   
++  ITEM Assertion OK : the number -5 occurs in the range:   : -1
++  ITEM Assertion OK : the number 2 occurs in the range: 2: 3
++ TEST OK : Test Partition function
++END  Partition
++Test run finished : 12/10/2007 11:26:43 AM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,8 @@
++Test run started : 01/24/2008 01:24:41 PM
++BEGIN DateValue
++ TEST START : Test DateValue function
++  ITEM Assertion OK : the return date is: 02/12/1969
++  ITEM Assertion OK : the return date is: 01/21/2008
++ TEST OK : Test DateValue function
++END  DateValue
++Test run finished : 01/24/2008 01:24:41 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,14 @@
++Test run started : 17/12/2008 13:53:49
++BEGIN Replace
++ TEST START : Test Replace function
++  ITEM Assertion OK : common string:aefefdBc
++  ITEM Assertion OK : expression string:aefefdef
++  ITEM Assertion OK : binanary compare:aefefdBc
++  ITEM Assertion OK : text compare:aefefdef
++  ITEM Assertion OK : text compare:aefefdef
++  ITEM Assertion OK : start = 3:cefdBc
++  ITEM Assertion OK : count = 2: aefefdBc
++  ITEM Assertion OK : start = 1, count = 0, not support in Unix: abcbcdBc
++ TEST OK : Test Replace function
++END  Replace
++Test run finished : 17/12/2008 13:53:49
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,9 @@
++Test run started : 05/29/2008 02:51:03 PM
++BEGIN StrConv
++ TEST START : Test StrConv function
++  ITEM Assertion OK : Converts the string to uppercase characters:ABC EFG HIJ
++  ITEM Assertion OK : Converts the string to lowercase characters:abc efg hij
++  ITEM Assertion OK : Converts the first letter of every word in string to uppercase:Abc Efg Hij
++ TEST OK : Test StrConv function
++END  StrConv
++Test run finished : 05/29/2008 02:51:03 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,14 @@
++Test run started : 2008ï07ï10 11:57:05
++----------------------------------------------------------------
++TestCaseName
++ TEST START : TestCaseName
++  ITEM Assertion OK : Something has been done.
++Test Results
++============
 +
-+        // LookAt
-+		if ( LookAt.hasValue() )
-+		{
-+			nLookAt =  ::comphelper::getINT16( LookAt );
-+			sal_Bool bSearchWords = sal_False;
-+			if ( nLookAt == excel::XlLookAt::xlPart )
-+				bSearchWords = sal_False;
-+			else if ( nLookAt == excel::XlLookAt::xlWhole )
-+				bSearchWords = sal_True;
-+			else
-+				throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookAt" )) , uno::Reference< uno::XInterface >() );
-+			newOptions.SetWordOnly( bSearchWords );
-+			xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHWORDS ) ), uno::makeAny( bSearchWords ) ); 	
-+        }
++Tests passed: 1
++Tests failed: 0
 +
-+        // SearchOrder
-+		if ( SearchOrder.hasValue() )
-+		{
-+			nSearchOrder =  ::comphelper::getINT16( SearchOrder );
-+			sal_Bool bSearchByRow = sal_False;
-+			if ( nSearchOrder == excel::XlSearchOrder::xlByColumns )
-+				bSearchByRow = sal_False;
-+			else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
-+				bSearchByRow = sal_True;
-+			else
-+				throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchOrder" )) , uno::Reference< uno::XInterface >() );
-+			
-+			newOptions.SetRowDirection( bSearchByRow ); 
-+			xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHBYROW ) ), uno::makeAny( bSearchByRow ) ); 	
-+		}			
++END 'TestCaseName
++ TEST OK : TestCaseName
++Test run finished : 2008ï07ï10 11:57:05
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,9 @@
++Test run started : 01/24/2008 01:24:50 PM
++BEGIN DateSerial
++ TEST START : Test DateSerial function
++  ITEM Assertion OK : the return date is: 06/15/1999
++  ITEM Assertion OK : the return date is: 06/15/1999
++  ITEM Assertion OK : the return date is: 06/15/1999
++ TEST OK : Test DateSerial function
++END  DateSerial
++Test run finished : 01/24/2008 01:24:50 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,20 @@
++Test run started : 18/07/2007 10:56:38
++----------------------------------------------------------------
++TestAddress
++ TEST START : TestAddress
++  ITEM Assertion OK : test1 'starts with' string criteria
++  ITEM Assertion OK : test2 'not equal to' string criteria
++  ITEM Assertion OK : test3 'ends with' string criteria
++  ITEM Assertion OK : test4 field 'all' 
++  ITEM Assertion OK : test5 numeric '<15' 
++  ITEM Assertion OK : test6 numeric '>=15' 
++  ITEM Assertion OK : test7 numeric '<=12' 
++Test Results
++============
 +
-+        // SearchDirection
-+        if ( SearchDirection.hasValue() )
-+        {
-+            sal_Int32 nSearchDirection = 0;
-+            if( SearchDirection >>= nSearchDirection )
-+            {
-+                sal_Bool bSearchBackwards = sal_False;
-+                if ( nSearchDirection == excel::XlSearchDirection::xlNext )
-+                    bSearchBackwards = sal_False; 
-+                else if( nSearchDirection == excel::XlSearchDirection::xlPrevious )
-+                    bSearchBackwards = sal_True;
-+                else
-+				    throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchDirection" )) , uno::Reference< uno::XInterface >() );
-+                newOptions.SetBackward( bSearchBackwards );
-+                xDescriptor->setPropertyValue( rtl::OUString::createFromAscii( "SearchBackwards" ), uno::makeAny( bSearchBackwards ) );
-+            }
-+        }
++Tests passed: 7
++Tests failed: 0
 +
-+        // MatchCase
-+        sal_Bool bMatchCase = sal_False;
-+		if ( MatchCase.hasValue() )
-+		{
-+			// SearchCaseSensitive
-+			if( !( MatchCase >>= bMatchCase ) )
-+			    throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for MatchCase" )) , uno::Reference< uno::XInterface >() );
-+		}			
-+        xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHCASE ) ), uno::makeAny( bMatchCase ) ); 	
++END 'TestAddress
++ TEST OK : TestAddress
++Test run finished : 18/07/2007 10:56:44
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,68 @@
++Test run started : 19/06/2007 11:14:01
++----------------------------------------------------------------
++ClearFormtsIssue
++ TEST START : ClearFormtsIssue
++  ITEM Assertion OK : Range.Font.Bold is: True
++  ITEM Assertion OK : Range.Font.Bold is: False
++END 'ClearFormtsIssue' Symbol
++ TEST OK : ClearFormtsIssue
++----------------------------------------------------------------
++VerticalAlignment-Issue
++ TEST START : VerticalAlignment-Issue
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : Range.VeritcalAlignment is Null
++END 'VerticalAlignment-Issue' Symbol
++ TEST OK : VerticalAlignment-Issue
++----------------------------------------------------------------
++HorizontalAlignment-Issue
++ TEST START : HorizontalAlignment-Issue
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : Range.HorizontalAlignment is Null
++END 'HorizontalAlignment-Issue' Symbol
++ TEST OK : HorizontalAlignment-Issue
++----------------------------------------------------------------
++WrapText-Issue
++ TEST START : WrapText-Issue
++  ITEM Assertion OK : -  Range.WrapText (get)
++  ITEM Assertion OK : -  Range.WrapText (get)
++  ITEM Assertion OK : Range.WrapText is Null
++END 'WrapText-Issue' Symbol
++ TEST OK : WrapText-Issue
++----------------------------------------------------------------
++FontBorderIssues
++ TEST START : FontBorderIssues
++  ITEM Assertion OK : -  = Borders.Color (getColor)
++  ITEM Assertion OK : -  = Font.Color (getColor)
++END 'FontBorderIssues' Symbol
++ TEST OK : FontBorderIssues
++----------------------------------------------------------------
++RangeSizeIssues
++ TEST START : RangeSizeIssues
++  ITEM Assertion OK : Range.Left is: 118.8432
++  ITEM Assertion OK : Range.Top is: 92.16585
++  ITEM Assertion OK : Range.Width is: 226.2
++  ITEM Assertion OK : Range.Height is: 271.5
++END 'RangeSizeIssues' Symbol
++ TEST OK : RangeSizeIssues
++----------------------------------------------------------------
++ApplicationIssues
++ TEST START : ApplicationIssues
++  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
++END 'ApplicationIssues' Symbol
++ TEST OK : ApplicationIssues
++Test run finished : 19/06/2007 11:14:02
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
++Test run started : 30/05/2007 15:59:40
++BEGIN TestCalc
++ TEST START : RangeTest2
++  ITEM Assertion OK : -  Range("D15").Row 
++  ITEM Assertion OK : -  WorkSheet("D15").Range.Row 
++  ITEM Assertion OK : -  Range("D15").Column 
++  ITEM Assertion OK : -  Worksheet.Range("D15").Column 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Columns.Count 
++  ITEM Assertion OK : -  Range("D1").EntireColumn.Rows.Count 
++  ITEM Assertion OK : -  Range("D15").ClearContent
++  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (get)
++  ITEM Assertion OK : -  Range("B38").Orientation (get)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlDownward)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlUpward)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
++  ITEM Assertion OK : -  Range("B39").WrapText (get)
++  ITEM Assertion OK : -  Range("B39").WrapText (set)
++  ITEM Assertion OK : -  Range("B39").WrapText (set)
++  ITEM Assertion OK : -  Range("E39").MergeCells (get)
++  ITEM Assertion OK : -  Range("F39").MergeCells (get)
++  ITEM Assertion OK : -  Range("E39").MergeCells (set)
++  ITEM Assertion FAIL : -  Range("F39").MergeCells (set)
++  ITEM Assertion OK : -  Range("E39").MergeCells (set)
++  ITEM Assertion OK : -  Range("F39").MergeCells (set)
++  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
++  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
++  ITEM Assertion OK : -  Range("D41:D42").Replace  MatchCase:=False 
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM FAIL (RangeTest2)
++ TEST Not succesfully completed : RangeTest2
++END   TestCalc
++Test run finished : 30/05/2007 15:59:42
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,8 @@
++Test run started : 19/06/2007 11:26:09
++----------------------------------------------------------------
++MyGoalseek-Issue
++ TEST START : MyGoalseek-Issue
++  ITEM Assertion OK : Variable Range value: 15
++END 'MyGoalseek-Issue' Symbol
++ TEST OK : MyGoalseek-Issue
++Test run finished : 19/06/2007 11:26:10
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,280 @@
++Test run started : 17/12/2008 14:18:34
++----------------------------------------------------------------
++ApplicationMethods
++ TEST START : ApplicationMethods
++  ITEM Assertion OK :  Name of Workbook is: Ranges.xls
++  ITEM Assertion OK :  Address of Application.Columns is: $A:$A
++  ITEM Assertion OK :  Address of Application.Rows is: $1:$1
++  ITEM Assertion OK :  Address of Application.Range is: $1:$1,$5:$7
++  ITEM Assertion OK :  Please check manually: DefaultFilePath is: /data4/home/npower/Documents
++  ITEM Assertion OK :  Please check manually: Library Path is: /media/disk/BUILD-related/CWS/my_working_copy/INSTALL_FOR_TEST/opt/UserInstallation/user/basic
++  ITEM Assertion OK :  Please check manually: Template Path is: /media/disk/BUILD-related/CWS/my_working_copy/INSTALL_FOR_TEST/opt/UserInstallation/user/template
++  ITEM Assertion OK :  FileSeparator is /
++  ITEM Assertion OK :  Name of ActiveWorkbook is: Ranges.xls
++END 'ApplicationMethods' Symbol
++ TEST OK : ApplicationMethods
++----------------------------------------------------------------
++Insert-Issue
++ TEST START : Insert-Issue
++  ITEM Assertion OK : Insert with xlShiftToRight: 10
++END 'Insert-Issue' Symbol
++ TEST OK : Insert-Issue
++----------------------------------------------------------------
++MergeCells-Issue
++ TEST START : MergeCells-Issue
++  ITEM Assertion OK :  Range.MergeCells is True
++  ITEM Assertion FAIL : MergeCells is null: False
++  ITEM Assertion OK : RowCount after Merge: 13
++  ITEM Assertion OK :  Range.MergeCells is False
++  ITEM Assertion OK : MergeCells is null: False
++  ITEM Assertion FAIL : MergeCells of Second Area is null : False
++  ITEM Assertion FAIL : MergeCells of Ranges is Null: False
++  ITEM Assertion OK : RowCount after Merge: 7
++  ITEM Assertion OK :  Range.MergeCells is False
++  ITEM Assertion OK : MergeCells is null: False
++  ITEM Assertion OK : RowCount after Merge: 7
++END 'MergeCells-Issue' Symbol
++ TEST OK : MergeCells-Issue
++----------------------------------------------------------------
++Areas-Issue
++ TEST START : Areas-Issue
++  ITEM Assertion OK : Range Areas Count is2
++  ITEM Assertion OK : First Range Address is: $E$8:$G$13
++  ITEM Assertion OK : First Row is: 8
++  ITEM Assertion OK : First Column is: 5
++  ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
++  ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
++  ITEM Assertion OK : Range Count:53
++END 'Areas-Issue' Symbol
++ TEST OK : Areas-Issue
++----------------------------------------------------------------
++Fill-Methods-Issue
++ TEST START : Fill-Methods-Issue
++  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyRightFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyBottomFillValue
++END 'Fill-Methods-Issue' Symbol
++ TEST OK : Fill-Methods-Issue
++----------------------------------------------------------------
++Range/Item-Method-Issue
++ TEST START : Range/Item-Method-Issue
++  ITEM Assertion OK :  Range of multiple columns is: $A:$A,$C:$C
++  ITEM Assertion OK :  Range of multiple rows is: $1:$1,$5:$7
++  ITEM Assertion OK :  Range of several columns is: $C:$E,$D:$D
++  ITEM Assertion OK :  Range of several rows is: $5:$8,$6:$10
++  ITEM Assertion OK :  Range of several single cells is: $C$5,$E$8
++  ITEM Assertion OK :  Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK :  Range of a single Item Cell is: $E$21
++  ITEM Assertion OK :  Range of a single Item Cell is: $F$21
++  ITEM Assertion OK :  Range of a single Item Cell is: $F$10
++END 'Range/Item-Method-Issue' Symbol
++ TEST OK : Range/Item-Method-Issue
++----------------------------------------------------------------
++R1C1-Formulas-Issue
++ TEST START : R1C1-Formulas-Issue
++  ITEM Assertion OK :  R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
++  ITEM Assertion OK :  Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
++END 'R1C1-Formulas-Issue' Symbol
++ TEST OK : R1C1-Formulas-Issue
++----------------------------------------------------------------
++Verify_Delete
++ TEST START : Verify_Delete
++  ITEM Assertion OK : Ranges are intersecting: $G$13
++  ITEM Assertion OK : Delete with Default: $AJ$4
++  ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
++  ITEM Assertion OK : Delete with ShiftUp: $M$22
++END 'Verify_Delete' Symbol
++ TEST OK : Verify_Delete
++----------------------------------------------------------------
++Value-Issue
++ TEST START : Value-Issue
++  ITEM Assertion OK : Value of Range is: 12.3
++  ITEM Assertion OK : Text of Range is: 12.3
++  ITEM Assertion OK : Range has Formula: False
++  ITEM Assertion OK : Cell has Formula: False
++  ITEM Assertion FAIL : Text of Range is null: False
++  ITEM Assertion OK : Range has Formula: True
++  ITEM Assertion OK : Cell has Formula: True
++  ITEM Assertion OK : Value of Cell is: 12
++  ITEM Assertion OK : Application.Calculation is : -4135
++  ITEM Assertion OK : Calculation is automated: True
++  ITEM Assertion OK : Range has Formula: True
++  ITEM Assertion OK : Value of Cell is: 16
++  ITEM Assertion OK : Text of Cell is: 16
++  ITEM Assertion OK : Text of Cell is: 16
++  ITEM Assertion OK : Range has Formula after 'ClearContents: False
++  ITEM Assertion OK : Text of Cell is: 
++  ITEM Assertion OK : Text of Cell is: 
++END 'Value-Issue' Symbol
++ TEST OK : Value-Issue
++----------------------------------------------------------------
++AutoFit issue
++ TEST START : AutoFit issue
++  ITEM Assertion OK :  Columns.AutoFit: CurrentWidth is 679
++  ITEM Assertion OK :  Rows.AutoFit: CurrentHeight is 546
++END 'AutoFit issue' Symbol
++ TEST OK : AutoFit issue
++----------------------------------------------------------------
++Selections
++ TEST START : Selections
++  ITEM Assertion OK : ActiveCell is : $E$8
++  ITEM Assertion OK : Active Cell is : $E$8
++  ITEM Assertion OK : Number of Cells in Range: 52
++  ITEM Assertion OK : Number of Cells in Range: 52
++  ITEM Assertion OK : Number of Cells in Range: 52
++END 'Selections' Symbol
++ TEST OK : Selections
++----------------------------------------------------------------
++Offset-Resize
++ TEST START : Offset-Resize
++  ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
++  ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
++  ITEM Assertion OK :   Resized Range is : $A$20:$D$23
++END 'Offset-Resize' Symbol
++ TEST OK : Offset-Resize
++----------------------------------------------------------------
++Ranges-Address
++ TEST START : Ranges-Address
++  ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
++  ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
++  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++  ITEM Assertion FAIL : Range Address is: R8C5:R13C7,R13C7:R19C11
++  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
++END 'Ranges-Address' Symbol
++ TEST OK : Ranges-Address
++----------------------------------------------------------------
++Range-Address
++ TEST START : Range-Address
++  ITEM Assertion OK : Range Address is: $E$8:$G$13
++  ITEM Assertion OK : Range Address is: $E8:$G13
++  ITEM Assertion OK : Range Address is: E$8:G$13
++  ITEM Assertion OK : Range Address is: R8C5:R13C7
++  ITEM Assertion FAIL : Range Address is: R8C5:R13C7
++  ITEM Assertion OK : Range Address is: R8C5:R13C7
++  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
++END 'Range-Address' Symbol
++ TEST OK : Range-Address
++----------------------------------------------------------------
++Column-Address
++ TEST START : Column-Address
++  ITEM Assertion OK : Range Address is: $F$8:$F$13
++  ITEM Assertion OK : Range Address is: $F8:$F13
++  ITEM Assertion OK : Range Address is: F$8:F$13
++  ITEM Assertion OK : Range Address is: R8C6:R13C6
++  ITEM Assertion FAIL : Range Address is: R8C6:R13C6
++  ITEM Assertion OK : Range Address is: R8C6:R13C6
++  ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
++END 'Column-Address' Symbol
++ TEST OK : Column-Address
++----------------------------------------------------------------
++Row-Address
++ TEST START : Row-Address
++  ITEM Assertion OK : Range Address is: $E$9:$G$9
++  ITEM Assertion OK : Range Address is: $E9:$G9
++  ITEM Assertion OK : Range Address is: E$9:G$9
++  ITEM Assertion OK : Range Address is: R9C5:R9C7
++  ITEM Assertion FAIL : Range Address is: R9C5:R9C7
++  ITEM Assertion OK : Range Address is: R9C5:R9C7
++  ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
++END 'Row-Address' Symbol
++ TEST OK : Row-Address
++----------------------------------------------------------------
++SingleCell-Address
++ TEST START : SingleCell-Address
++  ITEM Assertion OK : Range Address is: $F$9
++  ITEM Assertion OK : Range Address is: $F9
++  ITEM Assertion OK : Range Address is: F$9
++  ITEM Assertion OK : Range Address is: R9C6
++  ITEM Assertion FAIL : Range Address is: R9C6
++  ITEM Assertion OK : Range Address is: R9C6
++  ITEM Assertion OK : Range Address is: R[7]C[4]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
++END 'SingleCell-Address' Symbol
++ TEST OK : SingleCell-Address
++----------------------------------------------------------------
++Heights and Widths
++ TEST START : Heights and Widths
++  ITEM Assertion OK : Range RowHeight is 40
++  ITEM Assertion OK : Range ColumnWidth is 50
++  ITEM Assertion OK : Range Height is 240
++  ITEM Assertion OK : Range Width is 787.5
++  ITEM Assertion OK : Range RowHeight is 50
++  ITEM Assertion OK : Range ColumnWidth is 50
++  ITEM Assertion OK : Range Height is 300
++  ITEM Assertion OK : Range Width is 787.5
++  ITEM Assertion OK : RowHeight is null: True
++  ITEM Assertion OK : ColumnWidth is null: True
++END 'Heights and Widths' Symbol
++ TEST OK : Heights and Widths
++----------------------------------------------------------------
++RangeRowColumn-Issue
++ TEST START : RangeRowColumn-Issue
++  ITEM Assertion OK : Row is: 8
++  ITEM Assertion OK : Column is: 5
++  ITEM Assertion OK : EntireRow.Columns.Count = 1024
++  ITEM Assertion OK : EntireColumn.Rows.Count = 131072
++END 'RangeRowColumn-Issue' Symbol
++ TEST OK : RangeRowColumn-Issue
++----------------------------------------------------------------
++Replace-Issue
++ TEST START : Replace-Issue
++  ITEM Assertion OK : Value after Replace: YourValue
++  ITEM Assertion OK : Value after Replace: YourValue
++  ITEM Assertion OK : Value after Replace: ReplaceValue
++  ITEM Assertion OK : Value after Replace: New ReplaceValue
++  ITEM Assertion OK : Value after Replace: New ReplaceValue
++  ITEM Assertion OK : Value after Replace: New Replace
++  ITEM Assertion OK : Value after Replace: 
++END 'Replace-Issue' Symbol
++ TEST OK : Replace-Issue
++----------------------------------------------------------------
++Hidden-Issue
++ TEST START : Hidden-Issue
++  ITEM Assertion OK : -  Range.Rows.Hidden (set)
++  ITEM Assertion OK : -  Range.Rows.Hidden (get)
++  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (set)
++  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (get)
++  ITEM Assertion OK : -  Range.Columns.Hidden (set)
++  ITEM Assertion OK : -  Range.Columns.Hidden (get)
++  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (set)
++  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (get)
++END 'Hidden-Issue' Symbol
++ TEST OK : Hidden-Issue
++----------------------------------------------------------------
++End issue
++ TEST START : End issue
++  ITEM Assertion OK : -  = $E$48
++  ITEM Assertion OK : -  = $E$1
++  ITEM Assertion OK : -  = $E$3
++  ITEM Assertion OK : -  = $A$8
++  ITEM Assertion OK : -  = $B$8
++  ITEM Assertion FAIL : -  = $AMJ$8
++  ITEM Assertion OK : -  = $Z$8
++END 'End issue' Symbol
++ TEST OK : End issue
++----------------------------------------------------------------
++Outline issue
++ TEST START : Outline issue
++  ITEM Assertion OK : -  Range.clearOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++END 'Outline issue' Symbol
++ TEST OK : Outline issue
++----------------------------------------------------------------
++Validation
++ TEST START : Validation
++  ITEM Assertion OK : Validation Input Message is : Attention!
++  ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
++  ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
++  ITEM Assertion OK : Validation Error Message is : An Error occured
++  ITEM Assertion OK : Validation Error Title is : Microsoft Excel
++END 'Validation' Symbol
++ TEST OK : Validation
++Test run finished : 17/12/2008 14:18:40
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,77 @@
++Test run started : 10/16/2007 05:25:21 PM
++BEGIN Shapes_Collection_Behaviour
++ TEST START : Shapes_Collection_Behaviour
++  ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1' 
++  ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2' 
++ TEST Success. : Shapes_Collection_Behaviour
++END Shapes_Collection_Behaviour
++BEGIN Shapes_Select_Item
++ TEST START : Shapes_Select_Item
++  ITEM Assertion OK : Correctly selected shape through Range
++  ITEM Assertion OK : Correctly selected shape through Item
++  ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
++  ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
++ TEST Success. : Shapes_Select_Item
++END Shapes_Select_Item
++BEGIN Shapes_Fill
++ TEST START : Shapes_Fill
++  ITEM Assertion OK : correctly set visibility of shape fill
++  ITEM Assertion OK : correctly set transparency of shape line
++  ITEM Assertion OK : correctly set forecolor of shape fill
++  ITEM Assertion FAIL : correctly set backcolor of shape fill
++  ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
++  ITEM Assertion OK : correctly set forecolor of shape fill
++  ITEM Assertion FAIL : correctly set forecolor of shape fill
++ TEST Success. : Shapes_Fill
++END  Shapes_Fill
++BEGIN Shapes_Line
++ TEST START : Shapes_Line
++  ITEM Assertion FAIL : correctly set weight of shape line
++  ITEM Assertion OK : correctly set visibility of shape line
++  ITEM Assertion OK : correctly set transparency of shape line
++  ITEM Assertion OK : correctly set dash style of shape line
++  ITEM Assertion OK : correctly set dash style of shape line
++  ITEM Assertion OK : correctly set forecolor of shape line
++  ITEM Assertion FAIL : correctly set backcolor of shape line
++ TEST Success. : Shapes_Line
++END  Shapes_Line
++BEGIN Shapes_TextFrame
++ TEST START : Shapes_TextFrame
++  ITEM Assertion OK : correctly set Autosize of Shape TextFrame
++ TEST Success. : Shapes_TextFrame
++END  Shapes_TextFrame
++BEGIN Shapes_SimpleGeometry
++ TEST START : Shapes_SimpleGeometery
++  ITEM Assertion OK : shape height should be 47.0425168477155 and got 46.9984222363199
++  ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
++  ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
++  ITEM Assertion OK : shape top should be 42.0251943291216 and got 42.0094461726333
++  ITEM Assertion OK : shape rotation should be 0 and got 0
++  ITEM Assertion OK : shape rotation should be 25 and got 25
++  ITEM Assertion OK : shape incrementrotation should be 50 and got 50
++  ITEM Assertion OK : shape incrementleft should be 70.6834602404119 and got 70.6677120839236
++  ITEM Assertion OK : shape incrementtop should be 91.262986503119 and got 91.2472383466307
++ TEST Success. : Shapes_SimpleGeometery
++END Shapes_SimpleGeometry
++BEGIN Shapes_Range
++ TEST START : Shapes_Range
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
++ TEST Success. : Shapes_Range
++END Shapes_Range
++BEGIN Shapes_ShapeRange
++ TEST START : Shapes_ShapeRange
++  ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 90.6677120839236 and got 90.6519627935771
++  ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
++  ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 111.247238346631 and got 111.231489056284
++  ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 65.0708633026228 and got 65.0551140122763
++  ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
++  ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
++END Shapes_ShapeRange
++Test run finished : 10/16/2007 05:25:22 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
++Test run started : 17/07/2007 20:56:04
++----------------------------------------------------------------
++TestAddress
++ TEST START : TestAddress
++  ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
++  ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
++  ITEM Assertion OK : test3 Range ('e:f')  A1 style addressing
++  ITEM Assertion OK : test4 Range ('e:f')  R1C1 style addressing
++  ITEM Assertion OK : test5 Columns A1 style addressing
++  ITEM Assertion OK : test6 Columns R1C1 style addressing
++  ITEM Assertion OK : test7 Columns(3) A1 style addressing
++  ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
++  ITEM Assertion OK : test9 Columns('e') A1 style addressing
++  ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
++  ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
++  ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
++  ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
++  ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
++  ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
++  ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
++  ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
++  ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
++  ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
++  ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
++  ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
++  ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
++  ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
++  ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
++  ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
++  ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false 
++  ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false 
++  ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
++  ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++  ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
++  ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
++  ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
++  ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
++  ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
++  ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
++  ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
++  ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++  ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
++  ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
++  ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
++  ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
++  ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
++  ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
++  ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
++  ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
++  ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
++  ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
++  ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
++  ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
++Test Results
++============
 +
-+        // MatchByte
-+        // SearchFormat
-+        // ignore
++Tests passed: 49
++Tests failed: 0
 +
-+		ScGlobal::SetSearchItem( newOptions );	
++END 'TestAddress
++ TEST OK : TestAddress
++Test run finished : 17/07/2007 20:56:05
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,36 @@
++Test run started : 17/12/2008 14:15:22
++BEGIN Format
++ TEST START : Test Predefined_Number_Format_Sample function
++  ITEM Assertion OK : General Number: 562486.2356
++  ITEM Assertion OK : Fixed: 0.20
++  ITEM Assertion OK : Standard: 562,486.24
++  ITEM Assertion OK : Percent: 75.21%
++  ITEM Assertion OK : Scientific: 5.62E+05
++  ITEM Assertion OK : Scientific: -3.46E+03
++  ITEM Assertion OK : Yes/No: No
++  ITEM Assertion OK : Yes/No: Yes
++  ITEM Assertion OK : True/False: False
++  ITEM Assertion OK : True/False: True
++  ITEM Assertion OK : On/Off: Off
++  ITEM Assertion OK : On/Off: On
++ TEST OK : Test Predefined_Number_Format_Sample function
++ TEST START : Test Custom_Number_Format_Sample function
++  ITEM Assertion OK : 00.0000: 23.6750
++  ITEM Assertion OK : 00.00: 23.68
++  ITEM Assertion OK : 00000: 02658
++  ITEM Assertion OK : 00.00: 2658.00
++  ITEM Assertion OK : ##.####: 23.675
++  ITEM Assertion OK : ##.##: 23.68
++  ITEM Assertion OK : #,###.##: 12,345.25
++  ITEM Assertion OK : ##.00%: 25.00%
++  ITEM Assertion OK : #,###: 1,000,000
++  ITEM Assertion OK : ######E-###: 109838E-5
++  ITEM Assertion OK : $#,###.##: $2,345.25
++  ITEM Assertion OK : ##.###\%: .25%
++ TEST OK : Test Custom_Number_Format_Sample function
++ TEST START : Test Custom_Text_Format_Sample function
++  ITEM Assertion OK : <: vba
++  ITEM Assertion OK : >: VBA
++ TEST OK : Test Custom_Text_Format_Sample function
++END  Format
++Test run finished : 17/12/2008 14:15:22
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,8 @@
++Test run started : 05/29/2008 02:25:58 PM
++BEGIN Bytearray To String
++ TEST START : Test the conversion between bytearray and string
++  ITEM Assertion OK :  The number of byte is:6
++  ITEM Assertion OK : the return string is: abc
++ TEST OK : Test the conversion between bytearray and string
++END  Bytearray To String
++Test run finished : 05/29/2008 02:25:58 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,45 @@
++Test run started : 05/29/2008 02:55:48 PM
++BEGIN Window2
++ TEST START : Test Window.SplitRow
++  ITEM Assertion OK : Test SplitColumn: 2
++  ITEM Assertion FAIL : Test SplitRow: 5
++  ITEM Assertion FAIL : Test SplitVertical: 64.5090003183026
++  ITEM Assertion OK : Test SplitHorizontal: 502.570118758869
++  ITEM Assertion OK : Test SplitVertical: 242.283803521067
++  ITEM Assertion OK : Test SplitRow: 19
++  ITEM Assertion OK : Test SplitHorizontal: 242.283803521067
++  ITEM Assertion OK : Test SplitColumn: 1
++  ITEM Assertion FAIL : Test SplitRow: 8
++  ITEM Assertion OK : Test SplitColumn: 10
++  ITEM Assertion OK : Test SplitColumn: 0
++  ITEM Assertion OK : Test SplitRow: 0
++ TEST OK : Test Window.SplitRow
++TEST ERROR - no test begun: Test Window.SplitRow
++ TEST START : Test Window.DisplayGridlines
++  ITEM Assertion OK : Test gridlines are on
++  ITEM Assertion OK : Test gridlines are off
++ TEST OK : Test Window.DisplayGridlines
++ TEST START : Test Window.DisplayHeadings
++  ITEM Assertion OK : Test Headings are on
++  ITEM Assertion OK : Test Headings are off
++ TEST OK : Test Window.DisplayHeadings
++ TEST START : Test Window.Visibility
++  ITEM Assertion OK : Window is visible
++ TEST FAIL : Test Window.Visibility (hit error handler).
++ TEST START : Test Window.FreezePanes
++  ITEM Assertion OK : Test no panes frozen
++  ITEM Assertion OK : Test panes frozen at center
++  ITEM Assertion OK : Test panes frozen at split
++ TEST OK : Test Window.FreezePanes
++ TEST START : Test Window.View
++ TEST OK : Test Window.View
++ TEST START : Test Window.Zoom
++  ITEM Assertion OK : Test zoom=100%
++  ITEM Assertion OK : Test zoom=150%
++ TEST OK : Test Window.Zoom
++ TEST START : Test Windows.Count
++  ITEM Assertion OK : Windows Count: 1
++  ITEM Assertion OK : Application.Windows Count: 1
++ TEST OK : Test Windows.Count
++END  Window2
++Test run finished : 05/29/2008 02:55:48 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,45 @@
++Test run started : 17/07/2007 20:54:56
++----------------------------------------------------------------
++MiscRangeTests
++ TEST START : MiscRangeTests
++  ITEM Assertion OK : test 1
++  ITEM Assertion OK : test 2
++  ITEM Assertion OK : test 3
++  ITEM Assertion OK : test 4
++  ITEM Assertion OK : test 5
++  ITEM Assertion OK : test 6
++  ITEM Assertion OK : test 7
++  ITEM Assertion OK : test 8
++  ITEM Assertion OK : test 9
++  ITEM Assertion OK : test 10
++  ITEM Assertion OK : test 11
++  ITEM Assertion OK : test 12
++  ITEM Assertion OK : test 13
++  ITEM Assertion OK : test 14
++  ITEM Assertion OK : test 15
++  ITEM Assertion OK : test 16
++  ITEM Assertion OK : test 17
++  ITEM Assertion OK : test 18
++  ITEM Assertion OK : test 19
++  ITEM Assertion OK : test 20
++  ITEM Assertion OK : test 21
++  ITEM Assertion OK : test 22
++  ITEM Assertion OK : test 23
++  ITEM Assertion OK : test 24
++  ITEM Assertion OK : test 25
++  ITEM Assertion OK : test 26
++  ITEM Assertion OK : test 27
++  ITEM Assertion OK : test 28
++  ITEM Assertion OK : test 29
++  ITEM Assertion OK : test 30
++  ITEM Assertion OK : test 31
++No. tests: 31
++Summary
++=======
++Run:       31
++Passed:    31
++Failed:    0
 +
-+		uno::Reference< util::XSearchDescriptor > xSearchDescriptor( xDescriptor, uno::UNO_QUERY );
-+		uno::Reference< uno::XInterface > xInterface = xStartCell.is() ? xSearch->findNext( xStartCell, xSearchDescriptor) : xSearch->findFirst( xSearchDescriptor );
-+		uno::Reference< table::XCellRange > xCellRange( xInterface, uno::UNO_QUERY );
-+        if ( xCellRange.is() )
-+        {
-+            uno::Reference< excel::XRange > xResultRange = new ScVbaRange( this, mxContext, xCellRange );
-+            if( xResultRange.is() )
-+            {
-+                xResultRange->Select();
-+                return xResultRange;
-+            }
-+        }
++END 'MiscRangeTests
++ TEST OK : MiscRangeTests
++Test run finished : 17/07/2007 20:55:03
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,77 @@
++Test run started : 07/21/2008 02:00:06 PM
++BEGIN PageSetup
++ TEST START : Sheet_PrintArea
++  ITEM Assertion OK : PrintArea has changed as expected
++ TEST OK : Sheet_PrintArea
++ TEST START : Test margins (no headers)
++  ITEM Assertion OK : PageSetup.LeftMargin set/get
++  ITEM Assertion OK : PageSetup.RightMargin set/get
++  ITEM Assertion OK : PageSetup.TopMargin set/get
++  ITEM Assertion OK : PageSetup.BottomMargin set/get
++Verify that page margins on sheet 1 are all 0.5inch   
++ TEST OK : Test margins (no headers)
++ TEST START : Test margins (headers)
++  ITEM Assertion OK : PageSetup.HeaderMargin set/get
++  ITEM Assertion OK : PageSetup.FooterMargin set/get
++  ITEM Assertion OK : PageSetup.LeftMargin set/get
++  ITEM Assertion OK : PageSetup.LeftMargin set/get
++Verify that top/bottom/header/footer page margins on sheet 2 are all 0.5inch 
++ TEST OK : Test margins (headers)
++ TEST START : Test header/footer text
++  ITEM Assertion OK : PageSetup.LeftHeader set
++  ITEM Assertion OK : PageSetup.LeftHeader set/get
++  ITEM Assertion OK : PageSetup.CenterHeader set
++  ITEM Assertion OK : PageSetup.CenterHeader set/get
++  ITEM Assertion OK : PageSetup.RightHeader set
++  ITEM Assertion OK : PageSetup.RightHeader set/get
++  ITEM Assertion OK : PageSetup.LeftFooter set
++  ITEM Assertion OK : PageSetup.LeftFooter set/get
++  ITEM Assertion OK : PageSetup.CenterFooter set
++  ITEM Assertion OK : PageSetup.CenterFooter set/get
++  ITEM Assertion OK : PageSetup.RightFooter set
++  ITEM Assertion OK : PageSetup.RightFooter set/get
++Verify that headers on sheet 2 are Ready,to,go
++Verify that footers on sheet 2 are This,now,Works
++ TEST OK : Test header/footer text
++ TEST START : Test zoom
++  ITEM Assertion OK : PageSetup.Zoom set
++  ITEM Assertion OK : PageSetup.Zoom set/get
++Verify that sheet 1 zoom is 10%
++ TEST OK : Test zoom
++ TEST START : Test orientation
++  ITEM Assertion OK : PageSetup.Zoom set
++  ITEM Assertion OK : PageSetup.Orientation set/get
++Verify that sheet 1 orientation is now landscape
++ TEST OK : Test orientation
++ TEST START : Test order
++  ITEM Assertion OK : PageSetup.Order get
++  ITEM Assertion OK : PageSetup.Order set/get
++Verify that order on sheet 1 is now over, then down.
++ TEST OK : Test order
++ TEST START : Test first page number
++  ITEM Assertion OK : PageSetup.FirstPageNumber get
++  ITEM Assertion OK : PageSetup.FirstPageNumber set/get
++Verify that first page number on sheet 1 is now 2.
++ TEST OK : Test first page number
++ TEST START : Test center vertically
++  ITEM Assertion OK : PageSetup.CenterVertically get
++  ITEM Assertion OK : PageSetup.CenterVertically set/get
++Verify that CenterVertically on sheet 1 is now true.
++ TEST OK : Test center vertically
++ TEST START : Test center horizontally
++  ITEM Assertion OK : PageSetup.CenterHorizontally get
++  ITEM Assertion OK : PageSetup.CenterHorizontally set/get
++Verify that CenterHorizontally on sheet 1 is now true.
++ TEST OK : Test center horizontally
++ TEST START : Test FitToPagesTall
++  ITEM Assertion OK : PageSetup.FitToPagesTall set/get
++ TEST OK : Test FitToPagesTall
++ TEST START : Test FitToPagesWide
++  ITEM Assertion OK : PageSetup.FitToPagesWide set/get
++ TEST OK : Test FitToPagesWide
++ TEST START : Test PrintHeadings
++  ITEM Assertion OK : PageSetup.PrintHeadings set/get
++  ITEM Assertion OK : PageSetup.PrintHeadings set/get
++ TEST OK : Test PrintHeadings
++END  PageSetup
++Test run finished : 07/21/2008 02:00:07 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,16 @@
++Test run started : 2008ï06ï19 17:14:57
++----------------------------------------------------------------
++ShowDetail-Issue
++ TEST START : ShowDetail-Issue
++  ITEM Assertion OK :  Range.ShowDetail is True
++  ITEM Assertion OK :  Range.ShowDetail is False
++END 'ShowDetail-Issue' Symbol
++ TEST OK : ShowDetail-Issue
++----------------------------------------------------------------
++RangeMerged-Issue
++ TEST START : RangeMerged-Issue
++  ITEM Assertion OK :  Range.RangeMerged is $F$2:$H$5
++  ITEM Assertion OK :  The first address of Range.RangeMerged is $F$2
++END 'RangeMerged-Issue' Symbol
++ TEST OK : RangeMerged-Issue
++Test run finished : 2008ï06ï19 17:14:57
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,8 @@
++Test run started : 10/07/2007 01:55:51
++----------------------------------------------------------------
++MyGoalseek-Issue
++ TEST START : MyGoalseek-Issue
++  ITEM Assertion OK : Variable Range value: 15
++END 'MyGoalseek-Issue' Symbol
++ TEST OK : MyGoalseek-Issue
++Test run finished : 10/07/2007 01:55:51
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,280 @@
++Test run started : 10/07/2007 01:55:56
++----------------------------------------------------------------
++ApplicationMethods
++ TEST START : ApplicationMethods
++  ITEM Assertion OK :  Name of Workbook is: Ranges.xls
++  ITEM Assertion OK :  Address of Application.Columns is: $A:$A
++  ITEM Assertion OK :  Address of Application.Rows is: $1:$1
++  ITEM Assertion OK :  Address of Application.Range is: $1:$1,$5:$7
++  ITEM Assertion OK :  Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
++  ITEM Assertion OK :  Please check manually: Library Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org2\user\basic
++  ITEM Assertion OK :  Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org2\user\template
++  ITEM Assertion OK :  FileSeparator is \
++  ITEM Assertion OK :  Name of ActiveWorkbook is: Ranges.xls
++END 'ApplicationMethods' Symbol
++ TEST OK : ApplicationMethods
++----------------------------------------------------------------
++Insert-Issue
++ TEST START : Insert-Issue
++  ITEM Assertion OK : Insert with xlShiftToRight: 10
++END 'Insert-Issue' Symbol
++ TEST OK : Insert-Issue
++----------------------------------------------------------------
++MergeCells-Issue
++ TEST START : MergeCells-Issue
++  ITEM Assertion OK :  Range.MergeCells is True
++  ITEM Assertion FAIL : MergeCells is null: False
++  ITEM Assertion OK : RowCount after Merge: 13
++  ITEM Assertion OK :  Range.MergeCells is False
++  ITEM Assertion OK : MergeCells is null: False
++  ITEM Assertion FAIL : MergeCells of Second Area is null : False
++  ITEM Assertion FAIL : MergeCells of Ranges is Null: False
++  ITEM Assertion OK : RowCount after Merge: 7
++  ITEM Assertion OK :  Range.MergeCells is False
++  ITEM Assertion OK : MergeCells is null: False
++  ITEM Assertion OK : RowCount after Merge: 7
++END 'MergeCells-Issue' Symbol
++ TEST OK : MergeCells-Issue
++----------------------------------------------------------------
++Areas-Issue
++ TEST START : Areas-Issue
++  ITEM Assertion OK : Range Areas Count is2
++  ITEM Assertion OK : First Range Address is: $E$8:$G$13
++  ITEM Assertion OK : First Row is: 8
++  ITEM Assertion OK : First Column is: 5
++  ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
++  ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
++  ITEM Assertion OK : Range Count:53
++END 'Areas-Issue' Symbol
++ TEST OK : Areas-Issue
++----------------------------------------------------------------
++Fill-Methods-Issue
++ TEST START : Fill-Methods-Issue
++  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyRightFillValue
++  ITEM Assertion OK :  Range Value after FillDown: MyBottomFillValue
++END 'Fill-Methods-Issue' Symbol
++ TEST OK : Fill-Methods-Issue
++----------------------------------------------------------------
++Range/Item-Method-Issue
++ TEST START : Range/Item-Method-Issue
++  ITEM Assertion OK :  Range of multiple columns is: $A:$A,$C:$C
++  ITEM Assertion OK :  Range of multiple rows is: $1:$1,$5:$7
++  ITEM Assertion OK :  Range of several columns is: $C:$E,$D:$D
++  ITEM Assertion OK :  Range of several rows is: $5:$8,$6:$10
++  ITEM Assertion OK :  Range of several single cells is: $C$5,$E$8
++  ITEM Assertion OK :  Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK :  Range of a single Item Cell is: $E$21
++  ITEM Assertion OK :  Range of a single Item Cell is: $F$21
++  ITEM Assertion OK :  Range of a single Item Cell is: $F$10
++END 'Range/Item-Method-Issue' Symbol
++ TEST OK : Range/Item-Method-Issue
++----------------------------------------------------------------
++R1C1-Formulas-Issue
++ TEST START : R1C1-Formulas-Issue
++  ITEM Assertion OK :  R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
++  ITEM Assertion FAIL :  Range.Formula is: =IF(OR(J8=0,RC[2]="YES"),"")
++END 'R1C1-Formulas-Issue' Symbol
++ TEST OK : R1C1-Formulas-Issue
++----------------------------------------------------------------
++Verify_Delete
++ TEST START : Verify_Delete
++  ITEM Assertion OK : Ranges are intersecting: $G$13
++  ITEM Assertion OK : Delete with Default: $AJ$4
++  ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
++  ITEM Assertion OK : Delete with ShiftUp: $M$22
++END 'Verify_Delete' Symbol
++ TEST OK : Verify_Delete
++----------------------------------------------------------------
++Value-Issue
++ TEST START : Value-Issue
++  ITEM Assertion OK : Value of Range is: 12.3
++  ITEM Assertion OK : Text of Range is: 12.3
++  ITEM Assertion OK : Range has Formula: False
++  ITEM Assertion OK : Cell has Formula: False
++  ITEM Assertion FAIL : Text of Range is null: False
++  ITEM Assertion OK : Range has Formula: True
++  ITEM Assertion OK : Cell has Formula: True
++  ITEM Assertion OK : Value of Cell is: 12
++  ITEM Assertion OK : Application.Calculation is : -4135
++  ITEM Assertion OK : Calculation is automated: True
++  ITEM Assertion OK : Range has Formula: True
++  ITEM Assertion OK : Value of Cell is: 16
++  ITEM Assertion OK : Text of Cell is: 16
++  ITEM Assertion OK : Text of Cell is: 16
++  ITEM Assertion OK : Range has Formula after 'ClearContents: False
++  ITEM Assertion OK : Text of Cell is: 
++  ITEM Assertion OK : Text of Cell is: 
++END 'Value-Issue' Symbol
++ TEST OK : Value-Issue
++----------------------------------------------------------------
++AutoFit issue
++ TEST START : AutoFit issue
++  ITEM Assertion OK :  Columns.AutoFit: CurrentWidth is 467
++  ITEM Assertion FAIL :  Rows.AutoFit: CurrentHeight is 78
++END 'AutoFit issue' Symbol
++ TEST OK : AutoFit issue
++----------------------------------------------------------------
++Selections
++ TEST START : Selections
++  ITEM Assertion OK : ActiveCell is : $E$8
++  ITEM Assertion OK : Active Cell is : $E$8
++  ITEM Assertion OK : Number of Cells in Range: 52
++  ITEM Assertion OK : Number of Cells in Range: 52
++  ITEM Assertion OK : Number of Cells in Range: 52
++END 'Selections' Symbol
++ TEST OK : Selections
++----------------------------------------------------------------
++Offset-Resize
++ TEST START : Offset-Resize
++  ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
++  ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
++  ITEM Assertion OK :   Resized Range is : $A$20:$D$23
++END 'Offset-Resize' Symbol
++ TEST OK : Offset-Resize
++----------------------------------------------------------------
++Ranges-Address
++ TEST START : Ranges-Address
++  ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
++  ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
++  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++  ITEM Assertion FAIL : Range Address is: R8C5:R13C7,R13C7:R19C11
++  ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
++END 'Ranges-Address' Symbol
++ TEST OK : Ranges-Address
++----------------------------------------------------------------
++Range-Address
++ TEST START : Range-Address
++  ITEM Assertion OK : Range Address is: $E$8:$G$13
++  ITEM Assertion OK : Range Address is: $E8:$G13
++  ITEM Assertion OK : Range Address is: E$8:G$13
++  ITEM Assertion OK : Range Address is: R8C5:R13C7
++  ITEM Assertion FAIL : Range Address is: R8C5:R13C7
++  ITEM Assertion OK : Range Address is: R8C5:R13C7
++  ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
++END 'Range-Address' Symbol
++ TEST OK : Range-Address
++----------------------------------------------------------------
++Column-Address
++ TEST START : Column-Address
++  ITEM Assertion OK : Range Address is: $F$8:$F$13
++  ITEM Assertion OK : Range Address is: $F8:$F13
++  ITEM Assertion OK : Range Address is: F$8:F$13
++  ITEM Assertion OK : Range Address is: R8C6:R13C6
++  ITEM Assertion FAIL : Range Address is: R8C6:R13C6
++  ITEM Assertion OK : Range Address is: R8C6:R13C6
++  ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
++END 'Column-Address' Symbol
++ TEST OK : Column-Address
++----------------------------------------------------------------
++Row-Address
++ TEST START : Row-Address
++  ITEM Assertion OK : Range Address is: $E$9:$G$9
++  ITEM Assertion OK : Range Address is: $E9:$G9
++  ITEM Assertion OK : Range Address is: E$9:G$9
++  ITEM Assertion OK : Range Address is: R9C5:R9C7
++  ITEM Assertion FAIL : Range Address is: R9C5:R9C7
++  ITEM Assertion OK : Range Address is: R9C5:R9C7
++  ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
++END 'Row-Address' Symbol
++ TEST OK : Row-Address
++----------------------------------------------------------------
++SingleCell-Address
++ TEST START : SingleCell-Address
++  ITEM Assertion OK : Range Address is: $F$9
++  ITEM Assertion OK : Range Address is: $F9
++  ITEM Assertion OK : Range Address is: F$9
++  ITEM Assertion OK : Range Address is: R9C6
++  ITEM Assertion FAIL : Range Address is: R9C6
++  ITEM Assertion OK : Range Address is: R9C6
++  ITEM Assertion OK : Range Address is: R[7]C[4]
++  ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
++END 'SingleCell-Address' Symbol
++ TEST OK : SingleCell-Address
++----------------------------------------------------------------
++Heights and Widths
++ TEST START : Heights and Widths
++  ITEM Assertion OK : Range RowHeight is 40
++  ITEM Assertion OK : Range ColumnWidth is 50
++  ITEM Assertion OK : Range Height is 240
++  ITEM Assertion FAIL : Range Width is 675
++  ITEM Assertion OK : Range RowHeight is 50
++  ITEM Assertion OK : Range ColumnWidth is 50
++  ITEM Assertion OK : Range Height is 300
++  ITEM Assertion FAIL : Range Width is 675
++  ITEM Assertion FAIL : RowHeight is null: False
++  ITEM Assertion OK : ColumnWidth is null: True
++END 'Heights and Widths' Symbol
++ TEST OK : Heights and Widths
++----------------------------------------------------------------
++RangeRowColumn-Issue
++ TEST START : RangeRowColumn-Issue
++  ITEM Assertion OK : Row is: 8
++  ITEM Assertion OK : Column is: 5
++  ITEM Assertion OK : EntireRow.Columns.Count = 256
++  ITEM Assertion OK : EntireColumn.Rows.Count = 131072
++END 'RangeRowColumn-Issue' Symbol
++ TEST OK : RangeRowColumn-Issue
++----------------------------------------------------------------
++Replace-Issue
++ TEST START : Replace-Issue
++  ITEM Assertion OK : Value after Replace: YourValue
++  ITEM Assertion OK : Value after Replace: YourValue
++  ITEM Assertion OK : Value after Replace: ReplaceValue
++  ITEM Assertion OK : Value after Replace: New ReplaceValue
++  ITEM Assertion OK : Value after Replace: New ReplaceValue
++  ITEM Assertion OK : Value after Replace: New Replace
++  ITEM Assertion OK : Value after Replace: 
++END 'Replace-Issue' Symbol
++ TEST OK : Replace-Issue
++----------------------------------------------------------------
++Hidden-Issue
++ TEST START : Hidden-Issue
++  ITEM Assertion OK : -  Range.Rows.Hidden (set)
++  ITEM Assertion OK : -  Range.Rows.Hidden (get)
++  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (set)
++  ITEM Assertion OK : -  Range.Rows.Item(1).Hidden (get)
++  ITEM Assertion OK : -  Range.Columns.Hidden (set)
++  ITEM Assertion OK : -  Range.Columns.Hidden (get)
++  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (set)
++  ITEM Assertion OK : -  Range.Columns.Item(1).Hidden (get)
++END 'Hidden-Issue' Symbol
++ TEST OK : Hidden-Issue
++----------------------------------------------------------------
++End issue
++ TEST START : End issue
++  ITEM Assertion OK : -  = $E$48
++  ITEM Assertion OK : -  = $E$1
++  ITEM Assertion OK : -  = $E$3
++  ITEM Assertion OK : -  = $A$8
++  ITEM Assertion OK : -  = $B$8
++  ITEM Assertion OK : -  = $IV$8
++  ITEM Assertion OK : -  = $Z$8
++END 'End issue' Symbol
++ TEST OK : End issue
++----------------------------------------------------------------
++Outline issue
++ TEST START : Outline issue
++  ITEM Assertion OK : -  Range.clearOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++END 'Outline issue' Symbol
++ TEST OK : Outline issue
++----------------------------------------------------------------
++Validation
++ TEST START : Validation
++  ITEM Assertion OK : Validation Input Message is : Attention!
++  ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
++  ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
++  ITEM Assertion OK : Validation Error Message is : An Error occured
++  ITEM Assertion OK : Validation Error Title is : Microsoft Excel
++END 'Validation' Symbol
++ TEST OK : Validation
++Test run finished : 10/07/2007 01:56:04
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,65 @@
++Test run started : 10/07/2007 01:56:15
++BEGIN TestCalc
++ TEST START : RangeTest3
++  ITEM Assertion FAIL : - setFormulaR1C1
++  ITEM Assertion OK : - getFormulaR1C1
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy(Range("I10"))
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
++  ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
++  ITEM Assertion OK : PasteSpecial 
++  ITEM Assertion OK : PasteSpecial SkipBlanks:=True
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
++  ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
++  ITEM Assertion OK : PasteSpecial Transpose:=True
++  ITEM Assertion FAIL : ActiveWorkbook.FileFormat
++  ITEM Assertion OK : ActiveWorkbook.Name
++  ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
++  ITEM Assertion FAIL : -  = ActiveWorkbook.Colors(3) set
++  ITEM Assertion OK : -  = ActiveWorkbook.ResetColors
++  ITEM Assertion OK : -  = ActiveWorkbook.Colors(3) get
++  ITEM Assertion OK : -  = Range("K22").End (xlDown)
++  ITEM Assertion OK : -  = Range("K22").End (xlUo)
++  ITEM Assertion OK : -  = Range("K22").End (xlToLeft)
++  ITEM Assertion OK : -  = Range("K22").End (xlRight)
++  ITEM Assertion OK : -  ActiveSpreadsheet.Next
++  ITEM Assertion OK : -  ActiveSpreadsheet.Next
++  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
++  ITEM Assertion OK : -  ActiveSpreadsheet.Previous
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter field:=1, Criteria1:="="
++  ITEM Assertion OK : -  Range("J4:J11").AutoFilter 
++  ITEM Assertion OK : -  ActiveSheet.Resize.Select
++  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
++  ITEM Assertion FAIL : -  Application.GoTo Reference:="R[8]C[2]"
++  ITEM Assertion OK : -  Application.GoTo Reference:="R8C2"
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Ungroup- please check visually
++  ITEM Assertion OK : -  Range.Ungroup - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.Group - please check visually
++  ITEM Assertion OK : -  Range.clearOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  Range.AutoOutline - please check visually
++  ITEM Assertion OK : -  ActiveSheet.UsedRange.Select
++  ITEM Assertion OK : -  Range("A13").AddIndent
++  ITEM Assertion OK : -  Range("A13").IndentLevel set
++  ITEM Assertion OK : -  Range("A13").IndentLevel get
++  ITEM Assertion OK : -  Range("A13").IndentLevel get
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
++  ITEM Assertion OK : - Range.Calculate
++  ITEM Assertion OK : Worksheet.Calculate
++  ITEM Assertion OK : - Application.Calculate
++  ITEM Assertion OK : Global.Calculate
++  ITEM Assertion OK : Calculation set
++  ITEM FAIL (RangeTest3)
++ TEST Not succesfully completed : RangeTest3
++END   TestCalc
++Test run finished : 10/07/2007 01:56:23
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,77 @@
++Test run started : 16/10/2007 17:46:03
++BEGIN Shapes_Collection_Behaviour
++ TEST START : Shapes_Collection_Behaviour
++  ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1' 
++  ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2' 
++ TEST Success. : Shapes_Collection_Behaviour
++END Shapes_Collection_Behaviour
++BEGIN Shapes_Select_Item
++ TEST START : Shapes_Select_Item
++  ITEM Assertion OK : Correctly selected shape through Range
++  ITEM Assertion OK : Correctly selected shape through Item
++  ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
++  ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
++ TEST Success. : Shapes_Select_Item
++END Shapes_Select_Item
++BEGIN Shapes_Fill
++ TEST START : Shapes_Fill
++  ITEM Assertion OK : correctly set visibility of shape fill
++  ITEM Assertion OK : correctly set transparency of shape line
++  ITEM Assertion OK : correctly set forecolor of shape fill
++  ITEM Assertion FAIL : correctly set backcolor of shape fill
++  ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
++  ITEM Assertion OK : correctly set forecolor of shape fill
++  ITEM Assertion FAIL : correctly set forecolor of shape fill
++ TEST Success. : Shapes_Fill
++END  Shapes_Fill
++BEGIN Shapes_Line
++ TEST START : Shapes_Line
++  ITEM Assertion FAIL : correctly set weight of shape line
++  ITEM Assertion OK : correctly set visibility of shape line
++  ITEM Assertion OK : correctly set transparency of shape line
++  ITEM Assertion OK : correctly set dash style of shape line
++  ITEM Assertion OK : correctly set dash style of shape line
++  ITEM Assertion OK : correctly set forecolor of shape line
++  ITEM Assertion FAIL : correctly set backcolor of shape line
++ TEST Success. : Shapes_Line
++END  Shapes_Line
++BEGIN Shapes_TextFrame
++ TEST START : Shapes_TextFrame
++  ITEM Assertion OK : correctly set Autosize of Shape TextFrame
++ TEST Success. : Shapes_TextFrame
++END  Shapes_TextFrame
++BEGIN Shapes_SimpleGeometry
++ TEST START : Shapes_SimpleGeometery
++  ITEM Assertion OK : shape height should be 49.4519655148368 and got 49.4078709034412
++  ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
++  ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
++  ITEM Assertion OK : shape top should be 44.1511784471699 and got 44.1354302906816
++  ITEM Assertion OK : shape rotation should be 0 and got 0
++  ITEM Assertion OK : shape rotation should be 25 and got 25
++  ITEM Assertion OK : shape incrementrotation should be 50 and got 50
++  ITEM Assertion OK : shape incrementleft should be 69.7480272284707 and got 69.7322790719824
++  ITEM Assertion OK : shape incrementtop should be 93.8141674447769 and got 93.7984192882885
++ TEST Success. : Shapes_SimpleGeometery
++END Shapes_SimpleGeometry
++BEGIN Shapes_Range
++ TEST START : Shapes_Range
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
++  ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
++ TEST Success. : Shapes_Range
++END Shapes_Range
++BEGIN Shapes_ShapeRange
++ TEST START : Shapes_ShapeRange
++  ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 89.7322790719824 and got 89.7165297816359
++  ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
++  ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 113.798419288289 and got 113.782669997942
++  ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 67.4519655148368 and got 67.4362162244903
++  ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
++  ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
++END Shapes_ShapeRange
++Test run finished : 16/10/2007 17:46:04
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,62 @@
++Test run started : 17/07/2007 15:26:54
++----------------------------------------------------------------
++TestAddress
++ TEST START : TestAddress
++  ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
++  ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
++  ITEM Assertion OK : test3 Range ('e:f')  A1 style addressing
++  ITEM Assertion OK : test4 Range ('e:f')  R1C1 style addressing
++  ITEM Assertion OK : test5 Columns A1 style addressing
++  ITEM Assertion OK : test6 Columns R1C1 style addressing
++  ITEM Assertion OK : test7 Columns(3) A1 style addressing
++  ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
++  ITEM Assertion OK : test9 Columns('e') A1 style addressing
++  ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
++  ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
++  ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
++  ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
++  ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
++  ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
++  ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
++  ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
++  ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
++  ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
++  ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
++  ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
++  ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
++  ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
++  ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
++  ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
++  ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false 
++  ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false 
++  ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
++  ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++  ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
++  ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
++  ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
++  ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
++  ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
++  ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
++  ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
++  ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++  ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
++  ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
++  ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
++  ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
++  ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
++  ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
++  ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
++  ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
++  ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
++  ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
++  ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
++  ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
++Test Results
++============
++
++Tests passed: 49
++Tests failed: 0
++
++END 'TestAddress
++ TEST OK : TestAddress
++Test run finished : 17/07/2007 15:26:56
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,45 @@
++Test run started : 17/07/2007 15:08:56
++----------------------------------------------------------------
++MiscRangeTests
++ TEST START : MiscRangeTests
++  ITEM Assertion OK : test 1
++  ITEM Assertion OK : test 2
++  ITEM Assertion OK : test 3
++  ITEM Assertion OK : test 4
++  ITEM Assertion OK : test 5
++  ITEM Assertion OK : test 6
++  ITEM Assertion OK : test 7
++  ITEM Assertion OK : test 8
++  ITEM Assertion OK : test 9
++  ITEM Assertion OK : test 10
++  ITEM Assertion OK : test 11
++  ITEM Assertion OK : test 12
++  ITEM Assertion OK : test 13
++  ITEM Assertion OK : test 14
++  ITEM Assertion OK : test 15
++  ITEM Assertion OK : test 16
++  ITEM Assertion OK : test 17
++  ITEM Assertion OK : test 18
++  ITEM Assertion OK : test 19
++  ITEM Assertion OK : test 20
++  ITEM Assertion OK : test 21
++  ITEM Assertion OK : test 22
++  ITEM Assertion OK : test 23
++  ITEM Assertion OK : test 24
++  ITEM Assertion OK : test 25
++  ITEM Assertion OK : test 26
++  ITEM Assertion OK : test 27
++  ITEM Assertion OK : test 28
++  ITEM Assertion OK : test 29
++  ITEM Assertion OK : test 30
++  ITEM Assertion OK : test 31
++No. tests: 31
++Summary
++=======
++Run:       31
++Passed:    31
++Failed:    0
++
++END 'MiscRangeTests
++ TEST OK : MiscRangeTests
++Test run finished : 17/07/2007 15:08:59
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,14 @@
++Test run started : 2007-11-21 11:24:04
++BEGIN Replace
++ TEST START : Test Replace function
++  ITEM Assertion OK : common string:aefefdBc
++  ITEM Assertion OK : expression string:aefefdef
++  ITEM Assertion OK : binanary compare:aefefdBc
++  ITEM Assertion OK : text compare:aefefdef
++  ITEM Assertion OK : text compare:aefefdef
++  ITEM Assertion OK : start = 3:cefdBc
++  ITEM Assertion OK : count = 2: aefefdBc
++  ITEM Assertion OK : start = 1, count = 0, not support in Unix: abcbcdBc
++ TEST OK : Test Replace function
++END  Replace
++Test run finished : 2007-11-21 11:24:04
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,87 @@
++Test run started : 7/21/2008 10:37:24 AM
++BEGIN PageSetup
++ TEST START : Sheet_PrintArea
++  ITEM Assertion OK : PrintArea has changed as expected
++ TEST OK : Sheet_PrintArea
++ TEST START : Test margins (no headers)
++  ITEM Assertion OK : PageSetup.LeftMargin set/get
++  ITEM Assertion OK : PageSetup.RightMargin set/get
++  ITEM Assertion OK : PageSetup.TopMargin set/get
++  ITEM Assertion OK : PageSetup.BottomMargin set/get
++Verify that page margins on sheet 1 are all 0.5inch   
++ TEST OK : Test margins (no headers)
++ TEST START : Test margins (headers)
++  ITEM Assertion OK : PageSetup.HeaderMargin set/get
++  ITEM Assertion OK : PageSetup.FooterMargin set/get
++  ITEM Assertion OK : PageSetup.LeftMargin set/get
++  ITEM Assertion OK : PageSetup.LeftMargin set/get
++Verify that top/bottom/header/footer page margins on sheet 2 are all 0.5inch 
++ TEST OK : Test margins (headers)
++ TEST START : Test header/footer text
++  ITEM Assertion OK : PageSetup.LeftHeader set
++  ITEM Assertion OK : PageSetup.LeftHeader set/get
++  ITEM Assertion OK : PageSetup.CenterHeader set
++  ITEM Assertion OK : PageSetup.CenterHeader set/get
++  ITEM Assertion OK : PageSetup.RightHeader set
++  ITEM Assertion OK : PageSetup.RightHeader set/get
++  ITEM Assertion OK : PageSetup.LeftFooter set
++  ITEM Assertion OK : PageSetup.LeftFooter set/get
++  ITEM Assertion OK : PageSetup.CenterFooter set
++  ITEM Assertion OK : PageSetup.CenterFooter set/get
++  ITEM Assertion OK : PageSetup.RightFooter set
++  ITEM Assertion OK : PageSetup.RightFooter set/get
++Verify that headers on sheet 2 are Ready,to,go
++Verify that footers on sheet 2 are This,now,Works
++ TEST OK : Test header/footer text
++ TEST START : Test zoom
++  ITEM Assertion OK : PageSetup.Zoom set
++  ITEM Assertion OK : PageSetup.Zoom set/get
++Verify that sheet 1 zoom is 10%
++ TEST OK : Test zoom
++ TEST START : Test orientation
++  ITEM Assertion OK : PageSetup.Zoom set
++  ITEM Assertion OK : PageSetup.Orientation set/get
++Verify that sheet 1 orientation is now landscape
++ TEST OK : Test orientation
++ TEST START : Test paper size
++  ITEM Assertion OK : PageSetup.PaperSize get
++  ITEM Assertion OK : PageSetup.PaperSize set/get
++Verify that paper size on sheet 1 is now Letter
++ TEST OK : Test paper size
++ TEST START : Test order
++  ITEM Assertion OK : PageSetup.Order get
++  ITEM Assertion OK : PageSetup.Order set/get
++Verify that order on sheet 1 is now over, then down.
++ TEST OK : Test order
++ TEST START : Test first page number
++  ITEM Assertion OK : PageSetup.FirstPageNumber get
++  ITEM Assertion OK : PageSetup.FirstPageNumber set/get
++Verify that first page number on sheet 1 is now 2.
++ TEST OK : Test first page number
++ TEST START : Test center vertically
++  ITEM Assertion OK : PageSetup.CenterVertically get
++  ITEM Assertion OK : PageSetup.CenterVertically set/get
++Verify that CenterVertically on sheet 1 is now true.
++ TEST OK : Test center vertically
++ TEST START : Test center horizontally
++  ITEM Assertion OK : PageSetup.CenterHorizontally get
++  ITEM Assertion OK : PageSetup.CenterHorizontally set/get
++Verify that CenterHorizontally on sheet 1 is now true.
++ TEST OK : Test center horizontally
++ TEST START : Test FitToPagesTall
++  ITEM Assertion OK : PageSetup.FitToPagesTall set/get
++ TEST OK : Test FitToPagesTall
++ TEST START : Test FitToPagesWide
++  ITEM Assertion OK : PageSetup.FitToPagesWide set/get
++ TEST OK : Test FitToPagesWide
++ TEST START : Test PrintHeadings
++  ITEM Assertion OK : PageSetup.PrintHeadings set/get
++  ITEM Assertion OK : PageSetup.PrintHeadings set/get
++ TEST OK : Test PrintHeadings
++ TEST START : Test PrintTitleRows
++  ITEM Assertion OK : PageSetup.PrintTitleRows get
++  ITEM Assertion OK : PageSetup.PrintTitleRows set range/get
++  ITEM Assertion OK : PageSetup.PrintTitleRows set false/get
++ TEST OK : Test PrintTitleRows
++END  PageSetup
++Test run finished : 7/21/2008 10:37:32 AM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,20 @@
++Test run started : 16/10/2007 17:42:01
++----------------------------------------------------------------
++TestAddress
++ TEST START : TestAddress
++  ITEM Assertion OK : test1 'starts with' string criteria
++  ITEM Assertion OK : test2 'not equal to' string criteria
++  ITEM Assertion OK : test3 'ends with' string criteria
++  ITEM Assertion OK : test4 field 'all' 
++  ITEM Assertion OK : test5 numeric '<15' 
++  ITEM Assertion OK : test6 numeric '>=15' 
++  ITEM Assertion OK : test7 numeric '<=12' 
++Test Results
++============
++
++Tests passed: 7
++Tests failed: 0
++
++END 'TestAddress
++ TEST OK : TestAddress
++Test run finished : 16/10/2007 17:42:02
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,68 @@
++Test run started : 10/07/2007 01:55:47
++----------------------------------------------------------------
++ClearFormtsIssue
++ TEST START : ClearFormtsIssue
++  ITEM Assertion OK : Range.Font.Bold is: True
++  ITEM Assertion OK : Range.Font.Bold is: False
++END 'ClearFormtsIssue' Symbol
++ TEST OK : ClearFormtsIssue
++----------------------------------------------------------------
++VerticalAlignment-Issue
++ TEST START : VerticalAlignment-Issue
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : -  Range.VerticalAlignment (get)
++  ITEM Assertion OK : -  Range.VerticalAlignment (set)
++  ITEM Assertion OK : Range.VeritcalAlignment is Null
++END 'VerticalAlignment-Issue' Symbol
++ TEST OK : VerticalAlignment-Issue
++----------------------------------------------------------------
++HorizontalAlignment-Issue
++ TEST START : HorizontalAlignment-Issue
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range.HorizontalAlignment (set)
++  ITEM Assertion OK : Range.HorizontalAlignment is Null
++END 'HorizontalAlignment-Issue' Symbol
++ TEST OK : HorizontalAlignment-Issue
++----------------------------------------------------------------
++WrapText-Issue
++ TEST START : WrapText-Issue
++  ITEM Assertion OK : -  Range.WrapText (get)
++  ITEM Assertion OK : -  Range.WrapText (get)
++  ITEM Assertion OK : Range.WrapText is Null
++END 'WrapText-Issue' Symbol
++ TEST OK : WrapText-Issue
++----------------------------------------------------------------
++FontBorderIssues
++ TEST START : FontBorderIssues
++  ITEM Assertion OK : -  = Borders.Color (getColor)
++  ITEM Assertion OK : -  = Font.Color (getColor)
++END 'FontBorderIssues' Symbol
++ TEST OK : FontBorderIssues
++----------------------------------------------------------------
++RangeSizeIssues
++ TEST START : RangeSizeIssues
++  ITEM Assertion OK : Range.Left is: 100.5291
++  ITEM Assertion OK : Range.Top is: 95.39775
++  ITEM Assertion OK : Range.Width is: 191.25
++  ITEM Assertion OK : Range.Height is: 271.5
++END 'RangeSizeIssues' Symbol
++ TEST OK : RangeSizeIssues
++----------------------------------------------------------------
++ApplicationIssues
++ TEST START : ApplicationIssues
++  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
++  ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
++END 'ApplicationIssues' Symbol
++ TEST OK : ApplicationIssues
++Test run finished : 10/07/2007 01:55:48
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,60 @@
++Test run started : 10/07/2007 01:56:07
++BEGIN TestCalc
++ TEST START : RangeTest2
++  ITEM Assertion OK : -  Range("D15").Row 
++  ITEM Assertion OK : -  WorkSheet("D15").Range.Row 
++  ITEM Assertion OK : -  Range("D15").Column 
++  ITEM Assertion OK : -  Worksheet.Range("D15").Column 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Valuer 
++  ITEM Assertion OK : -  Range("D1").EntireRow.Columns.Count 
++  ITEM Assertion OK : -  Range("D1").EntireColumn.Rows.Count 
++  ITEM Assertion OK : -  Range("D15").ClearContent
++  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Rows.Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Rows(1).Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Columns.Hidden (get)
++  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (set)
++  ITEM Assertion OK : -  Range("M1:N2").Columns(1).Hidden (get)
++  ITEM Assertion OK : -  Range("B38").Orientation (get)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlDownward)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlUpward)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
++  ITEM Assertion OK : -  Range("B38").Orientation (set)
++  ITEM Assertion OK : -  Range("B38").Orientation (set = xlVertical)
++  ITEM Assertion OK : -  Range("B39").WrapText (get)
++  ITEM Assertion OK : -  Range("B39").WrapText (set)
++  ITEM Assertion OK : -  Range("B39").WrapText (set)
++  ITEM Assertion OK : -  Range("E39").MergeCells (get)
++  ITEM Assertion OK : -  Range("F39").MergeCells (get)
++  ITEM Assertion OK : -  Range("E39").MergeCells (set)
++  ITEM Assertion FAIL : -  Range("F39").MergeCells (set)
++  ITEM Assertion OK : -  Range("E39").MergeCells (set)
++  ITEM Assertion OK : -  Range("F39").MergeCells (set)
++  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
++  ITEM Assertion OK : -  Range("C41:C42").Replace  MatchCase:=True 
++  ITEM Assertion OK : -  Range("D41:D42").Replace  MatchCase:=False 
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").VerticalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (get)
++  ITEM Assertion OK : -  Range("B39").HorizontalAlignment (set)
++  ITEM FAIL (RangeTest2)
++ TEST Not succesfully completed : RangeTest2
++END   TestCalc
++Test run finished : 10/07/2007 01:56:12
+Index: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/PageBreaks.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/PageBreaks.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/stringplusdouble.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/stringplusdouble.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/Window.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/Window.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/partition.xls
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: sc/source/ui/vba/testvba/TestDocuments/partition.xls
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/runTests.pl
+===================================================================
+--- sc/source/ui/vba/testvba/runTests.pl	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/runTests.pl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,121 @@
++#!/usr/bin/perl -w
++use URI::Escape;
++use File::Basename;
++use Cwd;
++use Cwd 'abs_path';
 +
-+    }
++$numArgs = $#ARGV + 1;
++print "thanks, you gave me $numArgs command-line arguments.\n";
 +
-+    return uno::Reference< excel::XRange >();
++foreach $argnum (0 .. $#ARGV) {
++   print "$ARGV[$argnum]\n";
 +}
 +
- uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Reference<  uno::XComponentContext >& xContext, ScDocShell* pDocSh )
- {
- 	uno::Reference< excel::XRange > xKeyRange;
-@@ -2740,10 +2996,10 @@ void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRan
- 
- 		// make sure that upper left poing of key range is within the
- 		// parent range
--		if (  colRowKeyAddress.StartColumn >= parentRangeAddress.StartColumn &&
--			colRowKeyAddress.StartColumn <= parentRangeAddress.EndColumn  &&
-+		if (  ( !bIsSortColumn && colRowKeyAddress.StartColumn >= parentRangeAddress.StartColumn &&
-+			colRowKeyAddress.StartColumn <= parentRangeAddress.EndColumn ) || ( bIsSortColumn && 
- 			colRowKeyAddress.StartRow >= parentRangeAddress.StartRow &&
--			colRowKeyAddress.StartRow <= parentRangeAddress.EndRow  )
-+			colRowKeyAddress.StartRow <= parentRangeAddress.EndRow  ) )
- 		{
- 			//determine col/row index
- 			if ( bIsSortColumn )
-@@ -2799,7 +3055,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
- /* 
- 	if (  isSingleCellRange() )
- 	{
--		uno::Reference< vba::XRange > xCurrent = CurrentRegion();
-+		uno::Reference< XRange > xCurrent = CurrentRegion();
- 		xCurrent->Sort( Key1, Order1, Key2, Type, Order2, Key3, Order3, Header, OrderCustom, MatchCase, Orientation, SortMethod, DataOption1, DataOption2, DataOption3 );
- 		return; 
- 	}
-@@ -3117,6 +3373,18 @@ ScVbaRange::hasElements() throw (uno::RuntimeException)
- uno::Reference< container::XEnumeration > SAL_CALL 
- ScVbaRange::createEnumeration() throw (uno::RuntimeException)
- {
-+	if ( mbIsColumns || mbIsRows )
-+	{
-+		uno::Reference< table::XColumnRowRange > xColumnRowRange(mxRange, uno::UNO_QUERY );
-+		uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW );
-+                sal_Int32 nElems = 0;
-+		if ( mbIsColumns )	
-+			nElems = xColumnRowRange->getColumns()->getCount();
-+		else
-+			nElems = xColumnRowRange->getRows()->getCount();
-+                return new ColumnsRowEnumeration( mxContext, xRange, nElems );
-+		
-+	}
- 	return new CellsEnumeration( mxContext, m_Areas );
- }
- 
-@@ -3364,26 +3632,32 @@ ScVbaRange::getRowHeight() throw (uno::RuntimeException)
- 		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();
- 	
- 	sal_Int32 nStartRow = thisAddress.StartRow;
- 	sal_Int32 nEndRow = thisAddress.EndRow;
--	double nHeight = getCalcRowHeight( thisAddress );
-+        USHORT nRowTwips = 0;
- 	// #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 ) 
-+	ScDocShell* pShell = getScDocShell();
-+	if ( pShell )
- 	{
- 		for ( sal_Int32 nRow = nStartRow ; nRow <= nEndRow; ++nRow )
- 		{
- 			thisAddress.StartRow = nRow;
--			double nCurHeight = getCalcRowHeight( thisAddress );
--			if ( nHeight != nCurHeight )
-+			USHORT nCurTwips = pShell->GetDocument()->GetOriginalHeight( thisAddress.StartRow, thisAddress.Sheet );
-+			if ( nRow == nStartRow )
-+				nRowTwips = nCurTwips;
-+			if ( nRowTwips != nCurTwips )
- 				return aNULL();
- 		}
- 	}
-+	double nHeight = lcl_Round2DecPlaces( lcl_TwipsToPoints( nRowTwips ) );
- 	return uno::makeAny( nHeight );
- }
- 
-@@ -3555,7 +3829,7 @@ ScVbaRange::getWorksheet() throw (uno::RuntimeException)
- 		ScDocShell* pDocShell = getDocShellFromRange(xRange);
- 		RangeHelper rHelper(xRange);
- 		// parent should be Thisworkbook
--       	xSheet.set( new ScVbaWorksheet( uno::Reference< vba::XHelperInterface >(), mxContext,rHelper.getSpreadSheet(),pDocShell->GetModel()) );
-+       	xSheet.set( new ScVbaWorksheet( uno::Reference< XHelperInterface >(), mxContext,rHelper.getSpreadSheet(),pDocShell->GetModel()) );
- 	}	
- 	return xSheet;
- }
-@@ -3622,14 +3896,14 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
- 			if ( xRange.is() )
- 			{
- 				// #FIXME need proper (WorkSheet) parent
--				uno::Reference< excel::XRange > xVbRange =  new  ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xRange );
-+				uno::Reference< excel::XRange > xVbRange =  new  ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xRange );
- 				return xVbRange;
- 			}
- 		}
- 	}
- 	uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY );
- 	uno::Reference< table::XCellRange > xSheetRange( xView->getActiveSheet(), uno::UNO_QUERY_THROW ); 
--	ScVbaRange* pRange = new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xSheetRange );
-+	ScVbaRange* pRange = new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xSheetRange );
- 	uno::Reference< excel::XRange > xVbSheetRange( pRange );
- 	return pRange->Range( Cell1, Cell2, true ); 
- }
-@@ -4120,7 +4394,7 @@ ScVbaRange::Autofit() throw (uno::RuntimeException)
- 		// if the range is a not a row or column range autofit will
- 		// throw an error
- 
--		if ( !mbIsColumns  )
-+		if ( !( mbIsColumns || mbIsRows ) )
- 			DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); 			
-         ScDocShell* pDocShell = getDocShellFromRange( mxRange );
-         if ( pDocShell )
-@@ -4299,6 +4573,113 @@ void ScVbaRange::setFormulaHidden(const uno::Any& Hidden) throw ( script::BasicE
- 	xProps->setPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLPRO)), uno::makeAny(rCellAttr));
- }
- 
-+uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
-+{
-+	// #FIXME, If the specified range is in a PivotTable report
 +
-+	// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
-+	if( m_Areas->getCount() > 1 )
-+		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not get Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
-+	
-+	sal_Bool bShowDetail = sal_False;
++my $binDir = abs_path( dirname($0) );
 +
-+	RangeHelper helper( mxRange );
-+	uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor();
-+	xSheetCellCursor->collapseToCurrentRegion();
-+	uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xSheetCellCursor, uno::UNO_QUERY_THROW);
-+	table::CellRangeAddress aOutlineAddress = xCellRangeAddressable->getRangeAddress();
++my $sysDir = "unix";
++my $fileSep = "/";
++my $theResult;
++my $officepath = shift || die "please specify path to office installation program dir";
++my $DocName = shift || "";
++my $programpath = "$officepath"."3/program:$officepath/program:";
++my $basiclibrarypath = "$officepath/basis3.1/program";
++my $urelibpath = "$officepath/ure/lib";
++my $binext = "";
++my $testDocDir = "$binDir/TestDocuments";
++my $testLogDir = "$binDir/Logs";
++my $testclientname = "testclient";
++my $buildtestclient = "../../../../unxlngi6.pro/bin/$testclientname";
 +
-+	// check if the specified range is a single summary column or row.
-+	table::CellRangeAddress thisAddress = helper.getCellRangeAddressable()->getRangeAddress();
-+	if( (thisAddress.StartRow == thisAddress.EndRow &&  thisAddress.EndRow == aOutlineAddress.EndRow ) ||
-+		(thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn ))
-+	{
-+		sal_Bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? sal_False:sal_True; 
-+		ScDocument* pDoc = getDocumentFromRange( mxRange );
-+		ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable(static_cast<SCTAB>(thisAddress.Sheet), sal_True);
-+		const ScOutlineArray* pOutlineArray =  bColumn ? pOutlineTable->GetColArray(): pOutlineTable->GetRowArray();
-+		if( pOutlineArray )
-+		{
-+			SCCOLROW nPos = bColumn ? (SCCOLROW)(thisAddress.EndColumn-1):(SCCOLROW)(thisAddress.EndRow-1);
-+			ScOutlineEntry* pEntry = pOutlineArray->GetEntryByPos( 0, nPos );
-+			if( pEntry )
-+			{
-+				bShowDetail = !pEntry->IsHidden();
-+				return uno::makeAny( bShowDetail );
-+			}
-+		}
-+	}
-+	else
-+	{
-+		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
-+	}
-+    return aNULL();
++# test testclient
++if ( -e "$buildtestclient" )
++{
++    print "use the latest build\n";
++    system( "cp $buildtestclient ." );
 +}
-+
-+void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::RuntimeException)
++elsif ( !( -e "$testclientname" ) )
 +{
-+	// #FIXME, If the specified range is in a PivotTable report
++    print "$testclientname do not exist\n";
++    exit;
++}
 +
-+	// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
-+	if( m_Areas->getCount() > 1 )
-+		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
-+	
-+	sal_Bool bShowDetail = sal_False;
-+	aShowDetail >>= bShowDetail;
++# test for uname
++system("uname");
++$exit_value  = $? >> 8;
++$signal_num  = $? & 127;
++$dumped_core = $? & 128;
 +
-+	RangeHelper helper( mxRange );
-+	uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor();
-+	xSheetCellCursor->collapseToCurrentRegion();
-+	uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xSheetCellCursor, uno::UNO_QUERY_THROW);
-+	table::CellRangeAddress aOutlineAddress = xCellRangeAddressable->getRangeAddress();
++$failed = ( $exit_value || $signal_num || $dumped_core );
 +
-+	// check if the specified range is a single summary column or row.
-+	table::CellRangeAddress thisAddress = helper.getCellRangeAddressable()->getRangeAddress();
-+	if( (thisAddress.StartRow == thisAddress.EndRow &&  thisAddress.EndRow == aOutlineAddress.EndRow ) ||
-+		(thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn ))
-+	{			
-+		// #FIXME, seems there is a different behavior between MSO and OOo. 
-+		//	In OOo, the showDetail will show all the level entrys, while only show the first level entry in MSO
-+		uno::Reference< sheet::XSheetOutline > xSheetOutline( helper.getSpreadSheet(), uno::UNO_QUERY_THROW );
-+		if( bShowDetail )
-+			xSheetOutline->showDetail( aOutlineAddress );
-+		else
-+			xSheetOutline->hideDetail( aOutlineAddress );
-+	}
-+	else
-+	{
-+		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
-+	}
++print "$failed = ( $exit_value || $signal_num || $dumped_core )\n";
++
++if ( !$failed && open(UNAME, "uname -a|") ) {
++   $theResult = <UNAME>; 
++   close(UNAME);
++   if (  $theResult =~ /^CYGWIN/  ) {
++      # windows under cygwin
++      $sysDir = "win" ;
++      $tmpPath=$ENV{"PATH"};
++      $ENV{"PATH"} = "$officepath:$tmpPath";
++      $testDocDir=`cygpath -m  $testDocDir`;
++      uri_escape($testDocDir);
++      # hacky windows url construction
++      $testDocDir="file:///$testDocDir";
++      
++      chomp($testDocDir);
++      #print "*** doc dir is $testDocDir\n";
++      $testLogDir = `cygpath -m  "$testLogDir"`;
++      uri_escape($testLogDir);
++      $testLogDir="file:///$testLogDir";
++      chomp($testLogDir);
++      #print "*** log dir is $testLogDir\n";
++      $binext = ".exe";
++   }
++   else{
++      # unix we need to find sal etc. ( from the office path )
++      my $tmpPath=$ENV{"PATH"};
++      $ENV{"PATH"} = "$programpath:$basiclibrarypath:$urelibpath/../bin:$tmpPath";
++      $tmpPATH = $ENV{"LD_LIBRARY_PATH"};
++      $ENV{"LD_LIBRARY_PATH"} = "$officepath:$programpath:$basiclibrarypath:$urelibpath:$urelibpath../bin/javaldx:$urelibpath/../bin:$tmpPATH";
++      $ENV{"LD_LIBRARY_PATH"} = "$officepath:$programpath:$basiclibrarypath:$urelibpath:$tmpPATH";
++      my $testPath = $ENV{"LD_LIBRARY_PATH"};
++      print "$testPath\n";
++      $testPath = $ENV{"PATH"};
++      print "$testPath\n";
++      $ENV{"STAR_RESOURCEPATH"} = "$officepath/basis3.0/program/resource";
++      $ENV{"SAL_ALLOW_LINKOO_SYMLINKS"} = "1";
++      $testPath = $ENV{"LANG"};
++      print "$testPath\n";
++   }
++}
++else
++{
++      # ordinary windows, not sure if this will actually work
++      $sysDir = "win" ;
++      $tmpPath=$ENV{"PATH"};
++      $ENV{"PATH"} = "$tmpPath;$officepath";
++      $binext = ".exe";
 +}
 +
-+uno::Reference< excel::XRange > SAL_CALL 
-+ScVbaRange::MergeArea() throw (script::BasicErrorException, uno::RuntimeException)
++# the exe needs system paths or urls ( urls are by far the least troublesome )
++
++my $runCmd = "";
++my $analyseCmd = "";
++
++if ( "$DocName" eq "" )
 +{
-+    uno::Reference< sheet::XSheetCellRange > xMergeShellCellRange(mxRange->getCellRangeByPosition(0,0,0,0), uno::UNO_QUERY_THROW);
-+    uno::Reference< sheet::XSheetCellCursor > xMergeSheetCursor(xMergeShellCellRange->getSpreadsheet()->createCursorByRange( xMergeShellCellRange ), uno::UNO_QUERY_THROW);
-+    if( xMergeSheetCursor.is() )
-+    {
-+        xMergeSheetCursor->collapseToMergedArea();
-+        uno::Reference<sheet::XCellRangeAddressable> xMergeCellAddress(xMergeSheetCursor, uno::UNO_QUERY_THROW);
-+        if( xMergeCellAddress.is() )
-+        {
-+            table::CellRangeAddress aCellAddress = xMergeCellAddress->getRangeAddress();
-+            if( aCellAddress.StartColumn ==0 && aCellAddress.EndColumn==0 &&
-+                aCellAddress.StartRow==0 && aCellAddress.EndRow==0)
-+            {
-+                return new ScVbaRange( getParent(),mxContext,mxRange );
-+            }
-+            else
-+            {
-+                ScRange refRange( static_cast< SCCOL >( aCellAddress.StartColumn ), static_cast< SCROW >( aCellAddress.StartRow ), static_cast< SCTAB >( aCellAddress.Sheet ), 
-+                                  static_cast< SCCOL >( aCellAddress.EndColumn ), static_cast< SCROW >( aCellAddress.EndRow ), static_cast< SCTAB >( aCellAddress.Sheet ) );
-+                uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell() , refRange ) );
-+                return new ScVbaRange( getParent(),mxContext,xRange );
-+            }
-+        }
-+    }
-+    return new ScVbaRange( getParent(),mxContext,mxRange );
++    $runCmd = "$binDir/testclient$binext $testDocDir $testLogDir";
++    $analyseCmd = "perl $binDir/testResults.pl $binDir/Logs $binDir/TestDocuments/logs/$sysDir";
++}
++else
++{
++    $runCmd = "$binDir/testclient$binext $testDocDir $testLogDir $testDocDir/$DocName";
++    $analyseCmd = "perl $binDir/testResult.pl $binDir/Logs $binDir/TestDocuments/logs/$sysDir $DocName";
 +}
++print "runCmd = $runCmd\n";
++
++system ("rm -rf $testLogDir/*");
++my $status = system( $runCmd );
++print "analyseCmd = $analyseCmd\n";
++$status = system( $analyseCmd );
+Index: sc/source/ui/vba/testvba/makefile.mk
+===================================================================
+--- sc/source/ui/vba/testvba/makefile.mk	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/testvba/makefile.mk	(.../cws/npower11)	(revision 266650)
+@@ -30,28 +30,44 @@
+ #*************************************************************************
  
- 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)
-@@ -4517,7 +4898,7 @@ ScVbaRange::AutoOutline(  ) throw (script::BasicErrorException, uno::RuntimeExce
- {
- 	// #TODO #FIXME needs to check for summary row/col ( whatever they are )
- 	// not valid for multi Area Addresses
--	if ( m_Areas->getCount() )
-+	if ( m_Areas->getCount() > 1 )
- 		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 )
-@@ -4735,6 +5116,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) throw
- 		case excel::XlCellType::xlCellTypeConstants:
- 		case excel::XlCellType::xlCellTypeFormulas:
- 		case excel::XlCellType::xlCellTypeVisible:
-+		case excel::XlCellType::xlCellTypeLastCell:
- 		{
- 			if ( bIsMultiArea )
- 			{
-@@ -4895,7 +5277,7 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal_Int32 _nFunction, const uno::
- 		sal_Bool bAddPageBreaks = sal_False;
- 		PageBreaks >>= bAddPageBreaks;
+ PRJ=..$/..$/..$/..$/
++
+ PRJNAME=sc
+ TARGET=testvba
++ENABLE_EXCEPTIONS=TRUE
  
--		uno::Reference< sheet::XSubTotalCalculatable> xSub;
-+		uno::Reference< sheet::XSubTotalCalculatable> xSub(mxRange, uno::UNO_QUERY_THROW );
- 		uno::Reference< sheet::XSubTotalDescriptor > xSubDesc = xSub->createSubTotalDescriptor(sal_True);
- 		uno::Reference< beans::XPropertySet > xSubDescPropertySet( xSubDesc, uno::UNO_QUERY_THROW );
- 		xSubDescPropertySet->setPropertyValue(INSERTPAGEBREAKS, uno::makeAny( bAddPageBreaks));
-@@ -4956,27 +5338,6 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal_Int32 _nFunction, const uno::
- 	}
- }
+-.INCLUDE : ant.mk
++# --- Settings -----------------------------------------------------
  
--uno::Reference< excel::XRange > 
--ScVbaRange::intersect( const css::uno::Reference< oo::excel::XRange >& xRange ) throw (script::BasicErrorException, uno::RuntimeException)
--{
--	uno::Reference< excel::XRange > xResult;
--	try
--	{
--		uno::Reference< sheet::XCellRangesQuery > xQuery( mxRange, uno::UNO_QUERY_THROW );
--		RangeHelper aRange( xRange->getCellRange() );
--		table::CellRangeAddress aAddress = aRange.getCellRangeAddressable()->getRangeAddress();
--		uno::Reference< sheet::XSheetCellRanges > xIntersectRanges = xQuery->queryIntersection( aAddress );
--		xResult = lcl_makeXRangeFromSheetCellRanges( getParent(), mxContext, xIntersectRanges, getScDocShell() );
--
--					
--	}	
--	catch( uno::Exception& )
--	{
--		DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
--	}
--	return xResult;
--}
+-.IF "$(SOLAR_JAVA)"!=""
++.INCLUDE :  settings.mk
++DLLPRE =
+ 
+-ALLTAR : PROCESSRESULTS
 -
- rtl::OUString& 
- ScVbaRange::getServiceImplName()
- {
-@@ -4991,7 +5352,7 @@ ScVbaRange::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Range" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Range" ) );
- 	}
- 	return aServiceNames;
- }
-@@ -5003,5 +5364,5 @@ sdecl::vba_service_class_<ScVbaRange, sdecl::with_args<true> > serviceImpl;
- extern sdecl::ServiceDecl const serviceDecl(
-     serviceImpl,
-     "SvVbaRange",
--    "org.openoffice.excel.Range" );
-+    "ooo.vba.excel.Range" );
- }
-diff --git sc/source/ui/vba/vbarange.hxx sc/source/ui/vba/vbarange.hxx
-index 3e6b4f0..6f0d3b4 100644
---- sc/source/ui/vba/vbarange.hxx
-+++ sc/source/ui/vba/vbarange.hxx
-@@ -33,13 +33,13 @@
- #include <cppuhelper/implbase4.hxx>
- #include <com/sun/star/container/XEnumerationAccess.hpp>
- 
--#include <org/openoffice/excel/XRange.hpp>
-+#include <ooo/vba/excel/XRange.hpp>
- #include <com/sun/star/table/XCellRange.hpp>
--#include <org/openoffice/excel/XFont.hpp>
--#include <org/openoffice/excel/XComment.hpp>
--#include <org/openoffice/vba/XCollection.hpp>
--#include <org/openoffice/excel/XlPasteType.hdl>
--#include <org/openoffice/excel/XlPasteSpecialOperation.hdl>
-+#include <ooo/vba/excel/XFont.hpp>
-+#include <ooo/vba/excel/XComment.hpp>
-+#include <ooo/vba/XCollection.hpp>
-+#include <ooo/vba/excel/XlPasteType.hdl>
-+#include <ooo/vba/excel/XlPasteSpecialOperation.hdl>
- 
- #include <comphelper/proparrhlp.hxx>
- #include <comphelper/propertycontainer.hxx>
-@@ -58,9 +58,10 @@
- 
- class ScTableSheetsObj;
- class ScCellRangesBase;
-+class ScCellRangeObj;
- 
--//typedef InheritedHelperInterfaceImpl1< oo::excel::XRange >  ScVbaRange_BASE;
--typedef ScVbaFormat< oo::excel::XRange > ScVbaRange_BASE;
-+//typedef InheritedHelperInterfaceImpl1< ov::excel::XRange >  ScVbaRange_BASE;
-+typedef ScVbaFormat< ov::excel::XRange > ScVbaRange_BASE;
- 
- class ArrayVisitor
- {
-@@ -89,18 +90,18 @@ public:
- 
- class ScVbaRange : public ScVbaRange_BASE
- {
--	css::uno::Reference< oo::vba::XCollection > m_Areas;
--	css::uno::Reference< oo::vba::XCollection > m_Borders;
-+	css::uno::Reference< ov::XCollection > m_Areas;
-+	css::uno::Reference< ov::XCollection > m_Borders;
- 	css::uno::Reference< css::table::XCellRange > mxRange;
- 	css::uno::Reference< css::sheet::XSheetCellRangeContainer > mxRanges;
- 	sal_Bool mbIsRows;
- 	sal_Bool mbIsColumns;
--	css::uno::Reference< oo::excel::XValidation > m_xValidation;
-+	css::uno::Reference< ov::excel::XValidation > m_xValidation;
- 	double getCalcColWidth( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException);
- 	double getCalcRowHeight( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException);
- 	void visitArray( ArrayVisitor& vistor );
- 
--	css::uno::Reference< oo::excel::XRange > getEntireColumnOrRow( bool bColumn = true ) throw( css::uno::RuntimeException );
-+	css::uno::Reference< ov::excel::XRange > getEntireColumnOrRow( bool bColumn = true ) throw( css::uno::RuntimeException );
- 
- 	void fillSeries(  css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue ) throw( css::uno::RuntimeException );	 
- 
-@@ -109,27 +110,27 @@ class ScVbaRange : public ScVbaRange_BASE
- 	virtual css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
- 	virtual void   setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException);
--	css::uno::Reference< oo::excel::XRange > getArea( sal_Int32 nIndex  ) throw( css::uno::RuntimeException );
-+	css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex  ) throw( css::uno::RuntimeException );
- 	ScCellRangesBase* getCellRangesBase() throw ( css::uno::RuntimeException );
-+	ScCellRangeObj* getCellRangeObj( )  throw ( css::uno::RuntimeException );
- 	SfxItemSet* getCurrentDataSet( )  throw ( css::uno::RuntimeException );
--	css::uno::Reference< oo::vba::XCollection >& getBorders();
-+	css::uno::Reference< ov::XCollection >& getBorders();
- 	void groupUnGroup( bool bUnGroup = false ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
--	css::uno::Reference< oo::excel::XRange > PreviousNext( bool bIsPrevious );
--	css::uno::Reference< oo::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );
-+ 	css::uno::Reference< ov::excel::XRange > PreviousNext( bool bIsPrevious );
-+ 	css::uno::Reference< ov::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );
- 	css::awt::Point getPosition() throw ( css::uno::RuntimeException );
- public:
--	ScVbaRange( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
--	ScVbaRange( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
-+	ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
-+	ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException );
- 	ScVbaRange( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
- 
- 	ScDocument* getScDocument();
- 	ScDocShell* getScDocShell();
- 
- 	virtual ~ScVbaRange();
--	virtual css::uno::Reference< oo::vba::XHelperInterface > thisHelperIface() { return this; }
-+ 	virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() { return this; }
- 	bool isSingleCellRange(); 
--	css::uno::Reference< oo::excel::XRange > intersect( const css::uno::Reference< oo::excel::XRange >& xRange ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
--        static css::uno::Reference< oo::excel::XRange > getRangeObjectForName( const css::uno::Reference< css::uno::XComponentContext >& xContext, const rtl::OUString& sRangeName, ScDocShell* pDocSh, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1  ) throw ( css::uno::RuntimeException );
-+        static css::uno::Reference< ov::excel::XRange > getRangeObjectForName( const css::uno::Reference< css::uno::XComponentContext >& xContext, const rtl::OUString& sRangeName, ScDocShell* pDocSh, ::formula::FormulaGrammar::AddressConvention eConv = ::formula::FormulaGrammar::CONV_XL_A1  ) throw ( css::uno::RuntimeException );
- 
-     // Attributes
- 	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-@@ -151,9 +152,9 @@ public:
- 	virtual css::uno::Any SAL_CALL getMergeCells() throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL setWrapText( const css::uno::Any& bIsWrapped ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getWrapText() throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getEntireRow() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getEntireColumn() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XComment > SAL_CALL getComment() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireRow() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireColumn() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XComment > SAL_CALL getComment() throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getHidden() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setHidden( const css::uno::Any& _hidden ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getColumnWidth() throw (css::uno::RuntimeException);
-@@ -165,16 +166,20 @@ public:
- 	virtual css::uno::Any SAL_CALL getTop() throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getLeft() throw (css::uno::RuntimeException);
- 	
--	virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getWorksheet() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getWorksheet() throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getPageBreak() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setPageBreak( const css::uno::Any& _pagebreak ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XValidation > SAL_CALL getValidation() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XValidation > SAL_CALL getValidation() throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getFormulaHidden() throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL setFormulaHidden(const css::uno::Any& aHidden) throw (css::script::BasicErrorException, css::uno::RuntimeException);	
-+	//virtual css::uno::Any SAL_CALL getLocked() throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	//virtual void SAL_CALL setLocked(const css::uno::Any& aLocked) throw (css::script::BasicErrorException, css::uno::RuntimeException);	
-+	virtual css::uno::Any SAL_CALL getShowDetail() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setShowDetail(const css::uno::Any& aShowDetail) throw (css::uno::RuntimeException);	
- 	// Methods
- 	sal_Bool IsRows() { return mbIsRows; }
- 	sal_Bool IsColumns() { return mbIsColumns; }
--	virtual css::uno::Reference< oo::excel::XComment > SAL_CALL AddComment( const css::uno::Any& Text ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XComment > SAL_CALL AddComment( const css::uno::Any& Text ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Clear() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL ClearComments() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL ClearContents() throw (css::uno::RuntimeException);
-@@ -184,35 +189,36 @@ public:
- 	virtual void SAL_CALL FillRight() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL FillUp() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL FillDown() throw (css::uno::RuntimeException);
--	virtual	css::uno::Reference< oo::excel::XRange > SAL_CALL Offset( const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset )
-+	virtual	css::uno::Reference< ov::excel::XRange > SAL_CALL Offset( const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset )
- 														   throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL CurrentRegion() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL CurrentArray() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentRegion() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentArray() throw (css::uno::RuntimeException);
- 	virtual ::rtl::OUString SAL_CALL Characters( const css::uno::Any& nIndex, const css::uno::Any& nCount ) 
- 												 throw (css::uno::RuntimeException);
- 
- 	virtual ::rtl::OUString SAL_CALL Address( const css::uno::Any& RowAbsolute, const css::uno::Any& ColumnAbsolute, const css::uno::Any& ReferenceStyle, const css::uno::Any& External, const css::uno::Any& RelativeTo ) throw (css::uno::RuntimeException);
- 
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) 
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) 
- 														  throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange >  SAL_CALL Rows( const css::uno::Any& nIndex ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange >  SAL_CALL Columns( const css::uno::Any &nIndex ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange >  SAL_CALL Rows( const css::uno::Any& nIndex ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange >  SAL_CALL Columns( const css::uno::Any &nIndex ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Copy( const css::uno::Any& Destination ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Cut( const css::uno::Any& Destination ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Resize( const css::uno::Any& RowSize, const css::uno::Any& ColumnSize ) 
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Resize( const css::uno::Any& RowSize, const css::uno::Any& ColumnSize ) 
- 														   throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XFont > SAL_CALL Font() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XInterior > SAL_CALL Interior(  ) throw ( css::script::BasicErrorException, css::uno::RuntimeException) ;
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2, bool bForceUseInpuRangeTab ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XFont > SAL_CALL Font() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior(  ) throw ( css::script::BasicErrorException, css::uno::RuntimeException) ;
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2, bool bForceUseInpuRangeTab ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getCellRange(  ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL PasteSpecial( const css::uno::Any& Paste, const css::uno::Any& Operation, const css::uno::Any& SkipBlanks, const css::uno::Any& Transpose ) throw (css::uno::RuntimeException);
- 	virtual ::sal_Bool SAL_CALL Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replacement, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat, const css::uno::Any& ReplaceFormat ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Find( const css::uno::Any& What, const css::uno::Any& After, const css::uno::Any& LookIn, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& SearchDirection, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Sort( const css::uno::Any& Key1, const css::uno::Any& Order1, const css::uno::Any& Key2, const css::uno::Any& Type, const css::uno::Any& Order2, const css::uno::Any& Key3, const css::uno::Any& Order3, const css::uno::Any& Header, const css::uno::Any& OrderCustom, const css::uno::Any& MatchCase, const css::uno::Any& Orientation, const css::uno::Any& SortMethod,  const css::uno::Any& DataOption1, const css::uno::Any& DataOption2, const css::uno::Any& DataOption3 ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL End( ::sal_Int32 Direction )  throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL End( ::sal_Int32 Direction )  throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Delete( const css::uno::Any& Shift ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Areas( const css::uno::Any& ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-@@ -227,10 +233,10 @@ public:
- 	virtual void SAL_CALL Insert( const css::uno::Any& Shift, const css::uno::Any& CopyOrigin ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Autofit() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::uno::RuntimeException);
--	virtual void SAL_CALL AutoFill( const css::uno::Reference< oo::excel::XRange >& Destination, const css::uno::Any& Type ) throw (css::uno::RuntimeException) ;
-+	virtual void SAL_CALL AutoFill( const css::uno::Reference< ov::excel::XRange >& Destination, const css::uno::Any& Type ) throw (css::uno::RuntimeException) ;
- 	 void SAL_CALL Calculate(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
- 	virtual void SAL_CALL AutoOutline(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Item( const ::css::uno::Any& row, const css::uno::Any& column ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Item( const ::css::uno::Any& row, const css::uno::Any& column ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL ClearOutline(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL Ungroup(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL Group(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-@@ -238,16 +244,17 @@ public:
- 	virtual void SAL_CALL UnMerge(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getStyle() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setStyle( const css::uno::Any& _style ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Next() throw (css::script::BasicErrorException, css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Previous() throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Next() throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Previous() throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL RemoveSubtotal(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL MergeArea() throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL Subtotal( ::sal_Int32 GroupBy, ::sal_Int32 Function, const css::uno::Sequence< ::sal_Int32 >& TotalList, const css::uno::Any& Replace, const css::uno::Any& PageBreaks, const css::uno::Any& SummaryBelowData ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	// XEnumerationAccess
- 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
- 	// XElementAccess
- 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException)
- 	{
--		return oo::excel::XRange::static_type(0);
-+		return ov::excel::XRange::static_type(0);
- 
- 	}
- 	virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException);
-@@ -264,9 +271,9 @@ public:
- //     * or a list of address ( multi-area )
- //     * object should be a lightweight as possible
- //     * we shouldn't need hacks like this below
--	static css::uno::Reference< oo::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
--	virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< oo::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );  
-+	static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
-+	virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );  
- 	// XHelperInterface
- 	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-diff --git sc/source/ui/vba/vbascrollbar.cxx sc/source/ui/vba/vbascrollbar.cxx
-new file mode 100644
-index 0000000..e754903
---- /dev/null
-+++ sc/source/ui/vba/vbascrollbar.cxx
-@@ -0,0 +1,139 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "vbascrollbar.hxx"
-+#include <vector>
+-TESTDOCUMENTS=..$/TestDocuments
+-.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
+-TESTDOCUMENTLOGS=$(TESTDOCUMENTS)$/logs$/unix
+-.ELSE
+-TESTDOCUMENTLOGS=$(TESTDOCUMENTS)$/logs$/win
++.IF "$(ENABLE_VBA)"!="YES"
++dummy:
++        @echo "not building vba..."
+ .ENDIF
+ 
+-OUTPUTDIR:=..$/$(TARGET)$/Logs
+-ANT_FLAGS+=-Dtest.documents=$(TESTDOCUMENTS)
+-ANT_FLAGS+=-Dtest.out=$(OUTPUTDIR)
+-ANT_FLAGS+=-Dtest.officepath=$(OFFICEPATH)
+-#UNITTEST : $(LOCAL_COMMON_OUT)$/class/TestVBA.class
+-PROCESSRESULTS : ANTBUILD
+-	$(PERL) testResults.pl  $(OUTPUTDIR) $(TESTDOCUMENTLOGS)
++INCPRE=$(INCCOM)$/$(TARGET)
++CDEFS+=-DVBA_OOBUILD_HACK
++# ------------------------------------------------------------------
+ 
+-.ENDIF
++SLOFILES= \
++		$(SLO)$/testvba.obj \
++ 
 +
-+using namespace com::sun::star;
-+using namespace ooo::vba;
++# --- Targets ------------------------------------------------------
++
++APP1TARGET=testclient
++APP1OBJS= $(SLOFILES)
++
++APP1STDLIBS=\
++        $(SALLIB) \
++        $(STDLIBCPP) \
++        $(CPPULIB) \
++        $(CPPUHELPERLIB) \
++        $(COMPHELPERLIB) \
++	    $(TOOLSLIB) \
++        $(UNOTOOLSLIB) \
++
++#APP1OBJS= $(OBJ)$/testclient.obj
++.INCLUDE :	target.mk
 +
 +
-+const static rtl::OUString LARGECHANGE( RTL_CONSTASCII_USTRINGPARAM("BlockIncrement") );
-+const static rtl::OUString SMALLCHANGE( RTL_CONSTASCII_USTRINGPARAM("LineIncrement") );
-+const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
-+const static rtl::OUString SCROLLVALUE( RTL_CONSTASCII_USTRINGPARAM("ScrollValue") );
-+const static rtl::OUString SCROLLMAX( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") );
-+const static rtl::OUString SCROLLMIN( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMin") );
+Index: sc/source/ui/vba/testvba/testResult.pl
+===================================================================
+--- sc/source/ui/vba/testvba/testResult.pl	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/testResult.pl	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,171 @@
++#!/usr/bin/perl -w
++use File::Temp qw/ tempfile tempdir /;
++use File::Basename;
++use File::stat;
++use File::Copy;
 +
-+ScVbaScrollBar::ScVbaScrollBar(  const css::uno::Reference< ov::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 )
-+{
-+}
++my $binDir = dirname($0);
++my $timestampclean= "perl $binDir/timestampsClean.pl";
++#sub gen_diff($)
 +
-+// Attributes
-+uno::Any SAL_CALL 
-+ScVbaScrollBar::getValue() throw (css::uno::RuntimeException)
++sub testLog
 +{
-+    return  m_xProps->getPropertyValue( SCROLLVALUE );
++   # 2 No Log to compare against
++   # 1 Log passed 
++   # 0 Log failed
++   my $result = 0;
++   my $testfile = shift;
++   my $dirtocheck = shift;
++   my $filename = basename($testfile);
++   $filename = "$logdir/$filename"; 
++   print "processing $testfile $filename\n";
++   if ( -f $filename )  {
++      my $tmpFile;
++      $dir = tempdir( CLEANUP => 1 );
++      ($fh, $tmpFile) = tempfile( DIR => $dir );
++      close($fh);
++      #
++      my $status = system("diff -U 0 -p $testfile $filename |  $timestampclean > $tmpFile");
++      my $info = stat($tmpFile) or die "no $tmpFile: $!";
++      if ( ($status >>=8) == 0 &&  ( $info->size == 0)  ) {
++         #print "diff worked size is 0\n";
++         $result = 1; 
++      }
++      elsif ( ($status >>=8) == 0 &&  ( $info->size > 0)  ) 
++      {
++         #print "diff worked size > 0\n";
++         $result = 0;
++      }
++      else
++      {
++         #print "diff failed size > 0\n";
++         $result = 0;
++      }
++   }
++   else
++   {
++      #print "not file > 0\n";
++      $result = 2;
++   }
++   #print "diff result = $result\n";
++   return $result;
 +}
 +
-+void SAL_CALL 
-+ScVbaScrollBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( SCROLLVALUE, _value );
++if ( ! ( $logdir = shift @ARGV ) ) {
++    print STDERR "No logdir specified!\n";
++    usage();
++    exit 1;
 +}
 +
-+::sal_Int32 SAL_CALL 
-+ScVbaScrollBar::getMax() throw (uno::RuntimeException)
-+{
-+    sal_Int32 nMax = 0;
-+    m_xProps->getPropertyValue( SCROLLMAX ) >>= nMax;
-+    return nMax;
++if ( ! ( $testlogdir = shift @ARGV ) ) {
++    print STDERR "No testdocuments dir to compare against specified!\n";
++    usage();
++    exit 1;
 +}
 +
-+void SAL_CALL 
-+ScVbaScrollBar::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
++if ( !(-d $logdir ) ) {
++   print STDERR "No output directory $logdir exists, please create it!!!!\n";
++   exit 1;
++}
++if ( !(-d $testlogdir ) ) {
++   print STDERR "the directory containing the logfiles to compare against \"$logdir\" does not exist\n";
++    usage();
++    exit 1;
++}
++print "logdir $logdir\n";
++print "testlogdir $testlogdir\n";
++sub filter_crud($)
 +{
-+    m_xProps->setPropertyValue( SCROLLMAX, uno::makeAny( nVal ) ); 
++    my $a = shift;
++
++    $a =~ /~$/ && return;
++    $a =~ /\#$/ && return;
++    $a =~ /\.orig$/ && return;
++    $a =~ /unxlng.*\.pro$/ && return;
++    $a =~ /wntmsc.*\.pro$/ && return;
++    $a =~ /.swp$/ && return;
++    $a =~ /POSITION/ && return;
++    $a =~ /ReadMe/ && return;
++    $a =~ /.tmp$/ && return;
++    $a =~ /\.svn/ && return;
++    $a eq 'CVS' && return;
++    $a eq '.' && return;
++    $a eq '..' && return;
++
++    return $a;
 +}
++sub slurp_dir($);
 +
-+::sal_Int32 SAL_CALL 
-+ScVbaScrollBar::getMin() throw (uno::RuntimeException)
++sub slurp_dir($)
 +{
-+    sal_Int32 nVal = 0;
-+    m_xProps->getPropertyValue( SCROLLMIN ) >>= nVal;
-+    return nVal;
++    my $dir = shift;
++    my ($dirhandle, $fname);
++    my @files = ();
++
++    opendir ($dirhandle, $dir) || die "Can't open $dir";
++    while ($fname = readdir ($dirhandle)) {
++	$fname = filter_crud($fname);
++	defined $fname || next;
++#	if (-d "$dir/$fname") {
++#	    push @files, slurp_dir("$dir/$fname");
++#	} else 
++        {
++	    push @files, "$dir/$fname";
++	}
++    }
++    closedir ($dirhandle);
++
++    return @files;
 +}
 +
-+void SAL_CALL 
-+ScVbaScrollBar::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( SCROLLMIN, uno::makeAny( nVal ) ); 
++if (-d $testlogdir) {
++    push @files, slurp_dir($testlogdir);
 +}
 +
-+void SAL_CALL 
-+ScVbaScrollBar::setLargeChange( ::sal_Int32 _largechange ) throw (uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( LARGECHANGE, uno::makeAny( _largechange ) );
++my $processed = 0;
++my $passed = 0;
++my @passedTests=();
++my @skippedTests=();
++my @failedTests=();
++
++my $failureCmd="";
++my $testfile = shift @ARGV;
++my $testfilepath = "$testlogdir/$testfile";
++$testfilepath =~ s/\.xls/\.log/;
++print "$testfilepath\n";
++for $a (@files) {
++   $filename = $a;
++   if ( "$testfilepath" eq "$filename" )
++   { 
++   $processed++;
++   my $testcase = $a;  
++   $testcase =~ s/\.log/\.xls/;
++   my $result = testLog( $a, $logdir );
++   if ( $result == 0 ) {
++      push @failedTests, basename($testcase);
++      if ( $failureCmd eq "" ) { $failureCmd = " diff -up $a $logdir "; }
++   }
++   elsif ( $result == 2 ) {
++      #print "skipped $a\n";
++      push @skippedTests, $testcase;
++   } 
++   else {
++      $passed++;
++      push @passedTests, $testcase;
++      #print "Test document for $a \t \t passed. \n"; 
++   }
++   } 
++}
++my $compared= passedTests+@failedTests;
++my $skip = @skippedTests;
++print "skipped $skip test-cases(s)\n";
++print "compared $compared test-case documents\n";
++print "\t \t $passed tests $ passedTests\n";
++if ( @failedTests > 0 ) {
++   print "the following test-case documents failed, please examine the logs manually\n";
++   
++   for $a (@failedTests) {
++      print "\t$a\n";
++   }
++   print "e.g. $failureCmd\n"
 +}
+Index: sc/source/ui/vba/testvba/testvba.cxx
+===================================================================
+--- sc/source/ui/vba/testvba/testvba.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/testvba/testvba.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,309 @@
++#include "cppuhelper/bootstrap.hxx"
 +
-+::sal_Int32 SAL_CALL 
-+ScVbaScrollBar::getLargeChange() throw (uno::RuntimeException)
++#include <com/sun/star/beans/Property.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <com/sun/star/beans/XPropertySetInfo.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
++#include <com/sun/star/container/XNameContainer.hpp>
++#include <com/sun/star/frame/XComponentLoader.hpp>
++#include <com/sun/star/lang/XMultiComponentFactory.hpp>
++#include <com/sun/star/sheet/XSpreadsheet.hpp>
++#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
++#include <com/sun/star/util/XCloseable.hpp>
++#include <com/sun/star/uno/XComponentContext.hpp>
++#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
++#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
++#include <com/sun/star/document/XTypeDetection.hpp>
++
++#include <tools/urlobj.hxx>
++#include <osl/file.hxx>
++
++#include <memory>
++#include <iostream>
++
++using namespace ::com::sun::star;
++using namespace ::com::sun::star::sheet;
++
++using ::com::sun::star::beans::Property;
++using ::com::sun::star::beans::PropertyValue;
++using ::com::sun::star::beans::XPropertySet;
++using ::com::sun::star::beans::XPropertySetInfo;
++using ::com::sun::star::container::XNameContainer;
++using ::com::sun::star::lang::XComponent;
++using ::com::sun::star::lang::XMultiComponentFactory;
++using ::com::sun::star::frame::XComponentLoader;
++using ::com::sun::star::uno::Reference;
++using ::com::sun::star::uno::Sequence;
++using ::com::sun::star::uno::UNO_QUERY;
++using ::com::sun::star::uno::UNO_QUERY_THROW;
++using ::com::sun::star::uno::XComponentContext;
++using ::com::sun::star::uno::XInterface;
++using ::com::sun::star::ucb::XSimpleFileAccess;
++using ::com::sun::star::document::XTypeDetection;
++using ::rtl::OUString;
++
++using ::std::auto_ptr;
++
++const OUString EXTN = rtl::OUString::createFromAscii(".xls"); 
++
++OUString convertToURL( const OUString& rPath )
 +{
-+    sal_Int32 nVal = 0;
-+    m_xProps->getPropertyValue( LARGECHANGE ) >>= nVal;
-+    return nVal;
++        rtl::OUString aURL;
++        INetURLObject aObj;
++        aObj.SetURL( rPath );
++        bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
++        if ( bIsURL )
++                aURL = rPath;
++        else
++		{
++                osl::FileBase::getFileURLFromSystemPath( rPath, aURL );
++				if ( aURL.equals( rPath ) )
++					throw uno::RuntimeException( rtl::OUString::createFromAscii( "could'nt convert " ).concat( rPath ).concat( rtl::OUString::createFromAscii( " to a URL, is it a fully qualified path name? " ) ), Reference< uno::XInterface >() );
++		}
++		return aURL;
 +}
 +
-+::sal_Int32 SAL_CALL 
-+ScVbaScrollBar::getSmallChange() throw (uno::RuntimeException)
++OUString ascii(const sal_Char* cstr)
 +{
-+    sal_Int32 nSmallChange = 0;
-+    m_xProps->getPropertyValue( SMALLCHANGE ) >>= nSmallChange;
-+    return nSmallChange;
++	return OUString::createFromAscii(cstr);
 +}
 +
-+void SAL_CALL 
-+ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange ) throw (uno::RuntimeException)
++const sal_Char* getStr(const OUString& ou)
 +{
-+    m_xProps->setPropertyValue( SMALLCHANGE, uno::makeAny( _smallchange ) );
++    return OUStringToOString(ou, RTL_TEXTENCODING_UTF8).getStr();
 +}
 +
-+rtl::OUString& 
-+ScVbaScrollBar::getServiceImplName()
++
++int usage( const char* pName )
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaScrollBar") );
-+	return sImplName;
++	std::cerr << "usage: " << pName << "<path to testdocument dir> <output_directory>" << std::endl;
++        return 1;
++
 +}
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaScrollBar::getServiceNames()
++class TestVBA
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
++private:
++	Reference< XComponentContext >  mxContext;
++	Reference< XMultiComponentFactory > mxMCF;
++	Reference< XComponentLoader > mxCompLoader;
++	Reference< XSimpleFileAccess > mxSFA;
++	rtl::OUString msOutDirPath;
++protected:
++public:
++	TestVBA( const Reference< XComponentContext >&  _xContext, 
++		const Reference< XMultiComponentFactory >& _xMCF, 
++		const Reference< XComponentLoader >& _xCompLoader, 
++		const rtl::OUString& _outDirPath ) : mxContext( _xContext ), mxMCF( _xMCF ), 
++mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath  ) ) 
 +	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
++		mxSFA.set( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), mxContext), uno::UNO_QUERY_THROW );
++	} 
++
++	rtl::OUString getLogLocation() throw (  beans::UnknownPropertyException,  lang::IllegalArgumentException, lang::WrappedTargetException,  uno::Exception ) 
++	{
++		rtl::OUString sLogLocation;
++		Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW );
++		pathSettings->getPropertyValue( rtl::OUString::createFromAscii( "Work" ) ) >>= sLogLocation;
++		sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( rtl::OUString::createFromAscii( "HelperAPI-test.log" ) );
++		return sLogLocation;
 +	}
-+	return aServiceNames;
-+}
-diff --git sc/source/ui/vba/vbascrollbar.hxx sc/source/ui/vba/vbascrollbar.hxx
-new file mode 100644
-index 0000000..04c4853
---- /dev/null
-+++ sc/source/ui/vba/vbascrollbar.hxx
-@@ -0,0 +1,66 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_SCROLLBAR_HXX
-+#define SC_VBA_SCROLLBAR_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/msforms/XScrollBar.hpp>
++	rtl::OUString getLogLocationWithName( OUString fileName ) throw (  beans::UnknownPropertyException,  lang::IllegalArgumentException, lang::WrappedTargetException,  uno::Exception ) 
++    {
++        printf("%s\n", getenv("HOME") );
++    	printf("file name %s\n", rtl::OUStringToOString( fileName, RTL_TEXTENCODING_UTF8 ).getStr() );
++		//rtl::OUString sLogLocation( rtl::OUString::createFromAscii( getenv("HOME") ) );
++		rtl::OUString sLogLocation;
++		Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW );
++		pathSettings->getPropertyValue( rtl::OUString::createFromAscii( "Work" ) ) >>= sLogLocation;
++		sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( fileName.copy ( 0, fileName.lastIndexOf( EXTN )  ) + rtl::OUString::createFromAscii( ".log" ) );
++		return sLogLocation;
++    }
 +
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
++	void init() 
++	{
++		// blow away previous logs?
++	}
 +
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XScrollBar > ScrollBarImpl_BASE;
++	void proccessDocument( const rtl::OUString& sUrl ) 
++	{
++			if ( !mxSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCaseAsciiL( ".xls", 4 ) ) 
++				
++			{
++				try 
++				{
++					OSL_TRACE( "processing %s",  rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++					printf( "processing %s\n",  rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++					// Loading the wanted document
++					Sequence< PropertyValue > propertyValues(1);
++					propertyValues[0].Name = rtl::OUString::createFromAscii( "Hidden" );
++					propertyValues[0].Value <<= sal_False;
 +
-+class ScVbaScrollBar : public ScrollBarImpl_BASE
++                    rtl::OUString sfileUrl = convertToURL( sUrl );
++					printf( "try to get xDoc %s\n", rtl::OUStringToOString( sfileUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++					Reference< uno::XInterface > xDoc =	
++						mxCompLoader->loadComponentFromURL( sfileUrl, rtl::OUString::createFromAscii( "_blank" ), 0, propertyValues);
++					printf( "got xDoc\n" );
++
++					OUString logFileURL = convertToURL( getLogLocation() );
++					try
++					{
++						Reference< script::provider::XScriptProviderSupplier > xSupplier( xDoc, uno::UNO_QUERY_THROW ) ; 
++						if ( mxSFA->exists( logFileURL ) )	
++							mxSFA->kill( logFileURL );
++					
++						printf("try to get the ScriptProvider\n");
++						Reference< script::provider::XScriptProvider > xProv = xSupplier->getScriptProvider();
++						printf("get the ScriptProvider\n");
++						printf("try to get the Script\n");
++                        Reference< script::provider::XScript > xScript;
++						try
++                        {
++						    xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.TestMacros.Main?language=Basic&location=document" ));
++                        } catch ( uno::Exception& e )
++                        {
++                            try
++                            {
++						        xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.testMacro.Main?language=Basic&location=document" ));
++                            } catch ( uno::Exception& e2 )
++                            {
++						        xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.testMain.Main?language=Basic&location=document" ));
++                            }
++                        }
++						OSL_TRACE("Got script for doc %s", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++						printf("get the Script\n");
++						Sequence< uno::Any > aArgs;
++						Sequence< sal_Int16 > aOutArgsIndex;
++						Sequence< uno::Any > aOutArgs;
++						
++						xScript->invoke(aArgs, aOutArgsIndex, aOutArgs); 
++		
++						OUString fileName = sUrl.copy ( sUrl.lastIndexOf( '/' ) );
++						OUString newLocation = msOutDirPath + fileName.copy ( 0, fileName.lastIndexOf( EXTN )  ) + rtl::OUString::createFromAscii( ".log" );
++                        try
++                        {
++    						printf("move log file\n");
++	    					mxSFA->move( logFileURL, newLocation );
++		    				OSL_TRACE("new logfile location is %s ", rtl::OUStringToOString( newLocation, RTL_TEXTENCODING_UTF8 ).getStr() );
++			    			printf("moved to new location\n");
++                        }
++                        catch ( uno::Exception& e )
++                        {
++                            logFileURL = convertToURL( getLogLocationWithName( fileName ) );
++    						printf("move log file from %s\n", rtl::OUStringToOString( logFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
++	    					mxSFA->move( logFileURL, newLocation );
++		    				OSL_TRACE("new logfile location is %s ", rtl::OUStringToOString( newLocation, RTL_TEXTENCODING_UTF8 ).getStr() );
++			    			printf("moved to new location\n");
++                        }
++						
++					}
++					catch ( uno::Exception& e )
++					{
++						std::cerr << "Caught exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
++					}
++
++					// interface is supported, otherwise use XComponent.dispose
++					Reference< util::XCloseable > xCloseable ( xDoc, uno::UNO_QUERY );
++		
++					if ( xCloseable.is() ) 
++					{
++			    		printf("try to close\n");
++                        // will close application. and only run a test case for 3.0
++                        // maybe it is a bug. yes, it is a bug
++                        // if only one frame and model, click a button which related will colse.
++                        // will make a crash. It related with window listener.
++                        // so, for run all test cases, it should not close the document at this moment.
++						xCloseable->close(sal_False);
++			    		printf("closed\n");
++					} 
++					else 
++					{
++			    		printf("try to dispose\n");
++						Reference< XComponent > xComp( xDoc, uno::UNO_QUERY_THROW );
++                        // same as close.
++						xComp->dispose();
++			    		printf("disposed\n");
++					}
++				}
++				catch( uno::Exception& e ) 
++				{
++					std::cerr << "Caught exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
++				}
++		                
++			}
++		printf("complete processing %s\n", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++	}
++
++	void traverse( const rtl::OUString& sFileDirectory ) 
++	{
++		rtl::OUString sFileDirectoryURL = convertToURL( sFileDirectory );	
++		if ( !mxSFA->isFolder( sFileDirectoryURL) ) 
++		{
++			throw lang::IllegalArgumentException( rtl::OUString::createFromAscii( "not a directory: ").concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 );
++		}	
++		// Getting all files and directories in the current directory
++		Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, sal_False );
++	   	 
++		// Iterating for each file and directory
++        printf( "Entries %d\n", (int)entries.getLength() );
++		for ( sal_Int32 i = 0; i < entries.getLength(); ++i ) 
++		{
++            proccessDocument( entries[ i ] );
++		}
++	}	
++};
++
++void tryDispose( Reference< uno::XInterface > xIF, const char* sComp )
++{
++	Reference< lang::XComponent > xComponent( xIF, uno::UNO_QUERY );
++	if ( xComponent.is() )
++	{
++		try
++		{
++			xComponent->dispose();
++		}	
++		catch( uno::Exception& e )
++		{
++			std::cerr << "tryDispose caught exception " <<rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << " while disposing " <<  sComp << std::endl;
++		}
++	}
++}
++int main( int argv, char** argc )
 +{
-+public:
-+    ScVbaScrollBar( const css::uno::Reference< ov::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, ov::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);
-+    virtual ::sal_Int32 SAL_CALL getMax() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setMax( ::sal_Int32 _max ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Int32 SAL_CALL getMin() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setMin( ::sal_Int32 _min ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Int32 SAL_CALL getLargeChange() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setLargeChange( ::sal_Int32 _largechange ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Int32 SAL_CALL getSmallChange() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setSmallChange( ::sal_Int32 _smallchange ) throw (css::uno::RuntimeException);
++	if ( !( argv > 2 ) )
++		return usage( argc[0] );
++	try
++	{
 +
++		OSL_TRACE("Attempting to bootstrap normal");
++		Reference<XComponentContext> xCC = ::cppu::bootstrap();
++		Reference<XMultiComponentFactory> xFactory = xCC->getServiceManager();
++		OSL_TRACE("got servicemanager");
++        std::cout << "got servicemanager" << std::endl;
++		Reference<XInterface> desktop = xFactory->createInstanceWithContext(
++		ascii("com.sun.star.frame.Desktop"), xCC);
++		OSL_TRACE("got desktop");
++        std::cout << "got desktop" << std::endl;
++		Reference<frame::XComponentLoader> xLoader(desktop, UNO_QUERY_THROW);
++		TestVBA* dTest = new TestVBA( xCC, xFactory, xLoader, ascii( argc[ 2 ] ) );
++        if ( argv == 4 )
++        {
++            std::cout << "before process" << std::endl;
++            dTest->proccessDocument( ascii( argc[ 3 ] ) );
++            std::cout << "after process" << std::endl;
++        }
++        else
++        {
++		    dTest->traverse( ascii( argc[ 1 ] ) );
++        }
++		delete dTest;
++//		tryDispose( xLoader, "desktop" );
++//		tryDispose( xCC, "remote context" );
 +
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif //SC_VBA_LABEL_HXX
-diff --git sc/source/ui/vba/vbaseriescollection.cxx sc/source/ui/vba/vbaseriescollection.cxx
-index 2a8e187..8fd06fa 100644
---- sc/source/ui/vba/vbaseriescollection.cxx
-+++ sc/source/ui/vba/vbaseriescollection.cxx
-@@ -28,14 +28,14 @@
-  *
-  ************************************************************************/
- #include "vbaseriescollection.hxx"
--#include <org/openoffice/excel/XSeries.hpp>
-+#include <ooo/vba/excel/XSeries.hpp>
- 
- #include "vbaglobals.hxx"
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- 
--ScVbaSeriesCollection::ScVbaSeriesCollection( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SeriesCollection_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ) 
-+ScVbaSeriesCollection::ScVbaSeriesCollection( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SeriesCollection_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ) 
- {
- }
- 
-@@ -76,7 +76,7 @@ ScVbaSeriesCollection::getServiceNames()
- 	if ( sNames.getLength() == 0 )
- 	{
- 		sNames.realloc( 1 );
--		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.SeriesCollection") );
-+		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.SeriesCollection") );
- 	}
- 	return sNames;
- }
-diff --git sc/source/ui/vba/vbaseriescollection.hxx sc/source/ui/vba/vbaseriescollection.hxx
-index 741d2da..52c57e6 100644
---- sc/source/ui/vba/vbaseriescollection.hxx
-+++ sc/source/ui/vba/vbaseriescollection.hxx
-@@ -30,20 +30,20 @@
- #ifndef SC_VBA_SERIESCOLLECTION_HXX
- #define SC_VBA_SERIESCOLLECTION_HXX
- 
--#include <org/openoffice/excel/XSeriesCollection.hpp>
-+#include <ooo/vba/excel/XSeriesCollection.hpp>
- #include "vbahelperinterface.hxx"
- #include "vbacollectionimpl.hxx"
- #include "vbahelper.hxx"
- 
- 
--typedef CollTestImplHelper< oo::excel::XSeriesCollection > SeriesCollection_BASE;
-+typedef CollTestImplHelper< ov::excel::XSeriesCollection > SeriesCollection_BASE;
- 
- class ScVbaSeriesCollection : public SeriesCollection_BASE
- {		
- 	css::uno::Reference< css::uno::XComponentContext > m_xContext;
- 
- public:
--	ScVbaSeriesCollection( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
-+	ScVbaSeriesCollection( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
- 	// XEnumerationAccess
- 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
- 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbashape.cxx sc/source/ui/vba/vbashape.cxx
-index fed92ca..a8d9e82 100644
---- sc/source/ui/vba/vbashape.cxx
-+++ sc/source/ui/vba/vbashape.cxx
-@@ -27,8 +27,8 @@
-  * for a copy of the LGPLv3 License.
-  *
-  ************************************************************************/
--#include<org/openoffice/office/MsoZOrderCmd.hpp>
--#include<org/openoffice/office/MsoScaleFrom.hpp>
-+#include<ooo/vba/office/MsoZOrderCmd.hpp>
-+#include<ooo/vba/office/MsoScaleFrom.hpp>
- #include<com/sun/star/container/XNamed.hpp>
- #include<com/sun/star/drawing/ConnectorType.hpp>
- #include <com/sun/star/lang/XEventListener.hpp>
-@@ -46,17 +46,17 @@
- #include "vbafillformat.hxx"
- #include "vbapictureformat.hxx"
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- using namespace ::vos;
- 
--ScVbaShape::ScVbaShape( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape, const uno::Reference< drawing::XShapes > xShapes, sal_Int32 nType ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( xParent, xContext ), m_xShape( xShape ), m_xShapes( xShapes ), m_nType( nType )
-+ScVbaShape::ScVbaShape( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, sal_Int32 nType ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( xParent, xContext ), m_xShape( xShape ), m_xShapes( xShapes ), m_nType( nType )
- {
-     m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
-     addListeners();
- }
- 
--ScVbaShape::ScVbaShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( uno::Reference< vba::XHelperInterface >(), xContext ), m_xShape( xShape )
-+ScVbaShape::ScVbaShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( uno::Reference< XHelperInterface >(), xContext ), m_xShape( xShape )
- {
-     // add listener
-     addListeners();
-@@ -474,7 +474,7 @@ ScVbaShape::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.Shape" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Shape" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbashape.hxx sc/source/ui/vba/vbashape.hxx
-index 64d9d50..bb24e3c 100644
---- sc/source/ui/vba/vbashape.hxx
-+++ sc/source/ui/vba/vbashape.hxx
-@@ -30,38 +30,39 @@
- #ifndef SC_VBA_SHAPE_HXX
- #define SC_VBA_SHAPE_HXX
- 
--#include <org/openoffice/office/MsoShapeType.hpp>
-+#include <ooo/vba/office/MsoShapeType.hpp>
- #include <com/sun/star/drawing/XShape.hpp>
- #include <com/sun/star/drawing/XShapes.hpp>
- #include <com/sun/star/lang/XEventListener.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/msforms/XShape.hpp>
--#include <org/openoffice/msforms/XLineFormat.hpp>
-+#include <ooo/vba/msforms/XShape.hpp>
-+#include <ooo/vba/msforms/XLineFormat.hpp>
- #include <cppuhelper/implbase2.hxx>
- 
- #include "vbahelperinterface.hxx"
- 
--typedef  ::cppu::WeakImplHelper2< oo::msforms::XShape, css::lang::XEventListener > ListeningShape;
-+typedef  ::cppu::WeakImplHelper2< ov::msforms::XShape, css::lang::XEventListener > ListeningShape;
- 
- typedef InheritedHelperInterfaceImpl< ListeningShape > ScVbaShape_BASE;
- 
- class ScVbaShape : public ScVbaShape_BASE
- {
-+friend class ConcreteXShapeHelper; // perhaps an accessor would be better
- private:
-+protected:
-     css::uno::Reference< css::drawing::XShape > m_xShape;
-     css::uno::Reference< css::drawing::XShapes > m_xShapes;
-     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
-     sal_Int32 m_nType;
-     css::uno::Any m_aRange;
--protected:
- 	virtual void addListeners();
- 	virtual void removeShapeListener() throw( css::uno::RuntimeException );
- 	virtual void removeShapesListener() throw( css::uno::RuntimeException );
- 	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- public:
--    ScVbaShape( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape, const css::uno::Reference< css::drawing::XShapes > xShapes, sal_Int32 nType ) throw ( css::lang::IllegalArgumentException );
--    ScVbaShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape ) throw ( css::lang::IllegalArgumentException );
-+    ScVbaShape( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, sal_Int32 nType ) throw ( css::lang::IllegalArgumentException );
-+    ScVbaShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape ) throw ( css::lang::IllegalArgumentException );
-     virtual ~ScVbaShape();
-     css::uno::Any getRange() { return m_aRange; };
-     void setRange( css::uno::Any aRange ) { m_aRange = aRange; };
-@@ -85,12 +86,12 @@ public:
-     virtual sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
-     virtual double SAL_CALL getRotation() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setRotation( double _rotation ) throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::msforms::XLineFormat > SAL_CALL getLine() throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::msforms::XFillFormat > SAL_CALL getFill() throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::msforms::XPictureFormat > SAL_CALL getPictureFormat() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::msforms::XLineFormat > SAL_CALL getLine() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::msforms::XFillFormat > SAL_CALL getFill() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::msforms::XPictureFormat > SAL_CALL getPictureFormat() throw (css::uno::RuntimeException);
- 
-     // Methods
--    virtual css::uno::Reference< oo::excel::XTextFrame > SAL_CALL TextFrame(  ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::excel::XTextFrame > SAL_CALL TextFrame(  ) throw (css::uno::RuntimeException);
-     virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL ZOrder( sal_Int32 ZOrderCmd ) throw (css::uno::RuntimeException);
-     virtual void SAL_CALL IncrementRotation( double Increment ) throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbashaperange.cxx sc/source/ui/vba/vbashaperange.cxx
-index 80c4c18..0f3bd8b 100644
---- sc/source/ui/vba/vbashaperange.cxx
-+++ sc/source/ui/vba/vbashaperange.cxx
-@@ -33,16 +33,16 @@
- #include "vbashaperange.hxx"
- #include "vbashape.hxx"
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
- class VbShapeRangeEnumHelper : public EnumerationHelper_BASE
- {
--        uno::Reference< vba::XCollection > m_xParent;
-+        uno::Reference< XCollection > m_xParent;
-         uno::Reference<container::XIndexAccess > m_xIndexAccess;
-         sal_Int32 nIndex;
- public:
--	VbShapeRangeEnumHelper( const uno::Reference< vba::XCollection >& xParent,  const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
-+	VbShapeRangeEnumHelper( const uno::Reference< XCollection >& xParent,  const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
-         virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
-         {
-                 return ( nIndex < m_xIndexAccess->getCount() );
-@@ -57,7 +57,7 @@ public:
- 
- };
- 
--ScVbaShapeRange::ScVbaShapeRange( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xShapes, const uno::Reference< drawing::XDrawPage >& xDrawPage ) : ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage( xDrawPage ), m_nShapeGroupCount(0)
-+ScVbaShapeRange::ScVbaShapeRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xShapes, const uno::Reference< drawing::XDrawPage >& xDrawPage ) : ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage( xDrawPage ), m_nShapeGroupCount(0)
- {
- }
- 
-@@ -146,7 +146,7 @@ ScVbaShapeRange:: createCollectionObject( const css::uno::Any& aSource )
- 	uno::Reference< drawing::XShape > xShape( aSource, uno::UNO_QUERY_THROW );
- 	// #TODO  #FIXME Shape parent should always be the sheet the shapes belong 
- 	// to 
--	uno::Reference< msforms::XShape > xVbShape( new ScVbaShape( uno::Reference< vba::XHelperInterface >(), mxContext, xShape, getShapes(), ScVbaShape::getType( xShape ) ) ); 
-+	uno::Reference< msforms::XShape > xVbShape( new ScVbaShape( uno::Reference< XHelperInterface >(), mxContext, xShape, getShapes(), ScVbaShape::getType( xShape ) ) ); 
-         return uno::makeAny( xVbShape );
- }
- 
-@@ -164,7 +164,7 @@ ScVbaShapeRange::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.ShapeRange" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.ShapeRange" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbashaperange.hxx sc/source/ui/vba/vbashaperange.hxx
-index c757a17..8490c5e 100644
---- sc/source/ui/vba/vbashaperange.hxx
-+++ sc/source/ui/vba/vbashaperange.hxx
-@@ -31,11 +31,11 @@
- #define SC_VBA_SHAPERANGE_HXX
- 
- #include <com/sun/star/drawing/XShapes.hpp>
--#include <org/openoffice/msforms/XShapeRange.hpp>
-+#include <ooo/vba/msforms/XShapeRange.hpp>
++	}
++	catch( uno::Exception& e )
++	{
++		std::cerr << "Caught Exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
++	}
++
++}
+Index: sc/source/ui/vba/testvba/testResults.pl
+===================================================================
+--- sc/source/ui/vba/testvba/testResults.pl	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/testvba/testResults.pl	(.../cws/npower11)	(revision 266650)
+@@ -1,10 +1,11 @@
+ #!/usr/bin/perl -w
+-
++use File::Temp qw/ tempfile tempdir /;
+ use File::Basename;
+ use File::stat;
+ use File::Copy;
++
+ my $binDir = dirname($0);
+-my $timestampclean= "$binDir/timestampsClean.pl";
++my $timestampclean= "perl $binDir/timestampsClean.pl";
+ #sub gen_diff($)
  
- #include "vbacollectionimpl.hxx"
+ sub testLog
+@@ -19,8 +20,11 @@
+    $filename = "$logdir/$filename"; 
+    print "processing $testfile $filename\n";
+    if ( -f $filename )  {
+-      #print "diffing\n";
+-      my $tmpFile = "/tmp/gen_diff"; 
++      my $tmpFile;
++      $dir = tempdir( CLEANUP => 1 );
++      ($fh, $tmpFile) = tempfile( DIR => $dir );
++      close($fh);
++      #
+       my $status = system("diff -U 0 -p $testfile $filename |  $timestampclean > $tmpFile");
+       my $info = stat($tmpFile) or die "no $tmpFile: $!";
+       if ( ($status >>=8) == 0 &&  ( $info->size == 0)  ) {
+Index: sc/source/ui/vba/testvba/README
+===================================================================
+--- sc/source/ui/vba/testvba/README	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/testvba/README	(.../cws/npower11)	(revision 266650)
+@@ -1,35 +1,37 @@
+-running dmake in this directory runs a set of regression (unit) tests.
++to run the tests 
  
--typedef CollTestImplHelper< oo::msforms::XShapeRange > ScVbaShapeRange_BASE;
-+typedef CollTestImplHelper< ov::msforms::XShapeRange > ScVbaShapeRange_BASE;
+-Note: 
+-    o you need to set OFFICEPATH env variable to the install directory of your office installation e.g.
++build
++=====
++    dmake
+     
+-export OFFICEPATH="/cygdrive/f/Program\ Files/OpenOffice.org\ 2.3"
++windows
++=======
++   a) you can download a cygwin bash shell environment and install perl ( http://cygwin.com/setup.exe ) 
++      from the cmdline './runTests.pl $(OFFICE_PROGRAM_PATH)' should run the testclient and compare the logs
++   b) use ordinary windows perl [1], but additionally you will need the 'diff' program for window ( download from http://gnuwin32.sourceforge.net/packages/diffutils.htm )
  
- class ScVbaShapeRange : public ScVbaShapeRange_BASE
- {
-@@ -48,11 +48,11 @@ protected:
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- 	css::uno::Reference< css::drawing::XShapes > getShapes() throw (css::uno::RuntimeException) ;
- public:
--    ScVbaShapeRange( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::drawing::XDrawPage>& xDrawShape );
-+    ScVbaShapeRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::drawing::XDrawPage>& xDrawShape );
+-    o naturally in order to run the tests you need to source the build env scripts in the top level build directory [1]
++[1] for the testclient the perl ( all inclusive ) bundle from ActivePerl is mor e than adeqate ( download from http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.8.822-MSWin32-x86-280952.msi )
  
-     // Methods
-     virtual void SAL_CALL Select(  ) throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< ::org::openoffice::msforms::XShape > SAL_CALL Group() throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ::ooo::vba::msforms::XShape > SAL_CALL Group() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL IncrementRotation( double Increment ) throw (css::uno::RuntimeException);
-     virtual void SAL_CALL IncrementLeft( double Increment ) throw (css::uno::RuntimeException) ;
-     virtual void SAL_CALL IncrementTop( double Increment ) throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbashapes.cxx sc/source/ui/vba/vbashapes.cxx
-index e60d6e1..e1dfbc3 100644
---- sc/source/ui/vba/vbashapes.cxx
-+++ sc/source/ui/vba/vbashapes.cxx
-@@ -30,14 +30,14 @@
- #include <com/sun/star/container/XNamed.hpp>
- #include <com/sun/star/view/XSelectionSupplier.hpp>
- #include <com/sun/star/text/WrapTextMode.hpp>
--#include <org/openoffice/msforms/XShapeRange.hpp>
--#include <org/openoffice/office/MsoAutoShapeType.hpp>
-+#include <ooo/vba/msforms/XShapeRange.hpp>
-+#include <ooo/vba/office/MsoAutoShapeType.hpp>
+-    o the testclient runs looks for testdocuments in the '../TestDocuments' [3] directory. For each document the test client runs the  macro 'Standard.TestMacros.Main' located in that test document. The macro(s) write a log file, the log files end up in the Logs sub-directory ( in this directory ). A logfile exists for each testdocument that has successfully run. The log files are compared against benchmark logfiles to ensure no regressions have occured ( see [4] for directory structure and location of benchmark files ). At this point we are not concerned with known failures [5]
++   to run all test cases type
++   'perl ./runTests.pl $(OFFICE_PROGRAM_PATH)'
++   to run a test case type
++   'perl ./runTests.pl $(OFFICE_PROGRAM_PATH) testfilename'
  
- #include "vbashapes.hxx"
- #include "vbashape.hxx"
- #include "vbashaperange.hxx"
++unix
++====
  
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
+-[1] Ideally this should not be necessary and you should be able to run the tests without a build env - future
++assuming perl is installed
++      './runTests.pl $(OFFICE_PROGRAM_PATH)'
++    or './runTests.pl $(OFFICE_PROGRAM_PATH) testfilename' for one file test.
  
- class VbShapeEnumHelper : public EnumerationHelper_BASE
-@@ -76,7 +76,7 @@ void ScVbaShapes::initBaseCollection()
- 	m_xNameAccess.set( xShapes, uno::UNO_QUERY );
- }
+-[2] The test client should be re-written in C++ to get a better handle on lifecycle issues. E.g. currently on windows and sometimes on linux the client won't exit, also the office process doesn't alway exit
+    
+-[3]
++Note: For either windows or unix all of the tests should pass ( and you should get a result like )
++Note Also: If you meat a problem that stop running test after serveral test documents have been run. please clean your .ooo-2.0 or .oooxxx first, and then re-run.
  
--ScVbaShapes::ScVbaShapes( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes ): ScVbaShapes_BASE( xParent, xContext, xShapes ), m_nNewShapeCount(0)
-+ScVbaShapes::ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes ): ScVbaShapes_BASE( xParent, xContext, xShapes ), m_nNewShapeCount(0)
- {
-     m_xShapes.set( xShapes, uno::UNO_QUERY_THROW );
-     m_xDrawPage.set( xShapes, uno::UNO_QUERY_THROW ); 
-@@ -103,7 +103,7 @@ ScVbaShapes::createCollectionObject( const css::uno::Any& aSource )
- uno::Type
- ScVbaShapes::getElementType() throw (uno::RuntimeException)
- {
--    return org::openoffice::msforms::XShape::static_type(0);
-+    return ooo::vba::msforms::XShape::static_type(0);
- }
- rtl::OUString& 
- ScVbaShapes::getServiceImplName()
-@@ -119,7 +119,7 @@ ScVbaShapes::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.Shapes" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Shapes" ) );
- 	}
- 	return aServiceNames;
- }
-@@ -172,7 +172,7 @@ ScVbaShapes::Item( const uno::Any& Index, const uno::Any& Index2 ) throw (uno::R
- 	{
- 		uno::Reference< container::XIndexAccess > xIndexAccess( getShapesByArrayIndices( Index ) );
- 		// return new collection instance
--		uno::Reference< vba::XCollection > xShapesCollection(  new ScVbaShapes( this->getParent(), mxContext, xIndexAccess ) );
-+		uno::Reference< XCollection > xShapesCollection(  new ScVbaShapes( this->getParent(), mxContext, xIndexAccess ) );
- 		return uno::makeAny( xShapesCollection );
- 	}
- */
-@@ -385,7 +385,7 @@ ScVbaShapes::createName( rtl::OUString sName )
- #if 0
- //TODO helperapi using a writer document
- awt::Point
--calculateTopLeftMargin( uno::Reference< vba::XHelperInterface > xDocument )
-+calculateTopLeftMargin( uno::Reference< XHelperInterface > xDocument )
- {
-     awt::Point aPoint( 0, 0 );
-     uno::Reference< frame::XModel > xModel( xDocument, uno::UNO_QUERY_THROW );
-diff --git sc/source/ui/vba/vbashapes.hxx sc/source/ui/vba/vbashapes.hxx
-index 6970d06..9155b5e 100644
---- sc/source/ui/vba/vbashapes.hxx
-+++ sc/source/ui/vba/vbashapes.hxx
-@@ -33,13 +33,13 @@
- #include <com/sun/star/drawing/XShapes.hpp>
- #include <com/sun/star/drawing/XDrawPage.hpp>
- #include <com/sun/star/container/XIndexAccess.hpp>
--#include <org/openoffice/msforms/XShapes.hpp>
-+#include <ooo/vba/msforms/XShapes.hpp>
+-The TestDocument directory contains 
+-   o test documents ( *.xls )
+-   o logs directory ( contains the benchmark logs to compare against )
++========>
  
- #include "vbahelperinterface.hxx"
+-[4]
++skipped 0 test-cases(s)
++compared 9 test-case documents
++                 9 tests passedTests
  
- #include "vbacollectionimpl.hxx"
+-The logs directory contains the following sub-directories
+-   o excel ( the orig logs produced by an excel file )
+-   o unix  ( the log produced by OpenOffice running imported Excel document under unix )
+-   o win   ( the log produced by OpenOffice running imported Excel document under windows )
+-
+-[*] the seperate win & unix directories are to facilate tests that will produce different results under the different platforms e.g. paths etc.
+-
+-[5]
+-
+-o Currently the logs in the excel directory are only stored for comparison, they are not used by the tooling
+-o Currently we don't measure how many tests pass or fail, the immediate focus is that we don't get any regressions ( but of course we do look at these manually and try and get all tests to pass )
++Note also: the testclient will attempt to connect to an existing instance of open-office, when the testClient exits the soffice process may still be running, if you wish to repeat tests you may want to kill the office instance before re-running.
+Index: sc/source/ui/vba/vbahelper.cxx
+===================================================================
+--- sc/source/ui/vba/vbahelper.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbahelper.cxx	(.../cws/npower11)	(revision 266650)
+@@ -37,6 +37,7 @@
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/lang/XMultiComponentFactory.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
++#include <com/sun/star/beans/XIntrospection.hpp>
  
--typedef CollTestImplHelper< oo::msforms::XShapes > ScVbaShapes_BASE;
-+typedef CollTestImplHelper< ov::msforms::XShapes > ScVbaShapes_BASE;
+ #include <comphelper/processfactory.hxx>
  
- class ScVbaShapes : public ScVbaShapes_BASE
- {
-@@ -57,10 +57,10 @@ protected:
-     css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, css::uno::Any aRange ) throw (css::uno::RuntimeException);
-     rtl::OUString createName( rtl::OUString sName );
-     //TODO helperapi using a writer document
--    //css::awt::Point calculateTopLeftMargin( css::uno::Reference< oo::vba::XHelperInterface > xDocument );
-+    //css::awt::Point calculateTopLeftMargin( css::uno::Reference< ov::XHelperInterface > xDocument );
-     
- public:
--    ScVbaShapes( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes );
-+    ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes );
-     static void setDefaultShapeProperties( css::uno::Reference< css::drawing::XShape > xShape ) throw (css::uno::RuntimeException);
-     static void setShape_NameProperty( css::uno::Reference< css::drawing::XShape > xShape, rtl::OUString sName );
-     //XEnumerationAccess
-@@ -71,7 +71,7 @@ public:
-     //helper::calc
-     virtual css::uno::Any SAL_CALL AddLine( sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_Int32 endY ) throw (css::uno::RuntimeException);
-     virtual css::uno::Any SAL_CALL AddShape( sal_Int32 _nType, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (css::uno::RuntimeException);
--    virtual css::uno::Reference< oo::msforms::XShapeRange > SAL_CALL Range( const css::uno::Any& shapes ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::msforms::XShapeRange > SAL_CALL Range( const css::uno::Any& shapes ) throw (css::uno::RuntimeException);
-     // ScVbaCollectionBaseImpl
-     virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
-     virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbaspinbutton.cxx sc/source/ui/vba/vbaspinbutton.cxx
-new file mode 100644
-index 0000000..05b6777
---- /dev/null
-+++ sc/source/ui/vba/vbaspinbutton.cxx
-@@ -0,0 +1,109 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "vbaspinbutton.hxx"
-+#include <vector>
-+
-+using namespace com::sun::star;
-+using namespace ooo::vba;
-+
-+
-+const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
-+const static rtl::OUString SPINVALUE( RTL_CONSTASCII_USTRINGPARAM("SpinValue") );
-+const static rtl::OUString SPINMAX( RTL_CONSTASCII_USTRINGPARAM("SpinValueMax") );
-+const static rtl::OUString SPINMIN( RTL_CONSTASCII_USTRINGPARAM("SpinValueMin") );
-+
-+ScVbaSpinButton::ScVbaSpinButton(  const css::uno::Reference< ov::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 )
-+{
-+}
-+
-+// Attributes
-+uno::Any SAL_CALL 
-+ScVbaSpinButton::getValue() throw (css::uno::RuntimeException)
-+{
-+    return  m_xProps->getPropertyValue( SPINVALUE );
-+}
-+
-+void SAL_CALL 
-+ScVbaSpinButton::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( SPINVALUE, _value );
-+}
-+
-+::sal_Int32 SAL_CALL 
-+ScVbaSpinButton::getMax() throw (uno::RuntimeException)
+@@ -57,9 +58,11 @@
+ #include "tabvwsh.hxx"
+ #include "transobj.hxx"
+ #include "scmod.hxx"
+-
++#include "vbashape.hxx"
++#include "unonames.hxx"
++#include "cellsuno.hxx"
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+ #define POINTTO100THMILLIMETERFACTOR 35.27778
+ void unoToSbxValue( SbxVariable* pVar, const uno::Any& aValue );
+@@ -67,13 +70,25 @@
+ uno::Any sbxToUnoValue( SbxVariable* pVar );
+ 
+ 
+-namespace org
++namespace ooo
+ {
+-namespace openoffice
++namespace vba
+ {
+ 
+ const double Millimeter::factor =  35.27778;
+ 
++uno::Reference< beans::XIntrospectionAccess >
++getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
 +{
-+    sal_Int32 nMax = 0;
-+    m_xProps->getPropertyValue( SPINMAX ) >>= nMax;
-+    return nMax;
++	static uno::Reference< beans::XIntrospection > xIntrospection;
++	if( !xIntrospection.is() )
++	{
++		uno::Reference< lang::XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
++		xIntrospection.set( xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.beans.Introspection") ), uno::UNO_QUERY_THROW );
++	}
++	return xIntrospection->inspect( aObject );
 +}
 +
-+void SAL_CALL 
-+ScVbaSpinButton::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
+ uno::Reference< script::XTypeConverter >
+ getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
+ {
+@@ -215,11 +230,27 @@
+ }
+ 
+ 
++void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall)
 +{
-+    m_xProps->setPropertyValue( SPINMAX, uno::makeAny( nVal ) ); 
++	ScTabViewShell* pViewShell = getBestViewShell( xModel );
++	SfxViewFrame* pViewFrame = NULL;
++	if ( pViewShell )
++		pViewFrame = pViewShell->GetViewFrame();
++	if ( pViewFrame )
++	{
++		SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
++		if( pDispatcher )
++		{
++			pDispatcher->Execute( nSlot , nCall );
++		}
++	}	
 +}
-+
-+::sal_Int32 SAL_CALL 
-+ScVbaSpinButton::getMin() throw (uno::RuntimeException)
++		
+ void
+ implnPaste()
+ {
+ 	PasteCellsWarningReseter resetWarningBox;
+-	ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
++	ScTabViewShell* pViewShell = getCurrentBestViewShell();
+ 	if ( pViewShell )
+ 	{
+ 		pViewShell->PasteFromSystem();
+@@ -515,6 +546,11 @@
+ 	//   of this method
+ }
+ 
++ void PrintPreviewHelper( const css::uno::Any& /*EnableChanges*/, css::uno::Reference< css::frame::XModel >& xModel )
 +{
-+    sal_Int32 nVal = 0;
-+    m_xProps->getPropertyValue( SPINMIN ) >>= nVal;
-+    return nVal;
++	dispatchExecute( xModel, SID_VIEWSHELL1 );
 +}
 +
-+void SAL_CALL 
-+ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
+ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
+ {
+ 	uno::Type aType = pvargItem.getValueType();
+@@ -728,5 +764,65 @@
+ 	return (fPixels/fConvertFactor)/POINTTO100THMILLIMETERFACTOR;
+ }
+ 
++ConcreteXShapeGeometryAttributes::ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape )
 +{
-+    m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) ); 
++	m_xShape = new ScVbaShape( xContext, xShape );
 +}
 +
-+rtl::OUString& 
-+ScVbaSpinButton::getServiceImplName()
++#define VBA_LEFT "PositionX"
++#define VBA_TOP "PositionY"
++UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComponentContext >& /*xContext*/, const uno::Reference< awt::XControl >& xControl )
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSpinButton") );
-+	return sImplName;
++    mxModel.set( xControl->getModel(), uno::UNO_QUERY_THROW );
 +}
++    double UserFormGeometryHelper::getLeft()
++    {
++	sal_Int32 nLeft = 0;
++	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft;	
++	return Millimeter::getInPoints( nLeft );
++    }
++    void UserFormGeometryHelper::setLeft( double nLeft )
++    {
++        mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nLeft ) ) );
++    }
++    double UserFormGeometryHelper::getTop()
++    {
++	sal_Int32 nTop = 0;
++	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	VBA_TOP ) ) ) >>= nTop;	
++	return Millimeter::getInPoints( nTop );
++    }
++    void UserFormGeometryHelper::setTop( double nTop )
++    {
++	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	VBA_TOP ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) );
++    }
++    double UserFormGeometryHelper::getHeight()
++    {
++	sal_Int32 nHeight = 0;
++	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLHGT ) ) ) >>= nHeight;	
++	return Millimeter::getInPoints( nHeight );
++    }
++    void UserFormGeometryHelper::setHeight( double nHeight )
++    {
++	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLHGT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) );
++    }
++    double UserFormGeometryHelper::getWidth()
++    {
++	sal_Int32 nWidth = 0;
++	mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLWID ) ) ) >>= nWidth;	
++	return Millimeter::getInPoints( nWidth );
++    }
++    void UserFormGeometryHelper::setWidth( double nWidth)
++    {
++	mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 	SC_UNONAME_CELLWID ) ), uno::makeAny(  Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) );
++    }
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaSpinButton::getServiceNames()
++SfxItemSet*
++ScVbaCellRangeAccess::GetDataSet( ScCellRangeObj* pRangeObj )
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
-+	}
-+	return aServiceNames;
++	SfxItemSet* pDataSet = pRangeObj ? pRangeObj->GetCurrentDataSet( true ) : NULL ;
++	return pDataSet;
++	
 +}
-diff --git sc/source/ui/vba/vbaspinbutton.hxx sc/source/ui/vba/vbaspinbutton.hxx
-new file mode 100644
-index 0000000..338d71f
---- /dev/null
-+++ sc/source/ui/vba/vbaspinbutton.hxx
-@@ -0,0 +1,61 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_SPINBUTTON_HXX
-+#define SC_VBA_SPINBUTTON_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/msforms/XSpinButton.hpp>
-+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
 +
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XSpinButton > SpinButtonImpl_BASE;
-+
-+class ScVbaSpinButton : public SpinButtonImpl_BASE
-+{
-+public:
-+    ScVbaSpinButton( const css::uno::Reference< ov::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, ov::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);
-+    virtual ::sal_Int32 SAL_CALL getMax() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setMax( ::sal_Int32 _max ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Int32 SAL_CALL getMin() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setMin( ::sal_Int32 _min ) throw (css::uno::RuntimeException);
+ } // openoffice
+ } //org
+Index: sc/source/ui/vba/vbacontrol.cxx
+===================================================================
+--- sc/source/ui/vba/vbacontrol.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacontrol.cxx	(.../cws/npower11)	(revision 266650)
+@@ -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,48 @@
+ #include "vbatextbox.hxx"
+ #include "vbaradiobutton.hxx"
+ #include "vbalistbox.hxx"
++#include "vbatogglebutton.hxx"
++#include "vbacheckbox.hxx"
++#include "vbaframe.hxx"
++#include "vbascrollbar.hxx"
++#include "vbaprogressbar.hxx"
++#include "vbamultipage.hxx"
++#include "vbaspinbutton.hxx"
++#include "vbaimage.hxx"
+ 
+ 
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ 
+-sal_Int32 pt2mm( double pt );
+-double mm2pt( sal_Int32 mm );
+-
+ uno::Reference< css::awt::XWindowPeer > 
+-ScVbaControl::getWindowPeer( const uno::Reference< ::drawing::XControlShape >& xControlShape ) throw (uno::RuntimeException)
++ScVbaControl::getWindowPeer() throw (uno::RuntimeException)
+ {
+-    uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), 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< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
 +
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif //SC_VBA_SPINBUTTON_HXX
-diff --git sc/source/ui/vba/vbastyle.cxx sc/source/ui/vba/vbastyle.cxx
-index 1fd1f2c..5081858 100644
---- sc/source/ui/vba/vbastyle.cxx
-+++ sc/source/ui/vba/vbastyle.cxx
-@@ -31,7 +31,7 @@
- #include "vbastyle.hxx"
- #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
++    uno::Reference< awt::XControlModel > xControlModel;
++    uno::Reference< css::awt::XWindowPeer >  xWinPeer;
++    if ( !xControlShape.is() ) 
++    { 
++        // would seem to be a Userform control
++        uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY_THROW );
++        xWinPeer =  xControl->getPeer();
++	return xWinPeer;
++    }
++    // form control
++    xControlModel.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
++
++    uno::Reference< view::XControlAccess > xControlAccess( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+     try
+     {
+-        xControl.set( xControlAccess->getControl( xControlModel ), uno::UNO_QUERY );
++        uno::Reference< awt::XControl > xControl( xControlAccess->getControl( xControlModel ), uno::UNO_QUERY );
++        xWinPeer =  xControl->getPeer();
+     }
+     catch( uno::Exception )
+     {
+         throw uno::RuntimeException( rtl::OUString::createFromAscii( "The Control does not exsit" ),
+                 uno::Reference< uno::XInterface >() );
+     }
+-    return xControl->getPeer();
++    return xWinPeer;
+ }
  
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
+ //ScVbaControlListener
+@@ -106,67 +125,44 @@
  
- static rtl::OUString DISPLAYNAME( RTL_CONSTASCII_USTRINGPARAM("DisplayName") );
-@@ -71,7 +71,7 @@ void ScVbaStyle::initialise() throw ( uno::RuntimeException )
+ //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< 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 );
+-    uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
+-    m_xProps.set( xProps, uno::UNO_QUERY_THROW );
+     //add listener
+     m_xEventListener.set( new ScVbaControlListener( this ) );
+-    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
++    setGeometryHelper( pGeomHelper );
++    uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
+     xComponent->addEventListener( m_xEventListener );
++   
++    //init m_xProps
++    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY ) ;
++    uno::Reference< awt::XControl> xUserFormControl( m_xControl, uno::UNO_QUERY ) ;
++    if ( xControlShape.is() ) // form control
++        m_xProps.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
++    else if ( xUserFormControl.is() ) // userform control
++        m_xProps.set( xUserFormControl->getModel(), uno::UNO_QUERY_THROW );
  }
  
--ScVbaStyle::ScVbaStyle( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) :  ScVbaStyle_BASE( xParent, xContext, lcl_getStyleProps( sStyleName, _xModel ), _xModel, false )
-+ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) :  ScVbaStyle_BASE( xParent, xContext, lcl_getStyleProps( sStyleName, _xModel ), _xModel, false )
+ ScVbaControl::~ScVbaControl()
  {
- 	try
- 	{
-@@ -83,7 +83,7 @@ ScVbaStyle::ScVbaStyle( const uno::Reference< oo::vba::XHelperInterface >& xPare
- 	}
+-    if( m_xControlShape.is() )
+-    {
+-        uno::Reference< lang::XComponent > xComponent( m_xControlShape, 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 );
+-    m_xControlShape = NULL;
+-    m_xProps = NULL;
+ }
+-
+-
+-ScVbaControl::ScVbaControl( 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 )
+-{
+-    m_xEventListener.set( new ScVbaControlListener( this ) );
+-    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
+-    xComponent->addEventListener( m_xEventListener );
  }
  
--ScVbaStyle::ScVbaStyle( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, _xPropertySet, _xModel, false )
-+ScVbaStyle::ScVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, _xPropertySet, _xModel, false )
+-void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< ::drawing::XControlShape > xControlShape )
++void 
++ScVbaControl::setGeometryHelper( AbstractGeometryAttributes* pHelper )
  {
- 	try
- 	{
-@@ -183,7 +183,7 @@ ScVbaStyle::getServiceNames()
-         if ( aServiceNames.getLength() == 0 )
-         {
-                 aServiceNames.realloc( 1 );
--                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.XStyle" ) );
-+                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XStyle" ) );
-         }
-         return aServiceNames;
+-    m_xEventListener.set( new ScVbaControlListener( this ) );
+-    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
+-    m_xContext.set( xContext, uno::UNO_QUERY_THROW );
+-    m_xControlShape.set( xControlShape, uno::UNO_QUERY_THROW );
+-    //init m_xProps
+-    uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+-    uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
+-    m_xProps = xProps;
++    mpGeometryHelper.reset( pHelper );
  }
-diff --git sc/source/ui/vba/vbastyle.hxx sc/source/ui/vba/vbastyle.hxx
-index b8db6da..d7e26f6 100644
---- sc/source/ui/vba/vbastyle.hxx
-+++ sc/source/ui/vba/vbastyle.hxx
-@@ -29,14 +29,14 @@
-  ************************************************************************/
- #ifndef SC_VBA_STYLE_HXX
- #define SC_VBA_STYLE_HXX
--#include <org/openoffice/excel/XStyle.hpp>
-+#include <ooo/vba/excel/XStyle.hpp>
- #include <com/sun/star/style/XStyle.hpp>
- #include <com/sun/star/frame/XModel.hpp>
- #include <com/sun/star/container/XNameContainer.hpp>
- #include "vbaformat.hxx"
- 
- 
--typedef ScVbaFormat< oo::excel::XStyle > ScVbaStyle_BASE;
-+typedef ScVbaFormat< ov::excel::XStyle > ScVbaStyle_BASE;
  
- class ScVbaStyle : public ScVbaStyle_BASE
+-void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext, 
+-        const uno::Reference< beans::XPropertySet > xProps, 
+-        const uno::Reference< drawing::XControlShape > xControlShape )
++void ScVbaControl::removeResouce() throw( uno::RuntimeException )
  {
-@@ -46,11 +46,11 @@ protected:
- 	css::uno::Reference< css::container::XNameContainer > mxStyleFamilyNameContainer;
- 	void initialise() throw ( css::uno::RuntimeException );
- public:
--	ScVbaStyle( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
--	ScVbaStyle( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
-+	ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
-+	ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
- 	virtual ~ScVbaStyle(){}
- 	static css::uno::Reference< css::container::XNameAccess > getStylesNameContainer( const css::uno::Reference< css::frame::XModel >& xModel ) throw( css::uno::RuntimeException );
--	virtual css::uno::Reference< oo::vba::XHelperInterface > thisHelperIface() { return this; };
-+	virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() { return this; };
- 	// XStyle Methods
- 	virtual ::sal_Bool SAL_CALL BuiltIn() throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	virtual void SAL_CALL setName( const ::rtl::OUString& Name ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-@@ -63,9 +63,9 @@ public:
- 	virtual css::uno::Any SAL_CALL getMergeCells(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- /*
- 	// XFormat
--	virtual css::uno::Reference< ::org::openoffice::excel::XBorders > SAL_CALL Borders(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
--	virtual css::uno::Reference< ::org::openoffice::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
--	virtual css::uno::Reference< ::org::openoffice::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
-+	virtual css::uno::Reference< ::ooo::vba::excel::XBorders > SAL_CALL Borders(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
-+	virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
-+	virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
- 	virtual void SAL_CALL setNumberFormat( const css::uno::Any& NumberFormat ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
- 	virtual css::uno::Any SAL_CALL getNumberFormat(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
- 	virtual void SAL_CALL setNumberFormatLocal( const css::uno::Any& NumberFormatLocal ) throw (css::script::BasicErrorException, css::uno::RuntimeException);;
-diff --git sc/source/ui/vba/vbastyles.cxx sc/source/ui/vba/vbastyles.cxx
-index 46c9b1e..253cd8c 100644
---- sc/source/ui/vba/vbastyles.cxx
-+++ sc/source/ui/vba/vbastyles.cxx
-@@ -30,12 +30,12 @@
- #include "vbastyles.hxx"
- #include "vbastyle.hxx"
+-    m_xEventListener.set( new ScVbaControlListener( this ) );
+-    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
+-    m_xContext.set( xContext, uno::UNO_QUERY_THROW );
+-    m_xProps.set( xProps, uno::UNO_QUERY_THROW );
+-    m_xControlShape.set( xControlShape, uno::UNO_QUERY_THROW );
++    uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
++    xComponent->removeEventListener( m_xEventListener );
++    m_xControl= NULL;
++    m_xProps = NULL;
+ }
  
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
+ //In design model has different behavior
+@@ -189,132 +185,283 @@
  
- static rtl::OUString SDEFAULTCELLSTYLENAME( RTL_CONSTASCII_USTRINGPARAM("Default") );
- css::uno::Any
--lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel )
-+lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel )
+ sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException)
  {
- 	uno::Reference< beans::XPropertySet > xStyleProps( aObject, uno::UNO_QUERY_THROW );
- 	uno::Reference< excel::XStyle > xStyle( new ScVbaStyle( xParent, xContext, xStyleProps, xModel ) ); 
-@@ -43,7 +43,7 @@ lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Referenc
+-    uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer( m_xControlShape ), uno::UNO_QUERY_THROW );
++    uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer(), uno::UNO_QUERY_THROW );
+     return xWindow2->isVisible();
  }
  
+ void SAL_CALL ScVbaControl::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
+ {
+-    uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer( m_xControlShape ), uno::UNO_QUERY_THROW );
++    uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer(), uno::UNO_QUERY_THROW );
+     xWindow2->setVisible( bVisible );
+ }
+ double SAL_CALL ScVbaControl::getHeight() throw (uno::RuntimeException)
+ {
+-    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
+-    return mm2pt( xShape->getSize().Height ) / 100;
++    return mpGeometryHelper->getHeight();
+ }
+ void SAL_CALL ScVbaControl::setHeight( double _height ) throw (uno::RuntimeException)
+ {
+-    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
+-    awt::Size aSize( xShape->getSize() );
+-    aSize.Height = pt2mm( _height ) * 100;
+-    xShape->setSize( aSize );
++    mpGeometryHelper->setHeight( _height );
+ }
  
--ScVbaStyles::ScVbaStyles( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException ) : ScVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( ScVbaStyle::getStylesNameContainer( xModel ), uno::UNO_QUERY_THROW ) ), mxModel( xModel ), mxParent( xParent )
-+ScVbaStyles::ScVbaStyles( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException ) : ScVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( ScVbaStyle::getStylesNameContainer( xModel ), uno::UNO_QUERY_THROW ) ), mxModel( xModel ), mxParent( xParent )
+ double SAL_CALL ScVbaControl::getWidth() throw (uno::RuntimeException)
  {
- 	try
- 	{    
-@@ -78,13 +78,13 @@ ScVbaStyles::getElementType() throw (uno::RuntimeException)
- class EnumWrapper : public EnumerationHelper_BASE
+-    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
+-    return mm2pt( xShape->getSize().Width ) / 100;
++    return mpGeometryHelper->getWidth();
+ }
+ void SAL_CALL ScVbaControl::setWidth( double _width ) throw (uno::RuntimeException)
  {
-         uno::Reference<container::XIndexAccess > m_xIndexAccess;
--        uno::Reference<vba::XHelperInterface > m_xParent;
-+        uno::Reference<XHelperInterface > m_xParent;
-         uno::Reference<uno::XComponentContext > m_xContext;
-         uno::Reference<frame::XModel > m_xModel;
+-    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
+-    awt::Size aSize( xShape->getSize() );
+-    aSize.Width = pt2mm( _width ) * 100;
+-    xShape->setSize( aSize );
++    mpGeometryHelper->setWidth( _width );
+ }
+ 
+ double SAL_CALL
+ ScVbaControl::getLeft() throw (uno::RuntimeException)
+ {
+-    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
+-    return mm2pt( xShape->getPosition().X / 100 );
++    return mpGeometryHelper->getLeft();
+ }
+ 
+ void SAL_CALL
+ ScVbaControl::setLeft( double _left ) throw (uno::RuntimeException)
+ {
+-    awt::Point oldPosition;
+-    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
+-    oldPosition = xShape->getPosition();
+-    oldPosition.X = pt2mm( _left ) * 100;
+-    xShape->setPosition( oldPosition );
++    mpGeometryHelper->setLeft( _left );
  
-         sal_Int32 nIndex;
- public:
--        EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference<vba::XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference<frame::XModel >& xModel ) : m_xIndexAccess( xIndexAccess ), m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel ), nIndex( 0 ) {}
-+        EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference<XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference<frame::XModel >& xModel ) : m_xIndexAccess( xIndexAccess ), m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel ), nIndex( 0 ) {}
-         virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
-         {
-                 return ( nIndex < m_xIndexAccess->getCount() );
-@@ -178,7 +178,7 @@ ScVbaStyles::getServiceNames()
-         if ( aServiceNames.getLength() == 0 )
-         {
-                 aServiceNames.realloc( 1 );
--                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.XStyles" ) );
-+                aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XStyles" ) );
-         }
-         return aServiceNames;
  }
-diff --git sc/source/ui/vba/vbastyles.hxx sc/source/ui/vba/vbastyles.hxx
-index e481f1f..f92cc7d 100644
---- sc/source/ui/vba/vbastyles.hxx
-+++ sc/source/ui/vba/vbastyles.hxx
-@@ -29,25 +29,25 @@
-  ************************************************************************/
- #ifndef SC_VBA_STYLES_HXX
- #define SC_VBA_STYLES_HXX
--#include <org/openoffice/excel/XStyles.hpp>
-+#include <ooo/vba/excel/XStyles.hpp>
- #include <com/sun/star/container/XNameContainer.hpp>
- #include "vbacollectionimpl.hxx"
  
--typedef CollTestImplHelper< oo::excel::XStyles > ScVbaStyles_BASE;
-+typedef CollTestImplHelper< ov::excel::XStyles > ScVbaStyles_BASE;
- class ScVbaStyles: public ScVbaStyles_BASE
+ double SAL_CALL
+ ScVbaControl::getTop() throw (uno::RuntimeException)
  {
- 	css::uno::Reference< css::frame::XModel > mxModel;
- 	// hard ref to parent ( perhaps we should try this in the 
- 	// XHelperInterface itself
--	css::uno::Reference< oo::vba::XHelperInterface > mxParent;
-+	css::uno::Reference< ov::XHelperInterface > mxParent;
- 	css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF;
- 	css::uno::Reference< css::container::XNameContainer > mxNameContainerCellStyles;
- public:
--	ScVbaStyles( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::script::BasicErrorException );
-+	ScVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::script::BasicErrorException );
- 	css::uno::Sequence< rtl::OUString > getStyleNames() throw ( css::uno::RuntimeException );
- 	void Delete(const rtl::OUString _sStyleName) throw ( css::script::BasicErrorException );
- 	// XStyles
--	 virtual css::uno::Reference< oo::excel::XStyle > SAL_CALL Add( const ::rtl::OUString& Name, const css::uno::Any& BasedOn ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	 virtual css::uno::Reference< ov::excel::XStyle > SAL_CALL Add( const ::rtl::OUString& Name, const css::uno::Any& BasedOn ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	// XEnumerationAccess
- 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
- 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);	
-diff --git sc/source/ui/vba/vbatextbox.cxx sc/source/ui/vba/vbatextbox.cxx
-index ffde62a..d246970 100644
---- sc/source/ui/vba/vbatextbox.cxx
-+++ sc/source/ui/vba/vbatextbox.cxx
-@@ -33,15 +33,28 @@
- #include <vector>
+-    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
+-    return mm2pt( xShape->getPosition().Y / 100 );
++    return mpGeometryHelper->getTop();
+ }
  
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
+ void SAL_CALL
+ ScVbaControl::setTop( double _top ) throw (uno::RuntimeException)
+ {
+-    awt::Point oldPosition;
+-    uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
+-    oldPosition = xShape->getPosition();
+-    oldPosition.Y = pt2mm( _top ) * 100;;
+-    xShape->setPosition( oldPosition );
++    mpGeometryHelper->setTop( _top );
+ }
  
+-//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 )
++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();
+ }
  
--ScVbaTextBox::ScVbaTextBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : TextBoxImpl_BASE( xContext, xControlShape )
-+ScVbaTextBox::ScVbaTextBox( const uno::Reference< ov::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 )
+-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 )
++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
  }
  
- // Attributes
-+uno::Any SAL_CALL 
-+ScVbaTextBox::getValue() throw (css::uno::RuntimeException)
+-ScVbaControl* ScVbaControlFactory::createControl( const sal_Int16 nClassId )  throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaControl::setControlSource( const rtl::OUString& _controlsource ) throw (uno::RuntimeException)
+ {
+-    switch( nClassId )
++#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)
 +{
-+	return uno::makeAny( getText() );
++#ifdef VBA_OOBUILD_HACK
++	rtl::OUString sRowSource;
++	uno::Reference< form::binding::XListEntrySink > xListSink( m_xProps, uno::UNO_QUERY );
++	if ( xListSink.is() )
+     {
+-        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 >() );
++		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 );
++
++			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& )
++		{
++		}	
++	}
++	return sRowSource;
++#else
++	throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getRowSource not supported") ), uno::Reference< uno::XInterface >()); // not supported
++#endif
 +}
 +
 +void SAL_CALL 
-+ScVbaTextBox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
++ScVbaControl::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
 +{
-+	rtl::OUString sVal = getAnyAsString( _value );
-+	setText( sVal );
++#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
 +}
 +
- //getString() will cause some imfo lose.
- rtl::OUString SAL_CALL 
- ScVbaTextBox::getText() throw (css::uno::RuntimeException)
-@@ -57,9 +70,14 @@ ScVbaTextBox::getText() throw (css::uno::RuntimeException)
- void SAL_CALL 
- ScVbaTextBox::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
++rtl::OUString SAL_CALL 
++ScVbaControl::getName() throw (uno::RuntimeException)
++{
++	rtl::OUString sName;
++	m_xProps->getPropertyValue
++            (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) ) >>= sName;
++	return sName;
++
++}
++
++void SAL_CALL
++ScVbaControl::setName( const rtl::OUString& _name ) throw (uno::RuntimeException)
++{
++	m_xProps->setPropertyValue
++            (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ), uno::makeAny( _name ) );
+     }
++//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)
  {
-+    if ( !mbDialog )
-+    {
-     uno::Reference< text::XTextRange > xTextRange( m_xProps, uno::UNO_QUERY_THROW );
-     xTextRange->setString( _text );
++    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 );
++    uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY );
++    if ( !xControl.is() )
++        throw uno::RuntimeException(); // really we should be more informative
++    return createControl( xControl, xParent );
++    
++}
++
++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") );
+-    m_xProps->getPropertyValue( sClassId ) >>= nClassId;
++    xProps->getPropertyValue( sClassId ) >>= nClassId;
++    uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
+     switch( nClassId )
+     {
+         case form::FormComponentType::COMBOBOX:
+-            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, 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, 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, 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, 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, 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, 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 support this Control Type." ), uno::Reference< uno::XInterface >() );
+     }
  }
++
++ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< awt::XControl >& xControl,  const uno::Reference< uno::XInterface >& xParent  )  throw (uno::RuntimeException)
++{
++    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< 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, 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, 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, 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, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
++        else
++            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, 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, 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, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
++    else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") ) ) )
++	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, 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, 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, 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, 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, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
 +    else
-+        m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ), uno::makeAny( _text ) ); 
++        throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
++    return pControl;
 +}
- 
- sal_Int32 SAL_CALL 
- ScVbaTextBox::getMaxLength() throw (css::uno::RuntimeException)
-@@ -98,3 +116,22 @@ ScVbaTextBox::setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeExcept
-     m_xProps->setPropertyValue
-             (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), aValue);
- }
 +
 +rtl::OUString& 
-+ScVbaTextBox::getServiceImplName()
++ScVbaControl::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControl") );
 +	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaTextBox::getServiceNames()
++ScVbaControl::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.TextBox" ) );
-+	}
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Control" ) );
++    }
 +	return aServiceNames;
 +}
-diff --git sc/source/ui/vba/vbatextbox.hxx sc/source/ui/vba/vbatextbox.hxx
-index 7627976..5767251 100644
---- sc/source/ui/vba/vbatextbox.hxx
-+++ sc/source/ui/vba/vbatextbox.hxx
-@@ -30,24 +30,28 @@
- #ifndef SC_VBA_TEXTBOX_HXX
- #define SC_VBA_TEXTBOX_HXX
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/msforms/XTextBox.hpp>
-+#include <ooo/vba/msforms/XTextBox.hpp>
- #include "vbacontrol.hxx"
- #include "vbahelper.hxx"
- 
--typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XTextBox > TextBoxImpl_BASE;
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XTextBox > TextBoxImpl_BASE;
- 
- class ScVbaTextBox : public TextBoxImpl_BASE
- {
-+    bool mbDialog;
- public:
--    ScVbaTextBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaTextBox( const css::uno::Reference< ov::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, ov::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);
-     virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException);
-     virtual sal_Int32 SAL_CALL getMaxLength() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setMaxLength( sal_Int32 _maxlength ) throw (css::uno::RuntimeException);
-     virtual sal_Bool SAL_CALL getMultiline() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeException);
--
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- };
- #endif //SC_VBA_TEXTBOX_HXX
-diff --git sc/source/ui/vba/vbatextboxshape.cxx sc/source/ui/vba/vbatextboxshape.cxx
-new file mode 100644
-index 0000000..83981c8
---- /dev/null
-+++ sc/source/ui/vba/vbatextboxshape.cxx
-@@ -0,0 +1,74 @@
++
++
+Index: sc/source/ui/vba/vbatextboxshape.hxx
+===================================================================
+--- sc/source/ui/vba/vbatextboxshape.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbatextboxshape.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -25243,52 +26981,205 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+
-+#include "vbatextboxshape.hxx"
++#ifndef SC_VBA_TEXTBOX_HXX
++#define SC_VBA_TEXTBOX_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <com/sun/star/text/XTextRange.hpp>
++#include <ooo/vba/msforms/XTextBoxShape.hpp>
++#include "vbashape.hxx"
++#include "vbahelper.hxx"
 +#include "vbacharacters.hxx"
-+#include <com/sun/star/text/XSimpleText.hpp>
-+#include <vector>
 +
-+using namespace com::sun::star;
-+using namespace ooo::vba;
++typedef cppu::ImplInheritanceHelper1< ScVbaShape, ov::msforms::XTextBoxShape > TextBoxShapeImpl_BASE;
 +
-+ScVbaTextBoxShape::ScVbaTextBoxShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, const uno::Reference< frame::XModel >& xModel ) : TextBoxShapeImpl_BASE( uno::Reference< XHelperInterface >(), xContext, xShape, xShapes, ScVbaShape::getType( xShape )  )
++class ScVbaTextBoxShape : public TextBoxShapeImpl_BASE
 +{
-+    m_xTextRange.set( xShape , uno::UNO_QUERY_THROW );
-+    m_xModel.set( xModel );
-+}
++    css::uno::Reference< css::text::XTextRange > m_xTextRange;
++    css::uno::Reference< css::frame::XModel > m_xModel;
++public:
++    ScVbaTextBoxShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel );
++                    
++   // Attributes
++    virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) throw (css::uno::RuntimeException);
++};
++#endif //SC_VBA_TEXTBOX_HXX
+Index: sc/source/ui/vba/vbatitle.hxx
+===================================================================
+--- sc/source/ui/vba/vbatitle.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbatitle.hxx	(.../cws/npower11)	(revision 266650)
+@@ -37,7 +37,7 @@
+ #include "vbapalette.hxx"
+ #include <com/sun/star/drawing/XShape.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+-#include <org/openoffice/excel/XTitle.hpp>
++#include <ooo/vba/excel/XTitle.hpp>
+ #include <basic/sberrors.hxx>
+ #include <memory>
+ 
+@@ -49,15 +49,15 @@
+ protected: 
+ 	css::uno::Reference< css::drawing::XShape > xTitleShape;
+ 	css::uno::Reference< css::beans::XPropertySet > xShapePropertySet;
+-	std::auto_ptr<oo::ShapeHelper> oShapeHelper;
++	std::auto_ptr<ov::ShapeHelper> oShapeHelper;
+ 	ScVbaPalette m_Palette;
+ public:
+-	TitleImpl(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape ) : BaseClass( xParent, xContext ), xTitleShape( _xTitleShape )
++	TitleImpl(  const css::uno::Reference< ov::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape ) : BaseClass( xParent, xContext ), xTitleShape( _xTitleShape )
+ 	{
+ 		xShapePropertySet.set( xTitleShape, css::uno::UNO_QUERY_THROW );
+-		oShapeHelper.reset( new oo::ShapeHelper(xTitleShape) );
++		oShapeHelper.reset( new ov::ShapeHelper(xTitleShape) );
+ 	}
+-	css::uno::Reference< oo::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++	css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+ 	{
+ 		// #TODO find out what the proper parent should be
+ 		// leaving as set by the helperapi for the moment
+@@ -65,7 +65,7 @@
+ 		// otherwise attemps to access the palette will fail
+ 		return new ScVbaInterior( BaseClass::mxParent, BaseClass::mxContext, xShapePropertySet );
+ 	}
+-	css::uno::Reference< oo::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++	css::uno::Reference< ov::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+ 	{
+ 		// #TODO find out what the proper parent should be
+ 		// leaving as set by the helperapi for the moment
+@@ -97,12 +97,12 @@
+ 		return sText;
+ 	}
+ 
+-	css::uno::Reference< oo::excel::XCharacters > SAL_CALL Characters(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++	css::uno::Reference< ov::excel::XCharacters > SAL_CALL Characters(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+ 	{
+ 		// #FIXME #TODO the helperapi Characters implementation doesn't
+ 		// seem to do very much, need to know how the existing Characters
+ 		// impl ( that we use for Range ) can be reused
+-		return 	css::uno::Reference< oo::excel::XCharacters > ();
++		return 	css::uno::Reference< ov::excel::XCharacters > ();
+ 	}
+ 
+ 	void SAL_CALL setTop( double Top ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+@@ -157,7 +157,7 @@
+ 		if ( aServiceNames.getLength() == 0 )
+ 		{
+ 			aServiceNames.realloc( 1 );
+-			aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.XTitle" ) );
++			aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XTitle" ) );
+ 		}
+ 		return aServiceNames;
+ 	}
+Index: sc/source/ui/vba/vbaimage.hxx
+===================================================================
+--- sc/source/ui/vba/vbaimage.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbaimage.hxx	(.../cws/npower11)	(revision 266650)
+@@ -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 <ooo/vba/msforms/XImage.hpp>
 +
-+rtl::OUString SAL_CALL 
-+ScVbaTextBoxShape::getText() throw (css::uno::RuntimeException)
-+{
-+    return m_xTextRange->getString();
-+}
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+void SAL_CALL 
-+ScVbaTextBoxShape::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
-+{
-+    m_xTextRange->setString( _text );
-+}
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XImage > ImageImpl_BASE;
 +
-+uno::Reference< excel::XCharacters > SAL_CALL 
-+ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException)
++class ScVbaImage : public ImageImpl_BASE
 +{
-+    ScDocShell* pDocShell = getDocShell( m_xModel );
-+    ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
-+
-+    if ( !pDoc )
-+        throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
-+    uno::Reference< text::XSimpleText > xSimple( m_xTextRange, uno::UNO_QUERY_THROW );
-+
-+    ScVbaPalette aPalette( pDoc->GetDocumentShell() );
-+    return  new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length, sal_True );
-+}
-diff --git sc/source/ui/vba/vbatextboxshape.hxx sc/source/ui/vba/vbatextboxshape.hxx
-new file mode 100644
-index 0000000..8a3b62b
---- /dev/null
-+++ sc/source/ui/vba/vbatextboxshape.hxx
-@@ -0,0 +1,58 @@
++public:
++    ScVbaImage( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pGeomHelper  );
++    //XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif //SC_VBA_IMAGE_HXX
+Index: sc/source/ui/vba/vbacondition.hxx
+===================================================================
+--- sc/source/ui/vba/vbacondition.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacondition.hxx	(.../cws/npower11)	(revision 266650)
+@@ -42,7 +42,7 @@
+ 	css::uno::Reference< css::sheet::XCellRangeAddressable > mxAddressable;
+ 	css::uno::Reference< css::sheet::XSheetCondition > mxSheetCondition;
+ public:
+-	ScVbaCondition(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition );
++	ScVbaCondition(  const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition );
+ 
+ 	static css::sheet::ConditionOperator retrieveAPIOperator( const css::uno::Any& _aOperator) throw ( css::script::BasicErrorException );
+ 
+Index: sc/source/ui/vba/vbacolorformat.hxx
+===================================================================
+--- sc/source/ui/vba/vbacolorformat.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacolorformat.hxx	(.../cws/npower11)	(revision 266650)
+@@ -31,12 +31,12 @@
+ #define SC_VBA_XCOLORFORMAT_HXX
+ 
+ #include <com/sun/star/drawing/XShape.hpp>
+-#include <org/openoffice/msforms/XColorFormat.hpp>
+-#include <org/openoffice/msforms/XFillFormat.hpp>
++#include <ooo/vba/msforms/XColorFormat.hpp>
++#include <ooo/vba/msforms/XFillFormat.hpp>
+ #include "vbahelperinterface.hxx"
+ #include "vbafillformat.hxx"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::msforms::XColorFormat > ScVbaColorFormat_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::msforms::XColorFormat > ScVbaColorFormat_BASE;
+ 
+ class ColorFormatType
+ {
+@@ -104,7 +104,7 @@
+ class ScVbaColorFormat : public ScVbaColorFormat_BASE
+ {
+ private:
+-    css::uno::Reference< oo::vba::XHelperInterface > m_xInternalParent;
++    css::uno::Reference< ov::XHelperInterface > m_xInternalParent;
+     css::uno::Reference< css::drawing::XShape > m_xShape;
+     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
+     ScVbaFillFormat *m_pFillFormat;
+@@ -115,7 +115,7 @@
+     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+     void setColorFormat( sal_Int16 nType );
+ public:
+-    ScVbaColorFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< oo::vba::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType );
++    ScVbaColorFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType );
+ 
+     // Attributes
+     virtual sal_Int32 SAL_CALL getRGB() throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbacommandbarcontrols.hxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbarcontrols.hxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacommandbarcontrols.hxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,90 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -25323,2200 +27214,2478 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_TEXTBOX_HXX
-+#define SC_VBA_TEXTBOX_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <com/sun/star/text/XTextRange.hpp>
-+#include <ooo/vba/msforms/XTextBoxShape.hpp>
-+#include "vbashape.hxx"
-+#include "vbahelper.hxx"
-+#include "vbacharacters.hxx"
++#ifndef SC_VBA_COMMANDBARCONTROLS_HXX
++#define SC_VBA_COMMANDBARCONTROLS_HXX
++
++#include <ooo/vba/XCommandBarControls.hpp>
++
++#include "vbahelperinterface.hxx"
++#include "vbacommandbar.hxx"
++#include "vbacollectionimpl.hxx"
++
++class ScVbaCommandBarControl;
++
++typedef CollTestImplHelper< ov::XCommandBarControls > CommandBarControls_BASE;
++
++class ScVbaCommandBarControls : public CommandBarControls_BASE
++{
++private:
++    sal_Bool                    m_bIsMenu;
++    sal_Bool                    m_bHasElements;
++    ScVbaCommandBar*            m_pCommandBar; 
++    ScVbaCommandBarControl*     m_pCommandBarControl; 
++    css::uno::Reference< ov::XHelperInterface >               m_xParentHardRef;
++    css::uno::Reference< css::ui::XUIConfigurationManager >         m_xUICfgManager;
++    css::uno::Reference< css::ui::XUIConfigurationPersistence >     m_xUICfgPers;
++    css::uno::Reference< css::container::XIndexContainer >          m_xBarSettings;
++
++public:
++    ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::container::XIndexAccess > xIndexAccess ) throw( css::uno::RuntimeException );
++    css::uno::Reference< css::ui::XUIConfigurationManager > GetUICfgManager() { return m_xUICfgManager; };
++    css::uno::Reference< css::ui::XUIConfigurationPersistence > GetUICfgPers() { return m_xUICfgPers; };
++    css::uno::Reference< css::container::XIndexContainer >  GetBarSettings() { return m_xBarSettings; };
++    sal_Bool IsMenu() { return m_bIsMenu; };
++    ScVbaCommandBar* GetParentCommandBar() { return m_pCommandBar; };
++    ScVbaCommandBarControl* GetParentCommandBarControl() { return m_pCommandBarControl; };
++    rtl::OUString GetParentToolBarName() 
++    { 
++        if( m_pCommandBar ) return m_pCommandBar->GetToolBarName();
++        else return rtl::OUString();
++    }
++    rtl::OUString GetControlNameByIndex( const sal_Int32 nIndex ) throw ( css::uno::RuntimeException );
++
++    // Attributes
++    virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
++    // XEnumerationAccess
++    virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
++    virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
++    virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
++
++    // Methods     
++    virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index, const css::uno::Any& /*Index2*/ ) throw (css::uno::RuntimeException); 
++    virtual css::uno::Reference< ov::XCommandBarControl > SAL_CALL Add( const css::uno::Any& Type, const css::uno::Any& Id, const css::uno::Any& Parameter, const css::uno::Any& Before, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++    // XHelperInterface
++    virtual rtl::OUString& getServiceImplName();
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++
++#endif//SC_VBA_COMMANDBARCONTROLS_HXX
+Index: sc/source/ui/vba/vbarange.cxx
+===================================================================
+--- sc/source/ui/vba/vbarange.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbarange.cxx	(.../cws/npower11)	(revision 266650)
+@@ -91,30 +91,31 @@
+ #include <com/sun/star/sheet/XSubTotalDescriptor.hpp>
+ #include <com/sun/star/sheet/GeneralFunction.hdl>
+ 
+-#include <org/openoffice/excel/XlPasteSpecialOperation.hpp>
+-#include <org/openoffice/excel/XlPasteType.hpp>
+-#include <org/openoffice/excel/Constants.hpp>
+-#include <org/openoffice/excel/XlFindLookIn.hpp>
+-#include <org/openoffice/excel/XlLookAt.hpp>
+-#include <org/openoffice/excel/XlSearchOrder.hpp>
+-#include <org/openoffice/excel/XlSortOrder.hpp>
+-#include <org/openoffice/excel/XlYesNoGuess.hpp>
+-#include <org/openoffice/excel/XlSortOrientation.hpp>
+-#include <org/openoffice/excel/XlSortMethod.hpp>
+-#include <org/openoffice/excel/XlDirection.hpp>
+-#include <org/openoffice/excel/XlSortDataOption.hpp>
+-#include <org/openoffice/excel/XlDeleteShiftDirection.hpp>
+-#include <org/openoffice/excel/XlInsertShiftDirection.hpp>
+-#include <org/openoffice/excel/XlReferenceStyle.hpp>
+-#include <org/openoffice/excel/XlBordersIndex.hpp>
+-#include <org/openoffice/excel/XlPageBreak.hpp>
+-#include <org/openoffice/excel/XlAutoFilterOperator.hpp>
+-#include <org/openoffice/excel/XlAutoFillType.hpp>
+-#include <org/openoffice/excel/XlTextParsingType.hpp>
+-#include <org/openoffice/excel/XlTextQualifier.hpp>
+-#include <org/openoffice/excel/XlCellType.hpp>
+-#include <org/openoffice/excel/XlSpecialCellsValue.hpp>
+-#include <org/openoffice/excel/XlConsolidationFunction.hpp>
++#include <ooo/vba/excel/XlPasteSpecialOperation.hpp>
++#include <ooo/vba/excel/XlPasteType.hpp>
++#include <ooo/vba/excel/Constants.hpp>
++#include <ooo/vba/excel/XlFindLookIn.hpp>
++#include <ooo/vba/excel/XlLookAt.hpp>
++#include <ooo/vba/excel/XlSearchOrder.hpp>
++#include <ooo/vba/excel/XlSortOrder.hpp>
++#include <ooo/vba/excel/XlYesNoGuess.hpp>
++#include <ooo/vba/excel/XlSortOrientation.hpp>
++#include <ooo/vba/excel/XlSortMethod.hpp>
++#include <ooo/vba/excel/XlDirection.hpp>
++#include <ooo/vba/excel/XlSortDataOption.hpp>
++#include <ooo/vba/excel/XlDeleteShiftDirection.hpp>
++#include <ooo/vba/excel/XlInsertShiftDirection.hpp>
++#include <ooo/vba/excel/XlReferenceStyle.hpp>
++#include <ooo/vba/excel/XlBordersIndex.hpp>
++#include <ooo/vba/excel/XlPageBreak.hpp>
++#include <ooo/vba/excel/XlAutoFilterOperator.hpp>
++#include <ooo/vba/excel/XlAutoFillType.hpp>
++#include <ooo/vba/excel/XlTextParsingType.hpp>
++#include <ooo/vba/excel/XlTextQualifier.hpp>
++#include <ooo/vba/excel/XlCellType.hpp>
++#include <ooo/vba/excel/XlSpecialCellsValue.hpp>
++#include <ooo/vba/excel/XlConsolidationFunction.hpp>
++#include <ooo/vba/excel/XlSearchDirection.hpp>
+ 
+ #include <scitems.hxx>
+ #include <svx/srchitem.hxx>
+@@ -150,6 +151,7 @@
+ #include "undodat.hxx"
+ #include "dbdocfun.hxx"
+ #include "patattr.hxx"
++#include "olinetab.hxx"
+ #include <comphelper/anytostring.hxx>
+ 
+ #include <global.hxx>
+@@ -162,10 +164,10 @@
+ #include <com/sun/star/sheet/FunctionArgument.hpp>
+ // end test includes
+ 
+-#include <org/openoffice/excel/Range.hpp>
++#include <ooo/vba/excel/Range.hpp>
+ #include <com/sun/star/bridge/oleautomation/Date.hpp>
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ using ::std::vector;
+ 
+@@ -203,15 +205,17 @@
+ {
+ 	uno::Reference< table::XCellRange > xCellRange( aAny, uno::UNO_QUERY_THROW );
+ 	// #FIXME need proper (WorkSheet) parent
+-	return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xCellRange, bIsRows, bIsColumns ) ) );
++	return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xCellRange, bIsRows, bIsColumns ) ) );
+ }
+ 
+-uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRanges >& xLocSheetCellRanges, ScDocShell* pDoc )
++uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRanges >& xLocSheetCellRanges, ScDocShell* pDoc )
+ {
+ 	uno::Reference< excel::XRange > xRange;
+ 	uno::Sequence< table::CellRangeAddress  > sAddresses = xLocSheetCellRanges->getRangeAddresses();
+ 	ScRangeList aCellRanges;
+ 	sal_Int32 nLen = sAddresses.getLength();
++	if ( nLen )
++       	{ 
+ 	for ( sal_Int32 index = 0; index < nLen; ++index )
+ 	{
+ 		ScRange refRange;
+@@ -231,10 +235,11 @@
+ 		// #FIXME need proper (WorkSheet) parent
+ 		xRange = new ScVbaRange( xParent, xContext, xRanges );
+ 	}
++	}
+ 	return xRange;
+ }
+ 
+-SfxItemSet*  ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
++ScCellRangeObj*  ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException )
+ {
+ 	uno::Reference< uno::XInterface > xIf;
+ 	if ( mxRanges.is() )
+@@ -242,8 +247,13 @@
+ 	else 
+ 		xIf.set( mxRange, uno::UNO_QUERY_THROW );
+ 	ScCellRangeObj* pUnoCellRange = dynamic_cast< ScCellRangeObj* >( xIf.get() );
+-	SfxItemSet* pDataSet = 	pUnoCellRange ? pUnoCellRange->GetCurrentDataSet( true ) : NULL ;
+-	
++	return pUnoCellRange;
++}
++
++SfxItemSet*  ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
++{
++	ScCellRangeObj* pUnoCellRange = getCellRangeObj();
++	SfxItemSet* pDataSet = ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
+ 	if ( !pDataSet )
+ 		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't access Itemset for range" ) ), uno::Reference< uno::XInterface >() );
+ 	return pDataSet;	
+@@ -317,7 +327,7 @@
+ 	bool mbIsRows;
+ 	bool mbIsColumns;
+ public:
+-	ScVbaRangeAreas( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, bool bIsRows, bool bIsColumns ) : ScVbaCollectionBaseImpl( uno::Reference< vba::XHelperInterface >(), xContext, xIndexAccess ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {}
++	ScVbaRangeAreas( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, bool bIsRows, bool bIsColumns ) : ScVbaCollectionBaseImpl( uno::Reference< XHelperInterface >(), xContext, xIndexAccess ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {}
+ 
+ 	// XEnumerationAccess
+ 	virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException);
+@@ -460,7 +470,7 @@
+ 		if ( pUnoCellRange )
+ 		{
+ 			
+-			SfxItemSet* pDataSet = 	pUnoCellRange->GetCurrentDataSet( true );
++			SfxItemSet* pDataSet = 	ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
+ 			SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, TRUE, NULL);
+ 			// one of the cells in the range is not like the other ;-)
+ 			// so return a zero length format to indicate that
+@@ -527,10 +537,38 @@
+ typedef ::cppu::WeakImplHelper1< container::XEnumeration > CellsEnumeration_BASE;
+ typedef ::std::vector< CellPos > vCellPos;
+ 
++// #FIXME - QUICK
++// we could probably could and should modify CellsEnumeration below
++// to handle rows and columns ( but I do this seperately for now 
++// and.. this class only handles singe areas ( does it have to handle
++// multi area ranges?? ) 
++class ColumnsRowEnumeration: public CellsEnumeration_BASE
++{
++	uno::Reference< uno::XComponentContext > mxContext;
++        uno::Reference< excel::XRange > mxRange;
++	sal_Int32 mMaxElems;
++	sal_Int32 mCurElem;
++        
++public:
++	ColumnsRowEnumeration( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XRange >& xRange, sal_Int32 nElems ) : mxContext( xContext ), mxRange( xRange ), mMaxElems( nElems ), mCurElem( 0 )
++        {
++	}
 +
-+typedef cppu::ImplInheritanceHelper1< ScVbaShape, ov::msforms::XTextBoxShape > TextBoxShapeImpl_BASE;
++	virtual ::sal_Bool SAL_CALL hasMoreElements() throw (::uno::RuntimeException){ return mCurElem < mMaxElems; }
 +
-+class ScVbaTextBoxShape : public TextBoxShapeImpl_BASE
-+{
-+    css::uno::Reference< css::text::XTextRange > m_xTextRange;
-+    css::uno::Reference< css::frame::XModel > m_xModel;
-+public:
-+    ScVbaTextBoxShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel );
-+                    
-+   // Attributes
-+    virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) throw (css::uno::RuntimeException);
++	virtual uno::Any SAL_CALL nextElement() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
++	{
++		if ( !hasMoreElements() )
++			throw container::NoSuchElementException();
++		sal_Int32 vbaIndex = 1 + mCurElem++; 
++		return uno::makeAny( mxRange->Item( uno::makeAny( vbaIndex ), uno::Any() ) ); 
++	}
 +};
-+#endif //SC_VBA_TEXTBOX_HXX
-diff --git sc/source/ui/vba/vbatextframe.cxx sc/source/ui/vba/vbatextframe.cxx
-index 2be8b3f..fa3980d 100644
---- sc/source/ui/vba/vbatextframe.cxx
-+++ sc/source/ui/vba/vbatextframe.cxx
-@@ -32,10 +32,10 @@
- #include "vbatextframe.hxx"
- #include "vbacharacters.hxx"
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
++
+ class CellsEnumeration : public CellsEnumeration_BASE
+ {
+ 	uno::Reference< uno::XComponentContext > mxContext;
+-	uno::Reference< vba::XCollection > m_xAreas;
++	uno::Reference< XCollection > m_xAreas;
+ 	vCellPos m_CellPositions;	
+ 	vCellPos::const_iterator m_it; 
+ 	uno::Reference< table::XCellRange > getArea( sal_Int32 nVBAIndex ) throw ( uno::RuntimeException )
+@@ -559,7 +597,7 @@
+ 		}
+ 	}
+ public:
+-	CellsEnumeration( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< vba::XCollection >& xAreas ): mxContext( xContext ), m_xAreas( xAreas )
++	CellsEnumeration( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCollection >& xAreas ): mxContext( xContext ), m_xAreas( xAreas )
+ 	{
+ 		sal_Int32 nItems = m_xAreas->getCount();
+ 		for ( sal_Int32 index=1; index <= nItems; ++index )
+@@ -579,7 +617,7 @@
+ 		uno::Reference< table::XCellRange > xRangeArea = getArea( aPos.m_nArea );
+ 		uno::Reference< table::XCellRange > xCellRange( xRangeArea->getCellByPosition(  aPos.m_nCol, aPos.m_nRow ), uno::UNO_QUERY_THROW );
+ 		// #FIXME need proper (WorkSheet) parent
+-		return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< vba::XHelperInterface >(), mxContext, xCellRange ) ) );
++		return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xCellRange ) ) );
  
--ScVbaTextFrame::ScVbaTextFrame( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< drawing::XShape > xShape ) : ScVbaTextFrame_BASE( xParent, xContext ), m_xShape( xShape )
-+ScVbaTextFrame::ScVbaTextFrame( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< drawing::XShape > xShape ) : ScVbaTextFrame_BASE( xParent, xContext ), m_xShape( xShape )
+ 	}
+ };
+@@ -751,6 +789,7 @@
+ 	bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell )
+ 	{
+ 		rtl::OUString sFormula;
++		double aDblValue = 0.0;
+ 		if ( aValue >>= sFormula )
+ 		{
+             // convert to CONV_OOO style formula string because XCell::setFormula
+@@ -778,6 +817,11 @@
+ 			xCell->setFormula( sFormula );
+ 			return true;
+ 		}
++		else if ( aValue >>= aDblValue )
++		{
++			xCell->setValue( aDblValue );
++			return true;
++		}
+ 		return false;
+ 	}
+ 		
+@@ -939,9 +983,9 @@
+ class AreasVisitor
  {
-     m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
+ private:
+-	uno::Reference< vba::XCollection > m_Areas;
++	uno::Reference< XCollection > m_Areas;
+ public:
+-	AreasVisitor( const uno::Reference< vba::XCollection >& rAreas ):m_Areas( rAreas ){} 
++	AreasVisitor( const uno::Reference< XCollection >& rAreas ):m_Areas( rAreas ){} 
+ 	
+ 	void visit( RangeProcessor& processor )
+ 	{
+@@ -1000,7 +1044,7 @@
+  sal_Int32 nEndColOffset = 0, sal_Int32 nEndRowOffset = 0 )
+ 	{
+ 		// #FIXME need proper (WorkSheet) parent
+-		return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, 
++		return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, 
+ 			xRange->getCellRangeByPosition(
+ 				xCellRangeAddressable->getRangeAddress().StartColumn + nStartColOffset,
+ 				xCellRangeAddressable->getRangeAddress().StartRow + nStartRowOffset,
+@@ -1098,12 +1142,12 @@
+ 	{
+ 		uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pDocSh, *aCellRanges.First() ) );
+ 		// #FIXME need proper (WorkSheet) parent
+-		return new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xRange );
++		return new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xRange );
+ 	}
+ 	uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocSh, aCellRanges ) );
+  	
+ 	// #FIXME need proper (WorkSheet) parent
+-	return new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xRanges );
++	return new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xRanges );
  }
-@@ -142,14 +142,14 @@ ScVbaTextFrame::setMarginRight( float _marginright ) throw (uno::RuntimeExceptio
  
+ css::uno::Reference< excel::XRange >
+@@ -1151,27 +1195,36 @@
  
- // Methods
--uno::Reference< oo::excel::XCharacters > SAL_CALL 
-+uno::Reference< ov::excel::XCharacters > SAL_CALL 
- ScVbaTextFrame::Characters() throw (uno::RuntimeException)
- {
-     uno::Reference< text::XSimpleText > xSimpleText( m_xShape, uno::UNO_QUERY_THROW );
-     ScVbaPalette aPalette( SfxObjectShell::Current() );
-     uno::Any aStart( sal_Int32( 1 ) );
-     uno::Any aLength(sal_Int32( -1 ) );
--    return uno::Reference< oo::excel::XCharacters >( new ScVbaCharacters( this, mxContext, aPalette, xSimpleText, aStart, aLength, sal_True ) );
-+    return uno::Reference< ov::excel::XCharacters >( new ScVbaCharacters( this, mxContext, aPalette, xSimpleText, aStart, aLength, sal_True ) );
  }
  
- rtl::OUString&
-@@ -166,7 +166,7 @@ ScVbaTextFrame::getServiceNames()
-     if ( aServiceNames.getLength() == 0 )
-     {
-         aServiceNames.realloc( 1 );
--        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.TextFrame" ) );
-+        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.TextFrame" ) );
-     }
-     return aServiceNames;
+-uno::Reference< vba::XCollection >
++uno::Reference< XCollection >
+ lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno::Reference<uno::XComponentContext>& xContext,  const uno::Reference< table::XCellRange >& xRange  ) throw( uno::RuntimeException )
+ {
+-	uno::Reference< vba::XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW ); 
++	uno::Reference< XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW ); 
+ 	ScDocument* pDoc = getDocumentFromRange(xRange);
+ 	if ( !pDoc )
+ 		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ 	ScVbaPalette aPalette( pDoc->GetDocumentShell() );
+- 	uno::Reference< vba::XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) );
++ 	uno::Reference< XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) );
+ 	return borders;
  }
-diff --git sc/source/ui/vba/vbatextframe.hxx sc/source/ui/vba/vbatextframe.hxx
-index 588e1a5..99ff59f 100644
---- sc/source/ui/vba/vbatextframe.hxx
-+++ sc/source/ui/vba/vbatextframe.hxx
-@@ -31,18 +31,18 @@
- #define SC_VBA_TEXTFRAME_HXX
- #include <com/sun/star/drawing/XShape.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/excel/XCharacters.hpp>
--#include <org/openoffice/excel/XTextFrame.hpp>
-+#include <ooo/vba/excel/XCharacters.hpp>
-+#include <ooo/vba/excel/XTextFrame.hpp>
- 
- #include "vbahelperinterface.hxx"
- #include "vbapalette.hxx"
- 
--typedef InheritedHelperInterfaceImpl1< oo::excel::XTextFrame > ScVbaTextFrame_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XTextFrame > ScVbaTextFrame_BASE;
  
- class ScVbaTextFrame : public ScVbaTextFrame_BASE
+ ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> const & args,
+-    uno::Reference< uno::XComponentContext> const & xContext )  throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< vba::XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), getModelFromRange( getXSomethingFromArgs< table::XCellRange >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
++    uno::Reference< uno::XComponentContext> const & xContext )  throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), getModelFromXIf( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
  {
- private:
--    css::uno::Reference< oo::excel::XCharacters > m_xCharacters;
-+    css::uno::Reference< ov::excel::XCharacters > m_xCharacters;
-     css::uno::Reference< css::drawing::XShape > m_xShape;
-     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
- protected:
-@@ -52,7 +52,7 @@ protected:
-     sal_Int32 getMargin( rtl::OUString sMarginType );
-     void setMargin( rtl::OUString sMarginType, float fMargin );
- public:
--    ScVbaTextFrame( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext , css::uno::Reference< css::drawing::XShape > xShape);
-+    ScVbaTextFrame( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext , css::uno::Reference< css::drawing::XShape > xShape);
-     virtual ~ScVbaTextFrame() {}
-     // Attributes
-     virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException);
-@@ -67,7 +67,7 @@ public:
-     virtual void SAL_CALL setMarginRight( float _marginright ) throw (css::uno::RuntimeException);
+-	mxRange.set( mxPropertySet, uno::UNO_QUERY_THROW );
+-	uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxContext, mxRange ) );
++	mxRange.set( mxPropertySet, uno::UNO_QUERY );
++	mxRanges.set( mxPropertySet, uno::UNO_QUERY );
++	uno::Reference< container::XIndexAccess >  xIndex;
++	if ( mxRange.is() )
++	{
++		xIndex = new SingleRangeIndexAccess( mxContext, mxRange );
++	}
++	else if ( mxRanges.is() )
++	{
++		xIndex.set( mxRanges, uno::UNO_QUERY_THROW );
++	}
+ 	m_Areas = new ScVbaRangeAreas( mxContext, xIndex, mbIsRows, mbIsColumns );
+ }
  
-     // Methods
--    virtual css::uno::Reference< oo::excel::XCharacters > SAL_CALL Characters(  ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL Characters(  ) throw (css::uno::RuntimeException);
+-ScVbaRange::ScVbaRange( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange, sal_Bool bIsRows, sal_Bool bIsColumns ) throw( lang::IllegalArgumentException )
++ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange, sal_Bool bIsRows, sal_Bool bIsColumns ) throw( lang::IllegalArgumentException )
+ : ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRange, uno::UNO_QUERY_THROW ), getModelFromRange( xRange), true ), mxRange( xRange ),
+                 mbIsRows( bIsRows ),
+                 mbIsColumns( bIsColumns )
+@@ -1186,7 +1239,7 @@
  
- };
+ }
  
-diff --git sc/source/ui/vba/vbatitle.hxx sc/source/ui/vba/vbatitle.hxx
-index c9ea979..fb35d8e 100644
---- sc/source/ui/vba/vbatitle.hxx
-+++ sc/source/ui/vba/vbatitle.hxx
-@@ -37,7 +37,7 @@
- #include "vbapalette.hxx"
- #include <com/sun/star/drawing/XShape.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/excel/XTitle.hpp>
-+#include <ooo/vba/excel/XTitle.hpp>
- #include <basic/sberrors.hxx>
- #include <memory>
+-ScVbaRange::ScVbaRange( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges,  sal_Bool bIsRows, sal_Bool bIsColumns  ) throw ( lang::IllegalArgumentException )
++ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges,  sal_Bool bIsRows, sal_Bool bIsColumns  ) throw ( lang::IllegalArgumentException )
+ : ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRanges, uno::UNO_QUERY_THROW ), getModelFromXIf( uno::Reference< uno::XInterface >( xRanges, uno::UNO_QUERY_THROW ) ), true ), mxRanges( xRanges ),mbIsRows( bIsRows ), mbIsColumns( bIsColumns )
  
-@@ -49,15 +49,15 @@ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseClass;
- protected: 
- 	css::uno::Reference< css::drawing::XShape > xTitleShape;
- 	css::uno::Reference< css::beans::XPropertySet > xShapePropertySet;
--	std::auto_ptr<oo::ShapeHelper> oShapeHelper;
-+	std::auto_ptr<ov::ShapeHelper> oShapeHelper;
- 	ScVbaPalette m_Palette;
- public:
--	TitleImpl(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape ) : BaseClass( xParent, xContext ), xTitleShape( _xTitleShape )
-+	TitleImpl(  const css::uno::Reference< ov::XHelperInterface >& xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& _xTitleShape ) : BaseClass( xParent, xContext ), xTitleShape( _xTitleShape )
+ {
+@@ -1199,7 +1252,7 @@
+ {
+ }
+ 
+-uno::Reference< vba::XCollection >& ScVbaRange::getBorders()
++uno::Reference< XCollection >& ScVbaRange::getBorders()
+ {
+ 	if ( !m_Borders.is() )
  	{
- 		xShapePropertySet.set( xTitleShape, css::uno::UNO_QUERY_THROW );
--		oShapeHelper.reset( new oo::ShapeHelper(xTitleShape) );
-+		oShapeHelper.reset( new ov::ShapeHelper(xTitleShape) );
- 	}
--	css::uno::Reference< oo::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-+	css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+@@ -1532,7 +1585,7 @@
+ 	if ( m_Areas->getCount() > 1 )
  	{
- 		// #TODO find out what the proper parent should be
- 		// leaving as set by the helperapi for the moment
-@@ -65,7 +65,7 @@ public:
- 		// otherwise attemps to access the palette will fail
- 		return new ScVbaInterior( BaseClass::mxParent, BaseClass::mxContext, xShapePropertySet );
- 	}
--	css::uno::Reference< oo::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-+	css::uno::Reference< ov::excel::XFont > SAL_CALL Font(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+ 		// Multi-Area Range
+-		uno::Reference< vba::XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW );
++		uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW );
+ 		for ( sal_Int32 index = 1; index <= xCollection->getCount(); ++index )
+ 		{
+ 			uno::Reference< excel::XRange > xRange( xCollection->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
+@@ -1739,7 +1792,7 @@
+ 	{
+ 		// Multi-Area Range
+ 		rtl::OUString sAddress;
+-		uno::Reference< vba::XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW );
++		uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW );
+                 uno::Any aExternalCopy = External;
+ 		for ( sal_Int32 index = 1; index <= xCollection->getCount(); ++index )
+ 		{
+@@ -1822,15 +1875,15 @@
+ 		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ 
+ 	ScVbaPalette aPalette( pDoc->GetDocumentShell() );	
+-	SfxItemSet* pSet = NULL;
++	ScCellRangeObj* pRangeObj = NULL;
+ 	try
  	{
- 		// #TODO find out what the proper parent should be
- 		// leaving as set by the helperapi for the moment
-@@ -97,12 +97,12 @@ public:
- 		return sText;
+-		pSet = getCurrentDataSet();
++		pRangeObj = getCellRangeObj();
  	}
- 
--	css::uno::Reference< oo::excel::XCharacters > SAL_CALL Characters(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-+	css::uno::Reference< ov::excel::XCharacters > SAL_CALL Characters(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+ 	catch( uno::Exception& ) 
  	{
- 		// #FIXME #TODO the helperapi Characters implementation doesn't
- 		// seem to do very much, need to know how the existing Characters
- 		// impl ( that we use for Range ) can be reused
--		return 	css::uno::Reference< oo::excel::XCharacters > ();
-+		return 	css::uno::Reference< ov::excel::XCharacters > ();
  	}
- 
- 	void SAL_CALL setTop( double Top ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-@@ -157,7 +157,7 @@ public:
- 		if ( aServiceNames.getLength() == 0 )
- 		{
- 			aServiceNames.realloc( 1 );
--			aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.XTitle" ) );
-+			aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XTitle" ) );
- 		}
- 		return aServiceNames;
+-	return  new ScVbaFont( this, mxContext, aPalette, xProps, pSet );
++	return  new ScVbaFont( this, mxContext, aPalette, xProps, pRangeObj );
+ }
+                                                                                                                              
+ uno::Reference< excel::XRange >
+@@ -1847,14 +1900,43 @@
  	}
-diff --git sc/source/ui/vba/vbatogglebutton.cxx sc/source/ui/vba/vbatogglebutton.cxx
-new file mode 100644
-index 0000000..f938ad1
---- /dev/null
-+++ sc/source/ui/vba/vbatogglebutton.cxx
-@@ -0,0 +1,108 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "vbatogglebutton.hxx"
-+#include <vector>
+ 
+ 	sal_Int32 nRow = 0, nColumn = 0;
+-	sal_Bool bIsIndex = nRowIndex >>= nRow, bIsColumnIndex = nColumnIndex >>= nColumn;
 +
-+using namespace com::sun::star;
-+using namespace ooo::vba;
++	sal_Bool bIsIndex = nRowIndex.hasValue();
++	sal_Bool bIsColumnIndex = nColumnIndex.hasValue();
 +
++	// Sometimes we might get a float or a double or whatever
++	// set in the Any, we should convert as appropriate
++	// #FIXME - perhaps worth turning this into some sort of
++	// convertion routine e.g. bSuccess = getValueFromAny( nRow, nRowIndex, getCppuType((sal_Int32*)0) )
++	if ( nRowIndex.hasValue() && !( nRowIndex >>= nRow ) )
++	{
++		uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
++		uno::Any aConverted;
++		try
++		{
++			aConverted = xConverter->convertTo( nRowIndex, getCppuType((sal_Int32*)0) );
++			bIsIndex = ( aConverted >>= nRow );
++		}
++		catch( uno::Exception& ) {} // silence any errors
++	}
++	if ( bIsColumnIndex && !( nColumnIndex >>= nColumn ) )
++	{
++		uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
++		uno::Any aConverted;
++		try
++		{
++			aConverted = xConverter->convertTo( nColumnIndex, getCppuType((sal_Int32*)0) );
++			bIsColumnIndex = ( aConverted >>= nColumn );
++		}
++		catch( uno::Exception& ) {} // silence any errors
++	}
+                                                                                                                        
+ 	RangeHelper thisRange( mxRange );
+ 	table::CellRangeAddress thisRangeAddress =  thisRange.getCellRangeAddressable()->getRangeAddress();
+ 	uno::Reference< table::XCellRange > xSheetRange = thisRange.getCellRangeFromSheet();
+ 	if( !bIsIndex && !bIsColumnIndex ) // .Cells
+ 		// #FIXE needs proper parent ( Worksheet )
+-		return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< vba::XHelperInterface >(), mxContext, mxRange ) );
++		return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, mxRange ) );
+ 
+ 	sal_Int32 nIndex = --nRow;
+ 	if( bIsIndex && !bIsColumnIndex ) // .Cells(n)
+@@ -1890,6 +1972,19 @@
+ 			xSelection->select( uno::makeAny( mxRanges ) );
+ 		else
+ 			xSelection->select( uno::makeAny( mxRange ) );
++		// set focus on document e.g.
++		// ThisComponent.CurrentController.Frame.getContainerWindow.SetFocus
++		try
++		{
++			uno::Reference< frame::XController > xController( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
++			uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_QUERY_THROW );
++			uno::Reference< awt::XWindow > xWin( xFrame->getContainerWindow(), uno::UNO_QUERY_THROW );
++			xWin->setFocus();
++		}
++		catch( uno::Exception& )
++		{
++		}		
 +
-+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< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
+ 	}
+ }
+ 
+@@ -2687,6 +2782,167 @@
+ 	return sal_True; // always
+ }
+ 
++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)
 +{
-+    OSL_TRACE("ScVbaToggleButton(ctor)");
-+    m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
-+}
++    // return a Range object that represents the first cell where that information is found.
++    rtl::OUString sWhat;
++    sal_Int32 nWhat = 0;
++    float fWhat = 0.0;
++    
++    // string.
++    if( What >>= sWhat )
++    {
++        if( !sWhat.getLength() )
++		    throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
++    }
++    else if( What >>= nWhat )
++    {
++        sWhat = rtl::OUString::valueOf( nWhat );
++    }
++    else if( What >>= fWhat )
++    {
++        sWhat = rtl::OUString::valueOf( fWhat );
++    }
++    else
++	    throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
++
++    rtl::OUString sSearch = VBAToRegexp( sWhat );
++
++	const SvxSearchItem& globalSearchOptions = ScGlobal::GetSearchItem();
++	SvxSearchItem newOptions( globalSearchOptions );
++
++	sal_Int16 nLookAt =  globalSearchOptions.GetWordOnly() ?  excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole; 
++	sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns;
++
++	uno::Reference< util::XSearchable > xSearch( mxRange, uno::UNO_QUERY );
++    if( xSearch.is() )
++    {
++        uno::Reference< util::XSearchDescriptor > xDescriptor = xSearch->createSearchDescriptor();
++        xDescriptor->setSearchString( sSearch );
++
++        uno::Reference< excel::XRange > xAfterRange;
++        uno::Reference< table::XCellRange > xStartCell;
++        if( After >>= xAfterRange )
++        {
++            // After must be a single cell in the range
++            if( xAfterRange->getCount() > 1 )
++		        throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be a single cell." )) , uno::Reference< uno::XInterface >() );
++            uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY );
++            if( !xCell.is() )
++		        throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be in range." )) , uno::Reference< uno::XInterface >() );
++            xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW );
++        }
++
++        // LookIn
++        if( LookIn.hasValue() )
++        {
++            sal_Int32 nLookIn = 0;
++            if( LookIn >>= nLookIn )
++            {
++                sal_Int16 nSearchType = 0; 
++                switch( nLookIn )
++                {
++                    case excel::XlFindLookIn::xlComments :
++                        nSearchType = SVX_SEARCHIN_NOTE; // Notes
++                    break;
++                    case excel::XlFindLookIn::xlFormulas :
++                        nSearchType = SVX_SEARCHIN_FORMULA;
++                    break;
++                    case excel::XlFindLookIn::xlValues :
++                        nSearchType = SVX_SEARCHIN_VALUE;
++                    break;
++                    default:
++		                throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookIn." )) , uno::Reference< uno::XInterface >() );
++                }
++                newOptions.SetCellType( nSearchType );
++                xDescriptor->setPropertyValue( rtl::OUString::createFromAscii( "SearchType" ), uno::makeAny( nSearchType ) );
++            }
++        }
++
++        // LookAt
++		if ( LookAt.hasValue() )
++		{
++			nLookAt =  ::comphelper::getINT16( LookAt );
++			sal_Bool bSearchWords = sal_False;
++			if ( nLookAt == excel::XlLookAt::xlPart )
++				bSearchWords = sal_False;
++			else if ( nLookAt == excel::XlLookAt::xlWhole )
++				bSearchWords = sal_True;
++			else
++				throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookAt" )) , uno::Reference< uno::XInterface >() );
++			newOptions.SetWordOnly( bSearchWords );
++			xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHWORDS ) ), uno::makeAny( bSearchWords ) ); 	
++        }
++
++        // SearchOrder
++		if ( SearchOrder.hasValue() )
++		{
++			nSearchOrder =  ::comphelper::getINT16( SearchOrder );
++			sal_Bool bSearchByRow = sal_False;
++			if ( nSearchOrder == excel::XlSearchOrder::xlByColumns )
++				bSearchByRow = sal_False;
++			else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
++				bSearchByRow = sal_True;
++			else
++				throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchOrder" )) , uno::Reference< uno::XInterface >() );
++			
++			newOptions.SetRowDirection( bSearchByRow ); 
++			xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHBYROW ) ), uno::makeAny( bSearchByRow ) ); 	
++		}			
++
++        // SearchDirection
++        if ( SearchDirection.hasValue() )
++        {
++            sal_Int32 nSearchDirection = 0;
++            if( SearchDirection >>= nSearchDirection )
++            {
++                sal_Bool bSearchBackwards = sal_False;
++                if ( nSearchDirection == excel::XlSearchDirection::xlNext )
++                    bSearchBackwards = sal_False; 
++                else if( nSearchDirection == excel::XlSearchDirection::xlPrevious )
++                    bSearchBackwards = sal_True;
++                else
++				    throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchDirection" )) , uno::Reference< uno::XInterface >() );
++                newOptions.SetBackward( bSearchBackwards );
++                xDescriptor->setPropertyValue( rtl::OUString::createFromAscii( "SearchBackwards" ), uno::makeAny( bSearchBackwards ) );
++            }
++        }
 +
-+ScVbaToggleButton::~ScVbaToggleButton()
-+{
-+    OSL_TRACE("~ScVbaToggleButton(dtor)");
-+}
++        // MatchCase
++        sal_Bool bMatchCase = sal_False;
++		if ( MatchCase.hasValue() )
++		{
++			// SearchCaseSensitive
++			if( !( MatchCase >>= bMatchCase ) )
++			    throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for MatchCase" )) , uno::Reference< uno::XInterface >() );
++		}			
++        xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHCASE ) ), uno::makeAny( bMatchCase ) ); 	
 +
-+// Attributes
-+rtl::OUString SAL_CALL 
-+ScVbaToggleButton::getCaption() throw (css::uno::RuntimeException)
-+{
-+    rtl::OUString Label;
-+    m_xProps->getPropertyValue( LABEL ) >>= Label;
-+    return Label;
-+}
++        // MatchByte
++        // SearchFormat
++        // ignore
 +
-+void SAL_CALL 
-+ScVbaToggleButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-+}
++		ScGlobal::SetSearchItem( newOptions );	
 +
-+uno::Any SAL_CALL 
-+ScVbaToggleButton::getValue() throw (uno::RuntimeException)
-+{
-+	sal_Int16 nState = 0;
-+    	m_xProps->getPropertyValue( STATE ) >>= nState;
-+ 	return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
-+}
++		uno::Reference< util::XSearchDescriptor > xSearchDescriptor( xDescriptor, uno::UNO_QUERY );
++		uno::Reference< uno::XInterface > xInterface = xStartCell.is() ? xSearch->findNext( xStartCell, xSearchDescriptor) : xSearch->findFirst( xSearchDescriptor );
++		uno::Reference< table::XCellRange > xCellRange( xInterface, uno::UNO_QUERY );
++        if ( xCellRange.is() )
++        {
++            uno::Reference< excel::XRange > xResultRange = new ScVbaRange( this, mxContext, xCellRange );
++            if( xResultRange.is() )
++            {
++                xResultRange->Select();
++                return xResultRange;
++            }
++        }
 +
-+void SAL_CALL 
-+ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
-+{
-+	sal_Int16 nState = 0;
-+	_value >>= nState;
-+        OSL_TRACE( "nState - %d", nState );
-+	nState = ( nState == -1 ) ?  1 : 0;
-+        OSL_TRACE( "nState - %d", nState );
-+	m_xProps->setPropertyValue( STATE, uno::makeAny(  nState ) );
-+}
++    }
 +
-+rtl::OUString& 
-+ScVbaToggleButton::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaToggleButton") );
-+	return sImplName;
++    return uno::Reference< excel::XRange >();
 +}
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaToggleButton::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
+ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Reference<  uno::XComponentContext >& xContext, ScDocShell* pDocSh )
+ {
+ 	uno::Reference< excel::XRange > xKeyRange;
+@@ -2740,10 +2996,10 @@
+ 
+ 		// make sure that upper left poing of key range is within the
+ 		// parent range
+-		if (  colRowKeyAddress.StartColumn >= parentRangeAddress.StartColumn &&
+-			colRowKeyAddress.StartColumn <= parentRangeAddress.EndColumn  &&
++		if (  ( !bIsSortColumn && colRowKeyAddress.StartColumn >= parentRangeAddress.StartColumn &&
++			colRowKeyAddress.StartColumn <= parentRangeAddress.EndColumn ) || ( bIsSortColumn && 
+ 			colRowKeyAddress.StartRow >= parentRangeAddress.StartRow &&
+-			colRowKeyAddress.StartRow <= parentRangeAddress.EndRow  )
++			colRowKeyAddress.StartRow <= parentRangeAddress.EndRow  ) )
+ 		{
+ 			//determine col/row index
+ 			if ( bIsSortColumn )
+@@ -2799,7 +3055,7 @@
+ /* 
+ 	if (  isSingleCellRange() )
+ 	{
+-		uno::Reference< vba::XRange > xCurrent = CurrentRegion();
++		uno::Reference< XRange > xCurrent = CurrentRegion();
+ 		xCurrent->Sort( Key1, Order1, Key2, Type, Order2, Key3, Order3, Header, OrderCustom, MatchCase, Orientation, SortMethod, DataOption1, DataOption2, DataOption3 );
+ 		return; 
+ 	}
+@@ -3117,6 +3373,18 @@
+ uno::Reference< container::XEnumeration > SAL_CALL 
+ ScVbaRange::createEnumeration() throw (uno::RuntimeException)
+ {
++	if ( mbIsColumns || mbIsRows )
 +	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ToggleButton" ) );
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(mxRange, uno::UNO_QUERY );
++		uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW );
++                sal_Int32 nElems = 0;
++		if ( mbIsColumns )	
++			nElems = xColumnRowRange->getColumns()->getCount();
++		else
++			nElems = xColumnRowRange->getRows()->getCount();
++                return new ColumnsRowEnumeration( mxContext, xRange, nElems );
++		
 +	}
-+	return aServiceNames;
-+}
-+
-diff --git sc/source/ui/vba/vbatogglebutton.hxx sc/source/ui/vba/vbatogglebutton.hxx
-new file mode 100644
-index 0000000..326f0a9
---- /dev/null
-+++ sc/source/ui/vba/vbatogglebutton.hxx
-@@ -0,0 +1,63 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_TOGGLEBUTTON_HXX
-+#define SC_VBA_TOGGLEBUTTON_HXX
-+#include <cppuhelper/implbase2.hxx>
-+#include <ooo/vba/msforms/XToggleButton.hpp>
-+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XToggleButton, css::script::XDefaultProperty  > ToggleButtonImpl_BASE;
-+
-+class ScVbaToggleButton : public ToggleButtonImpl_BASE
-+{
-+	rtl::OUString msDftPropName;
-+public:
-+    ScVbaToggleButton( const css::uno::Reference< ov::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, ov::AbstractGeometryAttributes* pGeomHelper );
-+    ~ScVbaToggleButton();
-+   // Attributes
-+    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
-+
-+    virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+    // XDefaultProperty
-+    rtl::OUString SAL_CALL getDefaultPropertyName(  ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-+};
-+#endif //SC_VBA_TOGGLEBUTTON_HXX
-diff --git sc/source/ui/vba/vbauserform.cxx sc/source/ui/vba/vbauserform.cxx
-new file mode 100644
-index 0000000..8d27e5c
---- /dev/null
-+++ sc/source/ui/vba/vbauserform.cxx
-@@ -0,0 +1,228 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#include "helperdecl.hxx"
-+#include "vbauserform.hxx"
-+#include <com/sun/star/awt/XControl.hpp>
-+#include <com/sun/star/awt/XControlContainer.hpp>
-+#include <com/sun/star/beans/PropertyConcept.hpp>
-+#include <basic/sbx.hxx>
-+#include <basic/sbstar.hxx>
-+#include <basic/sbmeth.hxx>
-+#include "unonames.hxx"
-+#include "vbacontrols.hxx"
-+
-+using namespace ::ooo::vba;
-+using namespace ::com::sun::star;
-+
-+// some little notes
-+// XDialog implementation has the following interesting bits
-+// a Controls property ( which is an array of the container controls )
-+//   each item in the controls array is a XControl, where the model is 
-+//   basically a property bag
-+// additionally the XDialog instance has itself a model
-+//     this model has a ControlModels ( array of models ) property
-+//     the models in ControlModels can be accessed by name
-+// also the XDialog is a XControl ( to access the model above
-+
-+ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) :  ScVbaUserForm_BASE( getXSomethingFromArgs< XHelperInterface >( aArgs, 0 ), xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), getXSomethingFromArgs< frame::XModel >( aArgs, 2 ), static_cast< ooo::vba::AbstractGeometryAttributes* >(0) ), m_pDocShell( 0 ), mbDispose( true )
+ 	return new CellsEnumeration( mxContext, m_Areas );
+ }
+ 
+@@ -3364,26 +3632,32 @@
+ 		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();
+ 	
+ 	sal_Int32 nStartRow = thisAddress.StartRow;
+ 	sal_Int32 nEndRow = thisAddress.EndRow;
+-	double nHeight = getCalcRowHeight( thisAddress );
++        USHORT nRowTwips = 0;
+ 	// #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 ) 
++	ScDocShell* pShell = getScDocShell();
++	if ( pShell )
+ 	{
+ 		for ( sal_Int32 nRow = nStartRow ; nRow <= nEndRow; ++nRow )
+ 		{
+ 			thisAddress.StartRow = nRow;
+-			double nCurHeight = getCalcRowHeight( thisAddress );
+-			if ( nHeight != nCurHeight )
++			USHORT nCurTwips = pShell->GetDocument()->GetOriginalHeight( thisAddress.StartRow, thisAddress.Sheet );
++			if ( nRow == nStartRow )
++				nRowTwips = nCurTwips;
++			if ( nRowTwips != nCurTwips )
+ 				return aNULL();
+ 		}
+ 	}
++	double nHeight = lcl_Round2DecPlaces( lcl_TwipsToPoints( nRowTwips ) );
+ 	return uno::makeAny( nHeight );
+ }
+ 
+@@ -3555,7 +3829,7 @@
+ 		ScDocShell* pDocShell = getDocShellFromRange(xRange);
+ 		RangeHelper rHelper(xRange);
+ 		// parent should be Thisworkbook
+-       	xSheet.set( new ScVbaWorksheet( uno::Reference< vba::XHelperInterface >(), mxContext,rHelper.getSpreadSheet(),pDocShell->GetModel()) );
++       	xSheet.set( new ScVbaWorksheet( uno::Reference< XHelperInterface >(), mxContext,rHelper.getSpreadSheet(),pDocShell->GetModel()) );
+ 	}	
+ 	return xSheet;
+ }
+@@ -3622,14 +3896,14 @@
+ 			if ( xRange.is() )
+ 			{
+ 				// #FIXME need proper (WorkSheet) parent
+-				uno::Reference< excel::XRange > xVbRange =  new  ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xRange );
++				uno::Reference< excel::XRange > xVbRange =  new  ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xRange );
+ 				return xVbRange;
+ 			}
+ 		}
+ 	}
+ 	uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY );
+ 	uno::Reference< table::XCellRange > xSheetRange( xView->getActiveSheet(), uno::UNO_QUERY_THROW ); 
+-	ScVbaRange* pRange = new ScVbaRange( uno::Reference< vba::XHelperInterface >(), xContext, xSheetRange );
++	ScVbaRange* pRange = new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xSheetRange );
+ 	uno::Reference< excel::XRange > xVbSheetRange( pRange );
+ 	return pRange->Range( Cell1, Cell2, true ); 
+ }
+@@ -4120,7 +4394,7 @@
+ 		// if the range is a not a row or column range autofit will
+ 		// throw an error
+ 
+-		if ( !mbIsColumns  )
++		if ( !( mbIsColumns || mbIsRows ) )
+ 			DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); 			
+         ScDocShell* pDocShell = getDocShellFromRange( mxRange );
+         if ( pDocShell )
+@@ -4299,7 +4573,114 @@
+ 	xProps->setPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLPRO)), uno::makeAny(rCellAttr));
+ }
+ 
++uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
 +{
-+    m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
-+    uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
-+    m_pDocShell = getDocShell( m_xModel );
-+    m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
-+    setGeometryHelper( new UserFormGeometryHelper( xContext, xControl ) );
-+}
++	// #FIXME, If the specified range is in a PivotTable report
+ 
++	// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
++	if( m_Areas->getCount() > 1 )
++		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not get Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
++	
++	sal_Bool bShowDetail = sal_False;
 +
-+ScVbaUserForm::~ScVbaUserForm()
-+{
-+}
++	RangeHelper helper( mxRange );
++	uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor();
++	xSheetCellCursor->collapseToCurrentRegion();
++	uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xSheetCellCursor, uno::UNO_QUERY_THROW);
++	table::CellRangeAddress aOutlineAddress = xCellRangeAddressable->getRangeAddress();
 +
-+void SAL_CALL 
-+ScVbaUserForm::Show(  ) throw (uno::RuntimeException)
-+{
-+	OSL_TRACE("ScVbaUserForm::Show(  )");
-+	short aRet = 0;
-+	if ( m_xDialog.is() )
-+		aRet = m_xDialog->execute();
-+	OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet);
-+	if ( mbDispose )
++	// check if the specified range is a single summary column or row.
++	table::CellRangeAddress thisAddress = helper.getCellRangeAddressable()->getRangeAddress();
++	if( (thisAddress.StartRow == thisAddress.EndRow &&  thisAddress.EndRow == aOutlineAddress.EndRow ) ||
++		(thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn ))
 +	{
-+		try
-+		{
-+			uno::Reference< lang::XComponent > xComp( m_xDialog, uno::UNO_QUERY_THROW );
-+			m_xDialog = NULL;
-+			xComp->dispose();
-+			mbDispose = false; 
-+		}
-+		catch( uno::Exception& )
++		sal_Bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? sal_False:sal_True; 
++		ScDocument* pDoc = getDocumentFromRange( mxRange );
++		ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable(static_cast<SCTAB>(thisAddress.Sheet), sal_True);
++		const ScOutlineArray* pOutlineArray =  bColumn ? pOutlineTable->GetColArray(): pOutlineTable->GetRowArray();
++		if( pOutlineArray )
 +		{
++			SCCOLROW nPos = bColumn ? (SCCOLROW)(thisAddress.EndColumn-1):(SCCOLROW)(thisAddress.EndRow-1);
++			ScOutlineEntry* pEntry = pOutlineArray->GetEntryByPos( 0, nPos );
++			if( pEntry )
++			{
++				bShowDetail = !pEntry->IsHidden();
++				return uno::makeAny( bShowDetail );
++			}
 +		}
 +	}
-+}
-+
-+rtl::OUString SAL_CALL 
-+ScVbaUserForm::getCaption() throw (::com::sun::star::uno::RuntimeException)
-+{
-+    rtl::OUString sCaption;
-+    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ) ) >>= sCaption;
-+    return sCaption;
-+}
-+void
-+ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), uno::makeAny( _caption ) );
-+}
-+
-+void SAL_CALL 
-+ScVbaUserForm::Hide(  ) throw (uno::RuntimeException)
-+{
-+	mbDispose = false;  // hide not dispose
-+	if ( m_xDialog.is() )
-+		m_xDialog->endExecute();
-+}
-+
-+void SAL_CALL 
-+ScVbaUserForm::RePaint(  ) throw (uno::RuntimeException)
-+{
-+	// do nothing
-+}
-+
-+void SAL_CALL 
-+ScVbaUserForm::UnloadObject(  ) throw (uno::RuntimeException)
-+{
-+	mbDispose = true;
-+	if ( m_xDialog.is() )
-+		m_xDialog->endExecute();
-+}
-+
-+rtl::OUString& 
-+ScVbaUserForm::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
-+	return sImplName;
-+}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaUserForm::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
++	else
 +	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.UserForm" ) );
++		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
 +	}
-+	return aServiceNames;
-+}
-+
-+uno::Reference< beans::XIntrospectionAccess > SAL_CALL 
-+ScVbaUserForm::getIntrospection(  ) throw (uno::RuntimeException)
-+{
-+	return uno::Reference< beans::XIntrospectionAccess >();
-+}
-+
-+uno::Any SAL_CALL 
-+ScVbaUserForm::invoke( const ::rtl::OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
-+{
-+	throw uno::RuntimeException(); // unsupported operation
++    return aNULL();
 +}
 +
-+void SAL_CALL 
-+ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
++void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::RuntimeException)
 +{
-+	uno::Any aObject = getValue( aPropertyName );
-+	// The Object *must* support XDefaultProperty here because getValue will
-+	// only return properties that are Objects ( e.g. controls )
-+	// e.g. Userform1.aControl = something
-+	// 'aControl' has to support XDefaultProperty to make sense here
-+	uno::Reference< script::XDefaultProperty > xDfltProp( aObject, uno::UNO_QUERY_THROW );
-+	rtl::OUString aDfltPropName = xDfltProp->getDefaultPropertyName();
-+	uno::Reference< beans::XIntrospectionAccess > xUnoAccess( getIntrospectionAccess( aObject ) );
-+	uno::Reference< beans::XPropertySet > xPropSet( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY_THROW );
-+	xPropSet->setPropertyValue( aDfltPropName, aValue );
-+}
++	// #FIXME, If the specified range is in a PivotTable report
 +
-+uno::Any SAL_CALL 
-+ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
-+{
-+	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, m_xModel );
-+        uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) );
-+        ScVbaControl* pControl  = dynamic_cast< ScVbaControl* >( xVBAControl.get() );
-+        pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) );
-+	return uno::makeAny( xVBAControl );
-+}
++	// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
++	if( m_Areas->getCount() > 1 )
++		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
++	
++	sal_Bool bShowDetail = sal_False;
++	aShowDetail >>= bShowDetail;
 +
-+::sal_Bool SAL_CALL 
-+ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
-+{
-+	return sal_False;
-+}
-+uno::Any SAL_CALL 
-+ScVbaUserForm::Controls( const uno::Any& index ) throw (uno::RuntimeException)
-+{
-+	uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
-+	uno::Reference< XCollection > xControls( new ScVbaControls( this, mxContext, xDialogControl ) );
-+	if ( index.hasValue() )
-+		return uno::makeAny( xControls->Item( index, uno::Any() ) );
-+	return uno::makeAny( xControls );
-+}
++	RangeHelper helper( mxRange );
++	uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor();
++	xSheetCellCursor->collapseToCurrentRegion();
++	uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xSheetCellCursor, uno::UNO_QUERY_THROW);
++	table::CellRangeAddress aOutlineAddress = xCellRangeAddressable->getRangeAddress();
 +
-+::sal_Bool SAL_CALL 
-+ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
-+{
-+	uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY );
-+	OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is() );
-+	if ( xControl.is() )
++	// check if the specified range is a single summary column or row.
++	table::CellRangeAddress thisAddress = helper.getCellRangeAddressable()->getRangeAddress();
++	if( (thisAddress.StartRow == thisAddress.EndRow &&  thisAddress.EndRow == aOutlineAddress.EndRow ) ||
++		(thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn ))
++	{			
++		// #FIXME, seems there is a different behavior between MSO and OOo. 
++		//	In OOo, the showDetail will show all the level entrys, while only show the first level entry in MSO
++		uno::Reference< sheet::XSheetOutline > xSheetOutline( helper.getSpreadSheet(), uno::UNO_QUERY_THROW );
++		if( bShowDetail )
++			xSheetOutline->showDetail( aOutlineAddress );
++		else
++			xSheetOutline->hideDetail( aOutlineAddress );
++	}
++	else
 +	{
-+		uno::Reference< container::XNameAccess > xNameAccess( xControl->getModel(), uno::UNO_QUERY_THROW );	
-+		sal_Bool bRes =  xNameAccess->hasByName( aName );
-+	OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d ---> %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is(), bRes );
-+		return bRes;
++		throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
 +	}
-+	return sal_False;
 +}
 +
-+namespace userform
++uno::Reference< excel::XRange > SAL_CALL 
++ScVbaRange::MergeArea() throw (script::BasicErrorException, uno::RuntimeException)
 +{
-+namespace sdecl = comphelper::service_decl;
-+sdecl::vba_service_class_<ScVbaUserForm, sdecl::with_args<true> > serviceImpl;
-+extern sdecl::ServiceDecl const serviceDecl(
-+    serviceImpl,
-+    "ScVbaUserForm",
-+    "ooo.vba.excel.UserForm" );
++    uno::Reference< sheet::XSheetCellRange > xMergeShellCellRange(mxRange->getCellRangeByPosition(0,0,0,0), uno::UNO_QUERY_THROW);
++    uno::Reference< sheet::XSheetCellCursor > xMergeSheetCursor(xMergeShellCellRange->getSpreadsheet()->createCursorByRange( xMergeShellCellRange ), uno::UNO_QUERY_THROW);
++    if( xMergeSheetCursor.is() )
++    {
++        xMergeSheetCursor->collapseToMergedArea();
++        uno::Reference<sheet::XCellRangeAddressable> xMergeCellAddress(xMergeSheetCursor, uno::UNO_QUERY_THROW);
++        if( xMergeCellAddress.is() )
++        {
++            table::CellRangeAddress aCellAddress = xMergeCellAddress->getRangeAddress();
++            if( aCellAddress.StartColumn ==0 && aCellAddress.EndColumn==0 &&
++                aCellAddress.StartRow==0 && aCellAddress.EndRow==0)
++            {
++                return new ScVbaRange( getParent(),mxContext,mxRange );
++            }
++            else
++            {
++                ScRange refRange( static_cast< SCCOL >( aCellAddress.StartColumn ), static_cast< SCROW >( aCellAddress.StartRow ), static_cast< SCTAB >( aCellAddress.Sheet ), 
++                                  static_cast< SCCOL >( aCellAddress.EndColumn ), static_cast< SCROW >( aCellAddress.EndRow ), static_cast< SCTAB >( aCellAddress.Sheet ) );
++                uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell() , refRange ) );
++                return new ScVbaRange( getParent(),mxContext,xRange );
++            }
++        }
++    }
++    return new ScVbaRange( getParent(),mxContext,mxRange );
 +}
 +
-diff --git sc/source/ui/vba/vbauserform.hxx sc/source/ui/vba/vbauserform.hxx
-new file mode 100644
-index 0000000..2c8a1b7
---- /dev/null
-+++ sc/source/ui/vba/vbauserform.hxx
-@@ -0,0 +1,78 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+#ifndef SC_VBA_USERFORM_HXX
-+#define SC_VBA_USERFORM_HXX
-+
-+#include <cppuhelper/implbase1.hxx>
-+#include <ooo/vba/msforms/XUserForm.hpp>
-+#include <com/sun/star/awt/XDialog.hpp>
-+#include <com/sun/star/frame/XModel.hpp>
-+
-+#include "vbahelperinterface.hxx"
-+#include "vbacontrol.hxx"
-+
-+//typedef InheritedHelperInterfaceImpl1< ov::msforms::XUserForm > ScVbaUserForm_BASE;
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XUserForm > ScVbaUserForm_BASE;
+ 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)
+ {
+@@ -4517,7 +4898,7 @@
+ {
+ 	// #TODO #FIXME needs to check for summary row/col ( whatever they are )
+ 	// not valid for multi Area Addresses
+-	if ( m_Areas->getCount() )
++	if ( m_Areas->getCount() > 1 )
+ 		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 )
+@@ -4735,6 +5116,7 @@
+ 		case excel::XlCellType::xlCellTypeConstants:
+ 		case excel::XlCellType::xlCellTypeFormulas:
+ 		case excel::XlCellType::xlCellTypeVisible:
++		case excel::XlCellType::xlCellTypeLastCell:
+ 		{
+ 			if ( bIsMultiArea )
+ 			{
+@@ -4895,7 +5277,7 @@
+ 		sal_Bool bAddPageBreaks = sal_False;
+ 		PageBreaks >>= bAddPageBreaks;
+ 
+-		uno::Reference< sheet::XSubTotalCalculatable> xSub;
++		uno::Reference< sheet::XSubTotalCalculatable> xSub(mxRange, uno::UNO_QUERY_THROW );
+ 		uno::Reference< sheet::XSubTotalDescriptor > xSubDesc = xSub->createSubTotalDescriptor(sal_True);
+ 		uno::Reference< beans::XPropertySet > xSubDescPropertySet( xSubDesc, uno::UNO_QUERY_THROW );
+ 		xSubDescPropertySet->setPropertyValue(INSERTPAGEBREAKS, uno::makeAny( bAddPageBreaks));
+@@ -4956,27 +5338,6 @@
+ 	}
+ }
+ 
+-uno::Reference< excel::XRange > 
+-ScVbaRange::intersect( const css::uno::Reference< oo::excel::XRange >& xRange ) throw (script::BasicErrorException, uno::RuntimeException)
+-{
+-	uno::Reference< excel::XRange > xResult;
+-	try
+-	{
+-		uno::Reference< sheet::XCellRangesQuery > xQuery( mxRange, uno::UNO_QUERY_THROW );
+-		RangeHelper aRange( xRange->getCellRange() );
+-		table::CellRangeAddress aAddress = aRange.getCellRangeAddressable()->getRangeAddress();
+-		uno::Reference< sheet::XSheetCellRanges > xIntersectRanges = xQuery->queryIntersection( aAddress );
+-		xResult = lcl_makeXRangeFromSheetCellRanges( getParent(), mxContext, xIntersectRanges, getScDocShell() );
+-
+-					
+-	}	
+-	catch( uno::Exception& )
+-	{
+-		DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
+-	}
+-	return xResult;
+-}
+-
+ rtl::OUString& 
+ ScVbaRange::getServiceImplName()
+ {
+@@ -4991,7 +5352,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Range" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Range" ) );
+ 	}
+ 	return aServiceNames;
+ }
+@@ -5003,5 +5364,5 @@
+ extern sdecl::ServiceDecl const serviceDecl(
+     serviceImpl,
+     "SvVbaRange",
+-    "org.openoffice.excel.Range" );
++    "ooo.vba.excel.Range" );
+ }
+Index: sc/source/ui/vba/vbachartobject.hxx
+===================================================================
+--- sc/source/ui/vba/vbachartobject.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbachartobject.hxx	(.../cws/npower11)	(revision 266650)
+@@ -35,11 +35,11 @@
+ #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+ #include <com/sun/star/container/XNamed.hpp>
+ #include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
+-#include <org/openoffice/excel/XChartObject.hpp>
++#include <ooo/vba/excel/XChartObject.hpp>
+ #include "vbahelperinterface.hxx"
+ #include <memory>
+ 
+-typedef InheritedHelperInterfaceImpl1<oo::excel::XChartObject > ChartObjectImpl_BASE;
++typedef InheritedHelperInterfaceImpl1<ov::excel::XChartObject > ChartObjectImpl_BASE;
+ 
+ class ScVbaChartObject : public ChartObjectImpl_BASE
+ {		
+@@ -52,15 +52,15 @@
+ 	css::uno::Reference< css::drawing::XShape > xShape;
+ 	css::uno::Reference< css::container::XNamed > xNamed;
+ 	rtl::OUString sPersistName;
+-	std::auto_ptr<oo::ShapeHelper> oShapeHelper;
++	std::auto_ptr<ov::ShapeHelper> oShapeHelper;
+ 	css::uno::Reference< css::container::XNamed > xNamedShape;
+ 	rtl::OUString getPersistName();
+ 	css::uno::Reference< css::drawing::XShape > setShape() throw ( css::script::BasicErrorException );
+ public:
+-	ScVbaChartObject( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier );
++	ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier );
+ 	virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL setName( const ::rtl::OUString& sName ) throw (css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XChart > SAL_CALL getChart() throw (css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getChart() throw (css::uno::RuntimeException);
+ 	virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException );	
+ 	virtual void Activate() throw ( css::script::BasicErrorException );	
+ 	// XHelperInterface
+Index: sc/source/ui/vba/vbatextbox.cxx
+===================================================================
+--- sc/source/ui/vba/vbatextbox.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbatextbox.cxx	(.../cws/npower11)	(revision 266650)
+@@ -33,15 +33,28 @@
+ #include <vector>
+ 
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ 
+ 
+ 
+-ScVbaTextBox::ScVbaTextBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : TextBoxImpl_BASE( xContext, xControlShape )
++ScVbaTextBox::ScVbaTextBox( const uno::Reference< ov::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 )
+ {
+ }
+ 
+ // Attributes
++uno::Any SAL_CALL 
++ScVbaTextBox::getValue() throw (css::uno::RuntimeException)
++{
++	return uno::makeAny( getText() );
++}
 +
-+class ScVbaUserForm : public ScVbaUserForm_BASE
++void SAL_CALL 
++ScVbaTextBox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
 +{
-+private:
-+    css::uno::Reference< css::awt::XDialog > m_xDialog;
-+    ScDocShell* m_pDocShell;
-+    bool mbDispose;
-+protected:
-+public:
-+    ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
-+    virtual ~ScVbaUserForm();
-+    // XUserForm
-+    virtual void SAL_CALL RePaint(  ) throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL Show(  ) throw (css::uno::RuntimeException);
-+    // XIntrospection
-+    virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection(  ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
-+    virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
-+    virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
-+    virtual ::rtl::OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException);
-+    virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException);
-+    virtual void SAL_CALL Hide(  ) throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL UnloadObject(  ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& index ) throw (css::uno::RuntimeException);
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif
-diff --git sc/source/ui/vba/vbavalidation.cxx sc/source/ui/vba/vbavalidation.cxx
-index f40ba17..8b06dd9 100644
---- sc/source/ui/vba/vbavalidation.cxx
-+++ sc/source/ui/vba/vbavalidation.cxx
-@@ -32,13 +32,13 @@
- #include <com/sun/star/sheet/ValidationType.hpp>
- #include <com/sun/star/sheet/ValidationAlertStyle.hpp>
++	rtl::OUString sVal = getAnyAsString( _value );
++	setText( sVal );
++}
++
+ //getString() will cause some imfo lose.
+ rtl::OUString SAL_CALL 
+ ScVbaTextBox::getText() throw (css::uno::RuntimeException)
+@@ -57,9 +70,14 @@
+ void SAL_CALL 
+ ScVbaTextBox::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
+ {
++    if ( !mbDialog )
++    {
+     uno::Reference< text::XTextRange > xTextRange( m_xProps, uno::UNO_QUERY_THROW );
+     xTextRange->setString( _text );
+ }
++    else
++        m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ), uno::makeAny( _text ) ); 
++}
+ 
+ sal_Int32 SAL_CALL 
+ ScVbaTextBox::getMaxLength() throw (css::uno::RuntimeException)
+@@ -98,3 +116,22 @@
+     m_xProps->setPropertyValue
+             (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), aValue);
+ }
++
++rtl::OUString& 
++ScVbaTextBox::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaTextBox::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.TextBox" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbaworkbook.cxx
+===================================================================
+--- sc/source/ui/vba/vbaworkbook.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaworkbook.cxx	(.../cws/npower11)	(revision 266650)
+@@ -38,7 +38,7 @@
+ #include <com/sun/star/frame/XStorable.hpp>
+ #include <com/sun/star/frame/XFrame.hpp>
  #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/excel/XlDVType.hpp>
--#include <org/openoffice/excel/XlFormatConditionOperator.hpp>
--#include <org/openoffice/excel/XlDVAlertStyle.hpp>
-+#include <ooo/vba/excel/XlDVType.hpp>
-+#include <ooo/vba/excel/XlFormatConditionOperator.hpp>
-+#include <ooo/vba/excel/XlDVAlertStyle.hpp>
+-#include <org/openoffice/excel/XlFileFormat.hpp>
++#include <ooo/vba/excel/XlFileFormat.hpp>
  
- #include "unonames.hxx"
+ #include "scextopt.hxx"
+ #include "vbaworksheet.hxx"
+@@ -56,7 +56,7 @@
+ // Much of the impl. for the equivalend UNO module is
+ // sc/source/ui/unoobj/docuno.cxx, viewuno.cxx
  
 -using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
  using namespace ::com::sun::star;
  
- const static rtl::OUString VALIDATION( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_VALIDAT ) );
-@@ -330,7 +330,7 @@ ScVbaValidation::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Validation" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Validation" ) );
+ class ActiveSheet : public ScVbaWorksheet
+@@ -80,7 +80,7 @@
+ 		return xSheet;
  	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbavalidation.hxx sc/source/ui/vba/vbavalidation.hxx
-index 8655a2e..fff6b8a 100644
---- sc/source/ui/vba/vbavalidation.hxx
-+++ sc/source/ui/vba/vbavalidation.hxx
-@@ -31,18 +31,18 @@
- #define SC_VBA_VALIDATION_HXX
- #include <cppuhelper/implbase1.hxx>
- #include <com/sun/star/uno/XComponentContext.hpp>
--#include <org/openoffice/excel/XValidation.hpp>
-+#include <ooo/vba/excel/XValidation.hpp>
- #include <com/sun/star/table/XCellRange.hpp>
- #include "vbahelperinterface.hxx"
- 
--typedef InheritedHelperInterfaceImpl1<oo::excel::XValidation > ValidationImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1<ov::excel::XValidation > ValidationImpl_BASE;
- 
- class ScVbaValidation : public ValidationImpl_BASE
- {		
- 	css::uno::Reference< css::table::XCellRange > m_xRange;
- 	
  public:
--	ScVbaValidation( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange( xRange) {}
-+	ScVbaValidation( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange( xRange) {}
-     // Attributes
-     virtual ::sal_Bool SAL_CALL getIgnoreBlank() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setIgnoreBlank( ::sal_Bool _ignoreblank ) throw (css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbawindow.cxx sc/source/ui/vba/vbawindow.cxx
-index 4964b67..ea4fe9a 100644
---- sc/source/ui/vba/vbawindow.cxx
-+++ sc/source/ui/vba/vbawindow.cxx
-@@ -27,6 +27,7 @@
-  * for a copy of the LGPLv3 License.
-  *
-  ************************************************************************/
-+#include "helperdecl.hxx"
- #include "vbawindow.hxx"
- #include "vbaworksheets.hxx"
- #include "vbaworksheet.hxx"
-@@ -36,8 +37,12 @@
- #include <com/sun/star/container/XNamed.hpp>
- #include <com/sun/star/view/DocumentZoomType.hpp>
- #include <com/sun/star/table/CellRangeAddress.hpp>
--#include <org/openoffice/excel/XlWindowState.hpp>
--#include <org/openoffice/excel/Constants.hpp>
-+#include <ooo/vba/excel/XlWindowState.hpp>
-+#include <ooo/vba/excel/XlWindowView.hpp>
-+#include <ooo/vba/excel/Constants.hpp>
-+#include <com/sun/star/awt/XWindow.hpp>
-+#include <com/sun/star/awt/XWindow2.hpp>
-+#include <com/sun/star/awt/PosSize.hpp>
- 
- #include <docsh.hxx>
- #include <tabvwsh.hxx>
-@@ -49,8 +54,8 @@
- #include "unonames.hxx"
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
--using namespace ::org::openoffice::excel::XlWindowState;
-+using namespace ::ooo::vba;
-+using namespace ::ooo::vba::excel::XlWindowState;
+-	ActiveSheet( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : ScVbaWorksheet( xParent, xContext ) {}
++	ActiveSheet( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : ScVbaWorksheet( xParent, xContext ) {}
+ 		
+ };
  
- typedef  std::hash_map< rtl::OUString,
- SCTAB, ::rtl::OUStringHash,
-@@ -92,7 +97,7 @@ public:
- 			throw container::NoSuchElementException();
- 		}
- 		// #FIXME needs ThisWorkbook as parent
--		return uno::makeAny( uno::Reference< excel::XWorksheet > ( new ScVbaWorksheet( uno::Reference< vba::XHelperInterface >(), m_xContext, *(m_it++), m_xModel ) ) );
-+		return uno::makeAny( uno::Reference< excel::XWorksheet > ( new ScVbaWorksheet( uno::Reference< XHelperInterface >(), m_xContext, *(m_it++), m_xModel ) ) );
- 	}
+@@ -192,7 +192,7 @@
+ 	if ( !ColorData.getLength() )
+ 		ResetColors();
+ }
+-ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext) :ScVbaWorkbook_BASE( xParent, xContext ), mxModel(NULL)
++ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext) :ScVbaWorkbook_BASE( xParent, xContext ), mxModel(NULL)
+ {
+ 	//#FIXME this persists the color data per office instance and
+ 	// not per workbook instance, need to hook the data into XModel
+@@ -203,13 +203,13 @@
+ 	init();
+ }
  
+-ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ) : ScVbaWorkbook_BASE( xParent, xContext ),  mxModel( xModel ) 
++ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ) : ScVbaWorkbook_BASE( xParent, xContext ),  mxModel( xModel ) 
+ { 
+ 	init();
+ }
  
-@@ -197,9 +202,21 @@ public:
+ ScVbaWorkbook::ScVbaWorkbook( uno::Sequence< uno::Any> const & args,
+-    uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaWorkbook_BASE( getXSomethingFromArgs< vba::XHelperInterface >( args, 0 ), xContext ),  mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) ) 
++    uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaWorkbook_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ),  mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) ) 
  
- };
+ {
+ 	init();
+@@ -270,7 +270,7 @@
+ 	uno::Reference< frame::XModel > xModel( getModel() );	
+ 	uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( xModel, uno::UNO_QUERY_THROW );
+ 	uno::Reference<container::XIndexAccess > xSheets( xSpreadDoc->getSheets(), uno::UNO_QUERY_THROW );
+-	uno::Reference< vba::XCollection > xWorkSheets(  new ScVbaWorksheets( this, mxContext, xSheets, xModel ) );
++	uno::Reference< XCollection > xWorkSheets(  new ScVbaWorksheets( this, mxContext, xSheets, xModel ) );
+ 	if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
+ 	{
+ 		return uno::Any( xWorkSheets );	
+@@ -281,7 +281,7 @@
+ uno::Any SAL_CALL
+ ScVbaWorkbook::Windows( const uno::Any& aIndex ) throw (uno::RuntimeException)
+ {
+-	uno::Reference< vba::XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
++	uno::Reference< XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
+ 	if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
+ 		return uno::Any( xWindows );
+ 	return uno::Any( xWindows->Item( aIndex, uno::Any() ) );
+@@ -420,7 +420,7 @@
+ 	// quick look and Styles object doesn't seem to have a valid parent
+ 	// or a least the object browser just shows an object that has no 
+ 	// variables ( therefore... leave as NULL for now ) 
+-	uno::Reference< vba::XCollection > dStyles = new ScVbaStyles( uno::Reference< vba::XHelperInterface >(), mxContext, getModel() );
++	uno::Reference< XCollection > dStyles = new ScVbaStyles( uno::Reference< XHelperInterface >(), mxContext, getModel() );
+ 	if ( Item.hasValue() )
+ 		return dStyles->Item( Item, uno::Any() );
+ 	return uno::makeAny( dStyles );
+@@ -428,14 +428,18 @@
  
--ScVbaWindow::ScVbaWindow( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext ), m_xModel( xModel ) 
-+ScVbaWindow::ScVbaWindow( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext ), m_xModel( xModel ) 
+ // Amelia Wang
+ uno::Any SAL_CALL
+-ScVbaWorkbook::Names( ) throw (uno::RuntimeException)
++ScVbaWorkbook::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeException)
  {
--	uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
-+    init();
-+}
-+
-+ScVbaWindow::ScVbaWindow( uno::Sequence< uno::Any > const & args, uno::Reference< uno::XComponentContext > const & xContext )  
-+        : WindowImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ),
-+          m_xModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
-+{
-+    init();
+ 	uno::Reference< frame::XModel > xModel( getModel() );
+ 	uno::Reference< beans::XPropertySet > xProps( xModel, uno::UNO_QUERY_THROW );
+ 	uno::Reference< sheet::XNamedRanges > xNamedRanges(  xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
+-	uno::Reference< vba::XCollection > xNames( new ScVbaNames( this , mxContext , xNamedRanges , xModel ));
++	uno::Reference< XCollection > xNames( new ScVbaNames( this , mxContext , xNamedRanges , xModel ));
++    if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
++    {
+ 	return uno::Any( xNames );
+ }
++    return uno::Any( xNames->Item( aIndex, uno::Any() ) );
 +}
-+void
-+ScVbaWindow::init()
-+{
-+	uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- 	m_xViewPane.set( xController, uno::UNO_QUERY_THROW );
- 	m_xViewFreezable.set( xController, uno::UNO_QUERY_THROW );
- 	m_xViewSplitable.set( xController, uno::UNO_QUERY_THROW );
-@@ -232,10 +249,10 @@ ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) throw (uno::RuntimeExcepti
- {
- 	uno::Reference< container::XEnumerationAccess > xEnumAccess( new SelectedSheetsEnumAccess( mxContext, m_xModel  ) );
- 	// #FIXME needs a workbook as a parent
--	uno::Reference< excel::XWorksheets > xSheets(  new ScVbaWorksheets( uno::Reference< vba::XHelperInterface >(), mxContext, xEnumAccess, m_xModel ) );
-+	uno::Reference< excel::XWorksheets > xSheets(  new ScVbaWorksheets( uno::Reference< XHelperInterface >(), mxContext, xEnumAccess, m_xModel ) );
- 	if ( aIndex.hasValue() )
+ 
+ rtl::OUString& 
+ ScVbaWorkbook::getServiceImplName()
+@@ -451,7 +455,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
  	{
--		uno::Reference< vba::XCollection > xColl( xSheets, uno::UNO_QUERY_THROW );
-+		uno::Reference< XCollection > xColl( xSheets, uno::UNO_QUERY_THROW );
- 		return xColl->Item( aIndex, uno::Any() );	
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbook" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Workbook" ) );
  	}
- 	return uno::makeAny( xSheets ); 	
-@@ -289,8 +306,8 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException)
- 		if ( ( nCrudLen + nCrudIndex ) == sTitle.getLength() )
- 		{
- 			sTitle = sTitle.copy( 0, nCrudIndex );
--            uno::Reference< oo::vba::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
--			ScVbaWorkbook workbook( uno::Reference< vba::XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
-+            uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
-+			ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
- 			rtl::OUString sName = workbook.getName();
- 			// rather bizare hack to make sure the name behavior
- 			// is like XL
-@@ -427,8 +444,8 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE
- void
- ScVbaWindow::Activate() throw (css::uno::RuntimeException)
- {
--    uno::Reference< oo::vba::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
--	ScVbaWorkbook workbook( uno::Reference< vba::XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
-+    uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
-+	ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
- 
- 	workbook.Activate();
+ 	return aServiceNames;
  }
-@@ -436,13 +453,13 @@ ScVbaWindow::Activate() throw (css::uno::RuntimeException)
- void
- ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const uno::Any& RouteWorkBook ) throw (uno::RuntimeException)
- {
--    uno::Reference< oo::vba::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
--	ScVbaWorkbook workbook( uno::Reference< vba::XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
-+    uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
-+	ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
- 	workbook.Close(SaveChanges, FileName, RouteWorkBook );
+@@ -494,5 +498,5 @@
+ extern sdecl::ServiceDecl const serviceDecl(
+     serviceImpl,
+     "ScVbaWorkbook",
+-    "org.openoffice.excel.Workbook" );
++    "ooo.vba.excel.Workbook" );
  }
+Index: sc/source/ui/vba/vbaformatcondition.cxx
+===================================================================
+--- sc/source/ui/vba/vbaformatcondition.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaformatcondition.cxx	(.../cws/npower11)	(revision 266650)
+@@ -29,9 +29,9 @@
+  ************************************************************************/
+ #include "vbaformatcondition.hxx"
+ #include "vbaformatconditions.hxx"
+-#include <org/openoffice/excel/XlFormatConditionType.hpp>
++#include <ooo/vba/excel/XlFormatConditionType.hpp>
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
  
--uno::Reference< excel::XPane > 
--ScVbaWindow::ActivePane() 
-+uno::Reference< excel::XPane > SAL_CALL
-+ScVbaWindow::ActivePane() throw (script::BasicErrorException, uno::RuntimeException) 
- { 
- 	return new ScVbaPane( mxContext, m_xViewPane ); 
+ ScVbaFormatConditions* 
+@@ -42,7 +42,7 @@
+ 		DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString() );
+ 	return pFormatConditions;
  }
-@@ -629,7 +646,8 @@ ScVbaWindow::setSplitColumn( sal_Int32 _splitcolumn ) throw (uno::RuntimeExcepti
- 	if( getSplitColumn() != _splitcolumn )
+-ScVbaFormatCondition::ScVbaFormatCondition(  const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, const uno::Reference< excel::XStyle >& _xStyle, const uno::Reference< excel::XFormatConditions >& _xFormatConditions, const uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException ) : ScVbaFormatCondition_BASE( xParent, xContext, uno::Reference< sheet::XSheetCondition >( _xSheetConditionalEntry, css::uno::UNO_QUERY_THROW ) ), moFormatConditions( _xFormatConditions ), mxStyle( _xStyle ), mxParentRangePropertySet( _xPropertySet )
++ScVbaFormatCondition::ScVbaFormatCondition(  const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, const uno::Reference< excel::XStyle >& _xStyle, const uno::Reference< excel::XFormatConditions >& _xFormatConditions, const uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException ) : ScVbaFormatCondition_BASE( xParent, xContext, uno::Reference< sheet::XSheetCondition >( _xSheetConditionalEntry, css::uno::UNO_QUERY_THROW ) ), moFormatConditions( _xFormatConditions ), mxStyle( _xStyle ), mxParentRangePropertySet( _xPropertySet )
+ {
+         mxSheetConditionalEntries = lcl_getScVbaFormatConditionsPtr( moFormatConditions )->getSheetConditionalEntries();
+ 
+@@ -173,7 +173,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
  	{
- 		sal_Bool bFrozen = getFreezePanes();
--		m_xViewFreezable->freezeAtPosition( _splitcolumn, 0 );
-+		sal_Int32 nRow = getSplitRow();
-+		m_xViewFreezable->freezeAtPosition( _splitcolumn, nRow );
- 		SplitAtDefinedPosition( !bFrozen );
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.FormatCondition" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.FormatCondition" ) );
  	}
+ 	return aServiceNames;
  }
-@@ -646,13 +664,14 @@ void SAL_CALL
- ScVbaWindow::setSplitHorizontal( double _splithorizontal ) throw (uno::RuntimeException)
+Index: sc/source/ui/vba/vbainterior.hxx
+===================================================================
+--- sc/source/ui/vba/vbainterior.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbainterior.hxx	(.../cws/npower11)	(revision 266650)
+@@ -30,7 +30,7 @@
+ #ifndef SC_VBA_INTERIOR_HXX
+ #define SC_VBA_INTERIOR_HXX
+ 
+-#include <org/openoffice/excel/XInterior.hpp>
++#include <ooo/vba/excel/XInterior.hpp>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ #include <com/sun/star/container/XIndexAccess.hpp>
+@@ -40,16 +40,31 @@
+ 
+ class ScDocument;
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XInterior > ScVbaInterior_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XInterior > ScVbaInterior_BASE;
+ 
+ class ScVbaInterior :  public ScVbaInterior_BASE
  {
- 	double fHoriPixels = PointsToPixels( m_xDevice, _splithorizontal, sal_True );
--   m_xViewSplitable->splitAtPosition( (int) fHoriPixels, 0 );	
-+   m_xViewSplitable->splitAtPosition( static_cast<sal_Int32>( fHoriPixels ), 0 );	
- }
+ 	css::uno::Reference< css::beans::XPropertySet > m_xProps;
+ 	ScDocument* m_pScDoc;
++    Color m_aPattColor;
++    sal_Int32 m_nPattern; 
  
- sal_Int32 SAL_CALL 
- ScVbaWindow::getSplitRow() throw (uno::RuntimeException)
+         css::uno::Reference< css::container::XIndexAccess > getPalette(); 
++    css::uno::Reference< css::container::XNameContainer > GetAttributeContainer();
++    css::uno::Any SetAttributeData( sal_Int32 nValue );
++    sal_Int32 GetAttributeData( css::uno::Any aValue );
++    Color GetBackColor();
++protected:
++    Color GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern );
++    Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans );
++    sal_uInt8 GetMixedColorComp( sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans );
++    css::uno::Any GetIndexColor( const sal_Int32& nColorIndex );
++    sal_Int32 GetColorIndex( const sal_Int32 nColor );
++    css::uno::Any GetUserDefinedAttributes( const rtl::OUString& sName );
++    void SetUserDefinedAttributes( const rtl::OUString& sName, const css::uno::Any& aValue );
++    void SetMixedColor();
+ public:
+-        ScVbaInterior( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext,
++        ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext,
+                  const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = NULL) throw ( css::lang::IllegalArgumentException);
+ 
+         virtual ~ScVbaInterior(){}
+@@ -59,6 +74,12 @@
+ 
+ 	virtual css::uno::Any SAL_CALL getColorIndex() throw ( css::uno::RuntimeException);
+ 	virtual void SAL_CALL setColorIndex( const css::uno::Any& _colorindex ) throw ( css::uno::RuntimeException );
++    virtual css::uno::Any SAL_CALL getPattern() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setPattern( const css::uno::Any& _pattern ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL getPatternColor() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setPatternColor( const css::uno::Any& _patterncolor ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL getPatternColorIndex() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setPatternColorIndex( const css::uno::Any& _patterncolorindex ) throw (css::uno::RuntimeException); 
+ 	//XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+Index: sc/source/ui/vba/vbashape.cxx
+===================================================================
+--- sc/source/ui/vba/vbashape.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbashape.cxx	(.../cws/npower11)	(revision 266650)
+@@ -27,8 +27,8 @@
+  * for a copy of the LGPLv3 License.
+  *
+  ************************************************************************/
+-#include<org/openoffice/office/MsoZOrderCmd.hpp>
+-#include<org/openoffice/office/MsoScaleFrom.hpp>
++#include<ooo/vba/office/MsoZOrderCmd.hpp>
++#include<ooo/vba/office/MsoScaleFrom.hpp>
+ #include<com/sun/star/container/XNamed.hpp>
+ #include<com/sun/star/drawing/ConnectorType.hpp>
+ #include <com/sun/star/lang/XEventListener.hpp>
+@@ -46,17 +46,17 @@
+ #include "vbafillformat.hxx"
+ #include "vbapictureformat.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ using namespace ::vos;
+ 
+-ScVbaShape::ScVbaShape( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape, const uno::Reference< drawing::XShapes > xShapes, sal_Int32 nType ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( xParent, xContext ), m_xShape( xShape ), m_xShapes( xShapes ), m_nType( nType )
++ScVbaShape::ScVbaShape( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, sal_Int32 nType ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( xParent, xContext ), m_xShape( xShape ), m_xShapes( xShapes ), m_nType( nType )
  {
--	return m_xViewSplitable->getSplitRow();	
-+	sal_Int32 nValue = m_xViewSplitable->getSplitRow();
-+	return nValue ? nValue - 1 : nValue;	
+     m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
+     addListeners();
  }
  
- void SAL_CALL 
-@@ -661,7 +680,8 @@ ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) throw (uno::RuntimeException)
- 	if( getSplitRow() != _splitrow )
+-ScVbaShape::ScVbaShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( uno::Reference< vba::XHelperInterface >(), xContext ), m_xShape( xShape )
++ScVbaShape::ScVbaShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( uno::Reference< XHelperInterface >(), xContext ), m_xShape( xShape )
+ {
+     // add listener
+     addListeners();
+@@ -474,7 +474,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
  	{
- 		sal_Bool bFrozen = getFreezePanes();
--		m_xViewFreezable->freezeAtPosition( 0, _splitrow );
-+		sal_Int32 nColumn = getSplitColumn();
-+		m_xViewFreezable->freezeAtPosition( nColumn , _splitrow );
- 		SplitAtDefinedPosition( !bFrozen );
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.Shape" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Shape" ) );
  	}
+ 	return aServiceNames;
  }
-@@ -736,6 +756,184 @@ ScVbaWindow::setZoom( const uno::Any& _zoom ) throw (uno::RuntimeException)
- 	}			
- }
- 
-+uno::Reference< excel::XWorksheet > SAL_CALL 
-+ScVbaWindow::ActiveSheet(  ) throw (script::BasicErrorException, uno::RuntimeException)
+Index: sc/source/ui/vba/vbauserform.cxx
+===================================================================
+--- sc/source/ui/vba/vbauserform.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbauserform.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,228 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "helperdecl.hxx"
++#include "vbauserform.hxx"
++#include <com/sun/star/awt/XControl.hpp>
++#include <com/sun/star/awt/XControlContainer.hpp>
++#include <com/sun/star/beans/PropertyConcept.hpp>
++#include <basic/sbx.hxx>
++#include <basic/sbstar.hxx>
++#include <basic/sbmeth.hxx>
++#include "unonames.hxx"
++#include "vbacontrols.hxx"
++
++using namespace ::ooo::vba;
++using namespace ::com::sun::star;
++
++// some little notes
++// XDialog implementation has the following interesting bits
++// a Controls property ( which is an array of the container controls )
++//   each item in the controls array is a XControl, where the model is 
++//   basically a property bag
++// additionally the XDialog instance has itself a model
++//     this model has a ControlModels ( array of models ) property
++//     the models in ControlModels can be accessed by name
++// also the XDialog is a XControl ( to access the model above
++
++ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) :  ScVbaUserForm_BASE( getXSomethingFromArgs< XHelperInterface >( aArgs, 0 ), xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), getXSomethingFromArgs< frame::XModel >( aArgs, 2 ), static_cast< ooo::vba::AbstractGeometryAttributes* >(0) ), m_pDocShell( 0 ), mbDispose( true )
 +{
-+	return ScVbaGlobals::getGlobalsImpl(mxContext)->getApplication()->getActiveSheet();
++    m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
++    uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
++    m_pDocShell = getDocShell( m_xModel );
++    m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
++    setGeometryHelper( new UserFormGeometryHelper( xContext, xControl ) );
 +}
 +
-+uno::Any SAL_CALL
-+ScVbaWindow::getView() throw (uno::RuntimeException)
++ScVbaUserForm::~ScVbaUserForm()
 +{
-+	// not supported now	
-+	sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;	
-+	return uno::makeAny( nWindowView );	
 +}
 +
-+void SAL_CALL
-+ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaUserForm::Show(  ) throw (uno::RuntimeException)
++{
++	OSL_TRACE("ScVbaUserForm::Show(  )");
++	short aRet = 0;
++	if ( m_xDialog.is() )
++		aRet = m_xDialog->execute();
++	OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet);
++	if ( mbDispose )
++	{
++		try
++		{
++			uno::Reference< lang::XComponent > xComp( m_xDialog, uno::UNO_QUERY_THROW );
++			m_xDialog = NULL;
++			xComp->dispose();
++			mbDispose = false; 
++		}
++		catch( uno::Exception& )
++		{
++		}
++	}
++}
++
++rtl::OUString SAL_CALL 
++ScVbaUserForm::getCaption() throw (::com::sun::star::uno::RuntimeException)
++{
++    rtl::OUString sCaption;
++    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ) ) >>= sCaption;
++    return sCaption;
++}
++void
++ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), uno::makeAny( _caption ) );
++}
++
++void SAL_CALL 
++ScVbaUserForm::Hide(  ) throw (uno::RuntimeException)
++{
++	mbDispose = false;  // hide not dispose
++	if ( m_xDialog.is() )
++		m_xDialog->endExecute();
++}
++
++void SAL_CALL 
++ScVbaUserForm::RePaint(  ) throw (uno::RuntimeException)
++{
++	// do nothing
++}
++
++void SAL_CALL 
++ScVbaUserForm::UnloadObject(  ) throw (uno::RuntimeException)
 +{
-+	sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;
-+	_view >>= nWindowView;
-+	USHORT nSlot = FID_NORMALVIEWMODE;
-+	switch ( nWindowView )
-+	{
-+		case excel::XlWindowView::xlNormalView:
-+			nSlot = FID_NORMALVIEWMODE;
-+			break;
-+		case excel::XlWindowView::xlPageBreakPreview:
-+			nSlot = FID_PAGEBREAKMODE;
-+			break;
-+		default:
-+			DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+	}
-+	dispatchExecute( m_xModel, nSlot );
++	mbDispose = true;
++	if ( m_xDialog.is() )
++		m_xDialog->endExecute();
 +}
 +
-+sal_Bool SAL_CALL
-+ScVbaWindow::getVisible() throw (uno::RuntimeException)
++rtl::OUString& 
++ScVbaUserForm::getServiceImplName()
 +{
-+	sal_Bool bVisible = sal_True;	
-+	uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
-+	uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
-+	uno::Reference< css::awt::XWindow2 > xWindow2 (xWindow, uno::UNO_QUERY_THROW );
-+	if( xWindow2.is() )
-+	{
-+		bVisible = xWindow2->isVisible();	
-+	}
-+	return bVisible;
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
++	return sImplName;
 +}
 +
-+void SAL_CALL
-+ScVbaWindow::setVisible(sal_Bool _visible) throw (uno::RuntimeException)
++uno::Sequence< rtl::OUString > 
++ScVbaUserForm::getServiceNames()
 +{
-+	uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
-+	uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
-+	if( xWindow.is() )
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
 +	{
-+		xWindow->setVisible( _visible );	
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.UserForm" ) );
 +	}
++	return aServiceNames;
 +}
 +
-+css::awt::Rectangle getPosSize( const uno::Reference< frame::XModel >& xModel )
++uno::Reference< beans::XIntrospectionAccess > SAL_CALL 
++ScVbaUserForm::getIntrospection(  ) throw (uno::RuntimeException)
 +{
-+	css::awt::Rectangle aRect;
-+	uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
-+	uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
-+	if( xWindow.is() )
-+	{
-+		aRect = xWindow->getPosSize();
-+	}
-+	return aRect;
++	return uno::Reference< beans::XIntrospectionAccess >();
 +}
 +
-+void setPosSize( const uno::Reference< frame::XModel >& xModel, sal_Int32 nValue, USHORT nFlag )
++uno::Any SAL_CALL 
++ScVbaUserForm::invoke( const ::rtl::OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
 +{
-+	uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
-+	uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
-+	if( xWindow.is() )
-+	{
-+		css::awt::Rectangle aRect = xWindow->getPosSize();
-+		switch( nFlag )
-+		{
-+			case css::awt::PosSize::X:
-+				xWindow->setPosSize( nValue, aRect.Y,	0, 0, css::awt::PosSize::X );
-+				break;
-+			case css::awt::PosSize::Y:
-+				xWindow->setPosSize( aRect.X, nValue,	0, 0, css::awt::PosSize::Y );
-+				break;
-+			case css::awt::PosSize::WIDTH:
-+				xWindow->setPosSize( 0, 0,	nValue, aRect.Height, css::awt::PosSize::WIDTH );
-+				break;
-+			case css::awt::PosSize::HEIGHT:
-+				xWindow->setPosSize( 0, 0,	aRect.Width, nValue, css::awt::PosSize::HEIGHT );
-+				break;
-+			default:
-+				break;
-+		}
-+	}
-+}	
++	throw uno::RuntimeException(); // unsupported operation
++}
 +
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::getHeight() throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
 +{
-+	css::awt::Rectangle aRect = getPosSize(m_xModel);
-+	return aRect.Height;
++	uno::Any aObject = getValue( aPropertyName );
++	// The Object *must* support XDefaultProperty here because getValue will
++	// only return properties that are Objects ( e.g. controls )
++	// e.g. Userform1.aControl = something
++	// 'aControl' has to support XDefaultProperty to make sense here
++	uno::Reference< script::XDefaultProperty > xDfltProp( aObject, uno::UNO_QUERY_THROW );
++	rtl::OUString aDfltPropName = xDfltProp->getDefaultPropertyName();
++	uno::Reference< beans::XIntrospectionAccess > xUnoAccess( getIntrospectionAccess( aObject ) );
++	uno::Reference< beans::XPropertySet > xPropSet( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY_THROW );
++	xPropSet->setPropertyValue( aDfltPropName, aValue );
 +}
 +
-+void SAL_CALL 
-+ScVbaWindow::setHeight( sal_Int32 _height ) throw (uno::RuntimeException)
++uno::Any SAL_CALL 
++ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
 +{
-+	setPosSize(m_xModel, _height, css::awt::PosSize::HEIGHT);
++	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, m_xModel );
++        uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) );
++        ScVbaControl* pControl  = dynamic_cast< ScVbaControl* >( xVBAControl.get() );
++        pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) );
++	return uno::makeAny( xVBAControl );
 +}
 +
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::getLeft() throw (uno::RuntimeException)
++::sal_Bool SAL_CALL 
++ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
 +{
-+	css::awt::Rectangle aRect = getPosSize(m_xModel);
-+	return aRect.X;
++	return sal_False;
++}
++uno::Any SAL_CALL 
++ScVbaUserForm::Controls( const uno::Any& index ) throw (uno::RuntimeException)
++{
++	uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
++	uno::Reference< XCollection > xControls( new ScVbaControls( this, mxContext, xDialogControl ) );
++	if ( index.hasValue() )
++		return uno::makeAny( xControls->Item( index, uno::Any() ) );
++	return uno::makeAny( xControls );
 +}
 +
-+void SAL_CALL 
-+ScVbaWindow::setLeft( sal_Int32 _left ) throw (uno::RuntimeException)
++::sal_Bool SAL_CALL 
++ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
 +{
-+	setPosSize(m_xModel, _left, css::awt::PosSize::X);
++	uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY );
++	OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is() );
++	if ( xControl.is() )
++	{
++		uno::Reference< container::XNameAccess > xNameAccess( xControl->getModel(), uno::UNO_QUERY_THROW );	
++		sal_Bool bRes =  xNameAccess->hasByName( aName );
++	OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d ---> %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is(), bRes );
++		return bRes;
++	}
++	return sal_False;
 +}
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::getTop() throw (uno::RuntimeException)
++
++namespace userform
 +{
-+	css::awt::Rectangle aRect = getPosSize(m_xModel);
-+	return aRect.Y;
++namespace sdecl = comphelper::service_decl;
++sdecl::vba_service_class_<ScVbaUserForm, sdecl::with_args<true> > serviceImpl;
++extern sdecl::ServiceDecl const serviceDecl(
++    serviceImpl,
++    "ScVbaUserForm",
++    "ooo.vba.excel.UserForm" );
 +}
 +
-+void SAL_CALL 
-+ScVbaWindow::setTop( sal_Int32 _top ) throw (uno::RuntimeException)
-+{
-+	setPosSize(m_xModel, _top, css::awt::PosSize::Y);
-+}
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::getWidth() throw (uno::RuntimeException)
+Index: sc/source/ui/vba/vbanames.cxx
+===================================================================
+--- sc/source/ui/vba/vbanames.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbanames.cxx	(.../cws/npower11)	(revision 266650)
+@@ -42,16 +42,16 @@
+ #include "tabvwsh.hxx"
+ #include "viewdata.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ class NamesEnumeration : public EnumerationHelperImpl
+ {
+ 	uno::Reference< frame::XModel > m_xModel;
+-	uno::WeakReference< vba::XHelperInterface > m_xParent;
++	uno::WeakReference< XHelperInterface > m_xParent;
+ 	uno::Reference< sheet::XNamedRanges > m_xNames;
+ public:
+-	NamesEnumeration( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ), m_xNames( xNames ) {}
++	NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ), m_xNames( xNames ) {}
+ 
+ 	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ 	{
+@@ -62,7 +62,7 @@
+ };
+ 
+ 
+-ScVbaNames::ScVbaNames(const css::uno::Reference< oo::vba::XHelperInterface >& xParent, 
++ScVbaNames::ScVbaNames(const css::uno::Reference< ov::XHelperInterface >& xParent, 
+ 			const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ 			const css::uno::Reference< css::sheet::XNamedRanges >& xNames,
+ 			const css::uno::Reference< css::frame::XModel >& xModel ):
+@@ -70,6 +70,7 @@
+ 			mxModel( xModel ),
+ 			mxNames( xNames )
+ {
++    m_xNameAccess.set( xNames, uno::UNO_QUERY_THROW );
+ }
+ 
+ ScVbaNames::~ScVbaNames()
+@@ -169,7 +170,7 @@
+ css::uno::Type 
+ ScVbaNames::getElementType() throw( css::uno::RuntimeException )
+ {
+-	return oo::excel::XName::static_type(0);
++	return ov::excel::XName::static_type(0);
+ }
+ 
+ uno::Reference< container::XEnumeration >
+@@ -205,7 +206,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
+ 	{
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.NamedRanges" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.NamedRanges" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbacommandbarcontrol.cxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbarcontrol.cxx	(.../tags/DEV300_m39)	(revision 0)
++++ sc/source/ui/vba/vbacommandbarcontrol.cxx	(.../cws/npower11)	(revision 266650)
+@@ -0,0 +1,403 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++#include "vbacommandbarcontrol.hxx"
++
++using namespace com::sun::star;
++using namespace ooo::vba;
++
++uno::Any lcl_getPropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName )
 +{
-+	css::awt::Rectangle aRect = getPosSize(m_xModel);
-+	return aRect.Width;
++    sal_Int32 nCount = aPropertyValues.getLength();
++    for( sal_Int32 i = 0; i < nCount; i++ )
++    {
++        if( aPropertyValues[i].Name.equalsIgnoreAsciiCase( sPropertyName ) )
++        {
++            return aPropertyValues[i].Value;
++        }
++    }
++    return uno::Any();
 +}
 +
-+void SAL_CALL 
-+ScVbaWindow::setWidth( sal_Int32 _width ) throw (uno::RuntimeException)
++beans::PropertyValues lcl_repalcePropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName, uno::Any aValue )
 +{
-+	setPosSize(m_xModel, _width, css::awt::PosSize::WIDTH);
++    sal_Int32 nCount = aPropertyValues.getLength();
++    for( sal_Int32 i = 0; i < nCount; i++ )
++    {
++        if( aPropertyValues[i].Name.equalsIgnoreAsciiCase( sPropertyName ) )
++        {
++            aPropertyValues[i].Value = aValue;
++            return aPropertyValues;
++        }
++    }
++    return aPropertyValues;
 +}
 +
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++ScVbaCommandBarControl::ScVbaCommandBarControl( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sName ) throw (uno::RuntimeException) : CommandBarControl_BASE( xParent, xContext ), m_sName( sName )
 +{
-+	sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
-+	double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterX/100000);
-+	return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
++    // exsiting CommandBarBarControl
++    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
++    initObjects();
++    if( m_xBarSettings->hasElements() )
++    {
++        ScVbaCommandBarControl* pParentCommandBarControl = m_pCommandBarControls->GetParentCommandBarControl();
++        if( pParentCommandBarControl )
++        {
++            beans::PropertyValues aPropertyValues;
++            pParentCommandBarControl->GetCurrentSettings()->getByIndex( pParentCommandBarControl->GetPosition() ) >>= aPropertyValues;
++            pParentCommandBarControl->SetPropertyValues( aPropertyValues );
++            m_xCurrentSettings.set( lcl_getPropertyValue( pParentCommandBarControl->GetPropertyValues(), rtl::OUString::createFromAscii( "ItemDescriptorContainer" ) ), uno::UNO_QUERY_THROW );
++        }
++        if( !m_xCurrentSettings.is() )
++        {
++            m_xCurrentSettings.set( m_xUICfgManager->getSettings( m_pCommandBarControls->GetParentToolBarName(), sal_True ), uno::UNO_QUERY_THROW );
++        }
++        for( sal_Int32 i = 0; i < m_xCurrentSettings->getCount(); i++ )
++        {
++            beans::PropertyValues aPropertyValuesTemp;
++            m_xCurrentSettings->getByIndex( i ) >>= aPropertyValuesTemp;
++            // Label always empty in OOo
++            rtl::OUString sLabel;
++            lcl_getPropertyValue( aPropertyValuesTemp, rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
++            if( sLabel.equalsIgnoreAsciiCase( sName ) )
++            {
++                m_nPosition = i;
++                break;
++            }
++            // using CammandURL to find
++            rtl::OUString sCommandURL;
++            lcl_getPropertyValue( aPropertyValuesTemp, rtl::OUString::createFromAscii( "CommandURL" ) ) >>= sCommandURL;
++            sal_Int32 nLastIndex = sCommandURL.lastIndexOf( rtl::OUString::createFromAscii(":") );
++            if( ( nLastIndex != -1 ) && ( ( nLastIndex + 1 ) < sCommandURL.getLength() ) )
++            {
++                sCommandURL = sCommandURL.copy( nLastIndex + 1 );
++            }
++            if( sCommandURL.equalsIgnoreAsciiCase( sName ) )
++            {
++                m_nPosition = i;
++                break;
++            }
++        }
++        if( m_nPosition  == -1 )
++            throw uno::RuntimeException( rtl::OUString::createFromAscii("The CommandBarControl do not exist"), uno::Reference< uno::XInterface >() );
++    }
++    if( m_bIsMenu )
++    {
++        m_sBarName = rtl::OUString::createFromAscii("private:resource/menubar/menubar");
++    }
++    else
++    {
++        m_sBarName = m_pCommandBarControls->GetParentToolBarName();
++    }
++    m_bTemporary = sal_True;
 +}
-+
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++ScVbaCommandBarControl::ScVbaCommandBarControl( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sName, rtl::OUString sCommand, sal_Int32 nPosition, sal_Bool bTemporary ) throw (uno::RuntimeException) :  CommandBarControl_BASE( xParent, xContext ), m_nPosition( nPosition ), m_bTemporary( bTemporary )
 +{
-+	sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
-+	double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterY/100000);
-+	return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
++    m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
++    initObjects();
++    if( sName.getLength() > 0 )
++    {
++        m_sName = sName;
++    }
++    if( sCommand.getLength() > 0 )
++    {
++        m_sCommand = sCommand;
++    }
++    else
++    {
++        m_sCommand = rtl::OUString::createFromAscii("vnd.openoffice.org:") + sName;
++    }
++    if( m_bIsMenu )
++    {
++        m_sBarName = rtl::OUString::createFromAscii("private:resource/menubar/menubar");
++        createNewMenuBarControl();
++    }
++    else
++    {
++        m_sBarName = m_pCommandBarControls->GetParentToolBarName();
++        createNewToolBarControl();
++    }
 +}
 +
-+void SAL_CALL 
-+ScVbaWindow::PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++void
++ScVbaCommandBarControl::initObjects() throw (uno::RuntimeException)
 +{
-+	// need test, print current active sheet	
-+	PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, m_xModel, sal_True );
++    m_pCommandBarControls = dynamic_cast< ScVbaCommandBarControls* >( m_xParentHardRef.get() );
++    if( !m_pCommandBarControls )
++        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Parent needs to be a ScVbaCommandBarControls"), uno::Reference< uno::XInterface >() );
++    m_xUICfgManager.set( m_pCommandBarControls->GetUICfgManager(), uno::UNO_QUERY_THROW );
++    m_xUICfgPers.set( m_pCommandBarControls->GetUICfgPers(), uno::UNO_QUERY_THROW );
++    m_xBarSettings.set( m_pCommandBarControls->GetBarSettings(), uno::UNO_QUERY_THROW );
++    m_bIsMenu = m_pCommandBarControls->IsMenu();
++    m_sName = rtl::OUString::createFromAscii( "Custom" );
++    m_nPosition = -1;
 +}
 +
-+void SAL_CALL 
-+ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++void
++ScVbaCommandBarControl::createNewMenuBarControl()
 +{
-+	// need test, print preview current active sheet	
-+	PrintPreviewHelper( EnableChanges, m_xModel );	
-+}
++    uno::Sequence< beans::PropertyValue > aPropertys(4);
++    aPropertys[0].Name = rtl::OUString::createFromAscii("CommandURL");
++    aPropertys[0].Value <<= m_sCommand; 
++    aPropertys[1].Name = rtl::OUString::createFromAscii("Label");
++    aPropertys[1].Value <<= m_sName; 
++    aPropertys[2].Name = rtl::OUString::createFromAscii("Type");
++    aPropertys[2].Value <<= m_nType; 
++    aPropertys[3].Name = rtl::OUString::createFromAscii("ItemDescriptorContainer");
 +
- rtl::OUString& 
- ScVbaWindow::getServiceImplName()
- {
-@@ -750,7 +948,16 @@ ScVbaWindow::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Window" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Window" ) );
- 	}
- 	return aServiceNames;
- }
-+namespace window
-+{
-+namespace sdecl = comphelper::service_decl;
-+sdecl::vba_service_class_<ScVbaWindow, sdecl::with_args<true> > serviceImpl;
-+extern sdecl::ServiceDecl const serviceDecl(
-+    serviceImpl,
-+    "ScVbaWindow",
-+    "ooo.vba.excel.Window" );
-+}
-diff --git sc/source/ui/vba/vbawindow.hxx sc/source/ui/vba/vbawindow.hxx
-index 821a665..ee4f5c8 100644
---- sc/source/ui/vba/vbawindow.hxx
-+++ sc/source/ui/vba/vbawindow.hxx
-@@ -30,19 +30,19 @@
- #ifndef SC_VBA_WINDOW_HXX
- #define SC_VBA_WINDOW_HXX
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/excel/XWindow.hpp>
-+#include <ooo/vba/excel/XWindow.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/sheet/XViewPane.hpp>
- #include <com/sun/star/sheet/XViewFreezable.hpp>
- #include <com/sun/star/sheet/XViewSplitable.hpp>
- #include <com/sun/star/frame/XModel.hpp>
--#include <org/openoffice/excel/XPane.hpp>
-+#include <ooo/vba/excel/XPane.hpp>
- #include <com/sun/star/awt/XDevice.hpp>
- 
- #include "vbahelperinterface.hxx"
- #include "vbaworkbook.hxx"
- 
--typedef InheritedHelperInterfaceImpl1<oo::excel::XWindow > WindowImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1<ov::excel::XWindow > WindowImpl_BASE;
- 
- class ScVbaWindow : public WindowImpl_BASE
- {		
-@@ -51,16 +51,21 @@ private:
- 	css::uno::Reference< css::sheet::XViewPane > m_xViewPane;
- 	css::uno::Reference< css::sheet::XViewFreezable > m_xViewFreezable;
- 	css::uno::Reference< css::sheet::XViewSplitable > m_xViewSplitable;
--	css::uno::Reference< oo::excel::XPane > m_xPane;
-+	css::uno::Reference< ov::excel::XPane > m_xPane;
- 	css::uno::Reference< css::awt::XDevice > m_xDevice;
-+    void init();
- protected:
- 	void SplitAtDefinedPosition(sal_Bool _bUnFreezePane);
- public:	
- 	void  Scroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft, bool bLargeScroll = false ) throw (css::uno::RuntimeException);	
- public:
--	ScVbaWindow( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
-- 	css::uno::Reference< oo::excel::XPane > ActivePane();
-+	ScVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
-+    ScVbaWindow( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext );
++    m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
++    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
++    rtl::OUString sUIName;
++    xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") ) >>= sUIName;
++
++    uno::Reference< lang::XSingleComponentFactory > xMenuMSF( m_xBarSettings, uno::UNO_QUERY_THROW );
++    if( m_pCommandBarControls->GetParentCommandBar() != NULL )
++    {
++        // create a new menu
++        m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
++        m_xCurrentSettings.set( m_xBarSettings, uno::UNO_QUERY_THROW );
++    }
++    else if( m_pCommandBarControls->GetParentCommandBarControl() != NULL )
++    {
++        // create a new menu entry
++        // change the parent MenuItem to a PopupMenu
++        ScVbaCommandBarControl* pPc = m_pCommandBarControls->GetParentCommandBarControl();
++        beans::PropertyValues aPropertyValues;
++        pPc->GetCurrentSettings()->getByIndex( pPc->GetPosition() ) >>= aPropertyValues;
++        pPc->SetPropertyValues( aPropertyValues );
++        
++        // has the property already been set?
++        if( lcl_getPropertyValue( pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer") ).hasValue() )
++        {
++            lcl_repalcePropertyValue(  pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer"), uno::makeAny( xMenuMSF->createInstanceWithContext( mxContext ) ) );
++            pPc->GetCurrentSettings()->replaceByIndex( pPc->GetPosition(), uno::makeAny( pPc->GetPropertyValues() ) );
++        }
++        m_xCurrentSettings.set( lcl_getPropertyValue( pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer") ), uno::UNO_QUERY_THROW );
++        m_xCurrentSettings->insertByIndex( m_nPosition, uno::makeAny( m_aPropertyValues ) );
++    }
++    if( m_xUICfgManager->hasSettings( m_sBarName ) )
++    {
++        m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++    }
++    else
++    {
++        m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++    }
++    if( !m_bTemporary )
++    {
++        m_xUICfgPers->store();
++    }
++}
 +
- 	// XWindow
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL ActiveCell(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
-+ 	virtual css::uno::Reference< ov::excel::XPane > SAL_CALL ActivePane() throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL ActiveSheet(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
- 	virtual void SAL_CALL setCaption( const css::uno::Any& _caption ) throw (css::uno::RuntimeException);
- 	virtual css::uno::Any SAL_CALL getCaption() throw (css::uno::RuntimeException);
- 	virtual ::sal_Bool SAL_CALL getDisplayGridlines() throw (css::uno::RuntimeException);
-@@ -77,6 +82,10 @@ public:
- 	virtual void SAL_CALL setDisplayWorkbookTabs( ::sal_Bool _bDisplayWorkbookTabs ) throw (css::uno::RuntimeException);
- 	virtual ::sal_Bool SAL_CALL getFreezePanes() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setFreezePanes( ::sal_Bool _bFreezePanes ) throw (css::uno::RuntimeException);
-+    virtual sal_Int32 SAL_CALL getHeight() throw (css::uno::RuntimeException) ;
-+    virtual void SAL_CALL setHeight( sal_Int32 _height ) throw (css::uno::RuntimeException) ;
-+    virtual sal_Int32 SAL_CALL getLeft() throw (css::uno::RuntimeException) ;
-+    virtual void SAL_CALL setLeft( sal_Int32 _left ) throw (css::uno::RuntimeException) ;
- 	virtual ::sal_Bool SAL_CALL getSplit() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setSplit( ::sal_Bool _bSplit ) throw (css::uno::RuntimeException);
-     virtual sal_Int32 SAL_CALL getSplitColumn() throw (css::uno::RuntimeException) ;
-@@ -91,6 +100,14 @@ public:
-     virtual void SAL_CALL setScrollRow( const css::uno::Any& _scrollrow ) throw (css::uno::RuntimeException) ;
-     virtual css::uno::Any SAL_CALL getScrollColumn() throw (css::uno::RuntimeException) ;
-     virtual void SAL_CALL setScrollColumn( const css::uno::Any& _scrollcolumn ) throw (css::uno::RuntimeException) ;
-+    virtual sal_Int32 SAL_CALL getTop() throw (css::uno::RuntimeException) ;
-+    virtual void SAL_CALL setTop( sal_Int32 _top ) throw (css::uno::RuntimeException) ;
-+    virtual css::uno::Any SAL_CALL getView() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setView( const css::uno::Any& _view ) throw (css::uno::RuntimeException);
-+    virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
-+    virtual sal_Int32 SAL_CALL getWidth() throw (css::uno::RuntimeException) ;
-+    virtual void SAL_CALL setWidth( sal_Int32 _width ) throw (css::uno::RuntimeException) ;
-     virtual css::uno::Any SAL_CALL getWindowState() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setWindowState( const css::uno::Any& _windowstate ) throw (css::uno::RuntimeException);
-     virtual css::uno::Any SAL_CALL getZoom() throw (css::uno::RuntimeException);
-@@ -103,8 +120,11 @@ public:
- 	virtual void SAL_CALL ScrollWorkbookTabs( const css::uno::Any& Sheets, const css::uno::Any& Position ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Activate(  ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& FileName, const css::uno::Any& RouteWorkBook ) throw (css::uno::RuntimeException);
--	 virtual css::uno::Reference< oo::excel::XRange > SAL_CALL ActiveCell(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
- 	 virtual css::uno::Any SAL_CALL Selection(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
-+	 virtual sal_Int32 SAL_CALL PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	 virtual sal_Int32 SAL_CALL PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	 virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	 virtual void SAL_CALL PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- 	// XHelperInterface
- 	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-diff --git sc/source/ui/vba/vbawindows.cxx sc/source/ui/vba/vbawindows.cxx
-index d3160fc..517f9fd 100644
---- sc/source/ui/vba/vbawindows.cxx
-+++ sc/source/ui/vba/vbawindows.cxx
-@@ -40,16 +40,16 @@
- //#include "vbaworkbook.hxx"
- 
- using namespace ::com::sun::star;
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- 
- typedef  std::hash_map< rtl::OUString,
- sal_Int32, ::rtl::OUStringHash,
- ::std::equal_to< ::rtl::OUString > > NameIndexHash;
- 
- 
--uno::Reference< vba::XHelperInterface > lcl_createWorkbookHIParent( const uno::Reference< frame::XModel >& xModel, const uno::Reference< uno::XComponentContext >& xContext )
-+uno::Reference< XHelperInterface > lcl_createWorkbookHIParent( const uno::Reference< frame::XModel >& xModel, const uno::Reference< uno::XComponentContext >& xContext )
- {
--	return new ScVbaWorkbook( uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext,  xModel );
-+	return new ScVbaWorkbook( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext,  xModel );
- }
- 
- uno::Any ComponentToWindow( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext )
-@@ -139,7 +139,7 @@ public:
- 			{
- 				m_windows.push_back( xNext );
- 				uno::Reference< frame::XModel > xModel( xNext, uno::UNO_QUERY_THROW ); // that the spreadsheetdocument is a xmodel is a given
--                uno::Reference< vba::XHelperInterface > xTemp;  // temporary needed for g++ 3.3.5
-+                uno::Reference< XHelperInterface > xTemp;  // temporary needed for g++ 3.3.5
- 				ScVbaWindow window( xTemp,  m_xContext, xModel );
- 				rtl::OUString sCaption;
- 				window.getCaption() >>= sCaption;
-@@ -208,7 +208,7 @@ public:
- };
- 
- 
--ScVbaWindows::ScVbaWindows( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  ):  ScVbaWindows_BASE( xParent, xContext, xIndexAccess ) 
-+ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess  ):  ScVbaWindows_BASE( xParent, xContext, xIndexAccess ) 
- {
- }
- 
-@@ -230,11 +230,11 @@ ScVbaWindows::getElementType() throw (uno::RuntimeException)
- 	return excel::XWindows::static_type(0);
- }
- 
--uno::Reference< vba::XCollection >
-+uno::Reference< XCollection >
- ScVbaWindows::Windows( const css::uno::Reference< css::uno::XComponentContext >& xContext )
- {
- 	uno::Reference< container::XIndexAccess > xIndex( new WindowsAccessImpl( xContext ) );
--	return  new ScVbaWindows( uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext , xIndex );	
-+	return  new ScVbaWindows( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext , xIndex );	
- }
- 
- void SAL_CALL 
-@@ -258,7 +258,7 @@ ScVbaWindows::getServiceNames()
- 	if ( sNames.getLength() == 0 )
- 	{
- 		sNames.realloc( 1 );
--		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Windows") );
-+		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Windows") );
- 	}
- 	return sNames;
- }
-diff --git sc/source/ui/vba/vbawindows.hxx sc/source/ui/vba/vbawindows.hxx
-index c44bd3f..67bda22 100644
---- sc/source/ui/vba/vbawindows.hxx
-+++ sc/source/ui/vba/vbawindows.hxx
-@@ -31,7 +31,7 @@
- #define SC_VBA_WINDOWS_HXX
- 
- #include <cppuhelper/implbase1.hxx>
--#include <org/openoffice/excel/XWindows.hpp>
-+#include <ooo/vba/excel/XWindows.hpp>
- 
- #include <com/sun/star/uno/XComponentContext.hpp>
-  
-@@ -39,12 +39,12 @@
- #include "vbacollectionimpl.hxx"
- 
- 
--typedef CollTestImplHelper< oo::excel::XWindows > ScVbaWindows_BASE;
-+typedef CollTestImplHelper< ov::excel::XWindows > ScVbaWindows_BASE;
- 
- class ScVbaWindows : public ScVbaWindows_BASE
- {
- public:
--	ScVbaWindows( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
-+	ScVbaWindows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
- 	virtual ~ScVbaWindows() {}
- 
- 	// XEnumerationAccess
-@@ -57,7 +57,7 @@ public:
- 	// ScVbaCollectionBaseImpl	
- 	virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); 
- 
--	static css::uno::Reference< oo::vba::XCollection > Windows(  const css::uno::Reference< css::uno::XComponentContext >& xContext );
-+	static css::uno::Reference< ov::XCollection > Windows(  const css::uno::Reference< css::uno::XComponentContext >& xContext );
- 
- 	// XHelperInterface
- 	virtual rtl::OUString& getServiceImplName();
-diff --git sc/source/ui/vba/vbaworkbook.cxx sc/source/ui/vba/vbaworkbook.cxx
-index 464a4d6..e0521dd 100644
---- sc/source/ui/vba/vbaworkbook.cxx
-+++ sc/source/ui/vba/vbaworkbook.cxx
-@@ -38,7 +38,7 @@
- #include <com/sun/star/frame/XStorable.hpp>
- #include <com/sun/star/frame/XFrame.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
--#include <org/openoffice/excel/XlFileFormat.hpp>
-+#include <ooo/vba/excel/XlFileFormat.hpp>
- 
- #include "scextopt.hxx"
- #include "vbaworksheet.hxx"
-@@ -56,7 +56,7 @@
- // Much of the impl. for the equivalend UNO module is
- // sc/source/ui/unoobj/docuno.cxx, viewuno.cxx
- 
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
- class ActiveSheet : public ScVbaWorksheet
-@@ -80,7 +80,7 @@ protected:
- 		return xSheet;
- 	}
- public:
--	ActiveSheet( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : ScVbaWorksheet( xParent, xContext ) {}
-+	ActiveSheet( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : ScVbaWorksheet( xParent, xContext ) {}
- 		
- };
- 
-@@ -192,7 +192,7 @@ ScVbaWorkbook::init()
- 	if ( !ColorData.getLength() )
- 		ResetColors();
- }
--ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext) :ScVbaWorkbook_BASE( xParent, xContext ), mxModel(NULL)
-+ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext) :ScVbaWorkbook_BASE( xParent, xContext ), mxModel(NULL)
- {
- 	//#FIXME this persists the color data per office instance and
- 	// not per workbook instance, need to hook the data into XModel
-@@ -203,13 +203,13 @@ ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterf
- 	init();
- }
- 
--ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ) : ScVbaWorkbook_BASE( xParent, xContext ),  mxModel( xModel ) 
-+ScVbaWorkbook::ScVbaWorkbook( 	const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ) : ScVbaWorkbook_BASE( xParent, xContext ),  mxModel( xModel ) 
- { 
- 	init();
- }
- 
- ScVbaWorkbook::ScVbaWorkbook( uno::Sequence< uno::Any> const & args,
--    uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaWorkbook_BASE( getXSomethingFromArgs< vba::XHelperInterface >( args, 0 ), xContext ),  mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) ) 
-+    uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaWorkbook_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ),  mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) ) 
- 
- {
- 	init();
-@@ -270,7 +270,7 @@ ScVbaWorkbook::Worksheets( const uno::Any& aIndex ) throw (uno::RuntimeException
- 	uno::Reference< frame::XModel > xModel( getModel() );	
- 	uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( xModel, uno::UNO_QUERY_THROW );
- 	uno::Reference<container::XIndexAccess > xSheets( xSpreadDoc->getSheets(), uno::UNO_QUERY_THROW );
--	uno::Reference< vba::XCollection > xWorkSheets(  new ScVbaWorksheets( this, mxContext, xSheets, xModel ) );
-+	uno::Reference< XCollection > xWorkSheets(  new ScVbaWorksheets( this, mxContext, xSheets, xModel ) );
- 	if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
- 	{
- 		return uno::Any( xWorkSheets );	
-@@ -281,7 +281,7 @@ ScVbaWorkbook::Worksheets( const uno::Any& aIndex ) throw (uno::RuntimeException
- uno::Any SAL_CALL
- ScVbaWorkbook::Windows( const uno::Any& aIndex ) throw (uno::RuntimeException)
- {
--	uno::Reference< vba::XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
-+	uno::Reference< XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
- 	if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
- 		return uno::Any( xWindows );
- 	return uno::Any( xWindows->Item( aIndex, uno::Any() ) );
-@@ -420,7 +420,7 @@ ScVbaWorkbook::Styles( const::uno::Any& Item ) throw (uno::RuntimeException)
- 	// quick look and Styles object doesn't seem to have a valid parent
- 	// or a least the object browser just shows an object that has no 
- 	// variables ( therefore... leave as NULL for now ) 
--	uno::Reference< vba::XCollection > dStyles = new ScVbaStyles( uno::Reference< vba::XHelperInterface >(), mxContext, getModel() );
-+	uno::Reference< XCollection > dStyles = new ScVbaStyles( uno::Reference< XHelperInterface >(), mxContext, getModel() );
- 	if ( Item.hasValue() )
- 		return dStyles->Item( Item, uno::Any() );
- 	return uno::makeAny( dStyles );
-@@ -428,14 +428,18 @@ ScVbaWorkbook::Styles( const::uno::Any& Item ) throw (uno::RuntimeException)
- 
- // Amelia Wang
- uno::Any SAL_CALL
--ScVbaWorkbook::Names( ) throw (uno::RuntimeException)
-+ScVbaWorkbook::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeException)
- {
- 	uno::Reference< frame::XModel > xModel( getModel() );
- 	uno::Reference< beans::XPropertySet > xProps( xModel, uno::UNO_QUERY_THROW );
- 	uno::Reference< sheet::XNamedRanges > xNamedRanges(  xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
--	uno::Reference< vba::XCollection > xNames( new ScVbaNames( this , mxContext , xNamedRanges , xModel ));
-+	uno::Reference< XCollection > xNames( new ScVbaNames( this , mxContext , xNamedRanges , xModel ));
-+    if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
++void
++ScVbaCommandBarControl::createNewToolBarControl()
++{
++    uno::Sequence< beans::PropertyValue > aPropertys(4);
++    aPropertys[0].Name = rtl::OUString::createFromAscii("CommandURL");
++    aPropertys[0].Value <<= m_sCommand; 
++    aPropertys[1].Name = rtl::OUString::createFromAscii("Label");
++    aPropertys[1].Value <<= m_sName; 
++    aPropertys[2].Name = rtl::OUString::createFromAscii("Type");
++    aPropertys[2].Value <<= m_nType; 
++    aPropertys[3].Name = rtl::OUString::createFromAscii("IsVisible");
++    aPropertys[3].Value <<= sal_True; 
++
++    m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
++    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
++    rtl::OUString sUIName;
++    xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") ) >>= sUIName;
++
++    m_xCurrentSettings.set( m_xBarSettings, uno::UNO_QUERY_THROW );
++    if( m_xUICfgManager->hasSettings( m_sBarName ) )
++    {
++        m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++    }
++    else
++    {
++        m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++    }
++    if( !m_bTemporary )
++    {
++        m_xUICfgPers->store();
++    }
++}
++
++::rtl::OUString SAL_CALL
++ScVbaCommandBarControl::getCaption() throw ( uno::RuntimeException )
++{
++    // "Label" always empty
++    rtl::OUString sCaption;
++    beans::PropertyValues aPropertyValues;
++    if( m_xCurrentSettings.is() )
 +    {
- 	return uno::Any( xNames );
- }
-+    return uno::Any( xNames->Item( aIndex, uno::Any() ) );
++        m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
++        lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label") ) >>= sCaption;
++    }
++    else if( m_xBarSettings.is() )
++    {
++        m_xBarSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
++        lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label") ) >>= sCaption;
++    }
++    return sCaption;
 +}
- 
- rtl::OUString& 
- ScVbaWorkbook::getServiceImplName()
-@@ -451,7 +455,7 @@ ScVbaWorkbook::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbook" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Workbook" ) );
- 	}
- 	return aServiceNames;
- }
-@@ -494,5 +498,5 @@ sdecl::vba_service_class_<ScVbaWorkbook, sdecl::with_args<true> > serviceImpl;
- extern sdecl::ServiceDecl const serviceDecl(
-     serviceImpl,
-     "ScVbaWorkbook",
--    "org.openoffice.excel.Workbook" );
-+    "ooo.vba.excel.Workbook" );
- }
-diff --git sc/source/ui/vba/vbaworkbook.hxx sc/source/ui/vba/vbaworkbook.hxx
-index 67dccfa..b84d84e 100644
---- sc/source/ui/vba/vbaworkbook.hxx
-+++ sc/source/ui/vba/vbaworkbook.hxx
-@@ -31,12 +31,12 @@
- #define SC_VBA_WORKBOOK_HXX
- 
- #include <com/sun/star/frame/XModel.hpp>
--#include <org/openoffice/excel/XWorkbook.hpp>
-+#include <ooo/vba/excel/XWorkbook.hpp>
- #include "vbahelperinterface.hxx"
- 
- class ScModelObj;
- 
--typedef InheritedHelperInterfaceImpl1< oo::excel::XWorkbook > ScVbaWorkbook_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XWorkbook > ScVbaWorkbook_BASE;
- 
- class ScVbaWorkbook : public ScVbaWorkbook_BASE
- {
-@@ -47,9 +47,9 @@ class ScVbaWorkbook : public ScVbaWorkbook_BASE
- protected:
- 
- 	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
--	ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
-+	ScVbaWorkbook( 	const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
- public:
--	ScVbaWorkbook( 	const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+	ScVbaWorkbook( 	const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
- 			css::uno::Reference< css::frame::XModel > xModel );
- 	ScVbaWorkbook( 	css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
- 	virtual ~ScVbaWorkbook() {}
-@@ -59,7 +59,7 @@ public:
- 	virtual ::rtl::OUString SAL_CALL getPath() throw (css::uno::RuntimeException);
- 	virtual ::rtl::OUString SAL_CALL getFullName() throw (css::uno::RuntimeException);
- 	virtual ::sal_Bool SAL_CALL getProtectStructure() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
- 	virtual sal_Bool SAL_CALL getSaved() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL setSaved( sal_Bool bSave ) throw (css::uno::RuntimeException);
- 
-@@ -75,7 +75,7 @@ public:
- 	virtual void SAL_CALL Save() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
-     // Amelia Wang
--    virtual css::uno::Any SAL_CALL Names( ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- 
- 	virtual css::uno::Any SAL_CALL Styles( const css::uno::Any& Item ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL ResetColors(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-diff --git sc/source/ui/vba/vbaworkbooks.cxx sc/source/ui/vba/vbaworkbooks.cxx
-index 2d832f5..6bb17b5 100644
---- sc/source/ui/vba/vbaworkbooks.cxx
-+++ sc/source/ui/vba/vbaworkbooks.cxx
-@@ -60,7 +60,7 @@
- 
- #include <hash_map>
- #include <osl/file.hxx>
--using namespace ::org::openoffice;
-+using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
- const sal_Int16 CUSTOM_CHAR = 5;
-@@ -81,7 +81,7 @@ getWorkbook( uno::Reference< uno::XComponentContext >& xContext, const uno::Refe
- 	if( !xModel.is() )
- 		return uno::Any();
- 	
--	ScVbaWorkbook *pWb = new ScVbaWorkbook(  uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
-+	ScVbaWorkbook *pWb = new ScVbaWorkbook(  uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
- 	return uno::Any( uno::Reference< excel::XWorkbook > (pWb) );
- }
- 
-@@ -238,7 +238,7 @@ public:
- 
- };
- 
--ScVbaWorkbooks::ScVbaWorkbooks( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext ) : ScVbaWorkbooks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new WorkBooksAccessImpl( xContext ) ) )
-+ScVbaWorkbooks::ScVbaWorkbooks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext ) : ScVbaWorkbooks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new WorkBooksAccessImpl( xContext ) ) )
- {
- }
- // XEnumerationAccess
-@@ -459,7 +459,7 @@ ScVbaWorkbooks::getServiceNames()
- 	if ( sNames.getLength() == 0 )
- 	{
- 		sNames.realloc( 1 );
--		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbooks") );
-+		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Workbooks") );
- 	}
- 	return sNames;
- }
-diff --git sc/source/ui/vba/vbaworkbooks.hxx sc/source/ui/vba/vbaworkbooks.hxx
-index 95e8844..7c5b421 100644
---- sc/source/ui/vba/vbaworkbooks.hxx
-+++ sc/source/ui/vba/vbaworkbooks.hxx
-@@ -32,26 +32,26 @@
- 
- 
- #include "vbacollectionimpl.hxx"
--#include <org/openoffice/vba/XGlobals.hpp>
--#include <org/openoffice/excel/XWorkbooks.hpp>
-+#include <ooo/vba/XGlobals.hpp>
-+#include <ooo/vba/excel/XWorkbooks.hpp>
- #include <com/sun/star/container/XEnumerationAccess.hpp>
- #include "vbahelper.hxx"
- 
- 
- class ScModelObj;
- 
--typedef CollTestImplHelper< oo::excel::XWorkbooks > ScVbaWorkbooks_BASE;
-+typedef CollTestImplHelper< ov::excel::XWorkbooks > ScVbaWorkbooks_BASE;
- 
- class ScVbaWorkbooks : public ScVbaWorkbooks_BASE
- {
- private:
--	css::uno::Reference< oo::vba::XGlobals > getGlobals() throw (css::uno::RuntimeException);
-+	css::uno::Reference< ov::XGlobals > getGlobals() throw (css::uno::RuntimeException);
- 	rtl::OUString 	getFileFilterType( const rtl::OUString& rString );
- 	bool 	isTextFile( const rtl::OUString& rString );
- 	bool 	isSpreadSheetFile( const rtl::OUString& rString );
- 	static sal_Int16& getCurrentDelim(){ static sal_Int16 nDelim = 44; return nDelim; }
- public:
--	ScVbaWorkbooks( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
-+	ScVbaWorkbooks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
- 	virtual ~ScVbaWorkbooks() {}
- 
- 	// XEnumerationAccess
-diff --git sc/source/ui/vba/vbaworksheet.cxx sc/source/ui/vba/vbaworksheet.cxx
-index d8ef68d..da0b83b 100644
---- sc/source/ui/vba/vbaworksheet.cxx
-+++ sc/source/ui/vba/vbaworksheet.cxx
-@@ -47,6 +47,7 @@
- #include <com/sun/star/sheet/XSheetPastable.hpp>
- #include <com/sun/star/sheet/XCellAddressable.hpp>
- #include <com/sun/star/sheet/XSheetOutline.hpp>
-+#include <com/sun/star/sheet/XSheetPageBreak.hpp>
- #include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
- #include <com/sun/star/util/XURLTransformer.hpp>
- #include <com/sun/star/frame/XDispatchProvider.hpp>
-@@ -56,6 +57,7 @@
- #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
- #include <com/sun/star/drawing/XControlShape.hpp>
- #include <com/sun/star/form/FormComponentType.hpp>
-+#include <com/sun/star/form/XFormsSupplier.hpp>
- 
- #include <comphelper/processfactory.hxx>
- 
-@@ -84,12 +86,14 @@
- #include "vbaoleobject.hxx"
- #include "vbaoleobjects.hxx"
- #include "vbashapes.hxx"
-+#include "vbapagesetup.hxx"
-+#include "vbapagebreaks.hxx"
- 
- #define STANDARDWIDTH 2267
- #define STANDARDHEIGHT 427
- #define DOESNOTEXIST -1
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
- static bool
- nameExists( uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc, ::rtl::OUString & name, SCTAB& nTab ) throw ( lang::IllegalArgumentException )
- {
-@@ -190,17 +194,17 @@ openNewDoc(rtl::OUString aSheetName )
- 	return xModel;
- }
- 
--ScVbaWorksheet::ScVbaWorksheet( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : WorksheetImpl_BASE( xParent, xContext )
-+ScVbaWorksheet::ScVbaWorksheet( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : WorksheetImpl_BASE( xParent, xContext )
- {
- }
--ScVbaWorksheet::ScVbaWorksheet(const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
-+ScVbaWorksheet::ScVbaWorksheet(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
- 		const uno::Reference< sheet::XSpreadsheet >& xSheet, 
- 		const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) : WorksheetImpl_BASE( xParent, xContext ), mxSheet( xSheet ), mxModel(xModel)
- {
- }
- 
- ScVbaWorksheet::ScVbaWorksheet( uno::Sequence< uno::Any> const & args,
--    uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) :  WorksheetImpl_BASE( getXSomethingFromArgs< vba::XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
-+    uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) :  WorksheetImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
- {
- 	if ( args.getLength() < 2 )
- 		throw lang::IllegalArgumentException();
-@@ -247,6 +251,12 @@ ScVbaWorksheet::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
- 			(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ), aValue);
- }
- 
-+sal_Int16
-+ScVbaWorksheet::getIndex() throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaCommandBarControl::setCaption( const ::rtl::OUString& _caption ) throw (uno::RuntimeException)
 +{
-+	return getSheetID() + 1;
++    if( m_xCurrentSettings.is() )
++    {
++        beans::PropertyValues aPropertyValues;
++        m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
++        beans::PropertyValues aNewPropertyValues;
++        aNewPropertyValues = lcl_repalcePropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label"), uno::makeAny( _caption ) );
++        m_xCurrentSettings->replaceByIndex( m_nPosition, uno::makeAny( aNewPropertyValues ) );
++        if( m_xUICfgManager->hasSettings( m_sBarName ) )
++        {
++            m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++        }
++        else
++        {
++            m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++        }
++        // make it permanent
++        if( !m_bTemporary )
++        {
++            m_xUICfgPers->store();
++        }
++    }
++}
++::rtl::OUString SAL_CALL 
++ScVbaCommandBarControl::getOnAction() throw (uno::RuntimeException)
++{
++    if( m_xCurrentSettings.is() )
++    {
++        beans::PropertyValues aPropertyValues;
++        m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
++        rtl::OUString sCommandURL;
++        lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii( "CommandURL" ) ) >>= sCommandURL;
++        return sCommandURL;
++    }
++    return ::rtl::OUString();
++}
++void SAL_CALL 
++ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (uno::RuntimeException)
++{
++    if( m_xCurrentSettings.is() )
++    {
++        beans::PropertyValues aPropertyValues;
++        m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
++        beans::PropertyValues aNewPropertyValues;
++        aNewPropertyValues = lcl_repalcePropertyValue( aPropertyValues, rtl::OUString::createFromAscii("CommandURL"), uno::makeAny( _onaction ) );
++        m_xCurrentSettings->replaceByIndex( m_nPosition, uno::makeAny( aNewPropertyValues ) );
++        if( m_xUICfgManager->hasSettings( m_sBarName ) )
++        {
++            m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++        }
++        else
++        {
++            m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++        }
++        // make it permanent
++        if( !m_bTemporary )
++        {
++            m_xUICfgPers->store();
++        }
++    }
 +}
-+
- uno::Reference< excel::XRange > 
- ScVbaWorksheet::getUsedRange() throw (uno::RuntimeException)
- {
-@@ -266,6 +276,22 @@ ScVbaWorksheet::Outline( ) throw (uno::RuntimeException)
- 	return new ScVbaOutline( this, mxContext, xOutline);
- }
- 
-+uno::Reference< excel::XPageSetup >
-+ScVbaWorksheet::PageSetup( ) throw (uno::RuntimeException)
++::sal_Bool SAL_CALL 
++ScVbaCommandBarControl::getVisible() throw (uno::RuntimeException)
 +{
-+	return new ScVbaPageSetup( this, mxContext, getSheet(), getModel() );
++    // not possible in UNO?
++    return sal_True;
 +}
-+
-+uno::Any
-+ScVbaWorksheet::HPageBreaks( const uno::Any& aIndex ) throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaCommandBarControl::setVisible( ::sal_Bool /*_visible*/ ) throw (uno::RuntimeException)
 +{
-+    uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak(getSheet(),uno::UNO_QUERY_THROW);
-+    uno::Reference< excel::XHPageBreaks > xHPageBreaks( new ScVbaHPageBreaks( this, mxContext, xSheetPageBreak)); 
-+   if ( aIndex.hasValue() )
-+      return xHPageBreaks->Item( aIndex, uno::Any()); 
-+   return uno::makeAny( xHPageBreaks );
++    // "IsVisilbe"
 +}
++void SAL_CALL 
++ScVbaCommandBarControl::Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++{
++    if( m_xCurrentSettings.is() )
++    {
++        m_xCurrentSettings->removeByIndex( m_nPosition );
 +
- sal_Int32 
- ScVbaWorksheet::getStandardWidth() throw (uno::RuntimeException)
- {
-@@ -416,6 +442,7 @@ ScVbaWorksheet::Delete() throw (uno::RuntimeException)
- 		uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
- 		uno::Reference<container::XNameContainer> xNameContainer(xSheets,uno::UNO_QUERY_THROW);
- 		xNameContainer->removeByName(aSheetName);
-+        mxSheet.clear();
- 	}
- }
- 
-@@ -536,7 +563,7 @@ ScVbaWorksheet::ChartObjects( const uno::Any& Index ) throw (uno::RuntimeExcepti
- 	}
- 	if ( Index.hasValue() )
- 	{
--		uno::Reference< vba::XCollection > xColl( mxCharts, uno::UNO_QUERY_THROW );
-+		uno::Reference< XCollection > xColl( mxCharts, uno::UNO_QUERY_THROW );
- 		return xColl->Item( Index, uno::Any() );
- 	}
- 	else
-@@ -551,7 +578,7 @@ ScVbaWorksheet::PivotTables( const uno::Any& Index ) throw (uno::RuntimeExceptio
- 	uno::Reference< sheet::XDataPilotTablesSupplier > xTables(xSheet, uno::UNO_QUERY_THROW ) ;
- 	uno::Reference< container::XIndexAccess > xIndexAccess( xTables->getDataPilotTables(), uno::UNO_QUERY_THROW );
- 
--	uno::Reference< vba::XCollection > xColl(  new ScVbaPivotTables( this, mxContext, xIndexAccess ) );
-+	uno::Reference< XCollection > xColl(  new ScVbaPivotTables( this, mxContext, xIndexAccess ) );
- 	if ( Index.hasValue() )
- 		return xColl->Item( Index, uno::Any() );
- 	return uno::makeAny( xColl );
-@@ -564,7 +591,7 @@ ScVbaWorksheet::Comments( const uno::Any& Index ) throw (uno::RuntimeException)
- 	uno::Reference< sheet::XSheetAnnotationsSupplier > xAnnosSupp( xSheet, uno::UNO_QUERY_THROW );
- 	uno::Reference< sheet::XSheetAnnotations > xAnnos( xAnnosSupp->getAnnotations(), uno::UNO_QUERY_THROW );
- 	uno::Reference< container::XIndexAccess > xIndexAccess( xAnnos, uno::UNO_QUERY_THROW );
--	uno::Reference< vba::XCollection > xColl(  new ScVbaComments( this, mxContext, xIndexAccess ) );
-+	uno::Reference< XCollection > xColl(  new ScVbaComments( this, mxContext, xIndexAccess ) );
- 	if ( Index.hasValue() )
- 		return xColl->Item( Index, uno::Any() );
- 	return uno::makeAny( xColl );
-@@ -656,29 +683,10 @@ ScVbaWorksheet::setValue( const ::rtl::OUString& /*aPropertyName*/, const uno::A
- uno::Any SAL_CALL 
- ScVbaWorksheet::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
- {
--/*	uno::Any aProp = getControl( aPropertyName );
--
--	if ( !aProp.hasValue() )
--		throw beans::UnknownPropertyException(); // unsupported operation
--	// #TODO we need a factory here when we support
--	// more control types
--	sal_Int32 nClassId = -1;	
--	uno::Reference< beans::XPropertySet > xProps( aProp, uno::UNO_QUERY_THROW );	
--	const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
--	xProps->getPropertyValue( sClassId ) >>= nClassId;
--    ScVbaControlFactory controlFactory( m_xContext, xProps, xControlShape );
--    uno::Reference< vba::XControl > xControl( controlFactory.createControl( nClassId ) );
--	if ( nClassId == form::FormComponentType::COMBOBOX )
--	{
--		uno::Reference< msforms::XComboBox > xCbx( new ScVbaComboBox( m_xContext, xProps ) ); 
--		return uno::makeAny( xCbx );
--	}
--*/
-     uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW );
--    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;
- }
- 
- ::sal_Bool SAL_CALL 
-@@ -686,82 +694,67 @@ ScVbaWorksheet::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::Runtim
- {
- 	return sal_False;
- }
--::sal_Bool SAL_CALL 
--ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
-+
-+uno::Reference< container::XNameAccess > 
-+ScVbaWorksheet::getFormControls()
- {
-+	uno::Reference< container::XNameAccess > xFormControls;
- 	try
- 	{
--		if ( getControl( aName ).hasValue() )
--			return sal_True;
-+		uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
-+		uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
-+		uno::Reference< form::XFormsSupplier >  xFormSupplier( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
-+    		uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
-+		// get the www-standard container ( maybe we should access the 
-+		// 'www-standard' by name rather than index, this seems an
-+		// implementation detail
-+		xFormControls.set( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
-+		
- 	}
- 	catch( uno::Exception& )
- 	{
- 	}
--	return sal_False;
-+	return xFormControls;
-+
- }
--uno::Any 
--ScVbaWorksheet::getControl( const ::rtl::OUString& sName )
-+::sal_Bool SAL_CALL 
-+ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
- {
--	uno::Reference< sheet::XScenarioEnhanced > xIf( getSheet(), uno::UNO_QUERY_THROW );
--	ScTableSheetObj* pTab= static_cast< ScTableSheetObj* >( xIf.get() );
--	ScDocShell* pShell = NULL;
--	if ( pTab ) 
--		pShell = pTab->GetDocShell();
--	if ( pShell )
--	{
--		ScDrawLayer* pDrawLayer = pShell->MakeDrawLayer();
--		SCTAB nTab = 0;
--		// make GetTab_Impl() public or this class a friend
--		const ScRangeList& rRanges = pTab->GetRangeList();
--		const ScRange* pFirst = rRanges.GetObject(0);
--		if (pFirst)
--			nTab = pFirst->aStart.Tab();
--
--		SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
--		if ( pPage )
--		{
--			ULONG nCount = pPage->GetObjCount(); 
--			for ( ULONG index=0; index<nCount; ++index )
--			{
--				SdrObject* pObj = pPage->GetObj( index );
--				if ( pObj )
--				{
--					
--					SdrUnoObj* pUnoObj = PTR_CAST(SdrUnoObj, pObj);
--					if ( pUnoObj )
--					{
--						uno::Reference< container::XNamed > xNamed( pUnoObj->GetUnoControlModel(), uno::UNO_QUERY_THROW );
--						if ( sName.equals( xNamed->getName() ) )
--							return uno::makeAny( xNamed );
-+	uno::Reference< container::XNameAccess > xFormControls( getFormControls() );
-+	if ( xFormControls.is() )
-+		return xFormControls->hasByName( aName );
-+	return sal_False;
- 					}
--				}
--			}
--		}
--	}
--
--	return uno::Any();
--}
- 
- uno::Any
- ScVbaWorksheet::getControlShape( const ::rtl::OUString& sName )
- {
--	//uno::Reference< sheet::XScenarioEnhanced > xIf( getSheet(), uno::UNO_QUERY_THROW );
--    uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
--    uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
--    uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
--    uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPage, uno::UNO_QUERY_THROW );
-+    // ideally we would get an XControl object but it appears an XControl
-+    // implementation only exists for a Control implementation optained from the 
-+    // view ( e.g. in basic you would get this from
-+    // thiscomponent.currentcontroller.getControl( controlModel ) )
-+    // and the thing to realise is that it is only possible to get an XControl
-+    // for a currently displayed control :-( often we would want to modify 
-+    // a control not on the active sheet. But.. you can always access the 
-+    // XControlShape from the DrawPage whether that is the active drawpage or not
-+
-+    uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getSheet(), uno::UNO_QUERY_THROW );
-+    uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
-+
-     sal_Int32 nCount = xIndexAccess->getCount();
-     for( int index = 0; index < nCount; index++ )
-     {
-         uno::Any aUnoObj =  xIndexAccess->getByIndex( index );
--        uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY_THROW );
--        uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl() );
--        uno::Reference< container::XNamed > xNamed( xControlModel, uno::UNO_QUERY_THROW );
-+ 		// It seems there are some drawing objects that can not query into Control shapes?
-+        uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY );
-+ 		if( xControlShape.is() )
-+ 		{
-+     	    uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW );
-         if( sName.equals( xNamed->getName() ))
-         {
-             return aUnoObj;
-         }
--
++        if( m_xUICfgManager->hasSettings( m_sBarName ) )
++        {
++            m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++        }
++        else
++        {
++            m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
++        }
++        // make it permanent
++        if( !m_bTemporary )
++        {
++            m_xUICfgPers->store();
++        }
 +    }
-     }
-     return uno::Any();
- }
-@@ -793,7 +786,7 @@ ScVbaWorksheet::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheet" ) );
- 	}
- 	return aServiceNames;
- }
-@@ -856,6 +849,29 @@ ScVbaWorksheet::getSheetID() throw (uno::RuntimeException)
- 	return xAddressable->getRangeAddress().Sheet;
- }
- 
-+void SAL_CALL 
-+ScVbaWorksheet::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, const uno::Any& IgnorePrintAreas ) throw (uno::RuntimeException)
++}
++uno::Any SAL_CALL 
++ScVbaCommandBarControl::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
++{
++    sal_Int32 nIndex;
++    uno::Reference< XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
++    if( aIndex.hasValue() )
++    {
++        if( aIndex >>= nIndex )
++        {
++            uno::Reference< XCommandBarControl > xCommandBarControl( xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW );
++            return uno::makeAny( xCommandBarControl );
++        }
++        else
++            throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid index" ), uno::Reference< uno::XInterface >() );
++    }
++    return uno::makeAny( xCommandBarControls );
++}
++rtl::OUString& 
++ScVbaCommandBarControl::getServiceImplName()
 +{
-+	sal_Int32 nTo = 0;
-+	sal_Int32 nFrom = 0;
-+	sal_Int16 nCopies = 1;
-+	sal_Bool bCollate = sal_False;
-+	sal_Bool bSelection = sal_False;
-+    sal_Bool bIgnorePrintAreas = sal_False;
-+	From >>= nFrom;
-+	To >>= nTo;
-+	Copies >>= nCopies;
-+    IgnorePrintAreas >>= bIgnorePrintAreas;
-+	if ( nCopies > 1 ) // Collate only useful when more that 1 copy
-+		Collate >>= bCollate;
-+
-+	if ( !( nFrom || nTo ) )
-+		bSelection = sal_True;
-+
-+    uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );  
-+	PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, xModel, bSelection );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControl") );
++	return sImplName;
 +}
-+
++uno::Sequence<rtl::OUString> 
++ScVbaCommandBarControl::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBarControl" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/vbaaxes.hxx
+===================================================================
+--- sc/source/ui/vba/vbaaxes.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaaxes.hxx	(.../cws/npower11)	(revision 266650)
+@@ -29,17 +29,17 @@
+  ************************************************************************/
+ #ifndef SC_VBA_AXES_HXX
+ #define SC_VBA_AXES_HXX
+-#include <org/openoffice/excel/XAxes.hpp>
+-#include <org/openoffice/excel/XAxis.hpp>
+-#include <org/openoffice/excel/XChart.hpp>
++#include <ooo/vba/excel/XAxes.hpp>
++#include <ooo/vba/excel/XAxis.hpp>
++#include <ooo/vba/excel/XChart.hpp>
+ #include "vbacollectionimpl.hxx"
  
- namespace worksheet
+-typedef CollTestImplHelper< oo::excel::XAxes > ScVbaAxes_BASE;
++typedef CollTestImplHelper< ov::excel::XAxes > ScVbaAxes_BASE;
+ class ScVbaAxes : public ScVbaAxes_BASE
  {
-@@ -864,5 +880,5 @@ sdecl::vba_service_class_<ScVbaWorksheet, sdecl::with_args<true> > serviceImpl;
- extern sdecl::ServiceDecl const serviceDecl(
-     serviceImpl,
-     "ScVbaWorksheet",
--    "org.openoffice.excel.Worksheet" );
-+    "ooo.vba.excel.Worksheet" );
- }
-diff --git sc/source/ui/vba/vbaworksheet.hxx sc/source/ui/vba/vbaworksheet.hxx
-index c1fe2be..18f5039 100644
---- sc/source/ui/vba/vbaworksheet.hxx
-+++ sc/source/ui/vba/vbaworksheet.hxx
-@@ -35,35 +35,37 @@
- 
- #include <com/sun/star/sheet/XSpreadsheet.hpp>
- #include <com/sun/star/script/XInvocation.hpp>
--#include <org/openoffice/excel/XWorksheet.hpp>
--#include <org/openoffice/excel/XComments.hpp>
--#include <org/openoffice/excel/XRange.hpp>
-+#include <ooo/vba/excel/XWorksheet.hpp>
-+#include <ooo/vba/excel/XComments.hpp>
-+#include <ooo/vba/excel/XRange.hpp>
- #include <com/sun/star/lang/XEventListener.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/frame/XModel.hpp>
--#include <org/openoffice/excel/XOutline.hpp>
--#include <org/openoffice/excel/XChartObjects.hpp>
-+#include <ooo/vba/excel/XOutline.hpp>
-+#include <ooo/vba/excel/XPageSetup.hpp>
-+#include <ooo/vba/excel/XHPageBreaks.hpp>
-+#include <ooo/vba/excel/XChartObjects.hpp>
+-	css::uno::Reference< oo::excel::XChart > moChartParent; // not the true parent I guess
++	css::uno::Reference< ov::excel::XChart > moChartParent; // not the true parent I guess
+ public:
+-	ScVbaAxes( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< oo::excel::XChart >& xChart );
++	ScVbaAxes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< ov::excel::XChart >& xChart );
+ 	// XEnumerationAccess
+ 	virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ 	virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);	
+@@ -48,7 +48,7 @@
+ 	// XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+-	static css::uno::Reference< oo::excel::XAxis > createAxis( const css::uno::Reference< oo::excel::XChart >& xChart, const css::uno::Reference< css::uno::XComponentContext >& xContext,  sal_Int32 nType, sal_Int32 nAxisGroup ) throw ( css::uno::RuntimeException );
++	static css::uno::Reference< ov::excel::XAxis > createAxis( const css::uno::Reference< ov::excel::XChart >& xChart, const css::uno::Reference< css::uno::XComponentContext >& xContext,  sal_Int32 nType, sal_Int32 nAxisGroup ) throw ( css::uno::RuntimeException );
+ };
  
+ #endif //SC_VBA_AXES_HXX
+Index: sc/source/ui/vba/vbachart.hxx
+===================================================================
+--- sc/source/ui/vba/vbachart.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbachart.hxx	(.../cws/npower11)	(revision 266650)
+@@ -38,12 +38,12 @@
+ #include <com/sun/star/chart/XAxisZSupplier.hpp>
+ #include <com/sun/star/chart/XTwoAxisXSupplier.hpp>
+ #include <com/sun/star/chart/XTwoAxisYSupplier.hpp>
+-#include <org/openoffice/excel/XChart.hpp>
+-#include <org/openoffice/excel/XDataLabels.hpp>
+-#include <org/openoffice/excel/XSeries.hpp>
++#include <ooo/vba/excel/XChart.hpp>
++#include <ooo/vba/excel/XDataLabels.hpp>
++#include <ooo/vba/excel/XSeries.hpp>
  #include "vbahelperinterface.hxx"
  
--typedef InheritedHelperInterfaceImpl1< oo::excel::XWorksheet >  WorksheetImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XWorksheet >  WorksheetImpl_BASE;
- 
- class ScVbaWorksheet : public WorksheetImpl_BASE
- {
- 	css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
- 	css::uno::Reference< css::frame::XModel > mxModel;
--	css::uno::Reference< oo::excel::XChartObjects > mxCharts;
-+	css::uno::Reference< ov::excel::XChartObjects > mxCharts;
- 		
--	css::uno::Reference< oo::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
--	css::uno::Reference< oo::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
-+	css::uno::Reference< ov::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
-+	css::uno::Reference< ov::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
- 
--	css::uno::Any getControl( const rtl::OUString& sName );
-+	css::uno::Reference< css::container::XNameAccess > getFormControls();
- 	css::uno::Any getControlShape( const rtl::OUString& sName );
- protected:
+-typedef InheritedHelperInterfaceImpl1<oo::excel::XChart > ChartImpl_BASE;
++typedef InheritedHelperInterfaceImpl1<ov::excel::XChart > ChartImpl_BASE;
  
--	ScVbaWorksheet( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext );
-+	ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ class ScVbaChart : public ChartImpl_BASE
+ {		
+@@ -73,7 +73,7 @@
+ 	void assignDiagramAttributes();
+ 	void setDefaultSeriesDescriptionLabels(){}
  public:
--	ScVbaWorksheet( const css::uno::Reference< oo::vba::XHelperInterface >& xParent,
-+	ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent,
- 		const css::uno::Reference< css::uno::XComponentContext >& xContext,
- 		const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet, 
- 		const css::uno::Reference< css::frame::XModel >& xModel )throw (css::uno::RuntimeException)  ;
-@@ -86,16 +88,19 @@ public:
- 	virtual ::sal_Bool SAL_CALL getProtectionMode() throw (css::uno::RuntimeException);
- 	virtual ::sal_Bool SAL_CALL getProtectContents() throw (css::uno::RuntimeException);
- 	virtual ::sal_Bool SAL_CALL getProtectDrawingObjects() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL getUsedRange() throw (css::uno::RuntimeException) ;
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getUsedRange() throw (css::uno::RuntimeException) ;
- 	virtual css::uno::Any SAL_CALL ChartObjects( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XOutline > SAL_CALL Outline( ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getNext() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XWorksheet > SAL_CALL getPrevious() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XOutline > SAL_CALL Outline( ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XPageSetup > SAL_CALL PageSetup( ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Any SAL_CALL HPageBreaks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getNext() throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getPrevious() throw (css::uno::RuntimeException);
-+ 	virtual sal_Int16 SAL_CALL getIndex() throw (css::uno::RuntimeException);
- 
-     // Methods
- 	virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Move( const css::uno::Any& Before, const css::uno::Any& After ) throw (css::uno::RuntimeException) ;
-  	virtual void SAL_CALL Copy( const css::uno::Any& Before, const css::uno::Any& After ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL Paste( const css::uno::Any& Destination, const css::uno::Any& Link ) throw (css::uno::RuntimeException);
-@@ -106,9 +111,9 @@ public:
- 	virtual void SAL_CALL Calculate(  ) throw (css::uno::RuntimeException);
- 	virtual void SAL_CALL CheckSpelling( const css::uno::Any& CustomDictionary,const css::uno::Any& IgnoreUppercase,const css::uno::Any& AlwaysSuggest, const css::uno::Any& SpellingLang ) throw (css::uno::RuntimeException);
- 	// Hacks (?)
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Rows(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
--	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Columns(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Rows(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- 
- 	virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException); 
- 	virtual css::uno::Any SAL_CALL PivotTables( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
-@@ -131,6 +136,7 @@ public:
-     virtual void SAL_CALL setCodeName( const rtl::OUString& sCodeName ) throw (css::uno::RuntimeException);
-     sal_Int16 getSheetID() throw (css::uno::RuntimeException);
+-	ScVbaChart( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart );
++	ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart );
  
-+	virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, const css::uno::Any& IgnorePrintAreas ) throw (css::uno::RuntimeException);
+ 	// Non-interface
+ 	css::uno::Reference< css::beans::XPropertySet > xDiagramPropertySet() { return mxDiagramPropertySet; }
+@@ -85,7 +85,7 @@
+ 	rtl::OUString getSeriesName(sal_Int32 _index) throw ( css::script::BasicErrorException );
+ 	double getValue(sal_Int32 _seriesIndex, sal_Int32 _valindex) throw ( css::script::BasicErrorException );
+ 	sal_Int32 getValuesCount(sal_Int32 _seriesIndex) throw ( css::script::BasicErrorException );
+-	css::uno::Reference< oo::excel::XDataLabels > DataLabels( const css::uno::Reference< oo::excel::XSeries > _oSeries ) throw ( css::script::BasicErrorException );
++	css::uno::Reference< ov::excel::XDataLabels > DataLabels( const css::uno::Reference< ov::excel::XSeries > _oSeries ) throw ( css::script::BasicErrorException );
+ 	bool getHasDataCaption( const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet )throw ( css::script::BasicErrorException );
+ 	void setHasDataCaption( const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, bool _bHasDataLabels )throw ( css::script::BasicErrorException );
+ 	bool is3D() throw ( css::uno::RuntimeException );
+@@ -96,7 +96,7 @@
+ 	virtual ::sal_Int32 SAL_CALL getChartType() throw ( css::uno::RuntimeException, css::script::BasicErrorException);
+ 	virtual void SAL_CALL setChartType( ::sal_Int32 _charttype ) throw ( css::uno::RuntimeException, css::script::BasicErrorException);
+ 	virtual void SAL_CALL Activate(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
+-	virtual void SAL_CALL setSourceData( const css::uno::Reference< ::org::openoffice::excel::XRange >& range, const css::uno::Any& PlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual void SAL_CALL setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange >& range, const css::uno::Any& PlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual ::sal_Int32 SAL_CALL Location(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual ::sal_Int32 SAL_CALL getLocation(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual void SAL_CALL setLocation( ::sal_Int32 where, const css::uno::Any& Name ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+@@ -106,7 +106,7 @@
+ 	virtual void SAL_CALL setHasLegend( ::sal_Bool bLegend ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual void SAL_CALL setPlotBy( ::sal_Int32 xlRowCol ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual ::sal_Int32 SAL_CALL getPlotBy(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+-	virtual css::uno::Reference< oo::excel::XChartTitle > SAL_CALL getChartTitle(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	virtual css::uno::Reference< ov::excel::XChartTitle > SAL_CALL getChartTitle(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Axes( const css::uno::Any& Type, const css::uno::Any& AxisGroup ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
  	// XHelperInterface
  	virtual rtl::OUString& getServiceImplName();
- 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();	
-diff --git sc/source/ui/vba/vbaworksheets.cxx sc/source/ui/vba/vbaworksheets.cxx
-index 921cc4c..cfc156f 100644
---- sc/source/ui/vba/vbaworksheets.cxx
-+++ sc/source/ui/vba/vbaworksheets.cxx
-@@ -48,7 +48,7 @@
- #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
- #include <com/sun/star/beans/XPropertySet.hpp>
- 
--#include <org/openoffice/excel/XApplication.hpp>
-+#include <ooo/vba/excel/XApplication.hpp>
- #include <tools/string.hxx>
- #include "tabvwsh.hxx"
- 
-@@ -56,7 +56,7 @@
- #include "vbaworksheet.hxx"
- #include "vbaworkbook.hxx"
+Index: sc/source/ui/vba/vbaaxistitle.cxx
+===================================================================
+--- sc/source/ui/vba/vbaaxistitle.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaaxistitle.cxx	(.../cws/npower11)	(revision 266650)
+@@ -30,9 +30,9 @@
+ #include "vbaaxistitle.hxx"
  
+ using namespace ::com::sun::star;
 -using namespace ::org::openoffice;
 +using namespace ::ooo::vba;
- using namespace ::com::sun::star;
- 
  
-@@ -148,9 +148,9 @@ public:
- class SheetsEnumeration : public EnumerationHelperImpl
+-ScVbaAxisTitle::ScVbaAxisTitle( const uno::Reference< vba::XHelperInterface >& xParent,  const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& _xTitleShape ) :  AxisTitleBase( xParent, xContext, _xTitleShape )
++ScVbaAxisTitle::ScVbaAxisTitle( const uno::Reference< XHelperInterface >& xParent,  const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& _xTitleShape ) :  AxisTitleBase( xParent, xContext, _xTitleShape )
  {
- 	uno::Reference< frame::XModel > m_xModel;
--	uno::WeakReference< vba::XHelperInterface > m_xParent;
-+	uno::WeakReference< XHelperInterface > m_xParent;
- public:
--	SheetsEnumeration( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel  ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ) {}
-+	SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel  ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ) {}
+ }
  
- 	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) 
- 	{ 
-@@ -160,11 +160,11 @@ public:
+@@ -51,7 +51,7 @@
+ 	{
+ 		uno::Sequence< rtl::OUString > BaseServiceNames = AxisTitleBase::getServiceNames();
+ 		aServiceNames.realloc( BaseServiceNames.getLength() + 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.AxisTitle" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.AxisTitle" ) );
+ 		for ( sal_Int32 index = 1; index < (BaseServiceNames.getLength() + 1); ++index )
+ 			aServiceNames[ index ] = BaseServiceNames[ index ];
+ 	}
+Index: sc/source/ui/vba/vbaformatconditions.cxx
+===================================================================
+--- sc/source/ui/vba/vbaformatconditions.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaformatconditions.cxx	(.../cws/npower11)	(revision 266650)
+@@ -28,7 +28,7 @@
+  *
+  ************************************************************************/
  
- };
+-#include <org/openoffice/excel/XRange.hpp>
++#include <ooo/vba/excel/XRange.hpp>
+ #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+ #include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
+ #include <vector>
+@@ -36,7 +36,7 @@
+ #include "vbaformatcondition.hxx"
+ #include "vbaworkbook.hxx"
+ #include "vbastyles.hxx"
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ typedef std::vector< beans::PropertyValue > VecPropValues;
+@@ -47,10 +47,10 @@
+ static rtl::OUString STYLENAME( RTL_CONSTASCII_USTRINGPARAM("StyleName") );
+ static rtl::OUString sStyleNamePrefix( RTL_CONSTASCII_USTRINGPARAM("Excel_CondFormat") );
  
--ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext,  xSheets ), mxModel( xModel ), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) 
-+ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext,  xSheets ), mxModel( xModel ), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) 
+-ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& xModel ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries )
++ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& xModel ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries )
  {
+ 	mxRangeParent.set( xParent, uno::UNO_QUERY_THROW );
+-	uno::Reference< excel::XWorkbook > xWorkbook = new ScVbaWorkbook(  uno::Reference< vba::XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
++	uno::Reference< excel::XWorkbook > xWorkbook = new ScVbaWorkbook(  uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
+ 	mxStyles.set( xWorkbook->Styles( uno::Any() ), uno::UNO_QUERY_THROW );
+ 	uno::Reference< sheet::XCellRangeAddressable > xCellRange( mxRangeParent->getCellRange(), uno::UNO_QUERY_THROW );
+ 	mxParentRangePropertySet.set( xCellRange, uno::UNO_QUERY_THROW );
+@@ -89,7 +89,7 @@
  }
  
--ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, const uno::Reference< frame::XModel >& xModel  ):  ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(xModel) 
-+ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, const uno::Reference< frame::XModel >& xModel  ):  ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(xModel) 
+ 
+-uno::Any xSheetConditionToFormatCondition( const uno::Reference< vba::XHelperInterface >& xRangeParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xFormatConditions, const uno::Reference< beans::XPropertySet >& xRangeProps,  const uno::Any& aObject ) 
++uno::Any xSheetConditionToFormatCondition( const uno::Reference< XHelperInterface >& xRangeParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xFormatConditions, const uno::Reference< beans::XPropertySet >& xRangeProps,  const uno::Any& aObject ) 
+ {
+ 	uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry;
+ 	aObject >>= xSheetConditionalEntry;
+@@ -102,7 +102,7 @@
+ uno::Any 
+ ScVbaFormatConditions::createCollectionObject(const uno::Any& aObject )
  {
+-	return xSheetConditionToFormatCondition( uno::Reference< vba::XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, mxStyles, this, mxParentRangePropertySet, aObject );
++	return xSheetConditionToFormatCondition( uno::Reference< XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, mxStyles, this, mxParentRangePropertySet, aObject );
  }
  
-@@ -393,7 +393,7 @@ ScVbaWorksheets::Item( const uno::Any& Index, const uno::Any& Index2  ) throw (u
+ class EnumWrapper : public EnumerationHelper_BASE
+@@ -125,7 +125,7 @@
+         virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+         {
+                 if ( nIndex < m_xIndexAccess->getCount() )
+-                        return xSheetConditionToFormatCondition( uno::Reference< vba::XHelperInterface >( m_xParentRange, uno::UNO_QUERY_THROW ), m_xContext, m_xStyles, m_xParentCollection, m_xProps, m_xIndexAccess->getByIndex( nIndex++ ) );
++                        return xSheetConditionToFormatCondition( uno::Reference< XHelperInterface >( m_xParentRange, uno::UNO_QUERY_THROW ), m_xContext, m_xStyles, m_xParentCollection, m_xProps, m_xIndexAccess->getByIndex( nIndex++ ) );
+                 throw container::NoSuchElementException();
+         }
+ };
+@@ -199,7 +199,7 @@
+ 			uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW );
+ 			if (xSheetConditionalEntry->getStyleName().equals(sStyleName))
+ 			{
+-				xFormatCondition =  new ScVbaFormatCondition(uno::Reference< vba::XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, xSheetConditionalEntry, xStyle, this, mxParentRangePropertySet);
++				xFormatCondition =  new ScVbaFormatCondition(uno::Reference< XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, xSheetConditionalEntry, xStyle, this, mxParentRangePropertySet);
+ 				notifyRange();
+ 				return xFormatCondition;
  			}
- 		}  
- 		uno::Reference< container::XIndexAccess > xIndexAccess = new SheetCollectionHelper( mSheets );
--		uno::Reference< vba::XCollection > xSelectedSheets(  new ScVbaWorksheets( this->getParent(), mxContext, xIndexAccess, mxModel ) );
-+		uno::Reference< XCollection > xSelectedSheets(  new ScVbaWorksheets( this->getParent(), mxContext, xIndexAccess, mxModel ) );
- 		return uno::makeAny( xSelectedSheets );
- 	}
- 	return 	ScVbaWorksheets_BASE::Item( Index, Index2 );
-@@ -419,7 +419,7 @@ ScVbaWorksheets::getServiceNames()
- 	if ( sNames.getLength() == 0 )
+@@ -296,7 +296,7 @@
+ 	if ( aServiceNames.getLength() == 0 )
  	{
- 		sNames.realloc( 1 );
--		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheets") );
-+		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheets") );
+ 		aServiceNames.realloc( 1 );
+-		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.FormatConditions" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.FormatConditions" ) );
  	}
- 	return sNames;
+ 	return aServiceNames;
  }
-diff --git sc/source/ui/vba/vbaworksheets.hxx sc/source/ui/vba/vbaworksheets.hxx
-index 9814cf5..a57a86a 100644
---- sc/source/ui/vba/vbaworksheets.hxx
-+++ sc/source/ui/vba/vbaworksheets.hxx
-@@ -32,18 +32,18 @@
+Index: sc/source/ui/vba/vbaoutline.hxx
+===================================================================
+--- sc/source/ui/vba/vbaoutline.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbaoutline.hxx	(.../cws/npower11)	(revision 266650)
+@@ -32,17 +32,17 @@
  
+ #include <com/sun/star/sheet/XSheetOutline.hpp>
  #include <cppuhelper/implbase1.hxx>
- 
--#include <org/openoffice/excel/XWorksheets.hpp>
-+#include <ooo/vba/excel/XWorksheets.hpp>
- #include <com/sun/star/sheet/XSpreadsheets.hpp>
- #include <com/sun/star/container/XEnumerationAccess.hpp>
+-#include <org/openoffice/excel/XOutline.hpp>
++#include <ooo/vba/excel/XOutline.hpp>
  #include <com/sun/star/uno/XComponentContext.hpp>
--#include <org/openoffice/vba/XGlobals.hpp>
-+#include <ooo/vba/XGlobals.hpp>
-  
- #include "vbacollectionimpl.hxx"
- 
- class ScModelObj;
- 
+ #include "vbahelperinterface.hxx"
  
--typedef CollTestImplHelper< oo::excel::XWorksheets > ScVbaWorksheets_BASE;
-+typedef CollTestImplHelper< ov::excel::XWorksheets > ScVbaWorksheets_BASE;
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XOutline > ScVbaOutline_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XOutline > ScVbaOutline_BASE;
  
- class ScVbaWorksheets : public ScVbaWorksheets_BASE
+ class ScVbaOutline :  public ScVbaOutline_BASE 
  {
-@@ -53,8 +53,8 @@ protected:
- 	// ScVbaWorksheets_BASE
- 	virtual css::uno::Any getItemByStringIndex( const rtl::OUString& sIndex ) throw (css::uno::RuntimeException);
+ 	css::uno::Reference< css::sheet::XSheetOutline > mxOutline;
  public:
--	ScVbaWorksheets( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, const css::uno::Reference< css::frame::XModel >& xModel );
--	ScVbaWorksheets( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum,  const css::uno::Reference< css::frame::XModel >& xModel );
-+	ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, const css::uno::Reference< css::frame::XModel >& xModel );
-+	ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum,  const css::uno::Reference< css::frame::XModel >& xModel );
- 	virtual ~ScVbaWorksheets() {}
- 
- 	bool isSelectedSheets();
-diff --git sc/source/ui/vba/vbawsfunction.cxx sc/source/ui/vba/vbawsfunction.cxx
-index 1f7a8cc..f6c3565 100644
---- sc/source/ui/vba/vbawsfunction.cxx
-+++ sc/source/ui/vba/vbawsfunction.cxx
-@@ -42,13 +42,14 @@
- #include <comphelper/anytostring.hxx>
+-	ScVbaOutline( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
++	ScVbaOutline( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ 		 css::uno::Reference<css::sheet::XSheetOutline> outline): ScVbaOutline_BASE( xParent, xContext) , mxOutline(outline)
+ 	{}
+ 	virtual ~ScVbaOutline(){}
+Index: sc/source/ui/vba/vbacharts.cxx
+===================================================================
+--- sc/source/ui/vba/vbacharts.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/source/ui/vba/vbacharts.cxx	(.../cws/npower11)	(revision 266650)
+@@ -32,10 +32,10 @@
+ #include <com/sun/star/table/XTableChartsSupplier.hpp>
  
- #include "vbawsfunction.hxx"
-+#include "opcode.hxx"
-+#include "compiler.hxx"
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
  
- using namespace com::sun::star;
--using namespace org::openoffice;
-+using namespace ooo::vba;
  
--ScVbaWSFunction::ScVbaWSFunction( const uno::Reference< vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext): ScVbaWSFunction_BASE( xParent, xContext )
-+ScVbaWSFunction::ScVbaWSFunction( const uno::Reference< XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext): ScVbaWSFunction_BASE( xParent, xContext )
+-ScVbaCharts::ScVbaCharts( const css::uno::Reference< oo::vba::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext ) : Charts_BASE(_xParent, _xContext, uno::Reference< container::XIndexAccess >() )
++ScVbaCharts::ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext ) : Charts_BASE(_xParent, _xContext, uno::Reference< container::XIndexAccess >() )
  {
--	m_xNameAccess.set(  mxContext->getServiceManager()->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.FunctionDescriptions") ), mxContext ), uno::UNO_QUERY_THROW );
+ 	// #TODO #FIXME surely this is wrong, you should never use the 
+ 	// currently documement ( it could be anything )
+@@ -118,7 +118,7 @@
+ 	if ( sNames.getLength() == 0 )
+ 	{
+ 		sNames.realloc( 1 );
+-		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Charts") );
++		sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Charts") );
+ 	}
+ 	return sNames;
  }
+Index: sc/inc/compiler.hxx
+===================================================================
+--- sc/inc/compiler.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/inc/compiler.hxx	(.../cws/npower11)	(revision 266650)
+@@ -354,6 +354,9 @@
+     static BOOL EnQuote( String& rStr );
+     
  
++    // Check if it is a valid english function name
++    bool IsEnglishSymbol( const String& rName ); 
++
+     //! _either_ CompileForFAP _or_ AutoCorrection, _not_ both
+     void            SetCompileForFAP( BOOL bVal )
+                         { bCompileForFAP = bVal; bIgnoreErrors = bVal; }
+Index: sc/inc/cellsuno.hxx
+===================================================================
+--- sc/inc/cellsuno.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/inc/cellsuno.hxx	(.../cws/npower11)	(revision 266650)
+@@ -149,6 +149,13 @@
+ 						const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner );
+ };
  
-@@ -86,7 +87,24 @@ ScVbaWSFunction::invoke(const rtl::OUString& FunctionName, const uno::Sequence<
- 	for ( int count=0; count < aParamTemp.getLength(); ++count )
- 		OSL_TRACE("Param[%d] is %s",
- 			count, rtl::OUStringToOString( comphelper::anyToString( aParamTemp[count] ), RTL_TEXTENCODING_UTF8 ).getStr()  );
--	return xFunctionAccess->callFunction(FunctionName,aParamTemp);
-+	
-+	uno::Any aRet = xFunctionAccess->callFunction(FunctionName,aParamTemp);
-+	// MATCH function should alwayse return a double value, but currently if the first argument is XCellRange, MATCH function returns an array instead of a double value. Don't know why?
-+	// To fix this issue in safe, current solution is to convert this array to a double value just for MATCH function.
-+	String aUpper( FunctionName );
-+	OpCode eOp = ScCompiler::GetEnglishOpCode( aUpper.ToUpperAscii() );
-+	if( eOp == ocMatch )
-+	{
-+		double fVal = 0.0;
-+		if( aRet >>= fVal )
-+			return aRet;
-+		uno::Sequence< uno::Sequence< uno::Any > > aSequence;
-+		if( !( ( aRet >>= aSequence ) && ( aSequence.getLength() > 0 ) &&
-+			( aSequence[0].getLength() > 0 ) && ( aSequence[0][0] >>= fVal ) ) )
-+				throw uno::RuntimeException();
-+		aRet <<= fVal;
++namespace ooo
++{
++    namespace vba {
++	class ScVbaCellRangeAccess;  // Vba Helper class 
++    }
 +}
-+	return aRet;
- }
++
+ class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet,
+ 						 public com::sun::star::beans::XMultiPropertySet,
+ 						 public com::sun::star::beans::XPropertyState,
+@@ -168,8 +175,7 @@
+ {
+ 	friend class ScTabViewObj;		// fuer select()
+ 	friend class ScTableSheetObj;	// fuer createCursorByRange()
+-	friend class NumFormatHelper;	// VBA helper Class that helps manipulate format data
+-	friend class ScVbaRange;	//Main VBA helper class for Range
++ 	friend class ooo::vba::ScVbaCellRangeAccess;
  
- void SAL_CALL
-@@ -107,7 +125,10 @@ ScVbaWSFunction::hasMethod(const rtl::OUString& Name)  throw(uno::RuntimeExcepti
- 	sal_Bool bIsFound = sal_False;
- 	try 
- 	{
--		if ( m_xNameAccess->hasByName( Name ) )
-+		// the function name contained in the com.sun.star.sheet.FunctionDescription service is alwayse localized.
-+		// but the function name used in WorksheetFunction is a programmatic name (seems English).
-+		// So m_xNameAccess->hasByName( Name ) may fail to find name when a function name has a localized name.
-+		if( ScCompiler::IsEnglishSymbol( Name ) )
- 			bIsFound = sal_True;
- 	}
- 	catch( uno::Exception& /*e*/ )
-@@ -146,7 +167,7 @@ ScVbaWSFunction::getServiceNames()
- 	if ( aServiceNames.getLength() == 0 )
- 	{
- 		aServiceNames.realloc( 1 );
--		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.WorksheetFunction" ) );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.WorksheetFunction" ) );
- 	}
- 	return aServiceNames;
- }
-diff --git sc/source/ui/vba/vbawsfunction.hxx sc/source/ui/vba/vbawsfunction.hxx
-index 705520b..4a4fd83 100644
---- sc/source/ui/vba/vbawsfunction.hxx
-+++ sc/source/ui/vba/vbawsfunction.hxx
-@@ -30,20 +30,19 @@
- #ifndef SC_VBA_INTERIOR_HXX
- #define SC_VBA_INTERIOR_HXX
+ private:
+ 	SfxItemPropertySet		aPropSet;
+Index: sc/inc/olinetab.hxx
+===================================================================
+--- sc/inc/olinetab.hxx	(.../tags/DEV300_m39)	(revision 266650)
++++ sc/inc/olinetab.hxx	(.../cws/npower11)	(revision 266650)
+@@ -111,7 +111,7 @@
  
--#include <org/openoffice/excel/XWorksheetFunction.hpp>
-+#include <ooo/vba/excel/XWorksheetFunction.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include "vbarange.hxx"
+     ScOutlineEntry*         GetEntry( USHORT nLevel, USHORT nIndex ) const;
+     USHORT                  GetCount( USHORT nLevel ) const;
+-    ScOutlineEntry*         GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) const;
++    SC_DLLPUBLIC ScOutlineEntry*         GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) const;
  
- #include <com/sun/star/beans/XExactName.hpp>
- #include <com/sun/star/container/XNameAccess.hpp>
+     BOOL                    GetEntryIndex( USHORT nLevel, SCCOLROW nPos, USHORT& rnIndex ) const;
+     BOOL                    GetEntryIndexInRange(
+Index: basic/source/runtime/step2.cxx
+===================================================================
+--- basic/source/runtime/step2.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ basic/source/runtime/step2.cxx	(.../cws/npower11)	(revision 266650)
+@@ -71,7 +71,7 @@
+ 	xCtx.set( xProps->getPropertyValue( rtl::OUString(
+ 		RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))),
+ 			UNO_QUERY_THROW );
+-	SbUnoObject dGlobs( String( RTL_CONSTASCII_USTRINGPARAM("ExcelGlobals") ), xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/org.openoffice.vba.theGlobals") ) );
++	SbUnoObject dGlobs( String( RTL_CONSTASCII_USTRINGPARAM("ExcelGlobals") ), xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/ooo.vba.theGlobals") ) );
  
--typedef InheritedHelperInterfaceImpl1< oo::excel::XWorksheetFunction > ScVbaWSFunction_BASE;
-+typedef InheritedHelperInterfaceImpl1< ov::excel::XWorksheetFunction > ScVbaWSFunction_BASE;
+ 	SbxVariable *vba = dGlobs.Find( String( RTL_CONSTASCII_USTRINGPARAM("getGlobals") ) , SbxCLASS_DONTCARE );
  
- class ScVbaWSFunction :  public ScVbaWSFunction_BASE
- {
--	css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
- public:
--	ScVbaWSFunction( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
-+	ScVbaWSFunction( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
- 	virtual ~ScVbaWSFunction(){}
+Index: basic/source/classes/sbunoobj.cxx
+===================================================================
+--- basic/source/classes/sbunoobj.cxx	(.../tags/DEV300_m39)	(revision 266650)
++++ basic/source/classes/sbunoobj.cxx	(.../cws/npower11)	(revision 266650)
+@@ -117,7 +117,7 @@
+ static String ID_DBG_METHODS( RTL_CONSTASCII_USTRINGPARAM("Dbg_Methods") );
  
- 	virtual css::uno::Reference< css::beans::XIntrospectionAccess >  SAL_CALL getIntrospection(void)  throw(css::uno::RuntimeException);
-diff --git scripting/source/dlgprov/dlgevtatt.cxx scripting/source/dlgprov/dlgevtatt.cxx
-index dcefd2d..07ca7d3 100644
---- scripting/source/dlgprov/dlgevtatt.cxx
-+++ scripting/source/dlgprov/dlgevtatt.cxx
-@@ -54,7 +54,7 @@
- #include <com/sun/star/beans/MethodConcept.hpp>
- #include <com/sun/star/beans/XMaterialHolder.hpp>
- #ifdef FAKE_VBA_EVENT_SUPPORT
--#include <org/openoffice/vba/XVBAToOOEventDescGen.hpp>
-+#include <ooo/vba/XVBAToOOEventDescGen.hpp>
- #endif
+ static ::rtl::OUString aSeqLevelStr( RTL_CONSTASCII_USTRINGPARAM("[]") );
+-static ::rtl::OUString defaultNameSpace( RTL_CONSTASCII_USTRINGPARAM("org.openoffice") );
++static ::rtl::OUString defaultNameSpace( RTL_CONSTASCII_USTRINGPARAM("ooo.vba") );
  
- using namespace ::com::sun::star;
-@@ -125,7 +125,7 @@ namespace dlgprov
-         {
-             Sequence< Any > args(1);
-             args[0] <<= xModel;
--            mxListener = Reference< XScriptListener >( xSMgr->createInstanceWithArgumentsAndContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.EventListener" ) ), args, m_xContext ), UNO_QUERY );
-+            mxListener = Reference< XScriptListener >( xSMgr->createInstanceWithArgumentsAndContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.EventListener" ) ), args, m_xContext ), UNO_QUERY );
-         }
-         if ( rxControl.is() )
-         {
-@@ -199,7 +199,7 @@ namespace dlgprov
-         Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
-         if ( xSMgr.is() )
-         {
--            Reference< org::openoffice::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.VBAToOOEventDesc" ) ), m_xContext ), UNO_QUERY );
-+            Reference< ooo::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAToOOEventDesc" ) ), m_xContext ), UNO_QUERY );
-             if ( xVBAToOOEvtDesc.is() )
-                 xEventsSupplier.set( xVBAToOOEvtDesc->getEventSupplier( xControl ), UNO_QUERY );
-             
+ // Gets the default property for an uno object. Note: There is some
+ // redirection built in. The property name specifies the name
+@@ -1600,7 +1600,7 @@
+ 			OSL_TRACE("Checking if object implements %s",
+ 				OUStringToOString( defaultNameSpace + aClass,
+ 					RTL_TEXTENCODING_UTF8 ).getStr() );
+-			// although interfaces in the org.openoffice.vba namespace
++			// although interfaces in the ooo.vba.vba namespace
+ 			// obey the idl rules and have a leading X, in basic we
+ 			// want to be able to do something like
+ 			// 'dim wrkbooks as WorkBooks'
+
+Property changes on: solenv/bin/modules/Cws.pm
+___________________________________________________________________
+Added: svn:mergeinfo
+   Merged /trunk/solenv/bin/modules/Cws.pm:r263289-266529
+   Merged /cws/appleremote01/solenv/bin/modules/Cws.pm:r261927-262777
+   Merged /cws/basebmpunittestfix/solenv/bin/modules/Cws.pm:r262088-262763
+   Merged /cws/svnl10nmerge/solenv/bin/modules/Cws.pm:r261961-262281
+   Merged /cws/hr54/solenv/bin/modules/Cws.pm:r262088-262569
+   Merged /cws/hr55/solenv/bin/modules/Cws.pm:r262621-262856
+   Merged /tags/DEV300_m32/solenv/bin/modules/Cws.pm:r261926-261960
+   Merged /cws/bmpsum1/solenv/bin/modules/Cws.pm:r262621-262796
+   Merged /cws/sb97/solenv/bin/modules/Cws.pm:r262088-262770
+   Merged /cws/sb99/solenv/bin/modules/Cws.pm:r262088-262817
+   Merged /cws/impresszoom/solenv/bin/modules/Cws.pm:r261927-262795
+   Merged /cws/cli001/solenv/bin/modules/Cws.pm:r262088-262280
+   Merged /cws/cli002/solenv/bin/modules/Cws.pm:r262088-262753
+   Merged /cws/cli003/solenv/bin/modules/Cws.pm:r262621-262819
+   Merged /tags/DEV300_m39/solenv/bin/modules/Cws.pm:r266426-266529
+   Merged /cws/rt33/solenv/bin/modules/Cws.pm:r262088-262231
+   Merged /cws/odbmacros3/solenv/bin/modules/Cws.pm:r261929-262238
+   Merged /cws/svnignoreoutpaths/solenv/bin/modules/Cws.pm:r262088-262759
+   Merged /cws/vcl95/solenv/bin/modules/Cws.pm:r261927-262773
+   Merged /cws/qadocinfo/solenv/bin/modules/Cws.pm:r262621-263278
+   Merged /cws/aw057/solenv/bin/modules/Cws.pm:r262017-262273
+   Merged /cws/os120/solenv/bin/modules/Cws.pm:r261927-262782
+
+
+Property changes on: solenv/bin/modules/CwsConfig.pm
+___________________________________________________________________
+Added: svn:mergeinfo
+   Merged /cws/svnl10nmerge/solenv/bin/modules/CwsConfig.pm:r261961-262281
+   Merged /cws/hr54/solenv/bin/modules/CwsConfig.pm:r262088-262569
+   Merged /cws/hr55/solenv/bin/modules/CwsConfig.pm:r262621-262856
+   Merged /tags/DEV300_m32/solenv/bin/modules/CwsConfig.pm:r261926-261960
+   Merged /cws/bmpsum1/solenv/bin/modules/CwsConfig.pm:r262621-262796
+   Merged /cws/sb97/solenv/bin/modules/CwsConfig.pm:r262088-262770
+   Merged /cws/sb99/solenv/bin/modules/CwsConfig.pm:r262088-262817
+   Merged /cws/impresszoom/solenv/bin/modules/CwsConfig.pm:r261927-262795
+   Merged /cws/cli001/solenv/bin/modules/CwsConfig.pm:r262088-262280
+   Merged /cws/cli002/solenv/bin/modules/CwsConfig.pm:r262088-262753
+   Merged /cws/cli003/solenv/bin/modules/CwsConfig.pm:r262621-262819
+   Merged /tags/DEV300_m39/solenv/bin/modules/CwsConfig.pm:r266426-266529
+   Merged /cws/rt33/solenv/bin/modules/CwsConfig.pm:r262088-262231
+   Merged /cws/odbmacros3/solenv/bin/modules/CwsConfig.pm:r261929-262238
+   Merged /cws/vcl95/solenv/bin/modules/CwsConfig.pm:r261927-262773
+   Merged /cws/svnignoreoutpaths/solenv/bin/modules/CwsConfig.pm:r262088-262759
+   Merged /cws/qadocinfo/solenv/bin/modules/CwsConfig.pm:r262621-263278
+   Merged /cws/aw057/solenv/bin/modules/CwsConfig.pm:r262017-262273
+   Merged /cws/os120/solenv/bin/modules/CwsConfig.pm:r261927-262782
+   Merged /trunk/solenv/bin/modules/CwsConfig.pm:r263289-266529
+   Merged /cws/appleremote01/solenv/bin/modules/CwsConfig.pm:r261927-262777
+   Merged /cws/basebmpunittestfix/solenv/bin/modules/CwsConfig.pm:r262088-262763
+
+
+Property changes on: solenv/bin/cws.pl
+___________________________________________________________________
+Added: svn:mergeinfo
+   Merged /cws/basebmpunittestfix/solenv/bin/cws.pl:r262088-262763
+   Merged /cws/svnl10nmerge/solenv/bin/cws.pl:r261961-262281
+   Merged /cws/hr54/solenv/bin/cws.pl:r262088-262569
+   Merged /cws/hr55/solenv/bin/cws.pl:r262621-262856
+   Merged /tags/DEV300_m32/solenv/bin/cws.pl:r261926-261960
+   Merged /cws/bmpsum1/solenv/bin/cws.pl:r262621-262796
+   Merged /cws/sb97/solenv/bin/cws.pl:r262088-262770
+   Merged /cws/sb99/solenv/bin/cws.pl:r262088-262817
+   Merged /cws/impresszoom/solenv/bin/cws.pl:r261927-262795
+   Merged /cws/cli001/solenv/bin/cws.pl:r262088-262280
+   Merged /cws/cli002/solenv/bin/cws.pl:r262088-262753
+   Merged /cws/cli003/solenv/bin/cws.pl:r262621-262819
+   Merged /tags/DEV300_m39/solenv/bin/cws.pl:r266426-266529
+   Merged /cws/rt33/solenv/bin/cws.pl:r262088-262231
+   Merged /cws/odbmacros3/solenv/bin/cws.pl:r261929-262238
+   Merged /cws/svnignoreoutpaths/solenv/bin/cws.pl:r262088-262759
+   Merged /cws/vcl95/solenv/bin/cws.pl:r261927-262773
+   Merged /cws/qadocinfo/solenv/bin/cws.pl:r262621-263278
+   Merged /cws/aw057/solenv/bin/cws.pl:r262017-262273
+   Merged /cws/os120/solenv/bin/cws.pl:r261927-262782
+   Merged /trunk/solenv/bin/cws.pl:r263289-266527
+   Merged /cws/appleremote01/solenv/bin/cws.pl:r261927-262777
+
+
+Property changes on: solenv/bin
+___________________________________________________________________
+Added: svn:mergeinfo
+   Merged /cws/sb99/solenv/bin:r262088-262817
+   Merged /cws/impresszoom/solenv/bin:r261927-262795
+   Merged /cws/cli001/solenv/bin:r262088-262280
+   Merged /cws/cli002/solenv/bin:r262088-262753
+   Merged /cws/cli003/solenv/bin:r262621-262819
+   Merged /tags/DEV300_m39/solenv/bin:r266426-266529
+   Merged /cws/rt33/solenv/bin:r262088-262231
+   Merged /cws/odbmacros3/solenv/bin:r261929-262238
+   Merged /cws/vcl95/solenv/bin:r261927-262773
+   Merged /cws/svnignoreoutpaths/solenv/bin:r262088-262759
+   Merged /cws/aw057/solenv/bin:r262017-262273
+   Merged /cws/qadocinfo/solenv/bin:r262621-263278
+   Merged /cws/os120/solenv/bin:r261927-262782
+   Merged /trunk/solenv/bin:r263289-266425
+   Merged /cws/appleremote01/solenv/bin:r261927-262777
+   Merged /cws/basebmpunittestfix/solenv/bin:r262088-262763
+   Merged /cws/svnl10nmerge/solenv/bin:r261961-262281
+   Merged /cws/hr54/solenv/bin:r262088-262569
+   Merged /cws/hr55/solenv/bin:r262621-262856
+   Merged /cws/sb97/solenv/bin:r262088-262770
+   Merged /cws/bmpsum1/solenv/bin:r262621-262796
+   Merged /tags/DEV300_m32/solenv/bin:r261926-261960
+
+
+Property changes on: .
+___________________________________________________________________
+Added: svn:mergeinfo
+   Merged /trunk:r263289-266425
+   Merged /tags/DEV300_m39:r266426-266529
+

Modified: trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff
==============================================================================
--- trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff	(original)
+++ trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff	Thu Jan 29 14:52:06 2009
@@ -93,86 +93,86 @@
 --- sc/source/ui/vba/vbaapplication.cxx
 +++ sc/source/ui/vba/vbaapplication.cxx
 @@ -84,10 +84,16 @@
- 
- #include "convuno.hxx"
- #include "cellsuno.hxx"
-+#include "miscuno.hxx"
-+#include "unonames.hxx"
- #include "docsh.hxx"
- 
- using namespace ::ooo::vba;
- using namespace ::com::sun::star;
-+using ::com::sun::star::uno::Reference;
-+using ::com::sun::star::uno::UNO_QUERY_THROW;
-+using ::com::sun::star::uno::UNO_QUERY;
-+using ::rtl::OUString;
- 
- // Enable our own join detection for Intersection and Union
- // should be more efficient than using ScRangeList::Join ( because
+ 
+ #include "convuno.hxx"
+ #include "cellsuno.hxx"
++#include "miscuno.hxx"
++#include "unonames.hxx"
+ #include "docsh.hxx"
+ 
+ using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
++using ::com::sun::star::uno::Reference;
++using ::com::sun::star::uno::UNO_QUERY_THROW;
++using ::com::sun::star::uno::UNO_QUERY;
++using ::rtl::OUString;
+ 
+ // Enable our own join detection for Intersection and Union
+ // should be more efficient than using ScRangeList::Join ( because
 @@ -155,11 +161,31 @@ uno::Any SAL_CALL
- ScVbaApplication::getSelection() throw (uno::RuntimeException)
- {
-     OSL_TRACE("** ScVbaApplication::getSelection() ** ");
--    uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
--    rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
--    if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
-+
-+    Reference< view::XSelectionSupplier > xSelSupp( getCurrentDocument()->getCurrentController(), UNO_QUERY_THROW );
-+    Reference< beans::XPropertySet > xPropSet( xSelSupp, UNO_QUERY_THROW );
-+    OUString aPropName = OUString::createFromAscii( SC_UNO_FILTERED_RANGE_SELECTION );
-+    uno::Any aOldVal = xPropSet->getPropertyValue( aPropName );
-+    uno::Any any;
-+    any <<= sal_False;
-+    xPropSet->setPropertyValue( aPropName, any );
-+    uno::Reference< uno::XInterface > aSelection = ScUnoHelpFunctions::AnyToInterface(
-+        xSelSupp->getSelection() );
-+    xPropSet->setPropertyValue( aPropName, aOldVal );
-+
-+    if (!aSelection.is())
-+    {
-+        throw uno::RuntimeException( 
-+            rtl::OUString::createFromAscii("failed to obtain current selection"), 
-+            uno::Reference< uno::XInterface >() );
-+    }
-+
-+    uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW );
-+    rtl::OUString sImplementationName = xServiceInfo->getImplementationName();
-+
-+    if( sImplementationName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
-     {
--        uno::Reference< drawing::XShapes > xShapes( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
-+        uno::Reference< drawing::XShapes > xShapes( aSelection, uno::UNO_QUERY_THROW );
-         uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
-         uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
-     	// if ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape
+ ScVbaApplication::getSelection() throw (uno::RuntimeException)
+ {
+     OSL_TRACE("** ScVbaApplication::getSelection() ** ");
+-    uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
+-    rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
+-    if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
++
++    Reference< view::XSelectionSupplier > xSelSupp( getCurrentDocument()->getCurrentController(), UNO_QUERY_THROW );
++    Reference< beans::XPropertySet > xPropSet( xSelSupp, UNO_QUERY_THROW );
++    OUString aPropName = OUString::createFromAscii( SC_UNO_FILTERED_RANGE_SELECTION );
++    uno::Any aOldVal = xPropSet->getPropertyValue( aPropName );
++    uno::Any any;
++    any <<= sal_False;
++    xPropSet->setPropertyValue( aPropName, any );
++    uno::Reference< uno::XInterface > aSelection = ScUnoHelpFunctions::AnyToInterface(
++        xSelSupp->getSelection() );
++    xPropSet->setPropertyValue( aPropName, aOldVal );
++
++    if (!aSelection.is())
++    {
++        throw uno::RuntimeException( 
++            rtl::OUString::createFromAscii("failed to obtain current selection"), 
++            uno::Reference< uno::XInterface >() );
++    }
++
++    uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW );
++    rtl::OUString sImplementationName = xServiceInfo->getImplementationName();
++
++    if( sImplementationName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
+     {
+-        uno::Reference< drawing::XShapes > xShapes( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
++        uno::Reference< drawing::XShapes > xShapes( aSelection, uno::UNO_QUERY_THROW );
+         uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
+         uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
+     	// if ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape
 @@ -170,7 +196,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
-     		uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
-     		if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) )  )
-     		{
--            		return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
-+                return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
-     		}
-     	}
-         return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, ScVbaShape::getType( xShape ) ) ) );
+     		uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
+     		if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) )  )
+     		{
+-            		return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
++                return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
+     		}
+     	}
+         return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, ScVbaShape::getType( xShape ) ) ) );
 @@ -178,10 +204,10 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
-     else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
-              xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
-     {
--	    uno::Reference< table::XCellRange > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
-+	    uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY);
- 	    if ( !xRange.is() )
- 	    {
--		    uno::Reference< sheet::XSheetCellRangeContainer > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
-+		    uno::Reference< sheet::XSheetCellRangeContainer > xRanges( aSelection, ::uno::UNO_QUERY);
- 		    if ( xRanges.is() )
- 			    return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( this, mxContext, xRanges ) ) );
- 
+     else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
+              xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
+     {
+-	    uno::Reference< table::XCellRange > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
++	    uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY);
+ 	    if ( !xRange.is() )
+ 	    {
+-		    uno::Reference< sheet::XSheetCellRangeContainer > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
++		    uno::Reference< sheet::XSheetCellRangeContainer > xRanges( aSelection, ::uno::UNO_QUERY);
+ 		    if ( xRanges.is() )
+ 			    return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( this, mxContext, xRanges ) ) );
+ 
 @@ -190,7 +216,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
-     }
-     else
-     {
--        throw uno::RuntimeException( sImpementaionName + rtl::OUString::createFromAscii(" donot be surpported"), uno::Reference< uno::XInterface >() );
-+        throw uno::RuntimeException( sImplementationName + rtl::OUString::createFromAscii(" not surpported"), uno::Reference< uno::XInterface >() );
-     }
- }
- 
+     }
+     else
+     {
+-        throw uno::RuntimeException( sImpementaionName + rtl::OUString::createFromAscii(" donot be surpported"), uno::Reference< uno::XInterface >() );
++        throw uno::RuntimeException( sImplementationName + rtl::OUString::createFromAscii(" not surpported"), uno::Reference< uno::XInterface >() );
+     }
+ }
+ 

Modified: trunk/patches/vba/api-application-caller.diff
==============================================================================
--- trunk/patches/vba/api-application-caller.diff	(original)
+++ trunk/patches/vba/api-application-caller.diff	Thu Jan 29 14:52:06 2009
@@ -15,40 +15,40 @@
 --- sc/source/ui/vba/vbaapplication.cxx
 +++ sc/source/ui/vba/vbaapplication.cxx
 @@ -110,6 +110,8 @@ using ::rtl::OUString;
- 
- #define EXCELVERSION "11.0"
- 
-+uno::Any sbxToUnoValue( SbxVariable* pVar );
-+
- class ActiveWorkbook : public ScVbaWorkbook
- {
- protected:
+ 
+ #define EXCELVERSION "11.0"
+ 
++uno::Any sbxToUnoValue( SbxVariable* pVar );
++
+ class ActiveWorkbook : public ScVbaWorkbook
+ {
+ protected:
 @@ -1302,6 +1304,25 @@ ScVbaApplication::setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw (
- 	}	
- }
- 
-+uno::Any SAL_CALL 
-+ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException )
-+{
-+	StarBASIC* pBasic = SFX_APP()->GetBasic();
-+	SFX_APP()->EnterBasicCall();
-+	SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FuncCaller") ), SbxCLASS_METHOD );
-+	uno::Any aRet;	
-+	if ( pMeth )
-+	{
-+		SbxVariableRef refTemp = pMeth;
-+		// forces a broadcast
-+		SbxVariableRef pNew = new  SbxMethod( *((SbxMethod*)pMeth));
-+                OSL_TRACE("pNew has type %d and string value %s", pNew->GetType(), rtl::OUStringToOString( pNew->GetString(), RTL_TEXTENCODING_UTF8 ).getStr() );
-+		aRet = sbxToUnoValue( pNew );
-+	}
-+	SFX_APP()->LeaveBasicCall();
-+	return aRet;
-+}
-+
- rtl::OUString& 
- ScVbaApplication::getServiceImplName()
- {
+ 	}	
+ }
+ 
++uno::Any SAL_CALL 
++ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException )
++{
++	StarBASIC* pBasic = SFX_APP()->GetBasic();
++	SFX_APP()->EnterBasicCall();
++	SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FuncCaller") ), SbxCLASS_METHOD );
++	uno::Any aRet;	
++	if ( pMeth )
++	{
++		SbxVariableRef refTemp = pMeth;
++		// forces a broadcast
++		SbxVariableRef pNew = new  SbxMethod( *((SbxMethod*)pMeth));
++                OSL_TRACE("pNew has type %d and string value %s", pNew->GetType(), rtl::OUStringToOString( pNew->GetString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++		aRet = sbxToUnoValue( pNew );
++	}
++	SFX_APP()->LeaveBasicCall();
++	return aRet;
++}
++
+ rtl::OUString& 
+ ScVbaApplication::getServiceImplName()
+ {
 diff --git sc/source/ui/vba/vbaapplication.hxx sc/source/ui/vba/vbaapplication.hxx
 index 1c2631e..754885e 100644
 --- sc/source/ui/vba/vbaapplication.hxx



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