ooo-build r13375 - in trunk: . patches/vba scratch/sc-vba/testvba/TestDocuments scratch/sc-vba/testvba/TestDocuments/logs/unix



Author: pflin
Date: Thu Jul 24 09:41:02 2008
New Revision: 13375
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13375&view=rev

Log:
2008-07-24  Fong Lin  <pflin novell com>
	* patches/vba/vba-pagebreak-object.diff: Refactor and fixed some issues.
	* scratch/sc-vba/testvba/TestDocuments/PageBreaks.xls: Add the test document.
	* scratch/sc-vba/testvba/TestDocuments/logs/unix/pagesetup.log: test log.



Added:
   trunk/scratch/sc-vba/testvba/TestDocuments/PageBreaks.xls   (contents, props changed)
   trunk/scratch/sc-vba/testvba/TestDocuments/logs/unix/PageBreaks.log
Modified:
   trunk/ChangeLog
   trunk/patches/vba/vba-pagebreak-object.diff

Modified: trunk/patches/vba/vba-pagebreak-object.diff
==============================================================================
--- trunk/patches/vba/vba-pagebreak-object.diff	(original)
+++ trunk/patches/vba/vba-pagebreak-object.diff	Thu Jul 24 09:41:02 2008
@@ -1,23 +1,6 @@
---- oovbaapi/org/openoffice/excel/XWorksheet.idl.orig	2008-07-03 10:19:08.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XWorksheet.idl	2008-07-03 18:56:26.000000000 +0800
-@@ -52,6 +52,7 @@ interface XComments;
- interface XRange;
- interface XOutline;
- interface XPageSetup;
-+interface XHPageBreaks;
- interface XWorksheet
- {
- 	interface ::org::openoffice::vba::XHelperInterface;
-@@ -85,6 +86,7 @@ interface XWorksheet
- 	any Comments([in] any Index);
- 	XOutline Outline();
- 	XPageSetup PageSetup();
-+	XHPageBreaks HPageBreaks();
- 	any OLEObjects([in] any Index);
- 	void ShowDataForm();
- 	any Shapes([in] any Index);
---- oovbaapi/org/openoffice/excel/makefile.mk.orig	2008-07-03 10:19:08.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/makefile.mk	2008-07-03 18:56:26.000000000 +0800
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/oovbaapi/org/openoffice/excel/makefile.mk oovbaapi/org/openoffice/excel/makefile.mk
+--- backup/oovbaapi/org/openoffice/excel/makefile.mk	2008-07-21 15:56:41.000000000 +0800
++++ oovbaapi/org/openoffice/excel/makefile.mk	2008-07-21 21:47:23.000000000 +0800
 @@ -95,6 +95,9 @@ IDLFILES= XApplication.idl\
   	XHyperlink.idl \
   	Hyperlink.idl \
@@ -28,8 +11,9 @@
  
  
  # ------------------------------------------------------------------
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XHPageBreak.idl	2008-07-03 18:56:26.000000000 +0800
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/oovbaapi/org/openoffice/excel/XHPageBreak.idl oovbaapi/org/openoffice/excel/XHPageBreak.idl
+--- backup/oovbaapi/org/openoffice/excel/XHPageBreak.idl	1970-01-01 08:00:00.000000000 +0800
++++ oovbaapi/org/openoffice/excel/XHPageBreak.idl	2008-07-21 21:47:23.000000000 +0800
 @@ -0,0 +1,55 @@
 +/*************************************************************************
 + *
@@ -86,9 +70,10 @@
 +#endif
 +
 +
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XHPageBreaks.idl	2008-07-03 18:56:26.000000000 +0800
-@@ -0,0 +1,71 @@
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/oovbaapi/org/openoffice/excel/XHPageBreaks.idl oovbaapi/org/openoffice/excel/XHPageBreaks.idl
+--- backup/oovbaapi/org/openoffice/excel/XHPageBreaks.idl	1970-01-01 08:00:00.000000000 +0800
++++ oovbaapi/org/openoffice/excel/XHPageBreaks.idl	2008-07-24 16:59:30.000000000 +0800
+@@ -0,0 +1,70 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,6 +117,9 @@
 +#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
 +
 +//=============================================================================
 +
@@ -144,13 +132,9 @@
 +interface XHPageBreaks
 +{
 +
-+	interface ::org::openoffice::vba::XHelperInterface;
-+
++	interface org::openoffice::vba::XCollection;
 +	//Methods	
-+    XHPageBreak Add([in] any Before) raises(com::sun::star::script::BasicErrorException);
-+	long Count() raises(com::sun::star::script::BasicErrorException);
-+    XHPageBreak Item([in] long index)raises(com::sun::star::script::BasicErrorException);
-+
++    any Add([in] any Before) raises(com::sun::star::script::BasicErrorException);
 +};
 +
 +//=============================================================================
@@ -160,8 +144,9 @@
 +#endif
 +
 +
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XPageBreak.idl	2008-07-03 18:56:26.000000000 +0800
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/oovbaapi/org/openoffice/excel/XPageBreak.idl oovbaapi/org/openoffice/excel/XPageBreak.idl
+--- backup/oovbaapi/org/openoffice/excel/XPageBreak.idl	1970-01-01 08:00:00.000000000 +0800
++++ oovbaapi/org/openoffice/excel/XPageBreak.idl	2008-07-21 21:47:23.000000000 +0800
 @@ -0,0 +1,73 @@
 +/*************************************************************************
 + *
@@ -236,58 +221,28 @@
 +#endif
 +
 +
---- sc/source/ui/vba/vbaworksheet.hxx.orig	2008-07-03 10:19:08.000000000 +0800
-+++ sc/source/ui/vba/vbaworksheet.hxx	2008-07-03 18:56:26.000000000 +0800
-@@ -43,6 +43,7 @@
- #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"
-@@ -91,6 +92,7 @@ public:
- 	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::Reference< oo::excel::XHPageBreaks > SAL_CALL HPageBreaks( ) 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);
- 
---- sc/source/ui/vba/vbaworksheet.cxx.orig	2008-07-03 19:16:19.000000000 +0800
-+++ sc/source/ui/vba/vbaworksheet.cxx	2008-07-03 19:16:19.000000000 +0800
-@@ -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>
-@@ -86,6 +87,7 @@
- #include "vbaoleobjects.hxx"
- #include "vbashapes.hxx"
- #include "vbapagesetup.hxx"
-+#include "vbapagebreaks.hxx"
- 
- #define STANDARDWIDTH 2267
- #define STANDARDHEIGHT 427
-@@ -274,6 +276,13 @@ ScVbaWorksheet::PageSetup( ) throw (uno:
- 	return new ScVbaPageSetup( this, mxContext, getSheet(), getModel() );
- }
- 
-+uno::Reference< excel::XHPageBreaks >
-+ScVbaWorksheet::HPageBreaks( ) throw (uno::RuntimeException)
-+{
-+    uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak(getSheet(),uno::UNO_QUERY_THROW);
-+	return new ScVbaHPageBreaks( this, mxContext, xSheetPageBreak);
-+}
-+
- sal_Int32 
- ScVbaWorksheet::getStandardWidth() throw (uno::RuntimeException)
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/oovbaapi/org/openoffice/excel/XWorksheet.idl oovbaapi/org/openoffice/excel/XWorksheet.idl
+--- backup/oovbaapi/org/openoffice/excel/XWorksheet.idl	2008-07-21 15:56:41.000000000 +0800
++++ oovbaapi/org/openoffice/excel/XWorksheet.idl	2008-07-21 21:48:51.000000000 +0800
+@@ -52,6 +52,7 @@ interface XComments;
+ interface XRange;
+ interface XOutline;
+ interface XPageSetup;
++interface XHPageBreaks;
+ interface XWorksheet
  {
---- sc/source/ui/vba/makefile.mk.orig	2008-07-03 18:55:34.000000000 +0800
-+++ sc/source/ui/vba/makefile.mk	2008-07-03 19:10:53.000000000 +0800
+ 	interface ::org::openoffice::vba::XHelperInterface;
+@@ -85,6 +86,7 @@ interface XWorksheet
+ 	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);
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/sc/source/ui/vba/makefile.mk sc/source/ui/vba/makefile.mk
+--- backup/sc/source/ui/vba/makefile.mk	2008-07-21 15:56:13.000000000 +0800
++++ sc/source/ui/vba/makefile.mk	2008-07-21 21:47:23.000000000 +0800
 @@ -127,6 +127,8 @@ SLOFILES= \
                  $(SLO)$/vbacommandbars.obj \
          $(SLO)$/vbahyperlink.obj \
@@ -297,99 +252,10 @@
          $(SLO)$/vbaspinbutton.obj \
  		$(SLO)$/service.obj \
          $(SLO)$/vbaeventshelper.obj \
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ sc/source/ui/vba/vbapagebreak.hxx	2008-07-03 18:56:26.000000000 +0800
-@@ -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
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ sc/source/ui/vba/vbapagebreak.cxx	2008-07-03 18:56:26.000000000 +0800
-@@ -0,0 +1,144 @@
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/sc/source/ui/vba/vbapagebreak.cxx sc/source/ui/vba/vbapagebreak.cxx
+--- backup/sc/source/ui/vba/vbapagebreak.cxx	1970-01-01 08:00:00.000000000 +0800
++++ sc/source/ui/vba/vbapagebreak.cxx	2008-07-23 11:48:30.000000000 +0800
+@@ -0,0 +1,141 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -484,11 +350,8 @@
 +template< typename Ifc1 >
 +uno::Reference< excel::XRange> ScVbaPageBreak<Ifc1>::Location() throw ( script::BasicErrorException, uno::RuntimeException)
 +{
-+    // FIXME
 +    uno::Reference< table::XCellRange > xRange( mxRowColPropertySet, uno::UNO_QUERY_THROW );
-+    
-+    //return new ScVbaRange( getParent(), mxContext, xRange);
-+    return NULL;
++    return new ScVbaRange( ScVbaPageBreak_BASE::getParent(), ScVbaPageBreak_BASE::mxContext, xRange);
 +}
 +
 +template< typename Ifc1 >
@@ -534,9 +397,10 @@
 +	return aServiceNames;
 +}
 +
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ sc/source/ui/vba/vbapagebreaks.hxx	2008-07-03 18:56:26.000000000 +0800
-@@ -0,0 +1,106 @@
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/sc/source/ui/vba/vbapagebreak.hxx sc/source/ui/vba/vbapagebreak.hxx
+--- backup/sc/source/ui/vba/vbapagebreak.hxx	1970-01-01 08:00:00.000000000 +0800
++++ sc/source/ui/vba/vbapagebreak.hxx	2008-07-21 22:10:57.000000000 +0800
+@@ -0,0 +1,87 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -566,86 +430,68 @@
 + * for a copy of the LGPLv3 License.
 + *
 + ************************************************************************/
-+#ifndef SC_VBA_PAGEBREAKS_HXX
-+#define SC_VBA_PAGEBREAKS_HXX
++#ifndef SC_VBA_PAGEBREAK_HXX
++#define SC_VBA_PAGEBREAK_HXX
 +
 +#include <cppuhelper/implbase1.hxx>
-+#include <org/openoffice/excel/XHPageBreaks.hpp>
++#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/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"
 +
-+class RangePageBreak
-+{
-+public:
-+   css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet; 
-+   css::sheet::TablePageBreakData maTablePageBreakData;
-+   RangePageBreak(){};
-+   RangePageBreak( css::uno::Reference< css::beans::XPropertySet >& xProps, css::sheet::TablePageBreakData aTablePageBreakData ):
-+                mxRowColPropertySet( xProps ), maTablePageBreakData(aTablePageBreakData){};
-+};
-+
-+class ScVbaPageBreaks
++template< typename Ifc1 >
++class ScVbaPageBreak : public InheritedHelperInterfaceImpl1< Ifc1 >
 +{
-+private:
-+    const css::uno::Reference< oo::vba::XHelperInterface > mxParent;
++typedef InheritedHelperInterfaceImpl1< Ifc1 > ScVbaPageBreak_BASE;
 +protected:
-+	css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak;
-+	css::uno::Reference< css::table::XColumnRowRange > mxColumnRowRange;
-+
-+    ScVbaPageBreaks(const css::uno::Reference< oo::vba::XHelperInterface >& xParent, css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak) throw (css::uno::RuntimeException);
-+    virtual ~ScVbaPageBreaks(){};
++    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 sal_Int32 getAPIStartofRange( const css::uno::Reference< oo::excel::XRange >& xRange ) throw (css::uno::RuntimeException) = 0;
-+    virtual sal_Int32 getAPIEndIndexofRange( const css::uno::Reference< oo::excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (css::uno::RuntimeException) = 0;
-+    virtual css::uno::Sequence<css::sheet::TablePageBreakData> getAllPageBreaks() = 0;
-+    virtual css::uno::Reference<css::container::XIndexAccess> getRowColContainer() = 0;
-+
-+    RangePageBreak getRangePageBreak( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+    RangePageBreak getRangePageBreak( sal_Int32 nIndex ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+    css::sheet::TablePageBreakData getTablePageBreakData( sal_Int32 nIndex ) throw ( css::script::BasicErrorException, 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);
 +
-+public:    
-+    virtual sal_Int32 SAL_CALL Count() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
 +};
 +
-+typedef InheritedHelperInterfaceImpl1< oo::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
 +
-+class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE, ScVbaPageBreaks
++typedef ScVbaPageBreak < oo::excel::XHPageBreak > ScVbaHPageBreak_BASE;
++
++class ScVbaHPageBreak :  public ScVbaHPageBreak_BASE
 +{
 +public:
-+	ScVbaHPageBreaks( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, 
++	ScVbaHPageBreak( 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(){}
++            		css::uno::Reference< css::beans::XPropertySet >& xProps,
++                    css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException):
++              ScVbaHPageBreak_BASE( xParent,xContext,xProps,aTablePageBreakData ){}
++            
++	virtual ~ScVbaHPageBreak(){}
 +	
-+    virtual sal_Int32 getAPIStartofRange( const css::uno::Reference< oo::excel::XRange >& xRange ) throw (css::uno::RuntimeException);
-+    virtual sal_Int32 getAPIEndIndexofRange( const css::uno::Reference< oo::excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (css::uno::RuntimeException);
-+    virtual css::uno::Sequence<css::sheet::TablePageBreakData> getAllPageBreaks();
-+    virtual css::uno::Reference<css::container::XIndexAccess> getRowColContainer();
-+
-+    // XHPageBreaks 
-+    virtual css::uno::Reference<oo::excel::XHPageBreak>  SAL_CALL Add( const css::uno::Any& Before) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+    virtual css::uno::Reference<oo::excel::XHPageBreak> SAL_CALL Item( sal_Int32 index ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+    virtual sal_Int32 SAL_CALL Count() throw ( css::script::BasicErrorException, css::uno::RuntimeException);
-+
-+    
 +	// XHelperInterface
 +	virtual rtl::OUString& getServiceImplName();
 +	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
 +};
 +
 +#endif
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ sc/source/ui/vba/vbapagebreaks.cxx	2008-07-03 18:56:26.000000000 +0800
-@@ -0,0 +1,192 @@
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/sc/source/ui/vba/vbapagebreaks.cxx sc/source/ui/vba/vbapagebreaks.cxx
+--- backup/sc/source/ui/vba/vbapagebreaks.cxx	1970-01-01 08:00:00.000000000 +0800
++++ sc/source/ui/vba/vbapagebreaks.cxx	2008-07-24 17:04:15.000000000 +0800
+@@ -0,0 +1,269 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -681,14 +527,79 @@
 +using namespace ::com::sun::star;
 +using namespace ::org::openoffice;
 +
-+ScVbaPageBreaks::ScVbaPageBreaks( const uno::Reference< vba::XHelperInterface >& xParent,
-+                                  uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak) throw (uno::RuntimeException):
-+                        mxParent(xParent), mxSheetPageBreak(xSheetPageBreak)
++typedef ::cppu::WeakImplHelper1<container::XIndexAccess > RangePageBreaks_Base;
++class RangePageBreaks : public RangePageBreaks_Base
 +{
-+    mxColumnRowRange.set( mxSheetPageBreak, uno::UNO_QUERY_THROW );
-+}
++private:
++	uno::Reference< vba::XHelperInterface > mxParent;
++	uno::Reference< uno::XComponentContext > mxContext;
++	uno::Reference< sheet::XSheetPageBreak > mxSheetPageBreak;
++	sal_Bool m_bColumn;
++
++public:
++	RangePageBreaks( const uno::Reference< vba::XHelperInterface >& xParent,
++					 const uno::Reference< uno::XComponentContext >& xContext,
++					 uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak,
++					 sal_Bool bColumn ) : mxParent( xParent ), mxContext( xContext ), mxSheetPageBreak( xSheetPageBreak ), m_bColumn( bColumn )
++	{
++	}
++
++	sal_Int32 getAPIStartofRange( const uno::Reference< excel::XRange >& xRange ) throw (css::uno::RuntimeException)
++	{
++		if( m_bColumn )
++			return xRange->getColumn() - 1;
++		return xRange->getRow() - 1;
++	}
++
++	sal_Int32 getAPIEndIndexofRange( const uno::Reference< excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (uno::RuntimeException)
++	{
++		if( m_bColumn )
++			return nUsedStart + xRange->Columns( uno::Any() )->getCount();
++	    return nUsedStart + xRange->Rows( uno::Any() )->getCount();
++	}
++
++	uno::Sequence<sheet::TablePageBreakData> getAllPageBreaks() throw (uno::RuntimeException)
++	{
++		if( m_bColumn )
++			return mxSheetPageBreak->getColumnPageBreaks();
++    	return mxSheetPageBreak->getRowPageBreaks();
++	}
++
++	uno::Reference<container::XIndexAccess> getRowColContainer() throw (uno::RuntimeException)
++	{
++		uno::Reference< table::XColumnRowRange > xColumnRowRange( mxSheetPageBreak, uno::UNO_QUERY_THROW );
++    	uno::Reference<container::XIndexAccess> xIndexAccess;
++		if( m_bColumn )
++			xIndexAccess.set( xColumnRowRange->getColumns(), uno::UNO_QUERY_THROW );
++		else
++			xIndexAccess.set( xColumnRowRange->getRows(), uno::UNO_QUERY_THROW );
++    	return xIndexAccess;
++	}
++
++	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);
 +
-+sal_Int32 SAL_CALL ScVbaPageBreaks::Count() throw ( script::BasicErrorException, 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 );
@@ -710,46 +621,27 @@
 +    return nCount;
 +}
 +
-+RangePageBreak ScVbaPageBreaks::getRangePageBreak( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException)
-+{
-+    uno::Reference< excel::XRange > xRange;
-+    Before >>= xRange;
-+    if( xRange.is() )
-+    {
-+        sal_Int32 nAPIRowColIndex = getAPIStartofRange( xRange );
-+        uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer();
-+        uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nAPIRowColIndex), uno::UNO_QUERY_THROW );
-+        sheet::TablePageBreakData aPageBreakData;
-+        aPageBreakData.ManualBreak = sal_True;
-+        aPageBreakData.Position = nAPIRowColIndex;
-+        RangePageBreak aRangepageBreak(xRowColPropertySet, aPageBreakData);
-+        return aRangepageBreak;
-+    }
-+    DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
-+    return RangePageBreak();
-+}
-+
-+RangePageBreak ScVbaPageBreaks::getRangePageBreak( sal_Int32 nIndex ) throw ( css::script::BasicErrorException, css::uno::RuntimeException)
++uno::Any SAL_CALL RangePageBreaks::getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
 +{
-+    if( (nIndex < Count()) && ( nIndex > 0 ))
++    if( (Index < getCount()) && ( Index >= 0 ))
 +    {
-+        sheet::TablePageBreakData aTablePageBreakData = getTablePageBreakData(nIndex - 1);
++        sheet::TablePageBreakData aTablePageBreakData = getTablePageBreakData( Index );
 +        uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer();
 +        sal_Int32 nPos = aTablePageBreakData.Position;
 +        if( (nPos < xIndexAccess->getCount()) && (nPos > -1) )
 +        {
 +            uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nPos), uno::UNO_QUERY_THROW );
-+            RangePageBreak aRangepageBreak(xRowColPropertySet, aTablePageBreakData);
-+            return aRangepageBreak;
++			//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) ));
 +        }
 +    }
-+    DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
-+    return RangePageBreak();
++	throw lang::IndexOutOfBoundsException();
 +}
 +
-+sheet::TablePageBreakData ScVbaPageBreaks::getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException)
++sheet::TablePageBreakData RangePageBreaks::getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException)
 +{
-+    sal_Int32 index = 0;
++    sal_Int32 index = -1;
 +    sheet::TablePageBreakData aTablePageBreakData;
 +    uno::Reference< excel::XWorksheet > xWorksheet( mxParent, uno::UNO_QUERY_THROW );
 +    uno::Reference< excel::XRange > xRange = xWorksheet->getUsedRange();
@@ -773,50 +665,81 @@
 +    return aTablePageBreakData;
 +}
 +
