diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-09-18 16:21:44 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-09-19 10:08:55 +0200 |
commit | f62ba688ca1c22fcdcf7efd811d702e982799882 (patch) | |
tree | b0b58daa34da816da3376864d43fe5bd50a441b9 /sw/source/core/docnode/node2lay.cxx | |
parent | sw_redlinehide_2: replace SW_REDLINEHIDE with ExperimentalMode config (diff) | |
download | core-f62ba688ca1c22fcdcf7efd811d702e982799882.tar.gz core-f62ba688ca1c22fcdcf7efd811d702e982799882.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/docnode/node2lay.cxx')
-rw-r--r-- | sw/source/core/docnode/node2lay.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index 0c9f4ae99ff6..8411274ab9de 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -416,7 +416,13 @@ void SwNode2LayImpl::RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLon SwFrame* SwNode2LayImpl::GetFrame( const Point* pDocPos ) const { // test if change of member pIter -> pMod broke anything - return pMod ? ::GetFrameOfModify( nullptr, *pMod, FRM_ALL, pDocPos, nullptr ) : nullptr; + std::pair<Point, bool> tmp; + if (pDocPos) + { + tmp.first = *pDocPos; + tmp.second = false; + } + return pMod ? ::GetFrameOfModify(nullptr, *pMod, FRM_ALL, nullptr, pDocPos ? &tmp : nullptr) : nullptr; } SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ) |