[Libreoffice-commits] core.git: writerfilter/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Mon Jun 19 00:10:17 UTC 2017


 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 493407c470e7051a801e2a0ad8253f7b87c4434f
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Mon Jun 19 00:08:22 2017 +0200

    writerfilter: don't copy constant maps
    
    Change-Id: I87bc0bea5db27a967f996c7597b6f4884a748b56
    Reviewed-on: https://gerrit.libreoffice.org/38938
    Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
    Tested-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 635c06ea0f54..f6b45597ebf5 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3703,7 +3703,7 @@ void DomainMapper_Impl::CloseFieldCommand()
         m_bSetUserFieldContent = false;
         m_bSetCitation = false;
         m_bSetDateValue = false;
-        FieldConversionMap_t aFieldConversionMap = lcl_GetFieldConversion();
+        const FieldConversionMap_t& aFieldConversionMap = lcl_GetFieldConversion();
 
         try
         {
@@ -3714,7 +3714,7 @@ void DomainMapper_Impl::CloseFieldCommand()
             OUString const sFirstParam(std::get<1>(field).empty()
                     ? OUString() : std::get<1>(field).front());
 
-            FieldConversionMap_t::iterator const aIt =
+            FieldConversionMap_t::const_iterator const aIt =
                 aFieldConversionMap.find(std::get<0>(field));
             if(aIt != aFieldConversionMap.end())
             {
@@ -3768,8 +3768,8 @@ void DomainMapper_Impl::CloseFieldCommand()
                     OUString sServiceName("com.sun.star.text.");
                     if ( bCreateEnhancedField )
                     {
-                        FieldConversionMap_t aEnhancedFieldConversionMap = lcl_GetEnhancedFieldConversion();
-                        FieldConversionMap_t::iterator aEnhancedIt =
+                        const FieldConversionMap_t& aEnhancedFieldConversionMap = lcl_GetEnhancedFieldConversion();
+                        FieldConversionMap_t::const_iterator aEnhancedIt =
                             aEnhancedFieldConversionMap.find(std::get<0>(field));
                         if ( aEnhancedIt != aEnhancedFieldConversionMap.end())
                             sServiceName += OUString::createFromAscii(aEnhancedIt->second.cFieldServiceName );


More information about the Libreoffice-commits mailing list