ooo-build r15104 - in branches/ooo-build-3-0: . patches/dev300 patches/vba
- From: pflin svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15104 - in branches/ooo-build-3-0: . patches/dev300 patches/vba
- Date: Tue, 20 Jan 2009 03:49:03 +0000 (UTC)
Author: pflin
Date: Tue Jan 20 03:49:03 2009
New Revision: 15104
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15104&view=rev
Log:
2009-01-20 Fong Lin <pflin novell com>
* patches/dev300/apply:
* patches/vba/vba-interior-object-fix.diff: Fix for bnc#459749.
Added:
branches/ooo-build-3-0/patches/vba/vba-interior-object-fix.diff
Modified:
branches/ooo-build-3-0/ChangeLog
branches/ooo-build-3-0/patches/dev300/apply
Modified: branches/ooo-build-3-0/patches/dev300/apply
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/apply (original)
+++ branches/ooo-build-3-0/patches/dev300/apply Tue Jan 20 03:49:03 2009
@@ -1704,6 +1704,7 @@
vba-fix-range-select-focus.diff, n#444156
vba-fix-docmodule-import-crash.diff, n#447560
+vba-interior-object-fix.diff, n#459479, Fong
[ VBAUntested ]
SectionOwner => noelpwer
Added: branches/ooo-build-3-0/patches/vba/vba-interior-object-fix.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0/patches/vba/vba-interior-object-fix.diff Tue Jan 20 03:49:03 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]