summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx6
-rw-r--r--sw/source/core/docnode/node.cxx25
-rw-r--r--sw/source/core/docnode/node2lay.cxx8
3 files changed, 28 insertions, 11 deletions
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index fabde76a4c80..a7568a0991f0 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -126,8 +126,10 @@ static void lcl_GetStartEndCell( const SwCursor& rCursor,
SwContentNode* pPointNd = rCursor.GetContentNode();
SwContentNode* pMarkNd = rCursor.GetContentNode(false);
- SwFrame* pPointFrame = pPointNd ? pPointNd->getLayoutFrame( pPointNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos ) : nullptr;
- SwFrame* pMarkFrame = pMarkNd ? pMarkNd->getLayoutFrame( pMarkNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos ) : nullptr;
+ std::pair<Point, bool> tmp(aPtPos, true);
+ SwFrame *const pPointFrame = pPointNd ? pPointNd->getLayoutFrame(pPointNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp) : nullptr;
+ tmp.first = aMkPos;
+ SwFrame *const pMarkFrame = pMarkNd ? pMarkNd->getLayoutFrame(pMarkNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp) : nullptr;
prStart = pPointFrame ? pPointFrame->GetUpper() : nullptr;
prEnd = pMarkFrame ? pMarkFrame->GetUpper() : nullptr;
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 1182f0982ce6..d592796fd248 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -384,7 +384,7 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const
if( pSh )
{
const SwFrame* pFrame;
- if( pNd && nullptr != ( pFrame = pNd->getLayoutFrame( pSh->GetLayout(), nullptr, nullptr, false ) ) )
+ if (pNd && nullptr != (pFrame = pNd->getLayoutFrame(pSh->GetLayout(), nullptr, nullptr)))
{
if ( pFrame->IsInTab() )
@@ -495,7 +495,7 @@ const SwPageDesc* SwNode::FindPageDesc( size_t* pPgDescNdIdx ) const
{
const SwFrame* pFrame;
const SwPageFrame* pPage;
- if( pNode && nullptr != ( pFrame = pNode->getLayoutFrame( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false/*bCalcLay*/ ) ) &&
+ if (pNode && nullptr != (pFrame = pNode->getLayoutFrame(pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr)) &&
nullptr != ( pPage = pFrame->FindPageFrame() ) )
{
pPgDesc = pPage->GetPageDesc();
@@ -789,8 +789,9 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
const SwContentNode* pCNd = GetContentNode();
Point aPt( 0, 0 );
- const SwFrame* pFrame = pRet->getLayoutFrame( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ),
- * pMyFrame = pCNd ? pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ) : nullptr;
+ std::pair<Point, bool> const tmp(aPt, false);
+ const SwFrame* pFrame = pRet->getLayoutFrame(pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp),
+ * pMyFrame = pCNd ? pCNd->getLayoutFrame(pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp) : nullptr;
const SwPageFrame* pPgFrame = pFrame ? pFrame->FindPageFrame() : nullptr;
if( pPgFrame && pMyFrame &&
pPgFrame->getFrameArea().Top() > pMyFrame->getFrameArea().Top() )
@@ -1132,17 +1133,24 @@ bool SwContentNode::InvalidateNumRule()
}
SwContentFrame *SwContentNode::getLayoutFrame( const SwRootFrame* _pRoot,
- const Point* pPoint, const SwPosition *pPos, const bool bCalcFrame ) const
+ const SwPosition *const pPos,
+ std::pair<Point, bool> const*const pViewPosAndCalcFrame) const
{
return static_cast<SwContentFrame*>( ::GetFrameOfModify( _pRoot, *this, FRM_CNTNT,
- pPoint, pPos, bCalcFrame ));
+ pPos, pViewPosAndCalcFrame));
}
SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint ) const
{
SwRect aRet;
+ std::pair<Point, bool> tmp;
+ if (pPoint)
+ {
+ tmp.first = *pPoint;
+ tmp.second = false;
+ }
SwContentFrame* pFrame = static_cast<SwContentFrame*>( ::GetFrameOfModify( nullptr, *this,
- FRM_CNTNT, pPoint ) );
+ FRM_CNTNT, nullptr, pPoint ? &tmp : nullptr) );
if( pFrame )
aRet = bPrtArea ? pFrame->getFramePrintArea() : pFrame->getFrameArea();
return aRet;
@@ -1962,7 +1970,8 @@ SvxFrameDirection SwContentNode::GetTextDirection( const SwPosition& rPos,
aPt = *pPt;
// #i72024# - No format of the frame, because this can cause recursive layout actions
- SwFrame* pFrame = getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, &rPos, false );
+ std::pair<Point, bool> const tmp(aPt, false);
+ SwFrame* pFrame = getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPos, &tmp);
if ( pFrame )
{
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 )