summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun Dhall <varun.dhall@studentpartner.com>2017-07-18 01:28:40 +0530
committerEike Rathke <erack@redhat.com>2017-07-20 10:02:21 +0200
commit29dd9c9b16ac6aed202bfaf3d468ce6235af6c36 (patch)
tree5b72ffdc631eef53bfecd6848934d5b9841cea37
parentee052d7fb032c2b571cdb825d4e73a3715790ef0 (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 (cherry picked from commit 9b6542dbeea01aedd3570d84231383c0dc34812f) Reviewed-on: https://gerrit.libreoffice.org/40137 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Varun Dhall <varun.vd1994@gmail.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-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();