summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/ximpshap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/ximpshap.cxx')
-rw-r--r--xmloff/source/draw/ximpshap.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 29fd6f35c621..9f67a8225821 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -605,8 +605,6 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
do
{
- XMLPropStyleContext* pDocStyle = nullptr;
-
// set style on shape
if(maDrawStyleName.isEmpty())
break;
@@ -626,10 +624,10 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
OUString aStyleName = maDrawStyleName;
uno::Reference< style::XStyle > xStyle;
- if( dynamic_cast<const XMLShapeStyleContext*>( pStyle ) )
+ XMLPropStyleContext* pDocStyle
+ = dynamic_cast<XMLShapeStyleContext*>(const_cast<SvXMLStyleContext*>(pStyle));
+ if (pDocStyle)
{
- pDocStyle = const_cast<XMLShapeStyleContext*>(dynamic_cast<const XMLShapeStyleContext*>( pStyle ) );
-
if( pDocStyle->GetStyle().is() )
{
xStyle = pDocStyle->GetStyle();