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



Author: noelpwer
Date: Tue Dec  2 10:17:20 2008
New Revision: 14677
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14677&view=rev

Log:
2008-12-02  Noel Power <noel power novell com>

        * patches/vba/ObjectModule.diff: apply namespace changes
        * patches/vba/vba-font-api.diff:
        * patches/vba/basic-ide-module-object-name-combile.diff:
        * patches/vba/vbaevents-services-sources.diff:
        * patches/vba/svx-source-form-fmundo-cxx.diff:
        * patches/vba/vba-userform.diff:
        * patches/vba/vba-fix-font-attribute-access.diff:
        * patches/vba/vba-error-object.diff:
        * patches/vba/oovbaapi-disable-vba.diff:
        * patches/vba/vba-allow-ranges-for-cell-functions.diff:
        * patches/vba/api-application-caller.diff:
        * patches/vba/vba-worksheet-enableselection.diff:
        * patches/vba/vba-workbook-worksheet-events.diff:
        * patches/vba/vba-fix-commandbar-submenu.diff:
        * patches/vba/vba-fix-ide-friendly-modulename.diff:
        * patches/dev300/vba-get-nonfiltered-range-selection.diff:
        * patches/dev300/unused-methods-removal-sc.diff:
        * patches/dev300/cws-npower11.diff:



Modified:
   trunk/ChangeLog
   trunk/patches/dev300/cws-npower11.diff
   trunk/patches/dev300/unused-methods-removal-sc.diff
   trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff
   trunk/patches/vba/ObjectModule.diff
   trunk/patches/vba/api-application-caller.diff
   trunk/patches/vba/basic-ide-module-object-name-combile.diff
   trunk/patches/vba/oovbaapi-disable-vba.diff
   trunk/patches/vba/svx-source-form-fmundo-cxx.diff
   trunk/patches/vba/vba-allow-ranges-for-cell-functions.diff
   trunk/patches/vba/vba-error-object.diff
   trunk/patches/vba/vba-fix-commandbar-submenu.diff
   trunk/patches/vba/vba-fix-font-attribute-access.diff
   trunk/patches/vba/vba-fix-ide-friendly-modulename.diff
   trunk/patches/vba/vba-font-api.diff
   trunk/patches/vba/vba-userform.diff
   trunk/patches/vba/vba-workbook-worksheet-events.diff
   trunk/patches/vba/vba-worksheet-enableselection.diff
   trunk/patches/vba/vbaevents-services-sources.diff

Modified: trunk/patches/dev300/cws-npower11.diff
==============================================================================
--- trunk/patches/dev300/cws-npower11.diff	(original)
+++ trunk/patches/dev300/cws-npower11.diff	Tue Dec  2 10:17:20 2008
@@ -1,775 +1,245 @@
-Index: sc/inc/compiler.hxx
+Index: oovbaapi/genconstidl/api-to-idl.pl
 ===================================================================
-RCS file: /cvs/sc/sc/inc/compiler.hxx,v
-retrieving revision 1.39
-retrieving revision 1.39.24.1
-diff -u -p -u -p -b -w -B -r1.39 -r1.39.24.1
---- sc/inc/compiler.hxx	8 Jul 2008 07:19:00 -0000	1.39
-+++ sc/inc/compiler.hxx	11 Sep 2008 06:11:48 -0000	1.39.24.1
-@@ -513,6 +513,9 @@ public:
-      */
-     static OpCodeMapPtr GetOpCodeMap( const sal_Int32 nLanguage );
- 
-+    // Check if it is a valid english function name
-+    static bool IsEnglishSymbol( const String& rName ); 
+--- oovbaapi/genconstidl/api-to-idl.pl	(revision 264185)
++++ oovbaapi/genconstidl/api-to-idl.pl	(revision 264308)
+@@ -131,7 +131,7 @@ sub generate_idls($) {
+             my $fname = $path . "/" . $type . ".idl";
+             open( IDL, ">$fname" ) || die "Cannot write $fname.";
+             
+-            print IDL "module org { module openoffice { module $module {\n";
++            print IDL "module ooo { module vba { module $module {\n";
+             print IDL "    constants $type {\n";
+             foreach $constant ( @{$result{$module}{$type}} ) {
+                 print IDL "        const long $constant->{'name'} = $constant->{'value'};\n";
+Index: oovbaapi/prj/build.lst
+===================================================================
+--- oovbaapi/prj/build.lst	(revision 264185)
++++ oovbaapi/prj/build.lst	(revision 264308)
+@@ -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
+Index: oovbaapi/ooo/vba/XGlobals.idl
+===================================================================
+--- oovbaapi/ooo/vba/XGlobals.idl	(revision 0)
++++ oovbaapi/ooo/vba/XGlobals.idl	(revision 264308)
+@@ -0,0 +1,67 @@
++/*************************************************************************
++ *
++ * 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: XGlobals.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_XGlobals_idl__
++#define __ooo_vba_XGlobals_idl__
 +
-     //! _either_ CompileForFAP _or_ AutoCorrection, _not_ both
-     void            SetCompileForFAP( BOOL bVal )
-                         { bCompileForFAP = bVal; bIgnoreErrors = bVal; }
-Index: sc/inc/document.hxx
-===================================================================
-RCS file: /cvs/sc/sc/inc/document.hxx,v
-retrieving revision 1.115
-retrieving revision 1.115.22.3
-diff -u -p -u -p -b -w -B -r1.115 -r1.115.22.3
---- sc/inc/document.hxx	8 Jul 2008 07:19:13 -0000	1.115
-+++ sc/inc/document.hxx	7 Aug 2008 07:40:08 -0000	1.115.22.3
-@@ -703,7 +703,7 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollec
- 	BOOL			HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect );
- 	BOOL			HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect );
- 
--	ScOutlineTable*	GetOutlineTable( SCTAB nTab, BOOL bCreate = FALSE );
-+	SC_DLLPUBLIC ScOutlineTable*	GetOutlineTable( SCTAB nTab, BOOL bCreate = FALSE );
- 	BOOL			SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
- 
- 	void			DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
-Index: sc/inc/olinetab.hxx
-===================================================================
-RCS file: /cvs/sc/sc/inc/olinetab.hxx,v
-retrieving revision 1.6
-retrieving revision 1.6.96.1
-diff -u -p -u -p -b -w -B -r1.6 -r1.6.96.1
---- sc/inc/olinetab.hxx	10 Apr 2008 18:41:55 -0000	1.6
-+++ sc/inc/olinetab.hxx	29 Jul 2008 06:35:39 -0000	1.6.96.1
-@@ -114,7 +114,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(
-Index: sc/source/core/tool/compiler.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/core/tool/compiler.cxx,v
-retrieving revision 1.81
-retrieving revision 1.81.22.1
-diff -u -p -u -p -b -w -B -r1.81 -r1.81.22.1
---- sc/source/core/tool/compiler.cxx	8 Jul 2008 07:20:31 -0000	1.81
-+++ sc/source/core/tool/compiler.cxx	11 Sep 2008 06:11:48 -0000	1.81.22.1
-@@ -581,6 +581,33 @@ OpCode ScCompiler::GetEnglishOpCode( con
-     return bFound ? (*iLook).second : OpCode(ocNone);
- }
- 
-+// static
-+bool ScCompiler::IsEnglishSymbol( const String& rName )
-+{
-+    // function names are always case-insensitive
-+    String aUpper( ScGlobal::pCharClass->upper( rName ) );
++#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
 +
-+    // 1. built-in function name
-+    OpCode eOp = ScCompiler::GetEnglishOpCode( aUpper );
-+    if ( eOp != ocNone )
-+    {
-+        return true;
-+    }
-+    // 2. old add in functions
-+    USHORT nIndex;
-+    if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
-+    {
-+        return true;
-+    }
++module ooo {  module vba { 
 +
-+    // 3. new (uno) add in functions
-+    String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE ));
-+    if (aIntName.Len())
-+    {
-+        return true;
-+    }
-+    return false;		// no valid function name
-+}
- 
- // static
- ScCompiler::OpCodeMapPtr ScCompiler::CreateOpCodeMap(
-Index: sc/source/ui/vba/makefile.mk
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/makefile.mk,v
-retrieving revision 1.6
-retrieving revision 1.5.42.10
-diff -u -p -u -p -b -w -B -r1.6 -r1.5.42.10
---- sc/source/ui/vba/makefile.mk	11 Apr 2008 00:46:57 -0000	1.6
-+++ sc/source/ui/vba/makefile.mk	19 Sep 2008 18:34:47 -0000	1.5.42.10
-@@ -83,13 +83,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 \
-@@ -111,8 +114,26 @@ 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 ------------------------------------------------------
- 
-Index: sc/source/ui/vba/service.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/service.cxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.5
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.5
---- sc/source/ui/vba/service.cxx	11 Apr 2008 00:47:11 -0000	1.4
-+++ sc/source/ui/vba/service.cxx	7 Aug 2008 07:40:10 -0000	1.3.42.5
-@@ -53,12 +53,22 @@ namespace  worksheet
- {
- extern sdecl::ServiceDecl const serviceDecl;
- }
-+namespace window 
-+{
-+extern sdecl::ServiceDecl const serviceDecl;
-+}
- namespace globals
- {
- extern sdecl::ServiceDecl const serviceDecl;
- }
--
--
-+namespace  userform
-+{
-+extern sdecl::ServiceDecl const serviceDecl;
-+}
-+namespace hyperlink 
++interface XGlobals: com::sun::star::uno::XInterface
 +{
-+extern sdecl::ServiceDecl const serviceDecl;
-+}
- 
- extern "C"
- {
-@@ -76,7 +86,7 @@ extern "C"
- 
- 	// Component registration
-         if ( component_writeInfoHelper( pServiceManager, pRegistryKey, 
--		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl ) )
-+		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl ) )
- 		{
- 			// Singleton registration
- 			try
-@@ -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;
-     }
-Index: sc/source/ui/vba/vbaapplication.cxx
++        // 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
++
++
+Index: oovbaapi/ooo/vba/makefile.mk
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaapplication.cxx,v
-retrieving revision 1.7
-retrieving revision 1.5.42.5
-diff -u -p -u -p -b -w -B -r1.7 -r1.5.42.5
---- sc/source/ui/vba/vbaapplication.cxx	11 Apr 2008 00:47:25 -0000	1.7
-+++ sc/source/ui/vba/vbaapplication.cxx	30 Sep 2008 14:06:04 -0000	1.5.42.5
-@@ -42,6 +42,7 @@
- #include <com/sun/star/task/XStatusIndicator.hpp>
- #include <org/openoffice/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>
- 
-+#include "convuno.hxx"
-+#include "cellsuno.hxx"
-+#include "docsh.hxx"
+--- oovbaapi/ooo/vba/makefile.mk	(revision 0)
++++ oovbaapi/ooo/vba/makefile.mk	(revision 264308)
+@@ -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=..$/..
 +
- using namespace ::org::openoffice;
- 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 )
++PRJNAME=oovbapi
 +
-+#define OWN_JOIN 1
++TARGET=vba
++PACKAGE=ooo$/vba
 +
- // #TODO is this defined somewhere else?
- #if ( defined UNX ) || ( defined OS2 ) //unix
- #define FILE_PATH_SEPERATOR "/"
-@@ -122,9 +136,25 @@ ScVbaApplication::getThisWorkbook() thro
- 	return getActiveWorkbook();
- }
- 
-+uno::Reference< vba::XAssistant > SAL_CALL
-+ScVbaApplication::getAssistant() throw (uno::RuntimeException)
-+{
-+    return uno::Reference< vba::XAssistant >( new ScVbaAssistant( this, mxContext ) );
-+}
++# --- Settings -----------------------------------------------------
++.INCLUDE :  $(PRJ)$/util$/makefile.pmk
 +
-+uno::Any SAL_CALL
-+ScVbaApplication::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
-+{
-+    uno::Reference< vba::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 );
-+}
++.IF "$(ENABLE_VBA)"!="YES"
++dummy:
++        @echo "not building vba..."
++.ENDIF
 +
- 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::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")) ||
-@@ -426,12 +467,17 @@ ScVbaApplication::Range( const uno::Any&
- }
- 
- 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,382 @@ ScVbaApplication::PathSeparator(  ) thro
- 	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< vba::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 );
-+}
++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\
 +
-+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< vba::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 );
-+				}
++.INCLUDE :  target.mk
+Index: oovbaapi/ooo/vba/XCommandBars.idl
+===================================================================
+--- oovbaapi/ooo/vba/XCommandBars.idl	(revision 0)
++++ oovbaapi/ooo/vba/XCommandBars.idl	(revision 264308)
+@@ -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_XCommandBars_idl__
++#define __ooo_vba_XCommandBars_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
 +#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() );
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
 +#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 )
++//=============================================================================
++
++module ooo {  module vba { 
++//=============================================================================
++interface XCommandBar;
++
++interface XCommandBars
 +{
-+	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.
++    interface XCollection;
 +
-+		ScRangeList argIntersect;
-+		lcl_strip_containedRanges( intermediateList );
++    XCommandBar Add( [in] any Name, [in] any Position,  [in] any MenuBar, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
++};
 +
-+		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 ) );
-+		lcl_addRangesToVec( vRanges, Arg30 );
- 
--	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; 
-+
-+	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< vba::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< vba::XHelperInterface >(), mxContext, xRanges );
- 
--	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;
- }
- 
-+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< vba::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< vba::XHelperInterface >(), mxContext, xRanges );
-+	}
-+	
-+    // #FIXME need proper (WorkSheet) parent
-+	return xRange;
-+}
-+
- void
- ScVbaApplication::Volatile( const uno::Any& aVolatile )  throw ( uno::RuntimeException )
- {
-Index: sc/source/ui/vba/vbaapplication.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaapplication.hxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.3
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.3
---- sc/source/ui/vba/vbaapplication.hxx	11 Apr 2008 00:47:42 -0000	1.4
-+++ sc/source/ui/vba/vbaapplication.hxx	29 Jul 2008 06:35:39 -0000	1.3.42.3
-@@ -75,6 +75,8 @@ 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::vba::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< oo::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);
-@@ -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< oo::excel::XRange > SAL_CALL Union( 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::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/vbaassistant.cxx
+Index: oovbaapi/ooo/vba/XCommandBarControls.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbaassistant.cxx
-diff -N sc/source/ui/vba/vbaassistant.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaassistant.cxx	18 Jan 2008 19:27:41 -0000	1.1.2.1
-@@ -0,0 +1,140 @@
+--- oovbaapi/ooo/vba/XCommandBarControls.idl	(revision 0)
++++ oovbaapi/ooo/vba/XCommandBarControls.idl	(revision 264308)
+@@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -804,119 +274,234 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include <sfx2/app.hxx>
-+#include <svtools/helpopt.hxx>
++#ifndef __ooo_vba_XCommandBarControls_idl__
++#define __ooo_vba_XCommandBarControls_idl__
 +
-+#include <org/openoffice/office/MsoAnimationType.hpp>
-+
-+#include"vbaassistant.hxx"
++#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
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++//=============================================================================
 +
-+using namespace org::openoffice::office::MsoAnimationType;
++module ooo {  module vba { 
++//=============================================================================
++interface XCommandBarControl;
 +
-+ScVbaAssistant::ScVbaAssistant( const uno::Reference< vba::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext ): ScVbaAssistantImpl_BASE( xParent, xContext )
++interface XCommandBarControls
 +{
-+    m_bIsVisible = sal_False;
-+    m_nPointsLeft = 795;
-+    m_nPointsTop = 248;
-+    m_sName = rtl::OUString::createFromAscii( "Clippit" );
-+    m_nAnimation = msoAnimationIdle;
-+}
++	interface XCollection;
 +
-+ScVbaAssistant::~ScVbaAssistant()
-+{
-+}
++    XCommandBarControl Add( [in] any Type, [in] any Id, [in] any Parameter, [in] any Before, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
++};
 +
-+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;
-+}
++#endif
+Index: oovbaapi/ooo/vba/msforms/XControl.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XControl.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XControl.idl	(revision 264308)
+@@ -0,0 +1,72 @@
++/*************************************************************************
++ *
++ * 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: XControl.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_XControl_idl__
++#define __ooo_vba_msforms_XControl_idl__
 +
-+sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException)
-+{
-+    if( SvtHelpOptions().IsHelpAgentAutoStartMode() )
-+        return sal_True;
-+    else
-+        return sal_False;
-+}
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
-+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;
-+}
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
-+::rtl::OUString SAL_CALL 
-+ScVbaAssistant::Name(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-+{
-+    return m_sName;
-+}
++module ooo {  module vba {  module msforms { 
 +
-+rtl::OUString& 
-+ScVbaAssistant::getServiceImplName()
++//=============================================================================
++interface XControl
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAssistant") );
-+	return sImplName;
-+}
++	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;
++};
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaAssistant::getServiceNames()
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XImage.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XImage.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XImage.idl	(revision 264308)
+@@ -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_XImage_idl__
++#define __ooo_vba_msforms_XImage_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
++
++module ooo {  module vba {  module msforms { 
++
++//=============================================================================
++interface XImage: com::sun::star::uno::XInterface 
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.vba.Assistant" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbaassistant.hxx
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XShapes.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbaassistant.hxx
-diff -N sc/source/ui/vba/vbaassistant.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaassistant.hxx	18 Jan 2008 19:27:42 -0000	1.1.2.1
-@@ -0,0 +1,78 @@
+--- oovbaapi/ooo/vba/msforms/XShapes.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XShapes.idl	(revision 264308)
+@@ -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::caclc
++    */
++    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
+Index: oovbaapi/ooo/vba/msforms/XScrollBar.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XScrollBar.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XScrollBar.idl	(revision 264308)
+@@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -951,300 +536,291 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_ASSISTANT_HXX
-+#define SC_VBA_ASSISTANT_HXX
++#ifndef __ooo_vba_msforms_XScrollBar_idl__
++#define __ooo_vba_msforms_XScrollBar_idl__
 +
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/vba/XAssistant.hpp>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
-+#include <sfx2/sfxhelp.hxx>
++module ooo {  module vba {  module msforms { 
 +
-+#include "vbahelper.hxx"
-+#include "vbahelperinterface.hxx"
++//=============================================================================
++interface XScrollBar: com::sun::star::uno::XInterface 
++{
++	[attribute] long Max;
++	[attribute] long Min;
++	[attribute] any Value;
++	[attribute] long LargeChange;
++	[attribute] long SmallChange;
++};
 +
-+typedef ::cppu::WeakImplHelper1< oo::vba::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< oo::vba::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
 +
-+#endif//SC_VBA_ASSISTANT_HXX
-Index: sc/source/ui/vba/vbaaxis.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaaxis.cxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
---- sc/source/ui/vba/vbaaxis.cxx	11 Apr 2008 00:48:27 -0000	1.3
-+++ sc/source/ui/vba/vbaaxis.cxx	6 Jul 2008 15:31:03 -0000	1.2.42.2
-@@ -42,8 +42,8 @@ using namespace ::org::openoffice::excel
- 
- 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 )
- {
-@@ -137,12 +137,12 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCro
- 				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:
- 				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
-Index: sc/source/ui/vba/vbabutton.cxx
++
+Index: oovbaapi/ooo/vba/msforms/makefile.mk
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbabutton.cxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbabutton.cxx	11 Apr 2008 00:50:02 -0000	1.3
-+++ sc/source/ui/vba/vbabutton.cxx	5 Sep 2008 14:04:19 -0000	1.2.42.3
-@@ -35,7 +35,7 @@ using namespace org::openoffice;
- 
- 
- const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
--ScVbaButton::ScVbaButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ButtonImpl_BASE( xContext, xControlShape )
-+ScVbaButton::ScVbaButton( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
- {
- }
- 
-@@ -53,3 +53,22 @@ ScVbaButton::setCaption( const rtl::OUSt
- {
-     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
- }
+--- oovbaapi/ooo/vba/msforms/makefile.mk	(revision 0)
++++ oovbaapi/ooo/vba/msforms/makefile.mk	(revision 264308)
+@@ -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=..$/..$/..
 +
-+rtl::OUString& 
-+ScVbaButton::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaButton") );
-+	return sImplName;
-+}
++PRJNAME=oovbapi
 +
-+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("org.openoffice.msforms.Button" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbabutton.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbabutton.hxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbabutton.hxx	11 Apr 2008 00:50:19 -0000	1.3
-+++ sc/source/ui/vba/vbabutton.hxx	5 Sep 2008 14:04:19 -0000	1.2.42.3
-@@ -40,10 +40,12 @@ typedef cppu::ImplInheritanceHelper1< Sc
- class ScVbaButton : public ButtonImpl_BASE
- {
- public:
--    ScVbaButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
-    // Attributes
-     virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- };
- #endif //SC_VBA_BUTTON_HXX
-Index: sc/source/ui/vba/vbacharacters.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbacharacters.cxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.2
---- sc/source/ui/vba/vbacharacters.cxx	11 Apr 2008 00:50:34 -0000	1.4
-+++ sc/source/ui/vba/vbacharacters.cxx	6 Jul 2008 15:30:46 -0000	1.3.42.2
-@@ -46,7 +46,11 @@ ScVbaCharacters::ScVbaCharacters( const 
- 	uno::Reference< text::XTextCursor > xTextCursor( m_xSimpleText->createTextCursor(), uno::UNO_QUERY_THROW );
- 	xTextCursor->collapseToStart();
- 	if ( nStart )
-+	{
-+		if ( ( nStart + 1 ) > xRange->getString().getLength() )
-+			nStart = xRange->getString().getLength();
- 		xTextCursor->goRight( nStart, sal_False );
-+	}
- 	if ( nLength < 0 ) // expand to end
- 		xTextCursor->gotoEnd( sal_True );
- 	else
-Index: sc/source/ui/vba/vbacheckbox.cxx
++TARGET=msforms
++PACKAGE=ooo$/vba$/msforms
++
++# --- Settings -----------------------------------------------------
++.INCLUDE :  $(PRJ)$/util$/makefile.pmk
++
++.IF "$(ENABLE_VBA)"!="YES"
++dummy:
++        @echo "not building vba..."
++.ENDIF
++
++# ------------------------------------------------------------------------
++
++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
 ===================================================================
-RCS file: sc/source/ui/vba/vbacheckbox.cxx
-diff -N sc/source/ui/vba/vbacheckbox.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacheckbox.cxx	5 Sep 2008 14:04:19 -0000	1.1.2.2
-@@ -0,0 +1,110 @@
+--- oovbaapi/ooo/vba/msforms/XListBox.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XListBox.idl	(revision 264308)
+@@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
-+ *  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: XListBox.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.
 + *
 + ************************************************************************/
-+#include "vbacheckbox.hxx"
-+#include <vector>
++#ifndef __ooo_vba_msforms_XListBox_idl__
++#define __ooo_vba_msforms_XListBox_idl__
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
++module ooo {  module vba {  module msforms { 
 +
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-+ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-+{
-+}
 +
-+// Attributes
-+rtl::OUString SAL_CALL 
-+ScVbaCheckbox::getCaption() throw (css::uno::RuntimeException)
++//=============================================================================
++interface XListBox: com::sun::star::uno::XInterface 
 +{
-+    rtl::OUString Label;
-+    m_xProps->getPropertyValue( LABEL ) >>= Label;
-+    return Label;
-+}
++	[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 );
++};
 +
-+void SAL_CALL 
-+ScVbaCheckbox::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-+}
++//=============================================================================
 +
-+uno::Any SAL_CALL 
-+ScVbaCheckbox::getValue() throw (css::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 ); 
-+}
++}; }; };
 +
-+void SAL_CALL 
-+ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::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 ) );
-+}
-+rtl::OUString& 
-+ScVbaCheckbox::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCheckbox") );
-+	return sImplName;
-+}
++#endif
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaCheckbox::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.CheckBox" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbacheckbox.hxx
++
+Index: oovbaapi/ooo/vba/msforms/XPictureFormat.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacheckbox.hxx
-diff -N sc/source/ui/vba/vbacheckbox.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacheckbox.hxx	15 Sep 2008 19:20:01 -0000	1.1.2.3
-@@ -0,0 +1,60 @@
+--- oovbaapi/ooo/vba/msforms/XPictureFormat.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XPictureFormat.idl	(revision 264308)
+@@ -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: XPictureFormat.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_XPictureFormat_idl__
++#define __ooo_vba_msforms_XPictureFormat_idl__
++
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++module ooo {  module vba { module msforms {
++interface XPictureFormat : ooo::vba::XHelperInterface
++{
++    [attribute] double Brightness;
++    [attribute] double Contrast;
++    void IncrementBrightness( [in] double increment );
++    void IncrementContrast( [in] double increment );
++};
++}; }; };
++
++#endif
+Index: oovbaapi/ooo/vba/msforms/XColorFormat.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XColorFormat.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XColorFormat.idl	(revision 264308)
+@@ -0,0 +1,46 @@
++/*************************************************************************
++ *
++ * 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: XColorFormat.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_XColorFormat_idl__
++#define __ooo_vba_msforms_XColorFormat_idl__
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++module ooo {  module vba { module msforms {
++
++interface XColorFormat : ooo::vba::XHelperInterface
++{
++    [attribute] long RGB;
++    [attribute] long SchemeColor;
++};
++
++};};};
++#endif
+Index: oovbaapi/ooo/vba/msforms/XMultiPage.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XMultiPage.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XMultiPage.idl	(revision 264308)
+@@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -1279,629 +855,557 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_CHECKBOX_HXX
-+#define SC_VBA_CHECKBOX_HXX
-+#include <cppuhelper/implbase2.hxx>
-+#include <org/openoffice/msforms/XRadioButton.hpp>
++#ifndef __ooo_vba_msforms_XMultiPage_idl__
++#define __ooo_vba_msforms_XMultiPage_idl__
 +
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XRadioButton, css::script::XDefaultProperty > CheckBoxImpl_BASE;
++module ooo {  module vba {  module msforms { 
 +
-+class ScVbaCheckbox : public CheckBoxImpl_BASE
++//=============================================================================
++interface XMultiPage: com::sun::star::uno::XInterface 
 +{
-+public:
-+    ScVbaCheckbox(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
-+   // Attributes
-+    virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
-+    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();
++	[attribute] long Value;
++	any Pages( [in] any index );
 +};
-+#endif //SC_VBA_CHECKBOX_HXX
-Index: sc/source/ui/vba/vbacombobox.cxx
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XProgressBar.idl
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbacombobox.cxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.6
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.6
---- sc/source/ui/vba/vbacombobox.cxx	11 Apr 2008 00:55:28 -0000	1.4
-+++ sc/source/ui/vba/vbacombobox.cxx	17 Sep 2008 14:15:06 -0000	1.3.42.6
-@@ -34,22 +34,26 @@ using namespace com::sun::star;
- using namespace org::openoffice;
- 
- 
--const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
-+//SelectedItems list of integer indexes
-+//StringItemList list of items
+--- oovbaapi/ooo/vba/msforms/XProgressBar.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XProgressBar.idl	(revision 264308)
+@@ -0,0 +1,57 @@
++/*************************************************************************
++ *
++ *  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_XProgressBar_idl__
++#define __ooo_vba_msforms_XProgressBar_idl__
 +
-+const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
-+const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
- const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
-+const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
- 
--ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : ComboBoxImpl_BASE( xContext, xControlShape )
-+ScVbaComboBox::ScVbaComboBox( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, bool bDialogType ) : ComboBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ), mbDialogType( bDialogType )
- {
-+    	mpListHelper.reset( new ListControlHelper( m_xProps ) );
- 	// grab the default value property name
- 	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
- }
- 
--ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ComboBoxImpl_BASE( xContext, xPropSet, xControlShape )
--{
--	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
--}
-+// Attributes
- 
- 
--// Attributes
-+// Value, [read] e.g. getValue returns the value of ooo Text propery e.g. the value in
-+// the drop down
- uno::Any SAL_CALL 
- ScVbaComboBox::getValue() throw (uno::RuntimeException)
- {
-@@ -57,11 +61,48 @@ ScVbaComboBox::getValue() throw (uno::Ru
- }
- 
- 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 ) );
-+}
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
-+uno::Any SAL_CALL 
-+ScVbaComboBox::getListIndex() throw (uno::RuntimeException)
++module ooo {  module vba {  module msforms { 
++
++//=============================================================================
++interface XProgressBar: com::sun::star::uno::XInterface 
 +{
-+	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 ) );
-+}
++	[attribute] any Value;
++};
 +
-+// 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
++//=============================================================================
 +
- ::rtl::OUString SAL_CALL 
- ScVbaComboBox::getText() throw (uno::RuntimeException)
- {
-@@ -80,63 +121,55 @@ ScVbaComboBox::setText( const ::rtl::OUS
- 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;
--
--		sal_Int32 nIndex = sList.getLength();
--
--		if ( pvargIndex.hasValue() )
--			pvargIndex >>= nIndex;
--
--		rtl::OUString sString;
--		pvargItem >>= sString;
-+	mpListHelper->removeItem( index );
-+}
- 
--		// 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)
-+{
-+	return mpListHelper->List( pvargIndex, pvarColumn );
- 	}
++}; }; };
 +
-+rtl::OUString& 
-+ScVbaComboBox::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox") );
-+	return sImplName;
- }
- 
--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("org.openoffice.msforms.ComboBox" ) );
-+	}
-+	return aServiceNames;
- }
-Index: sc/source/ui/vba/vbacombobox.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbacombobox.hxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.5
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.5
---- sc/source/ui/vba/vbacombobox.hxx	11 Apr 2008 00:55:42 -0000	1.4
-+++ sc/source/ui/vba/vbacombobox.hxx	16 Sep 2008 17:55:19 -0000	1.3.42.5
-@@ -39,27 +39,24 @@
- #include <com/sun/star/beans/PropertyAttribute.hpp>
- 
- #include "vbacontrol.hxx"
-+#include "vbalistcontrolhelper.hxx"
- #include "vbahelper.hxx"
- 
- typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
- class ScVbaComboBox : public ComboBoxImpl_BASE
- {		
--
--	//css::uno::Reference< css::uno::XComponentContext > m_xContext;
--	//css::uno::Reference< css::beans::XPropertySet > m_xProps;
-+	std::auto_ptr< ListControlHelper > mpListHelper;
- 	rtl::OUString sSourceName; 
- 	rtl::OUString msDftPropName;
--
-+	bool mbDialogType;
- 	
- public:
--	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< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper, bool bDialogType = false );
- 
- 	// Attributes
-+	virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
-+	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
-+    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();
- };
- 
- #endif //
-Index: sc/source/ui/vba/vbacommandbar.cxx
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XRadioButton.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacommandbar.cxx
-diff -N sc/source/ui/vba/vbacommandbar.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbar.cxx	29 Jul 2008 06:35:40 -0000	1.1.2.1
-@@ -0,0 +1,329 @@
+--- oovbaapi/ooo/vba/msforms/XRadioButton.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XRadioButton.idl	(revision 264308)
+@@ -0,0 +1,53 @@
 +/*************************************************************************
 + *
-+ *  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$
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ *  $Revision$
++ * $RCSfile: XRadioButton.idl,v $
++ * $Revision: 1.3 $
 + *
-+ *  last change: $Author$ $Date$
++ * This file is part of OpenOffice.org.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * 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).
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, 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.
 + *
-+ *    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.
++ ************************************************************************/
++#ifndef __ooo_vba_msforms_XRadioButton_idl__
++#define __ooo_vba_msforms_XRadioButton_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
++
++module ooo {  module vba {  module msforms { 
++
++//=============================================================================
++interface XRadioButton: com::sun::star::uno::XInterface 
++{
++	[attribute] string Caption;
++	[attribute] any Value;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XTextBox.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XTextBox.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XTextBox.idl	(revision 264308)
+@@ -0,0 +1,55 @@
++/*************************************************************************
 + *
-+ *    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.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *    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 - a multi-platform office productivity suite
++ *
++ * $RCSfile: XTextBox.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.
 + *
 + ************************************************************************/
-+#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>
-+
-+#include "vbacommandbar.hxx"
-+#include "vbacommandbarcontrols.hxx"
-+#include "vbahelper.hxx"
++#ifndef __ooo_vba_msforms_XTextBox_idl__
++#define __ooo_vba_msforms_XTextBox_idl__
 +
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++module ooo {  module vba {  module msforms { 
 +
-+ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< vba::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw (uno::RuntimeException) : CommandBar_BASE( xParent, xContext )
++//=============================================================================
++interface XTextBox: com::sun::star::uno::XInterface 
 +{
-+    // 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< vba::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sToolBarName, sal_Bool bTemporary, sal_Bool bCreate ) throw (uno::RuntimeException) :  CommandBar_BASE( xParent, xContext )
++	[attribute] string  Text;
++    [attribute] any    Value;
++    [attribute] long    MaxLength;
++    [attribute] boolean Multiline;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XFillFormat.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XFillFormat.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XFillFormat.idl	(revision 264308)
+@@ -0,0 +1,53 @@
++/*************************************************************************
++ *
++ * 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: XFillFormat.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_XFillFormat_idl__
++#define __ooo_vba_msforms_XFillFormat_idl__
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++#ifndef __ooo_vba_msforms_XColorFormat_idl__
++#include <ooo/vba/msforms/XColorFormat.idl>
++#endif
++
++module ooo {  module vba { module msforms {
++interface XFillFormat : ooo::vba::XHelperInterface
 +{
-+    // 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)
++    [attribute] boolean Visible;
++    [attribute] double Transparency;
++    void Solid();
++    void TwoColorGradient( [in] long style, [in] long variant );
++    XColorFormat BackColor();
++    XColorFormat ForeColor();
++};
++
++};};};
++#endif
+Index: oovbaapi/ooo/vba/msforms/XPages.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XPages.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XPages.idl	(revision 264308)
+@@ -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 msforms { 
++
++//=============================================================================
++interface XPages
 +{
-+    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 )
++    interface ooo::vba::XCollection;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl	(revision 264308)
+@@ -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
++ *
++ * $RCSfile: MSFormReturnTypes.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.
++ *
++ ************************************************************************/
++module msforms
 +{
-+    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 ) )
++    struct ReturnBoolean
 +    {
-+        // 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 ) )
++        boolean Value;
++    };
++                                                                                
++    struct ReturnEffect
 +    {
-+        // 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 )
++        //fmDropEffect Value;
++        short Value;
++    };
++                                                                                
++    struct ReturnInteger
 +    {
-+        // 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 ) )
++        long Value;
++    };
++                                                                                
++    struct ReturnSingle
 +    {
-+        uno::Any aToolBar = m_pScVbaCommandBars->GetWindows()->getByName( m_sToolBarName );
-+        aToolBar >>= m_aToolBar; 
-+    }
-+}
-+void
-+ScVbaCommandBar::addCustomBar()
-+{
-+    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
-+    xPropertySet->setPropertyValue(rtl::OUString::createFromAscii("UIName"), uno::makeAny( m_sUIName ));
++        float Value;
++    };
++                                                                                
 +
-+    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()
++};
+Index: oovbaapi/ooo/vba/msforms/XLineFormat.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XLineFormat.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XLineFormat.idl	(revision 264308)
+@@ -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: XLineFormat.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_XLineFormat_idl__
++#define __ooo_vba_msforms_XLineFormat_idl__
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++#ifndef __ooo_vba_msforms_XColorFormat_idl__
++#include <ooo/vba/msforms/XColorFormat.idl>
++#endif
++
++module ooo {  module vba { module msforms {
++interface XLineFormat : ooo::vba::XHelperInterface
 +{
-+    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" );
-+    }
-+}
-+::rtl::OUString SAL_CALL
-+ScVbaCommandBar::getName() throw ( uno::RuntimeException )
-+{
-+    // 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 )
-+    {
-+        uno::Reference< container::XNameAccess > xNameAccess( m_pScVbaCommandBars->GetWindows(), uno::UNO_QUERY_THROW );
-+        if( xNameAccess->hasByName( m_sToolBarName ) )
-+        {
-+            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< vba::XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
-+    if( aIndex.hasValue() )
-+    {
-+        if( aIndex >>= nIndex )
-+        {
-+            uno::Reference< vba::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& 
-+ScVbaCommandBar::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBar") );
-+	return sImplName;
-+}
-+uno::Sequence<rtl::OUString> 
-+ScVbaCommandBar::getServiceNames()
++    [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
+Index: oovbaapi/ooo/vba/msforms/XShape.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XShape.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XShape.idl	(revision 264308)
+@@ -0,0 +1,89 @@
++/*************************************************************************
++ *
++ * 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: XShape.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_XShape_idl__
++#define __ooo_vba_msforms_XShape_idl__
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++#ifndef __ooo_vba_excel_XTextFrame_idl__
++#include <ooo/vba/excel/XTextFrame.idl>
++#endif
++
++#ifndef __ooo_vba_msforms_XLineFormat_idl__
++#include <ooo/vba/msforms/XLineFormat.idl>
++#endif
++
++#ifndef __ooo_vba_msforms_XFillFormat_idl__
++#include <ooo/vba/msforms/XFillFormat.idl>
++#endif
++
++#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
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.vba.CommandBar" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbacommandbar.hxx
++    [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;
++
++    /*
++    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
++};
++}; }; };
++
++#endif
+Index: oovbaapi/ooo/vba/msforms/XUserForm.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacommandbar.hxx
-diff -N sc/source/ui/vba/vbacommandbar.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbar.hxx	29 Jul 2008 06:35:40 -0000	1.1.2.1
-@@ -0,0 +1,105 @@
+--- oovbaapi/ooo/vba/msforms/XUserForm.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XUserForm.idl	(revision 264308)
+@@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -1936,84 +1440,91 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_COMMANDBAR_HXX
-+#define SC_VBA_COMMANDBAR_HXX
-+
-+#include <org/openoffice/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>
-+
-+#include "vbahelperinterface.hxx"
-+#include "vbacommandbars.hxx"
++#ifndef __ooo_vba_msforms_XUserForm_idl__
++#define __ooo_vba_msforms_XUserForm_idl__
 +
-+#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") ),
++#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 );
 +};
-+static const CommandBarNameMap mCommandBarNameMap( namePair, ( namePair + sizeof(namePair) / sizeof(namePair[0]) ) );
-+
-+
-+typedef InheritedHelperInterfaceImpl1<  oo::vba::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< oo::vba::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< oo::vba::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw( css::uno::RuntimeException );
-+    ScVbaCommandBar( const css::uno::Reference< oo::vba::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; };
++#endif
+Index: oovbaapi/ooo/vba/msforms/XControls.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XControls.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XControls.idl	(revision 264308)
+@@ -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__
 +
-+    // 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);
++#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 {
 +
-+    // 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);
++interface XControl;
 +
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++interface XControls 
++{
++    interface ooo::vba::XCollection;
++    void Move( [in] double cx, [in] double cy );
 +};
-+#endif//SC_VBA_COMMANDBAR_HXX
-Index: sc/source/ui/vba/vbacommandbarcontrol.cxx
++}; }; };
++
++
++#endif
+Index: oovbaapi/ooo/vba/msforms/XGroupBox.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacommandbarcontrol.cxx
-diff -N sc/source/ui/vba/vbacommandbarcontrol.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbarcontrol.cxx	5 Sep 2008 14:04:19 -0000	1.1.2.2
-@@ -0,0 +1,403 @@
+--- oovbaapi/ooo/vba/msforms/XGroupBox.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XGroupBox.idl	(revision 264308)
+@@ -0,0 +1,56 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -2048,382 +1559,33 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbacommandbarcontrol.hxx"
-+
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#ifndef __ooo_vba_msforms_XGroupBox_idl__
++#define __ooo_vba_msforms_XGroupBox_idl__
 +
-+uno::Any lcl_getPropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName )
-+{
-+    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();
-+}
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
-+beans::PropertyValues lcl_repalcePropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName, uno::Any aValue )
++module ooo {  module vba {  module msforms { 
++//=============================================================================
++interface XGroupBox
 +{
-+    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;
-+}
++	[attribute] string Caption; 
++};
 +
-+ScVbaCommandBarControl::ScVbaCommandBarControl( const uno::Reference< vba::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sName ) throw (uno::RuntimeException) : CommandBarControl_BASE( xParent, xContext ), m_sName( sName )
-+{
-+    // 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;
-+}
-+ScVbaCommandBarControl::ScVbaCommandBarControl( const uno::Reference< vba::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 )
-+{
-+    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
-+ScVbaCommandBarControl::initObjects() throw (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;
-+}
++}; }; };
 +
-+void
-+ScVbaCommandBarControl::createNewMenuBarControl()
-+{
-+    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");
++#endif
 +
-+    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();
-+    }
-+}
-+
-+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() )
-+    {
-+        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;
-+}
-+void SAL_CALL 
-+ScVbaCommandBarControl::setCaption( const ::rtl::OUString& _caption ) 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("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();
-+        }
-+    }
-+}
-+::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)
-+{
-+    if( m_xCurrentSettings.is() )
-+    {
-+        m_xCurrentSettings->removeByIndex( m_nPosition );
-+
-+        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 SAL_CALL 
-+ScVbaCommandBarControl::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
-+{
-+    sal_Int32 nIndex;
-+    uno::Reference< vba::XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
-+    if( aIndex.hasValue() )
-+    {
-+        if( aIndex >>= nIndex )
-+        {
-+            uno::Reference< vba::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;
-+}
-+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("org.openoffice.vba.CommandBarControl" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbacommandbarcontrol.hxx
+Index: oovbaapi/ooo/vba/msforms/XSpinButton.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacommandbarcontrol.hxx
-diff -N sc/source/ui/vba/vbacommandbarcontrol.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbarcontrol.hxx	29 Jul 2008 06:35:40 -0000	1.1.2.1
-@@ -0,0 +1,90 @@
+--- oovbaapi/ooo/vba/msforms/XSpinButton.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XSpinButton.idl	(revision 264308)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -2458,73 +1620,226 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_COMMANDBARCONTROL_HXX
-+#define SC_VBA_COMMANDBARCONTROL_HXX
++#ifndef __ooo_vba_msforms_XSpinButton_idl__
++#define __ooo_vba_msforms_XSpinButton_idl__
 +
-+#include <org/openoffice/vba/XCommandBarControl.hpp>
-+
-+#include "vbahelperinterface.hxx"
-+#include "vbacommandbarcontrols.hxx"
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
 +
-+typedef InheritedHelperInterfaceImpl1< oo::vba::XCommandBarControl > CommandBarControl_BASE;
++module ooo {  module vba {  module msforms { 
 +
-+class ScVbaCommandBarControl : public CommandBarControl_BASE
++//=============================================================================
++interface XSpinButton: com::sun::star::uno::XInterface 
 +{
-+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< oo::vba::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< oo::vba::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sName ) throw (css::uno::RuntimeException);
-+    ScVbaCommandBarControl( const css::uno::Reference< oo::vba::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);
++	[attribute] long Max;
++	[attribute] long Min;
++	[attribute] any Value;
++};
 +
-+    // 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_COMMANDBARCONTROL_HXX
-Index: sc/source/ui/vba/vbacommandbarcontrols.cxx
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XComboBox.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacommandbarcontrols.cxx
-diff -N sc/source/ui/vba/vbacommandbarcontrols.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbarcontrols.cxx	5 Sep 2008 14:04:20 -0000	1.1.2.2
-@@ -0,0 +1,247 @@
+--- oovbaapi/ooo/vba/msforms/XComboBox.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XComboBox.idl	(revision 264308)
+@@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
-+ *  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.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: XComboBox.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_XComboBox_idl__
++#define __ooo_vba_msforms_XComboBox_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++
++
++//=============================================================================
++
++module ooo {  module vba {  module msforms { 
++
++
++//=============================================================================
++interface XComboBox: ::com::sun::star::uno::XInterface
++{
++	[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
++
++
+Index: oovbaapi/ooo/vba/msforms/XButton.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XButton.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XButton.idl	(revision 264308)
+@@ -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 __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
++
++module ooo {  module vba {  module msforms { 
++
++//=============================================================================
++interface XButton: com::sun::star::uno::XInterface 
++{
++	[attribute] string Caption;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/msforms/XShapeRange.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XShapeRange.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XShapeRange.idl	(revision 264308)
+@@ -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: XShapeRange.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_XShapeRange_idl__
++#define __ooo_vba_msforms_XShapeRange_idl__
++
++#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 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 );
++};
++}; }; };
++
++#endif
+Index: oovbaapi/ooo/vba/msforms/XToggleButton.idl
+===================================================================
+--- oovbaapi/ooo/vba/msforms/XToggleButton.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XToggleButton.idl	(revision 264308)
+@@ -0,0 +1,60 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
 + *  $RCSfile$
 + *
 + *  $Revision$
@@ -2555,226 +1870,37 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbacommandbarcontrols.hxx"
-+#include "vbacommandbarcontrol.hxx"
++#ifndef __ooo_vba_msforms_XToggleButton_idl__
++#define __ooo_vba_msforms_XToggleButton_idl__
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#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
++//=============================================================================
 +
-+typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarControlEnumeration_BASE;
-+class CommandBarControlEnumeration : public CommandBarControlEnumeration_BASE
++module ooo {  module vba {  module msforms { 
++//=============================================================================
++interface XToggleButton
 +{
-+    //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();
-+    }
++	interface XButton;
++	[attribute] any Value; 
 +};
 +
-+ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< vba::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 vba::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< vba::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;
-+    if( aIndex >>= nIndex )
-+    {
-+        return createCollectionObject( uno::makeAny( GetControlNameByIndex( nIndex ) ) );
-+    }
-+    
-+    return uno::Any();
-+}
-+uno::Reference< vba::XCommandBarControl > SAL_CALL 
-+ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const uno::Any& /*Parameter*/, const uno::Any& Before, const uno::Any& Temporary ) throw (script::BasicErrorException, uno::RuntimeException)
-+{
-+    // 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< vba::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("org.openoffice.vba.CommandBarControls" ) );
-+    }
-+    return aServiceNames;
-+}
++#endif
 +
-Index: sc/source/ui/vba/vbacommandbarcontrols.hxx
++
+Index: oovbaapi/ooo/vba/msforms/XTextBoxShape.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacommandbarcontrols.hxx
-diff -N sc/source/ui/vba/vbacommandbarcontrols.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbarcontrols.hxx	29 Jul 2008 06:35:40 -0000	1.1.2.1
-@@ -0,0 +1,90 @@
+--- oovbaapi/ooo/vba/msforms/XTextBoxShape.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XTextBoxShape.idl	(revision 264308)
+@@ -0,0 +1,61 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -2809,1034 +1935,435 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_COMMANDBARCONTROLS_HXX
-+#define SC_VBA_COMMANDBARCONTROLS_HXX
++#ifndef __ooo_vba_msforms_XTextBoxShape_idl__
++#define __ooo_vba_msforms_XTextBoxShape_idl__
 +
-+#include <org/openoffice/vba/XCommandBarControls.hpp>
-+
-+#include "vbahelperinterface.hxx"
-+#include "vbacommandbar.hxx"
-+#include "vbacollectionimpl.hxx"
-+
-+class ScVbaCommandBarControl;
++#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>
++#endif
++//=============================================================================
 +
-+typedef CollTestImplHelper< oo::vba::XCommandBarControls > CommandBarControls_BASE;
++module ooo {  module vba {  module msforms { 
 +
-+class ScVbaCommandBarControls : public CommandBarControls_BASE
++//=============================================================================
++interface XTextBoxShape: com::sun::star::uno::XInterface 
 +{
-+private:
-+    sal_Bool                    m_bIsMenu;
-+    sal_Bool                    m_bHasElements;
-+    ScVbaCommandBar*            m_pCommandBar; 
-+    ScVbaCommandBarControl*     m_pCommandBarControl; 
-+    css::uno::Reference< oo::vba::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;
++	[attribute] string  Text;
++	::ooo::vba::excel::XCharacters characters([in] any Start, [in] any Length);
++};
 +
-+public:
-+    ScVbaCommandBarControls( 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 );
-+    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< oo::vba::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
 +
-+#endif//SC_VBA_COMMANDBARCONTROLS_HXX
-Index: sc/source/ui/vba/vbacommandbars.cxx
++
+Index: oovbaapi/ooo/vba/msforms/XLabel.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacommandbars.cxx
-diff -N sc/source/ui/vba/vbacommandbars.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbars.cxx	29 Jul 2008 06:35:40 -0000	1.1.2.1
-@@ -0,0 +1,247 @@
+--- oovbaapi/ooo/vba/msforms/XLabel.idl	(revision 0)
++++ oovbaapi/ooo/vba/msforms/XLabel.idl	(revision 264308)
+@@ -0,0 +1,53 @@
 +/*************************************************************************
 + *
-+ *  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$
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ *  $Revision$
++ * $RCSfile: XLabel.idl,v $
++ * $Revision: 1.3 $
 + *
-+ *  last change: $Author$ $Date$
++ * This file is part of OpenOffice.org.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * 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).
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, 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.
 + *
-+ *    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.
++ ************************************************************************/
++#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
++//=============================================================================
++
++module ooo {  module vba {  module msforms { 
++
++//=============================================================================
++interface XLabel: com::sun::star::uno::XInterface 
++{
++	[attribute] string Caption;
++	[attribute] any Value;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/Globals.idl
+===================================================================
+--- oovbaapi/ooo/vba/Globals.idl	(revision 0)
++++ oovbaapi/ooo/vba/Globals.idl	(revision 264308)
+@@ -0,0 +1,48 @@
++/*************************************************************************
 + *
-+ *    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.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *    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 - a multi-platform office productivity suite
++ *
++ * $RCSfile: Globals.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.
 + *
 + ************************************************************************/
-+#include <com/sun/star/lang/XServiceInfo.hpp>
-+#include <com/sun/star/frame/XDesktop.hpp>
-+#include <com/sun/star/container/XNameAccess.hpp>
-+
-+#include "vbacommandbars.hxx"
-+#include "vbacommandbar.hxx"
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#ifndef __ooo_vba_Globals_idl__
++#define __ooo_vba_Globals_idl__
 +
-+typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarEnumeration_BASE;
++#ifndef __ooo_vba_XGlobals_idl__
++#include <ooo/vba/XGlobals.idl>
++#endif
 +
-+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" ) );
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/table/XCellRange.idl>
 +
-+class CommandBarEnumeration : public CommandBarEnumeration_BASE
++module ooo {  module vba {
++service Globals : XGlobals
 +{
-+    uno::Reference< uno::XComponentContext > m_xContext;
-+    uno::Reference< vba::XCommandBars > m_xCommandBars;
-+    uno::Sequence< rtl::OUString > m_sNames;
-+    sal_Int32 m_nCurrentPosition;
-+public:
-+    CommandBarEnumeration( const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< vba::XCommandBars > xCommandBars, const uno::Sequence< rtl::OUString > sNames ) : m_xContext( xContext ), m_xCommandBars( xCommandBars ), m_sNames( sNames ), m_nCurrentPosition( 0 )
-+    {
-+    }
-+    virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
-+    {
-+        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 )
-+    {
-+        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< vba::XHelperInterface > xHelperInterface( m_xCommandBars, uno::UNO_QUERY_THROW );
-+                        uno::Reference< vba::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();
-+    }
 +};
 +
++}; };
 +
-+ScVbaCommandBars::ScVbaCommandBars( const uno::Reference< vba::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< container::XIndexAccess > xIndexAccess ) : CommandBars_BASE( xParent, xContext, xIndexAccess )
-+{
-+    retrieveObjects();
-+}
-+void
-+ScVbaCommandBars::retrieveObjects() throw ( uno::RuntimeException )
-+{
-+    uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument(), uno::UNO_QUERY_THROW );
-+    if( xServiceInfo->supportsService( sSpreadsheetDocumentUrl ) )
-+    {
-+        m_sModuleName = sSpreadsheetDocumentUrl;
-+    }
-+    else if( xServiceInfo->supportsService( sTextDocumentUrl ) )
-+    {
-+        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 );
-+}
-+
-+// XEnumerationAccess
-+uno::Type SAL_CALL 
-+ScVbaCommandBars::getElementType() throw ( uno::RuntimeException )
-+{
-+    return vba::XCommandBars::static_type( 0 );
-+}
-+uno::Reference< container::XEnumeration >
-+ScVbaCommandBars::createEnumeration() throw ( uno::RuntimeException )
-+{
-+    return uno::Reference< container::XEnumeration >( new CommandBarEnumeration( mxContext, this, m_xNameAccess->getElementNames() ) );
-+}
-+
-+uno::Any
-+ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
-+{
-+    // aSource should be a name at this time, because of the class is API wrapper.
-+    rtl::OUString sToolBarName;
-+    if( aSource >>= sToolBarName )
-+    {
-+        sToolBarName = sToolBarName.toAsciiLowerCase();
-+        if( sToolBarName.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii("Worksheet Menu Bar") ) )
-+        {
-+            return uno::makeAny( uno::Reference< vba::XCommandBar > ( new ScVbaCommandBar( this, mxContext, 0 ) ) );
-+        }
-+        else if( sToolBarName.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii("Menu Bar") ) )
-+        {
-+            return uno::makeAny( uno::Reference< vba::XCommandBar > ( new ScVbaCommandBar( this, mxContext, 1 ) ) );
-+        }
-+        else if( checkToolBarExist( sToolBarName ) )
-+        {
-+            return uno::makeAny( uno::Reference< vba::XCommandBar > (new ScVbaCommandBar( this, mxContext, sToolBarName, sal_True, sal_False ) ) );
-+        }
-+    }
-+    return uno::Any();
-+}
-+
-+// XCommandBars
-+uno::Reference< vba::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)
-+{
-+    // Position - MsoBar MenuBar - sal_Bool
-+    // Currently only the Name is supported.
-+    rtl::OUString sName;
-+    if( !( Name >>= sName ) )
-+    {
-+        sName = rtl::OUString::createFromAscii("Custom1");
-+    }
-+    sal_Bool bTemporary;
-+    if( !( Temporary >>= bTemporary ) )
-+    {
-+        bTemporary = sal_True;
-+    }
-+    return uno::Reference< vba::XCommandBar >( new ScVbaCommandBar( this, mxContext, sName.toAsciiLowerCase(), bTemporary, sal_True ) );
-+}
-+sal_Int32 SAL_CALL 
-+ScVbaCommandBars::getCount() 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++ )
-+    {
-+        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 )
-+{
-+    if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
-+    {
-+        return createCollectionObject( aIndex );    
-+    }
-+    return uno::Any();
-+}
-+
-+sal_Bool
-+ScVbaCommandBars::checkToolBarExist( rtl::OUString sToolBarName )
-+{
-+    CommandBarNameMap::const_iterator iter = mCommandBarNameMap.find( sToolBarName.toAsciiLowerCase() );
-+    if( iter != mCommandBarNameMap.end() )
-+    {
-+        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 )
-+        {
-+            if( allNames[i].indexOf( sToolBarName ) != -1 )
-+            {
-+                return sal_True;
-+            }
-+        }
-+    }
-+    return sal_False;
-+}
-+    
-+// XHelperInterface
-+rtl::OUString& 
-+ScVbaCommandBars::getServiceImplName()
-+{
-+    static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBars") );
-+    return sImplName;
-+}
-+uno::Sequence<rtl::OUString> 
-+ScVbaCommandBars::getServiceNames()
-+{
-+    static uno::Sequence< rtl::OUString > aServiceNames;
-+    if ( aServiceNames.getLength() == 0 )
-+    {
-+        aServiceNames.realloc( 1 );
-+        aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.vba.CommandBars" ) );
-+    }
-+    return aServiceNames;
-+}
-+
-Index: sc/source/ui/vba/vbacommandbars.hxx
++#endif
+Index: oovbaapi/ooo/vba/XCollection.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacommandbars.hxx
-diff -N sc/source/ui/vba/vbacommandbars.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacommandbars.hxx	29 Jul 2008 06:35:40 -0000	1.1.2.1
-@@ -0,0 +1,79 @@
+--- oovbaapi/ooo/vba/XCollection.idl	(revision 0)
++++ oovbaapi/ooo/vba/XCollection.idl	(revision 264308)
+@@ -0,0 +1,63 @@
 +/*************************************************************************
 + *
-+ *  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: XCollection.idl,v $
++ * $Revision: 1.4 $
 + *
-+ *    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 __ooo_vba_XCollection_idl__
++#define __ooo_vba_XCollection_idl__
 +
-+#include <org/openoffice/vba/XCommandBar.hpp>
-+#include <org/openoffice/vba/XCommandBars.hpp>
-+#include <com/sun/star/container/XNameAccess.hpp>
-+
-+#include <cppuhelper/implbase1.hxx>
++#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>
++#endif
 +
-+#include "vbahelperinterface.hxx"
-+#include "vbacollectionimpl.hxx"
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++//=============================================================================
 +
-+typedef CollTestImplHelper< oo::vba::XCommandBars > CommandBars_BASE;
++module ooo {  module vba { 
++//=============================================================================
 +
-+class ScVbaCommandBars : public CommandBars_BASE
++interface XCollection
 +{
-+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< oo::vba::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::container::XIndexAccess > xIndexAccess );
++	interface ::ooo::vba::XHelperInterface;
++	interface ::com::sun::star::script::XDefaultMethod;
++	interface ::com::sun::star::container::XEnumerationAccess;
 +
-+    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< oo::vba::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 );
++	[attribute, readonly] long Count;
++	any  Item( [in] any Index1, [in] any Index2 );
++};
++
++}; };
++
++#endif
+Index: oovbaapi/ooo/vba/XHelperInterface.idl
+===================================================================
+--- oovbaapi/ooo/vba/XHelperInterface.idl	(revision 0)
++++ oovbaapi/ooo/vba/XHelperInterface.idl	(revision 264308)
+@@ -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: XHelperInterface.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_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>
++#endif
++
++module ooo {  module vba {
++
++interface 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);
 +
-+    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/vbacontrol.cxx
++}; };
++
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XWorkbooks.idl
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbacontrol.cxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.7
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.7
---- sc/source/ui/vba/vbacontrol.cxx	11 Apr 2008 00:57:50 -0000	1.3
-+++ sc/source/ui/vba/vbacontrol.cxx	9 Sep 2008 18:43:44 -0000	1.2.42.7
-@@ -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>
+--- oovbaapi/ooo/vba/excel/XWorkbooks.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorkbooks.idl	(revision 264308)
+@@ -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
- #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 );
--
- 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 );
 +
-+    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 );
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
 +
-+    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 l
- 
- //ScVbaControl
- 
--ScVbaControl::ScVbaControl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::drawing::XControlShape >& xControlShape ) : m_xContext( xContext ), m_xControlShape( xControlShape )
-+ScVbaControl::ScVbaControl( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl,  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() )
--    {
--        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 );
- }
- 
--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 );
- }
- 
--void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext, 
--        const uno::Reference< beans::XPropertySet > xProps, 
--        const uno::Reference< drawing::XControlShape > xControlShape )
-+void ScVbaControl::removeResouce() throw( uno::RuntimeException )
- {
--    m_xEventListener.set( new ScVbaControlListener( this ) );
--    uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
--    m_xContext.set( xContext, uno::UNO_QUERY_THROW );
--    m_xProps.set( xProps, uno::UNO_QUERY_THROW );
--    m_xControlShape.set( xControlShape, uno::UNO_QUERY_THROW );
-+    uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
-+    xComponent->removeEventListener( m_xEventListener );
-+    m_xControl= NULL;
-+    m_xProps = NULL;
- }
- 
- //In design model has different behavior
-@@ -189,132 +185,283 @@ void SAL_CALL ScVbaControl::setEnabled( 
- 
- sal_Bool SAL_CALL ScVbaControl::getVisible() 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 );
-     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 );
- }
- 
- 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 );
- }
- 
- 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 );
- 
- }
- 
- 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();
- }
- 
- 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)
++
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++
++interface XWorkbooks 
 +{
-+	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();
- }
- 
--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
- }
- 
--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
++	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
-+}
+Index: oovbaapi/ooo/vba/excel/XPageBreak.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XPageBreak.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPageBreak.idl	(revision 264308)
+@@ -0,0 +1,73 @@
++/*************************************************************************
++ *
++ * 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_excel_XPageBreak_idl__
++#define __ooo_vba_excel_XPageBreak_idl__
 +
-+rtl::OUString SAL_CALL 
-+ScVbaControl::getRowSource() throw (uno::RuntimeException)
-+{
-+#ifdef VBA_OOBUILD_HACK
-+	rtl::OUString sRowSource;
-+	uno::Reference< form::binding::XListEntrySink > xListSink( m_xProps, uno::UNO_QUERY );
-+	if ( xListSink.is() )
-     {
--        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 );
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
-+			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
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
 +#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
++#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
 +#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;
++//=============================================================================
 +
-+}
++module ooo {  module vba {  module excel { 
 +
-+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 )
++interface XRange;
++
++interface XPageBreak
 +{
- }
- 
- ScVbaControl* ScVbaControlFactory::createControl()  throw (uno::RuntimeException)
- {
-+    return createControl( m_xModel );
-+}
-+ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< uno::XInterface >& xParent )  throw (uno::RuntimeException)
-+{
-+    uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
-+    if ( xControlShape.is() ) // form controls
-+        return createControl( xControlShape, xParent );
-+    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< vba::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 >() );
-+    }
-+}
++	interface ::ooo::vba::XHelperInterface;
 +
-+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< vba::XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
-+    if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
-+	pControl = new ScVbaCheckbox( xVbaParent, m_xContext, xControl, 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;
-+}
++    // Attributes
++    [attribute] long Type;
++    
++	//Methods	
++	void Delete() raises(com::sun::star::script::BasicErrorException);
++    XRange Location()raises(com::sun::star::script::BasicErrorException);
 +
-+rtl::OUString& 
-+ScVbaControl::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControl") );
-+	return sImplName;
-+}
++};
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaControl::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Control" ) );
-     }
-+	return aServiceNames;
- }
++//=============================================================================
 +
++}; }; };
 +
-Index: sc/source/ui/vba/vbacontrol.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbacontrol.hxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.4
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.4
---- sc/source/ui/vba/vbacontrol.hxx	11 Apr 2008 00:58:09 -0000	1.3
-+++ sc/source/ui/vba/vbacontrol.hxx	9 Sep 2008 10:22:25 -0000	1.2.42.4
-@@ -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 "vbahelper.hxx"
-+#include "vbahelperinterface.hxx"
- 
--typedef ::cppu::WeakImplHelper1< oo::msforms::XControl > ControlImpl_BASE;
-+//typedef ::cppu::WeakImplHelper1< oo::msforms::XControl > ControlImpl_BASE;
-+typedef InheritedHelperInterfaceImpl1< oo::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< oo::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;
++#endif
 +
-+    virtual css::uno::Reference< css::awt::XWindowPeer > getWindowPeer() throw (css::uno::RuntimeException);
- public:
--    ScVbaControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
--    ScVbaControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
--                    const css::uno::Reference< css::beans::XPropertySet >& xProps,
--                    const css::uno::Reference< css::drawing::XControlShape > xControlShape );
-+    ScVbaControl( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
-+                    const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pHelper );
-     virtual ~ScVbaControl();
-+    // This class will own the helper, so make sure it is allocated from 
-+    // the heap
-+    void setGeometryHelper( oo::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);
- 
-+    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 org.openoffice.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();
- };
- 
- 
-@@ -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
-Index: sc/source/ui/vba/vbacontrols.cxx
++
+Index: oovbaapi/ooo/vba/excel/XWorksheetFunction.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacontrols.cxx
-diff -N sc/source/ui/vba/vbacontrols.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacontrols.cxx	19 Sep 2008 18:34:47 -0000	1.1.2.1
-@@ -0,0 +1,227 @@
+--- oovbaapi/ooo/vba/excel/XWorksheetFunction.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorksheetFunction.idl	(revision 264308)
+@@ -0,0 +1,68 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3845,8 +2372,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XWorksheetFunction.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -3866,211 +2393,194 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
++#ifndef __ooo_vba_excel_XWSFunction_idl__
++#define __ooo_vba_excel_XWSFunction_idl__
 +
-+#include "vbacontrols.hxx"
-+#include "vbacontrol.hxx"
-+#include <cppuhelper/implbase2.hxx>
-+#include <com/sun/star/awt/XControlContainer.hpp>
-+#include <hash_map>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
++#ifndef __com_sun_star_beans_XExactName_idl__
++#include <com/sun/star/beans/XExactName.idl>
++#endif
 +
-+typedef ::cppu::WeakImplHelper2< container::XNameAccess, container::XIndexAccess > ArrayWrapImpl;
++#ifndef __com_sun_star_script_XInvocation_idl__
++#include <com/sun/star/script/XInvocation.idl>
++#endif
++//=============================================================================
 +
-+typedef  std::hash_map< rtl::OUString, sal_Int32, ::rtl::OUStringHash,
-+    ::std::equal_to< ::rtl::OUString >  > ControlIndexMap;
-+typedef  std::vector< uno::Reference< awt::XControl > > ControlVec;
++module ooo {  module vba {  module excel { 
 +
-+class ControlArrayWrapper : public ArrayWrapImpl
++//=============================================================================
++
++
++interface XWorksheetFunction
 +{
-+    uno::Reference< awt::XControlContainer > mxDialog;
-+    uno::Sequence< ::rtl::OUString > msNames;
-+    ControlVec mControls;
-+    ControlIndexMap mIndices;
++	interface ::ooo::vba::XHelperInterface;
++	interface ::com::sun::star::beans::XExactName;
++	interface ::com::sun::star::script::XInvocation;
++};
 +
-+    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();
-+    }
-+    
-+    // 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 ] );
-+    }
-+};
++#endif
 +
 +
-+class ControlsEnumWrapper : public EnumerationHelper_BASE
+Index: oovbaapi/ooo/vba/excel/XFormatConditions.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XFormatConditions.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XFormatConditions.idl	(revision 264308)
+@@ -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: XFormatConditions.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_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_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++
++module ooo {  module vba { module excel
 +{
-+    uno::Reference<vba::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:
++interface XFormatCondition;
++interface XFormatConditions 
++{
 +
-+    ControlsEnumWrapper(  const uno::Reference< vba::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 ) {}
++	interface ooo::vba::XCollection;
 +
-+    virtual ::sal_Bool SAL_CALL hasMoreElements(  ) throw (uno::RuntimeException)
-+    {
-+        return ( nIndex < m_xIndexAccess->getCount() );
-+    }
++	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 );
 +
-+    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< vba::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 );
-+}
++#endif
+Index: oovbaapi/ooo/vba/excel/XDialogs.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XDialogs.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XDialogs.idl	(revision 264308)
+@@ -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: XDialogs.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_XDialogs_idl__
++#define __ooo_vba_excel_XDialogs_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
 +
-+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;
-+}
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
-+uno::Any
-+ScVbaControls::createCollectionObject( const css::uno::Any& aSource )
++//=============================================================================
++                                                                                                                             
++module ooo {  module vba {  module excel {
++interface XApplication;                                                                                                                             
++//=============================================================================
++                                                                                                                             
++//interface XDialogs : ::ooo::vba::XCollection
++interface XDialogs 
 +{
-+    // 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 );
-+}
++	interface ::ooo::vba::XHelperInterface;
 +
-+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 ); 
-+    }
-+}
++        [attribute, readonly] long Count;
 +
-+uno::Type
-+ScVbaControls::getElementType() throw (uno::RuntimeException)
-+{
-+    return org::openoffice::msforms::XControl::static_type(0);
-+}
-+rtl::OUString& 
-+ScVbaControls::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControls") );
-+	return sImplName;
-+}
++	any Item( [in] any Index );
++};
++                                                                                                                             
++}; }; };
++                                                                                                                             
++#endif
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaControls::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Controls" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbacontrols.hxx
+Index: oovbaapi/ooo/vba/excel/Worksheet.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbacontrols.hxx
-diff -N sc/source/ui/vba/vbacontrols.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbacontrols.hxx	19 Sep 2008 18:34:47 -0000	1.1.2.1
-@@ -0,0 +1,62 @@
+--- oovbaapi/ooo/vba/excel/Worksheet.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/Worksheet.idl	(revision 264308)
+@@ -0,0 +1,53 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4079,8 +2589,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: Worksheet.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -4100,923 +2610,561 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_CONTROLS_HXX
-+#define SC_VBA_CONTROLS_HXX
 +
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XControls.hpp>
-+#include <com/sun/star/awt/XControl.hpp>
++#ifndef __ooo_vba_excel_Worksheet_idl__
++#define __ooo_vba_excel_Worksheet_idl__
 +
-+#include "vbacollectionimpl.hxx"
-+#include "vbahelper.hxx"
++#ifndef __ooo_vba_excel_XWorksheet_idl__
++#include <ooo/vba/excel/XWorksheet.idl>
++#endif
 +
-+typedef CollTestImplHelper< oo::msforms::XControls > ControlsImpl_BASE;
++#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
 +
-+class ScVbaControls : public ControlsImpl_BASE
++module ooo {  module vba { module excel {
++service Worksheet : XWorksheet
 +{
-+	css::uno::Reference< css::awt::XControl > mxDialog;
-+protected:
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+public:
-+    ScVbaControls( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
-+                    const css::uno::Reference< css::awt::XControl >& xDialog );
-+    // XControls
-+     virtual void SAL_CALL Move( double cx, double cy ) 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);
++  	createWorksheet(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel, [in] string SheetName  );
++};
 +
-+    // ScVbaCollectionBaseImpl
-+    virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
-+    
-+};
-+#endif //SC_VBA_OLEOBJECTS_HXX
++}; }; };
 +
-Index: sc/source/ui/vba/vbafont.cxx
++#endif
+Index: oovbaapi/ooo/vba/excel/XPane.idl
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbafont.cxx,v
-retrieving revision 1.7
-retrieving revision 1.7.96.1
-diff -u -p -u -p -b -w -B -r1.7 -r1.7.96.1
---- sc/source/ui/vba/vbafont.cxx	11 Apr 2008 00:59:55 -0000	1.7
-+++ sc/source/ui/vba/vbafont.cxx	3 Oct 2008 16:18:33 -0000	1.7.96.1
-@@ -32,6 +32,10 @@
- #include <com/sun/star/awt/FontUnderline.hpp>
- #include <com/sun/star/awt/FontStrikeout.hpp>
- #include <com/sun/star/awt/FontSlant.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 <org/openoffice/excel/XlColorIndex.hpp>
- #include <org/openoffice/excel/XlUnderlineStyle.hpp>
- #include <svtools/itemset.hxx>
-@@ -68,10 +72,42 @@ ScVbaFont::ScVbaFont( const uno::Referen
- {
- }
- 
-+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 ) );
+--- oovbaapi/ooo/vba/excel/XPane.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPane.idl	(revision 264308)
+@@ -0,0 +1,56 @@
++/*************************************************************************
++ *
++ * 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: XPane.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 __com_sun_star_helper_XPane_idl__
++#define __com_sun_star_helper_XPane_idl__
 +
-+	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
- 	sal_Bool bValue = sal_False;
- 	aValue >>= bValue;
- 	sal_Int16 nValue = NORMAL;
-@@ -82,21 +118,68 @@ ScVbaFont::setSuperscript( const uno::An
- 		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;
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
-+	}
-+        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;
++//============================================================================
 +
-+	}
-+        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
-+	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
++module ooo { module vba { module excel {
 +
- 	sal_Bool bValue = sal_False;
- 	aValue >>= bValue;
- 	sal_Int16 nValue = NORMAL;
-@@ -108,16 +191,42 @@ ScVbaFont::setSubscript( const uno::Any&
- 	        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::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;
++//============================================================================
 +
-+	}
-+        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
-+	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
++interface XPane: com::sun::star::uno::XInterface
++{
++    [attribute] long ScrollColumn;
++    [attribute] long ScrollRow;
 +
- 	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 ) );
- }
- 
-Index: sc/source/ui/vba/vbaframe.cxx
++    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
+Index: oovbaapi/ooo/vba/excel/XPivotCache.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbaframe.cxx
-diff -N sc/source/ui/vba/vbaframe.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaframe.cxx	5 Sep 2008 14:04:20 -0000	1.1.2.2
-@@ -0,0 +1,93 @@
+--- oovbaapi/ooo/vba/excel/XPivotCache.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPivotCache.idl	(revision 264308)
+@@ -0,0 +1,60 @@
 +/*************************************************************************
 + *
-+ *  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: XPivotCache.idl,v $
++ * $Revision: 1.4 $
 + *
-+ *    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 "vbaframe.hxx"
-+#include <vector>
++#ifndef __ooo_vba_excel_XPivotCache_idl__
++#define __ooo_vba_excel_XPivotCache_idl__
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#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
 +
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+ScVbaFrame::ScVbaFrame( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper ) : FrameImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-+{
-+}
++//=============================================================================
 +
-+// Attributes
-+rtl::OUString SAL_CALL 
-+ScVbaFrame::getCaption() throw (css::uno::RuntimeException)
-+{
-+    rtl::OUString Label;
-+    m_xProps->getPropertyValue( LABEL ) >>= Label;
-+    return Label;
-+}
++module ooo {  module vba {  module excel { 
 +
-+void SAL_CALL 
-+ScVbaFrame::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-+}
++//=============================================================================
 +
-+uno::Any SAL_CALL 
-+ScVbaFrame::getValue() throw (css::uno::RuntimeException)
++interface XPivotCache
 +{
-+    return uno::makeAny( getCaption() );
-+}
++	interface ::ooo::vba::XHelperInterface;
 +
-+void SAL_CALL 
-+ScVbaFrame::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    rtl::OUString sCaption;
-+    _value >>= sCaption;
-+    setCaption( sCaption ); 
-+}
++	void Refresh();
++};
 +
-+rtl::OUString& 
-+ScVbaFrame::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFrame") );
-+	return sImplName;
-+}
++//=============================================================================
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaFrame::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Frame" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbaframe.hxx
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XFormat.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbaframe.hxx
-diff -N sc/source/ui/vba/vbaframe.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaframe.hxx	5 Sep 2008 14:04:20 -0000	1.1.2.2
-@@ -0,0 +1,58 @@
+--- oovbaapi/ooo/vba/excel/XFormat.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XFormat.idl	(revision 264308)
+@@ -0,0 +1,138 @@
 +/*************************************************************************
 + *
-+ *  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$
++ * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ *  $Revision$
++ * $RCSfile: XFormat.idl,v $
++ * $Revision: 1.3 $
 + *
-+ *  last change: $Author$ $Date$
++ * This file is part of OpenOffice.org.
 + *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
++ * 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).
 + *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, 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.
 + *
-+ *    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.
++ ************************************************************************/
++
++#ifndef __ooo_vba_excel_XFormat_idl__
++#define __ooo_vba_excel_XFormat_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 {
++
++interface XBorders;
++interface XFont;
++interface XInterior;
++
++interface XFormat 
++{
++    interface ::ooo::vba::XHelperInterface;
++    // void			Clear(  ) raises ( com::sun::star::script::BasicErrorException );
++
++    any Borders( [in] any item )
++        raises(com::sun::star::script::BasicErrorException);
++
++    XFont Font()
++        raises(com::sun::star::script::BasicErrorException);
++
++    XInterior Interior()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setNumberFormat([in] any NumberFormat)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getNumberFormat()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setNumberFormatLocal([in] any NumberFormatLocal)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getNumberFormatLocal()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setIndentLevel([in] any IndentLevel)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getIndentLevel()
++        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 setVerticalAlignment([in] any VerticalAlignment)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getVerticalAlignment()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setOrientation([in] any Orientation)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getOrientation()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setShrinkToFit([in] any ShrinkToFit)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getShrinkToFit()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setWrapText([in] any WrapText)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getWrapText()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setLocked([in] any Locked)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getLocked()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setFormulaHidden([in] any FormulaHidden)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getFormulaHidden()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setMergeCells([in] any MergeCells)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getMergeCells()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setReadingOrder([in] any ReadingOrder)
++        raises(com::sun::star::script::BasicErrorException);
++
++    any getReadingOrder()
++        raises(com::sun::star::script::BasicErrorException);
++
++};
++
++}; }; };
++
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XChartObject.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XChartObject.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XChartObject.idl	(revision 264308)
+@@ -0,0 +1,64 @@
++/*************************************************************************
 + *
-+ *    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.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
 + *
-+ *    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 - a multi-platform office productivity suite
++ *
++ * $RCSfile: XChartObject.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 SC_VBA_FRAME_HXX
-+#define SC_VBA_FRAME_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XLabel.hpp>
++#ifndef __ooo_vba_excel_XChartObject_idl__
++#define __ooo_vba_excel_XChartObject_idl__
 +
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
++#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
++//=============================================================================
 +
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XLabel > FrameImpl_BASE;
++module ooo {  module vba {  module excel { 
 +
-+class ScVbaFrame : public FrameImpl_BASE
++//=============================================================================
++interface XChart;
++interface XChartObject
 +{
-+public:
-+    ScVbaFrame(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
-+   // Attributes
-+    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
-+    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();
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute, readonly] XChart Chart;
++	[attribute] string Name;
++	void  Delete() raises(com::sun::star::script::BasicErrorException);
++
 +};
-+#endif //SC_VBA_LABEL_HXX
-Index: sc/source/ui/vba/vbaglobals.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaglobals.cxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.2
---- sc/source/ui/vba/vbaglobals.cxx	11 Apr 2008 01:02:04 -0000	1.4
-+++ sc/source/ui/vba/vbaglobals.cxx	6 Jul 2008 15:29:30 -0000	1.3.42.2
-@@ -153,9 +153,9 @@ ScVbaGlobals::Range( const uno::Any& Cel
- }
- 
- 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
-Index: sc/source/ui/vba/vbaglobals.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaglobals.hxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.2
---- sc/source/ui/vba/vbaglobals.hxx	11 Apr 2008 01:02:19 -0000	1.4
-+++ sc/source/ui/vba/vbaglobals.hxx	6 Jul 2008 15:30:20 -0000	1.3.42.2
-@@ -70,6 +70,6 @@
- 	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/vbahelper.cxx
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XHPageBreak.idl
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbahelper.cxx,v
-retrieving revision 1.5
-retrieving revision 1.3.42.6
-diff -u -p -u -p -b -w -B -r1.5 -r1.3.42.6
---- sc/source/ui/vba/vbahelper.cxx	11 Apr 2008 01:02:33 -0000	1.5
-+++ sc/source/ui/vba/vbahelper.cxx	15 Sep 2008 19:20:01 -0000	1.3.42.6
-@@ -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,7 +58,8 @@
- #include "tabvwsh.hxx"
- #include "transobj.hxx"
- #include "scmod.hxx"
--
-+#include "vbashape.hxx"
-+#include "unonames.hxx"
- using namespace ::com::sun::star;
- using namespace ::org::openoffice;
- 
-@@ -74,6 +76,18 @@ namespace openoffice
- 
- const double Millimeter::factor =  35.27778;
- 
-+uno::Reference< beans::XIntrospectionAccess >
-+getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
-+{
-+	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 );
-+}
+--- oovbaapi/ooo/vba/excel/XHPageBreak.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XHPageBreak.idl	(revision 264308)
+@@ -0,0 +1,55 @@
++/*************************************************************************
++ *
++ * 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_excel_XHPageBreak_idl__
++#define __ooo_vba_excel_XHPageBreak_idl__
 +
- uno::Reference< script::XTypeConverter >
- getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
- {
-@@ -215,11 +229,27 @@ dispatchRequests (uno::Reference< frame:
- }
- 
- 
-+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();
-@@ -531,6 +561,11 @@ void PrintOutHelper( const uno::Any& Fro
- 	//   of this method
- }
- 
-+ void PrintPreviewHelper( const css::uno::Any& /*EnableChanges*/, css::uno::Reference< css::frame::XModel >& xModel )
-+{
-+	dispatchExecute( xModel, SID_VIEWSHELL1 );
-+}
++#ifndef __ooo_vba_excel_XPageBreak_idl__
++#include <ooo/vba/excel/XPageBreak.idl>
++#endif
 +
- rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
- {
- 	uno::Type aType = pvargItem.getValueType();
-@@ -744,5 +779,56 @@ double PixelsToPoints( css::uno::Referen
- 	return (fPixels/fConvertFactor)/POINTTO100THMILLIMETERFACTOR;
- }
- 
-+ConcreteXShapeGeometryAttributes::ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape )
-+{
-+	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 )
-+{
-+    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 ) ) );
-+    }
- } // openoffice
- } //org
-Index: sc/source/ui/vba/vbahelper.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbahelper.hxx,v
-retrieving revision 1.5
-retrieving revision 1.4.42.3
-diff -u -p -u -p -b -w -B -r1.5 -r1.4.42.3
---- sc/source/ui/vba/vbahelper.hxx	11 Apr 2008 01:02:47 -0000	1.5
-+++ sc/source/ui/vba/vbahelper.hxx	6 Jul 2008 15:31:23 -0000	1.4.42.3
-@@ -31,14 +31,18 @@
- #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 <org/openoffice/msforms/XShape.hpp>
- 
- namespace css = ::com::sun::star;
- 
-@@ -56,10 +60,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();
-@@ -80,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 )
-@@ -137,6 +144,80 @@ public:
- 		return points;
- 	}
- };
++//=============================================================================
 +
-+class AbstractGeometryAttributes // probably should replace the ShapeHelper below
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++
++interface XHPageBreak
 +{
-+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;
++	interface ::ooo::vba::excel::XPageBreak;
 +};
 +
-+class ConcreteXShapeGeometryAttributes : public AbstractGeometryAttributes
-+{
-+public:
-+    css::uno::Reference< org::openoffice::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
-+{
++#endif
 +
-+    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);
-+};
 +
- class ShapeHelper
- {
- protected:
-Index: sc/source/ui/vba/vbahyperlink.cxx
+Index: oovbaapi/ooo/vba/excel/XOLEObjects.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbahyperlink.cxx
-diff -N sc/source/ui/vba/vbahyperlink.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbahyperlink.cxx	29 Jul 2008 06:35:41 -0000	1.1.2.1
-@@ -0,0 +1,139 @@
+--- oovbaapi/ooo/vba/excel/XOLEObjects.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XOLEObjects.idl	(revision 264308)
+@@ -0,0 +1,54 @@
 +/*************************************************************************
 + *
-+ *  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: XOLEObjects.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.
 + *
 + ************************************************************************/
-+#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"
-+
-+using namespace ::org::openoffice;
-+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< vba::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;
-+}
++#ifndef __ooo_vba_excel_XOLEObjects_idl__
++#define __ooo_vba_excel_XOLEObjects_idl__
 +
-+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 );
-+}
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++//=============================================================================
 +
-+::rtl::OUString
-+ScVbaHyperlink::getName() throw (css::uno::RuntimeException)
-+{
-+	// it seems this attribute is same as TextToDisplay
-+	return getTextToDisplay();
-+}
++module ooo {  module vba {  module excel { 
 +
-+void
-+ScVbaHyperlink::setName( const ::rtl::OUString &  rName ) throw (css::uno::RuntimeException)
-+{
-+	setTextToDisplay( rName );
-+}
 +
-+::rtl::OUString
-+ScVbaHyperlink::getTextToDisplay() throw (css::uno::RuntimeException)
++//=============================================================================
++interface XOLEObjects
 +{
-+	rtl::OUString aTextToDisplay;
-+	uno::Any aValue = mxTextField->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ) );
-+	aValue >>= aTextToDisplay;
-+	return aTextToDisplay;
-+}
++	interface ::ooo::vba::XCollection;
++	//[attribute, readonly] boolean Focused;
++};
 +
-+void
-+ScVbaHyperlink::setTextToDisplay( const ::rtl::OUString & rTextToDisplay ) throw (css::uno::RuntimeException)
-+{
-+	uno::Any aValue;
-+	aValue <<= rTextToDisplay;
-+	mxTextField->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ), aValue );
-+}
++//=============================================================================
 +
-+css::uno::Reference< oo::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< vba::XHelperInterface > (), mxContext, xRange ) );
-+}
++}; }; };
 +
-+rtl::OUString&
-+ScVbaHyperlink::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHyperlink") );
-+	return sImplName;
-+}
++#endif
 +
-+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("org.openoffice.excel.Hyperlink" ) );
-+	}
-+	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",
-+    "org.openoffice.excel.Hyperlink" );
-+}
-Index: sc/source/ui/vba/vbahyperlink.hxx
+Index: oovbaapi/ooo/vba/excel/XInterior.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbahyperlink.hxx
-diff -N sc/source/ui/vba/vbahyperlink.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbahyperlink.hxx	29 Jul 2008 06:35:41 -0000	1.1.2.1
-@@ -0,0 +1,72 @@
+--- oovbaapi/ooo/vba/excel/XInterior.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XInterior.idl	(revision 264308)
+@@ -0,0 +1,65 @@
 +/*************************************************************************
 + *
-+ *  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: XInterior.idl,v $
++ * $Revision: 1.4 $
 + *
-+ *    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_HYPERLINK_HXX
-+#define SC_VBA_HYPERLINK_HXX
++#ifndef __ooo_vba_excel_XInterior_idl__
++#define __ooo_vba_excel_XInterior_idl__
 +
-+#include <org/openoffice/excel/XHyperlink.hpp>
-+#include <com/sun/star/table/XCell.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <org/openoffice/excel/XRange.hpp>
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
-+#include "vbahelperinterface.hxx"
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
-+typedef InheritedHelperInterfaceImpl1< oo::excel::XHyperlink > HyperlinkImpl_BASE;
++//=============================================================================
 +
-+class ScVbaHyperlink : public HyperlinkImpl_BASE 
-+{
-+	css::uno::Reference< css::table::XCell > mxCell;
-+	css::uno::Reference< css::beans::XPropertySet > mxTextField;
++module ooo {  module vba {  module excel  { 
 +
-+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< oo::excel::XRange > SAL_CALL Range() throw (css::uno::RuntimeException);
 +
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++interface XInterior
++{
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute]  any  Color;
++	[attribute]  any  ColorIndex;
++	[attribute]  any  Pattern;
++	[attribute]  any  PatternColor;
++	[attribute]  any  PatternColorIndex;
 +};
-+#endif /* SC_VBA_HYPERLINK_HXX */
 +
-Index: sc/source/ui/vba/vbaimage.cxx
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XDataLabels.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbaimage.cxx
-diff -N sc/source/ui/vba/vbaimage.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaimage.cxx	5 Sep 2008 14:05:15 -0000	1.1.2.1
+--- oovbaapi/ooo/vba/excel/XDataLabels.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XDataLabels.idl	(revision 264308)
 @@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
@@ -5026,8 +3174,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XDataLabels.idl,v $
++ * $Revision: 1.3 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -5047,43 +3195,41 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#include "vbaimage.hxx"
-+#include <vector>
++#ifndef __ooo_vba_excel_XDataLabels_idl__
++#define __ooo_vba_excel_XDataLabels_idl__
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#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 __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++//=============================================================================
 +
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+ScVbaImage::ScVbaImage( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ImageImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-+{
-+}
++module ooo {  module vba {  module excel { 
 +
-+rtl::OUString& 
-+ScVbaImage::getServiceImplName()
++//=============================================================================
++interface XDataLabels
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaImage") );
-+	return sImplName;
-+}
++	interface ::ooo::vba::XCollection;
++};
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaImage::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Image" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbaimage.hxx
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XPivotTables.idl
 ===================================================================
-RCS file: sc/source/ui/vba/vbaimage.hxx
-diff -N sc/source/ui/vba/vbaimage.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaimage.hxx	5 Sep 2008 14:05:15 -0000	1.1.2.1
-@@ -0,0 +1,48 @@
+--- oovbaapi/ooo/vba/excel/XPivotTables.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPivotTables.idl	(revision 264308)
+@@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5092,8 +3238,8 @@
 + *
 + * OpenOffice.org - a multi-platform office productivity suite
 + *
-+ * $RCSfile$
-+ * $Revision$
++ * $RCSfile: XPivotTables.idl,v $
++ * $Revision: 1.4 $
 + *
 + * This file is part of OpenOffice.org.
 + *
@@ -5113,1051 +3259,7934 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_IMAGE_HXX
-+#define SC_VBA_IMAGE_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XImage.hpp>
++#ifndef __ooo_vba_excel_XPivotTables_idl__
++#define __ooo_vba_excel_XPivotTables_idl__
 +
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
++#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
++
++//=============================================================================
 +
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XImage > ImageImpl_BASE;
++module ooo {  module vba {  module excel { 
 +
-+class ScVbaImage : public ImageImpl_BASE
++//=============================================================================
++interface XPivotTables
 +{
-+public:
-+    ScVbaImage( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++
++	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 //SC_VBA_IMAGE_HXX
-Index: sc/source/ui/vba/vbainterior.cxx
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XWorkbook.idl
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbainterior.cxx,v
-retrieving revision 1.5
-retrieving revision 1.5.96.1
-diff -u -p -u -p -b -w -B -r1.5 -r1.5.96.1
---- sc/source/ui/vba/vbainterior.cxx	11 Apr 2008 01:03:23 -0000	1.5
-+++ sc/source/ui/vba/vbainterior.cxx	29 Jul 2008 06:35:41 -0000	1.5.96.1
-@@ -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 <org/openoffice/excel/XlPattern.hpp>
- 
- #include <comphelper/processfactory.hxx>
- #include <cppuhelper/queryinterface.hxx>
-@@ -44,12 +47,53 @@
- 
- #include "vbainterior.hxx"
- #include "vbapalette.hxx"
+--- oovbaapi/ooo/vba/excel/XWorkbook.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorkbook.idl	(revision 264308)
+@@ -0,0 +1,83 @@
++/*************************************************************************
++ *
++ * 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: XWorkbook.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_XWorkbook_idl__
++#define __ooo_vba_excel_XWorkbook_idl__
 +
-+#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 ::org::openoffice::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" ) );
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
 +
-+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;
-+}
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
 +
-+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 )
- {
-+    // 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:
- 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;
-+    if( _color >>= nColor )
-+    {
-+        SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( XLRGBToOORGB( nColor ) ) );
-+	    //m_xProps->setPropertyValue( BACKCOLOR , XLRGBToOORGB(_color));
-+        SetMixedColor();
-+    }
-+}
++//=============================================================================
 +
-+void
-+ScVbaInterior::SetMixedColor()
-+{
-+    // 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:
- {
- 	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_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 ( c
- 			break;
- 		}
- 	}     
--	return uno::makeAny( nIndex );
-+    return nIndex;
-+}
++module ooo {  module vba {  module excel { 
 +
-+uno::Any SAL_CALL 
-+ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
++//=============================================================================
++
++interface XWorksheet;
++interface XWorksheets;
++interface XStyles;
++
++interface XWorkbook
 +{
-+	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 ) );
-+}
-+Color
-+ScVbaInterior::GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern )
-+{
-+    // 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;
-+}
-+Color
-+ScVbaInterior::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans )
-+{
-+    return Color( 
-+        nTrans,
-+        GetMixedColorComp( rFore.GetRed(), rBack.GetRed(), nTrans ),
-+        GetMixedColorComp( rFore.GetGreen(), rBack.GetGreen(), nTrans ),
-+        GetMixedColorComp( rFore.GetBlue(), rBack.GetBlue(), nTrans ));
-+}
-+sal_uInt8
-+ScVbaInterior::GetMixedColorComp(  sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans )
-+{
-+    sal_uInt32 nTemp = ((static_cast< sal_Int32 >( nBack ) - nFore) * nTrans) / 0x80 + nFore;
-+    return static_cast< sal_uInt8 >( nTemp );
-+}
-+uno::Reference< container::XNameContainer >
-+ScVbaInterior::GetAttributeContainer()
-+{
-+    return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue( rtl::OUString::createFromAscii( "UserDefinedAttributes" ) ), uno::UNO_QUERY_THROW );
-+}
-+sal_Int32
-+ScVbaInterior::GetAttributeData( uno::Any aValue )
-+{
-+    xml::AttributeData aDataValue;
-+    if( aValue >>= aDataValue )
-+    {
-+        return aDataValue.Value.toInt32();
-+    }
-+    return sal_Int32( 0 );
-+}
-+uno::Any
-+ScVbaInterior::SetAttributeData( sal_Int32 nValue )
-+{
-+    xml::AttributeData aAttributeData;
-+    //aAttributeData.Namespace = rtl::OUString::createFromAscii( "org.openoffice.excel.CellPatten");
-+    aAttributeData.Type = rtl::OUString::createFromAscii( "sal_Int32" );
-+    aAttributeData.Value = rtl::OUString::valueOf( nValue );
-+    return uno::makeAny( aAttributeData );
-+}
-+uno::Any
-+ScVbaInterior::GetUserDefinedAttributes( const rtl::OUString& sName )
-+{
-+    uno::Reference< container::XNameContainer > xNameContainer( GetAttributeContainer(), uno::UNO_QUERY_THROW );
-+    if( xNameContainer->hasByName( sName ) )
-+    {
-+        return xNameContainer->getByName( sName );
-+    }
-+    return uno::Any();
-+}
-+void
-+ScVbaInterior::SetUserDefinedAttributes( const rtl::OUString& sName, const uno::Any& aValue )
-+{
-+    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 ) );
-+    }
-+}
-+// OOo do not support below API
-+uno::Any SAL_CALL 
-+ScVbaInterior::getPattern() throw (uno::RuntimeException)
-+{
-+    // 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 >() );
-+}
-+Color
-+ScVbaInterior::GetBackColor()
-+{
-+    sal_Int32 nColor;
-+    Color aBackColor;
-+    uno::Any aColor = GetUserDefinedAttributes( BACKCOLOR ); 
-+    if( aColor.hasValue() )
-+    {
-+        nColor = GetAttributeData( aColor );
-+        aBackColor.SetColor( nColor );
-+    }
-+    else
-+    {
-+	    uno::Any aAny;
-+	    aAny = OORGBToXLRGB( m_xProps->getPropertyValue( BACKCOLOR ) );
-+        if( aAny >>= nColor )
-+        {
-+            nColor = XLRGBToOORGB( nColor );
-+            aBackColor.SetColor( nColor );
-+            SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( nColor ) );
-+        }
-+    }
-+    return aBackColor;
-+}
-+uno::Any SAL_CALL 
-+ScVbaInterior::getPatternColor() throw (uno::RuntimeException)
-+{
-+    // 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 ) );
-+}
-+void SAL_CALL 
-+ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::RuntimeException)
-+{
-+    sal_Int32 nPattColor;
-+    if( _patterncolor >>= nPattColor )
-+    {
-+        SetUserDefinedAttributes( PATTERNCOLOR, SetAttributeData( XLRGBToOORGB( nPattColor ) ) );
-+        SetMixedColor();
-+    }
-+    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 ) ) );
-+    }
-+    else
-+        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() );
- }
- 
- rtl::OUString& 
-Index: sc/source/ui/vba/vbainterior.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbainterior.hxx,v
-retrieving revision 1.4
-retrieving revision 1.4.96.1
-diff -u -p -u -p -b -w -B -r1.4 -r1.4.96.1
---- sc/source/ui/vba/vbainterior.hxx	11 Apr 2008 01:03:36 -0000	1.4
-+++ sc/source/ui/vba/vbainterior.hxx	29 Jul 2008 06:35:41 -0000	1.4.96.1
-@@ -46,8 +46,23 @@ class ScVbaInterior :  public ScVbaInter
- {
- 	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,
-                  const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = NULL) throw ( css::lang::IllegalArgumentException);
-@@ -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();
-Index: sc/source/ui/vba/vbalabel.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbalabel.cxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbalabel.cxx	11 Apr 2008 01:03:52 -0000	1.3
-+++ sc/source/ui/vba/vbalabel.cxx	5 Sep 2008 14:04:20 -0000	1.2.42.3
-@@ -35,7 +35,7 @@ using namespace org::openoffice;
- 
- 
- const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
--ScVbaLabel::ScVbaLabel( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : LabelImpl_BASE( xContext, xControlShape )
-+ScVbaLabel::ScVbaLabel(  const css::uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
- {
- }
- 
-@@ -53,3 +53,36 @@ ScVbaLabel::setCaption( const rtl::OUStr
- {
-     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
- }
-+uno::Any SAL_CALL 
-+ScVbaLabel::getValue() throw (css::uno::RuntimeException)
-+{
-+    return uno::makeAny( getCaption() );
-+}
++	interface ::ooo::vba::XHelperInterface;
 +
-+void SAL_CALL 
-+ScVbaLabel::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+    rtl::OUString sCaption;
-+    _value >>= sCaption;
-+    setCaption( sCaption ); 
-+}
++	[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 );
 +
-+rtl::OUString& 
-+ScVbaLabel::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel") );
-+	return sImplName;
-+}
++	any Colors([in] any Index) raises (com::sun::star::script::BasicErrorException);
++	long FileFormat() raises (com::sun::star::script::BasicErrorException);
++	void SaveCopyAs( [in] string Filename );
++};
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaLabel::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Label" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbalabel.hxx
++}; }; };
++
++#endif
+Index: oovbaapi/ooo/vba/excel/XPageSetup.idl
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbalabel.hxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbalabel.hxx	11 Apr 2008 01:04:06 -0000	1.3
-+++ sc/source/ui/vba/vbalabel.hxx	5 Sep 2008 14:04:21 -0000	1.2.42.3
-@@ -34,16 +34,23 @@
- 
- #include "vbacontrol.hxx"
- #include "vbahelper.hxx"
-+#include <cppuhelper/implbase2.hxx>
- 
--typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XLabel > LabelImpl_BASE;
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::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< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
-    // Attributes
-+    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
-     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/vbalistbox.cxx
+--- oovbaapi/ooo/vba/excel/XPageSetup.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPageSetup.idl	(revision 264308)
+@@ -0,0 +1,85 @@
++/*************************************************************************
++ *
++ * 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_excel_XPageSetup_idl__
++#define __ooo_vba_excel_XPageSetup_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 XPageSetup
++{
++
++	interface ::ooo::vba::XHelperInterface;
++
++	//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;
++
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XWorksheets.idl
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbalistbox.cxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.6
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.6
---- sc/source/ui/vba/vbalistbox.cxx	11 Apr 2008 01:05:34 -0000	1.4
-+++ sc/source/ui/vba/vbalistbox.cxx	16 Sep 2008 17:55:19 -0000	1.3.42.6
-@@ -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;
- 
--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< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ListBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
- {
--	// grab the default value property name
--	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
-+    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 )
-+// 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)
+--- oovbaapi/ooo/vba/excel/XWorksheets.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorksheets.idl	(revision 264308)
+@@ -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: XWorksheets.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_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 {
++                                                                                                                             
++//=============================================================================
++                                                                                                                             
++interface XWorksheets
++{
++	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 );
++};
++}; }; };
++                                                                                                                             
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XTextFrame.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XTextFrame.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XTextFrame.idl	(revision 264308)
+@@ -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
++ *
++ * $RCSfile: XTextFrame.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_XTextFrame_idl__
++#define __ooo_vba_excel_XTextFrame_idl__
++
++#ifndef __ooo_vba_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++#ifndef __ooo_vba_excel_XCharacters_idl__
++#include <ooo/vba/excel/XCharacters.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();*/
++};
++}; }; };
++#endif
+Index: oovbaapi/ooo/vba/excel/XDialog.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XDialog.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XDialog.idl	(revision 264308)
+@@ -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: XDialog.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_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
++
++
++//=============================================================================
++                                                                                                                             
++module ooo {  module vba {  module excel {
++                                                                                                                             
++//=============================================================================
++
++interface XApplication;
++                                                                                                                             
++interface XDialog 
++{
++	interface ::ooo::vba::XHelperInterface;
++
++	void Show();
++};
++                                                                                                                             
++}; }; };
++                                                                                                                             
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XFormatCondition.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XFormatCondition.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XFormatCondition.idl	(revision 264308)
+@@ -0,0 +1,84 @@
++/*************************************************************************
++ *
++ * 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: XFormatCondition.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_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 { 
++
++interface XFont;
++interface XInterior;
++interface XBorders;
++
++interface XFormatCondition 
++{
++	interface  ::ooo::vba::XHelperInterface;
++
++	void Delete(  ) raises ( com::sun::star::script::BasicErrorException );
++
++	/**
++	@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
+Index: oovbaapi/ooo/vba/excel/XStyle.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XStyle.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XStyle.idl	(revision 264308)
+@@ -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__
++
++#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
++
++module ooo {  module vba { module excel { 
++interface XStyle 
++{
++    interface XFormat;
++
++    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
++
+Index: oovbaapi/ooo/vba/excel/XAxes.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XAxes.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XAxes.idl	(revision 264308)
+@@ -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: XAxes.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_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
++
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++module ooo {  module vba { module excel { 
++
++interface XAxes
++{
++	interface ::ooo::vba::XCollection;	
++};
++
++}; }; };
++
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XComment.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XComment.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XComment.idl	(revision 264308)
+@@ -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: XComment.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_XComment_idl__
++#define __ooo_vba_excel_XComment_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
++//=============================================================================
++
++module ooo {  module vba {  module excel {
++
++interface XApplication;
++interface XRange;
++
++interface XComment
++{
++	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);
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XChartTitle.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XChartTitle.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XChartTitle.idl	(revision 264308)
+@@ -0,0 +1,53 @@
++/*************************************************************************
++ *
++ * 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: XChartTitle.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_XChartTitle_idl__
++#define __ooo_vba_excel_XChartTitle_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 { 
++
++interface XTitle;
++interface XChartTitle 
++{
++	interface XTitle;
++};
++
++}; }; };
++
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XAxis.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XAxis.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XAxis.idl	(revision 264308)
+@@ -0,0 +1,262 @@
++/*************************************************************************
++ *
++ * 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: XAxis.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_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
++
++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);
++
++    double getCrossesAt()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setType([in] long Type)
++        raises(com::sun::star::script::BasicErrorException);
++
++    long getType()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setHasTitle([in] boolean HasTitle)
++        raises(com::sun::star::script::BasicErrorException);
++
++    boolean getHasTitle()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setMinorUnit([in] double MinorUnit)
++        raises(com::sun::star::script::BasicErrorException);
++
++    double getMinorUnit()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setMinorUnitIsAuto([in] boolean MinorUnitIsAuto)
++        raises(com::sun::star::script::BasicErrorException);
++
++    boolean getMinorUnitIsAuto()
++        raises(com::sun::star::script::BasicErrorException);
++
++    void setReversePlotOrder([in] boolean ReversePlotOrder)
++        raises(com::sun::star::script::BasicErrorException);
++
++    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);
++
++    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);
++
++    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 );
++
++    // boolean		getAxisBetweenCategories( ) raises ( com::sun::star::script::BasicErrorException );
++
++
++};
++
++}; }; };
++
++#endif
++
+Index: oovbaapi/ooo/vba/excel/Range.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Range.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/Range.idl	(revision 264308)
+@@ -0,0 +1,49 @@
++/*************************************************************************
++ *
++ * 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: Range.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_Range_idl__
++#define __ooo_vba_excel_Range_idl__
++
++#ifndef __ooo_vba_excel_XRange_idl__
++#include <ooo/vba/excel/XRange.idl>
++#endif
++
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/table/XCellRange.idl>
++
++module ooo {  module vba { module excel {
++service Range : XRange
++{
++  	createRangeFromXCellRange(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::table::XCellRange Range );
++};
++
++}; }; };
++
++#endif
+Index: oovbaapi/ooo/vba/excel/XSeriesCollection.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XSeriesCollection.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XSeriesCollection.idl	(revision 264308)
+@@ -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__
++
++#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 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
++
++
+Index: oovbaapi/ooo/vba/excel/XAxisTitle.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XAxisTitle.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XAxisTitle.idl	(revision 264308)
+@@ -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: XAxisTitle.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_XAxisTitle_idl__
++#define __ooo_vba_excel_XAxisTitle_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 { 
++
++interface XAxisTitle 
++{
++	interface ::ooo::vba::excel::XTitle;
++};
++
++}; }; };
++
++#endif
++
+Index: oovbaapi/ooo/vba/excel/XFont.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XFont.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XFont.idl	(revision 264308)
+@@ -0,0 +1,74 @@
++/*************************************************************************
++ *
++ * 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: XFont.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_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>
++#endif
++
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++
++interface XFont
++{
++	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;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XPivotTable.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XPivotTable.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XPivotTable.idl	(revision 264308)
+@@ -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: XPivotTable.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_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__
++#define __ooo_vba__XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++
++//interface XPivotTable: com::sun::star::uno::XInterface
++interface XPivotTable
++{
++	interface ooo::vba::XHelperInterface;
++	XPivotCache PivotCache();
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XDataLabel.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XDataLabel.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XDataLabel.idl	(revision 264308)
+@@ -0,0 +1,62 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: XDataLabel.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_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 __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++interface XDataLabel
++{
++	interface ::ooo::vba::XHelperInterface;
++	string Text() raises(com::sun::star::script::BasicErrorException);
++
++	string Name() raises (com::sun::star::script::BasicErrorException);
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XChartObjects.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XChartObjects.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XChartObjects.idl	(revision 264308)
+@@ -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: XChartObjects.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_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_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 { 
++
++//=============================================================================
++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);
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XWorksheet.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWorksheet.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWorksheet.idl	(revision 264308)
+@@ -0,0 +1,117 @@
++/*************************************************************************
++ *
++ * 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: XWorksheet.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_XWorksheet_idl__
++#define __ooo_vba_excel_XWorksheet_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_XInvocation_idl__
++#include <com/sun/star/script/XInvocation.idl>
++#endif
++
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++
++interface XComments;
++interface XRange;
++interface XOutline;
++interface XPageSetup;
++interface XHPageBreaks;
++interface XWorksheet
++{
++	interface ::ooo::vba::XHelperInterface;
++	interface ::com::sun::star::script::XInvocation;
++
++        [attribute] string Name;
++	[attribute] boolean Visible; 
++	[attribute, readonly] long StandardHeight;
++	[attribute, readonly] long StandardWidth;
++	[attribute, readonly] boolean ProtectionMode;
++	[attribute, readonly] boolean ProtectContents;
++	[attribute, readonly] boolean ProtectDrawingObjects;
++	[attribute, readonly] XRange UsedRange; 
++	[attribute, readonly] XWorksheet Next;
++	[attribute, readonly] XWorksheet Previous;
++	[attribute, readonly] string CodeName;
++ 	[attribute, readonly] short Index;
++	
++	void Activate();
++	void Calculate( );
++	void Select();
++	void Move([in] any Before,[in] any After );
++	void Copy([in] any Before,[in] any After );
++	void Paste([in] any Destination,[in] any Link);
++	void Delete( );
++	void Protect([in] any Password,[in] any DrawingObjects ,[in] any Contents,[in] any Scenarios,[in] any UserInterfaceOnly);
++	void Unprotect([in] any Password );
++	void CheckSpelling([in] any CustomDictionary,[in] any IgnoreUppercase, [in] any AlwaysSuggest,[in] any SpellingLang );
++	XRange Range([in] any Cell1, [in] any Cell2 );
++	any ChartObjects([in] any Index);
++	any PivotTables([in] any Index);
++	any Comments([in] any Index);
++	XOutline Outline();
++	XPageSetup PageSetup();
++	any HPageBreaks([in] any Index);
++	any OLEObjects([in] any Index);
++	void ShowDataForm();
++	any Shapes([in] any Index);
++
++
++// FIXME: should prolly inherit from Range somehow...
++	XRange Cells([in] any RowIndex, [in] any ColumnIndex);
++	XRange Rows([in] any aIndex);
++	XRange Columns([in] any aIndex);
++
++	any Evaluate( [in] string Name);
++	
++
++	void setEnableCalculation([in] boolean EnableCalculation) raises(com::sun::star::script::BasicErrorException);
++	boolean getEnableCalculation() raises(com::sun::star::script::BasicErrorException);
++	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, [in] any IgnorePrintAreas );
++
++
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/Hyperlink.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Hyperlink.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/Hyperlink.idl	(revision 264308)
+@@ -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_Hyperlink_idl__
++#define __ooo_vba_excel_Hyperlink_idl__
++
++#ifndef __ooo_vba_excel_XHyperlink_idl__
++#include <ooo/vba/excel/XHyperlink.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 );
++};
++
++}; }; };
++
++#endif
+Index: oovbaapi/ooo/vba/excel/Window.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Window.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/Window.idl	(revision 264308)
+@@ -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
+Index: oovbaapi/ooo/vba/excel/XCharacters.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XCharacters.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XCharacters.idl	(revision 264308)
+@@ -0,0 +1,65 @@
++/*************************************************************************
++ *
++ * 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: XCharacters.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_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_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 { 
++
++//=============================================================================
++interface XCharacters
++{
++	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
++
++
+Index: oovbaapi/ooo/vba/excel/XName.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XName.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XName.idl	(revision 264308)
+@@ -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: XName.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_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	(revision 0)
++++ oovbaapi/ooo/vba/excel/XTitle.idl	(revision 264308)
+@@ -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	(revision 0)
++++ oovbaapi/ooo/vba/excel/XlBuildInDialog.idl	(revision 264308)
+@@ -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)
++        const long xlDialogAddChartAutoformat = 390; //(&H186)
++        const long xlDialogAddinManager = 321; //(&H141)
++        const long xlDialogAlignment = 43; //(&H2B)
++        const long xlDialogApplyNames = 133; //(&H85)
++        const long xlDialogApplyStyle = 212; //(&HD4)
++        const long xlDialogAppMove = 170; //(&HAA)
++        const long xlDialogAppSize = 171; //(&HAB)
++        const long xlDialogArrangeAll = 12;
++        const long xlDialogAssignToObject = 213; //(&HD5)
++        const long xlDialogAssignToTool = 293; //(&H125)
++        const long xlDialogAttachText = 80; //(&H50)
++        const long xlDialogAttachToolbars = 323; //(&H143)
++        const long xlDialogAutoCorrect = 485; //(&H1E5)
++        const long xlDialogAxes = 78; //(&H4E)
++        const long xlDialogBorder = 45; //(&H2D)
++        const long xlDialogCalculation = 32; //(&H20)
++        const long xlDialogCellProtection = 46; //(&H2E) 
++        const long xlDialogChangeLink = 166; //(&HA6) 
++        const long xlDialogChartAddData = 392; //(&H188)
++        const long xlDialogChartLocation = 527; //(&H20F)
++        const long xlDialogChartOptionDataLabelMultiple = 724; //(&H2D4)
++        const long xlDialogChartOptionDataLabels = 505; //(&H1F9) 
++        const long xlDialogChartOptionDataTable = 506; //(&H1FA)
++        const long xlDialogChartSourceData = 540; //(&H21C)
++        const long xlDialogChartTrend = 350; //(&H15E)
++        const long xlDialogChartType = 526; //(&H20E)
++        const long xlDialogChartWizard = 288; //(&H120)
++        const long xlDialogChechboxProperties = 435; //(&H1B3)
++        const long xlDialogClear = 52; //(&H34)
++        const long xlDialogColorPalette = 161; //(&HA1)
++        const long xlDialogColumnWidth = 47; //(&H2F)
++        const long xlDialogCombination = 73; //(&H49)
++        const long xlDialogConditionalFormatting = 583; //(&H247)
++        const long xlDialogConsolidate = 191; //(&HBF)
++        const long xlDialogCopyChart = 147; //(&H93)
++        const long xlDialogCopyPicture = 108; //(&H6C)
++        const long xlDialogCreateList = 769; //(&H31C)
++        const long xlDialogCreateNames = 62; //(&H3E)
++        const long xlDialogCreatePublisher = 217; //(&HD9)
++        const long xlDialogCustomizeToolbar = 276; //(&H114)
++        const long xlDialogCustomViews = 493; //(&H1ED)
++        const long xlDialogDataDelete = 36; //(&H24)
++        const long xlDialogDataLabel = 379; //(&H17B)
++        const long xlDialogDataLabelMultiple = 723; //(&H2D3)
++        const long xlDialogDataSeries = 40; //(&H28)
++        const long xlDialogDataValidation = 525; //(&H20D)
++        const long xlDialogDefineName = 61; //(&H3D)
++        const long xlDialogDefineStyle = 229; //(&HE5)
++        const long xlDialogDeleteFormat = 111; //(&H6F)
++        const long xlDialogDeleteName = 110; //(&H6E)
++        const long xlDialogDemote = 203; //(&HCB)
++        const long xlDialogDisplay = 27; //(&H1B)
++        const long xlDialogEditboxProperties = 438; //(&H1B6)
++        const long xlDialogEditColor = 223; //(&HDF)
++        const long xlDialogEditDelete = 54; //(&H36)
++        const long xlDialogEditionOptions = 251; //(&HFB)
++        const long xlDialogEditSeries = 228; //(&HE4)
++        const long xlDialogErrorbarX = 463; //(&H1CF)
++        const long xlDialogErrorbarY = 464; //(&H1D0)
++        const long xlDialogErrorChecking = 732; //(&H2DC)
++        const long xlDialogEvaluateFormula = 709; //(&H2C5)
++        const long xlDialogExternalDataProperties = 530; //(&H212)
++        const long xlDialogExtract = 35; //(&H23)
++        const long xlDialogFileDelete = 6;
++        const long xlDialogFileSharing = 481; //(&H1E1)
++        const long xlDialogFillGroup = 200; //(&HC8)
++        const long xlDialogFillWorkGroup = 301; //(&H12D)
++        const long xlDialogFilter = 447; //(&H1BF)
++        const long xlDialogFilterAdvanced = 370; //(&H172)
++        const long xlDialogFindFile = 475; //(&H1DB)
++        const long xlDialogFont = 26; //(&H1A)
++        const long xlDialogFontProperties = 381; //(&H17D)
++        const long xlDialogFormatAuto = 269; //(&H10D)
++        const long xlDialogFormatChart = 465; //(&H1D1)
++        const long xlDialogFormatCharttype = 423; //(&H1A7)
++        const long xlDialogFormatFont = 150; //(&H96)
++        const long xlDialogFormatLegend = 88; //(&H58)
++        const long xlDialogFormatMain = 225; //(&HE1)
++        const long xlDialogFormatMove = 128; //(&H80)
++        const long xlDialogFormatNumber = 42; //(&H2A)
++        const long xlDialogFormatOverlay = 226; //(&HE2)
++        const long xlDialogFormatSize = 129; //(&H81)
++        const long xlDialogFormatText = 89; //(&H59)
++        const long xlDialogFormulaFind = 64; //(&H40)
++        const long xlDialogFormulaGoto = 63; //(&H3F)
++        const long xlDialogFormulaReplace = 130; //(&H82)
++        const long xlDialogFunctionWizard = 450; //(&H1C2)
++        const long xlDialogGallery3dArea = 193; //(&HC1)
++        const long xlDialogGallery3dBar = 272; //(&H110)
++        const long xlDialogGallery3dColumn = 194; //(&HC2)
++        const long xlDialogGallery3dLine = 195; //(&HC3)
++        const long xlDialogGallery3dPie = 196; //(&HC4)
++        const long xlDialogGallery3dSurface = 273; //(&H111)
++        const long xlDialogGalleryArea = 67; //(&H43)
++        const long xlDialogGalleryBar = 68; //(&H44)
++        const long xlDialogGalleryColumn = 69; //(&H45)
++        const long xlDialogGalleryCustom = 388; //(&H184)
++        const long xlDialogGalleryDoughnut = 344; //(&H158)
++        const long xlDialogGalleryLine = 70; //(&H46)
++        const long xlDialogGalleryPie = 71; //(&H47)
++        const long xlDialogGalleryRader = 249; //(&HF9)
++        const long xlDialogGalleryScatter = 72; //(&H48)
++        const long xlDialogGoalSeek = 198; //(&HC6)
++        const long xlDialogGridlines = 76; //(&H4C)
++        const long xlDialogImportTextFile = 666; //(&H29A)
++        const long xlDialogInsert = 55; //(&H37)
++        const long xlDialogInsertHyperlink = 596; //(&H254)
++        const long xlDialogInsertNameLabel = 496; //(&H1F0)
++        const long xlDialogInsertObject = 259; //(&H103)
++        const long xlDialogInsertPicture = 342; //(&H156)
++        const long xlDialogInsertTitle = 380; //(&H17C)
++        const long xlDialogLabelProperties = 436; //(&H1B4)
++        const long xlDialogListboxProperties = 437; //(&H1B5)
++        const long xlDialogMacroOptions = 382; //(&H17E)
++        const long xlDialogMailEditMailer = 470; //(&H1D6)
++        const long xlDialogMailLogon = 339; //(&H153)
++        const long xlDialogMailNextLetter = 378; //(&H17A)
++        const long xlDialogMainChart = 85; //(&H55)
++        const long xlDialogMainChartType = 185; //(&HB9)
++        const long xlDialogMenuEditor = 322;  //(&H142)
++        const long xlDialogMove = 262; //(&H106)
++        const long xlDialogMyPermission = 834; //(&H342)
++        const long xlDialogNew = 119; //(&H77)
++        const long xlDialogNewWebQuery = 667; //(&H29B)
++        const long xlDialogNote = 154; //(&H9A)
++        const long xlDialogObjectProperties = 207; //(&HCF)
++        const long xlDialogObjectProtection = 214; //(&HD6)
++        const long xlDialogOpen = 1;
++        const long xlDialogOpenLinks = 2;
++        const long xlDialogOpenMail = 188; //(&HBC)
++        const long xlDialogOpenText = 441; //(&H1B9)
++        const long xlDialogOptionsCalculation = 318; //(&H13E)
++        const long xlDialogOptionsChart = 325; //(&H145)
++        const long xlDialogOptionsEdit = 319; //(&H13F)
++        const long xlDialogOptionsGeneral = 356; //(&H164)
++        const long xlDialogOptionsListAdd = 458; //(&H1CA)
++        const long xlDialogOptionsME = 647; //(&H287)
++        const long xlDialogOptionsTransition = 355; //(&H163)
++        const long xlDialogOptionsView = 320; //(&H140)
++        const long xlDialogOutline = 142; //(&H8E)
++        const long xlDialogOverlay = 86; //(&H56)
++        const long xlDialogOverlayChartType = 186; //(&HBA)
++        const long xlDialogPageSetup = 7;
++        const long xlDialogParse = 91; //(&H5B)
++        const long xlDialogPasteNames = 58; //(&H3A)
++        const long xlDialogPasteSpecial = 53; //(&H35)
++        const long xlDialogPatterns = 84; //(&H54)
++        const long xlDialogPermission = 832; //(&H340)
++        const long xlDialogPhonetic = 656; //(&H290)
++        const long xlDialogPivotCalculatedField = 570; //(&H23A)
++        const long xlDialogPivotCalculatedItem = 572; //(&H23C)
++        const long xlDialogPivotClientServerSet = 689; //(&H2B1)
++        const long xlDialogPivotFieldGroup = 433; //(&H1B1)
++        const long xlDialogPivotFieldProperties = 313; //(&H139)
++        const long xlDialogPivotFieldUngroup = 434; //(&H1B2)
++        const long xlDialogPivotShowPages = 421; //(&H1A5)
++        const long xlDialogPivotSolveOrder = 568; //(&H238)
++        const long xlDialogPivotTableOptions = 567; //(&H237)
++        const long xlDialogPivotTableWizard = 321; //(&H138)
++        const long xlDialogPlacement = 300; //(&H12C)
++        const long xlDialogPrint = 8;
++        const long xlDialogPrintSetup = 9;
++        const long xlDialogPrintPreview = 222; //(&HDE)
++        const long xlDialogPromote = 202; //(&HCA)
++        const long xlDialogProperties = 474; //(&H1DA)
++        const long xlDialogPropertyFields = 754; //(&H2F2)
++        const long xlDialogProtectDocument = 28; //(&H1C)
++        const long xlDialogProtectSharing = 620; //(&H26C)
++        const long xlDialogPublishAsWebPage = 653; //(&H28D)
++        const long xlDialogPushbuttonProperties = 445; //(&H1BD)
++        const long xlDialogReplaceFont = 134; //(&H86)
++        const long xlDialogRoutingSlip = 336; //(&H150)
++        const long xlDialogRowHeight = 127; //(&H7F)
++        const long xlDialogRun = 17; //(&H11)
++        const long xlDialogSaveAs = 5;
++        const long xlDialogSaveCopyAs = 456; //(&H1C8)
++        const long xlDialogSaveNewObject = 208; //(&HD0)
++        const long xlDialogSaveWorkbook = 145; //(&H91)
++        const long xlDialogSaveWorkspace = 285; //(&H11D)
++        const long xlDialogScale = 87; //(&H57)
++        const long xlDialogScenarioAdd = 307; //(&H133)
++        const long xlDialogScenarioCells = 305; //(&H131)
++        const long xlDialogScenarioEdit = 308; //(&H134)
++        const long xlDialogScenarioMerge = 473; //(&H1D9) 
++        const long xlDialogScenarioSummary = 311; //(&H137)  
++        const long xlDialogScrollbarProperties = 420; //(&H1A4)
++        const long xlDialogSearch = 731; //(&H2DB)
++        const long xlDialogSelectSpecial = 132; //(&H84)
++        const long xlDialogSendMail = 189; //(&HBD)
++        const long xlDialogSeriesAxes = 450; //(&H1CC)
++        const long xlDialogSeriesOptions = 557; //(&H22D)
++        const long xlDialogSeriesOrder = 466; //(&H1D2)
++        const long xlDialogSeriesShape = 504; //(&H1F8)
++        const long xlDialogSeriesX = 461; //(&H1CD)
++        const long xlDialogSeriesY = 462; //(&H1CE)
++        const long xlDialogSetBackgroundPicture = 509; //(&H1FD)
++        const long xlDialogSetPrintTitles = 23; //(&H17)
++        const long xlDialogSetUpdateStatus = 159; //(&H9F) 
++        const long xlDialogShowDetail = 204; //(&HCC)
++        const long xlDialogShowToolbar = 220; //(&HDC)
++        const long xlDialogSize = 261; //(&H105)
++        const long xlDialogSort = 39; //(&H27)
++        const long xlDialogSortSpecial = 192; //(&HC0)
++        const long xlDialogSplit = 137; //(&H89)
++        const long xlDialogStandardFont = 190; //(&HBE)
++        const long xlDialogStandardWidth = 472; //(&H1D8)
++        const long xlDialogStyle = 44; //(&H2C)
++        const long xlDialogSubscribeTo = 218; //(&HDA)
++        const long xlDialogSubtotalCreate = 398; //(&H18E)
++        const long xlDialogSummaryInfo = 474; //(&H1DA)
++        const long xlDialogTable = 41; //(&H29)
++        const long xlDialogTabOrder = 394; //(&H18A)
++        const long xlDialogTextToColumns = 422; //(&H1A6)
++        const long xlDialogUnhide = 94; //(&H5E)
++        const long xlDialogUpdateLink = 201; //(&HC9)
++        const long xlDialogVbaInsertFile = 328; //(&H148)
++        const long xlDialogVbaMakeAddin = 478; //(&H1DE)
++        const long xlDialogVbaProcedureDefinition = 330; //(&H14A)
++        const long xlDialogView3d = 197; //(&HC5)
++        const long xlDialogWebOptionsBrowsers = 773; //(&H305)
++        const long xlDialogWebOptionsEncoding = 686; //(&H2AE)
++        const long xlDialogWebOptionsFiles = 684; //(&H2AC)
++        const long xlDialogWebOptionsFonts = 687; //(&H2AF)
++        const long xlDialogWebOptionsGeneral = 683; //(&H2AB)
++        const long xlDialogWebOptionsPictures = 685; //(&H2AD)
++        const long xlDialogWindowMove = 14;
++        const long xlDialogWindowSize = 13;
++        const long xlDialogWorkbookAdd = 281; //(&H119)
++        const long xlDialogWorkbookCopy = 283; //(&H11B)
++        const long xlDialogWorkbookInsert = 354; //(&H162)
++        const long xlDialogWorkbookMove = 282; //(&H11A)
++        const long xlDialogWorkbookName = 386; //(&H182)
++        const long xlDialogWorkbookNew = 302; //(&H12E)
++        const long xlDialogWorkbookOptions = 284; //(&H11C)
++        const long xlDialogWorkbookProtect = 417; //(&H1A1) 
++        const long xlDialogWorkbookTabSplit = 415; //(&H19F) 
++        const long xlDialogWorkbookUnhide = 384; //(&H180) 
++        const long xlDialogWorkgroup = 199; //(&HC7)
++        const long xlDialogWorkspace = 95; //(&H5F)
++        const long xlDialogZoom = 256; //(&H100)
++};
++}; }; };
++#endif
+Index: oovbaapi/ooo/vba/excel/XStyles.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XStyles.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XStyles.idl	(revision 264308)
+@@ -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: XStyles.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_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_XHelperInterface_idl__
++#include <ooo/vba/XHelperInterface.idl>
++#endif
++
++#ifndef __ooo_vba_XCollection_idl__
++#include <ooo/vba/XCollection.idl>
++#endif
++
++module ooo {  module vba { module excel { 
++interface XStyle;
++interface XStyles 
++{
++    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
++
+Index: oovbaapi/ooo/vba/excel/XCharts.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XCharts.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XCharts.idl	(revision 264308)
+@@ -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: XCharts.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_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_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 { 
++interface XChart;
++//=============================================================================
++interface XCharts
++{
++	interface ooo::vba::XCollection;
++	any Add() raises(com::sun::star::script::BasicErrorException);
++	XChart getActiveChart() raises (com::sun::star::script::BasicErrorException);
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/makefile.mk
+===================================================================
+--- oovbaapi/ooo/vba/excel/makefile.mk	(revision 0)
++++ oovbaapi/ooo/vba/excel/makefile.mk	(revision 264308)
+@@ -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	(revision 0)
++++ oovbaapi/ooo/vba/excel/XComments.idl	(revision 264308)
+@@ -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: XComments.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_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 excel {
++
++interface XComments
++{
++	interface ooo::vba::XCollection;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XSeries.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XSeries.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XSeries.idl	(revision 264308)
+@@ -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__
++
++#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 XSeries
++{
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute, readonly] string Name;
++	any Series( [in] any Item );
++	any Values ( [in] any Values );
++	any XValues ( [in] any XValues );
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XValidation.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XValidation.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XValidation.idl	(revision 264308)
+@@ -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: XValidation.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_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
++
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++
++interface XValidation
++{
++	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
++
++
+Index: oovbaapi/ooo/vba/excel/XWindows.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWindows.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWindows.idl	(revision 264308)
+@@ -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: XWindows.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_XWindows_idl__
++#define __ooo_vba_excel_XWindows_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 XWindows
++{
++	interface ::ooo::vba::XCollection;
++
++	void Arrange( [in] long ArrangeStyle, [in] any ActiveWorkbook, [in] any SyncHorizontal, [in] any SyncVertical );	
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XRange.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XRange.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XRange.idl	(revision 264308)
+@@ -0,0 +1,179 @@
++/*************************************************************************
++ *
++ * 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: XRange.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_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 excel { 
++
++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 );
++
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XBorders.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XBorders.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XBorders.idl	(revision 264308)
+@@ -0,0 +1,62 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: XBorders.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_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 excel { 
++
++//=============================================================================
++interface XBorders
++{
++	
++	interface ooo::vba::excel::XBorder;
++	interface ooo::vba::XCollection;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XChart.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XChart.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XChart.idl	(revision 264308)
+@@ -0,0 +1,90 @@
++/*************************************************************************
++ *
++ * 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: XChart.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_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 __com_sun_star_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++interface XRange; 
++interface XChartTitle; 
++interface XChart
++{
++	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
++
++
+Index: oovbaapi/ooo/vba/excel/XApplication.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XApplication.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XApplication.idl	(revision 264308)
+@@ -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: XApplication.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_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
++{
++
++	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
++
++
+Index: oovbaapi/ooo/vba/excel/XNames.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XNames.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XNames.idl	(revision 264308)
+@@ -0,0 +1,57 @@
++/*************************************************************************
++ *
++ * 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: XNames.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_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 excel {
++                                                                                                                             
++//=============================================================================
++                                                                                                                             
++interface XNames
++{
++	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
++
+Index: oovbaapi/ooo/vba/excel/XHyperlink.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XHyperlink.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XHyperlink.idl	(revision 264308)
+@@ -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
+Index: oovbaapi/ooo/vba/excel/Workbook.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/Workbook.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/Workbook.idl	(revision 264308)
+@@ -0,0 +1,49 @@
++/*************************************************************************
++ *
++ * 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: Workbook.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_Workbook_idl__
++#define __ooo_vba_excel_Workbook_idl__
++
++#ifndef __ooo_vba_excel_XWorkbook_idl__
++#include <ooo/vba/excel/XWorkbook.idl>
++#endif
++
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/frame/XModel.idl>
++
++module ooo {  module vba { module excel {
++service Workbook : XWorkbook
++{
++  	createWorkbook(  [in] ::ooo::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
++};
++
++}; }; };
++
++#endif
+Index: oovbaapi/ooo/vba/excel/XOLEObject.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XOLEObject.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XOLEObject.idl	(revision 264308)
+@@ -0,0 +1,66 @@
++/*************************************************************************
++ *
++ * 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: XOLEObject.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_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 excel { 
++
++
++//=============================================================================
++interface XOLEObject
++{
++	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;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XWindow.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XWindow.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XWindow.idl	(revision 264308)
+@@ -0,0 +1,107 @@
++/*************************************************************************
++ *
++ * 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: XWindow.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_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 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);
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XHPageBreaks.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XHPageBreaks.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XHPageBreaks.idl	(revision 264308)
+@@ -0,0 +1,70 @@
++/*************************************************************************
++ *
++ * 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_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 excel { 
++
++//=============================================================================
++
++interface XHPageBreak;
++
++interface XHPageBreaks
++{
++
++	interface ooo::vba::XCollection;
++	//Methods	
++    any Add([in] any Before) raises(com::sun::star::script::BasicErrorException);
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XBorder.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XBorder.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XBorder.idl	(revision 264308)
+@@ -0,0 +1,62 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: XBorder.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_XBorder_idl__
++#define __ooo_vba_excel_XBorder_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 XBorder
++{
++	interface ::ooo::vba::XHelperInterface;
++
++	[attribute] any Color;
++	[attribute] any ColorIndex;
++	[attribute] any LineStyle;
++	[attribute] any Weight;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/excel/XOutline.idl
+===================================================================
+--- oovbaapi/ooo/vba/excel/XOutline.idl	(revision 0)
++++ oovbaapi/ooo/vba/excel/XOutline.idl	(revision 264308)
+@@ -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: XOutline.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_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
++
++//=============================================================================
++
++module ooo {  module vba {  module excel { 
++
++//=============================================================================
++
++
++interface XOutline
++{
++
++	interface ::ooo::vba::XHelperInterface;
++
++	//Methods	
++	void ShowLevels([in] any RowLevels,[in] any ColumnLevels);
++
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/XCommandBar.idl
+===================================================================
+--- oovbaapi/ooo/vba/XCommandBar.idl	(revision 0)
++++ oovbaapi/ooo/vba/XCommandBar.idl	(revision 264308)
+@@ -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 __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
++//=============================================================================
++
++module ooo {  module vba { 
++//=============================================================================
++interface XCommandBarControls;
++
++interface XCommandBar
++{
++	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
+Index: oovbaapi/ooo/vba/XCommandBarControl.idl
+===================================================================
+--- oovbaapi/ooo/vba/XCommandBarControl.idl	(revision 0)
++++ oovbaapi/ooo/vba/XCommandBarControl.idl	(revision 264308)
+@@ -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 __ooo_vba_XCommandBarControl_idl__
++#define __ooo_vba_XCommandBarControl_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 XCommandBarControl
++{
++	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 );
++};
++
++}; };
++
++#endif
+Index: oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl
+===================================================================
+--- oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl	(revision 0)
++++ oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl	(revision 264308)
+@@ -0,0 +1,49 @@
++/*************************************************************************
++ *
++ * 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: XVBAToOOEventDescGen.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_XVBAToOOEventDescGen_idl__
++#define __ooo_vba_XVBAToOOEventDescGen_idl__
++
++#ifndef __com_sun_star_script_ScriptEventDescriptor_idl__
++#include <com/sun/star/script/ScriptEventDescriptor.idl>
++#endif 
++
++#ifndef __com_sun_star_script_XScriptEventsSupplier_idl__
++#include <com/sun/star/script/XScriptEventsSupplier.idl>
++#endif 
++
++module ooo {  module vba { 
++interface XVBAToOOEventDescGen : 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 );
++};
++
++}; };
++#endif
+Index: oovbaapi/ooo/vba/XAssistant.idl
+===================================================================
+--- oovbaapi/ooo/vba/XAssistant.idl	(revision 0)
++++ oovbaapi/ooo/vba/XAssistant.idl	(revision 264308)
+@@ -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_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_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
+Index: oovbaapi/ooo/vba/XPropValue.idl
+===================================================================
+--- oovbaapi/ooo/vba/XPropValue.idl	(revision 0)
++++ oovbaapi/ooo/vba/XPropValue.idl	(revision 264308)
+@@ -0,0 +1,55 @@
++/*************************************************************************
++ *
++ * 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: XPropValue.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_XPropValue_idl__
++#define __ooo_vba_XPropValue_idl__
++
++#ifndef __com_sun_star_script_XDefaultProperty_idl__
++#include <com/sun/star/script/XDefaultProperty.idl>
++#endif
++
++
++//=============================================================================
++
++module ooo {  module vba { 
++
++
++//=============================================================================
++interface XPropValue: com::sun::star::script::XDefaultProperty
++{
++	[attribute] any Value;
++};
++
++//=============================================================================
++
++}; };
++
++#endif
++
++
+Index: oovbaapi/ooo/vba/constants/makefile.mk
+===================================================================
+--- oovbaapi/ooo/vba/constants/makefile.mk	(revision 0)
++++ oovbaapi/ooo/vba/constants/makefile.mk	(revision 264308)
+@@ -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
++
+Index: oovbaapi/ooo/vba/XErrObject.idl
+===================================================================
+--- oovbaapi/ooo/vba/XErrObject.idl	(revision 0)
++++ oovbaapi/ooo/vba/XErrObject.idl	(revision 264308)
+@@ -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: sc/source/filter/excel/excimp8.cxx
+===================================================================
+--- sc/source/filter/excel/excimp8.cxx	(revision 264185)
++++ sc/source/filter/excel/excimp8.cxx	(revision 264308)
+@@ -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();
+ }
+Index: sc/source/core/tool/compiler.cxx
+===================================================================
+--- sc/source/core/tool/compiler.cxx	(revision 264185)
++++ sc/source/core/tool/compiler.cxx	(revision 264308)
+@@ -580,7 +580,34 @@ OpCode ScCompiler::GetEnglishOpCode( const String&
+     return bFound ? (*iLook).second : OpCode(ocNone);
+ }
+ 
++// 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 )
++    {
++        return true;
++    }
++    // 2. old add in functions
++    USHORT nIndex;
++    if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
++    {
++        return true;
++    }
++
++    // 3. new (uno) add in functions
++    String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE ));
++    if (aIntName.Len())
++    {
++        return true;
++    }
++    return false;		// no valid function name
++}
++
+ // static
+ ScCompiler::OpCodeMapPtr ScCompiler::CreateOpCodeMap(
+         const ::com::sun::star::uno::Sequence<
+@@ -3507,7 +3534,7 @@ BOOL ScCompiler::GetToken()
+     BOOL bStop = FALSE;
+     if( pArr->GetCodeError() && !bIgnoreErrors )
+         bStop = TRUE;
+-    else
++    else
+     {
+         short nWasColRowName;
+         if ( pArr->nIndex
+Index: sc/source/ui/vba/vbapivotcache.cxx
+===================================================================
+--- sc/source/ui/vba/vbapivotcache.cxx	(revision 264185)
++++ sc/source/ui/vba/vbapivotcache.cxx	(revision 264308)
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbaname.hxx
+===================================================================
+--- sc/source/ui/vba/vbaname.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaname.hxx	(revision 264308)
+@@ -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
+ 
+ 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);
+ 
+ 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 @@ class ScVbaName : public NameImpl_BASE
+ 	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);
+ 
+ 	// Methods
+ 	virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
+Index: sc/source/ui/vba/vbaworkbooks.hxx
+===================================================================
+--- sc/source/ui/vba/vbaworkbooks.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaworkbooks.hxx	(revision 264308)
+@@ -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
+Index: sc/source/ui/vba/vbacomments.hxx
+===================================================================
+--- sc/source/ui/vba/vbacomments.hxx	(revision 264185)
++++ sc/source/ui/vba/vbacomments.hxx	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/vbaframe.hxx	(revision 264308)
+@@ -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>
++
++#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	(revision 264185)
++++ sc/source/ui/vba/vbafillformat.cxx	(revision 264308)
+@@ -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"
+ 
+-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 )
+ {
+     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" ) );
+     }
+     return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbastyle.cxx
+===================================================================
+--- sc/source/ui/vba/vbastyle.cxx	(revision 264185)
++++ sc/source/ui/vba/vbastyle.cxx	(revision 264308)
+@@ -31,7 +31,7 @@
+ #include "vbastyle.hxx"
+ #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ static rtl::OUString DISPLAYNAME( RTL_CONSTASCII_USTRINGPARAM("DisplayName") );
+@@ -71,7 +71,7 @@ void ScVbaStyle::initialise() throw ( uno::Runtime
+ 
+ }
+ 
+-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 @@ void ScVbaStyle::initialise() throw ( uno::Runtime
+ 	}
+ }
+ 
+-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 )
+ {
+ 	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;
+ }
+Index: sc/source/ui/vba/vbacontrols.cxx
+===================================================================
+--- sc/source/ui/vba/vbacontrols.cxx	(revision 0)
++++ sc/source/ui/vba/vbacontrols.cxx	(revision 264308)
+@@ -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();
++    }
++    
++    // 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& 
++ScVbaControls::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControls") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaControls::getServiceNames()
++{
++	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;
++}
+Index: sc/source/ui/vba/vbalineformat.hxx
+===================================================================
+--- sc/source/ui/vba/vbalineformat.hxx	(revision 264185)
++++ sc/source/ui/vba/vbalineformat.hxx	(revision 264308)
+@@ -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 @@ class ScVbaLineFormat : public ScVbaLineFormat_BAS
+     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 @@ class ScVbaLineFormat : public ScVbaLineFormat_BAS
+     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
+Index: sc/source/ui/vba/vbaseriescollection.cxx
+===================================================================
+--- sc/source/ui/vba/vbaseriescollection.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaseriescollection.cxx	(revision 264308)
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbacombobox.hxx
+===================================================================
+--- sc/source/ui/vba/vbacombobox.hxx	(revision 264185)
++++ sc/source/ui/vba/vbacombobox.hxx	(revision 264308)
+@@ -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>
+ 
+ #include "vbacontrol.hxx"
++#include "vbalistcontrolhelper.hxx"
+ #include "vbahelper.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;
+ 
+-	
+ public:
+-	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 @@ class ScVbaComboBox : public ComboBoxImpl_BASE
+ 
+ 	// 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();
+ };
+ 
+ #endif //
+Index: sc/source/ui/vba/vbatogglebutton.cxx
+===================================================================
+--- sc/source/ui/vba/vbatogglebutton.cxx	(revision 0)
++++ sc/source/ui/vba/vbatogglebutton.cxx	(revision 264308)
+@@ -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	(revision 264185)
++++ sc/source/ui/vba/vbapivottable.hxx	(revision 264308)
+@@ -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 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	(revision 264185)
++++ sc/source/ui/vba/vbalabel.cxx	(revision 264308)
+@@ -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& _capt
+ {
+     m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ }
++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	(revision 264185)
++++ sc/source/ui/vba/vbachartobjects.hxx	(revision 264308)
+@@ -29,8 +29,8 @@
+  ************************************************************************/
+ #ifndef SC_VBA_CHARTOBJECTS_HXX
+ #define SC_VBA_CHARTOBJECTS_HXX
+-#include <org/openoffice/excel/XChartObjects.hpp>
+-#include <org/openoffice/excel/XChartObject.hpp>
++#include <ooo/vba/excel/XChartObjects.hpp>
++#include <ooo/vba/excel/XChartObject.hpp>
+ #include <cppuhelper/implbase1.hxx>
+ #include <com/sun/star/uno/XComponentContext.hpp>
+ #include <com/sun/star/table/XTableCharts.hpp>
+@@ -40,10 +40,10 @@
+ #include "vbahelper.hxx"
+ #include <hash_map>
+ 
+-typedef CollTestImplHelper< oo::excel::XChartObjects > ChartObjects_BASE;
++typedef CollTestImplHelper< ov::excel::XChartObjects > ChartObjects_BASE;
+ /* #TODO see if this hash table is 'really' necessary
+ typedef ::std::hash_map< ::rtl::OUString, 
+-css::uno::Reference< oo::excel::XChartObject >,
++css::uno::Reference< ov::excel::XChartObject >,
+     ::rtl::OUStringHash,
+     ::std::equal_to< ::rtl::OUString > > aHashTable;
+ */
+@@ -54,9 +54,9 @@ class ScVbaChartObjects : public ChartObjects_BASE
+ 	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 )
+-	//css::uno::Reference< oo::excel::XChartObject > putByPersistName( const rtl:::OUString& _sPersistChartName );
++	//css::uno::Reference< ov::excel::XChartObject > putByPersistName( const rtl:::OUString& _sPersistChartName );
+ public:
+-	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 css::uno::Reference< css::drawing::XDrawPageSupplier >&  _xDrawPageSupplier );
++	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 css::uno::Reference< css::drawing::XDrawPageSupplier >&  _xDrawPageSupplier );
+ 
+ 	css::uno::Sequence< rtl::OUString > getChartObjectNames() throw( css::script::BasicErrorException );
+ 	void removeByName(const rtl::OUString& _sChartName);
+Index: sc/source/ui/vba/vbaworksheet.hxx
+===================================================================
+--- sc/source/ui/vba/vbaworksheet.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaworksheet.hxx	(revision 264308)
+@@ -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>
+ 
+ #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:
+ 
+-	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:
+-	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 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
+ 	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 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
+ 	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 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
+     virtual void SAL_CALL setCodeName( const rtl::OUString& sCodeName ) throw (css::uno::RuntimeException);
+     sal_Int16 getSheetID() 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, const css::uno::Any& IgnorePrintAreas ) throw (css::uno::RuntimeException);
+ 	// XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();	
+Index: sc/source/ui/vba/vbapagebreak.cxx
+===================================================================
+--- sc/source/ui/vba/vbapagebreak.cxx	(revision 0)
++++ sc/source/ui/vba/vbapagebreak.cxx	(revision 264308)
+@@ -0,0 +1,141 @@
++/*************************************************************************
++ *
++ * 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 "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 )
++{
++}
++
++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;
++
++    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) 
++{
++    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)
++{
++    mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
++}
++
++template< typename Ifc1 >
++uno::Reference< excel::XRange> ScVbaPageBreak<Ifc1>::Location() throw ( script::BasicErrorException, uno::RuntimeException)
++{
++    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& 
++ScVbaPageBreak<Ifc1>::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageBreak") );
++	return sImplName;
++}
++
++template< typename Ifc1 >
++uno::Sequence< rtl::OUString > 
++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.excel.PageBreak" ) );
++	}
++	return aServiceNames;
++}
++
++template class ScVbaPageBreak< excel::XHPageBreak >;
++
++/* class ScVbaHPageBreak */
++rtl::OUString& 
++ScVbaHPageBreak::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreak") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaHPageBreak::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" ) );
++	}
++	return aServiceNames;
++}
++
+Index: sc/source/ui/vba/vbashapes.cxx
+===================================================================
+--- sc/source/ui/vba/vbashapes.cxx	(revision 264185)
++++ sc/source/ui/vba/vbashapes.cxx	(revision 264308)
+@@ -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>
+ 
+ #include "vbashapes.hxx"
+ #include "vbashape.hxx"
+ #include "vbashaperange.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ class VbShapeEnumHelper : public EnumerationHelper_BASE
+@@ -76,7 +76,7 @@ void ScVbaShapes::initBaseCollection()
+ 	m_xNameAccess.set( xShapes, uno::UNO_QUERY );
+ }
+ 
+-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::un
+ 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 un
+ 	{
+ 		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 );
+Index: sc/source/ui/vba/vbapane.cxx
+===================================================================
+--- sc/source/ui/vba/vbapane.cxx	(revision 264185)
++++ sc/source/ui/vba/vbapane.cxx	(revision 264308)
+@@ -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	(revision 264185)
++++ sc/source/ui/vba/vbahelper.hxx	(revision 264308)
+@@ -31,20 +31,24 @@
+ #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>
+ 
+ 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 +60,12 @@ namespace css = ::com::sun::star;
+ 				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 +85,7 @@ namespace css = ::com::sun::star;
+ 		// 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 )
+@@ -136,6 +143,80 @@ class Millimeter
+ 		return points;
+ 	}
+ };
++
++class AbstractGeometryAttributes // probably should replace the ShapeHelper below
++{
++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;
++};
++
++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
++{
++
++    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);
++};
++
+ class ShapeHelper
+ {
+ protected:
+@@ -250,7 +331,7 @@ class DebugHelper
+ 	} // openoffice
+ } // org
+ 
+-namespace oo = org::openoffice;
++namespace ov = ooo::vba;
+ 
+ #ifdef DEBUG
+ #  define SC_VBA_FIXME(a) OSL_TRACE( a )
+Index: sc/source/ui/vba/vbapictureformat.cxx
+===================================================================
+--- sc/source/ui/vba/vbapictureformat.cxx	(revision 264185)
++++ sc/source/ui/vba/vbapictureformat.cxx	(revision 264308)
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbacontrol.hxx
+===================================================================
+--- sc/source/ui/vba/vbacontrol.hxx	(revision 264185)
++++ sc/source/ui/vba/vbacontrol.hxx	(revision 264308)
+@@ -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>
+ 
+ #include "vbahelper.hxx"
++#include "vbahelperinterface.hxx"
+ 
+-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:
+-    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 @@ class ScVbaControl : public ControlImpl_BASE
+     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();
+ };
+ 
+ 
+@@ -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
+Index: sc/source/ui/vba/vbacommandbars.cxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbars.cxx	(revision 0)
++++ sc/source/ui/vba/vbacommandbars.cxx	(revision 264308)
+@@ -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>
++
++#include "vbacommandbars.hxx"
++#include "vbacommandbar.hxx"
++
++using namespace com::sun::star;
++using namespace ooo::vba;
++
++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
++{
++    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 )
++    {
++    }
++    virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
++    {
++        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 )
++    {
++        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();
++    }
++};
++
++
++ScVbaCommandBars::ScVbaCommandBars( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< container::XIndexAccess > xIndexAccess ) : CommandBars_BASE( xParent, xContext, xIndexAccess )
++{
++    retrieveObjects();
++}
++void
++ScVbaCommandBars::retrieveObjects() throw ( uno::RuntimeException )
++{
++    uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument(), uno::UNO_QUERY_THROW );
++    if( xServiceInfo->supportsService( sSpreadsheetDocumentUrl ) )
++    {
++        m_sModuleName = sSpreadsheetDocumentUrl;
++    }
++    else if( xServiceInfo->supportsService( sTextDocumentUrl ) )
++    {
++        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 );
++}
++
++// XEnumerationAccess
++uno::Type SAL_CALL 
++ScVbaCommandBars::getElementType() throw ( uno::RuntimeException )
++{
++    return XCommandBars::static_type( 0 );
++}
++uno::Reference< container::XEnumeration >
++ScVbaCommandBars::createEnumeration() throw ( uno::RuntimeException )
++{
++    return uno::Reference< container::XEnumeration >( new CommandBarEnumeration( mxContext, this, m_xNameAccess->getElementNames() ) );
++}
++
++uno::Any
++ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
++{
++    // aSource should be a name at this time, because of the class is API wrapper.
++    rtl::OUString sToolBarName;
++    if( aSource >>= 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") ) )
++        {
++            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)
++{
++    // Position - MsoBar MenuBar - sal_Bool
++    // Currently only the Name is supported.
++    rtl::OUString sName;
++    if( !( Name >>= sName ) )
++    {
++        sName = rtl::OUString::createFromAscii("Custom1");
++    }
++    sal_Bool bTemporary;
++    if( !( Temporary >>= bTemporary ) )
++    {
++        bTemporary = sal_True;
++    }
++    return uno::Reference< XCommandBar >( new ScVbaCommandBar( this, mxContext, sName.toAsciiLowerCase(), bTemporary, sal_True ) );
++}
++sal_Int32 SAL_CALL 
++ScVbaCommandBars::getCount() 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++ )
++    {
++        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 )
++{
++    if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
++    {
++        return createCollectionObject( aIndex );    
++    }
++    return uno::Any();
++}
++
++sal_Bool
++ScVbaCommandBars::checkToolBarExist( rtl::OUString sToolBarName )
++{
++    CommandBarNameMap::const_iterator iter = mCommandBarNameMap.find( sToolBarName.toAsciiLowerCase() );
++    if( iter != mCommandBarNameMap.end() )
++    {
++        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 )
++        {
++            if( allNames[i].indexOf( sToolBarName ) != -1 )
++            {
++                return sal_True;
++            }
++        }
++    }
++    return sal_False;
++}
++    
++// XHelperInterface
++rtl::OUString& 
++ScVbaCommandBars::getServiceImplName()
++{
++    static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBars") );
++    return sImplName;
++}
++uno::Sequence<rtl::OUString> 
++ScVbaCommandBars::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;
++}
++
+Index: sc/source/ui/vba/vbaformat.cxx
+===================================================================
+--- sc/source/ui/vba/vbaformat.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaformat.cxx	(revision 264308)
+@@ -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 @@ uno::Any SAL_CALL
+ 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 @@ 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;
+ }
+Index: sc/source/ui/vba/makefile.mk
+===================================================================
+--- sc/source/ui/vba/makefile.mk	(revision 264185)
++++ sc/source/ui/vba/makefile.mk	(revision 264308)
+@@ -83,13 +83,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 \
+@@ -111,9 +114,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 ------------------------------------------------------
+ 
+ .INCLUDE :	target.mk
+Index: sc/source/ui/vba/vbapivottables.cxx
+===================================================================
+--- sc/source/ui/vba/vbapivottables.cxx	(revision 264185)
++++ sc/source/ui/vba/vbapivottables.cxx	(revision 264308)
+@@ -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 @@ class PivotTableEnumeration : public EnumerationHe
+ 
+ };
+ 
+-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 @@ 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;
+ }
+Index: sc/source/ui/vba/vbapagesetup.cxx
+===================================================================
+--- sc/source/ui/vba/vbapagesetup.cxx	(revision 0)
++++ sc/source/ui/vba/vbapagesetup.cxx	(revision 264308)
+@@ -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>
++
++using namespace ::com::sun::star;
++using namespace ::ooo::vba;
++
++#define ZOOM_IN 10
++#define ZOOM_MAX 400
++
++bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, ScRange& refRange, ScRangeList& aCellRanges, ScAddress::Convention aConv = ScAddress::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;
++
++    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 );
++}		
++
++rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() 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( ScAddress::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, ScAddress::CONV_XL_A1, ','  );
++    }
++    
++    return aPrintArea;
++}
++
++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 );
++		}
++    }
++}
++
++double SAL_CALL ScVbaPageSetup::getTopMargin() throw (css::uno::RuntimeException)
++{
++    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 );
++}
++
++void SAL_CALL ScVbaPageSetup::setTopMargin( double margin ) throw (css::uno::RuntimeException)
++{
++    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& )
++    {
++    }
++}
++
++double SAL_CALL ScVbaPageSetup::getBottomMargin() throw (css::uno::RuntimeException)
++{
++    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 );
++}
++
++void SAL_CALL ScVbaPageSetup::setBottomMargin( double margin ) throw (css::uno::RuntimeException)
++{
++    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& )
++    {
++    }
++}
++
++double SAL_CALL ScVbaPageSetup::getRightMargin() throw (css::uno::RuntimeException)
++{
++    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 );;
++}
++
++void SAL_CALL ScVbaPageSetup::setRightMargin( double margin ) throw (css::uno::RuntimeException)
++{
++    sal_Int32 rightMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
++    try
++    {
++        uno::Any aValue;
++        aValue <<= rightMargin;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aValue );
++    }
++    catch( uno::Exception& )
++    {
++    }
++
++}
++
++double SAL_CALL ScVbaPageSetup::getLeftMargin() throw (css::uno::RuntimeException)
++{
++    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 );;
++}
++
++void SAL_CALL ScVbaPageSetup::setLeftMargin( double margin ) throw (css::uno::RuntimeException)
++{
++    sal_Int32 leftMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
++    try
++    {
++        uno::Any aValue;
++        aValue <<= leftMargin;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aValue );
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
++
++double SAL_CALL ScVbaPageSetup::getHeaderMargin() throw (css::uno::RuntimeException)
++{
++    sal_Int32 headerMargin = 0;
++    try
++    {
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
++        aValue >>= headerMargin;
++    }
++    catch( uno::Exception& )
++    {
++    }
++    
++    return Millimeter::getInPoints( headerMargin );;
++}
++
++void SAL_CALL ScVbaPageSetup::setHeaderMargin( double margin ) throw (css::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& )
++    {
++    }
++}
++
++double SAL_CALL ScVbaPageSetup::getFooterMargin() throw (css::uno::RuntimeException)
++{
++    sal_Int32 footerMargin = 0;
++    try
++    {
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
++        aValue >>= footerMargin;
++    }
++    catch( uno::Exception& )
++    {
++    }
++    
++    return Millimeter::getInPoints( footerMargin );;
++}
++
++void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::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& )
++    {
++    }
++}
++
++sal_Int32 SAL_CALL ScVbaPageSetup::getOrientation() throw (css::uno::RuntimeException)
++{
++    sal_Int32 orientation = excel::XlPageOrientation::xlPortrait;
++    try
++    {
++        sal_Bool isLandscape = sal_False;
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
++        aValue >>= isLandscape;
++
++        if( isLandscape )
++        {
++            orientation = excel::XlPageOrientation::xlLandscape;
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
++    return orientation;
++}
++
++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() );
++    }
++
++    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;
++        }
++
++        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 );
++        }
++
++        if( isLandscape )
++        {
++            orientation = excel::XlPageOrientation::xlLandscape;
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
++
++uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException)
++{
++    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")));
++}
++
++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;
++        }
++
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( scaleToPageY ));
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
++
++uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeException)
++{
++    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")));
++}
++
++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;
++        }
++
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( scaleToPageX ));
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
++
++uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException)
++{
++    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
++    {
++		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() );
++            }
++        }
++
++        // 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& )
++    {
++    }
++
++    mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")), uno::makeAny( pageScale ));
++}
++
++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& )
++    {
++    }
++
++    return leftHeader;
++}
++
++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& )
++    {
++    }
++}
++
++rtl::OUString SAL_CALL ScVbaPageSetup::getCenterHeader() throw (css::uno::RuntimeException)
++{
++    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& )
++    {
++    }
++
++    return centerHeader;
++}
++
++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& )
++    {
++    }
++}
++
++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& )
++    {
++    }
++
++    return rightHeader;
++}
++
++void SAL_CALL ScVbaPageSetup::setRightHeader( const rtl::OUString& rightHeader) 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->getRightText();
++            xText->setString( rightHeader );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) ); 
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
++
++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& )
++    {
++    }
++
++    return leftFooter;
++}
++
++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& )
++    {
++    }
++}
++
++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& )
++    {
++    }
++
++    return centerFooter;
++}
++
++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& )
++    {
++    }
++
++}
++
++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() )
++        {
++            uno::Reference< text::XText > xText = xFooterContent->getRightText();
++            rightFooter = xText->getString();
++        }
++    }
++    catch( uno::Exception& )
++    {
++    }
++
++    return rightFooter;
++}
++
++void SAL_CALL ScVbaPageSetup::setRightFooter( const rtl::OUString& rightFooter) 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->getRightText();
++            xText->setString( rightFooter );
++            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) ); 
++        }
++    }
++    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;
++}
++
++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() );
++    }
++
++    try
++    {
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")), uno::makeAny( bOrder ));
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
++
++sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() 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 ] );
++    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;
++    }
++
++    return number;
 +}
- 
--// 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& 
-         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,37 +143,15 @@ ScVbaListBox::setMultiSelect( sal_Bool _
- {
-     m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ), uno::makeAny( _multiselect ) );
- }
--/*
--css::uno::Sequence< sal_Bool > SAL_CALL 
--ScVbaListBox::getSelected() throw (css::uno::RuntimeException)
--{
--    uno::Sequence< rtl::OUString > sList;
--    uno::Sequence< sal_Int16 > nList;
--    m_xProps->getPropertyValue( ITEMS ) >>= sList;
--    uno::Sequence< sal_Bool > bSelected( sList.getLength() );
--    for( sal_Int16 i = 0; i < bSelected.getLength(); i++ )
--        bSelected[i] = sal_False;
--    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
--    for( sal_Int16 i = 0; i < nList.getLength(); i++ )
--    {
--        bSelected[nList[i]] = sal_True;
--    }
--    return bSelected;
--}
- 
--void SAL_CALL 
--ScVbaListBox::setSelected( const css::uno::Sequence< sal_Bool >& _selected ) throw (css::uno::RuntimeException)
--{
--}
--*/
- css::uno::Any SAL_CALL 
- ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
- {
-     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 )
-+    sal_Int16 nIndex( 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 );
-@@ -166,65 +162,24 @@ ScVbaListBox::Selected( sal_Int32 index 
- 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; 
--		}
--		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;	
--			//
-+	mpListHelper->AddItem( pvargItem, pvargIndex );
- 		}
- 
--		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
--		
--	}
-+void SAL_CALL 
-+ScVbaListBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
++
++void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) throw (css::uno::RuntimeException)
 +{
-+	mpListHelper->removeItem( index );
- }
- 
- 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();
- }
++    if( firstPageNumber < 0 )
++        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++    if( firstPageNumber == excel::Constants::xlAutomatic )
++        firstPageNumber = 0;
 +
-+// 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 +189,7 @@ ScVbaListBox::setValueEvent( const uno::
-         throw uno::RuntimeException( rtl::OUString::createFromAscii(
-                     "Invalid type\n. need boolean." ), uno::Reference< uno::XInterface >() );
-     uno::Sequence< sal_Int16 > nList;
--    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
-+    m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList;
-     sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
-     sal_Int16 nIndex = m_nIndex;
-     for( sal_Int16 i = 0; i < nLength; i++ )
-@@ -250,7 +205,8 @@ ScVbaListBox::setValueEvent( const uno::
-                     nList[i] = nList[i + 1];
-                 }
-                 nList.realloc( nLength - 1 );
--                m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
-+                //m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
-+		m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nList ) );
-                 return;
-             }
-         }
-@@ -271,6 +227,10 @@ ScVbaListBox::setValueEvent( const uno::
-     }
- }
- 
-+// this is called when something like the following vba code is used
-+// to determine the selected state of particular entries in the Listbox
-+// msgbox ListBox1.Selected( 3 )
++    try
++    {
++        uno::Any aValue;
++        aValue <<= (sal_Int16)firstPageNumber;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
++    }
++    catch( uno::Exception& )
++    {
++    }
++}
 +
- css::uno::Any 
- ScVbaListBox::getValueEvent()
- {
-@@ -287,3 +247,41 @@ ScVbaListBox::getValueEvent()
- 
-     return uno::makeAny( sal_False );
- }
++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)
++{
++    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)
++{
++    sal_Bool centerHorizontally = sal_False;
++    try
++    {
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")));
++        aValue >>= centerHorizontally;
++    }
++    catch( uno::Exception& )
++    {
++    }
++    return centerHorizontally;
++}
 +
-+void SAL_CALL
-+ScVbaListBox::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
++void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally) throw (css::uno::RuntimeException)
 +{
-+	ScVbaControl::setRowSource( _rowsource );
-+	mpListHelper->setRowSource( _rowsource );
++    try
++    {
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")), uno::makeAny( centerHorizontally ));
++    }
++    catch( uno::Exception& )
++    {
++    }
 +}
 +
-+sal_Int32 SAL_CALL
-+ScVbaListBox::getListCount() throw (uno::RuntimeException)
++sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException)
 +{
-+	return mpListHelper->getListCount();
++    sal_Bool printHeadings = sal_False;
++    try
++    {
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
++        aValue >>= printHeadings;
++    }
++    catch( uno::Exception& )
++    {
++    }
++    return printHeadings;
 +}
 +
-+uno::Any SAL_CALL 
-+ScVbaListBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
++void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (css::uno::RuntimeException)
 +{
-+	return mpListHelper->List( pvargIndex, pvarColumn );
++    try
++    {
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")), uno::makeAny( printHeadings ));
++    }
++    catch( uno::Exception& )
++    {
++    }
 +}
 +
 +rtl::OUString& 
-+ScVbaListBox::getServiceImplName()
++ScVbaPageSetup::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaListBox") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageSetup") );
 +	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaListBox::getServiceNames()
++ScVbaPageSetup::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.ScVbaListBox" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageSetup" ) );
 +	}
 +	return aServiceNames;
 +}
-Index: sc/source/ui/vba/vbalistbox.hxx
+Index: sc/source/ui/vba/vbaborders.cxx
+===================================================================
+--- sc/source/ui/vba/vbaborders.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaborders.cxx	(revision 264308)
+@@ -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 @@ class ScVbaBorder : public ScVbaBorder_Base
+ 		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 @@ class RangeBorderEnumWrapper : public EnumerationH
+ 	}
+ };
+ 
+-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;
+ }
+Index: sc/source/ui/vba/vbarange.hxx
+===================================================================
+--- sc/source/ui/vba/vbarange.hxx	(revision 264185)
++++ sc/source/ui/vba/vbarange.hxx	(revision 264308)
+@@ -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>
+@@ -59,8 +59,8 @@
+ class ScTableSheetsObj;
+ class ScCellRangesBase;
+ 
+-//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 +89,18 @@ class ValueGetter : public ArrayVisitor
+ 
+ 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 +109,26 @@ class ScVbaRange : public ScVbaRange_BASE
+ 	virtual css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any getFormulaValue( ScGrammar::Grammar ) throw (css::uno::RuntimeException);
+ 	virtual void   setFormulaValue( const css::uno::Any& aValue, ScGrammar::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 );
+ 	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, ScAddress::Convention eConv = ScAddress::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, ScAddress::Convention eConv = ScAddress::CONV_XL_A1  ) throw ( css::uno::RuntimeException );
+ 
+     // Attributes
+ 	virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
+@@ -151,9 +150,9 @@ class ScVbaRange : public ScVbaRange_BASE
+ 	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 +164,20 @@ class ScVbaRange : public ScVbaRange_BASE
+ 	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 +187,36 @@ class ScVbaRange : public ScVbaRange_BASE
+ 	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 +231,10 @@ class ScVbaRange : public ScVbaRange_BASE
+ 	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 +242,17 @@ class ScVbaRange : public ScVbaRange_BASE
+ 	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 +269,9 @@ class ScVbaRange : public ScVbaRange_BASE
+ //     * 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();
+Index: sc/source/ui/vba/vbaworkbook.hxx
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbalistbox.hxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.6
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.6
---- sc/source/ui/vba/vbalistbox.hxx	11 Apr 2008 01:05:48 -0000	1.3
-+++ sc/source/ui/vba/vbalistbox.hxx	16 Sep 2008 17:55:20 -0000	1.2.42.6
-@@ -37,26 +37,26 @@
+--- sc/source/ui/vba/vbaworkbook.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaworkbook.hxx	(revision 264308)
+@@ -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 @@ class ScVbaWorkbook : public ScVbaWorkbook_BASE
+ 	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 @@ class ScVbaWorkbook : public ScVbaWorkbook_BASE
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbatextbox.hxx	(revision 264308)
+@@ -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 "vbapropvalue.hxx"
-+#include "vbalistcontrolhelper.hxx"
  #include "vbahelper.hxx"
  
- typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::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;
+-typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XTextBox > TextBoxImpl_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XTextBox > TextBoxImpl_BASE;
  
-     sal_Int16 m_nIndex;
- 	
+ class ScVbaTextBox : public TextBoxImpl_BASE
+ {
++    bool mbDialog;
  public:
--	ScVbaListBox( const css::uno::Reference< css::uno::XComponentContext >& xContext, 
+-    ScVbaTextBox( 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 );
++    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);
 -
-+	ScVbaListBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
++    //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	(revision 264185)
++++ sc/source/ui/vba/vbaformatcondition.hxx	(revision 264308)
+@@ -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"
  
- 	// 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:
+-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 );
  
- 	// 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);
+ 	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 @@ class ScVbaFormatCondition : public ScVbaFormatCon
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbaaxis.cxx	(revision 264308)
+@@ -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::BasicError
+ 	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::BasicErrorExc
+ 	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 ) thr
+ 				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::BasicErro
+ 				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;
+ }
+Index: sc/source/ui/vba/vbashape.hxx
+===================================================================
+--- sc/source/ui/vba/vbashape.hxx	(revision 264185)
++++ sc/source/ui/vba/vbashape.hxx	(revision 264308)
+@@ -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 @@ class ScVbaShape : public ScVbaShape_BASE
+     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);
  
- 	// 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();
-Index: sc/source/ui/vba/vbalistcontrolhelper.cxx
+     // 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);
+Index: sc/source/ui/vba/service.cxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbalistcontrolhelper.cxx
-diff -N sc/source/ui/vba/vbalistcontrolhelper.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbalistcontrolhelper.cxx	16 Sep 2008 17:55:20 -0000	1.1.2.1
-@@ -0,0 +1,145 @@
-+#include <vbalistcontrolhelper.hxx>
-+
-+using namespace com::sun::star;
-+using namespace org::openoffice;
-+
-+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)
+--- sc/source/ui/vba/service.cxx	(revision 264185)
++++ sc/source/ui/vba/service.cxx	(revision 264308)
+@@ -53,13 +53,23 @@ namespace  worksheet
+ {
+ extern sdecl::ServiceDecl const serviceDecl;
+ }
++namespace window 
 +{
-+	if ( _rowsource.getLength() == 0 )
-+		Clear();
++extern sdecl::ServiceDecl const serviceDecl;
 +}
-+
-+sal_Int32 SAL_CALL
-+ListControlHelper::getListCount() throw (uno::RuntimeException)
+ namespace globals
+ {
+ extern sdecl::ServiceDecl const serviceDecl;
+ }
++namespace  userform
 +{
-+    uno::Sequence< rtl::OUString > sList;
-+    m_xProps->getPropertyValue( ITEMS ) >>= sList;
-+    return sList.getLength();
++extern sdecl::ServiceDecl const serviceDecl;
 +}
-+
-+uno::Any SAL_CALL 
-+ListControlHelper::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
++namespace hyperlink 
 +{
-+    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;
++extern sdecl::ServiceDecl const serviceDecl;
 +}
-Index: sc/source/ui/vba/vbalistcontrolhelper.hxx
+ 
+-
+-
+ extern "C"
+ {
+     void SAL_CALL component_getImplementationEnvironment( 
+@@ -76,7 +86,7 @@ extern "C"
+ 
+ 	// Component registration
+         if ( component_writeInfoHelper( pServiceManager, pRegistryKey, 
+-		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl ) )
++		range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl ) )
+ 		{
+ 			// Singleton registration
+ 			try
+@@ -85,9 +95,9 @@ extern "C"
+ 					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 @@ 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;
+     }
+Index: sc/source/ui/vba/vbauserform.hxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbalistcontrolhelper.hxx
-diff -N sc/source/ui/vba/vbalistcontrolhelper.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbalistcontrolhelper.hxx	16 Sep 2008 17:55:20 -0000	1.1.2.1
-@@ -0,0 +1,20 @@
-+#ifndef SC_VBA_LISTCONTROLHELPER
-+#define SC_VBA_LISTCONTROLHELPER
+--- sc/source/ui/vba/vbauserform.hxx	(revision 0)
++++ sc/source/ui/vba/vbauserform.hxx	(revision 264308)
+@@ -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 "vbahelper.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>
 +
-+class ListControlHelper
-+{
-+	css::uno::Reference< css::beans::XPropertySet > m_xProps;
++#include "vbahelperinterface.hxx"
++#include "vbacontrol.hxx"
 +
-+public:
-+	ListControlHelper( const css::uno::Reference< css::beans::XPropertySet >& rxControl ) : m_xProps( rxControl ){}
++//typedef InheritedHelperInterfaceImpl1< ov::msforms::XUserForm > ScVbaUserForm_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XUserForm > ScVbaUserForm_BASE;
 +
-+	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);
++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/vbamultipage.cxx
+Index: sc/source/ui/vba/vbanames.hxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbamultipage.cxx
-diff -N sc/source/ui/vba/vbamultipage.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbamultipage.cxx	5 Sep 2008 14:04:21 -0000	1.1.2.2
-@@ -0,0 +1,132 @@
+--- sc/source/ui/vba/vbanames.hxx	(revision 264185)
++++ sc/source/ui/vba/vbanames.hxx	(revision 264308)
+@@ -30,13 +30,13 @@
+ #ifndef SC_VBA_NAMES_HXX
+ #define SC_VBA_NAMES_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"
+ 
+-typedef CollTestImplHelper< oo::excel::XNames > ScVbaNames_BASE;
++typedef CollTestImplHelper< ov::excel::XNames > ScVbaNames_BASE;
+ 
+ class ScVbaNames : public ScVbaNames_BASE
+ {
+@@ -47,7 +47,7 @@ class ScVbaNames : public ScVbaNames_BASE
+ 	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
+ 
+ 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();
+Index: sc/source/ui/vba/vbacommandbarcontrol.hxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbarcontrol.hxx	(revision 0)
++++ sc/source/ui/vba/vbacommandbarcontrol.hxx	(revision 264308)
+@@ -0,0 +1,90 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -6192,111 +11221,246 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbamultipage.hxx"
-+#include <org/openoffice/vba/XCollection.hpp>
-+#include "vbapages.hxx"
-+#include <vector>
-+
-+using namespace com::sun::star;
-+using namespace org::openoffice;
-+
-+// 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") );
-+
-+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)
-+	{
-+		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 )
-+{
-+	return new PagesImpl( nPages );
-+}
-+
-+ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, 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());
-+}
++#ifndef SC_VBA_COMMANDBARCONTROL_HXX
++#define SC_VBA_COMMANDBARCONTROL_HXX
 +
-+// Attributes
-+sal_Int32 SAL_CALL 
-+ScVbaMultiPage::getValue() throw (css::uno::RuntimeException)
-+{
-+    sal_Int32 nValue = 0;
-+    m_xProps->getPropertyValue( SVALUE ) >>= nValue;
-+    return nValue;
-+}
++#include <ooo/vba/XCommandBarControl.hpp>
 +
-+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) );
-+}
++#include "vbahelperinterface.hxx"
++#include "vbacommandbarcontrols.hxx"
 +
++typedef InheritedHelperInterfaceImpl1< ov::XCommandBarControl > CommandBarControl_BASE;
 +
-+rtl::OUString& 
-+ScVbaMultiPage::getServiceImplName()
++class ScVbaCommandBarControl : public CommandBarControl_BASE
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage") );
-+	return sImplName;
-+}
++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::Any SAL_CALL 
-+ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException)
-+{
-+	sal_Int32 nValue = 0;
-+	m_xProps->getPropertyValue( SVALUEMAX ) >>= nValue;
-+	uno::Reference< vba::XCollection > xColl( new ScVbaPages( this, mxContext, getPages( nValue ) ) );
-+	if ( !index.hasValue() )
-+		return uno::makeAny( xColl );
-+	return xColl->Item( uno::makeAny( index ), uno::Any() );
-+}
++    // 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::Sequence< rtl::OUString > 
-+ScVbaMultiPage::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
++	// 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	(revision 264185)
++++ sc/source/ui/vba/vbaaxistitle.hxx	(revision 264308)
+@@ -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();
+Index: sc/source/ui/vba/vbacharacters.cxx
+===================================================================
+--- sc/source/ui/vba/vbacharacters.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacharacters.cxx	(revision 264308)
+@@ -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,11 @@ using namespace ::com::sun::star;
+ 	uno::Reference< text::XTextCursor > xTextCursor( m_xSimpleText->createTextCursor(), uno::UNO_QUERY_THROW );
+ 	xTextCursor->collapseToStart();
+ 	if ( nStart )
 +	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.MultiPage" ) );
++		if ( ( nStart + 1 ) > xRange->getString().getLength() )
++			nStart = xRange->getString().getLength();
+ 		xTextCursor->goRight( nStart, sal_False );
 +	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbamultipage.hxx
+ 	if ( nLength < 0 ) // expand to end
+ 		xTextCursor->gotoEnd( sal_True );
+ 	else
+@@ -127,7 +131,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;
+ }
+Index: sc/source/ui/vba/vbapropvalue.hxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbamultipage.hxx
-diff -N sc/source/ui/vba/vbamultipage.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbamultipage.hxx	5 Sep 2008 14:04:21 -0000	1.1.2.2
-@@ -0,0 +1,65 @@
+--- sc/source/ui/vba/vbapropvalue.hxx	(revision 264185)
++++ sc/source/ui/vba/vbapropvalue.hxx	(revision 264308)
+@@ -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 
+ {
+Index: sc/source/ui/vba/vbastyles.cxx
+===================================================================
+--- sc/source/ui/vba/vbastyles.cxx	(revision 264185)
++++ sc/source/ui/vba/vbastyles.cxx	(revision 264308)
+@@ -30,12 +30,12 @@
+ #include "vbastyles.hxx"
+ #include "vbastyle.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ 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< beans::XPropertySet > xStyleProps( aObject, uno::UNO_QUERY_THROW );
+ 	uno::Reference< excel::XStyle > xStyle( new ScVbaStyle( xParent, xContext, xStyleProps, xModel ) ); 
+@@ -43,7 +43,7 @@ css::uno::Any
+ }
+ 
+ 
+-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 )
+ {
+ 	try
+ 	{    
+@@ -78,13 +78,13 @@ ScVbaStyles::getElementType() throw (uno::RuntimeE
+ 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 @@ 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;
+ }
+Index: sc/source/ui/vba/vbaformatconditions.hxx
+===================================================================
+--- sc/source/ui/vba/vbaformatconditions.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaformatconditions.hxx	(revision 264308)
+@@ -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"
+ 
+-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);	
+Index: sc/source/ui/vba/vbaprogressbar.cxx
+===================================================================
+--- sc/source/ui/vba/vbaprogressbar.cxx	(revision 0)
++++ sc/source/ui/vba/vbaprogressbar.cxx	(revision 264308)
+@@ -0,0 +1,78 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -6331,415 +11495,816 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_MULTIPAGE_HXX
-+#define SC_VBA_MULTIPAGE_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XMultiPage.hpp>
-+#include <com/sun/star/container/XIndexAccess.hpp>
++#include "vbaprogressbar.hxx"
++#include <vector>
 +
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+//#include <cppuhelper/implbase2.hxx>
-+#include <cppuhelper/implbase1.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") );
++
++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 )
++{
++}
++
++// Attributes
++uno::Any SAL_CALL 
++ScVbaProgressBar::getValue() throw (css::uno::RuntimeException)
++{
++    return m_xProps->getPropertyValue( SVALUE );
++}
 +
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XMultiPage > MultiPageImpl_BASE;
++void SAL_CALL 
++ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SVALUE,  _value );
++}
 +
-+class ScVbaMultiPage : public MultiPageImpl_BASE
++rtl::OUString& 
++ScVbaProgressBar::getServiceImplName()
 +{
-+    css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
-+    css::uno::Reference< css::beans::XPropertySet > mxDialogProps;
-+public:
-+    ScVbaMultiPage( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper, const css::uno::Reference< css::uno::XInterface >& xDialog );
-+   // Attributes
-+    virtual sal_Int32 SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const sal_Int32 _value ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Any SAL_CALL Pages( const css::uno::Any& index ) throw (css::uno::RuntimeException);
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
++	return sImplName;
++}
 +
-+    //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/vbaname.cxx
++uno::Sequence< rtl::OUString > 
++ScVbaProgressBar::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/vbaoleobjects.cxx
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaname.cxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
---- sc/source/ui/vba/vbaname.cxx	11 Apr 2008 01:06:07 -0000	1.3
-+++ sc/source/ui/vba/vbaname.cxx	6 Jul 2008 15:31:26 -0000	1.2.42.2
-@@ -31,6 +31,7 @@
+--- sc/source/ui/vba/vbaoleobjects.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaoleobjects.cxx	(revision 264308)
+@@ -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 <com/sun/star/table/XCellRange.hpp>
- #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-+#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
+ #include "vbaoleobject.hxx"
+ #include "vbaoleobjects.hxx"
  
- #include "vbaname.hxx"
- #include "vbarange.hxx"
-@@ -110,17 +111,37 @@ ScVbaName::getValue() throw (css::uno::R
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ 
+ typedef ::cppu::WeakImplHelper1< container::XIndexAccess > XIndexAccess_BASE;
+ 
+@@ -85,12 +85,12 @@ typedef std::vector< uno::Reference< drawing::XCon
+ class EnumWrapper : public EnumerationHelper_BASE
  {
- 	::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 )
+ 
+-        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 @@ class EnumWrapper : public EnumerationHelper_BASE
+                 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 > oleObjec
+ 	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 @@ ScVbaOLEObjects::createCollectionObject( const css
+     {
+         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::
+ 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 )
  	{
--		::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;
-+        }
-+        nFrom = nTo + 1;
-+        nTo = sValue.indexOf( sSegmentation, nFrom );
-+    }
-+    ::rtl::OUString sTmpValue = sValue.copy( nFrom );
-+	if ( sTmpValue.toChar() == '$' )
+ 		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	(revision 264185)
++++ sc/source/ui/vba/vbacharts.hxx	(revision 264308)
+@@ -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	(revision 264185)
++++ sc/source/ui/vba/vbapivotcache.hxx	(revision 264308)
+@@ -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	(revision 264185)
++++ sc/source/ui/vba/vbapalette.cxx	(revision 264308)
+@@ -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	(revision 264185)
++++ sc/source/ui/vba/vbawsfunction.cxx	(revision 264308)
+@@ -42,13 +42,14 @@
+ #include <comphelper/anytostring.hxx>
+ 
+ #include "vbawsfunction.hxx"
++#include "opcode.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,8 +87,25 @@ ScVbaWSFunction::invoke(const rtl::OUString& Funct
+ 	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 )
 +	{
-+		::rtl::OUString sTmp = sTmpValue.copy(1);
-+        sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
-+		sResult += sTmp;
++		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;
++}
+ 
+ void SAL_CALL
+ ScVbaWSFunction::setValue(const rtl::OUString& /*PropertyName*/, const uno::Any& /*Value*/) throw(beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
+@@ -107,7 +125,10 @@ ScVbaWSFunction::hasMethod(const rtl::OUString& Na
+ 	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;
  	}
--	sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
--	if (sValue.indexOf('=') != 0)
-+	if (sResult.indexOf('=') != 0)
+ 	catch( uno::Exception& /*e*/ )
+@@ -146,7 +167,7 @@ ScVbaWSFunction::getServiceNames()
+ 	if ( aServiceNames.getLength() == 0 )
  	{
--		sValue = ::rtl::OUString::createFromAscii("=") + sValue;
-+		sResult = ::rtl::OUString::createFromAscii("=") + sResult;
+ 		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 sValue;
-+	return sResult;
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbacomment.cxx
+===================================================================
+--- sc/source/ui/vba/vbacomment.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacomment.cxx	(revision 264308)
+@@ -29,7 +29,7 @@
+  ************************************************************************/
+ #include "vbacomment.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"
+ 
+ 
+-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 @@ ScVbaComment::getCommentByIndex( sal_Int32 Index )
+ {
+ 	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 @@ ScVbaComment::getServiceNames()
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbafillformat.hxx	(revision 264308)
+@@ -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
+ {
+ 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 @@ class ScVbaFillFormat : public ScVbaFillFormat_BAS
+     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 @@ class ScVbaFillFormat : public ScVbaFillFormat_BAS
+     // 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	(revision 264185)
++++ sc/source/ui/vba/vbastyle.hxx	(revision 264308)
+@@ -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 @@ class ScVbaStyle : public ScVbaStyle_BASE
+ 	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 @@ class ScVbaStyle : public ScVbaStyle_BASE
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbaoleobject.cxx	(revision 264308)
+@@ -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 @@ double mm2pt( sal_Int32 mm )
+ }
+ 
+ 
+-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 @@ ScVbaOLEObject::getServiceNames()
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbawindow.cxx	(revision 264308)
+@@ -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;
+ 
+ typedef  std::hash_map< rtl::OUString,
+ SCTAB, ::rtl::OUStringHash,
+@@ -92,7 +97,7 @@ class SelectedSheetsEnum : public Enumeration_BASE
+ 			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 @@ class SelectedSheetsEnumAccess : public SelectedSh
+ 
+ };
  
- void 
-@@ -128,17 +149,38 @@ ScVbaName::setValue( const ::rtl::OUStri
+-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 ) 
  {
- 	::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)
+-	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();
++}
++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& aInde
+ {
+ 	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 sTmp = sValue.copy(1);
- 		sValue = sTmp;
+-		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() );	
  	}
--	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))
+ 	return uno::makeAny( xSheets ); 	
+@@ -289,8 +306,8 @@ ScVbaWindow::getCaption() throw (uno::RuntimeExcep
+ 		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& _wind
+ 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 @@ ScVbaWindow::Activate() throw (css::uno::RuntimeEx
+ 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 @@ ScVbaWindow::setSplitColumn( sal_Int32 _splitcolum
+ 	if( getSplitColumn() != _splitcolumn )
  	{
--		sValue = ::rtl::OUString::createFromAscii("$") + sSheetName;
-+		sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
+ 		sal_Bool bFrozen = getFreezePanes();
+-		m_xViewFreezable->freezeAtPosition( _splitcolumn, 0 );
++		sal_Int32 nRow = getSplitRow();
++		m_xViewFreezable->freezeAtPosition( _splitcolumn, nRow );
+ 		SplitAtDefinedPosition( !bFrozen );
  	}
--	sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
--	mxNamedRange->setContent(sValue);
-+    sResult += sTmpValue;
-+	mxNamedRange->setContent(sResult);
  }
- 
- ::rtl::OUString 
-@@ -192,7 +234,7 @@ ScVbaName::setRefersToR1C1Local( const :
- css::uno::Reference< oo::excel::XRange >
- ScVbaName::getRefersToRange() throw (css::uno::RuntimeException)
+@@ -646,13 +664,14 @@ void SAL_CALL
+ ScVbaWindow::setSplitHorizontal( double _splithorizontal ) throw (uno::RuntimeException)
  {
--	css::uno::Reference< oo::excel::XRange > xRange;
-+    uno::Reference< oo::excel::XRange > xRange = ScVbaRange::getRangeObjectForName( mxContext, mxNamedRange->getName(), getDocShell( mxModel ), ScAddress::CONV_XL_R1C1 );
- 	return xRange;
+ 	double fHoriPixels = PointsToPixels( m_xDevice, _splithorizontal, sal_True );
+-   m_xViewSplitable->splitAtPosition( (int) fHoriPixels, 0 );	
++   m_xViewSplitable->splitAtPosition( static_cast<sal_Int32>( fHoriPixels ), 0 );	
  }
  
-Index: sc/source/ui/vba/vbanames.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbanames.cxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.2
---- sc/source/ui/vba/vbanames.cxx	11 Apr 2008 01:06:56 -0000	1.3
-+++ sc/source/ui/vba/vbanames.cxx	6 Jul 2008 15:29:52 -0000	1.2.42.2
-@@ -70,6 +70,7 @@ ScVbaNames::ScVbaNames(const css::uno::R
- 			mxModel( xModel ),
- 			mxNames( xNames )
+ sal_Int32 SAL_CALL 
+ ScVbaWindow::getSplitRow() throw (uno::RuntimeException)
  {
-+    m_xNameAccess.set( xNames, uno::UNO_QUERY_THROW );
+-	return m_xViewSplitable->getSplitRow();	
++	sal_Int32 nValue = m_xViewSplitable->getSplitRow();
++	return nValue ? nValue - 1 : nValue;	
  }
  
- ScVbaNames::~ScVbaNames()
-Index: sc/source/ui/vba/vbapagebreak.cxx
-===================================================================
-RCS file: sc/source/ui/vba/vbapagebreak.cxx
-diff -N sc/source/ui/vba/vbapagebreak.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapagebreak.cxx	29 Jul 2008 06:35:41 -0000	1.1.2.1
-@@ -0,0 +1,141 @@
-+/*************************************************************************
-+ *
-+ * 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 "vbapagebreak.hxx"
-+#include "vbarange.hxx"
-+#include <org/openoffice/excel/XlPageBreak.hpp>
-+using namespace ::com::sun::star;
-+using namespace ::org::openoffice;
+ void SAL_CALL 
+@@ -661,7 +680,8 @@ ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) th
+ 	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 @@ ScVbaWindow::setZoom( const uno::Any& _zoom ) thro
+ 	}			
+ }
+ 
++uno::Reference< excel::XWorksheet > SAL_CALL 
++ScVbaWindow::ActiveSheet(  ) throw (script::BasicErrorException, uno::RuntimeException)
++{
++	return ScVbaGlobals::getGlobalsImpl(mxContext)->getApplication()->getActiveSheet();
++}
 +
-+template< typename Ifc1 >
-+ScVbaPageBreak<Ifc1>::ScVbaPageBreak( const uno::Reference< vba::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 )
++uno::Any SAL_CALL
++ScVbaWindow::getView() throw (uno::RuntimeException)
 +{
++	// not supported now	
++	sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;	
++	return uno::makeAny( nWindowView );	
 +}
 +
-+template< typename Ifc1 >
-+sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) 
++void SAL_CALL
++ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException)
 +{
-+    uno::Any aValue = mxRowColPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )));
-+    sal_Bool hasPageBreak = sal_False;
-+    aValue >>= hasPageBreak;
++	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 );
++}
 +
-+    if( !hasPageBreak )
-+        return excel::XlPageBreak::xlPageBreakNone;
-+    
-+    if( maTablePageBreakData.ManualBreak )
-+        return excel::XlPageBreak::xlPageBreakManual;
-+    
-+    return excel::XlPageBreak::xlPageBreakAutomatic;
++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;
 +}
 +
-+template< typename Ifc1 >
-+void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) 
++void SAL_CALL
++ScVbaWindow::setVisible(sal_Bool _visible) throw (uno::RuntimeException)
 +{
-+    if( (type != excel::XlPageBreak::xlPageBreakNone) && 
-+        (type != excel::XlPageBreak::xlPageBreakManual) &&
-+        (type != excel::XlPageBreak::xlPageBreakAutomatic) )
-+    {
-+        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+    }
++	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 );	
++	}
++}
 +
-+    if( type == excel::XlPageBreak::xlPageBreakNone )
-+    {
-+        mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
-+        return;
-+    }
++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;
++		}
++	}
++}	
 +
-+    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;
++sal_Int32 SAL_CALL 
++ScVbaWindow::getHeight() throw (uno::RuntimeException)
++{
++	css::awt::Rectangle aRect = getPosSize(m_xModel);
++	return aRect.Height;
 +}
 +
-+template< typename Ifc1 >
-+void ScVbaPageBreak<Ifc1>::Delete() throw ( script::BasicErrorException, uno::RuntimeException)
++void SAL_CALL 
++ScVbaWindow::setHeight( sal_Int32 _height ) throw (uno::RuntimeException)
 +{
-+    mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
++	setPosSize(m_xModel, _height, css::awt::PosSize::HEIGHT);
 +}
 +
-+template< typename Ifc1 >
-+uno::Reference< excel::XRange> ScVbaPageBreak<Ifc1>::Location() throw ( script::BasicErrorException, uno::RuntimeException)
++sal_Int32 SAL_CALL 
++ScVbaWindow::getLeft() throw (uno::RuntimeException)
 +{
-+    uno::Reference< table::XCellRange > xRange( mxRowColPropertySet, uno::UNO_QUERY_THROW );
-+    return new ScVbaRange( ScVbaPageBreak_BASE::getParent(), ScVbaPageBreak_BASE::mxContext, xRange);
++	css::awt::Rectangle aRect = getPosSize(m_xModel);
++	return aRect.X;
 +}
 +
-+template< typename Ifc1 >
-+rtl::OUString& 
-+ScVbaPageBreak<Ifc1>::getServiceImplName()
++void SAL_CALL 
++ScVbaWindow::setLeft( sal_Int32 _left ) throw (uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageBreak") );
-+	return sImplName;
++	setPosSize(m_xModel, _left, css::awt::PosSize::X);
 +}
-+
-+template< typename Ifc1 >
-+uno::Sequence< rtl::OUString > 
-+ScVbaPageBreak<Ifc1>::getServiceNames()
++sal_Int32 SAL_CALL 
++ScVbaWindow::getTop() throw (uno::RuntimeException)
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PageBreak" ) );
-+	}
-+	return aServiceNames;
++	css::awt::Rectangle aRect = getPosSize(m_xModel);
++	return aRect.Y;
 +}
 +
-+template class ScVbaPageBreak< excel::XHPageBreak >;
-+
-+/* class ScVbaHPageBreak */
-+rtl::OUString& 
-+ScVbaHPageBreak::getServiceImplName()
++void SAL_CALL 
++ScVbaWindow::setTop( sal_Int32 _top ) throw (uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreak") );
-+	return sImplName;
++	setPosSize(m_xModel, _top, css::awt::PosSize::Y);
 +}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaHPageBreak::getServiceNames()
++sal_Int32 SAL_CALL 
++ScVbaWindow::getWidth() throw (uno::RuntimeException)
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.HPageBreak" ) );
-+	}
-+	return aServiceNames;
++	css::awt::Rectangle aRect = getPosSize(m_xModel);
++	return aRect.Width;
 +}
 +
-Index: sc/source/ui/vba/vbapagebreak.hxx
-===================================================================
-RCS file: sc/source/ui/vba/vbapagebreak.hxx
-diff -N sc/source/ui/vba/vbapagebreak.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapagebreak.hxx	5 Sep 2008 14:04:21 -0000	1.1.2.2
-@@ -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 <org/openoffice/excel/XPageBreak.hpp>
-+#include <org/openoffice/excel/XHPageBreak.hpp>
-+#include <org/openoffice/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 >
++void SAL_CALL 
++ScVbaWindow::setWidth( sal_Int32 _width ) throw (uno::RuntimeException)
 +{
-+typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE;
-+protected:
-+	css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet;
-+    css::sheet::TablePageBreakData maTablePageBreakData;
-+public:
-+	ScVbaPageBreak( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, 
-+                    const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+            		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< oo::excel::XRange> SAL_CALL Location() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++	setPosSize(m_xModel, _width, css::awt::PosSize::WIDTH);
++}
 +
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
++sal_Int32 SAL_CALL 
++ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++{
++	sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
++	double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterX/100000);
++	return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
++}
 +
++sal_Int32 SAL_CALL 
++ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++{
++	sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
++	double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterY/100000);
++	return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
++}
 +
-+typedef ScVbaPageBreak < oo::excel::XHPageBreak > ScVbaHPageBreak_BASE;
++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)
++{
++	// need test, print current active sheet	
++	PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, m_xModel, sal_True );
++}
 +
-+class ScVbaHPageBreak :  public ScVbaHPageBreak_BASE
++void SAL_CALL 
++ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
 +{
-+public:
-+	ScVbaHPageBreak( const css::uno::Reference< oo::vba::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();
-+};
++	// need test, print preview current active sheet	
++	PrintPreviewHelper( EnableChanges, m_xModel );	
++}
 +
-+#endif
-Index: sc/source/ui/vba/vbapagebreaks.cxx
+ 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" );
++}
+Index: sc/source/ui/vba/vbacontrols.hxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbapagebreaks.cxx
-diff -N sc/source/ui/vba/vbapagebreaks.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapagebreaks.cxx	29 Jul 2008 06:35:41 -0000	1.1.2.1
-@@ -0,0 +1,269 @@
+--- sc/source/ui/vba/vbacontrols.hxx	(revision 0)
++++ sc/source/ui/vba/vbacontrols.hxx	(revision 264308)
+@@ -0,0 +1,62 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6769,490 +12334,624 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#include "vbapagebreaks.hxx"
-+#include "vbapagebreak.hxx"
-+#include <org/openoffice/excel/XWorksheet.hpp>
-+using namespace ::com::sun::star;
-+using namespace ::org::openoffice;
-+
-+typedef ::cppu::WeakImplHelper1<container::XIndexAccess > RangePageBreaks_Base;
-+class RangePageBreaks : public RangePageBreaks_Base
-+{
-+private:
-+	uno::Reference< vba::XHelperInterface > mxParent;
-+	uno::Reference< uno::XComponentContext > mxContext;
-+	uno::Reference< sheet::XSheetPageBreak > mxSheetPageBreak;
-+	sal_Bool m_bColumn;
-+
-+public:
-+	RangePageBreaks( const uno::Reference< vba::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;
-+	}
++#ifndef SC_VBA_CONTROLS_HXX
++#define SC_VBA_CONTROLS_HXX
 +
-+	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);
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/msforms/XControls.hpp>
++#include <com/sun/star/awt/XControl.hpp>
 +
-+	// 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;
-+	}
-+};
++#include "vbacollectionimpl.hxx"
++#include "vbahelper.hxx"
 +
-+/** @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)
++typedef CollTestImplHelper< ov::msforms::XControls > ControlsImpl_BASE;
++
++class ScVbaControls : public ControlsImpl_BASE
 +{
-+    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();
++	css::uno::Reference< css::awt::XControl > mxDialog;
++protected:
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++public:
++    ScVbaControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
++                    const css::uno::Reference< css::awt::XControl >& xDialog );
++    // XControls
++     virtual void SAL_CALL Move( double cx, double cy ) 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);
 +
-+    sal_Int32 nLength = aTablePageBreakData.getLength();
-+    for( sal_Int32 i=0; i<nLength; i++ )
-+    {
-+        sal_Int32 nPos = aTablePageBreakData[i].Position;
-+        if( nPos > nUsedEnd )
-+            return nCount;
-+        if( nPos >= nUsedStart )
-+            nCount++;
-+    }
++    // ScVbaCollectionBaseImpl
++    virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
++    
++};
++#endif //SC_VBA_OLEOBJECTS_HXX
 +
-+    return nCount;
-+}
+Index: sc/source/ui/vba/vbaseriescollection.hxx
+===================================================================
+--- sc/source/ui/vba/vbaseriescollection.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaseriescollection.hxx	(revision 264308)
+@@ -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);
+Index: sc/source/ui/vba/vbalistcontrolhelper.cxx
+===================================================================
+--- sc/source/ui/vba/vbalistcontrolhelper.cxx	(revision 0)
++++ sc/source/ui/vba/vbalistcontrolhelper.cxx	(revision 264308)
+@@ -0,0 +1,145 @@
++#include <vbalistcontrolhelper.hxx>
 +
-+uno::Any SAL_CALL RangePageBreaks::getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
-+{
-+    if( (Index < getCount()) && ( Index >= 0 ))
-+    {
-+        sheet::TablePageBreakData aTablePageBreakData = getTablePageBreakData( Index );
-+        uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer();
-+        sal_Int32 nPos = aTablePageBreakData.Position;
-+        if( (nPos < xIndexAccess->getCount()) && (nPos > -1) )
-+        {
-+            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) ));
-+        }
-+    }
-+	throw lang::IndexOutOfBoundsException();
-+}
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+sheet::TablePageBreakData RangePageBreaks::getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException)
++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)
 +{
-+    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();
++	if ( pvargItem.hasValue()  )
++	{
++		uno::Sequence< rtl::OUString > sList;
++		m_xProps->getPropertyValue( ITEMS ) >>= sList;
 +
-+    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;
-+    }
++		sal_Int32 nIndex = sList.getLength();
 +
-+    return aTablePageBreakData;
-+}
++		if ( pvargIndex.hasValue() )
++			pvargIndex >>= nIndex;
 +
-+uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException)
-+{
-+    uno::Reference< excel::XRange > xRange;
-+    Before >>= xRange;
-+    if( !xRange.is() )
-+    {
-+		DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
-+	}
++		rtl::OUString sString = getAnyAsString( pvargItem );
 +
-+	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) ));
-+}
++		// 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 );
 +
-+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() );
-+	}
++			// 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;	
++			//
++		}
 +
-+	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();
++		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
++		
 +	}
-+};
-+
-+ScVbaHPageBreaks::ScVbaHPageBreaks( const uno::Reference< vba::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 )
-+{
 +}
 +
-+uno::Any SAL_CALL ScVbaHPageBreaks::Add( const uno::Any& Before) throw ( script::BasicErrorException, uno::RuntimeException)
++void SAL_CALL 
++ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
 +{
-+	RangePageBreaks* pPageBreaks = dynamic_cast< RangePageBreaks* >( m_xIndexAccess.get() );
-+	if( pPageBreaks )
++    sal_Int32 nIndex = 0;
++    // for int index
++	if ( index >>= nIndex  )
 +	{
-+		return pPageBreaks->Add( Before );
-+	}
-+	return uno::Any();
-+}
++		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< container::XEnumeration >
-+ScVbaHPageBreaks::createEnumeration() throw (uno::RuntimeException)
-+{
-+	return new RangePageBreaksEnumWrapper( m_xIndexAccess );
++		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
++	}
 +}
 +
-+uno::Any
-+ScVbaHPageBreaks::createCollectionObject( const css::uno::Any& aSource )
++void SAL_CALL 
++ListControlHelper::Clear(  ) throw (uno::RuntimeException)
 +{
-+	return aSource; // its already a pagebreak object
++	// urk, setValue doesn't seem to work !!
++	//setValue( uno::makeAny( sal_Int16() ) );
++	m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
 +}
 +
-+uno::Type 
-+ScVbaHPageBreaks::getElementType() throw (uno::RuntimeException)
++void SAL_CALL
++ListControlHelper::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
 +{
-+	return excel::XHPageBreak::static_type(0);
++	if ( _rowsource.getLength() == 0 )
++		Clear();
 +}
 +
-+rtl::OUString& 
-+ScVbaHPageBreaks::getServiceImplName()
++sal_Int32 SAL_CALL
++ListControlHelper::getListCount() throw (uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreaks") );
-+	return sImplName;
++    uno::Sequence< rtl::OUString > sList;
++    m_xProps->getPropertyValue( ITEMS ) >>= sList;
++    return sList.getLength();
 +}
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaHPageBreaks::getServiceNames()
++uno::Any SAL_CALL 
++ListControlHelper::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.HPageBreaks" ) );
-+	}
-+	return aServiceNames;
++    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/vbapagebreaks.hxx
+Index: sc/source/ui/vba/vbacollectionimpl.cxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbapagebreaks.hxx
-diff -N sc/source/ui/vba/vbapagebreaks.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapagebreaks.hxx	29 Jul 2008 06:35:42 -0000	1.1.2.1
-@@ -0,0 +1,71 @@
+--- sc/source/ui/vba/vbacollectionimpl.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacollectionimpl.cxx	(revision 264308)
+@@ -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 )
+Index: sc/source/ui/vba/vbatogglebutton.hxx
+===================================================================
+--- sc/source/ui/vba/vbatogglebutton.hxx	(revision 0)
++++ sc/source/ui/vba/vbatogglebutton.hxx	(revision 264308)
+@@ -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
 + *
-+ * 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_PAGEBREAKS_HXX
-+#define SC_VBA_PAGEBREAKS_HXX
++#ifndef SC_VBA_TOGGLEBUTTON_HXX
++#define SC_VBA_TOGGLEBUTTON_HXX
++#include <cppuhelper/implbase2.hxx>
++#include <ooo/vba/msforms/XToggleButton.hpp>
 +
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/excel/XHPageBreaks.hpp>
-+#include <org/openoffice/excel/XHPageBreak.hpp>
-+#include <org/openoffice/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"
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+typedef CollTestImplHelper< oo::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XToggleButton, css::script::XDefaultProperty  > ToggleButtonImpl_BASE;
 +
-+class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE
++class ScVbaToggleButton : public ToggleButtonImpl_BASE
 +{
-+	css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak;
++	rtl::OUString msDftPropName;
 +public:
-+	ScVbaHPageBreaks( const css::uno::Reference< oo::vba::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&);
++    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);
 +
-+	// XHelperInterface
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++    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	(revision 264185)
++++ sc/source/ui/vba/vbalistbox.cxx	(revision 264308)
+@@ -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;
+ 
+-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 )
++// 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)
++{
++    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 ] );
++}
+ 
+-// 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 ) t
+         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,43 @@ ScVbaListBox::setMultiSelect( sal_Bool _multiselec
+ {
+     m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ), uno::makeAny( _multiselect ) );
+ }
+-/*
+-css::uno::Sequence< sal_Bool > SAL_CALL 
+-ScVbaListBox::getSelected() throw (css::uno::RuntimeException)
+-{
+-    uno::Sequence< rtl::OUString > sList;
+-    uno::Sequence< sal_Int16 > nList;
+-    m_xProps->getPropertyValue( ITEMS ) >>= sList;
+-    uno::Sequence< sal_Bool > bSelected( sList.getLength() );
+-    for( sal_Int16 i = 0; i < bSelected.getLength(); i++ )
+-        bSelected[i] = sal_False;
+-    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
+-    for( sal_Int16 i = 0; i < nList.getLength(); i++ )
+-    {
+-        bSelected[nList[i]] = sal_True;
+-    }
+-    return bSelected;
+-}
+ 
+-void SAL_CALL 
+-ScVbaListBox::setSelected( const css::uno::Sequence< sal_Bool >& _selected ) throw (css::uno::RuntimeException)
+-{
+-}
+-*/
+ css::uno::Any SAL_CALL 
+ ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
+ {
+     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 )
++    sal_Int16 nIndex( 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 ) ) );
++    return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) );
+ }
+ 
+ // 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;
++	mpListHelper->AddItem( pvargItem, pvargIndex );
++		}
+ 
+-		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() )
++void SAL_CALL 
++ScVbaListBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
+ 		{
+-			sal_Int32 nOldSize = sList.getLength();
+-			sList.realloc( nOldSize + 1 );
+-			sList[ nOldSize ] = sString; 
++	mpListHelper->removeItem( index );
+ 		}
+-		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 
+ 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();
+ }
 +
-+#endif
-Index: sc/source/ui/vba/vbapages.cxx
-===================================================================
-RCS file: sc/source/ui/vba/vbapages.cxx
-diff -N sc/source/ui/vba/vbapages.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapages.cxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
-@@ -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"
++// 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 +189,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 +205,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 +227,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 ::org::openoffice;
-+using namespace ::com::sun::star;
-+using namespace ::vos;
+ css::uno::Any 
+ ScVbaListBox::getValueEvent()
+ {
+@@ -287,3 +247,41 @@ ScVbaListBox::getValueEvent()
+ 
+     return uno::makeAny( sal_False );
+ }
 +
-+ScVbaPages::ScVbaPages( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xPages ) throw( lang::IllegalArgumentException ) : ScVbaPages_BASE( xParent, xContext, xPages )
++void SAL_CALL
++ScVbaListBox::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
 +{
++	ScVbaControl::setRowSource( _rowsource );
++	mpListHelper->setRowSource( _rowsource );
 +}
 +
-+uno::Type SAL_CALL 
-+ScVbaPages::getElementType() throw (uno::RuntimeException)
++sal_Int32 SAL_CALL
++ScVbaListBox::getListCount() throw (uno::RuntimeException)
 +{
-+	// return msforms::XPage::static_type(0); 
-+	return uno::XInterface::static_type(0); 
++	return mpListHelper->getListCount();
 +}
 +
-+uno::Any 
-+ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
++uno::Any SAL_CALL 
++ScVbaListBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
 +{
-+	return aSource;
++	return mpListHelper->List( pvargIndex, pvarColumn );
 +}
 +
 +rtl::OUString& 
-+ScVbaPages::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPages") );
-+	return sImplName;
-+}
-+
-+uno::Reference< container::XEnumeration > SAL_CALL 
-+ScVbaPages::createEnumeration() throw (uno::RuntimeException)
-+{
-+	return uno::Reference< container::XEnumeration >();
-+}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaPages::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.Pages" ) );
-+	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbapages.hxx
-===================================================================
-RCS file: sc/source/ui/vba/vbapages.hxx
-diff -N sc/source/ui/vba/vbapages.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapages.hxx	22 Apr 2008 19:53:16 -0000	1.1.2.1
-@@ -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
-+
-+#include <org/openoffice/office/MsoShapeType.hpp>
-+#include <com/sun/star/lang/XEventListener.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <org/openoffice/msforms/XPages.hpp>
-+#include <cppuhelper/implbase2.hxx>
-+#include <cppuhelper/implbase1.hxx>
-+
-+#include "vbacollectionimpl.hxx"
-+typedef CollTestImplHelper< 
-+oo::msforms::XPages > ScVbaPages_BASE;
-+
-+class ScVbaPages : public ScVbaPages_BASE
-+{
-+protected:
-+	virtual rtl::OUString& getServiceImplName();
-+	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+public:
-+    ScVbaPages( const css::uno::Reference< oo::vba::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 );
++ScVbaListBox::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaListBox") );
++	return sImplName;
++}
 +
-+};
-+#endif//SC_VBA_SHAPE_HXX
-Index: sc/source/ui/vba/vbapagesetup.cxx
++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
 ===================================================================
-RCS file: sc/source/ui/vba/vbapagesetup.cxx
-diff -N sc/source/ui/vba/vbapagesetup.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapagesetup.cxx	29 Jul 2008 06:35:42 -0000	1.1.2.1
-@@ -0,0 +1,892 @@
+--- sc/source/ui/vba/vbalabel.hxx	(revision 264185)
++++ sc/source/ui/vba/vbalabel.hxx	(revision 264308)
+@@ -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
+Index: sc/source/ui/vba/vbapagebreak.hxx
+===================================================================
+--- sc/source/ui/vba/vbapagebreak.hxx	(revision 0)
++++ sc/source/ui/vba/vbapagebreak.hxx	(revision 264308)
+@@ -0,0 +1,87 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -7282,876 +12981,1520 @@
 + * 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 <org/openoffice/excel/XlPageOrientation.hpp>
-+#include <org/openoffice/excel/XlOrder.hpp>
-+#include <org/openoffice/excel/Constants.hpp>
-+
-+using namespace ::com::sun::star;
-+using namespace ::org::openoffice;
-+
-+#define ZOOM_IN 10
-+#define ZOOM_MAX 400
-+
-+bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, ScRange& refRange, ScRangeList& aCellRanges, ScAddress::Convention aConv = ScAddress::CONV_XL_A1 ) throw ( uno::RuntimeException );
-+
-+ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< vba::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;
-+
-+    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 );
-+}		
-+
-+rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() 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( ScAddress::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, ScAddress::CONV_XL_A1, ','  );
-+    }
-+    
-+    return aPrintArea;
-+}
++#ifndef SC_VBA_PAGEBREAK_HXX
++#define SC_VBA_PAGEBREAK_HXX
 +
-+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 );
-+		}
-+    }
-+}
++#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"
 +
-+double SAL_CALL ScVbaPageSetup::getTopMargin() throw (css::uno::RuntimeException)
++template< typename Ifc1 >
++class ScVbaPageBreak : public InheritedHelperInterfaceImpl1< Ifc1 >
 +{
-+    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;
++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);
 +
-+        if( headerOn )
-+        {
-+            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
-+            aValue >>= headerHeight;
-+            topMargin += headerHeight;
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    
-+    return Millimeter::getInPoints( topMargin );
-+}
++    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);
 +
-+void SAL_CALL ScVbaPageSetup::setTopMargin( double margin ) throw (css::uno::RuntimeException)
-+{
-+    sal_Int32 topMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    sal_Bool headerOn = sal_False;
-+    sal_Int32 headerHeight = 0;
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
 +
-+    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& )
-+    {
-+    }
-+}
++typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE;
 +
-+double SAL_CALL ScVbaPageSetup::getBottomMargin() throw (css::uno::RuntimeException)
++class ScVbaHPageBreak :  public ScVbaHPageBreak_BASE
 +{
-+    sal_Bool footerOn = sal_False;
-+    sal_Int32 bottomMargin = 0;
-+    sal_Int32 footerHeight = 0;
++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();
++};
 +
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
-+        aValue >>= footerOn;
++#endif
+Index: sc/source/ui/vba/vbamultipage.cxx
+===================================================================
+--- sc/source/ui/vba/vbamultipage.cxx	(revision 0)
++++ sc/source/ui/vba/vbamultipage.cxx	(revision 264308)
+@@ -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>
 +
-+        aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
-+        aValue >>= bottomMargin;
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+        if( footerOn )
-+        {
-+            aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
-+            aValue >>= footerHeight;
-+            bottomMargin += footerHeight;
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    
-+    return Millimeter::getInPoints( bottomMargin );
-+}
++// 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") );
 +
-+void SAL_CALL ScVbaPageSetup::setBottomMargin( double margin ) throw (css::uno::RuntimeException)
++typedef cppu::WeakImplHelper1< container::XIndexAccess > PagesImpl_Base;
++class PagesImpl : public PagesImpl_Base
 +{
-+    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_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 )
++{
++	return new PagesImpl( nPages );
 +}
 +
-+double SAL_CALL ScVbaPageSetup::getRightMargin() throw (css::uno::RuntimeException)
++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_Int32 rightMargin = 0;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")));
-+        aValue >>= rightMargin;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    
-+    return Millimeter::getInPoints( rightMargin );;
++    mxDialogProps.set( xDialog, uno::UNO_QUERY_THROW );
++    // set dialog step to value of multipage pseudo model
++    setValue(getValue());
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setRightMargin( double margin ) throw (css::uno::RuntimeException)
++// Attributes
++sal_Int32 SAL_CALL 
++ScVbaMultiPage::getValue() throw (css::uno::RuntimeException)
 +{
-+    sal_Int32 rightMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= rightMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+
++    sal_Int32 nValue = 0;
++    m_xProps->getPropertyValue( SVALUE ) >>= nValue;
++    return nValue;
 +}
 +
-+double SAL_CALL ScVbaPageSetup::getLeftMargin() throw (css::uno::RuntimeException)
++void SAL_CALL 
++ScVbaMultiPage::setValue( const sal_Int32 _value ) throw (::com::sun::star::uno::RuntimeException)
 +{
-+    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 );;
++    // 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) );
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setLeftMargin( double margin ) throw (css::uno::RuntimeException)
++
++rtl::OUString& 
++ScVbaMultiPage::getServiceImplName()
 +{
-+    sal_Int32 leftMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= leftMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage") );
++	return sImplName;
 +}
 +
-+double SAL_CALL ScVbaPageSetup::getHeaderMargin() throw (css::uno::RuntimeException)
++uno::Any SAL_CALL 
++ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException)
 +{
-+    sal_Int32 headerMargin = 0;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
-+        aValue >>= headerMargin;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    
-+    return Millimeter::getInPoints( headerMargin );;
++	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() );
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setHeaderMargin( double margin ) throw (css::uno::RuntimeException)
++uno::Sequence< rtl::OUString > 
++ScVbaMultiPage::getServiceNames()
 +{
-+    sal_Int32 headerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= headerMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++	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	(revision 264185)
++++ sc/source/ui/vba/vbashapes.hxx	(revision 264308)
+@@ -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"
+ 
+ #include "vbacollectionimpl.hxx"
+ 
+-typedef CollTestImplHelper< oo::msforms::XShapes > ScVbaShapes_BASE;
++typedef CollTestImplHelper< ov::msforms::XShapes > ScVbaShapes_BASE;
+ 
+ class ScVbaShapes : public ScVbaShapes_BASE
+ {
+@@ -57,10 +57,10 @@ class ScVbaShapes : public ScVbaShapes_BASE
+     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 @@ class ScVbaShapes : public ScVbaShapes_BASE
+     //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	(revision 264185)
++++ sc/source/ui/vba/vbapane.hxx	(revision 264308)
+@@ -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
+ {
+Index: sc/source/ui/vba/vbapictureformat.hxx
+===================================================================
+--- sc/source/ui/vba/vbapictureformat.hxx	(revision 264185)
++++ sc/source/ui/vba/vbapictureformat.hxx	(revision 264308)
+@@ -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 @@ class ScVbaPictureFormat : public ScVbaPictureForm
+ 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	(revision 264185)
++++ sc/source/ui/vba/vbawindows.cxx	(revision 264308)
+@@ -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 @@ class WindowsAccessImpl : public WindowsAccessImpl
+ 			{
+ 				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 @@ class WindowsAccessImpl : public WindowsAccessImpl
+ };
+ 
+ 
+-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::Runtime
+ 	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;
+ }
+Index: sc/source/ui/vba/vbaradiobutton.cxx
+===================================================================
+--- sc/source/ui/vba/vbaradiobutton.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaradiobutton.cxx	(revision 264308)
+@@ -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&
+     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 ); 
 +
-+double SAL_CALL ScVbaPageSetup::getFooterMargin() throw (css::uno::RuntimeException)
-+{
-+    sal_Int32 footerMargin = 0;
-+    try
+ }
+ 
+ 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 )
 +    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
-+        aValue >>= footerMargin;
++        if( nValue == -1)
+         nValue = 1;
 +    }
-+    catch( uno::Exception& )
++    else if ( _value >>= bValue )
 +    {
++        if ( bValue )
++            nValue = 1;
 +    }
-+    
-+    return Millimeter::getInPoints( footerMargin );;
-+}
+     m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
+ }
 +
-+void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::uno::RuntimeException)
++rtl::OUString& 
++ScVbaRadioButton::getServiceImplName()
 +{
-+    sal_Int32 footerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= footerMargin;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton") );
++	return sImplName;
 +}
 +
-+sal_Int32 SAL_CALL ScVbaPageSetup::getOrientation() throw (css::uno::RuntimeException)
++uno::Sequence< rtl::OUString > 
++ScVbaRadioButton::getServiceNames()
 +{
-+    sal_Int32 orientation = excel::XlPageOrientation::xlPortrait;
-+    try
-+    {
-+        sal_Bool isLandscape = sal_False;
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
-+        aValue >>= isLandscape;
-+
-+        if( isLandscape )
-+        {
-+            orientation = excel::XlPageOrientation::xlLandscape;
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    return orientation;
++	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	(revision 0)
++++ sc/source/ui/vba/vbacommandbars.hxx	(revision 264308)
+@@ -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
 +
-+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() );
-+    }
-+
-+    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 <ooo/vba/XCommandBar.hpp>
++#include <ooo/vba/XCommandBars.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
 +
-+        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 );
-+        }
++#include <cppuhelper/implbase1.hxx>
 +
-+        if( isLandscape )
-+        {
-+            orientation = excel::XlPageOrientation::xlLandscape;
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++#include "vbahelperinterface.hxx"
++#include "vbacollectionimpl.hxx"
 +
-+uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException)
-+{
-+    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")));
-+}
++typedef CollTestImplHelper< ov::XCommandBars > CommandBars_BASE;
 +
-+void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException)
++class ScVbaCommandBars : public CommandBars_BASE
 +{
-+    USHORT scaleToPageY = 0;
-+    try
-+    {
-+        sal_Bool aValue;
-+        if( fitToPagesTall.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesTall >>= aValue))
-+        {
-+            fitToPagesTall >>= scaleToPageY;
-+        }
++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 );
 +
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( scaleToPageY ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++    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 );
 +
-+uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeException)
-+{
-+    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")));
-+}
++    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();
++};
 +
-+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;
-+        }
++#endif//SC_VBA_COMMANDBARS_HXX
+Index: sc/source/ui/vba/vbaformat.hxx
+===================================================================
+--- sc/source/ui/vba/vbaformat.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaformat.hxx	(revision 264308)
+@@ -29,7 +29,7 @@
+  ************************************************************************/
+ #ifndef SC_VBA_FORMAT_HXX
+ #define SC_VBA_FORMAT_HXX
+-#include <org/openoffice/excel/XFormat.hpp>
++#include <ooo/vba/excel/XFormat.hpp>
+ #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 @@ typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVb
+ 	void initializeNumberFormats() throw ( css::script::BasicErrorException );
+ 	void setNumberFormat( css::lang::Locale _aLocale, const rtl::OUString& _sFormatString) throw( css::script::BasicErrorException );
+ public:
+-	ScVbaFormat( 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, bool bCheckAmbiguoity ) throw ( css::script::BasicErrorException );
++	ScVbaFormat( 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, bool bCheckAmbiguoity ) throw ( css::script::BasicErrorException );
+ 	virtual ~ScVbaFormat() {}
+-	virtual css::uno::Reference< oo::vba::XHelperInterface > thisHelperIface() = 0; 
++	virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0; 
+ 	css::uno::Reference< css::lang::XServiceInfo > getXServiceInfo() { return mxServiceInfo; }
+ 	 void SAL_CALL setAddIndent( const css::uno::Any& _BAddIndent) throw( css::uno::RuntimeException ) { _BAddIndent >>= mbAddIndent; }
+ 	 css::uno::Any SAL_CALL getAddIndent() throw( css::uno::RuntimeException ) { return css::uno::makeAny( mbAddIndent ); }
+     	// Interface Methods
+ 	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< ::org::openoffice::excel::XInterior > SAL_CALL Interior(  ) 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/vbaworksheets.cxx
+===================================================================
+--- sc/source/ui/vba/vbaworksheets.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaworksheets.cxx	(revision 264308)
+@@ -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;
+ 
+ 
+@@ -148,9 +148,9 @@ class SheetCollectionHelper : public SheetCollecti
+ class SheetsEnumeration : public EnumerationHelperImpl
+ {
+ 	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 @@ class SheetsEnumeration : public EnumerationHelper
+ 
+ };
+ 
+-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 ) ) 
+ {
+ }
+ 
+-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) 
+ {
+ }
+ 
+@@ -393,7 +393,7 @@ ScVbaWorksheets::Item( const uno::Any& Index, cons
+ 			}
+ 		}  
+ 		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 )
+ 	{
+ 		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	(revision 264185)
++++ sc/source/ui/vba/vbatextframe.cxx	(revision 264308)
+@@ -32,10 +32,10 @@
+ #include "vbatextframe.hxx"
+ #include "vbacharacters.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+-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 )
+ {
+     m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
+ }
+@@ -142,14 +142,14 @@ ScVbaTextFrame::setMarginRight( float _marginright
+ 
+ 
+ // 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;
+ }
+Index: sc/source/ui/vba/vbadialog.cxx
+===================================================================
+--- sc/source/ui/vba/vbadialog.cxx	(revision 264185)
++++ sc/source/ui/vba/vbadialog.cxx	(revision 264308)
+@@ -31,7 +31,7 @@
+ 
+ #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 @@ 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;
+ }
+Index: sc/source/ui/vba/vbapages.cxx
+===================================================================
+--- sc/source/ui/vba/vbapages.cxx	(revision 0)
++++ sc/source/ui/vba/vbapages.cxx	(revision 264308)
+@@ -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"
 +
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( scaleToPageX ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++using namespace ::ooo::vba;
++using namespace ::com::sun::star;
++using namespace ::vos;
 +
-+uno::Any SAL_CALL ScVbaPageSetup::getZoom() 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 )
 +{
-+    return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")));
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException)
++uno::Type SAL_CALL 
++ScVbaPages::getElementType() throw (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() );
-+            }
-+        }
-+
-+        // 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& )
-+    {
-+    }
-+
-+    mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")), uno::makeAny( pageScale ));
++	// return msforms::XPage::static_type(0); 
++	return uno::XInterface::static_type(0); 
 +}
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeException)
++uno::Any 
++ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
 +{
-+    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& )
-+    {
-+    }
-+
-+    return leftHeader;
++	return aSource;
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setLeftHeader( const rtl::OUString& leftHeader) throw (css::uno::RuntimeException)
++rtl::OUString& 
++ScVbaPages::getServiceImplName()
 +{
-+    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& )
-+    {
-+    }
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPages") );
++	return sImplName;
 +}
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getCenterHeader() throw (css::uno::RuntimeException)
++uno::Reference< container::XEnumeration > SAL_CALL 
++ScVbaPages::createEnumeration() throw (uno::RuntimeException)
 +{
-+    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& )
-+    {
-+    }
-+
-+    return centerHeader;
++	return uno::Reference< container::XEnumeration >();
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setCenterHeader( const rtl::OUString& centerHeader) throw (css::uno::RuntimeException)
++uno::Sequence< rtl::OUString > 
++ScVbaPages::getServiceNames()
 +{
-+    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& )
-+    {
-+    }
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Pages" ) );
++	}
++	return aServiceNames;
 +}
+Index: sc/source/ui/vba/vbapivottables.hxx
+===================================================================
+--- sc/source/ui/vba/vbapivottables.hxx	(revision 264185)
++++ sc/source/ui/vba/vbapivottables.hxx	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/vbapagesetup.hxx	(revision 264308)
+@@ -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
 +
-+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 <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"
 +
-+    return rightHeader;
-+}
++typedef InheritedHelperInterfaceImpl1< ov::excel::XPageSetup > ScVbaPageSetup_BASE;
 +
-+void SAL_CALL ScVbaPageSetup::setRightHeader( const rtl::OUString& rightHeader) throw (css::uno::RuntimeException)
++class ScVbaPageSetup :  public ScVbaPageSetup_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::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);
 +
-+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& )
-+    {
-+    }
++	// 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	(revision 264185)
++++ sc/source/ui/vba/vbaapplication.cxx	(revision 264308)
+@@ -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"
 +
-+    return leftFooter;
-+}
++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 )
 +
-+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& )
-+    {
-+    }
-+}
++#define OWN_JOIN 1
 +
-+rtl::OUString SAL_CALL ScVbaPageSetup::getCenterFooter() throw (css::uno::RuntimeException)
+ // #TODO is this defined somewhere else?
+ #if ( defined UNX ) || ( defined OS2 ) //unix
+ #define FILE_PATH_SEPERATOR "/"
+@@ -98,10 +112,10 @@ class ActiveWorkbook : public ScVbaWorkbook
+ 		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::Ru
+ 	return getActiveWorkbook();
+ }
+ 
++uno::Reference< XAssistant > SAL_CALL
++ScVbaApplication::getAssistant() throw (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& )
-+    {
-+    }
-+
-+    return centerFooter;
++    return uno::Reference< XAssistant >( new ScVbaAssistant( this, mxContext ) );
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setCenterFooter( const rtl::OUString& centerFooter) throw (css::uno::RuntimeException)
+ uno::Any SAL_CALL
++ScVbaApplication::CommandBars( const uno::Any& aIndex ) throw (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& )
-+    {
-+    }
-+
++    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 );
 +}
 +
-+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() )
-+        {
-+            uno::Reference< text::XText > xText = xFooterContent->getRightText();
-+            rightFooter = xText->getString();
-+        }
-+    }
-+    catch( uno::Exception& )
++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::Runti
+         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 bDi
+ 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&
+ 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 _cal
+ 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,13 +467,18 @@ ScVbaApplication::Range( const uno::Any& Cell1, co
+ }
+ 
+ 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() ) );
++}
+ 
+ 
+ uno::Reference< excel::XWorksheet > SAL_CALL 
+@@ -800,89 +846,382 @@ ScVbaApplication::PathSeparator(  ) throw (script:
+ 	return sPathSep;
+ }
+ 
++typedef std::list< ScRange > Ranges;
++typedef std::list< ScRangeList > RangesList;
 +
-+    return rightFooter;
++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 SAL_CALL ScVbaPageSetup::setRightFooter( const rtl::OUString& rightFooter) throw (css::uno::RuntimeException)
++void lcl_addRangeToVec( Ranges& vRanges, const uno::Any& aArg ) throw ( script::BasicErrorException, 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->getRightText();
-+            xText->setString( rightFooter );
-+            mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) ); 
-+        }
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++	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 );
++	}
 +}
 +
-+sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
++bool lcl_canJoin( ScRange& r1, ScRange& r2 )
 +{
-+    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;
++	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;
 +}
-+
-+void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::RuntimeException)
++// 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 )
 +{
-+    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& )
-+    {
-+    }
++	// 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
++			}
++		}
++	}
++    
 +}
 +
-+sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() throw (css::uno::RuntimeException)
++Ranges
++lcl_intersectionImpl( ScRangeList& rl1, ScRangeList& rl2 )
 +{
-+    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;
-+    }
-+
-+    return number;
++	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;
 +}
 +
-+void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) 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 )
 +{
-+    if( firstPageNumber < 0 )
-+        DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-+    if( firstPageNumber == excel::Constants::xlAutomatic )
-+        firstPageNumber = 0;
++	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.
 +
-+    try
-+    {
-+        uno::Any aValue;
-+        aValue <<= (sal_Int16)firstPageNumber;
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++		ScRangeList argIntersect;
++		lcl_strip_containedRanges( intermediateList );
 +
-+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;
-+}
++		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
 +
-+void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) throw (css::uno::RuntimeException)
-+{
-+    try
-+    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")), uno::makeAny( centerVertically ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
++		intersections.push_back( argIntersect );
++	}
++	return intersections;
 +}
 +
-+sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() 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;
-+}
+ 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 ) );
++		lcl_addRangesToVec( vRanges, Arg30 );
+ 
+-	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; 
+ 
+-	uno::Reference< excel::XRange > xRefRange( *it );
+-	++it;
+-	for ( ; it != it_end; ++it )
++	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 )
+ 	{
+-		ScVbaRange* pRange = dynamic_cast< ScVbaRange * >( xRefRange.get());
+-		if ( pRange )
+-			xRefRange = pRange->intersect( *it );
+-		if ( !xRefRange.is() )
+-			return uno::Reference< excel::XRange >();
++		for ( USHORT x = 0 ; x < it->Count(); ++x )
++#ifndef OWN_JOIN
++			aCellRanges.Join( *it->GetObject(x) );
++#else
++			aCellRanges.Append( *it->GetObject(x) );
++#endif
+ 	}
 +
-+void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally) throw (css::uno::RuntimeException)
-+{
-+    try
-+    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")), uno::makeAny( centerHorizontally ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++	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 );
 +
-+sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException)
++	}
+ 	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)
 +{
-+    sal_Bool printHeadings = sal_False;
-+    try
-+    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
-+        aValue >>= printHeadings;
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+    return printHeadings;
-+}
++	if ( !Arg1.is() || !Arg2.is() )
++		DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
 +
-+void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (css::uno::RuntimeException)
-+{
-+    try
-+    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")), uno::makeAny( printHeadings ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
++	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 );
 +
-+rtl::OUString& 
-+ScVbaPageSetup::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageSetup") );
-+	return sImplName;
-+}
++	ScRangeList aCellRanges;
++	lcl_strip_containedRanges( vRanges );
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaPageSetup::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
++	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 ) 
 +	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PageSetup" ) );
++	// normal range
++		xRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
 +	}
-+	return aServiceNames;
++	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;
 +}
-Index: sc/source/ui/vba/vbapagesetup.hxx
++
+ void
+ ScVbaApplication::Volatile( const uno::Any& aVolatile )  throw ( uno::RuntimeException )
+ {
+@@ -953,7 +1292,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;
+ }
+Index: sc/source/ui/vba/vbapagebreaks.cxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbapagesetup.hxx
-diff -N sc/source/ui/vba/vbapagesetup.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbapagesetup.hxx	29 Jul 2008 06:35:42 -0000	1.1.2.1
-@@ -0,0 +1,104 @@
+--- sc/source/ui/vba/vbapagebreaks.cxx	(revision 0)
++++ sc/source/ui/vba/vbapagebreaks.cxx	(revision 264308)
+@@ -0,0 +1,269 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -8181,1003 +14524,1059 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_PAGESETUP_HXX
-+#define SC_VBA_PAGESETUP_HXX
-+
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/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< oo::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< oo::vba::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/vbaprogressbar.cxx
-===================================================================
-RCS file: sc/source/ui/vba/vbaprogressbar.cxx
-diff -N sc/source/ui/vba/vbaprogressbar.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaprogressbar.cxx	5 Sep 2008 14:04:21 -0000	1.1.2.2
-@@ -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 org::openoffice;
-+
-+// uno servicename com.sun.star.awt.UnoControlProgressBarMode
-+const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
-+
-+ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-+{
-+}
-+
-+// Attributes
-+uno::Any SAL_CALL 
-+ScVbaProgressBar::getValue() throw (css::uno::RuntimeException)
-+{
-+    return m_xProps->getPropertyValue( SVALUE );
-+}
++#include "vbapagebreaks.hxx"
++#include "vbapagebreak.hxx"
++#include <ooo/vba/excel/XWorksheet.hpp>
++using namespace ::com::sun::star;
++using namespace ::ooo::vba;
 +
-+void SAL_CALL 
-+ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++typedef ::cppu::WeakImplHelper1<container::XIndexAccess > RangePageBreaks_Base;
++class RangePageBreaks : public RangePageBreaks_Base
 +{
-+    m_xProps->setPropertyValue( SVALUE,  _value );
-+}
++private:
++	uno::Reference< XHelperInterface > mxParent;
++	uno::Reference< uno::XComponentContext > mxContext;
++	uno::Reference< sheet::XSheetPageBreak > mxSheetPageBreak;
++	sal_Bool m_bColumn;
 +
-+rtl::OUString& 
-+ScVbaProgressBar::getServiceImplName()
-+{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
-+	return sImplName;
-+}
++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 )
++	{
++	}
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaProgressBar::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
++	sal_Int32 getAPIStartofRange( const uno::Reference< excel::XRange >& xRange ) throw (css::uno::RuntimeException)
 +	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Label" ) );
++		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();
 +	}
-+	return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbaprogressbar.hxx
-===================================================================
-RCS file: sc/source/ui/vba/vbaprogressbar.hxx
-diff -N sc/source/ui/vba/vbaprogressbar.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaprogressbar.hxx	5 Sep 2008 14:04:22 -0000	1.1.2.2
-@@ -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 SC_VBA_PROGRESSBAR_HXX
-+#define SC_VBA_PROGRESSBAR_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XProgressBar.hpp>
 +
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+#include <cppuhelper/implbase2.hxx>
++	uno::Sequence<sheet::TablePageBreakData> getAllPageBreaks() throw (uno::RuntimeException)
++	{
++		if( m_bColumn )
++			return mxSheetPageBreak->getColumnPageBreaks();
++    	return mxSheetPageBreak->getRowPageBreaks();
++	}
 +
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XProgressBar, css::script::XDefaultProperty  > ProgressBarImpl_BASE;
++	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;
++	}
 +
-+class ScVbaProgressBar : public ProgressBarImpl_BASE
-+{
-+public:
-+    ScVbaProgressBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
-+   // Attributes
-+    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
-+    //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"); }
++	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;
++	}
 +};
-+#endif //SC_VBA_LABEL_HXX
-Index: sc/source/ui/vba/vbaradiobutton.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaradiobutton.cxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbaradiobutton.cxx	11 Apr 2008 01:12:55 -0000	1.3
-+++ sc/source/ui/vba/vbaradiobutton.cxx	5 Sep 2008 14:04:22 -0000	1.2.42.3
-@@ -36,7 +36,7 @@ using namespace org::openoffice;
- 
- const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
- const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
--ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : RadioButtonImpl_BASE( xContext, xControlShape )
-+ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
- {
- }
- 
-@@ -55,22 +55,53 @@ ScVbaRadioButton::setCaption( const rtl:
-     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 )
++/** @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)
++{
++    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++ )
 +    {
-+        if( nValue == -1)
-         nValue = 1;
++        sal_Int32 nPos = aTablePageBreakData[i].Position;
++        if( nPos > nUsedEnd )
++            return nCount;
++        if( nPos >= nUsedStart )
++            nCount++;
 +    }
-+    else if ( _value >>= bValue )
++
++    return nCount;
++}
++
++uno::Any SAL_CALL RangePageBreaks::getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
++{
++    if( (Index < getCount()) && ( Index >= 0 ))
 +    {
-+        if ( bValue )
-+            nValue = 1;
++        sheet::TablePageBreakData aTablePageBreakData = getTablePageBreakData( Index );
++        uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer();
++        sal_Int32 nPos = aTablePageBreakData.Position;
++        if( (nPos < xIndexAccess->getCount()) && (nPos > -1) )
++        {
++            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) ));
++        }
 +    }
-     m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
- }
++	throw lang::IndexOutOfBoundsException();
++}
 +
-+rtl::OUString& 
-+ScVbaRadioButton::getServiceImplName()
++sheet::TablePageBreakData RangePageBreaks::getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton") );
-+	return sImplName;
++    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;
 +}
 +
-+uno::Sequence< rtl::OUString > 
-+ScVbaRadioButton::getServiceNames()
++uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) 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("org.openoffice.msforms.RadioButton" ) );
++    uno::Reference< excel::XRange > xRange;
++    Before >>= xRange;
++    if( !xRange.is() )
++    {
++		DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
 +	}
-+	return aServiceNames;
++
++	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) ));
 +}
-Index: sc/source/ui/vba/vbaradiobutton.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaradiobutton.hxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbaradiobutton.hxx	11 Apr 2008 01:13:09 -0000	1.3
-+++ sc/source/ui/vba/vbaradiobutton.hxx	5 Sep 2008 14:04:22 -0000	1.2.42.3
-@@ -29,24 +29,27 @@
-  ************************************************************************/
- #ifndef SC_VBA_RADIOBUTTON_HXX
- #define SC_VBA_RADIOBUTTON_HXX
--#include <cppuhelper/implbase1.hxx>
- #include <org/openoffice/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, oo::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< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
-    // Attributes
-     virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
-     virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
--    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/vbarange.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbarange.cxx,v
-retrieving revision 1.9
-retrieving revision 1.5.34.19
-diff -u -p -u -p -b -w -B -r1.9 -r1.5.34.19
---- sc/source/ui/vba/vbarange.cxx	14 May 2008 10:03:31 -0000	1.9
-+++ sc/source/ui/vba/vbarange.cxx	12 Nov 2008 07:09:19 -0000	1.5.34.19
-@@ -115,6 +115,7 @@
- #include <org/openoffice/excel/XlCellType.hpp>
- #include <org/openoffice/excel/XlSpecialCellsValue.hpp>
- #include <org/openoffice/excel/XlConsolidationFunction.hpp>
-+#include <org/openoffice/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>
-@@ -212,6 +214,8 @@ uno::Reference< excel::XRange > lcl_make
- 	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,6 +235,7 @@ uno::Reference< excel::XRange > lcl_make
- 		// #FIXME need proper (WorkSheet) parent
- 		xRange = new ScVbaRange( xParent, xContext, xRanges );
- 	}
-+	}
- 	return xRange;
- }
- 
-@@ -517,6 +522,34 @@ sal_Int32 m_nArea;
- 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
++
++
++class RangePageBreaksEnumWrapper : public EnumerationHelper_BASE
 +{
-+	uno::Reference< uno::XComponentContext > mxContext;
-+        uno::Reference< excel::XRange > mxRange;
-+	sal_Int32 mMaxElems;
-+	sal_Int32 mCurElem;
-+        
++	uno::Reference<container::XIndexAccess > m_xIndexAccess;
++	sal_Int32 nIndex;
 +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 )
-+        {
++	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 ::sal_Bool SAL_CALL hasMoreElements() throw (::uno::RuntimeException){ return mCurElem < mMaxElems; }
-+
-+	virtual uno::Any SAL_CALL nextElement() throw (container::NoSuchElementException, lang::WrappedTargetException, 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() ) ); 
++		if ( nIndex < m_xIndexAccess->getCount() )
++			return m_xIndexAccess->getByIndex( nIndex++ );
++		throw container::NoSuchElementException();
 +	}
 +};
 +
- class CellsEnumeration : public CellsEnumeration_BASE
- {
- 	uno::Reference< uno::XComponentContext > mxContext;
-@@ -739,6 +772,7 @@ protected:
- 	bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell )
- 	{
- 		rtl::OUString sFormula;
-+		double aDblValue;
- 		if ( aValue >>= sFormula )
- 		{
-             // convert to CONV_OOO style formula string because XCell::setFormula
-@@ -765,6 +799,11 @@ protected:
- 			xCell->setFormula( sFormula );
- 			return true;
- 		}
-+		else if ( aValue >>= aDblValue )
-+		{
-+			xCell->setValue( aDblValue );
-+			return true;
-+		}
- 		return false;
- 	}
- 		
-@@ -789,7 +828,7 @@ public:
- 			pUnoRangesBase )
- 		{
- 			ScRangeList aCellRanges = pUnoRangesBase->GetRangeList();	
--			ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart, ScGrammar::GRAM_DEFAULT );
-+			ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart, ScGrammar::GRAM_PODF_A1 );
- 			aCompiler.CompileString( sVal );
- 			// set desired convention
-             aCompiler.SetGrammar( m_eGrammar );
-@@ -1150,10 +1189,19 @@ lcl_setupBorders( const uno::Reference< 
- }
- 
- 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< vba::XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), getModelFromXIf( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
- {
--	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() )
++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 )
++{
++}
++
++uno::Any SAL_CALL ScVbaHPageBreaks::Add( const uno::Any& Before) throw ( script::BasicErrorException, uno::RuntimeException)
++{
++	RangePageBreaks* pPageBreaks = dynamic_cast< RangePageBreaks* >( m_xIndexAccess.get() );
++	if( pPageBreaks )
 +	{
-+		xIndex.set( mxRanges, uno::UNO_QUERY_THROW );
++		return pPageBreaks->Add( Before );
 +	}
- 	m_Areas = new ScVbaRangeAreas( mxContext, xIndex, mbIsRows, mbIsColumns );
- }
- 
-@@ -1833,7 +1881,36 @@ ScVbaRange::Cells( const uno::Any &nRowI
- 	}
- 
- 	sal_Int32 nRow = 0, nColumn = 0;
--	sal_Bool bIsIndex = nRowIndex >>= nRow, bIsColumnIndex = nColumnIndex >>= nColumn;
++	return uno::Any();
++}
 +
-+	sal_Bool bIsIndex = nRowIndex.hasValue();
-+	sal_Bool bIsColumnIndex = nColumnIndex.hasValue();
++uno::Reference< container::XEnumeration >
++ScVbaHPageBreaks::createEnumeration() throw (uno::RuntimeException)
++{
++	return new RangePageBreaksEnumWrapper( m_xIndexAccess );
++}
 +
-+	// 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::Any
++ScVbaHPageBreaks::createCollectionObject( const css::uno::Any& aSource )
++{
++	return aSource; // its already a pagebreak object
++}
++
++uno::Type 
++ScVbaHPageBreaks::getElementType() throw (uno::RuntimeException)
++{
++	return excel::XHPageBreak::static_type(0);
++}
++
++rtl::OUString& 
++ScVbaHPageBreaks::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreaks") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaHPageBreaks::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
 +	{
-+		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
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.HPageBreaks" ) );
 +	}
-                                                                                                                        
- 	RangeHelper thisRange( mxRange );
- 	table::CellRangeAddress thisRangeAddress =  thisRange.getCellRangeAddressable()->getRangeAddress();
-@@ -1876,6 +1953,19 @@ ScVbaRange::Select() throw (uno::Runtime
- 			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& )
-+		{
-+		}		
++	return aServiceNames;
++}
 +
- 	}
- }
- 
-@@ -2686,6 +2776,167 @@ ScVbaRange::Replace( const ::rtl::OUStri
- 	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)
+Index: sc/source/ui/vba/vbaspinbutton.cxx
+===================================================================
+--- sc/source/ui/vba/vbaspinbutton.cxx	(revision 0)
++++ sc/source/ui/vba/vbaspinbutton.cxx	(revision 264308)
+@@ -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 )
 +{
-+    // return a Range object that represents the first cell where that information is found.
-+    rtl::OUString sWhat;
-+    sal_Int32 nWhat;
-+    float fWhat;
-+    
-+    // 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 >() );
++}
++
++// 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 );
++}
 +
-+    rtl::OUString sSearch = VBAToRegexp( sWhat );
++::sal_Int32 SAL_CALL 
++ScVbaSpinButton::getMax() throw (uno::RuntimeException)
++{
++    sal_Int32 nMax = 0;
++    m_xProps->getPropertyValue( SPINMAX ) >>= nMax;
++    return nMax;
++}
 +
-+	const SvxSearchItem& globalSearchOptions = ScGlobal::GetSearchItem();
-+	SvxSearchItem newOptions( globalSearchOptions );
++void SAL_CALL 
++ScVbaSpinButton::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SPINMAX, uno::makeAny( nVal ) ); 
++}
 +
-+	sal_Int16 nLookAt =  globalSearchOptions.GetWordOnly() ?  excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole; 
-+	sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns;
++::sal_Int32 SAL_CALL 
++ScVbaSpinButton::getMin() throw (uno::RuntimeException)
++{
++    sal_Int32 nVal = 0;
++    m_xProps->getPropertyValue( SPINMIN ) >>= nVal;
++    return nVal;
++}
 +
-+	uno::Reference< util::XSearchable > xSearch( mxRange, uno::UNO_QUERY );
-+    if( xSearch.is() )
-+    {
-+        uno::Reference< util::XSearchDescriptor > xDescriptor = xSearch->createSearchDescriptor();
-+        xDescriptor->setSearchString( sSearch );
++void SAL_CALL 
++ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) ); 
++}
 +
-+        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 );
-+        }
++rtl::OUString& 
++ScVbaSpinButton::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSpinButton") );
++	return sImplName;
++}
 +
-+        // LookIn
-+        if( LookIn.hasValue() )
-+        {
-+            sal_Int32 nLookIn;
-+            if( LookIn >>= nLookIn )
-+            {
-+                sal_Int16 nSearchType; 
-+                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 ) );
-+            }
-+        }
++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	(revision 264185)
++++ sc/source/ui/vba/vbaborders.hxx	(revision 264308)
+@@ -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"
+ 
+-typedef CollTestImplHelper< oo::excel::XBorders > ScVbaBorders_BASE;
++typedef CollTestImplHelper< ov::excel::XBorders > ScVbaBorders_BASE;
+ class ScVbaPalette;
+ class ScVbaBorders : public ScVbaBorders_BASE
+ {
+@@ -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() {}
+ 
+ 	// XEnumerationAccess
+Index: sc/source/ui/vba/vbahyperlink.cxx
+===================================================================
+--- sc/source/ui/vba/vbahyperlink.cxx	(revision 0)
++++ sc/source/ui/vba/vbahyperlink.cxx	(revision 264308)
+@@ -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"
 +
-+        // 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 ) ); 	
-+        }
++using namespace ::ooo::vba;
++using namespace ::com::sun::star;
 +
-+        // 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 ) ); 	
-+		}			
++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 );
++}
 +
-+        // SearchDirection
-+        if ( SearchDirection.hasValue() )
-+        {
-+            sal_Int32 nSearchDirection;
-+            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 ) );
-+            }
-+        }
++ScVbaHyperlink::~ScVbaHyperlink()
++{
++}
 +
-+        // 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 ) ); 	
++::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;
++}
 +
-+        // MatchByte
-+        // SearchFormat
-+        // ignore
++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 );
++}
 +
-+		ScGlobal::SetSearchItem( newOptions );	
++::rtl::OUString
++ScVbaHyperlink::getName() throw (css::uno::RuntimeException)
++{
++	// it seems this attribute is same as TextToDisplay
++	return getTextToDisplay();
++}
++
++void
++ScVbaHyperlink::setName( const ::rtl::OUString &  rName ) throw (css::uno::RuntimeException)
++{
++	setTextToDisplay( rName );
++}
++
++::rtl::OUString
++ScVbaHyperlink::getTextToDisplay() throw (css::uno::RuntimeException)
++{
++	rtl::OUString aTextToDisplay;
++	uno::Any aValue = mxTextField->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ) );
++	aValue >>= aTextToDisplay;
++	return aTextToDisplay;
++}
++
++void
++ScVbaHyperlink::setTextToDisplay( const ::rtl::OUString & rTextToDisplay ) throw (css::uno::RuntimeException)
++{
++	uno::Any aValue;
++	aValue <<= rTextToDisplay;
++	mxTextField->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ), aValue );
++}
 +
-+		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;
-+            }
-+        }
++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;
++}
 +
-+    return uno::Reference< excel::XRange >();
++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.excel.Hyperlink" ) );
++	}
++	return aServiceNames;
 +}
 +
- uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Reference<  uno::XComponentContext >& xContext, ScDocShell* pDocSh )
++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	(revision 264185)
++++ sc/source/ui/vba/vbafont.cxx	(revision 264308)
+@@ -32,13 +32,17 @@
+ #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"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ // use local constants there is no need to expose these constants
+@@ -64,14 +68,46 @@ const sal_Int8 SUBSCRIPTHEIGHT = 58;
+ // specifies a hight of normal font
+ const short NORMALHEIGHT = 100;
+ 
+-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, SfxItemSet* pDataSet  ) throw ( uno::RuntimeException ) : ScVbaFont_BASE( xParent, xContext ), mxFont( xPropertySet, css::uno::UNO_QUERY_THROW ), mPalette( dPalette ),  mpDataSet( pDataSet )
  {
- 	uno::Reference< excel::XRange > xKeyRange;
-@@ -2739,10 +2990,10 @@ void updateTableSortField( const uno::Re
+ }
  
- 		// 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 )
-@@ -3116,6 +3367,18 @@ ScVbaRange::hasElements() throw (uno::Ru
- uno::Reference< container::XEnumeration > SAL_CALL 
- ScVbaRange::createEnumeration() throw (uno::RuntimeException)
++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 )
  {
-+	if ( mbIsColumns || mbIsRows )
++	// #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(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 );
-+		
++		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;
+ 
 +	}
- 	return new CellsEnumeration( mxContext, m_Areas );
++        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;
+@@ -82,21 +118,68 @@ ScVbaFont::setSuperscript( const uno::Any& aValue
+ 		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 );
  }
  
-@@ -3363,26 +3626,32 @@ ScVbaRange::getRowHeight() throw (uno::R
- 		return xRange->getRowHeight();
- 	}	
+ 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;
++
++	}
++        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 ) );
+ }
  
--	// 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();
- 		}
+ 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;
++
++	}
++        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 +191,42 @@ ScVbaFont::setSubscript( const uno::Any& aValue )
+ 	        nValue2 = SUBSCRIPTHEIGHT;
  	}
-+	double nHeight = lcl_Round2DecPlaces( lcl_TwipsToPoints( nRowTwips ) );
- 	return uno::makeAny( nHeight );
+ 
+- 	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::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;
++
++	}
++        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 ) );
  }
  
-@@ -4119,7 +4388,7 @@ ScVbaRange::Autofit() throw (uno::Runtim
- 		// 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 )
-@@ -4298,6 +4567,113 @@ void ScVbaRange::setFormulaHidden(const 
- 	xProps->setPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLPRO)), uno::makeAny(rCellAttr));
+@@ -430,7 +539,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;
  }
+Index: sc/source/ui/vba/vbaaxis.hxx
+===================================================================
+--- sc/source/ui/vba/vbaaxis.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaaxis.hxx	(revision 264308)
+@@ -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"
  
-+uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
+-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);
+Index: sc/source/ui/vba/vbaassistant.cxx
+===================================================================
+--- sc/source/ui/vba/vbaassistant.cxx	(revision 0)
++++ sc/source/ui/vba/vbaassistant.cxx	(revision 264308)
+@@ -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 )
 +{
-+	// #FIXME, If the specified range is in a PivotTable report
++    m_bIsVisible = sal_False;
++    m_nPointsLeft = 795;
++    m_nPointsTop = 248;
++    m_sName = rtl::OUString::createFromAscii( "Clippit" );
++    m_nAnimation = msoAnimationIdle;
++}
 +
-+	// 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;
++ScVbaAssistant::~ScVbaAssistant()
++{
++}
 +
-+	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 ScVbaAssistant::getVisible() throw (uno::RuntimeException)
++{
++    return m_bIsVisible;
++}
 +
-+	// 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();
++void SAL_CALL ScVbaAssistant::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
++{
++    m_bIsVisible = bVisible;
 +}
 +
-+void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::RuntimeException)
++sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException)
 +{
-+	// #FIXME, If the specified range is in a PivotTable report
++    if( SvtHelpOptions().IsHelpAgentAutoStartMode() )
++        return sal_True;
++    else
++        return sal_False;
++}
 +
-+	// 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;
++void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException)
++{
++    SvtHelpOptions().SetHelpAgentAutoStartMode( bOn );
++    setVisible( bOn );
++}
 +
-+	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();
 +
-+	// 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 >() );
-+	}
++::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;
 +}
 +
-+uno::Reference< excel::XRange > SAL_CALL 
-+ScVbaRange::MergeArea() throw (script::BasicErrorException, uno::RuntimeException)
++::rtl::OUString SAL_CALL 
++ScVbaAssistant::Name(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
 +{
-+    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( aCellAddress.StartColumn, aCellAddress.StartRow, aCellAddress.Sheet, 
-+                                  aCellAddress.EndColumn, aCellAddress.EndRow, aCellAddress.Sheet);
-+                uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell() , refRange ) );
-+                return new ScVbaRange( getParent(),mxContext,xRange );
-+            }
-+        }
-+    }
-+    return new ScVbaRange( getParent(),mxContext,mxRange );
++    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;
++}
+Index: sc/source/ui/vba/vbabutton.cxx
+===================================================================
+--- sc/source/ui/vba/vbabutton.cxx	(revision 264185)
++++ sc/source/ui/vba/vbabutton.cxx	(revision 264308)
+@@ -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") );
+-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 )
+ {
+ }
+ 
+@@ -53,3 +53,22 @@ ScVbaButton::setCaption( const rtl::OUString& _cap
+ {
+     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	(revision 264185)
++++ sc/source/ui/vba/vbashaperange.cxx	(revision 264308)
+@@ -33,16 +33,16 @@
+ #include "vbashaperange.hxx"
+ #include "vbashape.hxx"
  
- void SAL_CALL 
- ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any& Copies, const uno::Any& Preview, const uno::Any& ActivePrinter, const uno::Any& PrintToFile, const uno::Any& Collate, const uno::Any& PrToFileName ) throw (uno::RuntimeException)
-@@ -4516,7 +4892,7 @@ ScVbaRange::AutoOutline(  ) throw (scrip
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ class VbShapeRangeEnumHelper : public EnumerationHelper_BASE
  {
- 	// #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 )
-@@ -4734,6 +5110,7 @@ ScVbaRange::SpecialCells( const uno::Any
- 		case excel::XlCellType::xlCellTypeConstants:
- 		case excel::XlCellType::xlCellTypeFormulas:
- 		case excel::XlCellType::xlCellTypeVisible:
-+		case excel::XlCellType::xlCellTypeLastCell:
- 		{
- 			if ( bIsMultiArea )
- 			{
-@@ -4894,7 +5271,7 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGrou
- 		sal_Bool bAddPageBreaks = sal_False;
- 		PageBreaks >>= bAddPageBreaks;
+-        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 @@ class VbShapeRangeEnumHelper : public EnumerationH
  
--		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));
-@@ -4955,27 +5332,6 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGrou
- 	}
- }
+ };
  
--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()
+-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)
  {
-Index: sc/source/ui/vba/vbarange.hxx
+ }
+ 
+@@ -146,7 +146,7 @@ ScVbaShapeRange:: createCollectionObject( const cs
+ 	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;
+ }
+Index: sc/source/ui/vba/vbadialogs.cxx
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbarange.hxx,v
-retrieving revision 1.6
-retrieving revision 1.6.70.2
-diff -u -p -u -p -b -w -B -r1.6 -r1.6.70.2
---- sc/source/ui/vba/vbarange.hxx	14 May 2008 10:03:47 -0000	1.6
-+++ sc/source/ui/vba/vbarange.hxx	30 Sep 2008 14:06:05 -0000	1.6.70.2
-@@ -128,7 +128,6 @@ public:
- 	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, ScAddress::Convention eConv = ScAddress::CONV_XL_A1  ) throw ( css::uno::RuntimeException );
+--- sc/source/ui/vba/vbadialogs.cxx	(revision 264185)
++++ sc/source/ui/vba/vbadialogs.cxx	(revision 264308)
+@@ -31,8 +31,8 @@
  
-     // Attributes
-@@ -171,6 +170,10 @@ public:
- 	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);	
-+	//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; }
-@@ -210,6 +213,7 @@ public:
- 	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< oo::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);
-@@ -241,6 +245,7 @@ public:
- 	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 css::uno::Reference< oo::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);
+ #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>
+ 
+ #include <tools/string.hxx>
+ 
+@@ -41,7 +41,7 @@
+ #include "vbaglobals.hxx"
+ #include "vbadialog.hxx"
+ 
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
+ 
+ void
+@@ -62,7 +62,7 @@ ScVbaDialogs::Item( const uno::Any &aItem ) throw
+ {
+ 	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;
+ }
 Index: sc/source/ui/vba/vbascrollbar.cxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbascrollbar.cxx
-diff -N sc/source/ui/vba/vbascrollbar.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbascrollbar.cxx	5 Sep 2008 14:04:22 -0000	1.1.2.2
+--- sc/source/ui/vba/vbascrollbar.cxx	(revision 0)
++++ sc/source/ui/vba/vbascrollbar.cxx	(revision 264308)
 @@ -0,0 +1,139 @@
 +/*************************************************************************
 + *
@@ -9217,7 +15616,7 @@
 +#include <vector>
 +
 +using namespace com::sun::star;
-+using namespace org::openoffice;
++using namespace ooo::vba;
 +
 +
 +const static rtl::OUString LARGECHANGE( RTL_CONSTASCII_USTRINGPARAM("BlockIncrement") );
@@ -9227,7 +15626,7 @@
 +const static rtl::OUString SCROLLMAX( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") );
 +const static rtl::OUString SCROLLMIN( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMin") );
 +
-+ScVbaScrollBar::ScVbaScrollBar(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
++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 )
 +{
 +}
 +
@@ -9297,34 +15696,330 @@
 +void SAL_CALL 
 +ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange ) throw (uno::RuntimeException)
 +{
-+    m_xProps->setPropertyValue( SMALLCHANGE, uno::makeAny( _smallchange ) );
++    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	(revision 264185)
++++ sc/source/ui/vba/vbaglobals.cxx	(revision 264308)
+@@ -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 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
+ extern sdecl::ServiceDecl const serviceDecl(
+     serviceImpl,
+     "ScVbaGlobals",
+-    "org.openoffice.vba.Globals" );
++    "ooo.vba.Globals" );
+ }
+ 
+Index: sc/source/ui/vba/vbacharacters.hxx
+===================================================================
+--- sc/source/ui/vba/vbacharacters.hxx	(revision 264185)
++++ sc/source/ui/vba/vbacharacters.hxx	(revision 264308)
+@@ -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>
+ 
+ #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 @@ class ScVbaCharacters : public ScVbaCharacters_BAS
+     // 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 @@ class ScVbaCharacters : public ScVbaCharacters_BAS
+ 	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);
+Index: sc/source/ui/vba/vbacheckbox.cxx
+===================================================================
+--- sc/source/ui/vba/vbacheckbox.cxx	(revision 0)
++++ sc/source/ui/vba/vbacheckbox.cxx	(revision 264308)
+@@ -0,0 +1,110 @@
++/*************************************************************************
++ *
++ *  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 "vbacheckbox.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 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 )
++{
++}
++
++// Attributes
++rtl::OUString SAL_CALL 
++ScVbaCheckbox::getCaption() throw (css::uno::RuntimeException)
++{
++    rtl::OUString Label;
++    m_xProps->getPropertyValue( LABEL ) >>= Label;
++    return Label;
++}
++
++void SAL_CALL 
++ScVbaCheckbox::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
++}
++
++uno::Any SAL_CALL 
++ScVbaCheckbox::getValue() throw (css::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 ); 
++}
++
++void SAL_CALL 
++ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::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 ) );
 +}
-+
 +rtl::OUString& 
-+ScVbaScrollBar::getServiceImplName()
++ScVbaCheckbox::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaScrollBar") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCheckbox") );
 +	return sImplName;
 +}
 +
 +uno::Sequence< rtl::OUString > 
-+ScVbaScrollBar::getServiceNames()
++ScVbaCheckbox::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Frame" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.CheckBox" ) );
 +	}
 +	return aServiceNames;
 +}
-Index: sc/source/ui/vba/vbascrollbar.hxx
+Index: sc/source/ui/vba/vbastyles.hxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbascrollbar.hxx
-diff -N sc/source/ui/vba/vbascrollbar.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbascrollbar.hxx	5 Sep 2008 14:04:22 -0000	1.1.2.2
-@@ -0,0 +1,66 @@
+--- sc/source/ui/vba/vbastyles.hxx	(revision 264185)
++++ sc/source/ui/vba/vbastyles.hxx	(revision 264308)
+@@ -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	(revision 264185)
++++ sc/source/ui/vba/vbavalidation.cxx	(revision 264308)
+@@ -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 @@ 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" ) );
+ 	}
+ 	return aServiceNames;
+ }
+Index: sc/source/ui/vba/vbaoleobjects.hxx
+===================================================================
+--- sc/source/ui/vba/vbaoleobjects.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaoleobjects.hxx	(revision 264308)
+@@ -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 @@ class ScVbaOLEObjects : public OLEObjectsImpl_BASE
+ 	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	(revision 0)
++++ sc/source/ui/vba/vbaprogressbar.hxx	(revision 264308)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -9359,103 +16054,36 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_SCROLLBAR_HXX
-+#define SC_VBA_SCROLLBAR_HXX
++#ifndef SC_VBA_PROGRESSBAR_HXX
++#define SC_VBA_PROGRESSBAR_HXX
 +#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XScrollBar.hpp>
++#include <ooo/vba/msforms/XProgressBar.hpp>
 +
 +#include "vbacontrol.hxx"
 +#include "vbahelper.hxx"
++#include <cppuhelper/implbase2.hxx>
 +
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XScrollBar > ScrollBarImpl_BASE;
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XProgressBar, css::script::XDefaultProperty  > ProgressBarImpl_BASE;
 +
-+class ScVbaScrollBar : public ScrollBarImpl_BASE
++class ScVbaProgressBar : public ProgressBarImpl_BASE
 +{
 +public:
-+    ScVbaScrollBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
++    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);
-+    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);
-+
-+
 +    //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/vbashape.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbashape.cxx,v
-retrieving revision 1.4
-retrieving revision 1.3.34.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.34.2
---- sc/source/ui/vba/vbashape.cxx	11 Apr 2008 01:16:34 -0000	1.4
-+++ sc/source/ui/vba/vbashape.cxx	6 Jul 2008 15:29:40 -0000	1.3.34.2
-@@ -50,13 +50,13 @@ using namespace ::org::openoffice;
- 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< 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 )
- {
-     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< vba::XHelperInterface >(), xContext ), m_xShape( xShape )
- {
-     // add listener
-     addListeners();
-Index: sc/source/ui/vba/vbashape.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbashape.hxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbashape.hxx	11 Apr 2008 01:16:51 -0000	1.3
-+++ sc/source/ui/vba/vbashape.hxx	6 Jul 2008 15:30:30 -0000	1.2.42.3
-@@ -47,21 +47,22 @@ typedef InheritedHelperInterfaceImpl< Li
- 
- 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< 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 );
-     virtual ~ScVbaShape();
-     css::uno::Any getRange() { return m_aRange; };
-     void setRange( css::uno::Any aRange ) { m_aRange = aRange; };
-Index: sc/source/ui/vba/vbaspinbutton.cxx
+Index: sc/source/ui/vba/vbacommandbar.cxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbaspinbutton.cxx
-diff -N sc/source/ui/vba/vbaspinbutton.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaspinbutton.cxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
-@@ -0,0 +1,109 @@
+--- sc/source/ui/vba/vbacommandbar.cxx	(revision 0)
++++ sc/source/ui/vba/vbacommandbar.cxx	(revision 264308)
+@@ -0,0 +1,329 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -9490,259 +16118,524 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbaspinbutton.hxx"
-+#include <vector>
++#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>
 +
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#include "vbacommandbar.hxx"
++#include "vbacommandbarcontrols.hxx"
++#include "vbahelper.hxx"
 +
 +
-+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") );
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+ScVbaSpinButton::ScVbaSpinButton(  const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
++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;
 +}
-+
-+// Attributes
-+uno::Any SAL_CALL 
-+ScVbaSpinButton::getValue() throw (css::uno::RuntimeException)
++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 )
 +{
-+    return  m_xProps->getPropertyValue( SPINVALUE );
++    // 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()
++{
++    uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
++    xPropertySet->setPropertyValue(rtl::OUString::createFromAscii("UIName"), uno::makeAny( m_sUIName ));
 +
-+void SAL_CALL 
-+ScVbaSpinButton::setValue( const uno::Any& _value ) throw (::com::sun::star::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()
 +{
-+    m_xProps->setPropertyValue( SPINVALUE, _value );
++    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" );
++    }
 +}
-+
-+::sal_Int32 SAL_CALL 
-+ScVbaSpinButton::getMax() throw (uno::RuntimeException)
++::rtl::OUString SAL_CALL
++ScVbaCommandBar::getName() throw ( uno::RuntimeException )
 +{
-+    sal_Int32 nMax = 0;
-+    m_xProps->getPropertyValue( SPINMAX ) >>= nMax;
-+    return nMax;
++    // 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 )
++    {
++        uno::Reference< container::XNameAccess > xNameAccess( m_pScVbaCommandBars->GetWindows(), uno::UNO_QUERY_THROW );
++        if( xNameAccess->hasByName( m_sToolBarName ) )
++        {
++            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 
-+ScVbaSpinButton::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
++ScVbaCommandBar::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException)
 +{
-+    m_xProps->setPropertyValue( SPINMAX, uno::makeAny( nVal ) ); 
++    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_Int32 SAL_CALL 
-+ScVbaSpinButton::getMin() throw (uno::RuntimeException)
++::sal_Bool SAL_CALL 
++ScVbaCommandBar::getVisible() throw (uno::RuntimeException)
 +{
-+    sal_Int32 nVal = 0;
-+    m_xProps->getPropertyValue( SPINMIN ) >>= nVal;
-+    return nVal;
++    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 
-+ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
-+{
-+    m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) ); 
-+}
-+
-+rtl::OUString& 
-+ScVbaSpinButton::getServiceImplName()
++ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSpinButton") );
-+	return sImplName;
++    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" );
++    }
 +}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaSpinButton::getServiceNames()
++void SAL_CALL 
++ScVbaCommandBar::Delete(  ) 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("org.openoffice.msforms.Frame" ) );
-+	}
-+	return aServiceNames;
++    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 );
++        }
++    }
 +}
-Index: sc/source/ui/vba/vbaspinbutton.hxx
-===================================================================
-RCS file: sc/source/ui/vba/vbaspinbutton.hxx
-diff -N sc/source/ui/vba/vbaspinbutton.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbaspinbutton.hxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
-@@ -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 <org/openoffice/msforms/XSpinButton.hpp>
-+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XSpinButton > SpinButtonImpl_BASE;
-+
-+class ScVbaSpinButton : public SpinButtonImpl_BASE
-+{
-+public:
-+    ScVbaSpinButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper  );
-+   // Attributes
-+    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
-+    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);
-+
-+    //XHelperInterface
-+    virtual rtl::OUString& getServiceImplName();
-+    virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif //SC_VBA_SPINBUTTON_HXX
-Index: sc/source/ui/vba/vbatextbox.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbatextbox.cxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbatextbox.cxx	11 Apr 2008 01:19:17 -0000	1.3
-+++ sc/source/ui/vba/vbatextbox.cxx	5 Sep 2008 14:04:23 -0000	1.2.42.3
-@@ -37,11 +37,24 @@ using namespace org::openoffice;
- 
- 
- 
--ScVbaTextBox::ScVbaTextBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : TextBoxImpl_BASE( xContext, xControlShape )
-+ScVbaTextBox::ScVbaTextBox( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, 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() );
-+}
-+
-+void SAL_CALL 
-+ScVbaTextBox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
++ScVbaCommandBar::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
 +{
-+	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 @@ ScVbaTextBox::getText() throw (css::uno:
- void SAL_CALL 
- ScVbaTextBox::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
- {
-+    if ( !mbDialog )
++    sal_Int32 nIndex;
++    uno::Reference< XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
++    if( aIndex.hasValue() )
 +    {
-     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 @@ ScVbaTextBox::setMultiline( sal_Bool _mu
-     m_xProps->setPropertyValue
-             (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), aValue);
- }
-+
++        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& 
-+ScVbaTextBox::getServiceImplName()
++ScVbaCommandBar::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox") );
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBar") );
 +	return sImplName;
 +}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaTextBox::getServiceNames()
++uno::Sequence<rtl::OUString> 
++ScVbaCommandBar::getServiceNames()
 +{
 +	static uno::Sequence< rtl::OUString > aServiceNames;
 +	if ( aServiceNames.getLength() == 0 )
 +	{
 +		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.TextBox" ) );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBar" ) );
 +	}
 +	return aServiceNames;
 +}
-Index: sc/source/ui/vba/vbatextbox.hxx
+Index: sc/source/ui/vba/vbacharttitle.cxx
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbatextbox.hxx,v
-retrieving revision 1.3
-retrieving revision 1.2.42.3
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.42.3
---- sc/source/ui/vba/vbatextbox.hxx	11 Apr 2008 01:19:33 -0000	1.3
-+++ sc/source/ui/vba/vbatextbox.hxx	5 Sep 2008 14:04:23 -0000	1.2.42.3
-@@ -38,16 +38,20 @@ typedef cppu::ImplInheritanceHelper1< Sc
+--- sc/source/ui/vba/vbacharttitle.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacharttitle.cxx	(revision 264308)
+@@ -29,10 +29,10 @@
+  ************************************************************************/
+ #include "vbacharttitle.hxx"
  
- class ScVbaTextBox : public TextBoxImpl_BASE
+-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 )
  {
-+    bool mbDialog;
+ }
+ 
+@@ -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 ];
+ 	}
+Index: sc/source/ui/vba/vbawsfunction.hxx
+===================================================================
+--- sc/source/ui/vba/vbawsfunction.hxx	(revision 264185)
++++ sc/source/ui/vba/vbawsfunction.hxx	(revision 264308)
+@@ -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:
--    ScVbaTextBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
--                    const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+    ScVbaTextBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper, bool bDialog = false );
-    // Attributes
-+    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
-     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
+-	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	(revision 264185)
++++ sc/source/ui/vba/vbacomment.hxx	(revision 264308)
+@@ -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 @@ class ScVbaComment : public ScVbaComment_BASE
+ 	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 @@ class ScVbaComment : public ScVbaComment_BASE
+ 
+     // 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	(revision 264185)
++++ sc/source/ui/vba/vbaoleobject.hxx	(revision 264308)
+@@ -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 @@ class ScVbaOLEObject : public OLEObjectImpl_BASE
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbawindow.hxx	(revision 264308)
+@@ -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 @@ class ScVbaWindow : public WindowImpl_BASE
+ 	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 @@ class ScVbaWindow : public WindowImpl_BASE
+ 	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 @@ class ScVbaWindow : public WindowImpl_BASE
+     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 @@ class ScVbaWindow : public WindowImpl_BASE
+ 	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
 ===================================================================
-RCS file: sc/source/ui/vba/vbatextboxshape.cxx
-diff -N sc/source/ui/vba/vbatextboxshape.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbatextboxshape.cxx	14 Feb 2008 15:27:49 -0000	1.1.2.1
+--- sc/source/ui/vba/vbatextboxshape.cxx	(revision 0)
++++ sc/source/ui/vba/vbatextboxshape.cxx	(revision 264308)
 @@ -0,0 +1,74 @@
 +/*************************************************************************
 + *
@@ -9785,9 +16678,9 @@
 +#include <vector>
 +
 +using namespace com::sun::star;
-+using namespace org::openoffice;
++using namespace ooo::vba;
 +
-+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< vba::XHelperInterface >(), xContext, xShape, xShapes, ScVbaShape::getType( xShape )  )
++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 );
@@ -9818,78 +16711,208 @@
 +    ScVbaPalette aPalette( pDoc->GetDocumentShell() );
 +    return  new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length, sal_True );
 +}
-Index: sc/source/ui/vba/vbatextboxshape.hxx
+Index: sc/source/ui/vba/vbalistcontrolhelper.hxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbatextboxshape.hxx
-diff -N sc/source/ui/vba/vbatextboxshape.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbatextboxshape.hxx	14 Feb 2008 15:27:49 -0000	1.1.2.1
-@@ -0,0 +1,58 @@
+--- sc/source/ui/vba/vbalistcontrolhelper.hxx	(revision 0)
++++ sc/source/ui/vba/vbalistcontrolhelper.hxx	(revision 264308)
+@@ -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 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	(revision 264185)
++++ sc/source/ui/vba/vbacollectionimpl.hxx	(revision 264308)
+@@ -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 @@ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseC
+ 		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 InheritedHelperInterfaceImpl< Ifc1 > BaseC
+ 	
+ };
+ 
+-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 ScVbaCollection
+ 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	(revision 0)
++++ sc/source/ui/vba/vbaimage.cxx	(revision 264308)
+@@ -0,0 +1,59 @@
 +/*************************************************************************
 + *
-+ *  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_TEXTBOX_HXX
-+#define SC_VBA_TEXTBOX_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <com/sun/star/text/XTextRange.hpp>
-+#include <org/openoffice/msforms/XTextBoxShape.hpp>
-+#include "vbashape.hxx"
-+#include "vbahelper.hxx"
-+#include "vbacharacters.hxx"
++#include "vbaimage.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+typedef cppu::ImplInheritanceHelper1< ScVbaShape, oo::msforms::XTextBoxShape > TextBoxShapeImpl_BASE;
 +
-+class ScVbaTextBoxShape : public TextBoxShapeImpl_BASE
++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 )
 +{
-+    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< oo::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/vbatogglebutton.cxx
++}
++
++rtl::OUString& 
++ScVbaImage::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaImage") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaImage::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Image" ) );
++	}
++	return aServiceNames;
++}
+Index: sc/source/ui/vba/helperdecl.hxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbatogglebutton.cxx
-diff -N sc/source/ui/vba/vbatogglebutton.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbatogglebutton.cxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
-@@ -0,0 +1,108 @@
+--- sc/source/ui/vba/helperdecl.hxx	(revision 264185)
++++ sc/source/ui/vba/helperdecl.hxx	(revision 264308)
+@@ -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 @@ 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;
+Index: sc/source/ui/vba/vbacondition.cxx
+===================================================================
+--- sc/source/ui/vba/vbacondition.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacondition.cxx	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/vbacommandbarcontrols.cxx	(revision 264308)
+@@ -0,0 +1,247 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -9924,392 +16947,1124 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#include "vbatogglebutton.hxx"
-+#include <vector>
++#include "vbacommandbarcontrols.hxx"
++#include "vbacommandbarcontrol.hxx"
 +
 +using namespace com::sun::star;
-+using namespace org::openoffice;
++using namespace ooo::vba;
 +
++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();
++    }
++};
 +
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+const static rtl::OUString TOGGLE( RTL_CONSTASCII_USTRINGPARAM("Toggle") );
-+const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-+ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
++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 )
 +{
-+    OSL_TRACE("ScVbaToggleButton(ctor)");
-+    m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
++    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 >() );
++    }
 +}
-+
-+ScVbaToggleButton::~ScVbaToggleButton()
++rtl::OUString
++ScVbaCommandBarControls::GetControlNameByIndex( const sal_Int32 nIndex ) throw ( uno::RuntimeException )
 +{
-+    OSL_TRACE("~ScVbaToggleButton(dtor)");
++    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
-+rtl::OUString SAL_CALL 
-+ScVbaToggleButton::getCaption() throw (css::uno::RuntimeException)
++sal_Int32 SAL_CALL 
++ScVbaCommandBarControls::getCount() throw (uno::RuntimeException)
 +{
-+    rtl::OUString Label;
-+    m_xProps->getPropertyValue( LABEL ) >>= Label;
-+    return Label;
++    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;
 +}
-+
-+void SAL_CALL 
-+ScVbaToggleButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++// XEnumerationAccess
++uno::Type SAL_CALL
++ScVbaCommandBarControls::getElementType() throw ( uno::RuntimeException )
 +{
-+    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
++    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 
-+ScVbaToggleButton::getValue() throw (uno::RuntimeException)
++ScVbaCommandBarControls::Item( const uno::Any& aIndex, const uno::Any& /*aIndex*/ ) throw (uno::RuntimeException)
 +{
-+	sal_Int16 nState = 0;
-+    	m_xProps->getPropertyValue( STATE ) >>= nState;
-+ 	return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
++    if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
++    {
++        return createCollectionObject( aIndex );
++    } 
++    sal_Int32 nIndex;
++    if( aIndex >>= nIndex )
++    {
++        return createCollectionObject( uno::makeAny( GetControlNameByIndex( nIndex ) ) );
++    }
++    
++    return uno::Any();
 +}
-+
-+void SAL_CALL 
-+ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
++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)
 +{
-+	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 ) );
++    // 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& 
-+ScVbaToggleButton::getServiceImplName()
++ScVbaCommandBarControls::getServiceImplName()
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaToggleButton") );
-+	return sImplName;
++    static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControls") );
++    return sImplName;
 +}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaToggleButton::getServiceNames()
-+{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.ToggleButton" ) );
-+	}
-+	return aServiceNames;
++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;
 +}
 +
-Index: sc/source/ui/vba/vbatogglebutton.hxx
+Index: sc/source/ui/vba/vbacolorformat.cxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbatogglebutton.hxx
-diff -N sc/source/ui/vba/vbatogglebutton.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbatogglebutton.hxx	5 Sep 2008 14:04:23 -0000	1.1.2.2
-@@ -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 <org/openoffice/msforms/XToggleButton.hpp>
-+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XToggleButton, css::script::XDefaultProperty  > ToggleButtonImpl_BASE;
-+
-+class ScVbaToggleButton : public ToggleButtonImpl_BASE
-+{
-+	rtl::OUString msDftPropName;
-+public:
-+    ScVbaToggleButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, oo::AbstractGeometryAttributes* pGeomHelper );
-+    ~ScVbaToggleButton();
-+   // Attributes
-+    virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+    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);
+--- sc/source/ui/vba/vbacolorformat.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacolorformat.cxx	(revision 264308)
+@@ -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 @@ 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;
+ }
+Index: sc/source/ui/vba/vbachartobject.cxx
+===================================================================
+--- sc/source/ui/vba/vbachartobject.cxx	(revision 264185)
++++ sc/source/ui/vba/vbachartobject.cxx	(revision 264308)
+@@ -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 @@ ScVbaChartObject::getServiceNames()
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbalistbox.hxx	(revision 264308)
+@@ -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 @@ class ScVbaListBox : public ListBoxImpl_BASE
+ 
+ 	// 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();
-+    // 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/vbauserform.cxx
++    virtual css::uno::Sequence<rtl::OUString> getServiceNames();    
++
+     //PropListener
+     virtual void setValueEvent( const css::uno::Any& value );
+     virtual css::uno::Any getValueEvent();
+Index: sc/source/ui/vba/vbainterior.cxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbauserform.cxx
-diff -N sc/source/ui/vba/vbauserform.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbauserform.cxx	19 Sep 2008 18:34:47 -0000	1.1.2.3
-@@ -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"
+--- sc/source/ui/vba/vbainterior.cxx	(revision 264185)
++++ sc/source/ui/vba/vbainterior.cxx	(revision 264308)
+@@ -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"
 +
-+using namespace ::org::openoffice;
-+using namespace ::com::sun::star;
++#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;
++}
 +
-+// 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
++static PatternMap aPatternMap( lcl_getPatternMap() );
 +
-+ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) :  ScVbaUserForm_BASE( getXSomethingFromArgs< vba::XHelperInterface >( aArgs, 0 ), xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), getXSomethingFromArgs< frame::XModel >( aArgs, 2 ), static_cast< org::openoffice::AbstractGeometryAttributes* >(0) ), m_pDocShell( 0 ), mbDispose( true )
++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,17 +101,52 @@ static const rtl::OUString BACKCOLOR( RTL_CONSTASC
+ 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;
++    if( _color >>= nColor )
++    {
++        SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( XLRGBToOORGB( nColor ) ) );
++	    //m_xProps->setPropertyValue( BACKCOLOR , XLRGBToOORGB(_color));
++        SetMixedColor();
+ }
++}
+ 
++void
++ScVbaInterior::SetMixedColor()
 +{
-+    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 ) );
++    // 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 ) );
 +}
 +
-+ScVbaUserForm::~ScVbaUserForm()
+ uno::Reference< container::XIndexAccess >
+ ScVbaInterior::getPalette()
+ {
+@@ -83,28 +162,28 @@ ScVbaInterior::setColorIndex( const css::uno::Any&
+ {
+ 	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_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 @@ ScVbaInterior::setColorIndex( const css::uno::Any&
+ 			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 
-+ScVbaUserForm::Show(  ) throw (uno::RuntimeException)
++Color
++ScVbaInterior::GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern )
 +{
-+	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& )
-+		{
-+		}
-+	}
++    // 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;
 +}
-+
-+rtl::OUString SAL_CALL 
-+ScVbaUserForm::getCaption() throw (::com::sun::star::uno::RuntimeException)
++Color
++ScVbaInterior::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans )
 +{
-+    rtl::OUString sCaption;
-+    m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ) ) >>= sCaption;
-+    return sCaption;
++    return Color( 
++        nTrans,
++        GetMixedColorComp( rFore.GetRed(), rBack.GetRed(), nTrans ),
++        GetMixedColorComp( rFore.GetGreen(), rBack.GetGreen(), nTrans ),
++        GetMixedColorComp( rFore.GetBlue(), rBack.GetBlue(), nTrans ));
 +}
-+void
-+ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++sal_uInt8
++ScVbaInterior::GetMixedColorComp(  sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans )
 +{
-+    m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), uno::makeAny( _caption ) );
++    sal_uInt32 nTemp = ((static_cast< sal_Int32 >( nBack ) - nFore) * nTrans) / 0x80 + nFore;
++    return static_cast< sal_uInt8 >( nTemp );
 +}
-+
-+void SAL_CALL 
-+ScVbaUserForm::Hide(  ) throw (uno::RuntimeException)
++uno::Reference< container::XNameContainer >
++ScVbaInterior::GetAttributeContainer()
 +{
-+	mbDispose = false;  // hide not dispose
-+	if ( m_xDialog.is() )
-+		m_xDialog->endExecute();
++    return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue( rtl::OUString::createFromAscii( "UserDefinedAttributes" ) ), uno::UNO_QUERY_THROW );
 +}
-+
-+void SAL_CALL 
-+ScVbaUserForm::RePaint(  ) throw (uno::RuntimeException)
++sal_Int32
++ScVbaInterior::GetAttributeData( uno::Any aValue )
 +{
-+	// do nothing
++    xml::AttributeData aDataValue;
++    if( aValue >>= aDataValue )
++    {
++        return aDataValue.Value.toInt32();
++    }
++    return sal_Int32( 0 );
 +}
-+
-+void SAL_CALL 
-+ScVbaUserForm::UnloadObject(  ) throw (uno::RuntimeException)
++uno::Any
++ScVbaInterior::SetAttributeData( sal_Int32 nValue )
 +{
-+	mbDispose = true;
-+	if ( m_xDialog.is() )
-+		m_xDialog->endExecute();
++    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 );
 +}
-+
-+rtl::OUString& 
-+ScVbaUserForm::getServiceImplName()
++uno::Any
++ScVbaInterior::GetUserDefinedAttributes( const rtl::OUString& sName )
 +{
-+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
-+	return sImplName;
++    uno::Reference< container::XNameContainer > xNameContainer( GetAttributeContainer(), uno::UNO_QUERY_THROW );
++    if( xNameContainer->hasByName( sName ) )
++    {
++        return xNameContainer->getByName( sName );
++    }
++    return uno::Any();
 +}
-+
-+uno::Sequence< rtl::OUString > 
-+ScVbaUserForm::getServiceNames()
++void
++ScVbaInterior::SetUserDefinedAttributes( const rtl::OUString& sName, const uno::Any& aValue )
 +{
-+	static uno::Sequence< rtl::OUString > aServiceNames;
-+	if ( aServiceNames.getLength() == 0 )
-+	{
-+		aServiceNames.realloc( 1 );
-+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.UserForm" ) );
-+	}
-+	return aServiceNames;
++    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 ) );
++    }
++}
++// OOo do not support below API
++uno::Any SAL_CALL 
++ScVbaInterior::getPattern() throw (uno::RuntimeException)
++{
++    // 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 >() );
 +}
-+
-+uno::Reference< beans::XIntrospectionAccess > SAL_CALL 
-+ScVbaUserForm::getIntrospection(  ) throw (uno::RuntimeException)
++Color
++ScVbaInterior::GetBackColor()
 +{
-+	return uno::Reference< beans::XIntrospectionAccess >();
++    sal_Int32 nColor;
++    Color aBackColor;
++    uno::Any aColor = GetUserDefinedAttributes( BACKCOLOR ); 
++    if( aColor.hasValue() )
++    {
++        nColor = GetAttributeData( aColor );
++        aBackColor.SetColor( nColor );
++    }
++    else
++    {
++	    uno::Any aAny;
++	    aAny = OORGBToXLRGB( m_xProps->getPropertyValue( BACKCOLOR ) );
++        if( aAny >>= nColor )
++        {
++            nColor = XLRGBToOORGB( nColor );
++            aBackColor.SetColor( nColor );
++            SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( nColor ) );
++        }
++    }
++    return aBackColor;
 +}
-+
 +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)
++ScVbaInterior::getPatternColor() throw (uno::RuntimeException)
 +{
-+	throw uno::RuntimeException(); // unsupported operation
++    // 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 ) );
 +}
-+
 +void SAL_CALL 
-+ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
++ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (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 );
++    sal_Int32 nPattColor;
++    if( _patterncolor >>= nPattColor )
++    {
++        SetUserDefinedAttributes( PATTERNCOLOR, SetAttributeData( XLRGBToOORGB( nPattColor ) ) );
++        SetMixedColor();
++    }
++    else
++        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() );
 +}
-+
 +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 );
-+}
-+
-+::sal_Bool SAL_CALL 
-+ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
++ScVbaInterior::getPatternColorIndex() throw (uno::RuntimeException)
 +{
-+	return sal_False;
++	sal_Int32 nColor = 0;
++	XLRGBToOORGB( getPatternColor() ) >>= nColor; 
++     
++	return uno::makeAny( GetIndexColor( nColor ) );
 +}
-+uno::Any SAL_CALL 
-+ScVbaUserForm::Controls( const uno::Any& index ) throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw (uno::RuntimeException)
 +{
-+	uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
-+	uno::Reference< vba::XCollection > xControls( new ScVbaControls( this, mxContext, xDialogControl ) );
-+	if ( index.hasValue() )
-+		return uno::makeAny( xControls->Item( index, uno::Any() ) );
-+	return uno::makeAny( xControls );
++    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 >() );
 +}
 +
-+::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() )
-+	{
-+		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;
-+}
+ rtl::OUString& 
+ ScVbaInterior::getServiceImplName()
+ {
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbamultipage.hxx
+===================================================================
+--- sc/source/ui/vba/vbamultipage.hxx	(revision 0)
++++ sc/source/ui/vba/vbamultipage.hxx	(revision 264308)
+@@ -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>
 +
-+namespace userform
++#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
 +{
-+namespace sdecl = comphelper::service_decl;
-+sdecl::vba_service_class_<ScVbaUserForm, sdecl::with_args<true> > serviceImpl;
-+extern sdecl::ServiceDecl const serviceDecl(
-+    serviceImpl,
-+    "ScVbaUserForm",
-+    "org.openoffice.excel.UserForm" );
-+}
++    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( const sal_Int32 _value ) throw (css::uno::RuntimeException);
++    virtual css::uno::Any SAL_CALL Pages( const css::uno::Any& index ) throw (css::uno::RuntimeException);
 +
-Index: sc/source/ui/vba/vbauserform.hxx
++    //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	(revision 264185)
++++ sc/source/ui/vba/vbawindows.hxx	(revision 264308)
+@@ -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 @@ class ScVbaWindows : public ScVbaWindows_BASE
+ 	// 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	(revision 264185)
++++ sc/source/ui/vba/vbaradiobutton.hxx	(revision 264308)
+@@ -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	(revision 264185)
++++ sc/source/ui/vba/vbaaxes.cxx	(revision 264308)
+@@ -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
+ 	}
+ 	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 > createIn
+ }
+ 
+ // #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;
+ }
+Index: sc/source/ui/vba/vbachart.cxx
 ===================================================================
-RCS file: sc/source/ui/vba/vbauserform.hxx
-diff -N sc/source/ui/vba/vbauserform.hxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbauserform.hxx	19 Sep 2008 18:34:47 -0000	1.1.2.3
-@@ -0,0 +1,78 @@
+--- sc/source/ui/vba/vbachart.cxx	(revision 264185)
++++ sc/source/ui/vba/vbachart.cxx	(revision 264308)
+@@ -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_U
+ 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 @@ ScVbaChart::Activate() throw (script::BasicErrorEx
+ 	// 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::BasicErrorEx
+ }
+ 
+ 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)
+ 
+ 
+ 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;
+ }
+Index: sc/source/ui/vba/vbaworksheets.hxx
+===================================================================
+--- sc/source/ui/vba/vbaworksheets.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaworksheets.hxx	(revision 264308)
+@@ -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 @@ class ScVbaWorksheets : public ScVbaWorksheets_BAS
+ 	// 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	(revision 264185)
++++ sc/source/ui/vba/vbatextframe.hxx	(revision 264308)
+@@ -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 @@ class ScVbaTextFrame : public ScVbaTextFrame_BASE
+     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 @@ class ScVbaTextFrame : public ScVbaTextFrame_BASE
+     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	(revision 264185)
++++ sc/source/ui/vba/vbadialog.hxx	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/vbapages.hxx	(revision 264308)
+@@ -0,0 +1,64 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -10344,1920 +18099,2331 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_USERFORM_HXX
-+#define SC_VBA_USERFORM_HXX
++#ifndef SC_VBA_PAGES_HXX
++#define SC_VBA_PAGES_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>
-+#include <org/openoffice/msforms/XUserForm.hpp>
-+#include <com/sun/star/awt/XDialog.hpp>
-+#include <com/sun/star/frame/XModel.hpp>
 +
-+#include "vbahelperinterface.hxx"
-+#include "vbacontrol.hxx"
-+
-+//typedef InheritedHelperInterfaceImpl1< oo::msforms::XUserForm > ScVbaUserForm_BASE;
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XUserForm > ScVbaUserForm_BASE;
++#include "vbacollectionimpl.hxx"
++typedef CollTestImplHelper< 
++ov::msforms::XPages > ScVbaPages_BASE;
 +
-+class ScVbaUserForm : public ScVbaUserForm_BASE
++class ScVbaPages : public ScVbaPages_BASE
 +{
-+private:
-+    css::uno::Reference< css::awt::XDialog > m_xDialog;
-+    ScDocShell* m_pDocShell;
-+    bool mbDispose;
 +protected:
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
 +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();
++    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
-Index: sc/source/ui/vba/vbawindow.cxx
++#endif//SC_VBA_SHAPE_HXX
+Index: sc/source/ui/vba/vbahelperinterface.hxx
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbawindow.cxx,v
-retrieving revision 1.5
-retrieving revision 1.3.42.5
-diff -u -p -u -p -b -w -B -r1.5 -r1.3.42.5
---- sc/source/ui/vba/vbawindow.cxx	11 Apr 2008 01:21:13 -0000	1.5
-+++ sc/source/ui/vba/vbawindow.cxx	11 Sep 2008 06:54:22 -0000	1.3.42.5
-@@ -27,6 +27,7 @@
-  * for a copy of the LGPLv3 License.
-  *
-  ************************************************************************/
-+#include "helperdecl.hxx"
- #include "vbawindow.hxx"
- #include "vbaworksheets.hxx"
- #include "vbaworksheet.hxx"
-@@ -37,7 +38,11 @@
- #include <com/sun/star/view/DocumentZoomType.hpp>
- #include <com/sun/star/table/CellRangeAddress.hpp>
- #include <org/openoffice/excel/XlWindowState.hpp>
-+#include <org/openoffice/excel/XlWindowView.hpp>
- #include <org/openoffice/excel/Constants.hpp>
-+#include <com/sun/star/awt/XWindow.hpp>
-+#include <com/sun/star/awt/XWindow2.hpp>
-+#include <com/sun/star/awt/PosSize.hpp>
+--- sc/source/ui/vba/vbahelperinterface.hxx	(revision 264185)
++++ sc/source/ui/vba/vbahelperinterface.hxx	(revision 264308)
+@@ -31,7 +31,7 @@
+ #define SC_VBA_HELPERINTERFACE_HXX
  
- #include <docsh.hxx>
- #include <tabvwsh.hxx>
-@@ -199,7 +204,19 @@ public:
+ #include <cppuhelper/implbase1.hxx>
+-#include <org/openoffice/vba/XHelperInterface.hpp>
++#include <ooo/vba/XHelperInterface.hpp>
+ #include "vbahelper.hxx"
+ #include "vbaglobals.hxx"
  
- 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 ) 
- {
--	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< vba::XHelperInterface >( args, 0 ), xContext ),
-+          m_xModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
-+{
-+    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 );
-@@ -441,8 +456,8 @@ ScVbaWindow::Close( const uno::Any& Save
- 	workbook.Close(SaveChanges, FileName, RouteWorkBook );
- }
+@@ -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;
  
--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 +644,8 @@ ScVbaWindow::setSplitColumn( sal_Int32 _
- 	if( getSplitColumn() != _splitcolumn )
+@@ -80,7 +80,7 @@ class InheritedHelperInterfaceImpl : public Ifc1
  	{
- 		sal_Bool bFrozen = getFreezePanes();
--		m_xViewFreezable->freezeAtPosition( _splitcolumn, 0 );
-+		sal_Int32 nRow = getSplitRow();
-+		m_xViewFreezable->freezeAtPosition( _splitcolumn, nRow );
- 		SplitAtDefinedPosition( !bFrozen );
+ 		return 0x53756E4F;
  	}
- }
-@@ -646,13 +662,14 @@ void SAL_CALL 
- ScVbaWindow::setSplitHorizontal( double _splithorizontal ) throw (uno::RuntimeException)
+-	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 Inher
  {
- 	double fHoriPixels = PointsToPixels( m_xDevice, _splithorizontal, sal_True );
--   m_xViewSplitable->splitAtPosition( (int) fHoriPixels, 0 );	
-+   m_xViewSplitable->splitAtPosition( static_cast<sal_Int32>( fHoriPixels ), 0 );	
- }
+ 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 ) {}	
  
- sal_Int32 SAL_CALL 
- ScVbaWindow::getSplitRow() throw (uno::RuntimeException)
+ };
+ #endif
+Index: sc/source/ui/vba/vbaapplication.hxx
+===================================================================
+--- sc/source/ui/vba/vbaapplication.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaapplication.hxx	(revision 264308)
+@@ -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
  {
--	return m_xViewSplitable->getSplitRow();	
-+	sal_Int32 nValue = m_xViewSplitable->getSplitRow();
-+	return nValue ? nValue - 1 : nValue;	
- }
+@@ -49,7 +49,7 @@ class ScVbaApplication : public ScVbaApplication_B
+ 	virtual ~ScVbaApplication();
  
- void SAL_CALL 
-@@ -661,7 +678,8 @@ ScVbaWindow::setSplitRow( sal_Int32 _spl
- 	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 +754,184 @@ ScVbaWindow::setZoom( const uno::Any& _z
- 	}			
- }
+ 	// 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 @@ class ScVbaApplication : public ScVbaApplication_B
+ 	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 @@ class ScVbaApplication : public ScVbaApplication_B
+ 	virtual ::sal_Bool SAL_CALL getDisplayFormulaBar() throw ( css::uno::RuntimeException );
+ 	virtual void SAL_CALL setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException );
  
-+uno::Reference< excel::XWorksheet > SAL_CALL 
-+ScVbaWindow::ActiveSheet(  ) throw (script::BasicErrorException, uno::RuntimeException)
-+{
-+	return ScVbaGlobals::getGlobalsImpl(mxContext)->getApplication()->getActiveSheet();
-+}
+-	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 @@ class ScVbaApplication : public ScVbaApplication_B
+ 	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	(revision 0)
++++ sc/source/ui/vba/vbapagebreaks.hxx	(revision 264308)
+@@ -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
 +
-+uno::Any SAL_CALL
-+ScVbaWindow::getView() throw (uno::RuntimeException)
-+{
-+	// not supported now	
-+	sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;	
-+	return uno::makeAny( nWindowView );	
-+}
++#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"
 +
-+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 );
-+}
++typedef CollTestImplHelper< ov::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
 +
-+sal_Bool SAL_CALL
-+ScVbaWindow::getVisible() throw (uno::RuntimeException)
++class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE
 +{
-+	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;
-+}
++	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
-+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 );	
-+	}
-+}
++    // XHPageBreaks 
++    virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
 +
-+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;
-+}
++	// 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&);
 +
-+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;
-+		}
-+	}
-+}	
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
 +
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::getHeight() throw (uno::RuntimeException)
-+{
-+	css::awt::Rectangle aRect = getPosSize(m_xModel);
-+	return aRect.Height;
-+}
++#endif
+Index: sc/source/ui/vba/vbaspinbutton.hxx
+===================================================================
+--- sc/source/ui/vba/vbaspinbutton.hxx	(revision 0)
++++ sc/source/ui/vba/vbaspinbutton.hxx	(revision 264308)
+@@ -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>
 +
-+void SAL_CALL 
-+ScVbaWindow::setHeight( sal_Int32 _height ) throw (uno::RuntimeException)
-+{
-+	setPosSize(m_xModel, _height, css::awt::PosSize::HEIGHT);
-+}
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::getLeft() throw (uno::RuntimeException)
-+{
-+	css::awt::Rectangle aRect = getPosSize(m_xModel);
-+	return aRect.X;
-+}
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XSpinButton > SpinButtonImpl_BASE;
 +
-+void SAL_CALL 
-+ScVbaWindow::setLeft( sal_Int32 _left ) throw (uno::RuntimeException)
-+{
-+	setPosSize(m_xModel, _left, css::awt::PosSize::X);
-+}
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::getTop() throw (uno::RuntimeException)
++class ScVbaSpinButton : public SpinButtonImpl_BASE
 +{
-+	css::awt::Rectangle aRect = getPosSize(m_xModel);
-+	return aRect.Y;
-+}
++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);
 +
-+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)
-+{
-+	css::awt::Rectangle aRect = getPosSize(m_xModel);
-+	return aRect.Width;
-+}
++    //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	(revision 0)
++++ sc/source/ui/vba/vbahyperlink.hxx	(revision 264308)
+@@ -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 
-+ScVbaWindow::setWidth( sal_Int32 _width ) throw (uno::RuntimeException)
-+{
-+	setPosSize(m_xModel, _width, css::awt::PosSize::WIDTH);
-+}
++#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>
 +
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-+{
-+	sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
-+	double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterX/100000);
-+	return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
-+}
++#include "vbahelperinterface.hxx"
 +
-+sal_Int32 SAL_CALL 
-+ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-+{
-+	sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
-+	double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterY/100000);
-+	return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
-+}
++typedef InheritedHelperInterfaceImpl1< ov::excel::XHyperlink > HyperlinkImpl_BASE;
 +
-+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)
++class ScVbaHyperlink : public HyperlinkImpl_BASE 
 +{
-+	// need test, print current active sheet	
-+	PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, m_xModel, sal_True );
-+}
++	css::uno::Reference< css::table::XCell > mxCell;
++	css::uno::Reference< css::beans::XPropertySet > mxTextField;
 +
-+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 );	
-+}
++public:
++	ScVbaHyperlink( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ) throw ( css::lang::IllegalArgumentException );
++	virtual ~ScVbaHyperlink();
 +
- rtl::OUString& 
- ScVbaWindow::getServiceImplName()
- {
-@@ -754,3 +950,12 @@ ScVbaWindow::getServiceNames()
- 	}
- 	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",
-+    "org.openoffice.excel.Window" );
-+}
-Index: sc/source/ui/vba/vbawindow.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbawindow.hxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.3
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.3
---- sc/source/ui/vba/vbawindow.hxx	11 Apr 2008 01:21:27 -0000	1.4
-+++ sc/source/ui/vba/vbawindow.hxx	29 Jul 2008 06:35:43 -0000	1.3.42.3
-@@ -53,14 +53,19 @@ private:		
- 	css::uno::Reference< css::sheet::XViewSplitable > m_xViewSplitable;
- 	css::uno::Reference< oo::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( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext );
++	// 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);
 +
- 	// XWindow
-+	virtual css::uno::Reference< oo::excel::XRange > SAL_CALL ActiveCell(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 
-+ 	virtual css::uno::Reference< oo::excel::XPane > SAL_CALL ActivePane() throw (css::script::BasicErrorException, css::uno::RuntimeException);
-+	virtual css::uno::Reference< oo::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();
-Index: sc/source/ui/vba/vbaworkbook.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaworkbook.cxx,v
-retrieving revision 1.5
-retrieving revision 1.4.42.2
-diff -u -p -u -p -b -w -B -r1.5 -r1.4.42.2
---- sc/source/ui/vba/vbaworkbook.cxx	11 Apr 2008 01:22:11 -0000	1.5
-+++ sc/source/ui/vba/vbaworkbook.cxx	6 Jul 2008 15:29:44 -0000	1.4.42.2
-@@ -428,14 +428,18 @@ ScVbaWorkbook::Styles( const::uno::Any& 
- 
- // 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 ));
-+    if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
-+    {
- 	return uno::Any( xNames );
- }
-+    return uno::Any( xNames->Item( aIndex, uno::Any() ) );
-+}
- 
- rtl::OUString& 
- ScVbaWorkbook::getServiceImplName()
-Index: sc/source/ui/vba/vbaworkbook.hxx
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif /* SC_VBA_HYPERLINK_HXX */
++
+Index: sc/source/ui/vba/vbafont.hxx
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaworkbook.hxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.2
---- sc/source/ui/vba/vbaworkbook.hxx	11 Apr 2008 01:22:26 -0000	1.4
-+++ sc/source/ui/vba/vbaworkbook.hxx	6 Jul 2008 15:30:33 -0000	1.3.42.2
-@@ -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);
+--- sc/source/ui/vba/vbafont.hxx	(revision 264185)
++++ sc/source/ui/vba/vbafont.hxx	(revision 264308)
+@@ -32,14 +32,14 @@
  
- 	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/vbaworksheet.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaworksheet.cxx,v
-retrieving revision 1.5
-retrieving revision 1.3.42.6
-diff -u -p -u -p -b -w -B -r1.5 -r1.3.42.6
---- sc/source/ui/vba/vbaworksheet.cxx	11 Apr 2008 01:23:10 -0000	1.5
-+++ sc/source/ui/vba/vbaworksheet.cxx	5 Sep 2008 14:04:24 -0000	1.3.42.6
-@@ -47,6 +47,7 @@
- #include <com/sun/star/sheet/XSheetPastable.hpp>
- #include <com/sun/star/sheet/XCellAddressable.hpp>
- #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 <cppuhelper/implbase1.hxx>
  
- #include <comphelper/processfactory.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"
  
-@@ -84,6 +86,8 @@
- #include "vbaoleobject.hxx"
- #include "vbaoleobjects.hxx"
- #include "vbashapes.hxx"
-+#include "vbapagesetup.hxx"
-+#include "vbapagebreaks.hxx"
+ class ScTableSheetsObj;
  
- #define STANDARDWIDTH 2267
- #define STANDARDHEIGHT 427
-@@ -247,6 +251,12 @@ ScVbaWorksheet::setVisible( sal_Bool bVi
- 			(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ), aValue);
- }
+-typedef  InheritedHelperInterfaceImpl1< oo::excel::XFont > ScVbaFont_BASE;
++typedef  InheritedHelperInterfaceImpl1< ov::excel::XFont > ScVbaFont_BASE;
  
-+sal_Int16
-+ScVbaWorksheet::getIndex() throw (uno::RuntimeException)
-+{
-+	return getSheetID() + 1;
-+}
-+
- uno::Reference< excel::XRange > 
- ScVbaWorksheet::getUsedRange() throw (uno::RuntimeException)
+ class ScVbaFont : public ScVbaFont_BASE
  {
-@@ -266,6 +276,22 @@ ScVbaWorksheet::Outline( ) throw (uno::R
- 	return new ScVbaOutline( this, mxContext, xOutline);
- }
+@@ -47,7 +47,7 @@ class ScVbaFont : public ScVbaFont_BASE
+     ScVbaPalette mPalette;
+     SfxItemSet* mpDataSet;
+ 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 );
++	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, SfxItemSet* pDataSet = NULL ) throw ( css::uno::RuntimeException );
+ 	virtual ~ScVbaFont() {}
  
-+uno::Reference< excel::XPageSetup >
-+ScVbaWorksheet::PageSetup( ) throw (uno::RuntimeException)
+ 	// Attributes
+Index: sc/source/ui/vba/vbaassistant.hxx
+===================================================================
+--- sc/source/ui/vba/vbaassistant.hxx	(revision 0)
++++ sc/source/ui/vba/vbaassistant.hxx	(revision 264308)
+@@ -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
 +{
-+	return new ScVbaPageSetup( this, mxContext, getSheet(), getModel() );
-+}
++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);
 +
-+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 );
-+}
++    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();
++};
 +
- sal_Int32 
- ScVbaWorksheet::getStandardWidth() throw (uno::RuntimeException)
- {
-@@ -416,6 +442,7 @@ ScVbaWorksheet::Delete() throw (uno::Run
- 		uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
- 		uno::Reference<container::XNameContainer> xNameContainer(xSheets,uno::UNO_QUERY_THROW);
- 		xNameContainer->removeByName(aSheetName);
-+        mxSheet.clear();
++#endif//SC_VBA_ASSISTANT_HXX
+Index: sc/source/ui/vba/vbaoutline.cxx
+===================================================================
+--- sc/source/ui/vba/vbaoutline.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaoutline.cxx	(revision 264308)
+@@ -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;
  }
+Index: sc/source/ui/vba/vbaname.cxx
+===================================================================
+--- sc/source/ui/vba/vbaname.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaname.cxx	(revision 264308)
+@@ -31,6 +31,7 @@
  
-@@ -656,29 +683,10 @@ ScVbaWorksheet::setValue( const ::rtl::O
- uno::Any SAL_CALL 
- ScVbaWorksheet::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
+ #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()
  {
--/*	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::
+-css::uno::Reference< oo::excel::XWorksheet >
++css::uno::Reference< ov::excel::XWorksheet >
+ ScVbaName::getWorkSheet() throw (css::uno::RuntimeException)
  {
- 	return sal_False;
- }
--::sal_Bool SAL_CALL 
--ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
-+
-+uno::Reference< container::XNameAccess > 
-+ScVbaWorksheet::getFormControls()
+ 	return ScVbaGlobals::getGlobalsImpl( mxContext )->getActiveSheet();
+@@ -110,36 +111,77 @@ ScVbaName::getValue() throw (css::uno::RuntimeExce
  {
-+	uno::Reference< container::XNameAccess > xFormControls;
- 	try
+ 	::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 )
  	{
--		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 );
-+		
+-		::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;
  	}
- 	catch( uno::Exception& )
+-	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 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;
+-	return sValue;
++	if (sResult.indexOf('=') != 0)
++	{
++		sResult = ::rtl::OUString::createFromAscii("=") + sResult;
  }
++	return sResult;
++}
  
- uno::Any
- ScVbaWorksheet::getControlShape( const ::rtl::OUString& sName )
+ void 
+ ScVbaName::setValue( const ::rtl::OUString & rValue ) throw (css::uno::RuntimeException)
  {
--	//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;
-         }
--
-+ 		}
-     }
-     return uno::Any();
- }
-@@ -856,6 +849,29 @@ ScVbaWorksheet::getSheetID() throw (uno:
- 	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)
-+{
-+	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 );
+ 	::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 )
+ 	{
+-		sValue = ::rtl::OUString::createFromAscii("$") + sSheetName;
++        ::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;
+ 	}
+-	sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
+-	mxNamedRange->setContent(sValue);
++        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))
++	{
++		sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
++	}
++    sResult += sTmpValue;
++	mxNamedRange->setContent(sResult);
 +}
-+
  
- namespace worksheet
+ ::rtl::OUString 
+ ScVbaName::getRefersTo() throw (css::uno::RuntimeException)
+@@ -189,15 +231,15 @@ ScVbaName::setRefersToR1C1Local( const ::rtl::OUSt
+ 	setRefersTo( rRefersTo );
+ }
+ 
+-css::uno::Reference< oo::excel::XRange >
++css::uno::Reference< ov::excel::XRange >
+ ScVbaName::getRefersToRange() throw (css::uno::RuntimeException)
  {
-Index: sc/source/ui/vba/vbaworksheet.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaworksheet.hxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.4
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.4
---- sc/source/ui/vba/vbaworksheet.hxx	11 Apr 2008 01:23:24 -0000	1.4
-+++ sc/source/ui/vba/vbaworksheet.hxx	29 Jul 2008 06:35:43 -0000	1.3.42.4
-@@ -42,6 +42,8 @@
- #include <com/sun/star/uno/XComponentContext.hpp>
- #include <com/sun/star/frame/XModel.hpp>
- #include <org/openoffice/excel/XOutline.hpp>
-+#include <org/openoffice/excel/XPageSetup.hpp>
-+#include <org/openoffice/excel/XHPageBreaks.hpp>
- #include <org/openoffice/excel/XChartObjects.hpp>
+-	css::uno::Reference< oo::excel::XRange > xRange;
++    uno::Reference< ov::excel::XRange > xRange = ScVbaRange::getRangeObjectForName( mxContext, mxNamedRange->getName(), getDocShell( mxModel ), ScAddress::CONV_XL_R1C1 );
+ 	return xRange;
+ }
  
- #include "vbahelperinterface.hxx"
-@@ -57,7 +59,7 @@ class ScVbaWorksheet : public WorksheetI
- 	css::uno::Reference< oo::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
- 	css::uno::Reference< oo::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
+ 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)
+ {
+ }
  
--	css::uno::Any getControl( const rtl::OUString& sName );
-+	css::uno::Reference< css::container::XNameAccess > getFormControls();
- 	css::uno::Any getControlShape( const rtl::OUString& sName );
- protected:
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbabutton.hxx
+===================================================================
+--- sc/source/ui/vba/vbabutton.hxx	(revision 264185)
++++ sc/source/ui/vba/vbabutton.hxx	(revision 264308)
+@@ -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>
  
-@@ -89,8 +91,11 @@ public:
- 	virtual css::uno::Reference< oo::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::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< 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 sal_Int16 SAL_CALL getIndex() throw (css::uno::RuntimeException);
+ #include "vbacontrol.hxx"
+ #include "vbahelper.hxx"
  
-     // Methods
- 	virtual void SAL_CALL Activate() 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);
+-typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XButton > ButtonImpl_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XButton > ButtonImpl_BASE;
  
-+	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();	
-Index: sc/source/ui/vba/vbawsfunction.cxx
+ 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
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbawsfunction.cxx,v
-retrieving revision 1.4
-retrieving revision 1.4.96.1
-diff -u -p -u -p -b -w -B -r1.4 -r1.4.96.1
---- sc/source/ui/vba/vbawsfunction.cxx	11 Apr 2008 01:24:09 -0000	1.4
-+++ sc/source/ui/vba/vbawsfunction.cxx	11 Sep 2008 06:11:49 -0000	1.4.96.1
-@@ -42,13 +42,14 @@
- #include <comphelper/anytostring.hxx>
- 
- #include "vbawsfunction.hxx"
-+#include "opcode.hxx"
-+#include "compiler.hxx"
+--- sc/source/ui/vba/vbaworkbooks.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaworkbooks.cxx	(revision 264308)
+@@ -60,7 +60,7 @@
  
- using namespace com::sun::star;
- using namespace org::openoffice;
+ #include <hash_map>
+ #include <osl/file.hxx>
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
  
- ScVbaWSFunction::ScVbaWSFunction( const uno::Reference< vba::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 );
+ const sal_Int16 CUSTOM_CHAR = 5;
+@@ -81,7 +81,7 @@ getWorkbook( uno::Reference< uno::XComponentContex
+ 	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 @@ class WorkBooksAccessImpl : public WorkBooksAccess
  
-@@ -86,7 +87,24 @@ ScVbaWSFunction::invoke(const rtl::OUStr
- 	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;
-+	}
-+	return aRet;
- }
+ };
  
- void SAL_CALL
-@@ -107,7 +125,10 @@ ScVbaWSFunction::hasMethod(const rtl::OU
- 	sal_Bool bIsFound = sal_False;
- 	try 
+-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 )
  	{
--		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;
+ 		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") );
  	}
- 	catch( uno::Exception& /*e*/ )
-Index: sc/source/ui/vba/vbawsfunction.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbawsfunction.hxx,v
-retrieving revision 1.4
-retrieving revision 1.4.96.1
-diff -u -p -u -p -b -w -B -r1.4 -r1.4.96.1
---- sc/source/ui/vba/vbawsfunction.hxx	11 Apr 2008 01:24:23 -0000	1.4
-+++ sc/source/ui/vba/vbawsfunction.hxx	11 Sep 2008 06:11:49 -0000	1.4.96.1
-@@ -41,7 +41,6 @@ typedef InheritedHelperInterfaceImpl1< o
- 
- 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);
- 	virtual ~ScVbaWSFunction(){}
-Index: sc/source/ui/vba/testvba/README
+ 	return sNames;
+ }
+Index: sc/source/ui/vba/vbashaperange.hxx
 ===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/testvba/README,v
-retrieving revision 1.2
-retrieving revision 1.2.42.1
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.42.1
---- sc/source/ui/vba/testvba/README	7 Dec 2007 11:14:59 -0000	1.2
-+++ sc/source/ui/vba/testvba/README	29 Jul 2008 07:22:41 -0000	1.2.42.1
-@@ -1,35 +1,37 @@
--running dmake in this directory runs a set of regression (unit) tests.
-+to run the tests 
- 
--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 )
- 
--    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 )
+--- sc/source/ui/vba/vbashaperange.hxx	(revision 264185)
++++ sc/source/ui/vba/vbashaperange.hxx	(revision 264308)
+@@ -31,11 +31,11 @@
+ #define SC_VBA_SHAPERANGE_HXX
  
--    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 <com/sun/star/drawing/XShapes.hpp>
+-#include <org/openoffice/msforms/XShapeRange.hpp>
++#include <ooo/vba/msforms/XShapeRange.hpp>
  
-+unix
-+====
+ #include "vbacollectionimpl.hxx"
  
--[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.
+-typedef CollTestImplHelper< oo::msforms::XShapeRange > ScVbaShapeRange_BASE;
++typedef CollTestImplHelper< ov::msforms::XShapeRange > ScVbaShapeRange_BASE;
  
--[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.
+ class ScVbaShapeRange : public ScVbaShapeRange_BASE
+ {
+@@ -48,11 +48,11 @@ class ScVbaShapeRange : public ScVbaShapeRange_BAS
+ 	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 );
  
--The TestDocument directory contains 
--   o test documents ( *.xls )
--   o logs directory ( contains the benchmark logs to compare against )
-+========>
+     // 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	(revision 264185)
++++ sc/source/ui/vba/vbacomments.cxx	(revision 264308)
+@@ -34,7 +34,7 @@
  
--[4]
-+skipped 0 test-cases(s)
-+compared 9 test-case documents
-+                 9 tests passedTests
+ #include "vbaglobals.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/testvba/makefile.mk
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/testvba/makefile.mk,v
-retrieving revision 1.3
-retrieving revision 1.3.96.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.96.2
---- sc/source/ui/vba/testvba/makefile.mk	11 Apr 2008 01:25:09 -0000	1.3
-+++ sc/source/ui/vba/testvba/makefile.mk	29 Jul 2008 09:36:01 -0000	1.3.96.2
-@@ -30,28 +30,44 @@
- #*************************************************************************
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
  
- PRJ=..$/..$/..$/..$/
-+
- PRJNAME=sc
- TARGET=testvba
-+ENABLE_EXCEPTIONS=TRUE
+ uno::Any AnnotationToComment( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext )
+@@ -44,7 +44,7 @@ uno::Any AnnotationToComment( const uno::Any& aSou
+ 	uno::Reference< table::XCellRange > xCellRange( xChild->getParent(), uno::UNO_QUERY_THROW );
  
--.INCLUDE : ant.mk
--
--.IF "$(SOLAR_JAVA)"!=""
-+# --- Settings -----------------------------------------------------
+ 	// #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 ) ) );
+ }
  
--ALLTAR : PROCESSRESULTS
-+.INCLUDE :  settings.mk
-+DLLPRE =
+ class CommentEnumeration : public EnumerationHelperImpl
+@@ -59,7 +59,7 @@ class CommentEnumeration : public EnumerationHelpe
  
--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
-+
+-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 @@ 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;
+ }
+Index: sc/source/ui/vba/vbadialogs.hxx
+===================================================================
+--- sc/source/ui/vba/vbadialogs.hxx	(revision 264185)
++++ sc/source/ui/vba/vbadialogs.hxx	(revision 264308)
+@@ -33,18 +33,18 @@
+ #include <cppuhelper/implbase1.hxx>
  
--.ENDIF
-Index: sc/source/ui/vba/testvba/runTests.pl
+ #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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/runTests.pl
-diff -N sc/source/ui/vba/testvba/runTests.pl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/runTests.pl	5 Sep 2008 14:04:24 -0000	1.1.2.2
-@@ -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";
-+}
-+
+--- sc/source/ui/vba/vbaglobals.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaglobals.hxx	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/vbascrollbar.hxx	(revision 264308)
+@@ -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>
 +
-+my $binDir = abs_path( dirname($0) );
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+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.0/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";
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XScrollBar > ScrollBarImpl_BASE;
 +
-+# test testclient
-+if ( -e "$buildtestclient" )
-+{
-+    print "use the latest build\n";
-+    system( "cp $buildtestclient ." );
-+}
-+elsif ( !( -e "$testclientname" ) )
++class ScVbaScrollBar : public ScrollBarImpl_BASE
 +{
-+    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 );
++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);
 +
-+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";
-+}
++    //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	(revision 0)
++++ sc/source/ui/vba/vbaframe.cxx	(revision 264308)
+@@ -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>
 +
-+# the exe needs system paths or urls ( urls are by far the least troublesome )
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+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
++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 )
 +{
-+    $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/testResult.pl
-===================================================================
-RCS file: sc/source/ui/vba/testvba/testResult.pl
-diff -N sc/source/ui/vba/testvba/testResult.pl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/testResult.pl	29 Jul 2008 07:22:42 -0000	1.1.2.1
-@@ -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
++// Attributes
++rtl::OUString SAL_CALL 
++ScVbaFrame::getCaption() throw (css::uno::RuntimeException)
 +{
-+   # 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;
++    rtl::OUString Label;
++    m_xProps->getPropertyValue( LABEL ) >>= Label;
++    return Label;
 +}
 +
-+if ( ! ( $logdir = shift @ARGV ) ) {
-+    print STDERR "No logdir specified!\n";
-+    usage();
-+    exit 1;
++void SAL_CALL 
++ScVbaFrame::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++{
++    m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
 +}
 +
-+if ( ! ( $testlogdir = shift @ARGV ) ) {
-+    print STDERR "No testdocuments dir to compare against specified!\n";
-+    usage();
-+    exit 1;
++uno::Any SAL_CALL 
++ScVbaFrame::getValue() throw (css::uno::RuntimeException)
++{
++    return uno::makeAny( getCaption() );
 +}
 +
-+if ( !(-d $logdir ) ) {
-+   print STDERR "No output directory $logdir exists, please create it!!!!\n";
-+   exit 1;
++void SAL_CALL 
++ScVbaFrame::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++    rtl::OUString sCaption;
++    _value >>= sCaption;
++    setCaption( sCaption ); 
 +}
-+if ( !(-d $testlogdir ) ) {
-+   print STDERR "the directory containing the logfiles to compare against \"$logdir\" does not exist\n";
-+    usage();
-+    exit 1;
++
++rtl::OUString& 
++ScVbaFrame::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFrame") );
++	return sImplName;
 +}
-+print "logdir $logdir\n";
-+print "testlogdir $testlogdir\n";
-+sub filter_crud($)
++
++uno::Sequence< rtl::OUString > 
++ScVbaFrame::getServiceNames()
 +{
-+    my $a = shift;
++	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/vbacheckbox.hxx
+===================================================================
+--- sc/source/ui/vba/vbacheckbox.hxx	(revision 0)
++++ sc/source/ui/vba/vbacheckbox.hxx	(revision 264308)
+@@ -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>
 +
-+    $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;
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+    return $a;
-+}
-+sub slurp_dir($);
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XRadioButton, css::script::XDefaultProperty > CheckBoxImpl_BASE;
 +
-+sub slurp_dir($)
++class ScVbaCheckbox : public CheckBoxImpl_BASE
 +{
-+    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);
++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
+Index: sc/source/ui/vba/vbavalidation.hxx
+===================================================================
+--- sc/source/ui/vba/vbavalidation.hxx	(revision 264185)
++++ sc/source/ui/vba/vbavalidation.hxx	(revision 264308)
+@@ -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);
+Index: sc/source/ui/vba/vbalineformat.cxx
+===================================================================
+--- sc/source/ui/vba/vbalineformat.cxx	(revision 264185)
++++ sc/source/ui/vba/vbalineformat.cxx	(revision 264308)
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbacharttitle.hxx
+===================================================================
+--- sc/source/ui/vba/vbacharttitle.hxx	(revision 264185)
++++ sc/source/ui/vba/vbacharttitle.hxx	(revision 264308)
+@@ -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>
+ 
+ 
+-typedef TitleImpl< cppu::WeakImplHelper1< oo::excel::XChartTitle > > ChartTitleBase;
++typedef TitleImpl< cppu::WeakImplHelper1< ov::excel::XChartTitle > > ChartTitleBase;
+ 
+ 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 );
+ 	// XHelperInterface
+ 	virtual rtl::OUString& getServiceImplName();
+ 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+Index: sc/source/ui/vba/vbacombobox.cxx
+===================================================================
+--- sc/source/ui/vba/vbacombobox.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacombobox.cxx	(revision 264308)
+@@ -31,25 +31,29 @@
+ #include <vector>
+ 
+ using namespace com::sun::star;
+-using namespace org::openoffice;
++using namespace ooo::vba;
+ 
+ 
++//SelectedItems list of integer indexes
++//StringItemList list of items
 +
-+    return @files;
++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") );
+ 
+-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;
+ }
+ 
+-ScVbaComboBox::ScVbaComboBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ComboBoxImpl_BASE( xContext, xPropSet, xControlShape )
+-{
+-	m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
+-}
++// Attributes
+ 
+ 
+-// Attributes
++// Value, [read] e.g. getValue returns the value of ooo Text propery e.g. the value in
++// the drop down
+ uno::Any SAL_CALL 
+ ScVbaComboBox::getValue() throw (uno::RuntimeException)
+ {
+@@ -57,11 +61,48 @@ ScVbaComboBox::getValue() throw (uno::RuntimeExcep
+ }
+ 
+ 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 ) );
 +}
 +
-+if (-d $testlogdir) {
-+    push @files, slurp_dir($testlogdir);
++uno::Any SAL_CALL 
++ScVbaComboBox::getListIndex() throw (uno::RuntimeException)
++{
++	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 ) );
 +}
 +
-+my $processed = 0;
-+my $passed = 0;
-+my @passedTests=();
-+my @skippedTests=();
-+my @failedTests=();
++// 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
 +
-+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"; 
-+   }
-+   } 
+ ::rtl::OUString SAL_CALL 
+ ScVbaComboBox::getText() throw (uno::RuntimeException)
+ {
+@@ -80,63 +121,55 @@ ScVbaComboBox::setText( const ::rtl::OUString& _te
+ void SAL_CALL 
+ ScVbaComboBox::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
+ {
++	mpListHelper->AddItem( pvargItem, pvargIndex );
 +}
-+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"
+ 
+-	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 );
 +}
-Index: sc/source/ui/vba/testvba/testResults.pl
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/testvba/testResults.pl,v
-retrieving revision 1.2
-retrieving revision 1.2.42.1
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.42.1
---- sc/source/ui/vba/testvba/testResults.pl	7 Dec 2007 11:15:50 -0000	1.2
-+++ sc/source/ui/vba/testvba/testResults.pl	29 Jul 2008 07:22:42 -0000	1.2.42.1
-@@ -1,5 +1,5 @@
- #!/usr/bin/perl -w
--
-+use File::Temp qw/ tempfile tempdir /;
- use File::Basename;
- use File::stat;
- use File::Copy;
-@@ -3,8 +3,9 @@
- 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)  ) {
-Index: sc/source/ui/vba/testvba/testvba.cxx
-===================================================================
-RCS file: sc/source/ui/vba/testvba/testvba.cxx
-diff -N sc/source/ui/vba/testvba/testvba.cxx
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/testvba.cxx	29 Jul 2008 07:22:42 -0000	1.1.2.1
-@@ -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
+-		sal_Int32 nIndex = sList.getLength();
++void SAL_CALL 
++ScVbaComboBox::Clear(  ) throw (uno::RuntimeException)
 +		{
-+                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 >() );
++	mpListHelper->Clear();
 +		}
-+		return aURL;
+ 
+-		if ( pvargIndex.hasValue() )
+-			pvargIndex >>= nIndex;
++void SAL_CALL
++ScVbaComboBox::setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException)
++{
++	ScVbaControl::setRowSource( _rowsource );
++	mpListHelper->setRowSource( _rowsource );
++		}
+ 
+-		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() )
++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
++		
++uno::Any SAL_CALL 
++ScVbaComboBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
+ 		{
+-			// 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;	
+-			//
++	return mpListHelper->List( pvargIndex, pvarColumn );
+ 		}
+ 
+-		m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
+-		
++rtl::OUString& 
++ScVbaComboBox::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox") );
++	return sImplName;
+ 	}
+-}
+ 
+-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;
 +}
+Index: sc/source/ui/vba/vbacommandbar.hxx
+===================================================================
+--- sc/source/ui/vba/vbacommandbar.hxx	(revision 0)
++++ sc/source/ui/vba/vbacommandbar.hxx	(revision 264308)
+@@ -0,0 +1,105 @@
++/*************************************************************************
++ *
++ *  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_COMMANDBAR_HXX
++#define SC_VBA_COMMANDBAR_HXX
 +
-+OUString ascii(const sal_Char* cstr)
-+{
-+	return OUString::createFromAscii(cstr);
-+}
++#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>
 +
-+const sal_Char* getStr(const OUString& ou)
-+{
-+    return OUStringToOString(ou, RTL_TEXTENCODING_UTF8).getStr();
-+}
++#include "vbahelperinterface.hxx"
++#include "vbacommandbars.hxx"
 +
++#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]) ) );
 +
-+int usage( const char* pName )
-+{
-+	std::cerr << "usage: " << pName << "<path to testdocument dir> <output_directory>" << std::endl;
-+        return 1;
 +
-+}
++typedef InheritedHelperInterfaceImpl1< ov::XCommandBar > CommandBar_BASE;
 +
-+class TestVBA
++class ScVbaCommandBar : public CommandBar_BASE
 +{
 +private:
-+	Reference< XComponentContext >  mxContext;
-+	Reference< XMultiComponentFactory > mxMCF;
-+	Reference< XComponentLoader > mxCompLoader;
-+	Reference< XSimpleFileAccess > mxSFA;
-+	rtl::OUString msOutDirPath;
++    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:
-+	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 );
-+	} 
++    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; };
 +
-+	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;
-+    }
++    // 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);
 +
-+	void init() 
-+	{
-+		// blow away previous logs?
-+	}
++    // 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 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;
++	// 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	(revision 264185)
++++ sc/source/ui/vba/vbapivottable.cxx	(revision 264308)
+@@ -32,9 +32,9 @@
+ 
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+-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 )
+ {
+ }
+ 
+@@ -43,7 +43,7 @@ ScVbaPivotTable::PivotCache() throw (uno::RuntimeE
+ {
+ 	// #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()
+ 	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/vbachartobjects.cxx
+===================================================================
+--- sc/source/ui/vba/vbachartobjects.cxx	(revision 264185)
++++ sc/source/ui/vba/vbachartobjects.cxx	(revision 264308)
+@@ -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>
+ 
+ 
+ #include "vbachartobjects.hxx"
+@@ -44,17 +44,17 @@
+ #include <basic/sberrors.hxx>
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+ 
+ class ChartObjectEnumerationImpl : public EnumerationHelperImpl
+ {
+ 	uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier;
+-	uno::Reference< vba::XHelperInterface > xParent;
++	uno::Reference< XHelperInterface > xParent;
+ 	
+ public:
+ 
+-	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 @@ class ChartObjectEnumerationImpl : public Enumerat
+ };
+ 
+ 
+-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 )
+ {
+ 
+ }
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbaworksheet.cxx
+===================================================================
+--- sc/source/ui/vba/vbaworksheet.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaworksheet.cxx	(revision 264308)
+@@ -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 ) th
+ 			(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ), aValue);
+ }
+ 
++sal_Int16
++ScVbaWorksheet::getIndex() throw (uno::RuntimeException)
++{
++	return getSheetID() + 1;
++}
++
+ uno::Reference< excel::XRange > 
+ ScVbaWorksheet::getUsedRange() throw (uno::RuntimeException)
+ {
+@@ -266,6 +276,22 @@ ScVbaWorksheet::Outline( ) throw (uno::RuntimeExce
+ 	return new ScVbaOutline( this, mxContext, xOutline);
+ }
+ 
++uno::Reference< excel::XPageSetup >
++ScVbaWorksheet::PageSetup( ) throw (uno::RuntimeException)
++{
++	return new ScVbaPageSetup( this, mxContext, getSheet(), getModel() );
++}
 +
-+                    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" );
++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 );
++}
 +
-+					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;
-+					}
+ sal_Int32 
+ ScVbaWorksheet::getStandardWidth() throw (uno::RuntimeException)
+ {
+@@ -416,6 +442,7 @@ ScVbaWorksheet::Delete() throw (uno::RuntimeExcept
+ 		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& Inde
+ 	}
+ 	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
+ 	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 )
+ 	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& /
+ 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,83 +694,68 @@ ScVbaWorksheet::hasMethod( const ::rtl::OUString&
+ {
+ 	return sal_False;
+ }
+-::sal_Bool SAL_CALL 
+-ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
 +
-+					// interface is supported, otherwise use XComponent.dispose
-+					Reference< util::XCloseable > xCloseable ( xDoc, uno::UNO_QUERY );
++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 );
 +		
-+					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() );
-+	}
+ 	}
+ 	catch( uno::Exception& )
+ 	{
+ 	}
+-	return sal_False;
++	return xFormControls;
 +
-+	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 ] );
-+		}
-+	}	
-+};
+ }
+-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
 +
-+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 )
++    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 @@ 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,7 +849,30 @@ ScVbaWorksheet::getSheetID() throw (uno::RuntimeEx
+ 	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)
 +{
-+	if ( !( argv > 2 ) )
-+		return usage( argc[0] );
-+	try
-+	{
++	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;
 +
-+		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" );
++    uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );  
++	PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, xModel, bSelection );
++}
 +
-+	}
-+	catch( uno::Exception& e )
-+	{
-+		std::cerr << "Caught Exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
-+	}
 +
-+}
-Index: sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
-Binary files /dev/null and /tmp/cvsf5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
-Binary files /dev/null and /tmp/cvsg5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/PageBreaks.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/PageBreaks.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/PageBreaks.xls
-Binary files /dev/null and /tmp/cvsh5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
-Binary files /dev/null and /tmp/cvsi5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/Ranges-2.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/Ranges-2.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/Ranges-2.xls
-Binary files /dev/null and /tmp/cvsj5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/Ranges-3.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/Ranges-3.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/Ranges-3.xls
-Binary files /dev/null and /tmp/cvsk5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
+ namespace worksheet
+ {
+ namespace sdecl = comphelper::service_decl;
+@@ -864,5 +880,5 @@ sdecl::vba_service_class_<ScVbaWorksheet, sdecl::w
+ 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	(revision 264185)
++++ sc/source/ui/vba/testvba/TestVBA.java	(revision 264308)
+@@ -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/TestDocuments/datevalue.xls
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
-Binary files /dev/null and /tmp/cvsl5aWwf differ
-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/datevalue.xls
+___________________________________________________________________
+Added: svn:executable
+   + *
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/replace.xls
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
-Binary files /dev/null and /tmp/cvsm5aWwf differ
+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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
-Binary files /dev/null and /tmp/cvsn5aWwf differ
+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:executable
+   + *
+Added: svn:mime-type
+   + application/octet-stream
+
 Index: sc/source/ui/vba/testvba/TestDocuments/Template.xls
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/Template.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/Template.xls
-Binary files /dev/null and /tmp/cvso5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
-Binary files /dev/null and /tmp/cvsp5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest.xls
-Binary files /dev/null and /tmp/cvsq5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
-Binary files /dev/null and /tmp/cvsr5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/Window.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/Window.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/Window.xls
-Binary files /dev/null and /tmp/cvss5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/bytearraystring.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/bytearraystring.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/bytearraystring.xls
-Binary files /dev/null and /tmp/cvst5aWwf differ
+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:executable
+   + *
+Added: svn:mime-type
+   + application/octet-stream
+
 Index: sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
-Binary files /dev/null and /tmp/cvsu5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/datevalue.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/datevalue.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/datevalue.xls
-Binary files /dev/null and /tmp/cvsv5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/format.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/format.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/format.xls
-Binary files /dev/null and /tmp/cvsw5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/partition.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/partition.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/partition.xls
-Binary files /dev/null and /tmp/cvsx5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/range-4.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/range-4.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/range-4.xls
-Binary files /dev/null and /tmp/cvsy5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/replace.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/replace.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/replace.xls
-Binary files /dev/null and /tmp/cvsz5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/stringplusdouble.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/stringplusdouble.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/stringplusdouble.xls
-Binary files /dev/null and /tmp/cvsA5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/window2.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/window2.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/window2.xls
-Binary files /dev/null and /tmp/cvsB5aWwf differ
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log	29 Jul 2008 07:22:50 -0000	1.1.2.2
-@@ -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
-+============
-+
-+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/MiscRangeTests.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log	29 Jul 2008 07:22:51 -0000	1.1.2.2
-@@ -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/Ranges-2.log
+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:executable
+   + *
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log	29 Jul 2008 07:22:51 -0000	1.1.2.2
-@@ -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
+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:executable
+   + *
+Added: svn:mime-type
+   + application/octet-stream
+
+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:executable
+   + *
+Added: svn:mime-type
+   + application/octet-stream
+
+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:executable
+   + *
+Added: svn:mime-type
+   + application/octet-stream
+
+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:executable
+   + *
+Added: svn:mime-type
+   + application/octet-stream
+
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log	29 Jul 2008 07:22:51 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log	(revision 264308)
 @@ -0,0 +1,8 @@
 +Test run started : 19/06/2007 11:21:42
 +----------------------------------------------------------------
@@ -12269,10 +20435,8 @@
 +Test run finished : 19/06/2007 11:21:42
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log	29 Jul 2008 07:22:51 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log	(revision 264308)
 @@ -0,0 +1,280 @@
 +Test run started : 01/06/2007 11:28:58
 +----------------------------------------------------------------
@@ -12554,12 +20718,79 @@
 +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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log	29 Jul 2008 07:22:52 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestAddress.log	(revision 264308)
 @@ -0,0 +1,62 @@
 +Test run started : 17/07/2007 15:25:17
 +----------------------------------------------------------------
@@ -12623,12 +20854,158 @@
 +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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log	(revision 264308)
+@@ -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
++============
++
++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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-2.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log	29 Jul 2008 07:22:52 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log	(revision 264308)
 @@ -0,0 +1,60 @@
 +Test run started : 30/05/2007 11:33:13
 +BEGIN TestCalc
@@ -12690,83 +21067,308 @@
 + TEST succesfully completed : RangeTest2
 +END   TestCalc
 +Test run finished : 30/05/2007 11:33:14
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.log	29 Jul 2008 07:22:52 -0000	1.1.2.2
-@@ -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
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log	(revision 264308)
+@@ -0,0 +1,14 @@
++Test run started : 11/20/2007 05:15:30 PM
++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 FAIL : start = 1, count = 0, not support in Unix: aefefdBc
++ TEST OK : Test Replace function
++END  Replace
++Test run finished : 11/20/2007 05:15:30 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log	(revision 264308)
+@@ -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
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log
+===================================================================
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log	28 Jan 2008 17:30:46 -0000	1.1.2.1
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log	(revision 264308)
 @@ -0,0 +1,20 @@
 +Test run started : 18/07/2007 10:56:38
 +----------------------------------------------------------------
@@ -12788,81 +21390,10 @@
 +END 'TestAddress
 + TEST OK : TestAddress
 +Test run finished : 18/07/2007 10:56:44
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log	28 Jan 2008 17:30:46 -0000	1.1.2.1
-@@ -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
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/PageBreaks.log	29 Jul 2008 07:22:53 -0000	1.1.2.1
-@@ -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/Ranges-2.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log	28 Jan 2008 17:30:46 -0000	1.1.2.1
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log	(revision 264308)
 @@ -0,0 +1,68 @@
 +Test run started : 19/06/2007 11:14:01
 +----------------------------------------------------------------
@@ -12932,12 +21463,75 @@
 +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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log	28 Jan 2008 17:30:46 -0000	1.1.2.1
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log	(revision 264308)
 @@ -0,0 +1,8 @@
 +Test run started : 19/06/2007 11:26:09
 +----------------------------------------------------------------
@@ -12949,10 +21543,8 @@
 +Test run finished : 19/06/2007 11:26:10
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log	29 Jul 2008 07:22:53 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log	(revision 264308)
 @@ -0,0 +1,280 @@
 +Test run started : 10/03/2008 15:15:11
 +----------------------------------------------------------------
@@ -13236,10 +21828,8 @@
 +Test run finished : 10/03/2008 15:15:13
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log	28 Jan 2008 17:30:46 -0000	1.1.2.1
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log	(revision 264308)
 @@ -0,0 +1,77 @@
 +Test run started : 10/16/2007 05:25:21 PM
 +BEGIN Shapes_Collection_Behaviour
@@ -13318,49 +21908,10 @@
 +  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/StrConv-test.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/StrConv-test.log	29 Jul 2008 07:22:53 -0000	1.1.2.1
-@@ -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
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Template.log	29 Jul 2008 07:22:53 -0000	1.1.2.1
-@@ -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
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log	28 Jan 2008 17:30:46 -0000	1.1.2.1
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log	(revision 264308)
 @@ -0,0 +1,62 @@
 +Test run started : 17/07/2007 20:56:04
 +----------------------------------------------------------------
@@ -13412,262 +21963,22 @@
 +  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
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log	28 Jan 2008 17:30:46 -0000	1.1.2.1
-@@ -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/TestCalc_Rangetest2.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest2.log	29 Jul 2008 07:22:54 -0000	1.1.2.2
-@@ -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/Window.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Window.log	29 Jul 2008 07:22:54 -0000	1.1.2.1
-@@ -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/bytearraystring.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log	29 Jul 2008 07:22:55 -0000	1.1.2.1
-@@ -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/dateserial.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/dateserial.log	29 Jul 2008 07:22:55 -0000	1.1.2.1
-@@ -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/datevalue.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/datevalue.log	29 Jul 2008 07:22:55 -0000	1.1.2.1
-@@ -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
++  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
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log	29 Jul 2008 07:22:56 -0000	1.1.2.1
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log	(revision 264308)
 @@ -0,0 +1,82 @@
 +Test run started : 01/29/2008 02:38:27 PM
 +BEGIN Format
@@ -13751,227 +22062,23 @@
 + TEST OK : Test Custom_Text_Format_Sample function
 +END  Format
 +Test run finished : 01/29/2008 02:38:27 PM
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log	29 Jul 2008 07:22:56 -0000	1.1.2.1
-@@ -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/partition.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/partition.log	29 Jul 2008 07:22:57 -0000	1.1.2.1
-@@ -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/range-4.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log	29 Jul 2008 07:22:57 -0000	1.1.2.1
-@@ -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/unix/replace.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log	29 Jul 2008 07:22:58 -0000	1.1.2.1
-@@ -0,0 +1,14 @@
-+Test run started : 11/20/2007 05:15:30 PM
-+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 FAIL : start = 1, count = 0, not support in Unix: aefefdBc
-+ TEST OK : Test Replace function
-+END  Replace
-+Test run finished : 11/20/2007 05:15:30 PM
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/stringplusdouble.log	29 Jul 2008 07:22:58 -0000	1.1.2.1
-@@ -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
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/bytearraystring.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log	29 Jul 2008 07:22:58 -0000	1.1.2.1
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log	(revision 264308)
 @@ -0,0 +1,45 @@
 +Test run started : 05/29/2008 02:55:48 PM
 +BEGIN Window2
@@ -14002,182 +22109,179 @@
 +  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/win/AutoFilter.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log	29 Jul 2008 07:22:58 -0000	1.1.2.2
-@@ -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/MiscRangeTests.log
++  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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log	29 Jul 2008 07:22:58 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/MiscRangeTests.log	(revision 264308)
 @@ -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/Ranges-2.log
++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
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log	29 Jul 2008 07:22:59 -0000	1.1.2.2
-@@ -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
+--- sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/pagesetup.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/range-4.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log	29 Jul 2008 07:22:59 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-3.log	(revision 264308)
 @@ -0,0 +1,8 @@
 +Test run started : 10/07/2007 01:55:51
 +----------------------------------------------------------------
@@ -14189,10 +22293,8 @@
 +Test run finished : 10/07/2007 01:55:51
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log	29 Jul 2008 07:22:59 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log	(revision 264308)
 @@ -0,0 +1,280 @@
 +Test run started : 10/07/2007 01:55:56
 +----------------------------------------------------------------
@@ -14474,12 +22576,80 @@
 +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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log	29 Jul 2008 07:22:59 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log	(revision 264308)
 @@ -0,0 +1,77 @@
 +Test run started : 16/10/2007 17:46:03
 +BEGIN Shapes_Collection_Behaviour
@@ -14560,79 +22730,334 @@
 +Test run finished : 16/10/2007 17:46:04
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log	29 Jul 2008 07:22:59 -0000	1.1.2.2
-@@ -0,0 +1,62 @@
-+Test run started : 17/07/2007 15:26:54
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/MiscRangeTests.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log	(revision 264308)
+@@ -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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log	(revision 264308)
+@@ -0,0 +1,20 @@
++Test run started : 16/10/2007 17:42:01
 +----------------------------------------------------------------
 +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')
++  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: 49
++Tests passed: 7
 +Tests failed: 0
 +
 +END 'TestAddress
 + TEST OK : TestAddress
-+Test run finished : 17/07/2007 15:26:56
++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	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.log	(revision 264308)
+@@ -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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log	29 Jul 2008 07:22:59 -0000	1.1.2.2
+--- sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log	(revision 0)
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log	(revision 264308)
 @@ -0,0 +1,60 @@
 +Test run started : 10/07/2007 01:56:07
 +BEGIN TestCalc
@@ -14690,1073 +23115,1513 @@
 +  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/logs/win/TestCalc_Rangetest2.log
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log	29 Jul 2008 07:22:59 -0000	1.1.2.2
-@@ -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
++  ITEM FAIL (RangeTest2)
++ TEST Not succesfully completed : RangeTest2
 +END   TestCalc
-+Test run finished : 10/07/2007 01:56:23
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log
++Test run finished : 10/07/2007 01:56:12
+Index: sc/source/ui/vba/testvba/TestDocuments/TestCalc_Rangetest2.xls
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log	29 Jul 2008 07:23:00 -0000	1.1.2.1
-@@ -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/replace.log
+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
 ===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/replace.log	29 Jul 2008 07:23:00 -0000	1.1.2.1
-@@ -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: oovbaapi/org/openoffice/excel/Hyperlink.idl
+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
 ===================================================================
-RCS file: oovbaapi/org/openoffice/excel/Hyperlink.idl
-diff -N oovbaapi/org/openoffice/excel/Hyperlink.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/excel/Hyperlink.idl	29 Jul 2008 06:27:52 -0000	1.1.2.1
-@@ -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
-+ *
-+ ************************************************************************/
+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	(revision 0)
++++ sc/source/ui/vba/testvba/runTests.pl	(revision 264308)
+@@ -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";
 +
-+#ifndef __org_openoffice_excel_Hyperlink_idl__
-+#define __org_openoffice_excel_Hyperlink_idl__
++foreach $argnum (0 .. $#ARGV) {
++   print "$ARGV[$argnum]\n";
++}
 +
-+#ifndef __org_openoffice_excel_XHyperlink_idl__
-+#include <org/openoffice/excel/XHyperlink.idl>
-+#endif
 +
-+#include <com/sun/star/uno/XComponentContext.idl>
-+#include <com/sun/star/frame/XModel.idl>
++my $binDir = abs_path( dirname($0) );
 +
-+module org { module openoffice { module excel {
-+service Hyperlink : XHyperlink
++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.0/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" )
 +{
-+  	createHyperlink(  [in] ::org::openoffice::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
-+};
++    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;
 +
-+#endif
-Index: oovbaapi/org/openoffice/excel/Window.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/excel/Window.idl
-diff -N oovbaapi/org/openoffice/excel/Window.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/excel/Window.idl	29 Jul 2008 06:27:52 -0000	1.1.2.1
-@@ -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
-+ *
-+ ************************************************************************/
++$failed = ( $exit_value || $signal_num || $dumped_core );
++
++print "$failed = ( $exit_value || $signal_num || $dumped_core )\n";
 +
-+#ifndef __org_openoffice_excel_Window_idl__
-+#define __org_openoffice_excel_Window_idl__
++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";
++}
 +
-+#ifndef __org_openoffice_excel_XWindow_idl__
-+#include <org/openoffice/excel/XWindow.idl>
-+#endif
++# the exe needs system paths or urls ( urls are by far the least troublesome )
 +
-+#include <com/sun/star/uno/XComponentContext.idl>
-+#include <com/sun/star/frame/XModel.idl>
++my $runCmd = "";
++my $analyseCmd = "";
 +
-+module org { module openoffice { module excel {
-+service Window : XWindow
++if ( "$DocName" eq "" )
 +{
-+  	createWindow(  [in] ::org::openoffice::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
-+};
-+
-+}; }; };
++    $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";
 +
-+#endif
-Index: oovbaapi/org/openoffice/excel/XApplication.idl
++system ("rm -rf $testLogDir/*");
++my $status = system( $runCmd );
++print "analyseCmd = $analyseCmd\n";
++$status = system( $analyseCmd );
+Index: sc/source/ui/vba/testvba/makefile.mk
 ===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XApplication.idl,v
-retrieving revision 1.4
-retrieving revision 1.3.4.3
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.3
---- oovbaapi/org/openoffice/excel/XApplication.idl	11 Apr 2008 09:46:23 -0000	1.4
-+++ oovbaapi/org/openoffice/excel/XApplication.idl	29 Jul 2008 06:27:52 -0000	1.3.4.3
-@@ -38,6 +38,14 @@
- #include <org/openoffice/vba/XHelperInterface.idl>
- #endif
+--- sc/source/ui/vba/testvba/makefile.mk	(revision 264185)
++++ sc/source/ui/vba/testvba/makefile.mk	(revision 264308)
+@@ -30,28 +30,44 @@
+ #*************************************************************************
  
-+#ifndef __org_openoffice_vba_XAssistant_idl__
-+#include <org/openoffice/vba/XAssistant.idl>
-+#endif
-+
-+#ifndef __org_openoffice_vba_XCommandBars_idl__
-+#include <org/openoffice/vba/XCommandBars.idl>
-+#endif
-+
- module org {  module openoffice {  module excel { 
- 
- interface XRange;
-@@ -58,6 +66,7 @@ interface XApplication
- 	[attribute, readonly] XRange ActiveCell;
- 	[attribute, readonly] XWindow ActiveWindow;
- 	[attribute, readonly] XWorksheet ActiveSheet;
-+    [attribute, readonly] org::openoffice::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
-@@ -81,6 +90,7 @@ interface XApplication
- 	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 );
-@@ -88,7 +98,7 @@ interface XApplication
- 	any Evaluate( [in] string Name );
- 	any Dialogs( [in] any DialogIndex );
- 	any Range( [in] any Cell1, [in] any Cell2 );
--	any Names();
-+	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 );
-@@ -96,6 +106,8 @@ interface XApplication
- 	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();
- };
-Index: oovbaapi/org/openoffice/excel/XHPageBreak.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/excel/XHPageBreak.idl
-diff -N oovbaapi/org/openoffice/excel/XHPageBreak.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/excel/XHPageBreak.idl	29 Jul 2008 06:27:52 -0000	1.1.2.1
-@@ -0,0 +1,55 @@
-+/*************************************************************************
-+ *
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ * 
-+ * Copyright 2008 by Sun Microsystems, Inc.
-+ *
-+ * OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ * $RCSfile$
-+ * $Revision$
-+ *
-+ * This file is part of OpenOffice.org.
-+ *
-+ * OpenOffice.org is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Lesser General Public License version 3
-+ * only, as published by the Free Software Foundation.
-+ *
-+ * OpenOffice.org is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU Lesser General Public License version 3 for more details
-+ * (a copy is included in the LICENSE file that accompanied this code).
-+ *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
-+ *
-+ ************************************************************************/
-+#ifndef __org_openoffice_excel_XHPageBreak_idl__
-+#define __org_openoffice_excel_XHPageBreak_idl__
-+
-+#ifndef __org_openoffice_excel_XPageBreak_idl__
-+#include <org/openoffice/excel/XPageBreak.idl>
-+#endif
-+
-+
-+//=============================================================================
-+
-+module org {  module openoffice {  module excel { 
+ PRJ=..$/..$/..$/..$/
 +
-+//=============================================================================
+ PRJNAME=sc
+ TARGET=testvba
++ENABLE_EXCEPTIONS=TRUE
+ 
+-.INCLUDE : ant.mk
++# --- Settings -----------------------------------------------------
+ 
+-.IF "$(SOLAR_JAVA)"!=""
++.INCLUDE :  settings.mk
++DLLPRE =
+ 
+-ALLTAR : PROCESSRESULTS
+-
+-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 \
++ 
 +
-+interface XHPageBreak
-+{
-+	interface ::org::openoffice::excel::XPageBreak;
-+};
++# --- Targets ------------------------------------------------------
 +
-+//=============================================================================
++APP1TARGET=testclient
++APP1OBJS= $(SLOFILES)
 +
-+}; }; };
++APP1STDLIBS=\
++        $(SALLIB) \
++        $(STDLIBCPP) \
++        $(CPPULIB) \
++        $(CPPUHELPERLIB) \
++        $(COMPHELPERLIB) \
++	    $(TOOLSLIB) \
++        $(UNOTOOLSLIB) \
 +
-+#endif
++#APP1OBJS= $(OBJ)$/testclient.obj
++.INCLUDE :	target.mk
 +
 +
-Index: oovbaapi/org/openoffice/excel/XHPageBreaks.idl
+Index: sc/source/ui/vba/testvba/testResult.pl
 ===================================================================
-RCS file: oovbaapi/org/openoffice/excel/XHPageBreaks.idl
-diff -N oovbaapi/org/openoffice/excel/XHPageBreaks.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/excel/XHPageBreaks.idl	29 Jul 2008 06:27:52 -0000	1.1.2.1
-@@ -0,0 +1,70 @@
-+/*************************************************************************
-+ *
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ * 
-+ * Copyright 2008 by Sun Microsystems, Inc.
-+ *
-+ * OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ * $RCSfile$
-+ * $Revision$
-+ *
-+ * This file is part of OpenOffice.org.
-+ *
-+ * OpenOffice.org is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Lesser General Public License version 3
-+ * only, as published by the Free Software Foundation.
-+ *
-+ * OpenOffice.org is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU Lesser General Public License version 3 for more details
-+ * (a copy is included in the LICENSE file that accompanied this code).
-+ *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
-+ *
-+ ************************************************************************/
-+#ifndef __org_openoffice_excel_XHPageBreaks_idl__
-+#define __org_openoffice_excel_XHPageBreaks_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
+--- sc/source/ui/vba/testvba/testResult.pl	(revision 0)
++++ sc/source/ui/vba/testvba/testResult.pl	(revision 264308)
+@@ -0,0 +1,171 @@
++#!/usr/bin/perl -w
++use File::Temp qw/ tempfile tempdir /;
++use File::Basename;
++use File::stat;
++use File::Copy;
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
++my $binDir = dirname($0);
++my $timestampclean= "perl $binDir/timestampsClean.pl";
++#sub gen_diff($)
 +
-+#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
-+#ifndef  __org_openoffice_vba_XCollection_idl__
-+#include <org/openoffice/vba/XCollection.idl>
-+#endif
++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;
++}
 +
-+module org {  module openoffice {  module excel { 
++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;
 +
-+interface XHPageBreak;
++    $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;
 +
-+interface XHPageBreaks
-+{
++    return $a;
++}
++sub slurp_dir($);
 +
-+	interface org::openoffice::vba::XCollection;
-+	//Methods	
-+    any Add([in] any Before) raises(com::sun::star::script::BasicErrorException);
-+};
++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;
++}
 +
-+#endif
++if (-d $testlogdir) {
++    push @files, slurp_dir($testlogdir);
++}
 +
++my $processed = 0;
++my $passed = 0;
++my @passedTests=();
++my @skippedTests=();
++my @failedTests=();
 +
-Index: oovbaapi/org/openoffice/excel/XHyperlink.idl
++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
 ===================================================================
-RCS file: oovbaapi/org/openoffice/excel/XHyperlink.idl
-diff -N oovbaapi/org/openoffice/excel/XHyperlink.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/excel/XHyperlink.idl	29 Jul 2008 06:27:52 -0000	1.1.2.1
-@@ -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 __org_openoffice_excel_XHyperlink_idl__
-+#define __org_openoffice_excel_XHyperlink_idl__
-+                                                                                                                             
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
+--- sc/source/ui/vba/testvba/testvba.cxx	(revision 0)
++++ sc/source/ui/vba/testvba/testvba.cxx	(revision 264308)
+@@ -0,0 +1,309 @@
++#include "cppuhelper/bootstrap.hxx"
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
++#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>
 +
-+//=============================================================================
-+                                                                                                                             
-+module org {  module openoffice {  module excel {
-+                                                                                                                             
-+//=============================================================================
-+interface XRange;
-+interface XHyperlink
-+{
-+	interface ::org::openoffice::vba::XHelperInterface;
-+	
-+	[attribute] string Address;
-+	[attribute] string Name;
-+	[attribute] string TextToDisplay;
++#include <tools/urlobj.hxx>
++#include <osl/file.hxx>
 +
-+	XRange Range();
-+};
-+                                                                                                                             
-+}; }; };
-+                                                                                                                             
-+#endif
-Index: oovbaapi/org/openoffice/excel/XInterior.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XInterior.idl,v
-retrieving revision 1.4
-retrieving revision 1.4.6.1
-diff -u -p -u -p -b -w -B -r1.4 -r1.4.6.1
---- oovbaapi/org/openoffice/excel/XInterior.idl	11 Apr 2008 09:52:54 -0000	1.4
-+++ oovbaapi/org/openoffice/excel/XInterior.idl	29 Jul 2008 06:27:52 -0000	1.4.6.1
-@@ -51,6 +51,9 @@ interface XInterior
- 
- 	[attribute]  any  Color;
- 	[attribute]  any  ColorIndex;
-+	[attribute]  any  Pattern;
-+	[attribute]  any  PatternColor;
-+	[attribute]  any  PatternColorIndex;
- };
- 
- //=============================================================================
-Index: oovbaapi/org/openoffice/excel/XPageBreak.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/excel/XPageBreak.idl
-diff -N oovbaapi/org/openoffice/excel/XPageBreak.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/excel/XPageBreak.idl	29 Jul 2008 06:27:52 -0000	1.1.2.1
-@@ -0,0 +1,73 @@
-+/*************************************************************************
-+ *
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ * 
-+ * Copyright 2008 by Sun Microsystems, Inc.
-+ *
-+ * OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ * $RCSfile$
-+ * $Revision$
-+ *
-+ * This file is part of OpenOffice.org.
-+ *
-+ * OpenOffice.org is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Lesser General Public License version 3
-+ * only, as published by the Free Software Foundation.
-+ *
-+ * OpenOffice.org is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU Lesser General Public License version 3 for more details
-+ * (a copy is included in the LICENSE file that accompanied this code).
-+ *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
-+ *
-+ ************************************************************************/
-+#ifndef __org_openoffice_excel_XPageBreak_idl__
-+#define __org_openoffice_excel_XPageBreak_idl__
++#include <memory>
++#include <iostream>
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++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;
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
++using ::std::auto_ptr;
 +
-+#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
-+#include <com/sun/star/script/BasicErrorException.idl>
-+#endif
++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;
++}
 +
-+module org {  module openoffice {  module excel { 
++OUString ascii(const sal_Char* cstr)
++{
++	return OUString::createFromAscii(cstr);
++}
 +
-+//=============================================================================
++const sal_Char* getStr(const OUString& ou)
++{
++    return OUStringToOString(ou, RTL_TEXTENCODING_UTF8).getStr();
++}
 +
-+interface XRange;
 +
-+interface XPageBreak
++int usage( const char* pName )
 +{
++	std::cerr << "usage: " << pName << "<path to testdocument dir> <output_directory>" << std::endl;
++        return 1;
 +
-+	interface ::org::openoffice::vba::XHelperInterface;
-+
-+    // Attributes
-+    [attribute] long Type;
-+    
-+	//Methods	
-+	void Delete() raises(com::sun::star::script::BasicErrorException);
-+    XRange Location()raises(com::sun::star::script::BasicErrorException);
++}
 +
-+};
++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?
++	}
 +
-+#endif
++	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" );
 +
-Index: oovbaapi/org/openoffice/excel/XPageSetup.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/excel/XPageSetup.idl
-diff -N oovbaapi/org/openoffice/excel/XPageSetup.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/excel/XPageSetup.idl	29 Jul 2008 06:27:52 -0000	1.1.2.1
-@@ -0,0 +1,85 @@
-+/*************************************************************************
-+ *
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ * 
-+ * Copyright 2008 by Sun Microsystems, Inc.
-+ *
-+ * OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ * $RCSfile$
-+ * $Revision$
-+ *
-+ * This file is part of OpenOffice.org.
-+ *
-+ * OpenOffice.org is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Lesser General Public License version 3
-+ * only, as published by the Free Software Foundation.
-+ *
-+ * OpenOffice.org is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU Lesser General Public License version 3 for more details
-+ * (a copy is included in the LICENSE file that accompanied this code).
-+ *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
-+ *
-+ ************************************************************************/
-+#ifndef __org_openoffice_excel_XPageSetup_idl__
-+#define __org_openoffice_excel_XPageSetup_idl__
++					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;
++					}
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++					// 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() );
++	}
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
++	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
++	{
 +
-+module org {  module openoffice {  module excel { 
++		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;
++	}
 +
++}
+Index: sc/source/ui/vba/testvba/testResults.pl
+===================================================================
+--- sc/source/ui/vba/testvba/testResults.pl	(revision 264185)
++++ sc/source/ui/vba/testvba/testResults.pl	(revision 264308)
+@@ -1,10 +1,11 @@
+ #!/usr/bin/perl -w
+-
++use File::Temp qw/ tempfile tempdir /;
+ use File::Basename;
+ use File::stat;
+ use File::Copy;
 +
-+interface XPageSetup
+ 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)  ) {
+Index: sc/source/ui/vba/testvba/README
+===================================================================
+--- sc/source/ui/vba/testvba/README	(revision 264185)
++++ sc/source/ui/vba/testvba/README	(revision 264308)
+@@ -1,35 +1,37 @@
+-running dmake in this directory runs a set of regression (unit) tests.
++to run the tests 
+ 
+-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 )
+ 
+-    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 )
+ 
+-    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'
+ 
++unix
++====
+ 
+-[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.
+ 
+-[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 )
++========>
+ 
+-[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.
+Index: sc/source/ui/vba/vbahelper.cxx
+===================================================================
+--- sc/source/ui/vba/vbahelper.cxx	(revision 264185)
++++ sc/source/ui/vba/vbahelper.cxx	(revision 264308)
+@@ -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,10 @@
+ #include "tabvwsh.hxx"
+ #include "transobj.hxx"
+ #include "scmod.hxx"
+-
++#include "vbashape.hxx"
++#include "unonames.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 +69,25 @@ void unoToSbxValue( SbxVariable* pVar, const uno::
+ 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)
 +{
++	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 );
++}
 +
-+	interface ::org::openoffice::vba::XHelperInterface;
-+
-+	//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;
-+
-+};
-+
-+//=============================================================================
+ uno::Reference< script::XTypeConverter >
+ getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
+ {
+@@ -215,11 +229,27 @@ dispatchRequests (uno::Reference< frame::XModel>&
+ }
+ 
+ 
++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 +545,11 @@ void PrintOutHelper( const uno::Any& From, const u
+ 	//   of this method
+ }
+ 
++ void PrintPreviewHelper( const css::uno::Any& /*EnableChanges*/, css::uno::Reference< css::frame::XModel >& xModel )
++{
++	dispatchExecute( xModel, SID_VIEWSHELL1 );
++}
 +
-+}; }; };
+ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
+ {
+ 	uno::Type aType = pvargItem.getValueType();
+@@ -728,5 +763,56 @@ double PixelsToPoints( css::uno::Reference< css::a
+ 	return (fPixels/fConvertFactor)/POINTTO100THMILLIMETERFACTOR;
+ }
+ 
++ConcreteXShapeGeometryAttributes::ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape )
++{
++	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 )
++{
++    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 ) ) );
++    }
+ } // openoffice
+ } //org
+Index: sc/source/ui/vba/vbacontrol.cxx
+===================================================================
+--- sc/source/ui/vba/vbacontrol.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacontrol.cxx	(revision 264308)
+@@ -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 );
 +
++    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 );
 +
-Index: oovbaapi/org/openoffice/excel/XRange.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XRange.idl,v
-retrieving revision 1.4
-retrieving revision 1.4.6.1
-diff -u -p -u -p -b -w -B -r1.4 -r1.4.6.1
---- oovbaapi/org/openoffice/excel/XRange.idl	11 Apr 2008 09:55:48 -0000	1.4
-+++ oovbaapi/org/openoffice/excel/XRange.idl	29 Jul 2008 06:27:52 -0000	1.4.6.1
-@@ -103,6 +103,7 @@ interface XRange
- 	[attribute, readonly] XValidation Validation;
- 	[attribute] any Style;
- 	[attribute] any AddIndent;
-+	[attribute] any ShowDetail;
++    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;
+ }
  
- 	XComment AddComment( [in] any Text ); 
- 	void Clear();
-@@ -134,6 +135,7 @@ interface XRange
- 	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,
-@@ -164,6 +166,7 @@ interface XRange
-  	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 );
+ //ScVbaControlListener
+@@ -106,69 +125,46 @@ ScVbaControlListener::disposing( const lang::Event
  
- };
+ //ScVbaControl
  
-Index: oovbaapi/org/openoffice/excel/XWindow.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XWindow.idl,v
-retrieving revision 1.4
-retrieving revision 1.3.4.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.2
---- oovbaapi/org/openoffice/excel/XWindow.idl	11 Apr 2008 09:57:44 -0000	1.4
-+++ oovbaapi/org/openoffice/excel/XWindow.idl	6 Jul 2008 15:37:37 -0000	1.3.4.2
-@@ -44,6 +44,8 @@ module org {  module openoffice {  modul
+-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 );
+ }
  
- //=============================================================================
- interface XRange;
-+interface XWorksheet;
-+interface XPane;
- interface XWindow
+ ScVbaControl::~ScVbaControl()
  {
- 	interface ::org::openoffice::vba::XHelperInterface;
-@@ -56,6 +58,8 @@ interface XWindow
- 	[attribute] boolean DisplayVerticalScrollBar; 
- 	[attribute] boolean DisplayWorkbookTabs; 
- 	[attribute] boolean FreezePanes; 
-+	[attribute] long Height; 
-+	[attribute] long Left; 
- 	[attribute] boolean Split; 
- 	[attribute] long SplitColumn;
- 	[attribute] double SplitHorizontal;
-@@ -63,6 +67,10 @@ interface XWindow
- 	[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 );
-@@ -73,7 +81,21 @@ interface XWindow
-         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 );
+-    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 );
+     }
+ }
  
-+	XWorksheet ActiveSheet() raises(com::sun::star::script::BasicErrorException);
-+	XPane ActivePane() raises(com::sun::star::script::BasicErrorException);
- };
++void 
++ScVbaControl::setGeometryHelper( AbstractGeometryAttributes* pHelper )
++{
++    mpGeometryHelper.reset( pHelper );
++}
++
+ void ScVbaControl::removeResouce() throw( uno::RuntimeException )
+ {
+-    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_xControl= NULL;
+     m_xProps = NULL;
+ }
  
- //=============================================================================
-Index: oovbaapi/org/openoffice/excel/XWorkbook.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XWorkbook.idl,v
-retrieving revision 1.4
-retrieving revision 1.3.4.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.2
---- oovbaapi/org/openoffice/excel/XWorkbook.idl	11 Apr 2008 09:58:14 -0000	1.4
-+++ oovbaapi/org/openoffice/excel/XWorkbook.idl	6 Jul 2008 15:37:43 -0000	1.3.4.2
-@@ -71,7 +71,7 @@ interface XWorkbook
- 	void Activate();
- 	void ResetColors() raises (com::sun::star::script::BasicErrorException);
+-
+-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 )
+-{
+-    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;
+-}
+-
+-void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext, 
+-        const uno::Reference< beans::XPropertySet > xProps, 
+-        const uno::Reference< drawing::XControlShape > xControlShape )
+-{
+-    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 );
+-}
+-
+ //In design model has different behavior
+ sal_Bool SAL_CALL ScVbaControl::getEnabled() throw (uno::RuntimeException)
+ {
+@@ -189,132 +185,283 @@ void SAL_CALL ScVbaControl::setEnabled( sal_Bool b
  
--	any Names();
-+	any Names( [in] any Index );
+ sal_Bool SAL_CALL ScVbaControl::getVisible() 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 );
+     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 );
+ }
  
- 	any Colors([in] any Index) raises (com::sun::star::script::BasicErrorException);
- 	long FileFormat() raises (com::sun::star::script::BasicErrorException);
-Index: oovbaapi/org/openoffice/excel/XWorksheet.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XWorksheet.idl,v
-retrieving revision 1.4
-retrieving revision 1.3.4.3
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.3
---- oovbaapi/org/openoffice/excel/XWorksheet.idl	11 Apr 2008 09:58:44 -0000	1.4
-+++ oovbaapi/org/openoffice/excel/XWorksheet.idl	29 Jul 2008 06:27:52 -0000	1.3.4.3
-@@ -51,6 +51,8 @@ module org {  module openoffice {  modul
- interface XComments;
- interface XRange;
- interface XOutline;
-+interface XPageSetup;
-+interface XHPageBreaks;
- interface XWorksheet
+ double SAL_CALL ScVbaControl::getWidth() throw (uno::RuntimeException)
  {
- 	interface ::org::openoffice::vba::XHelperInterface;
-@@ -67,6 +69,7 @@ interface XWorksheet
- 	[attribute, readonly] XWorksheet Next;
- 	[attribute, readonly] XWorksheet Previous;
- 	[attribute, readonly] string CodeName;
-+ 	[attribute, readonly] short Index;
- 	
- 	void Activate();
- 	void Calculate( );
-@@ -83,6 +86,8 @@ interface XWorksheet
- 	any PivotTables([in] any Index);
- 	any Comments([in] any Index);
- 	XOutline Outline();
-+	XPageSetup PageSetup();
-+	any HPageBreaks([in] any Index);
- 	any OLEObjects([in] any Index);
- 	void ShowDataForm();
- 	any Shapes([in] any Index);
-@@ -98,6 +103,7 @@ interface XWorksheet
+-    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 );
+ }
  
- 	void setEnableCalculation([in] boolean EnableCalculation) raises(com::sun::star::script::BasicErrorException);
- 	boolean getEnableCalculation() raises(com::sun::star::script::BasicErrorException);
-+	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, [in] any IgnorePrintAreas );
+ 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 );
  
- };
-Index: oovbaapi/org/openoffice/excel/makefile.mk
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/excel/makefile.mk,v
-retrieving revision 1.4
-retrieving revision 1.4.6.1
-diff -u -p -u -p -b -w -B -r1.4 -r1.4.6.1
---- oovbaapi/org/openoffice/excel/makefile.mk	11 Apr 2008 09:59:47 -0000	1.4
-+++ oovbaapi/org/openoffice/excel/makefile.mk	29 Jul 2008 06:27:52 -0000	1.4.6.1
-@@ -96,6 +96,13 @@ IDLFILES= XApplication.idl\
- 	XNames.idl \
- 	Workbook.idl \
- 	Worksheet.idl \
-+	Window.idl \
-+ 	XHyperlink.idl \
-+ 	Hyperlink.idl \
-+ 	XPageSetup.idl \
-+ 	XPageBreak.idl \
-+ 	XHPageBreak.idl \
-+ 	XHPageBreaks.idl \
+ }
  
+ 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();
+ }
  
- # ------------------------------------------------------------------
-Index: oovbaapi/org/openoffice/msforms/XComboBox.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XComboBox.idl,v
-retrieving revision 1.3
-retrieving revision 1.2.8.4
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.8.4
---- oovbaapi/org/openoffice/msforms/XComboBox.idl	11 Apr 2008 10:00:49 -0000	1.3
-+++ oovbaapi/org/openoffice/msforms/XComboBox.idl	19 Sep 2008 18:34:15 -0000	1.2.8.4
-@@ -44,8 +44,11 @@ module org {  module openoffice {  modul
- interface XComboBox: ::com::sun::star::uno::XInterface
+ void SAL_CALL
+ ScVbaControl::setTop( double _top ) throw (uno::RuntimeException)
  {
- 	[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();
- };
+-    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: oovbaapi/org/openoffice/msforms/XControl.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XControl.idl,v
-retrieving revision 1.3
-retrieving revision 1.2.4.4
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.4.4
---- oovbaapi/org/openoffice/msforms/XControl.idl	11 Apr 2008 10:01:02 -0000	1.3
-+++ oovbaapi/org/openoffice/msforms/XControl.idl	9 Sep 2008 10:22:00 -0000	1.2.4.4
-@@ -37,12 +37,20 @@
+-//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();
+ }
  
--module org {  module openoffice {  module msforms { 
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
+-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
++}
  
-+module org {  module openoffice {  module msforms { 
- 
- //=============================================================================
--interface XControl: com::sun::star::uno::XInterface
-+interface XControl
+-ScVbaControl* ScVbaControlFactory::createControl( const sal_Int16 nClassId )  throw (uno::RuntimeException)
++void SAL_CALL 
++ScVbaControl::setControlSource( const rtl::OUString& _controlsource ) throw (uno::RuntimeException)
  {
-+	interface ::org::openoffice::vba::XHelperInterface;
-+	void SetFocus();
-+	[attribute, readonly ] com::sun::star::uno::XInterface Object;
-+	[attribute] string ControlSource;
-+	[attribute] string RowSource;
- 	[attribute] boolean Enabled;
- 	[attribute] boolean Visible;
-     //Size. there are some defferent between Mso and OOo.
-@@ -52,6 +60,7 @@ interface XControl: com::sun::star::uno:
-     //Postion
-     [attribute] double  Left;
-     [attribute] double  Top;
-+	[attribute] string Name;
- };
+-    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
++}
  
- //=============================================================================
-Index: oovbaapi/org/openoffice/msforms/XControls.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XControls.idl
-diff -N oovbaapi/org/openoffice/msforms/XControls.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XControls.idl	19 Sep 2008 18:34:15 -0000	1.1.2.1
-@@ -0,0 +1,51 @@
-+/*************************************************************************
-+ *
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ * 
-+ * Copyright 2008 by Sun Microsystems, Inc.
-+ *
-+ * OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ * $RCSfile$
-+ * $Revision$
-+ *
-+ * This file is part of OpenOffice.org.
-+ *
-+ * OpenOffice.org is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Lesser General Public License version 3
-+ * only, as published by the Free Software Foundation.
-+ *
-+ * OpenOffice.org is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU Lesser General Public License version 3 for more details
-+ * (a copy is included in the LICENSE file that accompanied this code).
-+ *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
-+ *
-+ ************************************************************************/
-+#ifndef __org_openoffice_msforms_XControls_idl__
-+#define __org_openoffice_msforms_XControls_idl__
++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;
++
++}
++
++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)
+ {
++    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 );
++    
++}
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
-+#ifndef  __org_openoffice_vba_XCollection_idl__
-+#include <org/openoffice/vba/XCollection.idl>
-+#endif
-+module org { module openoffice { module msforms {
++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 >() );
+     }
+ }
 +
-+interface XControl;
++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
++        throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
++    return pControl;
++}
 +
-+interface XControls 
++rtl::OUString& 
++ScVbaControl::getServiceImplName()
 +{
-+    interface org::openoffice::vba::XCollection;
-+    void Move( [in] double cx, [in] double cy );
-+};
-+}; }; };
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControl") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaControl::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;
++}
 +
 +
-+#endif
-Index: oovbaapi/org/openoffice/msforms/XGroupBox.idl
+Index: sc/source/ui/vba/vbatextboxshape.hxx
 ===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XGroupBox.idl
-diff -N oovbaapi/org/openoffice/msforms/XGroupBox.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XGroupBox.idl	22 Apr 2008 19:50:59 -0000	1.1.2.1
-@@ -0,0 +1,56 @@
+--- sc/source/ui/vba/vbatextboxshape.hxx	(revision 0)
++++ sc/source/ui/vba/vbatextboxshape.hxx	(revision 264308)
+@@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -15791,35 +24656,101 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __org_openoffice_msforms_XGroupBox_idl__
-+#define __org_openoffice_msforms_XGroupBox_idl__
++#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 __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+//=============================================================================
++typedef cppu::ImplInheritanceHelper1< ScVbaShape, ov::msforms::XTextBoxShape > TextBoxShapeImpl_BASE;
 +
-+module org {  module openoffice {  module msforms { 
-+//=============================================================================
-+interface XGroupBox
++class ScVbaTextBoxShape : public TextBoxShapeImpl_BASE
 +{
-+	[attribute] string Caption; 
++    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
-+
-+
-Index: oovbaapi/org/openoffice/msforms/XImage.idl
++#endif //SC_VBA_TEXTBOX_HXX
+Index: sc/source/ui/vba/vbatitle.hxx
 ===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XImage.idl
-diff -N oovbaapi/org/openoffice/msforms/XImage.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XImage.idl	5 Sep 2008 14:06:38 -0000	1.1.2.1
-@@ -0,0 +1,51 @@
+--- sc/source/ui/vba/vbatitle.hxx	(revision 264185)
++++ sc/source/ui/vba/vbatitle.hxx	(revision 264308)
+@@ -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 @@ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseC
+ 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 @@ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseC
+ 		// 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 @@ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseC
+ 		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 @@ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseC
+ 		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	(revision 0)
++++ sc/source/ui/vba/vbaimage.hxx	(revision 264308)
+@@ -0,0 +1,48 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -15849,139 +24780,81 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef __org_openoffice_msforms_XImage_idl__
-+#define __org_openoffice_msforms_XImage_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+//=============================================================================
-+
-+module org {  module openoffice {  module msforms { 
-+
-+//=============================================================================
-+interface XImage: com::sun::star::uno::XInterface 
-+{
-+};
-+
-+//=============================================================================
-+
-+}; }; };
-+
-+#endif
-+
-+
-Index: oovbaapi/org/openoffice/msforms/XLabel.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XLabel.idl,v
-retrieving revision 1.3
-retrieving revision 1.2.4.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.4.2
---- oovbaapi/org/openoffice/msforms/XLabel.idl	11 Apr 2008 10:01:32 -0000	1.3
-+++ oovbaapi/org/openoffice/msforms/XLabel.idl	6 Jul 2008 15:38:07 -0000	1.2.4.2
-@@ -41,6 +41,7 @@ module org {  module openoffice {  modul
- interface XLabel: com::sun::star::uno::XInterface 
- {
- 	[attribute] string Caption;
-+	[attribute] any Value;
- };
- 
- //=============================================================================
-Index: oovbaapi/org/openoffice/msforms/XListBox.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XListBox.idl,v
-retrieving revision 1.3
-retrieving revision 1.2.4.4
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.4.4
---- oovbaapi/org/openoffice/msforms/XListBox.idl	11 Apr 2008 10:02:04 -0000	1.3
-+++ oovbaapi/org/openoffice/msforms/XListBox.idl	15 Sep 2008 19:19:47 -0000	1.2.4.4
-@@ -44,10 +44,13 @@ interface XListBox: com::sun::star::uno:
- 	[attribute] any Value;
- 	[attribute] string Text;
- 	[attribute] boolean MultiSelect;
--	//[attribute] sequence< boolean > Selected;
-+	[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 );
- };
- 
- //=============================================================================
-Index: oovbaapi/org/openoffice/msforms/XMultiPage.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XMultiPage.idl
-diff -N oovbaapi/org/openoffice/msforms/XMultiPage.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XMultiPage.idl	22 Apr 2008 19:50:59 -0000	1.1.2.1
-@@ -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 __org_openoffice_msforms_XMultiPage_idl__
-+#define __org_openoffice_msforms_XMultiPage_idl__
++#ifndef SC_VBA_IMAGE_HXX
++#define SC_VBA_IMAGE_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <ooo/vba/msforms/XImage.hpp>
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+//=============================================================================
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
 +
-+module org {  module openoffice {  module msforms { 
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XImage > ImageImpl_BASE;
 +
-+//=============================================================================
-+interface XMultiPage: com::sun::star::uno::XInterface 
++class ScVbaImage : public ImageImpl_BASE
 +{
-+	[attribute] long Value;
-+	any Pages( [in] any index );
++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
-+
-+
-Index: oovbaapi/org/openoffice/msforms/XPages.idl
++#endif //SC_VBA_IMAGE_HXX
+Index: sc/source/ui/vba/vbacondition.hxx
 ===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XPages.idl
-diff -N oovbaapi/org/openoffice/msforms/XPages.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XPages.idl	22 Apr 2008 19:50:59 -0000	1.1.2.1
-@@ -0,0 +1,61 @@
+--- sc/source/ui/vba/vbacondition.hxx	(revision 264185)
++++ sc/source/ui/vba/vbacondition.hxx	(revision 264308)
+@@ -42,7 +42,7 @@ typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVb
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbacolorformat.hxx	(revision 264308)
+@@ -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 @@ struct MsoColorIndizes
+ 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 @@ class ScVbaColorFormat : public ScVbaColorFormat_B
+     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	(revision 0)
++++ sc/source/ui/vba/vbacommandbarcontrols.hxx	(revision 264308)
+@@ -0,0 +1,90 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -16016,272 +24889,1294 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __org_openoffice_msforms_XPage_idl__
-+#define __org_openoffice_msforms_XPage_idl__
++#ifndef SC_VBA_COMMANDBARCONTROLS_HXX
++#define SC_VBA_COMMANDBARCONTROLS_HXX
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+#ifndef  __org_openoffice_vba_XCollection_idl__
-+#include <org/openoffice/vba/XCollection.idl>
-+#endif
++#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	(revision 264185)
++++ sc/source/ui/vba/vbarange.cxx	(revision 264308)
+@@ -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::Any lcl_makeRange( uno::Reference< uno::XComp
+ {
+ 	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,6 +235,7 @@ uno::Any lcl_makeRange( uno::Reference< uno::XComp
+ 		// #FIXME need proper (WorkSheet) parent
+ 		xRange = new ScVbaRange( xParent, xContext, xRanges );
+ 	}
++	}
+ 	return xRange;
+ }
+ 
+@@ -317,7 +322,7 @@ class ScVbaRangeAreas : public ScVbaCollectionBase
+ 	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);
+@@ -527,10 +532,38 @@ sal_Int32 m_nArea;
+ 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 )
++        {
++	}
++
++	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
+ {
+ 	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 +592,7 @@ class CellsEnumeration : public CellsEnumeration_B
+ 		}
+ 	}
+ 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 +612,7 @@ class CellsEnumeration : public CellsEnumeration_B
+ 		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 ) ) );
+ 
+ 	}
+ };
+@@ -751,6 +784,7 @@ class CellFormulaValueSetter : public CellValueSet
+ 	bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell )
+ 	{
+ 		rtl::OUString sFormula;
++		double aDblValue;
+ 		if ( aValue >>= sFormula )
+ 		{
+             // convert to CONV_OOO style formula string because XCell::setFormula
+@@ -777,6 +811,11 @@ class CellFormulaValueSetter : public CellValueSet
+ 			xCell->setFormula( sFormula );
+ 			return true;
+ 		}
++		else if ( aValue >>= aDblValue )
++		{
++			xCell->setValue( aDblValue );
++			return true;
++		}
+ 		return false;
+ 	}
+ 		
+@@ -801,7 +840,7 @@ class CellFormulaValueGetter : public CellValueGet
+ 			pUnoRangesBase )
+ 		{
+ 			ScRangeList aCellRanges = pUnoRangesBase->GetRangeList();	
+-			ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart, ScGrammar::GRAM_DEFAULT );
++			ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart, ScGrammar::GRAM_PODF_A1 );
+ 			aCompiler.CompileString( sVal );
+ 			// set desired convention
+             aCompiler.SetGrammar( m_eGrammar );
+@@ -937,9 +976,9 @@ class RangeCountProcessor : public RangeProcessor
+ class AreasVisitor
+ {
+ 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 )
+ 	{
+@@ -998,7 +1037,7 @@ class RangeHelper
+  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,
+@@ -1096,12 +1135,12 @@ getRangeForName( const uno::Reference< uno::XCompo
+ 	{
+ 		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 );
+ }
+ 
+ css::uno::Reference< excel::XRange >
+@@ -1149,27 +1188,36 @@ table::CellRangeAddress getCellRangeAddressForVBAR
+ 
+ }
+ 
+-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;
+ }
+ 
+ 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 )
+ {
+-	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 );
+ }
+ 
+-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 )
+@@ -1184,7 +1232,7 @@ ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> c
+ 
+ }
+ 
+-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 )
+ 
+ {
+@@ -1197,7 +1245,7 @@ ScVbaRange::~ScVbaRange()
+ {
+ }
+ 
+-uno::Reference< vba::XCollection >& ScVbaRange::getBorders()
++uno::Reference< XCollection >& ScVbaRange::getBorders()
+ {
+ 	if ( !m_Borders.is() )
+ 	{
+@@ -1530,7 +1578,7 @@ ScVbaRange::fillSeries( sheet::FillDirection nFill
+ 	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 );
+@@ -1737,7 +1785,7 @@ ScVbaRange::Address(  const uno::Any& RowAbsolute,
+ 	{
+ 		// 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 )
+ 		{
+@@ -1845,14 +1893,43 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, cons
+ 	}
+ 
+ 	sal_Int32 nRow = 0, nColumn = 0;
+-	sal_Bool bIsIndex = nRowIndex >>= nRow, bIsColumnIndex = nColumnIndex >>= nColumn;
+                                                                                                                        
++	sal_Bool bIsIndex = nRowIndex.hasValue();
++	sal_Bool bIsColumnIndex = nColumnIndex.hasValue();
 +
-+module org {  module openoffice {  module msforms { 
++	// 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)
+@@ -1888,9 +1965,22 @@ 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& )
++		{
+ }
+ 
++	}
++}
 +
-+//=============================================================================
-+interface XPages
+ bool cellInRange( const table::CellRangeAddress& rAddr, const sal_Int32& nCol, const sal_Int32& nRow )
+ {
+ 	if ( nCol >= rAddr.StartColumn && nCol <= rAddr.EndColumn &&
+@@ -2685,6 +2775,167 @@ ScVbaRange::Replace( const ::rtl::OUString& What,
+ 	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)
 +{
-+    interface org::openoffice::vba::XCollection;
-+};
++    // return a Range object that represents the first cell where that information is found.
++    rtl::OUString sWhat;
++    sal_Int32 nWhat;
++    float fWhat;
++    
++    // 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 );
 +
-+#endif
++	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 );
 +
-Index: oovbaapi/org/openoffice/msforms/XProgressBar.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XProgressBar.idl
-diff -N oovbaapi/org/openoffice/msforms/XProgressBar.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XProgressBar.idl	22 Apr 2008 19:51:00 -0000	1.1.2.1
-@@ -0,0 +1,57 @@
-+/*************************************************************************
-+ *
-+ *  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 __org_openoffice_msforms_XProgressBar_idl__
-+#define __org_openoffice_msforms_XProgressBar_idl__
++        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 );
++        }
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+//=============================================================================
++        // LookIn
++        if( LookIn.hasValue() )
++        {
++            sal_Int32 nLookIn;
++            if( LookIn >>= nLookIn )
++            {
++                sal_Int16 nSearchType; 
++                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 ) );
++            }
++        }
 +
-+module org {  module openoffice {  module msforms { 
++        // 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 ) ); 	
++        }
 +
-+//=============================================================================
-+interface XProgressBar: com::sun::star::uno::XInterface 
-+{
-+	[attribute] any Value;
-+};
++        // 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;
++            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 ) );
++            }
++        }
 +
-+}; }; };
++        // 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 ) ); 	
 +
-+#endif
++        // MatchByte
++        // SearchFormat
++        // ignore
 +
++		ScGlobal::SetSearchItem( newOptions );	
 +
-Index: oovbaapi/org/openoffice/msforms/XRadioButton.idl
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XRadioButton.idl,v
-retrieving revision 1.3
-retrieving revision 1.2.4.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.4.2
---- oovbaapi/org/openoffice/msforms/XRadioButton.idl	11 Apr 2008 10:02:36 -0000	1.3
-+++ oovbaapi/org/openoffice/msforms/XRadioButton.idl	6 Jul 2008 15:38:04 -0000	1.2.4.2
-@@ -41,7 +41,7 @@ module org {  module openoffice {  modul
- interface XRadioButton: com::sun::star::uno::XInterface 
- {
- 	[attribute] string Caption;
--	[attribute] boolean Value;
-+	[attribute] any Value;
- };
- 
- //=============================================================================
-Index: oovbaapi/org/openoffice/msforms/XScrollBar.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XScrollBar.idl
-diff -N oovbaapi/org/openoffice/msforms/XScrollBar.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XScrollBar.idl	29 Jul 2008 06:27:52 -0000	1.1.2.2
-@@ -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 __org_openoffice_msforms_XScrollBar_idl__
-+#define __org_openoffice_msforms_XScrollBar_idl__
++		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;
++            }
++        }
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+//=============================================================================
++    }
 +
-+module org {  module openoffice {  module msforms { 
++    return uno::Reference< excel::XRange >();
++}
 +
-+//=============================================================================
-+interface XScrollBar: com::sun::star::uno::XInterface 
+ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Reference<  uno::XComponentContext >& xContext, ScDocShell* pDocSh )
+ {
+ 	uno::Reference< excel::XRange > xKeyRange;
+@@ -2738,10 +2989,10 @@ void updateTableSortField( const uno::Reference< t
+ 
+ 		// 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 )
+@@ -2797,7 +3048,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno:
+ /* 
+ 	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; 
+ 	}
+@@ -3115,6 +3366,18 @@ ScVbaRange::hasElements() throw (uno::RuntimeExcep
+ 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 );
+ }
+ 
+@@ -3362,26 +3625,32 @@ ScVbaRange::getRowHeight() throw (uno::RuntimeExce
+ 		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 );
+ }
+ 
+@@ -3553,7 +3822,7 @@ ScVbaRange::getWorksheet() throw (uno::RuntimeExce
+ 		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;
+ }
+@@ -3620,14 +3889,14 @@ ScVbaRange::ApplicationRange( const uno::Reference
+ 			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 ); 
+ }
+@@ -4118,7 +4387,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 )
+@@ -4297,7 +4566,114 @@ void ScVbaRange::setFormulaHidden(const uno::Any&
+ 	xProps->setPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLPRO)), uno::makeAny(rCellAttr));
+ }
+ 
++uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
 +{
-+	[attribute] long Max;
-+	[attribute] long Min;
-+	[attribute] any Value;
-+	[attribute] long LargeChange;
-+	[attribute] long SmallChange;
-+};
++	// #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;
 +
-+//=============================================================================
++	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();
 +
-+}; }; };
++	// 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();
++}
 +
-+#endif
++void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) 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 set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
++	
++	sal_Bool bShowDetail = sal_False;
++	aShowDetail >>= bShowDetail;
 +
-Index: oovbaapi/org/openoffice/msforms/XSpinButton.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XSpinButton.idl
-diff -N oovbaapi/org/openoffice/msforms/XSpinButton.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XSpinButton.idl	29 Jul 2008 06:27:52 -0000	1.1.2.1
-@@ -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 __org_openoffice_msforms_XSpinButton_idl__
-+#define __org_openoffice_msforms_XSpinButton_idl__
++	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();
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+//=============================================================================
++	// 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 >() );
++	}
++}
 +
-+module org {  module openoffice {  module msforms { 
++uno::Reference< excel::XRange > SAL_CALL 
++ScVbaRange::MergeArea() throw (script::BasicErrorException, uno::RuntimeException)
++{
++    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( aCellAddress.StartColumn, aCellAddress.StartRow, aCellAddress.Sheet, 
++                                  aCellAddress.EndColumn, aCellAddress.EndRow, aCellAddress.Sheet);
++                uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell() , refRange ) );
++                return new ScVbaRange( getParent(),mxContext,xRange );
++            }
++        }
++    }
++    return new ScVbaRange( getParent(),mxContext,mxRange );
++}
 +
-+//=============================================================================
-+interface XSpinButton: com::sun::star::uno::XInterface 
+ 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)
+ {
+@@ -4515,7 +4891,7 @@ ScVbaRange::AutoOutline(  ) throw (script::BasicEr
+ {
+ 	// #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 )
+@@ -4733,6 +5109,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType,
+ 		case excel::XlCellType::xlCellTypeConstants:
+ 		case excel::XlCellType::xlCellTypeFormulas:
+ 		case excel::XlCellType::xlCellTypeVisible:
++		case excel::XlCellType::xlCellTypeLastCell:
+ 		{
+ 			if ( bIsMultiArea )
+ 			{
+@@ -4893,7 +5270,7 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal
+ 		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));
+@@ -4954,27 +5331,6 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal
+ 	}
+ }
+ 
+-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()
+ {
+@@ -4989,7 +5345,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;
+ }
+@@ -5001,5 +5357,5 @@ sdecl::vba_service_class_<ScVbaRange, sdecl::with_
+ 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	(revision 264185)
++++ sc/source/ui/vba/vbachartobject.hxx	(revision 264308)
+@@ -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 @@ class ScVbaChartObject : public ChartObjectImpl_BA
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbatextbox.cxx	(revision 264308)
+@@ -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)
 +{
-+	[attribute] long Max;
-+	[attribute] long Min;
-+	[attribute] any Value;
-+};
-+
-+//=============================================================================
++	return uno::makeAny( getText() );
++}
 +
-+}; }; };
++void SAL_CALL 
++ScVbaTextBox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
++{
++	rtl::OUString sVal = getAnyAsString( _value );
++	setText( sVal );
++}
 +
-+#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::RuntimeEx
+ 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 @@ ScVbaTextBox::setMultiline( sal_Bool _multiline )
+     m_xProps->setPropertyValue
+             (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), aValue);
+ }
 +
++rtl::OUString& 
++ScVbaTextBox::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox") );
++	return sImplName;
++}
 +
-Index: oovbaapi/org/openoffice/msforms/XTextBox.idl
++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
 ===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XTextBox.idl,v
-retrieving revision 1.3
-retrieving revision 1.2.4.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.2.4.2
---- oovbaapi/org/openoffice/msforms/XTextBox.idl	11 Apr 2008 10:03:37 -0000	1.3
-+++ oovbaapi/org/openoffice/msforms/XTextBox.idl	6 Jul 2008 15:38:01 -0000	1.2.4.2
-@@ -41,7 +41,7 @@ module org {  module openoffice {  modul
- interface XTextBox: com::sun::star::uno::XInterface 
- {
- 	[attribute] string  Text;
--//    [attribute] any    Value;
-+    [attribute] any    Value;
-     [attribute] long    MaxLength;
-     [attribute] boolean Multiline;
+--- sc/source/ui/vba/vbaworkbook.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaworkbook.cxx	(revision 264308)
+@@ -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 @@ class ActiveSheet : public ScVbaWorksheet
+ 		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 ) {}
+ 		
  };
-Index: oovbaapi/org/openoffice/msforms/XTextBoxShape.idl
+ 
+@@ -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::init()
+ 	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
+ 	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
+ 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 ) thr
+ 	// 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 ) thr
+ 
+ // 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 )
++    {
+ 	return uno::Any( xNames );
+ }
++    return uno::Any( xNames->Item( aIndex, uno::Any() ) );
++}
+ 
+ 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::wi
+ 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	(revision 264185)
++++ sc/source/ui/vba/vbaformatcondition.cxx	(revision 264308)
+@@ -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;
+ 
+ ScVbaFormatConditions* 
+@@ -42,7 +42,7 @@ lcl_getScVbaFormatConditionsPtr( const uno::Refere
+ 		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 )
+ {
+         mxSheetConditionalEntries = lcl_getScVbaFormatConditionsPtr( moFormatConditions )->getSheetConditionalEntries();
+ 
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbainterior.hxx
+===================================================================
+--- sc/source/ui/vba/vbainterior.hxx	(revision 264185)
++++ sc/source/ui/vba/vbainterior.hxx	(revision 264308)
+@@ -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 @@ class ScVbaInterior :  public ScVbaInterior_BASE
+ 
+ 	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	(revision 264185)
++++ sc/source/ui/vba/vbashape.cxx	(revision 264308)
+@@ -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;
+ }
+Index: sc/source/ui/vba/vbauserform.cxx
 ===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XTextBoxShape.idl
-diff -N oovbaapi/org/openoffice/msforms/XTextBoxShape.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XTextBoxShape.idl	14 Feb 2008 15:29:05 -0000	1.1.2.2
-@@ -0,0 +1,61 @@
+--- sc/source/ui/vba/vbauserform.cxx	(revision 0)
++++ sc/source/ui/vba/vbauserform.cxx	(revision 264308)
+@@ -0,0 +1,228 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -16316,342 +26211,264 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __org_openoffice_msforms_XTextBoxShape_idl__
-+#define __org_openoffice_msforms_XTextBoxShape_idl__
++#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"
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+#ifndef __org_openoffice_excel_XCharacters_idl
-+#include <org/openoffice/excel/XCharacters.idl>
-+#endif
-+//=============================================================================
++using namespace ::ooo::vba;
++using namespace ::com::sun::star;
 +
-+module org {  module openoffice {  module msforms { 
++// 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
 +
-+//=============================================================================
-+interface XTextBoxShape: com::sun::star::uno::XInterface 
++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 )
 +{
-+	[attribute] string  Text;
-+	::org::openoffice::excel::XCharacters characters([in] any Start, [in] any Length);
-+};
-+
-+//=============================================================================
-+
-+}; }; };
-+
-+#endif
-+
-+
-Index: oovbaapi/org/openoffice/msforms/XToggleButton.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XToggleButton.idl
-diff -N oovbaapi/org/openoffice/msforms/XToggleButton.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XToggleButton.idl	22 Apr 2008 19:51:00 -0000	1.1.2.1
-@@ -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 __org_openoffice_msforms_XToggleButton_idl__
-+#define __org_openoffice_msforms_XToggleButton_idl__
-+
-+#ifndef __org_openoffice_msforms_XButton_idl__
-+#include <org/openoffice/msforms/XButton.idl>
-+#endif
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+//=============================================================================
++    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 ) );
++}
 +
-+module org {  module openoffice {  module msforms { 
-+//=============================================================================
-+interface XToggleButton
++ScVbaUserForm::~ScVbaUserForm()
 +{
-+	interface XButton;
-+	[attribute] any Value; 
-+};
-+
-+//=============================================================================
-+
-+}; }; };
-+
-+#endif
-+
-+
-Index: oovbaapi/org/openoffice/msforms/XUserForm.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XUserForm.idl
-diff -N oovbaapi/org/openoffice/msforms/XUserForm.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/msforms/XUserForm.idl	19 Sep 2008 18:34:15 -0000	1.1.2.2
-@@ -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 __org_openoffice_msforms_XUserForm_idl__
-+#define __org_openoffice_msforms_XUserForm_idl__
++}
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
-+#ifndef __com_sun_star_script_XInvocation_idl__
-+#include <com/sun/star/script/XInvocation.idl>
-+#endif
-+module org { module openoffice { module msforms {
-+interface XUserForm 
++void SAL_CALL 
++ScVbaUserForm::Show(  ) throw (uno::RuntimeException)
 +{
-+	//interface ::org::openoffice::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
-Index: oovbaapi/org/openoffice/msforms/makefile.mk
-===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/makefile.mk,v
-retrieving revision 1.4
-retrieving revision 1.3.4.6
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.6
---- oovbaapi/org/openoffice/msforms/makefile.mk	11 Apr 2008 10:03:53 -0000	1.4
-+++ oovbaapi/org/openoffice/msforms/makefile.mk	19 Sep 2008 18:34:15 -0000	1.3.4.6
-@@ -60,7 +60,17 @@ IDLFILES=\
- 	XFillFormat.idl \
- 	XPictureFormat.idl \
- 	XShapeRange.idl \
--	XListBox.idl 
-+	XTextBoxShape.idl \
-+	XUserForm.idl \
-+	XListBox.idl \
-+	XToggleButton.idl \
-+	XScrollBar.idl \
-+	XProgressBar.idl \
-+	XMultiPage.idl \
-+	XPages.idl \
-+	XSpinButton.idl \
-+	XImage.idl \
-+	XControls.idl \
- 
- # ------------------------------------------------------------------
- 
-Index: oovbaapi/org/openoffice/vba/XAssistant.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/vba/XAssistant.idl
-diff -N oovbaapi/org/openoffice/vba/XAssistant.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/vba/XAssistant.idl	18 Jan 2008 19:28:17 -0000	1.1.2.1
-@@ -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 __org_openoffice_vba_XAssistant_idl__
-+#define __org_openoffice_vba_XAssistant_idl__
++	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& )
++		{
++		}
++	}
++}
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++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 ) );
++}
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
-+//=============================================================================
++void SAL_CALL 
++ScVbaUserForm::Hide(  ) throw (uno::RuntimeException)
++{
++	mbDispose = false;  // hide not dispose
++	if ( m_xDialog.is() )
++		m_xDialog->endExecute();
++}
 +
-+module org {  module openoffice {  module vba { 
-+//=============================================================================
++void SAL_CALL 
++ScVbaUserForm::RePaint(  ) throw (uno::RuntimeException)
++{
++	// do nothing
++}
 +
-+interface XAssistant
++void SAL_CALL 
++ScVbaUserForm::UnloadObject(  ) throw (uno::RuntimeException)
 +{
-+	interface ::org::openoffice::vba::XHelperInterface;
++	mbDispose = true;
++	if ( m_xDialog.is() )
++		m_xDialog->endExecute();
++}
 +
-+    [attribute] boolean On;
-+    [attribute] boolean Visible;
-+    [attribute] long Top;
-+    [attribute] long Left;
-+    [attribute] long Animation;
-+    
-+    string Name() raises ( com::sun::star::script::BasicErrorException );
-+};
++rtl::OUString& 
++ScVbaUserForm::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
++	return sImplName;
++}
 +
-+}; }; };
++uno::Sequence< rtl::OUString > 
++ScVbaUserForm::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.UserForm" ) );
++	}
++	return aServiceNames;
++}
 +
-+#endif
-Index: oovbaapi/org/openoffice/vba/XCommandBar.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/vba/XCommandBar.idl
-diff -N oovbaapi/org/openoffice/vba/XCommandBar.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/vba/XCommandBar.idl	29 Jul 2008 06:27:53 -0000	1.1.2.1
-@@ -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 __org_openoffice_vba_XCommandBar_idl__
-+#define __org_openoffice_vba_XCommandBar_idl__
++uno::Reference< beans::XIntrospectionAccess > SAL_CALL 
++ScVbaUserForm::getIntrospection(  ) throw (uno::RuntimeException)
++{
++	return uno::Reference< beans::XIntrospectionAccess >();
++}
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++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
++}
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
-+//=============================================================================
++void SAL_CALL 
++ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, 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 );
++}
 +
-+module org {  module openoffice {  module vba { 
-+//=============================================================================
-+interface XCommandBarControls;
++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 );
++}
 +
-+interface XCommandBar
++::sal_Bool SAL_CALL 
++ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
 +{
-+	interface XHelperInterface;
++	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 );
++}
 +
-+    [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 );
-+};
++::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() )
++	{
++		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;
++}
 +
-+}; }; };
++namespace userform
++{
++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" );
++}
 +
-+#endif
-Index: oovbaapi/org/openoffice/vba/XCommandBarControl.idl
+Index: sc/source/ui/vba/vbanames.cxx
 ===================================================================
-RCS file: oovbaapi/org/openoffice/vba/XCommandBarControl.idl
-diff -N oovbaapi/org/openoffice/vba/XCommandBarControl.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/vba/XCommandBarControl.idl	29 Jul 2008 06:27:53 -0000	1.1.2.1
-@@ -0,0 +1,64 @@
+--- sc/source/ui/vba/vbanames.cxx	(revision 264185)
++++ sc/source/ui/vba/vbanames.cxx	(revision 264308)
+@@ -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 @@ class NamesEnumeration : public EnumerationHelperI
+ };
+ 
+ 
+-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 @@ class NamesEnumeration : public EnumerationHelperI
+ 			mxModel( xModel ),
+ 			mxNames( xNames )
+ {
++    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);
+ }
+ 
+ uno::Reference< container::XEnumeration >
+@@ -205,7 +206,7 @@ ScVbaNames::getServiceNames()
+ 	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	(revision 0)
++++ sc/source/ui/vba/vbacommandbarcontrol.cxx	(revision 264308)
+@@ -0,0 +1,403 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -16686,223 +26503,728 @@
 + *    MA  02111-1307  USA
 + *
 + ************************************************************************/
-+#ifndef __org_openoffice_vba_XCommandBarControl_idl__
-+#define __org_openoffice_vba_XCommandBarControl_idl__
++#include "vbacommandbarcontrol.hxx"
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++using namespace com::sun::star;
++using namespace ooo::vba;
 +
-+#ifndef __org_openoffice_vba_XHelperInterface_idl__
-+#include <org/openoffice/vba/XHelperInterface.idl>
-+#endif
-+//=============================================================================
++uno::Any lcl_getPropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName )
++{
++    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();
++}
 +
-+module org {  module openoffice {  module vba { 
-+//=============================================================================
++beans::PropertyValues lcl_repalcePropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName, uno::Any aValue )
++{
++    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;
++}
 +
-+interface XCommandBarControl
++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 )
++{
++    // 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;
++}
++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 )
 +{
-+	interface XHelperInterface;
++    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();
++    }
++}
 +
-+    [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 );
-+};
++void
++ScVbaCommandBarControl::initObjects() throw (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;
++}
 +
-+}; }; };
++void
++ScVbaCommandBarControl::createNewMenuBarControl()
++{
++    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");
 +
-+#endif
-Index: oovbaapi/org/openoffice/vba/XCommandBarControls.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/vba/XCommandBarControls.idl
-diff -N oovbaapi/org/openoffice/vba/XCommandBarControls.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/vba/XCommandBarControls.idl	29 Jul 2008 06:27:53 -0000	1.1.2.1
-@@ -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 __org_openoffice_vba_XCommandBarControls_idl__
-+#define __org_openoffice_vba_XCommandBarControls_idl__
++    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;
 +
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
++    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();
++    }
++}
 +
-+#ifndef __org_openoffice_vba_XCollection_idl__
-+#include <org/openoffice/vba/XCollection.idl>
-+#endif
++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;
 +
-+module org {  module openoffice {  module vba { 
-+//=============================================================================
-+interface XCommandBarControl;
++    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();
++    }
++}
 +
-+interface XCommandBarControls
++::rtl::OUString SAL_CALL
++ScVbaCommandBarControl::getCaption() throw ( uno::RuntimeException )
++{
++    // "Label" always empty
++    rtl::OUString sCaption;
++    beans::PropertyValues aPropertyValues;
++    if( m_xCurrentSettings.is() )
++    {
++        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;
++}
++void SAL_CALL 
++ScVbaCommandBarControl::setCaption( const ::rtl::OUString& _caption ) 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("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();
++        }
++    }
++}
++::sal_Bool SAL_CALL 
++ScVbaCommandBarControl::getVisible() throw (uno::RuntimeException)
 +{
-+	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/org/openoffice/vba/XCommandBars.idl
-===================================================================
-RCS file: oovbaapi/org/openoffice/vba/XCommandBars.idl
-diff -N oovbaapi/org/openoffice/vba/XCommandBars.idl
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ oovbaapi/org/openoffice/vba/XCommandBars.idl	29 Jul 2008 06:27:53 -0000	1.1.2.1
-@@ -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 __org_openoffice_vba_XCommandBars_idl__
-+#define __org_openoffice_vba_XCommandBars_idl__
-+
-+#ifndef __com_sun_star_uno_XInterface_idl__
-+#include <com/sun/star/uno/XInterface.idl>
-+#endif
-+
-+#ifndef __org_openoffice_vba_XCollection_idl__
-+#include <org/openoffice/vba/XCollection.idl>
-+#endif
-+
-+//=============================================================================
-+
-+module org {  module openoffice {  module vba { 
-+//=============================================================================
-+interface XCommandBar;
-+
-+interface XCommandBars
++    // not possible in UNO?
++    return sal_True;
++}
++void SAL_CALL 
++ScVbaCommandBarControl::setVisible( ::sal_Bool /*_visible*/ ) throw (uno::RuntimeException)
 +{
-+    interface XCollection;
-+
-+    XCommandBar Add( [in] any Name, [in] any Position,  [in] any MenuBar, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
-+};
-+
-+}; }; };
++    // "IsVisilbe"
++}
++void SAL_CALL 
++ScVbaCommandBarControl::Delete(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++{
++    if( m_xCurrentSettings.is() )
++    {
++        m_xCurrentSettings->removeByIndex( m_nPosition );
 +
-+#endif
-Index: oovbaapi/org/openoffice/vba/XGlobals.idl
++        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 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()
++{
++	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
 ===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/vba/XGlobals.idl,v
-retrieving revision 1.4
-retrieving revision 1.3.4.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.2
---- oovbaapi/org/openoffice/vba/XGlobals.idl	11 Apr 2008 10:05:01 -0000	1.4
-+++ oovbaapi/org/openoffice/vba/XGlobals.idl	6 Jul 2008 15:37:34 -0000	1.3.4.2
-@@ -57,7 +57,7 @@ interface XGlobals: com::sun::star::uno:
- 	any WorkBooks( [in] any aIndex );
- 	any Sheets( [in] any aIndex );
- 	any Range( [in] any Cell1, [in] any Cell2 );
--	any Names( );
-+	any Names( [in] any Index );
+--- sc/source/ui/vba/vbaaxes.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaaxes.hxx	(revision 264308)
+@@ -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 @@ class ScVbaAxes : public ScVbaAxes_BASE
+ 	// 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 );
  };
  
- }; }; };
-Index: oovbaapi/org/openoffice/vba/makefile.mk
+ #endif //SC_VBA_AXES_HXX
+Index: sc/source/ui/vba/vbachart.hxx
 ===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/vba/makefile.mk,v
-retrieving revision 1.4
-retrieving revision 1.3.4.3
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.4.3
---- oovbaapi/org/openoffice/vba/makefile.mk	11 Apr 2008 10:06:09 -0000	1.4
-+++ oovbaapi/org/openoffice/vba/makefile.mk	29 Jul 2008 06:27:53 -0000	1.3.4.3
-@@ -52,6 +52,11 @@ IDLFILES=\
- 	XVBAToOOEventDescGen.idl\
- 	XPropValue.idl\
- 	XHelperInterface.idl\
-+	XAssistant.idl\
-+	XCommandBarControl.idl\
-+	XCommandBarControls.idl\
-+	XCommandBar.idl\
-+	XCommandBars.idl\
- 	Globals.idl\
+--- sc/source/ui/vba/vbachart.hxx	(revision 264185)
++++ sc/source/ui/vba/vbachart.hxx	(revision 264308)
+@@ -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::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 @@ friend class ScVbaAxis;
+ 	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 @@ friend class ScVbaAxis;
+ 	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 @@ friend class ScVbaAxis;
+ 	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();
+Index: sc/source/ui/vba/vbaaxistitle.cxx
+===================================================================
+--- sc/source/ui/vba/vbaaxistitle.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaaxistitle.cxx	(revision 264308)
+@@ -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 ];
+ 	}
+Index: sc/source/ui/vba/vbaformatconditions.cxx
+===================================================================
+--- sc/source/ui/vba/vbaformatconditions.cxx	(revision 264185)
++++ sc/source/ui/vba/vbaformatconditions.cxx	(revision 264308)
+@@ -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 FORMULA2( RTL_CONSTASCII_USTR
+ 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 )
+ {
+ 	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::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 @@ ScVbaFormatConditions::getElementType() throw (css
+ 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 );
+ }
+ 
+ class EnumWrapper : public EnumerationHelper_BASE
+@@ -125,7 +125,7 @@ class EnumWrapper : public EnumerationHelper_BASE
+         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, co
+ 			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;
+ }
+Index: sc/source/ui/vba/vbaoutline.hxx
+===================================================================
+--- sc/source/ui/vba/vbaoutline.hxx	(revision 264185)
++++ sc/source/ui/vba/vbaoutline.hxx	(revision 264308)
+@@ -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"
+ 
+-typedef InheritedHelperInterfaceImpl1< oo::excel::XOutline > ScVbaOutline_BASE;
++typedef InheritedHelperInterfaceImpl1< ov::excel::XOutline > ScVbaOutline_BASE;
+ 
+ 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(){}
+Index: sc/source/ui/vba/vbacharts.cxx
+===================================================================
+--- sc/source/ui/vba/vbacharts.cxx	(revision 264185)
++++ sc/source/ui/vba/vbacharts.cxx	(revision 264308)
+@@ -32,10 +32,10 @@
+ #include <com/sun/star/table/XTableChartsSupplier.hpp>
+ 
+ using namespace ::com::sun::star;
+-using namespace ::org::openoffice;
++using namespace ::ooo::vba;
+ 
+ 
+-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 >() )
+ {
+ 	// #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;
+ }
+Index: sc/inc/compiler.hxx
+===================================================================
+--- sc/inc/compiler.hxx	(revision 264185)
++++ sc/inc/compiler.hxx	(revision 264308)
+@@ -513,6 +513,9 @@ class SC_DLLPUBLIC ScCompiler
+      */
+     static OpCodeMapPtr GetOpCodeMap( const sal_Int32 nLanguage );
  
- # ------------------------------------------------------------------
-Index: offapi/com/sun/star/document/makefile.mk
++    // Check if it is a valid english function name
++    static bool IsEnglishSymbol( const String& rName ); 
++
+     //! _either_ CompileForFAP _or_ AutoCorrection, _not_ both
+     void            SetCompileForFAP( BOOL bVal )
+                         { bCompileForFAP = bVal; bIgnoreErrors = bVal; }
+Index: sc/inc/document.hxx
+===================================================================
+--- sc/inc/document.hxx	(revision 264185)
++++ sc/inc/document.hxx	(revision 264308)
+@@ -690,7 +690,7 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollection() con
+ 	BOOL			HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect );
+ 	BOOL			HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect );
+ 
+-	ScOutlineTable*	GetOutlineTable( SCTAB nTab, BOOL bCreate = FALSE );
++	SC_DLLPUBLIC ScOutlineTable*	GetOutlineTable( SCTAB nTab, BOOL bCreate = FALSE );
+ 	BOOL			SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
+ 
+ 	void			DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
+Index: sc/inc/olinetab.hxx
 ===================================================================
-RCS file: /cvs/api/offapi/com/sun/star/document/makefile.mk,v
-retrieving revision 1.47
-retrieving revision 1.47.32.2
-diff -u -p -u -p -b -w -B -r1.47 -r1.47.32.2
---- offapi/com/sun/star/document/makefile.mk	1 Jul 2008 12:38:47 -0000	1.47
-+++ offapi/com/sun/star/document/makefile.mk	7 Aug 2008 06:23:37 -0000	1.47.32.2
-@@ -108,7 +108,7 @@ IDLFILES=\
-     LinkUpdateModes.idl\
-     XDocumentRevisionListPersistence.idl\
-     DocumentRevisionListPersistence.idl \
--    XDocumentLanguages.idl
-+    XDocumentLanguages.idl	\
+--- sc/inc/olinetab.hxx	(revision 264185)
++++ sc/inc/olinetab.hxx	(revision 264308)
+@@ -111,7 +111,7 @@ friend class ScSubOutlineIterator;
+ 
+     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(
+Index: basic/source/runtime/step2.cxx
+===================================================================
+--- basic/source/runtime/step2.cxx	(revision 264185)
++++ basic/source/runtime/step2.cxx	(revision 264308)
+@@ -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 );
+ 
+Index: basic/source/classes/sbunoobj.cxx
+===================================================================
+--- basic/source/classes/sbunoobj.cxx	(revision 264185)
++++ basic/source/classes/sbunoobj.cxx	(revision 264308)
+@@ -117,7 +117,7 @@ static String ID_DBG_PROPERTIES( RTL_CONSTASCII_US
+ 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'
+Index: scripting/source/dlgprov/dlgevtatt.cxx
+===================================================================
+--- scripting/source/dlgprov/dlgevtatt.cxx	(revision 264185)
++++ scripting/source/dlgprov/dlgevtatt.cxx	(working copy)
+@@ -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 );
+             

Modified: trunk/patches/dev300/unused-methods-removal-sc.diff
==============================================================================
--- trunk/patches/dev300/unused-methods-removal-sc.diff	(original)
+++ trunk/patches/dev300/unused-methods-removal-sc.diff	Tue Dec  2 10:17:20 2008
@@ -15861,7 +15861,7 @@
      css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, css::uno::Any aRange ) throw (css::uno::RuntimeException);
      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 );
--    css::awt::Point calculateTopLeftMargin( css::uno::Reference< oo::vba::XHelperInterface > xDocument );
+-    css::awt::Point calculateTopLeftMargin( css::uno::Reference< ov::XHelperInterface > xDocument );
 +    //TODO helperapi using a writer document
 +    //css::awt::Point calculateTopLeftMargin( css::uno::Reference< oo::vba::XHelperInterface > xDocument );
      

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	Tue Dec  2 10:17:20 2008
@@ -100,7 +100,7 @@
 +#include "unonames.hxx"
  #include "docsh.hxx"
  
- using namespace ::org::openoffice;
+ using namespace ::ooo::vba;
  using namespace ::com::sun::star;
 +using ::com::sun::star::uno::Reference;
 +using ::com::sun::star::uno::UNO_QUERY_THROW;

Modified: trunk/patches/vba/ObjectModule.diff
==============================================================================
--- trunk/patches/vba/ObjectModule.diff	(original)
+++ trunk/patches/vba/ObjectModule.diff	Tue Dec  2 10:17:20 2008
@@ -791,11 +791,11 @@
 +    pDocObject = new SbUnoObject( GetName(), uno::makeAny( aObj ) );
 +            
 +    com::sun::star::uno::Reference< com::sun::star::lang::XServiceInfo > xServiceInfo( aObj, com::sun::star::uno::UNO_QUERY_THROW );
-+    if( xServiceInfo->supportsService( rtl::OUString::createFromAscii( "org.openoffice.excel.Worksheet" ) ) )
++    if( xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Worksheet" ) ) )
 +    {
 +        SetClassName( rtl::OUString::createFromAscii( "Worksheet" ) );
 +    }
-+    else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii( "org.openoffice.excel.Workbook" ) ) )
++    else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Workbook" ) ) )
 +    {
 +        SetClassName( rtl::OUString::createFromAscii( "Workbook" ) );
 +    }
@@ -1244,7 +1244,7 @@
 +    uno::Reference< uno::XInterface > xDocModuleApiObject;
 +    if ( xSF.is() )
 +    {
-+        xVBACodeNamedObjectAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY );    
++        xVBACodeNamedObjectAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY );    
 +        xDocModuleApiObject.set( xVBACodeNamedObjectAccess->getByName( sCodeName ), uno::UNO_QUERY );    
 +    }
 +    return xDocModuleApiObject;
@@ -1442,7 +1442,7 @@
 +            uno::Sequence< uno::Any > aArgs(2);
 +            aArgs[0] = uno::Any( uno::Reference< uno::XInterface >() );
 +            aArgs[1] = uno::Any( mpDocShell->GetModel() );
-+            maWorkbook <<= mxSF->createInstanceWithArguments(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbook") ), aArgs );
++            maWorkbook <<= mxSF->createInstanceWithArguments(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Workbook") ), aArgs );
 +        }
 +    }
 +
@@ -1476,7 +1476,7 @@
 +                        aArgs[0] = maWorkbook;
 +                        aArgs[1] = uno::Any( xModel );
 +                        aArgs[2] = uno::Any( rtl::OUString( sSheetName ) );
-+                        maCachedObject <<= mxSF->createInstanceWithArguments(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet") ), aArgs );
++                        maCachedObject <<= mxSF->createInstanceWithArguments(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheet") ), aArgs );
 +                        break;
 +                    }
 +                }
@@ -1524,7 +1524,7 @@
          SC_SERVICENAME_FORMULAPARS,                 // SC_SERVICE_FORMULAPARS
 -        SC_SERVICENAME_OPCODEMAPPER                 // SC_SERVICE_OPCODEMAPPER
 +        SC_SERVICENAME_OPCODEMAPPER,                 // SC_SERVICE_OPCODEMAPPER
-+"org.openoffice.vba.VBAObjectModuleObjectProvider",// SC_SERVICE_VBAOBJECTPROVIDER
++"ooo.vba.VBAObjectModuleObjectProvider",// SC_SERVICE_VBAOBJECTPROVIDER
  	};
  
  //
@@ -1774,7 +1774,7 @@
 +                {
 +                    try
 +                    {
-+                        xVBAObjectForCodeName.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.VBAObjectModuleObjectProvider"))), UNO_QUERY );
++                        xVBAObjectForCodeName.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), UNO_QUERY );
 +                    }
 +                    catch( Exception& ) { }
 +                }
@@ -1862,7 +1862,7 @@
 +				uno::Reference< lang::XMultiServiceFactory> xSF( rDocSh.GetModel(), uno::UNO_QUERY);
 +				uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess;
 +    				if ( xSF.is() )
-+				        xVBACodeNamedObjectAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY );    
++				        xVBACodeNamedObjectAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY );    
 +				// get the api object for the codename
 +				if ( xVBACodeNamedObjectAccess.is() )
 +				{

Modified: trunk/patches/vba/api-application-caller.diff
==============================================================================
--- trunk/patches/vba/api-application-caller.diff	(original)
+++ trunk/patches/vba/api-application-caller.diff	Tue Dec  2 10:17:20 2008
@@ -1,5 +1,5 @@
---- /data4/Latest/ooo-build/build/ooh680-m1/oovbaapi/org/openoffice/excel/XApplication.idl	2007-12-07 11:21:12.000000000 +0000
-+++ oovbaapi/org/openoffice/excel/XApplication.idl	2008-01-11 12:10:02.000000000 +0000
+--- oovbaapi/ooo/vba/excel/XApplication.idl	2007-12-07 11:21:12.000000000 +0000
++++ oovbaapi/ooo/vba/excel/XApplication.idl	2008-01-11 12:10:02.000000000 +0000
 @@ -103,6 +103,7 @@ interface XApplication
          raises(com::sun::star::script::BasicErrorException);
  	void Volatile([in] any Volatile);
@@ -8,7 +8,7 @@
  };
  
  }; }; };
---- /data4/Latest/ooo-build/build/ooh680-m1/sc/source/ui/vba/vbaapplication.hxx	2007-12-07 10:43:17.000000000 +0000
+--- sc/source/ui/vba/vbaapplication.hxx	2007-12-07 10:43:17.000000000 +0000
 +++ sc/source/ui/vba/vbaapplication.hxx	2008-01-11 12:14:50.000000000 +0000
 @@ -105,6 +105,7 @@ public:
  	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);
@@ -18,7 +18,7 @@
  	// XHelperInterface
  	virtual rtl::OUString& getServiceImplName();
  	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
---- /data4/Latest/ooo-build/build/ooh680-m1/sc/source/ui/vba/vbaapplication.cxx	2007-12-07 10:43:04.000000000 +0000
+--- sc/source/ui/vba/vbaapplication.cxx	2007-12-07 10:43:04.000000000 +0000
 +++ sc/source/ui/vba/vbaapplication.cxx	2008-01-11 12:34:20.000000000 +0000
 @@ -95,6 +95,8 @@ using namespace ::com::sun::star;
  

Modified: trunk/patches/vba/basic-ide-module-object-name-combile.diff
==============================================================================
--- trunk/patches/vba/basic-ide-module-object-name-combile.diff	(original)
+++ trunk/patches/vba/basic-ide-module-object-name-combile.diff	Tue Dec  2 10:17:20 2008
@@ -1,5 +1,5 @@
---- oovbaapi/org/openoffice/excel/XWorksheet.idl.orig	2008-08-27 11:22:16.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XWorksheet.idl	2008-08-27 11:22:34.000000000 +0800
+--- oovbaapi/ooo/vba/excel/XWorksheet.idl.orig	2008-08-27 11:22:16.000000000 +0800
++++ oovbaapi/ooo/vba/excel/XWorksheet.idl	2008-08-27 11:22:34.000000000 +0800
 @@ -42,6 +42,9 @@
  #include <com/sun/star/script/XInvocation.idl>
  #endif
@@ -23,9 +23,9 @@
 --- sc/source/ui/vba/vbaworksheet.hxx.orig	2008-08-27 11:22:16.000000000 +0800
 +++ sc/source/ui/vba/vbaworksheet.hxx	2008-08-27 11:22:23.000000000 +0800
 @@ -45,6 +45,7 @@
- #include <org/openoffice/excel/XPageSetup.hpp>
- #include <org/openoffice/excel/XHPageBreaks.hpp>
- #include <org/openoffice/excel/XChartObjects.hpp>
+ #include <ooo/vba/excel/XPageSetup.hpp>
+ #include <ooo/vba/excel/XHPageBreaks.hpp>
+ #include <ooo/vba/excel/XChartObjects.hpp>
 +#include <com/sun/star/container/XNamed.hpp>
  
  #include "vbahelperinterface.hxx"

Modified: trunk/patches/vba/oovbaapi-disable-vba.diff
==============================================================================
--- trunk/patches/vba/oovbaapi-disable-vba.diff	(original)
+++ trunk/patches/vba/oovbaapi-disable-vba.diff	Tue Dec  2 10:17:20 2008
@@ -12,9 +12,9 @@
  # symbol files of Microsoft API
  MYSYMFILES = access.api vba.api adodb.api msforms.api word.api dao.api powerpoint.api excel.api stdole.api
  
---- oovbaapi/org/openoffice/constants/makefile.mk	2007-08-30 19:30:00.000000000 +0200
-+++ oovbaapi/org/openoffice/constants/makefile.mk	2007-08-30 19:31:48.000000000 +0200
-@@ -42,11 +42,6 @@ PACKAGE=org$/openoffice$/constants
+--- oovbaapi/ooo/vba/constants/makefile.mk	2007-08-30 19:30:00.000000000 +0200
++++ oovbaapi/ooo/vba/constants/makefile.mk	2007-08-30 19:31:48.000000000 +0200
+@@ -42,11 +42,6 @@ PACKAGE=ooo$/vba$/constants
  # --- Settings -----------------------------------------------------
  .INCLUDE :  $(PRJ)$/util$/makefile.pmk
  
@@ -32,9 +32,9 @@
 
 -.ENDIF
 -
---- oovbaapi/org/openoffice/excel/makefile.mk	2007-09-01 11:42:58.000000000 +0200
-+++ oovbaapi/org/openoffice/excel/makefile.mk	2007-09-01 11:55:50.000000000 +0200
-@@ -42,11 +42,6 @@ PACKAGE=org$/openoffice$/Excel
+--- oovbaapi/ooo/vba/excel/makefile.mk	2007-09-01 11:42:58.000000000 +0200
++++ oovbaapi/ooo/vba/excel/makefile.mk	2007-09-01 11:55:50.000000000 +0200
+@@ -42,11 +42,6 @@ PACKAGE=ooo$/vba$/Excel
  # --- Settings -----------------------------------------------------
  .INCLUDE :  $(PRJ)$/util$/makefile.pmk
  
@@ -46,9 +46,9 @@
  # ------------------------------------------------------------------------
  
  
---- oovbaapi/org/openoffice/msforms/makefile.mk	2007-08-30 19:30:20.000000000 +0200
-+++ oovbaapi/org/openoffice/msforms/makefile.mk	2007-08-30 19:31:31.000000000 +0200
-@@ -42,11 +42,6 @@ PACKAGE=org$/openoffice$/msforms
+--- oovbaapi/ooo/vba/msforms/makefile.mk	2007-08-30 19:30:20.000000000 +0200
++++ oovbaapi/ooo/vba/msforms/makefile.mk	2007-08-30 19:31:31.000000000 +0200
+@@ -42,11 +42,6 @@ PACKAGE=ooo$/vba$/msforms
  # --- Settings -----------------------------------------------------
  .INCLUDE :  $(PRJ)$/util$/makefile.pmk
  
@@ -60,9 +60,9 @@
  # ------------------------------------------------------------------------
  
  IDLFILES=\
---- oovbaapi/org/openoffice/vba/makefile.mk	2007-08-30 19:30:25.000000000 +0200
-+++ oovbaapi/org/openoffice/vba/makefile.mk	2007-08-30 19:31:38.000000000 +0200
-@@ -42,11 +42,6 @@ PACKAGE=org$/openoffice$/vba
+--- oovbaapi/ooo/vba/makefile.mk	2007-08-30 19:30:25.000000000 +0200
++++ oovbaapi/ooo/vba/makefile.mk	2007-08-30 19:31:38.000000000 +0200
+@@ -42,11 +42,6 @@ PACKAGE=ooo$/vba
  # --- Settings -----------------------------------------------------
  .INCLUDE :  $(PRJ)$/util$/makefile.pmk
  

Modified: trunk/patches/vba/svx-source-form-fmundo-cxx.diff
==============================================================================
--- trunk/patches/vba/svx-source-form-fmundo-cxx.diff	(original)
+++ trunk/patches/vba/svx-source-form-fmundo-cxx.diff	Tue Dec  2 10:17:20 2008
@@ -42,7 +42,7 @@
 +				{
 +					m_vbaListener.set( xMFac->createInstanceWithContext( 
 +						rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
-+							"org.openoffice.vba.EventListener"  ) ), xCtx ), 
++							"ooo.vba.EventListener"  ) ), xCtx ), 
 +								UNO_QUERY_THROW );
 +				}
 +			}

Modified: trunk/patches/vba/vba-allow-ranges-for-cell-functions.diff
==============================================================================
--- trunk/patches/vba/vba-allow-ranges-for-cell-functions.diff	(original)
+++ trunk/patches/vba/vba-allow-ranges-for-cell-functions.diff	Tue Dec  2 10:17:20 2008
@@ -40,11 +40,11 @@
 +		// hmm probably better not to have to include the vba generated headers
 +		// here, but... if they ever become always available certainly the
 +		// line below is more coder friendly
-+		//xRange = org::openoffice::excel::Range::createRangeFromXCellRange( xCtx , uno::Reference< org::openoffice::vba::XHelperInterface >(), xCellRange );	
++		//xRange = ooo::vba::excel::Range::createRangeFromXCellRange( xCtx , uno::Reference< ooo::vba::XHelperInterface >(), xCellRange );	
 +		uno::Sequence< uno::Any > aArgs(2);
 +		aArgs[0] = uno::Any( uno::Reference< uno::XInterface >() ); // dummy parent
 +		aArgs[1] = uno::Any( xCellRange );
-+		xVBARange = xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Range") ), aArgs, xCtx  );
++		xVBARange = xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Range") ), aArgs, xCtx  );
 +		if ( xVBARange.is() )
 +		{
 +			String sDummy(RTL_CONSTASCII_USTRINGPARAM("A-Range") );

Modified: trunk/patches/vba/vba-error-object.diff
==============================================================================
--- trunk/patches/vba/vba-error-object.diff	(original)
+++ trunk/patches/vba/vba-error-object.diff	Tue Dec  2 10:17:20 2008
@@ -55,17 +55,17 @@
 +#ifndef ERROBJECT_HXX
 +#define ERROBJECT_HXX
 +#include "sbunoobj.hxx"
-+#include <org/openoffice/vba/XErrObject.hpp>
++#include <ooo/vba/XErrObject.hpp>
 +
 +
 +class SbxErrObject : public SbUnoObject
 +{
-+	com::sun::star::uno::Reference< org::openoffice::vba::XErrObject > m_xErr;
++	com::sun::star::uno::Reference< ooo::vba::XErrObject > m_xErr;
 +	SbxErrObject( const String& aName_, const com::sun::star::uno::Any& aUnoObj_ );
 +	~SbxErrObject();
 +public:
 +	static SbxVariableRef getErrObject();
-+	static com::sun::star::uno::Reference< org::openoffice::vba::XErrObject > getUnoErrObject();
++	static com::sun::star::uno::Reference< ooo::vba::XErrObject > getUnoErrObject();
 +};
 +#endif
 --- /dev/null	2006-06-16 14:07:58.000000000 +0100
@@ -81,7 +81,7 @@
 +#include "runtime.hxx"
 +
 +using namespace ::com::sun::star;
-+using namespace ::org::openoffice;
++using namespace ::ooo;
 +
 +typedef ::cppu::WeakImplHelper2< vba::XErrObject, script::XDefaultProperty > ErrObjectImpl_BASE;
 +

Modified: trunk/patches/vba/vba-fix-commandbar-submenu.diff
==============================================================================
--- trunk/patches/vba/vba-fix-commandbar-submenu.diff	(original)
+++ trunk/patches/vba/vba-fix-commandbar-submenu.diff	Tue Dec  2 10:17:20 2008
@@ -63,8 +63,8 @@
 +++ sc/source/ui/vba/vbacommandbarcontrol.hxx	2008-10-21 11:37:30.000000000 +0800
 @@ -66,6 +66,10 @@ private:
  public:
-     ScVbaCommandBarControl( const css::uno::Reference< oo::vba::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sName ) throw (css::uno::RuntimeException);
-     ScVbaCommandBarControl( const css::uno::Reference< oo::vba::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);
+     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);
 +    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; };
@@ -77,7 +77,7 @@
 +++ sc/source/ui/vba/vbacommandbarcontrols.cxx	2008-10-23 15:54:22.000000000 +0800
 @@ -38,6 +38,8 @@
  using namespace com::sun::star;
- using namespace org::openoffice;
+ using namespace ooo::vba;
  
 +uno::Any lcl_getPropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName );
 +

Modified: trunk/patches/vba/vba-fix-font-attribute-access.diff
==============================================================================
--- trunk/patches/vba/vba-fix-font-attribute-access.diff	(original)
+++ trunk/patches/vba/vba-fix-font-attribute-access.diff	Tue Dec  2 10:17:20 2008
@@ -20,14 +20,14 @@
  #include "scitems.hxx"
 +#include "cellsuno.hxx"
  
- using namespace ::org::openoffice;
+ using namespace ::ooo::vba;
  using namespace ::com::sun::star;
 @@ -68,10 +69,22 @@ const sal_Int8 SUBSCRIPTHEIGHT = 58;
  // specifies a hight of normal font
  const short NORMALHEIGHT = 100;
  
--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< vba::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 )
+-ScVbaFont::ScVbaFont( const uno::Reference< 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 )
  {
  }
  
@@ -154,9 +154,9 @@
 +    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 );
+-	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, SfxItemSet* pDataSet = NULL ) throw ( css::uno::RuntimeException );
 -	virtual ~ScVbaFont() {}
-+	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, ScCellRangeObj* pRangeObj = NULL ) throw ( css::uno::RuntimeException );
++	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
@@ -215,13 +215,13 @@
  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;
 @@ -111,6 +112,7 @@ class ScVbaRange : public ScVbaRange_BAS
  	virtual void   setFormulaValue( const css::uno::Any& aValue, ScGrammar::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::vba::XCollection >& getBorders();
  	void groupUnGroup( bool bUnGroup = false ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );

Modified: trunk/patches/vba/vba-fix-ide-friendly-modulename.diff
==============================================================================
--- trunk/patches/vba/vba-fix-ide-friendly-modulename.diff	(original)
+++ trunk/patches/vba/vba-fix-ide-friendly-modulename.diff	Tue Dec  2 10:17:20 2008
@@ -24,7 +24,7 @@
 -				rObjName = xNamed->getName();
 +			uno::Any aObject( aModuleInfo.ModuleObject );
 +			uno::Reference< lang::XServiceInfo > xServiceInfo( aObject, uno::UNO_QUERY );
-+			if( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString::createFromAscii( "org.openoffice.excel.Worksheet" ) ) )
++			if( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Worksheet" ) ) )
 +			{
 +				uno::Reference< container::XNamed > xNamed( aObject, uno::UNO_QUERY );
 +				if( xNamed.is() )

Modified: trunk/patches/vba/vba-font-api.diff
==============================================================================
--- trunk/patches/vba/vba-font-api.diff	(original)
+++ trunk/patches/vba/vba-font-api.diff	Tue Dec  2 10:17:20 2008
@@ -1,5 +1,5 @@
---- oovbaapi/org/openoffice/excel/XFont.idl.orig	2008-04-11 17:51:41.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XFont.idl	2008-10-09 13:45:55.000000000 +0800
+--- oovbaapi/ooo/vba/excel/XFont.idl.orig	2008-04-11 17:51:41.000000000 +0800
++++ oovbaapi/ooo/vba/excel/XFont.idl	2008-10-09 13:45:55.000000000 +0800
 @@ -63,6 +63,7 @@ interface XFont
  	[attribute] any Subscript;
  	[attribute] any Superscript;

Modified: trunk/patches/vba/vba-userform.diff
==============================================================================
--- trunk/patches/vba/vba-userform.diff	(original)
+++ trunk/patches/vba/vba-userform.diff	Tue Dec  2 10:17:20 2008
@@ -327,7 +327,7 @@
 +            aArgs[ 0 ] = uno::Any();
 +            aArgs[ 1 ] <<= m_xDialog;
 +            aArgs[ 2 ] <<= m_xModel;
-+            pDocObject = new SbUnoObject( GetName(), uno::makeAny( xFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.UserForm")), aArgs  ) ) );
++            pDocObject = new SbUnoObject( GetName(), uno::makeAny( xFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.UserForm")), aArgs  ) ) );
 +            uno::Reference< lang::XComponent > xComponent( aArgs[ 1 ], uno::UNO_QUERY_THROW );
 +            // remove old listener if it exists
 +            FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() );

Modified: trunk/patches/vba/vba-workbook-worksheet-events.diff
==============================================================================
--- trunk/patches/vba/vba-workbook-worksheet-events.diff	(original)
+++ trunk/patches/vba/vba-workbook-worksheet-events.diff	Tue Dec  2 10:17:20 2008
@@ -435,7 +435,7 @@
 +
 +using namespace std;
 +using namespace com::sun::star;
-+using namespace org::openoffice;
++using namespace ooo::vba;
 +using namespace com::sun::star::document::VbaEventId;
 +
 +const static String sLibrary( RTL_CONSTASCII_USTRINGPARAM("Standard"));
@@ -886,7 +886,7 @@
 +		uno::Sequence< uno::Any > aArgs(2);
 +		aArgs[0] = uno::Any( uno::Reference< uno::XInterface >() );
 +		aArgs[1] = uno::Any( pShell->GetModel() );
-+		uno::Reference< uno::XInterface > xWorkbook( xSMgr->createInstanceWithArgumentsAndContext(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbook") ), aArgs, xCtx ), uno::UNO_QUERY );
++		uno::Reference< uno::XInterface > xWorkbook( xSMgr->createInstanceWithArgumentsAndContext(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Workbook") ), aArgs, xCtx ), uno::UNO_QUERY );
 +
 +		// create WorkSheet
 +		String sSheetName;
@@ -895,7 +895,7 @@
 +		aArgs[ 0 ] <<= xWorkbook;
 +		aArgs[ 1 ] <<= pShell->GetModel();
 +		aArgs[ 2 ] = uno::makeAny( rtl::OUString( sSheetName ) );
-+		aRet <<= xSMgr->createInstanceWithArgumentsAndContext(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet") ), aArgs, xCtx );
++		aRet <<= xSMgr->createInstanceWithArgumentsAndContext(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheet") ), aArgs, xCtx );
 +	}
 +	catch( uno::Exception& e )
 +	{
@@ -929,7 +929,7 @@
 +			{
 +				throw uno::RuntimeException(); // 
 +			}
-+			aRet <<= xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Range") ), aArgs, xCtx  );	
++			aRet <<= xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Range") ), aArgs, xCtx  );	
 +		}
 +	}
 +	catch( uno::Exception& e ) 
@@ -953,7 +953,7 @@
 +			aArgs[0] = uno::Any( uno::Reference< uno::XInterface >() ); // dummy parent
 +			aArgs[1] <<= rCell;
 +			
-+			aRet <<= xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Hyperlink") ), aArgs, xCtx  );	
++			aRet <<= xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Hyperlink") ), aArgs, xCtx  );	
 +		}
 +		else
 +		{
@@ -975,7 +975,7 @@
 +        uno::Sequence< uno::Any > aWindowArgs(2);
 +        aWindowArgs[0] = uno::Any( uno::Reference< uno::XInterface > () );
 +        aWindowArgs[1] = uno::Any( xModel );
-+        uno::Reference< uno::XInterface > xWindow( xSF->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Window" ) ), aWindowArgs ), uno::UNO_QUERY );
++        uno::Reference< uno::XInterface > xWindow( xSF->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Window" ) ), aWindowArgs ), uno::UNO_QUERY );
 +        if( xWindow.is() )
 +            return uno::makeAny( xWindow );
 +    }

Modified: trunk/patches/vba/vba-worksheet-enableselection.diff
==============================================================================
--- trunk/patches/vba/vba-worksheet-enableselection.diff	(original)
+++ trunk/patches/vba/vba-worksheet-enableselection.diff	Tue Dec  2 10:17:20 2008
@@ -1,5 +1,5 @@
---- oovbaapi/org/openoffice/excel/XWorksheet.idl.orig	2008-07-29 18:14:09.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XWorksheet.idl	2008-07-29 18:17:10.000000000 +0800
+--- oovbaapi/ooo/vba/excel/XWorksheet.idl.orig	2008-07-29 18:14:09.000000000 +0800
++++ oovbaapi/ooo/vba/excel/XWorksheet.idl	2008-07-29 18:17:10.000000000 +0800
 @@ -70,6 +70,7 @@ interface XWorksheet
  	[attribute, readonly] XWorksheet Previous;
  	[attribute, readonly] string CodeName;
@@ -11,8 +11,8 @@
 --- sc/source/ui/vba/vbaworksheet.hxx.orig	2008-07-29 18:14:09.000000000 +0800
 +++ sc/source/ui/vba/vbaworksheet.hxx	2008-07-29 18:17:49.000000000 +0800
 @@ -96,6 +96,8 @@ public:
- 	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::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);
 + 	virtual sal_Int32 SAL_CALL getEnableSelection() throw (css::uno::RuntimeException);
 + 	virtual void SAL_CALL setEnableSelection( sal_Int32 nSelection ) throw (css::uno::RuntimeException);
@@ -25,7 +25,7 @@
  #include <com/sun/star/drawing/XControlShape.hpp>
  #include <com/sun/star/form/FormComponentType.hpp>
  #include <com/sun/star/form/XFormsSupplier.hpp>
-+#include <org/openoffice/excel/XlEnableSelection.hpp>
++#include <ooo/vba/excel/XlEnableSelection.hpp>
  
  #include <comphelper/processfactory.hxx>
  

Modified: trunk/patches/vba/vbaevents-services-sources.diff
==============================================================================
--- trunk/patches/vba/vbaevents-services-sources.diff	(original)
+++ trunk/patches/vba/vbaevents-services-sources.diff	Tue Dec  2 10:17:20 2008
@@ -67,7 +67,7 @@
 +#include <comphelper/proparrhlp.hxx>
 +#include <comphelper/propertycontainer.hxx>
 +
-+#include <org/openoffice/vba/XVBAToOOEventDescGen.hpp>
++#include <ooo/vba/XVBAToOOEventDescGen.hpp>
 +
 +#include <com/sun/star/beans/XPropertySet.hpp>
 +#include <com/sun/star/beans/XIntrospection.hpp>
@@ -120,7 +120,7 @@
 +using namespace ::com::sun::star;
 +using namespace ::com::sun::star::script;
 +using namespace ::com::sun::star::uno;
-+using namespace ::org::openoffice::vba;
++using namespace ::ooo::vba;
 +
 +
 +// Some constants 
@@ -931,7 +931,7 @@
 +            ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
 +            if ( !pImplName )
 +            {
-+                static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.EventListener" ) );
++                static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.EventListener" ) );
 +                pImplName = &aImplName;
 +            }
 +        }
@@ -961,7 +961,7 @@
 +            ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
 +            if ( !pImplName )
 +            {
-+                static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.vba.VBAToOOEventDesc" ) );
++                static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAToOOEventDesc" ) );
 +                pImplName = &aImplName;
 +            }
 +        }
@@ -1106,12 +1106,12 @@
 +    
 +    <component-description>
 +        <author>Noel Power </author>
-+        <name>org.openoffice.vba.EventListener</name>
++        <name>ooo.vba.EventListener</name>
 +        <description>Event listener to handle ooo events and to translate them to calls to basic macros ala Button_Click etc.</description>
 +        <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
 +        <language>c++</language>
 +        <status value="drafts"/>
-+        <supported-service>org.openoffice.vba.EventListener</supported-service>
++        <supported-service>ooo.vba.EventListener</supported-service>
 +        <type>com.sun.star.uno.XComponentContext</type>        
 +    </component-description>
 +    
@@ -1136,7 +1136,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() )
          {
@@ -1161,7 +1161,7 @@
                  Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
 @@ -240,7 +240,7 @@ namespace dlgprov
                  {
-             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 );
 +                xEventsSupplier.set( xVBAToOOEvtDesc->getEventSupplier( xControl, sControlName ), UNO_QUERY );
@@ -1503,9 +1503,9 @@
  // XServiceInfo
  
  rtl::OUString SAL_CALL ScModelObj::getImplementationName() throw(uno::RuntimeException)
-diff -rup oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl
---- oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl	2007-04-27 08:32:41.000000000 +0100
-+++ oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl	2008-04-28 16:14:51.000000000 +0100
+diff -rup oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl
+--- oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl	2007-04-27 08:32:41.000000000 +0100
++++ oovbaapi/ooo/vba/XVBAToOOEventDescGen.idl	2008-04-28 16:14:51.000000000 +0100
 @@ -46,8 +46,8 @@
  module org {  module openoffice {  module vba { 
  interface XVBAToOOEventDescGen : com::sun::star::uno::XInterface
@@ -1523,7 +1523,7 @@
      LinkUpdateModes.idl\
      XDocumentRevisionListPersistence.idl\
      DocumentRevisionListPersistence.idl \
--    XDocumentLanguages.idl	\
+-    XDocumentLanguages.idl
 +    XDocumentLanguages.idl \
 +    XCodeNameQuery.idl \
 +
@@ -1597,7 +1597,7 @@
  //.........................................................................
 +#include <com/sun/star/frame/XModel.hpp>
 +#include <com/sun/star/document/XCodeNameQuery.hpp>
-+#include <org/openoffice/vba/XVBAToOOEventDescGen.hpp>
++#include <ooo/vba/XVBAToOOEventDescGen.hpp>
 +#include <comphelper/processfactory.hxx>
 +
  namespace frm
@@ -1675,7 +1675,7 @@
 +			{
 +				try
 +				{
-+					Reference< org::openoffice::vba::XVBAToOOEventDescGen > xDescSupplier( xFac->createInstance( rtl::OUString::createFromAscii( "org.openoffice.vba.VBAToOOEventDesc" ) ), UNO_QUERY_THROW );
++					Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( xFac->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBAToOOEventDesc" ) ), UNO_QUERY_THROW );
 +					Reference< XInterface > xIf( getByIndex( _nIndex ) , UNO_QUERY_THROW );
 +					rtl::OUString sCodeName;	
 +					sCodeName = xNameQuery->getCodeNameForObject( xIf );



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