diff options
author | Jan Holesovsky <kendy@collabora.com> | 2016-06-23 10:18:35 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-06-23 10:58:32 +0200 |
commit | a07a69850acddae631d6bd9496ace0c35accdda5 (patch) | |
tree | 55dd27860faecd4e8e39e40abf576cb8585e8f4f /xmloff/source/chart/SchXMLAxisContext.cxx | |
parent | 535ac37c5ff9b9dc60f6f56e4cfd518eff764975 (diff) |
Introduce FillAutoStyle() method to reduce copy'n'paste.
Change-Id: Ibdb6ae15790cc117d3d8c41c57924f9b22e85cba
Diffstat (limited to 'xmloff/source/chart/SchXMLAxisContext.cxx')
-rw-r--r-- | xmloff/source/chart/SchXMLAxisContext.cxx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 9feded25e6e1..652e223214ed 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -219,18 +219,8 @@ void SchXMLAxisContext::CreateGrid( const OUString& sAutoStyleName, bool bIsMajo // the line color is black as default, in the model it is a light gray xGridProp->setPropertyValue("LineColor", uno::makeAny( COL_BLACK )); - if( !sAutoStyleName.isEmpty()) - { - const SvXMLStylesContext* pStylesCtxt = m_rImportHelper.GetAutoStylesContext(); - if( pStylesCtxt ) - { - const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext( - SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName ); - - if( pStyle && dynamic_cast<const XMLPropStyleContext*>( pStyle) != nullptr) - const_cast<XMLPropStyleContext*>( static_cast< const XMLPropStyleContext* >( pStyle ))->FillPropertySet( xGridProp ); - } - } + if (!sAutoStyleName.isEmpty()) + m_rImportHelper.FillAutoStyle(sAutoStyleName, xGridProp); } } |