From 5a2f080997ee82a828fb36b5117c44a6e1056a3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Stefanik?= <netrolller.3d@gmail.com>
Date: Sat, 7 Apr 2012 19:28:05 +0200
Subject: [PATCH] Kill vbaFontBase::get/setUnderline

---
 unusedcode.easy                            |    2 -
 vbahelper/inc/vbahelper/vbafontbase.hxx    |    2 -
 vbahelper/source/vbahelper/vbafontbase.cxx |   62 ----------------------------
 3 files changed, 0 insertions(+), 66 deletions(-)

diff --git a/unusedcode.easy b/unusedcode.easy
index 4140104..8a8a891 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -300,8 +300,6 @@ VCLXDevice::IsCreatedWithToolkit() const
 VCLXPrinterServer::getImplementationId()
 VCLXPrinterServer::getTypes()
 VCLXRadioButton::getFirstActionListener()
-VbaFontBase::getUnderline()
-VbaFontBase::setUnderline(com::sun::star::uno::Any const&)
 VbaFoundFilesEnum::SetFileList(com::sun::star::uno::Sequence<rtl::OUString>&)
 VbaFoundFilesEnum::VbaFoundFilesEnum()
 VclEventListeners2::~VclEventListeners2()
diff --git a/vbahelper/inc/vbahelper/vbafontbase.hxx b/vbahelper/inc/vbahelper/vbafontbase.hxx
index 8e2ad0f..914cd68 100644
--- a/vbahelper/inc/vbahelper/vbafontbase.hxx
+++ b/vbahelper/inc/vbahelper/vbafontbase.hxx
@@ -82,8 +82,6 @@ public:
     virtual void SAL_CALL setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno::RuntimeException);
     virtual css::uno::Any SAL_CALL getBold() throw (css::uno::RuntimeException);
     virtual void SAL_CALL setBold( const css::uno::Any& _bold ) throw (css::uno::RuntimeException);
-    virtual css::uno::Any SAL_CALL getUnderline() throw (css::uno::RuntimeException) = 0;
-    virtual void SAL_CALL setUnderline( const css::uno::Any& _underline ) throw (css::uno::RuntimeException) = 0;
     virtual css::uno::Any SAL_CALL getStrikethrough() throw (css::uno::RuntimeException);
     virtual void SAL_CALL setStrikethrough( const css::uno::Any& _strikethrough ) throw (css::uno::RuntimeException);
     virtual css::uno::Any SAL_CALL getShadow() throw (css::uno::RuntimeException);
diff --git a/vbahelper/source/vbahelper/vbafontbase.cxx b/vbahelper/source/vbahelper/vbafontbase.cxx
index 3f681c6..59dc77f 100644
--- a/vbahelper/source/vbahelper/vbafontbase.cxx
+++ b/vbahelper/source/vbahelper/vbafontbase.cxx
@@ -276,66 +276,4 @@ VbaFontBase::setColor( const uno::Any& _color  ) throw (uno::RuntimeException)
     mxFont->setPropertyValue( VBAFONTBASE_PROPNAME( "CharColor", "TextColor" ), XLRGBToOORGB(_color) );
 }
 
-void SAL_CALL
-VbaFontBase::setUnderline( const uno::Any& /*aValue*/ ) throw ( uno::RuntimeException )
-{
-/*
-    // default
-    sal_Int32 nValue = excel::XlUnderlineStyle::xlUnderlineStyleNone;
-    aValue >>= nValue;
-    switch ( nValue )
-    {
-// NOTE:: #TODO #FIMXE
-// xlUnderlineStyleDoubleAccounting & xlUnderlineStyleSingleAccounting
-// don't seem to be supported in Openoffice.
-// The import filter converts them to single or double underlines as appropriate
-// So, here at the moment we are similarly silently converting
-// xlUnderlineStyleSingleAccounting to xlUnderlineStyleSingle.
-
-        case excel::XlUnderlineStyle::xlUnderlineStyleNone:
-            nValue = awt::FontUnderline::NONE;
-            break;
-        case excel::XlUnderlineStyle::xlUnderlineStyleSingle:
-        case excel::XlUnderlineStyle::xlUnderlineStyleSingleAccounting:
-            nValue = awt::FontUnderline::SINGLE;
-            break;
-        case excel::XlUnderlineStyle::xlUnderlineStyleDouble:
-        case excel::XlUnderlineStyle::xlUnderlineStyleDoubleAccounting:
-            nValue = awt::FontUnderline::DOUBLE;
-            break;
-        default:
-            throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown value for Underline")), uno::Reference< uno::XInterface >() );
-    }
-
-    mxFont->setPropertyValue( VBAFONTBASE_PROPNAME( "CharUnderline", "FontUnderline" ), uno::Any( nValue ) );
-*/
-
-}
-
-uno::Any SAL_CALL
-VbaFontBase::getUnderline() throw ( uno::RuntimeException )
-{
-    sal_Int32 nValue = awt::FontUnderline::NONE;
-    mxFont->getPropertyValue( VBAFONTBASE_PROPNAME( "CharUnderline", "FontUnderline" ) ) >>= nValue;
-/*
-    switch ( nValue )
-    {
-        case  awt::FontUnderline::DOUBLE:
-            nValue = excel::XlUnderlineStyle::xlUnderlineStyleDouble;
-            break;
-        case  awt::FontUnderline::SINGLE:
-            nValue = excel::XlUnderlineStyle::xlUnderlineStyleSingle;
-            break;
-        case  awt::FontUnderline::NONE:
-            nValue = excel::XlUnderlineStyle::xlUnderlineStyleNone;
-            break;
-        default:
-            throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown value retrieved for Underline") ), uno::Reference< uno::XInterface >() );
-
-    }
-*/
-    return uno::makeAny( nValue );
-}
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
1.7.7