-+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),ScVbaPageBreaks(xParent, xSheetPageBreak)
++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 ScVbaHPageBreaks::getAPIStartofRange( const uno::Reference< excel::XRange >& xRange ) throw (uno::RuntimeException)
-+{
-+    return xRange->getRow() - 1;
++	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) ));
 +}
-+sal_Int32 ScVbaHPageBreaks::getAPIEndIndexofRange( const uno::Reference< excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (uno::RuntimeException)
++
++
++class RangePageBreaksEnumWrapper : public EnumerationHelper_BASE
 +{
-+    return nUsedStart + xRange->Rows( aNULL() )->getCount();
-+}
++	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();
++	}
++};
 +
-+uno::Sequence<sheet::TablePageBreakData> ScVbaHPageBreaks::getAllPageBreaks()
++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 )
 +{
-+    return mxSheetPageBreak->getRowPageBreaks();
 +}
 +
-+uno::Reference<container::XIndexAccess> ScVbaHPageBreaks::getRowColContainer()
++uno::Any SAL_CALL ScVbaHPageBreaks::Add( const uno::Any& Before) throw ( script::BasicErrorException, uno::RuntimeException)
 +{
-+    uno::Reference<container::XIndexAccess> xIndexAccess( mxColumnRowRange->getRows(), uno::UNO_QUERY );
-+    return xIndexAccess;
++	RangePageBreaks* pPageBreaks = dynamic_cast< RangePageBreaks* >( m_xIndexAccess.get() );
++	if( pPageBreaks )
++	{
++		return pPageBreaks->Add( Before );
++	}
++	return uno::Any();
 +}
 +
