ooo-build r14207 - in trunk: . patches/dev300



Author: noelpwer
Date: Fri Oct  3 16:35:18 2008
New Revision: 14207
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14207&view=rev

Log:
2008-10-03  Noel Power  <noel power novell com>

        *  patches/dev300/cws-npower11.diff: fix for n#431613 and some  api
        fixes for font




Modified:
   trunk/ChangeLog
   trunk/patches/dev300/cws-npower11.diff

Modified: trunk/patches/dev300/cws-npower11.diff
==============================================================================
--- trunk/patches/dev300/cws-npower11.diff	(original)
+++ trunk/patches/dev300/cws-npower11.diff	Fri Oct  3 16:35:18 2008
@@ -4133,6 +4133,186 @@
 +};
 +#endif //SC_VBA_OLEOBJECTS_HXX
 +
+Index: sc/source/ui/vba/vbafont.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/vba/vbafont.cxx,v
+retrieving revision 1.7
+retrieving revision 1.7.96.1
+diff -u -p -u -p -b -w -B -r1.7 -r1.7.96.1
+--- sc/source/ui/vba/vbafont.cxx	11 Apr 2008 00:59:55 -0000	1.7
++++ sc/source/ui/vba/vbafont.cxx	3 Oct 2008 16:18:33 -0000	1.7.96.1
+@@ -32,6 +32,10 @@
+ #include <com/sun/star/awt/FontUnderline.hpp>
+ #include <com/sun/star/awt/FontStrikeout.hpp>
+ #include <com/sun/star/awt/FontSlant.hpp>
++#include <com/sun/star/text/XSimpleText.hpp>
++#include <com/sun/star/table/XCellRange.hpp>
++#include <com/sun/star/table/XCell.hpp>
++#include <com/sun/star/table/XColumnRowRange.hpp>
+ #include <org/openoffice/excel/XlColorIndex.hpp>
+ #include <org/openoffice/excel/XlUnderlineStyle.hpp>
+ #include <svtools/itemset.hxx>
+@@ -68,10 +72,42 @@ ScVbaFont::ScVbaFont( const uno::Referen
+ {
+ }
+ 
++uno::Reference< beans::XPropertySet > lcl_TextProperties( uno::Reference< table::XCell >& xIf ) throw ( uno::RuntimeException )
++{
++	uno::Reference< text::XTextRange > xTxtRange( xIf, uno::UNO_QUERY_THROW );
++	uno::Reference< text::XSimpleText > xTxt( xTxtRange->getText(), uno::UNO_QUERY_THROW ) ;
++	uno::Reference< beans::XPropertySet > xProps( xTxt->createTextCursor(), uno::UNO_QUERY_THROW );
++	return xProps;
++}
+ void SAL_CALL
+ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeException )
+ {
++	// #FIXEME create some sort of generic get/set code where 
++	// you can pass a functor
++	// get/set - Super/sub script code is exactly the same
++	// except for the call applied at each cell position
++        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
++        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
++	if ( !xCell.is() )
++	{
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
++		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
++		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
++		for ( sal_Int32 col = 0; col < nCols; ++col )
++		{
++			for ( sal_Int32 row = 0; row < nRows; ++row )
++			{
++				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW );
++				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
++				aFont.setSuperscript( aValue );
++			}
++		}
++		return;
+ 
++	}
++        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
++
++	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
+ 	sal_Bool bValue = sal_False;
+ 	aValue >>= bValue;
+ 	sal_Int16 nValue = NORMAL;
+@@ -82,21 +118,68 @@ ScVbaFont::setSuperscript( const uno::An
+ 		nValue = SUPERSCRIPT;
+ 	        nValue2 = SUPERSCRIPTHEIGHT;
+ 	}
+-	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
+- 	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
++	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
++ 	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
+ }
+ 
+ uno::Any SAL_CALL
+ ScVbaFont::getSuperscript() throw ( uno::RuntimeException )
+ {
++        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
++        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
++	if ( !xCell.is() )
++	{
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
++		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
++		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
++		uno::Any aRes;
++		for ( sal_Int32 col = 0; col < nCols; ++col )
++		{
++			for ( sal_Int32 row = 0; row < nRows; ++row )
++			{
++				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW );
++				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
++				if ( !col && !row )
++					aRes = aFont.getSuperscript();
++				else if ( aRes != aFont.getSuperscript() )
++					return aNULL();
++			}
++		}
++		return aRes;
++
++	}
++        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
++	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
+ 	short nValue = 0;
+-	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
++	xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
+ 	return uno::makeAny( ( nValue == SUPERSCRIPT ) );
+ }
+ 
+ void SAL_CALL
+ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException )
+ {
++        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
++        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
++	if ( !xCell.is() )
++	{
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
++		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
++		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
++		for ( sal_Int32 col = 0; col < nCols; ++col )
++		{
++			for ( sal_Int32 row = 0; row < nRows; ++row )
++			{
++				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW );
++				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
++				aFont.setSubscript( aValue );
++			}
++		}
++		return;
++
++	}
++        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
++	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
++
+ 	sal_Bool bValue = sal_False;
+ 	aValue >>= bValue;
+ 	sal_Int16 nValue = NORMAL;
+@@ -108,16 +191,42 @@ ScVbaFont::setSubscript( const uno::Any&
+ 	        nValue2 = SUBSCRIPTHEIGHT;
+ 	}
+ 
+- 	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
+-	mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
++ 	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 );
++	xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue );
+ 
+ }
+ 
+ uno::Any SAL_CALL
+ ScVbaFont::getSubscript() throw ( uno::RuntimeException )
+ {
++        uno::Reference< table::XCell> xCell( mxFont, uno::UNO_QUERY );
++        uno::Reference< table::XCellRange > xCellRange( mxFont, uno::UNO_QUERY );
++	if ( !xCell.is() )
++	{
++		uno::Reference< table::XColumnRowRange > xColumnRowRange(xCellRange, uno::UNO_QUERY_THROW );
++		sal_Int32 nCols = xColumnRowRange->getColumns()->getCount();
++		sal_Int32 nRows = xColumnRowRange->getRows()->getCount();
++		uno::Any aRes;
++		for ( sal_Int32 col = 0; col < nCols; ++col )
++		{
++			for ( sal_Int32 row = 0; row < nRows; ++row )
++			{
++				uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW );
++				ScVbaFont aFont( getParent(), mxContext, mPalette, xProps );
++				if ( !col && !row )
++					aRes = aFont.getSubscript();
++				else if ( aRes != aFont.getSubscript() )
++					return aNULL();
++			}
++		}
++		return aRes;
++
++	}
++        xCell.set( xCellRange->getCellByPosition( 0,0 ) );
++	uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
++
+ 	short nValue = NORMAL;
+-	mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
++	xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue;
+ 	return uno::makeAny( ( nValue == SUBSCRIPT ) );
+ }
+ 
 Index: sc/source/ui/vba/vbaframe.cxx
 ===================================================================
 RCS file: sc/source/ui/vba/vbaframe.cxx
