diff options
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r-- | sw/source/core/doc/DocumentDrawModelManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/doc.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docfly.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/doc/htmltbl.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/notxtfrm.cxx | 55 | ||||
-rw-r--r-- | sw/source/core/doc/tblrwcl.cxx | 16 |
6 files changed, 51 insertions, 48 deletions
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx index 873d8c9d1d98..7e54c5ac41ea 100644 --- a/sw/source/core/doc/DocumentDrawModelManager.cxx +++ b/sw/source/core/doc/DocumentDrawModelManager.cxx @@ -145,7 +145,7 @@ void DocumentDrawModelManager::InitDrawModel() // mpDrawModel->InsertPage( pDrawPage ); SdrPage* pDrawPage = pMasterPage; pRoot->SetDrawPage( pDrawPage ); - pDrawPage->SetSize( pRoot->Frame().SSize() ); + pDrawPage->SetSize( pRoot->getSwFrame().SSize() ); } } } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 9239aa5cf809..78b5aadf2c6d 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -668,7 +668,7 @@ void SwDoc::CalculatePagesForPrinting( const bool bPrintThisPage = ( (bPrintRightPages && pStPage->OnRightPage()) || (bPrintLeftPages && !pStPage->OnRightPage()) ) && - ( bPrintEmptyPages || pStPage->Frame().Height() ); + ( bPrintEmptyPages || pStPage->getSwFrame().Height() ); if (bPrintThisPage) { diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 49d1dc7c16e9..064df47eae6f 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -223,7 +223,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, { const SwFrame* pOld = static_cast<const SwFlyFrameFormat*>(pFlyFormat)->GetFrame( &aRet ); if( pOld ) - aRet = pOld->Frame().Pos(); + aRet = pOld->getSwFrame().Pos(); } break; @@ -235,7 +235,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, const SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode(); const SwFrame* pOld = pNd ? pNd->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aRet, nullptr, false ) : nullptr; if( pOld ) - aRet = pOld->Frame().Pos(); + aRet = pOld->getSwFrame().Pos(); } break; @@ -246,7 +246,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, nNode.GetNode().GetFlyFormat()); const SwFrame* pOld = pFormat ? pFormat->GetFrame( &aRet ) : nullptr; if( pOld ) - aRet = pOld->Frame().Pos(); + aRet = pOld->getSwFrame().Pos(); } break; @@ -258,7 +258,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, pPage =static_cast<const SwPageFrame*>(pPage->GetNext()) ) if( i == nPgNum ) { - aRet = pPage->Frame().Pos(); + aRet = pPage->getSwFrame().Pos(); break; } } @@ -840,7 +840,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, case RndStdIds::FLY_AT_PAGE: { pNewAnchorFrame = getIDocumentLayoutAccess().GetCurrentLayout()->Lower(); - while ( pNewAnchorFrame && !pNewAnchorFrame->Frame().IsInside( aPt ) ) + while ( pNewAnchorFrame && !pNewAnchorFrame->getSwFrame().IsInside( aPt ) ) pNewAnchorFrame = pNewAnchorFrame->GetNext(); if ( !pNewAnchorFrame ) continue; @@ -873,7 +873,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, aPoint.setX(aPoint.getX() - 1); // Do not load in the DrawObj! aNewAnch.SetType( RndStdIds::FLY_AS_CHAR ); SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode() ); - if ( pNewAnchorFrame->Frame().IsInside( aPoint ) ) + if ( pNewAnchorFrame->getSwFrame().IsInside( aPoint ) ) { // We need to find a TextNode, because only there we can anchor a // content-bound DrawObject. @@ -884,7 +884,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, { SwContentNode &rCNd = const_cast<SwContentNode&>( *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode()); - if ( pNewAnchorFrame->Frame().Bottom() < aPt.Y() ) + if ( pNewAnchorFrame->getSwFrame().Bottom() < aPt.Y() ) rCNd.MakeStartIndex( &aPos.nContent ); else rCNd.MakeEndIndex( &aPos.nContent ); @@ -1096,7 +1096,7 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest ) { SwFlyFrame *pFly = SwIterator<SwFlyFrame,SwFormat>( rSource ).First(); if ( pFly ) - aSize.SetHeight( pFly->Frame().Height() ); + aSize.SetHeight( pFly->getSwFrame().Height() ); aSize.SetHeightSizeType( ATT_FIX_SIZE ); aSet.Put( aSize ); } diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index 9ffef39248a3..053446edff4c 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -340,7 +340,7 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc ) { const SwFrame *pPageFrame = pRootFrame->GetLower(); if( pPageFrame ) - return (sal_uInt16)pPageFrame->Prt().Width(); + return (sal_uInt16)pPageFrame->getSwPrint().Width(); } // #i91658# @@ -364,13 +364,13 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrame( // For paragraph-bound frames we don't respect paragraph indents. const SwFrame *pAnchor = static_cast<const SwFlyFrame *>(pUpper)->GetAnchorFrame(); if( pAnchor->IsTextFrame() ) - nWidth = pAnchor->Frame().Width(); + nWidth = pAnchor->getSwFrame().Width(); else - nWidth = pAnchor->Prt().Width(); + nWidth = pAnchor->getSwPrint().Width(); } else { - nWidth = pUpper->Prt().Width(); + nWidth = pUpper->getSwPrint().Width(); } SwTwips nUpperDummy = 0; diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 172187fc83b2..18fa63ca2b99 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -211,7 +211,7 @@ static void lcl_ClearArea( const SwFrame &rFrame, void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { - if ( Frame().IsEmpty() ) + if ( getSwFrame().IsEmpty() ) return; const SwViewShell* pSh = getRootFrame()->GetCurrShell(); @@ -227,7 +227,7 @@ void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRec GetRealURL( *static_cast<const SwGrfNode*>(pNd), aText ); if( aText.isEmpty() ) aText = FindFlyFrame()->GetFormat()->GetName(); - lcl_PaintReplacement( Frame(), aText, *pSh, this, false ); + lcl_PaintReplacement( getSwFrame(), aText, *pSh, this, false ); } return; } @@ -263,10 +263,10 @@ void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRec SwRect aOrigPaint( rRect ); if ( HasAnimation() && pSh->GetWin() ) { - aOrigPaint = Frame(); aOrigPaint += Prt().Pos(); + aOrigPaint = getSwFrame(); aOrigPaint += getSwPrint().Pos(); } - SwRect aGrfArea( Frame() ); + SwRect aGrfArea( getSwFrame() ); SwRect aPaintArea( aGrfArea ); // In case the picture fly frm was clipped, render it with the origin @@ -286,13 +286,13 @@ void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRec } if( bGetUnclippedFrame ) - aGrfArea = SwRect( Frame().Pos( ), pFly->GetUnclippedFrame( ).SSize( ) ); + aGrfArea = SwRect( getSwFrame().Pos( ), pFly->GetUnclippedFrame( ).SSize( ) ); } } aPaintArea.Intersection_( aOrigPaint ); - SwRect aNormal( Frame().Pos() + Prt().Pos(), Prt().SSize() ); + SwRect aNormal( getSwFrame().Pos() + getSwPrint().Pos(), getSwPrint().SSize() ); aNormal.Justify(); // Normalized rectangle for the comparisons if( aPaintArea.IsOver( aNormal ) ) @@ -374,7 +374,7 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const Size aOrigSz( static_cast<const SwNoTextNode*>(GetNode())->GetTwipSize() ); if ( !aOrigSz.Width() ) { - aOrigSz.Width() = Prt().Width(); + aOrigSz.Width() = getSwPrint().Width(); nLeftCrop = -rCrop.GetLeft(); nRightCrop = -rCrop.GetRight(); } @@ -382,7 +382,7 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const { nLeftCrop = std::max( aOrigSz.Width() - (rCrop.GetRight() + rCrop.GetLeft()), long(1) ); - const double nScale = double(Prt().Width()) / double(nLeftCrop); + const double nScale = double(getSwPrint().Width()) / double(nLeftCrop); nLeftCrop = long(nScale * -rCrop.GetLeft() ); nRightCrop = long(nScale * -rCrop.GetRight() ); } @@ -397,14 +397,14 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const if( !aOrigSz.Height() ) { - aOrigSz.Height() = Prt().Height(); + aOrigSz.Height() = getSwPrint().Height(); nTopCrop = -rCrop.GetTop(); nBottomCrop= -rCrop.GetBottom(); } else { nTopCrop = std::max( aOrigSz.Height() - (rCrop.GetTop() + rCrop.GetBottom()), long(1) ); - const double nScale = double(Prt().Height()) / double(nTopCrop); + const double nScale = double(getSwPrint().Height()) / double(nTopCrop); nTopCrop = long(nScale * -rCrop.GetTop() ); nBottomCrop= long(nScale * -rCrop.GetBottom() ); } @@ -417,9 +417,9 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const nBottomCrop= nTmpCrop; } - Size aVisSz( Prt().SSize() ); + Size aVisSz( getSwPrint().SSize() ); Size aGrfSz( aVisSz ); - Point aVisPt( Frame().Pos() + Prt().Pos() ); + Point aVisPt( getSwFrame().Pos() + getSwPrint().Pos() ); Point aGrfPt( aVisPt ); // Set the "visible" rectangle first @@ -465,7 +465,7 @@ const Size& SwNoTextFrame::GetSize() const const SwFrame *pFly = FindFlyFrame(); if( !pFly ) pFly = this; - return pFly->Prt().SSize(); + return pFly->getSwPrint().SSize(); } void SwNoTextFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) @@ -479,7 +479,10 @@ void SwNoTextFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) MakePos(); if ( !mbValidSize ) - Frame().Width( GetUpper()->Prt().Width() ); + { + SwFrameRect::FrameWriteAccess aFrm(*this); + aFrm.Width( GetUpper()->getSwPrint().Width() ); + } MakePrtArea( rAttrs ); @@ -497,12 +500,12 @@ void SwNoTextFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBord // Did the height change? SwTwips nChgHght = IsVertical() ? - (SwTwips)(aNewSize.Width() - Prt().Width()) : - (SwTwips)(aNewSize.Height() - Prt().Height()); + (SwTwips)(aNewSize.Width() - getSwPrint().Width()) : + (SwTwips)(aNewSize.Height() - getSwPrint().Height()); if( nChgHght > 0) Grow( nChgHght ); else if( nChgHght < 0) - Shrink( std::min(Prt().Height(), -nChgHght) ); + Shrink( std::min(getSwPrint().Height(), -nChgHght) ); } bool SwNoTextFrame::GetCharRect( SwRect &rRect, const SwPosition& rPos, @@ -512,10 +515,10 @@ bool SwNoTextFrame::GetCharRect( SwRect &rRect, const SwPosition& rPos, return false; Calc(getRootFrame()->GetCurrShell()->GetOut()); - SwRect aFrameRect( Frame() ); + SwRect aFrameRect( getSwFrame() ); rRect = aFrameRect; - rRect.Pos( Frame().Pos() + Prt().Pos() ); - rRect.SSize( Prt().SSize() ); + rRect.Pos( getSwFrame().Pos() + getSwPrint().Pos() ); + rRect.SSize( getSwPrint().SSize() ); rRect.Justify(); @@ -555,7 +558,7 @@ bool SwNoTextFrame::GetCursorOfst(SwPosition* pPos, Point& , if( pFly && pFly->GetFormat()->GetSurround().IsContour() )\ {\ ClrContourCache( pFly->GetVirtDrawObj() );\ - pFly->NotifyBackground( FindPageFrame(), Prt(), PREP_FLY_ATTR_CHG );\ + pFly->NotifyBackground( FindPageFrame(), getSwPrint(), PREP_FLY_ATTR_CHG );\ }\ } @@ -591,7 +594,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { GraphicAttr aAttr; if( pNd->GetGrfObj().IsCached( pVSh->GetOut(), - Prt().SSize(), &pNd->GetGraphicAttr( aAttr, this ) )) + getSwPrint().SSize(), &pNd->GetGraphicAttr( aAttr, this ) )) { for(SwViewShell& rShell : pVSh->GetRingContainer()) { @@ -599,9 +602,9 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) if( rShell.GetWin() ) { if( rShell.IsPreview() ) - ::RepaintPagePreview( &rShell, Frame().SVRect() ); + ::RepaintPagePreview( &rShell, getSwFrame().SVRect() ); else - rShell.GetWin()->Invalidate( Frame().SVRect() ); + rShell.GetWin()->Invalidate( getSwFrame().SVRect() ); } } } @@ -665,7 +668,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) CLEARCACHE - SwRect aRect( Frame() ); + SwRect aRect( getSwFrame() ); SwViewShell *pVSh = pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); if( !pVSh ) @@ -1097,7 +1100,7 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr { const SwFlyFrame *pFly = FindFlyFrame(); assert( pFly != nullptr ); - static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frame()); + static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->getSwPrint(), pFly->getSwFrame()); } } diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index f0eecddda7cc..7d6d9087c42d 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -1060,7 +1060,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn const SwRowFrame* pRow = GetRowFrame( *pSelBox->GetUpper() ); OSL_ENSURE( pRow, "Where is the SwTableLine's Frame?" ); SwRectFnSet aRectFnSet(pRow); - pRowHeights[ n ] = aRectFnSet.GetHeight(pRow->Frame()); + pRowHeights[ n ] = aRectFnSet.GetHeight(pRow->getSwFrame()); } } @@ -3549,9 +3549,9 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, TableChgWidthHeightType eType, { SwTabFrame* pTabFrame = SwIterator<SwTabFrame,SwFormat>( *GetFrameFormat() ).First(); if( pTabFrame && - pTabFrame->Prt().Width() != rSz.GetWidth() ) + pTabFrame->getSwPrint().Width() != rSz.GetWidth() ) { - nFrameWidth = pTabFrame->Prt().Width(); + nFrameWidth = pTabFrame->getSwPrint().Width(); if( bBigger ) nFrameWidth += nAbsDiff; else @@ -3904,7 +3904,7 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight, SwFrameFormat* pFormat = rLine.ClaimFrameFormat(); - SwTwips nMyNewH, nMyOldH = pLineFrame->Frame().Height(); + SwTwips nMyNewH, nMyOldH = pLineFrame->getSwFrame().Height(); if( !nOldHeight ) // the BaseLine and absolute nMyNewH = nMyOldH + nNewHeight; else @@ -3967,7 +3967,7 @@ static bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam if( TableChgMode::FixedWidthChangeProp == rParam.nMode ) { - nDist *= pLineFrame->Frame().Height(); + nDist *= pLineFrame->getSwFrame().Height(); nDist /= rParam.nMaxHeight; } bRet = nDist <= CalcRowRstHeight( pLineFrame ); @@ -3987,7 +3987,7 @@ static bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam // via the max height. if( (true) /*!rParam.bBigger*/ ) { - nDist *= pLineFrame->Frame().Height(); + nDist *= pLineFrame->getSwFrame().Height(); nDist /= rParam.nMaxHeight; } else @@ -4152,7 +4152,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, TableChgWidthHeightType eType, { if( bInsDel && !bBigger ) // By how much does it get higher? { - nAbsDiff = GetRowFrame( *pBaseLine )->Frame().Height(); + nAbsDiff = GetRowFrame( *pBaseLine )->getSwFrame().Height(); } if( TableChgMode::VarWidthChangeAbs == m_eTableChgMode ) @@ -4220,7 +4220,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, TableChgWidthHeightType eType, SwLayoutFrame* pLineFrame = GetRowFrame( *(*pLines)[ n ] ); OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine??" ); aParam.nMaxSpace += CalcRowRstHeight( pLineFrame ); - aParam.nMaxHeight += pLineFrame->Frame().Height(); + aParam.nMaxHeight += pLineFrame->getSwFrame().Height(); } if( bBigger && aParam.nMaxSpace < nAbsDiff ) bRet = false; |