diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 10:38:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 20:19:15 +0200 |
commit | c0a4af22ed3cac188274fe51cbf3bcfe47d6acf8 (patch) | |
tree | d47c3167f7357e932a77c678a883d95638afbcdc /sw/source/filter/xml/xmlfmte.cxx | |
parent | 4209d94b46cdd96898c02344b11700369ae88784 (diff) |
loplugin:flatten in sw/filter/xml
Change-Id: If018f8b03816d8110bd3ba9eec3f26373e6c5a6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99803
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml/xmlfmte.cxx')
-rw-r--r-- | sw/source/filter/xml/xmlfmte.cxx | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index eb38216546d5..ff9b22ab3472 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -295,41 +295,41 @@ void SwXMLAutoStylePoolP::exportStyleAttributes( { SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap); - if( XmlStyleFamily::TEXT_PARAGRAPH == nFamily ) + if( XmlStyleFamily::TEXT_PARAGRAPH != nFamily ) + return; + + for( const auto& rProperty : rProperties ) { - for( const auto& rProperty : rProperties ) + if (rProperty.mnIndex != -1) // #i26762# { - if (rProperty.mnIndex != -1) // #i26762# + switch( rPropExp.getPropertySetMapper()-> + GetEntryContextId( rProperty.mnIndex ) ) { - switch( rPropExp.getPropertySetMapper()-> - GetEntryContextId( rProperty.mnIndex ) ) + case CTF_NUMBERINGSTYLENAME: { - case CTF_NUMBERINGSTYLENAME: - { - OUString sStyleName; - rProperty.maValue >>= sStyleName; - // #i70748# - export also empty list styles - if( !sStyleName.isEmpty() ) - { - OUString sTmp = rExport.GetTextParagraphExport()->GetListAutoStylePool().Find( sStyleName ); - if( !sTmp.isEmpty() ) - sStyleName = sTmp; - } - GetExport().AddAttribute( XML_NAMESPACE_STYLE, - sListStyleName, - GetExport().EncodeStyleName( sStyleName ) ); - } - break; - case CTF_PAGEDESCNAME: + OUString sStyleName; + rProperty.maValue >>= sStyleName; + // #i70748# - export also empty list styles + if( !sStyleName.isEmpty() ) { - OUString sStyleName; - rProperty.maValue >>= sStyleName; - GetExport().AddAttribute( XML_NAMESPACE_STYLE, - sMasterPageName, - GetExport().EncodeStyleName( sStyleName ) ); + OUString sTmp = rExport.GetTextParagraphExport()->GetListAutoStylePool().Find( sStyleName ); + if( !sTmp.isEmpty() ) + sStyleName = sTmp; } - break; + GetExport().AddAttribute( XML_NAMESPACE_STYLE, + sListStyleName, + GetExport().EncodeStyleName( sStyleName ) ); + } + break; + case CTF_PAGEDESCNAME: + { + OUString sStyleName; + rProperty.maValue >>= sStyleName; + GetExport().AddAttribute( XML_NAMESPACE_STYLE, + sMasterPageName, + GetExport().EncodeStyleName( sStyleName ) ); } + break; } } } |