diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-02-06 17:23:58 -0500 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-25 19:58:21 +0200 |
commit | e49b343c11883ac1f75238087698e7f6a9e6abcb (patch) | |
tree | 89b0d9daf9934a6b6318b62ecb4f7c3a391d16e7 /sw/source/filter | |
parent | 75d222c9bc1ffecf38dece206be5fdb7f51766e0 (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>
(cherry picked from commit 97a73d2772a86e26369fc32e25a59c0d5a274c01)
Diffstat (limited to 'sw/source/filter')
-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 2a76ae0cfc40..17c77c4ae776 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1225,7 +1225,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; @@ -1235,7 +1235,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; @@ -1253,11 +1253,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), @@ -1271,9 +1271,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", @@ -1286,7 +1285,6 @@ void DocxExport::WriteCustomXml() "application/xml" ) , oox::getRelationship(Relationship::CUSTOMXMLPROPS), "itemProps"+OUString::number((j+1))+".xml" ); - } } } |