From f62ba688ca1c22fcdcf7efd811d702e982799882 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 18 Sep 2018 16:21:44 +0200 Subject: sw: rework annoying GetFrameOfModify/getLayoutFrame parameters The bCalcFrame is only evaluated if a pPoint is given; this is surprising and should be more visible in the interface, so people don't go on a goose chase to find places that may do formatting in inappropriate places. So put these parameters into a pair instead, which doesn't have particularly good ergonomics in C++, particularly since compilers warn about taking the address of a temporary object... Change-Id: I101c6eeb5bd6baf83c2bd9a6cb91ccaa04036cc3 --- sw/source/core/crsr/trvltbl.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/source/core/crsr/trvltbl.cxx') diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 1763af7216cc..a36298901f5b 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -180,7 +180,10 @@ bool SwCursorShell::SelTableRowOrCol( bool bRow, bool bRowSimple ) const SwShellCursor *pCursor = GetCursor_(); const SwFrame* pStartFrame = pFrame; const SwContentNode *pCNd = pCursor->GetContentNode( false ); - const SwFrame* pEndFrame = pCNd ? pCNd->getLayoutFrame( GetLayout(), &pCursor->GetMkPos() ) : nullptr; + std::pair const tmp(pCursor->GetMkPos(), true); + const SwFrame* pEndFrame = pCNd + ? pCNd->getLayoutFrame(GetLayout(), nullptr, &tmp) + : nullptr; if ( bRow ) { -- cgit