[Libreoffice-commits] core.git: writerfilter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 15 18:47:54 UTC 2018
writerfilter/source/dmapper/TblStylePrHandler.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 992ed5bdf9946b59bcd6bfc2250f85e7d0374826
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Oct 15 16:21:02 2018 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Oct 15 20:47:32 2018 +0200
Avoid useless copy of vectors
Change-Id: Iadab935efff35e1e8e5d70878414da1ed2f0fbf9
Reviewed-on: https://gerrit.libreoffice.org/61795
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx
index d3739053efa6..d2e5bb2054ce 100644
--- a/writerfilter/source/dmapper/TblStylePrHandler.cxx
+++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx
@@ -140,8 +140,7 @@ void TblStylePrHandler::lcl_sprm(Sprm & rSprm)
rSprm.getId() == NS_ooxml::LN_CT_TcPrBase;
if (bGrabBag)
{
- aSavedGrabBag = m_aInteropGrabBag;
- m_aInteropGrabBag.clear();
+ std::swap(aSavedGrabBag, m_aInteropGrabBag);
}
resolveSprmProps( rSprm );
if (bGrabBag)
@@ -154,7 +153,7 @@ void TblStylePrHandler::lcl_sprm(Sprm & rSprm)
aSavedGrabBag.push_back(getInteropGrabBag("tblPr"));
else if (rSprm.getId() == NS_ooxml::LN_CT_TcPrBase)
aSavedGrabBag.push_back(getInteropGrabBag("tcPr"));
- m_aInteropGrabBag = aSavedGrabBag;
+ std::swap(m_aInteropGrabBag, aSavedGrabBag);
}
}
break;
More information about the Libreoffice-commits
mailing list