summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorVarun Dhall <varun.dhall@studentpartner.com>2017-07-18 01:28:40 +0530
committerMichael Stahl <mstahl@redhat.com>2017-07-18 14:26:31 +0200
commit9b6542dbeea01aedd3570d84231383c0dc34812f (patch)
tree7bdd033ce87fe4d8522e344a378eb436da549c93 /sw
parentedc2ba3bddf2d9a4c72a4ca90579c66f229a6a47 (diff)
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@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 315b6afc90298ac23de7d24449feae6beaade17a) Reviewed-on: https://gerrit.libreoffice.org/40129
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/tblafmt.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 1864b6e1d6ba..b258620d0774 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1414,9 +1414,10 @@ bool SwTableAutoFormatTable::Save( SvStream& rStream ) const
rStream.WriteUInt16( m_pImpl->m_AutoFormats.size() - 1 );
bRet = 0 == 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();