-+uno::Reference<excel::XHPageBreak> ScVbaHPageBreaks::Add( const uno::Any& Before) throw ( script::BasicErrorException, uno::RuntimeException)
++uno::Reference< container::XEnumeration >
++ScVbaHPageBreaks::createEnumeration() throw (uno::RuntimeException)
 +{
-+    RangePageBreak aRangePageBreak = getRangePageBreak( Before );
-+    aRangePageBreak.mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_True));
-+    return new ScVbaHPageBreak(getParent(), mxContext, aRangePageBreak.mxRowColPropertySet, aRangePageBreak.maTablePageBreakData);
++	return new RangePageBreaksEnumWrapper( m_xIndexAccess );
 +}
 +
-+
-+uno::Reference<excel::XHPageBreak> ScVbaHPageBreaks::Item( sal_Int32 index ) throw ( script::BasicErrorException, uno::RuntimeException)
++uno::Any
++ScVbaHPageBreaks::createCollectionObject( const css::uno::Any& aSource )
 +{
-+    RangePageBreak aRangePageBreak = getRangePageBreak( index );
-+    return new ScVbaHPageBreak(getParent(), mxContext, aRangePageBreak.mxRowColPropertySet, aRangePageBreak.maTablePageBreakData);
++	return aSource; // its already a pagebreak object
 +}
 +
