ooo-build r15241 - in branches/opensuse-11-1: . patches/dev300 patches/vba



Author: pmladek
Date: Thu Jan 29 17:27:57 2009
New Revision: 15241
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15241&view=rev

Log:
2009-01-29  Petr Mladek  <pmladek suse cz>

	* patches/dev300/apply:
	* patches/vba/vba-interior-object-fix.diff: Fix for bnc#459479.
	  (port from ooo-build-3-0-1, patch by Fong Lin  <pflin novell com>)



Added:
   branches/opensuse-11-1/patches/vba/vba-interior-object-fix.diff
Modified:
   branches/opensuse-11-1/ChangeLog
   branches/opensuse-11-1/patches/dev300/apply

Modified: branches/opensuse-11-1/patches/dev300/apply
==============================================================================
--- branches/opensuse-11-1/patches/dev300/apply	(original)
+++ branches/opensuse-11-1/patches/dev300/apply	Thu Jan 29 17:27:57 2009
@@ -1690,6 +1690,8 @@
 vba-fix-docmodule-import-crash.diff, n#447560
 
 vba-xl-import-crash.diff, n#458985
+vba-interior-object-fix.diff, n#459479, Fong
+
 [ VBAUntested ]
 SectionOwner => noelpwer
 vba-basic-null.diff i#85349, jjiao

Added: branches/opensuse-11-1/patches/vba/vba-interior-object-fix.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-11-1/patches/vba/vba-interior-object-fix.diff	Thu Jan 29 17:27:57 2009
@@ -0,0 +1,52 @@
+diff --git sc/source/ui/vba/vbainterior.cxx sc/source/ui/vba/vbainterior.cxx
+index 99f1bd7..e9f538a 100644
+--- sc/source/ui/vba/vbainterior.cxx
++++ sc/source/ui/vba/vbainterior.cxx
+@@ -162,11 +162,19 @@ ScVbaInterior::setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno
+ {
+ 	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 ) ) );
++
++    // hackly for excel::XlColorIndex::xlColorIndexNone
++    if( nIndex == excel::XlColorIndex::xlColorIndexNone )
++    {
++        m_xProps->setPropertyValue( BACKCOLOR, uno::makeAny( sal_Int32( -1 ) ) );
++    }
++    else
++    {
++	    // 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 )
+@@ -204,13 +212,21 @@ uno::Any SAL_CALL
+ ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
+ {
+ 	sal_Int32 nColor = 0;
++    // hackly for excel::XlColorIndex::xlColorIndexNone
++    uno::Any aColor = m_xProps->getPropertyValue( BACKCOLOR ); 
++    if( ( aColor >>= nColor ) && ( nColor == -1 ) )
++    {
++        nColor = excel::XlColorIndex::xlColorIndexNone;
++        return uno::makeAny( nColor );
++    }
++
+ 	// 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 ) );
++	return uno::makeAny( GetColorIndex( nColor ) );
+ }
+ Color
+ ScVbaInterior::GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern )



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