ooo-build r15130 - in trunk: . patches/dev300 patches/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15130 - in trunk: . patches/dev300 patches/vba
- Date: Thu, 22 Jan 2009 10:37:19 +0000 (UTC)
Author: noelpwer
Date: Thu Jan 22 10:37:19 2009
New Revision: 15130
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15130&view=rev
Log:
2009-01-22 Noel Power <noel power novell com>
* patches/vba/vba-interior-object-fix.diff: bnc#459479
* patches/dev300/apply: add above
Added:
trunk/patches/vba/vba-interior-object-fix.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Thu Jan 22 10:37:19 2009
@@ -1886,11 +1886,12 @@
i97038-dateserial-fix.diff, Fong
forms-imageurl-fix.diff, n#446637, i#97892
+
[ VBAObjects ]
# vba for word support
#vba-word-support.diff, Fong
#vba-word-executable-option.diff, Fong
-
+vba-interior-object-fix.diff, n#459479, Fong
[ VBAUntested ]
SectionOwner => noelpwer
vba-basic-null.diff i#85349, jjiao
Added: trunk/patches/vba/vba-interior-object-fix.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-interior-object-fix.diff Thu Jan 22 10:37:19 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]