@@ -8351,10 +8531,10 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/vba/vbarange.cxx,v
 retrieving revision 1.9
-retrieving revision 1.5.34.17
-diff -u -p -u -p -b -w -B -r1.9 -r1.5.34.17
+retrieving revision 1.5.34.18
+diff -u -p -u -p -b -w -B -r1.9 -r1.5.34.18
 --- sc/source/ui/vba/vbarange.cxx	14 May 2008 10:03:31 -0000	1.9
-+++ sc/source/ui/vba/vbarange.cxx	30 Sep 2008 14:06:04 -0000	1.5.34.17
++++ sc/source/ui/vba/vbarange.cxx	3 Oct 2008 09:30:26 -0000	1.5.34.18
 @@ -115,6 +115,7 @@
  #include <org/openoffice/excel/XlCellType.hpp>
  #include <org/openoffice/excel/XlSpecialCellsValue.hpp>
@@ -8892,6 +9072,15 @@
  		{
  			if ( bIsMultiArea )
  			{
+@@ -4894,7 +5258,7 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGrou
+ 		sal_Bool bAddPageBreaks = sal_False;
+ 		PageBreaks >>= bAddPageBreaks;
+ 
+-		uno::Reference< sheet::XSubTotalCalculatable> xSub;
++		uno::Reference< sheet::XSubTotalCalculatable> xSub(mxRange, uno::UNO_QUERY_THROW );
+ 		uno::Reference< sheet::XSubTotalDescriptor > xSubDesc = xSub->createSubTotalDescriptor(sal_True);
+ 		uno::Reference< beans::XPropertySet > xSubDescPropertySet( xSubDesc, uno::UNO_QUERY_THROW );
+ 		xSubDescPropertySet->setPropertyValue(INSERTPAGEBREAKS, uno::makeAny( bAddPageBreaks));
 @@ -4955,27 +5319,6 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGrou
  	}
  }
@@ -11778,117 +11967,117 @@
 ===================================================================
 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/cvssWaGWk differ
+Binary files /dev/null and /tmp/cvsXlaWx0 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/cvstWaGWk differ
+Binary files /dev/null and /tmp/cvsYlaWx0 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/cvsuWaGWk differ
+Binary files /dev/null and /tmp/cvsZlaWx0 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/cvsvWaGWk differ
+Binary files /dev/null and /tmp/cvs0laWx0 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/cvswWaGWk differ
+Binary files /dev/null and /tmp/cvs1laWx0 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/cvsxWaGWk differ
+Binary files /dev/null and /tmp/cvs2laWx0 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/cvsyWaGWk differ
+Binary files /dev/null and /tmp/cvs3laWx0 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/cvszWaGWk differ
+Binary files /dev/null and /tmp/cvs4laWx0 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/cvsAWaGWk differ
+Binary files /dev/null and /tmp/cvs5laWx0 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/cvsBWaGWk differ
+Binary files /dev/null and /tmp/cvs6laWx0 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/cvsCWaGWk differ
+Binary files /dev/null and /tmp/cvs7laWx0 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/cvsDWaGWk differ
+Binary files /dev/null and /tmp/cvs8laWx0 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/cvsEWaGWk differ
+Binary files /dev/null and /tmp/cvs9laWx0 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/cvsFWaGWk differ
+Binary files /dev/null and /tmp/cvs.laWx0 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/cvsGWaGWk differ
+Binary files /dev/null and /tmp/cvs_laWx0 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/cvsHWaGWk differ
+Binary files /dev/null and /tmp/cvsamaWx0 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/cvsIWaGWk differ
+Binary files /dev/null and /tmp/cvsbmaWx0 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/cvsJWaGWk differ
+Binary files /dev/null and /tmp/cvscmaWx0 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/cvsKWaGWk differ
+Binary files /dev/null and /tmp/cvsdmaWx0 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/cvsLWaGWk differ
+Binary files /dev/null and /tmp/cvsemaWx0 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/cvsMWaGWk differ
+Binary files /dev/null and /tmp/cvsfmaWx0 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/cvsNWaGWk differ
+Binary files /dev/null and /tmp/cvsgmaWx0 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/cvsOWaGWk differ
+Binary files /dev/null and /tmp/cvshmaWx0 differ
 Index: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log
 ===================================================================
 RCS file: sc/source/ui/vba/testvba/TestDocuments/logs/excel/AutoFilter.log



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