-+sal_Int32 SAL_CALL ScVbaHPageBreaks::Count() throw ( script::BasicErrorException, uno::RuntimeException)
++uno::Type 
++ScVbaHPageBreaks::getElementType() throw (uno::RuntimeException)
 +{
-+    return ScVbaPageBreaks::Count();
++	return excel::XHPageBreak::static_type(0);
 +}
 +
 +rtl::OUString& 
@@ -838,3 +761,133 @@
 +	return aServiceNames;
 +}
 +
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/sc/source/ui/vba/vbapagebreaks.hxx sc/source/ui/vba/vbapagebreaks.hxx
+--- backup/sc/source/ui/vba/vbapagebreaks.hxx	1970-01-01 08:00:00.000000000 +0800
++++ sc/source/ui/vba/vbapagebreaks.hxx	2008-07-24 16:55:43.000000000 +0800
+@@ -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
++
++#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
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/sc/source/ui/vba/vbaworksheet.cxx sc/source/ui/vba/vbaworksheet.cxx
+--- backup/sc/source/ui/vba/vbaworksheet.cxx	2008-07-21 15:56:13.000000000 +0800
++++ sc/source/ui/vba/vbaworksheet.cxx	2008-07-24 16:15:39.000000000 +0800
+@@ -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>
+@@ -86,6 +87,7 @@
+ #include "vbaoleobjects.hxx"
+ #include "vbashapes.hxx"
+ #include "vbapagesetup.hxx"
++#include "vbapagebreaks.hxx"
+ 
+ #define STANDARDWIDTH 2267
+ #define STANDARDHEIGHT 427
+@@ -274,6 +276,16 @@ ScVbaWorksheet::PageSetup( ) throw (uno:
+ 	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)
+ {
+diff -urNp --exclude=CVS --exclude=unxlngi6.pro backup/sc/source/ui/vba/vbaworksheet.hxx sc/source/ui/vba/vbaworksheet.hxx
+--- backup/sc/source/ui/vba/vbaworksheet.hxx	2008-07-21 15:56:13.000000000 +0800
++++ sc/source/ui/vba/vbaworksheet.hxx	2008-07-21 21:51:35.000000000 +0800
+@@ -43,6 +43,7 @@
+ #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"
+@@ -91,6 +92,7 @@ public:
+ 	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);
+ 

Added: trunk/scratch/sc-vba/testvba/TestDocuments/PageBreaks.xls
==============================================================================
Binary file. No diff available.

Added: trunk/scratch/sc-vba/testvba/TestDocuments/logs/unix/PageBreaks.log
==============================================================================
--- (empty file)
+++ trunk/scratch/sc-vba/testvba/TestDocuments/logs/unix/PageBreaks.log	Thu Jul 24 09:41:02 2008
@@ -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



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