ooo-build r14256 - in trunk: . patches/dev300 patches/vba scratch/sc-vba/testvba/TestDocuments scratch/sc-vba/testvba/TestDocuments/logs/unix
- From: pflin svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14256 - in trunk: . patches/dev300 patches/vba scratch/sc-vba/testvba/TestDocuments scratch/sc-vba/testvba/TestDocuments/logs/unix
- Date: Thu, 9 Oct 2008 07:09:02 +0000 (UTC)
Author: pflin
Date: Thu Oct 9 07:09:02 2008
New Revision: 14256
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14256&view=rev
Log:
2008-10-09 Fong Lin <pflin novell com>
* patches/dev300/apply: add Font.FontStyle and Font.OutlineFont,
fix Font.getItalic.
* patches/vba/vba-font-api.diff.
* scratch/sc-vba/testvba/TestDocuments/CalcFont.xls
* scratch/sc-vba/testvba/TestDocuments/logs/unix/CalcFont.log.
Added:
trunk/patches/vba/vba-font-api.diff
trunk/scratch/sc-vba/testvba/TestDocuments/CalcFont.xls (contents, props changed)
trunk/scratch/sc-vba/testvba/TestDocuments/logs/unix/CalcFont.log
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Thu Oct 9 07:09:02 2008
@@ -1695,6 +1695,8 @@
vba-null-not-treatment.diff
# fix spurious core maniplulating font attributes
vba-fix-font-attribute-access.diff, n#433292
+# add Font.FontStyle and Font.OutlineFont, fix Font.getItalic.
+vba-font-api.diff, Fong
[ VBAUntested ]
SectionOwner => noelpwer
vba-basic-null.diff i#85349, jjiao
Added: trunk/patches/vba/vba-font-api.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-font-api.diff Thu Oct 9 07:09:02 2008
@@ -0,0 +1,123 @@
+--- oovbaapi/org/openoffice/excel/XFont.idl.orig 2008-04-11 17:51:41.000000000 +0800
++++ oovbaapi/org/openoffice/excel/XFont.idl 2008-10-09 13:45:55.000000000 +0800
+@@ -63,6 +63,7 @@ interface XFont
+ [attribute] any Subscript;
+ [attribute] any Superscript;
+ [attribute] any Name;
++ [attribute] any OutlineFont;
+ };
+
+ //=============================================================================
+--- sc/source/ui/vba/vbafont.hxx.orig 2008-10-09 13:41:00.000000000 +0800
++++ sc/source/ui/vba/vbafont.hxx 2008-10-09 13:45:55.000000000 +0800
+@@ -81,6 +81,8 @@ public:
+ virtual void SAL_CALL setName( const css::uno::Any& _name ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getColor() throw (css::uno::RuntimeException) ;
+ virtual void SAL_CALL setColor( const css::uno::Any& _color ) throw (css::uno::RuntimeException) ;
++ virtual css::uno::Any SAL_CALL getOutlineFont() throw (css::uno::RuntimeException) ;
++ virtual void SAL_CALL setOutlineFont( const css::uno::Any& _outlinefont ) throw (css::uno::RuntimeException) ;
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+--- sc/source/ui/vba/vbafont.cxx.orig 2008-10-09 13:41:00.000000000 +0800
++++ sc/source/ui/vba/vbafont.cxx 2008-10-09 13:45:55.000000000 +0800
+@@ -346,22 +346,54 @@ ScVbaFont::getStandardFont() throw ( uno
+ }
+
+ void SAL_CALL
+-ScVbaFont::setFontStyle( const uno::Any& /*aValue*/ ) throw( uno::RuntimeException )
++ScVbaFont::setFontStyle( const uno::Any& aValue ) throw( uno::RuntimeException )
+ {
+-//XXX #TODO# #FIXME#
+- //mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharSize" ) ), ( uno::Any )aValue );
+- throw uno::RuntimeException(
+- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setFontStyle not supported") ), uno::Reference< uno::XInterface >() );
++ sal_Bool bBold = sal_False;
++ sal_Bool bItalic = sal_False;
++
++ rtl::OUString aStyles;
++ aValue >>= aStyles;
++
++ std::vector< rtl::OUString > aTokens;
++ sal_Int32 nIndex = 0;
++ do
++ {
++ rtl::OUString aToken = aStyles.getToken( 0, ' ', nIndex );
++ aTokens.push_back( aToken );
++ }while( nIndex >= 0 );
++
++ std::vector< rtl::OUString >::iterator it;
++ for( it = aTokens.begin(); it != aTokens.end(); ++it )
++ {
++ if( (*it).equalsIgnoreAsciiCaseAscii( "Bold" ) )
++ bBold = sal_True;
++
++ if( (*it).equalsIgnoreAsciiCaseAscii( "Italic" ) )
++ bItalic = sal_True;
++ }
++
++ setBold( uno::makeAny( bBold ) );
++ setItalic( uno::makeAny( bItalic ) );
+ }
+
+
+ uno::Any SAL_CALL
+ ScVbaFont::getFontStyle() throw ( uno::RuntimeException )
+ {
+-//XXX
+- throw uno::RuntimeException(
+- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getFontStyle not supported") ), uno::Reference< uno::XInterface >() );
+- // return uno::Any();
++ rtl::OUStringBuffer aStyles;
++ sal_Bool bValue = sal_False;
++ getBold() >>= bValue;
++ if( bValue )
++ aStyles.appendAscii("Bold");
++
++ getItalic() >>= bValue;
++ if( bValue )
++ {
++ if( aStyles.getLength() )
++ aStyles.appendAscii(" ");
++ aStyles.appendAscii("Italic");
++ }
++ return uno::makeAny( aStyles.makeStringAndClear() );
+ }
+
+ void SAL_CALL
+@@ -504,9 +536,9 @@ ScVbaFont::getItalic() throw ( uno::Runt
+ if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ return aNULL();
+
+- short nValue = 0;
+- mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ) >>= nValue;
+- return uno::makeAny( nValue == awt::FontSlant_ITALIC );
++ awt::FontSlant aFS;
++ mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ) >>= aFS;
++ return uno::makeAny( aFS == awt::FontSlant_ITALIC );
+ }
+
+ void SAL_CALL
+@@ -538,6 +570,22 @@ ScVbaFont::setColor( const uno::Any& _co
+ {
+ mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" ) ) , XLRGBToOORGB(_color));
+ }
++
++void SAL_CALL
++ScVbaFont::setOutlineFont( const uno::Any& aValue ) throw ( uno::RuntimeException )
++{
++ mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ), aValue );
++}
++
++uno::Any SAL_CALL
++ScVbaFont::getOutlineFont() throw (uno::RuntimeException)
++{
++ if ( GetDataSet() )
++ if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, TRUE, NULL) == SFX_ITEM_DONTCARE )
++ return aNULL();
++ return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ) );
++}
++
+ rtl::OUString&
+ ScVbaFont::getServiceImplName()
+ {
Added: trunk/scratch/sc-vba/testvba/TestDocuments/CalcFont.xls
==============================================================================
Binary file. No diff available.
Added: trunk/scratch/sc-vba/testvba/TestDocuments/logs/unix/CalcFont.log
==============================================================================
--- (empty file)
+++ trunk/scratch/sc-vba/testvba/TestDocuments/logs/unix/CalcFont.log Thu Oct 9 07:09:02 2008
@@ -0,0 +1,17 @@
+Test run started : 10/09/2008 02:40:17 PM
+CalcFont_Format
+ TEST START : Font_Format
+ ITEM Assertion OK : correctly set font to Bold
+ ITEM Assertion OK : correctly set font to Italic
+ ITEM Assertion OK : correctly read FontStyle
+ ITEM Assertion OK : correctly set font to Shadow
+ ITEM Assertion OK : correctly set font color
+ ITEM Assertion OK : correctly set font color index
+ ITEM Assertion OK : correctly set font name
+ ITEM Assertion OK : correctly set font outline
+ ITEM Assertion OK : correctly set font size
+ ITEM Assertion OK : correctly set font strikethrough
+ ITEM Assertion OK : correctly set font underline
+ TEST Success. : Font_Format
+CalcFont_Format
+Test run finished : 10/09/2008 02:40:17 PM
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]