summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/calcmove.cxx
diff options
context:
space:
mode:
authorTomáš Chvátal <tchvatal@suse.com>2019-08-23 09:44:01 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-27 11:05:47 +0200
commit3780d305ae1607458029af3c9452bad251490461 (patch)
treea4b5561e5c4b0b55fb0b039bc40d169e9709f1c6 /sw/source/core/layout/calcmove.cxx
parentffad51e9e625a22f1efab3da7886baf4134b444f (diff)
Fix old boost build for good
With the previous approach the code could lead to crashes in the flowfrm.cxx Change-Id: I3b56ed46db9d37a606a1cd793a20b8aff22db6e2 Reviewed-on: https://gerrit.libreoffice.org/78001 Reviewed-by: Tomáš Chvátal <tchvatal@suse.com> Tested-by: Tomáš Chvátal <tchvatal@suse.com> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/source/core/layout/calcmove.cxx')
-rw-r--r--sw/source/core/layout/calcmove.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index ff2befe5d969..316ba4de217c 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -403,14 +403,19 @@ void SwFrame::PrepareCursor()
const bool bTab = IsTabFrame();
bool bNoSect = IsInSct();
+#if BOOST_VERSION < 105600
+ std::list<FlowFrameJoinLockGuard> tabGuard;
+ std::list<SwFrameDeleteGuard> rowGuard;
+#else
boost::optional<FlowFrameJoinLockGuard> tabGuard;
boost::optional<SwFrameDeleteGuard> rowGuard;
+#endif
SwFlowFrame* pThis = bCnt ? static_cast<SwContentFrame*>(this) : nullptr;
if ( bTab )
{
#if BOOST_VERSION < 105600
- tabGuard.reset(static_cast<SwTabFrame*>(this)); // tdf#125741
+ tabGuard.emplace_back(static_cast<SwTabFrame*>(this)); // tdf#125741
#else
tabGuard.emplace(static_cast<SwTabFrame*>(this)); // tdf#125741
#endif
@@ -419,7 +424,7 @@ void SwFrame::PrepareCursor()
else if (IsRowFrame())
{
#if BOOST_VERSION < 105600
- rowGuard.reset(SwFrameDeleteGuard(this)); // tdf#125741 keep this alive
+ rowGuard.emplace_back(this); // tdf#125741 keep this alive
#else
rowGuard.emplace(this); // tdf#125741 keep this alive
#endif