ooo-build r13433 - in trunk: . patches/dev300 patches/vba
- From: pflin svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13433 - in trunk: . patches/dev300 patches/vba
- Date: Wed, 30 Jul 2008 09:39:38 +0000 (UTC)
Author: pflin
Date: Wed Jul 30 09:39:38 2008
New Revision: 13433
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13433&view=rev
Log:
2008-07-30 Fong Lin <pflin novell com>
* patches/dev300/cws-npower11.diff: Add missing vba api into
cws npower11.
* patches/vba/vba-worksheet-enableselection.diff: updated for
cws npower11.
* patches/dev300/apply: updated.
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/cws-npower11.diff
trunk/patches/vba/vba-worksheet-enableselection.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Wed Jul 30 09:39:38 2008
@@ -1558,7 +1558,6 @@
[ VBAObjects ]
SectionOwner => noelpwer
-vba-window-service.diff, jianhua
#FIXME: changed by kendy: Noel, please have a look
sc-hacky-handle-boolean.diff
@@ -1636,15 +1635,8 @@
# fix --disable-vba build
oovbaapi-disable-vba.diff
-# fix for n#353242. missing APIs
-# a set of CommandBar APIs.
-vba-commandbar-bundle.diff, n#353242, Jianhua
-# fix for n#365557. missing APIs of XInterior
-vba-interior.diff, n#365557, Jianhua
#fix for n#309981
vba-fixup-singlerange-sheetref.diff, n#309981, noelpwer
-vba-hyperlink-service.diff, Fong
-vba-pagesetup-object.diff, Fong
#always (try) to set the default property to an SbxUnoObject
vba-always-set-defaultprop.diff, n#388049, noelpwer
#clean up the macro security check, prepare for object/form modules
@@ -1697,24 +1689,8 @@
[ VBAObjects ]
# comparison of tow empty type fix in vba mode
vba-empty-comparison-fix.diff, n#397438, Fong
-# support Range.MergeArea, Range.ShowDetail
-vba-range-missing-api.diff, Fong
-# ListBox.removeItem
-vba-listbox-removeitem.diff, n#405306, Jianhua
-# Range.Find
-vba-range-find.diff, n#405304, Jianhua
-# For SpinButton
-vba-spin-button.diff, n#405308, Jianhua
-# erro compile switch
-vba-scroll-bar-idl-switch.diff, Jianhua
-# Add HPageBreaks object
-vba-pagebreak-object.diff, n#405312, Fong
# Add Worksheet.EnableSelection
vba-worksheet-enableselection.diff, n#405312, Fong
-# Add to support Application.Union
-vba-application-union.diff, n#405313, Fong
-# Add to support Worksheet.Index, and fix for n#403974
-vba-worksheet-fix-n403974.diff, n#403974, Fong
# Fixed for n#407805
basic-not-is-nothing.diff, n#407805, Fong
bytearray-string-fix.diff, i#91911, Fong
@@ -1730,6 +1706,32 @@
#not so useful but perhaps we can build on it later
basic-speedup-fix.diff
+# backup for npower11
+# fix for n#353242. missing APIs
+# a set of CommandBar APIs.
+vba-commandbar-bundle.diff, n#353242, Jianhua
+# fix for n#365557. missing APIs of XInterior
+vba-interior.diff, n#365557, Jianhua
+vba-window-service.diff, jianhua
+vba-hyperlink-service.diff, Fong
+vba-pagesetup-object.diff, Fong
+# support Range.MergeArea, Range.ShowDetail
+vba-range-missing-api.diff, Fong
+# ListBox.removeItem
+vba-listbox-removeitem.diff, n#405306, Jianhua
+# Range.Find
+vba-range-find.diff, n#405304, Jianhua
+# For SpinButton
+vba-spin-button.diff, n#405308, Jianhua
+# erro compile switch
+vba-scroll-bar-idl-switch.diff, Jianhua
+# Add HPageBreaks object
+vba-pagebreak-object.diff, n#405312, Fong
+# Add to support Application.Union
+vba-application-union.diff, n#405313, Fong
+# Add to support Worksheet.Index, and fix for n#403974
+vba-worksheet-fix-n403974.diff, n#403974, Fong
+
[ Features ]
# Pre- and postprocessing capabilities for loading and saving.
sfx2-pre-and-postprocess-during-save-load.diff, i#71939, florian
Modified: trunk/patches/dev300/cws-npower11.diff
==============================================================================
--- trunk/patches/dev300/cws-npower11.diff (original)
+++ trunk/patches/dev300/cws-npower11.diff Wed Jul 30 09:39:38 2008
@@ -1,12 +1,107 @@
+cvs diff: Diffing sc
+cvs diff: Diffing sc/addin
+cvs diff: Diffing sc/addin/datefunc
+cvs diff: Diffing sc/addin/inc
+cvs diff: Diffing sc/addin/rot13
+cvs diff: Diffing sc/addin/util
+cvs diff: Diffing sc/inc
+Index: sc/inc/document.hxx
+===================================================================
+RCS file: /cvs/sc/sc/inc/document.hxx,v
+retrieving revision 1.115
+retrieving revision 1.115.22.1
+diff -u -p -b -w -B -r1.115 -r1.115.22.1
+--- sc/inc/document.hxx 8 Jul 2008 07:19:13 -0000 1.115
++++ sc/inc/document.hxx 29 Jul 2008 06:35:39 -0000 1.115.22.1
+@@ -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 -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(
+cvs diff: Diffing sc/inc/pch
+cvs diff: Diffing sc/prj
+cvs diff: Diffing sc/qa
+cvs diff: Diffing sc/qa/complex
+cvs diff: Diffing sc/qa/complex/calcPreview
+cvs diff: Diffing sc/qa/complex/calcPreview/test_documents
+cvs diff: Diffing sc/qa/complex/cellRanges
+cvs diff: Diffing sc/qa/complex/dataPilot
+cvs diff: Diffing sc/qa/complex/dataPilot/interfaceTests
+cvs diff: Diffing sc/qa/complex/dataPilot/interfaceTests/beans
+cvs diff: Diffing sc/qa/complex/dataPilot/interfaceTests/container
+cvs diff: Diffing sc/qa/complex/dataPilot/interfaceTests/sheet
+cvs diff: Diffing sc/qa/complex/sc
+cvs diff: Diffing sc/qa/unoapi
+cvs diff: Diffing sc/qa/unoapi/testdocuments
+cvs diff: Diffing sc/sdi
+cvs diff: Diffing sc/source
+cvs diff: Diffing sc/source/core
+cvs diff: Diffing sc/source/core/data
+cvs diff: Diffing sc/source/core/inc
+cvs diff: Diffing sc/source/core/src
+cvs diff: Diffing sc/source/core/tool
+cvs diff: Diffing sc/source/filter
+cvs diff: Diffing sc/source/filter/dif
+cvs diff: Diffing sc/source/filter/excel
+cvs diff: Diffing sc/source/filter/ftools
+cvs diff: Diffing sc/source/filter/html
+cvs diff: Diffing sc/source/filter/inc
+cvs diff: Diffing sc/source/filter/lotus
+cvs diff: Diffing sc/source/filter/qpro
+cvs diff: Diffing sc/source/filter/rtf
+cvs diff: Diffing sc/source/filter/starcalc
+cvs diff: Diffing sc/source/filter/xcl97
+cvs diff: Diffing sc/source/filter/xml
+cvs diff: Diffing sc/source/ui
+cvs diff: Diffing sc/source/ui/Accessibility
+cvs diff: Diffing sc/source/ui/app
+cvs diff: Diffing sc/source/ui/attrdlg
+cvs diff: Diffing sc/source/ui/cctrl
+cvs diff: Diffing sc/source/ui/dbgui
+cvs diff: Diffing sc/source/ui/docshell
+cvs diff: Diffing sc/source/ui/drawfunc
+cvs diff: Diffing sc/source/ui/formdlg
+cvs diff: Diffing sc/source/ui/inc
+cvs diff: Diffing sc/source/ui/miscdlgs
+cvs diff: Diffing sc/source/ui/namedlg
+cvs diff: Diffing sc/source/ui/navipi
+cvs diff: Diffing sc/source/ui/optdlg
+cvs diff: Diffing sc/source/ui/pagedlg
+cvs diff: Diffing sc/source/ui/src
+cvs diff: Diffing sc/source/ui/styleui
+cvs diff: Diffing sc/source/ui/undo
+cvs diff: Diffing sc/source/ui/unoobj
+cvs diff: Diffing sc/source/ui/vba
Index: sc/source/ui/vba/makefile.mk
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/makefile.mk,v
-retrieving revision 1.5
-retrieving revision 1.5.42.3
-diff -u -p -u -p -b -w -B -r1.5 -r1.5.42.3
---- sc/source/ui/vba/makefile.mk 7 Dec 2007 10:42:39 -0000 1.5
-+++ sc/source/ui/vba/makefile.mk 22 Apr 2008 19:53:15 -0000 1.5.42.3
-@@ -92,6 +92,7 @@ SLOFILES= \
+retrieving revision 1.6
+retrieving revision 1.5.42.5
+diff -u -p -b -w -B -r1.6 -r1.5.42.5
+--- sc/source/ui/vba/makefile.mk 11 Apr 2008 00:46:57 -0000 1.6
++++ sc/source/ui/vba/makefile.mk 29 Jul 2008 06:35:39 -0000 1.5.42.5
+@@ -88,6 +88,7 @@ SLOFILES= \
$(SLO)$/vbabutton.obj \
$(SLO)$/vbalabel.obj \
$(SLO)$/vbatextbox.obj \
@@ -14,7 +109,7 @@
$(SLO)$/vbaradiobutton.obj \
$(SLO)$/vbalistbox.obj \
$(SLO)$/vbapropvalue.obj \
-@@ -115,6 +116,15 @@ SLOFILES= \
+@@ -111,6 +112,24 @@ SLOFILES= \
$(SLO)$/vbaformatconditions.obj \
$(SLO)$/vbastyle.obj \
$(SLO)$/vbastyles.obj \
@@ -25,20 +120,37 @@
+ $(SLO)$/vbaframe.obj \
+ $(SLO)$/vbascrollbar.obj \
+ $(SLO)$/vbaprogressbar.obj \
-+ $(SLO)$/vbamultipage.obj \
-+ $(SLO)$/vbapages.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)$/service.obj \
Index: sc/source/ui/vba/service.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/service.cxx,v
-retrieving revision 1.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/service.cxx 7 Dec 2007 10:42:52 -0000 1.3
-+++ sc/source/ui/vba/service.cxx 22 Apr 2008 19:53:15 -0000 1.3.42.1
-@@ -62,7 +62,10 @@ namespace globals
+retrieving revision 1.4
+retrieving revision 1.3.42.3
+diff -u -p -b -w -B -r1.4 -r1.3.42.3
+--- sc/source/ui/vba/service.cxx 11 Apr 2008 00:47:11 -0000 1.4
++++ sc/source/ui/vba/service.cxx 29 Jul 2008 06:35:39 -0000 1.3.42.3
+@@ -53,11 +53,22 @@ namespace worksheet
+ {
+ extern sdecl::ServiceDecl const serviceDecl;
+ }
++namespace window
++{
++extern sdecl::ServiceDecl const serviceDecl;
++}
+ namespace globals
{
extern sdecl::ServiceDecl const serviceDecl;
}
@@ -47,54 +159,87 @@
+{
+extern sdecl::ServiceDecl const serviceDecl;
+}
++namespace hyperlink
++{
++extern sdecl::ServiceDecl const serviceDecl;
++}
extern "C"
-@@ -81,7 +84,7 @@ extern "C"
+@@ -76,7 +87,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 ) )
++ range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl ) )
{
// Singleton registration
try
-@@ -109,7 +112,7 @@ extern "C"
+@@ -104,7 +115,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 );
++ 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
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/vbaapplication.cxx,v
-retrieving revision 1.5
-retrieving revision 1.5.42.2
-diff -u -p -u -p -b -w -B -r1.5 -r1.5.42.2
---- sc/source/ui/vba/vbaapplication.cxx 7 Dec 2007 10:43:04 -0000 1.5
-+++ sc/source/ui/vba/vbaapplication.cxx 14 Feb 2008 15:15:46 -0000 1.5.42.2
-@@ -62,6 +62,8 @@
+retrieving revision 1.7
+retrieving revision 1.5.42.4
+diff -u -p -b -w -B -r1.7 -r1.5.42.4
+--- sc/source/ui/vba/vbaapplication.cxx 11 Apr 2008 00:47:25 -0000 1.7
++++ sc/source/ui/vba/vbaapplication.cxx 29 Jul 2008 06:35:39 -0000 1.5.42.4
+@@ -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>
-@@ -127,9 +129,16 @@ ScVbaApplication::getThisWorkbook() thro
+@@ -78,6 +82,10 @@
+ #include <basic/sbuno.hxx>
+ #include <basic/sbmeth.hxx>
+
++#include "convuno.hxx"
++#include "cellsuno.hxx"
++#include "docsh.hxx"
++
+ using namespace ::org::openoffice;
+ using namespace ::com::sun::star;
+
+@@ -122,9 +130,25 @@ ScVbaApplication::getThisWorkbook() thro
return getActiveWorkbook();
}
+uno::Reference< vba::XAssistant > SAL_CALL
-+ScVbaApplication::getAssistant() throw (css::uno::RuntimeException)
++ScVbaApplication::getAssistant() throw (uno::RuntimeException)
+{
+ return uno::Reference< vba::XAssistant >( new ScVbaAssistant( this, mxContext ) );
+}
+
++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 );
++}
++
uno::Any SAL_CALL
ScVbaApplication::getSelection() throw (uno::RuntimeException)
{
@@ -102,7 +247,7 @@
uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
-@@ -137,6 +146,17 @@ ScVbaApplication::getSelection() throw (
+@@ -132,6 +156,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 );
@@ -120,7 +265,7 @@
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")) ||
-@@ -431,12 +451,17 @@ ScVbaApplication::Range( const uno::Any&
+@@ -426,12 +461,17 @@ ScVbaApplication::Range( const uno::Any&
}
uno::Any SAL_CALL
@@ -141,23 +286,122 @@
}
+@@ -883,6 +923,97 @@ ScVbaApplication::Intersect( const uno::
+ 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)
++{
++ std::vector< uno::Reference< excel::XRange > > vRanges;
++ if ( !Arg1.is() || !Arg2.is() )
++ DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++
++ vRanges.push_back( Arg1 );
++ vRanges.push_back( Arg2 );
++
++ if ( Arg3.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg3, uno::UNO_QUERY_THROW ) );
++ if ( Arg4.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg4, uno::UNO_QUERY_THROW ) );
++ if ( Arg5.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg5, uno::UNO_QUERY_THROW ) );
++ if ( Arg6.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg6, uno::UNO_QUERY_THROW ) );
++ if ( Arg7.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg7, uno::UNO_QUERY_THROW ) );
++ if ( Arg8.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg8, uno::UNO_QUERY_THROW ) );
++ if ( Arg9.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg9, uno::UNO_QUERY_THROW ) );
++ if ( Arg10.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg10, uno::UNO_QUERY_THROW ) );
++ if ( Arg11.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg11, uno::UNO_QUERY_THROW ) );
++ if ( Arg12.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg12, uno::UNO_QUERY_THROW ) );
++ if ( Arg13.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg13, uno::UNO_QUERY_THROW ) );
++ if ( Arg14.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg14, uno::UNO_QUERY_THROW ) );
++ if ( Arg15.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg15, uno::UNO_QUERY_THROW ) );
++ if ( Arg16.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg16, uno::UNO_QUERY_THROW ) );
++ if ( Arg17.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg17, uno::UNO_QUERY_THROW ) );
++ if ( Arg18.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg18, uno::UNO_QUERY_THROW ) );
++ if ( Arg19.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg19, uno::UNO_QUERY_THROW ) );
++ if ( Arg20.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg20, uno::UNO_QUERY_THROW ) );
++ if ( Arg21.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg21, uno::UNO_QUERY_THROW ) );
++ if ( Arg22.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg22, uno::UNO_QUERY_THROW ) );
++ if ( Arg23.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg23, uno::UNO_QUERY_THROW ) );
++ if ( Arg24.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg24, uno::UNO_QUERY_THROW ) );
++ if ( Arg25.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg25, uno::UNO_QUERY_THROW ) );
++ if ( Arg26.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg26, uno::UNO_QUERY_THROW ) );
++ if ( Arg27.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg27, uno::UNO_QUERY_THROW ) );
++ if ( Arg28.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg28, uno::UNO_QUERY_THROW ) );
++ if ( Arg29.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg29, uno::UNO_QUERY_THROW ) );
++ if ( Arg30.hasValue() )
++ vRanges.push_back( uno::Reference< excel::XRange >( Arg30, uno::UNO_QUERY_THROW ) );
++
++ std::vector< uno::Reference< excel::XRange > >::iterator it = vRanges.begin();
++ std::vector< uno::Reference< excel::XRange > >::iterator it_end = vRanges.end();
++
++ uno::Reference< excel::XRange > xRange;
++ ScRangeList aCellRanges;
++ for( ; it != it_end; ++it )
++ {
++ xRange = *it;
++ uno::Reference< table::XCellRange > xRangeParam;
++ xRange->getCellRange() >>= xRangeParam;
++ uno::Reference< sheet::XCellRangeAddressable > xAddressable( xRangeParam, uno::UNO_QUERY_THROW );
++ ScRange refRange;
++ ScUnoConversion::FillScRange( refRange, xAddressable->getRangeAddress() );
++ aCellRanges.Append( refRange );
++ }
++
++ uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
++ ScDocShell* pDocShell = getDocShell( xModel );
++ uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
++ // #FIXME need proper (WorkSheet) parent
++ xRange = new ScVbaRange( uno::Reference< vba::XHelperInterface >(), mxContext, xRanges );
++ 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.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbaapplication.hxx 7 Dec 2007 10:43:17 -0000 1.3
-+++ sc/source/ui/vba/vbaapplication.hxx 18 Jan 2008 16:51:37 -0000 1.3.42.1
-@@ -80,6 +80,7 @@ public:
+retrieving revision 1.4
+retrieving revision 1.3.42.3
+diff -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);
-@@ -99,7 +100,7 @@ public:
+@@ -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);
@@ -166,6 +410,10 @@
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
===================================================================
RCS file: sc/source/ui/vba/vbaassistant.cxx
@@ -401,12 +649,12 @@
Index: sc/source/ui/vba/vbaaxis.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/vbaaxis.cxx,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/vbaaxis.cxx 7 Dec 2007 10:43:48 -0000 1.2
-+++ sc/source/ui/vba/vbaaxis.cxx 28 Jan 2008 11:00:30 -0000 1.2.42.1
-@@ -47,8 +47,8 @@ using namespace ::org::openoffice::excel
+retrieving revision 1.3
+retrieving revision 1.2.42.2
+diff -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") );
@@ -417,7 +665,7 @@
ScVbaChart*
ScVbaAxis::getChartPtr() throw( uno::RuntimeException )
{
-@@ -142,12 +142,12 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCro
+@@ -137,12 +137,12 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCro
bCrossesAreCustomized = sal_False;
return;
case xlAxisCrossesMinimum: // The axis crosses at the minimum value.
@@ -432,7 +680,7 @@
setCrossesAt(fNum);
bCrossesAreCustomized = sal_False;
break;
-@@ -182,7 +182,7 @@ ScVbaAxis::getCrosses( ) throw (script:
+@@ -177,7 +177,7 @@ ScVbaAxis::getCrosses( ) throw (script:
mxPropertySet->getPropertyValue(ORIGIN) >>= forigin;
//obsolete double fmax = AnyConverter.toDouble(mxPropertySet.getPropertyValue("Max"));
double fmin = 0.0;
@@ -444,12 +692,12 @@
Index: sc/source/ui/vba/vbabutton.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/vbabutton.cxx,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/vbabutton.cxx 7 Dec 2007 10:44:58 -0000 1.2
-+++ sc/source/ui/vba/vbabutton.cxx 22 Apr 2008 19:53:15 -0000 1.2.42.1
-@@ -40,7 +40,7 @@ using namespace org::openoffice;
+retrieving revision 1.3
+retrieving revision 1.2.42.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbabutton.cxx 11 Apr 2008 00:50:02 -0000 1.3
++++ sc/source/ui/vba/vbabutton.cxx 6 Jul 2008 15:31:19 -0000 1.2.42.2
+@@ -35,7 +35,7 @@ using namespace org::openoffice;
const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
@@ -458,7 +706,7 @@
{
}
-@@ -58,3 +58,22 @@ ScVbaButton::setCaption( const rtl::OUSt
+@@ -53,3 +53,22 @@ ScVbaButton::setCaption( const rtl::OUSt
{
m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
}
@@ -484,12 +732,12 @@
Index: sc/source/ui/vba/vbabutton.hxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/vbabutton.hxx,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/vbabutton.hxx 7 Dec 2007 10:45:09 -0000 1.2
-+++ sc/source/ui/vba/vbabutton.hxx 22 Apr 2008 19:53:15 -0000 1.2.42.1
-@@ -45,10 +45,12 @@ typedef cppu::ImplInheritanceHelper1< Sc
+retrieving revision 1.3
+retrieving revision 1.2.42.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbabutton.hxx 11 Apr 2008 00:50:19 -0000 1.3
++++ sc/source/ui/vba/vbabutton.hxx 6 Jul 2008 15:29:34 -0000 1.2.42.2
+@@ -40,10 +40,12 @@ typedef cppu::ImplInheritanceHelper1< Sc
class ScVbaButton : public ButtonImpl_BASE
{
public:
@@ -507,12 +755,12 @@
Index: sc/source/ui/vba/vbacharacters.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/vbacharacters.cxx,v
-retrieving revision 1.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbacharacters.cxx 7 Dec 2007 10:45:21 -0000 1.3
-+++ sc/source/ui/vba/vbacharacters.cxx 14 Feb 2008 15:15:46 -0000 1.3.42.1
-@@ -51,7 +51,11 @@ ScVbaCharacters::ScVbaCharacters( const
+retrieving revision 1.4
+retrieving revision 1.3.42.2
+diff -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 )
@@ -709,12 +957,12 @@
Index: sc/source/ui/vba/vbacombobox.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/vbacombobox.cxx,v
-retrieving revision 1.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbacombobox.cxx 7 Dec 2007 10:48:18 -0000 1.3
-+++ sc/source/ui/vba/vbacombobox.cxx 22 Apr 2008 19:53:15 -0000 1.3.42.1
-@@ -39,34 +39,93 @@ using namespace com::sun::star;
+retrieving revision 1.4
+retrieving revision 1.3.42.2
+diff -u -p -b -w -B -r1.4 -r1.3.42.2
+--- sc/source/ui/vba/vbacombobox.cxx 11 Apr 2008 00:55:28 -0000 1.4
++++ sc/source/ui/vba/vbacombobox.cxx 6 Jul 2008 15:29:37 -0000 1.3.42.2
+@@ -34,34 +34,93 @@ using namespace com::sun::star;
using namespace org::openoffice;
@@ -815,7 +1063,7 @@
::rtl::OUString SAL_CALL
ScVbaComboBox::getText() throw (uno::RuntimeException)
{
-@@ -145,3 +204,22 @@ ScVbaComboBox::Clear( ) throw (uno::Run
+@@ -140,3 +199,22 @@ ScVbaComboBox::Clear( ) throw (uno::Run
setValue( uno::makeAny( rtl::OUString() ) );
m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
}
@@ -841,12 +1089,12 @@
Index: sc/source/ui/vba/vbacombobox.hxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/vba/vbacombobox.hxx,v
-retrieving revision 1.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbacombobox.hxx 7 Dec 2007 10:48:31 -0000 1.3
-+++ sc/source/ui/vba/vbacombobox.hxx 22 Apr 2008 19:53:15 -0000 1.3.42.1
-@@ -49,22 +49,16 @@
+retrieving revision 1.4
+retrieving revision 1.3.42.2
+diff -u -p -b -w -B -r1.4 -r1.3.42.2
+--- sc/source/ui/vba/vbacombobox.hxx 11 Apr 2008 00:55:42 -0000 1.4
++++ sc/source/ui/vba/vbacombobox.hxx 6 Jul 2008 15:30:26 -0000 1.3.42.2
+@@ -44,22 +44,16 @@
typedef cppu::ImplInheritanceHelper2<ScVbaControl, oo::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
class ScVbaComboBox : public ComboBoxImpl_BASE
{
@@ -873,7 +1121,7 @@
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);
-@@ -76,6 +70,9 @@ public:
+@@ -71,6 +65,9 @@ public:
// XDefaultProperty
::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
@@ -883,491 +1131,349 @@
};
#endif //
-Index: sc/source/ui/vba/vbacontrol.cxx
+Index: sc/source/ui/vba/vbacommandbar.cxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbacontrol.cxx,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/vbacontrol.cxx 7 Dec 2007 10:49:52 -0000 1.2
-+++ sc/source/ui/vba/vbacontrol.cxx 22 Apr 2008 19:53:15 -0000 1.2.42.1
-@@ -49,17 +49,25 @@
- #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"
-
-
- 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)
- {
-+ // #FIXME why don't we already have the XModel instead of getting it
-+ // directly from the controlmodel, probablye we thought there was a reason
-+ // at some stage.
-+ uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
+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 @@
++/*************************************************************************
++ *
++ * 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/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>
+
- uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
- //init m_xWindowPeer
- uno::Reference< container::XChild > xChild( xControlModel, uno::UNO_QUERY_THROW );
-@@ -67,17 +75,18 @@ ScVbaControl::getWindowPeer( const uno::
- xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XModel > xModel( xChild->getParent(), uno::UNO_QUERY_THROW );
- uno::Reference< view::XControlAccess > xControlAccess( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
-- uno::Reference< awt::XControl > xControl;
-+ uno::Reference< css::awt::XWindowPeer > xWinPeer;
- 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
-@@ -111,67 +120,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, AbstractGeometryAttributes* pGeomHelper ) : ControlImpl_BASE( xParent, xContext ), m_xControl( xControl )
- {
-- //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 )
++#include "vbacommandbar.hxx"
++#include "vbacommandbarcontrols.hxx"
++#include "vbahelper.hxx"
++
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< vba::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw (uno::RuntimeException) : CommandBar_BASE( xParent, xContext )
++{
++ // it's a menu bar
++ // only supporting factory menus ( no custom menus )
++ m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
++ initCommandBar();
++ switch( nModuleType )
++ {
++ case 0:
++ m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" );
++ break;
++ case 1:
++ m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" );
++ break;
++ default:
++ m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" );
++ }
++ getMenuSettings();
++ m_bIsMenu = sal_True;
++ m_bCustom = sal_False;
++}
++ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< 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 )
++{
++ // 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 ));
++
++ 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
-+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
-@@ -194,132 +180,169 @@ 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 );
++ScVbaCommandBar::getMenuSettings()
++{
++ 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" );
++ }
+}
-+
-+void SAL_CALL ScVbaControl::SetFocus() throw (uno::RuntimeException)
++::rtl::OUString SAL_CALL
++ScVbaCommandBar::getName() throw ( uno::RuntimeException )
+{
-+ uno::Reference< awt::XWindow > xWin( m_xControl, uno::UNO_QUERY_THROW );
-+ xWin->setFocus();
- }
-
- //ScVbaControlFactory
-
--ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XControlShape >& xControlShape ): m_xContext( xContext ), m_xControlShape( xControlShape )
-+ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ): m_xContext( xContext ), m_xControl( xControl )
- {
-- uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
-- uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
-- m_xProps.set( xProps, uno::UNO_QUERY_THROW );
- }
-
--ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, const uno::Reference< drawing::XControlShape > xControlShape ): m_xContext( xContext ), m_xProps( xProps ), m_xControlShape( xControlShape )
-+ScVbaControl* ScVbaControlFactory::createControl( 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 );
++ // 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 );
+
- }
-
--ScVbaControl* ScVbaControlFactory::createControl( const sal_Int16 nClassId ) throw (uno::RuntimeException)
-+ScVbaControl* ScVbaControlFactory::createControl(const uno::Reference< drawing::XControlShape >& xControlShape, const uno::Reference< uno::XInterface >& /*xParent*/ ) throw (uno::RuntimeException)
- {
-+ uno::Reference< beans::XPropertySet > xProps( xControlShape->getControl(), uno::UNO_QUERY_THROW );
-+ sal_Int32 nClassId = -1;
-+ const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
-+ xProps->getPropertyValue( sClassId ) >>= nClassId;
-+ uno::Reference< vba::XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
- switch( nClassId )
- {
- case form::FormComponentType::COMBOBOX:
-- return new ScVbaComboBox( m_xContext, m_xProps, m_xControlShape );
-+ return new ScVbaComboBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::COMMANDBUTTON:
-- return new ScVbaButton( m_xContext, m_xControlShape );
-+ return new ScVbaButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::FIXEDTEXT:
-- return new ScVbaLabel( m_xContext, m_xControlShape );
-+ return new ScVbaLabel( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::TEXTFIELD:
-- return new ScVbaTextBox( m_xContext, m_xControlShape );
-+ return new ScVbaTextBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::RADIOBUTTON:
-- return new ScVbaRadioButton( m_xContext, m_xControlShape );
-+ return new ScVbaRadioButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::LISTBOX:
-- return new ScVbaListBox( m_xContext, m_xControlShape );
-+ return new ScVbaListBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
- }
- }
-
--ScVbaControl* ScVbaControlFactory::createControl() throw (uno::RuntimeException)
-+ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< awt::XControl >& xControl, const uno::Reference< uno::XInterface >& xParent ) throw (uno::RuntimeException)
- {
-- sal_Int32 nClassId = -1;
-- const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
-- m_xProps->getPropertyValue( sClassId ) >>= nClassId;
-- switch( nClassId )
-+ uno::Reference< beans::XPropertySet > xProps( xControl->getModel(), uno::UNO_QUERY_THROW );
-+ uno::Reference< lang::XServiceInfo > xServiceInfo( xProps, uno::UNO_QUERY_THROW );
-+ ScVbaControl* pControl = NULL;
-+ uno::Reference< vba::XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
-+ if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
-+ pControl = new ScVbaCheckbox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlRadioButtonModel") ) ) )
-+ pControl = new ScVbaRadioButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlEditModel") ) ) )
-+ pControl = new ScVbaTextBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), true );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlButtonModel") ) ) )
++ if( m_xUICfgManager->hasSettings( m_sToolBarName ) )
+ {
-+ sal_Bool bToggle = sal_False;
-+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Toggle") ) ) >>= bToggle;
-+ if ( bToggle )
-+ pControl = new ScVbaToggleButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
-+ else
-+ pControl = new ScVbaButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ m_xUICfgManager->replaceSettings( m_sToolBarName, xIndexAccess );
+ }
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") ) ) )
-+ pControl = new ScVbaComboBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), true );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") ) ) )
-+ pControl = new ScVbaListBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") ) ) )
-+ pControl = new ScVbaLabel( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") ) ) )
-+ //pControl = new ScVbaImage( m_xContext, xControl );
-+ throw uno::RuntimeException();
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ) ) )
-+ pControl = new ScVbaProgressBar( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) ) )
-+ pControl = new ScVbaFrame( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlScrollBarModel") ) ) )
-+ pControl = new ScVbaScrollBar( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
-+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
-+ pControl = new ScVbaMultiPage( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), xParent );
+ else
-+ throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
-+ return pControl;
++ {
++ // toolbar not found
++ }
++ if( !m_bTemporary )
++ {
++ m_xUICfgPers->store();
++ }
+}
-+
-+rtl::OUString&
-+ScVbaControl::getServiceImplName()
++::sal_Bool SAL_CALL
++ScVbaCommandBar::getVisible() throw (uno::RuntimeException)
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaContro") );
-+ return sImplName;
++ 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;
+}
-+
-+uno::Sequence< rtl::OUString >
-+ScVbaControl::getServiceNames()
- {
-- case form::FormComponentType::COMBOBOX:
-- return new ScVbaComboBox( m_xContext, m_xControlShape );
-- case form::FormComponentType::COMMANDBUTTON:
-- return new ScVbaButton( m_xContext, m_xControlShape );
-- case form::FormComponentType::FIXEDTEXT:
-- return new ScVbaLabel( m_xContext, m_xControlShape );
-- case form::FormComponentType::TEXTFIELD:
-- return new ScVbaTextBox( m_xContext, m_xControlShape );
-- case form::FormComponentType::RADIOBUTTON:
-- return new ScVbaRadioButton( m_xContext, m_xControlShape );
-- case form::FormComponentType::LISTBOX:
-- return new ScVbaListBox( m_xContext, m_xControlShape );
-- default:
-- throw uno::RuntimeException( rtl::OUString::createFromAscii(
-- "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
++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()
++{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
-+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Control" ) );
- }
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.vba.CommandBar" ) );
++ }
+ return aServiceNames;
- }
-+
-+
-Index: sc/source/ui/vba/vbacontrol.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbacontrol.hxx,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/vbacontrol.hxx 7 Dec 2007 10:50:07 -0000 1.2
-+++ sc/source/ui/vba/vbacontrol.hxx 22 Apr 2008 19:53:15 -0000 1.2.42.1
-@@ -40,40 +40,33 @@
- #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;
-+
-+ 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, 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);
-@@ -87,9 +80,14 @@ 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);
-+
-
- //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();
- };
-
-
-@@ -97,16 +95,13 @@ 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 );
-- ScVbaControl* createControl() throw ( css::uno::RuntimeException );
-+ const css::uno::Reference< css::uno::XInterface >& xControl );
-+ 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;
- };
-
- #endif//SC_VBA_CONTROL_HXX
-Index: sc/source/ui/vba/vbaframe.cxx
++}
+Index: sc/source/ui/vba/vbacommandbar.hxx
===================================================================
-RCS file: sc/source/ui/vba/vbaframe.cxx
-diff -N sc/source/ui/vba/vbaframe.cxx
+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/vbaframe.cxx 22 Apr 2008 19:53:15 -0000 1.1.2.1
-@@ -0,0 +1,93 @@
++++ sc/source/ui/vba/vbacommandbar.hxx 29 Jul 2008 06:35:40 -0000 1.1.2.1
+@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -1402,72 +1508,84 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#include "vbaframe.hxx"
-+#include <vector>
++#ifndef SC_VBA_COMMANDBAR_HXX
++#define SC_VBA_COMMANDBAR_HXX
+
-+using namespace com::sun::star;
-+using namespace org::openoffice;
-+
-+
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+ScVbaFrame::ScVbaFrame( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : FrameImpl_BASE( xParent, xContext, xControl, pGeomHelper )
-+{
-+}
++#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>
+
-+// Attributes
-+rtl::OUString SAL_CALL
-+ScVbaFrame::getCaption() throw (css::uno::RuntimeException)
-+{
-+ rtl::OUString Label;
-+ m_xProps->getPropertyValue( LABEL ) >>= Label;
-+ return Label;
-+}
++#include "vbahelperinterface.hxx"
++#include "vbacommandbars.hxx"
+
-+void SAL_CALL
-+ScVbaFrame::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+ m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-+}
++#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]) ) );
+
-+uno::Any SAL_CALL
-+ScVbaFrame::getValue() throw (css::uno::RuntimeException)
-+{
-+ return uno::makeAny( getCaption() );
-+}
+
-+void SAL_CALL
-+ScVbaFrame::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+ rtl::OUString sCaption;
-+ _value >>= sCaption;
-+ setCaption( sCaption );
-+}
++typedef InheritedHelperInterfaceImpl1< oo::vba::XCommandBar > CommandBar_BASE;
+
-+rtl::OUString&
-+ScVbaFrame::getServiceImplName()
++class ScVbaCommandBar : public CommandBar_BASE
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFrame") );
-+ return sImplName;
-+}
++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; };
++
++ // Attributes
++ virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setName( const ::rtl::OUString& _name ) throw (css::uno::RuntimeException);
++ virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
++
++ // Methods
++ virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++ virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+
-+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
++ // XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif//SC_VBA_COMMANDBAR_HXX
+Index: sc/source/ui/vba/vbacommandbarcontrol.cxx
===================================================================
-RCS file: sc/source/ui/vba/vbaframe.hxx
-diff -N sc/source/ui/vba/vbaframe.hxx
+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/vbaframe.hxx 22 Apr 2008 19:53:15 -0000 1.1.2.1
-@@ -0,0 +1,58 @@
++++ sc/source/ui/vba/vbacommandbarcontrol.cxx 29 Jul 2008 06:35:40 -0000 1.1.2.1
+@@ -0,0 +1,403 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -1502,649 +1620,733 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#ifndef SC_VBA_FRAME_HXX
-+#define SC_VBA_FRAME_HXX
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XLabel.hpp>
++#include "vbacommandbarcontrol.hxx"
+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
++using namespace com::sun::star;
++using namespace org::openoffice;
+
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XLabel > FrameImpl_BASE;
++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();
++}
+
-+class ScVbaFrame : public FrameImpl_BASE
++beans::PropertyValues lcl_repalcePropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName, uno::Any aValue )
+{
-+public:
-+ ScVbaFrame( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
-+ // 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/vbaglobals.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaglobals.cxx,v
-retrieving revision 1.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbaglobals.cxx 7 Dec 2007 10:53:12 -0000 1.3
-+++ sc/source/ui/vba/vbaglobals.cxx 18 Jan 2008 16:51:37 -0000 1.3.42.1
-@@ -158,9 +158,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.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbaglobals.hxx 7 Dec 2007 10:53:25 -0000 1.3
-+++ sc/source/ui/vba/vbaglobals.hxx 18 Jan 2008 16:51:37 -0000 1.3.42.1
-@@ -75,6 +75,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
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbahelper.cxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.3
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.3
---- sc/source/ui/vba/vbahelper.cxx 29 Jan 2008 15:47:18 -0000 1.4
-+++ sc/source/ui/vba/vbahelper.cxx 22 Apr 2008 19:53:15 -0000 1.3.42.3
-@@ -42,6 +42,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>
-
-@@ -62,7 +63,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;
-
-@@ -79,6 +81,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 );
-+}
-+
- uno::Reference< script::XTypeConverter >
- getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
- {
-@@ -220,6 +234,22 @@ 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()
- {
-@@ -536,6 +566,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 );
-+}
-+
- rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
- {
- uno::Type aType = pvargItem.getValueType();
-@@ -749,5 +784,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 );
++ 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;
+}
+
-+#define VBA_LEFT "PositionX"
-+#define VBA_TOP "PositionY"
-+UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< awt::XControl >& xControl )
++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 )
+{
-+ mxModel.set( xControl->getModel(), uno::UNO_QUERY_THROW );
-+}
-+ double UserFormGeometryHelper::getLeft()
++ // exsiting CommandBarBarControl
++ m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
++ initObjects();
++ if( m_xBarSettings->hasElements() )
+ {
-+ sal_Int32 nLeft = 0;
-+ mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft;
-+ return nLeft;
++ 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 >() );
+ }
-+ void UserFormGeometryHelper::setLeft( double nLeft )
++ if( m_bIsMenu )
+ {
-+ mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), uno::makeAny( static_cast< sal_Int32 >( nLeft ) ) );
++ m_sBarName = rtl::OUString::createFromAscii("private:resource/menubar/menubar");
+ }
-+ double UserFormGeometryHelper::getTop()
++ else
+ {
-+ sal_Int32 nTop = 0;
-+ mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ) ) >>= nTop;
-+ return nTop;
++ m_sBarName = m_pCommandBarControls->GetParentToolBarName();
+ }
-+ void UserFormGeometryHelper::setTop( double nTop )
++ 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 )
+ {
-+ mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ), uno::makeAny( static_cast< sal_Int32 >( nTop ) ) );
++ m_sName = sName;
+ }
-+ double UserFormGeometryHelper::getHeight()
++ if( sCommand.getLength() > 0 )
+ {
-+ sal_Int32 nHeight = 0;
-+ mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ) ) >>= nHeight;
-+ return static_cast< double >( nHeight );
++ m_sCommand = sCommand;
+ }
-+ void UserFormGeometryHelper::setHeight( double nHeight )
++ else
+ {
-+ mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ), uno::makeAny( static_cast< sal_Int32 >( nHeight ) ) );
++ m_sCommand = rtl::OUString::createFromAscii("vnd.openoffice.org:") + sName;
+ }
-+ double UserFormGeometryHelper::getWidth()
++ if( m_bIsMenu )
+ {
-+ sal_Int32 nWidth = 0;
-+ mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ) ) >>= nWidth;
-+ return static_cast< sal_Int32 >( nWidth );
++ m_sBarName = rtl::OUString::createFromAscii("private:resource/menubar/menubar");
++ createNewMenuBarControl();
+ }
-+ void UserFormGeometryHelper::setWidth( double nWidth)
++ else
+ {
-+ mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ), uno::makeAny( static_cast< sal_Int32 >( nWidth ) ) );
++ m_sBarName = m_pCommandBarControls->GetParentToolBarName();
++ createNewToolBarControl();
+ }
- } // openoffice
- } //org
-Index: sc/source/ui/vba/vbahelper.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbahelper.hxx,v
-retrieving revision 1.4
-retrieving revision 1.4.42.2
-diff -u -p -u -p -b -w -B -r1.4 -r1.4.42.2
---- sc/source/ui/vba/vbahelper.hxx 7 Dec 2007 10:53:50 -0000 1.4
-+++ sc/source/ui/vba/vbahelper.hxx 22 Apr 2008 19:53:15 -0000 1.4.42.2
-@@ -36,14 +36,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;
-
-@@ -61,10 +65,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();
-@@ -85,6 +91,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 )
-@@ -142,6 +149,80 @@ public:
- return points;
- }
- };
++}
+
-+class AbstractGeometryAttributes // probably should replace the ShapeHelper below
++void
++ScVbaCommandBarControl::initObjects() throw (uno::RuntimeException)
+{
-+public:
-+ virtual ~AbstractGeometryAttributes() {}
-+ virtual double getLeft() = 0;
-+ virtual void setLeft( double ) = 0;
-+ virtual double getTop() = 0;
-+ virtual void setTop( double ) = 0;
-+ virtual double getHeight() = 0;
-+ virtual void setHeight( double ) = 0;
-+ virtual double getWidth() = 0;
-+ virtual void setWidth( double ) = 0;
-+};
++ 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;
++}
+
-+class ConcreteXShapeGeometryAttributes : public AbstractGeometryAttributes
++void
++ScVbaCommandBarControl::createNewMenuBarControl()
+{
-+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()
++ uno::Sequence< beans::PropertyValue > aPropertys(4);
++ aPropertys[0].Name = rtl::OUString::createFromAscii("CommandURL");
++ aPropertys[0].Value <<= m_sCommand;
++ aPropertys[1].Name = rtl::OUString::createFromAscii("Label");
++ aPropertys[1].Value <<= m_sName;
++ aPropertys[2].Name = rtl::OUString::createFromAscii("Type");
++ aPropertys[2].Value <<= m_nType;
++ aPropertys[3].Name = rtl::OUString::createFromAscii("ItemDescriptorContainer");
++
++ m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
++ uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
++ rtl::OUString sUIName;
++ xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") ) >>= sUIName;
++
++ uno::Reference< lang::XSingleComponentFactory > xMenuMSF( m_xBarSettings, uno::UNO_QUERY_THROW );
++ if( m_pCommandBarControls->GetParentCommandBar() != NULL )
+ {
-+ return m_xShape->getLeft();
++ // create a new menu
++ m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
++ m_xCurrentSettings.set( m_xBarSettings, uno::UNO_QUERY_THROW );
+ }
-+ virtual void setLeft( double nLeft )
++ else if( m_pCommandBarControls->GetParentCommandBarControl() != NULL )
+ {
-+ m_xShape->setLeft( nLeft );
++ // 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 ) );
+ }
-+ virtual double getTop()
++ if( m_xUICfgManager->hasSettings( m_sBarName ) )
+ {
-+ return m_xShape->getTop();
++ m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
+ }
-+ virtual void setTop( double nTop )
++ else
+ {
-+ m_xShape->setTop( nTop );
++ m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
+ }
-+
-+ virtual double getHeight()
++ if( !m_bTemporary )
+ {
-+ return m_xShape->getHeight();
++ m_xUICfgPers->store();
+ }
-+ virtual void setHeight( double nHeight )
++}
++
++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_xShape->setHeight( nHeight );
++ m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
+ }
-+ virtual double getWidth()
++ else
+ {
-+ return m_xShape->getWidth();
++ m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
+ }
-+ virtual void setWidth( double nWidth)
++ if( !m_bTemporary )
+ {
-+ m_xShape->setHeight( nWidth );
++ m_xUICfgPers->store();
+ }
++}
+
-+
-+};
-+#define VBA_LEFT "PositionX"
-+#define VBA_TOP "PositionY"
-+class UserFormGeometryHelper : public AbstractGeometryAttributes
++::rtl::OUString SAL_CALL
++ScVbaCommandBarControl::getCaption() throw ( uno::RuntimeException )
+{
-+
-+ 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/vbalabel.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbalabel.cxx,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/vbalabel.cxx 7 Dec 2007 10:54:35 -0000 1.2
-+++ sc/source/ui/vba/vbalabel.cxx 22 Apr 2008 19:53:15 -0000 1.2.42.1
-@@ -40,7 +40,7 @@ using namespace org::openoffice;
-
-
- const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
--ScVbaLabel::ScVbaLabel( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : LabelImpl_BASE( xContext, xControlShape )
-+ScVbaLabel::ScVbaLabel( const css::uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, pGeomHelper )
- {
- }
-
-@@ -58,3 +58,36 @@ ScVbaLabel::setCaption( const rtl::OUStr
- {
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
- }
-+uno::Any SAL_CALL
-+ScVbaLabel::getValue() throw (css::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)
+{
-+ return uno::makeAny( getCaption() );
++ 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
-+ScVbaLabel::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (uno::RuntimeException)
+{
-+ rtl::OUString sCaption;
-+ _value >>= sCaption;
-+ setCaption( sCaption );
++ 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&
-+ScVbaLabel::getServiceImplName()
++ScVbaCommandBarControl::getServiceImplName()
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel") );
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControl") );
+ return sImplName;
+}
-+
-+uno::Sequence< rtl::OUString >
-+ScVbaLabel::getServiceNames()
++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.msforms.Label" ) );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.vba.CommandBarControl" ) );
+ }
+ return aServiceNames;
+}
-Index: sc/source/ui/vba/vbalabel.hxx
+Index: sc/source/ui/vba/vbacommandbarcontrol.hxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbalabel.hxx,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/vbalabel.hxx 7 Dec 2007 10:54:46 -0000 1.2
-+++ sc/source/ui/vba/vbalabel.hxx 22 Apr 2008 19:53:15 -0000 1.2.42.1
-@@ -39,16 +39,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, 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
+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 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_COMMANDBARCONTROL_HXX
++#define SC_VBA_COMMANDBARCONTROL_HXX
++
++#include <org/openoffice/vba/XCommandBarControl.hpp>
++
++#include "vbahelperinterface.hxx"
++#include "vbacommandbarcontrols.hxx"
++
++typedef InheritedHelperInterfaceImpl1< oo::vba::XCommandBarControl > CommandBarControl_BASE;
++
++class ScVbaCommandBarControl : public CommandBarControl_BASE
++{
++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);
++
++ // 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
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbalistbox.cxx,v
-retrieving revision 1.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbalistbox.cxx 10 Dec 2007 09:31:13 -0000 1.3
-+++ sc/source/ui/vba/vbalistbox.cxx 22 Apr 2008 19:53:15 -0000 1.3.42.1
-@@ -42,31 +42,49 @@
- 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, AbstractGeometryAttributes* pGeomHelper ) : ListBoxImpl_BASE( xParent, xContext, xControl, pGeomHelper )
- {
-- // grab the default value property name
-- m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
- }
-
--ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ListBoxImpl_BASE( xContext, xPropSet, xControlShape )
-+// 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)
+RCS file: sc/source/ui/vba/vbacommandbarcontrols.cxx
+diff -N sc/source/ui/vba/vbacommandbarcontrols.cxx
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbacommandbarcontrols.cxx 29 Jul 2008 06:35:40 -0000 1.1.2.1
+@@ -0,0 +1,247 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#include "vbacommandbarcontrols.hxx"
++#include "vbacommandbarcontrol.hxx"
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarControlEnumeration_BASE;
++class CommandBarControlEnumeration : public CommandBarControlEnumeration_BASE
+{
-+ 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 ] );
++ //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();
++ }
++};
++
++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
- 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
-@@ -96,18 +114,17 @@ ScVbaListBox::setValue( const uno::Any&
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
-
-- nList.realloc( 1 );
-- nList[0] = nValue;
--
-- m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
-+ uno::Sequence< sal_Int16 > nSelectedIndices(1);
-+ nSelectedIndices[ 0 ] = nValue;
-+ m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nSelectedIndices ) );
-+ m_xProps->setPropertyValue( TEXT, uno::makeAny( sValue ) );
- }
-
- ::rtl::OUString SAL_CALL
- ScVbaListBox::getText() throw (uno::RuntimeException)
- {
- rtl::OUString result;
-- uno::Reference< form::validation::XValidatableFormComponent > xValidatableFormComponent( m_xProps, uno::UNO_QUERY_THROW );
-- xValidatableFormComponent->getCurrentValue() >>= result;
-+ getValue() >>= result;
- return result;
- }
-
-@@ -130,29 +147,7 @@ ScVbaListBox::setMultiSelect( sal_Bool _
- {
- m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ), uno::makeAny( _multiselect ) );
- }
--/*
--css::uno::Sequence< sal_Bool > SAL_CALL
--ScVbaListBox::getSelected() throw (css::uno::RuntimeException)
--{
-- uno::Sequence< rtl::OUString > sList;
-- uno::Sequence< sal_Int16 > nList;
-- m_xProps->getPropertyValue( ITEMS ) >>= sList;
-- uno::Sequence< sal_Bool > bSelected( sList.getLength() );
-- for( sal_Int16 i = 0; i < bSelected.getLength(); i++ )
-- bSelected[i] = sal_False;
-- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
-- for( sal_Int16 i = 0; i < nList.getLength(); i++ )
-- {
-- bSelected[nList[i]] = sal_True;
-- }
-- return bSelected;
--}
-
--void SAL_CALL
--ScVbaListBox::setSelected( const css::uno::Sequence< sal_Bool >& _selected ) throw (css::uno::RuntimeException)
--{
--}
--*/
- css::uno::Any SAL_CALL
- ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
- {
-@@ -230,6 +225,10 @@ ScVbaListBox::Clear( ) throw (uno::Runt
- //setValue( uno::makeAny( sal_Int16() ) );
- m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
- }
-+
-+// this is called when something like the following vba code is used
-+// to set the selected state of particular entries in the Listbox
-+// ListBox1.Selected( 3 ) = false
- //PropListener
- void
- ScVbaListBox::setValueEvent( const uno::Any& value )
-@@ -239,7 +238,7 @@ ScVbaListBox::setValueEvent( const uno::
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Invalid type\n. need boolean." ), uno::Reference< uno::XInterface >() );
- uno::Sequence< sal_Int16 > nList;
-- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
-+ m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList;
- sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
- sal_Int16 nIndex = m_nIndex;
- for( sal_Int16 i = 0; i < nLength; i++ )
-@@ -255,7 +254,8 @@ ScVbaListBox::setValueEvent( const uno::
- nList[i] = nList[i + 1];
- }
- nList.realloc( nLength - 1 );
-- m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
-+ //m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
-+ m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nList ) );
- return;
- }
- }
-@@ -276,6 +276,10 @@ ScVbaListBox::setValueEvent( const uno::
- }
- }
-
-+// this is called when something like the following vba code is used
-+// to determine the selected state of particular entries in the Listbox
-+// msgbox ListBox1.Selected( 3 )
+
- css::uno::Any
- ScVbaListBox::getValueEvent()
- {
-@@ -292,3 +296,22 @@ ScVbaListBox::getValueEvent()
-
- return uno::makeAny( sal_False );
- }
++// 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&
-+ScVbaListBox::getServiceImplName()
++ScVbaCommandBarControls::getServiceImplName()
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaListBox") );
-+ return sImplName;
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControls") );
++ return sImplName;
+}
-+
-+uno::Sequence< rtl::OUString >
-+ScVbaListBox::getServiceNames()
++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.msforms.ScVbaListBox" ) );
-+ }
-+ return aServiceNames;
++ 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;
+}
-Index: sc/source/ui/vba/vbalistbox.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbalistbox.hxx,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/vbalistbox.hxx 7 Dec 2007 10:55:31 -0000 1.2
-+++ sc/source/ui/vba/vbalistbox.hxx 22 Apr 2008 19:53:15 -0000 1.2.42.1
-@@ -54,14 +54,11 @@ class ScVbaListBox : public ListBoxImpl_
- 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< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::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 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);
-@@ -78,6 +75,10 @@ public:
- // XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-
-+ //XHelperInterface
-+ virtual rtl::OUString& getServiceImplName();
-+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+
- //PropListener
- virtual void setValueEvent( const css::uno::Any& value );
- virtual css::uno::Any getValueEvent();
-Index: sc/source/ui/vba/vbamultipage.cxx
+Index: sc/source/ui/vba/vbacommandbarcontrols.hxx
===================================================================
-RCS file: sc/source/ui/vba/vbamultipage.cxx
-diff -N sc/source/ui/vba/vbamultipage.cxx
+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/vbamultipage.cxx 22 Apr 2008 19:53:15 -0000 1.1.2.1
-@@ -0,0 +1,132 @@
++++ sc/source/ui/vba/vbacommandbarcontrols.hxx 29 Jul 2008 06:35:40 -0000 1.1.2.1
+@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -2179,111 +2381,323 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#include "vbamultipage.hxx"
-+#include <org/openoffice/vba/XCollection.hpp>
-+#include "vbapages.hxx"
-+#include <vector>
++#ifndef SC_VBA_COMMANDBARCONTROLS_HXX
++#define SC_VBA_COMMANDBARCONTROLS_HXX
+
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#include <org/openoffice/vba/XCommandBarControls.hpp>
+
-+// 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") );
++#include "vbahelperinterface.hxx"
++#include "vbacommandbar.hxx"
++#include "vbacollectionimpl.hxx"
+
-+typedef cppu::WeakImplHelper1< container::XIndexAccess > PagesImpl_Base;
-+class PagesImpl : public PagesImpl_Base
++class ScVbaCommandBarControl;
++
++typedef CollTestImplHelper< oo::vba::XCommandBarControls > CommandBarControls_BASE;
++
++class ScVbaCommandBarControls : public CommandBarControls_BASE
+{
-+ sal_Int32 mnPages;
++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;
++
+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 );
-+}
++ 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 );
+
-+ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper, const uno::Reference< uno::XInterface >& xDialog ) : MultiPageImpl_BASE( xParent, xContext, xControl, pGeomHelper )
-+{
-+ mxDialogProps.set( xDialog, uno::UNO_QUERY_THROW );
-+ // set dialog step to value of multipage pseudo model
-+ setValue(getValue());
-+}
++ // 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 );
+
-+// Attributes
-+sal_Int32 SAL_CALL
-+ScVbaMultiPage::getValue() throw (css::uno::RuntimeException)
++ // 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//SC_VBA_COMMANDBARCONTROLS_HXX
+Index: sc/source/ui/vba/vbacommandbars.cxx
+===================================================================
+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 @@
++/*************************************************************************
++ *
++ * 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 org::openoffice;
++
++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< 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 )
+{
-+ sal_Int32 nValue = 0;
-+ m_xProps->getPropertyValue( SVALUE ) >>= nValue;
-+ return nValue;
++ 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 );
+}
+
-+void SAL_CALL
-+ScVbaMultiPage::setValue( const sal_Int32 _value ) throw (::com::sun::star::uno::RuntimeException)
++// XEnumerationAccess
++uno::Type SAL_CALL
++ScVbaCommandBars::getElementType() throw ( 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) );
++ 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();
++}
+
-+rtl::OUString&
-+ScVbaMultiPage::getServiceImplName()
++// 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)
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage") );
-+ return sImplName;
++ // 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;
+}
+
-+uno::Any SAL_CALL
-+ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException)
++// ScVbaCollectionBaseImpl
++uno::Any SAL_CALL
++ScVbaCommandBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) 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() );
++ if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
++ {
++ return createCollectionObject( aIndex );
++ }
++ return uno::Any();
+}
+
-+uno::Sequence< rtl::OUString >
-+ScVbaMultiPage::getServiceNames()
++sal_Bool
++ScVbaCommandBars::checkToolBarExist( rtl::OUString sToolBarName )
+{
-+ static uno::Sequence< rtl::OUString > aServiceNames;
-+ if ( aServiceNames.getLength() == 0 )
-+ {
-+ aServiceNames.realloc( 1 );
-+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.MultiPage" ) );
-+ }
-+ return aServiceNames;
++ 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;
+}
-Index: sc/source/ui/vba/vbamultipage.hxx
++
++// 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
===================================================================
-RCS file: sc/source/ui/vba/vbamultipage.hxx
-diff -N sc/source/ui/vba/vbamultipage.hxx
+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/vbamultipage.hxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
-@@ -0,0 +1,65 @@
++++ sc/source/ui/vba/vbacommandbars.hxx 29 Jul 2008 06:35:40 -0000 1.1.2.1
+@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -2318,772 +2732,541 @@
+ * 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>
++#ifndef SC_VBA_COMMANDBARS_HXX
++#define SC_VBA_COMMANDBARS_HXX
++
++#include <org/openoffice/vba/XCommandBar.hpp>
++#include <org/openoffice/vba/XCommandBars.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
-+//#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase1.hxx>
+
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XMultiPage > MultiPageImpl_BASE;
++#include "vbahelperinterface.hxx"
++#include "vbacollectionimpl.hxx"
+
-+class ScVbaMultiPage : public MultiPageImpl_BASE
++typedef CollTestImplHelper< oo::vba::XCommandBars > CommandBars_BASE;
++
++class ScVbaCommandBars : public CommandBars_BASE
+{
-+ css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
-+ css::uno::Reference< css::beans::XPropertySet > mxDialogProps;
++private:
++ css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
++ rtl::OUString m_sModuleName;
++ void retrieveObjects() throw( css::uno::RuntimeException );
+public:
-+ ScVbaMultiPage( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper, const css::uno::Reference< css::uno::XInterface >& xDialog );
-+ // 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);
++ 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 );
+
-+ //XHelperInterface
++ 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 );
++
++ 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();
-+ // 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
++
++#endif//SC_VBA_COMMANDBARS_HXX
+Index: sc/source/ui/vba/vbacontrol.cxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaname.cxx,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/vbaname.cxx 7 Dec 2007 10:55:43 -0000 1.2
-+++ sc/source/ui/vba/vbaname.cxx 18 Jan 2008 16:51:38 -0000 1.2.42.1
-@@ -36,6 +36,7 @@
+RCS file: /cvs/sc/sc/source/ui/vba/vbacontrol.cxx,v
+retrieving revision 1.3
+retrieving revision 1.2.42.3
+diff -u -p -b -w -B -r1.3 -r1.2.42.3
+--- sc/source/ui/vba/vbacontrol.cxx 11 Apr 2008 00:57:50 -0000 1.3
++++ sc/source/ui/vba/vbacontrol.cxx 29 Jul 2008 06:35:41 -0000 1.2.42.3
+@@ -44,17 +44,26 @@
+ #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 <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"
-@@ -115,17 +116,37 @@ ScVbaName::getValue() throw (css::uno::R
- {
- ::rtl::OUString sValue = mxNamedRange->getContent();
- ::rtl::OUString sSheetName = getWorkSheet()->getName();
-- if ( sValue.toChar() == '$' )
-+ ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( ";" );
-+ ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( "," );
-+ ::rtl::OUString sResult;
-+ sal_Int32 nFrom = 0;
-+ sal_Int32 nTo = 0;
-+ nTo = sValue.indexOf( sSegmentation, nFrom );
-+ while ( nTo != -1 )
- {
-- ::rtl::OUString sTmp = sValue.copy(1);
-- sValue = sTmp;
-+ ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
-+ if ( sTmpValue.toChar() == '$' )
-+ {
-+ ::rtl::OUString sTmp = sTmpValue.copy( 1 );
-+ sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
-+ sResult += sTmp;
-+ sResult += sNewSegmentation;
-+ }
-+ nFrom = nTo + 1;
-+ nTo = sValue.indexOf( sSegmentation, nFrom );
-+ }
-+ ::rtl::OUString sTmpValue = sValue.copy( nFrom );
-+ if ( sTmpValue.toChar() == '$' )
-+ {
-+ ::rtl::OUString sTmp = sTmpValue.copy(1);
-+ sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
-+ sResult += sTmp;
- }
-- sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
-- if (sValue.indexOf('=') != 0)
-+ if (sResult.indexOf('=') != 0)
- {
-- sValue = ::rtl::OUString::createFromAscii("=") + sValue;
-+ sResult = ::rtl::OUString::createFromAscii("=") + sResult;
- }
-- return sValue;
-+ return sResult;
- }
+ using namespace com::sun::star;
+ using namespace org::openoffice;
- void
-@@ -133,17 +154,38 @@ ScVbaName::setValue( const ::rtl::OUStri
+-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)
{
- ::rtl::OUString sSheetName = getWorkSheet()->getName();
- ::rtl::OUString sValue = rValue;
-+ ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( "," );
-+ ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( ";" );
-+ ::rtl::OUString sResult;
-+ sal_Int32 nFrom = 0;
-+ sal_Int32 nTo = 0;
- if (sValue.indexOf('=') == 0)
- {
- ::rtl::OUString sTmp = sValue.copy(1);
- sValue = sTmp;
- }
-- if (sValue.copy(0, sSheetName.getLength()).equals(sSheetName))
-+ nTo = sValue.indexOf( sSegmentation, nFrom );
-+ while ( nTo != -1 )
-+ {
-+ ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
-+ sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
-+ if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
-+ {
-+ sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
-+ }
-+ sTmpValue += sNewSegmentation;
-+ sResult += sTmpValue;
-+ nFrom = nTo + 1;
-+ nTo = sValue.indexOf( sSegmentation, nFrom );
-+ }
-+ ::rtl::OUString sTmpValue = sValue.copy( nFrom );
-+ sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
-+ if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
- {
-- sValue = ::rtl::OUString::createFromAscii("$") + sSheetName;
-+ sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
- }
-- sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
-- mxNamedRange->setContent(sValue);
-+ sResult += sTmpValue;
-+ mxNamedRange->setContent(sResult);
++ // #FIXME why don't we already have the XModel instead of getting it
++ // directly from the controlmodel, probablye we thought there was a reason
++ // at some stage.
++ uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
++
+ uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+ //init m_xWindowPeer
+ uno::Reference< container::XChild > xChild( xControlModel, uno::UNO_QUERY_THROW );
+@@ -62,17 +71,18 @@ ScVbaControl::getWindowPeer( const uno::
+ xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XModel > xModel( xChild->getParent(), uno::UNO_QUERY_THROW );
+ uno::Reference< view::XControlAccess > xControlAccess( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+- uno::Reference< awt::XControl > xControl;
++ uno::Reference< css::awt::XWindowPeer > xWinPeer;
+ 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;
}
- ::rtl::OUString
-@@ -197,7 +239,7 @@ ScVbaName::setRefersToR1C1Local( const :
- css::uno::Reference< oo::excel::XRange >
- ScVbaName::getRefersToRange() throw (css::uno::RuntimeException)
+ //ScVbaControlListener
+@@ -106,67 +116,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, AbstractGeometryAttributes* pGeomHelper ) : ControlImpl_BASE( xParent, xContext ), m_xControl( xControl )
{
-- 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;
+- //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 );
}
-Index: sc/source/ui/vba/vbanames.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbanames.cxx,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/vbanames.cxx 7 Dec 2007 10:56:06 -0000 1.2
-+++ sc/source/ui/vba/vbanames.cxx 18 Jan 2008 16:51:38 -0000 1.2.42.1
-@@ -75,6 +75,7 @@ ScVbaNames::ScVbaNames(const css::uno::R
- mxModel( xModel ),
- mxNames( xNames )
+ ScVbaControl::~ScVbaControl()
{
-+ m_xNameAccess.set( xNames, uno::UNO_QUERY_THROW );
+- 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 );
}
- ScVbaNames::~ScVbaNames()
-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"
-+
-+using namespace ::org::openoffice;
-+using namespace ::com::sun::star;
-+using namespace ::vos;
-+
-+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 )
-+{
-+}
-+
-+uno::Type SAL_CALL
-+ScVbaPages::getElementType() throw (uno::RuntimeException)
-+{
-+ // return msforms::XPage::static_type(0);
-+ return uno::XInterface::static_type(0);
-+}
-+
-+uno::Any
-+ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
-+{
-+ return aSource;
-+}
-+
-+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 );
-+
-+};
-+#endif//SC_VBA_SHAPE_HXX
-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 22 Apr 2008 19:53:16 -0000 1.1.2.1
-@@ -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, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, pGeomHelper )
-+{
-+}
-+
-+// Attributes
-+uno::Any SAL_CALL
-+ScVbaProgressBar::getValue() throw (css::uno::RuntimeException)
-+{
-+ return m_xProps->getPropertyValue( SVALUE );
-+}
-+
-+void SAL_CALL
-+ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+ m_xProps->setPropertyValue( SVALUE, _value );
-+}
-+
-+rtl::OUString&
-+ScVbaProgressBar::getServiceImplName()
-+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
-+ return sImplName;
-+}
-+
-+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("org.openoffice.msforms.Label" ) );
-+ }
-+ 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 22 Apr 2008 19:53:16 -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 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>
-+
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XProgressBar, css::script::XDefaultProperty > ProgressBarImpl_BASE;
-+
-+class ScVbaProgressBar : public ProgressBarImpl_BASE
-+{
-+public:
-+ ScVbaProgressBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
-+ // Attributes
-+ virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
-+ virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
-+ //XHelperInterface
-+ virtual rtl::OUString& getServiceImplName();
-+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+ // XDefaultProperty
-+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-+};
-+#endif //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.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/vbaradiobutton.cxx 7 Dec 2007 11:00:34 -0000 1.2
-+++ sc/source/ui/vba/vbaradiobutton.cxx 22 Apr 2008 19:53:16 -0000 1.2.42.1
-@@ -41,7 +41,7 @@ using namespace org::openoffice;
-
- const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
- const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
--ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : RadioButtonImpl_BASE( xContext, xControlShape )
-+ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
+-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 );
}
-@@ -60,22 +60,53 @@ ScVbaRadioButton::setCaption( const rtl:
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+-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;
}
--sal_Bool SAL_CALL
-+uno::Any SAL_CALL
- ScVbaRadioButton::getValue() throw (css::uno::RuntimeException)
+ //In design model has different behavior
+@@ -189,132 +176,173 @@ void SAL_CALL ScVbaControl::setEnabled(
+
+ sal_Bool SAL_CALL ScVbaControl::getVisible() throw (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 );
-+
+- 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
--ScVbaRadioButton::setValue( sal_Bool _value ) throw (css::uno::RuntimeException)
-+ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
+ void SAL_CALL ScVbaControl::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
{
- sal_Int16 nValue = 0;
-- if( _value )
-+ sal_Bool bValue = sal_False;
-+ if( _value >>= nValue )
-+ {
-+ if( nValue == -1)
- nValue = 1;
-+ }
-+ else if ( _value >>= bValue )
-+ {
-+ if ( bValue )
-+ nValue = 1;
-+ }
- m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
+- 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 );
++}
++
++void SAL_CALL ScVbaControl::SetFocus() throw (uno::RuntimeException)
++{
++ uno::Reference< awt::XWindow > xWin( m_xControl, uno::UNO_QUERY_THROW );
++ xWin->setFocus();
+ }
+
+ //ScVbaControlFactory
+
+-ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XControlShape >& xControlShape ): m_xContext( xContext ), m_xControlShape( xControlShape )
++ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ): m_xContext( xContext ), m_xControl( xControl )
+ {
+- uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+- uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
+- m_xProps.set( xProps, uno::UNO_QUERY_THROW );
+ }
+
+-ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, const uno::Reference< drawing::XControlShape > xControlShape ): m_xContext( xContext ), m_xProps( xProps ), m_xControlShape( xControlShape )
++ScVbaControl* ScVbaControlFactory::createControl( 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 sal_Int16 nClassId ) throw (uno::RuntimeException)
++ScVbaControl* ScVbaControlFactory::createControl(const uno::Reference< drawing::XControlShape >& xControlShape, const uno::Reference< uno::XInterface >& /*xParent*/ ) throw (uno::RuntimeException)
+ {
++ uno::Reference< beans::XPropertySet > xProps( xControlShape->getControl(), uno::UNO_QUERY_THROW );
++ sal_Int32 nClassId = -1;
++ const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
++ xProps->getPropertyValue( sClassId ) >>= nClassId;
++ uno::Reference< vba::XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
+ switch( nClassId )
+ {
+ case form::FormComponentType::COMBOBOX:
+- return new ScVbaComboBox( m_xContext, m_xProps, m_xControlShape );
++ return new ScVbaComboBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
+ case form::FormComponentType::COMMANDBUTTON:
+- return new ScVbaButton( m_xContext, m_xControlShape );
++ return new ScVbaButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
+ case form::FormComponentType::FIXEDTEXT:
+- return new ScVbaLabel( m_xContext, m_xControlShape );
++ return new ScVbaLabel( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
+ case form::FormComponentType::TEXTFIELD:
+- return new ScVbaTextBox( m_xContext, m_xControlShape );
++ return new ScVbaTextBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
+ case form::FormComponentType::RADIOBUTTON:
+- return new ScVbaRadioButton( m_xContext, m_xControlShape );
++ return new ScVbaRadioButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
+ case form::FormComponentType::LISTBOX:
+- return new ScVbaListBox( m_xContext, m_xControlShape );
++ return new ScVbaListBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++ case form::FormComponentType::SPINBUTTON:
++ return new ScVbaSpinButton( xVbaParent, m_xContext, xControlShape, 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 >() );
+ }
+ }
+
+-ScVbaControl* ScVbaControlFactory::createControl() throw (uno::RuntimeException)
++ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< awt::XControl >& xControl, const uno::Reference< uno::XInterface >& xParent ) throw (uno::RuntimeException)
+ {
+- sal_Int32 nClassId = -1;
+- const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
+- m_xProps->getPropertyValue( sClassId ) >>= nClassId;
+- switch( nClassId )
++ uno::Reference< beans::XPropertySet > xProps( xControl->getModel(), uno::UNO_QUERY_THROW );
++ uno::Reference< lang::XServiceInfo > xServiceInfo( xProps, uno::UNO_QUERY_THROW );
++ ScVbaControl* pControl = NULL;
++ uno::Reference< vba::XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
++ if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
++ pControl = new ScVbaCheckbox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlRadioButtonModel") ) ) )
++ pControl = new ScVbaRadioButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlEditModel") ) ) )
++ pControl = new ScVbaTextBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), true );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlButtonModel") ) ) )
++ {
++ sal_Bool bToggle = sal_False;
++ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Toggle") ) ) >>= bToggle;
++ if ( bToggle )
++ pControl = new ScVbaToggleButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else
++ pControl = new ScVbaButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ }
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") ) ) )
++ pControl = new ScVbaComboBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), true );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") ) ) )
++ pControl = new ScVbaListBox( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") ) ) )
++ pControl = new ScVbaLabel( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") ) ) )
++ //pControl = new ScVbaImage( m_xContext, xControl );
++ throw uno::RuntimeException();
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ) ) )
++ pControl = new ScVbaProgressBar( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) ) )
++ pControl = new ScVbaFrame( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlScrollBarModel") ) ) )
++ pControl = new ScVbaScrollBar( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
++ pControl = new ScVbaMultiPage( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), xParent );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlSpinButtonModel") ) ) )
++ pControl = new ScVbaSpinButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
++ else
++ throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
++ return pControl;
++}
+
+rtl::OUString&
-+ScVbaRadioButton::getServiceImplName()
++ScVbaControl::getServiceImplName()
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton") );
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControl") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
-+ScVbaRadioButton::getServiceNames()
-+{
++ScVbaControl::getServiceNames()
+ {
+- case form::FormComponentType::COMBOBOX:
+- return new ScVbaComboBox( m_xContext, m_xControlShape );
+- case form::FormComponentType::COMMANDBUTTON:
+- return new ScVbaButton( m_xContext, m_xControlShape );
+- case form::FormComponentType::FIXEDTEXT:
+- return new ScVbaLabel( m_xContext, m_xControlShape );
+- case form::FormComponentType::TEXTFIELD:
+- return new ScVbaTextBox( m_xContext, m_xControlShape );
+- case form::FormComponentType::RADIOBUTTON:
+- return new ScVbaRadioButton( m_xContext, m_xControlShape );
+- case form::FormComponentType::LISTBOX:
+- return new ScVbaListBox( m_xContext, m_xControlShape );
+- default:
+- throw uno::RuntimeException( rtl::OUString::createFromAscii(
+- "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
-+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.RadioButton" ) );
-+ }
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Control" ) );
+ }
+ return aServiceNames;
-+}
-Index: sc/source/ui/vba/vbaradiobutton.hxx
+ }
++
++
+Index: sc/source/ui/vba/vbacontrol.hxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaradiobutton.hxx,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/vbaradiobutton.hxx 7 Dec 2007 11:00:45 -0000 1.2
-+++ sc/source/ui/vba/vbaradiobutton.hxx 22 Apr 2008 19:53:16 -0000 1.2.42.1
-@@ -34,24 +34,27 @@
- ************************************************************************/
- #ifndef SC_VBA_RADIOBUTTON_HXX
- #define SC_VBA_RADIOBUTTON_HXX
--#include <cppuhelper/implbase1.hxx>
- #include <org/openoffice/msforms/XRadioButton.hpp>
--
- #include "vbacontrol.hxx"
+RCS file: /cvs/sc/sc/source/ui/vba/vbacontrol.hxx,v
+retrieving revision 1.3
+retrieving revision 1.2.42.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbacontrol.hxx 11 Apr 2008 00:58:09 -0000 1.3
++++ sc/source/ui/vba/vbacontrol.hxx 6 Jul 2008 15:30:36 -0000 1.2.42.2
+@@ -35,40 +35,33 @@
+ #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 <cppuhelper/implbase2.hxx>
++#include "vbahelperinterface.hxx"
--typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XRadioButton > RadioButtonImpl_BASE;
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XRadioButton, css::script::XDefaultProperty > RadioButtonImpl_BASE;
+-typedef ::cppu::WeakImplHelper1< oo::msforms::XControl > ControlImpl_BASE;
++//typedef ::cppu::WeakImplHelper1< oo::msforms::XControl > ControlImpl_BASE;
++typedef InheritedHelperInterfaceImpl1< oo::msforms::XControl > ControlImpl_BASE;
- class ScVbaRadioButton : public RadioButtonImpl_BASE
+ class ScVbaControl : public ControlImpl_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, 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.6
-retrieving revision 1.5.34.7
-diff -u -p -u -p -b -w -B -r1.6 -r1.5.34.7
---- sc/source/ui/vba/vbarange.cxx 29 Jan 2008 17:03:20 -0000 1.6
-+++ sc/source/ui/vba/vbarange.cxx 16 Apr 2008 10:40:19 -0000 1.5.34.7
-@@ -521,6 +521,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
-+{
-+ 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; }
+-/* 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;
+
-+ 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() ) );
-+ }
-+};
++ 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, 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 +75,14 @@ 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);
+
- class CellsEnumeration : public CellsEnumeration_BASE
- {
- uno::Reference< uno::XComponentContext > mxContext;
-@@ -743,6 +771,7 @@ protected:
- bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell )
- {
- rtl::OUString sFormula;
-+ double aDblValue;
- if ( aValue >>= sFormula )
- {
- // get current convention
-@@ -769,6 +798,11 @@ protected:
- xCell->setFormula( sFormula );
- return true;
- }
-+ else if ( aValue >>= aDblValue )
-+ {
-+ xCell->setValue( aDblValue );
-+ return true;
-+ }
- return false;
- }
-
-@@ -1154,10 +1188,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 );
-+ mxRanges.set( mxPropertySet, uno::UNO_QUERY );
-+ uno::Reference< container::XIndexAccess > xIndex;
-+ if ( mxRange.is() )
-+ {
-+ xIndex = new SingleRangeIndexAccess( mxContext, mxRange );
-+ }
-+ else if ( mxRanges.is() )
- {
-- mxRange.set( mxPropertySet, uno::UNO_QUERY_THROW );
-- uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxContext, mxRange ) );
-+ xIndex.set( mxRanges, uno::UNO_QUERY_THROW );
-+ }
- m_Areas = new ScVbaRangeAreas( mxContext, xIndex, mbIsRows, mbIsColumns );
- }
+ //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();
+ };
-@@ -1838,7 +1881,36 @@ ScVbaRange::Cells( const uno::Any &nRowI
- }
- sal_Int32 nRow = 0, nColumn = 0;
-- sal_Bool bIsIndex = nRowIndex >>= nRow, bIsColumnIndex = nColumnIndex >>= nColumn;
-+
-+ sal_Bool bIsIndex = nRowIndex.hasValue();
-+ sal_Bool bIsColumnIndex = nColumnIndex.hasValue();
-+
-+ // Sometimes we might get a float or a double or whatever
-+ // set in the Any, we should convert as appropriate
-+ // #FIXME - perhaps worth turning this into some sort of
-+ // convertion routine e.g. bSuccess = getValueFromAny( nRow, nRowIndex, getCppuType((sal_Int32*)0) )
-+ if ( nRowIndex.hasValue() && !( nRowIndex >>= nRow ) )
-+ {
-+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
-+ uno::Any aConverted;
-+ try
-+ {
-+ aConverted = xConverter->convertTo( nRowIndex, getCppuType((sal_Int32*)0) );
-+ bIsIndex = ( aConverted >>= nRow );
-+ }
-+ catch( uno::Exception& ) {} // silence any errors
-+ }
-+ if ( bIsColumnIndex && !( nColumnIndex >>= nColumn ) )
-+ {
-+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
-+ uno::Any aConverted;
-+ try
-+ {
-+ aConverted = xConverter->convertTo( nColumnIndex, getCppuType((sal_Int32*)0) );
-+ bIsColumnIndex = ( aConverted >>= nColumn );
-+ }
-+ catch( uno::Exception& ) {} // silence any errors
-+ }
-
- RangeHelper thisRange( mxRange );
- table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
-@@ -3121,6 +3193,18 @@ ScVbaRange::hasElements() throw (uno::Ru
- uno::Reference< container::XEnumeration > SAL_CALL
- ScVbaRange::createEnumeration() throw (uno::RuntimeException)
+@@ -92,16 +90,13 @@ class ScVbaControlFactory
{
-+ 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 );
- }
-
-@@ -4124,7 +4208,7 @@ ScVbaRange::Autofit() throw (uno::Runtim
- // if the range is a not a row or column range autofit will
- // throw an error
+ 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 );
+- ScVbaControl* createControl() throw ( css::uno::RuntimeException );
++ const css::uno::Reference< css::uno::XInterface >& xControl );
++ 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;
+ };
-- if ( !mbIsColumns )
-+ if ( !( mbIsColumns || mbIsRows ) )
- DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
- ScDocShell* pDocShell = getDocShellFromRange( mxRange );
- if ( pDocShell )
-@@ -4521,7 +4605,7 @@ ScVbaRange::AutoOutline( ) throw (scrip
- {
- // #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 )
-@@ -4739,6 +4823,7 @@ ScVbaRange::SpecialCells( const uno::Any
- case excel::XlCellType::xlCellTypeConstants:
- case excel::XlCellType::xlCellTypeFormulas:
- case excel::XlCellType::xlCellTypeVisible:
-+ case excel::XlCellType::xlCellTypeLastCell:
- {
- if ( bIsMultiArea )
- {
-Index: sc/source/ui/vba/vbascrollbar.cxx
+ #endif//SC_VBA_CONTROL_HXX
+Index: sc/source/ui/vba/vbaframe.cxx
===================================================================
-RCS file: sc/source/ui/vba/vbascrollbar.cxx
-diff -N sc/source/ui/vba/vbascrollbar.cxx
+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/vbascrollbar.cxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
-@@ -0,0 +1,139 @@
++++ sc/source/ui/vba/vbaframe.cxx 22 Apr 2008 19:53:15 -0000 1.1.2.1
+@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -3118,102 +3301,56 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#include "vbascrollbar.hxx"
++#include "vbaframe.hxx"
+#include <vector>
+
+using namespace com::sun::star;
+using namespace org::openoffice;
+
+
-+const static rtl::OUString LARGECHANGE( RTL_CONSTASCII_USTRINGPARAM("BlockIncrement") );
-+const static rtl::OUString SMALLCHANGE( RTL_CONSTASCII_USTRINGPARAM("LineIncrement") );
-+const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
-+const static rtl::OUString SCROLLVALUE( RTL_CONSTASCII_USTRINGPARAM("ScrollValue") );
-+const static rtl::OUString SCROLLMAX( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") );
-+const static rtl::OUString SCROLLMIN( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMin") );
-+
-+ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++ScVbaFrame::ScVbaFrame( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : FrameImpl_BASE( xParent, xContext, xControl, pGeomHelper )
+{
+}
+
+// Attributes
-+uno::Any SAL_CALL
-+ScVbaScrollBar::getValue() throw (css::uno::RuntimeException)
++rtl::OUString SAL_CALL
++ScVbaFrame::getCaption() throw (css::uno::RuntimeException)
+{
-+ return m_xProps->getPropertyValue( SCROLLVALUE );
++ rtl::OUString Label;
++ m_xProps->getPropertyValue( LABEL ) >>= Label;
++ return Label;
+}
+
+void SAL_CALL
-+ScVbaScrollBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++ScVbaFrame::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
+{
-+ m_xProps->setPropertyValue( SCROLLVALUE, _value );
++ m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+}
+
-+::sal_Int32 SAL_CALL
-+ScVbaScrollBar::getMax() throw (uno::RuntimeException)
++uno::Any SAL_CALL
++ScVbaFrame::getValue() throw (css::uno::RuntimeException)
+{
-+ sal_Int32 nMax = 0;
-+ m_xProps->getPropertyValue( SCROLLMAX ) >>= nMax;
-+ return nMax;
-+}
-+
-+void SAL_CALL
-+ScVbaScrollBar::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
-+{
-+ m_xProps->setPropertyValue( SCROLLMAX, uno::makeAny( nVal ) );
-+}
-+
-+::sal_Int32 SAL_CALL
-+ScVbaScrollBar::getMin() throw (uno::RuntimeException)
-+{
-+ sal_Int32 nVal = 0;
-+ m_xProps->getPropertyValue( SCROLLMIN ) >>= nVal;
-+ return nVal;
-+}
-+
-+void SAL_CALL
-+ScVbaScrollBar::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
-+{
-+ m_xProps->setPropertyValue( SCROLLMIN, uno::makeAny( nVal ) );
-+}
-+
-+void SAL_CALL
-+ScVbaScrollBar::setLargeChange( ::sal_Int32 _largechange ) throw (uno::RuntimeException)
-+{
-+ m_xProps->setPropertyValue( LARGECHANGE, uno::makeAny( _largechange ) );
-+}
-+
-+::sal_Int32 SAL_CALL
-+ScVbaScrollBar::getLargeChange() throw (uno::RuntimeException)
-+{
-+ sal_Int32 nVal = 0;
-+ m_xProps->getPropertyValue( LARGECHANGE ) >>= nVal;
-+ return nVal;
-+}
-+
-+::sal_Int32 SAL_CALL
-+ScVbaScrollBar::getSmallChange() throw (uno::RuntimeException)
-+{
-+ sal_Int32 nSmallChange = 0;
-+ m_xProps->getPropertyValue( SMALLCHANGE ) >>= nSmallChange;
-+ return nSmallChange;
++ return uno::makeAny( getCaption() );
+}
+
+void SAL_CALL
-+ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange ) throw (uno::RuntimeException)
++ScVbaFrame::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
+{
-+ m_xProps->setPropertyValue( SMALLCHANGE, uno::makeAny( _smallchange ) );
++ rtl::OUString sCaption;
++ _value >>= sCaption;
++ setCaption( sCaption );
+}
+
+rtl::OUString&
-+ScVbaScrollBar::getServiceImplName()
++ScVbaFrame::getServiceImplName()
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaScrollBar") );
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFrame") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
-+ScVbaScrollBar::getServiceNames()
++ScVbaFrame::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
@@ -3223,13 +3360,13 @@
+ }
+ return aServiceNames;
+}
-Index: sc/source/ui/vba/vbascrollbar.hxx
+Index: sc/source/ui/vba/vbaframe.hxx
===================================================================
-RCS file: sc/source/ui/vba/vbascrollbar.hxx
-diff -N sc/source/ui/vba/vbascrollbar.hxx
+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/vbascrollbar.hxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
-@@ -0,0 +1,66 @@
++++ sc/source/ui/vba/vbaframe.hxx 22 Apr 2008 19:53:15 -0000 1.1.2.1
+@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -3264,207 +3401,339 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#ifndef SC_VBA_SCROLLBAR_HXX
-+#define SC_VBA_SCROLLBAR_HXX
++#ifndef SC_VBA_FRAME_HXX
++#define SC_VBA_FRAME_HXX
+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XScrollBar.hpp>
++#include <org/openoffice/msforms/XLabel.hpp>
+
+#include "vbacontrol.hxx"
+#include "vbahelper.hxx"
+
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XScrollBar > ScrollBarImpl_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XLabel > FrameImpl_BASE;
+
-+class ScVbaScrollBar : public ScrollBarImpl_BASE
++class ScVbaFrame : public FrameImpl_BASE
+{
+public:
-+ ScVbaScrollBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++ ScVbaFrame( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
+ // 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);
-+
-+
++ 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/vbashape.cxx
+Index: sc/source/ui/vba/vbaglobals.cxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbashape.cxx,v
-retrieving revision 1.3
-retrieving revision 1.3.34.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.34.1
---- sc/source/ui/vba/vbashape.cxx 14 Dec 2007 12:41:26 -0000 1.3
-+++ sc/source/ui/vba/vbashape.cxx 14 Feb 2008 15:15:46 -0000 1.3.34.1
-@@ -55,13 +55,13 @@ using namespace ::org::openoffice;
- using namespace ::com::sun::star;
- using namespace ::vos;
+RCS file: /cvs/sc/sc/source/ui/vba/vbaglobals.cxx,v
+retrieving revision 1.4
+retrieving revision 1.3.42.2
+diff -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
+ }
--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 )
+ uno::Any SAL_CALL
+-ScVbaGlobals::Names( ) throw ( uno::RuntimeException )
++ScVbaGlobals::Names( const css::uno::Any& aIndex ) throw ( uno::RuntimeException )
{
- m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
- addListeners();
+- return getApplication()->Names();
++ return getApplication()->Names( aIndex );
}
--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
+ namespace globals
+Index: sc/source/ui/vba/vbaglobals.hxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbashape.hxx,v
-retrieving revision 1.2
-retrieving revision 1.2.42.2
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.42.2
---- sc/source/ui/vba/vbashape.hxx 7 Dec 2007 11:02:09 -0000 1.2
-+++ sc/source/ui/vba/vbashape.hxx 22 Apr 2008 19:53:16 -0000 1.2.42.2
-@@ -52,21 +52,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/vbatextbox.cxx
+RCS file: /cvs/sc/sc/source/ui/vba/vbaglobals.hxx,v
+retrieving revision 1.4
+retrieving revision 1.3.42.2
+diff -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
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbatextbox.cxx,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/vbatextbox.cxx 7 Dec 2007 11:03:50 -0000 1.2
-+++ sc/source/ui/vba/vbatextbox.cxx 22 Apr 2008 19:53:16 -0000 1.2.42.1
-@@ -42,11 +42,24 @@ using namespace org::openoffice;
+RCS file: /cvs/sc/sc/source/ui/vba/vbahelper.cxx,v
+retrieving revision 1.5
+retrieving revision 1.3.42.4
+diff -u -p -b -w -B -r1.5 -r1.3.42.4
+--- sc/source/ui/vba/vbahelper.cxx 11 Apr 2008 01:02:33 -0000 1.5
++++ sc/source/ui/vba/vbahelper.cxx 6 Jul 2008 15:30:59 -0000 1.3.42.4
+@@ -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;
--ScVbaTextBox::ScVbaTextBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : TextBoxImpl_BASE( xContext, xControlShape )
-+ScVbaTextBox::ScVbaTextBox( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper, bool bDialog ) : TextBoxImpl_BASE( xParent, xContext, xControl, pGeomHelper ), mbDialog( bDialog )
+@@ -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 );
++}
++
+ uno::Reference< script::XTypeConverter >
+ getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
+@@ -215,6 +229,22 @@ dispatchRequests (uno::Reference< frame:
}
- // Attributes
-+uno::Any SAL_CALL
-+ScVbaTextBox::getValue() throw (css::uno::RuntimeException)
+
++void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall)
+{
-+ return uno::makeAny( getText() );
++ 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 SAL_CALL
-+ScVbaTextBox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
++
+ void
+ implnPaste()
+ {
+@@ -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 )
+{
-+ rtl::OUString sVal = getAnyAsString( _value );
-+ setText( sVal );
++ dispatchExecute( xModel, SID_VIEWSHELL1 );
+}
+
- //getString() will cause some imfo lose.
- rtl::OUString SAL_CALL
- ScVbaTextBox::getText() throw (css::uno::RuntimeException)
-@@ -62,9 +75,14 @@ ScVbaTextBox::getText() throw (css::uno:
- void SAL_CALL
- ScVbaTextBox::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
+ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
{
-+ if ( !mbDialog )
-+ {
- uno::Reference< text::XTextRange > xTextRange( m_xProps, uno::UNO_QUERY_THROW );
- xTextRange->setString( _text );
+ uno::Type aType = pvargItem.getValueType();
+@@ -744,5 +779,56 @@ double PixelsToPoints( css::uno::Referen
+ return (fPixels/fConvertFactor)/POINTTO100THMILLIMETERFACTOR;
}
-+ else
-+ m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ), uno::makeAny( _text ) );
-+}
- sal_Int32 SAL_CALL
- ScVbaTextBox::getMaxLength() throw (css::uno::RuntimeException)
-@@ -103,3 +121,22 @@ ScVbaTextBox::setMultiline( sal_Bool _mu
- m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), aValue);
- }
-+
-+rtl::OUString&
-+ScVbaTextBox::getServiceImplName()
++ConcreteXShapeGeometryAttributes::ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape )
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox") );
-+ return sImplName;
++ m_xShape = new ScVbaShape( xContext, xShape );
+}
+
-+uno::Sequence< rtl::OUString >
-+ScVbaTextBox::getServiceNames()
-+{
-+ static uno::Sequence< rtl::OUString > aServiceNames;
-+ if ( aServiceNames.getLength() == 0 )
-+ {
-+ aServiceNames.realloc( 1 );
-+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.TextBox" ) );
-+ }
-+ return aServiceNames;
++#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 );
+}
-Index: sc/source/ui/vba/vbatextbox.hxx
++ double UserFormGeometryHelper::getLeft()
++ {
++ sal_Int32 nLeft = 0;
++ mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft;
++ return nLeft;
++ }
++ void UserFormGeometryHelper::setLeft( double nLeft )
++ {
++ mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), uno::makeAny( static_cast< sal_Int32 >( nLeft ) ) );
++ }
++ double UserFormGeometryHelper::getTop()
++ {
++ sal_Int32 nTop = 0;
++ mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ) ) >>= nTop;
++ return nTop;
++ }
++ void UserFormGeometryHelper::setTop( double nTop )
++ {
++ mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ), uno::makeAny( static_cast< sal_Int32 >( nTop ) ) );
++ }
++ double UserFormGeometryHelper::getHeight()
++ {
++ sal_Int32 nHeight = 0;
++ mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ) ) >>= nHeight;
++ return static_cast< double >( nHeight );
++ }
++ void UserFormGeometryHelper::setHeight( double nHeight )
++ {
++ mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ), uno::makeAny( static_cast< sal_Int32 >( nHeight ) ) );
++ }
++ double UserFormGeometryHelper::getWidth()
++ {
++ sal_Int32 nWidth = 0;
++ mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ) ) >>= nWidth;
++ return static_cast< sal_Int32 >( nWidth );
++ }
++ void UserFormGeometryHelper::setWidth( double nWidth)
++ {
++ mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ), uno::makeAny( static_cast< sal_Int32 >( nWidth ) ) );
++ }
+ } // openoffice
+ } //org
+Index: sc/source/ui/vba/vbahelper.hxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbatextbox.hxx,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/vbatextbox.hxx 7 Dec 2007 11:04:01 -0000 1.2
-+++ sc/source/ui/vba/vbatextbox.hxx 22 Apr 2008 19:53:16 -0000 1.2.42.1
-@@ -43,16 +43,20 @@ typedef cppu::ImplInheritanceHelper1< Sc
+RCS file: /cvs/sc/sc/source/ui/vba/vbahelper.hxx,v
+retrieving revision 1.5
+retrieving revision 1.4.42.3
+diff -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
- class ScVbaTextBox : public TextBoxImpl_BASE
- {
-+ bool mbDialog;
- public:
-- ScVbaTextBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
-- const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
-+ ScVbaTextBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper, bool bDialog = false );
- // 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();
+ #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;
+ }
};
- #endif //SC_VBA_TEXTBOX_HXX
-Index: sc/source/ui/vba/vbatextboxshape.cxx
++
++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< 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
++{
++
++ 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
===================================================================
-RCS file: sc/source/ui/vba/vbatextboxshape.cxx
-diff -N sc/source/ui/vba/vbatextboxshape.cxx
+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/vbatextboxshape.cxx 14 Feb 2008 15:27:49 -0000 1.1.2.1
-@@ -0,0 +1,74 @@
++++ sc/source/ui/vba/vbahyperlink.cxx 29 Jul 2008 06:35:41 -0000 1.1.2.1
+@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -3499,118 +3768,118 @@
+ * 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"
+
-+#include "vbatextboxshape.hxx"
-+#include "vbacharacters.hxx"
-+#include <com/sun/star/text/XSimpleText.hpp>
-+#include <vector>
++using namespace ::org::openoffice;
++using namespace ::com::sun::star;
+
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++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 );
++}
+
-+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 ) )
++ScVbaHyperlink::~ScVbaHyperlink()
+{
-+ m_xTextRange.set( xShape , uno::UNO_QUERY_THROW );
-+ m_xModel.set( xModel );
+}
+
-+rtl::OUString SAL_CALL
-+ScVbaTextBoxShape::getText() throw (css::uno::RuntimeException)
++::rtl::OUString
++ScVbaHyperlink::getAddress() throw (css::uno::RuntimeException)
+{
-+ return m_xTextRange->getString();
++ rtl::OUString aAddress;
++ uno::Any aValue = mxTextField->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ) );
++ aValue >>= aAddress;
++ return aAddress;
+}
+
-+void SAL_CALL
-+ScVbaTextBoxShape::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
++void
++ScVbaHyperlink::setAddress( const ::rtl::OUString & rAddress ) throw (css::uno::RuntimeException)
+{
-+ m_xTextRange->setString( _text );
++ uno::Any aValue;
++ aValue <<= rAddress;
++ mxTextField->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ), aValue );
+}
+
-+uno::Reference< excel::XCharacters > SAL_CALL
-+ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException)
++::rtl::OUString
++ScVbaHyperlink::getName() throw (css::uno::RuntimeException)
+{
-+ ScDocShell* pDocShell = getDocShell( m_xModel );
-+ ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
++ // it seems this attribute is same as TextToDisplay
++ return getTextToDisplay();
++}
+
-+ if ( !pDoc )
-+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
-+ uno::Reference< text::XSimpleText > xSimple( m_xTextRange, uno::UNO_QUERY_THROW );
++void
++ScVbaHyperlink::setName( const ::rtl::OUString & rName ) throw (css::uno::RuntimeException)
++{
++ setTextToDisplay( rName );
++}
+
-+ ScVbaPalette aPalette( pDoc->GetDocumentShell() );
-+ return new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length, sal_True );
++::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;
+}
-Index: sc/source/ui/vba/vbatextboxshape.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 @@
-+/*************************************************************************
-+ *
-+ * 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_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"
+
-+typedef cppu::ImplInheritanceHelper1< ScVbaShape, oo::msforms::XTextBoxShape > TextBoxShapeImpl_BASE;
++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 );
++}
+
-+class ScVbaTextBoxShape : public TextBoxShapeImpl_BASE
++css::uno::Reference< oo::excel::XRange > SAL_CALL ScVbaHyperlink::Range() throw (css::uno::RuntimeException)
+{
-+ 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
++ 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;
++}
++
++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
===================================================================
-RCS file: sc/source/ui/vba/vbatogglebutton.cxx
-diff -N sc/source/ui/vba/vbatogglebutton.cxx
+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/vbatogglebutton.cxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
-@@ -0,0 +1,108 @@
++++ sc/source/ui/vba/vbahyperlink.hxx 29 Jul 2008 06:35:41 -0000 1.1.2.1
+@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -3645,383 +3914,808 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#include "vbatogglebutton.hxx"
-+#include <vector>
++#ifndef SC_VBA_HYPERLINK_HXX
++#define SC_VBA_HYPERLINK_HXX
+
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#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>
+
++#include "vbahelperinterface.hxx"
+
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+const static rtl::OUString TOGGLE( RTL_CONSTASCII_USTRINGPARAM("Toggle") );
-+const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-+ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++typedef InheritedHelperInterfaceImpl1< oo::excel::XHyperlink > HyperlinkImpl_BASE;
++
++class ScVbaHyperlink : public HyperlinkImpl_BASE
+{
-+ OSL_TRACE("ScVbaToggleButton(ctor)");
-+ m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
++ css::uno::Reference< css::table::XCell > mxCell;
++ css::uno::Reference< css::beans::XPropertySet > mxTextField;
++
++public:
++ ScVbaHyperlink( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ) throw ( css::lang::IllegalArgumentException );
++ virtual ~ScVbaHyperlink();
++
++ // Attributes
++ virtual ::rtl::OUString SAL_CALL getAddress() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setAddress( const ::rtl::OUString &rAddress ) throw (css::uno::RuntimeException);
++ virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setName( const ::rtl::OUString &rName ) throw (css::uno::RuntimeException);
++ virtual ::rtl::OUString SAL_CALL getTextToDisplay() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setTextToDisplay( const ::rtl::OUString &rTextToDisplay ) throw (css::uno::RuntimeException);
++
++ // Methods
++ virtual css::uno::Reference< oo::excel::XRange > SAL_CALL Range() throw (css::uno::RuntimeException);
++
++ // XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif /* SC_VBA_HYPERLINK_HXX */
++
+Index: sc/source/ui/vba/vbainterior.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/vba/vbainterior.cxx,v
+retrieving revision 1.5
+retrieving revision 1.5.96.1
+diff -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"
++
++#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" ) );
++
++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;
++}
++
++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();
++ }
+}
+
-+ScVbaToggleButton::~ScVbaToggleButton()
++void
++ScVbaInterior::SetMixedColor()
+{
-+ OSL_TRACE("~ScVbaToggleButton(dtor)");
++ // 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;
+}
+
-+// Attributes
-+rtl::OUString SAL_CALL
-+ScVbaToggleButton::getCaption() throw (css::uno::RuntimeException)
++uno::Any SAL_CALL
++ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
+{
-+ rtl::OUString Label;
-+ m_xProps->getPropertyValue( LABEL ) >>= Label;
-+ return Label;
++ 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
-+ScVbaToggleButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++ScVbaInterior::setPattern( const uno::Any& _pattern ) throw (uno::RuntimeException)
+{
-+ m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
++ 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
-+ScVbaToggleButton::getValue() throw (uno::RuntimeException)
++ScVbaInterior::getPatternColor() throw (uno::RuntimeException)
+{
-+ sal_Int16 nState = 0;
-+ m_xProps->getPropertyValue( STATE ) >>= nState;
-+ return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
++ // 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 -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.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbalabel.cxx 11 Apr 2008 01:03:52 -0000 1.3
++++ sc/source/ui/vba/vbalabel.cxx 6 Jul 2008 15:30:14 -0000 1.2.42.2
+@@ -35,7 +35,7 @@ using namespace org::openoffice;
+
+
+ const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
+-ScVbaLabel::ScVbaLabel( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : LabelImpl_BASE( xContext, xControlShape )
++ScVbaLabel::ScVbaLabel( const css::uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, pGeomHelper )
+ {
+ }
+
+@@ -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() );
+}
+
+void SAL_CALL
-+ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
++ScVbaLabel::setValue( const uno::Any& _value ) throw (::com::sun::star::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 sCaption;
++ _value >>= sCaption;
++ setCaption( sCaption );
+}
+
++
+rtl::OUString&
-+ScVbaToggleButton::getServiceImplName()
++ScVbaLabel::getServiceImplName()
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaToggleButton") );
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
-+ScVbaToggleButton::getServiceNames()
++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.ToggleButton" ) );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Label" ) );
+ }
+ return aServiceNames;
+}
-+
-Index: sc/source/ui/vba/vbatogglebutton.hxx
+Index: sc/source/ui/vba/vbalabel.hxx
===================================================================
-RCS file: sc/source/ui/vba/vbatogglebutton.hxx
-diff -N sc/source/ui/vba/vbatogglebutton.hxx
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ sc/source/ui/vba/vbatogglebutton.hxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
-@@ -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
+RCS file: /cvs/sc/sc/source/ui/vba/vbalabel.hxx,v
+retrieving revision 1.3
+retrieving revision 1.2.42.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbalabel.hxx 11 Apr 2008 01:04:06 -0000 1.3
++++ sc/source/ui/vba/vbalabel.hxx 6 Jul 2008 15:30:52 -0000 1.2.42.2
+@@ -34,16 +34,23 @@
+
+ #include "vbacontrol.hxx"
+ #include "vbahelper.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, oo::AbstractGeometryAttributes* pGeomHelper );
-+ ~ScVbaToggleButton();
-+ // Attributes
+
+-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, 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);
+ 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/vbauserform.cxx
+ };
+ #endif //SC_VBA_LABEL_HXX
+Index: sc/source/ui/vba/vbalistbox.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 22 Apr 2008 19:53:16 -0000 1.1.2.1
-@@ -0,0 +1,219 @@
-+/*************************************************************************
-+ *
-+ * 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"
-+
-+using namespace ::org::openoffice;
-+using namespace ::com::sun::star;
-+
-+// some little notes
-+// XDialog implementation has the following interesting bits
-+// a Controls property ( which is an array of the container controls )
-+// each item in the controls array is a XControl, where the model is
-+// basically a property bag
-+// additionally the XDialog instance has itself a model
-+// this model has a ControlModels ( array of models ) property
-+// the models in ControlModels can be accessed by name
-+// also the XDialog is a XControl ( to access the model above
-+
-+ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) : ScVbaUserForm_BASE( getXSomethingFromArgs< vba::XHelperInterface >( aArgs, 0 ), xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), static_cast< org::openoffice::AbstractGeometryAttributes* >(0) ), m_pDocShell( 0 ), mbDispose( true )
+RCS file: /cvs/sc/sc/source/ui/vba/vbalistbox.cxx,v
+retrieving revision 1.4
+retrieving revision 1.3.42.3
+diff -u -p -b -w -B -r1.4 -r1.3.42.3
+--- sc/source/ui/vba/vbalistbox.cxx 11 Apr 2008 01:05:34 -0000 1.4
++++ sc/source/ui/vba/vbalistbox.cxx 29 Jul 2008 06:35:41 -0000 1.3.42.3
+@@ -37,31 +37,49 @@
+ 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, AbstractGeometryAttributes* pGeomHelper ) : ListBoxImpl_BASE( xParent, xContext, xControl, pGeomHelper )
+ {
+- // grab the default value property name
+- m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
+ }
+
+-ScVbaListBox::ScVbaListBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xPropSet, const css::uno::Reference< css::drawing::XControlShape > xControlShape ) : ListBoxImpl_BASE( xContext, xPropSet, xControlShape )
++// 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)
+{
-+ m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
-+ uno::Reference< frame::XModel > xModel = getXSomethingFromArgs< frame::XModel >( aArgs, 2 );
-+ uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
-+ m_pDocShell = getDocShell( xModel );
-+ m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
-+ setGeometryHelper( new UserFormGeometryHelper( xContext, xControl ) );
++ 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 ] );
+}
-+
-+ScVbaUserForm::~ScVbaUserForm()
+
+-// 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 +109,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,29 +142,7 @@ ScVbaListBox::setMultiSelect( sal_Bool _
+ {
+ m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ), uno::makeAny( _multiselect ) );
+ }
+-/*
+-css::uno::Sequence< sal_Bool > SAL_CALL
+-ScVbaListBox::getSelected() throw (css::uno::RuntimeException)
+-{
+- uno::Sequence< rtl::OUString > sList;
+- uno::Sequence< sal_Int16 > nList;
+- m_xProps->getPropertyValue( ITEMS ) >>= sList;
+- uno::Sequence< sal_Bool > bSelected( sList.getLength() );
+- for( sal_Int16 i = 0; i < bSelected.getLength(); i++ )
+- bSelected[i] = sal_False;
+- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
+- for( sal_Int16 i = 0; i < nList.getLength(); i++ )
+- {
+- bSelected[nList[i]] = sal_True;
+- }
+- return bSelected;
+-}
+
+-void SAL_CALL
+-ScVbaListBox::setSelected( const css::uno::Sequence< sal_Bool >& _selected ) throw (css::uno::RuntimeException)
+-{
+-}
+-*/
+ css::uno::Any SAL_CALL
+ ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
+ {
+@@ -219,12 +214,45 @@ ScVbaListBox::AddItem( const uno::Any& p
+ }
+
+ void SAL_CALL
++ScVbaListBox::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
-+ScVbaUserForm::Show( ) throw (uno::RuntimeException)
-+{
-+ OSL_TRACE("ScVbaUserForm::Show( )");
-+ short aRet = 0;
-+ if ( m_xDialog.is() )
-+ aRet = m_xDialog->execute();
-+ OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet);
-+ if ( mbDispose )
-+ {
-+ try
-+ {
-+ uno::Reference< lang::XComponent > xComp( m_xDialog, uno::UNO_QUERY_THROW );
-+ m_xDialog = NULL;
-+ xComp->dispose();
-+ mbDispose = false;
-+ }
-+ catch( uno::Exception& )
-+ {
-+ }
-+ }
-+}
-+
-+rtl::OUString SAL_CALL
-+ScVbaUserForm::getCaption() throw (::com::sun::star::uno::RuntimeException)
-+{
-+ rtl::OUString sCaption;
-+ m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ) ) >>= sCaption;
-+ return sCaption;
-+}
-+void
-+ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-+{
-+ m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), uno::makeAny( _caption ) );
-+}
-+
-+void SAL_CALL
-+ScVbaUserForm::Hide( ) throw (uno::RuntimeException)
-+{
-+ mbDispose = false; // hide not dispose
-+ if ( m_xDialog.is() )
-+ m_xDialog->endExecute();
-+}
+ 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 >() ) );
+ }
+
-+void SAL_CALL
-+ScVbaUserForm::RePaint( ) throw (uno::RuntimeException)
-+{
-+ // do nothing
-+}
++// 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 +262,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 +278,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 +300,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 )
+
-+void SAL_CALL
-+ScVbaUserForm::UnloadObject( ) throw (uno::RuntimeException)
-+{
-+ mbDispose = true;
-+ if ( m_xDialog.is() )
-+ m_xDialog->endExecute();
-+}
+ css::uno::Any
+ ScVbaListBox::getValueEvent()
+ {
+@@ -287,3 +320,22 @@ ScVbaListBox::getValueEvent()
+
+ return uno::makeAny( sal_False );
+ }
+
+rtl::OUString&
-+ScVbaUserForm::getServiceImplName()
++ScVbaListBox::getServiceImplName()
+{
-+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaListBox") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
-+ScVbaUserForm::getServiceNames()
++ScVbaListBox::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
-+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.UserForm" ) );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.ScVbaListBox" ) );
+ }
+ return aServiceNames;
+}
+Index: sc/source/ui/vba/vbalistbox.hxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/vba/vbalistbox.hxx,v
+retrieving revision 1.3
+retrieving revision 1.2.42.3
+diff -u -p -b -w -B -r1.3 -r1.2.42.3
+--- sc/source/ui/vba/vbalistbox.hxx 11 Apr 2008 01:05:48 -0000 1.3
++++ sc/source/ui/vba/vbalistbox.hxx 29 Jul 2008 06:35:41 -0000 1.2.42.3
+@@ -49,14 +49,11 @@ class ScVbaListBox : public ListBoxImpl_
+ 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< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::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 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 +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);
+
+
+ // 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();
+
-+uno::Reference< beans::XIntrospectionAccess > SAL_CALL
-+ScVbaUserForm::getIntrospection( ) throw (uno::RuntimeException)
-+{
-+ return uno::Reference< beans::XIntrospectionAccess >();
-+}
-+
-+uno::Any SAL_CALL
-+ScVbaUserForm::invoke( const ::rtl::OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
-+{
-+ throw uno::RuntimeException(); // unsupported operation
-+}
-+
-+void SAL_CALL
-+ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
-+{
-+ 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 );
-+}
-+
-+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 );
-+ 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)
-+{
-+ return sal_False;
-+}
-+
-+::sal_Bool SAL_CALL
-+ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
-+{
-+ uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY );
-+ 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",
-+ "org.openoffice.excel.UserForm" );
-+}
-+
-Index: sc/source/ui/vba/vbauserform.hxx
+ //PropListener
+ virtual void setValueEvent( const css::uno::Any& value );
+ virtual css::uno::Any getValueEvent();
+Index: sc/source/ui/vba/vbamultipage.cxx
===================================================================
-RCS file: sc/source/ui/vba/vbauserform.hxx
-diff -N sc/source/ui/vba/vbauserform.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/vbauserform.hxx 22 Apr 2008 19:53:17 -0000 1.1.2.1
-@@ -0,0 +1,77 @@
++++ sc/source/ui/vba/vbamultipage.cxx 22 Apr 2008 19:53:15 -0000 1.1.2.1
+@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -4056,2076 +4750,6355 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#ifndef SC_VBA_USERFORM_HXX
-+#define SC_VBA_USERFORM_HXX
-+
-+#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/msforms/XUserForm.hpp>
-+#include <com/sun/star/awt/XDialog.hpp>
++#include "vbamultipage.hxx"
++#include <org/openoffice/vba/XCollection.hpp>
++#include "vbapages.hxx"
++#include <vector>
+
-+#include "vbahelperinterface.hxx"
-+#include "vbacontrol.hxx"
++using namespace com::sun::star;
++using namespace org::openoffice;
+
-+//typedef InheritedHelperInterfaceImpl1< oo::msforms::XUserForm > ScVbaUserForm_BASE;
-+typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XUserForm > ScVbaUserForm_BASE;
++// 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") );
+
-+class ScVbaUserForm : public ScVbaUserForm_BASE
++typedef cppu::WeakImplHelper1< container::XIndexAccess > PagesImpl_Base;
++class PagesImpl : public PagesImpl_Base
+{
-+private:
-+ css::uno::Reference< css::awt::XDialog > m_xDialog;
-+ ScDocShell* m_pDocShell;
-+ bool mbDispose;
-+protected:
++ sal_Int32 mnPages;
+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);
-+
-+ //XHelperInterface
-+ virtual rtl::OUString& getServiceImplName();
-+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+};
-+#endif
-Index: sc/source/ui/vba/vbawindow.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbawindow.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/vbawindow.cxx 29 Jan 2008 08:02:52 -0000 1.4
-+++ sc/source/ui/vba/vbawindow.cxx 13 Mar 2008 18:08:58 -0000 1.3.42.2
-@@ -42,7 +42,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>
-
- #include <docsh.hxx>
- #include <tabvwsh.hxx>
-@@ -446,8 +450,8 @@ ScVbaWindow::Close( const uno::Any& Save
- 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 );
- }
-@@ -634,7 +638,8 @@ ScVbaWindow::setSplitColumn( sal_Int32 _
- if( getSplitColumn() != _splitcolumn )
- {
- sal_Bool bFrozen = getFreezePanes();
-- m_xViewFreezable->freezeAtPosition( _splitcolumn, 0 );
-+ sal_Int32 nRow = getSplitRow();
-+ m_xViewFreezable->freezeAtPosition( _splitcolumn, nRow );
- SplitAtDefinedPosition( !bFrozen );
- }
- }
-@@ -666,7 +671,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 );
- }
- }
-@@ -741,6 +747,184 @@ ScVbaWindow::setZoom( const uno::Any& _z
- }
- }
-
-+uno::Reference< excel::XWorksheet > SAL_CALL
-+ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeException)
-+{
-+ return ScVbaGlobals::getGlobalsImpl(mxContext)->getApplication()->getActiveSheet();
-+}
-+
-+uno::Any SAL_CALL
-+ScVbaWindow::getView() throw (uno::RuntimeException)
-+{
-+ // not supported now
-+ sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;
-+ return uno::makeAny( nWindowView );
-+}
-+
-+void SAL_CALL
-+ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException)
-+{
-+ 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 );
-+}
-+
-+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;
-+}
-+
-+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() )
++ 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)
+ {
-+ xWindow->setVisible( _visible );
++ if ( Index < 0 || Index > mnPages )
++ throw lang::IndexOutOfBoundsException();
++ return uno::makeAny( uno::Reference< uno::XInterface >() );
+ }
-+}
-+
-+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() )
++ // XElementAccess
++ virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException)
+ {
-+ aRect = xWindow->getPosSize();
++ // no Pages object yet #FIXME
++ //return msforms::XPage::static_type(0);
++ return uno::XInterface::static_type(0);
+ }
-+ 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() )
++ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
-+ 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;
-+ }
++ return ( mnPages > 0 );
+ }
-+}
-+
-+sal_Int32 SAL_CALL
-+ScVbaWindow::getHeight() throw (uno::RuntimeException)
-+{
-+ css::awt::Rectangle aRect = getPosSize(m_xModel);
-+ return aRect.Height;
-+}
-+
-+void SAL_CALL
-+ScVbaWindow::setHeight( sal_Int32 _height ) throw (uno::RuntimeException)
-+{
-+ setPosSize(m_xModel, _height, css::awt::PosSize::HEIGHT);
-+}
-+
-+sal_Int32 SAL_CALL
-+ScVbaWindow::getLeft() throw (uno::RuntimeException)
++};
++uno::Reference< container::XIndexAccess >
++ScVbaMultiPage::getPages( sal_Int32 nPages )
+{
-+ css::awt::Rectangle aRect = getPosSize(m_xModel);
-+ return aRect.X;
++ return new PagesImpl( nPages );
+}
+
-+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)
++ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper, const uno::Reference< uno::XInterface >& xDialog ) : MultiPageImpl_BASE( xParent, xContext, xControl, pGeomHelper )
+{
-+ css::awt::Rectangle aRect = getPosSize(m_xModel);
-+ return aRect.Y;
++ mxDialogProps.set( xDialog, uno::UNO_QUERY_THROW );
++ // set dialog step to value of multipage pseudo model
++ setValue(getValue());
+}
+
-+void SAL_CALL
-+ScVbaWindow::setTop( sal_Int32 _top ) throw (uno::RuntimeException)
-+{
-+ setPosSize(m_xModel, _top, css::awt::PosSize::Y);
-+}
++// Attributes
+sal_Int32 SAL_CALL
-+ScVbaWindow::getWidth() throw (uno::RuntimeException)
++ScVbaMultiPage::getValue() throw (css::uno::RuntimeException)
+{
-+ css::awt::Rectangle aRect = getPosSize(m_xModel);
-+ return aRect.Width;
++ sal_Int32 nValue = 0;
++ m_xProps->getPropertyValue( SVALUE ) >>= nValue;
++ return nValue;
+}
+
+void SAL_CALL
-+ScVbaWindow::setWidth( sal_Int32 _width ) throw (uno::RuntimeException)
++ScVbaMultiPage::setValue( const sal_Int32 _value ) throw (::com::sun::star::uno::RuntimeException)
+{
-+ setPosSize(m_xModel, _width, css::awt::PosSize::WIDTH);
++ // 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) );
+}
+
-+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)
++rtl::OUString&
++ScVbaMultiPage::getServiceImplName()
+{
-+ sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points );
-+ double fConvertFactor = (m_xDevice->getInfo().PixelPerMeterY/100000);
-+ return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters );
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage") );
++ return sImplName;
+}
+
-+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)
++uno::Any SAL_CALL
++ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException)
+{
-+ // need test, print current active sheet
-+ PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, m_xModel, sal_True );
++ 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() );
+}
+
-+void SAL_CALL
-+ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++uno::Sequence< rtl::OUString >
++ScVbaMultiPage::getServiceNames()
+{
-+ // need test, print preview current active sheet
-+ PrintPreviewHelper( EnableChanges, m_xModel );
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.MultiPage" ) );
++ }
++ return aServiceNames;
+}
-+
- rtl::OUString&
- ScVbaWindow::getServiceImplName()
- {
-Index: sc/source/ui/vba/vbawindow.hxx
+Index: sc/source/ui/vba/vbamultipage.hxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbawindow.hxx,v
-retrieving revision 1.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbawindow.hxx 7 Dec 2007 11:05:26 -0000 1.3
-+++ sc/source/ui/vba/vbawindow.hxx 18 Jan 2008 16:51:38 -0000 1.3.42.1
-@@ -64,8 +64,11 @@ 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();
+RCS file: sc/source/ui/vba/vbamultipage.hxx
+diff -N sc/source/ui/vba/vbamultipage.hxx
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbamultipage.hxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
+@@ -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 <org/openoffice/msforms/XMultiPage.hpp>
++#include <com/sun/star/container/XIndexAccess.hpp>
+
- // 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);
-@@ -82,6 +85,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) ;
-@@ -96,6 +103,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);
-@@ -108,8 +123,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
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++//#include <cppuhelper/implbase2.hxx>
++#include <cppuhelper/implbase1.hxx>
++
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XMultiPage > MultiPageImpl_BASE;
++
++class ScVbaMultiPage : public MultiPageImpl_BASE
++{
++ css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
++ css::uno::Reference< css::beans::XPropertySet > mxDialogProps;
++public:
++ ScVbaMultiPage( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper, const css::uno::Reference< css::uno::XInterface >& xDialog );
++ // 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);
++
++ //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
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaworkbook.cxx,v
-retrieving revision 1.4
-retrieving revision 1.4.42.1
-diff -u -p -u -p -b -w -B -r1.4 -r1.4.42.1
---- sc/source/ui/vba/vbaworkbook.cxx 10 Dec 2007 09:31:05 -0000 1.4
-+++ sc/source/ui/vba/vbaworkbook.cxx 18 Jan 2008 16:51:38 -0000 1.4.42.1
-@@ -433,14 +433,18 @@ ScVbaWorkbook::Styles( const::uno::Any&
+RCS file: /cvs/sc/sc/source/ui/vba/vbaname.cxx,v
+retrieving revision 1.3
+retrieving revision 1.2.42.2
+diff -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 @@
- // Amelia Wang
- uno::Any SAL_CALL
--ScVbaWorkbook::Names( ) throw (uno::RuntimeException)
-+ScVbaWorkbook::Names( const css::uno::Any& aIndex ) throw (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"
+@@ -110,17 +111,37 @@ ScVbaName::getValue() throw (css::uno::R
{
- 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 )
+ ::rtl::OUString sValue = mxNamedRange->getContent();
+ ::rtl::OUString sSheetName = getWorkSheet()->getName();
+- if ( sValue.toChar() == '$' )
++ ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( ";" );
++ ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( "," );
++ ::rtl::OUString sResult;
++ sal_Int32 nFrom = 0;
++ sal_Int32 nTo = 0;
++ nTo = sValue.indexOf( sSegmentation, nFrom );
++ while ( nTo != -1 )
+ {
+- ::rtl::OUString sTmp = sValue.copy(1);
+- sValue = sTmp;
++ ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
++ if ( sTmpValue.toChar() == '$' )
++ {
++ ::rtl::OUString sTmp = sTmpValue.copy( 1 );
++ sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
++ sResult += sTmp;
++ sResult += sNewSegmentation;
++ }
++ nFrom = nTo + 1;
++ nTo = sValue.indexOf( sSegmentation, nFrom );
++ }
++ ::rtl::OUString sTmpValue = sValue.copy( nFrom );
++ if ( sTmpValue.toChar() == '$' )
++ {
++ ::rtl::OUString sTmp = sTmpValue.copy(1);
++ sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
++ sResult += sTmp;
+ }
+- sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
+- if (sValue.indexOf('=') != 0)
++ if (sResult.indexOf('=') != 0)
+ {
+- sValue = ::rtl::OUString::createFromAscii("=") + sValue;
++ sResult = ::rtl::OUString::createFromAscii("=") + sResult;
+ }
+- return sValue;
++ return sResult;
+ }
+
+ void
+@@ -128,17 +149,38 @@ ScVbaName::setValue( const ::rtl::OUStri
+ {
+ ::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 )
+ {
- return uno::Any( xNames );
++ ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
++ sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
++ if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
++ {
++ sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
++ }
++ sTmpValue += sNewSegmentation;
++ sResult += sTmpValue;
++ nFrom = nTo + 1;
++ nTo = sValue.indexOf( sSegmentation, nFrom );
++ }
++ ::rtl::OUString sTmpValue = sValue.copy( nFrom );
++ sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
++ if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
+ {
+- sValue = ::rtl::OUString::createFromAscii("$") + sSheetName;
++ sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
+ }
+- sValue = sValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
+- mxNamedRange->setContent(sValue);
++ sResult += sTmpValue;
++ mxNamedRange->setContent(sResult);
}
-+ return uno::Any( xNames->Item( aIndex, uno::Any() ) );
-+}
- rtl::OUString&
- ScVbaWorkbook::getServiceImplName()
-Index: sc/source/ui/vba/vbaworkbook.hxx
+ ::rtl::OUString
+@@ -192,7 +234,7 @@ ScVbaName::setRefersToR1C1Local( const :
+ css::uno::Reference< oo::excel::XRange >
+ ScVbaName::getRefersToRange() throw (css::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;
+ }
+
+Index: sc/source/ui/vba/vbanames.cxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaworkbook.hxx,v
+RCS file: /cvs/sc/sc/source/ui/vba/vbanames.cxx,v
retrieving revision 1.3
-retrieving revision 1.3.42.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.1
---- sc/source/ui/vba/vbaworkbook.hxx 7 Dec 2007 11:06:17 -0000 1.3
-+++ sc/source/ui/vba/vbaworkbook.hxx 18 Jan 2008 16:51:38 -0000 1.3.42.1
-@@ -80,7 +80,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);
+retrieving revision 1.2.42.2
+diff -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 )
+ {
++ m_xNameAccess.set( xNames, uno::UNO_QUERY_THROW );
+ }
- 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
+ ScVbaNames::~ScVbaNames()
+Index: sc/source/ui/vba/vbapagebreak.cxx
===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaworksheet.cxx,v
-retrieving revision 1.4
-retrieving revision 1.3.42.3
-diff -u -p -u -p -b -w -B -r1.4 -r1.3.42.3
---- sc/source/ui/vba/vbaworksheet.cxx 29 Jan 2008 15:47:58 -0000 1.4
-+++ sc/source/ui/vba/vbaworksheet.cxx 22 Apr 2008 19:53:17 -0000 1.3.42.3
-@@ -61,6 +61,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>
-
-@@ -421,6 +422,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();
- }
- }
-
-@@ -661,29 +663,10 @@ ScVbaWorksheet::setValue( const ::rtl::O
- 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() );
-+ uno::Reference< msforms::XControl > xControl( controlFactory.createControl( getModel() ) );
- return uno::makeAny( xControl );
--// return aProp;
- }
-
- ::sal_Bool SAL_CALL
-@@ -691,77 +674,59 @@ ScVbaWorksheet::hasMethod( const ::rtl::
- {
- return sal_False;
- }
--::sal_Bool SAL_CALL
--ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+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;
+
-+uno::Reference< container::XNameAccess >
-+ScVbaWorksheet::getFormControls()
- {
-+ uno::Reference< container::XNameAccess > xFormControls;
- try
- {
-- if ( getControl( aName ).hasValue() )
-- return sal_True;
-+ uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
-+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
-+ uno::Reference< form::XFormsSupplier > xFormSupplier( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
-+ uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
-+ // get the www-standard container ( maybe we should access the
-+ // 'www-standard' by name rather than index, this seems an
-+ // implementation detail
-+ xFormControls.set( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
-+
- }
- catch( uno::Exception& )
- {
- }
-- return sal_False;
--}
--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)
++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::Reference< container::XNameAccess > xFormControls( getFormControls() );
-+ if ( xFormControls.is() )
-+ return xFormControls->hasByName( aName );
-+ return sal_False;
- }
-
- uno::Any
- ScVbaWorksheet::getControlShape( const ::rtl::OUString& sName )
- {
-- //uno::Reference< sheet::XScenarioEnhanced > xIf( getSheet(), uno::UNO_QUERY_THROW );
-- uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
-- uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
-- uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
-- uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPage, uno::UNO_QUERY_THROW );
-+ // ideally we would get an XControl object but it appears an XControl
-+ // implementation only exists for a Control implementation optained from the
-+ // view ( e.g. in basic you would get this from
-+ // thiscomponent.currentcontroller.getControl( controlModel ) )
-+ // and the thing to realise is that it is only possible to get an XControl
-+ // for a currently displayed control :-( often we would want to modify
-+ // a control not on the active sheet. But.. you can always access the
-+ // XControlShape from the DrawPage whether that is the active drawpage or not
++}
+
-+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getSheet(), uno::UNO_QUERY_THROW );
-+ uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
++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;
+
- 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 );
-+ uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW );
- if( sName.equals( xNamed->getName() ))
- {
- return aUnoObj;
-@@ -861,6 +825,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)
++ 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)
+{
-+ 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( (type != excel::XlPageBreak::xlPageBreakNone) &&
++ (type != excel::XlPageBreak::xlPageBreakManual) &&
++ (type != excel::XlPageBreak::xlPageBreakAutomatic) )
++ {
++ DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++ }
+
-+ if ( !( nFrom || nTo ) )
-+ bSelection = sal_True;
++ if( type == excel::XlPageBreak::xlPageBreakNone )
++ {
++ mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
++ return;
++ }
+
-+ uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
-+ PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, xModel, bSelection );
++ 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;
+}
+
-
- namespace worksheet
- {
-Index: sc/source/ui/vba/vbaworksheet.hxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/vba/vbaworksheet.hxx,v
-retrieving revision 1.3
-retrieving revision 1.3.42.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.42.2
---- sc/source/ui/vba/vbaworksheet.hxx 7 Dec 2007 11:07:07 -0000 1.3
-+++ sc/source/ui/vba/vbaworksheet.hxx 22 Apr 2008 19:53:17 -0000 1.3.42.2
-@@ -62,7 +62,7 @@ class ScVbaWorksheet : public WorksheetI
- css::uno::Reference< oo::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
- css::uno::Reference< oo::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
-
-- css::uno::Any getControl( const rtl::OUString& sName );
-+ css::uno::Reference< css::container::XNameAccess > getFormControls();
- css::uno::Any getControlShape( const rtl::OUString& sName );
- protected:
-
-@@ -136,6 +136,7 @@ public:
- 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/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/cvsziHo0R differ
-Index: sc/source/ui/vba/testvba/TestDocuments/MiscRangeTests.xls
++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("org.openoffice.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("org.openoffice.excel.HPageBreak" ) );
++ }
++ return aServiceNames;
++}
++
+Index: sc/source/ui/vba/vbapagebreak.hxx
===================================================================
-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/cvsrzmNHF 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/cvsYXoCpt 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/cvsUTGSfh differ
-Index: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
-Binary files /dev/null and /tmp/cvsI3cl64 differ
-Index: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
-===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
-diff -N sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
-Binary files /dev/null and /tmp/cvsERaGPT 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/cvss96gzI 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/cvsrkB5ix 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/cvswtEb3l differ
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
+RCS file: sc/source/ui/vba/vbapagebreak.hxx
+diff -N sc/source/ui/vba/vbapagebreak.hxx
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbapagebreak.hxx 29 Jul 2008 06:35:41 -0000 1.1.2.1
+@@ -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 >
++{
++typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE;
++protected:
++ css::sheet::TablePageBreakData maTablePageBreakData;
++ css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet;
++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);
++
++ // XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++
++
++typedef ScVbaPageBreak < oo::excel::XHPageBreak > ScVbaHPageBreak_BASE;
++
++class ScVbaHPageBreak : public ScVbaHPageBreak_BASE
++{
++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();
++};
++
++#endif
+Index: sc/source/ui/vba/vbapagebreaks.cxx
===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
+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/testvba/TestDocuments/logs/excel/AutoFilter.log 28 Jan 2008 17:30:45 -0000 1.1.2.1
-@@ -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
-+============
++++ sc/source/ui/vba/vbapagebreaks.cxx 29 Jul 2008 06:35:41 -0000 1.1.2.1
+@@ -0,0 +1,269 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU Lesser General Public License version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++#include "vbapagebreaks.hxx"
++#include "vbapagebreak.hxx"
++#include <org/openoffice/excel/XWorksheet.hpp>
++using namespace ::com::sun::star;
++using namespace ::org::openoffice;
+
-+Tests passed: 7
-+Tests failed: 0
++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;
+
-+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
++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;
++ }
++
++ sheet::TablePageBreakData getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException);
++ uno::Any Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++
++ // XIndexAccess
++ virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException);
++ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
++ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
++ {
++ //if( m_bColumn )
++ // return excel::XVPageBreak::static_type(0);
++ return excel::XHPageBreak::static_type(0);
++ }
++ virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
++ {
++ return sal_True;
++ }
++};
++
++/** @TODO Unlike MS Excel this method only considers the pagebreaks that intersect the used range
++* To become completely compatible the print area has to be considered. As far as I found out this printarea
++* also considers the position and sizes of shapes and manually inserted page breaks
++* Note: In MS there is a limit of 1026 horizontal page breaks per sheet.
++*/
++sal_Int32 SAL_CALL RangePageBreaks::getCount( ) throw (uno::RuntimeException)
++{
++ 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++ )
++ {
++ sal_Int32 nPos = aTablePageBreakData[i].Position;
++ if( nPos > nUsedEnd )
++ return nCount;
++ if( nPos >= nUsedStart )
++ nCount++;
++ }
++
++ return nCount;
++}
++
++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();
++}
++
++sheet::TablePageBreakData RangePageBreaks::getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, 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();
++
++ 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::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());
++ }
++
++ 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) ));
++}
++
++
++class RangePageBreaksEnumWrapper : public EnumerationHelper_BASE
++{
++ uno::Reference<container::XIndexAccess > m_xIndexAccess;
++ sal_Int32 nIndex;
++public:
++ RangePageBreaksEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
++ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
++ {
++ return ( nIndex < m_xIndexAccess->getCount() );
++ }
++
++ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
++ {
++ if ( nIndex < m_xIndexAccess->getCount() )
++ return m_xIndexAccess->getByIndex( nIndex++ );
++ throw container::NoSuchElementException();
++ }
++};
++
++ScVbaHPageBreaks::ScVbaHPageBreaks( const uno::Reference< 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)
++{
++ RangePageBreaks* pPageBreaks = dynamic_cast< RangePageBreaks* >( m_xIndexAccess.get() );
++ if( pPageBreaks )
++ {
++ return pPageBreaks->Add( Before );
++ }
++ return uno::Any();
++}
++
++uno::Reference< container::XEnumeration >
++ScVbaHPageBreaks::createEnumeration() throw (uno::RuntimeException)
++{
++ return new RangePageBreaksEnumWrapper( m_xIndexAccess );
++}
++
++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 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.HPageBreaks" ) );
++ }
++ return aServiceNames;
++}
++
+Index: sc/source/ui/vba/vbapagebreaks.hxx
===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/MiscRangeTests.log
+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/testvba/TestDocuments/logs/excel/MiscRangeTests.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -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
++++ sc/source/ui/vba/vbapagebreaks.hxx 29 Jul 2008 06:35:42 -0000 1.1.2.1
+@@ -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
+
-+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
++#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"
++
++typedef CollTestImplHelper< oo::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
++
++class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE
++{
++ css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak;
++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&);
++
++ // XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++
++#endif
+Index: sc/source/ui/vba/vbapages.cxx
===================================================================
-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
+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/testvba/TestDocuments/logs/excel/Ranges-2.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -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/Ranges-3.log
++++ 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"
++
++using namespace ::org::openoffice;
++using namespace ::com::sun::star;
++using namespace ::vos;
++
++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 )
++{
++}
++
++uno::Type SAL_CALL
++ScVbaPages::getElementType() throw (uno::RuntimeException)
++{
++ // return msforms::XPage::static_type(0);
++ return uno::XInterface::static_type(0);
++}
++
++uno::Any
++ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
++{
++ return aSource;
++}
++
++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/testvba/TestDocuments/logs/excel/Ranges-3.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges-3.log
+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/testvba/TestDocuments/logs/excel/Ranges-3.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -0,0 +1,8 @@
-+Test run started : 19/06/2007 11:21:42
-+----------------------------------------------------------------
-+MyGoalseek-Issue
-+ TEST START : MyGoalseek-Issue
-+ ITEM Assertion OK : Variable Range value: 15
-+END 'MyGoalseek-Issue' Symbol
-+ TEST OK : MyGoalseek-Issue
-+Test run finished : 19/06/2007 11:21:42
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
++++ sc/source/ui/vba/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 );
++
++};
++#endif//SC_VBA_SHAPE_HXX
+Index: sc/source/ui/vba/vbapagesetup.cxx
===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
+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/testvba/TestDocuments/logs/excel/Ranges.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -0,0 +1,280 @@
-+Test run started : 01/06/2007 11:28:58
-+----------------------------------------------------------------
-+ApplicationMethods
-+ TEST START : ApplicationMethods
-+ ITEM Assertion OK : Name of Workbook is: Ranges.xls
-+ ITEM Assertion OK : Address of Application.Columns is: $A:$A
-+ ITEM Assertion OK : Address of Application.Rows is: $1:$1
-+ ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
-+ ITEM Assertion OK : Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
-+ ITEM Assertion OK : Please check manually: Library Path is: C:\Program Files\Microsoft Office\OFFICE11\LIBRARY
-+ ITEM Assertion OK : Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\Microsoft\Templates\
-+ ITEM Assertion OK : FileSeparator is \
-+ ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
-+END 'ApplicationMethods' Symbol
-+ TEST OK : ApplicationMethods
-+----------------------------------------------------------------
-+Insert-Issue
-+ TEST START : Insert-Issue
-+ ITEM Assertion OK : Insert with xlShiftToRight: 10
-+END 'Insert-Issue' Symbol
-+ TEST OK : Insert-Issue
-+----------------------------------------------------------------
-+MergeCells-Issue
-+ TEST START : MergeCells-Issue
-+ ITEM Assertion OK : Range.MergeCells is True
-+ ITEM Assertion OK : MergeCells is null: True
-+ ITEM Assertion OK : RowCount after Merge: 6
-+ ITEM Assertion OK : Range.MergeCells is False
-+ ITEM Assertion OK : MergeCells is null: False
-+ ITEM Assertion OK : MergeCells of Second Area is null : True
-+ ITEM Assertion OK : MergeCells of Ranges is Null: True
-+ ITEM Assertion OK : RowCount after Merge: 7
-+ ITEM Assertion OK : Range.MergeCells is False
-+ ITEM Assertion OK : MergeCells is null: False
-+ ITEM Assertion OK : RowCount after Merge: 7
-+END 'MergeCells-Issue' Symbol
-+ TEST OK : MergeCells-Issue
-+----------------------------------------------------------------
-+Areas-Issue
-+ TEST START : Areas-Issue
-+ ITEM Assertion OK : Range Areas Count is2
-+ ITEM Assertion OK : First Range Address is: $E$8:$G$13
-+ ITEM Assertion OK : First Row is: 8
-+ ITEM Assertion OK : First Column is: 5
-+ ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
-+ ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
-+ ITEM Assertion OK : Range Count:53
-+END 'Areas-Issue' Symbol
-+ TEST OK : Areas-Issue
-+----------------------------------------------------------------
-+Fill-Methods-Issue
-+ TEST START : Fill-Methods-Issue
-+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
-+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
-+ ITEM Assertion OK : Range Value after FillDown: MyRightFillValue
-+ ITEM Assertion OK : Range Value after FillDown: MyBottomFillValue
-+END 'Fill-Methods-Issue' Symbol
-+ TEST OK : Fill-Methods-Issue
-+----------------------------------------------------------------
-+Range/Item-Method-Issue
-+ TEST START : Range/Item-Method-Issue
-+ ITEM Assertion OK : Range of multiple columns is: $A:$A,$C:$C
-+ ITEM Assertion OK : Range of multiple rows is: $1:$1,$5:$7
-+ ITEM Assertion OK : Range of several columns is: $C:$E,$D:$D
-+ ITEM Assertion OK : Range of several rows is: $5:$8,$6:$10
-+ ITEM Assertion OK : Range of several single cells is: $C$5,$E$8
-+ ITEM Assertion OK : Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
-+ ITEM Assertion OK : Range of a single Item Cell is: $E$21
-+ ITEM Assertion OK : Range of a single Item Cell is: $F$21
-+ ITEM Assertion OK : Range of a single Item Cell is: $F$10
-+END 'Range/Item-Method-Issue' Symbol
-+ TEST OK : Range/Item-Method-Issue
-+----------------------------------------------------------------
-+R1C1-Formulas-Issue
-+ TEST START : R1C1-Formulas-Issue
-+ ITEM Assertion OK : R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
-+ ITEM Assertion OK : Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
-+END 'R1C1-Formulas-Issue' Symbol
-+ TEST OK : R1C1-Formulas-Issue
-+----------------------------------------------------------------
-+Verify_Delete
-+ TEST START : Verify_Delete
-+ ITEM Assertion OK : Ranges are intersecting: $G$13
-+ ITEM Assertion OK : Delete with Default: $AJ$4
-+ ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
-+ ITEM Assertion OK : Delete with ShiftUp: $M$22
-+END 'Verify_Delete' Symbol
-+ TEST OK : Verify_Delete
-+----------------------------------------------------------------
-+Value-Issue
-+ TEST START : Value-Issue
-+ ITEM Assertion OK : Value of Range is: 12.3
-+ ITEM Assertion OK : Text of Range is: 12.3
-+ ITEM Assertion OK : Range has Formula: False
-+ ITEM Assertion OK : Cell has Formula: False
-+ ITEM Assertion OK : Text of Range is null: True
-+ ITEM Assertion OK : Range has Formula: True
-+ ITEM Assertion OK : Cell has Formula: True
-+ ITEM Assertion OK : Value of Cell is: 12
-+ ITEM Assertion OK : Application.Calculation is : -4135
-+ ITEM Assertion OK : Calculation is automated: True
-+ ITEM Assertion OK : Range has Formula: True
-+ ITEM Assertion OK : Value of Cell is: 16
-+ ITEM Assertion OK : Text of Cell is: 16
-+ ITEM Assertion OK : Text of Cell is: 16
-+ ITEM Assertion OK : Range has Formula after 'ClearContents: False
-+ ITEM Assertion OK : Text of Cell is:
-+ ITEM Assertion OK : Text of Cell is:
-+END 'Value-Issue' Symbol
-+ TEST OK : Value-Issue
-+----------------------------------------------------------------
-+AutoFit issue
-+ TEST START : AutoFit issue
-+ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 673
-+ ITEM Assertion OK : Rows.AutoFit: CurrentHeight is 612
-+END 'AutoFit issue' Symbol
-+ TEST OK : AutoFit issue
-+----------------------------------------------------------------
-+Selections
-+ TEST START : Selections
-+ ITEM Assertion OK : ActiveCell is : $E$8
-+ ITEM Assertion OK : Active Cell is : $E$8
-+ ITEM Assertion OK : Number of Cells in Range: 53
-+ ITEM Assertion OK : Number of Cells in Range: 53
-+ ITEM Assertion OK : Number of Cells in Range: 53
-+END 'Selections' Symbol
-+ TEST OK : Selections
-+----------------------------------------------------------------
-+Offset-Resize
-+ TEST START : Offset-Resize
-+ ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
-+ ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
-+ ITEM Assertion OK : Resized Range is : $A$20:$D$23
-+END 'Offset-Resize' Symbol
-+ TEST OK : Offset-Resize
-+----------------------------------------------------------------
-+Ranges-Address
-+ TEST START : Ranges-Address
-+ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
-+ ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
-+ ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
-+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
-+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
-+END 'Ranges-Address' Symbol
-+ TEST OK : Ranges-Address
-+----------------------------------------------------------------
-+Range-Address
-+ TEST START : Range-Address
-+ ITEM Assertion OK : Range Address is: $E$8:$G$13
-+ ITEM Assertion OK : Range Address is: $E8:$G13
-+ ITEM Assertion OK : Range Address is: E$8:G$13
-+ ITEM Assertion OK : Range Address is: R8C5:R13C7
-+ ITEM Assertion OK : Range Address is: $E$8:$G$13
-+ ITEM Assertion OK : Range Address is: R8C5:R13C7
-+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
-+END 'Range-Address' Symbol
-+ TEST OK : Range-Address
-+----------------------------------------------------------------
-+Column-Address
-+ TEST START : Column-Address
-+ ITEM Assertion OK : Range Address is: $F$8:$F$13
-+ ITEM Assertion OK : Range Address is: $F8:$F13
-+ ITEM Assertion OK : Range Address is: F$8:F$13
-+ ITEM Assertion OK : Range Address is: R8C6:R13C6
-+ ITEM Assertion OK : Range Address is: $F$8:$F$13
-+ ITEM Assertion OK : Range Address is: R8C6:R13C6
-+ ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
-+END 'Column-Address' Symbol
-+ TEST OK : Column-Address
-+----------------------------------------------------------------
-+Row-Address
-+ TEST START : Row-Address
-+ ITEM Assertion OK : Range Address is: $E$9:$G$9
-+ ITEM Assertion OK : Range Address is: $E9:$G9
-+ ITEM Assertion OK : Range Address is: E$9:G$9
-+ ITEM Assertion OK : Range Address is: R9C5:R9C7
-+ ITEM Assertion OK : Range Address is: $E$9:$G$9
-+ ITEM Assertion OK : Range Address is: R9C5:R9C7
-+ ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
-+END 'Row-Address' Symbol
-+ TEST OK : Row-Address
-+----------------------------------------------------------------
-+SingleCell-Address
-+ TEST START : SingleCell-Address
-+ ITEM Assertion OK : Range Address is: $F$9
-+ ITEM Assertion OK : Range Address is: $F9
-+ ITEM Assertion OK : Range Address is: F$9
-+ ITEM Assertion OK : Range Address is: R9C6
-+ ITEM Assertion OK : Range Address is: $F$9
-+ ITEM Assertion OK : Range Address is: R9C6
-+ ITEM Assertion OK : Range Address is: R[7]C[4]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
-+END 'SingleCell-Address' Symbol
-+ TEST OK : SingleCell-Address
-+----------------------------------------------------------------
-+Heights and Widths
-+ TEST START : Heights and Widths
-+ ITEM Assertion OK : Range RowHeight is 40
-+ ITEM Assertion OK : Range ColumnWidth is 50
-+ ITEM Assertion OK : Range Height is 238
-+ ITEM Assertion OK : Range Width is 798.75
-+ ITEM Assertion OK : Range RowHeight is 50
-+ ITEM Assertion OK : Range ColumnWidth is 50
-+ ITEM Assertion OK : Range Height is 297
-+ ITEM Assertion OK : Range Width is 798.75
-+ ITEM Assertion OK : RowHeight is null: True
-+ ITEM Assertion OK : ColumnWidth is null: True
-+END 'Heights and Widths' Symbol
-+ TEST OK : Heights and Widths
-+----------------------------------------------------------------
-+RangeRowColumn-Issue
-+ TEST START : RangeRowColumn-Issue
-+ ITEM Assertion OK : Row is: 8
-+ ITEM Assertion OK : Column is: 5
-+ ITEM Assertion OK : EntireRow.Columns.Count = 256
-+ ITEM Assertion OK : EntireColumn.Rows.Count = 65536
-+END 'RangeRowColumn-Issue' Symbol
-+ TEST OK : RangeRowColumn-Issue
-+----------------------------------------------------------------
-+Replace-Issue
-+ TEST START : Replace-Issue
-+ ITEM Assertion OK : Value after Replace: YourValue
-+ ITEM Assertion OK : Value after Replace: YourValue
-+ ITEM Assertion OK : Value after Replace: ReplaceValue
-+ ITEM Assertion OK : Value after Replace: New ReplaceValue
-+ ITEM Assertion OK : Value after Replace: New ReplaceValue
-+ ITEM Assertion OK : Value after Replace: New Replace
-+ ITEM Assertion OK : Value after Replace:
-+END 'Replace-Issue' Symbol
-+ TEST OK : Replace-Issue
-+----------------------------------------------------------------
-+Hidden-Issue
-+ TEST START : Hidden-Issue
-+ ITEM Assertion OK : - Range.Rows.Hidden (set)
-+ ITEM Assertion OK : - Range.Rows.Hidden (get)
-+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (set)
-+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (get)
-+ ITEM Assertion OK : - Range.Columns.Hidden (set)
-+ ITEM Assertion OK : - Range.Columns.Hidden (get)
-+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (set)
-+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (get)
-+END 'Hidden-Issue' Symbol
-+ TEST OK : Hidden-Issue
-+----------------------------------------------------------------
-+End issue
-+ TEST START : End issue
-+ ITEM Assertion OK : - = $E$48
-+ ITEM Assertion OK : - = $E$1
-+ ITEM Assertion OK : - = $E$3
-+ ITEM Assertion OK : - = $A$8
-+ ITEM Assertion OK : - = $B$8
-+ ITEM Assertion OK : - = $IV$8
-+ ITEM Assertion OK : - = $Z$8
-+END 'End issue' Symbol
-+ TEST OK : End issue
-+----------------------------------------------------------------
-+Outline issue
-+ TEST START : Outline issue
-+ ITEM Assertion OK : - Range.clearOutline - please check visually
-+ ITEM Assertion OK : - Range.AutoOutline - please check visually
-+ ITEM Assertion OK : - Range.AutoOutline - please check visually
-+END 'Outline issue' Symbol
-+ TEST OK : Outline issue
-+----------------------------------------------------------------
-+Validation
-+ TEST START : Validation
-+ ITEM Assertion OK : Validation Input Message is : Attention!
-+ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
-+ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
-+ ITEM Assertion OK : Validation Error Message is : An Error occured
-+ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
-+END 'Validation' Symbol
-+ TEST OK : Validation
-+Test run finished : 01/06/2007 11:29:00
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/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 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -0,0 +1,62 @@
-+Test run started : 17/07/2007 15:25:17
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+ ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
-+ ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
-+ ITEM Assertion OK : test3 Range ('e:f') A1 style addressing
-+ ITEM Assertion OK : test4 Range ('e:f') R1C1 style addressing
-+ ITEM Assertion OK : test5 Columns A1 style addressing
-+ ITEM Assertion OK : test6 Columns R1C1 style addressing
-+ ITEM Assertion OK : test7 Columns(3) A1 style addressing
-+ ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
-+ ITEM Assertion OK : test9 Columns('e') A1 style addressing
-+ ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
-+ ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
-+ ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
-+ ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
-+ ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
-+ ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
-+ ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
-+ ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
-+ ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
-+ ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
-+ ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
-+ ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
-+ ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+ ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
-+ ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
-+ ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
-+ ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false
-+ ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false
-+ ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
-+ ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+ ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
-+ ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
-+ ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
-+ ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
-+ ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
-+ ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+ ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
-+ ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+ ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
-+ ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
-+ ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
-+ ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
-+ ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
-+ ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
-+ ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
-+ ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
-+ ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
-+ ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
-+ ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
-+ ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
-+Test Results
-+============
-+
-+Tests passed: 49
-+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 17/07/2007 15:25:19
-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 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -0,0 +1,60 @@
-+Test run started : 30/05/2007 11:33:13
-+BEGIN TestCalc
-+ TEST START : RangeTest2
-+ ITEM Assertion OK : - Range("D15").Row
-+ ITEM Assertion OK : - WorkSheet("D15").Range.Row
-+ ITEM Assertion OK : - Range("D15").Column
-+ ITEM Assertion OK : - Worksheet.Range("D15").Column
-+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
-+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
-+ ITEM Assertion OK : - Range("D1").EntireRow.Columns.Count
-+ ITEM Assertion OK : - Range("D1").EntireColumn.Rows.Count
-+ ITEM Assertion OK : - Range("D15").ClearContent
-+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (set)
-+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (get)
-+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (set)
-+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (get)
-+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (set)
-+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (get)
-+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (set)
-+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (get)
-+ ITEM Assertion OK : - Range("B38").Orientation (get)
-+ ITEM Assertion OK : - Range("B38").Orientation (set)
-+ ITEM Assertion OK : - Range("B38").Orientation (set = xlDownward)
-+ ITEM Assertion OK : - Range("B38").Orientation (set)
-+ ITEM Assertion OK : - Range("B38").Orientation (set = xlUpward)
-+ ITEM Assertion OK : - Range("B38").Orientation (set)
-+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
-+ ITEM Assertion OK : - Range("B38").Orientation (set)
-+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
-+ ITEM Assertion OK : - Range("B39").WrapText (get)
-+ ITEM Assertion OK : - Range("B39").WrapText (set)
-+ ITEM Assertion OK : - Range("B39").WrapText (set)
-+ ITEM Assertion OK : - Range("E39").MergeCells (get)
-+ ITEM Assertion OK : - Range("F39").MergeCells (get)
-+ ITEM Assertion OK : - Range("E39").MergeCells (set)
-+ ITEM Assertion OK : - Range("F39").MergeCells (set)
-+ ITEM Assertion OK : - Range("E39").MergeCells (set)
-+ ITEM Assertion OK : - Range("F39").MergeCells (set)
-+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
-+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
-+ ITEM Assertion OK : - Range("D41:D42").Replace MatchCase:=False
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
-+ ITEM OK (RangeTest2)
-+ TEST succesfully completed : RangeTest2
-+END TestCalc
-+Test run finished : 30/05/2007 11:33:14
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest2.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 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -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/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
-@@ -0,0 +1,20 @@
-+Test run started : 18/07/2007 10:56:38
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+ ITEM Assertion OK : test1 'starts with' string criteria
-+ ITEM Assertion OK : test2 'not equal to' string criteria
-+ ITEM Assertion OK : test3 'ends with' string criteria
-+ ITEM Assertion OK : test4 field 'all'
-+ ITEM Assertion OK : test5 numeric '<15'
-+ ITEM Assertion OK : test6 numeric '>=15'
-+ ITEM Assertion OK : test7 numeric '<=12'
-+Test Results
-+============
-+
-+Tests passed: 7
-+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 18/07/2007 10:56:44
-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/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
-@@ -0,0 +1,68 @@
-+Test run started : 19/06/2007 11:14:01
-+----------------------------------------------------------------
-+ClearFormtsIssue
-+ TEST START : ClearFormtsIssue
-+ ITEM Assertion OK : Range.Font.Bold is: True
-+ ITEM Assertion OK : Range.Font.Bold is: False
-+END 'ClearFormtsIssue' Symbol
-+ TEST OK : ClearFormtsIssue
-+----------------------------------------------------------------
-+VerticalAlignment-Issue
-+ TEST START : VerticalAlignment-Issue
-+ ITEM Assertion OK : - Range.VerticalAlignment (get)
-+ ITEM Assertion OK : - Range.VerticalAlignment (set)
-+ ITEM Assertion OK : - Range.VerticalAlignment (get)
-+ ITEM Assertion OK : - Range.VerticalAlignment (get)
-+ ITEM Assertion OK : - Range.VerticalAlignment (set)
-+ ITEM Assertion OK : - Range.VerticalAlignment (get)
-+ ITEM Assertion OK : - Range.VerticalAlignment (set)
-+ ITEM Assertion OK : Range.VeritcalAlignment is Null
-+END 'VerticalAlignment-Issue' Symbol
-+ TEST OK : VerticalAlignment-Issue
-+----------------------------------------------------------------
-+HorizontalAlignment-Issue
-+ TEST START : HorizontalAlignment-Issue
-+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
-+ ITEM Assertion OK : Range.HorizontalAlignment is Null
-+END 'HorizontalAlignment-Issue' Symbol
-+ TEST OK : HorizontalAlignment-Issue
-+----------------------------------------------------------------
-+WrapText-Issue
-+ TEST START : WrapText-Issue
-+ ITEM Assertion OK : - Range.WrapText (get)
-+ ITEM Assertion OK : - Range.WrapText (get)
-+ ITEM Assertion OK : Range.WrapText is Null
-+END 'WrapText-Issue' Symbol
-+ TEST OK : WrapText-Issue
-+----------------------------------------------------------------
-+FontBorderIssues
-+ TEST START : FontBorderIssues
-+ ITEM Assertion OK : - = Borders.Color (getColor)
-+ ITEM Assertion OK : - = Font.Color (getColor)
-+END 'FontBorderIssues' Symbol
-+ TEST OK : FontBorderIssues
-+----------------------------------------------------------------
-+RangeSizeIssues
-+ TEST START : RangeSizeIssues
-+ ITEM Assertion OK : Range.Left is: 118.8432
-+ ITEM Assertion OK : Range.Top is: 92.16585
-+ ITEM Assertion OK : Range.Width is: 226.2
-+ ITEM Assertion OK : Range.Height is: 271.5
-+END 'RangeSizeIssues' Symbol
-+ TEST OK : RangeSizeIssues
-+----------------------------------------------------------------
-+ApplicationIssues
-+ TEST START : ApplicationIssues
-+ ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
-+ ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
-+ ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
-+END 'ApplicationIssues' Symbol
-+ TEST OK : ApplicationIssues
-+Test run finished : 19/06/2007 11:14:02
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/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
-@@ -0,0 +1,8 @@
-+Test run started : 19/06/2007 11:26:09
-+----------------------------------------------------------------
-+MyGoalseek-Issue
-+ TEST START : MyGoalseek-Issue
-+ ITEM Assertion OK : Variable Range value: 15
-+END 'MyGoalseek-Issue' Symbol
-+ TEST OK : MyGoalseek-Issue
-+Test run finished : 19/06/2007 11:26:10
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
-===================================================================
-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 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -0,0 +1,280 @@
-+Test run started : 19/06/2007 11:17:14
-+----------------------------------------------------------------
-+ApplicationMethods
-+ TEST START : ApplicationMethods
-+ ITEM Assertion OK : Name of Workbook is: Ranges.xls
-+ ITEM Assertion OK : Address of Application.Columns is: $A:$A
-+ ITEM Assertion OK : Address of Application.Rows is: $1:$1
-+ ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
-+ ITEM Assertion OK : Please check manually: DefaultFilePath is: /data4/home/npower/Documents
-+ ITEM Assertion OK : Please check manually: Library Path is: /data4/sles/patchCheckBuild/ooo-build/InstallDir/UserInstallation/user/basic
-+ ITEM Assertion OK : Please check manually: Template Path is: /data4/sles/patchCheckBuild/ooo-build/InstallDir/UserInstallation/user/template
-+ ITEM Assertion OK : FileSeparator is /
-+ ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
-+END 'ApplicationMethods' Symbol
-+ TEST OK : ApplicationMethods
-+----------------------------------------------------------------
-+Insert-Issue
-+ TEST START : Insert-Issue
-+ ITEM Assertion OK : Insert with xlShiftToRight: 10
-+END 'Insert-Issue' Symbol
-+ TEST OK : Insert-Issue
-+----------------------------------------------------------------
-+MergeCells-Issue
-+ TEST START : MergeCells-Issue
-+ ITEM Assertion OK : Range.MergeCells is True
-+ ITEM Assertion FAIL : MergeCells is null: False
-+ ITEM Assertion OK : RowCount after Merge: 13
-+ ITEM Assertion OK : Range.MergeCells is False
-+ ITEM Assertion OK : MergeCells is null: False
-+ ITEM Assertion FAIL : MergeCells of Second Area is null : False
-+ ITEM Assertion FAIL : MergeCells of Ranges is Null: False
-+ ITEM Assertion OK : RowCount after Merge: 7
-+ ITEM Assertion OK : Range.MergeCells is False
-+ ITEM Assertion OK : MergeCells is null: False
-+ ITEM Assertion OK : RowCount after Merge: 7
-+END 'MergeCells-Issue' Symbol
-+ TEST OK : MergeCells-Issue
-+----------------------------------------------------------------
-+Areas-Issue
-+ TEST START : Areas-Issue
-+ ITEM Assertion OK : Range Areas Count is2
-+ ITEM Assertion OK : First Range Address is: $E$8:$G$13
-+ ITEM Assertion OK : First Row is: 8
-+ ITEM Assertion OK : First Column is: 5
-+ ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
-+ ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
-+ ITEM Assertion OK : Range Count:53
-+END 'Areas-Issue' Symbol
-+ TEST OK : Areas-Issue
-+----------------------------------------------------------------
-+Fill-Methods-Issue
-+ TEST START : Fill-Methods-Issue
-+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
-+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
-+ ITEM Assertion OK : Range Value after FillDown: MyRightFillValue
-+ ITEM Assertion OK : Range Value after FillDown: MyBottomFillValue
-+END 'Fill-Methods-Issue' Symbol
-+ TEST OK : Fill-Methods-Issue
-+----------------------------------------------------------------
-+Range/Item-Method-Issue
-+ TEST START : Range/Item-Method-Issue
-+ ITEM Assertion OK : Range of multiple columns is: $A:$A,$C:$C
-+ ITEM Assertion OK : Range of multiple rows is: $1:$1,$5:$7
-+ ITEM Assertion OK : Range of several columns is: $C:$E,$D:$D
-+ ITEM Assertion OK : Range of several rows is: $5:$8,$6:$10
-+ ITEM Assertion OK : Range of several single cells is: $C$5,$E$8
-+ ITEM Assertion OK : Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
-+ ITEM Assertion OK : Range of a single Item Cell is: $E$21
-+ ITEM Assertion OK : Range of a single Item Cell is: $F$21
-+ ITEM Assertion OK : Range of a single Item Cell is: $F$10
-+END 'Range/Item-Method-Issue' Symbol
-+ TEST OK : Range/Item-Method-Issue
-+----------------------------------------------------------------
-+R1C1-Formulas-Issue
-+ TEST START : R1C1-Formulas-Issue
-+ ITEM Assertion OK : R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
-+ ITEM Assertion FAIL : Range.Formula is: =IF(OR(J8=0,RC[2]="YES"),"")
-+END 'R1C1-Formulas-Issue' Symbol
-+ TEST OK : R1C1-Formulas-Issue
-+----------------------------------------------------------------
-+Verify_Delete
-+ TEST START : Verify_Delete
-+ ITEM Assertion OK : Ranges are intersecting: $G$13
-+ ITEM Assertion OK : Delete with Default: $AJ$4
-+ ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
-+ ITEM Assertion OK : Delete with ShiftUp: $M$22
-+END 'Verify_Delete' Symbol
-+ TEST OK : Verify_Delete
-+----------------------------------------------------------------
-+Value-Issue
-+ TEST START : Value-Issue
-+ ITEM Assertion OK : Value of Range is: 12.3
-+ ITEM Assertion OK : Text of Range is: 12.3
-+ ITEM Assertion OK : Range has Formula: False
-+ ITEM Assertion OK : Cell has Formula: False
-+ ITEM Assertion FAIL : Text of Range is null: False
-+ ITEM Assertion OK : Range has Formula: True
-+ ITEM Assertion OK : Cell has Formula: True
-+ ITEM Assertion OK : Value of Cell is: 12
-+ ITEM Assertion OK : Application.Calculation is : -4135
-+ ITEM Assertion OK : Calculation is automated: True
-+ ITEM Assertion OK : Range has Formula: True
-+ ITEM Assertion OK : Value of Cell is: 16
-+ ITEM Assertion OK : Text of Cell is: 16
-+ ITEM Assertion OK : Text of Cell is: 16
-+ ITEM Assertion OK : Range has Formula after 'ClearContents: False
-+ ITEM Assertion OK : Text of Cell is:
-+ ITEM Assertion OK : Text of Cell is:
-+END 'Value-Issue' Symbol
-+ TEST OK : Value-Issue
-+----------------------------------------------------------------
-+AutoFit issue
-+ TEST START : AutoFit issue
-+ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 657
-+ ITEM Assertion FAIL : Rows.AutoFit: CurrentHeight is 78
-+END 'AutoFit issue' Symbol
-+ TEST OK : AutoFit issue
-+----------------------------------------------------------------
-+Selections
-+ TEST START : Selections
-+ ITEM Assertion OK : ActiveCell is : $E$8
-+ ITEM Assertion OK : Active Cell is : $E$8
-+ ITEM Assertion OK : Number of Cells in Range: 52
-+ ITEM Assertion OK : Number of Cells in Range: 52
-+ ITEM Assertion OK : Number of Cells in Range: 52
-+END 'Selections' Symbol
-+ TEST OK : Selections
-+----------------------------------------------------------------
-+Offset-Resize
-+ TEST START : Offset-Resize
-+ ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
-+ ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
-+ ITEM Assertion OK : Resized Range is : $A$20:$D$23
-+END 'Offset-Resize' Symbol
-+ TEST OK : Offset-Resize
-+----------------------------------------------------------------
-+Ranges-Address
-+ TEST START : Ranges-Address
-+ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
-+ ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
-+ ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
-+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+ ITEM Assertion FAIL : Range Address is: R8C5:R13C7,R13C7:R19C11
-+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
-+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
-+END 'Ranges-Address' Symbol
-+ TEST OK : Ranges-Address
-+----------------------------------------------------------------
-+Range-Address
-+ TEST START : Range-Address
-+ ITEM Assertion OK : Range Address is: $E$8:$G$13
-+ ITEM Assertion OK : Range Address is: $E8:$G13
-+ ITEM Assertion OK : Range Address is: E$8:G$13
-+ ITEM Assertion OK : Range Address is: R8C5:R13C7
-+ ITEM Assertion FAIL : Range Address is: R8C5:R13C7
-+ ITEM Assertion OK : Range Address is: R8C5:R13C7
-+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
-+END 'Range-Address' Symbol
-+ TEST OK : Range-Address
-+----------------------------------------------------------------
-+Column-Address
-+ TEST START : Column-Address
-+ ITEM Assertion OK : Range Address is: $F$8:$F$13
-+ ITEM Assertion OK : Range Address is: $F8:$F13
-+ ITEM Assertion OK : Range Address is: F$8:F$13
-+ ITEM Assertion OK : Range Address is: R8C6:R13C6
-+ ITEM Assertion FAIL : Range Address is: R8C6:R13C6
-+ ITEM Assertion OK : Range Address is: R8C6:R13C6
-+ ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
-+END 'Column-Address' Symbol
-+ TEST OK : Column-Address
-+----------------------------------------------------------------
-+Row-Address
-+ TEST START : Row-Address
-+ ITEM Assertion OK : Range Address is: $E$9:$G$9
-+ ITEM Assertion OK : Range Address is: $E9:$G9
-+ ITEM Assertion OK : Range Address is: E$9:G$9
-+ ITEM Assertion OK : Range Address is: R9C5:R9C7
-+ ITEM Assertion FAIL : Range Address is: R9C5:R9C7
-+ ITEM Assertion OK : Range Address is: R9C5:R9C7
-+ ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
-+END 'Row-Address' Symbol
-+ TEST OK : Row-Address
-+----------------------------------------------------------------
-+SingleCell-Address
-+ TEST START : SingleCell-Address
-+ ITEM Assertion OK : Range Address is: $F$9
-+ ITEM Assertion OK : Range Address is: $F9
-+ ITEM Assertion OK : Range Address is: F$9
-+ ITEM Assertion OK : Range Address is: R9C6
-+ ITEM Assertion FAIL : Range Address is: R9C6
-+ ITEM Assertion OK : Range Address is: R9C6
-+ ITEM Assertion OK : Range Address is: R[7]C[4]
-+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
-+END 'SingleCell-Address' Symbol
-+ TEST OK : SingleCell-Address
-+----------------------------------------------------------------
-+Heights and Widths
-+ TEST START : Heights and Widths
-+ ITEM Assertion OK : Range RowHeight is 40
-+ ITEM Assertion OK : Range ColumnWidth is 50
-+ ITEM Assertion OK : Range Height is 240
-+ ITEM Assertion OK : Range Width is 795
-+ ITEM Assertion OK : Range RowHeight is 50
-+ ITEM Assertion OK : Range ColumnWidth is 50
-+ ITEM Assertion OK : Range Height is 300
-+ ITEM Assertion OK : Range Width is 795
-+ ITEM Assertion FAIL : RowHeight is null: False
-+ ITEM Assertion OK : ColumnWidth is null: True
-+END 'Heights and Widths' Symbol
-+ TEST OK : Heights and Widths
-+----------------------------------------------------------------
-+RangeRowColumn-Issue
-+ TEST START : RangeRowColumn-Issue
-+ ITEM Assertion OK : Row is: 8
-+ ITEM Assertion OK : Column is: 5
-+ ITEM Assertion OK : EntireRow.Columns.Count = 256
-+ ITEM Assertion OK : EntireColumn.Rows.Count = 131072
-+END 'RangeRowColumn-Issue' Symbol
-+ TEST OK : RangeRowColumn-Issue
-+----------------------------------------------------------------
-+Replace-Issue
-+ TEST START : Replace-Issue
-+ ITEM Assertion OK : Value after Replace: YourValue
-+ ITEM Assertion OK : Value after Replace: YourValue
-+ ITEM Assertion OK : Value after Replace: ReplaceValue
-+ ITEM Assertion OK : Value after Replace: New ReplaceValue
-+ ITEM Assertion OK : Value after Replace: New ReplaceValue
-+ ITEM Assertion OK : Value after Replace: New Replace
-+ ITEM Assertion OK : Value after Replace:
-+END 'Replace-Issue' Symbol
-+ TEST OK : Replace-Issue
-+----------------------------------------------------------------
-+Hidden-Issue
-+ TEST START : Hidden-Issue
-+ ITEM Assertion OK : - Range.Rows.Hidden (set)
-+ ITEM Assertion OK : - Range.Rows.Hidden (get)
-+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (set)
-+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (get)
-+ ITEM Assertion OK : - Range.Columns.Hidden (set)
-+ ITEM Assertion OK : - Range.Columns.Hidden (get)
-+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (set)
-+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (get)
-+END 'Hidden-Issue' Symbol
-+ TEST OK : Hidden-Issue
-+----------------------------------------------------------------
-+End issue
-+ TEST START : End issue
-+ ITEM Assertion OK : - = $E$48
-+ ITEM Assertion OK : - = $E$1
-+ ITEM Assertion OK : - = $E$3
-+ ITEM Assertion OK : - = $A$8
-+ ITEM Assertion OK : - = $B$8
-+ ITEM Assertion OK : - = $IV$8
-+ ITEM Assertion OK : - = $Z$8
-+END 'End issue' Symbol
-+ TEST OK : End issue
-+----------------------------------------------------------------
-+Outline issue
-+ TEST START : Outline issue
-+ ITEM Assertion OK : - Range.clearOutline - please check visually
-+ ITEM Assertion OK : - Range.AutoOutline - please check visually
-+ ITEM Assertion OK : - Range.AutoOutline - please check visually
-+END 'Outline issue' Symbol
-+ TEST OK : Outline issue
-+----------------------------------------------------------------
-+Validation
-+ TEST START : Validation
-+ ITEM Assertion OK : Validation Input Message is : Attention!
-+ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
-+ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
-+ ITEM Assertion OK : Validation Error Message is : An Error occured
-+ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
-+END 'Validation' Symbol
-+ TEST OK : Validation
-+Test run finished : 19/06/2007 11:17:18
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
++++ sc/source/ui/vba/vbapagesetup.cxx 29 Jul 2008 06:35:42 -0000 1.1.2.1
+@@ -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 <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;
++}
++
++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)
++{
++ 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;
++}
++
++void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) throw (css::uno::RuntimeException)
++{
++ if( firstPageNumber < 0 )
++ DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
++ if( firstPageNumber == excel::Constants::xlAutomatic )
++ firstPageNumber = 0;
++
++ try
++ {
++ uno::Any aValue;
++ aValue <<= (sal_Int16)firstPageNumber;
++ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
++ }
++ catch( uno::Exception& )
++ {
++ }
++}
++
++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 ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally) throw (css::uno::RuntimeException)
++{
++ try
++ {
++ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")), uno::makeAny( centerHorizontally ));
++ }
++ catch( uno::Exception& )
++ {
++ }
++}
++
++sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException)
++{
++ sal_Bool printHeadings = sal_False;
++ try
++ {
++ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
++ aValue >>= printHeadings;
++ }
++ catch( uno::Exception& )
++ {
++ }
++ return printHeadings;
++}
++
++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& )
++ {
++ }
++}
++
++rtl::OUString&
++ScVbaPageSetup::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageSetup") );
++ return sImplName;
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaPageSetup::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.PageSetup" ) );
++ }
++ return aServiceNames;
++}
+Index: sc/source/ui/vba/vbapagesetup.hxx
+===================================================================
+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 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU Lesser General Public License version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++#ifndef SC_VBA_PAGESETUP_HXX
++#define SC_VBA_PAGESETUP_HXX
++
++#include <cppuhelper/implbase1.hxx>
++#include <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 22 Apr 2008 19:53:16 -0000 1.1.2.1
+@@ -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, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++{
++}
++
++// Attributes
++uno::Any SAL_CALL
++ScVbaProgressBar::getValue() throw (css::uno::RuntimeException)
++{
++ return m_xProps->getPropertyValue( SVALUE );
++}
++
++void SAL_CALL
++ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SVALUE, _value );
++}
++
++rtl::OUString&
++ScVbaProgressBar::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
++ return sImplName;
++}
++
++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("org.openoffice.msforms.Label" ) );
++ }
++ 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 22 Apr 2008 19:53:16 -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 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>
++
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XProgressBar, css::script::XDefaultProperty > ProgressBarImpl_BASE;
++
++class ScVbaProgressBar : public ProgressBarImpl_BASE
++{
++public:
++ ScVbaProgressBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++ // Attributes
++ virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
++ //XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++ // XDefaultProperty
++ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++};
++#endif //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.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbaradiobutton.cxx 11 Apr 2008 01:12:55 -0000 1.3
++++ sc/source/ui/vba/vbaradiobutton.cxx 6 Jul 2008 15:31:33 -0000 1.2.42.2
+@@ -36,7 +36,7 @@ using namespace org::openoffice;
+
+ const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
+ const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
+-ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : RadioButtonImpl_BASE( xContext, xControlShape )
++ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
+ {
+ }
+
+@@ -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 )
++ {
++ if( nValue == -1)
+ nValue = 1;
++ }
++ else if ( _value >>= bValue )
++ {
++ if ( bValue )
++ nValue = 1;
++ }
+ m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
+ }
++
++rtl::OUString&
++ScVbaRadioButton::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton") );
++ return sImplName;
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaRadioButton::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.RadioButton" ) );
++ }
++ return aServiceNames;
++}
+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.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbaradiobutton.hxx 11 Apr 2008 01:13:09 -0000 1.3
++++ sc/source/ui/vba/vbaradiobutton.hxx 6 Jul 2008 15:30:03 -0000 1.2.42.2
+@@ -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, 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.11
+diff -u -p -b -w -B -r1.9 -r1.5.34.11
+--- sc/source/ui/vba/vbarange.cxx 14 May 2008 10:03:31 -0000 1.9
++++ sc/source/ui/vba/vbarange.cxx 29 Jul 2008 09:36:01 -0000 1.5.34.11
+@@ -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
++{
++ 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;
+@@ -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;
+ }
+
+@@ -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 );
++ mxRanges.set( mxPropertySet, uno::UNO_QUERY );
++ uno::Reference< container::XIndexAccess > xIndex;
++ if ( mxRange.is() )
+ {
+- mxRange.set( mxPropertySet, uno::UNO_QUERY_THROW );
+- uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxContext, mxRange ) );
++ xIndex = new SingleRangeIndexAccess( mxContext, mxRange );
++ }
++ else if ( mxRanges.is() )
++ {
++ xIndex.set( mxRanges, uno::UNO_QUERY_THROW );
++ }
+ 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;
++
++ sal_Bool bIsIndex = nRowIndex.hasValue();
++ sal_Bool bIsColumnIndex = nColumnIndex.hasValue();
++
++ // Sometimes we might get a float or a double or whatever
++ // set in the Any, we should convert as appropriate
++ // #FIXME - perhaps worth turning this into some sort of
++ // convertion routine e.g. bSuccess = getValueFromAny( nRow, nRowIndex, getCppuType((sal_Int32*)0) )
++ if ( nRowIndex.hasValue() && !( nRowIndex >>= nRow ) )
++ {
++ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
++ uno::Any aConverted;
++ try
++ {
++ aConverted = xConverter->convertTo( nRowIndex, getCppuType((sal_Int32*)0) );
++ bIsIndex = ( aConverted >>= nRow );
++ }
++ catch( uno::Exception& ) {} // silence any errors
++ }
++ if ( bIsColumnIndex && !( nColumnIndex >>= nColumn ) )
++ {
++ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
++ uno::Any aConverted;
++ try
++ {
++ aConverted = xConverter->convertTo( nColumnIndex, getCppuType((sal_Int32*)0) );
++ bIsColumnIndex = ( aConverted >>= nColumn );
++ }
++ catch( uno::Exception& ) {} // silence any errors
++ }
+
+ RangeHelper thisRange( mxRange );
+ table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
+@@ -2686,6 +2763,166 @@ 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)
++{
++ // 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 );
++
++ sal_Int16 nLookAt = globalSearchOptions.GetWordOnly() ? excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole;
++ sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns;
++
++ uno::Reference< util::XSearchable > xSearch( mxRange, uno::UNO_QUERY );
++ if( xSearch.is() )
++ {
++ uno::Reference< util::XSearchDescriptor > xDescriptor = xSearch->createSearchDescriptor();
++ xDescriptor->setSearchString( sSearch );
++
++ uno::Reference< excel::XRange > xAfterRange;
++ uno::Reference< table::XCellRange > xStartCell;
++ if( After >>= xAfterRange )
++ {
++ // After must be a single cell in the range
++ if( xAfterRange->getCount() > 1 )
++ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be a single cell." )) , uno::Reference< uno::XInterface >() );
++ uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY );
++ if( !xCell.is() )
++ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be in range." )) , uno::Reference< uno::XInterface >() );
++ xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW );
++ }
++
++ // LookIn
++ if( LookIn.hasValue() )
++ {
++ sal_Int32 nLookIn;
++ 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 ) );
++ }
++ }
++
++ // LookAt
++ if ( LookAt.hasValue() )
++ {
++ nLookAt = ::comphelper::getINT16( LookAt );
++ sal_Bool bSearchWords = sal_False;
++ if ( nLookAt == excel::XlLookAt::xlPart )
++ bSearchWords = sal_False;
++ else if ( nLookAt == excel::XlLookAt::xlWhole )
++ bSearchWords = sal_True;
++ else
++ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookAt" )) , uno::Reference< uno::XInterface >() );
++ newOptions.SetWordOnly( bSearchWords );
++ xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHWORDS ) ), uno::makeAny( bSearchWords ) );
++ }
++
++ // SearchOrder
++ if ( SearchOrder.hasValue() )
++ {
++ nSearchOrder = ::comphelper::getINT16( SearchOrder );
++ sal_Bool bSearchByRow = sal_False;
++ if ( nSearchOrder == excel::XlSearchOrder::xlByColumns )
++ bSearchByRow = sal_False;
++ else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
++ bSearchByRow = sal_True;
++ else
++ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchOrder" )) , uno::Reference< uno::XInterface >() );
++
++ newOptions.SetRowDirection( bSearchByRow );
++ xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHBYROW ) ), uno::makeAny( bSearchByRow ) );
++ }
++
++ // SearchDirection
++ if ( SearchDirection.hasValue() )
++ {
++ sal_Int32 nSearchDirection;
++ 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 ) );
++
++ // MatchByte
++ // SearchFormat
++ // ignore
++
++ ScGlobal::SetSearchItem( newOptions );
++
++ uno::Reference< util::XSearchDescriptor > xSearchDescriptor( xDescriptor, uno::UNO_QUERY );
++ uno::Reference< table::XCellRange > xCellRange( xSearch->findNext( xStartCell, xSearchDescriptor ), uno::UNO_QUERY );
++ if ( xCellRange.is() )
++ {
++ uno::Reference< excel::XRange > xResultRange = new ScVbaRange( this, mxContext, xCellRange );
++ if( xResultRange.is() )
++ {
++ xResultRange->Select();
++ return xResultRange;
++ }
++ }
++
++ }
++
++ return uno::Reference< excel::XRange >();
++}
++
+ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Reference< uno::XComponentContext >& xContext, ScDocShell* pDocSh )
+ {
+ uno::Reference< excel::XRange > xKeyRange;
+@@ -3116,6 +3353,18 @@ ScVbaRange::hasElements() throw (uno::Ru
+ 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 );
+ }
+
+@@ -4119,7 +4368,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 +4547,113 @@ void ScVbaRange::setFormulaHidden(const
+ xProps->setPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLPRO)), uno::makeAny(rCellAttr));
+ }
+
++uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
++{
++ // #FIXME, If the specified range is in a PivotTable report
++
++ // In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
++ if( m_Areas->getCount() > 1 )
++ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not get Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
++
++ sal_Bool bShowDetail = sal_False;
++
++ 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();
++}
++
++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;
++
++ 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 >() );
++ }
++}
++
++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 );
++}
+
+ 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 +4872,7 @@ ScVbaRange::AutoOutline( ) throw (scrip
+ {
+ // #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 +5090,7 @@ ScVbaRange::SpecialCells( const uno::Any
+ case excel::XlCellType::xlCellTypeConstants:
+ case excel::XlCellType::xlCellTypeFormulas:
+ case excel::XlCellType::xlCellTypeVisible:
++ case excel::XlCellType::xlCellTypeLastCell:
+ {
+ if ( bIsMultiArea )
+ {
+Index: sc/source/ui/vba/vbarange.hxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/vba/vbarange.hxx,v
+retrieving revision 1.6
+retrieving revision 1.6.70.1
+diff -u -p -b -w -B -r1.6 -r1.6.70.1
+--- sc/source/ui/vba/vbarange.hxx 14 May 2008 10:03:47 -0000 1.6
++++ sc/source/ui/vba/vbarange.hxx 29 Jul 2008 06:35:42 -0000 1.6.70.1
+@@ -171,6 +171,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 +214,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 +246,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);
+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 22 Apr 2008 19:53:16 -0000 1.1.2.1
+@@ -0,0 +1,139 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#include "vbascrollbar.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++
++const static rtl::OUString LARGECHANGE( RTL_CONSTASCII_USTRINGPARAM("BlockIncrement") );
++const static rtl::OUString SMALLCHANGE( RTL_CONSTASCII_USTRINGPARAM("LineIncrement") );
++const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
++const static rtl::OUString SCROLLVALUE( RTL_CONSTASCII_USTRINGPARAM("ScrollValue") );
++const static rtl::OUString SCROLLMAX( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") );
++const static rtl::OUString SCROLLMIN( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMin") );
++
++ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++{
++}
++
++// Attributes
++uno::Any SAL_CALL
++ScVbaScrollBar::getValue() throw (css::uno::RuntimeException)
++{
++ return m_xProps->getPropertyValue( SCROLLVALUE );
++}
++
++void SAL_CALL
++ScVbaScrollBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SCROLLVALUE, _value );
++}
++
++::sal_Int32 SAL_CALL
++ScVbaScrollBar::getMax() throw (uno::RuntimeException)
++{
++ sal_Int32 nMax = 0;
++ m_xProps->getPropertyValue( SCROLLMAX ) >>= nMax;
++ return nMax;
++}
++
++void SAL_CALL
++ScVbaScrollBar::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SCROLLMAX, uno::makeAny( nVal ) );
++}
++
++::sal_Int32 SAL_CALL
++ScVbaScrollBar::getMin() throw (uno::RuntimeException)
++{
++ sal_Int32 nVal = 0;
++ m_xProps->getPropertyValue( SCROLLMIN ) >>= nVal;
++ return nVal;
++}
++
++void SAL_CALL
++ScVbaScrollBar::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SCROLLMIN, uno::makeAny( nVal ) );
++}
++
++void SAL_CALL
++ScVbaScrollBar::setLargeChange( ::sal_Int32 _largechange ) throw (uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( LARGECHANGE, uno::makeAny( _largechange ) );
++}
++
++::sal_Int32 SAL_CALL
++ScVbaScrollBar::getLargeChange() throw (uno::RuntimeException)
++{
++ sal_Int32 nVal = 0;
++ m_xProps->getPropertyValue( LARGECHANGE ) >>= nVal;
++ return nVal;
++}
++
++::sal_Int32 SAL_CALL
++ScVbaScrollBar::getSmallChange() throw (uno::RuntimeException)
++{
++ sal_Int32 nSmallChange = 0;
++ m_xProps->getPropertyValue( SMALLCHANGE ) >>= nSmallChange;
++ return nSmallChange;
++}
++
++void SAL_CALL
++ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange ) throw (uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SMALLCHANGE, uno::makeAny( _smallchange ) );
++}
++
++rtl::OUString&
++ScVbaScrollBar::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaScrollBar") );
++ return sImplName;
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaScrollBar::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Frame" ) );
++ }
++ return aServiceNames;
++}
+Index: sc/source/ui/vba/vbascrollbar.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 22 Apr 2008 19:53:16 -0000 1.1.2.1
+@@ -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 <org/openoffice/msforms/XScrollBar.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XScrollBar > ScrollBarImpl_BASE;
++
++class ScVbaScrollBar : public ScrollBarImpl_BASE
++{
++public:
++ ScVbaScrollBar( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++ // 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();
++};
++#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 -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 -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
+===================================================================
+RCS file: sc/source/ui/vba/vbaspinbutton.cxx
+diff -N sc/source/ui/vba/vbaspinbutton.cxx
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbaspinbutton.cxx 29 Jul 2008 06:35:42 -0000 1.1.2.1
+@@ -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 org::openoffice;
++
++
++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< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++{
++}
++
++// Attributes
++uno::Any SAL_CALL
++ScVbaSpinButton::getValue() throw (css::uno::RuntimeException)
++{
++ return m_xProps->getPropertyValue( SPINVALUE );
++}
++
++void SAL_CALL
++ScVbaSpinButton::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SPINVALUE, _value );
++}
++
++::sal_Int32 SAL_CALL
++ScVbaSpinButton::getMax() throw (uno::RuntimeException)
++{
++ sal_Int32 nMax = 0;
++ m_xProps->getPropertyValue( SPINMAX ) >>= nMax;
++ return nMax;
++}
++
++void SAL_CALL
++ScVbaSpinButton::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SPINMAX, uno::makeAny( nVal ) );
++}
++
++::sal_Int32 SAL_CALL
++ScVbaSpinButton::getMin() throw (uno::RuntimeException)
++{
++ sal_Int32 nVal = 0;
++ m_xProps->getPropertyValue( SPINMIN ) >>= nVal;
++ return nVal;
++}
++
++void SAL_CALL
++ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) );
++}
++
++rtl::OUString&
++ScVbaSpinButton::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSpinButton") );
++ return sImplName;
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaSpinButton::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Frame" ) );
++ }
++ return aServiceNames;
++}
+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 29 Jul 2008 06:35:43 -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 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, 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.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbatextbox.cxx 11 Apr 2008 01:19:17 -0000 1.3
++++ sc/source/ui/vba/vbatextbox.cxx 6 Jul 2008 15:30:55 -0000 1.2.42.2
+@@ -37,11 +37,24 @@ using namespace org::openoffice;
+
+
+
+-ScVbaTextBox::ScVbaTextBox( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::drawing::XControlShape >& xControlShape ) : TextBoxImpl_BASE( xContext, xControlShape )
++ScVbaTextBox::ScVbaTextBox( const uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper, bool bDialog ) : TextBoxImpl_BASE( xParent, xContext, xControl, pGeomHelper ), mbDialog( bDialog )
+ {
+ }
+
+ // 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)
++{
++ 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 )
++ {
+ 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);
+ }
++
++rtl::OUString&
++ScVbaTextBox::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox") );
++ return sImplName;
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaTextBox::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.TextBox" ) );
++ }
++ return aServiceNames;
++}
+Index: sc/source/ui/vba/vbatextbox.hxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/vba/vbatextbox.hxx,v
+retrieving revision 1.3
+retrieving revision 1.2.42.2
+diff -u -p -b -w -B -r1.3 -r1.2.42.2
+--- sc/source/ui/vba/vbatextbox.hxx 11 Apr 2008 01:19:33 -0000 1.3
++++ sc/source/ui/vba/vbatextbox.hxx 6 Jul 2008 15:31:16 -0000 1.2.42.2
+@@ -38,16 +38,20 @@ typedef cppu::ImplInheritanceHelper1< Sc
+
+ class ScVbaTextBox : public TextBoxImpl_BASE
+ {
++ bool mbDialog;
+ public:
+- ScVbaTextBox( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+- const css::uno::Reference< css::drawing::XControlShape >& xControlShape );
++ ScVbaTextBox( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper, bool bDialog = false );
+ // Attributes
++ virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
+ virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getMaxLength() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMaxLength( sal_Int32 _maxlength ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getMultiline() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeException);
+-
++ //XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ };
+ #endif //SC_VBA_TEXTBOX_HXX
+Index: sc/source/ui/vba/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
+@@ -0,0 +1,74 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++
++#include "vbatextboxshape.hxx"
++#include "vbacharacters.hxx"
++#include <com/sun/star/text/XSimpleText.hpp>
++#include <vector>
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++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 ) )
++{
++ m_xTextRange.set( xShape , uno::UNO_QUERY_THROW );
++ m_xModel.set( xModel );
++}
++
++rtl::OUString SAL_CALL
++ScVbaTextBoxShape::getText() throw (css::uno::RuntimeException)
++{
++ return m_xTextRange->getString();
++}
++
++void SAL_CALL
++ScVbaTextBoxShape::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
++{
++ m_xTextRange->setString( _text );
++}
++
++uno::Reference< excel::XCharacters > SAL_CALL
++ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException)
++{
++ ScDocShell* pDocShell = getDocShell( m_xModel );
++ ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
++
++ if ( !pDoc )
++ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
++ uno::Reference< text::XSimpleText > xSimple( m_xTextRange, uno::UNO_QUERY_THROW );
++
++ ScVbaPalette aPalette( pDoc->GetDocumentShell() );
++ return new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length, sal_True );
++}
+Index: sc/source/ui/vba/vbatextboxshape.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 @@
++/*************************************************************************
++ *
++ * 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_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"
++
++typedef cppu::ImplInheritanceHelper1< ScVbaShape, oo::msforms::XTextBoxShape > TextBoxShapeImpl_BASE;
++
++class ScVbaTextBoxShape : public TextBoxShapeImpl_BASE
++{
++ css::uno::Reference< css::text::XTextRange > m_xTextRange;
++ css::uno::Reference< css::frame::XModel > m_xModel;
++public:
++ ScVbaTextBoxShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel );
++
++ // Attributes
++ virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException);
++ virtual css::uno::Reference< 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
+===================================================================
+RCS file: sc/source/ui/vba/vbatogglebutton.cxx
+diff -N sc/source/ui/vba/vbatogglebutton.cxx
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbatogglebutton.cxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
+@@ -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 org::openoffice;
++
++
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++const static rtl::OUString TOGGLE( RTL_CONSTASCII_USTRINGPARAM("Toggle") );
++const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
++ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++{
++ 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("org.openoffice.msforms.ToggleButton" ) );
++ }
++ return aServiceNames;
++}
++
+Index: sc/source/ui/vba/vbatogglebutton.hxx
+===================================================================
+RCS file: sc/source/ui/vba/vbatogglebutton.hxx
+diff -N sc/source/ui/vba/vbatogglebutton.hxx
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbatogglebutton.hxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
+@@ -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, 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);
++ //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
+===================================================================
+RCS file: sc/source/ui/vba/vbauserform.cxx
+diff -N sc/source/ui/vba/vbauserform.cxx
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbauserform.cxx 22 Apr 2008 19:53:16 -0000 1.1.2.1
+@@ -0,0 +1,219 @@
++/*************************************************************************
++ *
++ * 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"
++
++using namespace ::org::openoffice;
++using namespace ::com::sun::star;
++
++// some little notes
++// XDialog implementation has the following interesting bits
++// a Controls property ( which is an array of the container controls )
++// each item in the controls array is a XControl, where the model is
++// basically a property bag
++// additionally the XDialog instance has itself a model
++// this model has a ControlModels ( array of models ) property
++// the models in ControlModels can be accessed by name
++// also the XDialog is a XControl ( to access the model above
++
++ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) : ScVbaUserForm_BASE( getXSomethingFromArgs< vba::XHelperInterface >( aArgs, 0 ), xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), static_cast< org::openoffice::AbstractGeometryAttributes* >(0) ), m_pDocShell( 0 ), mbDispose( true )
++{
++ m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
++ uno::Reference< frame::XModel > xModel = getXSomethingFromArgs< frame::XModel >( aArgs, 2 );
++ uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
++ m_pDocShell = getDocShell( xModel );
++ m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
++ setGeometryHelper( new UserFormGeometryHelper( xContext, xControl ) );
++}
++
++ScVbaUserForm::~ScVbaUserForm()
++{
++}
++
++void SAL_CALL
++ScVbaUserForm::Show( ) throw (uno::RuntimeException)
++{
++ OSL_TRACE("ScVbaUserForm::Show( )");
++ short aRet = 0;
++ if ( m_xDialog.is() )
++ aRet = m_xDialog->execute();
++ OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet);
++ if ( mbDispose )
++ {
++ try
++ {
++ uno::Reference< lang::XComponent > xComp( m_xDialog, uno::UNO_QUERY_THROW );
++ m_xDialog = NULL;
++ xComp->dispose();
++ mbDispose = false;
++ }
++ catch( uno::Exception& )
++ {
++ }
++ }
++}
++
++rtl::OUString SAL_CALL
++ScVbaUserForm::getCaption() throw (::com::sun::star::uno::RuntimeException)
++{
++ rtl::OUString sCaption;
++ m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ) ) >>= sCaption;
++ return sCaption;
++}
++void
++ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), uno::makeAny( _caption ) );
++}
++
++void SAL_CALL
++ScVbaUserForm::Hide( ) throw (uno::RuntimeException)
++{
++ mbDispose = false; // hide not dispose
++ if ( m_xDialog.is() )
++ m_xDialog->endExecute();
++}
++
++void SAL_CALL
++ScVbaUserForm::RePaint( ) throw (uno::RuntimeException)
++{
++ // do nothing
++}
++
++void SAL_CALL
++ScVbaUserForm::UnloadObject( ) throw (uno::RuntimeException)
++{
++ mbDispose = true;
++ if ( m_xDialog.is() )
++ m_xDialog->endExecute();
++}
++
++rtl::OUString&
++ScVbaUserForm::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
++ return sImplName;
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaUserForm::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.UserForm" ) );
++ }
++ return aServiceNames;
++}
++
++uno::Reference< beans::XIntrospectionAccess > SAL_CALL
++ScVbaUserForm::getIntrospection( ) throw (uno::RuntimeException)
++{
++ return uno::Reference< beans::XIntrospectionAccess >();
++}
++
++uno::Any SAL_CALL
++ScVbaUserForm::invoke( const ::rtl::OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
++{
++ throw uno::RuntimeException(); // unsupported operation
++}
++
++void SAL_CALL
++ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
++{
++ 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 );
++}
++
++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 );
++ 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)
++{
++ return sal_False;
++}
++
++::sal_Bool SAL_CALL
++ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
++{
++ uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY );
++ 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",
++ "org.openoffice.excel.UserForm" );
++}
++
+Index: sc/source/ui/vba/vbauserform.hxx
+===================================================================
+RCS file: sc/source/ui/vba/vbauserform.hxx
+diff -N sc/source/ui/vba/vbauserform.hxx
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/vbauserform.hxx 22 Apr 2008 19:53:17 -0000 1.1.2.1
+@@ -0,0 +1,77 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_USERFORM_HXX
++#define SC_VBA_USERFORM_HXX
++
++#include <cppuhelper/implbase1.hxx>
++#include <org/openoffice/msforms/XUserForm.hpp>
++#include <com/sun/star/awt/XDialog.hpp>
++
++#include "vbahelperinterface.hxx"
++#include "vbacontrol.hxx"
++
++//typedef InheritedHelperInterfaceImpl1< oo::msforms::XUserForm > ScVbaUserForm_BASE;
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XUserForm > ScVbaUserForm_BASE;
++
++class ScVbaUserForm : public ScVbaUserForm_BASE
++{
++private:
++ css::uno::Reference< css::awt::XDialog > m_xDialog;
++ ScDocShell* m_pDocShell;
++ bool mbDispose;
++protected:
++public:
++ ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
++ virtual ~ScVbaUserForm();
++ // XUserForm
++ virtual void SAL_CALL RePaint( ) throw (css::uno::RuntimeException);
++ virtual void SAL_CALL Show( ) throw (css::uno::RuntimeException);
++ // XIntrospection
++ virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (css::uno::RuntimeException);
++ virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
++ virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
++ virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
++ virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
++ virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
++ virtual ::rtl::OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException);
++ virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException);
++ virtual void SAL_CALL Hide( ) throw (css::uno::RuntimeException);
++ virtual void SAL_CALL UnloadObject( ) throw (css::uno::RuntimeException);
++
++ //XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif
+Index: sc/source/ui/vba/vbawindow.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/vba/vbawindow.cxx,v
+retrieving revision 1.5
+retrieving revision 1.3.42.4
+diff -u -p -b -w -B -r1.5 -r1.3.42.4
+--- sc/source/ui/vba/vbawindow.cxx 11 Apr 2008 01:21:13 -0000 1.5
++++ sc/source/ui/vba/vbawindow.cxx 29 Jul 2008 06:35:43 -0000 1.3.42.4
+@@ -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>
+
+ #include <docsh.hxx>
+ #include <tabvwsh.hxx>
+@@ -199,7 +204,19 @@ public:
+
+ 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 );
+ }
+
+-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 )
+ {
+ sal_Bool bFrozen = getFreezePanes();
+- m_xViewFreezable->freezeAtPosition( _splitcolumn, 0 );
++ sal_Int32 nRow = getSplitRow();
++ m_xViewFreezable->freezeAtPosition( _splitcolumn, nRow );
+ SplitAtDefinedPosition( !bFrozen );
+ }
+ }
+@@ -661,7 +677,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 +753,184 @@ ScVbaWindow::setZoom( const uno::Any& _z
+ }
+ }
+
++uno::Reference< excel::XWorksheet > SAL_CALL
++ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeException)
++{
++ return ScVbaGlobals::getGlobalsImpl(mxContext)->getApplication()->getActiveSheet();
++}
++
++uno::Any SAL_CALL
++ScVbaWindow::getView() throw (uno::RuntimeException)
++{
++ // not supported now
++ sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;
++ return uno::makeAny( nWindowView );
++}
++
++void SAL_CALL
++ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException)
++{
++ 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 );
++}
++
++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;
++}
++
++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 );
++ }
++}
++
++css::awt::Rectangle getPosSize( const uno::Reference< frame::XModel >& xModel )
++{
++ css::awt::Rectangle aRect;
++ uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++ uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
++ if( xWindow.is() )
++ {
++ aRect = xWindow->getPosSize();
++ }
++ return aRect;
++}
++
++void setPosSize( const uno::Reference< frame::XModel >& xModel, sal_Int32 nValue, USHORT nFlag )
++{
++ uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++ uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
++ if( xWindow.is() )
++ {
++ css::awt::Rectangle aRect = xWindow->getPosSize();
++ switch( nFlag )
++ {
++ case css::awt::PosSize::X:
++ xWindow->setPosSize( nValue, aRect.Y, 0, 0, css::awt::PosSize::X );
++ break;
++ case css::awt::PosSize::Y:
++ xWindow->setPosSize( aRect.X, nValue, 0, 0, css::awt::PosSize::Y );
++ break;
++ case css::awt::PosSize::WIDTH:
++ xWindow->setPosSize( 0, 0, nValue, aRect.Height, css::awt::PosSize::WIDTH );
++ break;
++ case css::awt::PosSize::HEIGHT:
++ xWindow->setPosSize( 0, 0, aRect.Width, nValue, css::awt::PosSize::HEIGHT );
++ break;
++ default:
++ break;
++ }
++ }
++}
++
++sal_Int32 SAL_CALL
++ScVbaWindow::getHeight() throw (uno::RuntimeException)
++{
++ css::awt::Rectangle aRect = getPosSize(m_xModel);
++ return aRect.Height;
++}
++
++void SAL_CALL
++ScVbaWindow::setHeight( sal_Int32 _height ) throw (uno::RuntimeException)
++{
++ setPosSize(m_xModel, _height, css::awt::PosSize::HEIGHT);
++}
++
++sal_Int32 SAL_CALL
++ScVbaWindow::getLeft() throw (uno::RuntimeException)
++{
++ css::awt::Rectangle aRect = getPosSize(m_xModel);
++ return aRect.X;
++}
++
++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)
++{
++ css::awt::Rectangle aRect = getPosSize(m_xModel);
++ return aRect.Y;
++}
++
++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;
++}
++
++void SAL_CALL
++ScVbaWindow::setWidth( sal_Int32 _width ) throw (uno::RuntimeException)
++{
++ setPosSize(m_xModel, _width, css::awt::PosSize::WIDTH);
++}
++
++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 );
++}
++
++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 );
++}
++
++void SAL_CALL
++ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++{
++ // need test, print preview current active sheet
++ PrintPreviewHelper( EnableChanges, m_xModel );
++}
++
+ rtl::OUString&
+ ScVbaWindow::getServiceImplName()
+ {
+@@ -754,3 +949,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 -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 );
++
+ // 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 -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
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/vba/vbaworkbook.hxx,v
+retrieving revision 1.4
+retrieving revision 1.3.42.2
+diff -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);
+
+ 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.5
+diff -u -p -b -w -B -r1.5 -r1.3.42.5
+--- sc/source/ui/vba/vbaworksheet.cxx 11 Apr 2008 01:23:10 -0000 1.5
++++ sc/source/ui/vba/vbaworksheet.cxx 29 Jul 2008 06:35:43 -0000 1.3.42.5
+@@ -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,6 +86,8 @@
+ #include "vbaoleobject.hxx"
+ #include "vbaoleobjects.hxx"
+ #include "vbashapes.hxx"
++#include "vbapagesetup.hxx"
++#include "vbapagebreaks.hxx"
+
+ #define STANDARDWIDTH 2267
+ #define STANDARDHEIGHT 427
+@@ -247,6 +251,12 @@ ScVbaWorksheet::setVisible( sal_Bool bVi
+ (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::R
+ return new ScVbaOutline( this, mxContext, xOutline);
+ }
+
++uno::Reference< excel::XPageSetup >
++ScVbaWorksheet::PageSetup( ) throw (uno::RuntimeException)
++{
++ return new ScVbaPageSetup( this, mxContext, getSheet(), getModel() );
++}
++
++uno::Any
++ScVbaWorksheet::HPageBreaks( const uno::Any& aIndex ) throw (uno::RuntimeException)
++{
++ uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak(getSheet(),uno::UNO_QUERY_THROW);
++ uno::Reference< excel::XHPageBreaks > xHPageBreaks( new ScVbaHPageBreaks( this, mxContext, xSheetPageBreak));
++ if ( aIndex.hasValue() )
++ return xHPageBreaks->Item( aIndex, uno::Any());
++ return uno::makeAny( xHPageBreaks );
++}
++
+ sal_Int32
+ ScVbaWorksheet::getStandardWidth() throw (uno::RuntimeException)
+ {
+@@ -416,6 +442,7 @@ 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();
+ }
+ }
+
+@@ -656,29 +683,10 @@ ScVbaWorksheet::setValue( const ::rtl::O
+ 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() );
++ 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::
+ {
+ return sal_False;
+ }
+-::sal_Bool SAL_CALL
+-ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
++
++uno::Reference< container::XNameAccess >
++ScVbaWorksheet::getFormControls()
+ {
++ uno::Reference< container::XNameAccess > xFormControls;
+ try
+ {
+- if ( getControl( aName ).hasValue() )
+- return sal_True;
++ uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
++ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
++ uno::Reference< form::XFormsSupplier > xFormSupplier( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
++ uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
++ // get the www-standard container ( maybe we should access the
++ // 'www-standard' by name rather than index, this seems an
++ // implementation detail
++ xFormControls.set( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
++
+ }
+ catch( uno::Exception& )
+ {
+ }
+- return sal_False;
+-}
+-uno::Any
+-ScVbaWorksheet::getControl( const ::rtl::OUString& sName )
+-{
+- uno::Reference< sheet::XScenarioEnhanced > xIf( getSheet(), uno::UNO_QUERY_THROW );
+- ScTableSheetObj* pTab= static_cast< ScTableSheetObj* >( xIf.get() );
+- ScDocShell* pShell = NULL;
+- if ( pTab )
+- pShell = pTab->GetDocShell();
+- if ( pShell )
+- {
+- ScDrawLayer* pDrawLayer = pShell->MakeDrawLayer();
+- SCTAB nTab = 0;
+- // make GetTab_Impl() public or this class a friend
+- const ScRangeList& rRanges = pTab->GetRangeList();
+- const ScRange* pFirst = rRanges.GetObject(0);
+- if (pFirst)
+- nTab = pFirst->aStart.Tab();
++ return xFormControls;
+
+- SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
+- if ( pPage )
+- {
+- ULONG nCount = pPage->GetObjCount();
+- for ( ULONG index=0; index<nCount; ++index )
+- {
+- SdrObject* pObj = pPage->GetObj( index );
+- if ( pObj )
+- {
+-
+- SdrUnoObj* pUnoObj = PTR_CAST(SdrUnoObj, pObj);
+- if ( pUnoObj )
+- {
+- uno::Reference< container::XNamed > xNamed( pUnoObj->GetUnoControlModel(), uno::UNO_QUERY_THROW );
+- if ( sName.equals( xNamed->getName() ) )
+- return uno::makeAny( xNamed );
+- }
+ }
+- }
+- }
+- }
+-
+- return uno::Any();
++::sal_Bool SAL_CALL
++ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
++{
++ uno::Reference< container::XNameAccess > xFormControls( getFormControls() );
++ if ( xFormControls.is() )
++ return xFormControls->hasByName( aName );
++ return sal_False;
+ }
+
+ uno::Any
+ ScVbaWorksheet::getControlShape( const ::rtl::OUString& sName )
+ {
+- //uno::Reference< sheet::XScenarioEnhanced > xIf( getSheet(), uno::UNO_QUERY_THROW );
+- uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
+- uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
+- uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+- uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPage, uno::UNO_QUERY_THROW );
++ // ideally we would get an XControl object but it appears an XControl
++ // implementation only exists for a Control implementation optained from the
++ // view ( e.g. in basic you would get this from
++ // thiscomponent.currentcontroller.getControl( controlModel ) )
++ // and the thing to realise is that it is only possible to get an XControl
++ // for a currently displayed control :-( often we would want to modify
++ // a control not on the active sheet. But.. you can always access the
++ // XControlShape from the DrawPage whether that is the active drawpage or not
++
++ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getSheet(), uno::UNO_QUERY_THROW );
++ uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
++
+ sal_Int32 nCount = xIndexAccess->getCount();
+ for( int index = 0; index < nCount; index++ )
+ {
+ uno::Any aUnoObj = xIndexAccess->getByIndex( index );
+- uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY_THROW );
+- uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl() );
+- uno::Reference< container::XNamed > xNamed( xControlModel, uno::UNO_QUERY_THROW );
++ // It seems there are some drawing objects that can not query into Control shapes?
++ uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY );
++ if( xControlShape.is() )
++ {
++ uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+ if( sName.equals( xNamed->getName() ))
+ {
+ return aUnoObj;
+ }
+-
++ }
+ }
+ 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 );
++}
++
+
+ namespace worksheet
+ {
+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 -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>
+
+ #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);
+
+- css::uno::Any getControl( const rtl::OUString& sName );
++ css::uno::Reference< css::container::XNameAccess > getFormControls();
+ css::uno::Any getControlShape( const rtl::OUString& sName );
+ protected:
+
+@@ -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);
+
+ // 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);
+
++ 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();
+cvs diff: Diffing sc/source/ui/vba/testvba
+Index: sc/source/ui/vba/testvba/README
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/vba/testvba/README,v
+retrieving revision 1.2
+retrieving revision 1.2.42.1
+diff -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 )
+
+- 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/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 -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 @@
+ #*************************************************************************
+
+ PRJ=..$/..$/..$/..$/
++
+ PRJNAME=sc
+ TARGET=testvba
++ENABLE_EXCEPTIONS=TRUE
+
+-.INCLUDE : ant.mk
+-
+-.IF "$(SOLAR_JAVA)"!=""
++# --- Settings -----------------------------------------------------
+
+-ALLTAR : PROCESSRESULTS
++.INCLUDE : settings.mk
++DLLPRE =
+
+-TESTDOCUMENTS=..$/TestDocuments
+-.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
+-TESTDOCUMENTLOGS=$(TESTDOCUMENTS)$/logs$/unix
+-.ELSE
+-TESTDOCUMENTLOGS=$(TESTDOCUMENTS)$/logs$/win
++.IF "$(ENABLE_VBA)"!="YES"
++dummy:
++ @echo "not building vba..."
+ .ENDIF
+
+-OUTPUTDIR:=..$/$(TARGET)$/Logs
+-ANT_FLAGS+=-Dtest.documents=$(TESTDOCUMENTS)
+-ANT_FLAGS+=-Dtest.out=$(OUTPUTDIR)
+-ANT_FLAGS+=-Dtest.officepath=$(OFFICEPATH)
+-#UNITTEST : $(LOCAL_COMMON_OUT)$/class/TestVBA.class
+-PROCESSRESULTS : ANTBUILD
+- $(PERL) testResults.pl $(OUTPUTDIR) $(TESTDOCUMENTLOGS)
++INCPRE=$(INCCOM)$/$(TARGET)
++CDEFS+=-DVBA_OOBUILD_HACK
++# ------------------------------------------------------------------
++
++SLOFILES= \
++ $(SLO)$/testvba.obj \
++
++
++# --- Targets ------------------------------------------------------
++
++APP1TARGET=testclient
++APP1OBJS= $(SLOFILES)
++
++APP1STDLIBS=\
++ $(SALLIB) \
++ $(STDLIBCPP) \
++ $(CPPULIB) \
++ $(CPPUHELPERLIB) \
++ $(COMPHELPERLIB) \
++ $(TOOLSLIB) \
++ $(UNOTOOLSLIB) \
++
++#APP1OBJS= $(OBJ)$/testclient.obj
++.INCLUDE : target.mk
++
+
+-.ENDIF
+Index: sc/source/ui/vba/testvba/runTests.pl
+===================================================================
+RCS file: sc/source/ui/vba/testvba/runTests.pl
+diff -N sc/source/ui/vba/testvba/runTests.pl
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ sc/source/ui/vba/testvba/runTests.pl 29 Jul 2008 07:22:41 -0000 1.1.2.1
+@@ -0,0 +1,121 @@
++#!/usr/bin/perl -w
++use URI::Escape;
++use File::Basename;
++use Cwd;
++use Cwd 'abs_path';
++
++$numArgs = $#ARGV + 1;
++print "thanks, you gave me $numArgs command-line arguments.\n";
++
++foreach $argnum (0 .. $#ARGV) {
++ print "$ARGV[$argnum]\n";
++}
++
++
++my $binDir = abs_path( dirname($0) );
++
++my $sysDir = "unix";
++my $fileSep = "/";
++my $theResult;
++my $officepath = shift || die "please specify path to office installation program dir";
++my $DocName = shift || "";
++my $programpath = "$officepath/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" )
++{
++ print "use the latest build\n";
++ system( "cp $buildtestclient ." );
++}
++elsif ( !( -e "$testclientname" ) )
++{
++ print "$testclientname do not exist\n";
++ exit;
++}
++
++# test for uname
++system("uname");
++$exit_value = $? >> 8;
++$signal_num = $? & 127;
++$dumped_core = $? & 128;
++
++$failed = ( $exit_value || $signal_num || $dumped_core );
++
++print "$failed = ( $exit_value || $signal_num || $dumped_core )\n";
++
++if ( !$failed && open(UNAME, "uname -a|") ) {
++ $theResult = <UNAME>;
++ close(UNAME);
++ if ( $theResult =~ /^CYGWIN/ ) {
++ # windows under cygwin
++ $sysDir = "win" ;
++ $tmpPath=$ENV{"PATH"};
++ $ENV{"PATH"} = "$officepath:$tmpPath";
++ $testDocDir=`cygpath -m $testDocDir`;
++ uri_escape($testDocDir);
++ # hacky windows url construction
++ $testDocDir="file:///$testDocDir";
++
++ chomp($testDocDir);
++ #print "*** doc dir is $testDocDir\n";
++ $testLogDir = `cygpath -m "$testLogDir"`;
++ uri_escape($testLogDir);
++ $testLogDir="file:///$testLogDir";
++ chomp($testLogDir);
++ #print "*** log dir is $testLogDir\n";
++ $binext = ".exe";
++ }
++ else{
++ # unix we need to find sal etc. ( from the office path )
++ my $tmpPath=$ENV{"PATH"};
++ $ENV{"PATH"} = "$programpath:$basiclibrarypath:$urelibpath/../bin:$tmpPath";
++ $tmpPATH = $ENV{"LD_LIBRARY_PATH"};
++ $ENV{"LD_LIBRARY_PATH"} = "$officepath:$programpath:$basiclibrarypath:$urelibpath:$urelibpath../bin/javaldx:$urelibpath/../bin:$tmpPATH";
++ $ENV{"LD_LIBRARY_PATH"} = "$officepath:$programpath:$basiclibrarypath:$urelibpath:$tmpPATH";
++ my $testPath = $ENV{"LD_LIBRARY_PATH"};
++ print "$testPath\n";
++ $testPath = $ENV{"PATH"};
++ print "$testPath\n";
++ $ENV{"STAR_RESOURCEPATH"} = "$officepath/basis3.0/program/resource";
++ $ENV{"SAL_ALLOW_LINKOO_SYMLINKS"} = "1";
++ $testPath = $ENV{"LANG"};
++ print "$testPath\n";
++ }
++}
++else
++{
++ # ordinary windows, not sure if this will actually work
++ $sysDir = "win" ;
++ $tmpPath=$ENV{"PATH"};
++ $ENV{"PATH"} = "$tmpPath;$officepath";
++ $binext = ".exe";
++}
++
++# the exe needs system paths or urls ( urls are by far the least troublesome )
++
++my $runCmd = "";
++my $analyseCmd = "";
++
++if ( "$DocName" eq "" )
++{
++ $runCmd = "$binDir/testclient$binext $testDocDir $testLogDir";
++ $analyseCmd = "perl $binDir/testResults.pl $binDir/Logs $binDir/TestDocuments/logs/$sysDir";
++}
++else
++{
++ $runCmd = "$binDir/testclient$binext $testDocDir $testLogDir $testDocDir/$DocName";
++ $analyseCmd = "perl $binDir/testResult.pl $binDir/Logs $binDir/TestDocuments/logs/$sysDir $DocName";
++}
++print "runCmd = $runCmd\n";
++
++system ("rm -rf $testLogDir/*");
++my $status = system( $runCmd );
++print "analyseCmd = $analyseCmd\n";
++$status = system( $analyseCmd );
+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
++{
++ # 2 No Log to compare against
++ # 1 Log passed
++ # 0 Log failed
++ my $result = 0;
++ my $testfile = shift;
++ my $dirtocheck = shift;
++ my $filename = basename($testfile);
++ $filename = "$logdir/$filename";
++ print "processing $testfile $filename\n";
++ if ( -f $filename ) {
++ my $tmpFile;
++ $dir = tempdir( CLEANUP => 1 );
++ ($fh, $tmpFile) = tempfile( DIR => $dir );
++ close($fh);
++ #
++ my $status = system("diff -U 0 -p $testfile $filename | $timestampclean > $tmpFile");
++ my $info = stat($tmpFile) or die "no $tmpFile: $!";
++ if ( ($status >>=8) == 0 && ( $info->size == 0) ) {
++ #print "diff worked size is 0\n";
++ $result = 1;
++ }
++ elsif ( ($status >>=8) == 0 && ( $info->size > 0) )
++ {
++ #print "diff worked size > 0\n";
++ $result = 0;
++ }
++ else
++ {
++ #print "diff failed size > 0\n";
++ $result = 0;
++ }
++ }
++ else
++ {
++ #print "not file > 0\n";
++ $result = 2;
++ }
++ #print "diff result = $result\n";
++ return $result;
++}
++
++if ( ! ( $logdir = shift @ARGV ) ) {
++ print STDERR "No logdir specified!\n";
++ usage();
++ exit 1;
++}
++
++if ( ! ( $testlogdir = shift @ARGV ) ) {
++ print STDERR "No testdocuments dir to compare against specified!\n";
++ usage();
++ exit 1;
++}
++
++if ( !(-d $logdir ) ) {
++ print STDERR "No output directory $logdir exists, please create it!!!!\n";
++ exit 1;
++}
++if ( !(-d $testlogdir ) ) {
++ print STDERR "the directory containing the logfiles to compare against \"$logdir\" does not exist\n";
++ usage();
++ exit 1;
++}
++print "logdir $logdir\n";
++print "testlogdir $testlogdir\n";
++sub filter_crud($)
++{
++ my $a = shift;
++
++ $a =~ /~$/ && return;
++ $a =~ /\#$/ && return;
++ $a =~ /\.orig$/ && return;
++ $a =~ /unxlng.*\.pro$/ && return;
++ $a =~ /wntmsc.*\.pro$/ && return;
++ $a =~ /.swp$/ && return;
++ $a =~ /POSITION/ && return;
++ $a =~ /ReadMe/ && return;
++ $a =~ /.tmp$/ && return;
++ $a =~ /\.svn/ && return;
++ $a eq 'CVS' && return;
++ $a eq '.' && return;
++ $a eq '..' && return;
++
++ return $a;
++}
++sub slurp_dir($);
++
++sub slurp_dir($)
++{
++ my $dir = shift;
++ my ($dirhandle, $fname);
++ my @files = ();
++
++ opendir ($dirhandle, $dir) || die "Can't open $dir";
++ while ($fname = readdir ($dirhandle)) {
++ $fname = filter_crud($fname);
++ defined $fname || next;
++# if (-d "$dir/$fname") {
++# push @files, slurp_dir("$dir/$fname");
++# } else
++ {
++ push @files, "$dir/$fname";
++ }
++ }
++ closedir ($dirhandle);
++
++ return @files;
++}
++
++if (-d $testlogdir) {
++ push @files, slurp_dir($testlogdir);
++}
++
++my $processed = 0;
++my $passed = 0;
++my @passedTests=();
++my @skippedTests=();
++my @failedTests=();
++
++my $failureCmd="";
++my $testfile = shift @ARGV;
++my $testfilepath = "$testlogdir/$testfile";
++$testfilepath =~ s/\.xls/\.log/;
++print "$testfilepath\n";
++for $a (@files) {
++ $filename = $a;
++ if ( "$testfilepath" eq "$filename" )
++ {
++ $processed++;
++ my $testcase = $a;
++ $testcase =~ s/\.log/\.xls/;
++ my $result = testLog( $a, $logdir );
++ if ( $result == 0 ) {
++ push @failedTests, basename($testcase);
++ if ( $failureCmd eq "" ) { $failureCmd = " diff -up $a $logdir "; }
++ }
++ elsif ( $result == 2 ) {
++ #print "skipped $a\n";
++ push @skippedTests, $testcase;
++ }
++ else {
++ $passed++;
++ push @passedTests, $testcase;
++ #print "Test document for $a \t \t passed. \n";
++ }
++ }
++}
++my $compared= passedTests+@failedTests;
++my $skip = @skippedTests;
++print "skipped $skip test-cases(s)\n";
++print "compared $compared test-case documents\n";
++print "\t \t $passed tests $ passedTests\n";
++if ( @failedTests > 0 ) {
++ print "the following test-case documents failed, please examine the logs manually\n";
++
++ for $a (@failedTests) {
++ print "\t$a\n";
++ }
++ print "e.g. $failureCmd\n"
++}
+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 -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
++ {
++ osl::FileBase::getFileURLFromSystemPath( rPath, aURL );
++ if ( aURL.equals( rPath ) )
++ throw uno::RuntimeException( rtl::OUString::createFromAscii( "could'nt convert " ).concat( rPath ).concat( rtl::OUString::createFromAscii( " to a URL, is it a fully qualified path name? " ) ), Reference< uno::XInterface >() );
++ }
++ return aURL;
++}
++
++OUString ascii(const sal_Char* cstr)
++{
++ return OUString::createFromAscii(cstr);
++}
++
++const sal_Char* getStr(const OUString& ou)
++{
++ return OUStringToOString(ou, RTL_TEXTENCODING_UTF8).getStr();
++}
++
++
++int usage( const char* pName )
++{
++ std::cerr << "usage: " << pName << "<path to testdocument dir> <output_directory>" << std::endl;
++ return 1;
++
++}
++
++class TestVBA
++{
++private:
++ Reference< XComponentContext > mxContext;
++ Reference< XMultiComponentFactory > mxMCF;
++ Reference< XComponentLoader > mxCompLoader;
++ Reference< XSimpleFileAccess > mxSFA;
++ rtl::OUString msOutDirPath;
++protected:
++public:
++ TestVBA( const Reference< XComponentContext >& _xContext,
++ const Reference< XMultiComponentFactory >& _xMCF,
++ const Reference< XComponentLoader >& _xCompLoader,
++ const rtl::OUString& _outDirPath ) : mxContext( _xContext ), mxMCF( _xMCF ),
++mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
++ {
++ mxSFA.set( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), mxContext), uno::UNO_QUERY_THROW );
++ }
++
++ rtl::OUString getLogLocation() throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception )
++ {
++ rtl::OUString sLogLocation;
++ Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW );
++ pathSettings->getPropertyValue( rtl::OUString::createFromAscii( "Work" ) ) >>= sLogLocation;
++ sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( rtl::OUString::createFromAscii( "HelperAPI-test.log" ) );
++ return sLogLocation;
++ }
++ rtl::OUString getLogLocationWithName( OUString fileName ) throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception )
++ {
++ printf("%s\n", getenv("HOME") );
++ printf("file name %s\n", rtl::OUStringToOString( fileName, RTL_TEXTENCODING_UTF8 ).getStr() );
++ //rtl::OUString sLogLocation( rtl::OUString::createFromAscii( getenv("HOME") ) );
++ rtl::OUString sLogLocation;
++ Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW );
++ pathSettings->getPropertyValue( rtl::OUString::createFromAscii( "Work" ) ) >>= sLogLocation;
++ sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString::createFromAscii( ".log" ) );
++ return sLogLocation;
++ }
++
++ void init()
++ {
++ // blow away previous logs?
++ }
++
++ void proccessDocument( const rtl::OUString& sUrl )
++ {
++ if ( !mxSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCaseAsciiL( ".xls", 4 ) )
++
++ {
++ try
++ {
++ OSL_TRACE( "processing %s", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++ printf( "processing %s\n", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++ // Loading the wanted document
++ Sequence< PropertyValue > propertyValues(1);
++ propertyValues[0].Name = rtl::OUString::createFromAscii( "Hidden" );
++ propertyValues[0].Value <<= sal_False;
++
++ rtl::OUString sfileUrl = convertToURL( sUrl );
++ printf( "try to get xDoc %s\n", rtl::OUStringToOString( sfileUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++ Reference< uno::XInterface > xDoc =
++ mxCompLoader->loadComponentFromURL( sfileUrl, rtl::OUString::createFromAscii( "_blank" ), 0, propertyValues);
++ printf( "got xDoc\n" );
++
++ OUString logFileURL = convertToURL( getLogLocation() );
++ try
++ {
++ Reference< script::provider::XScriptProviderSupplier > xSupplier( xDoc, uno::UNO_QUERY_THROW ) ;
++ if ( mxSFA->exists( logFileURL ) )
++ mxSFA->kill( logFileURL );
++
++ printf("try to get the ScriptProvider\n");
++ Reference< script::provider::XScriptProvider > xProv = xSupplier->getScriptProvider();
++ printf("get the ScriptProvider\n");
++ printf("try to get the Script\n");
++ Reference< script::provider::XScript > xScript;
++ try
++ {
++ xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.TestMacros.Main?language=Basic&location=document" ));
++ } catch ( uno::Exception& e )
++ {
++ try
++ {
++ xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.testMacro.Main?language=Basic&location=document" ));
++ } catch ( uno::Exception& e2 )
++ {
++ xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.testMain.Main?language=Basic&location=document" ));
++ }
++ }
++ OSL_TRACE("Got script for doc %s", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++ printf("get the Script\n");
++ Sequence< uno::Any > aArgs;
++ Sequence< sal_Int16 > aOutArgsIndex;
++ Sequence< uno::Any > aOutArgs;
++
++ xScript->invoke(aArgs, aOutArgsIndex, aOutArgs);
++
++ OUString fileName = sUrl.copy ( sUrl.lastIndexOf( '/' ) );
++ OUString newLocation = msOutDirPath + fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString::createFromAscii( ".log" );
++ try
++ {
++ printf("move log file\n");
++ mxSFA->move( logFileURL, newLocation );
++ OSL_TRACE("new logfile location is %s ", rtl::OUStringToOString( newLocation, RTL_TEXTENCODING_UTF8 ).getStr() );
++ printf("moved to new location\n");
++ }
++ catch ( uno::Exception& e )
++ {
++ logFileURL = convertToURL( getLogLocationWithName( fileName ) );
++ printf("move log file from %s\n", rtl::OUStringToOString( logFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
++ mxSFA->move( logFileURL, newLocation );
++ OSL_TRACE("new logfile location is %s ", rtl::OUStringToOString( newLocation, RTL_TEXTENCODING_UTF8 ).getStr() );
++ printf("moved to new location\n");
++ }
++
++ }
++ catch ( uno::Exception& e )
++ {
++ std::cerr << "Caught exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
++ }
++
++ // interface is supported, otherwise use XComponent.dispose
++ Reference< util::XCloseable > xCloseable ( xDoc, uno::UNO_QUERY );
++
++ if ( xCloseable.is() )
++ {
++ printf("try to close\n");
++ // will close application. and only run a test case for 3.0
++ // maybe it is a bug. yes, it is a bug
++ // if only one frame and model, click a button which related will colse.
++ // will make a crash. It related with window listener.
++ // so, for run all test cases, it should not close the document at this moment.
++ xCloseable->close(sal_False);
++ printf("closed\n");
++ }
++ else
++ {
++ printf("try to dispose\n");
++ Reference< XComponent > xComp( xDoc, uno::UNO_QUERY_THROW );
++ // same as close.
++ xComp->dispose();
++ printf("disposed\n");
++ }
++ }
++ catch( uno::Exception& e )
++ {
++ std::cerr << "Caught exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
++ }
++
++ }
++ printf("complete processing %s\n", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
++ }
++
++ void traverse( const rtl::OUString& sFileDirectory )
++ {
++ rtl::OUString sFileDirectoryURL = convertToURL( sFileDirectory );
++ if ( !mxSFA->isFolder( sFileDirectoryURL) )
++ {
++ throw lang::IllegalArgumentException( rtl::OUString::createFromAscii( "not a directory: ").concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 );
++ }
++ // Getting all files and directories in the current directory
++ Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, sal_False );
++
++ // Iterating for each file and directory
++ printf( "Entries %d\n", (int)entries.getLength() );
++ for ( sal_Int32 i = 0; i < entries.getLength(); ++i )
++ {
++ proccessDocument( entries[ i ] );
++ }
++ }
++};
++
++void tryDispose( Reference< uno::XInterface > xIF, const char* sComp )
++{
++ Reference< lang::XComponent > xComponent( xIF, uno::UNO_QUERY );
++ if ( xComponent.is() )
++ {
++ try
++ {
++ xComponent->dispose();
++ }
++ catch( uno::Exception& e )
++ {
++ std::cerr << "tryDispose caught exception " <<rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << " while disposing " << sComp << std::endl;
++ }
++ }
++}
++int main( int argv, char** argc )
++{
++ if ( !( argv > 2 ) )
++ return usage( argc[0] );
++ try
++ {
++
++ OSL_TRACE("Attempting to bootstrap normal");
++ Reference<XComponentContext> xCC = ::cppu::bootstrap();
++ Reference<XMultiComponentFactory> xFactory = xCC->getServiceManager();
++ OSL_TRACE("got servicemanager");
++ std::cout << "got servicemanager" << std::endl;
++ Reference<XInterface> desktop = xFactory->createInstanceWithContext(
++ ascii("com.sun.star.frame.Desktop"), xCC);
++ OSL_TRACE("got desktop");
++ std::cout << "got desktop" << std::endl;
++ Reference<frame::XComponentLoader> xLoader(desktop, UNO_QUERY_THROW);
++ TestVBA* dTest = new TestVBA( xCC, xFactory, xLoader, ascii( argc[ 2 ] ) );
++ if ( argv == 4 )
++ {
++ std::cout << "before process" << std::endl;
++ dTest->proccessDocument( ascii( argc[ 3 ] ) );
++ std::cout << "after process" << std::endl;
++ }
++ else
++ {
++ dTest->traverse( ascii( argc[ 1 ] ) );
++ }
++ delete dTest;
++// tryDispose( xLoader, "desktop" );
++// tryDispose( xCC, "remote context" );
++
++ }
++ catch( uno::Exception& e )
++ {
++ std::cerr << "Caught Exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
++ }
++
++}
+cvs diff: Diffing sc/source/ui/vba/testvba/TestDocuments
+Index: sc/source/ui/vba/testvba/TestDocuments/AutoFilter.xls
===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/Shapes.log
+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/cvs6sa4KP 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/cvs7sa4KP 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/cvs8sa4KP 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/cvs9sa4KP 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/cvs.sa4KP 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/cvs_sa4KP differ
+Index: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
+===================================================================
+RCS file: sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
+diff -N sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
+Binary files /dev/null and /tmp/cvsata4KP differ
+Index: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
+===================================================================
+RCS file: sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
+diff -N sc/source/ui/vba/testvba/TestDocuments/Shapes.xls
+Binary files /dev/null and /tmp/cvsbta4KP differ
+Index: sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
+===================================================================
+RCS file: sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
+diff -N sc/source/ui/vba/testvba/TestDocuments/StrConv-test.xls
+Binary files /dev/null and /tmp/cvscta4KP differ
+Index: sc/source/ui/vba/testvba/TestDocuments/Template.xls
+===================================================================
+RCS file: sc/source/ui/vba/testvba/TestDocuments/Template.xls
+diff -N sc/source/ui/vba/testvba/TestDocuments/Template.xls
+Binary files /dev/null and /tmp/cvsdta4KP 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/cvseta4KP 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/cvsfta4KP 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/cvsgta4KP 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/cvshta4KP 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/cvsita4KP differ
+Index: sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
+===================================================================
+RCS file: sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
+diff -N sc/source/ui/vba/testvba/TestDocuments/dateserial.xls
+Binary files /dev/null and /tmp/cvsjta4KP 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/cvskta4KP 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/cvslta4KP 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/cvsmta4KP 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/cvsnta4KP 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/cvsota4KP 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/cvspta4KP 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/cvsqta4KP differ
+cvs diff: Diffing sc/source/ui/vba/testvba/TestDocuments/logs
+cvs diff: Diffing sc/source/ui/vba/testvba/TestDocuments/logs/excel
+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/unix/Shapes.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -0,0 +1,77 @@
-+Test run started : 10/16/2007 05:25:21 PM
-+BEGIN Shapes_Collection_Behaviour
-+ TEST START : Shapes_Collection_Behaviour
-+ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1'
-+ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2'
-+ TEST Success. : Shapes_Collection_Behaviour
-+END Shapes_Collection_Behaviour
-+BEGIN Shapes_Select_Item
-+ TEST START : Shapes_Select_Item
-+ ITEM Assertion OK : Correctly selected shape through Range
-+ ITEM Assertion OK : Correctly selected shape through Item
-+ ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
-+ ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
-+ TEST Success. : Shapes_Select_Item
-+END Shapes_Select_Item
-+BEGIN Shapes_Fill
-+ TEST START : Shapes_Fill
-+ ITEM Assertion OK : correctly set visibility of shape fill
-+ ITEM Assertion OK : correctly set transparency of shape line
-+ ITEM Assertion OK : correctly set forecolor of shape fill
-+ ITEM Assertion FAIL : correctly set backcolor of shape fill
-+ ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
-+ ITEM Assertion OK : correctly set forecolor of shape fill
-+ ITEM Assertion FAIL : correctly set forecolor of shape fill
-+ TEST Success. : Shapes_Fill
-+END Shapes_Fill
-+BEGIN Shapes_Line
-+ TEST START : Shapes_Line
-+ ITEM Assertion FAIL : correctly set weight of shape line
-+ ITEM Assertion OK : correctly set visibility of shape line
-+ ITEM Assertion OK : correctly set transparency of shape line
-+ ITEM Assertion OK : correctly set dash style of shape line
-+ ITEM Assertion OK : correctly set dash style of shape line
-+ ITEM Assertion OK : correctly set forecolor of shape line
-+ ITEM Assertion FAIL : correctly set backcolor of shape line
-+ TEST Success. : Shapes_Line
-+END Shapes_Line
-+BEGIN Shapes_TextFrame
-+ TEST START : Shapes_TextFrame
-+ ITEM Assertion OK : correctly set Autosize of Shape TextFrame
-+ TEST Success. : Shapes_TextFrame
-+END Shapes_TextFrame
-+BEGIN Shapes_SimpleGeometry
-+ TEST START : Shapes_SimpleGeometery
-+ ITEM Assertion OK : shape height should be 47.0425168477155 and got 46.9984222363199
-+ ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
-+ ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
-+ ITEM Assertion OK : shape top should be 42.0251943291216 and got 42.0094461726333
-+ ITEM Assertion OK : shape rotation should be 0 and got 0
-+ ITEM Assertion OK : shape rotation should be 25 and got 25
-+ ITEM Assertion OK : shape incrementrotation should be 50 and got 50
-+ ITEM Assertion OK : shape incrementleft should be 70.6834602404119 and got 70.6677120839236
-+ ITEM Assertion OK : shape incrementtop should be 91.262986503119 and got 91.2472383466307
-+ TEST Success. : Shapes_SimpleGeometery
-+END Shapes_SimpleGeometry
-+BEGIN Shapes_Range
-+ TEST START : Shapes_Range
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
-+ TEST Success. : Shapes_Range
-+END Shapes_Range
-+BEGIN Shapes_ShapeRange
-+ TEST START : Shapes_ShapeRange
-+ ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 90.6677120839236 and got 90.6519627935771
-+ ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
-+ ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 111.247238346631 and got 111.231489056284
-+ ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 65.0708633026228 and got 65.0551140122763
-+ ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
-+ ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
-+END Shapes_ShapeRange
-+Test run finished : 10/16/2007 05:25:22 PM
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
++++ sc/source/ui/vba/testvba/TestDocuments/logs/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/unix/TestAddress.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.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/unix/TestAddress.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -0,0 +1,62 @@
-+Test run started : 17/07/2007 20:56:04
-+----------------------------------------------------------------
-+TestAddress
-+ TEST START : TestAddress
-+ ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
-+ ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
-+ ITEM Assertion OK : test3 Range ('e:f') A1 style addressing
-+ ITEM Assertion OK : test4 Range ('e:f') R1C1 style addressing
-+ ITEM Assertion OK : test5 Columns A1 style addressing
-+ ITEM Assertion OK : test6 Columns R1C1 style addressing
-+ ITEM Assertion OK : test7 Columns(3) A1 style addressing
-+ ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
-+ ITEM Assertion OK : test9 Columns('e') A1 style addressing
-+ ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
-+ ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
-+ ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
-+ ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
-+ ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
-+ ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
-+ ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
-+ ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
-+ ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
-+ ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
-+ ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
-+ ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
-+ ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+ ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
-+ ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
-+ ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
-+ ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false
-+ ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false
-+ ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
-+ ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+ ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
-+ ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
-+ ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
-+ ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
-+ ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
-+ ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
-+ ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
-+ ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
-+ ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
-+ ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
-+ ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
-+ ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
-+ ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
-+ ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
-+ ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
-+ ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
-+ ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
-+ ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
-+ ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
-+ ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
++++ 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
+===================================================================
+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
+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
+@@ -0,0 +1,8 @@
++Test run started : 19/06/2007 11:21:42
++----------------------------------------------------------------
++MyGoalseek-Issue
++ TEST START : MyGoalseek-Issue
++ ITEM Assertion OK : Variable Range value: 15
++END 'MyGoalseek-Issue' Symbol
++ TEST OK : MyGoalseek-Issue
++Test run finished : 19/06/2007 11:21:42
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/Ranges.log
+===================================================================
+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
+@@ -0,0 +1,280 @@
++Test run started : 01/06/2007 11:28:58
++----------------------------------------------------------------
++ApplicationMethods
++ TEST START : ApplicationMethods
++ ITEM Assertion OK : Name of Workbook is: Ranges.xls
++ ITEM Assertion OK : Address of Application.Columns is: $A:$A
++ ITEM Assertion OK : Address of Application.Rows is: $1:$1
++ ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
++ ITEM Assertion OK : Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
++ ITEM Assertion OK : Please check manually: Library Path is: C:\Program Files\Microsoft Office\OFFICE11\LIBRARY
++ ITEM Assertion OK : Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\Microsoft\Templates\
++ ITEM Assertion OK : FileSeparator is \
++ ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
++END 'ApplicationMethods' Symbol
++ TEST OK : ApplicationMethods
++----------------------------------------------------------------
++Insert-Issue
++ TEST START : Insert-Issue
++ ITEM Assertion OK : Insert with xlShiftToRight: 10
++END 'Insert-Issue' Symbol
++ TEST OK : Insert-Issue
++----------------------------------------------------------------
++MergeCells-Issue
++ TEST START : MergeCells-Issue
++ ITEM Assertion OK : Range.MergeCells is True
++ ITEM Assertion OK : MergeCells is null: True
++ ITEM Assertion OK : RowCount after Merge: 6
++ ITEM Assertion OK : Range.MergeCells is False
++ ITEM Assertion OK : MergeCells is null: False
++ ITEM Assertion OK : MergeCells of Second Area is null : True
++ ITEM Assertion OK : MergeCells of Ranges is Null: True
++ ITEM Assertion OK : RowCount after Merge: 7
++ ITEM Assertion OK : Range.MergeCells is False
++ ITEM Assertion OK : MergeCells is null: False
++ ITEM Assertion OK : RowCount after Merge: 7
++END 'MergeCells-Issue' Symbol
++ TEST OK : MergeCells-Issue
++----------------------------------------------------------------
++Areas-Issue
++ TEST START : Areas-Issue
++ ITEM Assertion OK : Range Areas Count is2
++ ITEM Assertion OK : First Range Address is: $E$8:$G$13
++ ITEM Assertion OK : First Row is: 8
++ ITEM Assertion OK : First Column is: 5
++ ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
++ ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
++ ITEM Assertion OK : Range Count:53
++END 'Areas-Issue' Symbol
++ TEST OK : Areas-Issue
++----------------------------------------------------------------
++Fill-Methods-Issue
++ TEST START : Fill-Methods-Issue
++ ITEM Assertion OK : Range Value after FillDown: MyFillValue
++ ITEM Assertion OK : Range Value after FillDown: MyFillValue
++ ITEM Assertion OK : Range Value after FillDown: MyRightFillValue
++ ITEM Assertion OK : Range Value after FillDown: MyBottomFillValue
++END 'Fill-Methods-Issue' Symbol
++ TEST OK : Fill-Methods-Issue
++----------------------------------------------------------------
++Range/Item-Method-Issue
++ TEST START : Range/Item-Method-Issue
++ ITEM Assertion OK : Range of multiple columns is: $A:$A,$C:$C
++ ITEM Assertion OK : Range of multiple rows is: $1:$1,$5:$7
++ ITEM Assertion OK : Range of several columns is: $C:$E,$D:$D
++ ITEM Assertion OK : Range of several rows is: $5:$8,$6:$10
++ ITEM Assertion OK : Range of several single cells is: $C$5,$E$8
++ ITEM Assertion OK : Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
++ ITEM Assertion OK : Range of a single Item Cell is: $E$21
++ ITEM Assertion OK : Range of a single Item Cell is: $F$21
++ ITEM Assertion OK : Range of a single Item Cell is: $F$10
++END 'Range/Item-Method-Issue' Symbol
++ TEST OK : Range/Item-Method-Issue
++----------------------------------------------------------------
++R1C1-Formulas-Issue
++ TEST START : R1C1-Formulas-Issue
++ ITEM Assertion OK : R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
++ ITEM Assertion OK : Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
++END 'R1C1-Formulas-Issue' Symbol
++ TEST OK : R1C1-Formulas-Issue
++----------------------------------------------------------------
++Verify_Delete
++ TEST START : Verify_Delete
++ ITEM Assertion OK : Ranges are intersecting: $G$13
++ ITEM Assertion OK : Delete with Default: $AJ$4
++ ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
++ ITEM Assertion OK : Delete with ShiftUp: $M$22
++END 'Verify_Delete' Symbol
++ TEST OK : Verify_Delete
++----------------------------------------------------------------
++Value-Issue
++ TEST START : Value-Issue
++ ITEM Assertion OK : Value of Range is: 12.3
++ ITEM Assertion OK : Text of Range is: 12.3
++ ITEM Assertion OK : Range has Formula: False
++ ITEM Assertion OK : Cell has Formula: False
++ ITEM Assertion OK : Text of Range is null: True
++ ITEM Assertion OK : Range has Formula: True
++ ITEM Assertion OK : Cell has Formula: True
++ ITEM Assertion OK : Value of Cell is: 12
++ ITEM Assertion OK : Application.Calculation is : -4135
++ ITEM Assertion OK : Calculation is automated: True
++ ITEM Assertion OK : Range has Formula: True
++ ITEM Assertion OK : Value of Cell is: 16
++ ITEM Assertion OK : Text of Cell is: 16
++ ITEM Assertion OK : Text of Cell is: 16
++ ITEM Assertion OK : Range has Formula after 'ClearContents: False
++ ITEM Assertion OK : Text of Cell is:
++ ITEM Assertion OK : Text of Cell is:
++END 'Value-Issue' Symbol
++ TEST OK : Value-Issue
++----------------------------------------------------------------
++AutoFit issue
++ TEST START : AutoFit issue
++ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 673
++ ITEM Assertion OK : Rows.AutoFit: CurrentHeight is 612
++END 'AutoFit issue' Symbol
++ TEST OK : AutoFit issue
++----------------------------------------------------------------
++Selections
++ TEST START : Selections
++ ITEM Assertion OK : ActiveCell is : $E$8
++ ITEM Assertion OK : Active Cell is : $E$8
++ ITEM Assertion OK : Number of Cells in Range: 53
++ ITEM Assertion OK : Number of Cells in Range: 53
++ ITEM Assertion OK : Number of Cells in Range: 53
++END 'Selections' Symbol
++ TEST OK : Selections
++----------------------------------------------------------------
++Offset-Resize
++ TEST START : Offset-Resize
++ ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
++ ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
++ ITEM Assertion OK : Resized Range is : $A$20:$D$23
++END 'Offset-Resize' Symbol
++ TEST OK : Offset-Resize
++----------------------------------------------------------------
++Ranges-Address
++ TEST START : Ranges-Address
++ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
++ ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
++ ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
++ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
++ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
++END 'Ranges-Address' Symbol
++ TEST OK : Ranges-Address
++----------------------------------------------------------------
++Range-Address
++ TEST START : Range-Address
++ ITEM Assertion OK : Range Address is: $E$8:$G$13
++ ITEM Assertion OK : Range Address is: $E8:$G13
++ ITEM Assertion OK : Range Address is: E$8:G$13
++ ITEM Assertion OK : Range Address is: R8C5:R13C7
++ ITEM Assertion OK : Range Address is: $E$8:$G$13
++ ITEM Assertion OK : Range Address is: R8C5:R13C7
++ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
++END 'Range-Address' Symbol
++ TEST OK : Range-Address
++----------------------------------------------------------------
++Column-Address
++ TEST START : Column-Address
++ ITEM Assertion OK : Range Address is: $F$8:$F$13
++ ITEM Assertion OK : Range Address is: $F8:$F13
++ ITEM Assertion OK : Range Address is: F$8:F$13
++ ITEM Assertion OK : Range Address is: R8C6:R13C6
++ ITEM Assertion OK : Range Address is: $F$8:$F$13
++ ITEM Assertion OK : Range Address is: R8C6:R13C6
++ ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
++END 'Column-Address' Symbol
++ TEST OK : Column-Address
++----------------------------------------------------------------
++Row-Address
++ TEST START : Row-Address
++ ITEM Assertion OK : Range Address is: $E$9:$G$9
++ ITEM Assertion OK : Range Address is: $E9:$G9
++ ITEM Assertion OK : Range Address is: E$9:G$9
++ ITEM Assertion OK : Range Address is: R9C5:R9C7
++ ITEM Assertion OK : Range Address is: $E$9:$G$9
++ ITEM Assertion OK : Range Address is: R9C5:R9C7
++ ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
++END 'Row-Address' Symbol
++ TEST OK : Row-Address
++----------------------------------------------------------------
++SingleCell-Address
++ TEST START : SingleCell-Address
++ ITEM Assertion OK : Range Address is: $F$9
++ ITEM Assertion OK : Range Address is: $F9
++ ITEM Assertion OK : Range Address is: F$9
++ ITEM Assertion OK : Range Address is: R9C6
++ ITEM Assertion OK : Range Address is: $F$9
++ ITEM Assertion OK : Range Address is: R9C6
++ ITEM Assertion OK : Range Address is: R[7]C[4]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
++END 'SingleCell-Address' Symbol
++ TEST OK : SingleCell-Address
++----------------------------------------------------------------
++Heights and Widths
++ TEST START : Heights and Widths
++ ITEM Assertion OK : Range RowHeight is 40
++ ITEM Assertion OK : Range ColumnWidth is 50
++ ITEM Assertion OK : Range Height is 238
++ ITEM Assertion OK : Range Width is 798.75
++ ITEM Assertion OK : Range RowHeight is 50
++ ITEM Assertion OK : Range ColumnWidth is 50
++ ITEM Assertion OK : Range Height is 297
++ ITEM Assertion OK : Range Width is 798.75
++ ITEM Assertion OK : RowHeight is null: True
++ ITEM Assertion OK : ColumnWidth is null: True
++END 'Heights and Widths' Symbol
++ TEST OK : Heights and Widths
++----------------------------------------------------------------
++RangeRowColumn-Issue
++ TEST START : RangeRowColumn-Issue
++ ITEM Assertion OK : Row is: 8
++ ITEM Assertion OK : Column is: 5
++ ITEM Assertion OK : EntireRow.Columns.Count = 256
++ ITEM Assertion OK : EntireColumn.Rows.Count = 65536
++END 'RangeRowColumn-Issue' Symbol
++ TEST OK : RangeRowColumn-Issue
++----------------------------------------------------------------
++Replace-Issue
++ TEST START : Replace-Issue
++ ITEM Assertion OK : Value after Replace: YourValue
++ ITEM Assertion OK : Value after Replace: YourValue
++ ITEM Assertion OK : Value after Replace: ReplaceValue
++ ITEM Assertion OK : Value after Replace: New ReplaceValue
++ ITEM Assertion OK : Value after Replace: New ReplaceValue
++ ITEM Assertion OK : Value after Replace: New Replace
++ ITEM Assertion OK : Value after Replace:
++END 'Replace-Issue' Symbol
++ TEST OK : Replace-Issue
++----------------------------------------------------------------
++Hidden-Issue
++ TEST START : Hidden-Issue
++ ITEM Assertion OK : - Range.Rows.Hidden (set)
++ ITEM Assertion OK : - Range.Rows.Hidden (get)
++ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (set)
++ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (get)
++ ITEM Assertion OK : - Range.Columns.Hidden (set)
++ ITEM Assertion OK : - Range.Columns.Hidden (get)
++ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (set)
++ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (get)
++END 'Hidden-Issue' Symbol
++ TEST OK : Hidden-Issue
++----------------------------------------------------------------
++End issue
++ TEST START : End issue
++ ITEM Assertion OK : - = $E$48
++ ITEM Assertion OK : - = $E$1
++ ITEM Assertion OK : - = $E$3
++ ITEM Assertion OK : - = $A$8
++ ITEM Assertion OK : - = $B$8
++ ITEM Assertion OK : - = $IV$8
++ ITEM Assertion OK : - = $Z$8
++END 'End issue' Symbol
++ TEST OK : End issue
++----------------------------------------------------------------
++Outline issue
++ TEST START : Outline issue
++ ITEM Assertion OK : - Range.clearOutline - please check visually
++ ITEM Assertion OK : - Range.AutoOutline - please check visually
++ ITEM Assertion OK : - Range.AutoOutline - please check visually
++END 'Outline issue' Symbol
++ TEST OK : Outline issue
++----------------------------------------------------------------
++Validation
++ TEST START : Validation
++ ITEM Assertion OK : Validation Input Message is : Attention!
++ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
++ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
++ ITEM Assertion OK : Validation Error Message is : An Error occured
++ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
++END 'Validation' Symbol
++ TEST OK : Validation
++Test run finished : 01/06/2007 11:29:00
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/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
+@@ -0,0 +1,62 @@
++Test run started : 17/07/2007 15:25:17
++----------------------------------------------------------------
++TestAddress
++ TEST START : TestAddress
++ ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
++ ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
++ ITEM Assertion OK : test3 Range ('e:f') A1 style addressing
++ ITEM Assertion OK : test4 Range ('e:f') R1C1 style addressing
++ ITEM Assertion OK : test5 Columns A1 style addressing
++ ITEM Assertion OK : test6 Columns R1C1 style addressing
++ ITEM Assertion OK : test7 Columns(3) A1 style addressing
++ ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
++ ITEM Assertion OK : test9 Columns('e') A1 style addressing
++ ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
++ ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
++ ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
++ ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
++ ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
++ ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
++ ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
++ ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
++ ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
++ ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
++ ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
++ ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
++ ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
++ ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
++ ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
++ ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
++ ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false
++ ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false
++ ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
++ ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++ ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
++ ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
++ ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
++ ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
++ ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
++ ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
++ ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
++ ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++ ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
++ ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
++ ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
++ ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
++ ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
++ ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
++ ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
++ ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
++ ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
++ ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
++ ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
++ ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
+Test Results
+============
+
+Tests passed: 49
+Tests failed: 0
-+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 17/07/2007 20:56:05
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestCalc_Rangetest.log
++
++END 'TestAddress
++ TEST OK : TestAddress
++Test run finished : 17/07/2007 15:25:19
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/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
+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/unix/TestCalc_Rangetest.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
++++ sc/source/ui/vba/testvba/TestDocuments/logs/excel/TestCalc_Rangetest.log 29 Jul 2008 07:22:52 -0000 1.1.2.2
@@ -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
++Test run started : 30/05/2007 11:33:13
++BEGIN TestCalc
++ TEST START : RangeTest2
++ ITEM Assertion OK : - Range("D15").Row
++ ITEM Assertion OK : - WorkSheet("D15").Range.Row
++ ITEM Assertion OK : - Range("D15").Column
++ ITEM Assertion OK : - Worksheet.Range("D15").Column
++ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
++ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
++ ITEM Assertion OK : - Range("D1").EntireRow.Columns.Count
++ ITEM Assertion OK : - Range("D1").EntireColumn.Rows.Count
++ ITEM Assertion OK : - Range("D15").ClearContent
++ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (set)
++ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (get)
++ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (set)
++ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (get)
++ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (set)
++ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (get)
++ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (set)
++ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (get)
++ ITEM Assertion OK : - Range("B38").Orientation (get)
++ ITEM Assertion OK : - Range("B38").Orientation (set)
++ ITEM Assertion OK : - Range("B38").Orientation (set = xlDownward)
++ ITEM Assertion OK : - Range("B38").Orientation (set)
++ ITEM Assertion OK : - Range("B38").Orientation (set = xlUpward)
++ ITEM Assertion OK : - Range("B38").Orientation (set)
++ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
++ ITEM Assertion OK : - Range("B38").Orientation (set)
++ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
++ ITEM Assertion OK : - Range("B39").WrapText (get)
++ ITEM Assertion OK : - Range("B39").WrapText (set)
++ ITEM Assertion OK : - Range("B39").WrapText (set)
++ ITEM Assertion OK : - Range("E39").MergeCells (get)
++ ITEM Assertion OK : - Range("F39").MergeCells (get)
++ ITEM Assertion OK : - Range("E39").MergeCells (set)
++ ITEM Assertion OK : - Range("F39").MergeCells (set)
++ ITEM Assertion OK : - Range("E39").MergeCells (set)
++ ITEM Assertion OK : - Range("F39").MergeCells (set)
++ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
++ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
++ ITEM Assertion OK : - Range("D41:D42").Replace MatchCase:=False
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
++ ITEM OK (RangeTest2)
++ TEST succesfully completed : RangeTest2
++END TestCalc
++Test run finished : 30/05/2007 11:33:14
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/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
+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/unix/TestCalc_Rangetest2.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
-@@ -0,0 +1,65 @@
-+Test run started : 18/06/2007 16:34:18
-+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 : 18/06/2007 16:34:20
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/AutoFilter.log
++++ 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
+cvs diff: Diffing sc/source/ui/vba/testvba/TestDocuments/logs/unix
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/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
+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/win/AutoFilter.log 28 Jan 2008 17:30:47 -0000 1.1.2.1
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/AutoFilter.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
@@ -0,0 +1,20 @@
-+Test run started : 16/10/2007 17:42:01
++Test run started : 18/07/2007 10:56:38
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
@@ -6144,15 +11117,15 @@
+
+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
++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/win/MiscRangeTests.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/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/win/MiscRangeTests.log 28 Jan 2008 17:30:47 -0000 1.1.2.1
++++ 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 15:08:56
++Test run started : 17/07/2007 20:54:56
+----------------------------------------------------------------
+MiscRangeTests
+ TEST START : MiscRangeTests
@@ -6196,15 +11169,32 @@
+
+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 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/win/Ranges-2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges-2.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/win/Ranges-2.log 28 Jan 2008 17:30:47 -0000 1.1.2.1
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-2.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
@@ -0,0 +1,68 @@
-+Test run started : 10/07/2007 01:55:47
++Test run started : 19/06/2007 11:14:01
+----------------------------------------------------------------
+ClearFormtsIssue
+ TEST START : ClearFormtsIssue
@@ -6257,9 +11247,9 @@
+----------------------------------------------------------------
+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.Left is: 118.8432
++ ITEM Assertion OK : Range.Top is: 92.16585
++ ITEM Assertion OK : Range.Width is: 226.2
+ ITEM Assertion OK : Range.Height is: 271.5
+END 'RangeSizeIssues' Symbol
+ TEST OK : RangeSizeIssues
@@ -6271,30 +11261,30 @@
+ 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/Ranges-3.log
++Test run finished : 19/06/2007 11:14:02
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/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
+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/win/Ranges-3.log 28 Jan 2008 17:30:48 -0000 1.1.2.1
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges-3.log 28 Jan 2008 17:30:46 -0000 1.1.2.1
@@ -0,0 +1,8 @@
-+Test run started : 10/07/2007 01:55:51
++Test run started : 19/06/2007 11:26:09
+----------------------------------------------------------------
+MyGoalseek-Issue
+ TEST START : MyGoalseek-Issue
+ ITEM Assertion OK : Variable Range value: 15
+END 'MyGoalseek-Issue' Symbol
+ TEST OK : MyGoalseek-Issue
-+Test run finished : 10/07/2007 01:55:51
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log
++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/win/Ranges.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/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/win/Ranges.log 28 Jan 2008 17:30:49 -0000 1.1.2.1
++++ sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log 29 Jul 2008 07:22:53 -0000 1.1.2.2
@@ -0,0 +1,280 @@
-+Test run started : 10/07/2007 01:55:56
++Test run started : 10/03/2008 15:15:11
+----------------------------------------------------------------
+ApplicationMethods
+ TEST START : ApplicationMethods
@@ -6302,10 +11292,10 @@
+ ITEM Assertion OK : Address of Application.Columns is: $A:$A
+ ITEM Assertion OK : Address of Application.Rows is: $1:$1
+ ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
-+ ITEM Assertion OK : Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
-+ ITEM Assertion OK : Please check manually: Library Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org2\user\basic
-+ ITEM Assertion OK : Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org2\user\template
-+ ITEM Assertion OK : FileSeparator is \
++ ITEM Assertion OK : Please check manually: DefaultFilePath is: /data4/home/npower/Documents
++ ITEM Assertion OK : Please check manually: Library Path is: /data4/home/npower/.ooo-2.0/user/basic
++ ITEM Assertion OK : Please check manually: Template Path is: /data4/home/npower/.ooo-2.0/user/template
++ ITEM Assertion OK : FileSeparator is /
+ ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
+END 'ApplicationMethods' Symbol
+ TEST OK : ApplicationMethods
@@ -6370,7 +11360,7 @@
+R1C1-Formulas-Issue
+ TEST START : R1C1-Formulas-Issue
+ ITEM Assertion OK : R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
-+ ITEM Assertion FAIL : Range.Formula is: =IF(OR(J8=0,RC[2]="YES"),"")
++ ITEM Assertion OK : Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
+END 'R1C1-Formulas-Issue' Symbol
+ TEST OK : R1C1-Formulas-Issue
+----------------------------------------------------------------
@@ -6407,8 +11397,8 @@
+----------------------------------------------------------------
+AutoFit issue
+ TEST START : AutoFit issue
-+ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 467
-+ ITEM Assertion FAIL : Rows.AutoFit: CurrentHeight is 78
++ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 680
++ ITEM Assertion OK : Rows.AutoFit: CurrentHeight is 554
+END 'AutoFit issue' Symbol
+ TEST OK : AutoFit issue
+----------------------------------------------------------------
@@ -6500,12 +11490,12 @@
+ ITEM Assertion OK : Range RowHeight is 40
+ ITEM Assertion OK : Range ColumnWidth is 50
+ ITEM Assertion OK : Range Height is 240
-+ ITEM Assertion FAIL : Range Width is 675
++ ITEM Assertion OK : Range Width is 795
+ ITEM Assertion OK : Range RowHeight is 50
+ ITEM Assertion OK : Range ColumnWidth is 50
+ ITEM Assertion OK : Range Height is 300
-+ ITEM Assertion FAIL : Range Width is 675
-+ ITEM Assertion FAIL : RowHeight is null: False
++ ITEM Assertion OK : Range Width is 795
++ ITEM Assertion OK : RowHeight is null: True
+ ITEM Assertion OK : ColumnWidth is null: True
+END 'Heights and Widths' Symbol
+ TEST OK : Heights and Widths
@@ -6564,353 +11554,2308 @@
+END 'Outline issue' Symbol
+ TEST OK : Outline issue
+----------------------------------------------------------------
-+Validation
-+ TEST START : Validation
-+ ITEM Assertion OK : Validation Input Message is : Attention!
-+ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
-+ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
-+ ITEM Assertion OK : Validation Error Message is : An Error occured
-+ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
-+END 'Validation' Symbol
-+ TEST OK : Validation
-+Test run finished : 10/07/2007 01:56:04
++Validation
++ TEST START : Validation
++ ITEM Assertion OK : Validation Input Message is : Attention!
++ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
++ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
++ ITEM Assertion OK : Validation Error Message is : An Error occured
++ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
++END 'Validation' Symbol
++ TEST OK : Validation
++Test run finished : 10/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
+@@ -0,0 +1,77 @@
++Test run started : 10/16/2007 05:25:21 PM
++BEGIN Shapes_Collection_Behaviour
++ TEST START : Shapes_Collection_Behaviour
++ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1'
++ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2'
++ TEST Success. : Shapes_Collection_Behaviour
++END Shapes_Collection_Behaviour
++BEGIN Shapes_Select_Item
++ TEST START : Shapes_Select_Item
++ ITEM Assertion OK : Correctly selected shape through Range
++ ITEM Assertion OK : Correctly selected shape through Item
++ ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
++ ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
++ TEST Success. : Shapes_Select_Item
++END Shapes_Select_Item
++BEGIN Shapes_Fill
++ TEST START : Shapes_Fill
++ ITEM Assertion OK : correctly set visibility of shape fill
++ ITEM Assertion OK : correctly set transparency of shape line
++ ITEM Assertion OK : correctly set forecolor of shape fill
++ ITEM Assertion FAIL : correctly set backcolor of shape fill
++ ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
++ ITEM Assertion OK : correctly set forecolor of shape fill
++ ITEM Assertion FAIL : correctly set forecolor of shape fill
++ TEST Success. : Shapes_Fill
++END Shapes_Fill
++BEGIN Shapes_Line
++ TEST START : Shapes_Line
++ ITEM Assertion FAIL : correctly set weight of shape line
++ ITEM Assertion OK : correctly set visibility of shape line
++ ITEM Assertion OK : correctly set transparency of shape line
++ ITEM Assertion OK : correctly set dash style of shape line
++ ITEM Assertion OK : correctly set dash style of shape line
++ ITEM Assertion OK : correctly set forecolor of shape line
++ ITEM Assertion FAIL : correctly set backcolor of shape line
++ TEST Success. : Shapes_Line
++END Shapes_Line
++BEGIN Shapes_TextFrame
++ TEST START : Shapes_TextFrame
++ ITEM Assertion OK : correctly set Autosize of Shape TextFrame
++ TEST Success. : Shapes_TextFrame
++END Shapes_TextFrame
++BEGIN Shapes_SimpleGeometry
++ TEST START : Shapes_SimpleGeometery
++ ITEM Assertion OK : shape height should be 47.0425168477155 and got 46.9984222363199
++ ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
++ ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
++ ITEM Assertion OK : shape top should be 42.0251943291216 and got 42.0094461726333
++ ITEM Assertion OK : shape rotation should be 0 and got 0
++ ITEM Assertion OK : shape rotation should be 25 and got 25
++ ITEM Assertion OK : shape incrementrotation should be 50 and got 50
++ ITEM Assertion OK : shape incrementleft should be 70.6834602404119 and got 70.6677120839236
++ ITEM Assertion OK : shape incrementtop should be 91.262986503119 and got 91.2472383466307
++ TEST Success. : Shapes_SimpleGeometery
++END Shapes_SimpleGeometry
++BEGIN Shapes_Range
++ TEST START : Shapes_Range
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
++ TEST Success. : Shapes_Range
++END Shapes_Range
++BEGIN Shapes_ShapeRange
++ TEST START : Shapes_ShapeRange
++ ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 90.6677120839236 and got 90.6519627935771
++ ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
++ ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 111.247238346631 and got 111.231489056284
++ ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 65.0708633026228 and got 65.0551140122763
++ ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
++ ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
++END Shapes_ShapeRange
++Test run finished : 10/16/2007 05:25:22 PM
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/unix/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
+@@ -0,0 +1,62 @@
++Test run started : 17/07/2007 20:56:04
++----------------------------------------------------------------
++TestAddress
++ TEST START : TestAddress
++ ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
++ ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
++ ITEM Assertion OK : test3 Range ('e:f') A1 style addressing
++ ITEM Assertion OK : test4 Range ('e:f') R1C1 style addressing
++ ITEM Assertion OK : test5 Columns A1 style addressing
++ ITEM Assertion OK : test6 Columns R1C1 style addressing
++ ITEM Assertion OK : test7 Columns(3) A1 style addressing
++ ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
++ ITEM Assertion OK : test9 Columns('e') A1 style addressing
++ ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
++ ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
++ ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
++ ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
++ ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
++ ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
++ ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
++ ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
++ ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
++ ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
++ ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
++ ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
++ ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
++ ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
++ ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
++ ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
++ ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false
++ ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false
++ ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
++ ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++ ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
++ ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
++ ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
++ ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
++ ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
++ ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
++ ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
++ ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
++ ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
++ ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
++ ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
++ ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
++ ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
++ ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
++ ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
++ ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
++ ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
++ ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
++ ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
++ ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
++Test Results
++============
++
++Tests passed: 49
++Tests failed: 0
++
++END 'TestAddress
++ TEST OK : TestAddress
++Test run finished : 17/07/2007 20:56:05
+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
+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
+@@ -0,0 +1,82 @@
++Test run started : 01/29/2008 02:38:27 PM
++BEGIN Format
++ TEST START : Test Predefined_Datetime_Format_Sample function
++ ITEM Assertion OK : General Date: 1/6/98
++ ITEM Assertion OK : Long Date: Tuesday, January 06, 1998
++ ITEM Assertion FAIL : Medium Date: 06-Jan-1998
++ ITEM Assertion OK : Short Date: 1/6/98
++ ITEM Assertion FAIL : Long Time: 05:08:06 PM
++ ITEM Assertion OK : Medium Time: 05:08 PM
++ ITEM Assertion OK : Short Time: 17:08
++ TEST OK : Test Predefined_Datetime_Format_Sample function
++ TEST START : Test Predefined_Number_Format_Sample function
++ ITEM Assertion OK : General Number: 562486.2356
++ ITEM Assertion OK : General Number: -3456.789
++ ITEM Assertion OK : General Number: 213.21
++ ITEM Assertion OK : Currency: $562,486.24
++ ITEM Assertion OK : Fixed: 0.20
++ ITEM Assertion OK : Standard: 562,486.24
++ ITEM Assertion OK : Percent: 75.21%
++ ITEM Assertion OK : Scientific: 5.62E+05
++ ITEM Assertion OK : Scientific: -3.46E+03
++ ITEM Assertion OK : Yes/No: No
++ ITEM Assertion OK : Yes/No: Yes
++ ITEM Assertion OK : True/False: False
++ ITEM Assertion OK : True/False: True
++ ITEM Assertion OK : On/Off: Off
++ ITEM Assertion OK : On/Off: On
++ TEST OK : Test Predefined_Number_Format_Sample function
++ TEST START : Test Custom_Datetime_Format_Sample function
++ ITEM Assertion FAIL : c: 1/6/98 05:08:06 PM
++ ITEM Assertion OK : dddddd: Tuesday, January 06, 1998
++ ITEM Assertion OK : mm-dd-yyyy: 01-06-1998
++ ITEM Assertion OK : d: 6
++ ITEM Assertion OK : dd: 06
++ ITEM Assertion OK : ddd: Tue
++ ITEM Assertion OK : dddd: Tuesday
++ ITEM Assertion OK : ddddd: 1/6/98
++ ITEM Assertion OK : h: 5
++ ITEM Assertion OK : hh: 05
++ ITEM Assertion OK : n: 8
++ ITEM Assertion OK : nn: 08
++ ITEM Assertion OK : m: 1
++ ITEM Assertion OK : mm: 01
++ ITEM Assertion OK : mmm: Jan
++ ITEM Assertion OK : mmmm: January
++ ITEM Assertion FAIL : q: Q1
++ ITEM Assertion OK : s: 6
++ ITEM Assertion OK : ss: 06
++ ITEM Assertion FAIL : ttttt: 05:08:06 AM
++ ITEM Assertion OK : hh:mm:ss AM/PM: 05:08:06 PM
++ ITEM Assertion FAIL : hh:mm:ss am/pm: 05:08:06 PM
++ ITEM Assertion FAIL : hh:mm:ss A/P: 05:08:06 p
++ ITEM Assertion OK : hh:mm:ss a/p: 05:08:06 p
++ ITEM Assertion OK : hh:mm:ss: 17:08:06
++ ITEM Assertion OK : ww: 2
++ ITEM Assertion OK : w: 3
++ ITEM Assertion OK : y: 6
++ ITEM Assertion OK : yy: 98
++ ITEM Assertion OK : yyyy: 1998
++ TEST OK : Test Custom_Datetime_Format_Sample function
++ TEST START : Test Custom_Number_Format_Sample function
++ ITEM Assertion OK : 00.0000: 23.6750
++ ITEM Assertion OK : 00.00: 23.68
++ ITEM Assertion OK : 00000: 02658
++ ITEM Assertion OK : 00.00: 2658.00
++ ITEM Assertion OK : ##.####: 23.675
++ ITEM Assertion OK : ##.##: 23.68
++ ITEM Assertion OK : #,###.##: 12,345.25
++ ITEM Assertion OK : ##.00%: 25.00%
++ ITEM Assertion OK : #,###: 1,000,000
++ ITEM Assertion OK : ######E-###: 109838E-5
++ ITEM Assertion OK : $#,###.##: $2,345.25
++ ITEM Assertion OK : ##.###\%: .25%
++ TEST OK : Test Custom_Number_Format_Sample function
++ TEST START : Test Custom_Text_Format_Sample function
++ ITEM Assertion FAIL : \* \*@@@@@: *VBA*VBAVBAVBAVBAVBA
++ ITEM Assertion FAIL : \*&&\*&&&&: VBA
++ ITEM Assertion OK : <: vba
++ ITEM Assertion OK : >: VBA
++ 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
+===================================================================
+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
+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
+@@ -0,0 +1,45 @@
++Test run started : 05/29/2008 02:55:48 PM
++BEGIN Window2
++ TEST START : Test Window.SplitRow
++ ITEM Assertion OK : Test SplitColumn: 2
++ ITEM Assertion FAIL : Test SplitRow: 5
++ ITEM Assertion FAIL : Test SplitVertical: 64.5090003183026
++ ITEM Assertion OK : Test SplitHorizontal: 502.570118758869
++ ITEM Assertion OK : Test SplitVertical: 242.283803521067
++ ITEM Assertion OK : Test SplitRow: 19
++ ITEM Assertion OK : Test SplitHorizontal: 242.283803521067
++ ITEM Assertion OK : Test SplitColumn: 1
++ ITEM Assertion FAIL : Test SplitRow: 8
++ ITEM Assertion OK : Test SplitColumn: 10
++ ITEM Assertion OK : Test SplitColumn: 0
++ ITEM Assertion OK : Test SplitRow: 0
++ TEST OK : Test Window.SplitRow
++TEST ERROR - no test begun: Test Window.SplitRow
++ TEST START : Test Window.DisplayGridlines
++ ITEM Assertion OK : Test gridlines are on
++ ITEM Assertion OK : Test gridlines are off
++ TEST OK : Test Window.DisplayGridlines
++ TEST START : Test Window.DisplayHeadings
++ ITEM Assertion OK : Test Headings are on
++ ITEM Assertion OK : Test Headings are off
++ TEST OK : Test Window.DisplayHeadings
++ TEST START : Test Window.Visibility
++ ITEM Assertion OK : Window is visible
++ TEST FAIL : Test Window.Visibility (hit error handler).
++ TEST START : Test Window.FreezePanes
++ ITEM Assertion OK : Test no panes frozen
++ ITEM Assertion OK : Test panes frozen at center
++ ITEM Assertion OK : Test panes frozen at split
++ TEST OK : Test Window.FreezePanes
++ TEST START : Test Window.View
++ TEST OK : Test Window.View
++ TEST START : Test Window.Zoom
++ ITEM Assertion OK : Test zoom=100%
++ ITEM Assertion OK : Test zoom=150%
++ TEST OK : Test Window.Zoom
++ TEST START : Test Windows.Count
++ ITEM Assertion OK : Windows Count: 1
++ ITEM Assertion OK : Application.Windows Count: 1
++ TEST OK : Test Windows.Count
++END Window2
++Test run finished : 05/29/2008 02:55:48 PM
+cvs diff: Diffing sc/source/ui/vba/testvba/TestDocuments/logs/win
+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
+===================================================================
+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
+@@ -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
+===================================================================
+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
+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
+@@ -0,0 +1,8 @@
++Test run started : 10/07/2007 01:55:51
++----------------------------------------------------------------
++MyGoalseek-Issue
++ TEST START : MyGoalseek-Issue
++ ITEM Assertion OK : Variable Range value: 15
++END 'MyGoalseek-Issue' Symbol
++ TEST OK : MyGoalseek-Issue
++Test run finished : 10/07/2007 01:55:51
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/Ranges.log
+===================================================================
+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
+@@ -0,0 +1,280 @@
++Test run started : 10/07/2007 01:55:56
++----------------------------------------------------------------
++ApplicationMethods
++ TEST START : ApplicationMethods
++ ITEM Assertion OK : Name of Workbook is: Ranges.xls
++ ITEM Assertion OK : Address of Application.Columns is: $A:$A
++ ITEM Assertion OK : Address of Application.Rows is: $1:$1
++ ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
++ ITEM Assertion OK : Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
++ ITEM Assertion OK : Please check manually: Library Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org2\user\basic
++ ITEM Assertion OK : Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org2\user\template
++ ITEM Assertion OK : FileSeparator is \
++ ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
++END 'ApplicationMethods' Symbol
++ TEST OK : ApplicationMethods
++----------------------------------------------------------------
++Insert-Issue
++ TEST START : Insert-Issue
++ ITEM Assertion OK : Insert with xlShiftToRight: 10
++END 'Insert-Issue' Symbol
++ TEST OK : Insert-Issue
++----------------------------------------------------------------
++MergeCells-Issue
++ TEST START : MergeCells-Issue
++ ITEM Assertion OK : Range.MergeCells is True
++ ITEM Assertion FAIL : MergeCells is null: False
++ ITEM Assertion OK : RowCount after Merge: 13
++ ITEM Assertion OK : Range.MergeCells is False
++ ITEM Assertion OK : MergeCells is null: False
++ ITEM Assertion FAIL : MergeCells of Second Area is null : False
++ ITEM Assertion FAIL : MergeCells of Ranges is Null: False
++ ITEM Assertion OK : RowCount after Merge: 7
++ ITEM Assertion OK : Range.MergeCells is False
++ ITEM Assertion OK : MergeCells is null: False
++ ITEM Assertion OK : RowCount after Merge: 7
++END 'MergeCells-Issue' Symbol
++ TEST OK : MergeCells-Issue
++----------------------------------------------------------------
++Areas-Issue
++ TEST START : Areas-Issue
++ ITEM Assertion OK : Range Areas Count is2
++ ITEM Assertion OK : First Range Address is: $E$8:$G$13
++ ITEM Assertion OK : First Row is: 8
++ ITEM Assertion OK : First Column is: 5
++ ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
++ ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
++ ITEM Assertion OK : Range Count:53
++END 'Areas-Issue' Symbol
++ TEST OK : Areas-Issue
++----------------------------------------------------------------
++Fill-Methods-Issue
++ TEST START : Fill-Methods-Issue
++ ITEM Assertion OK : Range Value after FillDown: MyFillValue
++ ITEM Assertion OK : Range Value after FillDown: MyFillValue
++ ITEM Assertion OK : Range Value after FillDown: MyRightFillValue
++ ITEM Assertion OK : Range Value after FillDown: MyBottomFillValue
++END 'Fill-Methods-Issue' Symbol
++ TEST OK : Fill-Methods-Issue
++----------------------------------------------------------------
++Range/Item-Method-Issue
++ TEST START : Range/Item-Method-Issue
++ ITEM Assertion OK : Range of multiple columns is: $A:$A,$C:$C
++ ITEM Assertion OK : Range of multiple rows is: $1:$1,$5:$7
++ ITEM Assertion OK : Range of several columns is: $C:$E,$D:$D
++ ITEM Assertion OK : Range of several rows is: $5:$8,$6:$10
++ ITEM Assertion OK : Range of several single cells is: $C$5,$E$8
++ ITEM Assertion OK : Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
++ ITEM Assertion OK : Range of a single Item Cell is: $E$21
++ ITEM Assertion OK : Range of a single Item Cell is: $F$21
++ ITEM Assertion OK : Range of a single Item Cell is: $F$10
++END 'Range/Item-Method-Issue' Symbol
++ TEST OK : Range/Item-Method-Issue
++----------------------------------------------------------------
++R1C1-Formulas-Issue
++ TEST START : R1C1-Formulas-Issue
++ ITEM Assertion OK : R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
++ ITEM Assertion FAIL : Range.Formula is: =IF(OR(J8=0,RC[2]="YES"),"")
++END 'R1C1-Formulas-Issue' Symbol
++ TEST OK : R1C1-Formulas-Issue
++----------------------------------------------------------------
++Verify_Delete
++ TEST START : Verify_Delete
++ ITEM Assertion OK : Ranges are intersecting: $G$13
++ ITEM Assertion OK : Delete with Default: $AJ$4
++ ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
++ ITEM Assertion OK : Delete with ShiftUp: $M$22
++END 'Verify_Delete' Symbol
++ TEST OK : Verify_Delete
++----------------------------------------------------------------
++Value-Issue
++ TEST START : Value-Issue
++ ITEM Assertion OK : Value of Range is: 12.3
++ ITEM Assertion OK : Text of Range is: 12.3
++ ITEM Assertion OK : Range has Formula: False
++ ITEM Assertion OK : Cell has Formula: False
++ ITEM Assertion FAIL : Text of Range is null: False
++ ITEM Assertion OK : Range has Formula: True
++ ITEM Assertion OK : Cell has Formula: True
++ ITEM Assertion OK : Value of Cell is: 12
++ ITEM Assertion OK : Application.Calculation is : -4135
++ ITEM Assertion OK : Calculation is automated: True
++ ITEM Assertion OK : Range has Formula: True
++ ITEM Assertion OK : Value of Cell is: 16
++ ITEM Assertion OK : Text of Cell is: 16
++ ITEM Assertion OK : Text of Cell is: 16
++ ITEM Assertion OK : Range has Formula after 'ClearContents: False
++ ITEM Assertion OK : Text of Cell is:
++ ITEM Assertion OK : Text of Cell is:
++END 'Value-Issue' Symbol
++ TEST OK : Value-Issue
++----------------------------------------------------------------
++AutoFit issue
++ TEST START : AutoFit issue
++ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 467
++ ITEM Assertion FAIL : Rows.AutoFit: CurrentHeight is 78
++END 'AutoFit issue' Symbol
++ TEST OK : AutoFit issue
++----------------------------------------------------------------
++Selections
++ TEST START : Selections
++ ITEM Assertion OK : ActiveCell is : $E$8
++ ITEM Assertion OK : Active Cell is : $E$8
++ ITEM Assertion OK : Number of Cells in Range: 52
++ ITEM Assertion OK : Number of Cells in Range: 52
++ ITEM Assertion OK : Number of Cells in Range: 52
++END 'Selections' Symbol
++ TEST OK : Selections
++----------------------------------------------------------------
++Offset-Resize
++ TEST START : Offset-Resize
++ ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
++ ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
++ ITEM Assertion OK : Resized Range is : $A$20:$D$23
++END 'Offset-Resize' Symbol
++ TEST OK : Offset-Resize
++----------------------------------------------------------------
++Ranges-Address
++ TEST START : Ranges-Address
++ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
++ ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
++ ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
++ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++ ITEM Assertion FAIL : Range Address is: R8C5:R13C7,R13C7:R19C11
++ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
++ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
++END 'Ranges-Address' Symbol
++ TEST OK : Ranges-Address
++----------------------------------------------------------------
++Range-Address
++ TEST START : Range-Address
++ ITEM Assertion OK : Range Address is: $E$8:$G$13
++ ITEM Assertion OK : Range Address is: $E8:$G13
++ ITEM Assertion OK : Range Address is: E$8:G$13
++ ITEM Assertion OK : Range Address is: R8C5:R13C7
++ ITEM Assertion FAIL : Range Address is: R8C5:R13C7
++ ITEM Assertion OK : Range Address is: R8C5:R13C7
++ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
++END 'Range-Address' Symbol
++ TEST OK : Range-Address
++----------------------------------------------------------------
++Column-Address
++ TEST START : Column-Address
++ ITEM Assertion OK : Range Address is: $F$8:$F$13
++ ITEM Assertion OK : Range Address is: $F8:$F13
++ ITEM Assertion OK : Range Address is: F$8:F$13
++ ITEM Assertion OK : Range Address is: R8C6:R13C6
++ ITEM Assertion FAIL : Range Address is: R8C6:R13C6
++ ITEM Assertion OK : Range Address is: R8C6:R13C6
++ ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
++END 'Column-Address' Symbol
++ TEST OK : Column-Address
++----------------------------------------------------------------
++Row-Address
++ TEST START : Row-Address
++ ITEM Assertion OK : Range Address is: $E$9:$G$9
++ ITEM Assertion OK : Range Address is: $E9:$G9
++ ITEM Assertion OK : Range Address is: E$9:G$9
++ ITEM Assertion OK : Range Address is: R9C5:R9C7
++ ITEM Assertion FAIL : Range Address is: R9C5:R9C7
++ ITEM Assertion OK : Range Address is: R9C5:R9C7
++ ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
++END 'Row-Address' Symbol
++ TEST OK : Row-Address
++----------------------------------------------------------------
++SingleCell-Address
++ TEST START : SingleCell-Address
++ ITEM Assertion OK : Range Address is: $F$9
++ ITEM Assertion OK : Range Address is: $F9
++ ITEM Assertion OK : Range Address is: F$9
++ ITEM Assertion OK : Range Address is: R9C6
++ ITEM Assertion FAIL : Range Address is: R9C6
++ ITEM Assertion OK : Range Address is: R9C6
++ ITEM Assertion OK : Range Address is: R[7]C[4]
++ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
++END 'SingleCell-Address' Symbol
++ TEST OK : SingleCell-Address
++----------------------------------------------------------------
++Heights and Widths
++ TEST START : Heights and Widths
++ ITEM Assertion OK : Range RowHeight is 40
++ ITEM Assertion OK : Range ColumnWidth is 50
++ ITEM Assertion OK : Range Height is 240
++ ITEM Assertion FAIL : Range Width is 675
++ ITEM Assertion OK : Range RowHeight is 50
++ ITEM Assertion OK : Range ColumnWidth is 50
++ ITEM Assertion OK : Range Height is 300
++ ITEM Assertion FAIL : Range Width is 675
++ ITEM Assertion FAIL : RowHeight is null: False
++ ITEM Assertion OK : ColumnWidth is null: True
++END 'Heights and Widths' Symbol
++ TEST OK : Heights and Widths
++----------------------------------------------------------------
++RangeRowColumn-Issue
++ TEST START : RangeRowColumn-Issue
++ ITEM Assertion OK : Row is: 8
++ ITEM Assertion OK : Column is: 5
++ ITEM Assertion OK : EntireRow.Columns.Count = 256
++ ITEM Assertion OK : EntireColumn.Rows.Count = 131072
++END 'RangeRowColumn-Issue' Symbol
++ TEST OK : RangeRowColumn-Issue
++----------------------------------------------------------------
++Replace-Issue
++ TEST START : Replace-Issue
++ ITEM Assertion OK : Value after Replace: YourValue
++ ITEM Assertion OK : Value after Replace: YourValue
++ ITEM Assertion OK : Value after Replace: ReplaceValue
++ ITEM Assertion OK : Value after Replace: New ReplaceValue
++ ITEM Assertion OK : Value after Replace: New ReplaceValue
++ ITEM Assertion OK : Value after Replace: New Replace
++ ITEM Assertion OK : Value after Replace:
++END 'Replace-Issue' Symbol
++ TEST OK : Replace-Issue
++----------------------------------------------------------------
++Hidden-Issue
++ TEST START : Hidden-Issue
++ ITEM Assertion OK : - Range.Rows.Hidden (set)
++ ITEM Assertion OK : - Range.Rows.Hidden (get)
++ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (set)
++ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (get)
++ ITEM Assertion OK : - Range.Columns.Hidden (set)
++ ITEM Assertion OK : - Range.Columns.Hidden (get)
++ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (set)
++ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (get)
++END 'Hidden-Issue' Symbol
++ TEST OK : Hidden-Issue
++----------------------------------------------------------------
++End issue
++ TEST START : End issue
++ ITEM Assertion OK : - = $E$48
++ ITEM Assertion OK : - = $E$1
++ ITEM Assertion OK : - = $E$3
++ ITEM Assertion OK : - = $A$8
++ ITEM Assertion OK : - = $B$8
++ ITEM Assertion OK : - = $IV$8
++ ITEM Assertion OK : - = $Z$8
++END 'End issue' Symbol
++ TEST OK : End issue
++----------------------------------------------------------------
++Outline issue
++ TEST START : Outline issue
++ ITEM Assertion OK : - Range.clearOutline - please check visually
++ ITEM Assertion OK : - Range.AutoOutline - please check visually
++ ITEM Assertion OK : - Range.AutoOutline - please check visually
++END 'Outline issue' Symbol
++ TEST OK : Outline issue
++----------------------------------------------------------------
++Validation
++ TEST START : Validation
++ ITEM Assertion OK : Validation Input Message is : Attention!
++ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
++ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
++ ITEM Assertion OK : Validation Error Message is : An Error occured
++ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
++END 'Validation' Symbol
++ TEST OK : Validation
++Test run finished : 10/07/2007 01:56:04
Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/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 28 Jan 2008 17:30:49 -0000 1.1.2.1
++++ sc/source/ui/vba/testvba/TestDocuments/logs/win/Shapes.log 29 Jul 2008 07:22:59 -0000 1.1.2.2
@@ -0,0 +1,77 @@
-+Test run started : 16/10/2007 17:46:03
-+BEGIN Shapes_Collection_Behaviour
-+ TEST START : Shapes_Collection_Behaviour
-+ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1'
-+ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2'
-+ TEST Success. : Shapes_Collection_Behaviour
-+END Shapes_Collection_Behaviour
-+BEGIN Shapes_Select_Item
-+ TEST START : Shapes_Select_Item
-+ ITEM Assertion OK : Correctly selected shape through Range
-+ ITEM Assertion OK : Correctly selected shape through Item
-+ ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
-+ ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
-+ TEST Success. : Shapes_Select_Item
-+END Shapes_Select_Item
-+BEGIN Shapes_Fill
-+ TEST START : Shapes_Fill
-+ ITEM Assertion OK : correctly set visibility of shape fill
-+ ITEM Assertion OK : correctly set transparency of shape line
-+ ITEM Assertion OK : correctly set forecolor of shape fill
-+ ITEM Assertion FAIL : correctly set backcolor of shape fill
-+ ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
-+ ITEM Assertion OK : correctly set forecolor of shape fill
-+ ITEM Assertion FAIL : correctly set forecolor of shape fill
-+ TEST Success. : Shapes_Fill
-+END Shapes_Fill
-+BEGIN Shapes_Line
-+ TEST START : Shapes_Line
-+ ITEM Assertion FAIL : correctly set weight of shape line
-+ ITEM Assertion OK : correctly set visibility of shape line
-+ ITEM Assertion OK : correctly set transparency of shape line
-+ ITEM Assertion OK : correctly set dash style of shape line
-+ ITEM Assertion OK : correctly set dash style of shape line
-+ ITEM Assertion OK : correctly set forecolor of shape line
-+ ITEM Assertion FAIL : correctly set backcolor of shape line
-+ TEST Success. : Shapes_Line
-+END Shapes_Line
-+BEGIN Shapes_TextFrame
-+ TEST START : Shapes_TextFrame
-+ ITEM Assertion OK : correctly set Autosize of Shape TextFrame
-+ TEST Success. : Shapes_TextFrame
-+END Shapes_TextFrame
-+BEGIN Shapes_SimpleGeometry
-+ TEST START : Shapes_SimpleGeometery
-+ ITEM Assertion OK : shape height should be 49.4519655148368 and got 49.4078709034412
-+ ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
-+ ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
-+ ITEM Assertion OK : shape top should be 44.1511784471699 and got 44.1354302906816
-+ ITEM Assertion OK : shape rotation should be 0 and got 0
-+ ITEM Assertion OK : shape rotation should be 25 and got 25
-+ ITEM Assertion OK : shape incrementrotation should be 50 and got 50
-+ ITEM Assertion OK : shape incrementleft should be 69.7480272284707 and got 69.7322790719824
-+ ITEM Assertion OK : shape incrementtop should be 93.8141674447769 and got 93.7984192882885
-+ TEST Success. : Shapes_SimpleGeometery
-+END Shapes_SimpleGeometry
-+BEGIN Shapes_Range
-+ TEST START : Shapes_Range
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
-+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
-+ TEST Success. : Shapes_Range
-+END Shapes_Range
-+BEGIN Shapes_ShapeRange
-+ TEST START : Shapes_ShapeRange
-+ ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 89.7322790719824 and got 89.7165297816359
-+ ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
-+ ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 113.798419288289 and got 113.782669997942
-+ ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 67.4519655148368 and got 67.4362162244903
-+ ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
-+ ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
-+END Shapes_ShapeRange
-+Test run finished : 16/10/2007 17:46:04
++Test run started : 16/10/2007 17:46:03
++BEGIN Shapes_Collection_Behaviour
++ TEST START : Shapes_Collection_Behaviour
++ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1'
++ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2'
++ TEST Success. : Shapes_Collection_Behaviour
++END Shapes_Collection_Behaviour
++BEGIN Shapes_Select_Item
++ TEST START : Shapes_Select_Item
++ ITEM Assertion OK : Correctly selected shape through Range
++ ITEM Assertion OK : Correctly selected shape through Item
++ ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
++ ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
++ TEST Success. : Shapes_Select_Item
++END Shapes_Select_Item
++BEGIN Shapes_Fill
++ TEST START : Shapes_Fill
++ ITEM Assertion OK : correctly set visibility of shape fill
++ ITEM Assertion OK : correctly set transparency of shape line
++ ITEM Assertion OK : correctly set forecolor of shape fill
++ ITEM Assertion FAIL : correctly set backcolor of shape fill
++ ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
++ ITEM Assertion OK : correctly set forecolor of shape fill
++ ITEM Assertion FAIL : correctly set forecolor of shape fill
++ TEST Success. : Shapes_Fill
++END Shapes_Fill
++BEGIN Shapes_Line
++ TEST START : Shapes_Line
++ ITEM Assertion FAIL : correctly set weight of shape line
++ ITEM Assertion OK : correctly set visibility of shape line
++ ITEM Assertion OK : correctly set transparency of shape line
++ ITEM Assertion OK : correctly set dash style of shape line
++ ITEM Assertion OK : correctly set dash style of shape line
++ ITEM Assertion OK : correctly set forecolor of shape line
++ ITEM Assertion FAIL : correctly set backcolor of shape line
++ TEST Success. : Shapes_Line
++END Shapes_Line
++BEGIN Shapes_TextFrame
++ TEST START : Shapes_TextFrame
++ ITEM Assertion OK : correctly set Autosize of Shape TextFrame
++ TEST Success. : Shapes_TextFrame
++END Shapes_TextFrame
++BEGIN Shapes_SimpleGeometry
++ TEST START : Shapes_SimpleGeometery
++ ITEM Assertion OK : shape height should be 49.4519655148368 and got 49.4078709034412
++ ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
++ ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
++ ITEM Assertion OK : shape top should be 44.1511784471699 and got 44.1354302906816
++ ITEM Assertion OK : shape rotation should be 0 and got 0
++ ITEM Assertion OK : shape rotation should be 25 and got 25
++ ITEM Assertion OK : shape incrementrotation should be 50 and got 50
++ ITEM Assertion OK : shape incrementleft should be 69.7480272284707 and got 69.7322790719824
++ ITEM Assertion OK : shape incrementtop should be 93.8141674447769 and got 93.7984192882885
++ TEST Success. : Shapes_SimpleGeometery
++END Shapes_SimpleGeometry
++BEGIN Shapes_Range
++ TEST START : Shapes_Range
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
++ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
++ TEST Success. : Shapes_Range
++END Shapes_Range
++BEGIN Shapes_ShapeRange
++ TEST START : Shapes_ShapeRange
++ ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 89.7322790719824 and got 89.7165297816359
++ ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
++ ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 113.798419288289 and got 113.782669997942
++ ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 67.4519655148368 and got 67.4362162244903
++ ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
++ ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
++END Shapes_ShapeRange
++Test run finished : 16/10/2007 17:46:04
Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log
===================================================================
-RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log
-diff -N 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
++----------------------------------------------------------------
++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/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
+@@ -0,0 +1,60 @@
++Test run started : 10/07/2007 01:56:07
++BEGIN TestCalc
++ TEST START : RangeTest2
++ ITEM Assertion OK : - Range("D15").Row
++ ITEM Assertion OK : - WorkSheet("D15").Range.Row
++ ITEM Assertion OK : - Range("D15").Column
++ ITEM Assertion OK : - Worksheet.Range("D15").Column
++ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
++ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
++ ITEM Assertion OK : - Range("D1").EntireRow.Columns.Count
++ ITEM Assertion OK : - Range("D1").EntireColumn.Rows.Count
++ ITEM Assertion OK : - Range("D15").ClearContent
++ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (set)
++ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (get)
++ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (set)
++ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (get)
++ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (set)
++ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (get)
++ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (set)
++ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (get)
++ ITEM Assertion OK : - Range("B38").Orientation (get)
++ ITEM Assertion OK : - Range("B38").Orientation (set)
++ ITEM Assertion OK : - Range("B38").Orientation (set = xlDownward)
++ ITEM Assertion OK : - Range("B38").Orientation (set)
++ ITEM Assertion OK : - Range("B38").Orientation (set = xlUpward)
++ ITEM Assertion OK : - Range("B38").Orientation (set)
++ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
++ ITEM Assertion OK : - Range("B38").Orientation (set)
++ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
++ ITEM Assertion OK : - Range("B39").WrapText (get)
++ ITEM Assertion OK : - Range("B39").WrapText (set)
++ ITEM Assertion OK : - Range("B39").WrapText (set)
++ ITEM Assertion OK : - Range("E39").MergeCells (get)
++ ITEM Assertion OK : - Range("F39").MergeCells (get)
++ ITEM Assertion OK : - Range("E39").MergeCells (set)
++ ITEM Assertion FAIL : - Range("F39").MergeCells (set)
++ ITEM Assertion OK : - Range("E39").MergeCells (set)
++ ITEM Assertion OK : - Range("F39").MergeCells (set)
++ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
++ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
++ ITEM Assertion OK : - Range("D41:D42").Replace MatchCase:=False
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
++ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
++ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
++ ITEM FAIL (RangeTest2)
++ TEST Not succesfully completed : RangeTest2
++END TestCalc
++Test run finished : 10/07/2007 01:56:12
+Index: sc/source/ui/vba/testvba/TestDocuments/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
++END TestCalc
++Test run finished : 10/07/2007 01:56:23
+Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/pagesetup.log
+===================================================================
+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
+===================================================================
+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
+cvs diff: Diffing sc/source/ui/view
+cvs diff: Diffing sc/uiconfig
+cvs diff: Diffing sc/uiconfig/scalc
+cvs diff: Diffing sc/uiconfig/scalc/accelerator
+cvs diff: Diffing sc/uiconfig/scalc/accelerator/de
+cvs diff: Diffing sc/uiconfig/scalc/accelerator/en-GB
+cvs diff: Diffing sc/uiconfig/scalc/accelerator/en-US
+cvs diff: Diffing sc/uiconfig/scalc/accelerator/es
+cvs diff: Diffing sc/uiconfig/scalc/accelerator/fr
+cvs diff: Diffing sc/uiconfig/scalc/menubar
+cvs diff: Diffing sc/uiconfig/scalc/statusbar
+cvs diff: Diffing sc/uiconfig/scalc/toolbar
+cvs diff: Diffing sc/util
+cvs diff: Diffing sc/util/defs
+cvs diff: Diffing sc/workben
+cvs diff: Diffing sc/workben/celltrans
+cvs diff: Diffing sc/xml
+cvs diff: Diffing oovbaapi
+cvs diff: Diffing oovbaapi/genconstidl
+cvs diff: Diffing oovbaapi/org
+cvs diff: Diffing oovbaapi/org/openoffice
+cvs diff: Diffing oovbaapi/org/openoffice/constants
+cvs diff: Diffing oovbaapi/org/openoffice/excel
+Index: oovbaapi/org/openoffice/excel/Hyperlink.idl
+===================================================================
+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
++ *
++ ************************************************************************/
++
++#ifndef __org_openoffice_excel_Hyperlink_idl__
++#define __org_openoffice_excel_Hyperlink_idl__
++
++#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>
++
++module org { module openoffice { module excel {
++service Hyperlink : XHyperlink
++{
++ createHyperlink( [in] ::org::openoffice::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
++};
++
++}; }; };
++
++#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
++ *
++ ************************************************************************/
++
++#ifndef __org_openoffice_excel_Window_idl__
++#define __org_openoffice_excel_Window_idl__
++
++#ifndef __org_openoffice_excel_XWindow_idl__
++#include <org/openoffice/excel/XWindow.idl>
++#endif
++
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/frame/XModel.idl>
++
++module org { module openoffice { module excel {
++service Window : XWindow
++{
++ createWindow( [in] ::org::openoffice::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
++};
++
++}; }; };
++
++#endif
+Index: oovbaapi/org/openoffice/excel/XApplication.idl
+===================================================================
+RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XApplication.idl,v
+retrieving revision 1.4
+retrieving revision 1.3.4.3
+diff -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
+
++#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
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestAddress.log 28 Jan 2008 17:30:49 -0000 1.1.2.1
-@@ -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
-+============
++++ 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__
+
-+Tests passed: 49
-+Tests failed: 0
++#ifndef __org_openoffice_excel_XPageBreak_idl__
++#include <org/openoffice/excel/XPageBreak.idl>
++#endif
+
-+END 'TestAddress
-+ TEST OK : TestAddress
-+Test run finished : 17/07/2007 15:26:56
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log
++
++//=============================================================================
++
++module org { module openoffice { module excel {
++
++//=============================================================================
++
++interface XHPageBreak
++{
++ interface ::org::openoffice::excel::XPageBreak;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/org/openoffice/excel/XHPageBreaks.idl
===================================================================
-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
+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
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest.log 28 Jan 2008 17:30:49 -0000 1.1.2.1
-@@ -0,0 +1,60 @@
-+Test run started : 10/07/2007 01:56:07
-+BEGIN TestCalc
-+ TEST START : RangeTest2
-+ ITEM Assertion OK : - Range("D15").Row
-+ ITEM Assertion OK : - WorkSheet("D15").Range.Row
-+ ITEM Assertion OK : - Range("D15").Column
-+ ITEM Assertion OK : - Worksheet.Range("D15").Column
-+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
-+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
-+ ITEM Assertion OK : - Range("D1").EntireRow.Columns.Count
-+ ITEM Assertion OK : - Range("D1").EntireColumn.Rows.Count
-+ ITEM Assertion OK : - Range("D15").ClearContent
-+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (set)
-+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (get)
-+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (set)
-+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (get)
-+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (set)
-+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (get)
-+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (set)
-+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (get)
-+ ITEM Assertion OK : - Range("B38").Orientation (get)
-+ ITEM Assertion OK : - Range("B38").Orientation (set)
-+ ITEM Assertion OK : - Range("B38").Orientation (set = xlDownward)
-+ ITEM Assertion OK : - Range("B38").Orientation (set)
-+ ITEM Assertion OK : - Range("B38").Orientation (set = xlUpward)
-+ ITEM Assertion OK : - Range("B38").Orientation (set)
-+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
-+ ITEM Assertion OK : - Range("B38").Orientation (set)
-+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
-+ ITEM Assertion OK : - Range("B39").WrapText (get)
-+ ITEM Assertion OK : - Range("B39").WrapText (set)
-+ ITEM Assertion OK : - Range("B39").WrapText (set)
-+ ITEM Assertion OK : - Range("E39").MergeCells (get)
-+ ITEM Assertion OK : - Range("F39").MergeCells (get)
-+ ITEM Assertion OK : - Range("E39").MergeCells (set)
-+ ITEM Assertion FAIL : - Range("F39").MergeCells (set)
-+ ITEM Assertion OK : - Range("E39").MergeCells (set)
-+ ITEM Assertion OK : - Range("F39").MergeCells (set)
-+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
-+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
-+ ITEM Assertion OK : - Range("D41:D42").Replace MatchCase:=False
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
-+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
-+ ITEM FAIL (RangeTest2)
-+ TEST Not succesfully completed : RangeTest2
-+END TestCalc
-+Test run finished : 10/07/2007 01:56:12
-Index: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log
++++ 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
++
++#ifndef __org_openoffice_vba_XHelperInterface_idl__
++#include <org/openoffice/vba/XHelperInterface.idl>
++#endif
++
++#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
++
++//=============================================================================
++
++module org { module openoffice { module excel {
++
++//=============================================================================
++
++interface XHPageBreak;
++
++interface XHPageBreaks
++{
++
++ interface org::openoffice::vba::XCollection;
++ //Methods
++ any Add([in] any Before) raises(com::sun::star::script::BasicErrorException);
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/org/openoffice/excel/XHyperlink.idl
+===================================================================
+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
++
++#ifndef __org_openoffice_vba_XHelperInterface_idl__
++#include <org/openoffice/vba/XHelperInterface.idl>
++#endif
++
++//=============================================================================
++
++module org { module openoffice { module excel {
++
++//=============================================================================
++interface XRange;
++interface XHyperlink
++{
++ interface ::org::openoffice::vba::XHelperInterface;
++
++ [attribute] string Address;
++ [attribute] string Name;
++ [attribute] string TextToDisplay;
++
++ 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 -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: sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log
-diff -N sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log
+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
-+++ sc/source/ui/vba/testvba/TestDocuments/logs/win/TestCalc_Rangetest2.log 28 Jan 2008 17:30:49 -0000 1.1.2.1
-@@ -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: oovbaapi/org/openoffice/excel/XApplication.idl
++++ 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__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++
++#ifndef __org_openoffice_vba_XHelperInterface_idl__
++#include <org/openoffice/vba/XHelperInterface.idl>
++#endif
++
++#ifndef __com_sun_star_helper_script_BasicErrorException_idl__
++#include <com/sun/star/script/BasicErrorException.idl>
++#endif
++
++//=============================================================================
++
++module org { module openoffice { module excel {
++
++//=============================================================================
++
++interface XRange;
++
++interface XPageBreak
++{
++
++ 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);
++
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+Index: oovbaapi/org/openoffice/excel/XPageSetup.idl
===================================================================
-RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XApplication.idl,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.4.1
---- oovbaapi/org/openoffice/excel/XApplication.idl 7 Dec 2007 11:21:12 -0000 1.3
-+++ oovbaapi/org/openoffice/excel/XApplication.idl 18 Jan 2008 16:51:20 -0000 1.3.4.1
-@@ -43,6 +43,10 @@
- #include <org/openoffice/vba/XHelperInterface.idl>
- #endif
-
-+#ifndef __org_openoffice_vba_XAssistant_idl__
-+#include <org/openoffice/vba/XAssistant.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__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
+#endif
+
- module org { module openoffice { module excel {
++#ifndef __org_openoffice_vba_XHelperInterface_idl__
++#include <org/openoffice/vba/XHelperInterface.idl>
++#endif
++
++//=============================================================================
++
++module org { module openoffice { module excel {
++
++//=============================================================================
++
++
++interface XPageSetup
++{
++
++ 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;
++
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+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 -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;
+
+ 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 );
+
+ };
- interface XRange;
-@@ -63,6 +67,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
-@@ -93,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 );
Index: oovbaapi/org/openoffice/excel/XWindow.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XWindow.idl,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.4.1
---- oovbaapi/org/openoffice/excel/XWindow.idl 7 Dec 2007 11:29:02 -0000 1.3
-+++ oovbaapi/org/openoffice/excel/XWindow.idl 18 Jan 2008 16:51:20 -0000 1.3.4.1
-@@ -49,6 +49,8 @@ module org { module openoffice { modul
+retrieving revision 1.4
+retrieving revision 1.3.4.2
+diff -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
//=============================================================================
interface XRange;
@@ -6919,7 +13864,7 @@
interface XWindow
{
interface ::org::openoffice::vba::XHelperInterface;
-@@ -61,6 +63,8 @@ interface XWindow
+@@ -56,6 +58,8 @@ interface XWindow
[attribute] boolean DisplayVerticalScrollBar;
[attribute] boolean DisplayWorkbookTabs;
[attribute] boolean FreezePanes;
@@ -6928,7 +13873,7 @@
[attribute] boolean Split;
[attribute] long SplitColumn;
[attribute] double SplitHorizontal;
-@@ -68,6 +72,10 @@ interface XWindow
+@@ -63,6 +67,10 @@ interface XWindow
[attribute] double SplitVertical;
[attribute] any ScrollColumn;
[attribute] any ScrollRow;
@@ -6939,7 +13884,7 @@
[attribute] any WindowState;
[attribute] any Zoom;
any SelectedSheets( [in] any aIndex );
-@@ -78,7 +86,21 @@ interface XWindow
+@@ -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);
@@ -6964,12 +13909,12 @@
Index: oovbaapi/org/openoffice/excel/XWorkbook.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XWorkbook.idl,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.4.1
---- oovbaapi/org/openoffice/excel/XWorkbook.idl 7 Dec 2007 11:29:28 -0000 1.3
-+++ oovbaapi/org/openoffice/excel/XWorkbook.idl 18 Jan 2008 16:51:20 -0000 1.3.4.1
-@@ -76,7 +76,7 @@ interface XWorkbook
+retrieving revision 1.4
+retrieving revision 1.3.4.2
+diff -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);
@@ -6981,12 +13926,38 @@
Index: oovbaapi/org/openoffice/excel/XWorksheet.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/excel/XWorksheet.idl,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.4.1
---- oovbaapi/org/openoffice/excel/XWorksheet.idl 7 Dec 2007 11:29:52 -0000 1.3
-+++ oovbaapi/org/openoffice/excel/XWorksheet.idl 18 Jan 2008 16:51:20 -0000 1.3.4.1
-@@ -103,6 +103,7 @@ interface XWorksheet
+retrieving revision 1.4
+retrieving revision 1.3.4.3
+diff -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
+ {
+ 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
void setEnableCalculation([in] boolean EnableCalculation) raises(com::sun::star::script::BasicErrorException);
boolean getEnableCalculation() raises(com::sun::star::script::BasicErrorException);
@@ -6994,15 +13965,38 @@
};
+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 -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 \
+
+
+ # ------------------------------------------------------------------
+cvs diff: Diffing oovbaapi/org/openoffice/msforms
Index: oovbaapi/org/openoffice/msforms/XComboBox.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XComboBox.idl,v
-retrieving revision 1.2
-retrieving revision 1.2.8.1
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.8.1
---- oovbaapi/org/openoffice/msforms/XComboBox.idl 27 Apr 2007 07:35:26 -0000 1.2
-+++ oovbaapi/org/openoffice/msforms/XComboBox.idl 22 Apr 2008 19:50:59 -0000 1.2.8.1
-@@ -49,6 +49,7 @@ module org { module openoffice { modul
+retrieving revision 1.3
+retrieving revision 1.2.8.2
+diff -u -p -b -w -B -r1.3 -r1.2.8.2
+--- oovbaapi/org/openoffice/msforms/XComboBox.idl 11 Apr 2008 10:00:49 -0000 1.3
++++ oovbaapi/org/openoffice/msforms/XComboBox.idl 6 Jul 2008 15:37:49 -0000 1.2.8.2
+@@ -44,6 +44,7 @@ module org { module openoffice { modul
interface XComboBox: ::com::sun::star::uno::XInterface
{
[attribute] any Value;
@@ -7013,12 +14007,12 @@
Index: oovbaapi/org/openoffice/msforms/XControl.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XControl.idl,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.4.1
---- oovbaapi/org/openoffice/msforms/XControl.idl 7 Dec 2007 12:14:42 -0000 1.2
-+++ oovbaapi/org/openoffice/msforms/XControl.idl 22 Apr 2008 19:50:59 -0000 1.2.4.1
-@@ -42,12 +42,17 @@
+retrieving revision 1.3
+retrieving revision 1.2.4.2
+diff -u -p -b -w -B -r1.3 -r1.2.4.2
+--- oovbaapi/org/openoffice/msforms/XControl.idl 11 Apr 2008 10:01:02 -0000 1.3
++++ oovbaapi/org/openoffice/msforms/XControl.idl 6 Jul 2008 15:37:58 -0000 1.2.4.2
+@@ -37,12 +37,17 @@
//=============================================================================
@@ -7104,12 +14098,12 @@
Index: oovbaapi/org/openoffice/msforms/XLabel.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XLabel.idl,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.4.1
---- oovbaapi/org/openoffice/msforms/XLabel.idl 7 Dec 2007 12:15:04 -0000 1.2
-+++ oovbaapi/org/openoffice/msforms/XLabel.idl 22 Apr 2008 19:50:59 -0000 1.2.4.1
-@@ -46,6 +46,7 @@ module org { module openoffice { modul
+retrieving revision 1.3
+retrieving revision 1.2.4.2
+diff -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;
@@ -7120,19 +14114,22 @@
Index: oovbaapi/org/openoffice/msforms/XListBox.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XListBox.idl,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.4.1
---- oovbaapi/org/openoffice/msforms/XListBox.idl 7 Dec 2007 12:15:24 -0000 1.2
-+++ oovbaapi/org/openoffice/msforms/XListBox.idl 22 Apr 2008 19:50:59 -0000 1.2.4.1
-@@ -49,6 +49,7 @@ interface XListBox: com::sun::star::uno:
+retrieving revision 1.3
+retrieving revision 1.2.4.3
+diff -u -p -b -w -B -r1.3 -r1.2.4.3
+--- oovbaapi/org/openoffice/msforms/XListBox.idl 11 Apr 2008 10:02:04 -0000 1.3
++++ oovbaapi/org/openoffice/msforms/XListBox.idl 29 Jul 2008 06:27:52 -0000 1.2.4.3
+@@ -44,8 +44,10 @@ interface XListBox: com::sun::star::uno:
[attribute] any Value;
[attribute] string Text;
[attribute] boolean MultiSelect;
+ [attribute] any ListIndex;
//[attribute] sequence< boolean > Selected;
void AddItem( [in] any pvargItem, [in] any pvargIndex );
++ void removeItem( [in] any index );
void Clear();
+ any Selected( [in] long index );
+ };
Index: oovbaapi/org/openoffice/msforms/XMultiPage.idl
===================================================================
RCS file: oovbaapi/org/openoffice/msforms/XMultiPage.idl
@@ -7333,12 +14330,12 @@
Index: oovbaapi/org/openoffice/msforms/XRadioButton.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XRadioButton.idl,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.4.1
---- oovbaapi/org/openoffice/msforms/XRadioButton.idl 7 Dec 2007 12:15:44 -0000 1.2
-+++ oovbaapi/org/openoffice/msforms/XRadioButton.idl 22 Apr 2008 19:51:00 -0000 1.2.4.1
-@@ -46,7 +46,7 @@ module org { module openoffice { modul
+retrieving revision 1.3
+retrieving revision 1.2.4.2
+diff -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;
@@ -7349,11 +14346,79 @@
//=============================================================================
Index: oovbaapi/org/openoffice/msforms/XScrollBar.idl
===================================================================
-RCS file: oovbaapi/org/openoffice/msforms/XScrollBar.idl
-diff -N 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__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
++
++module org { module openoffice { module msforms {
++
++//=============================================================================
++interface XScrollBar: com::sun::star::uno::XInterface
++{
++ [attribute] long Max;
++ [attribute] long Min;
++ [attribute] any Value;
++ [attribute] long LargeChange;
++ [attribute] long SmallChange;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+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/XScrollBar.idl 22 Apr 2008 19:51:00 -0000 1.1.2.1
-@@ -0,0 +1,61 @@
++++ 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
@@ -7388,8 +14453,8 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#ifndef __org_openoffice_msforms_XRadioButton_idl__
-+#define __org_openoffice_msforms_XRadioButton_idl__
++#ifndef __org_openoffice_msforms_XSpinButton_idl__
++#define __org_openoffice_msforms_XSpinButton_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
@@ -7399,13 +14464,11 @@
+module org { module openoffice { module msforms {
+
+//=============================================================================
-+interface XScrollBar: com::sun::star::uno::XInterface
++interface XSpinButton: com::sun::star::uno::XInterface
+{
+ [attribute] long Max;
+ [attribute] long Min;
+ [attribute] any Value;
-+ [attribute] long LargeChange;
-+ [attribute] long SmallChange;
+};
+
+//=============================================================================
@@ -7418,12 +14481,12 @@
Index: oovbaapi/org/openoffice/msforms/XTextBox.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/XTextBox.idl,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -p -u -p -b -w -B -r1.2 -r1.2.4.1
---- oovbaapi/org/openoffice/msforms/XTextBox.idl 7 Dec 2007 12:16:25 -0000 1.2
-+++ oovbaapi/org/openoffice/msforms/XTextBox.idl 22 Apr 2008 19:51:00 -0000 1.2.4.1
-@@ -46,7 +46,7 @@ module org { module openoffice { modul
+retrieving revision 1.3
+retrieving revision 1.2.4.2
+diff -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;
@@ -7634,12 +14697,12 @@
Index: oovbaapi/org/openoffice/msforms/makefile.mk
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/msforms/makefile.mk,v
-retrieving revision 1.3
-retrieving revision 1.3.4.2
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.4.2
---- oovbaapi/org/openoffice/msforms/makefile.mk 7 Dec 2007 12:16:38 -0000 1.3
-+++ oovbaapi/org/openoffice/msforms/makefile.mk 22 Apr 2008 19:51:00 -0000 1.3.4.2
-@@ -64,7 +64,14 @@ IDLFILES=\
+retrieving revision 1.4
+retrieving revision 1.3.4.4
+diff -u -p -b -w -B -r1.4 -r1.3.4.4
+--- oovbaapi/org/openoffice/msforms/makefile.mk 11 Apr 2008 10:03:53 -0000 1.4
++++ oovbaapi/org/openoffice/msforms/makefile.mk 29 Jul 2008 06:27:52 -0000 1.3.4.4
+@@ -60,7 +60,15 @@ IDLFILES=\
XFillFormat.idl \
XPictureFormat.idl \
XShapeRange.idl \
@@ -7652,9 +14715,11 @@
+ XProgressBar.idl \
+ XMultiPage.idl \
+ XPages.idl \
++ XSpinButton.idl \
# ------------------------------------------------------------------
+cvs diff: Diffing oovbaapi/org/openoffice/vba
Index: oovbaapi/org/openoffice/vba/XAssistant.idl
===================================================================
RCS file: oovbaapi/org/openoffice/vba/XAssistant.idl
@@ -7727,15 +14792,293 @@
+}; }; };
+
+#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__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++
++#ifndef __org_openoffice_vba_XHelperInterface_idl__
++#include <org/openoffice/vba/XHelperInterface.idl>
++#endif
++//=============================================================================
++
++module org { module openoffice { 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/org/openoffice/vba/XCommandBarControl.idl
+===================================================================
+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 @@
++/*************************************************************************
++ *
++ * 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_XCommandBarControl_idl__
++#define __org_openoffice_vba_XCommandBarControl_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++
++#ifndef __org_openoffice_vba_XHelperInterface_idl__
++#include <org/openoffice/vba/XHelperInterface.idl>
++#endif
++//=============================================================================
++
++module org { module openoffice { 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/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__
++
++#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 XCommandBarControl;
++
++interface XCommandBarControls
++{
++ interface XCollection;
++
++ XCommandBarControl Add( [in] any Type, [in] any Id, [in] any Parameter, [in] any Before, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
++};
++
++}; }; };
++
++#endif
+Index: oovbaapi/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
++{
++ interface XCollection;
++
++ XCommandBar Add( [in] any Name, [in] any Position, [in] any MenuBar, [in] any Temporary ) raises ( com::sun::star::script::BasicErrorException );
++};
++
++}; }; };
++
++#endif
Index: oovbaapi/org/openoffice/vba/XGlobals.idl
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/vba/XGlobals.idl,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.4.1
---- oovbaapi/org/openoffice/vba/XGlobals.idl 7 Dec 2007 12:17:49 -0000 1.3
-+++ oovbaapi/org/openoffice/vba/XGlobals.idl 18 Jan 2008 16:51:21 -0000 1.3.4.1
-@@ -62,7 +62,7 @@ interface XGlobals: com::sun::star::uno:
+retrieving revision 1.4
+retrieving revision 1.3.4.2
+diff -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 );
@@ -7747,16 +15090,22 @@
Index: oovbaapi/org/openoffice/vba/makefile.mk
===================================================================
RCS file: /cvs/api/oovbaapi/org/openoffice/vba/makefile.mk,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -p -u -p -b -w -B -r1.3 -r1.3.4.1
---- oovbaapi/org/openoffice/vba/makefile.mk 7 Dec 2007 12:18:21 -0000 1.3
-+++ oovbaapi/org/openoffice/vba/makefile.mk 18 Jan 2008 16:51:21 -0000 1.3.4.1
-@@ -56,6 +56,7 @@ IDLFILES=\
+retrieving revision 1.4
+retrieving revision 1.3.4.3
+diff -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\
# ------------------------------------------------------------------
+cvs diff: Diffing oovbaapi/prj
+cvs diff: Diffing oovbaapi/util
Modified: trunk/patches/vba/vba-worksheet-enableselection.diff
==============================================================================
--- trunk/patches/vba/vba-worksheet-enableselection.diff (original)
+++ trunk/patches/vba/vba-worksheet-enableselection.diff Wed Jul 30 09:39:38 2008
@@ -1,16 +1,16 @@
---- oovbaapi/org/openoffice/excel/XWorksheet.idl.orig 2008-07-03 23:33:34.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XWorksheet.idl 2008-07-03 23:35:37.000000000 +0800
-@@ -69,6 +69,7 @@ interface XWorksheet
- [attribute, readonly] XWorksheet Next;
+--- 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
+@@ -70,6 +70,7 @@ interface XWorksheet
[attribute, readonly] XWorksheet Previous;
[attribute, readonly] string CodeName;
-+ [attribute] long EnableSelection;
+ [attribute, readonly] short Index;
++ [attribute] long EnableSelection;
void Activate();
void Calculate( );
---- sc/inc/document.hxx.orig 2008-07-04 12:43:09.000000000 +0800
-+++ sc/inc/document.hxx 2008-07-04 00:10:41.000000000 +0800
-@@ -537,7 +537,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollec
+--- sc/inc/document.hxx.orig 2008-07-29 18:14:33.000000000 +0800
++++ sc/inc/document.hxx 2008-07-29 18:16:04.000000000 +0800
+@@ -544,7 +544,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollec
BOOL IsDocProtected() const;
BOOL IsDocEditable() const;
BOOL IsTabProtected( SCTAB nTab ) const;
@@ -19,32 +19,19 @@
void SetTabProtection(SCTAB nTab, bool bProtect, const String& aPassText);
void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect);
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest);
---- sc/inc/tabprotection.hxx.orig 2008-07-04 00:11:11.000000000 +0800
-+++ sc/inc/tabprotection.hxx 2008-07-04 00:12:23.000000000 +0800
-@@ -155,8 +155,8 @@ public:
- ScPasswordHash eHash = PASSHASH_OOO);
- virtual bool verifyPassword(const String& aPassText) const;
-
-- bool isOptionEnabled(Option eOption) const;
-- void setOption(Option eOption, bool bEnabled);
-+ SC_DLLPUBLIC bool isOptionEnabled(Option eOption) const;
-+ SC_DLLPUBLIC void setOption(Option eOption, bool bEnabled);
-
- private:
- ::std::auto_ptr<ScTableProtectionImpl> mpImpl;
---- sc/source/ui/vba/vbaworksheet.hxx.orig 2008-07-03 23:36:21.000000000 +0800
-+++ sc/source/ui/vba/vbaworksheet.hxx 2008-07-03 23:37:29.000000000 +0800
-@@ -95,6 +95,8 @@ public:
- virtual css::uno::Reference< oo::excel::XHPageBreaks > SAL_CALL HPageBreaks( ) throw (css::uno::RuntimeException);
+--- 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 sal_Int32 SAL_CALL getEnableSelection() throw (css::uno::RuntimeException);
-+ virtual void SAL_CALL setEnableSelection( sal_Int32 nSelection ) 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);
// Methods
virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
---- sc/source/ui/vba/vbaworksheet.cxx.orig 2008-07-03 23:36:26.000000000 +0800
-+++ sc/source/ui/vba/vbaworksheet.cxx 2008-07-04 08:03:28.000000000 +0800
+--- sc/source/ui/vba/vbaworksheet.cxx.orig 2008-07-29 18:14:32.000000000 +0800
++++ sc/source/ui/vba/vbaworksheet.cxx 2008-07-29 18:22:43.000000000 +0800
@@ -58,6 +58,7 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
@@ -53,8 +40,8 @@
#include <comphelper/processfactory.hxx>
-@@ -251,6 +252,75 @@ ScVbaWorksheet::setVisible( sal_Bool bVi
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ), aValue);
+@@ -257,6 +258,83 @@ ScVbaWorksheet::getIndex() throw (uno::R
+ return getSheetID() + 1;
}
+sal_Int32
@@ -69,8 +56,13 @@
+ uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
+ ScDocument* pDoc = getDocShell( xModel )->GetDocument();
+ ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
-+ sal_Bool bLockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS);
-+ sal_Bool bUnlockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS);
++ sal_Bool bLockedCells = sal_False;
++ sal_Bool bUnlockedCells = sal_False;
++ if( pProtect )
++ {
++ bLockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS);
++ bUnlockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS);
++ }
+ if( bLockedCells )
+ return excel::XlEnableSelection::xlNoRestrictions;
+ if( bUnlockedCells )
@@ -116,8 +108,11 @@
+ {
+ bUnlockedCells = sal_True;
+ }
-+ pProtect->setOption( ScTableProtection::SELECT_LOCKED_CELLS, bLockedCells );
-+ pProtect->setOption( ScTableProtection::SELECT_UNLOCKED_CELLS, bUnlockedCells );
++ if( pProtect )
++ {
++ pProtect->setOption( ScTableProtection::SELECT_LOCKED_CELLS, bLockedCells );
++ pProtect->setOption( ScTableProtection::SELECT_UNLOCKED_CELLS, bUnlockedCells );
++ }
+ }
+ else
+ throw uno::RuntimeException(::rtl::OUString(
@@ -129,3 +124,16 @@
uno::Reference< excel::XRange >
ScVbaWorksheet::getUsedRange() throw (uno::RuntimeException)
{
+--- sc/inc/tabprotection.hxx.orig 2008-07-29 18:14:17.000000000 +0800
++++ sc/inc/tabprotection.hxx 2008-07-29 18:16:04.000000000 +0800
+@@ -155,8 +155,8 @@ public:
+ ScPasswordHash eHash = PASSHASH_OOO);
+ virtual bool verifyPassword(const String& aPassText) const;
+
+- bool isOptionEnabled(Option eOption) const;
+- void setOption(Option eOption, bool bEnabled);
++ SC_DLLPUBLIC bool isOptionEnabled(Option eOption) const;
++ SC_DLLPUBLIC void setOption(Option eOption, bool bEnabled);
+
+ private:
+ ::std::auto_ptr<ScTableProtectionImpl> mpImpl;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]