summaryrefslogtreecommitdiff
path: root/vbahelper/source/msforms/vbanewfont.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vbahelper/source/msforms/vbanewfont.cxx')
-rw-r--r--vbahelper/source/msforms/vbanewfont.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/vbahelper/source/msforms/vbanewfont.cxx b/vbahelper/source/msforms/vbanewfont.cxx
index 39293ade4095..30860e10a0ef 100644
--- a/vbahelper/source/msforms/vbanewfont.cxx
+++ b/vbahelper/source/msforms/vbanewfont.cxx
@@ -30,42 +30,42 @@ using namespace ::ooo::vba;
VbaNewFont::VbaNewFont(
- const uno::Reference< beans::XPropertySet >& rxModelProps ) throw (uno::RuntimeException) :
+ const uno::Reference< beans::XPropertySet >& rxModelProps ) :
mxProps( rxModelProps, uno::UNO_SET_THROW )
{
}
// XNewFont attributes
-OUString SAL_CALL VbaNewFont::getName() throw (uno::RuntimeException, std::exception)
+OUString SAL_CALL VbaNewFont::getName()
{
uno::Any aAny = mxProps->getPropertyValue( "FontName" );
return aAny.get< OUString >();
}
-void SAL_CALL VbaNewFont::setName( const OUString& rName ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL VbaNewFont::setName( const OUString& rName )
{
mxProps->setPropertyValue( "FontName" , uno::Any( rName ) );
}
-double SAL_CALL VbaNewFont::getSize() throw (uno::RuntimeException, std::exception)
+double SAL_CALL VbaNewFont::getSize()
{
uno::Any aAny = mxProps->getPropertyValue( "FontHeight" );
return aAny.get< float >();
}
-void SAL_CALL VbaNewFont::setSize( double fSize ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL VbaNewFont::setSize( double fSize )
{
mxProps->setPropertyValue( "FontHeight" , uno::Any( static_cast< float >( fSize ) ) );
}
-sal_Int16 SAL_CALL VbaNewFont::getCharset() throw (uno::RuntimeException, std::exception)
+sal_Int16 SAL_CALL VbaNewFont::getCharset()
{
uno::Any aAny = mxProps->getPropertyValue( "FontCharset" );
return rtl_getBestWindowsCharsetFromTextEncoding( static_cast< rtl_TextEncoding >( aAny.get< sal_Int16 >() ) );
}
-void SAL_CALL VbaNewFont::setCharset( sal_Int16 nCharset ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL VbaNewFont::setCharset( sal_Int16 nCharset )
{
rtl_TextEncoding eFontEnc = RTL_TEXTENCODING_DONTKNOW;
if( (0 <= nCharset) && (nCharset <= SAL_MAX_UINT8) )
@@ -75,56 +75,56 @@ void SAL_CALL VbaNewFont::setCharset( sal_Int16 nCharset ) throw (uno::RuntimeEx
mxProps->setPropertyValue( "FontCharset" , uno::Any( static_cast< sal_Int16 >( eFontEnc ) ) );
}
-sal_Int16 SAL_CALL VbaNewFont::getWeight() throw (uno::RuntimeException, std::exception)
+sal_Int16 SAL_CALL VbaNewFont::getWeight()
{
return getBold() ? 700 : 400;
}
-void SAL_CALL VbaNewFont::setWeight( sal_Int16 nWeight ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL VbaNewFont::setWeight( sal_Int16 nWeight )
{
setBold( nWeight >= 700 );
}
-sal_Bool SAL_CALL VbaNewFont::getBold() throw (uno::RuntimeException, std::exception)
+sal_Bool SAL_CALL VbaNewFont::getBold()
{
uno::Any aAny = mxProps->getPropertyValue( "FontWeight" );
return aAny.get< float >() > awt::FontWeight::NORMAL;
}
-void SAL_CALL VbaNewFont::setBold( sal_Bool bBold ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL VbaNewFont::setBold( sal_Bool bBold )
{
mxProps->setPropertyValue( "FontWeight" , uno::Any( bBold ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) );
}
-sal_Bool SAL_CALL VbaNewFont::getItalic() throw (uno::RuntimeException, std::exception)
+sal_Bool SAL_CALL VbaNewFont::getItalic()
{
uno::Any aAny = mxProps->getPropertyValue( "FontSlant" );
return aAny.get< awt::FontSlant >() != awt::FontSlant_NONE;
}
-void SAL_CALL VbaNewFont::setItalic( sal_Bool bItalic ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL VbaNewFont::setItalic( sal_Bool bItalic )
{
mxProps->setPropertyValue( "FontSlant" , uno::Any( bItalic ? awt::FontSlant_ITALIC : awt::FontSlant_NONE ) );
}
-sal_Bool SAL_CALL VbaNewFont::getUnderline() throw (uno::RuntimeException, std::exception)
+sal_Bool SAL_CALL VbaNewFont::getUnderline()
{
uno::Any aAny = mxProps->getPropertyValue("FontUnderline" );
return aAny.get< sal_Int16 >() != awt::FontUnderline::NONE;
}
-void SAL_CALL VbaNewFont::setUnderline( sal_Bool bUnderline ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL VbaNewFont::setUnderline( sal_Bool bUnderline )
{
mxProps->setPropertyValue("FontUnderline" , uno::Any( bUnderline ? awt::FontUnderline::SINGLE : awt::FontUnderline::NONE ) );
}
-sal_Bool SAL_CALL VbaNewFont::getStrikethrough() throw (uno::RuntimeException, std::exception)
+sal_Bool SAL_CALL VbaNewFont::getStrikethrough()
{
uno::Any aAny = mxProps->getPropertyValue( "FontStrikeout" );
return aAny.get< sal_Int16 >() != awt::FontStrikeout::NONE;
}
-void SAL_CALL VbaNewFont::setStrikethrough( sal_Bool bStrikethrough ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL VbaNewFont::setStrikethrough( sal_Bool bStrikethrough )
{
mxProps->setPropertyValue( "FontStrikeout" ,uno::Any( bStrikethrough ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE ) );
}