summaryrefslogtreecommitdiff
path: root/xmloff/source/chart/SchXMLPlotAreaContext.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-06-22 15:49:56 +0200
committerJan Holesovsky <kendy@collabora.com>2016-06-22 15:50:47 +0200
commit56a4c9b9ce28a87f18ea82675d215328905c2f12 (patch)
tree310159f420afe5a7cb303dbac02ee9c64e2171fd /xmloff/source/chart/SchXMLPlotAreaContext.cxx
parent9c07735a0160864c949ac27de1821d6967181516 (diff)
Simplify dynamic_cast followed by a static_cast.
Change-Id: Ie4b92f3763d2d695709a4919faceb520f874897f
Diffstat (limited to 'xmloff/source/chart/SchXMLPlotAreaContext.cxx')
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx25
1 files changed, 12 insertions, 13 deletions
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 04b31d872bad..65ddc9a59133 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -798,18 +798,17 @@ void SchXMLWallFloorContext::StartElement( const uno::Reference< xml::sax::XAttr
? mxWallFloorSupplier->getWall()
: mxWallFloorSupplier->getFloor(),
uno::UNO_QUERY );
- if( xProp.is())
+ if (xProp.is())
{
- if( !sAutoStyleName.isEmpty())
+ if (!sAutoStyleName.isEmpty())
{
const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
- if( pStylesCtxt )
+ if (pStylesCtxt)
{
- const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
- SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
+ SvXMLStyleContext* pStyle = const_cast<SvXMLStyleContext*>(pStylesCtxt->FindStyleChildContext(SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName));
- if( pStyle && dynamic_cast< const XMLPropStyleContext*>(pStyle) != nullptr)
- const_cast<XMLPropStyleContext*>( static_cast<const XMLPropStyleContext*>( pStyle ) )->FillPropertySet( xProp );
+ if (XMLPropStyleContext* pPropStyle = dynamic_cast<XMLPropStyleContext*>(pStyle))
+ pPropStyle->FillPropertySet(xProp);
}
}
}
@@ -870,16 +869,16 @@ void SchXMLStockContext::StartElement( const uno::Reference< xml::sax::XAttribut
xProp = mxStockPropProvider->getMinMaxLine();
break;
}
- if( xProp.is())
+
+ if (xProp.is())
{
const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
- if( pStylesCtxt )
+ if (pStylesCtxt)
{
- const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
- SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
+ SvXMLStyleContext* pStyle = const_cast<SvXMLStyleContext*>(pStylesCtxt->FindStyleChildContext(SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName));
- if( pStyle && dynamic_cast< const XMLPropStyleContext*>(pStyle) != nullptr)
- const_cast<XMLPropStyleContext*>( static_cast<const XMLPropStyleContext*>( pStyle ) )->FillPropertySet( xProp );
+ if (XMLPropStyleContext* pPropStyle = dynamic_cast<XMLPropStyleContext*>(pStyle))
+ pPropStyle->FillPropertySet(xProp);
}
}
}