diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-02-06 17:23:58 -0500 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2018-02-14 01:04:11 +0100 |
commit | 97a73d2772a86e26369fc32e25a59c0d5a274c01 (patch) | |
tree | fae4c3f1ac913437cff256a06bb086180232193d /sw/source | |
parent | 335a2b80fa900848a8b60d8fd5db6656bc30a95a (diff) |
oox: cosmetic cleanup
Change-Id: Ifafd7338ddfec8b707b5ddf4acb39512faf186da
Reviewed-on: https://gerrit.libreoffice.org/49325
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index f65cc2fdec3b..89dc6b8bf0a1 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1221,7 +1221,7 @@ void DocxExport::WriteCustomXml() uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + static const OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; if ( !xPropSetInfo->hasPropertyByName( aName ) ) return; @@ -1231,7 +1231,7 @@ void DocxExport::WriteCustomXml() xPropSet->getPropertyValue( aName ) >>= propList; for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) { - OUString propName = propList[nProp].Name; + const OUString propName = propList[nProp].Name; if ( propName == "OOXCustomXml" ) { propList[nProp].Value >>= customXmlDomlist; @@ -1249,11 +1249,11 @@ void DocxExport::WriteCustomXml() } } - for (sal_Int32 j = 0; j < customXmlDomlist.getLength(); j++) { - + for (sal_Int32 j = 0; j < customXmlDomlist.getLength(); j++) + { uno::Reference<xml::dom::XDocument> customXmlDom = customXmlDomlist[j]; uno::Reference<xml::dom::XDocument> customXmlDomProps = customXmlDomPropslist[j]; - if ( customXmlDom.is() ) + if (customXmlDom.is()) { m_pFilter->addRelation( m_pDocumentFS->getOutputStream(), oox::getRelationship(Relationship::CUSTOMXML), @@ -1267,9 +1267,8 @@ void DocxExport::WriteCustomXml() uno::Sequence< beans::StringPair >() ); } - if ( customXmlDomProps.is() ) + if (customXmlDomProps.is()) { - uno::Reference< xml::sax::XSAXSerializable > serializer( customXmlDomProps, uno::UNO_QUERY ); uno::Reference< xml::sax::XWriter > writer = xml::sax::Writer::create( comphelper::getProcessComponentContext() ); writer->setOutputStream( GetFilter().openFragmentStream( "customXml/itemProps"+OUString::number((j+1))+".xml", @@ -1282,7 +1281,6 @@ void DocxExport::WriteCustomXml() "application/xml" ) , oox::getRelationship(Relationship::CUSTOMXMLPROPS), "itemProps"+OUString::number((j+1))+".xml" ); - } } } |