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

Varun Dhall varun.dhall at studentpartner.com
Tue Jul 18 09:48:48 UTC 2017


 sw/source/core/doc/tblafmt.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 315b6afc90298ac23de7d24449feae6beaade17a
Author: Varun Dhall <varun.dhall at studentpartner.com>
Date:   Tue Jul 18 01:28:40 2017 +0530

    Partially revert c1723a3b6
    The loop behavior was changed by the original commit
    instead of starting from 1 it started from 0 due to which
    it ends up saving Default Style and missed an important custom style
    
    Change-Id: I4853b70fbb6a24c9ccbd0b5713c6dbe4215830a6
    Reviewed-on: https://gerrit.libreoffice.org/40093
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 4bc795809203..c256f7599211 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1410,9 +1410,10 @@ bool SwTableAutoFormatTable::Save( SvStream& rStream ) const
         rStream.WriteUInt16( m_pImpl->m_AutoFormats.size() - 1 );
         bRet = ERRCODE_NONE == rStream.GetError();
 
-        for (auto const & rFormat: m_pImpl->m_AutoFormats)
+        for (size_t i = 1; bRet && i < m_pImpl->m_AutoFormats.size(); ++i)
         {
-            bRet = rFormat->Save(rStream, AUTOFORMAT_FILE_VERSION);
+            SwTableAutoFormat const& rFormat = *m_pImpl->m_AutoFormats[i];
+            bRet = rFormat.Save(rStream, AUTOFORMAT_FILE_VERSION);
         }
     }
     rStream.Flush();


More information about the Libreoffice-commits mailing list