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



Author: pflin
Date: Mon Jul 21 06:28:22 2008
New Revision: 13316
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13316&view=rev

Log:
2008-07-21  Fong Lin  <pflin novell com>

	* patches/vba/vba-pagesetup-object.diff: Fixed some issues.
	* scratch/sc-vba/testvba/TestDocuments/PageSetup.xls: updated the test document.
	* scratch/sc-vba/testvba/TestDocuments/logs/unix/pagesetup.log,
	* scratch/sc-vba/testvba/TestDocuments/logs/win/pagesetup.log:Add win/unix logs




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

Modified: trunk/patches/vba/vba-pagesetup-object.diff
==============================================================================
--- trunk/patches/vba/vba-pagesetup-object.diff	(original)
+++ trunk/patches/vba/vba-pagesetup-object.diff	Mon Jul 21 06:28:22 2008
@@ -26,9 +26,9 @@
  
  
  # ------------------------------------------------------------------
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ oovbaapi/org/openoffice/excel/XPageSetup.idl	2008-07-03 10:08:27.000000000 +0800
-@@ -0,0 +1,90 @@
+--- /dev/null	2008-04-03 19:37:22.000000000 +0800
++++ oovbaapi/org/openoffice/excel/XPageSetup.idl	2008-07-21 11:36:58.000000000 +0800
+@@ -0,0 +1,85 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,16 +99,11 @@
 +    [attribute] string LeftFooter;
 +    [attribute] string CenterFooter;
 +    [attribute] string RightFooter;
-+    [attribute] long PaperSize;
 +    [attribute] long Order;
 +    [attribute] long FirstPageNumber;
 +    [attribute] boolean CenterVertically;
 +    [attribute] boolean CenterHorizontally;
 +    [attribute] boolean PrintHeadings;
-+    [attribute] any PrintTitleRows;
-+    [attribute] any PrintTitleColumns;
-+    [attribute] boolean PrintGridlines;
-+    [attribute] boolean PrintDraft;
 +
 +};
 +
@@ -170,9 +165,9 @@
  		$(SLO)$/service.obj \
          $(SLO)$/vbaeventshelper.obj \
   
---- /dev/null	2008-06-07 04:36:48.000000000 +0800
-+++ sc/source/ui/vba/vbapagesetup.hxx	2008-07-03 10:08:27.000000000 +0800
-@@ -0,0 +1,114 @@
+--- /dev/null	2008-04-03 19:37:22.000000000 +0800
++++ sc/source/ui/vba/vbapagesetup.hxx	2008-07-21 11:34:55.000000000 +0800
+@@ -0,0 +1,104 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -261,8 +256,6 @@
 +	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 getPaperSize() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setPaperSize( sal_Int32 pagerSize ) 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);
@@ -273,23 +266,15 @@
 +	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);
-+	virtual css::uno::Any SAL_CALL getPrintTitleRows() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setPrintTitleRows( const css::uno::Any& printTitleRows ) throw (css::uno::RuntimeException);
-+	virtual css::uno::Any SAL_CALL getPrintTitleColumns() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setPrintTitleColumns( const css::uno::Any& printTitleColumns ) throw (css::uno::RuntimeException);
-+	virtual sal_Bool SAL_CALL getPrintGridlines() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setPrintGridlines( sal_Bool printGridlines ) throw (css::uno::RuntimeException);
-+	virtual sal_Bool SAL_CALL getPrintDraft() throw (css::uno::RuntimeException);
-+	virtual void SAL_CALL setPrintDraft( sal_Bool printDraft ) throw (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/vbapagesetup.cxx	2008-07-03 10:08:27.000000000 +0800
-@@ -0,0 +1,960 @@
+--- /dev/null	2008-04-03 19:37:22.000000000 +0800
++++ sc/source/ui/vba/vbapagesetup.cxx	2008-07-21 11:34:05.000000000 +0800
+@@ -0,0 +1,892 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1010,15 +995,6 @@
 +    }
 +}
 +
