summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/XPropertyTable.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-10 18:54:33 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-10 18:54:33 +0200
commite8470e703e569ed895055e0fb6c0f37843f84e3e (patch)
tree4f258507d9758fe4717230bc217eb7c54e50c893 /svx/source/unodraw/XPropertyTable.cxx
parent80c35d97b9b3b60a091aae77de0ffef38cbf531a (diff)
Clean up uses of Any::getValue() in svx
Change-Id: Ie0b253227df8ea4bd24643aa2622afadabf4eb54
Diffstat (limited to 'svx/source/unodraw/XPropertyTable.cxx')
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index dc036a1546c5..d1016614b92b 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/drawing/Hatch.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
+#include <o3tl/any.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
@@ -334,11 +335,11 @@ uno::Any SvxUnoXLineEndTable::getAny( const XPropertyEntry* pEntry ) const throw
XPropertyEntry* SvxUnoXLineEndTable::getEntry( const OUString& rName, const uno::Any& rAny ) const throw(lang::IllegalArgumentException)
{
- if( !rAny.getValue() || rAny.getValueType() != cppu::UnoType<drawing::PolyPolygonBezierCoords>::get())
+ auto pCoords = o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(rAny);
+ if( !pCoords )
return nullptr;
basegfx::B2DPolyPolygon aPolyPolygon;
- drawing::PolyPolygonBezierCoords const * pCoords = static_cast<drawing::PolyPolygonBezierCoords const *>(rAny.getValue());
if( pCoords->Coordinates.getLength() > 0 )
aPolyPolygon = basegfx::unotools::polyPolygonBezierToB2DPolyPolygon( *pCoords );