summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-12-12 08:44:08 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2019-12-12 09:38:33 +0100
commit3fb00763c6b52dd0b63eb572eba206513300ae88 (patch)
tree6b27ebeeb60cc85ae7ec16f9d48eeea2b9db7b24 /writerfilter
parent19733236a91cfb7ce38da8ce9b72f8804ff14b0d (diff)
Use structured binding
Change-Id: I1afea430de43f44f0155078327870b8dc0c937e3 Reviewed-on: https://gerrit.libreoffice.org/85012 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx14
1 files changed, 6 insertions, 8 deletions
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");