-+sal_Int32 SAL_CALL ScVbaPageSetup::getPaperSize() throw (css::uno::RuntimeException)
-+{
-+    return 0;
-+}
-+
-+void SAL_CALL ScVbaPageSetup::setPaperSize( sal_Int32 paperSize) throw (css::uno::RuntimeException)
-+{
-+}
-+
 +sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
 +{
 +    sal_Int32 order = excel::XlOrder::xlDownThenOver;
@@ -1039,13 +1015,13 @@
 +
 +void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::RuntimeException)
 +{
-+    sal_Bool bOrder = sal_False;
++    sal_Bool bOrder = sal_True;
 +    switch( order )
 +    {
 +        case excel::XlOrder::xlDownThenOver:
 +            break;
 +        case excel::XlOrder::xlOverThenDown:
-+            bOrder = sal_True;
++            bOrder = sal_False;
 +            break;
 +        default:
 +            DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
@@ -1053,7 +1029,7 @@
 +
 +    try
 +    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")), uno::makeAny(bOrder));
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")), uno::makeAny( bOrder ));
 +    }
 +    catch( uno::Exception& )
 +    {
@@ -1062,7 +1038,7 @@
 +
 +sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() throw (css::uno::RuntimeException)
 +{
-+    sal_Int32 number = 0;
++    sal_Int16 number = 0;
 +    try
 +    {
 +        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")));
@@ -1089,7 +1065,9 @@
 +
 +    try
 +    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), uno::makeAny( firstPageNumber ));
++        uno::Any aValue;
++        aValue <<= (sal_Int16)firstPageNumber;
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
 +    }
 +    catch( uno::Exception& )
 +    {
@@ -1151,7 +1129,7 @@
 +    sal_Bool printHeadings = sal_False;
 +    try
 +    {
-+        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeadings")));
++        uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
 +        aValue >>= printHeadings;
 +    }
 +    catch( uno::Exception& )
@@ -1164,72 +1142,11 @@
 +{
 +    try
 +    {
-+        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeadings")), uno::makeAny( printHeadings ));
-+    }
-+    catch( uno::Exception& )
-+    {
-+    }
-+}
-+
-+uno::Any SAL_CALL ScVbaPageSetup::getPrintTitleRows() throw (css::uno::RuntimeException)
-+{
-+    rtl::OUStringBuffer printTitleRows;
-+    uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
-+    if( !xPrintAreas->getPrintTitleRows() )
-+        return uno::makeAny(printTitleRows.makeStringAndClear());
-+
-+    table::CellRangeAddress titleRows = xPrintAreas->getTitleRows();
-+    printTitleRows.appendAscii("$").append(rtl::OUString::valueOf(titleRows.StartRow+1)).appendAscii(":$").append(rtl::OUString::valueOf(titleRows.EndRow+1));
-+
-+    return uno::makeAny(printTitleRows.makeStringAndClear());
-+}
-+
-+void SAL_CALL ScVbaPageSetup::setPrintTitleRows( const uno::Any& printTitleRows) throw (css::uno::RuntimeException)
-+{
-+    // TODO
-+    rtl::OUString sPrintTitleRows;
-+    uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
-+    try
-+    {
-+        //sal_Bool b
++        mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")), uno::makeAny( printHeadings ));
 +    }
 +    catch( uno::Exception& )
 +    {
 +    }
-+
-+}
-+
-+uno::Any SAL_CALL ScVbaPageSetup::getPrintTitleColumns() throw (css::uno::RuntimeException)
-+{
-+    // TODO
-+    return aNULL();
-+}
-+
-+void SAL_CALL ScVbaPageSetup::setPrintTitleColumns( const uno::Any& printTitleColumns) throw (css::uno::RuntimeException)
-+{
-+    // TODO
-+}
-+
-+sal_Bool SAL_CALL ScVbaPageSetup::getPrintGridlines() throw (css::uno::RuntimeException)
-+{
-+    // TODO
-+    return 0;
-+}
-+
-+void SAL_CALL ScVbaPageSetup::setPrintGridlines( sal_Bool printGridlines) throw (css::uno::RuntimeException)
-+{
-+    // TODO
-+}
-+
-+sal_Bool SAL_CALL ScVbaPageSetup::getPrintDraft() throw (css::uno::RuntimeException)
-+{
-+    // TODO
-+    return 0;
-+}
-+
-+void SAL_CALL ScVbaPageSetup::setPrintDraft( sal_Bool printDraft) throw (css::uno::RuntimeException)
-+{
-+    // TODO
 +}
 +
 +rtl::OUString& 

Added: trunk/scratch/sc-vba/testvba/TestDocuments/logs/unix/pagesetup.log
==============================================================================
--- (empty file)
+++ trunk/scratch/sc-vba/testvba/TestDocuments/logs/unix/pagesetup.log	Mon Jul 21 06:28:22 2008
@@ -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

Added: trunk/scratch/sc-vba/testvba/TestDocuments/logs/win/pagesetup.log
==============================================================================
--- (empty file)
+++ trunk/scratch/sc-vba/testvba/TestDocuments/logs/win/pagesetup.log	Mon Jul 21 06:28:22 2008
@@ -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



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