sc/source/ui/vba/vbafont.cxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
New commits: commit 101971ab1c32ad386149bdc1797045b3f43dbe20 Author: Tamas Bunth <tamas.bu...@collabora.co.uk> Date: Tue Jun 27 11:49:43 2017 +0200 oovbaapi: do not use properties for formControl UnderLine, CharContoured and ColorIndex does not work for formControl, (WrappedTargetRuntimeException), disable it for now. Change-Id: Ibc16d91bf90011131386c30a218690c0f4e74797 Reviewed-on: https://gerrit.libreoffice.org/39291 Reviewed-by: Tamás Bunth <btom...@gmail.com> Tested-by: Tamás Bunth <btom...@gmail.com> diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index da38074e316d..36ef891c0b94 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -70,6 +70,9 @@ ScVbaFont::getSize() void SAL_CALL ScVbaFont::setColorIndex( const uno::Any& _colorindex ) { + if(mbFormControl) + return; + sal_Int32 nIndex = 0; _colorindex >>= nIndex; // #FIXME xlColorIndexAutomatic & xlColorIndexNone are not really @@ -87,6 +90,8 @@ ScVbaFont::setColorIndex( const uno::Any& _colorindex ) uno::Any SAL_CALL ScVbaFont::getColorIndex() { + if(mbFormControl) + return uno::Any( (sal_Int32) 0 ); if ( GetDataSet() ) if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR) == SfxItemState::DONTCARE ) return aNULL(); @@ -187,6 +192,9 @@ ScVbaFont::getBold() void SAL_CALL ScVbaFont::setUnderline( const uno::Any& aValue ) { + if(mbFormControl) + return; + // default sal_Int32 nValue = excel::XlUnderlineStyle::xlUnderlineStyleNone; aValue >>= nValue; @@ -226,6 +234,10 @@ ScVbaFont::getUnderline() return aNULL(); sal_Int32 nValue = awt::FontUnderline::NONE; + + if(mbFormControl) + return uno::makeAny( nValue ); + mxFont->getPropertyValue("CharUnderline") >>= nValue; switch ( nValue ) { @@ -293,7 +305,8 @@ ScVbaFont::getColor() void SAL_CALL ScVbaFont::setOutlineFont( const uno::Any& aValue ) { - mxFont->setPropertyValue("CharContoured", aValue ); + if(!mbFormControl) + mxFont->setPropertyValue("CharContoured", aValue ); } uno::Any SAL_CALL @@ -302,7 +315,7 @@ ScVbaFont::getOutlineFont() if ( GetDataSet() ) if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR) == SfxItemState::DONTCARE ) return aNULL(); - return mxFont->getPropertyValue("CharContoured"); + return mbFormControl ? uno::Any( false ) : mxFont->getPropertyValue("CharContoured"); } OUString
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits