summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/unoidl/unohelp.hxx17
-rw-r--r--sd/source/ui/unoidl/unolayer.cxx16
2 files changed, 4 insertions, 29 deletions
diff --git a/sd/source/ui/unoidl/unohelp.hxx b/sd/source/ui/unoidl/unohelp.hxx
index 5afa24d9d7c9..130fd0fc41e9 100644
--- a/sd/source/ui/unoidl/unohelp.hxx
+++ b/sd/source/ui/unoidl/unohelp.hxx
@@ -19,23 +19,6 @@
namespace sd
{
-inline bool any2bool( const ::com::sun::star::uno::Any& rAny, bool& rBool )
-{
- if( rAny.getValueType() == ::getCppuBooleanType() )
- {
- rBool = *(sal_Bool*)rAny.getValue();
- }
- else
- {
- sal_Int32 nValue = 0;
- if(!(rAny >>= nValue))
- return false;
- rBool = nValue != 0;
- }
-
- return true;
-}
-
inline void bool2any( bool bBool, ::com::sun::star::uno::Any& rAny )
{
rAny.setValue( &bBool, ::getCppuBooleanType() );
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index 118ec3fcb166..f674bf0f06dd 100644
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -22,6 +22,7 @@
#include "unolayer.hxx"
#include <osl/mutex.hxx>
+#include <comphelper/extract.hxx>
#include <svx/svdpagv.hxx>
#include <svx/unoshape.hxx>
#include <svx/svdobj.hxx>
@@ -192,26 +193,17 @@ void SAL_CALL SdLayer::setPropertyValue( const OUString& aPropertyName, const un
{
case WID_LAYER_LOCKED:
{
- bool bValue = false;
- if(!sd::any2bool( aValue, bValue ))
- throw lang::IllegalArgumentException();
- set( LOCKED, bValue );
+ set(LOCKED, cppu::any2bool(aValue));
break;
}
case WID_LAYER_PRINTABLE:
{
- bool bValue = false;
- if(!sd::any2bool( aValue, bValue ))
- throw lang::IllegalArgumentException();
- set( PRINTABLE, bValue );
+ set(PRINTABLE, cppu::any2bool(aValue));
break;
}
case WID_LAYER_VISIBLE:
{
- bool bValue = false;
- if(!sd::any2bool( aValue, bValue ))
- throw lang::IllegalArgumentException();
- set( VISIBLE, bValue );
+ set(VISIBLE, cppu::any2bool(aValue));
break;
}
case WID_LAYER_NAME: