summaryrefslogtreecommitdiff
path: root/sw/inc/node.hxx
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 12:08:11 +0200
commit049e522490129123a120704a001528a61cf088ec (patch)
tree6eb34059497b094ed1fa0312785b3eeeb76605be /sw/inc/node.hxx
parentfee5b79543de5e35299b1e3576209c77ef64a4d6 (diff)
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 Reviewed-on: https://gerrit.libreoffice.org/60695 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/inc/node.hxx')
-rw-r--r--sw/inc/node.hxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index f46ea9132c71..43ceb38e724c 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -394,11 +394,10 @@ public:
bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
- /// Replacement for good old GetFrame(..):
+ /// @see GetFrameOfModify
SwContentFrame *getLayoutFrame( const SwRootFrame*,
- const Point* pDocPos = nullptr,
- const SwPosition *pPos = nullptr,
- const bool bCalcFrame = true ) const;
+ const SwPosition *pPos = nullptr,
+ std::pair<Point, bool> const* pViewPosAndCalcFrame = nullptr) const;
/** @return the real size of the frame or an empty rectangle if
no layout exists. Needed for export filters. */
SwRect FindLayoutRect( const bool bPrtArea = false,