summaryrefslogtreecommitdiffstats
path: root/sw/source/core/crsr/callnk.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-09-18 16:21:44 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-09-19 10:08:55 +0200
commitf62ba688ca1c22fcdcf7efd811d702e982799882 (patch)
treeb0b58daa34da816da3376864d43fe5bd50a441b9 /sw/source/core/crsr/callnk.cxx
parentsw_redlinehide_2: replace SW_REDLINEHIDE with ExperimentalMode config (diff)
downloadcore-private/mst/sw_redlinehide_2.tar.gz
core-private/mst/sw_redlinehide_2.zip
sw: rework annoying GetFrameOfModify/getLayoutFrame parameters private/mst/sw_redlinehide_2
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
Diffstat (limited to 'sw/source/core/crsr/callnk.cxx')
-rw-r--r--sw/source/core/crsr/callnk.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index f1f7a3f200ef..4b2e963dd9e0 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -203,7 +203,7 @@ SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE
const SwFrame* pFrame;
const SwFlyFrame *pFlyFrame;
- if( !rShell.ActionPend() && nullptr != ( pFrame = pCNd->getLayoutFrame(rShell.GetLayout(), nullptr, nullptr, false) ) &&
+ if (!rShell.ActionPend() && nullptr != (pFrame = pCNd->getLayoutFrame(rShell.GetLayout(), nullptr, nullptr)) &&
nullptr != ( pFlyFrame = pFrame->FindFlyFrame() ) && !rShell.IsTableMode() )
{
const SwNodeIndex* pIndex = pFlyFrame->GetFormat()->GetContent().GetContentIdx();
@@ -220,9 +220,10 @@ SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE
}
}
-long SwCallLink::getLayoutFrame( const SwRootFrame* pRoot, SwTextNode const & rNd, sal_Int32 nCntPos, bool bCalcFrame )
+long SwCallLink::getLayoutFrame(const SwRootFrame* pRoot,
+ SwTextNode const & rNd, sal_Int32 nCntPos, bool /*bCalcFrame*/)
{
- SwTextFrame* pFrame = static_cast<SwTextFrame*>(rNd.getLayoutFrame(pRoot,nullptr,nullptr,bCalcFrame));
+ SwTextFrame* pFrame = static_cast<SwTextFrame*>(rNd.getLayoutFrame(pRoot, nullptr, nullptr));
SwTextFrame* pNext;
if ( pFrame && !pFrame->IsHiddenNow() )
{