writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
New commits: commit 3fb00763c6b52dd0b63eb572eba206513300ae88 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Dec 12 08:44:08 2019 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Dec 12 09:38:33 2019 +0100 Use structured binding Change-Id: I1afea430de43f44f0155078327870b8dc0c937e3 Reviewed-on: https://gerrit.libreoffice.org/85012 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 33a64a0878b2..88b985bcfc0b 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4598,13 +4598,11 @@ void DomainMapper_Impl::CloseFieldCommand() { uno::Reference< uno::XInterface > xFieldInterface; - std::tuple<OUString, std::vector<OUString>, std::vector<OUString> > const - field(splitFieldCommand(pContext->GetCommand())); - OUString const sFirstParam(std::get<1>(field).empty() - ? OUString() : std::get<1>(field).front()); + const auto& [sType, vArguments, vSwitches]{ splitFieldCommand(pContext->GetCommand()) }; + (void)vSwitches; + OUString const sFirstParam(vArguments.empty() ? OUString() : vArguments.front()); - FieldConversionMap_t::const_iterator const aIt = - aFieldConversionMap.find(std::get<0>(field)); + FieldConversionMap_t::const_iterator const aIt = aFieldConversionMap.find(sType); if (aIt != aFieldConversionMap.end() && (!m_bForceGenericFields // these need to convert ffData to properties... @@ -4676,7 +4674,7 @@ void DomainMapper_Impl::CloseFieldCommand() { const FieldConversionMap_t& aEnhancedFieldConversionMap = lcl_GetEnhancedFieldConversion(); FieldConversionMap_t::const_iterator aEnhancedIt = - aEnhancedFieldConversionMap.find(std::get<0>(field)); + aEnhancedFieldConversionMap.find(sType); if ( aEnhancedIt != aEnhancedFieldConversionMap.end()) sServiceName += OUString::createFromAscii(aEnhancedIt->second.cFieldServiceName ); } @@ -5336,7 +5334,7 @@ void DomainMapper_Impl::CloseFieldCommand() */ OUString aCode( pContext->GetCommand().trim() ); // Don't waste resources on wrapping shapes inside a fieldmark. - if (std::get<0>(field) != "SHAPE" && m_xTextFactory.is() && !m_aTextAppendStack.empty()) + if (sType != "SHAPE" && m_xTextFactory.is() && !m_aTextAppendStack.empty()) { xFieldInterface = m_xTextFactory->createInstance("com.sun.star.text.Fieldmark"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits