diff options
author | Robinson Tryon <qubit@runcibility.com> | 2015-11-25 06:03:10 -0500 |
---|---|---|
committer | Robinson Tryon <qubit@runcibility.com> | 2015-11-25 06:07:38 -0500 |
commit | 49c2b9808df8a6b197dec666dfc0cda6321a4306 (patch) | |
tree | 045ef4b9b8dfdb06bfbe18cdf773d59f57d5552d /sw/source/core/text | |
parent | 5470a365f25e5052b4dd74f76aa2196f0d70934b (diff) |
bin/rename-sw-abbreviations.sh
libreoffice-5-1-branch-point
This commit renames the most annoying abbreviations in Writer (and
partially in the shared code too).
Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
Diffstat (limited to 'sw/source/core/text')
57 files changed, 2272 insertions, 2272 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index f5db518de93c..a3a18bf6e687 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -85,7 +85,7 @@ TableColumnsMap SwEnhancedPDFExportHelper::aTableColumnsMap; LinkIdMap SwEnhancedPDFExportHelper::aLinkIdMap; NumListIdMap SwEnhancedPDFExportHelper::aNumListIdMap; NumListBodyIdMap SwEnhancedPDFExportHelper::aNumListBodyIdMap; -FrmTagIdMap SwEnhancedPDFExportHelper::aFrmTagIdMap; +FrameTagIdMap SwEnhancedPDFExportHelper::aFrameTagIdMap; LanguageType SwEnhancedPDFExportHelper::eLanguageDefault = 0; @@ -162,14 +162,14 @@ const char aLinkString[] = "Link"; const char aNoteString[] = "Note"; // returns true if first paragraph in cell frame has 'table heading' style -bool lcl_IsHeadlineCell( const SwCellFrm& rCellFrm ) +bool lcl_IsHeadlineCell( const SwCellFrame& rCellFrame ) { bool bRet = false; - const SwContentFrm *pCnt = rCellFrm.ContainsContent(); - if ( pCnt && pCnt->IsTextFrm() ) + const SwContentFrame *pCnt = rCellFrame.ContainsContent(); + if ( pCnt && pCnt->IsTextFrame() ) { - const SwTextNode* pTextNode = static_cast<const SwTextFrm*>(pCnt)->GetTextNode(); + const SwTextNode* pTextNode = static_cast<const SwTextFrame*>(pCnt)->GetTextNode(); const SwFormat* pTextFormat = pTextNode->GetFormatColl(); OUString sStyleName; @@ -181,20 +181,20 @@ bool lcl_IsHeadlineCell( const SwCellFrm& rCellFrm ) } // List all frames for which the NonStructElement tag is set: -bool lcl_IsInNonStructEnv( const SwFrm& rFrm ) +bool lcl_IsInNonStructEnv( const SwFrame& rFrame ) { bool bRet = false; - if ( nullptr != rFrm.FindFooterOrHeader() && - !rFrm.IsHeaderFrm() && !rFrm.IsFooterFrm() ) + if ( nullptr != rFrame.FindFooterOrHeader() && + !rFrame.IsHeaderFrame() && !rFrame.IsFooterFrame() ) { bRet = true; } - else if ( rFrm.IsInTab() && !rFrm.IsTabFrm() ) + else if ( rFrame.IsInTab() && !rFrame.IsTabFrame() ) { - const SwTabFrm* pTabFrm = rFrm.FindTabFrm(); - if ( rFrm.GetUpper() != pTabFrm && - pTabFrm->IsFollow() && pTabFrm->IsInHeadline( rFrm ) ) + const SwTabFrame* pTabFrame = rFrame.FindTabFrame(); + if ( rFrame.GetUpper() != pTabFrame && + pTabFrame->IsFollow() && pTabFrame->IsInHeadline( rFrame ) ) bRet = true; } @@ -202,25 +202,25 @@ bool lcl_IsInNonStructEnv( const SwFrm& rFrm ) } // Generate key from frame for reopening tags: -void* lcl_GetKeyFromFrame( const SwFrm& rFrm ) +void* lcl_GetKeyFromFrame( const SwFrame& rFrame ) { void* pKey = nullptr; - if ( rFrm.IsPageFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(&(static_cast<const SwPageFrm&>(rFrm).GetFormat()->getIDocumentSettingAccess()))); - else if ( rFrm.IsTextFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwTextFrm&>(rFrm).GetTextNode())); - else if ( rFrm.IsSctFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwSectionFrm&>(rFrm).GetSection())); - else if ( rFrm.IsTabFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwTabFrm&>(rFrm).GetTable())); - else if ( rFrm.IsRowFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwRowFrm&>(rFrm).GetTabLine())); - else if ( rFrm.IsCellFrm() ) + if ( rFrame.IsPageFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(&(static_cast<const SwPageFrame&>(rFrame).GetFormat()->getIDocumentSettingAccess()))); + else if ( rFrame.IsTextFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwTextFrame&>(rFrame).GetTextNode())); + else if ( rFrame.IsSctFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwSectionFrame&>(rFrame).GetSection())); + else if ( rFrame.IsTabFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwTabFrame&>(rFrame).GetTable())); + else if ( rFrame.IsRowFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwRowFrame&>(rFrame).GetTabLine())); + else if ( rFrame.IsCellFrame() ) { - const SwTabFrm* pTabFrm = rFrm.FindTabFrm(); - const SwTable* pTable = pTabFrm->GetTable(); - pKey = const_cast<void*>(static_cast<void const *>(& static_cast<const SwCellFrm&>(rFrm).GetTabBox()->FindStartOfRowSpan( *pTable ))); + const SwTabFrame* pTabFrame = rFrame.FindTabFrame(); + const SwTable* pTable = pTabFrame->GetTable(); + pKey = const_cast<void*>(static_cast<void const *>(& static_cast<const SwCellFrame&>(rFrame).GetTabBox()->FindStartOfRowSpan( *pTable ))); } return pKey; @@ -261,13 +261,13 @@ bool lcl_HasPreviousParaSameNumRule( const SwTextNode& rNode ) } // end namespace SwTaggedPDFHelper::SwTaggedPDFHelper( const Num_Info* pNumInfo, - const Frm_Info* pFrmInfo, + const Frame_Info* pFrameInfo, const Por_Info* pPorInfo, OutputDevice& rOut ) : nEndStructureElement( 0 ), nRestoreCurrentTag( -1 ), mpNumInfo( pNumInfo ), - mpFrmInfo( pFrmInfo ), + mpFrameInfo( pFrameInfo ), mpPorInfo( pPorInfo ) { mpPDFExtOutDevData = @@ -281,7 +281,7 @@ SwTaggedPDFHelper::SwTaggedPDFHelper( const Num_Info* pNumInfo, #endif if ( mpNumInfo ) BeginNumberedListStructureElements(); - else if ( mpFrmInfo ) + else if ( mpFrameInfo ) BeginBlockStructureElements(); else if ( mpPorInfo ) BeginInlineStructureElements(); @@ -321,47 +321,47 @@ bool SwTaggedPDFHelper::CheckReopenTag() sal_Int32 nReopenTag = -1; bool bContinue = false; // in some cases we just have to reopen a tag without early returning - if ( mpFrmInfo ) + if ( mpFrameInfo ) { - const SwFrm& rFrm = mpFrmInfo->mrFrm; - const SwFrm* pKeyFrm = nullptr; + const SwFrame& rFrame = mpFrameInfo->mrFrame; + const SwFrame* pKeyFrame = nullptr; // Reopen an existing structure element if - // - rFrm is not the first page frame (reopen Document tag) - // - rFrm is a follow frame (reopen Master tag) - // - rFrm is a fly frame anchored at content (reopen Anchor paragraph tag) - // - rFrm is a fly frame anchored at page (reopen Document tag) - // - rFrm is a follow flow row (reopen TableRow tag) - // - rFrm is a cell frame in a follow flow row (reopen TableData tag) - if ( ( rFrm.IsPageFrm() && static_cast<const SwPageFrm&>(rFrm).GetPrev() ) || - ( rFrm.IsFlowFrm() && SwFlowFrm::CastFlowFrm(&rFrm)->IsFollow() ) || - ( rFrm.IsRowFrm() && rFrm.IsInFollowFlowRow() ) || - ( rFrm.IsCellFrm() && const_cast<SwFrm&>(rFrm).GetPrevCellLeaf( MAKEPAGE_NONE ) ) ) + // - rFrame is not the first page frame (reopen Document tag) + // - rFrame is a follow frame (reopen Master tag) + // - rFrame is a fly frame anchored at content (reopen Anchor paragraph tag) + // - rFrame is a fly frame anchored at page (reopen Document tag) + // - rFrame is a follow flow row (reopen TableRow tag) + // - rFrame is a cell frame in a follow flow row (reopen TableData tag) + if ( ( rFrame.IsPageFrame() && static_cast<const SwPageFrame&>(rFrame).GetPrev() ) || + ( rFrame.IsFlowFrame() && SwFlowFrame::CastFlowFrame(&rFrame)->IsFollow() ) || + ( rFrame.IsRowFrame() && rFrame.IsInFollowFlowRow() ) || + ( rFrame.IsCellFrame() && const_cast<SwFrame&>(rFrame).GetPrevCellLeaf( MAKEPAGE_NONE ) ) ) { - pKeyFrm = &rFrm; + pKeyFrame = &rFrame; } - else if ( rFrm.IsFlyFrm() ) + else if ( rFrame.IsFlyFrame() ) { const SwFormatAnchor& rAnchor = - static_cast<const SwFlyFrm*>(&rFrm)->GetFormat()->GetAnchor(); + static_cast<const SwFlyFrame*>(&rFrame)->GetFormat()->GetAnchor(); if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || (FLY_AT_CHAR == rAnchor.GetAnchorId()) || (FLY_AT_PAGE == rAnchor.GetAnchorId())) { - pKeyFrm = static_cast<const SwFlyFrm&>(rFrm).GetAnchorFrm(); + pKeyFrame = static_cast<const SwFlyFrame&>(rFrame).GetAnchorFrame(); bContinue = true; } } - if ( pKeyFrm ) + if ( pKeyFrame ) { - void* pKey = lcl_GetKeyFromFrame( *pKeyFrm ); + void* pKey = lcl_GetKeyFromFrame( *pKeyFrame ); if ( pKey ) { - FrmTagIdMap& rFrmTagIdMap = SwEnhancedPDFExportHelper::GetFrmTagIdMap(); - const FrmTagIdMap::const_iterator aIter = rFrmTagIdMap.find( pKey ); - if ( aIter != rFrmTagIdMap.end() ) + FrameTagIdMap& rFrameTagIdMap = SwEnhancedPDFExportHelper::GetFrameTagIdMap(); + const FrameTagIdMap::const_iterator aIter = rFrameTagIdMap.find( pKey ); + if ( aIter != rFrameTagIdMap.end() ) nReopenTag = (*aIter).second; } } @@ -415,15 +415,15 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const OUS // Store the id of the current structure element if // - it is a list structure element // - it is a list body element with children - // - rFrm is the first page frame - // - rFrm is a master frame - // - rFrm has objects anchored to it - // - rFrm is a row frame or cell frame in a split table row + // - rFrame is the first page frame + // - rFrame is a master frame + // - rFrame has objects anchored to it + // - rFrame is a row frame or cell frame in a split table row if ( mpNumInfo ) { - const SwTextFrm& rTextFrm = static_cast<const SwTextFrm&>(mpNumInfo->mrFrm); - const SwTextNode* pTextNd = rTextFrm.GetTextNode(); + const SwTextFrame& rTextFrame = static_cast<const SwTextFrame&>(mpNumInfo->mrFrame); + const SwTextNode* pTextNd = rTextFrame.GetTextNode(); const SwNodeNum* pNodeNum = pTextNd->GetNum(); if ( vcl::PDFWriter::List == eType ) @@ -437,22 +437,22 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const OUS rNumListBodyIdMap[ pNodeNum ] = nId; } } - else if ( mpFrmInfo ) + else if ( mpFrameInfo ) { - const SwFrm& rFrm = mpFrmInfo->mrFrm; + const SwFrame& rFrame = mpFrameInfo->mrFrame; - if ( ( rFrm.IsPageFrm() && !static_cast<const SwPageFrm&>(rFrm).GetPrev() ) || - ( rFrm.IsFlowFrm() && !SwFlowFrm::CastFlowFrm(&rFrm)->IsFollow() && SwFlowFrm::CastFlowFrm(&rFrm)->HasFollow() ) || - ( rFrm.IsTextFrm() && rFrm.GetDrawObjs() ) || - ( rFrm.IsRowFrm() && rFrm.IsInSplitTableRow() ) || - ( rFrm.IsCellFrm() && const_cast<SwFrm&>(rFrm).GetNextCellLeaf( MAKEPAGE_NONE ) ) ) + if ( ( rFrame.IsPageFrame() && !static_cast<const SwPageFrame&>(rFrame).GetPrev() ) || + ( rFrame.IsFlowFrame() && !SwFlowFrame::CastFlowFrame(&rFrame)->IsFollow() && SwFlowFrame::CastFlowFrame(&rFrame)->HasFollow() ) || + ( rFrame.IsTextFrame() && rFrame.GetDrawObjs() ) || + ( rFrame.IsRowFrame() && rFrame.IsInSplitTableRow() ) || + ( rFrame.IsCellFrame() && const_cast<SwFrame&>(rFrame).GetNextCellLeaf( MAKEPAGE_NONE ) ) ) { - const void* pKey = lcl_GetKeyFromFrame( rFrm ); + const void* pKey = lcl_GetKeyFromFrame( rFrame ); if ( pKey ) { - FrmTagIdMap& rFrmTagIdMap = SwEnhancedPDFExportHelper::GetFrmTagIdMap(); - rFrmTagIdMap[ pKey ] = nId; + FrameTagIdMap& rFrameTagIdMap = SwEnhancedPDFExportHelper::GetFrameTagIdMap(); + rFrameTagIdMap[ pKey ] = nId; } } } @@ -478,10 +478,10 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) /* * ATTRIBUTES FOR BLSE */ - if ( mpFrmInfo ) + if ( mpFrameInfo ) { - const SwFrm* pFrm = &mpFrmInfo->mrFrm; - SWRECTFN( pFrm ) + const SwFrame* pFrame = &mpFrameInfo->mrFrame; + SWRECTFN( pFrame ) bool bPlacement = false; bool bWritingMode = false; @@ -578,9 +578,9 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bWritingMode ) { - eVal = pFrm->IsVertical() ? + eVal = pFrame->IsVertical() ? vcl::PDFWriter::TbRl : - pFrm->IsRightToLeft() ? + pFrame->IsRightToLeft() ? vcl::PDFWriter::RlTb : vcl::PDFWriter::LrTb; @@ -590,37 +590,37 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bSpaceBefore ) { - nVal = (pFrm->*fnRect->fnGetTopMargin)(); + nVal = (pFrame->*fnRect->fnGetTopMargin)(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::SpaceBefore, nVal ); } if ( bSpaceAfter ) { - nVal = (pFrm->*fnRect->fnGetBottomMargin)(); + nVal = (pFrame->*fnRect->fnGetBottomMargin)(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::SpaceAfter, nVal ); } if ( bStartIndent ) { - nVal = (pFrm->*fnRect->fnGetLeftMargin)(); + nVal = (pFrame->*fnRect->fnGetLeftMargin)(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::StartIndent, nVal ); } if ( bEndIndent ) { - nVal = (pFrm->*fnRect->fnGetRightMargin)(); + nVal = (pFrame->*fnRect->fnGetRightMargin)(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::EndIndent, nVal ); } if ( bTextIndent ) { - OSL_ENSURE( pFrm->IsTextFrm(), "Frame type <-> tag attribute mismatch" ); + OSL_ENSURE( pFrame->IsTextFrame(), "Frame type <-> tag attribute mismatch" ); const SvxLRSpaceItem &rSpace = - static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetSwAttrSet().GetLRSpace(); + static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetSwAttrSet().GetLRSpace(); nVal = rSpace.GetTextFirstLineOfst(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::TextIndent, nVal ); @@ -628,12 +628,12 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bTextAlign ) { - OSL_ENSURE( pFrm->IsTextFrm(), "Frame type <-> tag attribute mismatch" ); - const SwAttrSet& aSet = static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetSwAttrSet(); + OSL_ENSURE( pFrame->IsTextFrame(), "Frame type <-> tag attribute mismatch" ); + const SwAttrSet& aSet = static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetSwAttrSet(); const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust(); if ( SVX_ADJUST_BLOCK == nAdjust || SVX_ADJUST_CENTER == nAdjust || - ( (pFrm->IsRightToLeft() && SVX_ADJUST_LEFT == nAdjust) || - (!pFrm->IsRightToLeft() && SVX_ADJUST_RIGHT == nAdjust) ) ) + ( (pFrame->IsRightToLeft() && SVX_ADJUST_LEFT == nAdjust) || + (!pFrame->IsRightToLeft() && SVX_ADJUST_RIGHT == nAdjust) ) ) { eVal = SVX_ADJUST_BLOCK == nAdjust ? vcl::PDFWriter::Justify : @@ -647,12 +647,12 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bAlternateText ) { - OSL_ENSURE( pFrm->IsFlyFrm(), "Frame type <-> tag attribute mismatch" ); - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pFrm); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + OSL_ENSURE( pFrame->IsFlyFrame(), "Frame type <-> tag attribute mismatch" ); + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pFrame); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - const SwNoTextFrm* pNoTextFrm = static_cast<const SwNoTextFrm*>(pFly->Lower()); - const SwNoTextNode* pNoTextNode = static_cast<const SwNoTextNode*>(pNoTextFrm->GetNode()); + const SwNoTextFrame* pNoTextFrame = static_cast<const SwNoTextFrame*>(pFly->Lower()); + const SwNoTextNode* pNoTextNode = static_cast<const SwNoTextNode*>(pNoTextFrame->GetNode()); const OUString aAlternateText( pNoTextNode->GetTitle() ); mpPDFExtOutDevData->SetAlternateText( aAlternateText ); @@ -661,13 +661,13 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bWidth ) { - nVal = (pFrm->Frm().*fnRect->fnGetWidth)(); + nVal = (pFrame->Frame().*fnRect->fnGetWidth)(); mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::Width, nVal ); } if ( bHeight ) { - nVal = (pFrm->Frm().*fnRect->fnGetHeight)(); + nVal = (pFrame->Frame().*fnRect->fnGetHeight)(); mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::Height, nVal ); } @@ -675,17 +675,17 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) { // BBox only for non-split tables: if ( vcl::PDFWriter::Table != eType || - ( pFrm->IsTabFrm() && - !static_cast<const SwTabFrm*>(pFrm)->IsFollow() && - !static_cast<const SwTabFrm*>(pFrm)->HasFollow() ) ) + ( pFrame->IsTabFrame() && + !static_cast<const SwTabFrame*>(pFrame)->IsFollow() && + !static_cast<const SwTabFrame*>(pFrame)->HasFollow() ) ) { - mpPDFExtOutDevData->SetStructureBoundingBox(pFrm->Frm().SVRect()); + mpPDFExtOutDevData->SetStructureBoundingBox(pFrame->Frame().SVRect()); } } if ( bRowSpan ) { - const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(pFrm); + const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(pFrame); if ( pThisCell ) { nVal = pThisCell->GetTabBox()->getRowSpan(); @@ -693,15 +693,15 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::RowSpan, nVal ); // calculate colspan: - const SwTabFrm* pTabFrm = pThisCell->FindTabFrm(); - const SwTable* pTable = pTabFrm->GetTable(); + const SwTabFrame* pTabFrame = pThisCell->FindTabFrame(); + const SwTable* pTable = pTabFrame->GetTable(); - SWRECTFNX( pTabFrm ) + SWRECTFNX( pTabFrame ) const TableColumnsMapEntry& rCols = SwEnhancedPDFExportHelper::GetTableColumnsMap()[ pTable ]; - const long nLeft = (pThisCell->Frm().*fnRectX->fnGetLeft)(); - const long nRight = (pThisCell->Frm().*fnRectX->fnGetRight)(); + const long nLeft = (pThisCell->Frame().*fnRectX->fnGetLeft)(); + const long nRight = (pThisCell->Frame().*fnRectX->fnGetRight)(); const TableColumnsMapEntry::const_iterator aLeftIter = rCols.find( nLeft ); const TableColumnsMapEntry::const_iterator aRightIter = rCols.find( nRight ); @@ -832,16 +832,16 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements() if ( !mpNumInfo ) return; - const SwFrm& rFrm = mpNumInfo->mrFrm; - OSL_ENSURE( rFrm.IsTextFrm(), "numbered only for text frames" ); - const SwTextFrm& rTextFrm = static_cast<const SwTextFrm&>(rFrm); + const SwFrame& rFrame = mpNumInfo->mrFrame; + OSL_ENSURE( rFrame.IsTextFrame(), "numbered only for text frames" ); + const SwTextFrame& rTextFrame = static_cast<const SwTextFrame&>(rFrame); // Lowers of NonStructureElements should not be considered: - if ( lcl_IsInNonStructEnv( rTextFrm ) || rTextFrm.IsFollow() ) + if ( lcl_IsInNonStructEnv( rTextFrame ) || rTextFrame.IsFollow() ) return; - const SwTextNode* pTextNd = rTextFrm.GetTextNode(); + const SwTextNode* pTextNd = rTextFrame.GetTextNode(); const SwNumRule* pNumRule = pTextNd->GetNumRule(); const SwNodeNum* pNodeNum = pTextNd->GetNum(); @@ -965,22 +965,22 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements() void SwTaggedPDFHelper::BeginBlockStructureElements() { - const SwFrm* pFrm = &mpFrmInfo->mrFrm; + const SwFrame* pFrame = &mpFrameInfo->mrFrame; // Lowers of NonStructureElements should not be considered: - if ( lcl_IsInNonStructEnv( *pFrm ) ) + if ( lcl_IsInNonStructEnv( *pFrame ) ) return; // Check if we have to reopen an existing structure element. - // This has to be done e.g., if pFrm is a follow frame. + // This has to be done e.g., if pFrame is a follow frame. if ( CheckReopenTag() ) return; sal_uInt16 nPDFType = USHRT_MAX; OUString aPDFType; - switch ( pFrm->GetType() ) + switch ( pFrame->GetType() ) { /* * GROUPING ELEMENTS @@ -1026,7 +1026,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() { const SwSection* pSection = - static_cast<const SwSectionFrm*>(pFrm)->GetSection(); + static_cast<const SwSectionFrame*>(pFrame)->GetSection(); if ( TOX_CONTENT_SECTION == pSection->GetType() ) { const SwTOXBase* pTOXBase = pSection->GetTOXBase(); @@ -1059,7 +1059,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_TXT : { const SwTextNode* pTextNd = - static_cast<const SwTextFrm*>(pFrm)->GetTextNode(); + static_cast<const SwTextFrame*>(pFrame)->GetTextNode(); const SwFormat* pTextFormat = pTextNd->GetFormatColl(); const SwFormat* pParentTextFormat = pTextFormat ? pTextFormat->DerivedFrom() : nullptr; @@ -1143,11 +1143,11 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() // Section: TOCI - else if ( pFrm->IsInSct() ) + else if ( pFrame->IsInSct() ) { - const SwSectionFrm* pSctFrm = pFrm->FindSctFrm(); + const SwSectionFrame* pSctFrame = pFrame->FindSctFrame(); const SwSection* pSection = - static_cast<const SwSectionFrm*>(pSctFrm)->GetSection(); + static_cast<const SwSectionFrame*>(pSctFrame)->GetSection(); if ( TOX_CONTENT_SECTION == pSection->GetType() ) { @@ -1164,46 +1164,46 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_TAB : - // TabFrm: Table + // TabFrame: Table nPDFType = vcl::PDFWriter::Table; aPDFType = aTableString; { // set up table column data: - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pFrm); - const SwTable* pTable = pTabFrm->GetTable(); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pFrame); + const SwTable* pTable = pTabFrame->GetTable(); TableColumnsMap& rTableColumnsMap = SwEnhancedPDFExportHelper::GetTableColumnsMap(); const TableColumnsMap::const_iterator aIter = rTableColumnsMap.find( pTable ); if ( aIter == rTableColumnsMap.end() ) { - SWRECTFN( pTabFrm ) + SWRECTFN( pTabFrame ) TableColumnsMapEntry& rCols = rTableColumnsMap[ pTable ]; - const SwTabFrm* pMasterFrm = pTabFrm->IsFollow() ? pTabFrm->FindMaster( true ) : pTabFrm; + const SwTabFrame* pMasterFrame = pTabFrame->IsFollow() ? pTabFrame->FindMaster( true ) : pTabFrame; - while ( pMasterFrm ) + while ( pMasterFrame ) { - const SwRowFrm* pRowFrm = static_cast<const SwRowFrm*>(pMasterFrm->GetLower()); + const SwRowFrame* pRowFrame = static_cast<const SwRowFrame*>(pMasterFrame->GetLower()); - while ( pRowFrm ) + while ( pRowFrame ) { - const SwFrm* pCellFrm = pRowFrm->GetLower(); + const SwFrame* pCellFrame = pRowFrame->GetLower(); - const long nLeft = (pCellFrm->Frm().*fnRect->fnGetLeft)(); + const long nLeft = (pCellFrame->Frame().*fnRect->fnGetLeft)(); rCols.insert( nLeft ); - while ( pCellFrm ) + while ( pCellFrame ) { - const long nRight = (pCellFrm->Frm().*fnRect->fnGetRight)(); + const long nRight = (pCellFrame->Frame().*fnRect->fnGetRight)(); rCols.insert( nRight ); - pCellFrm = pCellFrm->GetNext(); + pCellFrame = pCellFrame->GetNext(); } - pRowFrm = static_cast<const SwRowFrm*>(pRowFrm->GetNext()); + pRowFrame = static_cast<const SwRowFrame*>(pRowFrame->GetNext()); } - pMasterFrm = static_cast<const SwTabFrm*>(pMasterFrm->GetFollow()); + pMasterFrame = static_cast<const SwTabFrame*>(pMasterFrame->GetFollow()); } } } @@ -1216,9 +1216,9 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_ROW : - // RowFrm: TR + // RowFrame: TR - if ( !static_cast<const SwRowFrm*>(pFrm)->IsRepeatedHeadline() ) + if ( !static_cast<const SwRowFrame*>(pFrame)->IsRepeatedHeadline() ) { nPDFType = vcl::PDFWriter::TableRow; aPDFType = aTRString; @@ -1231,11 +1231,11 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_CELL : - // CellFrm: TH, TD + // CellFrame: TH, TD { - const SwTabFrm* pTable = static_cast<const SwCellFrm*>(pFrm)->FindTabFrm(); - if ( pTable->IsInHeadline( *pFrm ) || lcl_IsHeadlineCell( *static_cast<const SwCellFrm*>(pFrm) ) ) + const SwTabFrame* pTable = static_cast<const SwCellFrame*>(pFrame)->FindTabFrame(); + if ( pTable->IsInHeadline( *pFrame ) || lcl_IsHeadlineCell( *static_cast<const SwCellFrame*>(pFrame) ) ) { nPDFType = vcl::PDFWriter::TableHeader; aPDFType = aTHString; @@ -1254,16 +1254,16 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_FLY : - // FlyFrm: Figure, Formula, Control + // FlyFrame: Figure, Formula, Control // fly in content or fly at page { - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pFrm); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pFrame); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { bool bFormula = false; - const SwNoTextFrm* pNoTextFrm = static_cast<const SwNoTextFrm*>(pFly->Lower()); - SwOLENode* pOLENd = const_cast<SwOLENode*>(pNoTextFrm->GetNode()->GetOLENode()); + const SwNoTextFrame* pNoTextFrame = static_cast<const SwNoTextFrame*>(pFly->Lower()); + SwOLENode* pOLENd = const_cast<SwOLENode*>(pNoTextFrame->GetNode()->GetOLENode()); if ( pOLENd ) { SwOLEObj& aOLEObj = pOLENd->GetOLEObj(); @@ -1314,11 +1314,11 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() { const SwLinePortion* pPor = &mpPorInfo->mrPor; const SwTextPaintInfo& rInf = mpPorInfo->mrTextPainter.GetInfo(); - const SwTextFrm* pFrm = rInf.GetTextFrm(); + const SwTextFrame* pFrame = rInf.GetTextFrame(); // Lowers of NonStructureElements should not be considered: - if ( lcl_IsInNonStructEnv( *pFrm ) ) + if ( lcl_IsInNonStructEnv( *pFrame ) ) return; sal_uInt16 nPDFType = USHRT_MAX; @@ -1339,7 +1339,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() case POR_TXT : case POR_PARA : { - SwTextNode* pNd = const_cast<SwTextNode*>(pFrm->GetTextNode()); + SwTextNode* pNd = const_cast<SwTextNode*>(pFrame->GetTextNode()); SwTextAttr const*const pInetFormatAttr = pNd->GetTextAttrAt(rInf.GetIdx(), RES_TXTATR_INETFMT); @@ -1465,8 +1465,8 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh, if ( mbSkipEmptyPages ) { maPageNumberMap.resize( mrSh.GetPageCount() ); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); sal_Int32 nPageNumber = 0; for ( size_t i = 0, n = maPageNumberMap.size(); i < n && pCurrPage; ++i ) { @@ -1475,7 +1475,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh, else maPageNumberMap[i] = nPageNumber++; - pCurrPage = static_cast<const SwPageFrm*>( pCurrPage->GetNext() ); + pCurrPage = static_cast<const SwPageFrame*>( pCurrPage->GetNext() ); } } @@ -1483,7 +1483,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh, aLinkIdMap.clear(); aNumListIdMap.clear(); aNumListBodyIdMap.clear(); - aFrmTagIdMap.clear(); + aFrameTagIdMap.clear(); #if OSL_DEBUG_LEVEL > 1 aStructStack.clear(); @@ -1507,7 +1507,7 @@ SwEnhancedPDFExportHelper::~SwEnhancedPDFExportHelper() delete mpRangeEnum; } -Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrm* pCurrPage, +Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrame* pCurrPage, const Rectangle& rRectangle) const { SwPostItMode nPostItMode = mrPrintData.GetPrintPostIts(); @@ -1520,7 +1520,7 @@ Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrm* pCurrPage, double fScale = 0.75; aRectSize.Width() = (aRectSize.Width() * fScale); aRectSize.Height() = (aRectSize.Height() * fScale); - long nOrigHeight = pCurrPage->Frm().Height(); + long nOrigHeight = pCurrPage->Frame().Height(); long nNewHeight = nOrigHeight*fScale; long nShiftY = (nOrigHeight-nNewHeight)/2; aRect.Left() = (aRect.Left() * fScale); @@ -1553,8 +1553,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Create new cursor and lock the view: SwDoc* pDoc = mrSh.GetDoc(); - mrSh.SwCrsrShell::Push(); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::Push(); + mrSh.SwCursorShell::ClearMark(); const bool bOldLockView = mrSh.IsViewLocked(); mrSh.LockView( true ); @@ -1583,8 +1583,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() { // Link Rectangle const SwRect& rNoteRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Link PageNums std::vector<sal_Int32> aNotePageNums = CalcOutputPageNums( rNoteRect ); @@ -1616,7 +1616,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } pFirst = aIter.Next(); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); } } @@ -1640,8 +1640,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() !mrSh.SelectHiddenRange() ) { // Select the hyperlink: - mrSh.SwCrsrShell::Right( 1, CRSR_SKIP_CHARS ); - if ( mrSh.SwCrsrShell::SelectTextAttr( RES_TXTATR_INETFMT, true ) ) + mrSh.SwCursorShell::Right( 1, CRSR_SKIP_CHARS ); + if ( mrSh.SwCursorShell::SelectTextAttr( RES_TXTATR_INETFMT, true ) ) { // First, we create the destination, because there may be more // than one link to this destination: @@ -1652,31 +1652,31 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // We have to distinguish between intern and real URLs const bool bIntern = '#' == aURL[0]; - // _GetCrsr() is a SwShellCrsr, which is derived from + // _GetCursor() is a SwShellCursor, which is derived from // SwSelPaintRects, therefore the rectangles of the current // selection can be easily obtained: // Note: We make a copy of the rectangles, because they may // be deleted again in JumpToSwMark. SwRects aTmp; - aTmp.insert( aTmp.begin(), mrSh.SwCrsrShell::_GetCrsr()->begin(), mrSh.SwCrsrShell::_GetCrsr()->end() ); + aTmp.insert( aTmp.begin(), mrSh.SwCursorShell::_GetCursor()->begin(), mrSh.SwCursorShell::_GetCursor()->end() ); OSL_ENSURE( !aTmp.empty(), "Enhanced pdf export - rectangles are missing" ); - const SwPageFrm* pSelectionPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pSelectionPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Create the destination for internal links: sal_Int32 nDestId = -1; if ( bIntern ) { aURL = aURL.copy( 1 ); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); JumpToSwMark( &mrSh, aURL ); // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -1730,7 +1730,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } } - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); } // HYPERLINKS (Graphics, Frames, OLEs ) @@ -1744,8 +1744,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if ( RES_DRAWFRMFMT != pFrameFormat->Which() && SfxItemState::SET == pFrameFormat->GetAttrSet().GetItemState( RES_URL, true, &pItem ) ) { - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); OUString aURL( static_cast<const SwFormatURL*>(pItem)->GetURL() ); const bool bIntern = '#' == aURL[0]; @@ -1755,13 +1755,13 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if ( bIntern ) { aURL = aURL.copy( 1 ); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); JumpToSwMark( &mrSh, aURL ); // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - pCurrPage = static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + pCurrPage = static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -1810,7 +1810,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } } - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); } // REFERENCES @@ -1832,15 +1832,15 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() !mrSh.SelectHiddenRange() ) { // Select the field: - mrSh.SwCrsrShell::SetMark(); - mrSh.SwCrsrShell::Right( 1, CRSR_SKIP_CHARS ); + mrSh.SwCursorShell::SetMark(); + mrSh.SwCursorShell::Right( 1, CRSR_SKIP_CHARS ); // Link Rectangles SwRects aTmp; - aTmp.insert( aTmp.begin(), mrSh.SwCrsrShell::_GetCrsr()->begin(), mrSh.SwCrsrShell::_GetCrsr()->end() ); + aTmp.insert( aTmp.begin(), mrSh.SwCursorShell::_GetCursor()->begin(), mrSh.SwCursorShell::_GetCursor()->end() ); OSL_ENSURE( !aTmp.empty(), "Enhanced pdf export - rectangles are missing" ); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); // Destination Rectangle const SwGetRefField* pField = @@ -1849,7 +1849,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() mrSh.GotoRefMark( rRefName, pField->GetSubType(), pField->GetSeqNo() ); const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -1900,7 +1900,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } pFirst = aIter.Next(); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); } // FOOTNOTES @@ -1912,27 +1912,27 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() const SwTextFootnote* pTextFootnote = pDoc->GetFootnoteIdxs()[ nIdx ]; SwTextNode& rTNd = const_cast<SwTextNode&>(pTextFootnote->GetTextNode()); - mrSh._GetCrsr()->GetPoint()->nNode = rTNd; - mrSh._GetCrsr()->GetPoint()->nContent.Assign( &rTNd, pTextFootnote->GetStart() ); + mrSh._GetCursor()->GetPoint()->nNode = rTNd; + mrSh._GetCursor()->GetPoint()->nContent.Assign( &rTNd, pTextFootnote->GetStart() ); // 1. Check if the whole paragraph is hidden // 2. Check for hidden text attribute if ( rTNd.GetTextNode()->IsHidden() || mrSh.SelectHiddenRange() ) continue; - SwCrsrSaveState aSaveState( *mrSh._GetCrsr() ); + SwCursorSaveState aSaveState( *mrSh._GetCursor() ); // Select the footnote: - mrSh.SwCrsrShell::SetMark(); - mrSh.SwCrsrShell::Right( 1, CRSR_SKIP_CHARS ); + mrSh.SwCursorShell::SetMark(); + mrSh.SwCursorShell::Right( 1, CRSR_SKIP_CHARS ); // Link Rectangle SwRects aTmp; - aTmp.insert( aTmp.begin(), mrSh.SwCrsrShell::_GetCrsr()->begin(), mrSh.SwCrsrShell::_GetCrsr()->end() ); + aTmp.insert( aTmp.begin(), mrSh.SwCursorShell::_GetCursor()->begin(), mrSh.SwCursorShell::_GetCursor()->end() ); OSL_ENSURE( !aTmp.empty(), "Enhanced pdf export - rectangles are missing" ); - mrSh._GetCrsr()->RestoreSavePos(); - mrSh.SwCrsrShell::ClearMark(); + mrSh._GetCursor()->RestoreSavePos(); + mrSh.SwCursorShell::ClearMark(); if (aTmp.empty()) continue; @@ -1948,8 +1948,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -2014,8 +2014,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() mrSh.GotoOutline(i); const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -2054,7 +2054,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() { //get the name const ::sw::mark::IMark* pBkmk = ppMark->get(); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); OUString sBkName = pBkmk->GetName(); //jump to it @@ -2063,8 +2063,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -2076,7 +2076,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() pPDFExtOutDevData->CreateNamedDest(sBkName, aRect, nDestPageNum); } } - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); //<--- i56629 } } @@ -2100,8 +2100,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -2133,7 +2133,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Restore view, cursor, and outdev: mrSh.LockView( bOldLockView ); - mrSh.SwCrsrShell::Pop( false ); + mrSh.SwCursorShell::Pop( false ); mrOut.Pop(); } @@ -2216,13 +2216,13 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP // the offset of the link rectangle calculates as follows: const Point aOffset = rLinkRect.Pos() + mrOut.GetMapMode().GetOrigin(); - SwIterator<SwTextFrm,SwTextNode> aIter( rTNd ); - for ( SwTextFrm* pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( rTNd ); + for ( SwTextFrame* pTmpFrame = aIter.First(); pTmpFrame; pTmpFrame = aIter.Next() ) { // Add offset to current page: - const SwPageFrm* pPageFrm = pTmpFrm->FindPageFrm(); + const SwPageFrame* pPageFrame = pTmpFrame->FindPageFrame(); SwRect aHFLinkRect( rLinkRect ); - aHFLinkRect.Pos() = pPageFrm->Frm().Pos() + aOffset; + aHFLinkRect.Pos() = pPageFrame->Frame().Pos() + aOffset; // #i97135# the gcc_x64 optimizer gets aHFLinkRect != rLinkRect wrong // fool it by comparing the position only (the width and height are the @@ -2235,7 +2235,7 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP for ( size_t nNumIdx = 0; nNumIdx < aHFLinkPageNums.size(); ++nNumIdx ) { // Link Export - Rectangle aRect(SwRectToPDFRect(pPageFrm, aHFLinkRect.SVRect())); + Rectangle aRect(SwRectToPDFRect(pPageFrame, aHFLinkRect.SVRect())); const sal_Int32 nHFLinkId = rPDFExtOutDevData.CreateLink(aRect, aHFLinkPageNums[nNumIdx]); diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 6d82c85adac5..ef421b1496cd 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -404,7 +404,7 @@ void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS, } // It is possible, that Init is called more than once, e.g., in a - // SwTextFrm::FormatOnceMore situation. + // SwTextFrame::FormatOnceMore situation. delete pFnt; pFnt = new SwFont( rFnt ); } diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx index 06ac0786b3c3..9588973deec3 100644 --- a/sw/source/core/text/blink.cxx +++ b/sw/source/core/text/blink.cxx @@ -68,8 +68,8 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void) for (SwBlinkSet::iterator it = m_List.begin(); it != m_List.end(); ) { const SwBlinkPortion* pTmp = it->get(); - if( pTmp->GetRootFrm() && - pTmp->GetRootFrm()->GetCurrShell() ) + if( pTmp->GetRootFrame() && + pTmp->GetRootFrame()->GetCurrShell() ) { ++it; @@ -104,7 +104,7 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void) Rectangle aRefresh( aPos, Size( nWidth, nHeight ) ); aRefresh.Right() += ( aRefresh.Bottom()- aRefresh.Top() ) / 8; - pTmp->GetRootFrm() + pTmp->GetRootFrame() ->GetCurrShell()->InvalidateWindows( aRefresh ); } else // Portions without a shell can be removed from the list @@ -116,7 +116,7 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void) } void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor, - const SwTextFrm *pTextFrm, sal_uInt16 nDir ) + const SwTextFrame *pTextFrame, sal_uInt16 nDir ) { std::unique_ptr<SwBlinkPortion> pBlinkPor(new SwBlinkPortion(pPor, nDir)); @@ -128,9 +128,9 @@ void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor, else { pBlinkPor->SetPos( rPoint ); - pBlinkPor->SetRootFrm( pTextFrm->getRootFrm() ); + pBlinkPor->SetRootFrame( pTextFrame->getRootFrame() ); m_List.insert(std::move(pBlinkPor)); - pTextFrm->SetBlinkPor(); + pTextFrame->SetBlinkPor(); if( pPor->IsLayPortion() || pPor->IsParaPortion() ) const_cast<SwLineLayout*>(static_cast<const SwLineLayout*>(pPor))->SetBlinking(); @@ -161,11 +161,11 @@ void SwBlink::Delete( const SwLinePortion* pPor ) m_List.erase( pBlinkPortion ); } -void SwBlink::FrmDelete( const SwRootFrm* pRoot ) +void SwBlink::FrameDelete( const SwRootFrame* pRoot ) { for (SwBlinkSet::iterator it = m_List.begin(); it != m_List.end(); ) { - if (pRoot == (*it)->GetRootFrm()) + if (pRoot == (*it)->GetRootFrame()) m_List.erase( it++ ); else ++it; diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 5323eec7bd88..346aed608ac4 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -55,82 +55,82 @@ using namespace ::com::sun::star; * - RightMargin abstains from adjusting position with -1 * - GetCharRect returns a GetEndCharRect for MV_RIGHTMARGIN * - GetEndCharRect sets bRightMargin to true - * - SwTextCursor::bRightMargin is set to false by CharCrsrToLine + * - SwTextCursor::bRightMargin is set to false by CharCursorToLine */ namespace { -SwTextFrm *GetAdjFrmAtPos( SwTextFrm *pFrm, const SwPosition &rPos, +SwTextFrame *GetAdjFrameAtPos( SwTextFrame *pFrame, const SwPosition &rPos, const bool bRightMargin, const bool bNoScroll = true ) { // RightMargin in the last master line const sal_Int32 nOffset = rPos.nContent.GetIndex(); - SwTextFrm *pFrmAtPos = pFrm; - if( !bNoScroll || pFrm->GetFollow() ) + SwTextFrame *pFrameAtPos = pFrame; + if( !bNoScroll || pFrame->GetFollow() ) { - pFrmAtPos = pFrm->GetFrmAtPos( rPos ); - if( nOffset < pFrmAtPos->GetOfst() && - !pFrmAtPos->IsFollow() ) + pFrameAtPos = pFrame->GetFrameAtPos( rPos ); + if( nOffset < pFrameAtPos->GetOfst() && + !pFrameAtPos->IsFollow() ) { sal_Int32 nNew = nOffset; if( nNew < MIN_OFFSET_STEP ) nNew = 0; else nNew -= MIN_OFFSET_STEP; - sw_ChangeOffset( pFrmAtPos, nNew ); + sw_ChangeOffset( pFrameAtPos, nNew ); } } - while( pFrm != pFrmAtPos ) + while( pFrame != pFrameAtPos ) { - pFrm = pFrmAtPos; - pFrm->GetFormatted(); - pFrmAtPos = pFrm->GetFrmAtPos( rPos ); + pFrame = pFrameAtPos; + pFrame->GetFormatted(); + pFrameAtPos = pFrame->GetFrameAtPos( rPos ); } if( nOffset && bRightMargin ) { - while( pFrmAtPos && pFrmAtPos->GetOfst() == nOffset && - pFrmAtPos->IsFollow() ) + while( pFrameAtPos && pFrameAtPos->GetOfst() == nOffset && + pFrameAtPos->IsFollow() ) { - pFrmAtPos->GetFormatted(); - pFrmAtPos = pFrmAtPos->FindMaster(); + pFrameAtPos->GetFormatted(); + pFrameAtPos = pFrameAtPos->FindMaster(); } - OSL_ENSURE( pFrmAtPos, "+GetCharRect: no frame with my rightmargin" ); + OSL_ENSURE( pFrameAtPos, "+GetCharRect: no frame with my rightmargin" ); } - return pFrmAtPos ? pFrmAtPos : pFrm; + return pFrameAtPos ? pFrameAtPos : pFrame; } } -bool sw_ChangeOffset( SwTextFrm* pFrm, sal_Int32 nNew ) +bool sw_ChangeOffset( SwTextFrame* pFrame, sal_Int32 nNew ) { // Do not scroll in areas and outside of flies - OSL_ENSURE( !pFrm->IsFollow(), "Illegal Scrolling by Follow!" ); - if( pFrm->GetOfst() != nNew && !pFrm->IsInSct() ) + OSL_ENSURE( !pFrame->IsFollow(), "Illegal Scrolling by Follow!" ); + if( pFrame->GetOfst() != nNew && !pFrame->IsInSct() ) { - SwFlyFrm *pFly = pFrm->FindFlyFrm(); + SwFlyFrame *pFly = pFrame->FindFlyFrame(); // Attention: if e.g. in a column frame the size is still invalid // we must not scroll around just like that if ( ( pFly && pFly->IsValid() && !pFly->GetNextLink() && !pFly->GetPrevLink() ) || - ( !pFly && pFrm->IsInTab() ) ) + ( !pFly && pFrame->IsInTab() ) ) { - SwViewShell* pVsh = pFrm->getRootFrm()->GetCurrShell(); + SwViewShell* pVsh = pFrame->getRootFrame()->GetCurrShell(); if( pVsh ) { if( pVsh->GetRingContainer().size() > 1 || - ( pFrm->GetDrawObjs() && pFrm->GetDrawObjs()->size() ) ) + ( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() ) ) { - if( !pFrm->GetOfst() ) + if( !pFrame->GetOfst() ) return false; nNew = 0; } - pFrm->SetOfst( nNew ); - pFrm->SetPara( nullptr ); - pFrm->GetFormatted(); - if( pFrm->Frm().HasArea() ) - pFrm->getRootFrm()->GetCurrShell()->InvalidateWindows( pFrm->Frm() ); + pFrame->SetOfst( nNew ); + pFrame->SetPara( nullptr ); + pFrame->GetFormatted(); + if( pFrame->Frame().HasArea() ) + pFrame->getRootFrame()->GetCurrShell()->InvalidateWindows( pFrame->Frame() ); return true; } } @@ -138,17 +138,17 @@ bool sw_ChangeOffset( SwTextFrm* pFrm, sal_Int32 nNew ) return false; } -SwTextFrm& SwTextFrm::GetFrmAtOfst( const sal_Int32 nWhere ) +SwTextFrame& SwTextFrame::GetFrameAtOfst( const sal_Int32 nWhere ) { - SwTextFrm* pRet = this; + SwTextFrame* pRet = this; while( pRet->HasFollow() && nWhere >= pRet->GetFollow()->GetOfst() ) pRet = pRet->GetFollow(); return *pRet; } -SwTextFrm *SwTextFrm::GetFrmAtPos( const SwPosition &rPos ) +SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos ) { - SwTextFrm *pFoll = this; + SwTextFrame *pFoll = this; while( pFoll->GetFollow() ) { if( rPos.nContent.GetIndex() > pFoll->GetFollow()->GetOfst() ) @@ -167,15 +167,15 @@ SwTextFrm *SwTextFrm::GetFrmAtPos( const SwPosition &rPos ) /* * GetCharRect() returns the char's char line described by aPos. - * GetCrsrOfst() does the reverse: It goes from a document coordinate to + * GetCursorOfst() does the reverse: It goes from a document coordinate to * a Pam. * Both are virtual in the frame base class and thus are redefined here. */ -bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, - SwCrsrMoveState *pCMS ) const +bool SwTextFrame::GetCharRect( SwRect& rOrig, const SwPosition &rPos, + SwCursorMoveState *pCMS ) const { - OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::GetCharRect with swapped frame" ); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::GetCharRect with swapped frame" ); if( IsLocked() || IsHiddenNow() ) return false; @@ -186,29 +186,29 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, // - the Follow chain grows dynamically; the one we end up in // needs to be formatted - // Optimisation: reading ahead saves us a GetAdjFrmAtPos + // Optimisation: reading ahead saves us a GetAdjFrameAtPos const bool bRightMargin = pCMS && ( MV_RIGHTMARGIN == pCMS->m_eState ); const bool bNoScroll = pCMS && pCMS->m_bNoScroll; - SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), rPos, bRightMargin, + SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), rPos, bRightMargin, bNoScroll ); - pFrm->GetFormatted(); - const SwFrm* pTmpFrm = static_cast<SwFrm*>(pFrm->GetUpper()); + pFrame->GetFormatted(); + const SwFrame* pTmpFrame = static_cast<SwFrame*>(pFrame->GetUpper()); - SWRECTFN ( pFrm ) - const SwTwips nUpperMaxY = (pTmpFrm->*fnRect->fnGetPrtBottom)(); - const SwTwips nFrmMaxY = (pFrm->*fnRect->fnGetPrtBottom)(); + SWRECTFN ( pFrame ) + const SwTwips nUpperMaxY = (pTmpFrame->*fnRect->fnGetPrtBottom)(); + const SwTwips nFrameMaxY = (pFrame->*fnRect->fnGetPrtBottom)(); // nMaxY is an absolute value SwTwips nMaxY = bVert ? - ( bVertL2R ? std::min( nFrmMaxY, nUpperMaxY ) : std::max( nFrmMaxY, nUpperMaxY ) ) : - std::min( nFrmMaxY, nUpperMaxY ); + ( bVertL2R ? std::min( nFrameMaxY, nUpperMaxY ) : std::max( nFrameMaxY, nUpperMaxY ) ) : + std::min( nFrameMaxY, nUpperMaxY ); bool bRet = false; - if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) + if ( pFrame->IsEmpty() || ! (pFrame->Prt().*fnRect->fnGetHeight)() ) { - Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos(); - SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode(); + Point aPnt1 = pFrame->Frame().Pos() + pFrame->Prt().Pos(); + SwTextNode* pTextNd = const_cast<SwTextFrame*>(this)->GetTextNode(); short nFirstOffset; pTextNd->GetFirstLineOfsWithNum( nFirstOffset ); @@ -219,7 +219,7 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, aPnt1.Y() += nFirstOffset; if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; - aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); + aPnt2.X() = aPnt1.X() + pFrame->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) aPnt2.X() = nMaxY; @@ -232,7 +232,7 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, if( aPnt1.Y() > nMaxY ) aPnt1.Y() = nMaxY; aPnt2.X() = aPnt1.X(); - aPnt2.Y() = aPnt1.Y() + pFrm->Prt().Height(); + aPnt2.Y() = aPnt1.Y() + pFrame->Prt().Height(); if( aPnt2.Y() > nMaxY ) aPnt2.Y() = nMaxY; } @@ -245,19 +245,19 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, pCMS->m_aRealHeight.Y() = bVert ? -rOrig.Width() : rOrig.Height(); } - if ( pFrm->IsRightToLeft() ) - pFrm->SwitchLTRtoRTL( rOrig ); + if ( pFrame->IsRightToLeft() ) + pFrame->SwitchLTRtoRTL( rOrig ); bRet = true; } else { - if( !pFrm->HasPara() ) + if( !pFrame->HasPara() ) return false; - SwFrmSwapper aSwapper( pFrm, true ); + SwFrameSwapper aSwapper( pFrame, true ); if ( bVert ) - nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY ); + nMaxY = pFrame->SwitchVerticalToHorizontal( nMaxY ); bool bGoOn = true; const sal_Int32 nOffset = rPos.nContent.GetIndex(); @@ -266,28 +266,28 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, do { { - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); nNextOfst = aLine.GetEnd(); - // See comment in AdjustFrm + // See comment in AdjustFrame // Include the line's last char? bRet = bRightMargin ? aLine.GetEndCharRect( &rOrig, nOffset, pCMS, nMaxY ) : aLine.GetCharRect( &rOrig, nOffset, pCMS, nMaxY ); } - if ( pFrm->IsRightToLeft() ) - pFrm->SwitchLTRtoRTL( rOrig ); + if ( pFrame->IsRightToLeft() ) + pFrame->SwitchLTRtoRTL( rOrig ); if ( bVert ) - pFrm->SwitchHorizontalToVertical( rOrig ); + pFrame->SwitchHorizontalToVertical( rOrig ); - if( pFrm->IsUndersized() && pCMS && !pFrm->GetNext() && + if( pFrame->IsUndersized() && pCMS && !pFrame->GetNext() && (rOrig.*fnRect->fnGetBottom)() == nUpperMaxY && - pFrm->GetOfst() < nOffset && - !pFrm->IsFollow() && !bNoScroll && - pFrm->GetTextNode()->GetText().getLength() != nNextOfst) + pFrame->GetOfst() < nOffset && + !pFrame->IsFollow() && !bNoScroll && + pFrame->GetTextNode()->GetText().getLength() != nNextOfst) { - bGoOn = sw_ChangeOffset( pFrm, nNextOfst ); + bGoOn = sw_ChangeOffset( pFrame, nNextOfst ); } else bGoOn = false; @@ -295,12 +295,12 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, if ( pCMS ) { - if ( pFrm->IsRightToLeft() ) + if ( pFrame->IsRightToLeft() ) { if( pCMS->m_b2Lines && pCMS->m_p2Lines) { - pFrm->SwitchLTRtoRTL( pCMS->m_p2Lines->aLine ); - pFrm->SwitchLTRtoRTL( pCMS->m_p2Lines->aPortion ); + pFrame->SwitchLTRtoRTL( pCMS->m_p2Lines->aLine ); + pFrame->SwitchLTRtoRTL( pCMS->m_p2Lines->aPortion ); } } @@ -319,8 +319,8 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, } if( pCMS->m_b2Lines && pCMS->m_p2Lines) { - pFrm->SwitchHorizontalToVertical( pCMS->m_p2Lines->aLine ); - pFrm->SwitchHorizontalToVertical( pCMS->m_p2Lines->aPortion ); + pFrame->SwitchHorizontalToVertical( pCMS->m_p2Lines->aLine ); + pFrame->SwitchHorizontalToVertical( pCMS->m_p2Lines->aPortion ); } } @@ -328,11 +328,11 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, } if( bRet ) { - SwPageFrm *pPage = pFrm->FindPageFrm(); + SwPageFrame *pPage = pFrame->FindPageFrame(); OSL_ENSURE( pPage, "Text escaped from page?" ); const SwTwips nOrigTop = (rOrig.*fnRect->fnGetTop)(); - const SwTwips nPageTop = (pPage->Frm().*fnRect->fnGetTop)(); - const SwTwips nPageBott = (pPage->Frm().*fnRect->fnGetBottom)(); + const SwTwips nPageTop = (pPage->Frame().*fnRect->fnGetTop)(); + const SwTwips nPageBott = (pPage->Frame().*fnRect->fnGetBottom)(); // We have the following situation: if the frame is in an invalid // sectionframe, it's possible that the frame is outside the page. @@ -353,41 +353,41 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, * and is used by the auto-positioned frame. */ -bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const +bool SwTextFrame::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const { if( IsHiddenNow() ) return false; const sal_Int32 nOffset = rPos.nContent.GetIndex(); - SwTextFrm* pFrm = &(const_cast<SwTextFrm*>(this)->GetFrmAtOfst( nOffset )); + SwTextFrame* pFrame = &(const_cast<SwTextFrame*>(this)->GetFrameAtOfst( nOffset )); - pFrm->GetFormatted(); - const SwFrm* pTmpFrm = static_cast<SwFrm*>(pFrm->GetUpper()); + pFrame->GetFormatted(); + const SwFrame* pTmpFrame = static_cast<SwFrame*>(pFrame->GetUpper()); - SWRECTFN( pTmpFrm ) - SwTwips nUpperMaxY = (pTmpFrm->*fnRect->fnGetPrtBottom)(); + SWRECTFN( pTmpFrame ) + SwTwips nUpperMaxY = (pTmpFrame->*fnRect->fnGetPrtBottom)(); // nMaxY is in absolute value SwTwips nMaxY; if ( bVert ) { if ( bVertL2R ) - nMaxY = std::min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); + nMaxY = std::min( (pFrame->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); else - nMaxY = std::max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); + nMaxY = std::max( (pFrame->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); } else - nMaxY = std::min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); - if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) + nMaxY = std::min( (pFrame->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); + if ( pFrame->IsEmpty() || ! (pFrame->Prt().*fnRect->fnGetHeight)() ) { - Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos(); + Point aPnt1 = pFrame->Frame().Pos() + pFrame->Prt().Pos(); Point aPnt2; if ( bVert ) { if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; - aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); + aPnt2.X() = aPnt1.X() + pFrame->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) aPnt2.X() = nMaxY; @@ -397,7 +397,7 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const if( aPnt1.Y() > nMaxY ) aPnt1.Y() = nMaxY; aPnt2.X() = aPnt1.X(); - aPnt2.Y() = aPnt1.Y() + pFrm->Prt().Height(); + aPnt2.Y() = aPnt1.Y() + pFrame->Prt().Height(); if( aPnt2.Y() > nMaxY ) aPnt2.Y() = nMaxY; } @@ -406,16 +406,16 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const } else { - if( !pFrm->HasPara() ) + if( !pFrame->HasPara() ) return false; - SwFrmSwapper aSwapper( pFrm, true ); + SwFrameSwapper aSwapper( pFrame, true ); if ( bVert ) - nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY ); + nMaxY = pFrame->SwitchVerticalToHorizontal( nMaxY ); - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); - SwCrsrMoveState aTmpState( MV_SETONLYTEXT ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); + SwCursorMoveState aTmpState( MV_SETONLYTEXT ); aTmpState.m_bRealHeight = true; if( aLine.GetCharRect( &rOrig, nOffset, &aTmpState, nMaxY ) ) { @@ -425,11 +425,11 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const rOrig.Height( aTmpState.m_aRealHeight.Y() ); } - if ( pFrm->IsRightToLeft() ) - pFrm->SwitchLTRtoRTL( rOrig ); + if ( pFrame->IsRightToLeft() ) + pFrame->SwitchLTRtoRTL( rOrig ); if ( bVert ) - pFrm->SwitchHorizontalToVertical( rOrig ); + pFrame->SwitchHorizontalToVertical( rOrig ); return true; } @@ -443,7 +443,7 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const - If a proportional line spacing is applied use top of anchor character as top of the line. */ -bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine, +bool SwTextFrame::GetTopOfLine( SwTwips& _onTopOfLine, const SwPosition& _rPos ) const { bool bRet = true; @@ -467,9 +467,9 @@ bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine, else { // determine formatted text frame that contains the requested position - SwTextFrm* pFrm = &(const_cast<SwTextFrm*>(this)->GetFrmAtOfst( nOffset )); - pFrm->GetFormatted(); - SWREFRESHFN( pFrm ) + SwTextFrame* pFrame = &(const_cast<SwTextFrame*>(this)->GetFrameAtOfst( nOffset )); + pFrame->GetFormatted(); + SWREFRESHFN( pFrame ) // If proportional line spacing is applied // to the text frame, the top of the anchor character is also the // top of the line. @@ -490,16 +490,16 @@ bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine, else { // assure that text frame is in a horizontal layout - SwFrmSwapper aSwapper( pFrm, true ); + SwFrameSwapper aSwapper( pFrame, true ); // determine text line that contains the requested position - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); - aLine.CharCrsrToLine( nOffset ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); + aLine.CharCursorToLine( nOffset ); // determine top of line _onTopOfLine = aLine.Y(); if ( bVert ) { - _onTopOfLine = pFrm->SwitchHorizontalToVertical( _onTopOfLine ); + _onTopOfLine = pFrame->SwitchHorizontalToVertical( _onTopOfLine ); } } } @@ -513,8 +513,8 @@ bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine, struct SwFillData { - SwRect aFrm; - const SwCrsrMoveState *pCMS; + SwRect aFrame; + const SwCursorMoveState *pCMS; SwPosition* pPos; const Point& rPoint; SwTwips nLineWidth; @@ -522,66 +522,66 @@ struct SwFillData bool bInner : 1; bool bColumn : 1; bool bEmpty : 1; - SwFillData( const SwCrsrMoveState *pC, SwPosition* pP, const SwRect& rR, - const Point& rPt ) : aFrm( rR ), pCMS( pC ), pPos( pP ), rPoint( rPt ), + SwFillData( const SwCursorMoveState *pC, SwPosition* pP, const SwRect& rR, + const Point& rPt ) : aFrame( rR ), pCMS( pC ), pPos( pP ), rPoint( rPt ), nLineWidth( 0 ), bFirstLine( true ), bInner( false ), bColumn( false ), bEmpty( true ){} SwFillMode Mode() const { return pCMS->m_pFill->eMode; } long X() const { return rPoint.X(); } long Y() const { return rPoint.Y(); } - long Left() const { return aFrm.Left(); } - long Right() const { return aFrm.Right(); } - long Bottom() const { return aFrm.Bottom(); } - SwFillCrsrPos &Fill() const { return *pCMS->m_pFill; } + long Left() const { return aFrame.Left(); } + long Right() const { return aFrame.Right(); } + long Bottom() const { return aFrame.Bottom(); } + SwFillCursorPos &Fill() const { return *pCMS->m_pFill; } void SetTab( sal_uInt16 nNew ) { pCMS->m_pFill->nTabCnt = nNew; } void SetSpace( sal_uInt16 nNew ) { pCMS->m_pFill->nSpaceCnt = nNew; } void SetOrient( const sal_Int16 eNew ){ pCMS->m_pFill->eOrient = eNew; } }; -bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, - const bool bChgFrm, SwCrsrMoveState* pCMS ) const +bool SwTextFrame::_GetCursorOfst(SwPosition* pPos, const Point& rPoint, + const bool bChgFrame, SwCursorMoveState* pCMS ) const { - // _GetCrsrOfst is called by GetCrsrOfst and GetKeyCrsrOfst. + // _GetCursorOfst is called by GetCursorOfst and GetKeyCursorOfst. // Never just a return false. if( IsLocked() || IsHiddenNow() ) return false; - const_cast<SwTextFrm*>(this)->GetFormatted(); + const_cast<SwTextFrame*>(this)->GetFormatted(); Point aOldPoint( rPoint ); if ( IsVertical() ) { SwitchVerticalToHorizontal( (Point&)rPoint ); - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); } if ( IsRightToLeft() ) SwitchRTLtoLTR( (Point&)rPoint ); SwFillData *pFillData = ( pCMS && pCMS->m_pFill ) ? - new SwFillData( pCMS, pPos, Frm(), rPoint ) : nullptr; + new SwFillData( pCMS, pPos, Frame(), rPoint ) : nullptr; if ( IsEmpty() ) { - SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode(); + SwTextNode* pTextNd = const_cast<SwTextFrame*>(this)->GetTextNode(); pPos->nNode = *pTextNd; pPos->nContent.Assign( pTextNd, 0 ); if( pCMS && pCMS->m_bFieldInfo ) { - SwTwips nDiff = rPoint.X() - Frm().Left() - Prt().Left(); + SwTwips nDiff = rPoint.X() - Frame().Left() - Prt().Left(); if( nDiff > 50 || nDiff < 0 ) pCMS->m_bPosCorr = true; } } else { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(this), &aInf ); - // See comment in AdjustFrm() - SwTwips nMaxY = Frm().Top() + Prt().Top() + Prt().Height(); + // See comment in AdjustFrame() + SwTwips nMaxY = Frame().Top() + Prt().Top() + Prt().Height(); aLine.TwipsToLine( rPoint.Y() ); while( aLine.Y() + aLine.GetLineHeight() > nMaxY ) { @@ -594,25 +594,25 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, while( aLine.GetLineNr() > 1 ) aLine.Prev(); - sal_Int32 nOffset = aLine.GetCrsrOfst( pPos, rPoint, bChgFrm, pCMS ); + sal_Int32 nOffset = aLine.GetCursorOfst( pPos, rPoint, bChgFrame, pCMS ); if( pCMS && pCMS->m_eState == MV_NONE && aLine.GetEnd() == nOffset ) pCMS->m_eState = MV_RIGHTMARGIN; // pPos is a pure IN parameter and must not be evaluated. - // pIter->GetCrsrOfst returns from a nesting with COMPLETE_STRING. - // If SwTextIter::GetCrsrOfst calls GetCrsrOfst further by itself + // pIter->GetCursorOfst returns from a nesting with COMPLETE_STRING. + // If SwTextIter::GetCursorOfst calls GetCursorOfst further by itself // nNode changes the position. // In such cases, pPos must not be calculated. if( COMPLETE_STRING != nOffset ) { - SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode(); + SwTextNode* pTextNd = const_cast<SwTextFrame*>(this)->GetTextNode(); pPos->nNode = *pTextNd; pPos->nContent.Assign( pTextNd, nOffset ); if( pFillData ) { if (pTextNd->GetText().getLength() > nOffset || - rPoint.Y() < Frm().Top() ) + rPoint.Y() < Frame().Top() ) pFillData->bInner = true; pFillData->bFirstLine = aLine.GetLineNr() < 2; if (pTextNd->GetText().getLength()) @@ -624,22 +624,22 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, } } bool bChgFillData = false; - if( pFillData && FindPageFrm()->Frm().IsInside( aOldPoint ) ) + if( pFillData && FindPageFrame()->Frame().IsInside( aOldPoint ) ) { - FillCrsrPos( *pFillData ); + FillCursorPos( *pFillData ); bChgFillData = true; } if ( IsVertical() ) { if ( bChgFillData ) - SwitchHorizontalToVertical( pFillData->Fill().aCrsr.Pos() ); - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + SwitchHorizontalToVertical( pFillData->Fill().aCursor.Pos() ); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); } if ( IsRightToLeft() && bChgFillData ) { - SwitchLTRtoRTL( pFillData->Fill().aCrsr.Pos() ); + SwitchLTRtoRTL( pFillData->Fill().aCursor.Pos() ); const sal_Int16 eOrient = pFillData->pCMS->m_pFill->eOrient; if ( text::HoriOrientation::LEFT == eOrient ) @@ -654,42 +654,42 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, return true; } -bool SwTextFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint, - SwCrsrMoveState* pCMS, bool ) const +bool SwTextFrame::GetCursorOfst(SwPosition* pPos, Point& rPoint, + SwCursorMoveState* pCMS, bool ) const { - const bool bChgFrm = !(pCMS && MV_UPDOWN == pCMS->m_eState); - return _GetCrsrOfst( pPos, rPoint, bChgFrm, pCMS ); + const bool bChgFrame = !(pCMS && MV_UPDOWN == pCMS->m_eState); + return _GetCursorOfst( pPos, rPoint, bChgFrame, pCMS ); } /* * Layout-oriented cursor movement to the line start. */ -bool SwTextFrm::LeftMargin(SwPaM *pPam) const +bool SwTextFrame::LeftMargin(SwPaM *pPam) const { if( &pPam->GetNode() != GetNode() ) - pPam->GetPoint()->nNode = *const_cast<SwTextFrm*>(this)->GetTextNode(); + pPam->GetPoint()->nNode = *const_cast<SwTextFrame*>(this)->GetTextNode(); - SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *pPam->GetPoint(), + SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *pPam->GetPoint(), SwTextCursor::IsRightMargin() ); - pFrm->GetFormatted(); + pFrame->GetFormatted(); sal_Int32 nIndx; - if ( pFrm->IsEmpty() ) + if ( pFrame->IsEmpty() ) nIndx = 0; else { - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); - aLine.CharCrsrToLine(pPam->GetPoint()->nContent.GetIndex()); + aLine.CharCursorToLine(pPam->GetPoint()->nContent.GetIndex()); nIndx = aLine.GetStart(); - if( pFrm->GetOfst() && !pFrm->IsFollow() && !aLine.GetPrev() ) + if( pFrame->GetOfst() && !pFrame->IsFollow() && !aLine.GetPrev() ) { - sw_ChangeOffset( pFrm, 0 ); + sw_ChangeOffset( pFrame, 0 ); nIndx = 0; } } - pPam->GetPoint()->nContent = SwIndex( pFrm->GetTextNode(), nIndx ); + pPam->GetPoint()->nContent = SwIndex( pFrame->GetTextNode(), nIndx ); SwTextCursor::SetRightMargin( false ); return true; } @@ -700,45 +700,45 @@ bool SwTextFrm::LeftMargin(SwPaM *pPam) const * the last char in order to append text. */ -bool SwTextFrm::RightMargin(SwPaM *pPam, bool bAPI) const +bool SwTextFrame::RightMargin(SwPaM *pPam, bool bAPI) const { if( &pPam->GetNode() != GetNode() ) - pPam->GetPoint()->nNode = *const_cast<SwTextFrm*>(this)->GetTextNode(); + pPam->GetPoint()->nNode = *const_cast<SwTextFrame*>(this)->GetTextNode(); - SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *pPam->GetPoint(), + SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *pPam->GetPoint(), SwTextCursor::IsRightMargin() ); - pFrm->GetFormatted(); + pFrame->GetFormatted(); sal_Int32 nRightMargin; if ( IsEmpty() ) nRightMargin = 0; else { - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); - aLine.CharCrsrToLine(pPam->GetPoint()->nContent.GetIndex()); + aLine.CharCursorToLine(pPam->GetPoint()->nContent.GetIndex()); nRightMargin = aLine.GetStart() + aLine.GetCurr()->GetLen(); // We skip hard line brakes if( aLine.GetCurr()->GetLen() && CH_BREAK == aInf.GetText()[nRightMargin - 1]) --nRightMargin; - else if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) ) + else if( !bAPI && (aLine.GetNext() || pFrame->GetFollow()) ) { while( nRightMargin > aLine.GetStart() && ' ' == aInf.GetText()[nRightMargin - 1]) --nRightMargin; } } - pPam->GetPoint()->nContent = SwIndex( pFrm->GetTextNode(), nRightMargin ); + pPam->GetPoint()->nContent = SwIndex( pFrame->GetTextNode(), nRightMargin ); SwTextCursor::SetRightMargin( !bAPI ); return true; } -// The following two methods try to put the Crsr into the next/succsessive +// The following two methods try to put the Cursor into the next/succsessive // line. If we do not have a preceding/successive line we forward the call // to the base class. -// The Crsr's horizontal justification is done afterwards by the CrsrShell. +// The Cursor's horizontal justification is done afterwards by the CursorShell. class SwSetToRightMargin { @@ -749,7 +749,7 @@ public: inline void SetRight( const bool bNew ) { bRight = bNew; } }; -bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, +bool SwTextFrame::_UnitUp( SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const { // Set the RightMargin if needed @@ -761,10 +761,10 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, { // If the PaM is located within different boxes, we have a table selection, // which is handled by the base class. - return SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly ); + return SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly ); } - const_cast<SwTextFrm*>(this)->GetFormatted(); + const_cast<SwTextFrame*>(this)->GetFormatted(); const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex(); SwRect aCharBox; @@ -774,14 +774,14 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, do { if( nFormat != COMPLETE_STRING && !IsFollow() ) - sw_ChangeOffset( const_cast<SwTextFrm*>(this), nFormat ); + sw_ChangeOffset( const_cast<SwTextFrame*>(this), nFormat ); - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(this), &aInf ); // Optimize away flys with no flow and IsDummy() if( nPos ) - aLine.CharCrsrToLine( nPos ); + aLine.CharCursorToLine( nPos ); else aLine.Top(); @@ -821,16 +821,16 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, aCharBox.SSize().Width() /= 2; aCharBox.Pos().X() = aCharBox.Pos().X() - 150; - // See comment in SwTextFrm::GetCrsrOfst() + // See comment in SwTextFrame::GetCursorOfst() #if OSL_DEBUG_LEVEL > 0 const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex(); #endif // The node should not be changed - sal_Int32 nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(), + sal_Int32 nTmpOfst = aLine.GetCursorOfst( pPam->GetPoint(), aCharBox.Pos(), false ); #if OSL_DEBUG_LEVEL > 0 OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(), - "SwTextFrm::UnitUp: illegal node change" ); + "SwTextFrame::UnitUp: illegal node change" ); #endif // We make sure that we move up. @@ -840,7 +840,7 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, aSet.SetRight( true ); } pPam->GetPoint()->nContent = - SwIndex( const_cast<SwTextFrm*>(this)->GetTextNode(), nTmpOfst ); + SwIndex( const_cast<SwTextFrame*>(this)->GetTextNode(), nTmpOfst ); return true; } @@ -858,13 +858,13 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, */ if ( IsFollow() ) { - const SwTextFrm *pTmpPrev = FindMaster(); + const SwTextFrame *pTmpPrev = FindMaster(); sal_Int32 nOffs = GetOfst(); if( pTmpPrev ) { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bProtectedAllowed = pSh && pSh->GetViewOptions()->IsCursorInProtectedArea(); - const SwTextFrm *pPrevPrev = pTmpPrev; + const SwTextFrame *pPrevPrev = pTmpPrev; // We skip protected frames and frames without content here while( pPrevPrev && ( pPrevPrev->GetOfst() == nOffs || ( !bProtectedAllowed && pPrevPrev->IsProtected() ) ) ) @@ -877,12 +877,12 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, pPrevPrev = nullptr; } if ( !pPrevPrev ) - return pTmpPrev->SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly ); - aCharBox.Pos().Y() = pPrevPrev->Frm().Bottom() - 1; - return pPrevPrev->GetKeyCrsrOfst( pPam->GetPoint(), aCharBox.Pos() ); + return pTmpPrev->SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly ); + aCharBox.Pos().Y() = pPrevPrev->Frame().Bottom() - 1; + return pPrevPrev->GetKeyCursorOfst( pPam->GetPoint(), aCharBox.Pos() ); } } - return SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly ); + return SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly ); } // Used for Bidi. nPos is the logical position in the string, bLeft indicates @@ -892,7 +892,7 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, // current position static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nIdx, sal_Int32& nPos, bool& bRight, - sal_uInt8& nCrsrLevel, sal_uInt8 nDefaultDir ) + sal_uInt8& nCursorLevel, sal_uInt8 nDefaultDir ) { const SwLinePortion* pPor = rCurrLine.GetFirstPortion(); const SwLinePortion* pLast = nullptr; @@ -916,7 +916,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI nPos = nPos + pPor->GetLen(); // leave bidi portion - if ( nCrsrLevel != nDefaultDir ) + if ( nCursorLevel != nDefaultDir ) { bRecurse = false; } @@ -925,7 +925,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI // buffer: abcXYZ123 in LTR paragraph // view: abc123ZYX // cursor is between c and X in the buffer and cursor level = 0 - nCrsrLevel++; + nCursorLevel++; } // 2. special case: at beginning of portion after bidi portion @@ -933,7 +933,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI static_cast<const SwMultiPortion*>(pLast)->IsBidi() && nIdx == nPos ) { // enter bidi portion - if ( nCrsrLevel != nDefaultDir ) + if ( nCursorLevel != nDefaultDir ) { bRecurse = true; nIdx = nIdx - pLast->GetLen(); @@ -947,20 +947,20 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI const SwLineLayout& rLine = static_cast<const SwMultiPortion*>(pPor)->GetRoot(); sal_Int32 nTmpPos = nPos - nIdx; bool bTmpForward = ! bRight; - sal_uInt8 nTmpCrsrLevel = nCrsrLevel; + sal_uInt8 nTmpCursorLevel = nCursorLevel; lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward, - nTmpCrsrLevel, nDefaultDir + 1 ); + nTmpCursorLevel, nDefaultDir + 1 ); nPos = nTmpPos + nIdx; bRight = bTmpForward; - nCrsrLevel = nTmpCrsrLevel; + nCursorLevel = nTmpCursorLevel; } // go forward else { bRight = true; - nCrsrLevel = nDefaultDir; + nCursorLevel = nDefaultDir; } } @@ -972,7 +972,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI if ( bRecurse && nIdx == nPos ) { // leave bidi portion - if ( nCrsrLevel == nDefaultDir ) + if ( nCursorLevel == nDefaultDir ) { bRecurse = false; } @@ -985,7 +985,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI nPos = nPos - pLast->GetLen(); // enter bidi portion - if ( nCrsrLevel % 2 == nDefaultDir % 2 ) + if ( nCursorLevel % 2 == nDefaultDir % 2 ) { bRecurse = true; nIdx = nIdx - pLast->GetLen(); @@ -995,7 +995,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI // buffer: abcXYZ123 in LTR paragraph // view: abc123ZYX // cursor is behind 3 in the buffer and cursor level = 2 - if ( nDefaultDir + 2 == nCrsrLevel ) + if ( nDefaultDir + 2 == nCursorLevel ) nPos = nPos + pLast->GetLen(); } } @@ -1006,37 +1006,37 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI const SwLineLayout& rLine = static_cast<const SwMultiPortion*>(pPor)->GetRoot(); sal_Int32 nTmpPos = nPos - nIdx; bool bTmpForward = ! bRight; - sal_uInt8 nTmpCrsrLevel = nCrsrLevel; + sal_uInt8 nTmpCursorLevel = nCursorLevel; lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward, - nTmpCrsrLevel, nDefaultDir + 1 ); + nTmpCursorLevel, nDefaultDir + 1 ); // special case: // buffer: abcXYZ123 in LTR paragraph // view: abc123ZYX // cursor is between Z and 1 in the buffer and cursor level = 2 - if ( nTmpPos == pPor->GetLen() && nTmpCrsrLevel == nDefaultDir + 1 ) + if ( nTmpPos == pPor->GetLen() && nTmpCursorLevel == nDefaultDir + 1 ) { nTmpPos = nTmpPos - pPor->GetLen(); - nTmpCrsrLevel = nDefaultDir; + nTmpCursorLevel = nDefaultDir; bTmpForward = ! bTmpForward; } nPos = nTmpPos + nIdx; bRight = bTmpForward; - nCrsrLevel = nTmpCrsrLevel; + nCursorLevel = nTmpCursorLevel; } // go backward else { bRight = false; - nCrsrLevel = nDefaultDir; + nCursorLevel = nDefaultDir; } } } -void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, - bool& bForward, bool bInsertCrsr ) +void SwTextFrame::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCursorLevel, + bool& bForward, bool bInsertCursor ) { if( IsEmpty() || IsHiddenNow() ) return; @@ -1047,7 +1047,7 @@ void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, SwTextCursor aLine(this, &aInf); if( nPos ) - aLine.CharCrsrToLine( nPos ); + aLine.CharCursorToLine( nPos ); else aLine.Top(); @@ -1064,10 +1064,10 @@ void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, // If the cursor level is 1, the cursor blinks between X and d and // -> sets the cursor between d and e. // The overwrite cursor simply travels to the next visual character. - if ( bInsertCrsr ) + if ( bInsertCursor ) { lcl_VisualMoveRecursion( *pLine, nStt, nPos, bForward, - nCrsrLevel, IsRightToLeft() ? 1 : 0 ); + nCursorLevel, IsRightToLeft() ? 1 : 0 ); return; } @@ -1138,7 +1138,7 @@ void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, ubidi_close( pBidi ); } -bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, +bool SwTextFrame::_UnitDown(SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const { @@ -1148,15 +1148,15 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, { // If the PaM is located within different boxes, we have a table selection, // which is handled by the base class. - return SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly ); + return SwContentFrame::UnitDown( pPam, nOffset, bSetInReadOnly ); } - const_cast<SwTextFrm*>(this)->GetFormatted(); + const_cast<SwTextFrame*>(this)->GetFormatted(); const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex(); SwRect aCharBox; - const SwContentFrm *pTmpFollow = nullptr; + const SwContentFrame *pTmpFollow = nullptr; if ( IsVertical() ) - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); if ( !IsEmpty() && !IsHiddenNow() ) { @@ -1164,14 +1164,14 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, do { if( nFormat != COMPLETE_STRING && !IsFollow() && - !sw_ChangeOffset( const_cast<SwTextFrm*>(this), nFormat ) ) + !sw_ChangeOffset( const_cast<SwTextFrame*>(this), nFormat ) ) break; - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(this), &aInf ); nFormat = aLine.GetEnd(); - aLine.CharCrsrToLine( nPos ); + aLine.CharCursorToLine( nPos ); const SwLineLayout* pNextLine = aLine.GetNextLine(); const sal_Int32 nStart = aLine.GetStart(); @@ -1183,34 +1183,34 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, { aCharBox.SSize().Width() /= 2; #if OSL_DEBUG_LEVEL > 0 - // See comment in SwTextFrm::GetCrsrOfst() + // See comment in SwTextFrame::GetCursorOfst() const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex(); #endif if ( pNextLine && ! bFirstOfDouble ) aLine.NextLine(); - sal_Int32 nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(), + sal_Int32 nTmpOfst = aLine.GetCursorOfst( pPam->GetPoint(), aCharBox.Pos(), false ); #if OSL_DEBUG_LEVEL > 0 OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(), - "SwTextFrm::UnitDown: illegal node change" ); + "SwTextFrame::UnitDown: illegal node change" ); #endif // We make sure that we move down. if( nTmpOfst <= nStart && ! bFirstOfDouble ) nTmpOfst = nStart + 1; pPam->GetPoint()->nContent = - SwIndex( const_cast<SwTextFrm*>(this)->GetTextNode(), nTmpOfst ); + SwIndex( const_cast<SwTextFrame*>(this)->GetTextNode(), nTmpOfst ); if ( IsVertical() ) - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); return true; } if( nullptr != ( pTmpFollow = GetFollow() ) ) { // Skip protected follows - const SwContentFrm* pTmp = pTmpFollow; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwContentFrame* pTmp = pTmpFollow; + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( !pSh || !pSh->GetViewOptions()->IsCursorInProtectedArea() ) { while( pTmpFollow && pTmpFollow->IsProtected() ) @@ -1222,8 +1222,8 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, if( !pTmpFollow ) // Only protected ones left { if ( IsVertical() ) - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); - return pTmp->SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly ); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); + return pTmp->SwContentFrame::UnitDown( pPam, nOffset, bSetInReadOnly ); } aLine.GetCharRect( &aCharBox, nPos ); @@ -1251,63 +1251,63 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, pTmpFollow = GetFollow(); if ( IsVertical() ) - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); // We take a shortcut for follows if( pTmpFollow ) { - aCharBox.Pos().Y() = pTmpFollow->Frm().Top() + 1; - return static_cast<const SwTextFrm*>(pTmpFollow)->GetKeyCrsrOfst( pPam->GetPoint(), + aCharBox.Pos().Y() = pTmpFollow->Frame().Top() + 1; + return static_cast<const SwTextFrame*>(pTmpFollow)->GetKeyCursorOfst( pPam->GetPoint(), aCharBox.Pos() ); } - return SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly ); + return SwContentFrame::UnitDown( pPam, nOffset, bSetInReadOnly ); } -bool SwTextFrm::UnitUp(SwPaM *pPam, const SwTwips nOffset, +bool SwTextFrame::UnitUp(SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const { - /* We call ContentNode::GertFrm() in CrsrSh::Up(). + /* We call ContentNode::GertFrame() in CursorSh::Up(). * This _always returns the master. * In order to not mess with cursor travelling, we correct here - * in SwTextFrm. - * We calculate UnitUp for pFrm. pFrm is either a master (= this) or a + * in SwTextFrame. + * We calculate UnitUp for pFrame. pFrame is either a master (= this) or a * follow (!= this). */ - const SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *(pPam->GetPoint()), + const SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *(pPam->GetPoint()), SwTextCursor::IsRightMargin() ); - const bool bRet = pFrm->_UnitUp( pPam, nOffset, bSetInReadOnly ); + const bool bRet = pFrame->_UnitUp( pPam, nOffset, bSetInReadOnly ); // No SwTextCursor::SetRightMargin( false ); // Instead we have a SwSetToRightMargin in _UnitUp return bRet; } -bool SwTextFrm::UnitDown(SwPaM *pPam, const SwTwips nOffset, +bool SwTextFrame::UnitDown(SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const { - const SwTextFrm *pFrm = GetAdjFrmAtPos(const_cast<SwTextFrm*>(this), *(pPam->GetPoint()), + const SwTextFrame *pFrame = GetAdjFrameAtPos(const_cast<SwTextFrame*>(this), *(pPam->GetPoint()), SwTextCursor::IsRightMargin() ); - const bool bRet = pFrm->_UnitDown( pPam, nOffset, bSetInReadOnly ); + const bool bRet = pFrame->_UnitDown( pPam, nOffset, bSetInReadOnly ); SwTextCursor::SetRightMargin( false ); return bRet; } -void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const +void SwTextFrame::FillCursorPos( SwFillData& rFill ) const { - if( !rFill.bColumn && GetUpper()->IsColBodyFrm() ) // ColumnFrms now with BodyFrm + if( !rFill.bColumn && GetUpper()->IsColBodyFrame() ) // ColumnFrames now with BodyFrame { - const SwColumnFrm* pTmp = - static_cast<const SwColumnFrm*>(GetUpper()->GetUpper()->GetUpper()->Lower()); // The 1st column - // The first SwFrm in BodyFrm of the first column - const SwFrm* pFrm = static_cast<const SwLayoutFrm*>(pTmp->Lower())->Lower(); + const SwColumnFrame* pTmp = + static_cast<const SwColumnFrame*>(GetUpper()->GetUpper()->GetUpper()->Lower()); // The 1st column + // The first SwFrame in BodyFrame of the first column + const SwFrame* pFrame = static_cast<const SwLayoutFrame*>(pTmp->Lower())->Lower(); sal_uInt16 nNextCol = 0; // In which column do we end up in? - while( rFill.X() > pTmp->Frm().Right() && pTmp->GetNext() ) + while( rFill.X() > pTmp->Frame().Right() && pTmp->GetNext() ) { - pTmp = static_cast<const SwColumnFrm*>(pTmp->GetNext()); - if( static_cast<const SwLayoutFrm*>(pTmp->Lower())->Lower() ) // ColumnFrms now with BodyFrm + pTmp = static_cast<const SwColumnFrame*>(pTmp->GetNext()); + if( static_cast<const SwLayoutFrame*>(pTmp->Lower())->Lower() ) // ColumnFrames now with BodyFrame { - pFrm = static_cast<const SwLayoutFrm*>(pTmp->Lower())->Lower(); + pFrame = static_cast<const SwLayoutFrame*>(pTmp->Lower())->Lower(); nNextCol = 0; } else @@ -1315,39 +1315,39 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const } if( pTmp != GetUpper()->GetUpper() ) // Did we end up in another column? { - if( !pFrm ) + if( !pFrame ) return; if( nNextCol ) { - while( pFrm->GetNext() ) - pFrm = pFrm->GetNext(); + while( pFrame->GetNext() ) + pFrame = pFrame->GetNext(); } else { - while( pFrm->GetNext() && pFrm->Frm().Bottom() < rFill.Y() ) - pFrm = pFrm->GetNext(); + while( pFrame->GetNext() && pFrame->Frame().Bottom() < rFill.Y() ) + pFrame = pFrame->GetNext(); } // No filling, if the last frame in the targeted column does // not contain a paragraph, but e.g. a table - if( pFrm->IsTextFrm() ) + if( pFrame->IsTextFrame() ) { rFill.Fill().nColumnCnt = nNextCol; rFill.bColumn = true; if( rFill.pPos ) { - SwTextNode* pTextNd = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->GetTextNode(); + SwTextNode* pTextNd = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->GetTextNode(); rFill.pPos->nNode = *pTextNd; rFill.pPos->nContent.Assign( pTextNd, pTextNd->GetText().getLength()); } if( nNextCol ) { - rFill.aFrm = pTmp->Prt(); - rFill.aFrm += pTmp->Frm().Pos(); + rFill.aFrame = pTmp->Prt(); + rFill.aFrame += pTmp->Frame().Pos(); } else - rFill.aFrm = pFrm->Frm(); - static_cast<const SwTextFrm*>(pFrm)->FillCrsrPos( rFill ); + rFill.aFrame = pFrame->Frame(); + static_cast<const SwTextFrame*>(pFrame)->FillCursorPos( rFill ); } return; } @@ -1355,14 +1355,14 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const SwFont *pFnt; SwTextFormatColl* pColl = GetTextNode()->GetTextColl(); SwTwips nFirst = GetTextNode()->GetSwAttrSet().GetULSpace().GetLower(); - SwTwips nDiff = rFill.Y() - Frm().Bottom(); + SwTwips nDiff = rFill.Y() - Frame().Bottom(); if( nDiff < nFirst ) nDiff = -1; else pColl = &pColl->GetNextTextFormatColl(); SwAttrSet aSet( const_cast<SwDoc*>(GetTextNode()->GetDoc())->GetAttrPool(), aTextFormatCollSetRange ); const SwAttrSet* pSet = &pColl->GetAttrSet(); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( GetTextNode()->HasSwAttrSet() ) { aSet.Put( *GetTextNode()->GetpSwAttrSet() ); @@ -1393,7 +1393,7 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const SwTwips nDist = std::max( rUL.GetLower(), rUL.GetUpper() ); if( rFill.Fill().nColumnCnt ) { - rFill.aFrm.Height( nLineHeight ); + rFill.aFrame.Height( nLineHeight ); nDiff = rFill.Y() - rFill.Bottom(); nFirst = 0; } @@ -1423,7 +1423,7 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const const SvxTabStopItem &rRuler = pSet->GetTabStops(); const SvxLRSpaceItem &rLRSpace = pSet->GetLRSpace(); - SwRect &rRect = rFill.Fill().aCrsr; + SwRect &rRect = rFill.Fill().aCursor; rRect.Top( rFill.Bottom() + (nDiff+1) * nDist - nLineHeight ); if( nFirst && nDiff > -1 ) rRect.Top( rRect.Top() + nFirst ); @@ -1641,13 +1641,13 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const } } // Do we extend over the page's/column's/etc. lower edge? - const SwFrm* pUp = GetUpper(); + const SwFrame* pUp = GetUpper(); if( pUp->IsInSct() ) { - if( pUp->IsSctFrm() ) + if( pUp->IsSctFrame() ) pUp = pUp->GetUpper(); - else if( pUp->IsColBodyFrm() && - pUp->GetUpper()->GetUpper()->IsSctFrm() ) + else if( pUp->IsColBodyFrame() && + pUp->GetUpper()->GetUpper()->IsSctFrame() ) pUp = pUp->GetUpper()->GetUpper()->GetUpper(); } SWRECTFN( this ) @@ -1662,7 +1662,7 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const rRect.Width( 1 ); } } - const_cast<SwCrsrMoveState*>(rFill.pCMS)->m_bFillRet = bFill; + const_cast<SwCursorMoveState*>(rFill.pCMS)->m_bFillRet = bFill; delete pFnt; } diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index f4f21058639e..ac8c9b4ec3bf 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -67,25 +67,25 @@ public: }; sal_uInt16 FormatLevel::nLevel = 0; -void ValidateText( SwFrm *pFrm ) // Friend of frame +void ValidateText( SwFrame *pFrame ) // Friend of frame { - if ( ( ! pFrm->IsVertical() && - pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width() ) || - ( pFrm->IsVertical() && - pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) ) - pFrm->mbValidSize = true; + if ( ( ! pFrame->IsVertical() && + pFrame->Frame().Width() == pFrame->GetUpper()->Prt().Width() ) || + ( pFrame->IsVertical() && + pFrame->Frame().Height() == pFrame->GetUpper()->Prt().Height() ) ) + pFrame->mbValidSize = true; } -void SwTextFrm::ValidateFrm() +void SwTextFrame::ValidateFrame() { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); // Validate surroundings to avoid oscillation SwSwapIfSwapped swap( this ); if ( !IsInFly() && !IsInTab() ) { // Only validate 'this' when inside a fly, the rest should actually only be // needed for footnotes, which do not exist in flys. - SwSectionFrm* pSct = FindSctFrm(); + SwSectionFrame* pSct = FindSctFrame(); if( pSct ) { if( !pSct->IsColLocked() ) @@ -94,7 +94,7 @@ void SwTextFrm::ValidateFrm() pSct = nullptr; } - SwFrm *pUp = GetUpper(); + SwFrame *pUp = GetUpper(); pUp->Calc(pRenderContext); if( pSct ) pSct->ColUnlock(); @@ -109,46 +109,46 @@ void SwTextFrm::ValidateFrm() pPara->SetPrepMustFit( bMustFit ); } -// After a RemoveFootnote the BodyFrm and all Frms contained within it, need to be +// After a RemoveFootnote the BodyFrame and all Frames contained within it, need to be // recalculated, so that the DeadLine is right. // First we search outwards, on the way back we calculate everything. -void _ValidateBodyFrm( SwFrm *pFrm ) +void _ValidateBodyFrame( SwFrame *pFrame ) { - vcl::RenderContext* pRenderContext = pFrm ? pFrm->getRootFrm()->GetCurrShell()->GetOut() : nullptr; - if( pFrm && !pFrm->IsCellFrm() ) + vcl::RenderContext* pRenderContext = pFrame ? pFrame->getRootFrame()->GetCurrShell()->GetOut() : nullptr; + if( pFrame && !pFrame->IsCellFrame() ) { - if( !pFrm->IsBodyFrm() && pFrm->GetUpper() ) - _ValidateBodyFrm( pFrm->GetUpper() ); - if( !pFrm->IsSctFrm() ) - pFrm->Calc(pRenderContext); + if( !pFrame->IsBodyFrame() && pFrame->GetUpper() ) + _ValidateBodyFrame( pFrame->GetUpper() ); + if( !pFrame->IsSctFrame() ) + pFrame->Calc(pRenderContext); else { - const bool bOld = static_cast<SwSectionFrm*>(pFrm)->IsContentLocked(); - static_cast<SwSectionFrm*>(pFrm)->SetContentLock( true ); - pFrm->Calc(pRenderContext); + const bool bOld = static_cast<SwSectionFrame*>(pFrame)->IsContentLocked(); + static_cast<SwSectionFrame*>(pFrame)->SetContentLock( true ); + pFrame->Calc(pRenderContext); if( !bOld ) - static_cast<SwSectionFrm*>(pFrm)->SetContentLock( false ); + static_cast<SwSectionFrame*>(pFrame)->SetContentLock( false ); } } } -void SwTextFrm::ValidateBodyFrm() +void SwTextFrame::ValidateBodyFrame() { SwSwapIfSwapped swap( this ); - // See comment in ValidateFrm() + // See comment in ValidateFrame() if ( !IsInFly() && !IsInTab() && - !( IsInSct() && FindSctFrm()->Lower()->IsColumnFrm() ) ) - _ValidateBodyFrm( GetUpper() ); + !( IsInSct() && FindSctFrame()->Lower()->IsColumnFrame() ) ) + _ValidateBodyFrame( GetUpper() ); } -bool SwTextFrm::_GetDropRect( SwRect &rRect ) const +bool SwTextFrame::_GetDropRect( SwRect &rRect ) const { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); - OSL_ENSURE( HasPara(), "SwTextFrm::_GetDropRect: try again next year." ); - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextMargin aLine( const_cast<SwTextFrm*>(this), &aInf ); + OSL_ENSURE( HasPara(), "SwTextFrame::_GetDropRect: try again next year." ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextMargin aLine( const_cast<SwTextFrame*>(this), &aInf ); if( aLine.GetDropLines() ) { rRect.Top( aLine.Y() ); @@ -167,26 +167,26 @@ bool SwTextFrm::_GetDropRect( SwRect &rRect ) const return false; } -const SwBodyFrm *SwTextFrm::FindBodyFrm() const +const SwBodyFrame *SwTextFrame::FindBodyFrame() const { if ( IsInDocBody() ) { - const SwFrm *pFrm = GetUpper(); - while( pFrm && !pFrm->IsBodyFrm() ) - pFrm = pFrm->GetUpper(); - return static_cast<const SwBodyFrm*>(pFrm); + const SwFrame *pFrame = GetUpper(); + while( pFrame && !pFrame->IsBodyFrame() ) + pFrame = pFrame->GetUpper(); + return static_cast<const SwBodyFrame*>(pFrame); } return nullptr; } -bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) +bool SwTextFrame::CalcFollow( const sal_Int32 nTextOfst ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); SwSwapIfSwapped swap( this ); OSL_ENSURE( HasFollow(), "CalcFollow: missing Follow." ); - SwTextFrm* pMyFollow = GetFollow(); + SwTextFrame* pMyFollow = GetFollow(); SwParaPortion *pPara = GetPara(); const bool bFollowField = pPara && pPara->IsFollowField(); @@ -197,18 +197,18 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) ( ! pMyFollow->IsVertical() && !pMyFollow->Prt().Height() ) ) { #if OSL_DEBUG_LEVEL > 0 - const SwFrm *pOldUp = GetUpper(); + const SwFrame *pOldUp = GetUpper(); #endif SWRECTFN ( this ) - SwTwips nOldBottom = (GetUpper()->Frm().*fnRect->fnGetBottom)(); - SwTwips nMyPos = (Frm().*fnRect->fnGetTop)(); + SwTwips nOldBottom = (GetUpper()->Frame().*fnRect->fnGetBottom)(); + SwTwips nMyPos = (Frame().*fnRect->fnGetTop)(); - const SwPageFrm *pPage = nullptr; + const SwPageFrame *pPage = nullptr; bool bOldInvaContent = true; if ( !IsInFly() && GetNext() ) { - pPage = FindPageFrm(); + pPage = FindPageFrame(); // Minimize = that is set back if needed - for invalidation see below bOldInvaContent = pPage->IsInvalidContent(); } @@ -217,8 +217,8 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) pMyFollow->SetFieldFollow( bFollowField ); if( HasFootnote() || pMyFollow->HasFootnote() ) { - ValidateFrm(); - ValidateBodyFrm(); + ValidateFrame(); + ValidateBodyFrame(); if( pPara ) { pPara->GetReformat() = SwCharRange(); @@ -227,7 +227,7 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) } // The footnote area must not get larger - SwSaveFootnoteHeight aSave( FindFootnoteBossFrm( true ), LONG_MAX ); + SwSaveFootnoteHeight aSave( FindFootnoteBossFrame( true ), LONG_MAX ); pMyFollow->CalcFootnoteFlag(); if ( !pMyFollow->GetNext() && !pMyFollow->HasFootnote() ) @@ -241,13 +241,13 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) // frame, we need to calculate that first. This is because the // FormatWidthCols() does not work if it is called from MakeAll // of the _locked_ follow. - SwSectionFrm* pSct = pMyFollow->FindSctFrm(); + SwSectionFrame* pSct = pMyFollow->FindSctFrame(); if( pSct && !pSct->IsAnLower( this ) ) { if( pSct->GetFollow() ) pSct->SimpleFormat(); - else if( ( pSct->IsVertical() && !pSct->Frm().Width() ) || - ( ! pSct->IsVertical() && !pSct->Frm().Height() ) ) + else if( ( pSct->IsVertical() && !pSct->Frame().Width() ) || + ( ! pSct->IsVertical() && !pSct->Frame().Height() ) ) break; } // OD 14.03.2003 #i11760# - intrinsic format of follow is controlled. @@ -258,16 +258,16 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) // Thus, forbid intrinsic format of follow. { bool bIsFollowInColumn = false; - SwFrm* pFollowUpper = pMyFollow->GetUpper(); + SwFrame* pFollowUpper = pMyFollow->GetUpper(); while ( pFollowUpper ) { - if ( pFollowUpper->IsColumnFrm() ) + if ( pFollowUpper->IsColumnFrame() ) { bIsFollowInColumn = true; break; } - if ( pFollowUpper->IsPageFrm() || - pFollowUpper->IsFlyFrm() ) + if ( pFollowUpper->IsPageFrame() || + pFollowUpper->IsFlyFrame() ) { break; } @@ -280,13 +280,13 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) } pMyFollow->Calc(pRenderContext); - // The Follow can tell from its Frm().Height() that something went wrong - OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrm::CalcFollow: cheesy follow" ); + // The Follow can tell from its Frame().Height() that something went wrong + OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrame::CalcFollow: cheesy follow" ); if( pMyFollow->GetPrev() ) { pMyFollow->Prepare(); pMyFollow->Calc(pRenderContext); - OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrm::CalcFollow: very cheesy follow" ); + OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrame::CalcFollow: very cheesy follow" ); } // OD 14.03.2003 #i11760# - reset control flag for follow format. @@ -308,8 +308,8 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) if( HasFootnote() || pMyFollow->HasFootnote() ) { - ValidateBodyFrm(); - ValidateFrm(); + ValidateBodyFrame(); + ValidateFrame(); if( pPara ) { pPara->GetReformat() = SwCharRange(); @@ -324,15 +324,15 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) } #if OSL_DEBUG_LEVEL > 0 - OSL_ENSURE( pOldUp == GetUpper(), "SwTextFrm::CalcFollow: heavy follow" ); + OSL_ENSURE( pOldUp == GetUpper(), "SwTextFrame::CalcFollow: heavy follow" ); #endif const long nRemaining = - - (GetUpper()->Frm().*fnRect->fnBottomDist)( nOldBottom ); - if ( nRemaining > 0 && !GetUpper()->IsSctFrm() && + - (GetUpper()->Frame().*fnRect->fnBottomDist)( nOldBottom ); + if ( nRemaining > 0 && !GetUpper()->IsSctFrame() && nRemaining != ( bVert ? - nMyPos - Frm().Right() : - Frm().Top() - nMyPos ) ) + nMyPos - Frame().Right() : + Frame().Top() - nMyPos ) ) { return true; } @@ -341,9 +341,9 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) return false; } -void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) +void SwTextFrame::AdjustFrame( const SwTwips nChgHght, bool bHasToFit ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); if( IsUndersized() ) { if( GetOfst() && !IsFollow() ) // A scrolled paragraph (undersized) @@ -351,7 +351,7 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) SetUndersized( nChgHght == 0 || bHasToFit ); } - // AdjustFrm is called with a swapped frame during + // AdjustFrame is called with a swapped frame during // formatting but the frame is not swapped during FormatEmpty SwSwapIfSwapped swap( this ); SWRECTFN ( this ) @@ -368,13 +368,13 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) SwTwips nReal = Grow( nChgHght, true ); if( nReal < nChgHght ) { - SwTwips nBot = (*fnRect->fnYInc)( (Frm().*fnRect->fnGetBottom)(), + SwTwips nBot = (*fnRect->fnYInc)( (Frame().*fnRect->fnGetBottom)(), nChgHght - nReal ); - SwFrm* pCont = FindFootnoteFrm()->GetUpper(); + SwFrame* pCont = FindFootnoteFrame()->GetUpper(); - if( (pCont->Frm().*fnRect->fnBottomDist)( nBot ) > 0 ) + if( (pCont->Frame().*fnRect->fnBottomDist)( nBot ) > 0 ) { - (Frm().*fnRect->fnAddBottom)( nChgHght ); + (Frame().*fnRect->fnAddBottom)( nChgHght ); if( bVert ) Prt().SSize().Width() += nChgHght; else @@ -395,17 +395,17 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) // calculated correctly. if ( GetPrev() ) { - SwFrm *pPre = GetUpper()->Lower(); + SwFrame *pPre = GetUpper()->Lower(); do { pPre->Calc(pRenderContext); pPre = pPre->GetNext(); } while ( pPre && pPre != this ); } - const Point aOldPos( Frm().Pos() ); + const Point aOldPos( Frame().Pos() ); MakePos(); - if ( aOldPos != Frm().Pos() ) + if ( aOldPos != Frame().Pos() ) { - // OD 2004-07-01 #i28701# - use new method <SwFrm::InvalidateObjs(..)> + // OD 2004-07-01 #i28701# - use new method <SwFrame::InvalidateObjs(..)> // No format is performed for the floating screen objects. InvalidateObjs( true ); } @@ -415,7 +415,7 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) // A Grow() is always accepted by the Layout, even if the // FixSize of the surrounding layout frame should not allow it. // We text for this case and correct the values. - // The Frm must NOT be shrunk further than its size permits + // The Frame must NOT be shrunk further than its size permits // even in the case of an emergency. SwTwips nRstHeight; if ( IsVertical() ) @@ -423,19 +423,19 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) OSL_ENSURE( ! IsSwapped(),"Swapped frame while calculating nRstHeight" ); if ( IsVertLR() ) - nRstHeight = GetUpper()->Frm().Left() + nRstHeight = GetUpper()->Frame().Left() + GetUpper()->Prt().Left() + GetUpper()->Prt().Width() - - Frm().Left(); + - Frame().Left(); else - nRstHeight = Frm().Left() + Frm().Width() - - ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); + nRstHeight = Frame().Left() + Frame().Width() - + ( GetUpper()->Frame().Left() + GetUpper()->Prt().Left() ); } else - nRstHeight = GetUpper()->Frm().Top() + nRstHeight = GetUpper()->Frame().Top() + GetUpper()->Prt().Top() + GetUpper()->Prt().Height() - - Frm().Top(); + - Frame().Top(); // We can get a bit of space in table cells, because there could be some // left through a vertical alignment to the top. @@ -445,34 +445,34 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) ( GetUpper()->Lower() == this || GetUpper()->Lower()->IsValid() ) ) { - long nAdd = (*fnRect->fnYDiff)( (GetUpper()->Lower()->Frm().*fnRect->fnGetTop)(), + long nAdd = (*fnRect->fnYDiff)( (GetUpper()->Lower()->Frame().*fnRect->fnGetTop)(), (GetUpper()->*fnRect->fnGetPrtTop)() ); OSL_ENSURE( nAdd >= 0, "Ey" ); nRstHeight += nAdd; } - // nRstHeight < 0 means that the TextFrm is located completely outside of its Upper. - // This can happen, if it's located within a FlyAtCntFrm, which changed sides by a + // nRstHeight < 0 means that the TextFrame is located completely outside of its Upper. + // This can happen, if it's located within a FlyAtContentFrame, which changed sides by a // Grow(). In such a case, it's wrong to execute the following Grow(). // In the case of a bug, we end up with an infinite loop. - SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)(); + SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)(); SwTwips nPrtHeight = (Prt().*fnRect->fnGetHeight)(); - if( nRstHeight < nFrmHeight ) + if( nRstHeight < nFrameHeight ) { // It can be that I have the right size, but the Upper is too small and can get me some room if( ( nRstHeight >= 0 || ( IsInFootnote() && IsInSct() ) ) && !bHasToFit ) - nRstHeight += GetUpper()->Grow( nFrmHeight - nRstHeight ); + nRstHeight += GetUpper()->Grow( nFrameHeight - nRstHeight ); // In column sections we do not want to get too big or else more areas are created by // GetNextSctLeaf. Instead, we shrink and remember bUndersized, so that FormatWidthCols // can calculate the right column size. - if ( nRstHeight < nFrmHeight ) + if ( nRstHeight < nFrameHeight ) { if( bHasToFit || !IsMoveable() || - ( IsInSct() && !FindSctFrm()->MoveAllowed(this) ) ) + ( IsInSct() && !FindSctFrame()->MoveAllowed(this) ) ) { SetUndersized( true ); - Shrink( std::min( ( nFrmHeight - nRstHeight), nPrtHeight ) ); + Shrink( std::min( ( nFrameHeight - nRstHeight), nPrtHeight ) ); } else SetUndersized( false ); @@ -480,8 +480,8 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) } else if( nChgHeight ) { - if( nRstHeight - nFrmHeight < nChgHeight ) - nChgHeight = nRstHeight - nFrmHeight; + if( nRstHeight - nFrameHeight < nChgHeight ) + nChgHeight = nRstHeight - nFrameHeight; if( nChgHeight ) Grow( nChgHeight ); } @@ -490,12 +490,12 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) Shrink( -nChgHght ); } -css::uno::Sequence< css::style::TabStop > SwTextFrm::GetTabStopInfo( SwTwips CurrentPos ) +css::uno::Sequence< css::style::TabStop > SwTextFrame::GetTabStopInfo( SwTwips CurrentPos ) { css::uno::Sequence< css::style::TabStop > tabs(1); css::style::TabStop ts; - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this ); SwTextFormatter aLine( this, &aInf ); SwTextCursor TextCursor( this, &aInf ); const Point aCharPos( TextCursor.GetTopLeft() ); @@ -503,7 +503,7 @@ css::uno::Sequence< css::style::TabStop > SwTextFrm::GetTabStopInfo( SwTwips Cur SwTwips nRight = aLine.Right(); CurrentPos -= aCharPos.X(); - // get current tab stop information stored in the Frm + // get current tab stop information stored in the Frame const SvxTabStop *pTS = aLine.GetLineInfo().GetTabStop( CurrentPos, nRight ); if( !pTS ) @@ -534,11 +534,11 @@ css::uno::Sequence< css::style::TabStop > SwTextFrm::GetTabStopInfo( SwTwips Cur // nOffset holds the Offset in the text string, from which the Master closes // and the Follow starts. // If it's 0, the FollowFrame is deleted. -void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine, +void SwTextFrame::_AdjustFollow( SwTextFormatter &rLine, const sal_Int32 nOffset, const sal_Int32 nEnd, const sal_uInt8 nMode ) { - SwFrmSwapper aSwapper( this, false ); + SwFrameSwapper aSwapper( this, false ); // We got the rest of the text mass: Delete all Follows // DummyPortions() are a special case. @@ -547,14 +547,14 @@ void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine, { while( GetFollow() ) { - if( static_cast<SwTextFrm*>(GetFollow())->IsLocked() ) + if( static_cast<SwTextFrame*>(GetFollow())->IsLocked() ) { - OSL_FAIL( "+SwTextFrm::JoinFrm: Follow is locked." ); + OSL_FAIL( "+SwTextFrame::JoinFrame: Follow is locked." ); return; } if (GetFollow()->IsDeleteForbidden()) return; - JoinFrm(); + JoinFrame(); } return; @@ -573,7 +573,7 @@ void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine, while( GetFollow() && GetFollow()->GetFollow() && nNewOfst >= GetFollow()->GetFollow()->GetOfst() ) { - JoinFrm(); + JoinFrame(); } } @@ -592,12 +592,12 @@ void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine, } } -SwContentFrm *SwTextFrm::JoinFrm() +SwContentFrame *SwTextFrame::JoinFrame() { - OSL_ENSURE( GetFollow(), "+SwTextFrm::JoinFrm: no follow" ); - SwTextFrm *pFoll = GetFollow(); + OSL_ENSURE( GetFollow(), "+SwTextFrame::JoinFrame: no follow" ); + SwTextFrame *pFoll = GetFollow(); - SwTextFrm *pNxt = pFoll->GetFollow(); + SwTextFrame *pNxt = pFoll->GetFollow(); // All footnotes of the to-be-destroyed Follow are relocated to us sal_Int32 nStart = pFoll->GetOfst(); @@ -606,8 +606,8 @@ SwContentFrm *SwTextFrm::JoinFrm() const SwpHints *pHints = pFoll->GetTextNode()->GetpSwpHints(); if( pHints ) { - SwFootnoteBossFrm *pFootnoteBoss = nullptr; - SwFootnoteBossFrm *pEndBoss = nullptr; + SwFootnoteBossFrame *pFootnoteBoss = nullptr; + SwFootnoteBossFrame *pEndBoss = nullptr; for ( size_t i = 0; i < pHints->Count(); ++i ) { const SwTextAttr *pHt = pHints->Get(i); @@ -616,14 +616,14 @@ SwContentFrm *SwTextFrm::JoinFrm() if( pHt->GetFootnote().IsEndNote() ) { if( !pEndBoss ) - pEndBoss = pFoll->FindFootnoteBossFrm(); - SwFootnoteBossFrm::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this ); + pEndBoss = pFoll->FindFootnoteBossFrame(); + SwFootnoteBossFrame::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this ); } else { if( !pFootnoteBoss ) - pFootnoteBoss = pFoll->FindFootnoteBossFrm( true ); - SwFootnoteBossFrm::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this ); + pFootnoteBoss = pFoll->FindFootnoteBossFrame( true ); + SwFootnoteBossFrame::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this ); } SetFootnote( true ); } @@ -648,29 +648,29 @@ SwContentFrm *SwTextFrm::JoinFrm() // and relation CONTENT_FLOWS_TO for current previous paragraph, which // is <this>, will change. { - SwViewShell* pViewShell( pFoll->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFoll->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFoll->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFoll->FindNextCnt( true )), this ); } } pFoll->Cut(); SetFollow(pNxt); - SwFrm::DestroyFrm(pFoll); + SwFrame::DestroyFrame(pFoll); return pNxt; } -SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) +SwContentFrame *SwTextFrame::SplitFrame( const sal_Int32 nTextPos ) { SwSwapIfSwapped swap( this ); // The Paste sends a Modify() to me // I lock myself, so that my data does not disappear - TextFrmLockGuard aLock( this ); - SwTextFrm *pNew = static_cast<SwTextFrm *>(GetTextNode()->MakeFrm( this )); + TextFrameLockGuard aLock( this ); + SwTextFrame *pNew = static_cast<SwTextFrame *>(GetTextNode()->MakeFrame( this )); pNew->SetFollow( GetFollow() ); SetFollow( pNew ); @@ -682,12 +682,12 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) // and relation CONTENT_FLOWS_TO for current previous paragraph, which // is <this>, will change. { - SwViewShell* pViewShell( pNew->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), this ); } } @@ -699,8 +699,8 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) const SwpHints *pHints = GetTextNode()->GetpSwpHints(); if( pHints ) { - SwFootnoteBossFrm *pFootnoteBoss = nullptr; - SwFootnoteBossFrm *pEndBoss = nullptr; + SwFootnoteBossFrame *pFootnoteBoss = nullptr; + SwFootnoteBossFrame *pEndBoss = nullptr; for ( size_t i = 0; i < pHints->Count(); ++i ) { const SwTextAttr *pHt = pHints->Get(i); @@ -709,14 +709,14 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) if( pHt->GetFootnote().IsEndNote() ) { if( !pEndBoss ) - pEndBoss = FindFootnoteBossFrm(); - SwFootnoteBossFrm::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew ); + pEndBoss = FindFootnoteBossFrame(); + SwFootnoteBossFrame::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew ); } else { if( !pFootnoteBoss ) - pFootnoteBoss = FindFootnoteBossFrm( true ); - SwFootnoteBossFrm::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew ); + pFootnoteBoss = FindFootnoteBossFrame( true ); + SwFootnoteBossFrame::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew ); } pNew->SetFootnote( true ); } @@ -741,7 +741,7 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) return pNew; } -void SwTextFrm::_SetOfst( const sal_Int32 nNewOfst ) +void SwTextFrame::_SetOfst( const sal_Int32 nNewOfst ) { // We do not need to invalidate out Follow. // We are a Follow, get formatted right away and call @@ -758,9 +758,9 @@ void SwTextFrm::_SetOfst( const sal_Int32 nNewOfst ) InvalidateSize(); } -bool SwTextFrm::CalcPreps() +bool SwTextFrame::CalcPreps() { - OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTextFrm::CalcPreps with swapped frame" ); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTextFrame::CalcPreps with swapped frame" ); SWRECTFN( this ); SwParaPortion *pPara = GetPara(); @@ -781,7 +781,7 @@ bool SwTextFrm::CalcPreps() { if( !GetFollow() ) { - OSL_ENSURE( GetFollow(), "+SwTextFrm::CalcPreps: no credits" ); + OSL_ENSURE( GetFollow(), "+SwTextFrame::CalcPreps: no credits" ); return false; } @@ -801,16 +801,16 @@ bool SwTextFrm::CalcPreps() } else if ( bVert ) { - Frm().Width( Frm().Width() + Frm().Left() ); - Prt().Width( Prt().Width() + Frm().Left() ); - Frm().Left( 0 ); + Frame().Width( Frame().Width() + Frame().Left() ); + Prt().Width( Prt().Width() + Frame().Left() ); + Frame().Left( 0 ); SetWidow( true ); } else { - SwTwips nTmp = LONG_MAX - (Frm().Top()+10000); - SwTwips nDiff = nTmp - Frm().Height(); - Frm().Height( nTmp ); + SwTwips nTmp = LONG_MAX - (Frame().Top()+10000); + SwTwips nDiff = nTmp - Frame().Height(); + Frame().Height( nTmp ); Prt().Height( Prt().Height() + nDiff ); SetWidow( true ); } @@ -818,7 +818,7 @@ bool SwTextFrm::CalcPreps() else { OSL_ENSURE( nChgHeight < (Prt().*fnRect->fnGetHeight)(), - "+SwTextFrm::CalcPrep: want to shrink" ); + "+SwTextFrame::CalcPrep: want to shrink" ); nChgHeight = (Prt().*fnRect->fnGetHeight)() - nChgHeight; @@ -829,12 +829,12 @@ bool SwTextFrm::CalcPreps() if ( bVert ) { - SwRect aRepaint( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + SwRect aRepaint( Frame().Pos() + Prt().Pos(), Prt().SSize() ); SwitchVerticalToHorizontal( aRepaint ); rRepaint.Chg( aRepaint.Pos(), aRepaint.SSize() ); } else - rRepaint.Chg( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + rRepaint.Chg( Frame().Pos() + Prt().Pos(), Prt().SSize() ); if( 0 >= rRepaint.Width() ) rRepaint.Width(1); @@ -859,46 +859,46 @@ bool SwTextFrm::CalcPreps() { SwSwapIfNotSwapped swap( this ); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this ); SwTextFormatter aLine( this, &aInf ); - WidowsAndOrphans aFrmBreak( this ); + WidowsAndOrphans aFrameBreak( this ); // Whatever the attributes say: we split the paragraph in // MustFit in any case if( bPrepMustFit ) { - aFrmBreak.SetKeep( false ); - aFrmBreak.ClrOrphLines(); + aFrameBreak.SetKeep( false ); + aFrameBreak.ClrOrphLines(); } // Before calling FormatAdjust, we need to make sure // that the lines protruding at the bottom get indeed // truncated - bool bBreak = aFrmBreak.IsBreakNowWidAndOrp( aLine ); + bool bBreak = aFrameBreak.IsBreakNowWidAndOrp( aLine ); bRet = true; while( !bBreak && aLine.Next() ) { - bBreak = aFrmBreak.IsBreakNowWidAndOrp( aLine ); + bBreak = aFrameBreak.IsBreakNowWidAndOrp( aLine ); } if( bBreak ) { // We run into troubles: when TruncLines get called, the // conditions in IsInside change immediately such that // IsBreakNow can return different results. - // For this reason, we make it clear to rFrmBreak, that the + // For this reason, we make it clear to rFrameBreak, that the // end is reached at the location of rLine. // Let's see if it works ... aLine.TruncLines(); - aFrmBreak.SetRstHeight( aLine ); - FormatAdjust( aLine, aFrmBreak, aInf.GetText().getLength(), aInf.IsStop() ); + aFrameBreak.SetRstHeight( aLine ); + FormatAdjust( aLine, aFrameBreak, aInf.GetText().getLength(), aInf.IsStop() ); } else { if( !GetFollow() ) { - FormatAdjust( aLine, aFrmBreak, + FormatAdjust( aLine, aFrameBreak, aInf.GetText().getLength(), aInf.IsStop() ); } - else if ( !aFrmBreak.IsKeepAlways() ) + else if ( !aFrameBreak.IsKeepAlways() ) { // We delete a line before the Master, because the Follow // could hand over a line @@ -915,7 +915,7 @@ bool SwTextFrm::CalcPreps() if( bPrepMustFit ) { const SwTwips nMust = (GetUpper()->*fnRect->fnGetPrtBottom)(); - const SwTwips nIs = (Frm().*fnRect->fnGetBottom)(); + const SwTwips nIs = (Frame().*fnRect->fnGetBottom)(); if( bVert && nIs < nMust ) { @@ -939,16 +939,16 @@ bool SwTextFrm::CalcPreps() } // We rewire the footnotes and the character bound objects -#define CHG_OFFSET( pFrm, nNew )\ +#define CHG_OFFSET( pFrame, nNew )\ {\ - if( pFrm->GetOfst() < nNew )\ - pFrm->MoveFlyInCnt( this, 0, nNew );\ - else if( pFrm->GetOfst() > nNew )\ - MoveFlyInCnt( pFrm, nNew, COMPLETE_STRING );\ + if( pFrame->GetOfst() < nNew )\ + pFrame->MoveFlyInCnt( this, 0, nNew );\ + else if( pFrame->GetOfst() > nNew )\ + MoveFlyInCnt( pFrame, nNew, COMPLETE_STRING );\ } -void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, - WidowsAndOrphans &rFrmBreak, +void SwTextFrame::FormatAdjust( SwTextFormatter &rLine, + WidowsAndOrphans &rFrameBreak, const sal_Int32 nStrLen, const bool bDummy ) { @@ -961,7 +961,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, const bool bHasToFit = pPara->IsPrepMustFit(); // The StopFlag is set by footnotes which want to go onto the next page - // Call base class method <SwTextFrmBreak::IsBreakNow(..)> + // Call base class method <SwTextFrameBreak::IsBreakNow(..)> // instead of method <WidowsAndOrphans::IsBreakNow(..)> to get a break, // even if due to widow rule no enough lines exists. sal_uInt8 nNew = ( !GetFollow() && @@ -969,8 +969,8 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, ( rLine.IsStop() || ( bHasToFit ? ( rLine.GetLineNr() > 1 && - !rFrmBreak.IsInside( rLine ) ) - : rFrmBreak.IsBreakNow( rLine ) ) ) ) + !rFrameBreak.IsInside( rLine ) ) + : rFrameBreak.IsBreakNow( rLine ) ) ) ) ? 1 : 0; // --> OD #i84870# // no split of text frame, which only contains a as-character anchored object @@ -980,7 +980,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, (*GetDrawObjs())[0]->GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR; // Still try split text frame if we have columns. - if (FindColFrm()) + if (FindColFrame()) bOnlyContainsAsCharAnchoredObj = false; if ( nNew && bOnlyContainsAsCharAnchoredObj ) @@ -990,14 +990,14 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, // <-- if ( nNew ) { - SplitFrm( nEnd ); + SplitFrame( nEnd ); } - const SwFrm *pBodyFrm = FindBodyFrm(); + const SwFrame *pBodyFrame = FindBodyFrame(); - const long nBodyHeight = pBodyFrm ? ( IsVertical() ? - pBodyFrm->Frm().Width() : - pBodyFrm->Frm().Height() ) : 0; + const long nBodyHeight = pBodyFrame ? ( IsVertical() ? + pBodyFrame->Frame().Width() : + pBodyFrame->Frame().Height() ) : 0; // If the current values have been calculated, show that they // are valid now @@ -1012,10 +1012,10 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, } // FindBreak truncates the last line - if( !rFrmBreak.FindBreak( this, rLine, bHasToFit ) ) + if( !rFrameBreak.FindBreak( this, rLine, bHasToFit ) ) { // If we're done formatting, we set nEnd to the end. - // AdjustFollow might execute JoinFrm() because of this. + // AdjustFollow might execute JoinFrame() because of this. // Else, nEnd is the end of the last line in the Master. sal_Int32 nOld = nEnd; nEnd = rLine.GetEnd(); @@ -1041,7 +1041,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, // Example of this case: When an empty, but numbered paragraph // at the end of page is completely displaced by a fly frame. // Thus, the text frame introduced a follow by a - // <SwTextFrm::SplitFrm(..)> - see below. The follow then shows + // <SwTextFrame::SplitFrame(..)> - see below. The follow then shows // the numbering and must stay. if ( GetFollow()->GetOfst() != nEnd || GetFollow()->IsFieldFollow() || @@ -1049,7 +1049,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, { nNew |= 3; } - else if (FindTabFrm() && nEnd > 0 && rLine.GetInfo().GetChar(nEnd - 1) == CH_BREAK) + else if (FindTabFrame() && nEnd > 0 && rLine.GetInfo().GetChar(nEnd - 1) == CH_BREAK) { // We are in a table, the paragraph has a follow and the text // ends with a hard line break. Don't join the follow just @@ -1071,23 +1071,23 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, ( nStrLen == 0 && GetTextNode()->GetNumRule() ) ) ) { - SplitFrm( nEnd ); + SplitFrame( nEnd ); nNew |= 3; } } // If the remaining height changed e.g by RemoveFootnote() we need to // fill up in order to avoid oscillation. - if( bDummy && pBodyFrm && + if( bDummy && pBodyFrame && nBodyHeight < ( IsVertical() ? - pBodyFrm->Frm().Width() : - pBodyFrm->Frm().Height() ) ) + pBodyFrame->Frame().Width() : + pBodyFrame->Frame().Height() ) ) rLine.MakeDummyLine(); } - // In AdjustFrm() we set ourselves via Grow/Shrink + // In AdjustFrame() we set ourselves via Grow/Shrink // In AdjustFollow() we set our FollowFrame - const SwTwips nDocPrtTop = Frm().Top() + Prt().Top(); + const SwTwips nDocPrtTop = Frame().Top() + Prt().Top(); const SwTwips nOldHeight = Prt().SSize().Height(); const SwTwips nChg = rLine.CalcBottomLine() - nDocPrtTop - nOldHeight; @@ -1104,7 +1104,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, rRepaint.Width( rRepaint.Width() - nChg ); } - AdjustFrm( nChg, bHasToFit ); + AdjustFrame( nChg, bHasToFit ); if( HasFollow() || IsInFootnote() ) _AdjustFollow( rLine, nEnd, nStrLen, nNew ); @@ -1114,10 +1114,10 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, // bPrev is set whether Reformat.Start() was called because of Prev(). // Else, wo don't know whether we can limit the repaint or not. -bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev ) +bool SwTextFrame::FormatLine( SwTextFormatter &rLine, const bool bPrev ) { OSL_ENSURE( ! IsVertical() || IsSwapped(), - "SwTextFrm::FormatLine( rLine, bPrev) with unswapped frame" ); + "SwTextFrame::FormatLine( rLine, bPrev) with unswapped frame" ); SwParaPortion *pPara = rLine.GetInfo().GetParaPortion(); const SwLineLayout *pOldCur = rLine.GetCurr(); const sal_Int32 nOldLen = pOldCur->GetLen(); @@ -1132,10 +1132,10 @@ bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev ) const sal_Int32 nNewStart = rLine.FormatLine( rLine.GetStart() ); - OSL_ENSURE( Frm().Pos().Y() + Prt().Pos().Y() == rLine.GetFirstPos(), - "SwTextFrm::FormatLine: frame leaves orbit." ); + OSL_ENSURE( Frame().Pos().Y() + Prt().Pos().Y() == rLine.GetFirstPos(), + "SwTextFrame::FormatLine: frame leaves orbit." ); OSL_ENSURE( rLine.GetCurr()->Height(), - "SwTextFrm::FormatLine: line height is zero" ); + "SwTextFrame::FormatLine: line height is zero" ); // The current line break object const SwLineLayout *pNew = rLine.GetCurr(); @@ -1200,7 +1200,7 @@ bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev ) } SwTwips nRght = std::max( nOldWidth, pNew->Width() + pNew->GetHangingMargin() ); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); const SwViewOption *pOpt = pSh ? pSh->GetViewOptions() : nullptr; if( pOpt && (pOpt->IsParagraph() || pOpt->IsLineBreak()) ) nRght += ( std::max( nOldAscent, pNew->GetAscent() ) ); @@ -1250,10 +1250,10 @@ bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev ) return 0 != pPara->GetDelta(); } -void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, +void SwTextFrame::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, const bool bAdjust ) { - OSL_ENSURE( ! IsVertical() || IsSwapped(),"SwTextFrm::_Format with unswapped frame" ); + OSL_ENSURE( ! IsVertical() || IsSwapped(),"SwTextFrame::_Format with unswapped frame" ); SwParaPortion *pPara = rLine.GetInfo().GetParaPortion(); rLine.SetUnclipped( false ); @@ -1331,13 +1331,13 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, rRepaint.SetOfst( 0 ); rRepaint.SetRightOfst( 0 ); - rRepaint.Chg( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + rRepaint.Chg( Frame().Pos() + Prt().Pos(), Prt().SSize() ); if( pPara->IsMargin() ) rRepaint.Width( rRepaint.Width() + pPara->GetHangingMargin() ); rRepaint.Top( rLine.Y() ); if( 0 >= rRepaint.Width() ) rRepaint.Width(1); - WidowsAndOrphans aFrmBreak( this, rInf.IsTest() ? 1 : 0 ); + WidowsAndOrphans aFrameBreak( this, rInf.IsTest() ? 1 : 0 ); // rLine is now set to the first line which needs formatting. // The bFirst flag makes sure that Next() is not called. @@ -1352,21 +1352,21 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, // because the Ofst was set wrongly in the Follow. bool bBreak = ( !pPara->IsPrepMustFit() || rLine.GetLineNr() > 1 ) - && aFrmBreak.IsBreakNowWidAndOrp( rLine ); + && aFrameBreak.IsBreakNowWidAndOrp( rLine ); if( bBreak ) { bool bPrevDone = nullptr != rLine.Prev(); - while( bPrevDone && aFrmBreak.IsBreakNowWidAndOrp(rLine) ) + while( bPrevDone && aFrameBreak.IsBreakNowWidAndOrp(rLine) ) bPrevDone = nullptr != rLine.Prev(); if( bPrevDone ) { - aFrmBreak.SetKeep( false ); + aFrameBreak.SetKeep( false ); rLine.Next(); } rLine.TruncLines(); // Play it safe - aFrmBreak.IsBreakNowWidAndOrp(rLine); + aFrameBreak.IsBreakNowWidAndOrp(rLine); } /* Meaning if the following flags are set: @@ -1396,8 +1396,8 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, if( IsFollow() && IsFieldFollow() && rLine.GetStart() == GetOfst() ) { - SwTextFrm *pMaster = FindMaster(); - OSL_ENSURE( pMaster, "SwTextFrm::Format: homeless follow" ); + SwTextFrame *pMaster = FindMaster(); + OSL_ENSURE( pMaster, "SwTextFrame::Format: homeless follow" ); const SwLineLayout* pLine=nullptr; if (pMaster) { @@ -1522,7 +1522,7 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, break; } } - bBreak = aFrmBreak.IsBreakNowWidAndOrp(rLine); + bBreak = aFrameBreak.IsBreakNowWidAndOrp(rLine); }while( !bBreak ); if( pFreeze ) @@ -1549,7 +1549,7 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, // FormatAdjust does not pay off at OnceMore if( bAdjust || !rLine.GetDropFormat() || !rLine.CalcOnceMore() ) { - FormatAdjust( rLine, aFrmBreak, nStrLen, rInf.IsStop() ); + FormatAdjust( rLine, aFrameBreak, nStrLen, rInf.IsStop() ); } if( rRepaint.HasArea() ) SetRepaint(); @@ -1565,10 +1565,10 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, } } -void SwTextFrm::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) +void SwTextFrame::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) { OSL_ENSURE( ! IsVertical() || IsSwapped(), - "A frame is not swapped in SwTextFrm::FormatOnceMore" ); + "A frame is not swapped in SwTextFrame::FormatOnceMore" ); SwParaPortion *pPara = rLine.GetInfo().GetParaPortion(); if( !pPara ) @@ -1613,7 +1613,7 @@ void SwTextFrm::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) // If something went wrong, we need to reformat again if( !bGoOn ) { - rInf.CtorInitTextFormatInfo( getRootFrm()->GetCurrShell()->GetOut(), this ); + rInf.CtorInitTextFormatInfo( getRootFrame()->GetCurrShell()->GetOut(), this ); rLine.CtorInitTextFormatter( this, &rInf ); rLine.SetDropLines( 1 ); rLine.CalcDropHeight( 1 ); @@ -1627,7 +1627,7 @@ void SwTextFrm::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) } } -void SwTextFrm::_Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPara ) +void SwTextFrame::_Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPara ) { const bool bIsEmpty = GetText().isEmpty(); @@ -1688,36 +1688,36 @@ void SwTextFrm::_Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPar // We calculate the text frame's size and send a notification. // Shrink() or Grow() to adjust the frame's size to the changed required space. -void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs * ) +void SwTextFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs * ) { SWRECTFN( this ) CalcAdditionalFirstLineOffset(); - // The range autopilot or the BASIC interface pass us TextFrms with + // The range autopilot or the BASIC interface pass us TextFrames with // a width <= 0 from time to time if( (Prt().*fnRect->fnGetWidth)() <= 0 ) { // If MustFit is set, we shrink to the Upper's bottom edge if needed. // Else we just take a standard size of 12 Pt. (240 twip). SwTextLineAccess aAccess( this ); - long nFrmHeight = (Frm().*fnRect->fnGetHeight)(); + long nFrameHeight = (Frame().*fnRect->fnGetHeight)(); if( aAccess.GetPara()->IsPrepMustFit() ) { const SwTwips nLimit = (GetUpper()->*fnRect->fnGetPrtBottom)(); - const SwTwips nDiff = - (Frm().*fnRect->fnBottomDist)( nLimit ); + const SwTwips nDiff = - (Frame().*fnRect->fnBottomDist)( nLimit ); if( nDiff > 0 ) Shrink( nDiff ); } - else if( 240 < nFrmHeight ) - Shrink( nFrmHeight - 240 ); - else if( 240 > nFrmHeight ) - Grow( 240 - nFrmHeight ); - nFrmHeight = (Frm().*fnRect->fnGetHeight)(); + else if( 240 < nFrameHeight ) + Shrink( nFrameHeight - 240 ); + else if( 240 > nFrameHeight ) + Grow( 240 - nFrameHeight ); + nFrameHeight = (Frame().*fnRect->fnGetHeight)(); long nTop = (this->*fnRect->fnGetTopMargin)(); - if( nTop > nFrmHeight ) - (this->*fnRect->fnSetYMargins)( nFrmHeight, 0 ); + if( nTop > nFrameHeight ) + (this->*fnRect->fnSetYMargins)( nFrameHeight, 0 ); else if( (Prt().*fnRect->fnGetHeight)() < 0 ) (Prt().*fnRect->fnSetHeight)( 0 ); return; @@ -1758,7 +1758,7 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs } // We do not want to be interrupted during formatting - TextFrmLockGuard aLock(this); + TextFrameLockGuard aLock(this); SwTextLineAccess aAccess( this ); const bool bNew = !aAccess.SwTextLineAccess::IsAvailable(); const bool bSetOfst = @@ -1766,7 +1766,7 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs if( CalcPreps() ) ; // nothing - // We return if already formatted, but if the TextFrm was just created + // We return if already formatted, but if the TextFrame was just created // and does not have any format information else if( !bNew && !aAccess.GetPara()->GetReformat().Len() ) { @@ -1780,15 +1780,15 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs } else if( bSetOfst && IsFollow() ) { - SwTextFrm *pMaster = FindMaster(); - OSL_ENSURE( pMaster, "SwTextFrm::Format: homeless follow" ); + SwTextFrame *pMaster = FindMaster(); + OSL_ENSURE( pMaster, "SwTextFrame::Format: homeless follow" ); if( pMaster ) pMaster->Prepare( PREP_FOLLOW_FOLLOWS ); SwTwips nMaxY = (GetUpper()->*fnRect->fnGetPrtBottom)(); - if( (Frm().*fnRect->fnOverStep)( nMaxY ) ) + if( (Frame().*fnRect->fnOverStep)( nMaxY ) ) (this->*fnRect->fnSetLimit)( nMaxY ); - else if( (Frm().*fnRect->fnBottomDist)( nMaxY ) < 0 ) - (Frm().*fnRect->fnAddBottom)( -(Frm().*fnRect->fnGetHeight)() ); + else if( (Frame().*fnRect->fnBottomDist)( nMaxY ) < 0 ) + (Frame().*fnRect->fnAddBottom)( -(Frame().*fnRect->fnGetHeight)() ); } else { @@ -1797,20 +1797,20 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs _SetOfst( 0 ); const bool bOrphan = IsWidow(); - const SwFootnoteBossFrm* pFootnoteBoss = HasFootnote() ? FindFootnoteBossFrm() : nullptr; + const SwFootnoteBossFrame* pFootnoteBoss = HasFootnote() ? FindFootnoteBossFrame() : nullptr; SwTwips nFootnoteHeight = 0; if( pFootnoteBoss ) { - const SwFootnoteContFrm* pCont = pFootnoteBoss->FindFootnoteCont(); - nFootnoteHeight = pCont ? (pCont->Frm().*fnRect->fnGetHeight)() : 0; + const SwFootnoteContFrame* pCont = pFootnoteBoss->FindFootnoteCont(); + nFootnoteHeight = pCont ? (pCont->Frame().*fnRect->fnGetHeight)() : 0; } do { _Format( pRenderContext, aAccess.GetPara() ); if( pFootnoteBoss && nFootnoteHeight ) { - const SwFootnoteContFrm* pCont = pFootnoteBoss->FindFootnoteCont(); - SwTwips nNewHeight = pCont ? (pCont->Frm().*fnRect->fnGetHeight)() : 0; + const SwFootnoteContFrame* pCont = pFootnoteBoss->FindFootnoteCont(); + SwTwips nNewHeight = pCont ? (pCont->Frame().*fnRect->fnGetHeight)() : 0; // If we lost some footnotes, we may have more space // for our main text, so we have to format again ... if( nNewHeight < nFootnoteHeight ) @@ -1823,13 +1823,13 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs } while ( pFootnoteBoss ); if( bOrphan ) { - ValidateFrm(); + ValidateFrame(); SetWidow( false ); } } if( IsEmptyMaster() ) { - SwFrm* pPre = GetPrev(); + SwFrame* pPre = GetPrev(); if( pPre && // #i10826# It's the first, it cannot keep! pPre->GetIndPrev() && @@ -1859,10 +1859,10 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs // frames will not calculated during the painting. So I actually want to // avoid a formatting during painting, but since I'm a coward, I'll only // force the quick formatting in the situation of issue i29062. -bool SwTextFrm::FormatQuick( bool bForceQuickFormat ) +bool SwTextFrame::FormatQuick( bool bForceQuickFormat ) { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::FormatQuick with swapped frame" ); + "SwTextFrame::FormatQuick with swapped frame" ); if( IsEmpty() && FormatEmpty() ) return true; @@ -1878,10 +1878,10 @@ bool SwTextFrm::FormatQuick( bool bForceQuickFormat ) if( !pPara ) return false; - SwFrmSwapper aSwapper( this, true ); + SwFrameSwapper aSwapper( this, true ); - TextFrmLockGuard aLock(this); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true ); + TextFrameLockGuard aLock(this); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, false, true ); if( 0 != aInf.MaxHyph() ) // Respect MaxHyphen! return false; @@ -1913,7 +1913,7 @@ bool SwTextFrm::FormatQuick( bool bForceQuickFormat ) } while( aLine.Next() ); // Last exit: the heights need to match - Point aTopLeft( Frm().Pos() ); + Point aTopLeft( Frame().Pos() ); aTopLeft += Prt().Pos(); const SwTwips nNewHeight = aLine.Y() + aLine.GetLineHeight(); const SwTwips nOldHeight = aTopLeft.Y() + Prt().Height(); @@ -1926,7 +1926,7 @@ bool SwTextFrm::FormatQuick( bool bForceQuickFormat ) return false; } - if (m_pFollow && nStart != (static_cast<SwTextFrm*>(m_pFollow))->GetOfst()) + if (m_pFollow && nStart != (static_cast<SwTextFrame*>(m_pFollow))->GetOfst()) return false; // can be caused by e.g. Orphans // We made it! diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index 97ddfefba5ac..181fecf54223 100644 --- a/sw/source/core/text/frminf.cxx +++ b/sw/source/core/text/frminf.cxx @@ -49,14 +49,14 @@ sal_Int32 SwTextMargin::GetTextEnd() const } // Does the paragraph fit into one line? -bool SwTextFrmInfo::IsOneLine() const +bool SwTextFrameInfo::IsOneLine() const { - const SwLineLayout *pLay = pFrm->GetPara(); + const SwLineLayout *pLay = pFrame->GetPara(); if( !pLay ) return false; // For follows false of course - if( pFrm->GetFollow() ) + if( pFrame->GetFollow() ) return false; pLay = pLay->GetNext(); @@ -70,20 +70,20 @@ bool SwTextFrmInfo::IsOneLine() const } // Is the line filled for X percent? -bool SwTextFrmInfo::IsFilled( const sal_uInt8 nPercent ) const +bool SwTextFrameInfo::IsFilled( const sal_uInt8 nPercent ) const { - const SwLineLayout *pLay = pFrm->GetPara(); + const SwLineLayout *pLay = pFrame->GetPara(); if( !pLay ) return false; - long nWidth = pFrm->Prt().Width(); + long nWidth = pFrame->Prt().Width(); nWidth *= nPercent; nWidth /= 100; return sal_uInt16(nWidth) <= pLay->Width(); } // Where does the text start (without whitespace)? (document global) -SwTwips SwTextFrmInfo::GetLineStart( const SwTextCursor &rLine ) +SwTwips SwTextFrameInfo::GetLineStart( const SwTextCursor &rLine ) { const sal_Int32 nTextStart = rLine.GetTextStart(); if( rLine.GetStart() == nTextStart ) @@ -97,28 +97,28 @@ SwTwips SwTextFrmInfo::GetLineStart( const SwTextCursor &rLine ) } // Where does the text start (without whitespace)? (relative in the Frame) -SwTwips SwTextFrmInfo::GetLineStart() const +SwTwips SwTextFrameInfo::GetLineStart() const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); - return GetLineStart( aLine ) - pFrm->Frm().Left() - pFrm->Prt().Left(); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); + return GetLineStart( aLine ) - pFrame->Frame().Left() - pFrame->Prt().Left(); } // Calculates the character's position and returns the middle position -SwTwips SwTextFrmInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const +SwTwips SwTextFrameInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const { - SWRECTFN( pFrm ) - SwFrmSwapper aSwapper( pFrm, true ); + SWRECTFN( pFrame ) + SwFrameSwapper aSwapper( pFrame, true ); - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); SwTwips nStt, nNext; SwRect aRect; if( static_cast<SwTextCursor&>(aLine).GetCharRect( &aRect, nChar ) ) { if ( bVert ) - pFrm->SwitchHorizontalToVertical( aRect ); + pFrame->SwitchHorizontalToVertical( aRect ); nStt = (aRect.*fnRect->fnGetLeft)(); } @@ -126,22 +126,22 @@ SwTwips SwTextFrmInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const nStt = aLine.GetLineStart(); if( !bCenter ) - return nStt - (pFrm->Frm().*fnRect->fnGetLeft)(); + return nStt - (pFrame->Frame().*fnRect->fnGetLeft)(); if( static_cast<SwTextCursor&>(aLine).GetCharRect( &aRect, nChar+1 ) ) { if ( bVert ) - pFrm->SwitchHorizontalToVertical( aRect ); + pFrame->SwitchHorizontalToVertical( aRect ); nNext = (aRect.*fnRect->fnGetLeft)(); } else nNext = aLine.GetLineStart(); - return (( nNext + nStt ) / 2 ) - (pFrm->Frm().*fnRect->fnGetLeft)(); + return (( nNext + nStt ) / 2 ) - (pFrame->Frame().*fnRect->fnGetLeft)(); } -SwPaM *AddPam( SwPaM *pPam, const SwTextFrm* pTextFrm, +SwPaM *AddPam( SwPaM *pPam, const SwTextFrame* pTextFrame, const sal_Int32 nPos, const sal_Int32 nLen ) { if( nLen ) @@ -160,7 +160,7 @@ SwPaM *AddPam( SwPaM *pPam, const SwTextFrm* pTextFrm, } SwIndex &rContent = pPam->GetPoint()->nContent; - rContent.Assign( const_cast<SwTextNode*>(pTextFrm->GetTextNode()), nPos ); + rContent.Assign( const_cast<SwTextNode*>(pTextFrame->GetTextNode()), nPos ); pPam->SetMark(); rContent += nLen; } @@ -168,10 +168,10 @@ SwPaM *AddPam( SwPaM *pPam, const SwTextFrm* pTextFrm, } // Accumulates the whitespace at line start and end in the Pam -void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const +void SwTextFrameInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextMargin aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextMargin aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); SwPaM *pPam = &rPam; bool bFirstLine = true; do { @@ -182,7 +182,7 @@ void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const // Do NOT include the blanks/tabs from the first line // in the selection if( !bFirstLine && nPos > aLine.GetStart() ) - pPam = AddPam( pPam, pFrm, aLine.GetStart(), + pPam = AddPam( pPam, pFrame, aLine.GetStart(), nPos - aLine.GetStart() ); // Do NOT include the blanks/tabs from the last line @@ -196,7 +196,7 @@ void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const sal_uInt16 nOff = !bWithLineBreak && CH_BREAK == aLine.GetInfo().GetChar( aLine.GetEnd() - 1 ) ? 1 : 0; - pPam = AddPam( pPam, pFrm, nPos, aLine.GetEnd() - nPos - nOff ); + pPam = AddPam( pPam, pFrame, nPos, aLine.GetEnd() - nPos - nOff ); } } } @@ -207,10 +207,10 @@ void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const // Is there a bullet/symbol etc. at the text position? // Fonts: CharSet, SYMBOL und DONTKNOW -bool SwTextFrmInfo::IsBullet( sal_Int32 nTextStart ) const +bool SwTextFrameInfo::IsBullet( sal_Int32 nTextStart ) const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextMargin aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextMargin aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); aInf.SetIdx( nTextStart ); return aLine.IsSymbol( nTextStart ); } @@ -219,10 +219,10 @@ bool SwTextFrmInfo::IsBullet( sal_Int32 nTextStart ) const // The precondition for a positive or negative first line indent: // All lines (except for the first one) have the same left margin. // We do not want to be so picky and work with a tolerance of TOLERANCE twips. -SwTwips SwTextFrmInfo::GetFirstIndent() const +SwTwips SwTextFrameInfo::GetFirstIndent() const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); const SwTwips nFirst = GetLineStart( aLine ); const SwTwips TOLERANCE = 20; @@ -251,18 +251,18 @@ SwTwips SwTextFrmInfo::GetFirstIndent() const return 1; } -sal_Int32 SwTextFrmInfo::GetBigIndent( sal_Int32& rFndPos, - const SwTextFrm *pNextFrm ) const +sal_Int32 SwTextFrameInfo::GetBigIndent( sal_Int32& rFndPos, + const SwTextFrame *pNextFrame ) const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); SwTwips nNextIndent = 0; - if( pNextFrm ) + if( pNextFrame ) { // I'm a single line - SwTextSizeInfo aNxtInf( const_cast<SwTextFrm*>(pNextFrm) ); - SwTextCursor aNxtLine( const_cast<SwTextFrm*>(pNextFrm), &aNxtInf ); + SwTextSizeInfo aNxtInf( const_cast<SwTextFrame*>(pNextFrame) ); + SwTextCursor aNxtLine( const_cast<SwTextFrame*>(pNextFrame), &aNxtInf ); nNextIndent = GetLineStart( aNxtLine ); } else @@ -279,7 +279,7 @@ sal_Int32 SwTextFrmInfo::GetBigIndent( sal_Int32& rFndPos, return 0; const Point aPoint( nNextIndent, aLine.Y() ); - rFndPos = aLine.GetCrsrOfst( nullptr, aPoint, false ); + rFndPos = aLine.GetCursorOfst( nullptr, aPoint, false ); if( 1 >= rFndPos ) return 0; @@ -302,7 +302,7 @@ sal_Int32 SwTextFrmInfo::GetBigIndent( sal_Int32& rFndPos, SwRect aRect; return aLine.GetCharRect( &aRect, rFndPos ) - ? static_cast<sal_Int32>(aRect.Left() - pFrm->Frm().Left() - pFrm->Prt().Left()) + ? static_cast<sal_Int32>(aRect.Left() - pFrame->Frame().Left() - pFrame->Prt().Left()) : 0; } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index c8f8063c123b..b287c77e9b05 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -60,7 +60,7 @@ class SwExtraPainter { SwSaveClip aClip; SwRect aRect; - const SwTextFrm* pTextFrm; + const SwTextFrame* pTextFrame; SwViewShell *pSh; SwFont* pFnt; const SwLineNumberInfo &rLineInf; @@ -72,7 +72,7 @@ class SwExtraPainter bool bLineNum; inline bool IsClipChg() { return aClip.IsChg(); } public: - SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, + SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh, const SwLineNumberInfo &rLnInf, const SwRect &rRct, sal_Int16 eHor, bool bLnNm ); ~SwExtraPainter() { delete pFnt; } @@ -86,12 +86,12 @@ public: void PaintRedline( SwTwips nY, long nMax ); }; -SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, +SwExtraPainter::SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh, const SwLineNumberInfo &rLnInf, const SwRect &rRct, sal_Int16 eHor, bool bLnNm ) - : aClip( pVwSh->GetWin() || pFrm->IsUndersized() ? pVwSh->GetOut() : nullptr ) + : aClip( pVwSh->GetWin() || pFrame->IsUndersized() ? pVwSh->GetOut() : nullptr ) , aRect( rRct ) - , pTextFrm( pFrm ) + , pTextFrame( pFrame ) , pSh( pVwSh ) , pFnt( nullptr ) , rLineInf( rLnInf ) @@ -102,9 +102,9 @@ SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, , bGoLeft(false) , bLineNum( bLnNm ) { - if( pFrm->IsUndersized() ) + if( pFrame->IsUndersized() ) { - SwTwips nBottom = pFrm->Frm().Bottom(); + SwTwips nBottom = pFrame->Frame().Bottom(); if( aRect.Bottom() > nBottom ) aRect.Bottom( nBottom ); } @@ -121,18 +121,18 @@ SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, outside of the paint rect */ nDivider = !rLineInf.GetDivider().isEmpty() ? rLineInf.GetDividerCountBy() : 0; - nX = pFrm->Frm().Left(); - SwCharFormat* pFormat = rLineInf.GetCharFormat( const_cast<IDocumentStylePoolAccess&>(pFrm->GetNode()->getIDocumentStylePoolAccess()) ); + nX = pFrame->Frame().Left(); + SwCharFormat* pFormat = rLineInf.GetCharFormat( const_cast<IDocumentStylePoolAccess&>(pFrame->GetNode()->getIDocumentStylePoolAccess()) ); OSL_ENSURE( pFormat, "PaintExtraData without CharFormat" ); - pFnt = new SwFont( &pFormat->GetAttrSet(), pFrm->GetTextNode()->getIDocumentSettingAccess() ); + pFnt = new SwFont( &pFormat->GetAttrSet(), pFrame->GetTextNode()->getIDocumentSettingAccess() ); pFnt->Invalidate(); pFnt->ChgPhysFnt( pSh, *pSh->GetOut() ); - pFnt->SetVertical( 0, pFrm->IsVertical() ); - nLineNr += pFrm->GetAllLines() - pFrm->GetThisLines(); + pFnt->SetVertical( 0, pFrame->IsVertical() ); + nLineNr += pFrame->GetAllLines() - pFrame->GetThisLines(); LineNumberPosition ePos = rLineInf.GetPos(); if( ePos != LINENUMBER_POS_LEFT && ePos != LINENUMBER_POS_RIGHT ) { - if( pFrm->FindPageFrm()->OnRightPage() ) + if( pFrame->FindPageFrame()->OnRightPage() ) { nVirtPageNum = 1; ePos = ePos == LINENUMBER_POS_INSIDE ? @@ -155,7 +155,7 @@ SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, else { bGoLeft = false; - nX += pFrm->Frm().Width() + rLineInf.GetPosFromLeft(); + nX += pFrame->Frame().Width() + rLineInf.GetPosFromLeft(); if( nX > aRect.Right() ) bLineNum = false; } @@ -165,17 +165,17 @@ SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, if( text::HoriOrientation::INSIDE == eHor || text::HoriOrientation::OUTSIDE == eHor ) { if( !nVirtPageNum ) - nVirtPageNum = pFrm->FindPageFrm()->OnRightPage() ? 1 : 2; + nVirtPageNum = pFrame->FindPageFrame()->OnRightPage() ? 1 : 2; if( nVirtPageNum % 2 ) eHor = eHor == text::HoriOrientation::INSIDE ? text::HoriOrientation::LEFT : text::HoriOrientation::RIGHT; else eHor = eHor == text::HoriOrientation::OUTSIDE ? text::HoriOrientation::LEFT : text::HoriOrientation::RIGHT; } - const SwFrm* pTmpFrm = pFrm->FindTabFrm(); - if( !pTmpFrm ) - pTmpFrm = pFrm; - nRedX = text::HoriOrientation::LEFT == eHor ? pTmpFrm->Frm().Left() - REDLINE_DISTANCE : - pTmpFrm->Frm().Right() + REDLINE_DISTANCE; + const SwFrame* pTmpFrame = pFrame->FindTabFrame(); + if( !pTmpFrame ) + pTmpFrame = pFrame; + nRedX = text::HoriOrientation::LEFT == eHor ? pTmpFrame->Frame().Left() - REDLINE_DISTANCE : + pTmpFrame->Frame().Right() + REDLINE_DISTANCE; } } @@ -195,10 +195,10 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed ) aDrawInf.SetSmartTags( nullptr ); aDrawInf.SetLeft( 0 ); aDrawInf.SetRight( LONG_MAX ); - aDrawInf.SetFrm( pTextFrm ); + aDrawInf.SetFrame( pTextFrame ); aDrawInf.SetFont( pFnt ); aDrawInf.SetSnapToGrid( false ); - aDrawInf.SetIgnoreFrmRTL( true ); + aDrawInf.SetIgnoreFrameRTL( true ); bool bTooBig = pFnt->GetSize( pFnt->GetActual() ).Height() > nMax && pFnt->GetHeight( pSh, *pSh->GetOut() ) > nMax; @@ -232,7 +232,7 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed ) if( aRct.Intersection( aRect ).IsEmpty() ) bPaint = false; else - aClip.ChgClip( aRect, pTextFrm ); + aClip.ChgClip( aRect, pTextFrame ); } } else if( bGoLeft ) @@ -263,25 +263,25 @@ void SwExtraPainter::PaintRedline( SwTwips nY, long nMax ) { if( aRct.Intersection( aRect ).IsEmpty() ) return; - aClip.ChgClip( aRect, pTextFrm ); + aClip.ChgClip( aRect, pTextFrame ); } } const Color aOldCol( pSh->GetOut()->GetLineColor() ); pSh->GetOut()->SetLineColor( SW_MOD()->GetRedlineMarkColor() ); - if ( pTextFrm->IsVertical() ) + if ( pTextFrame->IsVertical() ) { - pTextFrm->SwitchHorizontalToVertical( aStart ); - pTextFrm->SwitchHorizontalToVertical( aEnd ); + pTextFrame->SwitchHorizontalToVertical( aStart ); + pTextFrame->SwitchHorizontalToVertical( aEnd ); } pSh->GetOut()->DrawLine( aStart, aEnd ); pSh->GetOut()->SetLineColor( aOldCol ); } -void SwTextFrm::PaintExtraData( const SwRect &rRect ) const +void SwTextFrame::PaintExtraData( const SwRect &rRect ) const { - if( Frm().Top() > rRect.Bottom() || Frm().Bottom() < rRect.Top() ) + if( Frame().Top() > rRect.Bottom() || Frame().Bottom() < rRect.Top() ) return; const SwTextNode& rTextNode = *GetTextNode(); @@ -298,9 +298,9 @@ void SwTextFrm::PaintExtraData( const SwRect &rRect ) const { if( IsLocked() || IsHiddenNow() || !Prt().Height() ) return; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); SwRect rOldRect( rRect ); if ( IsVertical() ) @@ -316,16 +316,16 @@ void SwTextFrm::PaintExtraData( const SwRect &rRect ) const if( HasPara() ) { - TextFrmLockGuard aLock(const_cast<SwTextFrm*>(this)); + TextFrameLockGuard aLock(const_cast<SwTextFrame*>(this)); SwTextLineAccess aAccess( this ); aAccess.GetPara(); - SwTextPaintInfo aInf( const_cast<SwTextFrm*>(this), rRect ); + SwTextPaintInfo aInf( const_cast<SwTextFrame*>(this), rRect ); aLayoutModeModifier.Modify( false ); - SwTextPainter aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextPainter aLine( const_cast<SwTextFrame*>(this), &aInf ); bool bNoDummy = !aLine.GetNext(); // Only one empty line! while( aLine.Y() + aLine.GetLineHeight() <= rRect.Top() ) @@ -390,30 +390,30 @@ void SwTextFrm::PaintExtraData( const SwRect &rRect ) const if( bLineNum && rLineInf.IsCountBlankLines() && ( aExtra.HasNumber() || aExtra.HasDivider() ) ) { - aExtra.PaintExtra( Frm().Top()+Prt().Top(), aExtra.GetFont() + aExtra.PaintExtra( Frame().Top()+Prt().Top(), aExtra.GetFont() ->GetAscent( pSh, *pSh->GetOut() ), Prt().Height(), bRedLine ); } else if( bRedLine ) - aExtra.PaintRedline( Frm().Top()+Prt().Top(), Prt().Height() ); + aExtra.PaintRedline( Frame().Top()+Prt().Top(), Prt().Height() ); } (SwRect&)rRect = rOldRect; } } -SwRect SwTextFrm::Paint() +SwRect SwTextFrame::Paint() { #if OSL_DEBUG_LEVEL > 1 - const SwTwips nDbgY = Frm().Top(); + const SwTwips nDbgY = Frame().Top(); (void)nDbgY; #endif // finger layout - OSL_ENSURE( GetValidPosFlag(), "+SwTextFrm::Paint: no Calc()" ); + OSL_ENSURE( GetValidPosFlag(), "+SwTextFrame::Paint: no Calc()" ); SwRect aRet( Prt() ); if ( IsEmpty() || !HasPara() ) - aRet += Frm().Pos(); + aRet += Frame().Pos(); else { // We return the right paint rect. Use the calculated PaintOfst as the @@ -422,7 +422,7 @@ SwRect SwTextFrm::Paint() long l; if ( IsVertLR() ) // mba: the following line was added, but we don't need it for the existing directions; kept for IsVertLR(), but should be checked - rRepaint.Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); + rRepaint.Chg( ( GetUpper()->Frame() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); if( rRepaint.GetOfst() ) rRepaint.Left( rRepaint.GetOfst() ); @@ -436,10 +436,10 @@ SwRect SwTextFrm::Paint() // In case our left edge is the same as the body frame's left edge, // then extend the rectangle to include the page margin as well, // otherwise some font will be clipped. - SwLayoutFrm* pBodyFrm = GetUpper(); - if (pBodyFrm->IsBodyFrm() && aRet.Left() == (pBodyFrm->Frm().Left() + pBodyFrm->Prt().Left())) - if (SwLayoutFrm* pPageFrm = pBodyFrm->GetUpper()) - aRet.Left(pPageFrm->Frm().Left()); + SwLayoutFrame* pBodyFrame = GetUpper(); + if (pBodyFrame->IsBodyFrame() && aRet.Left() == (pBodyFrame->Frame().Left() + pBodyFrame->Prt().Left())) + if (SwLayoutFrame* pPageFrame = pBodyFrame->GetUpper()) + aRet.Left(pPageFrame->Frame().Left()); if ( IsRightToLeft() ) SwitchLTRtoRTL( aRet ); @@ -452,9 +452,9 @@ SwRect SwTextFrm::Paint() return aRet; } -bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const +bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && ( pSh->GetViewOptions()->IsParagraph() || bInitFont ) ) { bInitFont = false; @@ -502,13 +502,13 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const pFnt->SetCharSet( RTL_TEXTENCODING_SYMBOL, SW_LATIN ); } pFnt->SetVertical( 0, IsVertical() ); - SwFrmSwapper aSwapper( this, true ); + SwFrameSwapper aSwapper( this, true ); SwLayoutModeModifier aLayoutModeModifier( *pSh->GetOut() ); aLayoutModeModifier.Modify( IsRightToLeft() ); pFnt->Invalidate(); pFnt->ChgPhysFnt( pSh, *pSh->GetOut() ); - Point aPos = Frm().Pos() + Prt().Pos(); + Point aPos = Frame().Pos() + Prt().Pos(); const SvxLRSpaceItem &rSpace = GetTextNode()->GetSwAttrSet().GetLRSpace(); @@ -530,7 +530,7 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const if ( GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() && IsInDocBody() ) { - SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame())); if ( pGrid ) { // center character in grid line @@ -555,7 +555,7 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const aDrawInf.SetWrong( nullptr ); aDrawInf.SetGrammarCheck( nullptr ); aDrawInf.SetSmartTags( nullptr ); - aDrawInf.SetFrm( this ); + aDrawInf.SetFrame( this ); aDrawInf.SetFont( pFnt ); aDrawInf.SetSnapToGrid( false ); @@ -573,23 +573,23 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const return false; } -void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { ResetRepaint(); // #i16816# tagged pdf support - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); Num_Info aNumInfo( *this ); SwTaggedPDFHelper aTaggedPDFHelperNumbering( &aNumInfo, nullptr, nullptr, rRenderContext ); - Frm_Info aFrmInfo( *this ); - SwTaggedPDFHelper aTaggedPDFHelperParagraph( nullptr, &aFrmInfo, nullptr, rRenderContext ); + Frame_Info aFrameInfo( *this ); + SwTaggedPDFHelper aTaggedPDFHelperParagraph( nullptr, &aFrameInfo, nullptr, rRenderContext ); if( !IsEmpty() || !PaintEmpty( rRect, true ) ) { #if OSL_DEBUG_LEVEL > 1 - const SwTwips nDbgY = Frm().Top(); + const SwTwips nDbgY = Frame().Top(); (void)nDbgY; #endif @@ -599,11 +599,11 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S // It can happen that the IdleCollector withdrew my cached information if( !HasPara() ) { - OSL_ENSURE( GetValidPosFlag(), "+SwTextFrm::Paint: no Calc()" ); + OSL_ENSURE( GetValidPosFlag(), "+SwTextFrame::Paint: no Calc()" ); // #i29062# pass info that we are currently // painting. - const_cast<SwTextFrm*>(this)->GetFormatted( true ); + const_cast<SwTextFrame*>(this)->GetFormatted( true ); if( IsEmpty() ) { PaintEmpty( rRect, false ); @@ -611,32 +611,32 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S } if( !HasPara() ) { - OSL_ENSURE( false, "+SwTextFrm::Paint: missing format information" ); + OSL_ENSURE( false, "+SwTextFrame::Paint: missing format information" ); return; } } // We don't want to be interrupted while painting. // Do that after thr Format()! - TextFrmLockGuard aLock(const_cast<SwTextFrm*>(this)); + TextFrameLockGuard aLock(const_cast<SwTextFrame*>(this)); - // We only paint the part of the TextFrm which changed, is within the + // We only paint the part of the TextFrame which changed, is within the // range and was requested to paint. // One could think that the area rRect _needs_ to be painted, although // rRepaint is set. Indeed, we cannot avoid this problem from a formal // perspective. Luckily we can assume rRepaint to be empty when we need - // paint the while Frm. + // paint the while Frame. SwTextLineAccess aAccess( this ); SwParaPortion *pPara = aAccess.GetPara(); SwRepaint &rRepaint = pPara->GetRepaint(); - // Switch off recycling when in the FlyCntFrm. + // Switch off recycling when in the FlyContentFrame. // A DrawRect is called for repainting the line anyways. if( rRepaint.GetOfst() ) { - const SwFlyFrm *pFly = FindFlyFrm(); - if( pFly && pFly->IsFlyInCntFrm() ) + const SwFlyFrame *pFly = FindFlyFrame(); + if( pFly && pFly->IsFlyInContentFrame() ) rRepaint.SetOfst( 0 ); } @@ -647,7 +647,7 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S SwRect aOldRect( rRect ); { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); if ( IsVertical() ) SwitchVerticalToHorizontal( (SwRect&)rRect ); @@ -655,14 +655,14 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S if ( IsRightToLeft() ) SwitchRTLtoLTR( (SwRect&)rRect ); - SwTextPaintInfo aInf( const_cast<SwTextFrm*>(this), rRect ); + SwTextPaintInfo aInf( const_cast<SwTextFrame*>(this), rRect ); aInf.SetWrongList( const_cast<SwTextNode*>(GetTextNode())->GetWrong() ); aInf.SetGrammarCheckList( const_cast<SwTextNode*>(GetTextNode())->GetGrammarCheck() ); aInf.SetSmartTags( const_cast<SwTextNode*>(GetTextNode())->GetSmartTags() ); aInf.GetTextFly().SetTopRule(); - SwTextPainter aLine( const_cast<SwTextFrm*>(this), &aInf ); - // Optimization: if no free flying Frm overlaps into our line, the + SwTextPainter aLine( const_cast<SwTextFrame*>(this), &aInf ); + // Optimization: if no free flying Frame overlaps into our line, the // SwTextFly just switches off aInf.GetTextFly().Relax(); diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index f558d0576341..939fe331b2c9 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -89,7 +89,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, if ( rInf.SnapToGrid() ) { SwTextGridItem const*const pGrid( - GetGridItem(rInf.GetTextFrm()->FindPageFrm())); + GetGridItem(rInf.GetTextFrame()->FindPageFrame())); bAddItalic = !pGrid || GRID_LINES_CHARS != pGrid->GetGridType(); } @@ -112,7 +112,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, nLineWidth -= nLeftRightBorderSpace; - const bool bUnbreakableNumberings = rInf.GetTextFrm()->GetTextNode()-> + const bool bUnbreakableNumberings = rInf.GetTextFrame()->GetTextNode()-> getIDocumentSettingAccess()->get(DocumentSettingId::UNBREAKABLE_NUMBERINGS); // first check if everything fits to line @@ -213,7 +213,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, nBreakPos = nCutPos; sal_Int32 nX = nBreakPos; - const SvxAdjust& rAdjust = rInf.GetTextFrm()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust(); + const SvxAdjust& rAdjust = rInf.GetTextFrame()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust(); if ( rAdjust == SVX_ADJUST_LEFT ) { // we step back until a non blank character has been found @@ -336,7 +336,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, // compare current script with script from last "real" character if ( nScript - 1 != rInf.GetFont()->GetActual() ) - aLang = rInf.GetTextFrm()->GetTextNode()->GetLang( + aLang = rInf.GetTextFrame()->GetTextNode()->GetLang( CH_TXTATR_BREAKWORD == cFieldChr ? nDoNotStepOver : nLangIndex, 0, nScript ); @@ -344,7 +344,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, } const ForbiddenCharacters aForbidden( - *rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess()->getForbiddenCharacters( aLang, true ) ); + *rInf.GetTextFrame()->GetNode()->getIDocumentSettingAccess()->getForbiddenCharacters( aLang, true ) ); const bool bAllowHanging = rInf.IsHanging() && ! rInf.IsMulti() && ! rPor.InFieldGrp(); @@ -423,7 +423,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, CHAR_SOFTHYPHEN == rInf.GetText()[ nBreakPos - 1 ] ) nBreakPos = rInf.GetIdx() - 1; - const SvxAdjust& rAdjust = rInf.GetTextFrm()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust(); + const SvxAdjust& rAdjust = rInf.GetTextFrame()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust(); if( rAdjust != SVX_ADJUST_LEFT ) { // Delete any blanks at the end of a line, but be careful: diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index d38630a1b11e..38d1e75feed5 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -145,15 +145,15 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet, nDefTabStop = USHRT_MAX; } -void SwTextInfo::CtorInitTextInfo( SwTextFrm *pFrm ) +void SwTextInfo::CtorInitTextInfo( SwTextFrame *pFrame ) { - m_pPara = pFrm->GetPara(); - m_nTextStart = pFrm->GetOfst(); + m_pPara = pFrame->GetPara(); + m_nTextStart = pFrame->GetOfst(); if (!m_pPara) { SAL_WARN("sw.core", "+SwTextInfo::CTOR: missing paragraph information"); - pFrm->Format(pFrm->getRootFrm()->GetCurrShell()->GetOut()); - m_pPara = pFrm->GetPara(); + pFrame->Format(pFrame->getRootFrame()->GetCurrShell()->GetOut()); + m_pPara = pFrame->GetPara(); } } @@ -191,7 +191,7 @@ SwTextSizeInfo::SwTextSizeInfo() , m_pRef(nullptr) , m_pFnt(nullptr) , m_pUnderFnt(nullptr) -, m_pFrm(nullptr) +, m_pFrame(nullptr) , m_pOpt(nullptr) , m_pText(nullptr) , m_nIdx(0) @@ -221,7 +221,7 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew ) m_pRef(const_cast<SwTextSizeInfo&>(rNew).GetRefDev()), m_pFnt(const_cast<SwTextSizeInfo&>(rNew).GetFont()), m_pUnderFnt(rNew.GetUnderFnt()), - m_pFrm(rNew.m_pFrm), + m_pFrame(rNew.m_pFrame), m_pOpt(&rNew.GetOpt()), m_pText(&rNew.GetText()), m_nIdx(rNew.GetIdx()), @@ -247,15 +247,15 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew ) #endif } -void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrame, SwFont *pNewFnt, +void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, SwFont *pNewFnt, const sal_Int32 nNewIdx, const sal_Int32 nNewLen ) { m_pKanaComp = nullptr; m_nKanaIdx = 0; - m_pFrm = pFrame; - CtorInitTextInfo( m_pFrm ); - const SwTextNode *pNd = m_pFrm->GetTextNode(); - m_pVsh = m_pFrm->getRootFrm()->GetCurrShell(); + m_pFrame = pFrame; + CtorInitTextInfo( m_pFrame ); + const SwTextNode *pNd = m_pFrame->GetTextNode(); + m_pVsh = m_pFrame->getRootFrame()->GetCurrShell(); // Get the output and reference device if ( m_pVsh ) @@ -283,7 +283,7 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextF #endif // Set default layout mode ( LTR or RTL ). - if ( m_pFrm->IsRightToLeft() ) + if ( m_pFrame->IsRightToLeft() ) { m_pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL ); m_pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL ); @@ -307,7 +307,7 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextF m_bURLNotify = pNoteURL && !m_bOnWin; SetSnapToGrid( pNd->GetSwAttrSet().GetParaGrid().GetValue() && - m_pFrm->IsInDocBody() ); + m_pFrame->IsInDocBody() ); m_pFnt = pNewFnt; m_pUnderFnt = nullptr; @@ -332,7 +332,7 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew, const OUString* pTex m_pRef(const_cast<SwTextSizeInfo&>(rNew).GetRefDev()), m_pFnt(const_cast<SwTextSizeInfo&>(rNew).GetFont()), m_pUnderFnt(rNew.GetUnderFnt()), - m_pFrm( rNew.m_pFrm ), + m_pFrame( rNew.m_pFrame ), m_pOpt(&rNew.GetOpt()), m_pText(pText), m_nIdx(nIndex), @@ -359,12 +359,12 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew, const OUString* pTex SetLen( GetMinLen( *this ) ); } -SwTextSizeInfo::SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt, +SwTextSizeInfo::SwTextSizeInfo( SwTextFrame *pTextFrame, SwFont *pTextFnt, const sal_Int32 nIndex, const sal_Int32 nLength ) : m_bOnWin(false) { - CtorInitTextSizeInfo( pTextFrm->getRootFrm()->GetCurrShell()->GetOut(), pTextFrm, pTextFnt, nIndex, nLength ); + CtorInitTextSizeInfo( pTextFrame->getRootFrame()->GetCurrShell()->GetOut(), pTextFrame, pTextFnt, nIndex, nLength ); } void SwTextSizeInfo::SelectFont() @@ -379,7 +379,7 @@ void SwTextSizeInfo::SelectFont() void SwTextSizeInfo::NoteAnimation() const { if( OnWin() ) - SwRootFrm::FlushVout(); + SwRootFrame::FlushVout(); OSL_ENSURE( m_pOut == m_pVsh->GetOut(), "SwTextSizeInfo::NoteAnimation() changed m_pOut" ); @@ -393,7 +393,7 @@ SwPosSize SwTextSizeInfo::GetTextSize( OutputDevice* pOutDev, const sal_uInt16 nComp) const { SwDrawTextInfo aDrawInf( m_pVsh, *pOutDev, pSI, rText, nIndex, nLength ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -414,7 +414,7 @@ SwPosSize SwTextSizeInfo::GetTextSize() const 0 ; SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rSI, *m_pText, m_nIdx, m_nLen ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -428,7 +428,7 @@ void SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI, const sal_Int32 nInde { SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, pSI, *m_pText, nIndex, nLength, 0, false, pCache); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -448,7 +448,7 @@ sal_Int32 SwTextSizeInfo::GetTextBreak( const long nLineWidth, OSL_ENSURE( m_pRef == m_pOut, "GetTextBreak is supposed to use the RefDev" ); SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo, *m_pText, GetIdx(), nMaxLen, 0, false, pCache ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -469,7 +469,7 @@ sal_Int32 SwTextSizeInfo::GetTextBreak( const long nLineWidth, OSL_ENSURE( m_pRef == m_pOut, "GetTextBreak is supposed to use the RefDev" ); SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo, *m_pText, GetIdx(), nMaxLen, 0, false, pCache ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -483,7 +483,7 @@ bool SwTextSizeInfo::_HasHint( const SwTextNode* pTextNode, sal_Int32 nPos ) return pTextNode->GetTextAttrForCharAt(nPos); } -void SwTextPaintInfo::CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrm *pFrame, const SwRect &rPaint ) +void SwTextPaintInfo::CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint ) { CtorInitTextSizeInfo( pRenderContext, pFrame ); aTextFly.CtorInitTextFly( pFrame ), @@ -527,9 +527,9 @@ SwTextPaintInfo::SwTextPaintInfo( const SwTextPaintInfo &rInf ) nSpaceIdx( rInf.GetSpaceIdx() ) { } -SwTextPaintInfo::SwTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint ) +SwTextPaintInfo::SwTextPaintInfo( SwTextFrame *pFrame, const SwRect &rPaint ) { - CtorInitTextPaintInfo( pFrame->getRootFrm()->GetCurrShell()->GetOut(), pFrame, rPaint ); + CtorInitTextPaintInfo( pFrame->getRootFrame()->GetCurrShell()->GetOut(), pFrame, rPaint ); } extern Color aGlobalRetoucheColor; @@ -550,7 +550,7 @@ static bool lcl_IsDarkBackground( const SwTextPaintInfo& rInf ) // See implementation in /core/layout/paintfrm.cxx // There is a background color, if there is a background brush and // its color is *not* "no fill"/"auto fill". - if( rInf.GetTextFrm()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) ) + if( rInf.GetTextFrame()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) ) { if ( !pCol ) pCol = &pItem->GetColor(); @@ -581,7 +581,7 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo if( GetFont()->IsBlink() && OnWin() && rPor.Width() ) { // check if accessibility options allow blinking portions: - const SwViewShell* pSh = GetTextFrm()->getRootFrm()->GetCurrShell(); + const SwViewShell* pSh = GetTextFrame()->getRootFrame()->GetCurrShell(); if ( pSh && ! pSh->GetAccessibilityOptions()->IsStopAnimatedText() && ! pSh->IsPreview() ) { @@ -590,16 +590,16 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo Point aPoint( aPos ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchLTRtoRTL( aPoint ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchLTRtoRTL( aPoint ); if ( TEXT_LAYOUT_BIDI_STRONG != GetOut()->GetLayoutMode() ) aPoint.X() -= rPor.Width(); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aPoint ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aPoint ); - pBlink->Insert( aPoint, &rPor, GetTextFrm(), m_pFnt->GetOrientation() ); + pBlink->Insert( aPoint, &rPor, GetTextFrame(), m_pFnt->GetOrientation() ); if( !pBlink->IsVisible() ) return; @@ -630,7 +630,7 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo const bool bTmpSmart = bSmartTag && OnWin() && !GetOpt().IsPagePreview() && SwSmartTagMgr::Get().IsSmartTagsEnabled(); OSL_ENSURE( GetParaPortion(), "No paragraph!"); - SwDrawTextInfo aDrawInf( m_pFrm->getRootFrm()->GetCurrShell(), *m_pOut, pSI, rText, nStart, nLength, + SwDrawTextInfo aDrawInf( m_pFrame->getRootFrame()->GetCurrShell(), *m_pOut, pSI, rText, nStart, nLength, rPor.Width(), bBullet ); aDrawInf.SetLeft( GetPaintRect().Left() ); @@ -656,7 +656,7 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo // the font is used to identify the current script via nActual aDrawInf.SetFont( m_pFnt ); // the frame is used to identify the orientation - aDrawInf.SetFrm( GetTextFrm() ); + aDrawInf.SetFrame( GetTextFrame() ); // we have to know if the paragraph should snap to grid aDrawInf.SetSnapToGrid( SnapToGrid() ); // for underlining we must know when not to add extra space behind @@ -670,13 +670,13 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo if( m_pFnt->GetLeftBorder() && !static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithPrev() ) { const sal_uInt16 nLeftBorderSpace = m_pFnt->GetLeftBorderSpace(); - if ( GetTextFrm()->IsRightToLeft() ) + if ( GetTextFrame()->IsRightToLeft() ) { aFontPos.X() -= nLeftBorderSpace; } else { - switch( m_pFnt->GetOrientation(GetTextFrm()->IsVertical()) ) + switch( m_pFnt->GetOrientation(GetTextFrame()->IsVertical()) ) { case 0 : aFontPos.X() += nLeftBorderSpace; @@ -764,27 +764,27 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, else { aPoint.A() = X(); - if ( GetTextFrm()->IsVertLR() ) + if ( GetTextFrame()->IsVertLR() ) aPoint.B() = Y() - rPor.Height() + rPor.GetAscent(); else aPoint.B() = Y() - rPor.GetAscent(); } // Adjust x coordinate if we are inside a bidi portion - const bool bFrmDir = GetTextFrm()->IsRightToLeft(); - const bool bCounterDir = ( !bFrmDir && DIR_RIGHT2LEFT == GetDirection() ) || - ( bFrmDir && DIR_LEFT2RIGHT == GetDirection() ); + const bool bFrameDir = GetTextFrame()->IsRightToLeft(); + const bool bCounterDir = ( !bFrameDir && DIR_RIGHT2LEFT == GetDirection() ) || + ( bFrameDir && DIR_LEFT2RIGHT == GetDirection() ); if ( bCounterDir ) aPoint.A() -= aSize.Width(); SwRect aRect( aPoint, aSize ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchLTRtoRTL( aRect ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchLTRtoRTL( aRect ); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aRect ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aRect ); if( bInsideBox && rPor.InTextGrp() ) { @@ -792,7 +792,7 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithPrev(); const bool bJoinWithNext = static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithNext(); - const bool bIsVert = GetTextFrm()->IsVertical(); + const bool bIsVert = GetTextFrame()->IsVertical(); aRect.Top(aRect.Top() + GetFont()->CalcShadowSpace(SvxShadowItemSide::TOP, bIsVert, bJoinWithPrev, bJoinWithNext )); aRect.Bottom(aRect.Bottom() - GetFont()->CalcShadowSpace(SvxShadowItemSide::BOTTOM, bIsVert, bJoinWithPrev, bJoinWithNext )); aRect.Left(aRect.Left() + GetFont()->CalcShadowSpace(SvxShadowItemSide::LEFT, bIsVert, bJoinWithPrev, bJoinWithNext )); @@ -834,10 +834,10 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& r bool bRotate = 0 != ( nOptions & DRAW_SPECIAL_OPTIONS_ROTATE ); // rRect is given in absolute coordinates - if ( rInf.GetTextFrm()->IsRightToLeft() ) - rInf.GetTextFrm()->SwitchRTLtoLTR( rRect ); - if ( rInf.GetTextFrm()->IsVertical() ) - rInf.GetTextFrm()->SwitchVerticalToHorizontal( rRect ); + if ( rInf.GetTextFrame()->IsRightToLeft() ) + rInf.GetTextFrame()->SwitchRTLtoLTR( rRect ); + if ( rInf.GetTextFrame()->IsVertical() ) + rInf.GetTextFrame()->SwitchVerticalToHorizontal( rRect ); const SwFont* pOldFnt = rInf.GetFont(); @@ -854,7 +854,7 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& r // Some of the current values are set at the font: if ( ! bRotate ) - m_pFnt->SetVertical( 0, rInf.GetTextFrm()->IsVertical() ); + m_pFnt->SetVertical( 0, rInf.GetTextFrame()->IsVertical() ); else m_pFnt->SetVertical( pOldFnt->GetOrientation() ); @@ -866,7 +866,7 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& r const_cast<SwTextPaintInfo&>(rInf).SetFont( m_pFnt ); // The maximum width depends on the current orientation - const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTextFrm()->IsVertical() ); + const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTextFrame()->IsVertical() ); SwTwips nMaxWidth; if (nDir == 900 || nDir == 2700) nMaxWidth = rRect.Height(); @@ -968,7 +968,7 @@ void SwTextPaintInfo::DrawTab( const SwLinePortion &rPor ) const if ( ! aRect.HasArea() ) return; - const sal_Unicode cChar = GetTextFrm()->IsRightToLeft() ? CHAR_TAB_RTL : CHAR_TAB; + const sal_Unicode cChar = GetTextFrame()->IsRightToLeft() ? CHAR_TAB_RTL : CHAR_TAB; const sal_uInt8 nOptions = DRAW_SPECIAL_OPTIONS_CENTER | DRAW_SPECIAL_OPTIONS_ROTATE; lcl_DrawSpecial( *this, rPor, aRect, Color(NON_PRINTING_CHARACTER_COLOR), cChar, nOptions ); @@ -987,7 +987,7 @@ void SwTextPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const if( aRect.HasArea() ) { - const sal_Unicode cChar = GetTextFrm()->IsRightToLeft() ? + const sal_Unicode cChar = GetTextFrame()->IsRightToLeft() ? CHAR_LINEBREAK_RTL : CHAR_LINEBREAK; const sal_uInt8 nOptions = 0; @@ -1020,8 +1020,8 @@ void SwTextPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const cChar = CHAR_RIGHT_ARROW; } - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aRect ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aRect ); Color aCol( COL_LIGHTRED ); @@ -1043,7 +1043,7 @@ void SwTextPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const const sal_uInt16 nFontHeight = m_pFnt->GetHeight( m_pVsh, *GetOut() ); const sal_uInt16 nFontAscent = m_pFnt->GetAscent( m_pVsh, *GetOut() ); - switch ( m_pFnt->GetOrientation( GetTextFrm()->IsVertical() ) ) + switch ( m_pFnt->GetOrientation( GetTextFrame()->IsVertical() ) ) { case 0 : aSize.Width() = nPostItsWidth; @@ -1068,11 +1068,11 @@ void SwTextPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const SwRect aTmpRect( aTmp, aSize ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchLTRtoRTL( aTmpRect ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchLTRtoRTL( aTmpRect ); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aTmpRect ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aTmpRect ); const Rectangle aRect( aTmpRect.SVRect() ); SwViewOption::PaintPostIts( const_cast<OutputDevice*>(GetOut()), aRect, bScript ); @@ -1145,7 +1145,7 @@ void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const CalcRect( rPor, &aIntersect, nullptr, true ); if(aIntersect.HasArea()) { - SwTextNode *pNd = m_pFrm->GetTextNode(); + SwTextNode *pNd = m_pFrame->GetTextNode(); const ::sw::mark::IMark* pFieldmark = nullptr; if(pNd) { @@ -1218,7 +1218,7 @@ void SwTextPaintInfo::DrawBorder( const SwLinePortion &rPor ) const if ( aDrawArea.HasArea() ) { PaintCharacterBorder( - *m_pFnt, aDrawArea, GetTextFrm()->IsVertical(), + *m_pFnt, aDrawArea, GetTextFrame()->IsVertical(), rPor.GetJoinBorderWithPrev(), rPor.GetJoinBorderWithNext()); } } @@ -1245,7 +1245,7 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor, && !GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() && ( POR_NUMBER != nWhich - || m_pFrm->GetTextNode()->HasMarkedLabel())) // #i27615# + || m_pFrame->GetTextNode()->HasMarkedLabel())) // #i27615# { bDraw = true; } @@ -1281,7 +1281,7 @@ void SwTextPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const if( aIntersect.HasArea() ) { - SwTextNode *pNd = const_cast<SwTextNode*>(GetTextFrm()->GetTextNode()); + SwTextNode *pNd = const_cast<SwTextNode*>(GetTextFrame()->GetTextNode()); SwTextAttr *const pAttr = pNd->GetTextAttrAt(GetIdx(), RES_TXTATR_INETFMT); if( pAttr ) @@ -1331,7 +1331,7 @@ const PropertyValues & SwTextFormatInfo::GetHyphValues() const bool SwTextFormatInfo::InitHyph( const bool bAutoHyphen ) { - const SwAttrSet& rAttrSet = GetTextFrm()->GetTextNode()->GetSwAttrSet(); + const SwAttrSet& rAttrSet = GetTextFrame()->GetTextNode()->GetSwAttrSet(); SetHanging( rAttrSet.GetHangingPunctuation().GetValue() ); SetScriptSpace( rAttrSet.GetScriptSpace().GetValue() ); SetForbiddenChars( rAttrSet.GetForbiddenRule().GetValue() ); @@ -1347,10 +1347,10 @@ bool SwTextFormatInfo::InitHyph( const bool bAutoHyphen ) return bAuto; } -void SwTextFormatInfo::CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrm *pNewFrm, const bool bNewInterHyph, +void SwTextFormatInfo::CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrame *pNewFrame, const bool bNewInterHyph, const bool bNewQuick, const bool bTst ) { - CtorInitTextPaintInfo( pRenderContext, pNewFrm, SwRect() ); + CtorInitTextPaintInfo( pRenderContext, pNewFrame, SwRect() ); m_bQuick = bNewQuick; m_bInterHyph = bNewInterHyph; @@ -1419,7 +1419,7 @@ bool SwTextFormatInfo::IsHyphenate() const const SwFormatDrop *SwTextFormatInfo::GetDropFormat() const { - const SwFormatDrop *pDrop = &GetTextFrm()->GetTextNode()->GetSwAttrSet().GetDrop(); + const SwFormatDrop *pDrop = &GetTextFrame()->GetTextNode()->GetSwAttrSet().GetDrop(); if( 1 >= pDrop->GetLines() || ( !pDrop->GetChars() && !pDrop->GetWholeWord() ) ) pDrop = nullptr; @@ -1434,10 +1434,10 @@ void SwTextFormatInfo::Init() m_bNoMidHyph = m_bStop = m_bNewLine = m_bUnderflow = m_bTabOverflow = false; // generally we do not allow number portions in follows, except... - if ( GetTextFrm()->IsFollow() ) + if ( GetTextFrame()->IsFollow() ) { - const SwTextFrm* pMaster = GetTextFrm()->FindMaster(); - OSL_ENSURE(pMaster, "pTextFrm without Master"); + const SwTextFrame* pMaster = GetTextFrame()->FindMaster(); + OSL_ENSURE(pMaster, "pTextFrame without Master"); const SwLinePortion* pTmpPara = pMaster ? pMaster->GetPara() : nullptr; // there is a master for this follow and the master does not have @@ -1463,7 +1463,7 @@ void SwTextFormatInfo::Init() SetPaintOfst(0); } -SwTextFormatInfo::SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrm *pFrame, const bool bInterHyphL, +SwTextFormatInfo::SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL, const bool bQuickL, const bool bTst) { CtorInitTextFormatInfo(pRenderContext, pFrame, bInterHyphL, bQuickL, bTst); @@ -1559,7 +1559,7 @@ sal_Int32 SwTextFormatInfo::ScanPortionEnd( const sal_Int32 nStart, const sal_Unicode cThousandSep2 = ',' == cTabDec ? '.' : '\''; bool bNumFound = false; - const bool bTabCompat = GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); + const bool bTabCompat = GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); for( ; i < nEnd; ++i ) { diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index de1a8cd94f97..e1f36662845b 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -47,7 +47,7 @@ class SwLineLayout; class SwLinePortion; class SwParaPortion; class SwTabPortion; -class SwTextFrm; +class SwTextFrame; class SwTextSizeInfo; class SwViewOption; class SwViewShell; @@ -128,9 +128,9 @@ protected: {} public: - void CtorInitTextInfo( SwTextFrm *pFrm ); + void CtorInitTextInfo( SwTextFrame *pFrame ); SwTextInfo( const SwTextInfo &rInf ); - explicit SwTextInfo( SwTextFrm *pFrm ) { CtorInitTextInfo( pFrm ); } + explicit SwTextInfo( SwTextFrame *pFrame ) { CtorInitTextInfo( pFrame ); } SwParaPortion *GetParaPortion() { return m_pPara; } const SwParaPortion *GetParaPortion() const { return m_pPara; } sal_Int32 GetTextStart() const { return m_nTextStart; } @@ -162,7 +162,7 @@ protected: SwFont *m_pFnt; SwUnderlineFont *m_pUnderFnt; // Font for underlining - SwTextFrm *m_pFrm; + SwTextFrame *m_pFrame; const SwViewOption *m_pOpt; const OUString *m_pText; sal_Int32 m_nIdx, m_nLen; @@ -187,7 +187,7 @@ protected: sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree protected: - void CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrm, SwFont *pFnt = nullptr, + void CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, SwFont *pFnt = nullptr, const sal_Int32 nIdx = 0, const sal_Int32 nLen = COMPLETE_STRING ); SwTextSizeInfo(); @@ -197,7 +197,7 @@ public: const sal_Int32 nIdx = 0, const sal_Int32 nLen = COMPLETE_STRING ); - SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt = nullptr, + SwTextSizeInfo( SwTextFrame *pTextFrame, SwFont *pTextFnt = nullptr, const sal_Int32 nIndex = 0, const sal_Int32 nLength = COMPLETE_STRING ); @@ -296,11 +296,11 @@ public: void NoteAnimation() const; // Home is where Your heart is... - inline SwTextFrm *GetTextFrm() { return m_pFrm; } - inline const SwTextFrm *GetTextFrm() const { return m_pFrm; } + inline SwTextFrame *GetTextFrame() { return m_pFrame; } + inline const SwTextFrame *GetTextFrame() const { return m_pFrame; } inline bool HasHint( sal_Int32 nPos ) const - { return _HasHint( m_pFrm->GetTextNode(), nPos ); } + { return _HasHint( m_pFrame->GetTextNode(), nPos ); } static bool _HasHint( const SwTextNode* pTextNode, sal_Int32 nPos ); // If Kana Compression is enabled, a minimum and maximum portion width @@ -360,7 +360,7 @@ class SwTextPaintInfo : public SwTextSizeInfo std::vector<long>* pSpaceAdd; const SvxBrushItem *pBrushItem; // For the background SwRect aItemRect; // Also for the background - SwTextFly aTextFly; // Calculate the FlyFrm + SwTextFly aTextFly; // Calculate the FlyFrame Point aPos; // Paint position SwRect aPaintRect; // Original paint rect (from Layout paint) @@ -392,12 +392,12 @@ public: SwTextPaintInfo( const SwTextPaintInfo &rInf ); SwTextPaintInfo( const SwTextPaintInfo &rInf, const OUString* pText ); - void CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrm *pFrame, const SwRect &rPaint ); + void CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint ); const SvxBrushItem *GetBrushItem() const { return pBrushItem; } const SwRect &GetBrushRect() const { return aItemRect; } - SwTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint ); + SwTextPaintInfo( SwTextFrame *pFrame, const SwRect &rPaint ); inline SwTwips X() const { return aPos.X(); } inline void X( const long nNew ) { aPos.X() = nNew; } @@ -545,9 +545,9 @@ class SwTextFormatInfo : public SwTextPaintInfo bool _CheckFootnotePortion( SwLineLayout* pCurr ); public: - void CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrm *pFrm, const bool bInterHyph = false, + void CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyph = false, const bool bQuick = false, const bool bTst = false ); - SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrm *pFrame, const bool bInterHyphL = false, + SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL = false, const bool bQuickL = false, const bool bTst = false); // For the formatting inside a double line in a line (multi-line portion) @@ -628,7 +628,7 @@ public: inline void SetParaFootnote(); - // FlyFrms + // FlyFrames inline SwFlyPortion *GetFly() { return m_pFly; } inline void SetFly( SwFlyPortion *pNew ) { m_pFly = pNew; } @@ -792,12 +792,12 @@ inline sal_Int32 SwTextFormatInfo::GetReformatStart() const inline const SwAttrSet& SwTextFormatInfo::GetCharAttr() const { - return GetTextFrm()->GetTextNode()->GetSwAttrSet(); + return GetTextFrame()->GetTextNode()->GetSwAttrSet(); } inline void SwTextFormatInfo::SetParaFootnote() { - GetTextFrm()->SetFootnote( true ); + GetTextFrame()->SetFootnote( true ); } #endif diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index c0670bd09e28..0f677ac9664e 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -258,8 +258,8 @@ void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent, // i60591: hennerdrews SwScriptInfo& rSI = GetInfo().GetParaPortion()->GetScriptInfo(); - SwTextSizeInfo aInf ( GetTextFrm() ); - SwTextIter aItr ( GetTextFrm(), &aInf ); + SwTextSizeInfo aInf ( GetTextFrame() ); + SwTextIter aItr ( GetTextFrame(), &aInf ); if ( rSI.CountKashida() ) { @@ -283,7 +283,7 @@ void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent, // #i49277# const bool bDoNotJustifyLinesWithManualBreak = - GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK); + GetTextFrame()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK); SwLinePortion *pPos = pCurrent->GetPortion(); @@ -539,7 +539,7 @@ SwMarginPortion *SwTextAdjuster::CalcRightMargin( SwLineLayout *pCurrent, else { nRealWidth = GetLineWidth(); - // For each FlyFrm extending into the right margin, we create a FlyPortion. + // For each FlyFrame extending into the right margin, we create a FlyPortion. const long nLeftMar = GetLeftMargin(); SwRect aCurrRect( nLeftMar + nPrtWidth, Y() + nRealHeight - nLineHeight, nRealWidth - nPrtWidth, nLineHeight ); @@ -582,7 +582,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent ) SwGluePortion *pGlue = pLeft; // the last GluePortion // 2) We attach a right margin: - // CalcRightMargin also calculates a possible overlap with FlyFrms. + // CalcRightMargin also calculates a possible overlap with FlyFrames. CalcRightMargin( pCurrent ); SwLinePortion *pPos = pLeft->GetPortion(); @@ -590,7 +590,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent ) // If we only have one line, the text portion is consecutive and we center, then ... bool bComplete = 0 == m_nStart; - const bool bTabCompat = GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); + const bool bTabCompat = GetTextFrame()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); bool bMultiTab = false; while( pPos ) @@ -683,24 +683,24 @@ void SwTextAdjuster::CalcAdjLine( SwLineLayout *pCurrent ) SwFlyPortion *SwTextAdjuster::CalcFlyPortion( const long nRealWidth, const SwRect &rCurrRect ) { - SwTextFly aTextFly( GetTextFrm() ); + SwTextFly aTextFly( GetTextFrame() ); const sal_uInt16 nCurrWidth = m_pCurr->PrtWidth(); SwFlyPortion *pFlyPortion = nullptr; SwRect aLineVert( rCurrRect ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchLTRtoRTL( aLineVert ); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aLineVert ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchLTRtoRTL( aLineVert ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aLineVert ); // aFlyRect is document-global! - SwRect aFlyRect( aTextFly.GetFrm( aLineVert ) ); + SwRect aFlyRect( aTextFly.GetFrame( aLineVert ) ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchRTLtoLTR( aFlyRect ); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchVerticalToHorizontal( aFlyRect ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchRTLtoLTR( aFlyRect ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchVerticalToHorizontal( aFlyRect ); // If a Frame overlapps we open a Portion if( aFlyRect.HasArea() ) diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 56adbd5a3e8f..03f80de1164c 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -489,7 +489,7 @@ static void lcl_MinMaxNode( SwFrameFormat* pNd, SwMinMaxNodeArgs* pIn ) } else { - const SwFormatFrmSize &rSz = pNd->GetFrmSize(); + const SwFormatFrameSize &rSz = pNd->GetFrameSize(); nMin = rSz.GetWidth(); } nMax = nMin; @@ -702,7 +702,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM } else { - const SwFormatFrmSize& rTmpSize = pFrameFormat->GetFrmSize(); + const SwFormatFrameSize& rTmpSize = pFrameFormat->GetFrameSize(); if( RES_FLYFRMFMT == pFrameFormat->Which() && rTmpSize.GetWidthPercent() ) { @@ -716,7 +716,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM rMax = USHRT_MAX; } else - nAktWidth = pFrameFormat->GetFrmSize().GetWidth(); + nAktWidth = pFrameFormat->GetFrameSize().GetWidth(); } nAktWidth += rLR.GetLeft(); nAktWidth += rLR.GetRight(); @@ -958,24 +958,24 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd nWidth = std::max( nWidth, nProWidth ); // search for a text frame this node belongs to - SwIterator<SwTextFrm,SwTextNode> aFrmIter( *this ); - SwTextFrm* pFrm = nullptr; - for( SwTextFrm* pTmpFrm = aFrmIter.First(); pTmpFrm; pTmpFrm = aFrmIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aFrameIter( *this ); + SwTextFrame* pFrame = nullptr; + for( SwTextFrame* pTmpFrame = aFrameIter.First(); pTmpFrame; pTmpFrame = aFrameIter.Next() ) { - if ( pTmpFrm->GetOfst() <= nStt && - ( !pTmpFrm->GetFollow() || - pTmpFrm->GetFollow()->GetOfst() > nStt ) ) + if ( pTmpFrame->GetOfst() <= nStt && + ( !pTmpFrame->GetFollow() || + pTmpFrame->GetFollow()->GetOfst() > nStt ) ) { - pFrm = pTmpFrm; + pFrame = pTmpFrame; break; } } // search for the line containing nStt - if ( pFrm && pFrm->HasPara() ) + if ( pFrame && pFrame->HasPara() ) { - SwTextInfo aInf( pFrm ); - SwTextIter aLine( pFrm, &aInf ); + SwTextInfo aInf( pFrame ); + SwTextIter aLine( pFrame, &aInf ); aLine.CharToLine( nStt ); pOut->SetMapMode( aOldMap ); return (sal_uInt16)( nWidth ? @@ -1014,18 +1014,18 @@ SwTwips SwTextNode::GetWidthOfLeadingTabs() const aPos.nContent += nIdx; // Find the non-follow text frame: - SwIterator<SwTextFrm,SwTextNode> aIter( *this ); - for( SwTextFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( *this ); + for( SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { // Only consider master frames: - if ( !pFrm->IsFollow() ) + if ( !pFrame->IsFollow() ) { - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) SwRect aRect; - pFrm->GetCharRect( aRect, aPos ); - nRet = pFrm->IsRightToLeft() ? - (pFrm->*fnRect->fnGetPrtRight)() - (aRect.*fnRect->fnGetRight)() : - (aRect.*fnRect->fnGetLeft)() - (pFrm->*fnRect->fnGetPrtLeft)(); + pFrame->GetCharRect( aRect, aPos ); + nRet = pFrame->IsRightToLeft() ? + (pFrame->*fnRect->fnGetPrtRight)() - (aRect.*fnRect->fnGetRight)() : + (aRect.*fnRect->fnGetLeft)() - (pFrame->*fnRect->fnGetPrtLeft)(); break; } } diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx index fa6136cf2747..4687039b3e54 100644 --- a/sw/source/core/text/itratr.hxx +++ b/sw/source/core/text/itratr.hxx @@ -32,7 +32,7 @@ class SwAttrSet; class SwTextNode; class SwRedlineItr; class SwViewShell; -class SwTextFrm; +class SwTextFrame; class SwAttrIter { @@ -64,7 +64,7 @@ private: protected: void Chg( SwTextAttr *pHt ); void Rst( SwTextAttr *pHt ); - void CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrm* pFrm = nullptr ); + void CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrame* pFrame = nullptr ); explicit SwAttrIter(SwTextNode* pTextNode) : pShell(nullptr) , pFnt(nullptr) diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 2b2a42562f20..79f2e1e79c9e 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -56,7 +56,7 @@ bool SwTextCursor::bRightMargin = false; // this function allows to find the coordinates of a position (defined // in pCMS->pSpecialPos) inside a special portion (e.g., a field) static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig, - const SwCrsrMoveState& rCMS, + const SwCursorMoveState& rCMS, const SwLinePortion& rPor ) { OSL_ENSURE( rCMS.m_pSpecialPos, "Information about special pos missing" ); @@ -158,19 +158,19 @@ namespace { } } // end of anonymous namespace -void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewInf ) +void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *pNewInf ) { - CtorInitTextIter( pNewFrm, pNewInf ); + CtorInitTextIter( pNewFrame, pNewInf ); m_pInf = pNewInf; GetInfo().SetFont( GetFnt() ); - const SwTextNode *pNode = m_pFrm->GetTextNode(); + const SwTextNode *pNode = m_pFrame->GetTextNode(); - const SvxLRSpaceItem &rSpace = m_pFrm->GetTextNode()->GetSwAttrSet().GetLRSpace(); + const SvxLRSpaceItem &rSpace = m_pFrame->GetTextNode()->GetSwAttrSet().GetLRSpace(); // #i95907# // #i111284# const bool bListLevelIndentsApplicableAndLabelAlignmentActive( - AreListLevelIndentsApplicableAndLabelAlignmentActive( *(m_pFrm->GetTextNode()) ) ); + AreListLevelIndentsApplicableAndLabelAlignmentActive( *(m_pFrame->GetTextNode()) ) ); // Carefully adjust the text formatting ranges. @@ -184,11 +184,11 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI // Note: These values have already been used during calculation // of the printing area of the paragraph. const int nLMWithNum = pNode->GetLeftMarginWithNum( true ); - if ( m_pFrm->IsRightToLeft() ) + if ( m_pFrame->IsRightToLeft() ) { // this calculation is identical this the calculation for L2R layout - see below - nLeft = m_pFrm->Frm().Left() + - m_pFrm->Prt().Left() + + nLeft = m_pFrame->Frame().Left() + + m_pFrame->Prt().Left() + nLMWithNum - pNode->GetLeftMarginWithNum() - // #i95907# @@ -206,8 +206,8 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI !pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) { // this calculation is identical this the calculation for R2L layout - see above - nLeft = m_pFrm->Frm().Left() + - m_pFrm->Prt().Left() + + nLeft = m_pFrame->Frame().Left() + + m_pFrame->Prt().Left() + nLMWithNum - pNode->GetLeftMarginWithNum() - // #i95907# @@ -218,27 +218,27 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI } else { - nLeft = m_pFrm->Frm().Left() + + nLeft = m_pFrame->Frame().Left() + std::max( long( rSpace.GetTextLeft() + nLMWithNum ), - m_pFrm->Prt().Left() ); + m_pFrame->Prt().Left() ); } } - nRight = m_pFrm->Frm().Left() + m_pFrm->Prt().Left() + m_pFrm->Prt().Width(); + nRight = m_pFrame->Frame().Left() + m_pFrame->Prt().Left() + m_pFrame->Prt().Width(); if( nLeft >= nRight && // #i53066# Omit adjustment of nLeft for numbered // paras inside cells inside new documents: ( pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) || - !m_pFrm->IsInTab() || + !m_pFrame->IsInTab() || !nLMWithNum ) ) { - nLeft = m_pFrm->Prt().Left() + m_pFrm->Frm().Left(); + nLeft = m_pFrame->Prt().Left() + m_pFrame->Frame().Left(); if( nLeft >= nRight ) // e.g. with large paragraph indentations in slim table columns nRight = nLeft + 1; // einen goennen wir uns immer } - if( m_pFrm->IsFollow() && m_pFrm->GetOfst() ) + if( m_pFrame->IsFollow() && m_pFrame->GetOfst() ) nFirst = nLeft; else { @@ -303,7 +303,7 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI // #i95907# // #i111284# - if ( m_pFrm->IsRightToLeft() || + if ( m_pFrame->IsRightToLeft() || bListLevelIndentsApplicableAndLabelAlignmentActive || !pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) { @@ -311,25 +311,25 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI } else { - nFirst = m_pFrm->Frm().Left() + + nFirst = m_pFrame->Frame().Left() + std::max( rSpace.GetTextLeft() + nLMWithNum+ nFirstLineOfs, - m_pFrm->Prt().Left() ); + m_pFrame->Prt().Left() ); } - // Note: <SwTextFrm::GetAdditionalFirstLineOffset()> returns a negative + // Note: <SwTextFrame::GetAdditionalFirstLineOffset()> returns a negative // value for the new list label position and space mode LABEL_ALIGNMENT // and label alignment CENTER and RIGHT in L2R layout respectively // label alignment LEFT and CENTER in R2L layout - nFirst += m_pFrm->GetAdditionalFirstLineOffset(); + nFirst += m_pFrame->GetAdditionalFirstLineOffset(); if( nFirst >= nRight ) nFirst = nRight - 1; } - const SvxAdjustItem& rAdjust = m_pFrm->GetTextNode()->GetSwAttrSet().GetAdjust(); + const SvxAdjustItem& rAdjust = m_pFrame->GetTextNode()->GetSwAttrSet().GetAdjust(); nAdjust = static_cast<sal_uInt16>(rAdjust.GetAdjust()); // left is left and right is right - if ( m_pFrm->IsRightToLeft() ) + if ( m_pFrame->IsRightToLeft() ) { if ( SVX_ADJUST_LEFT == nAdjust ) nAdjust = SVX_ADJUST_RIGHT; @@ -389,20 +389,20 @@ SwTwips SwTextMargin::GetLineStart() const return nRet; } -void SwTextCursor::CtorInitTextCursor( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewInf ) +void SwTextCursor::CtorInitTextCursor( SwTextFrame *pNewFrame, SwTextSizeInfo *pNewInf ) { - CtorInitTextMargin( pNewFrm, pNewInf ); + CtorInitTextMargin( pNewFrame, pNewInf ); // 6096: Attention, the iterators are derived! // GetInfo().SetOut( GetInfo().GetWin() ); } // 1170: Ancient bug: Shift-End forgets the last character ... bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst, - SwCrsrMoveState* pCMS, const long nMax ) + SwCursorMoveState* pCMS, const long nMax ) { // 1170: Ambiguity of document positions bRightMargin = true; - CharCrsrToLine(nOfst); + CharCursorToLine(nOfst); // Somehow twisted: nOfst names the position behind the last // character of the last line == This is the position in front of the first character @@ -472,7 +472,7 @@ bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst, // heights in one line ( first value = offset to y of pOrig, second // value = real height of (shortened) cursor void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, - SwCrsrMoveState* pCMS ) + SwCursorMoveState* pCMS ) { const OUString aText = GetInfo().GetText(); SwTextSizeInfo aInf( GetInfo(), &aText, m_nStart ); @@ -719,7 +719,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, SetPropFont( 50 ); SwTextGridItem const*const pGrid( - GetGridItem(GetTextFrm()->FindPageFrm())); + GetGridItem(GetTextFrame()->FindPageFrame())); const bool bHasGrid = pGrid && GetInfo().SnapToGrid(); const sal_uInt16 nRubyHeight = bHasGrid ? pGrid->GetRubyHeight() : 0; @@ -1170,9 +1170,9 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, } bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, - SwCrsrMoveState* pCMS, const long nMax ) + SwCursorMoveState* pCMS, const long nMax ) { - CharCrsrToLine(nOfst); + CharCursorToLine(nOfst); // Indicates that a position inside a special portion (field, number portion) // is requested. @@ -1218,7 +1218,7 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, pCMS->m_p2Lines->aPortion.Pos().Y() += aCharPos.Y(); } - const bool bTabOverMargin = GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); + const bool bTabOverMargin = GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); // Make sure the cursor respects the right margin, unless in compat mode, where the tab size has priority over the margin size. if( pOrig->Left() > nTmpRight && !bTabOverMargin) pOrig->Pos().X() = nTmpRight; @@ -1243,13 +1243,13 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, pCMS->m_aRealHeight.Y() = nMax - nTmp; } } - long nOut = pOrig->Right() - GetTextFrm()->Frm().Right(); + long nOut = pOrig->Right() - GetTextFrame()->Frame().Right(); if( nOut > 0 ) { - if( GetTextFrm()->Frm().Width() < GetTextFrm()->Prt().Left() - + GetTextFrm()->Prt().Width() ) - nOut += GetTextFrm()->Frm().Width() - GetTextFrm()->Prt().Left() - - GetTextFrm()->Prt().Width(); + if( GetTextFrame()->Frame().Width() < GetTextFrame()->Prt().Left() + + GetTextFrame()->Prt().Width() ) + nOut += GetTextFrame()->Frame().Width() - GetTextFrame()->Prt().Left() + - GetTextFrame()->Prt().Width(); if( nOut > 0 ) pOrig->Pos().X() -= nOut + 10; } @@ -1258,8 +1258,8 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, } // Return: Offset in String -sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, - bool bChgNode, SwCrsrMoveState* pCMS ) const +sal_Int32 SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoint, + bool bChgNode, SwCursorMoveState* pCMS ) const { // If necessary, as catch up, do the adjustment GetAdjusted(); @@ -1414,7 +1414,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, if( bFieldInfo && ( nWidth30 < nX || bRightOver || bLeftOver || ( pPor->InNumberGrp() && !pPor->IsFootnoteNumPortion() ) || ( pPor->IsMarginPortion() && nWidth > nX + 30 ) ) ) - static_cast<SwCrsrMoveState*>(pCMS)->m_bPosCorr = true; + static_cast<SwCursorMoveState*>(pCMS)->m_bPosCorr = true; // #i27615# if (pCMS) @@ -1435,16 +1435,16 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, if( pCMS ) { if( pPor->IsFlyPortion() && bFieldInfo ) - static_cast<SwCrsrMoveState*>(pCMS)->m_bPosCorr = true; + static_cast<SwCursorMoveState*>(pCMS)->m_bPosCorr = true; if (!bRightOver && nX) { if( pPor->IsFootnoteNumPortion()) - static_cast<SwCrsrMoveState*>(pCMS)->m_bFootnoteNoInfo = true; + static_cast<SwCursorMoveState*>(pCMS)->m_bFootnoteNoInfo = true; else if (pPor->InNumberGrp() ) // #i23726# { - static_cast<SwCrsrMoveState*>(pCMS)->m_nInNumPostionOffset = nX; - static_cast<SwCrsrMoveState*>(pCMS)->m_bInNumPortion = true; + static_cast<SwCursorMoveState*>(pCMS)->m_nInNumPostionOffset = nX; + static_cast<SwCursorMoveState*>(pCMS)->m_bInNumPortion = true; } } } @@ -1528,7 +1528,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, } // Skip space at the end of the line - if( bLastPortion && (m_pCurr->GetNext() || m_pFrm->GetFollow() ) + if( bLastPortion && (m_pCurr->GetNext() || m_pFrame->GetFollow() ) && rText[nCurrStart + nLength - 1] == ' ' ) --nLength; @@ -1537,7 +1537,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, { if( pPor->IsMultiPortion() ) { - // In a multi-portion we use GetCrsrOfst()-function recursively + // In a multi-portion we use GetCursorOfst()-function recursively SwTwips nTmpY = rPoint.Y() - m_pCurr->GetAscent() + pPor->GetAscent(); // if we are in the first line of a double line portion, we have // to add a value to nTmpY for not staying in this line @@ -1584,7 +1584,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, nX = 0; } - return GetCrsrOfst( pPos, Point( GetLineStart() + nX, rPoint.Y() ), + return GetCursorOfst( pPos, Point( GetLineStart() + nX, rPoint.Y() ), bChgNode, pCMS ); } if( pPor->InTextGrp() ) @@ -1661,7 +1661,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, aDrawInf.SetSpace( nSpaceAdd ); aDrawInf.SetFont( aSizeInf.GetFont() ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetSnapToGrid( aSizeInf.SnapToGrid() ); aDrawInf.SetPosMatchesBounds( pCMS && pCMS->m_bPosMatchesBounds ); @@ -1670,7 +1670,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, ! pPor->InFieldGrp() ) aDrawInf.SetKanaComp( nKanaComp ); - nLength = aSizeInf.GetFont()->_GetCrsrOfst( aDrawInf ); + nLength = aSizeInf.GetFont()->_GetCursorOfst( aDrawInf ); // get position inside field portion? if ( pPor->InFieldGrp() && pCMS && pCMS->m_pSpecialPos ) @@ -1681,7 +1681,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, // set cursor bidi level if ( pCMS ) - static_cast<SwCrsrMoveState*>(pCMS)->m_nCursorBidiLevel = + static_cast<SwCursorMoveState*>(pCMS)->m_nCursorBidiLevel = aDrawInf.GetCursorBidiLevel(); if( bFieldInfo && nLength == pPor->GetLen() && @@ -1700,42 +1700,42 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, // JP 24.11.94: if the Position is not in Fly, then // we many not return with COMPLETE_STRING as value! // (BugId: 9692 + Change in feshview) - SwFlyInCntFrm *pTmp = static_cast<SwFlyCntPortion*>(pPor)->GetFlyFrm(); - SwFrm* pLower = pTmp->GetLower(); + SwFlyInContentFrame *pTmp = static_cast<SwFlyCntPortion*>(pPor)->GetFlyFrame(); + SwFrame* pLower = pTmp->GetLower(); bool bChgNodeInner = pLower - && (pLower->IsTextFrm() || pLower->IsLayoutFrm()); + && (pLower->IsTextFrame() || pLower->IsLayoutFrame()); Point aTmpPoint( rPoint ); - if ( m_pFrm->IsRightToLeft() ) - m_pFrm->SwitchLTRtoRTL( aTmpPoint ); + if ( m_pFrame->IsRightToLeft() ) + m_pFrame->SwitchLTRtoRTL( aTmpPoint ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchHorizontalToVertical( aTmpPoint ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchHorizontalToVertical( aTmpPoint ); - if( bChgNodeInner && pTmp->Frm().IsInside( aTmpPoint ) && + if( bChgNodeInner && pTmp->Frame().IsInside( aTmpPoint ) && !( pTmp->IsProtected() ) ) { nLength = static_cast<SwFlyCntPortion*>(pPor)-> - GetFlyCrsrOfst( nX, aTmpPoint, pPos, pCMS ); + GetFlyCursorOfst( nX, aTmpPoint, pPos, pCMS ); // After a change of the frame, our font must be still // available for/in the OutputDevice. // For comparison: Paint and new SwFlyCntPortion ! static_cast<SwTextSizeInfo*>(m_pInf)->SelectFont(); - // 6776: The pIter->GetCrsrOfst is returning here + // 6776: The pIter->GetCursorOfst is returning here // from a nesting with COMPLETE_STRING. return COMPLETE_STRING; } } else - nLength = pPor->GetCrsrOfst( nX ); + nLength = pPor->GetCursorOfst( nX ); } } nOffset = nCurrStart + nLength; // 7684: We end up in front of the HyphPortion. We must assure // that we end up in the string. - // If we are at end of line in front of FlyFrms, we must proceed the same way. + // If we are at end of line in front of FlyFrames, we must proceed the same way. if( nOffset && pPor->GetLen() == nLength && pPor->GetPortion() && !pPor->GetPortion()->GetLen() && pPor->GetPortion()->InHyphGrp() ) --nOffset; @@ -1760,16 +1760,16 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, true if any overlapping text portion has been found and put into list false if no portion overlaps, the list has been unchanged */ -bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) const +bool SwTextFrame::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) const { bool bRet = false; - // PaintArea() instead Frm() for negative indents - SwRect aTmpFrm( PaintArea() ); - if( !rRect.IsOver( aTmpFrm ) ) + // PaintArea() instead Frame() for negative indents + SwRect aTmpFrame( PaintArea() ); + if( !rRect.IsOver( aTmpFrame ) ) return false; if( rSelList.checkContext( this ) ) { - SwRect aRect( aTmpFrm ); + SwRect aRect( aTmpFrame ); aRect.Intersection( rRect ); // rNode without const to create SwPaMs SwContentNode &rNode = const_cast<SwContentNode&>( *GetNode() ); @@ -1785,8 +1785,8 @@ bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) sal_Int32 nOld = -1; SwPosition aPosR( aPosL ); Point aPoint; - SwTextInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextIter aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextIter aLine( const_cast<SwTextFrame*>(this), &aInf ); // We have to care for top-to-bottom layout, where right becomes top etc. SWRECTFN( this ) SwTwips nTop = (aRect.*fnRect->fnGetTop)(); @@ -1828,8 +1828,8 @@ bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) } // Looking for the position of the left border of the rectangle // in this text line - SwCrsrMoveState aState( MV_UPDOWN ); - if( GetCrsrOfst( &aPosL, aPoint, &aState ) ) + SwCursorMoveState aState( MV_UPDOWN ); + if( GetCursorOfst( &aPosL, aPoint, &aState ) ) { if( bVert ) { @@ -1845,7 +1845,7 @@ bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) // is not the same like the left position of the line before // which cound happen e.g. for field portions or fly frames // a SwPaM will be inserted with these positions - if( GetCrsrOfst( &aPosR, aPoint, &aState ) && + if( GetCursorOfst( &aPosR, aPoint, &aState ) && nOld != aPosL.nContent.GetIndex() ) { SwPaM *pPam = new SwPaM( aPosL, aPosR ); @@ -1876,10 +1876,10 @@ bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) for ( size_t i = 0; i < rObjs.size(); ++i ) { const SwAnchoredObject* pAnchoredObj = rObjs[i]; - if( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr ) + if( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr ) continue; - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pAnchoredObj); - if( pFly->IsFlyInCntFrm() && pFly->FillSelection( rSelList, rRect ) ) + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); + if( pFly->IsFlyInContentFrame() && pFly->FillSelection( rSelList, rRect ) ) bRet = true; } } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 579344450ac3..f23245979ba0 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -87,9 +87,9 @@ inline void ClearFly( SwTextFormatInfo &rInf ) rInf.SetFly(nullptr); } -void SwTextFormatter::CtorInitTextFormatter( SwTextFrm *pNewFrm, SwTextFormatInfo *pNewInf ) +void SwTextFormatter::CtorInitTextFormatter( SwTextFrame *pNewFrame, SwTextFormatInfo *pNewInf ) { - CtorInitTextPainter( pNewFrm, pNewInf ); + CtorInitTextPainter( pNewFrame, pNewInf ); m_pInf = pNewInf; pDropFormat = GetInfo().GetDropFormat(); pMulti = nullptr; @@ -136,15 +136,15 @@ void SwTextFormatter::Insert( SwLineLayout *pLay ) m_pCurr = pLay; } -sal_uInt16 SwTextFormatter::GetFrmRstHeight() const +sal_uInt16 SwTextFormatter::GetFrameRstHeight() const { // We want the rest height relative to the page. - // If we're in a table, then pFrm->GetUpper() is not the page. + // If we're in a table, then pFrame->GetUpper() is not the page. - // GetFrmRstHeight() is being called with Footnote. - // Wrong: const SwFrm *pUpper = pFrm->GetUpper(); - const SwFrm *pPage = static_cast<const SwFrm*>(m_pFrm->FindPageFrm()); - const SwTwips nHeight = pPage->Frm().Top() + // GetFrameRstHeight() is being called with Footnote. + // Wrong: const SwFrame *pUpper = pFrame->GetUpper(); + const SwFrame *pPage = static_cast<const SwFrame*>(m_pFrame->FindPageFrame()); + const SwTwips nHeight = pPage->Frame().Top() + pPage->Prt().Top() + pPage->Prt().Height() - Y(); if( 0 > nHeight ) @@ -380,11 +380,11 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf ) SwLinePortion *pPor = NewPortion( rInf ); // Asian grid stuff - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); const bool bHasGrid = pGrid && rInf.SnapToGrid() && GRID_LINES_CHARS == pGrid->GetGridType(); - const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc(); + const SwDoc *pDoc = rInf.GetTextFrame()->GetNode()->GetDoc(); const sal_uInt16 nGridWidth = (bHasGrid) ? GetGridWidth(*pGrid, *pDoc) : 0; // used for grid mode only: @@ -491,19 +491,19 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf ) // if we have a new GridKernPortion, we initially calculate // its size so that its ends on the grid - const SwPageFrm* pPageFrm = m_pFrm->FindPageFrm(); - const SwLayoutFrm* pBody = pPageFrm->FindBodyCont(); - SWRECTFN( pPageFrm ) + const SwPageFrame* pPageFrame = m_pFrame->FindPageFrame(); + const SwLayoutFrame* pBody = pPageFrame->FindBodyCont(); + SWRECTFN( pPageFrame ) const long nGridOrigin = pBody ? (pBody->*fnRect->fnGetPrtLeft)() : - (pPageFrm->*fnRect->fnGetPrtLeft)(); + (pPageFrame->*fnRect->fnGetPrtLeft)(); SwTwips nStartX = rInf.X() + GetLeftMargin(); if ( bVert ) { Point aPoint( nStartX, 0 ); - m_pFrm->SwitchHorizontalToVertical( aPoint ); + m_pFrame->SwitchHorizontalToVertical( aPoint ); nStartX = aPoint.Y(); } @@ -878,7 +878,7 @@ SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const pPor = new SwFieldMarkPortion(); else if (rInf.GetText()[rInf.GetIdx()]==CH_TXT_ATR_FORMELEMENT) { - SwTextNode *pNd = rInf.GetTextFrm()->GetTextNode(); + SwTextNode *pNd = rInf.GetTextFrame()->GetTextNode(); const SwDoc *doc = pNd->GetDoc(); SwIndex aIndex(pNd, rInf.GetIdx()); SwPosition aPosition(*pNd, aIndex); @@ -1022,7 +1022,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) } // We can stand in the follow, it's crucial that - // pFrm->GetOfst() == 0! + // pFrame->GetOfst() == 0! if( rInf.GetIdx() ) { // We now too can elongate FootnotePortions and ErgoSumPortions @@ -1030,7 +1030,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) // 1. The ErgoSumTexts if( !rInf.IsErgoDone() ) { - if( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() ) + if( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() ) pPor = static_cast<SwLinePortion*>(NewErgoSumPortion( rInf )); rInf.SetErgoDone( true ); } @@ -1038,8 +1038,8 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) // 2. Arrow portions if( !pPor && !rInf.IsArrowDone() ) { - if( m_pFrm->GetOfst() && !m_pFrm->IsFollow() && - rInf.GetIdx() == m_pFrm->GetOfst() ) + if( m_pFrame->GetOfst() && !m_pFrame->IsFollow() && + rInf.GetIdx() == m_pFrame->GetOfst() ) pPor = new SwArrowPortion( *m_pCurr ); rInf.SetArrowDone( true ); } @@ -1048,7 +1048,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) if ( ! pPor && ! m_pCurr->GetPortion() ) { SwTextGridItem const*const pGrid( - GetGridItem(GetTextFrm()->FindPageFrm())); + GetGridItem(GetTextFrame()->FindPageFrame())); if ( pGrid ) pPor = new SwKernPortion( *m_pCurr ); } @@ -1073,7 +1073,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) OSL_ENSURE( ( ! rInf.IsMulti() && ! pMulti ) || pMulti->HasRotation(), "Rotated number portion trouble" ); - const bool bFootnoteNum = m_pFrm->IsFootnoteNumFrm(); + const bool bFootnoteNum = m_pFrame->IsFootnoteNumFrame(); rInf.GetParaPortion()->SetFootnoteNum( bFootnoteNum ); if( bFootnoteNum ) pPor = static_cast<SwLinePortion*>(NewFootnoteNumPortion( rInf )); @@ -1081,10 +1081,10 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) } // 6. The ErgoSumTexts of course also exist in the TextMaster, - // it's crucial whether the SwFootnoteFrm is aFollow + // it's crucial whether the SwFootnoteFrame is aFollow if( !rInf.IsErgoDone() && !pPor && ! rInf.IsMulti() ) { - if( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() ) + if( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() ) pPor = static_cast<SwLinePortion*>(NewErgoSumPortion( rInf )); rInf.SetErgoDone( true ); } @@ -1096,7 +1096,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) "Rotated number portion trouble" ); // If we're in the follow, then of course not - if( GetTextFrm()->GetTextNode()->GetNumRule() ) + if( GetTextFrame()->GetTextNode()->GetNumRule() ) pPor = static_cast<SwLinePortion*>(NewNumberPortion( rInf )); rInf.SetNumDone( true ); } @@ -1108,7 +1108,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) if ( !pPor && !m_pCurr->GetPortion() ) { SwTextGridItem const*const pGrid( - GetGridItem(GetTextFrm()->FindPageFrm())); + GetGridItem(GetTextFrame()->FindPageFrame())); if ( pGrid ) pPor = new SwKernPortion( *m_pCurr ); } @@ -1116,8 +1116,8 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) // 10. Decimal tab portion at the beginning of each line in table cells if ( !pPor && !m_pCurr->GetPortion() && - GetTextFrm()->IsInTab() && - GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ) + GetTextFrame()->IsInTab() && + GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ) { pPor = NewTabPortion( rInf, true ); } @@ -1194,7 +1194,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) } // Ein fieser Sonderfall: ein Rahmen ohne Umlauf kreuzt den // Footnote-Bereich. Wir muessen die Footnote-Portion als Zeilenrest - // bekanntgeben, damit SwTextFrm::Format nicht abbricht + // bekanntgeben, damit SwTextFrame::Format nicht abbricht // (die Textmasse wurde ja durchformatiert). if( rInf.GetRest() ) rInf.SetNewLine( true ); @@ -1257,7 +1257,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) if ( rInf.SnapToGrid() ) { SwTextGridItem const*const pGrid( - GetGridItem(GetTextFrm()->FindPageFrm())); + GetGridItem(GetTextFrame()->FindPageFrame())); if ( pGrid ) { bRubyTop = ! pGrid->GetRubyTextBelow(); @@ -1266,12 +1266,12 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) } pTmp = new SwRubyPortion( *pCreate, *rInf.GetFont(), - *GetTextFrm()->GetTextNode()->getIDocumentSettingAccess(), + *GetTextFrame()->GetTextNode()->getIDocumentSettingAccess(), nEnd, 0, pRubyPos ); } else if( SW_MC_ROTATE == pCreate->nId ) pTmp = new SwRotatedPortion( *pCreate, nEnd, - GetTextFrm()->IsRightToLeft() ); + GetTextFrame()->IsRightToLeft() ); else pTmp = new SwDoubleLinePortion( *pCreate, nEnd ); @@ -1346,7 +1346,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) // We have a decimal tab portion in the line and the next character has to be // aligned at the tab stop position. We store the width from the beginning of // the tab stop portion up to the portion containint the decimal separator: - if ( GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ && + if ( GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ && POR_TABDECIMAL == pLastTabPortion->GetWhichPor() ) { OSL_ENSURE( rInf.X() >= pLastTabPortion->Fix(), "Decimal tab stop position cannot be calculated" ); @@ -1403,7 +1403,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) if ( pTextFootnote ) { SwFormatFootnote& rFootnote = (SwFormatFootnote&)pTextFootnote->GetFootnote(); - const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc(); + const SwDoc *pDoc = rInf.GetTextFrame()->GetNode()->GetDoc(); const SwEndNoteInfo* pInfo; if( rFootnote.IsEndNote() ) pInfo = &pDoc->GetEndNoteInfo(); @@ -1432,7 +1432,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) if ( pNumFnt ) { - sal_uInt16 nDir = pNumFnt->GetOrientation( rInf.GetTextFrm()->IsVertical() ); + sal_uInt16 nDir = pNumFnt->GetOrientation( rInf.GetTextFrame()->IsVertical() ); if ( 0 != nDir ) { delete pPor; @@ -1477,7 +1477,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos) { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "SwTextFormatter::FormatLine( nStartPos ) with unswapped frame" ); // For the formatting routines, we set pOut to the reference device. @@ -1552,8 +1552,8 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos) if( GetInfo().IsStop() ) { m_pCurr->SetLen( 0 ); - m_pCurr->Height( GetFrmRstHeight() + 1 ); - m_pCurr->SetRealHeight( GetFrmRstHeight() + 1 ); + m_pCurr->Height( GetFrameRstHeight() + 1 ); + m_pCurr->SetRealHeight( GetFrameRstHeight() + 1 ); m_pCurr->Width(0); m_pCurr->Truncate(); return nStartPos; @@ -1616,7 +1616,7 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos) // In case of compat mode, it's possible that a tab portion is wider after // formatting than before. If this is the case, we also have to make sure // the SwLineLayout is wider as well. - if (GetInfo().GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN)) + if (GetInfo().GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN)) { sal_uInt16 nSum = 0; SwLinePortion* pPor = m_pCurr->GetFirstPortion(); @@ -1693,7 +1693,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) sal_uInt16 nLineHeight = m_pCurr->Height(); m_pCurr->SetClipping( false ); - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); if ( pGrid && GetInfo().SnapToGrid() ) { const sal_uInt16 nGridWidth = pGrid->GetBaseHeight(); @@ -1736,7 +1736,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) // Zeile am Absatzende geben (bei leeren Abs?tzen oder nach einem // Shift-Return), die das Register durchaus beachten soll. if( !m_pCurr->IsDummy() || ( !m_pCurr->GetNext() && - GetStart() >= GetTextFrm()->GetText().getLength() && !bNewLine ) ) + GetStart() >= GetTextFrame()->GetText().getLength() && !bNewLine ) ) { const SvxLineSpacingItem *pSpace = m_aLineInf.GetLineSpacing(); if( pSpace ) @@ -1747,7 +1747,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) // shrink first line of paragraph too on spacing < 100% if (IsParaLine() && pSpace->GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP - && GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE)) + && GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE)) { long nTmp = pSpace->GetPropLineSpace(); // Word will render < 50% too but it's just not readable @@ -1795,7 +1795,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) default: OSL_FAIL( ": unknown LineSpaceRule" ); } // Note: for the _first_ line the line spacing of the previous - // paragraph is applied in SwFlowFrm::CalcUpperSpace() + // paragraph is applied in SwFlowFrame::CalcUpperSpace() if( !IsParaLine() ) switch( pSpace->GetInterLineSpaceRule() ) { @@ -1832,9 +1832,9 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) if( IsRegisterOn() ) { SwTwips nTmpY = Y() + m_pCurr->GetAscent() + nLineHeight - m_pCurr->Height(); - SWRECTFN( m_pFrm ) + SWRECTFN( m_pFrame ) if ( bVert ) - nTmpY = m_pFrm->SwitchHorizontalToVertical( nTmpY ); + nTmpY = m_pFrame->SwitchHorizontalToVertical( nTmpY ); nTmpY = (*fnRect->fnYDiff)( nTmpY, RegStart() ); const sal_uInt16 nDiff = sal_uInt16( nTmpY % RegDiff() ); if( nDiff ) @@ -1865,9 +1865,9 @@ void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) const nTmpRight > USHRT_MAX || nTmpFirst > USHRT_MAX ) { - SWRECTFN( rInf.GetTextFrm() ) - nTmpLeft = (rInf.GetTextFrm()->Frm().*fnRect->fnGetLeft)(); - nTmpRight = (rInf.GetTextFrm()->Frm().*fnRect->fnGetRight)(); + SWRECTFN( rInf.GetTextFrame() ) + nTmpLeft = (rInf.GetTextFrame()->Frame().*fnRect->fnGetLeft)(); + nTmpRight = (rInf.GetTextFrame()->Frame().*fnRect->fnGetRight)(); nTmpFirst = nTmpLeft; } @@ -1917,8 +1917,8 @@ SwTwips SwTextFormatter::CalcBottomLine() const SwTwips nMin = GetInfo().GetTextFly().GetMinBottom(); if( nMin && ++nMin > nRet ) { - SwTwips nDist = m_pFrm->Frm().Height() - m_pFrm->Prt().Height() - - m_pFrm->Prt().Top(); + SwTwips nDist = m_pFrame->Frame().Height() - m_pFrame->Prt().Height() + - m_pFrame->Prt().Top(); if( nRet + nDist < nMin ) { const bool bRepaint = HasTruncLines() && @@ -1966,7 +1966,7 @@ bool SwTextFormatter::AllowRepaintOpt() const else { // ????: Blank in der letzten Masterzeile (blocksat.sdw) - bOptimizeRepaint = nullptr == m_pCurr->GetNext() && !m_pFrm->GetFollow(); + bOptimizeRepaint = nullptr == m_pCurr->GetNext() && !m_pFrame->GetFollow(); if ( bOptimizeRepaint ) { SwLinePortion *pPos = m_pCurr->GetFirstPortion(); @@ -1999,7 +1999,7 @@ bool SwTextFormatter::AllowRepaintOpt() const void SwTextFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom ) { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "SwTextFormatter::CalcUnclipped with unswapped frame" ); long nFlyAsc, nFlyDesc; @@ -2012,7 +2012,7 @@ void SwTextFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom ) void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart, sal_Int32 nStartIdx, bool bAlways ) const { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "SwTextFormatter::UpdatePos with unswapped frame" ); if( GetInfo().IsTest() ) @@ -2084,10 +2084,10 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart, else { Point aBase( aTmpInf.GetPos() ); - if ( GetInfo().GetTextFrm()->IsVertical() ) - GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aBase ); + if ( GetInfo().GetTextFrame()->IsVertical() ) + GetInfo().GetTextFrame()->SwitchHorizontalToVertical( aBase ); - static_cast<SwFlyCntPortion*>(pPos)->SetBase( *aTmpInf.GetTextFrm(), + static_cast<SwFlyCntPortion*>(pPos)->SetBase( *aTmpInf.GetTextFrame(), aBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nFlags ); } @@ -2133,7 +2133,7 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart, void SwTextFormatter::AlignFlyInCntBase( long nBaseLine ) const { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "SwTextFormatter::AlignFlyInCntBase with unswapped frame" ); if( GetInfo().IsTest() ) @@ -2162,15 +2162,15 @@ void SwTextFormatter::AlignFlyInCntBase( long nBaseLine ) const else { Point aBase; - if ( GetInfo().GetTextFrm()->IsVertical() ) + if ( GetInfo().GetTextFrame()->IsVertical() ) { - nBaseLine = GetInfo().GetTextFrm()->SwitchHorizontalToVertical( nBaseLine ); + nBaseLine = GetInfo().GetTextFrame()->SwitchHorizontalToVertical( nBaseLine ); aBase = Point( nBaseLine, static_cast<SwFlyCntPortion*>(pPos)->GetRefPoint().Y() ); } else aBase = Point( static_cast<SwFlyCntPortion*>(pPos)->GetRefPoint().X(), nBaseLine ); - static_cast<SwFlyCntPortion*>(pPos)->SetBase( *GetInfo().GetTextFrm(), aBase, nTmpAscent, nTmpDescent, + static_cast<SwFlyCntPortion*>(pPos)->SetBase( *GetInfo().GetTextFrame(), aBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nFlags ); } } @@ -2189,11 +2189,11 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const SwRect aLine( GetLeftMargin(), Y(), rInf.RealWidth(), nHeight ); SwRect aLineVert( aLine ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchHorizontalToVertical( aLineVert ); - SwRect aInter( rInf.GetTextFly().GetFrm( aLineVert ) ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchVerticalToHorizontal( aInter ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchHorizontalToVertical( aLineVert ); + SwRect aInter( rInf.GetTextFly().GetFrame( aLineVert ) ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchVerticalToHorizontal( aInter ); if( !aInter.HasArea() ) return false; @@ -2209,11 +2209,11 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const aLine.Width( pPos->Width() ); aLineVert = aLine; - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchHorizontalToVertical( aLineVert ); - aInter = rInf.GetTextFly().GetFrm( aLineVert ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchVerticalToHorizontal( aInter ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchHorizontalToVertical( aLineVert ); + aInter = rInf.GetTextFly().GetFrame( aLineVert ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchVerticalToHorizontal( aInter ); // New flys from below? if( !pPos->IsFlyPortion() ) @@ -2312,18 +2312,18 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) + nLeftMar - nLeftMin , nHeight ); SwRect aLineVert( aLine ); - if ( m_pFrm->IsRightToLeft() ) - m_pFrm->SwitchLTRtoRTL( aLineVert ); + if ( m_pFrame->IsRightToLeft() ) + m_pFrame->SwitchLTRtoRTL( aLineVert ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchHorizontalToVertical( aLineVert ); - SwRect aInter( rTextFly.GetFrm( aLineVert ) ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchHorizontalToVertical( aLineVert ); + SwRect aInter( rTextFly.GetFrame( aLineVert ) ); - if ( m_pFrm->IsRightToLeft() ) - m_pFrm->SwitchRTLtoLTR( aInter ); + if ( m_pFrame->IsRightToLeft() ) + m_pFrame->SwitchRTLtoLTR( aInter ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchVerticalToHorizontal( aInter ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchVerticalToHorizontal( aInter ); if( aInter.IsOver( aLine ) ) { @@ -2331,21 +2331,21 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) bool bForced = false; if( aInter.Left() <= nLeftMin ) { - SwTwips nFrmLeft = GetTextFrm()->Frm().Left(); - if( GetTextFrm()->Prt().Left() < 0 ) - nFrmLeft += GetTextFrm()->Prt().Left(); - if( aInter.Left() < nFrmLeft ) - aInter.Left( nFrmLeft ); + SwTwips nFrameLeft = GetTextFrame()->Frame().Left(); + if( GetTextFrame()->Prt().Left() < 0 ) + nFrameLeft += GetTextFrame()->Prt().Left(); + if( aInter.Left() < nFrameLeft ) + aInter.Left( nFrameLeft ); long nAddMar = 0; - if ( m_pFrm->IsRightToLeft() ) + if ( m_pFrame->IsRightToLeft() ) { - nAddMar = m_pFrm->Frm().Right() - Right(); + nAddMar = m_pFrame->Frame().Right() - Right(); if ( nAddMar < 0 ) nAddMar = 0; } else - nAddMar = nLeftMar - nFrmLeft; + nAddMar = nLeftMar - nFrameLeft; aInter.Width( aInter.Width() + nAddMar ); // For a negative first line indent, we set this flag to show @@ -2399,8 +2399,8 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) // That means we can comfortably grow up to this value; that's how // we save a few empty lines. long nNextTop = rTextFly.GetNextTop(); - if ( m_pFrm->IsVertical() ) - nNextTop = m_pFrm->SwitchVerticalToHorizontal( nNextTop ); + if ( m_pFrame->IsVertical() ) + nNextTop = m_pFrame->SwitchVerticalToHorizontal( nNextTop ); if( nNextTop > aInter.Bottom() ) { SwTwips nH = nNextTop - aInter.Top(); @@ -2435,26 +2435,26 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) if( pFly->Fix() < rInf.Width() ) rInf.Width( pFly->Fix() ); - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); if ( pGrid ) { - const SwPageFrm* pPageFrm = m_pFrm->FindPageFrm(); - const SwLayoutFrm* pBody = pPageFrm->FindBodyCont(); + const SwPageFrame* pPageFrame = m_pFrame->FindPageFrame(); + const SwLayoutFrame* pBody = pPageFrame->FindBodyCont(); - SWRECTFN( pPageFrm ) + SWRECTFN( pPageFrame ) const long nGridOrigin = pBody ? (pBody->*fnRect->fnGetPrtLeft)() : - (pPageFrm->*fnRect->fnGetPrtLeft)(); + (pPageFrame->*fnRect->fnGetPrtLeft)(); - const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc(); + const SwDoc *pDoc = rInf.GetTextFrame()->GetNode()->GetDoc(); const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc); SwTwips nStartX = GetLeftMargin(); if ( bVert ) { Point aPoint( nStartX, 0 ); - m_pFrm->SwitchHorizontalToVertical( aPoint ); + m_pFrame->SwitchHorizontalToVertical( aPoint ); nStartX = aPoint.Y(); } @@ -2476,12 +2476,12 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf, SwTextAttr *pHint ) const { SwFlyCntPortion *pRet = nullptr; - const SwFrm *pFrame = static_cast<SwFrm*>(m_pFrm); + const SwFrame *pFrame = static_cast<SwFrame*>(m_pFrame); - SwFlyInCntFrm *pFly; + SwFlyInContentFrame *pFly; SwFrameFormat* pFrameFormat = static_cast<SwTextFlyCnt*>(pHint)->GetFlyCnt().GetFrameFormat(); if( RES_FLYFRMFMT == pFrameFormat->Which() ) - pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrm(pFrame); + pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrame(pFrame); else pFly = nullptr; // aBase is the document-global position, from which the new extra portion is placed @@ -2500,15 +2500,15 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf, // he actually never was in. sal_uInt16 nAscent = 0; - const bool bTextFrmVertical = GetInfo().GetTextFrm()->IsVertical(); + const bool bTextFrameVertical = GetInfo().GetTextFrame()->IsVertical(); const bool bUseFlyAscent = pFly && pFly->GetValidPosFlag() && - 0 != ( bTextFrmVertical ? + 0 != ( bTextFrameVertical ? pFly->GetRefPoint().X() : pFly->GetRefPoint().Y() ); if ( bUseFlyAscent ) - nAscent = static_cast<sal_uInt16>( std::abs( int( bTextFrmVertical ? + nAscent = static_cast<sal_uInt16>( std::abs( int( bTextFrameVertical ? pFly->GetRelPos().X() : pFly->GetRelPos().Y() ) ) ); @@ -2532,15 +2532,15 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf, } Point aTmpBase( aBase ); - if ( GetInfo().GetTextFrm()->IsVertical() ) - GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aTmpBase ); + if ( GetInfo().GetTextFrame()->IsVertical() ) + GetInfo().GetTextFrame()->SwitchHorizontalToVertical( aTmpBase ); if( pFly ) { - pRet = new SwFlyCntPortion( *GetInfo().GetTextFrm(), pFly, aTmpBase, + pRet = new SwFlyCntPortion( *GetInfo().GetTextFrame(), pFly, aTmpBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nMode ); // We need to make sure that our font is set again in the OutputDevice - // It could be that the FlyInCnt was added anew and GetFlyFrm() would + // It could be that the FlyInCnt was added anew and GetFlyFrame() would // in turn cause, that it'd be created anew again. // This one's frames get formatted right away, which change the font and // we have a bug (3322). @@ -2552,17 +2552,17 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf, if( !rInf.IsTest() ) { aTmpBase = aBase; - if ( GetInfo().GetTextFrm()->IsVertical() ) - GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aTmpBase ); + if ( GetInfo().GetTextFrame()->IsVertical() ) + GetInfo().GetTextFrame()->SwitchHorizontalToVertical( aTmpBase ); - pRet->SetBase( *rInf.GetTextFrm(), aTmpBase, nTmpAscent, + pRet->SetBase( *rInf.GetTextFrame(), aTmpBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nMode ); } } } else { - pRet = new SwFlyCntPortion( *rInf.GetTextFrm(), static_cast<SwDrawContact*>(pFrameFormat->FindContactObj()), + pRet = new SwFlyCntPortion( *rInf.GetTextFrame(), static_cast<SwDrawContact*>(pFrameFormat->FindContactObj()), aTmpBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nMode ); } return pRet; diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx index 1f5b97f1cf20..cc28091f087f 100644 --- a/sw/source/core/text/itrform2.hxx +++ b/sw/source/core/text/itrform2.hxx @@ -78,7 +78,7 @@ class SwTextFormatter : public SwTextPainter Determines the next object, that reaches into the rest of the line and constructs the appropriate FlyPortion. - SwTextFly::GetFrm(const SwRect&, bool) will be needed for this. + SwTextFly::GetFrame(const SwRect&, bool) will be needed for this. The right edge can be shortened by flys */ @@ -151,12 +151,12 @@ public: // Amongst others for DropCaps bool CalcOnceMore(); - void CtorInitTextFormatter( SwTextFrm *pFrm, SwTextFormatInfo *pInf ); - SwTextFormatter(SwTextFrm *pTextFrm, SwTextFormatInfo *pTextFormatInf) - : SwTextPainter(pTextFrm->GetTextNode()) + void CtorInitTextFormatter( SwTextFrame *pFrame, SwTextFormatInfo *pInf ); + SwTextFormatter(SwTextFrame *pTextFrame, SwTextFormatInfo *pTextFormatInf) + : SwTextPainter(pTextFrame->GetTextNode()) , bUnclipped(false) { - CtorInitTextFormatter( pTextFrm, pTextFormatInf ); + CtorInitTextFormatter( pTextFrame, pTextFormatInf ); } virtual ~SwTextFormatter(); @@ -188,7 +188,7 @@ public: void Insert( SwLineLayout *pLine ); // The remaining height to the page border - sal_uInt16 GetFrmRstHeight() const; + sal_uInt16 GetFrameRstHeight() const; // How wide would you be without any bounds (Flys etc.)? SwTwips _CalcFitToContent( ); diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index e147e7b9f425..81d18736ae17 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -69,9 +69,9 @@ bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt ) SVX_CASEMAP_KAPITAELCHEN == rFnt.GetCaseMap(); } -void SwTextPainter::CtorInitTextPainter( SwTextFrm *pNewFrm, SwTextPaintInfo *pNewInf ) +void SwTextPainter::CtorInitTextPainter( SwTextFrame *pNewFrame, SwTextPaintInfo *pNewInf ) { - CtorInitTextCursor( pNewFrm, pNewInf ); + CtorInitTextCursor( pNewFrame, pNewInf ); m_pInf = pNewInf; SwFont *pMyFnt = GetFnt(); GetInfo().SetFont( pMyFnt ); @@ -195,7 +195,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, GetInfo().GetPos().Y() + nTmpHeight > rPaint.Top() + rPaint.Height() ) { bClip = false; - rClip.ChgClip( rPaint, m_pFrm, m_pCurr->HasUnderscore() ); + rClip.ChgClip( rPaint, m_pFrame, m_pCurr->HasUnderscore() ); } #if OSL_DEBUG_LEVEL > 1 static bool bClipAlways = false; @@ -224,7 +224,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( m_pCurr->IsClipping() ) { - rClip.ChgClip( aLineRect, m_pFrm ); + rClip.ChgClip( aLineRect, m_pFrame ); bClip = false; } @@ -234,9 +234,9 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, // Baseline-Ausgabe auch bei nicht-TextPortions (vgl. TabPor mit Fill) // if no special vertical alignment is used, // we calculate Y value for the whole line - SwTextGridItem const*const pGrid(GetGridItem(GetTextFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(GetTextFrame()->FindPageFrame())); const bool bAdjustBaseLine = - ( !GetTextFrm()->IsVertical() || GetLineInfo().HasSpecialAlign( true ) ) && (! GetTextFrm()->IsInFly()) && + ( !GetTextFrame()->IsVertical() || GetLineInfo().HasSpecialAlign( true ) ) && (! GetTextFrame()->IsInFly()) && ( nullptr != pGrid ); const SwTwips nLineBaseLine = GetInfo().GetPos().Y() + nTmpAscent; if ( ! bAdjustBaseLine ) @@ -329,7 +329,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, GetInfo().X() + pPor->Width() + ( pPor->Height() / 2 ) > nMaxRight ) { bClip = false; - rClip.ChgClip( rPaint, m_pFrm, m_pCurr->HasUnderscore() ); + rClip.ChgClip( rPaint, m_pFrame, m_pCurr->HasUnderscore() ); } // Portions, which lay "below" the text like post-its @@ -414,7 +414,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( !GetNextLine() && GetInfo().GetVsh() && !GetInfo().GetVsh()->IsPreview() && - GetInfo().GetOpt().IsParagraph() && !GetTextFrm()->GetFollow() && + GetInfo().GetOpt().IsParagraph() && !GetTextFrame()->GetFollow() && GetInfo().GetIdx() >= GetInfo().GetText().getLength() ) { const SwTmpEndPortion aEnd( *pEndTempl ); @@ -430,10 +430,10 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( GetInfo().GetVsh() && !GetInfo().GetVsh()->IsPreview() ) { const bool bNextUndersized = - ( GetTextFrm()->GetNext() && - 0 == GetTextFrm()->GetNext()->Prt().Height() && - GetTextFrm()->GetNext()->IsTextFrm() && - static_cast<SwTextFrm*>(GetTextFrm()->GetNext())->IsUndersized() ) ; + ( GetTextFrame()->GetNext() && + 0 == GetTextFrame()->GetNext()->Prt().Height() && + GetTextFrame()->GetNext()->IsTextFrame() && + static_cast<SwTextFrame*>(GetTextFrame()->GetNext())->IsUndersized() ) ; if( bUnderSz || bNextUndersized ) { @@ -444,7 +444,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, GetInfo().DrawRedArrow( *pArrow ); // GetInfo().Y() must be current baseline - SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTextFrm()->Frm().Bottom(); + SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTextFrame()->Frame().Bottom(); if( ( nDiff > 0 && ( GetEnd() < GetInfo().GetText().getLength() || ( nDiff > nTmpHeight/2 && GetPrevLine() ) ) ) || @@ -461,7 +461,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, } if( m_pCurr->IsClipping() ) - rClip.ChgClip( rPaint, m_pFrm ); + rClip.ChgClip( rPaint, m_pFrame ); } void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor, @@ -544,7 +544,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor, { // here starts the algorithm for calculating the underline font SwScriptInfo& rScriptInfo = GetInfo().GetParaPortion()->GetScriptInfo(); - SwAttrIter aIter( *GetInfo().GetTextFrm()->GetTextNode(), + SwAttrIter aIter( *GetInfo().GetTextFrame()->GetTextNode(), rScriptInfo ); sal_Int32 nTmpIdx = nIndx; diff --git a/sw/source/core/text/itrpaint.hxx b/sw/source/core/text/itrpaint.hxx index a200524efb28..efa267396bef 100644 --- a/sw/source/core/text/itrpaint.hxx +++ b/sw/source/core/text/itrpaint.hxx @@ -31,7 +31,7 @@ class SwTextPainter : public SwTextCursor void CheckSpecialUnderline( const SwLinePortion* pPor, long nAdjustBaseLine = 0 ); protected: - void CtorInitTextPainter( SwTextFrm *pFrm, SwTextPaintInfo *pInf ); + void CtorInitTextPainter( SwTextFrame *pFrame, SwTextPaintInfo *pInf ); explicit SwTextPainter(SwTextNode* pTextNode) : SwTextCursor(pTextNode) , bPaintDrop(false) @@ -39,10 +39,10 @@ protected: } public: - SwTextPainter(SwTextFrm *pTextFrm, SwTextPaintInfo *pTextPaintInf) - : SwTextCursor(pTextFrm->GetTextNode()) + SwTextPainter(SwTextFrame *pTextFrame, SwTextPaintInfo *pTextPaintInf) + : SwTextCursor(pTextFrame->GetTextNode()) { - CtorInitTextPainter( pTextFrm, pTextPaintInf ); + CtorInitTextPainter( pTextFrame, pTextPaintInf ); } void DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, const bool bUnderSz ); diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx index db5430e8b045..479114c25381 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -33,23 +33,23 @@ #include "txtfrm.hxx" #include "porfly.hxx" -void SwTextIter::CtorInitTextIter( SwTextFrm *pNewFrm, SwTextInfo *pNewInf ) +void SwTextIter::CtorInitTextIter( SwTextFrame *pNewFrame, SwTextInfo *pNewInf ) { - SwTextNode *pNode = pNewFrm->GetTextNode(); + SwTextNode *pNode = pNewFrame->GetTextNode(); - OSL_ENSURE( pNewFrm->GetPara(), "No paragraph" ); + OSL_ENSURE( pNewFrame->GetPara(), "No paragraph" ); - CtorInitAttrIter( *pNode, pNewFrm->GetPara()->GetScriptInfo(), pNewFrm ); + CtorInitAttrIter( *pNode, pNewFrame->GetPara()->GetScriptInfo(), pNewFrame ); - m_pFrm = pNewFrm; + m_pFrame = pNewFrame; m_pInf = pNewInf; m_aLineInf.CtorInitLineInfo( pNode->GetSwAttrSet(), *pNode ); - m_nFrameStart = m_pFrm->Frm().Pos().Y() + m_pFrm->Prt().Pos().Y(); + m_nFrameStart = m_pFrame->Frame().Pos().Y() + m_pFrame->Prt().Pos().Y(); SwTextIter::Init(); // Order is important: only execute FillRegister if GetValue!=0 m_bRegisterOn = pNode->GetSwAttrSet().GetRegister().GetValue() - && m_pFrm->FillRegister( m_nRegStart, m_nRegDiff ); + && m_pFrame->FillRegister( m_nRegStart, m_nRegDiff ); } void SwTextIter::Init() @@ -199,7 +199,7 @@ void SwTextIter::CharToLine(const sal_Int32 nChar) } // 1170: beruecksichtigt Mehrdeutigkeiten: -const SwLineLayout *SwTextCursor::CharCrsrToLine( const sal_Int32 nPosition ) +const SwLineLayout *SwTextCursor::CharCursorToLine( const sal_Int32 nPosition ) { CharToLine( nPosition ); if( nPosition != m_nStart ) @@ -224,7 +224,7 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine, sal_uInt16 nOfst = rLine.GetRealHeight() - rLine.Height(); - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); if ( pGrid && GetInfo().SnapToGrid() ) { @@ -272,9 +272,9 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine, nOfst += rLine.Height() - nPorHeight + nPorAscent; break; case SvxParaVertAlignItem::AUTOMATIC : - if ( bAutoToCentered || GetInfo().GetTextFrm()->IsVertical() ) + if ( bAutoToCentered || GetInfo().GetTextFrame()->IsVertical() ) { - if( GetInfo().GetTextFrm()->IsVertLR() ) + if( GetInfo().GetTextFrame()->IsVertLR() ) nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent; else nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; @@ -328,7 +328,7 @@ void SwTextIter::TruncLines( bool bNoteFollow ) lcl_NeedsFieldRest( m_pCurr ) ); // bug 88534: wrong positioning of flys - SwTextFrm* pFollow = GetTextFrm()->GetFollow(); + SwTextFrame* pFollow = GetTextFrame()->GetFollow(); if ( pFollow && ! pFollow->IsLocked() && nEnd == pFollow->GetOfst() ) { @@ -342,7 +342,7 @@ void SwTextIter::TruncLines( bool bNoteFollow ) pLine = pLine->GetNext(); } - SwpHints* pTmpHints = GetTextFrm()->GetTextNode()->GetpSwpHints(); + SwpHints* pTmpHints = GetTextFrame()->GetTextNode()->GetpSwpHints(); // examine hints in range nEnd - (nEnd + nRangeChar) for( size_t i = 0; i < pTmpHints->Count(); ++i ) @@ -363,10 +363,10 @@ void SwTextIter::TruncLines( bool bNoteFollow ) } if( m_pCurr->IsDummy() && !m_pCurr->GetLen() && - m_nStart < GetTextFrm()->GetText().getLength() ) + m_nStart < GetTextFrame()->GetText().getLength() ) m_pCurr->SetRealHeight( 1 ); if( GetHints() ) - m_pFrm->RemoveFootnote( nEnd ); + m_pFrame->RemoveFootnote( nEnd ); } void SwTextIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx index c4ec33ba65cf..42e901894da7 100644 --- a/sw/source/core/text/itrtxt.hxx +++ b/sw/source/core/text/itrtxt.hxx @@ -22,9 +22,9 @@ #include "itratr.hxx" #include "inftxt.hxx" -class SwTextFrm; +class SwTextFrame; struct SwPosition; -struct SwCrsrMoveState; +struct SwCursorMoveState; class SwMarginPortion; class SwFlyPortion; @@ -32,7 +32,7 @@ class SwTextIter : public SwAttrIter { protected: SwLineInfo m_aLineInf; - SwTextFrm *m_pFrm; + SwTextFrame *m_pFrame; SwTextInfo *m_pInf; SwLineLayout *m_pCurr; SwLineLayout *m_pPrev; @@ -52,10 +52,10 @@ protected: // Reset in the first line void Init(); - void CtorInitTextIter( SwTextFrm *pFrm, SwTextInfo *pInf ); + void CtorInitTextIter( SwTextFrame *pFrame, SwTextInfo *pInf ); explicit SwTextIter(SwTextNode* pTextNode) : SwAttrIter(pTextNode) - , m_pFrm(nullptr) + , m_pFrame(nullptr) , m_pInf(nullptr) , m_pCurr(nullptr) , m_pPrev(nullptr) @@ -73,13 +73,13 @@ protected: { } public: - SwTextIter(SwTextFrm *pTextFrm, SwTextInfo *pTextInf) - : SwAttrIter(pTextFrm->GetTextNode()) + SwTextIter(SwTextFrame *pTextFrame, SwTextInfo *pTextInf) + : SwAttrIter(pTextFrame->GetTextNode()) , m_bOneBlock(false) , m_bLastBlock(false) , m_bLastCenter(false) { - CtorInitTextIter(pTextFrm, pTextInf); + CtorInitTextIter(pTextFrame, pTextInf); } inline const SwLineLayout *GetCurr() const { return m_pCurr; } // NEVER 0! inline const SwLineLayout *GetNext() const { return m_pCurr->GetNext(); } @@ -102,7 +102,7 @@ public: const SwLineLayout *Next(); const SwLineLayout *Prev(); - // Skips the FlyFrms dummy line + // Skips the FlyFrames dummy line const SwLineLayout *NextLine(); const SwLineLayout *PrevLine(); const SwLineLayout *GetNextLine() const; @@ -132,8 +132,8 @@ public: inline bool SeekAndChgBefore( SwTextSizeInfo &rInf ); inline bool SeekStartAndChg( SwTextSizeInfo &rInf, const bool bPara=false ); - inline SwTextFrm *GetTextFrm() { return m_pFrm; } - inline const SwTextFrm *GetTextFrm() const { return m_pFrm; } + inline SwTextFrame *GetTextFrame() { return m_pFrame; } + inline const SwTextFrame *GetTextFrame() const { return m_pFrame; } // Counts consecutive hyphens in order to be within the boundary given by MaxHyphens void CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const; @@ -157,7 +157,7 @@ protected: // For FormatQuoVadis inline void Right( const SwTwips nNew ) { nRight = nNew; } - void CtorInitTextMargin( SwTextFrm *pFrm, SwTextSizeInfo *pInf ); + void CtorInitTextMargin( SwTextFrame *pFrame, SwTextSizeInfo *pInf ); explicit SwTextMargin(SwTextNode* pTextNode) : SwTextIter(pTextNode) , nLeft(0) @@ -172,10 +172,10 @@ protected: { } public: - SwTextMargin(SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf) - : SwTextIter(pTextFrm->GetTextNode()) + SwTextMargin(SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf) + : SwTextIter(pTextFrame->GetTextNode()) { - CtorInitTextMargin( pTextFrm, pTextSizeInf ); + CtorInitTextMargin( pTextFrame, pTextSizeInf ); } inline SwTwips GetLeftMargin() const; inline SwTwips Left() const; @@ -223,7 +223,7 @@ public: class SwTextAdjuster : public SwTextMargin { - // Adjusts the portion, if we have adjustment and FlyFrms + // Adjusts the portion, if we have adjustment and FlyFrames void CalcFlyAdjust( SwLineLayout *pCurr ); // Calls SplitGlues and CalcBlockAdjust @@ -243,8 +243,8 @@ protected: SwTwips nReal = 0, bool bSkipKashida = false ); SwTwips CalcKanaAdj( SwLineLayout *pCurr ); public: - inline SwTextAdjuster( SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf ) : SwTextMargin(pTextFrm!=nullptr?pTextFrm->GetTextNode():nullptr) - { CtorInitTextMargin( pTextFrm, pTextSizeInf ); } + inline SwTextAdjuster( SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf ) : SwTextMargin(pTextFrame!=nullptr?pTextFrame->GetTextNode():nullptr) + { CtorInitTextMargin( pTextFrame, pTextSizeInf ); } // Is overloaded by SwTextFormatter due to UpdatePos void CalcAdjLine( SwLineLayout *pCurr ); @@ -269,24 +269,24 @@ class SwTextCursor : public SwTextAdjuster // Ambiguities static bool bRightMargin; - void _GetCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* ); + void _GetCharRect(SwRect *, const sal_Int32, SwCursorMoveState* ); protected: - void CtorInitTextCursor( SwTextFrm *pFrm, SwTextSizeInfo *pInf ); + void CtorInitTextCursor( SwTextFrame *pFrame, SwTextSizeInfo *pInf ); explicit SwTextCursor(SwTextNode* pTextNode) : SwTextAdjuster(pTextNode) { } public: - SwTextCursor( SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf ) - : SwTextAdjuster(pTextFrm->GetTextNode()) + SwTextCursor( SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf ) + : SwTextAdjuster(pTextFrame->GetTextNode()) { - CtorInitTextCursor(pTextFrm, pTextSizeInf); + CtorInitTextCursor(pTextFrame, pTextSizeInf); } - bool GetCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = nullptr, + bool GetCharRect(SwRect *, const sal_Int32, SwCursorMoveState* = nullptr, const long nMax = 0 ); - bool GetEndCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = nullptr, + bool GetEndCharRect(SwRect *, const sal_Int32, SwCursorMoveState* = nullptr, const long nMax = 0 ); - sal_Int32 GetCrsrOfst( SwPosition *pPos, const Point &rPoint, - bool bChgNode, SwCrsrMoveState* = nullptr ) const; + sal_Int32 GetCursorOfst( SwPosition *pPos, const Point &rPoint, + bool bChgNode, SwCursorMoveState* = nullptr ) const; // Respects ambiguities: For the implementation see below - const SwLineLayout *CharCrsrToLine( const sal_Int32 nPos ); + const SwLineLayout *CharCursorToLine( const sal_Int32 nPos ); // calculates baseline for portion rPor // bAutoToCentered indicates, if AUTOMATIC mode means CENTERED or BASELINE diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx index a4ac1422830a..1c747d113102 100644 --- a/sw/source/core/text/pordrop.hxx +++ b/sw/source/core/text/pordrop.hxx @@ -85,7 +85,7 @@ public: void PaintDrop( const SwTextPaintInfo &rInf ) const; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; inline sal_uInt16 GetLines() const { return nLines; } inline sal_uInt16 GetDistance() const { return nDistance; } diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx index 44afffdda300..90a290f9fc63 100644 --- a/sw/source/core/text/porexp.cxx +++ b/sw/source/core/text/porexp.cxx @@ -22,8 +22,8 @@ #include <inftxt.hxx> #include <porexp.hxx> -sal_Int32 SwExpandPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const -{ return SwLinePortion::GetCrsrOfst( nOfst ); } +sal_Int32 SwExpandPortion::GetCursorOfst( const sal_uInt16 nOfst ) const +{ return SwLinePortion::GetCursorOfst( nOfst ); } bool SwExpandPortion::GetExpText( const SwTextSizeInfo&, OUString &rText ) const { diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx index 166c77c58422..60b10175ed7c 100644 --- a/sw/source/core/text/porexp.hxx +++ b/sw/source/core/text/porexp.hxx @@ -27,7 +27,7 @@ class SwExpandPortion : public SwTextPortion public: inline SwExpandPortion() { SetWhichPor( POR_EXP ); } virtual bool Format( SwTextFormatInfo &rInf ) override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; virtual void Paint( const SwTextPaintInfo &rInf ) const override; diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 3f40a3384879..d28a18be387c 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -511,7 +511,7 @@ SwNumberPortion::SwNumberPortion( const OUString &rExpand, SetCenter( bCntr ); } -sal_Int32 SwNumberPortion::GetCrsrOfst( const sal_uInt16 ) const +sal_Int32 SwNumberPortion::GetCursorOfst( const sal_uInt16 ) const { return 0; } @@ -549,12 +549,12 @@ bool SwNumberPortion::Format( SwTextFormatInfo &rInf ) if ( !mbLabelAlignmentPosAndSpaceModeActive ) { - if ( !rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) && + if ( !rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) && // #i32902# !IsFootnoteNumPortion() ) { nDiff = rInf.Left() - + rInf.GetTextFrm()->GetTextNode()-> + + rInf.GetTextFrame()->GetTextNode()-> GetSwAttrSet().GetLRSpace().GetTextFirstLineOfst() - rInf.First() + rInf.ForcedLeftMargin(); @@ -577,7 +577,7 @@ bool SwNumberPortion::Format( SwTextFormatInfo &rInf ) nDiff = nFixWidth + nMinDist; // Numbering evades the Fly, no nDiff in the second round - // Tricky special case: FlyFrm is in an Area we're just about to + // Tricky special case: FlyFrame is in an Area we're just about to // acquire // The NumberPortion is marked as hidden const bool bFly = rInf.GetFly() || @@ -687,8 +687,8 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const sal_uInt16 nSpaceOffs = nFixWidth; pThis->Width( nFixWidth ); - if( ( IsLeft() && ! rInf.GetTextFrm()->IsRightToLeft() ) || - ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrm()->IsRightToLeft() ) ) + if( ( IsLeft() && ! rInf.GetTextFrame()->IsRightToLeft() ) || + ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrame()->IsRightToLeft() ) ) SwExpandPortion::Paint( rInf ); else { @@ -753,7 +753,7 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet, #define GRFNUM_SECURE 10 SwGrfNumPortion::SwGrfNumPortion( - SwFrm*, + SwFrame*, const OUString& rGraphicFollowedBy, const SvxBrushItem* pGrfBrush, const SwFormatVertOrient* pGrfOrient, const Size& rGrfSize, @@ -858,7 +858,7 @@ bool SwGrfNumPortion::Format( SwTextFormatInfo &rInf ) nDiff = nFixWidth + nMinDist; // Numbering evades Fly, no nDiff in the second round - // Tricky special case: FlyFrm is in the Area we were just + // Tricky special case: FlyFrame is in the Area we were just // about to get a hold of. // The NumberPortion is marked as hidden if( nDiff > rInf.Width() ) @@ -895,8 +895,8 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const Size aSize( nTmpWidth, GetGrfHeight() - 2 * GRFNUM_SECURE ); const bool bTmpLeft = mbLabelAlignmentPosAndSpaceModeActive || - ( IsLeft() && ! rInf.GetTextFrm()->IsRightToLeft() ) || - ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrm()->IsRightToLeft() ); + ( IsLeft() && ! rInf.GetTextFrame()->IsRightToLeft() ) || + ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrame()->IsRightToLeft() ); if( nFixWidth < Width() && !bTmpLeft ) { @@ -932,8 +932,8 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const bDraw = !rInf.GetOpt().IsGraphic(); if( !nId ) { - SetId( sal_IntPtr( rInf.GetTextFrm() ) ); - rInf.GetTextFrm()->SetAnimation(); + SetId( sal_IntPtr( rInf.GetTextFrame() ) ); + rInf.GetTextFrame()->SetAnimation(); } if( aTmp.IsOver( rInf.GetPaintRect() ) && !bDraw ) { @@ -947,7 +947,7 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic()); if (pGraph) pGraph->StopAnimation(nullptr,nId); - rInf.GetTextFrm()->getRootFrm()->GetCurrShell()->InvalidateWindows( aTmp ); + rInf.GetTextFrame()->getRootFrame()->GetCurrShell()->InvalidateWindows( aTmp ); } else if ( pViewShell && @@ -978,17 +978,17 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const } SwRect aRepaint( rInf.GetPaintRect() ); - const SwTextFrm& rFrm = *rInf.GetTextFrm(); - if( rFrm.IsVertical() ) + const SwTextFrame& rFrame = *rInf.GetTextFrame(); + if( rFrame.IsVertical() ) { - rFrm.SwitchHorizontalToVertical( aTmp ); - rFrm.SwitchHorizontalToVertical( aRepaint ); + rFrame.SwitchHorizontalToVertical( aTmp ); + rFrame.SwitchHorizontalToVertical( aRepaint ); } - if( rFrm.IsRightToLeft() ) + if( rFrame.IsRightToLeft() ) { - rFrm.SwitchLTRtoRTL( aTmp ); - rFrm.SwitchLTRtoRTL( aRepaint ); + rFrame.SwitchLTRtoRTL( aTmp ); + rFrame.SwitchLTRtoRTL( aRepaint ); } if( bDraw && aTmp.HasArea() ) @@ -1034,9 +1034,9 @@ void SwGrfNumPortion::SetBase( long nLnAscent, long nLnDescent, } } -void SwTextFrm::StopAnimation( OutputDevice* pOut ) +void SwTextFrame::StopAnimation( OutputDevice* pOut ) { - OSL_ENSURE( HasAnimation(), "SwTextFrm::StopAnimation: Which Animation?" ); + OSL_ENSURE( HasAnimation(), "SwTextFrame::StopAnimation: Which Animation?" ); if( HasPara() ) { SwLineLayout *pLine = GetPara(); @@ -1178,7 +1178,7 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf ) } const sal_Int32 nTop = ( nCount + 1 ) / 2; // the first character of the second line - SwViewShell *pSh = rInf.GetTextFrm()->getRootFrm()->GetCurrShell(); + SwViewShell *pSh = rInf.GetTextFrame()->getRootFrame()->GetCurrShell(); SwFont aTmpFont( *rInf.GetFont() ); SwFontSave aFontSave( rInf, &aTmpFont ); nProportion = 55; diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index 69088b37b4b4..3efd8983da00 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -26,7 +26,7 @@ class SwFont; class SvxBrushItem; class SwFormatVertOrient; -class SwFrm; +class SwFrame; class SwFieldPortion : public SwExpandPortion { @@ -138,7 +138,7 @@ public: const sal_uInt16 nMinDst, const bool bLabelAlignmentPosAndSpaceModeActive ); virtual void Paint( const SwTextPaintInfo &rInf ) const override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; // Field cloner for SplitGlue @@ -169,7 +169,7 @@ class SwGrfNumPortion : public SwNumberPortion SwTwips nGrfHeight; sal_Int16 eOrient; public: - SwGrfNumPortion( SwFrm *pFrm, + SwGrfNumPortion( SwFrame *pFrame, const OUString& rGraphicFollowedBy, const SvxBrushItem* pGrfBrush, const SwFormatVertOrient* pGrfOrient, diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index 9fa002ba6b6b..f824098991bd 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -147,7 +147,7 @@ bool SwFlyCntPortion::Format( SwTextFormatInfo &rInf ) * @param nStart * @param nEnd */ -void SwTextFrm::MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd ) +void SwTextFrame::MoveFlyInCnt( SwTextFrame *pNew, sal_Int32 nStart, sal_Int32 nEnd ) { SwSortedObjs *pObjs = nullptr; if ( nullptr != (pObjs = GetDrawObjs()) ) @@ -163,10 +163,10 @@ void SwTextFrm::MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd const sal_Int32 nIdx = pPos->nContent.GetIndex(); if ( nIdx >= nStart && nEnd > nIdx ) { - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - RemoveFly( static_cast<SwFlyFrm*>(pAnchoredObj) ); - pNew->AppendFly( static_cast<SwFlyFrm*>(pAnchoredObj) ); + RemoveFly( static_cast<SwFlyFrame*>(pAnchoredObj) ); + pNew->AppendFly( static_cast<SwFlyFrame*>(pAnchoredObj) ); } else if ( dynamic_cast< const SwAnchoredDrawObject *>( pAnchoredObj ) != nullptr ) { @@ -180,7 +180,7 @@ void SwTextFrm::MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd } } -sal_Int32 SwTextFrm::CalcFlyPos( SwFrameFormat* pSearch ) +sal_Int32 SwTextFrame::CalcFlyPos( SwFrameFormat* pSearch ) { SwpHints* pHints = GetTextNode()->GetpSwpHints(); OSL_ENSURE( pHints, "CalcFlyPos: Why me?" ); @@ -207,7 +207,7 @@ void SwFlyCntPortion::Paint( const SwTextPaintInfo &rInf ) const { if( bDraw ) { - if( !static_cast<SwDrawContact*>(pContact)->GetAnchorFrm() ) + if( !static_cast<SwDrawContact*>(pContact)->GetAnchorFrame() ) { // No direct positioning of the drawing object is needed SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(pContact); @@ -220,25 +220,25 @@ void SwFlyCntPortion::Paint( const SwTextPaintInfo &rInf ) const // Re-paint everything at a CompletePaint call SwRect aRepaintRect( rInf.GetPaintRect() ); - if ( rInf.GetTextFrm()->IsRightToLeft() ) - rInf.GetTextFrm()->SwitchLTRtoRTL( aRepaintRect ); + if ( rInf.GetTextFrame()->IsRightToLeft() ) + rInf.GetTextFrame()->SwitchLTRtoRTL( aRepaintRect ); - if ( rInf.GetTextFrm()->IsVertical() ) - rInf.GetTextFrm()->SwitchHorizontalToVertical( aRepaintRect ); + if ( rInf.GetTextFrame()->IsVertical() ) + rInf.GetTextFrame()->SwitchHorizontalToVertical( aRepaintRect ); - if( (GetFlyFrm()->IsCompletePaint() || - GetFlyFrm()->Frm().IsOver( aRepaintRect )) && - SwFlyFrm::IsPaint( const_cast<SwVirtFlyDrawObj*>(GetFlyFrm()->GetVirtDrawObj()), - GetFlyFrm()->getRootFrm()->GetCurrShell() )) + if( (GetFlyFrame()->IsCompletePaint() || + GetFlyFrame()->Frame().IsOver( aRepaintRect )) && + SwFlyFrame::IsPaint( const_cast<SwVirtFlyDrawObj*>(GetFlyFrame()->GetVirtDrawObj()), + GetFlyFrame()->getRootFrame()->GetCurrShell() )) { - SwRect aRect( GetFlyFrm()->Frm() ); - if( !GetFlyFrm()->IsCompletePaint() ) + SwRect aRect( GetFlyFrame()->Frame() ); + if( !GetFlyFrame()->IsCompletePaint() ) aRect._Intersection( aRepaintRect ); - // GetFlyFrm() may change the layout mode at the output device. + // GetFlyFrame() may change the layout mode at the output device. { SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() ); - GetFlyFrm()->Paint( const_cast<vcl::RenderContext&>(*rInf.GetOut()), aRect ); + GetFlyFrame()->Paint( const_cast<vcl::RenderContext&>(*rInf.GetOut()), aRect ); } ((SwTextPaintInfo&)rInf).GetRefDev()->SetLayoutMode( rInf.GetOut()->GetLayoutMode() ); @@ -258,8 +258,8 @@ void SwFlyCntPortion::Paint( const SwTextPaintInfo &rInf ) const /** * Use the dimensions of pFly->OutRect() */ -SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, - SwFlyInCntFrm *pFly, const Point &rBase, +SwFlyCntPortion::SwFlyCntPortion( const SwTextFrame& rFrame, + SwFlyInContentFrame *pFly, const Point &rBase, long nLnAscent, long nLnDescent, long nFlyAsc, long nFlyDesc, objectpositioning::AsCharFlags nFlags ) : @@ -268,14 +268,14 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, bMax( false ), nAlign( 0 ) { - OSL_ENSURE( pFly, "SwFlyCntPortion::SwFlyCntPortion: no SwFlyInCntFrm!" ); + OSL_ENSURE( pFly, "SwFlyCntPortion::SwFlyCntPortion: no SwFlyInContentFrame!" ); nLineLength = 1; nFlags |= AS_CHAR_ULSPACE | AS_CHAR_INIT; - SetBase( rFrm, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags ); + SetBase( rFrame, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags ); SetWhichPor( POR_FLYCNT ); } -SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, +SwFlyCntPortion::SwFlyCntPortion( const SwTextFrame& rFrame, SwDrawContact *pDrawContact, const Point &rBase, long nLnAscent, long nLnDescent, long nFlyAsc, long nFlyDesc, @@ -286,7 +286,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, nAlign( 0 ) { OSL_ENSURE( pDrawContact, "SwFlyCntPortion::SwFlyCntPortion: no SwDrawContact!" ); - if( !pDrawContact->GetAnchorFrm() ) + if( !pDrawContact->GetAnchorFrame() ) { // No direct positioning needed any more pDrawContact->ConnectToLayout(); @@ -297,7 +297,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, nLineLength = 1; nFlags |= AS_CHAR_ULSPACE | AS_CHAR_INIT; - SetBase( rFrm, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags ); + SetBase( rFrame, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags ); SetWhichPor( POR_FLYCNT ); } @@ -308,7 +308,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, * * @param rBase CAUTION: needs to be an absolute value! */ -void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, +void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase, long nLnAscent, long nLnDescent, long nFlyAsc, long nFlyDesc, objectpositioning::AsCharFlags nFlags ) @@ -319,10 +319,10 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, if( bDraw ) { // Determine drawing object ('master' or 'virtual') by frame - pSdrObj = GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm ); + pSdrObj = GetDrawContact()->GetDrawObjectByAnchorFrame( rFrame ); if ( !pSdrObj ) { - OSL_FAIL( "SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm )>" ); + OSL_FAIL( "SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrame( rFrame )>" ); pSdrObj = GetDrawContact()->GetMaster(); } @@ -336,7 +336,7 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, } else { - pSdrObj = GetFlyFrm()->GetVirtDrawObj(); + pSdrObj = GetFlyFrame()->GetVirtDrawObj(); } if (!pSdrObj) @@ -368,12 +368,12 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, SwFormatHoriOrient aHori(pTextBox->GetHoriOrient()); aHori.SetHoriOrient(css::text::HoriOrientation::NONE); - sal_Int32 nLeft = aTextRectangle.getX() - rFrm.Frm().Left(); + sal_Int32 nLeft = aTextRectangle.getX() - rFrame.Frame().Left(); aHori.SetPos(nLeft); SwFormatVertOrient aVert(pTextBox->GetVertOrient()); aVert.SetVertOrient(css::text::VertOrientation::NONE); - sal_Int32 nTop = aTextRectangle.getY() - rFrm.Frm().Top() - nFlyAsc; + sal_Int32 nTop = aTextRectangle.getY() - rFrame.Frame().Top() - nFlyAsc; aVert.SetPos(nTop); pTextBox->LockModify(); @@ -414,24 +414,24 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, } } -sal_Int32 SwFlyCntPortion::GetFlyCrsrOfst( const sal_uInt16 nOfst, - const Point &rPoint, SwPosition *pPos, SwCrsrMoveState* pCMS ) const +sal_Int32 SwFlyCntPortion::GetFlyCursorOfst( const sal_uInt16 nOfst, + const Point &rPoint, SwPosition *pPos, SwCursorMoveState* pCMS ) const { - // As the FlyCnt are not attached to the side, their GetCrsrOfst() will + // As the FlyCnt are not attached to the side, their GetCursorOfst() will // not be called. // In order to reduce management overhead for the layout page, the paragraph - // calls the FlyFrm's GetCrsrOfst() only when needed + // calls the FlyFrame's GetCursorOfst() only when needed Point aPoint( rPoint ); - if( !pPos || bDraw || !( GetFlyFrm()->GetCrsrOfst( pPos, aPoint, pCMS ) ) ) - return SwLinePortion::GetCrsrOfst( nOfst ); + if( !pPos || bDraw || !( GetFlyFrame()->GetCursorOfst( pPos, aPoint, pCMS ) ) ) + return SwLinePortion::GetCursorOfst( nOfst ); else return 0; } -sal_Int32 SwFlyCntPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const +sal_Int32 SwFlyCntPortion::GetCursorOfst( const sal_uInt16 nOfst ) const { - // OSL_FAIL("SwFlyCntPortion::GetCrsrOfst: use GetFlyCrsrOfst()"); - return SwLinePortion::GetCrsrOfst( nOfst ); + // OSL_FAIL("SwFlyCntPortion::GetCursorOfst: use GetFlyCursorOfst()"); + return SwLinePortion::GetCursorOfst( nOfst ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx index 941388a86fc6..f78765f267ba 100644 --- a/sw/source/core/text/porfly.hxx +++ b/sw/source/core/text/porfly.hxx @@ -24,9 +24,9 @@ #include "porglue.hxx" class SwDrawContact; -class SwFlyInCntFrm; -class SwTextFrm; -struct SwCrsrMoveState; +class SwFlyInContentFrame; +class SwTextFrame; +struct SwCursorMoveState; class SwFlyPortion : public SwFixPortion { @@ -44,28 +44,28 @@ public: /// This portion represents an as-character anchored fly (shape, frame, etc.) class SwFlyCntPortion : public SwLinePortion { - void *pContact; // bDraw ? DrawContact : FlyInCntFrm + void *pContact; // bDraw ? DrawContact : FlyInContentFrame Point aRef; // Relatively to this point we calculate the AbsPos bool bDraw : 1; // DrawContact? bool bMax : 1; // Line adjustment and height == line height sal_uInt8 nAlign : 3; // Line adjustment? No, above, middle, bottom - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; public: // Use new datatype for parameter <nFlags> - SwFlyCntPortion( const SwTextFrm& rFrm, SwFlyInCntFrm *pFly, + SwFlyCntPortion( const SwTextFrame& rFrame, SwFlyInContentFrame *pFly, const Point &rBase, long nAscent, long nDescent, long nFlyAsc, long nFlyDesc, objectpositioning::AsCharFlags nFlags ); // Use new datatype for parameter <nFlags> - SwFlyCntPortion( const SwTextFrm& rFrm, SwDrawContact *pDrawContact, + SwFlyCntPortion( const SwTextFrame& rFrame, SwDrawContact *pDrawContact, const Point &rBase, long nAscent, long nDescent, long nFlyAsc, long nFlyDesc, objectpositioning::AsCharFlags nFlags ); inline const Point& GetRefPoint() const { return aRef; } - inline SwFlyInCntFrm *GetFlyFrm() { return static_cast<SwFlyInCntFrm*>(pContact); } - inline const SwFlyInCntFrm *GetFlyFrm() const - { return static_cast<SwFlyInCntFrm*>(pContact); } + inline SwFlyInContentFrame *GetFlyFrame() { return static_cast<SwFlyInContentFrame*>(pContact); } + inline const SwFlyInContentFrame *GetFlyFrame() const + { return static_cast<SwFlyInContentFrame*>(pContact); } inline SwDrawContact *GetDrawContact() { return static_cast<SwDrawContact*>(pContact); } inline const SwDrawContact* GetDrawContact() const { return static_cast<SwDrawContact*>(pContact); } @@ -75,12 +75,12 @@ public: inline void SetAlign( sal_uInt8 nNew ) { nAlign = nNew; } inline void SetMax( bool bNew ) { bMax = bNew; } // Use new datatype for parameter <nFlags> - void SetBase( const SwTextFrm& rFrm, const Point &rBase, + void SetBase( const SwTextFrame& rFrame, const Point &rBase, long nLnAscent, long nLnDescent, long nFlyAscent, long nFlyDescent, objectpositioning::AsCharFlags nFlags ); - sal_Int32 GetFlyCrsrOfst( const sal_uInt16 nOfst, const Point &rPoint, - SwPosition *pPos, SwCrsrMoveState* pCMS ) const; + sal_Int32 GetFlyCursorOfst( const sal_uInt16 nOfst, const Point &rPoint, + SwPosition *pPos, SwCursorMoveState* pCMS ) const; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual void Paint( const SwTextPaintInfo &rInf ) const override; OUTPUT_OPERATOR_OVERRIDE diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx index 6051c26dbcb1..1d8b333ad136 100644 --- a/sw/source/core/text/porftn.hxx +++ b/sw/source/core/text/porftn.hxx @@ -21,7 +21,7 @@ #include "porfld.hxx" -class SwTextFrm; +class SwTextFrame; class SwTextFootnote; class SwFootnotePortion : public SwFieldPortion @@ -84,7 +84,7 @@ class SwErgoSumPortion : public SwFieldPortion { public: SwErgoSumPortion( const OUString &rExp, const OUString& rStr ); - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; // Field cloner for SplitGlue diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx index e5e130166997..47004e5bbd43 100644 --- a/sw/source/core/text/porglue.cxx +++ b/sw/source/core/text/porglue.cxx @@ -34,10 +34,10 @@ SwGluePortion::SwGluePortion( const sal_uInt16 nInitFixWidth ) SetWhichPor( POR_GLUE ); } -sal_Int32 SwGluePortion::GetCrsrOfst( const sal_uInt16 nOfst ) const +sal_Int32 SwGluePortion::GetCursorOfst( const sal_uInt16 nOfst ) const { if( !GetLen() || nOfst > GetLen() || !Width() ) - return SwLinePortion::GetCrsrOfst( nOfst ); + return SwLinePortion::GetCursorOfst( nOfst ); else return nOfst / (Width() / GetLen()); } diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx index c43f0418d196..98ff30b6b48a 100644 --- a/sw/source/core/text/porglue.hxx +++ b/sw/source/core/text/porglue.hxx @@ -41,7 +41,7 @@ public: inline void MoveHalfGlue( SwGluePortion *pTarget ); inline void AdjFixWidth(); virtual void Paint( const SwTextPaintInfo &rInf ) const override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 7d483f5d5c72..e29d93f485a7 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -270,7 +270,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) // #i3952# const bool bIgnoreBlanksAndTabsForLineHeightCalculation = - rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION); + rInf.GetTextFrame()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION); bool bHasBlankPortion = false; bool bHasOnlyBlankPortions = true; @@ -299,7 +299,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) SAL_WARN_IF( POR_LIN == pPos->GetWhichPor(), "sw.core", "SwLineLayout::CalcLine: don't use SwLinePortions !" ); - // Null portions are eliminated. They can form if two FlyFrms + // Null portions are eliminated. They can form if two FlyFrames // overlap. if( !pPos->Compress() ) { @@ -1937,10 +1937,10 @@ sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rText, long* pKernArray, SwScriptInfo* SwScriptInfo::GetScriptInfo( const SwTextNode& rTNd, bool bAllowInvalid ) { - SwIterator<SwTextFrm,SwTextNode> aIter( rTNd ); + SwIterator<SwTextFrame,SwTextNode> aIter( rTNd ); SwScriptInfo* pScriptInfo = nullptr; - for( SwTextFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + for( SwTextFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { pScriptInfo = const_cast<SwScriptInfo*>(pLast->GetScriptInfo()); if ( pScriptInfo ) @@ -2031,7 +2031,7 @@ SwTwips SwLineLayout::_GetHangingMargin() const return nDiff; } -SwTwips SwTextFrm::HangingMargin() const +SwTwips SwTextFrame::HangingMargin() const { SAL_WARN_IF( !HasPara(), "sw.core", "Don't call me without a paraportion" ); if( !GetPara()->IsMargin() ) diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index 3e6079b2d097..29018d0e45a8 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -237,7 +237,7 @@ class SwParaPortion : public SwLineLayout // Fraction aZoom; long m_nDelta; - // If a SwTextFrm is locked, no changes occur to the formatting data (under + // If a SwTextFrame is locked, no changes occur to the formatting data (under // pLine) (compare with Orphans) bool m_bFlys : 1; // Overlapping Flys? bool m_bPrep : 1; // PREP_* @@ -270,7 +270,7 @@ public: inline SwScriptInfo& GetScriptInfo() { return m_aScriptInfo; } inline const SwScriptInfo& GetScriptInfo() const { return m_aScriptInfo; } - // For SwTextFrm::Format: returns the paragraph's current length + // For SwTextFrame::Format: returns the paragraph's current length sal_Int32 GetParLen() const; // For Prepare() @@ -332,7 +332,7 @@ inline void SwParaPortion::FormatReset() { m_nDelta = 0; m_aReformat = SwCharRange(0, COMPLETE_STRING); - // bFlys needs to be retained in SwTextFrm::_Format() so that empty + // bFlys needs to be retained in SwTextFrame::_Format() so that empty // paragraphs that needed to avoid Frames with no flow, reformat // when the Frame disappears from the Area // bFlys = false; diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx index 3aec6cad6347..bf138cd3665a 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -98,12 +98,12 @@ void SwLinePortion::PrePaint( const SwTextPaintInfo& rInf, sal_uInt16 nPos; SwTextPaintInfo aInf( rInf ); - const bool bBidiPor = rInf.GetTextFrm()->IsRightToLeft() != + const bool bBidiPor = rInf.GetTextFrame()->IsRightToLeft() != bool( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() ); sal_uInt16 nDir = bBidiPor ? 1800 : - rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() ); + rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() ); switch ( nDir ) { @@ -222,7 +222,7 @@ SwLinePortion *SwLinePortion::FindPrevPortion( const SwLinePortion *pRoot ) return pPos; } -sal_Int32 SwLinePortion::GetCrsrOfst( const sal_uInt16 nOfst ) const +sal_Int32 SwLinePortion::GetCursorOfst( const sal_uInt16 nOfst ) const { if( nOfst > ( PrtWidth() / 2 ) ) return GetLen(); @@ -271,9 +271,9 @@ void SwLinePortion::FormatEOL( SwTextFormatInfo & ) void SwLinePortion::Move( SwTextPaintInfo &rInf ) { bool bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP; - const bool bFrmDir = rInf.GetTextFrm()->IsRightToLeft(); - bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) || - ( bFrmDir && DIR_LEFT2RIGHT == rInf.GetDirection() ); + const bool bFrameDir = rInf.GetTextFrame()->IsRightToLeft(); + bool bCounterDir = ( ! bFrameDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) || + ( bFrameDir && DIR_LEFT2RIGHT == rInf.GetDirection() ); if ( InSpaceGrp() && rInf.GetSpaceAdd() ) { diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx index 85d2a2f81eca..486827db2e39 100644 --- a/sw/source/core/text/porlin.hxx +++ b/sw/source/core/text/porlin.hxx @@ -148,7 +148,7 @@ public: SwLinePortion *FindPrevPortion( const SwLinePortion *pRoot ); SwLinePortion *FindLastPortion(); - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const; void CalcTextSize( const SwTextSizeInfo &rInfo ); diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 5426990aaa39..53219bf4ca28 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -803,7 +803,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos, } else // no nested bidi portion required - nCurrLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0; + nCurrLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0; // check if there is a field at rPos: sal_uInt8 nNextLevel = nCurrLevel; @@ -835,14 +835,14 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos, const SvxCharRotateItem* pRotate = nullptr; const SfxPoolItem* pRotItem; - if( SfxItemState::SET == m_pFrm->GetTextNode()->GetSwAttrSet(). + if( SfxItemState::SET == m_pFrame->GetTextNode()->GetSwAttrSet(). GetItemState( RES_CHRATR_ROTATE, true, &pRotItem ) && static_cast<const SvxCharRotateItem*>(pRotItem)->GetValue() ) pRotate = static_cast<const SvxCharRotateItem*>(pRotItem); else pRotItem = nullptr; const SvxTwoLinesItem* p2Lines = nullptr; - const SwTextNode *pLclTextNode = m_pFrm->GetTextNode(); + const SwTextNode *pLclTextNode = m_pFrame->GetTextNode(); if( !pLclTextNode ) return nullptr; const SfxPoolItem* pItem; @@ -897,7 +897,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos, pRet->pItem = nullptr; pRet->pAttr = pRuby; pRet->nId = SW_MC_RUBY; - pRet->nLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0; + pRet->nLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0; return pRet; } if( n2Lines < nCount || ( pItem && pItem == p2Lines && @@ -935,7 +935,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos, aEnd.push_front( GetText().getLength() ); } pRet->nId = SW_MC_DOUBLE; - pRet->nLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0; + pRet->nLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0; // n2Lines is the index of the last 2-line-attribute, which contains // the actual position. @@ -1248,11 +1248,11 @@ SwSpaceManipulator::~SwSpaceManipulator() // Manages the paint for a SwMultiPortion. // External, for the calling function, it seems to be a normal Paint-function, -// internal it is like a SwTextFrm::Paint with multiple DrawTextLines +// internal it is like a SwTextFrame::Paint with multiple DrawTextLines void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, SwMultiPortion& rMulti, const SwMultiPortion* pEnvPor ) { - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); const bool bHasGrid = pGrid && GetInfo().SnapToGrid(); sal_uInt16 nRubyHeight = 0; bool bRubyTop = false; @@ -1278,15 +1278,15 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() ); sal_uInt8 nEnvDir = 0; sal_uInt8 nThisDir = 0; - sal_uInt8 nFrmDir = 0; + sal_uInt8 nFrameDir = 0; if ( rMulti.IsBidi() ) { // these values are needed for the calculation of the x coordinate // and the layout mode OSL_ENSURE( ! pEnvPor || pEnvPor->IsBidi(), "Oh no, I expected a BidiPortion" ); - nFrmDir = GetInfo().GetTextFrm()->IsRightToLeft() ? 1 : 0; - nEnvDir = pEnvPor ? static_cast<const SwBidiPortion*>(pEnvPor)->GetLevel() % 2 : nFrmDir; + nFrameDir = GetInfo().GetTextFrame()->IsRightToLeft() ? 1 : 0; + nEnvDir = pEnvPor ? static_cast<const SwBidiPortion*>(pEnvPor)->GetLevel() % 2 : nFrameDir; nThisDir = static_cast<SwBidiPortion&>(rMulti).GetLevel() % 2; } @@ -1371,7 +1371,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, SwTwips nMultiWidth = rMulti.Width() + rMulti.CalcSpacing( GetInfo().GetSpaceAdd(), GetInfo() ); - if ( nFrmDir == nThisDir ) + if ( nFrameDir == nThisDir ) GetInfo().X( GetInfo().X() - nMultiWidth ); else GetInfo().X( GetInfo().X() + nMultiWidth ); @@ -1475,7 +1475,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, { // we do not allow any rotation inside a bidi portion SwFont* pTmpFont = GetInfo().GetFont(); - pTmpFont->SetVertical( 0, GetInfo().GetTextFrm()->IsVertical() ); + pTmpFont->SetVertical( 0, GetInfo().GetTextFrame()->IsVertical() ); } if( pPor->IsMultiPortion() && static_cast<SwMultiPortion*>(pPor)->IsBidi() ) @@ -1621,7 +1621,7 @@ static void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTextFormatInfo& // Manages the formatting of a SwMultiPortion. External, for the calling // function, it seems to be a normal Format-function, internal it is like a -// SwTextFrm::_Format with multiple BuildPortions +// SwTextFrame::_Format with multiple BuildPortions bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, SwMultiPortion& rMulti ) { @@ -1655,7 +1655,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, if ( rMulti.IsBidi() ) { // set layout mode - aLayoutModeModifier.Modify( ! rInf.GetTextFrm()->IsRightToLeft() ); + aLayoutModeModifier.Modify( ! rInf.GetTextFrame()->IsRightToLeft() ); } SwTwips nTmpX = 0; @@ -1669,30 +1669,30 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, // We set nTmpX (which is used for portion calculating) to the // current Y value - const SwPageFrm* pPage = m_pFrm->FindPageFrm(); + const SwPageFrame* pPage = m_pFrame->FindPageFrame(); OSL_ENSURE( pPage, "No page in frame!"); - const SwLayoutFrm* pUpperFrm = pPage; + const SwLayoutFrame* pUpperFrame = pPage; - if ( m_pFrm->IsInTab() ) + if ( m_pFrame->IsInTab() ) { - pUpperFrm = m_pFrm->GetUpper(); - while ( pUpperFrm && !pUpperFrm->IsCellFrm() ) - pUpperFrm = pUpperFrm->GetUpper(); - assert(pUpperFrm); //pFrm is in table but does not have an upper cell frame - if (!pUpperFrm) + pUpperFrame = m_pFrame->GetUpper(); + while ( pUpperFrame && !pUpperFrame->IsCellFrame() ) + pUpperFrame = pUpperFrame->GetUpper(); + assert(pUpperFrame); //pFrame is in table but does not have an upper cell frame + if (!pUpperFrame) return false; - const SwTableLine* pLine = static_cast<const SwRowFrm*>(pUpperFrm->GetUpper())->GetTabLine(); - const SwFormatFrmSize& rFrameFormatSize = pLine->GetFrameFormat()->GetFrmSize(); + const SwTableLine* pLine = static_cast<const SwRowFrame*>(pUpperFrame->GetUpper())->GetTabLine(); + const SwFormatFrameSize& rFrameFormatSize = pLine->GetFrameFormat()->GetFrameSize(); if ( ATT_VAR_SIZE == rFrameFormatSize.GetHeightSizeType() ) - pUpperFrm = pPage; + pUpperFrame = pPage; } - if ( pUpperFrm == pPage && !m_pFrm->IsInFootnote() ) - pUpperFrm = pPage->FindBodyCont(); + if ( pUpperFrame == pPage && !m_pFrame->IsInFootnote() ) + pUpperFrame = pPage->FindBodyCont(); - nMaxWidth = pUpperFrm ? - ( rInf.GetTextFrm()->IsVertical() ? - pUpperFrm->Prt().Width() : - pUpperFrm->Prt().Height() ) : + nMaxWidth = pUpperFrame ? + ( rInf.GetTextFrame()->IsVertical() ? + pUpperFrame->Prt().Width() : + pUpperFrame->Prt().Height() ) : USHRT_MAX; } else @@ -1750,7 +1750,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, SwLinePortion *pNextSecond = nullptr; bool bRet = false; - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); const bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType(); bool bRubyTop = false; @@ -2196,7 +2196,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, if ( GetInfo().SnapToGrid() ) { SwTextGridItem const*const pGrid( - GetGridItem(m_pFrm->FindPageFrm())); + GetGridItem(m_pFrame->FindPageFrame())); if ( pGrid ) { bRubyTop = ! pGrid->GetRubyTextBelow(); @@ -2205,7 +2205,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, } pTmp = new SwRubyPortion( *pCreate, *GetInfo().GetFont(), - *m_pFrm->GetTextNode()->getIDocumentSettingAccess(), + *m_pFrame->GetTextNode()->getIDocumentSettingAccess(), nMultiPos, static_cast<const SwRubyPortion*>(pHelpMulti)->GetRubyOffset(), pRubyPos ); } @@ -2235,7 +2235,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, } // SwTextCursorSave notes the start and current line of a SwTextCursor, -// sets them to the values for GetCrsrOfst inside a multiportion +// sets them to the values for GetCursorOfst inside a multiportion // and restores them in the destructor. SwTextCursorSave::SwTextCursorSave( SwTextCursor* pCursor, SwMultiPortion* pMulti, @@ -2244,7 +2244,7 @@ SwTextCursorSave::SwTextCursorSave( SwTextCursor* pCursor, sal_Int32 nCurrStart, long nSpaceAdd ) { - pTextCrsr = pCursor; + pTextCursor = pCursor; nStart = pCursor->m_nStart; pCursor->m_nStart = nCurrStart; pCurr = pCursor->m_pCurr; @@ -2288,11 +2288,11 @@ SwTextCursorSave::SwTextCursorSave( SwTextCursor* pCursor, SwTextCursorSave::~SwTextCursorSave() { if( bSpaceChg ) - SwDoubleLinePortion::ResetSpaceAdd( pTextCrsr->m_pCurr ); - pTextCrsr->m_pCurr->Width( nWidth ); - pTextCrsr->m_pCurr = pCurr; - pTextCrsr->m_nStart = nStart; - pTextCrsr->SetPropFont( nOldProp ); + SwDoubleLinePortion::ResetSpaceAdd( pTextCursor->m_pCurr ); + pTextCursor->m_pCurr->Width( nWidth ); + pTextCursor->m_pCurr = pCurr; + pTextCursor->m_nStart = nStart; + pTextCursor->SetPropFont( nOldProp ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx index ed87a58271e4..e2e04b43b611 100644 --- a/sw/source/core/text/pormulti.hxx +++ b/sw/source/core/text/pormulti.hxx @@ -228,7 +228,7 @@ public: class SwTextCursorSave { - SwTextCursor* pTextCrsr; + SwTextCursor* pTextCursor; SwLineLayout* pCurr; sal_Int32 nStart; sal_uInt16 nWidth; diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 1c45f5d5bac6..5c3f8a063058 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -81,7 +81,7 @@ SwBreakPortion::SwBreakPortion( const SwLinePortion &rPortion ) SetWhichPor( POR_BRK ); } -sal_Int32 SwBreakPortion::GetCrsrOfst( const sal_uInt16 ) const +sal_Int32 SwBreakPortion::GetCursorOfst( const sal_uInt16 ) const { return 0; } sal_uInt16 SwBreakPortion::GetViewWidth( const SwTextSizeInfo & ) const @@ -188,11 +188,11 @@ SwArrowPortion::SwArrowPortion( const SwLinePortion &rPortion ) : SwArrowPortion::SwArrowPortion( const SwTextPaintInfo &rInf ) : bLeft( false ) { - Height( (sal_uInt16)(rInf.GetTextFrm()->Prt().Height()) ); - aPos.X() = rInf.GetTextFrm()->Frm().Left() + - rInf.GetTextFrm()->Prt().Right(); - aPos.Y() = rInf.GetTextFrm()->Frm().Top() + - rInf.GetTextFrm()->Prt().Bottom(); + Height( (sal_uInt16)(rInf.GetTextFrame()->Prt().Height()) ); + aPos.X() = rInf.GetTextFrame()->Frame().Left() + + rInf.GetTextFrame()->Prt().Right(); + aPos.Y() = rInf.GetTextFrame()->Frame().Top() + + rInf.GetTextFrame()->Prt().Bottom(); SetWhichPor( POR_ARROW ); } @@ -203,14 +203,14 @@ void SwArrowPortion::Paint( const SwTextPaintInfo &rInf ) const SwLinePortion *SwArrowPortion::Compress() { return this; } -SwTwips SwTextFrm::EmptyHeight() const +SwTwips SwTextFrame::EmptyHeight() const { if (IsCollapse()) { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); - if ( dynamic_cast<const SwCrsrShell*>( pSh ) != nullptr ) { - SwCrsrShell *pCrSh = static_cast<SwCrsrShell*>(pSh); - SwContentFrm *pCurrFrm=pCrSh->GetCurrFrm(); - if (pCurrFrm==static_cast<SwContentFrm const *>(this)) { + SwViewShell *pSh = getRootFrame()->GetCurrShell(); + if ( dynamic_cast<const SwCursorShell*>( pSh ) != nullptr ) { + SwCursorShell *pCrSh = static_cast<SwCursorShell*>(pSh); + SwContentFrame *pCurrFrame=pCrSh->GetCurrFrame(); + if (pCurrFrame==static_cast<SwContentFrame const *>(this)) { // do nothing } else { return 1; @@ -219,12 +219,12 @@ SwTwips SwTextFrm::EmptyHeight() const return 1; } } - OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::EmptyHeight with swapped frame" ); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::EmptyHeight with swapped frame" ); SwFont *pFnt; const SwTextNode& rTextNode = *GetTextNode(); const IDocumentSettingAccess* pIDSA = rTextNode.getIDocumentSettingAccess(); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( rTextNode.HasSwAttrSet() ) { const SwAttrSet *pAttrSet = &( rTextNode.GetSwAttrSet() ); @@ -276,9 +276,9 @@ SwTwips SwTextFrm::EmptyHeight() const return nRet; } -bool SwTextFrm::FormatEmpty() +bool SwTextFrame::FormatEmpty() { - OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::FormatEmpty with swapped frame" ); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::FormatEmpty with swapped frame" ); bool bCollapse = EmptyHeight( ) == 1 && this->IsCollapse( ); @@ -311,7 +311,7 @@ bool SwTextFrm::FormatEmpty() if ( GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() && IsInDocBody() ) { - SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame())); if ( pGrid ) nHeight = pGrid->GetBaseHeight() + pGrid->GetRubyHeight(); } @@ -321,7 +321,7 @@ bool SwTextFrm::FormatEmpty() if( !nChg ) SetUndersized( false ); - AdjustFrm( nChg ); + AdjustFrame( nChg ); if( HasBlinkPor() ) { @@ -345,21 +345,21 @@ bool SwTextFrm::FormatEmpty() return true; } -bool SwTextFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff ) +bool SwTextFrame::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff ) { - const SwFrm *pFrm = this; + const SwFrame *pFrame = this; rRegDiff = 0; while( !( ( FRM_BODY | FRM_FLY ) - & pFrm->GetType() ) && pFrm->GetUpper() ) - pFrm = pFrm->GetUpper(); - if( ( FRM_BODY| FRM_FLY ) & pFrm->GetType() ) + & pFrame->GetType() ) && pFrame->GetUpper() ) + pFrame = pFrame->GetUpper(); + if( ( FRM_BODY| FRM_FLY ) & pFrame->GetType() ) { - SWRECTFN( pFrm ) - rRegStart = (pFrm->*fnRect->fnGetPrtTop)(); - pFrm = pFrm->FindPageFrm(); - if( pFrm->IsPageFrm() ) + SWRECTFN( pFrame ) + rRegStart = (pFrame->*fnRect->fnGetPrtTop)(); + pFrame = pFrame->FindPageFrame(); + if( pFrame->IsPageFrame() ) { - SwPageDesc* pDesc = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(pFrm))->FindPageDesc(); + SwPageDesc* pDesc = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pFrame))->FindPageDesc(); if( pDesc ) { rRegDiff = pDesc->GetRegHeight(); @@ -377,7 +377,7 @@ bool SwTextFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff ) } else { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); SwFontAccess aFontAccess( pFormat, pSh ); SwFont aFnt( aFontAccess.Get()->GetFont() ); @@ -475,7 +475,7 @@ void SwHiddenTextPortion::Paint( const SwTextPaintInfo & rInf) const bool SwHiddenTextPortion::Format( SwTextFormatInfo &rInf ) { Width( 0 ); - rInf.GetTextFrm()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() + GetLen() ); + rInf.GetTextFrame()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() + GetLen() ); return false; }; diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx index 4e5dd7a339b2..e58f0680d169 100644 --- a/sw/source/core/text/porrst.hxx +++ b/sw/source/core/text/porrst.hxx @@ -43,7 +43,7 @@ public: virtual void Paint( const SwTextPaintInfo &rInf ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; // Accessibility: pass information about this portion to the PortionHandler virtual void HandlePortion( SwPortionHandler& rPH ) const override; diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 2cf9befa9790..5057cc88b609 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -89,7 +89,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr, if ( nEnd > nPos && ASIAN == nScript ) { LanguageType aLang = - rInf.GetTextFrm()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript ); + rInf.GetTextFrame()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript ); if (!MsLangId::isKorean(aLang)) { @@ -126,7 +126,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr, if ( nEnd > nPos && COMPLEX == nScript ) { LanguageType aLang = - rInf.GetTextFrm()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript ); + rInf.GetTextFrame()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript ); if ( LANGUAGE_THAI == aLang ) { @@ -152,7 +152,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr, LATIN == nScript && ( nEnd == nPos + 1 ) && pSI && ( i18n::ScriptType::COMPLEX == pSI->ScriptType( nPos + 1 ) ) && - rInf.GetTextFrm() && rInf.GetTextFrm()->IsRightToLeft(); + rInf.GetTextFrame() && rInf.GetTextFrame()->IsRightToLeft(); if ( bDoNotAddSpace ) return nCnt; @@ -198,7 +198,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr, if( ASIAN == nNextScript ) { LanguageType aLang = - rInf.GetTextFrm()->GetTextNode()->GetLang( nPos, 1, nNextScript ); + rInf.GetTextFrame()->GetTextNode()->GetLang( nPos, 1, nNextScript ); if (!MsLangId::isKorean(aLang)) ++nCnt; @@ -370,7 +370,7 @@ bool SwTextPortion::_Format( SwTextFormatInfo &rInf ) rInf.IsOtherThanFootnoteInside() ) || ( rInf.GetLast() && - rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) && + rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) && rInf.GetLast()->InTabGrp() && rInf.GetLineStart() + rInf.GetLast()->GetLen() < rInf.GetIdx() && aGuess.BreakPos() == rInf.GetIdx() && @@ -492,10 +492,10 @@ void SwTextPortion::FormatEOL( SwTextFormatInfo &rInf ) } } -sal_Int32 SwTextPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const +sal_Int32 SwTextPortion::GetCursorOfst( const sal_uInt16 nOfst ) const { - OSL_ENSURE( false, "SwTextPortion::GetCrsrOfst: don't use this method!" ); - return SwLinePortion::GetCrsrOfst( nOfst ); + OSL_ENSURE( false, "SwTextPortion::GetCursorOfst: don't use this method!" ); + return SwLinePortion::GetCursorOfst( nOfst ); } // The GetTextSize() assumes that the own length is correct @@ -787,7 +787,7 @@ bool SwFieldMarkPortion::Format( SwTextFormatInfo & ) void SwFieldFormCheckboxPortion::Paint( const SwTextPaintInfo& rInf ) const { - SwTextNode* pNd = const_cast<SwTextNode*>(rInf.GetTextFrm()->GetTextNode()); + SwTextNode* pNd = const_cast<SwTextNode*>(rInf.GetTextFrame()->GetTextNode()); const SwDoc *doc=pNd->GetDoc(); SwIndex aIndex( pNd, rInf.GetIdx() ); SwPosition aPosition(*pNd, aIndex); @@ -807,7 +807,7 @@ void SwFieldFormCheckboxPortion::Paint( const SwTextPaintInfo& rInf ) const bool SwFieldFormCheckboxPortion::Format( SwTextFormatInfo & rInf ) { - SwTextNode *pNd = rInf.GetTextFrm( )->GetTextNode( ); + SwTextNode *pNd = rInf.GetTextFrame( )->GetTextNode( ); const SwDoc *doc = pNd->GetDoc( ); SwIndex aIndex( pNd, rInf.GetIdx( ) ); SwPosition aPosition( *pNd, aIndex ); diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx index 08710b07f513..5c04df451c28 100644 --- a/sw/source/core/text/portxt.hxx +++ b/sw/source/core/text/portxt.hxx @@ -38,7 +38,7 @@ public: virtual void Paint( const SwTextPaintInfo &rInf ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual void FormatEOL( SwTextFormatInfo &rInf ) override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; virtual long CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) const override; diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index ca6880bcb090..d0f798ef50b4 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -43,11 +43,11 @@ using namespace ::com::sun::star; -void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrm* pFrm ) +void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrame* pFrame ) { // during HTML-Import it can happen, that no layout exists - SwRootFrm* pRootFrm = rTextNode.getIDocumentLayoutAccess().GetCurrentLayout(); - pShell = pRootFrm ? pRootFrm->GetCurrShell() : nullptr; + SwRootFrame* pRootFrame = rTextNode.getIDocumentLayoutAccess().GetCurrentLayout(); + pShell = pRootFrame ? pRootFrame->GetCurrShell() : nullptr; pScriptInfo = &rScrInf; @@ -64,14 +64,14 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, // set font to vertical if frame layout is vertical bool bVertLayout = false; bool bRTL = false; - if ( pFrm ) + if ( pFrame ) { - if ( pFrm->IsVertical() ) + if ( pFrame->IsVertical() ) { bVertLayout = true; pFnt->SetVertical( pFnt->GetOrientation(), true ); } - bRTL = pFrm->IsRightToLeft(); + bRTL = pFrame->IsRightToLeft(); } // Initialize the default attribute of the attribute handler diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx index 029f2d6c862f..826c253547d7 100644 --- a/sw/source/core/text/txtcache.cxx +++ b/sw/source/core/text/txtcache.cxx @@ -21,8 +21,8 @@ #include "txtfrm.hxx" #include "porlay.hxx" -SwTextLine::SwTextLine( SwTextFrm *pFrm, SwParaPortion *pNew ) : - SwCacheObj( static_cast<void*>(pFrm) ), +SwTextLine::SwTextLine( SwTextFrame *pFrame, SwParaPortion *pNew ) : + SwCacheObj( static_cast<void*>(pFrame) ), pLine( pNew ) { } @@ -34,7 +34,7 @@ SwTextLine::~SwTextLine() SwCacheObj *SwTextLineAccess::NewObj() { - return new SwTextLine( const_cast<SwTextFrm *>(static_cast<SwTextFrm const *>(pOwner)) ); + return new SwTextLine( const_cast<SwTextFrame *>(static_cast<SwTextFrame const *>(pOwner)) ); } SwParaPortion *SwTextLineAccess::GetPara() @@ -45,15 +45,15 @@ SwParaPortion *SwTextLineAccess::GetPara() else { pRet = static_cast<SwTextLine*>(Get()); - const_cast<SwTextFrm *>(static_cast<SwTextFrm const *>(pOwner))->SetCacheIdx( pRet->GetCachePos() ); + const_cast<SwTextFrame *>(static_cast<SwTextFrame const *>(pOwner))->SetCacheIdx( pRet->GetCachePos() ); } if ( !pRet->GetPara() ) pRet->SetPara( new SwParaPortion ); return pRet->GetPara(); } -SwTextLineAccess::SwTextLineAccess( const SwTextFrm *pOwn ) : - SwCacheAccess( *SwTextFrm::GetTextCache(), pOwn, pOwn->GetCacheIdx() ) +SwTextLineAccess::SwTextLineAccess( const SwTextFrame *pOwn ) : + SwCacheAccess( *SwTextFrame::GetTextCache(), pOwn, pOwn->GetCacheIdx() ) { } @@ -62,9 +62,9 @@ bool SwTextLineAccess::IsAvailable() const return pObj && static_cast<SwTextLine*>(pObj)->GetPara(); } -bool SwTextFrm::_HasPara() const +bool SwTextFrame::_HasPara() const { - SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()-> + SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrame::GetTextCache()-> Get( this, GetCacheIdx(), false )); if ( pTextLine ) { @@ -72,16 +72,16 @@ bool SwTextFrm::_HasPara() const return true; } else - const_cast<SwTextFrm*>(this)->mnCacheIndex = USHRT_MAX; + const_cast<SwTextFrame*>(this)->mnCacheIndex = USHRT_MAX; return false; } -SwParaPortion *SwTextFrm::GetPara() +SwParaPortion *SwTextFrame::GetPara() { if ( GetCacheIdx() != USHRT_MAX ) { - SwTextLine *pLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()-> + SwTextLine *pLine = static_cast<SwTextLine*>(SwTextFrame::GetTextCache()-> Get( this, GetCacheIdx(), false )); if ( pLine ) return pLine->GetPara(); @@ -91,12 +91,12 @@ SwParaPortion *SwTextFrm::GetPara() return nullptr; } -void SwTextFrm::ClearPara() +void SwTextFrame::ClearPara() { - OSL_ENSURE( !IsLocked(), "+SwTextFrm::ClearPara: this is locked." ); + OSL_ENSURE( !IsLocked(), "+SwTextFrame::ClearPara: this is locked." ); if ( !IsLocked() && GetCacheIdx() != USHRT_MAX ) { - SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()-> + SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrame::GetTextCache()-> Get( this, GetCacheIdx(), false )); if ( pTextLine ) { @@ -108,12 +108,12 @@ void SwTextFrm::ClearPara() } } -void SwTextFrm::SetPara( SwParaPortion *pNew, bool bDelete ) +void SwTextFrame::SetPara( SwParaPortion *pNew, bool bDelete ) { if ( GetCacheIdx() != USHRT_MAX ) { // Only change the information, the CacheObj stays there - SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()-> + SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrame::GetTextCache()-> Get( this, GetCacheIdx(), false )); if ( pTextLine ) { @@ -130,7 +130,7 @@ void SwTextFrm::SetPara( SwParaPortion *pNew, bool bDelete ) else if ( pNew ) { // Insert a new one SwTextLine *pTextLine = new SwTextLine( this, pNew ); - if ( SwTextFrm::GetTextCache()->Insert( pTextLine ) ) + if ( SwTextFrame::GetTextCache()->Insert( pTextLine ) ) mnCacheIndex = pTextLine->GetCachePos(); else { diff --git a/sw/source/core/text/txtcache.hxx b/sw/source/core/text/txtcache.hxx index afa02c271dd1..df3979aa46da 100644 --- a/sw/source/core/text/txtcache.hxx +++ b/sw/source/core/text/txtcache.hxx @@ -24,7 +24,7 @@ #include "swcache.hxx" class SwParaPortion; -class SwTextFrm; +class SwTextFrame; class SwTextLine : public SwCacheObj { @@ -33,7 +33,7 @@ class SwTextLine : public SwCacheObj public: DECL_FIXEDMEMPOOL_NEWDEL(SwTextLine) - SwTextLine( SwTextFrm *pFrm, SwParaPortion *pNew = nullptr ); + SwTextLine( SwTextFrame *pFrame, SwParaPortion *pNew = nullptr ); virtual ~SwTextLine(); inline SwParaPortion *GetPara() { return pLine; } @@ -49,7 +49,7 @@ protected: virtual SwCacheObj *NewObj() override; public: - explicit SwTextLineAccess( const SwTextFrm *pOwner ); + explicit SwTextLineAccess( const SwTextFrame *pOwner ); SwParaPortion *GetPara(); diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 7c4abafdb1b0..8be41458531d 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -52,11 +52,11 @@ static bool lcl_IsDropFlyInter( const SwTextFormatInfo &rInf, const SwTextFly& rTextFly = rInf.GetTextFly(); if( rTextFly.IsOn() ) { - SwRect aRect( rInf.GetTextFrm()->Frm().Pos(), Size( nWidth, nHeight) ); - aRect.Pos() += rInf.GetTextFrm()->Prt().Pos(); + SwRect aRect( rInf.GetTextFrame()->Frame().Pos(), Size( nWidth, nHeight) ); + aRect.Pos() += rInf.GetTextFrame()->Prt().Pos(); aRect.Pos().X() += rInf.X(); aRect.Pos().Y() = rInf.Y(); - aRect = rTextFly.GetFrm( aRect ); + aRect = rTextFly.GetFrame( aRect ); return aRect.HasArea(); } @@ -190,19 +190,19 @@ bool SwTextNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDesce } // get text frame - SwIterator<SwTextFrm,SwTextNode> aIter( *this ); - for( SwTextFrm* pLastFrm = aIter.First(); pLastFrm; pLastFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( *this ); + for( SwTextFrame* pLastFrame = aIter.First(); pLastFrame; pLastFrame = aIter.Next() ) { // Only (master-) text frames can have a drop cap. - if ( !pLastFrm->IsFollow() ) + if ( !pLastFrame->IsFollow() ) { - if( !pLastFrm->HasPara() ) - pLastFrm->GetFormatted(); + if( !pLastFrame->HasPara() ) + pLastFrame->GetFormatted(); - if ( !pLastFrm->IsEmpty() ) + if ( !pLastFrame->IsEmpty() ) { - const SwParaPortion* pPara = pLastFrm->GetPara(); + const SwParaPortion* pPara = pLastFrame->GetPara(); OSL_ENSURE( pPara, "GetDropSize could not find the ParaPortion, I'll guess the drop cap size" ); if ( pPara ) @@ -324,7 +324,7 @@ void SwDropPortion::PaintDrop( const SwTextPaintInfo &rInf ) const aClipRect.Intersection( rInf.GetPaintRect() ); } SwSaveClip aClip( const_cast<OutputDevice*>(rInf.GetOut()) ); - aClip.ChgClip( aClipRect, rInf.GetTextFrm() ); + aClip.ChgClip( aClipRect, rInf.GetTextFrame() ); // Just do, what we always do ... PaintText( rInf ); @@ -347,10 +347,10 @@ void SwDropPortion::Paint( const SwTextPaintInfo &rInf ) const // make sure that font is not rotated SwFont* pTmpFont = nullptr; - if ( rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() ) ) + if ( rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() ) ) { pTmpFont = new SwFont( *rInf.GetFont() ); - pTmpFont->SetVertical( 0, rInf.GetTextFrm()->IsVertical() ); + pTmpFont->SetVertical( 0, rInf.GetTextFrame()->IsVertical() ); } SwFontSave aFontSave( rInf, pTmpFont ); @@ -422,7 +422,7 @@ SwPosSize SwDropPortion::GetTextSize( const SwTextSizeInfo &rInf ) const return aPosSize; } -sal_Int32 SwDropPortion::GetCrsrOfst( const sal_uInt16 ) const +sal_Int32 SwDropPortion::GetCursorOfst( const sal_uInt16 ) const { return 0; } @@ -510,7 +510,7 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf ) return nullptr; sal_Int32 nPorLen = pDropFormat->GetWholeWord() ? 0 : pDropFormat->GetChars(); - nPorLen = m_pFrm->GetTextNode()->GetDropLen( nPorLen ); + nPorLen = m_pFrame->GetTextNode()->GetDropLen( nPorLen ); if( !nPorLen ) { static_cast<SwTextFormatter*>(this)->ClearDropFormat(); @@ -563,11 +563,11 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf ) if ( pFormat ) { const SwAttrSet& rSet = pFormat->GetAttrSet(); - pTmpFnt->SetDiffFnt( &rSet, m_pFrm->GetTextNode()->getIDocumentSettingAccess() ); + pTmpFnt->SetDiffFnt( &rSet, m_pFrame->GetTextNode()->getIDocumentSettingAccess() ); } // we do not allow a vertical font for the drop portion - pTmpFnt->SetVertical( 0, rInf.GetTextFrm()->IsVertical() ); + pTmpFnt->SetVertical( 0, rInf.GetTextFrame()->IsVertical() ); // find next attribute change / script change const sal_Int32 nTmpIdx = nNextChg; @@ -855,7 +855,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf // respect to a common baseline : 0 // get descent and ascent from union - if ( rInf.GetTextFrm()->IsVertical() ) + if ( rInf.GetTextFrame()->IsVertical() ) { nDescent = aCommonRect.Left(); nAscent = aCommonRect.Right(); diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 8e7907a61a35..c470a067f710 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -54,16 +54,16 @@ #include <IDocumentSettingAccess.hxx> #include <svl/itemiter.hxx> -static bool lcl_IsInBody( SwFrm *pFrm ) +static bool lcl_IsInBody( SwFrame *pFrame ) { - if ( pFrm->IsInDocBody() ) + if ( pFrame->IsInDocBody() ) return true; else { - const SwFrm *pTmp = pFrm; - const SwFlyFrm *pFly; - while ( nullptr != (pFly = pTmp->FindFlyFrm()) ) - pTmp = pFly->GetAnchorFrm(); + const SwFrame *pTmp = pFrame; + const SwFlyFrame *pFly; + while ( nullptr != (pFly = pTmp->FindFlyFrame()) ) + pTmp = pFly->GetAnchorFrame(); return pTmp->IsInDocBody(); } } @@ -72,7 +72,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf, const SwTextAttr *pHint ) const { SwExpandPortion *pRet = nullptr; - SwFrm *pFrame = m_pFrm; + SwFrame *pFrame = m_pFrame; SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField()); const bool bName = rInf.GetOpt().IsFieldName(); @@ -154,14 +154,14 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf, { SwPageNumberFieldType *pPageNr = static_cast<SwPageNumberFieldType *>(pField->GetTyp()); - const SwRootFrm* pTmpRootFrm = pSh->GetLayout(); - const bool bVirt = pTmpRootFrm->IsVirtPageNum(); + const SwRootFrame* pTmpRootFrame = pSh->GetLayout(); + const bool bVirt = pTmpRootFrame->IsVirtPageNum(); sal_uInt16 nVirtNum = pFrame->GetVirtPageNum(); - sal_uInt16 nNumPages = pTmpRootFrm->GetPageNum(); + sal_uInt16 nNumPages = pTmpRootFrame->GetPageNum(); sal_Int16 nNumFormat = -1; if(SVX_NUM_PAGEDESC == pField->GetFormat()) - nNumFormat = pFrame->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType(); + nNumFormat = pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType(); static_cast<SwPageNumberField*>(pField) ->ChangeExpansion(nVirtNum, nNumPages); pPageNr->ChangeExpansion(pDoc, @@ -279,7 +279,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf, if( !bName ) { pTmpFnt = new SwFont( *pFnt ); - pTmpFnt->SetDiffFnt( &pChFormat->GetAttrSet(), m_pFrm->GetTextNode()->getIDocumentSettingAccess() ); + pTmpFnt->SetDiffFnt( &pChFormat->GetAttrSet(), m_pFrame->GetTextNode()->getIDocumentSettingAccess() ); } { OUString const aStr( (bName) @@ -406,7 +406,7 @@ SwLinePortion *SwTextFormatter::NewExtraPortion( SwTextFormatInfo &rInf ) */ static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTextFormatInfo& rInf, const IDocumentSettingAccess* pIDSA ) { - SwTextNode* node = rInf.GetTextFrm()->GetTextNode(); + SwTextNode* node = rInf.GetTextFrame()->GetTextNode(); if( !pIDSA->get(DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING )) return; if( SwpHints* hints = node->GetpSwpHints()) @@ -454,7 +454,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con return nullptr; SwNumberPortion *pRet = nullptr; - const SwTextNode* pTextNd = GetTextFrm()->GetTextNode(); + const SwTextNode* pTextNd = GetTextFrame()->GetTextNode(); const SwNumRule* pNumRule = pTextNd->GetNumRule(); // Has a "valid" number? @@ -478,7 +478,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con if( SVX_NUM_BITMAP == rNumFormat.GetNumberingType() ) { - pRet = new SwGrfNumPortion( const_cast<SwTextFrm*>(GetTextFrm()), + pRet = new SwGrfNumPortion( const_cast<SwTextFrame*>(GetTextFrame()), pTextNd->GetLabelFollowedBy(), rNumFormat.GetBrush(), rNumFormat.GetGraphicOrientation(), @@ -545,7 +545,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con // we do not allow a vertical font pNumFnt->SetVertical( pNumFnt->GetOrientation(), - m_pFrm->IsVertical() ); + m_pFrame->IsVertical() ); // --> OD 2008-01-23 #newlistelevelattrs# pRet = new SwBulletPortion( rNumFormat.GetBulletChar(), @@ -590,7 +590,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA ); // we do not allow a vertical font - pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrm->IsVertical() ); + pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrame->IsVertical() ); pRet = new SwNumberPortion( aText, pNumFnt, bLeft, bCenter, nMinDist, diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index cfb5832f8a03..8c041c66492d 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -172,16 +172,16 @@ void ClrContourCache() // #i68520# const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj, const SwRect &rLine, - const SwTextFrm* pFrm, + const SwTextFrame* pFrame, const long nXPos, const bool bRight ) { SwRect aRet; const SwFrameFormat* pFormat = &(pAnchoredObj->GetFrameFormat()); if( pFormat->GetSurround().IsContour() && - ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr || - ( static_cast<const SwFlyFrm*>(pAnchoredObj)->Lower() && - static_cast<const SwFlyFrm*>(pAnchoredObj)->Lower()->IsNoTextFrm() ) ) ) + ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr || + ( static_cast<const SwFlyFrame*>(pAnchoredObj)->Lower() && + static_cast<const SwFlyFrame*>(pAnchoredObj)->Lower()->IsNoTextFrame() ) ) ) { aRet = pAnchoredObj->GetObjRectWithSpaces(); if( aRet.IsOver( rLine ) ) @@ -190,7 +190,7 @@ const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj pContourCache = new SwContourCache; aRet = pContourCache->ContourRect( - pFormat, pAnchoredObj->GetDrawObj(), pFrm, rLine, nXPos, bRight ); + pFormat, pAnchoredObj->GetDrawObj(), pFrame, rLine, nXPos, bRight ); } else aRet.Width( 0 ); @@ -204,7 +204,7 @@ const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj } const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, - const SdrObject* pObj, const SwTextFrm* pFrm, const SwRect &rLine, + const SdrObject* pObj, const SwTextFrame* pFrame, const SwRect &rLine, const long nXPos, const bool bRight ) { SwRect aRet; @@ -226,9 +226,9 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, // GetContour() causes the graphic to be loaded, which may cause // the graphic to change its size, call ClrObject() tools::PolyPolygon aPoly; - if( !static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm()->GetContour( aPoly ) ) + if( !static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->GetContour( aPoly ) ) aPoly = tools::PolyPolygon( static_cast<const SwVirtFlyDrawObj*>(pObj)-> - GetFlyFrm()->Frm().SVRect() ); + GetFlyFrame()->Frame().SVRect() ); aPolyPolygon.clear(); aPolyPolygon.append(aPoly.getB2DPolyPolygon()); } @@ -250,7 +250,7 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, // after GetContour() pTextRanger[ 0 ] = new TextRanger( aPolyPolygon, pPolyPolygon, 20, (sal_uInt16)rLRSpace.GetLeft(), (sal_uInt16)rLRSpace.GetRight(), - pFormat->GetSurround().IsOutside(), false, pFrm->IsVertical() ); + pFormat->GetSurround().IsOutside(), false, pFrame->IsVertical() ); pTextRanger[ 0 ]->SetUpper( rULSpace.GetUpper() ); pTextRanger[ 0 ]->SetLower( rULSpace.GetLower() ); @@ -272,7 +272,7 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, pSdrObj[ 0 ] = pTmpObj; pTextRanger[ 0 ] = pTmpRanger; } - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) long nTmpTop = (rLine.*fnRect->fnGetTop)(); // fnGetBottom is top + height long nTmpBottom = (rLine.*fnRect->fnGetBottom)(); @@ -313,7 +313,7 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, SwTextFly::SwTextFly() : pPage(nullptr) , mpCurrAnchoredObj(nullptr) - , pCurrFrm(nullptr) + , pCurrFrame(nullptr) , pMaster(nullptr) , mpAnchoredObjList(nullptr) , nMinBottom(0) @@ -328,16 +328,16 @@ SwTextFly::SwTextFly() { } -SwTextFly::SwTextFly( const SwTextFrm *pFrm ) +SwTextFly::SwTextFly( const SwTextFrame *pFrame ) { - CtorInitTextFly( pFrm ); + CtorInitTextFly( pFrame ); } SwTextFly::SwTextFly( const SwTextFly& rTextFly ) { pPage = rTextFly.pPage; mpCurrAnchoredObj = rTextFly.mpCurrAnchoredObj; - pCurrFrm = rTextFly.pCurrFrm; + pCurrFrame = rTextFly.pCurrFrame; pMaster = rTextFly.pMaster; if( rTextFly.mpAnchoredObjList ) { @@ -363,24 +363,24 @@ SwTextFly::~SwTextFly() delete mpAnchoredObjList; } -void SwTextFly::CtorInitTextFly( const SwTextFrm *pFrm ) +void SwTextFly::CtorInitTextFly( const SwTextFrame *pFrame ) { mbIgnoreCurrentFrame = false; mbIgnoreContour = false; mbIgnoreObjsInHeaderFooter = false; - pPage = pFrm->FindPageFrm(); - const SwFlyFrm* pTmp = pFrm->FindFlyFrm(); + pPage = pFrame->FindPageFrame(); + const SwFlyFrame* pTmp = pFrame->FindFlyFrame(); // #i68520# mpCurrAnchoredObj = pTmp; - pCurrFrm = pFrm; - pMaster = pCurrFrm->IsFollow() ? nullptr : pCurrFrm; + pCurrFrame = pFrame; + pMaster = pCurrFrame->IsFollow() ? nullptr : pCurrFrame; // #i68520# mpAnchoredObjList = nullptr; // If we're not overlapped by a frame or if a FlyCollection does not exist // at all, we switch off forever. // It could be, however, that a line is added while formatting, that // extends into a frame. - // That's why we do not optimize for: bOn = pSortedFlys && IsAnyFrm(); + // That's why we do not optimize for: bOn = pSortedFlys && IsAnyFrame(); bOn = pPage->GetSortedObjs() != nullptr; bTopRule = true; nMinBottom = 0; @@ -388,12 +388,12 @@ void SwTextFly::CtorInitTextFly( const SwTextFrm *pFrm ) nIndex = ULONG_MAX; } -SwRect SwTextFly::_GetFrm( const SwRect &rRect, bool bTop ) const +SwRect SwTextFly::_GetFrame( const SwRect &rRect, bool bTop ) const { SwRect aRet; if( ForEach( rRect, &aRet, true ) ) { - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) if( bTop ) (aRet.*fnRect->fnSetTop)( (rRect.*fnRect->fnGetTop)() ); @@ -407,13 +407,13 @@ SwRect SwTextFly::_GetFrm( const SwRect &rRect, bool bTop ) const return aRet; } -bool SwTextFly::IsAnyFrm() const +bool SwTextFly::IsAnyFrame() const { - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(pCurrFrm)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(pCurrFrame)); - OSL_ENSURE( bOn, "IsAnyFrm: Why?" ); - SwRect aRect( pCurrFrm->Frm().Pos() + pCurrFrm->Prt().Pos(), - pCurrFrm->Prt().SSize() ); + OSL_ENSURE( bOn, "IsAnyFrame: Why?" ); + SwRect aRect( pCurrFrame->Frame().Pos() + pCurrFrame->Prt().Pos(), + pCurrFrame->Prt().SSize() ); return ForEach( aRect, nullptr, false ); } @@ -424,8 +424,8 @@ bool SwTextFly::IsAnyObj( const SwRect &rRect ) const SwRect aRect( rRect ); if ( aRect.IsEmpty() ) - aRect = SwRect( pCurrFrm->Frm().Pos() + pCurrFrm->Prt().Pos(), - pCurrFrm->Prt().SSize() ); + aRect = SwRect( pCurrFrame->Frame().Pos() + pCurrFrame->Prt().Pos(), + pCurrFrame->Prt().SSize() ); const SwSortedObjs *pSorted = pPage->GetSortedObjs(); if( pSorted ) // bOn actually makes sure that we have objects on the side, @@ -449,11 +449,11 @@ bool SwTextFly::IsAnyObj( const SwRect &rRect ) const return false; } -const SwContentFrm* SwTextFly::_GetMaster() +const SwContentFrame* SwTextFly::_GetMaster() { - pMaster = pCurrFrm; + pMaster = pCurrFrame; while( pMaster && pMaster->IsFollow() ) - pMaster = static_cast<SwContentFrm*>(pMaster->FindMaster()); + pMaster = static_cast<SwContentFrame*>(pMaster->FindMaster()); return pMaster; } @@ -500,17 +500,17 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); if ( bOn && nCount > 0 ) { - const sal_uInt16 nHellId = pPage->getRootFrm()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); + const sal_uInt16 nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) { // #i68520# const SwAnchoredObject* pTmpAnchoredObj = (*mpAnchoredObjList)[i]; - if( dynamic_cast<const SwFlyFrm*>(pTmpAnchoredObj) && + if( dynamic_cast<const SwFlyFrame*>(pTmpAnchoredObj) && mpCurrAnchoredObj != pTmpAnchoredObj ) { // #i68520# - const SwFlyFrm& rFly = dynamic_cast<const SwFlyFrm&>(*pTmpAnchoredObj); - if( aRegion.GetOrigin().IsOver( rFly.Frm() ) ) + const SwFlyFrame& rFly = dynamic_cast<const SwFlyFrame&>(*pTmpAnchoredObj); + if( aRegion.GetOrigin().IsOver( rFly.Frame() ) ) { const SwFrameFormat *pFormat = rFly.GetFormat(); const SwFormatSurround &rSur = pFormat->GetSurround(); @@ -520,7 +520,7 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) SURROUND_THROUGHT == rSur.GetSurround() && ( !rSur.IsAnchorOnly() || // #i68520# - GetMaster() == rFly.GetAnchorFrm() || + GetMaster() == rFly.GetAnchorFrame() || ((FLY_AT_PARA != rAnchor.GetAnchorId()) && (FLY_AT_CHAR != rAnchor.GetAnchorId()) ) @@ -531,15 +531,15 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) ) { // Except for the content is transparent - const SwNoTextFrm *pNoText = - rFly.Lower() && rFly.Lower()->IsNoTextFrm() - ? static_cast<const SwNoTextFrm*>(rFly.Lower()) + const SwNoTextFrame *pNoText = + rFly.Lower() && rFly.Lower()->IsNoTextFrame() + ? static_cast<const SwNoTextFrame*>(rFly.Lower()) : nullptr; if ( !pNoText || (!pNoText->IsTransparent() && !rSur.IsContour()) ) { bOpaque = true; - aRegion -= rFly.Frm(); + aRegion -= rFly.Frame(); } } } @@ -588,7 +588,7 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); if ( bOn && nCount > 0 ) { - const sal_uInt16 nHellId = pPage->getRootFrm()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); + const sal_uInt16 nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) { // #i68520# @@ -597,7 +597,7 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, continue; // #i68520# - const SwFlyFrm* pFly = dynamic_cast<const SwFlyFrm*>(pAnchoredObjTmp); + const SwFlyFrame* pFly = dynamic_cast<const SwFlyFrame*>(pAnchoredObjTmp); if (pFly) { // #i68520# @@ -615,14 +615,14 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, : !rSur.IsContour() ) && !pFly->IsBackgroundTransparent() && ( !pFly->Lower() || - !pFly->Lower()->IsNoTextFrm() || - !static_cast<const SwNoTextFrm*>(pFly->Lower())->IsTransparent() ); + !pFly->Lower()->IsNoTextFrame() || + !static_cast<const SwNoTextFrame*>(pFly->Lower())->IsTransparent() ); if ( bClipFlyArea ) { // #i68520# SwRect aFly( pAnchoredObjTmp->GetObjRect() ); // OD 24.01.2003 #106593# - ::SwAlignRect( aFly, pPage->getRootFrm()->GetCurrShell(), pOut ); + ::SwAlignRect( aFly, pPage->getRootFrame()->GetCurrShell(), pOut ); if( aFly.Width() > 0 && aFly.Height() > 0 ) aRegion -= aFly; } @@ -659,7 +659,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, const bool bInFooterOrHeader ) { // #i68520# - // <mpCurrAnchoredObj> is set, if <pCurrFrm> is inside a fly frame + // <mpCurrAnchoredObj> is set, if <pCurrFrame> is inside a fly frame if( _pAnchoredObj != mpCurrAnchoredObj ) { // #i26945# @@ -698,7 +698,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // bEvade: consider pNew, if we are not inside a fly // consider pNew, if pNew is lower of <mpCurrAnchoredObj> bool bEvade = !mpCurrAnchoredObj || - Is_Lower_Of( dynamic_cast<const SwFlyFrm*>(mpCurrAnchoredObj), pNew); + Is_Lower_Of( dynamic_cast<const SwFlyFrame*>(mpCurrAnchoredObj), pNew); if ( !bEvade ) { @@ -774,20 +774,20 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // #i26945# const SwFormatAnchor& rNewA = _pAnchoredObj->GetFrameFormat().GetAnchor(); OSL_ENSURE( FLY_AS_CHAR != rNewA.GetAnchorId(), - "Don't call GetTop with a FlyInCntFrm" ); + "Don't call GetTop with a FlyInContentFrame" ); if (FLY_AT_PAGE == rNewA.GetAnchorId()) return true; // We always avoid page anchored ones // If Flys anchored at paragraph are caught in a FlyCnt, then // their influence ends at the borders of the FlyCnt! // If we are currently formatting the text of the FlyCnt, then - // it has to get out of the way of the Frm anchored at paragraph! - // pCurrFrm is the anchor of pNew? + // it has to get out of the way of the Frame anchored at paragraph! + // pCurrFrame is the anchor of pNew? // #i26945# - const SwFrm* pTmp = _pAnchoredObj->GetAnchorFrm(); - if( pTmp == pCurrFrm ) + const SwFrame* pTmp = _pAnchoredObj->GetAnchorFrame(); + if( pTmp == pCurrFrame ) return true; - if( pTmp->IsTextFrm() && ( pTmp->IsInFly() || pTmp->IsInFootnote() ) ) + if( pTmp->IsTextFrame() && ( pTmp->IsInFly() || pTmp->IsInFootnote() ) ) { // #i26945# Point aPos = _pAnchoredObj->GetObjRect().Pos(); @@ -796,10 +796,10 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // #i26945# // If <pTmp> is a text frame inside a table, take the upper // of the anchor frame, which contains the anchor position. - else if ( pTmp->IsTextFrm() && pTmp->IsInTab() ) + else if ( pTmp->IsTextFrame() && pTmp->IsInTab() ) { pTmp = const_cast<SwAnchoredObject*>(_pAnchoredObj) - ->GetAnchorFrmContainingAnchPos()->GetUpper(); + ->GetAnchorFrameContainingAnchPos()->GetUpper(); } // #i28701# - consider all objects in same context, // if wrapping style is considered on object positioning. @@ -812,22 +812,22 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // object position and former text wrapping is applied. // This condition is typically for documents imported from the // OpenOffice.org file format. - const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTextNode()->getIDocumentSettingAccess(); + const IDocumentSettingAccess* pIDSA = pCurrFrame->GetTextNode()->getIDocumentSettingAccess(); if ( ( pIDSA->get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) || !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ) && - ::FindKontext( pTmp, 0 ) == ::FindKontext( pCurrFrm, 0 ) ) + ::FindKontext( pTmp, 0 ) == ::FindKontext( pCurrFrame, 0 ) ) { return true; } - const SwFrm* pHeader = nullptr; - if ( pCurrFrm->GetNext() != pTmp && - ( IsFrmInSameKontext( pTmp, pCurrFrm ) || + const SwFrame* pHeader = nullptr; + if ( pCurrFrame->GetNext() != pTmp && + ( IsFrameInSameKontext( pTmp, pCurrFrame ) || // #i13832#, #i24135# wrap around objects in page header ( !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) && nullptr != ( pHeader = pTmp->FindFooterOrHeader() ) && - !pHeader->IsFooterFrm() && - pCurrFrm->IsInDocBody() ) ) ) + !pHeader->IsFooterFrame() && + pCurrFrame->IsInDocBody() ) ) ) { if( pHeader || FLY_AT_FLY == rNewA.GetAnchorId() ) return true; @@ -841,7 +841,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // If possible determine Index via SwFormatAnchor because // otherwise it's quite expensive. if( ULONG_MAX == nIndex ) - nIndex = pCurrFrm->GetNode()->GetIndex(); + nIndex = pCurrFrame->GetNode()->GetIndex(); if( nIndex >= nTmpIndex ) return true; @@ -854,21 +854,21 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // #i68520# SwAnchoredObjList* SwTextFly::InitAnchoredObjList() { - OSL_ENSURE( pCurrFrm, "InitFlyList: No Frame, no FlyList" ); + OSL_ENSURE( pCurrFrame, "InitFlyList: No Frame, no FlyList" ); // #i68520# OSL_ENSURE( !mpAnchoredObjList, "InitFlyList: FlyList already initialized" ); - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(pCurrFrm)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(pCurrFrame)); const SwSortedObjs *pSorted = pPage->GetSortedObjs(); const size_t nCount = pSorted ? pSorted->size() : 0; // --> #108724# Page header/footer content doesn't have to wrap around // floating screen objects - const bool bFooterHeader = nullptr != pCurrFrm->FindFooterOrHeader(); - const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTextNode()->getIDocumentSettingAccess(); + const bool bFooterHeader = nullptr != pCurrFrame->FindFooterOrHeader(); + const IDocumentSettingAccess* pIDSA = pCurrFrame->GetTextNode()->getIDocumentSettingAccess(); // #i40155# - check, if frame is marked not to wrap const bool bWrapAllowed = ( pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) || - ( !pCurrFrm->IsInFootnote() && !bFooterHeader ) ); + ( !pCurrFrame->IsInFootnote() && !bFooterHeader ) ); bOn = false; @@ -882,21 +882,21 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() SwRect aRect; if ( pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ) { - aRect = pCurrFrm->Prt(); - aRect += pCurrFrm->Frm().Pos(); + aRect = pCurrFrame->Prt(); + aRect += pCurrFrame->Frame().Pos(); } else { - aRect = pCurrFrm->Frm(); + aRect = pCurrFrame->Frame(); } // Make ourselves a little smaller than we are, // so that 1-Twip-overlappings are ignored (#49532) - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) const long nRight = (aRect.*fnRect->fnGetRight)() - 1; const long nLeft = (aRect.*fnRect->fnGetLeft)() + 1; - const bool bR2L = pCurrFrm->IsRightToLeft(); + const bool bR2L = pCurrFrame->IsRightToLeft(); - const IDocumentDrawModelAccess& rIDDMA = pCurrFrm->GetTextNode()->getIDocumentDrawModelAccess(); + const IDocumentDrawModelAccess& rIDDMA = pCurrFrame->GetTextNode()->getIDocumentDrawModelAccess(); for( size_t i = 0; i < nCount; ++i ) { @@ -906,7 +906,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() // #118809# - If requested, do not consider // objects in page header|footer for text frames not in page // header|footer. This is requested for the calculation of - // the base offset for objects <SwTextFrm::CalcBaseOfstForFly()> + // the base offset for objects <SwTextFrame::CalcBaseOfstForFly()> // #i20505# Do not consider oversized objects SwAnchoredObject* pAnchoredObj = (*pSorted)[ i ]; assert(pAnchoredObj); @@ -914,7 +914,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() !rIDDMA.IsVisibleLayerId( pAnchoredObj->GetDrawObj()->GetLayer() ) || !pAnchoredObj->ConsiderForTextWrap() || ( mbIgnoreObjsInHeaderFooter && !bFooterHeader && - pAnchoredObj->GetAnchorFrm()->FindFooterOrHeader() ) ) + pAnchoredObj->GetAnchorFrame()->FindFooterOrHeader() ) ) { continue; } @@ -925,7 +925,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() (aBound.*fnRect->fnGetBottom)() ) > 0 || nLeft > (aBound.*fnRect->fnGetRight)() || (aBound.*fnRect->fnGetHeight)() > - 2 * (pPage->Frm().*fnRect->fnGetHeight)() ) + 2 * (pPage->Frame().*fnRect->fnGetHeight)() ) { continue; } @@ -933,7 +933,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() // #i26945# - pass <pAnchoredObj> to method // <GetTop(..)> instead of only the <SdrObject> instance of the // anchored object - if ( GetTop( pAnchoredObj, pCurrFrm->IsInFootnote(), bFooterHeader ) ) + if ( GetTop( pAnchoredObj, pCurrFrame->IsInFootnote(), bFooterHeader ) ) { // OD 11.03.2003 #107862# - adjust insert position: // overlapping objects should be sorted from left to right and @@ -954,7 +954,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() const SwFormatSurround &rFlyFormat = pAnchoredObj->GetFrameFormat().GetSurround(); // #i68520# if ( rFlyFormat.IsAnchorOnly() && - pAnchoredObj->GetAnchorFrm() == GetMaster() ) + pAnchoredObj->GetAnchorFrame() == GetMaster() ) { const SwFormatVertOrient &rTmpFormat = pAnchoredObj->GetFrameFormat().GetVertOrient(); @@ -969,7 +969,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() } if( nMinBottom ) { - SwTwips nMax = (pCurrFrm->GetUpper()->*fnRect->fnGetPrtBottom)(); + SwTwips nMax = (pCurrFrame->GetUpper()->*fnRect->fnGetPrtBottom)(); if( (*fnRect->fnYDiff)( nMinBottom, nMax ) > 0 ) nMinBottom = nMax; } @@ -987,13 +987,13 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() SwTwips SwTextFly::CalcMinBottom() const { SwTwips nRet = 0; - const SwContentFrm *pLclMaster = GetMaster(); + const SwContentFrame *pLclMaster = GetMaster(); OSL_ENSURE(pLclMaster, "SwTextFly without master"); const SwSortedObjs *pDrawObj = pLclMaster ? pLclMaster->GetDrawObjs() : nullptr; const size_t nCount = pDrawObj ? pDrawObj->size() : 0; if( nCount ) { - SwTwips nEndOfFrm = pCurrFrm->Frm().Bottom(); + SwTwips nEndOfFrame = pCurrFrame->Frame().Bottom(); for( size_t i = 0; i < nCount; ++i ) { SwAnchoredObject* pAnchoredObj = (*pDrawObj)[ i ]; @@ -1005,13 +1005,13 @@ SwTwips SwTextFly::CalcMinBottom() const if( text::VertOrientation::BOTTOM != rTmpFormat.GetVertOrient() ) { const SwRect aBound( pAnchoredObj->GetObjRectWithSpaces() ); - if( aBound.Top() < nEndOfFrm ) + if( aBound.Top() < nEndOfFrame ) nRet = std::max( nRet, aBound.Bottom() ); } } } - SwTwips nMax = pCurrFrm->GetUpper()->Frm().Top() + - pCurrFrm->GetUpper()->Prt().Bottom(); + SwTwips nMax = pCurrFrame->GetUpper()->Frame().Top() + + pCurrFrame->GetUpper()->Prt().Bottom(); if( nRet > nMax ) nRet = nMax; } @@ -1020,7 +1020,7 @@ SwTwips SwTextFly::CalcMinBottom() const bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const { - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(pCurrFrm)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(pCurrFrame)); bool bRet = false; // #i68520# @@ -1035,7 +1035,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const SwRect aRect( pAnchoredObj->GetObjRectWithSpaces() ); // Optimierung - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) if( (aRect.*fnRect->fnGetLeft)() > (rRect.*fnRect->fnGetRight)() ) break; // #i68520# @@ -1053,7 +1053,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const if( ( SURROUND_THROUGHT == rSur.GetSurround() && ( !rSur.IsAnchorOnly() || // #i68520# - GetMaster() == pAnchoredObj->GetAnchorFrm() || + GetMaster() == pAnchoredObj->GetAnchorFrame() || ((FLY_AT_PARA != rAnchor.GetAnchorId()) && (FLY_AT_CHAR != rAnchor.GetAnchorId())) ) ) || aRect.Top() == FAR_AWAY ) @@ -1061,7 +1061,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const } // #i58642# - // Compare <GetMaster()> instead of <pCurrFrm> with the anchor + // Compare <GetMaster()> instead of <pCurrFrame> with the anchor // frame of the anchored object, because a follow frame have // to ignore the anchored objects of its master frame. // Note: Anchored objects are always registered at the master @@ -1069,7 +1069,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const // but these aren't handled here. // #i68520# if ( mbIgnoreCurrentFrame && - GetMaster() == pAnchoredObj->GetAnchorFrm() ) + GetMaster() == pAnchoredObj->GetAnchorFrame() ) continue; if( pRect ) @@ -1079,10 +1079,10 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const if( aFly.IsEmpty() || !aFly.IsOver( rRect ) ) continue; if( !bRet || ( - ( !pCurrFrm->IsRightToLeft() && + ( !pCurrFrame->IsRightToLeft() && ( (aFly.*fnRect->fnGetLeft)() < (pRect->*fnRect->fnGetLeft)() ) ) || - ( pCurrFrm->IsRightToLeft() && + ( pCurrFrame->IsRightToLeft() && ( (aFly.*fnRect->fnGetRight)() > (pRect->*fnRect->fnGetRight)() ) ) ) ) *pRect = aFly; @@ -1117,11 +1117,11 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, const SwRect &rLine ) const { // Usually the right margin is the right margin of the Printarea - OSL_ENSURE( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(), + OSL_ENSURE( ! pCurrFrame->IsVertical() || ! pCurrFrame->IsSwapped(), "SwTextFly::CalcRightMargin with swapped frame" ); - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) // #118796# - correct determination of right of printing area - SwTwips nRight = (pCurrFrm->*fnRect->fnGetPrtRight)(); + SwTwips nRight = (pCurrFrame->*fnRect->fnGetPrtRight)(); SwTwips nFlyRight = (rFly.*fnRect->fnGetRight)(); SwRect aLine( rLine ); (aLine.*fnRect->fnSetRight)( nRight ); @@ -1131,7 +1131,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, // and protrudes into the same line. // Flys with run-through are invisible for those below, i.e., they // are ignored for computing the margins of other Flys. - // 3301: pNext->Frm().IsOver( rLine ) is necessary + // 3301: pNext->Frame().IsOver( rLine ) is necessary // #i68520# SwSurround eSurroundForTextWrap; @@ -1156,7 +1156,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, continue; const SwRect aTmp( SwContourCache::CalcBoundRect - ( pNext, aLine, pCurrFrm, nFlyRight, true ) ); + ( pNext, aLine, pCurrFrame, nFlyRight, true ) ); SwTwips nTmpRight = (aTmp.*fnRect->fnGetRight)(); // optimization: @@ -1190,7 +1190,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, if( SURROUND_RIGHT == eSurroundForTextWrap || SURROUND_PARALLEL == eSurroundForTextWrap ) { - // overrule the FlyFrm + // overrule the FlyFrame if( nRight > nFlyRight ) nRight = nFlyRight; bStop = true; @@ -1205,11 +1205,11 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, SwAnchoredObjList::size_type nFlyPos, const SwRect &rLine ) const { - OSL_ENSURE( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(), + OSL_ENSURE( ! pCurrFrame->IsVertical() || ! pCurrFrame->IsSwapped(), "SwTextFly::CalcLeftMargin with swapped frame" ); - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) // #118796# - correct determination of left of printing area - SwTwips nLeft = (pCurrFrm->*fnRect->fnGetPrtLeft)(); + SwTwips nLeft = (pCurrFrame->*fnRect->fnGetPrtLeft)(); const SwTwips nFlyLeft = (rFly.*fnRect->fnGetLeft)(); if( nLeft > nFlyLeft ) @@ -1222,7 +1222,7 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, // and protrudes into the same line. // Flys with run-through are invisible for those below, i.e., they // are ignored for computing the margins of other Flys. - // 3301: pNext->Frm().IsOver( rLine ) is necessary + // 3301: pNext->Frame().IsOver( rLine ) is necessary // #i68520# SwAnchoredObjList::size_type nMyPos = nFlyPos; @@ -1248,7 +1248,7 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, continue; const SwRect aTmp( SwContourCache::CalcBoundRect - ( pNext, aLine, pCurrFrm, nFlyLeft, false ) ); + ( pNext, aLine, pCurrFrame, nFlyLeft, false ) ); if( (aTmp.*fnRect->fnGetLeft)() < nFlyLeft && aTmp.IsOver( aLine ) ) { @@ -1268,16 +1268,16 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, SwRect SwTextFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj, const SwRect &rLine ) const { - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) - const long nXPos = pCurrFrm->IsRightToLeft() ? + const long nXPos = pCurrFrame->IsRightToLeft() ? rLine.Right() : (rLine.*fnRect->fnGetLeft)(); SwRect aFly = mbIgnoreContour ? pAnchoredObj->GetObjRectWithSpaces() : - SwContourCache::CalcBoundRect( pAnchoredObj, rLine, pCurrFrm, - nXPos, ! pCurrFrm->IsRightToLeft() ); + SwContourCache::CalcBoundRect( pAnchoredObj, rLine, pCurrFrame, + nXPos, ! pCurrFrame->IsRightToLeft() ); if( !aFly.Width() ) return aFly; @@ -1336,7 +1336,7 @@ SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchored const SwFormatSurround &rFlyFormat = pFormat->GetSurround(); SwSurround eSurroundForTextWrap = rFlyFormat.GetSurround(); - if( rFlyFormat.IsAnchorOnly() && pAnchoredObj->GetAnchorFrm() != GetMaster() ) + if( rFlyFormat.IsAnchorOnly() && pAnchoredObj->GetAnchorFrame() != GetMaster() ) { const SwFormatAnchor& rAnchor = pFormat->GetAnchor(); if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || @@ -1352,7 +1352,7 @@ SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchored return eSurroundForTextWrap; // left is left and right is right - if ( pCurrFrm->IsRightToLeft() ) + if ( pCurrFrame->IsRightToLeft() ) { if ( SURROUND_LEFT == eSurroundForTextWrap ) eSurroundForTextWrap = SURROUND_RIGHT; @@ -1363,9 +1363,9 @@ SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchored // "ideal page wrap": if ( SURROUND_IDEAL == eSurroundForTextWrap ) { - SWRECTFN( pCurrFrm ) - const long nCurrLeft = (pCurrFrm->*fnRect->fnGetPrtLeft)(); - const long nCurrRight = (pCurrFrm->*fnRect->fnGetPrtRight)(); + SWRECTFN( pCurrFrame ) + const long nCurrLeft = (pCurrFrame->*fnRect->fnGetPrtLeft)(); + const long nCurrRight = (pCurrFrame->*fnRect->fnGetPrtRight)(); const SwRect aRect( pAnchoredObj->GetObjRectWithSpaces() ); long nFlyLeft = (aRect.*fnRect->fnGetLeft)(); long nFlyRight = (aRect.*fnRect->fnGetRight)(); @@ -1400,12 +1400,12 @@ SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchored return eSurroundForTextWrap; } -bool SwTextFly::IsAnyFrm( const SwRect &rLine ) const +bool SwTextFly::IsAnyFrame( const SwRect &rLine ) const { - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(pCurrFrm)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(pCurrFrame)); - OSL_ENSURE( bOn, "IsAnyFrm: Why?" ); + OSL_ENSURE( bOn, "IsAnyFrame: Why?" ); return ForEach( rLine, nullptr, false ); } diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index e9b2f94531a8..8e13867f67e7 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -80,7 +80,7 @@ /// Switches width and height of the text frame -void SwTextFrm::SwapWidthAndHeight() +void SwTextFrame::SwapWidthAndHeight() { if ( ! mbIsSwapped ) { @@ -89,7 +89,7 @@ void SwTextFrm::SwapWidthAndHeight() if( IsVertLR() ) Prt().Pos().Y() = nPrtOfstX; else - Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() ); + Prt().Pos().Y() = Frame().Width() - ( nPrtOfstX + Prt().Width() ); } else @@ -99,12 +99,12 @@ void SwTextFrm::SwapWidthAndHeight() if( IsVertLR() ) Prt().Pos().X() = nPrtOfstY; else - Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() ); + Prt().Pos().X() = Frame().Height() - ( nPrtOfstY + Prt().Height() ); } - const long nFrmWidth = Frm().Width(); - Frm().Width( Frm().Height() ); - Frm().Height( nFrmWidth ); + const long nFrameWidth = Frame().Width(); + Frame().Width( Frame().Height() ); + Frame().Height( nFrameWidth ); const long nPrtWidth = Prt().Width(); Prt().Width( Prt().Height() ); Prt().Height( nPrtWidth ); @@ -116,36 +116,36 @@ void SwTextFrm::SwapWidthAndHeight() * Calculates the coordinates of a rectangle when switching from * horizontal to vertical layout. */ -void SwTextFrm::SwitchHorizontalToVertical( SwRect& rRect ) const +void SwTextFrame::SwitchHorizontalToVertical( SwRect& rRect ) const { // calc offset inside frame long nOfstX, nOfstY; if ( IsVertLR() ) { - nOfstX = rRect.Left() - Frm().Left(); - nOfstY = rRect.Top() - Frm().Top(); + nOfstX = rRect.Left() - Frame().Left(); + nOfstY = rRect.Top() - Frame().Top(); } else { - nOfstX = rRect.Left() - Frm().Left(); - nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); + nOfstX = rRect.Left() - Frame().Left(); + nOfstY = rRect.Top() + rRect.Height() - Frame().Top(); } const long nWidth = rRect.Width(); const long nHeight = rRect.Height(); if ( IsVertLR() ) - rRect.Left(Frm().Left() + nOfstY); + rRect.Left(Frame().Left() + nOfstY); else { if ( mbIsSwapped ) - rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); + rRect.Left( Frame().Left() + Frame().Height() - nOfstY ); else // frame is rotated - rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); + rRect.Left( Frame().Left() + Frame().Width() - nOfstY ); } - rRect.Top( Frm().Top() + nOfstX ); + rRect.Top( Frame().Top() + nOfstX ); rRect.Width( nHeight ); rRect.Height( nWidth ); } @@ -154,30 +154,30 @@ void SwTextFrm::SwitchHorizontalToVertical( SwRect& rRect ) const * Calculates the coordinates of a point when switching from * horizontal to vertical layout. */ -void SwTextFrm::SwitchHorizontalToVertical( Point& rPoint ) const +void SwTextFrame::SwitchHorizontalToVertical( Point& rPoint ) const { // calc offset inside frame - const long nOfstX = rPoint.X() - Frm().Left(); - const long nOfstY = rPoint.Y() - Frm().Top(); + const long nOfstX = rPoint.X() - Frame().Left(); + const long nOfstY = rPoint.Y() - Frame().Top(); if ( IsVertLR() ) - rPoint.X() = Frm().Left() + nOfstY; + rPoint.X() = Frame().Left() + nOfstY; else { if ( mbIsSwapped ) - rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; + rPoint.X() = Frame().Left() + Frame().Height() - nOfstY; else // calc rotated coords - rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; + rPoint.X() = Frame().Left() + Frame().Width() - nOfstY; } - rPoint.Y() = Frm().Top() + nOfstX; + rPoint.Y() = Frame().Top() + nOfstX; } /** * Calculates the a limit value when switching from * horizontal to vertical layout. */ -long SwTextFrm::SwitchHorizontalToVertical( long nLimit ) const +long SwTextFrame::SwitchHorizontalToVertical( long nLimit ) const { Point aTmp( 0, nLimit ); SwitchHorizontalToVertical( aTmp ); @@ -188,28 +188,28 @@ long SwTextFrm::SwitchHorizontalToVertical( long nLimit ) const * Calculates the coordinates of a rectangle when switching from * vertical to horizontal layout. */ -void SwTextFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const +void SwTextFrame::SwitchVerticalToHorizontal( SwRect& rRect ) const { long nOfstX; // calc offset inside frame if ( IsVertLR() ) - nOfstX = rRect.Left() - Frm().Left(); + nOfstX = rRect.Left() - Frame().Left(); else { if ( mbIsSwapped ) - nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() ); + nOfstX = Frame().Left() + Frame().Height() - ( rRect.Left() + rRect.Width() ); else - nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); + nOfstX = Frame().Left() + Frame().Width() - ( rRect.Left() + rRect.Width() ); } - const long nOfstY = rRect.Top() - Frm().Top(); + const long nOfstY = rRect.Top() - Frame().Top(); const long nWidth = rRect.Height(); const long nHeight = rRect.Width(); // calc rotated coords - rRect.Left( Frm().Left() + nOfstY ); - rRect.Top( Frm().Top() + nOfstX ); + rRect.Left( Frame().Left() + nOfstY ); + rRect.Top( Frame().Top() + nOfstX ); rRect.Width( nWidth ); rRect.Height( nHeight ); } @@ -218,73 +218,73 @@ void SwTextFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const * Calculates the coordinates of a point when switching from * vertical to horizontal layout. */ -void SwTextFrm::SwitchVerticalToHorizontal( Point& rPoint ) const +void SwTextFrame::SwitchVerticalToHorizontal( Point& rPoint ) const { long nOfstX; // calc offset inside frame if ( IsVertLR() ) - nOfstX = rPoint.X() - Frm().Left(); + nOfstX = rPoint.X() - Frame().Left(); else { if ( mbIsSwapped ) - nOfstX = Frm().Left() + Frm().Height() - rPoint.X(); + nOfstX = Frame().Left() + Frame().Height() - rPoint.X(); else - nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); + nOfstX = Frame().Left() + Frame().Width() - rPoint.X(); } - const long nOfstY = rPoint.Y() - Frm().Top(); + const long nOfstY = rPoint.Y() - Frame().Top(); // calc rotated coords - rPoint.X() = Frm().Left() + nOfstY; - rPoint.Y() = Frm().Top() + nOfstX; + rPoint.X() = Frame().Left() + nOfstY; + rPoint.Y() = Frame().Top() + nOfstX; } /** * Calculates the a limit value when switching from * vertical to horizontal layout. */ -long SwTextFrm::SwitchVerticalToHorizontal( long nLimit ) const +long SwTextFrame::SwitchVerticalToHorizontal( long nLimit ) const { Point aTmp( nLimit, 0 ); SwitchVerticalToHorizontal( aTmp ); return aTmp.Y(); } -SwFrmSwapper::SwFrmSwapper( const SwTextFrm* pTextFrm, bool bSwapIfNotSwapped ) - : pFrm( pTextFrm ), bUndo( false ) +SwFrameSwapper::SwFrameSwapper( const SwTextFrame* pTextFrame, bool bSwapIfNotSwapped ) + : pFrame( pTextFrame ), bUndo( false ) { - if ( pFrm->IsVertical() && - ( ( bSwapIfNotSwapped && ! pFrm->IsSwapped() ) || - ( ! bSwapIfNotSwapped && pFrm->IsSwapped() ) ) ) + if ( pFrame->IsVertical() && + ( ( bSwapIfNotSwapped && ! pFrame->IsSwapped() ) || + ( ! bSwapIfNotSwapped && pFrame->IsSwapped() ) ) ) { bUndo = true; - const_cast<SwTextFrm*>(pFrm)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(pFrame)->SwapWidthAndHeight(); } } -SwFrmSwapper::~SwFrmSwapper() +SwFrameSwapper::~SwFrameSwapper() { if ( bUndo ) - const_cast<SwTextFrm*>(pFrm)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(pFrame)->SwapWidthAndHeight(); } -void SwTextFrm::SwitchLTRtoRTL( SwRect& rRect ) const +void SwTextFrame::SwitchLTRtoRTL( SwRect& rRect ) const { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); long nWidth = rRect.Width(); - rRect.Left( 2 * ( Frm().Left() + Prt().Left() ) + + rRect.Left( 2 * ( Frame().Left() + Prt().Left() ) + Prt().Width() - rRect.Right() - 1 ); rRect.Width( nWidth ); } -void SwTextFrm::SwitchLTRtoRTL( Point& rPoint ) const +void SwTextFrame::SwitchLTRtoRTL( Point& rPoint ) const { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); - rPoint.X() = 2 * ( Frm().Left() + Prt().Left() ) + Prt().Width() - rPoint.X() - 1; + rPoint.X() = 2 * ( Frame().Left() + Prt().Left() ) + Prt().Width() - rPoint.X() - 1; } SwLayoutModeModifier::SwLayoutModeModifier( const OutputDevice& rOutp ) : @@ -334,9 +334,9 @@ SwDigitModeModifier::~SwDigitModeModifier() const_cast<OutputDevice&>(rOut).SetDigitLanguage( nOldLanguageType ); } -void SwTextFrm::Init() +void SwTextFrame::Init() { - OSL_ENSURE( !IsLocked(), "+SwTextFrm::Init: this is locked." ); + OSL_ENSURE( !IsLocked(), "+SwTextFrame::Init: this is locked." ); if( !IsLocked() ) { ClearPara(); @@ -348,8 +348,8 @@ void SwTextFrm::Init() } } -SwTextFrm::SwTextFrm(SwTextNode * const pNode, SwFrm* pSib ) - : SwContentFrm( pNode, pSib ) +SwTextFrame::SwTextFrame(SwTextNode * const pNode, SwFrame* pSib ) + : SwContentFrame( pNode, pSib ) , mnAllLines( 0 ) , mnThisLines( 0 ) , mnFlyAnchorOfst( 0 ) @@ -372,10 +372,10 @@ SwTextFrm::SwTextFrm(SwTextNode * const pNode, SwFrm* pSib ) , mbIsSwapped( false ) , mbFollowFormatAllowed( true ) // OD 14.03.2003 #i11760# { - mnFrmType = FRM_TXT; + mnFrameType = FRM_TXT; } -void SwTextFrm::DestroyImpl() +void SwTextFrame::DestroyImpl() { // Remove associated SwParaPortion from pTextCache ClearPara(); @@ -384,7 +384,7 @@ void SwTextFrm::DestroyImpl() if( nullptr != ( pCNd = dynamic_cast<SwContentNode*>( GetRegisteredIn() ) ) && !pCNd->GetDoc()->IsInDtor() && HasFootnote() ) { - SwTextNode *pTextNd = static_cast<SwTextFrm*>(this)->GetTextNode(); + SwTextNode *pTextNd = static_cast<SwTextFrame*>(this)->GetTextNode(); const SwFootnoteIdxs &rFootnoteIdxs = pCNd->GetDoc()->GetFootnoteIdxs(); size_t nPos = 0; sal_uLong nIndex = pCNd->GetIndex(); @@ -401,24 +401,24 @@ void SwTextFrm::DestroyImpl() SwTextFootnote* pTextFootnote = rFootnoteIdxs[ nPos ]; if( pTextFootnote->GetTextNode().GetIndex() > nIndex ) break; - pTextFootnote->DelFrms( this ); + pTextFootnote->DelFrames( this ); ++nPos; } } - SwContentFrm::DestroyImpl(); + SwContentFrame::DestroyImpl(); } -SwTextFrm::~SwTextFrm() +SwTextFrame::~SwTextFrame() { } -const OUString& SwTextFrm::GetText() const +const OUString& SwTextFrame::GetText() const { return GetTextNode()->GetText(); } -void SwTextFrm::ResetPreps() +void SwTextFrame::ResetPreps() { if ( GetCacheIdx() != USHRT_MAX ) { @@ -428,19 +428,19 @@ void SwTextFrm::ResetPreps() } } -bool SwTextFrm::IsHiddenNow() const +bool SwTextFrame::IsHiddenNow() const { - SwFrmSwapper aSwapper( this, true ); + SwFrameSwapper aSwapper( this, true ); - if( !Frm().Width() && IsValid() && GetUpper()->IsValid() ) // invalid when stack overflows (StackHack)! + if( !Frame().Width() && IsValid() && GetUpper()->IsValid() ) // invalid when stack overflows (StackHack)! { -// OSL_FAIL( "SwTextFrm::IsHiddenNow: thin frame" ); +// OSL_FAIL( "SwTextFrame::IsHiddenNow: thin frame" ); return true; } const bool bHiddenCharsHidePara = GetTextNode()->HasHiddenCharAttribute( true ); const bool bHiddenParaField = GetTextNode()->HasHiddenParaField(); - const SwViewShell* pVsh = getRootFrm()->GetCurrShell(); + const SwViewShell* pVsh = getRootFrame()->GetCurrShell(); if ( pVsh && ( bHiddenCharsHidePara || bHiddenParaField ) ) { @@ -459,7 +459,7 @@ bool SwTextFrm::IsHiddenNow() const } /// Removes Textfrm's attachments, when it's hidden -void SwTextFrm::HideHidden() +void SwTextFrame::HideHidden() { OSL_ENSURE( !GetFollow() && IsHiddenNow(), "HideHidden on visible frame of hidden frame has follow" ); @@ -473,13 +473,13 @@ void SwTextFrm::HideHidden() ClearPara(); } -void SwTextFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd ) +void SwTextFrame::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd ) { const SwpHints *pHints = GetTextNode()->GetpSwpHints(); if( pHints ) { const size_t nSize = pHints->Count(); - SwPageFrm *pPage = nullptr; + SwPageFrame *pPage = nullptr; for ( size_t i = 0; i < nSize; ++i ) { const SwTextAttr *pHt = pHints->Get(i); @@ -491,7 +491,7 @@ void SwTextFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd ) if( nStart <= nIdx ) { if( !pPage ) - pPage = FindPageFrm(); + pPage = FindPageFrame(); pPage->RemoveFootnote( this, static_cast<const SwTextFootnote*>(pHt) ); } } @@ -509,7 +509,7 @@ void SwTextFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd ) * (b) the paragraph is the last content in the document and * (c) the anchor character is an as-character anchored graphic. */ -bool sw_HideObj( const SwTextFrm& _rFrm, +bool sw_HideObj( const SwTextFrame& _rFrame, const RndStdIds _eAnchorType, const sal_Int32 _nObjAnchorPos, SwAnchoredObject* _pAnchoredObj ) @@ -518,19 +518,19 @@ bool sw_HideObj( const SwTextFrm& _rFrm, if (_eAnchorType == FLY_AT_CHAR) { - const IDocumentSettingAccess* pIDSA = _rFrm.GetTextNode()->getIDocumentSettingAccess(); + const IDocumentSettingAccess* pIDSA = _rFrame.GetTextNode()->getIDocumentSettingAccess(); if ( !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) && !pIDSA->get(DocumentSettingId::OLD_LINE_SPACING) && !pIDSA->get(DocumentSettingId::USE_FORMER_OBJECT_POS) && pIDSA->get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) && - _rFrm.IsInDocBody() && !_rFrm.FindNextCnt() ) + _rFrame.IsInDocBody() && !_rFrame.FindNextCnt() ) { - const OUString &rStr = _rFrm.GetTextNode()->GetText(); + const OUString &rStr = _rFrame.GetTextNode()->GetText(); const sal_Unicode cAnchorChar = _nObjAnchorPos < rStr.getLength() ? rStr[_nObjAnchorPos] : 0; if (cAnchorChar == CH_TXTATR_BREAKWORD) { const SwTextAttr* const pHint( - _rFrm.GetTextNode()->GetTextAttrForCharAt(_nObjAnchorPos, + _rFrame.GetTextNode()->GetTextAttrForCharAt(_nObjAnchorPos, RES_TXTATR_FLYCNT) ); if ( pHint ) { @@ -544,8 +544,8 @@ bool sw_HideObj( const SwTextFrm& _rFrm, { bRet = false; // set needed data structure values for object positioning - SWRECTFN( (&_rFrm) ); - SwRect aLastCharRect( _rFrm.Frm() ); + SWRECTFN( (&_rFrame) ); + SwRect aLastCharRect( _rFrame.Frame() ); (aLastCharRect.*fnRect->fnSetWidth)( 1 ); _pAnchoredObj->maLastCharRect = aLastCharRect; _pAnchoredObj->mnLastTopOfLine = (aLastCharRect.*fnRect->fnGetTop)(); @@ -570,7 +570,7 @@ bool sw_HideObj( const SwTextFrm& _rFrm, * - is called from HideHidden() - should hide objects in hidden paragraphs and * - from _Format() - should hide/show objects in partly visible paragraphs */ -void SwTextFrm::HideAndShowObjects() +void SwTextFrame::HideAndShowObjects() { if ( GetDrawObjs() ) { @@ -598,7 +598,7 @@ void SwTextFrm::HideAndShowObjects() // paragraph is visible, but can contain hidden text portion. // first we check if objects are allowed to be hidden: const SwTextNode& rNode = *GetTextNode(); - const SwViewShell* pVsh = getRootFrm()->GetCurrShell(); + const SwViewShell* pVsh = getRootFrame()->GetCurrShell(); const bool bShouldBeHidden = !pVsh || !pVsh->GetWin() || !pVsh->GetViewOptions()->IsShowHiddenChar(); @@ -633,7 +633,7 @@ void SwTextFrm::HideAndShowObjects() } else { - OSL_FAIL( "<SwTextFrm::HideAndShowObjects()> - object not anchored at/inside paragraph!?" ); + OSL_FAIL( "<SwTextFrame::HideAndShowObjects()> - object not anchored at/inside paragraph!?" ); } } } @@ -641,8 +641,8 @@ void SwTextFrm::HideAndShowObjects() if (IsFollow()) { - SwTextFrm *pMaster = FindMaster(); - OSL_ENSURE(pMaster, "SwTextFrm without master"); + SwTextFrame *pMaster = FindMaster(); + OSL_ENSURE(pMaster, "SwTextFrame without master"); if (pMaster) pMaster->HideAndShowObjects(); } @@ -650,11 +650,11 @@ void SwTextFrm::HideAndShowObjects() /** * Returns the first possible break point in the current line. - * This method is used in SwTextFrm::Format() to decide whether the previous + * This method is used in SwTextFrame::Format() to decide whether the previous * line has to be formatted as well. * nFound is <= nEndLine. */ -sal_Int32 SwTextFrm::FindBrk( const OUString &rText, +sal_Int32 SwTextFrame::FindBrk( const OUString &rText, const sal_Int32 nStart, const sal_Int32 nEnd ) { @@ -679,7 +679,7 @@ sal_Int32 SwTextFrm::FindBrk( const OUString &rText, return nFound; } -bool SwTextFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const +bool SwTextFrame::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const { if( nLen != COMPLETE_STRING && GetOfst() > nPos + nLen ) // the range preceded us return false; @@ -698,13 +698,13 @@ bool SwTextFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const return pPara && ( nPos <= nMax + pPara->GetLen() ); } -inline void SwTextFrm::InvalidateRange(const SwCharRange &aRange, const long nD) +inline void SwTextFrame::InvalidateRange(const SwCharRange &aRange, const long nD) { if ( IsIdxInside( aRange.Start(), aRange.Len() ) ) _InvalidateRange( aRange, nD ); } -void SwTextFrm::_InvalidateRange( const SwCharRange &aRange, const long nD) +void SwTextFrame::_InvalidateRange( const SwCharRange &aRange, const long nD) { if ( !HasPara() ) { InvalidateSize(); @@ -738,10 +738,10 @@ void SwTextFrm::_InvalidateRange( const SwCharRange &aRange, const long nD) } } -void SwTextFrm::CalcLineSpace() +void SwTextFrame::CalcLineSpace() { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::CalcLineSpace with swapped frame!" ); + "SwTextFrame::CalcLineSpace with swapped frame!" ); if( IsLocked() || !HasPara() ) return; @@ -757,7 +757,7 @@ void SwTextFrm::CalcLineSpace() Size aNewSize( Prt().SSize() ); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this ); SwTextFormatter aLine( this, &aInf ); if( aLine.GetDropLines() ) { @@ -768,18 +768,18 @@ void SwTextFrm::CalcLineSpace() aLine.Top(); aLine.RecalcRealHeight(); - aNewSize.Height() = (aLine.Y() - Frm().Top()) + aLine.GetLineHeight(); + aNewSize.Height() = (aLine.Y() - Frame().Top()) + aLine.GetLineHeight(); SwTwips nDelta = aNewSize.Height() - Prt().Height(); // Underflow with free-flying frames if( aInf.GetTextFly().IsOn() ) { - SwRect aTmpFrm( Frm() ); + SwRect aTmpFrame( Frame() ); if( nDelta < 0 ) - aTmpFrm.Height( Prt().Height() ); + aTmpFrame.Height( Prt().Height() ); else - aTmpFrm.Height( aNewSize.Height() ); - if( aInf.GetTextFly().Relax( aTmpFrm ) ) + aTmpFrame.Height( aNewSize.Height() ); + if( aInf.GetTextFly().Relax( aTmpFrame ) ) { Init(); return; @@ -788,7 +788,7 @@ void SwTextFrm::CalcLineSpace() if( nDelta ) { - SwTextFrmBreak aBreak( this ); + SwTextFrameBreak aBreak( this ); if( GetFollow() || aBreak.IsBreakNow( aLine ) ) { // if there is a Follow() or if we need to break here, reformat @@ -803,11 +803,11 @@ void SwTextFrm::CalcLineSpace() } } -static void lcl_SetWrong( SwTextFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool bMove ) +static void lcl_SetWrong( SwTextFrame& rFrame, sal_Int32 nPos, sal_Int32 nCnt, bool bMove ) { - if ( !rFrm.IsFollow() ) + if ( !rFrame.IsFollow() ) { - SwTextNode* pTextNode = rFrm.GetTextNode(); + SwTextNode* pTextNode = rFrame.GetTextNode(); IGrammarContact* pGrammarContact = getGrammarContact( *pTextNode ); SwGrammarMarkUp* pWrongGrammar = pGrammarContact ? pGrammarContact->getGrammarCheck( *pTextNode, false ) : @@ -851,13 +851,13 @@ static void lcl_SetWrong( SwTextFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool pTextNode->SetSmartTagDirty( true ); } - SwRootFrm *pRootFrm = rFrm.getRootFrm(); - if (pRootFrm) + SwRootFrame *pRootFrame = rFrame.getRootFrame(); + if (pRootFrame) { - pRootFrm->SetNeedGrammarCheck( true ); + pRootFrame->SetNeedGrammarCheck( true ); } - SwPageFrm *pPage = rFrm.FindPageFrm(); + SwPageFrame *pPage = rFrame.FindPageFrame(); if( pPage ) { pPage->InvalidateSpelling(); @@ -867,23 +867,23 @@ static void lcl_SetWrong( SwTextFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool } } -static void lcl_SetScriptInval( SwTextFrm& rFrm, sal_Int32 nPos ) +static void lcl_SetScriptInval( SwTextFrame& rFrame, sal_Int32 nPos ) { - if( rFrm.GetPara() ) - rFrm.GetPara()->GetScriptInfo().SetInvalidityA( nPos ); + if( rFrame.GetPara() ) + rFrame.GetPara()->GetScriptInfo().SetInvalidityA( nPos ); } -static void lcl_ModifyOfst( SwTextFrm* pFrm, sal_Int32 nPos, sal_Int32 nLen ) +static void lcl_ModifyOfst( SwTextFrame* pFrame, sal_Int32 nPos, sal_Int32 nLen ) { - while( pFrm && pFrm->GetOfst() <= nPos ) - pFrm = pFrm->GetFollow(); - while( pFrm ) + while( pFrame && pFrame->GetOfst() <= nPos ) + pFrame = pFrame->GetFollow(); + while( pFrame ) { if (nLen == COMPLETE_STRING) - pFrm->ManipOfst( pFrm->GetTextNode()->GetText().getLength() ); + pFrame->ManipOfst( pFrame->GetTextNode()->GetText().getLength() ); else - pFrm->ManipOfst( pFrm->GetOfst() + nLen ); - pFrm = pFrm->GetFollow(); + pFrame->ManipOfst( pFrame->GetOfst() + nLen ); + pFrame = pFrame->GetFollow(); } } @@ -906,15 +906,15 @@ static bool hasA11yRelevantAttribute( const std::vector<sal_uInt16>& nWhich ) return false; } -void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) +void SwTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; // modifications concerning frame attributes are processed by the base class if( IsInRange( aFrameFormatSetRange, nWhich ) || RES_FMT_CHG == nWhich ) { - SwContentFrm::Modify( pOld, pNew ); - if( nWhich == RES_FMT_CHG && getRootFrm()->GetCurrShell() ) + SwContentFrame::Modify( pOld, pNew ); + if( nWhich == RES_FMT_CHG && getRootFrame()->GetCurrShell() ) { // collection has changed Prepare(); @@ -1032,7 +1032,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) hasA11yRelevantAttribute( static_cast<const SwUpdateAttr*>(pNew)->getFormatAttr() ) ) { // #i104008# - SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if ( pViewSh ) { pViewSh->InvalidateAccessibleParaAttrs( *this ); @@ -1050,7 +1050,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) _InvalidatePrt(); if( IsInSct() && !GetPrev() ) { - SwSectionFrm *pSect = FindSctFrm(); + SwSectionFrame *pSect = FindSctFrame(); if( pSect->ContainsAny() == this ) pSect->InvalidatePrt(); } @@ -1156,7 +1156,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) --nCount; if( IsInSct() && !GetPrev() ) { - SwSectionFrm *pSect = FindSctFrm(); + SwSectionFrame *pSect = FindSctFrame(); if( pSect->ContainsAny() == this ) pSect->InvalidatePrt(); } @@ -1182,10 +1182,10 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) for ( size_t i = 0; GetDrawObjs() && i < pObjs->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - if( !pFly->IsFlyInCntFrm() ) + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); + if( !pFly->IsFlyInContentFrame() ) { const SvxBrushItem &rBack = pFly->GetAttrSet()->GetBackground(); @@ -1240,7 +1240,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if( nCount ) { - if( getRootFrm()->GetCurrShell() ) + if( getRootFrame()->GetCurrShell() ) { Prepare(); _InvalidatePrt(); @@ -1279,16 +1279,16 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) aOldSet.ClearItem( RES_PARATR_SPLIT ); aNewSet.ClearItem( RES_PARATR_SPLIT ); } - SwContentFrm::Modify( &aOldSet, &aNewSet ); + SwContentFrame::Modify( &aOldSet, &aNewSet ); } else - SwContentFrm::Modify( pOld, pNew ); + SwContentFrame::Modify( pOld, pNew ); } if (isA11yRelevantAttribute(nWhich)) { // #i88069# - SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if ( pViewSh ) { pViewSh->InvalidateAccessibleParaAttrs( *this ); @@ -1303,7 +1303,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if( pOld && pNew ) { const SwDocPosUpdate *pDocPos = static_cast<const SwDocPosUpdate*>(pOld); - if( pDocPos->nDocPos <= maFrm.Top() ) + if( pDocPos->nDocPos <= maFrame.Top() ) { const SwFormatField *pField = static_cast<const SwFormatField *>(pNew); InvalidateRange( @@ -1329,7 +1329,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if ( !nWhich ) { // is called by e. g. HiddenPara with 0 - SwFrm *pNxt; + SwFrame *pNxt; if ( nullptr != (pNxt = FindNext()) ) pNxt->InvalidatePrt(); } @@ -1343,12 +1343,12 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) CalcFootnoteFlag(); } -bool SwTextFrm::GetInfo( SfxPoolItem &rHint ) const +bool SwTextFrame::GetInfo( SfxPoolItem &rHint ) const { if ( RES_VIRTPAGENUM_INFO == rHint.Which() && IsInDocBody() && ! IsFollow() ) { SwVirtPageNumInfo &rInfo = static_cast<SwVirtPageNumInfo&>(rHint); - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); if ( pPage ) { if ( pPage == rInfo.GetOrigPage() && !GetPrev() ) @@ -1369,9 +1369,9 @@ bool SwTextFrm::GetInfo( SfxPoolItem &rHint ) const return true; } -void SwTextFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify ) +void SwTextFrame::PrepWidows( const sal_uInt16 nNeed, bool bNotify ) { - OSL_ENSURE(GetFollow() && nNeed, "+SwTextFrm::Prepare: lost all friends"); + OSL_ENSURE(GetFollow() && nNeed, "+SwTextFrame::Prepare: lost all friends"); SwParaPortion *pPara = GetPara(); if ( !pPara ) @@ -1421,38 +1421,38 @@ void SwTextFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify ) } } -static bool lcl_ErgoVadis( SwTextFrm* pFrm, sal_Int32 &rPos, const PrepareHint ePrep ) +static bool lcl_ErgoVadis( SwTextFrame* pFrame, sal_Int32 &rPos, const PrepareHint ePrep ) { - const SwFootnoteInfo &rFootnoteInfo = pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); + const SwFootnoteInfo &rFootnoteInfo = pFrame->GetNode()->GetDoc()->GetFootnoteInfo(); if( ePrep == PREP_ERGOSUM ) { if( rFootnoteInfo.aErgoSum.isEmpty() ) return false; - rPos = pFrm->GetOfst(); + rPos = pFrame->GetOfst(); } else { if( rFootnoteInfo.aQuoVadis.isEmpty() ) return false; - if( pFrm->HasFollow() ) - rPos = pFrm->GetFollow()->GetOfst(); + if( pFrame->HasFollow() ) + rPos = pFrame->GetFollow()->GetOfst(); else - rPos = pFrm->GetText().getLength(); + rPos = pFrame->GetText().getLength(); if( rPos ) --rPos; // our last character } return true; } -bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, +bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid, bool bNotify ) { bool bParaPossiblyInvalid = false; - SwFrmSwapper aSwapper( this, false ); + SwFrameSwapper aSwapper( this, false ); #if OSL_DEBUG_LEVEL > 1 - const SwTwips nDbgY = Frm().Top(); + const SwTwips nDbgY = Frame().Top(); (void)nDbgY; #endif @@ -1472,9 +1472,9 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, // so that we format and bUndersized is set (if needed) if( IsInFly() || IsInSct() ) { - SwTwips nTmpBottom = GetUpper()->Frm().Top() + + SwTwips nTmpBottom = GetUpper()->Frame().Top() + GetUpper()->Prt().Bottom(); - if( nTmpBottom < Frm().Bottom() ) + if( nTmpBottom < Frame().Bottom() ) break; } // Are there any free-flying frames on this page? @@ -1488,7 +1488,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, if( GetTextNode()->GetSwAttrSet().GetRegister().GetValue()) break; - SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame())); if ( pGrid && GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() ) break; @@ -1506,7 +1506,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, if( !HasPara() && PREP_MUST_FIT != ePrep ) { SetInvalidVert( true ); // Test - OSL_ENSURE( !IsLocked(), "SwTextFrm::Prepare: three of a perfect pair" ); + OSL_ENSURE( !IsLocked(), "SwTextFrame::Prepare: three of a perfect pair" ); if ( bNotify ) InvalidateSize(); else @@ -1520,13 +1520,13 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, switch( ePrep ) { - case PREP_MOVEFTN : Frm().Height(0); + case PREP_MOVEFTN : Frame().Height(0); Prt().Height(0); _InvalidatePrt(); _InvalidateSize(); /* no break here */ case PREP_ADJUST_FRM : pPara->SetPrepAdjust(); - if( IsFootnoteNumFrm() != pPara->IsFootnoteNum() || + if( IsFootnoteNumFrame() != pPara->IsFootnoteNum() || IsUndersized() ) { InvalidateRange( SwCharRange( 0, 1 ), 1); @@ -1552,9 +1552,9 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, SwTextFootnote const *pFootnote = static_cast<SwTextFootnote const *>(pVoid); if( IsInFootnote() ) { - // Am I the first TextFrm of a footnote? + // Am I the first TextFrame of a footnote? if( !GetPrev() ) - // So we're a TextFrm of the footnote, which has + // So we're a TextFrame of the footnote, which has // to display the footnote number or the ErgoSum text InvalidateRange( SwCharRange( 0, 1 ), 1); @@ -1574,7 +1574,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, } else { - // We are the TextFrm _with_ the footnote + // We are the TextFrame _with_ the footnote const sal_Int32 nPos = pFootnote->GetStart(); InvalidateRange( SwCharRange( nPos, 1 ), 1); } @@ -1646,7 +1646,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, { if ( GetValidPrtAreaFlag() ) { - SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame())); if ( pGrid && GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() ) InvalidatePrt(); } @@ -1658,9 +1658,9 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, { if( IsInFly() ) { - SwTwips nTmpBottom = GetUpper()->Frm().Top() + + SwTwips nTmpBottom = GetUpper()->Frame().Top() + GetUpper()->Prt().Bottom(); - if( nTmpBottom < Frm().Bottom() ) + if( nTmpBottom < Frame().Bottom() ) bFormat = true; } if( !bFormat ) @@ -1740,11 +1740,11 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, InvalidateSize(); _InvalidatePrt(); - SwFrm* pNxt; + SwFrame* pNxt; if ( nullptr != ( pNxt = GetIndNext() ) ) { pNxt->_InvalidatePrt(); - if ( pNxt->IsLayoutFrm() ) + if ( pNxt->IsLayoutFrame() ) pNxt->InvalidatePage(); } SetCompletePaint(); @@ -1826,78 +1826,78 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, * The frame is changed in size and position, its SwParaPortion is moved aside * and a new one is created. * To achieve this, run formatting with bTestFormat flag set. - * In the destructor the TextFrm is reset to its original state. + * In the destructor the TextFrame is reset to its original state. */ class SwTestFormat { - SwTextFrm *pFrm; + SwTextFrame *pFrame; SwParaPortion *pOldPara; - SwRect aOldFrm, aOldPrt; + SwRect aOldFrame, aOldPrt; public: - SwTestFormat( SwTextFrm* pTextFrm, const SwFrm* pPrv, SwTwips nMaxHeight ); + SwTestFormat( SwTextFrame* pTextFrame, const SwFrame* pPrv, SwTwips nMaxHeight ); ~SwTestFormat(); }; -SwTestFormat::SwTestFormat( SwTextFrm* pTextFrm, const SwFrm* pPre, SwTwips nMaxHeight ) - : pFrm( pTextFrm ) +SwTestFormat::SwTestFormat( SwTextFrame* pTextFrame, const SwFrame* pPre, SwTwips nMaxHeight ) + : pFrame( pTextFrame ) { - aOldFrm = pFrm->Frm(); - aOldPrt = pFrm->Prt(); + aOldFrame = pFrame->Frame(); + aOldPrt = pFrame->Prt(); - SWRECTFN( pFrm ) - SwTwips nLower = (pFrm->*fnRect->fnGetBottomMargin)(); + SWRECTFN( pFrame ) + SwTwips nLower = (pFrame->*fnRect->fnGetBottomMargin)(); - pFrm->Frm() = pFrm->GetUpper()->Prt(); - pFrm->Frm() += pFrm->GetUpper()->Frm().Pos(); + pFrame->Frame() = pFrame->GetUpper()->Prt(); + pFrame->Frame() += pFrame->GetUpper()->Frame().Pos(); - (pFrm->Frm().*fnRect->fnSetHeight)( nMaxHeight ); - if( pFrm->GetPrev() ) - (pFrm->Frm().*fnRect->fnSetPosY)( - (pFrm->GetPrev()->Frm().*fnRect->fnGetBottom)() - + (pFrame->Frame().*fnRect->fnSetHeight)( nMaxHeight ); + if( pFrame->GetPrev() ) + (pFrame->Frame().*fnRect->fnSetPosY)( + (pFrame->GetPrev()->Frame().*fnRect->fnGetBottom)() - ( bVert ? nMaxHeight + 1 : 0 ) ); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame ); const SwBorderAttrs &rAttrs = *aAccess.Get(); - (pFrm->Prt().*fnRect->fnSetPosX)( rAttrs.CalcLeft( pFrm ) ); + (pFrame->Prt().*fnRect->fnSetPosX)( rAttrs.CalcLeft( pFrame ) ); if( pPre ) { - SwTwips nUpper = pFrm->CalcUpperSpace( &rAttrs, pPre ); - (pFrm->Prt().*fnRect->fnSetPosY)( nUpper ); + SwTwips nUpper = pFrame->CalcUpperSpace( &rAttrs, pPre ); + (pFrame->Prt().*fnRect->fnSetPosY)( nUpper ); } - (pFrm->Prt().*fnRect->fnSetHeight)( - std::max( 0L , (pFrm->Frm().*fnRect->fnGetHeight)() - - (pFrm->Prt().*fnRect->fnGetTop)() - nLower ) ); - (pFrm->Prt().*fnRect->fnSetWidth)( - (pFrm->Frm().*fnRect->fnGetWidth)() - - ( rAttrs.CalcLeft( pFrm ) + rAttrs.CalcRight( pFrm ) ) ); - pOldPara = pFrm->HasPara() ? pFrm->GetPara() : nullptr; - pFrm->SetPara( new SwParaPortion(), false ); + (pFrame->Prt().*fnRect->fnSetHeight)( + std::max( 0L , (pFrame->Frame().*fnRect->fnGetHeight)() - + (pFrame->Prt().*fnRect->fnGetTop)() - nLower ) ); + (pFrame->Prt().*fnRect->fnSetWidth)( + (pFrame->Frame().*fnRect->fnGetWidth)() - + ( rAttrs.CalcLeft( pFrame ) + rAttrs.CalcRight( pFrame ) ) ); + pOldPara = pFrame->HasPara() ? pFrame->GetPara() : nullptr; + pFrame->SetPara( new SwParaPortion(), false ); - OSL_ENSURE( ! pFrm->IsSwapped(), "A frame is swapped before _Format" ); + OSL_ENSURE( ! pFrame->IsSwapped(), "A frame is swapped before _Format" ); - if ( pFrm->IsVertical() ) - pFrm->SwapWidthAndHeight(); + if ( pFrame->IsVertical() ) + pFrame->SwapWidthAndHeight(); - SwTextFormatInfo aInf( pFrm->getRootFrm()->GetCurrShell()->GetOut(), pFrm, false, true, true ); - SwTextFormatter aLine( pFrm, &aInf ); + SwTextFormatInfo aInf( pFrame->getRootFrame()->GetCurrShell()->GetOut(), pFrame, false, true, true ); + SwTextFormatter aLine( pFrame, &aInf ); - pFrm->_Format( aLine, aInf ); + pFrame->_Format( aLine, aInf ); - if ( pFrm->IsVertical() ) - pFrm->SwapWidthAndHeight(); + if ( pFrame->IsVertical() ) + pFrame->SwapWidthAndHeight(); - OSL_ENSURE( ! pFrm->IsSwapped(), "A frame is swapped after _Format" ); + OSL_ENSURE( ! pFrame->IsSwapped(), "A frame is swapped after _Format" ); } SwTestFormat::~SwTestFormat() { - pFrm->Frm() = aOldFrm; - pFrm->Prt() = aOldPrt; - pFrm->SetPara( pOldPara ); + pFrame->Frame() = aOldFrame; + pFrame->Prt() = aOldPrt; + pFrame->SetPara( pOldPara ); } -bool SwTextFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit ) +bool SwTextFrame::TestFormat( const SwFrame* pPrv, SwTwips &rMaxHeight, bool &bSplit ) { PROTOCOL_ENTER( this, PROT_TESTFORMAT, 0, nullptr ) @@ -1906,7 +1906,7 @@ bool SwTextFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit SwTestFormat aSave( this, pPrv, rMaxHeight ); - return SwTextFrm::WouldFit( rMaxHeight, bSplit, true ); + return SwTextFrame::WouldFit( rMaxHeight, bSplit, true ); } /** @@ -1921,10 +1921,10 @@ bool SwTextFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit * * @returns true if I can split */ -bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) +bool SwTextFrame::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::WouldFit with swapped frame" ); + "SwTextFrame::WouldFit with swapped frame" ); SWRECTFN( this ); if( IsLocked() ) @@ -1936,8 +1936,8 @@ bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) // OD 2004-05-24 #i27801# - correction: 'short cut' for empty paragraph // can *not* be applied, if test format is in progress. The test format doesn't - // adjust the frame and the printing area - see method <SwTextFrm::_Format(..)>, - // which is called in <SwTextFrm::TestFormat(..)> + // adjust the frame and the printing area - see method <SwTextFrame::_Format(..)>, + // which is called in <SwTextFrame::TestFormat(..)> if ( IsEmpty() && !bTst ) { bSplit = false; @@ -1954,34 +1954,34 @@ bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) // GetPara can still be 0 in edge cases // We return true in order to be reformatted on the new Page OSL_ENSURE( HasPara() || IsHiddenNow(), "WouldFit: GetFormatted() and then !HasPara()" ); - if( !HasPara() || ( !(Frm().*fnRect->fnGetHeight)() && IsHiddenNow() ) ) + if( !HasPara() || ( !(Frame().*fnRect->fnGetHeight)() && IsHiddenNow() ) ) return true; // Because the Orphan flag only exists for a short moment, we also check // whether the Framesize is set to very huge by CalcPreps, in order to // force a MoveFwd if( IsWidow() || ( bVert ? - ( 0 == Frm().Left() ) : - ( LONG_MAX - 20000 < Frm().Bottom() ) ) ) + ( 0 == Frame().Left() ) : + ( LONG_MAX - 20000 < Frame().Bottom() ) ) ) { SetWidow(false); if ( GetFollow() ) { // If we've ended up here due to a Widow request by our Follow, we check // whether there's a Follow with a real height at all. - // Else (e.g. for newly created SctFrms) we ignore the IsWidow() and + // Else (e.g. for newly created SctFrames) we ignore the IsWidow() and // still check if we can find enough room - if( ( ( ! bVert && LONG_MAX - 20000 >= Frm().Bottom() ) || - ( bVert && 0 < Frm().Left() ) ) && + if( ( ( ! bVert && LONG_MAX - 20000 >= Frame().Bottom() ) || + ( bVert && 0 < Frame().Left() ) ) && ( GetFollow()->IsVertical() ? - !GetFollow()->Frm().Width() : - !GetFollow()->Frm().Height() ) ) + !GetFollow()->Frame().Width() : + !GetFollow()->Frame().Height() ) ) { - SwTextFrm* pFoll = GetFollow()->GetFollow(); + SwTextFrame* pFoll = GetFollow()->GetFollow(); while( pFoll && ( pFoll->IsVertical() ? - !pFoll->Frm().Width() : - !pFoll->Frm().Height() ) ) + !pFoll->Frame().Width() : + !pFoll->Frame().Height() ) ) pFoll = pFoll->GetFollow(); if( pFoll ) return false; @@ -1996,15 +1996,15 @@ bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) SwTextSizeInfo aInf( this ); SwTextMargin aLine( this, &aInf ); - WidowsAndOrphans aFrmBreak( this, rMaxHeight, bSplit ); + WidowsAndOrphans aFrameBreak( this, rMaxHeight, bSplit ); bool bRet = true; aLine.Bottom(); // is breaking necessary? - bSplit = !aFrmBreak.IsInside( aLine ); + bSplit = !aFrameBreak.IsInside( aLine ); if ( bSplit ) - bRet = !aFrmBreak.IsKeepAlways() && aFrmBreak.WouldFit( aLine, rMaxHeight, bTst ); + bRet = !aFrameBreak.IsKeepAlways() && aFrameBreak.WouldFit( aLine, rMaxHeight, bTst ); else { // we need the total height including the current line @@ -2018,10 +2018,10 @@ bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) return bRet; } -sal_uInt16 SwTextFrm::GetParHeight() const +sal_uInt16 SwTextFrame::GetParHeight() const { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::GetParHeight with swapped frame" ); + "SwTextFrame::GetParHeight with swapped frame" ); if( !HasPara() ) { // For non-empty paragraphs this is a special case @@ -2059,9 +2059,9 @@ sal_uInt16 SwTextFrm::GetParHeight() const /** * @returns this _always_ in the formatted state! */ -SwTextFrm* SwTextFrm::GetFormatted( bool bForceQuickFormat ) +SwTextFrame* SwTextFrame::GetFormatted( bool bForceQuickFormat ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); SwSwapIfSwapped swap( this ); // The IdleCollector could've removed my cached information @@ -2078,13 +2078,13 @@ SwTextFrm* SwTextFrm::GetFormatted( bool bForceQuickFormat ) // format information // Optimization with FormatQuick() if( bFormat && !FormatQuick( bForceQuickFormat ) ) - Format(getRootFrm()->GetCurrShell()->GetOut()); + Format(getRootFrame()->GetCurrShell()->GetOut()); } return this; } -SwTwips SwTextFrm::CalcFitToContent() +SwTwips SwTextFrame::CalcFitToContent() { // #i31490# // If we are currently locked, we better return with a @@ -2095,26 +2095,26 @@ SwTwips SwTextFrm::CalcFitToContent() SwParaPortion* pOldPara = GetPara(); SwParaPortion *pDummy = new SwParaPortion(); SetPara( pDummy, false ); - const SwPageFrm* pPage = FindPageFrm(); + const SwPageFrame* pPage = FindPageFrame(); - const Point aOldFrmPos = Frm().Pos(); - const SwTwips nOldFrmWidth = Frm().Width(); + const Point aOldFramePos = Frame().Pos(); + const SwTwips nOldFrameWidth = Frame().Width(); const SwTwips nOldPrtWidth = Prt().Width(); const SwTwips nPageWidth = GetUpper()->IsVertical() ? pPage->Prt().Height() : pPage->Prt().Width(); - Frm().Width( nPageWidth ); + Frame().Width( nPageWidth ); Prt().Width( nPageWidth ); // #i25422# objects anchored as character in RTL if ( IsRightToLeft() ) - Frm().Pos().X() += nOldFrmWidth - nPageWidth; + Frame().Pos().X() += nOldFrameWidth - nPageWidth; // #i31490# - TextFrmLockGuard aLock( this ); + TextFrameLockGuard aLock( this ); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true, true ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, false, true, true ); aInf.SetIgnoreFly( true ); SwTextFormatter aLine( this, &aInf ); SwHookOut aHook( aInf ); @@ -2123,12 +2123,12 @@ SwTwips SwTextFrm::CalcFitToContent() const SwTwips nMax = std::max( (SwTwips)MINLAY, aLine._CalcFitToContent() + 1 ); - Frm().Width( nOldFrmWidth ); + Frame().Width( nOldFrameWidth ); Prt().Width( nOldPrtWidth ); // #i25422# objects anchored as character in RTL if ( IsRightToLeft() ) - Frm().Pos() = aOldFrmPos; + Frame().Pos() = aOldFramePos; SetPara( pOldPara ); @@ -2141,7 +2141,7 @@ SwTwips SwTextFrm::CalcFitToContent() * line offset for the real text formatting due to the value of label * adjustment attribute of the list level. */ -void SwTextFrm::CalcAdditionalFirstLineOffset() +void SwTextFrame::CalcAdditionalFirstLineOffset() { if ( IsLocked() ) return; @@ -2171,10 +2171,10 @@ void SwTextFrm::CalcAdditionalFirstLineOffset() SetPara( pDummy, false ); // lock paragraph - TextFrmLockGuard aLock( this ); + TextFrameLockGuard aLock( this ); // simulate text formatting - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true, true ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, false, true, true ); aInf.SetIgnoreFly( true ); SwTextFormatter aLine( this, &aInf ); SwHookOut aHook( aInf ); @@ -2225,15 +2225,15 @@ void SwTextFrm::CalcAdditionalFirstLineOffset() * determine the height of the last line, which * uses the font */ -void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont ) +void SwTextFrame::_CalcHeightOfLastLine( const bool _bUseFont ) { // #i71281# // invalidate printing area, if height of last line changes const SwTwips mnOldHeightOfLastLine( mnHeightOfLastLine ); // determine output device - SwViewShell* pVsh = getRootFrm()->GetCurrShell(); - OSL_ENSURE( pVsh, "<SwTextFrm::_GetHeightOfLastLineForPropLineSpacing()> - no SwViewShell" ); + SwViewShell* pVsh = getRootFrame()->GetCurrShell(); + OSL_ENSURE( pVsh, "<SwTextFrame::_GetHeightOfLastLineForPropLineSpacing()> - no SwViewShell" ); // #i78921# - make code robust, according to provided patch // There could be no <SwViewShell> instance in the case of loading a binary @@ -2249,7 +2249,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont ) { pOut = GetTextNode()->getIDocumentDeviceAccess().getReferenceDevice( true ); } - OSL_ENSURE( pOut, "<SwTextFrm::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" ); + OSL_ENSURE( pOut, "<SwTextFrame::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" ); // #i78921# - make code robust, according to provided patch if ( !pOut ) { @@ -2310,7 +2310,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont ) if ( bCalcHeightOfLastLine ) { OSL_ENSURE( HasPara(), - "<SwTextFrm::_CalcHeightOfLastLine()> - missing paragraph portions." ); + "<SwTextFrame::_CalcHeightOfLastLine()> - missing paragraph portions." ); const SwLineLayout* pLineLayout = GetPara(); while ( pLineLayout && pLineLayout->GetNext() ) { @@ -2363,7 +2363,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont ) * value of a proportional line spacing is * returned or not */ -long SwTextFrm::GetLineSpace( const bool _bNoPropLineSpace ) const +long SwTextFrame::GetLineSpace( const bool _bNoPropLineSpace ) const { long nRet = 0; @@ -2405,7 +2405,7 @@ long SwTextFrm::GetLineSpace( const bool _bNoPropLineSpace ) const return nRet; } -sal_uInt16 SwTextFrm::FirstLineHeight() const +sal_uInt16 SwTextFrame::FirstLineHeight() const { if ( !HasPara() ) { @@ -2420,28 +2420,28 @@ sal_uInt16 SwTextFrm::FirstLineHeight() const return pPara->Height(); } -sal_uInt16 SwTextFrm::GetLineCount( sal_Int32 nPos ) +sal_uInt16 SwTextFrame::GetLineCount( sal_Int32 nPos ) { sal_uInt16 nRet = 0; - SwTextFrm *pFrm = this; + SwTextFrame *pFrame = this; do { - pFrm->GetFormatted(); - if( !pFrm->HasPara() ) + pFrame->GetFormatted(); + if( !pFrame->HasPara() ) break; - SwTextSizeInfo aInf( pFrm ); - SwTextMargin aLine( pFrm, &aInf ); + SwTextSizeInfo aInf( pFrame ); + SwTextMargin aLine( pFrame, &aInf ); if( COMPLETE_STRING == nPos ) aLine.Bottom(); else aLine.CharToLine( nPos ); nRet = nRet + aLine.GetLineNr(); - pFrm = pFrm->GetFollow(); - } while ( pFrm && pFrm->GetOfst() <= nPos ); + pFrame = pFrame->GetFollow(); + } while ( pFrame && pFrame->GetOfst() <= nPos ); return nRet; } -void SwTextFrm::ChgThisLines() +void SwTextFrame::ChgThisLines() { // not necessary to format here (GerFormatted etc.), because we have to come from there! sal_uLong nNew = 0; @@ -2474,10 +2474,10 @@ void SwTextFrm::ChgThisLines() mnAllLines -= mnThisLines; mnThisLines = nNew; mnAllLines += mnThisLines; - SwFrm *pNxt = GetNextContentFrm(); + SwFrame *pNxt = GetNextContentFrame(); while( pNxt && pNxt->IsInTab() ) { - if( nullptr != (pNxt = pNxt->FindTabFrm()) ) + if( nullptr != (pNxt = pNxt->FindTabFrame()) ) pNxt = pNxt->FindNextCnt(); } if( pNxt ) @@ -2488,7 +2488,7 @@ void SwTextFrm::ChgThisLines() { SwRepaint& rRepaint = GetPara()->GetRepaint(); rRepaint.Bottom( std::max( rRepaint.Bottom(), - Frm().Top()+Prt().Bottom())); + Frame().Top()+Prt().Bottom())); } } else // Paragraphs which are not counted should not manipulate the AllLines. @@ -2496,7 +2496,7 @@ void SwTextFrm::ChgThisLines() } } -void SwTextFrm::RecalcAllLines() +void SwTextFrame::RecalcAllLines() { ValidateLineNum(); @@ -2513,23 +2513,23 @@ void SwTextFrm::RecalcAllLines() nNewNum = rLineNum.GetStartValue() - 1; // If it is a follow or not has not be considered if it is a restart at each page; the // restart should also take effect at follows. - else if ( bRestart && FindPageFrm()->FindFirstBodyContent() == this ) + else if ( bRestart && FindPageFrame()->FindFirstBodyContent() == this ) { nNewNum = 0; } else { - SwContentFrm *pPrv = GetPrevContentFrm(); + SwContentFrame *pPrv = GetPrevContentFrame(); while ( pPrv && (pPrv->IsInTab() || pPrv->IsInDocBody() != IsInDocBody()) ) - pPrv = pPrv->GetPrevContentFrm(); + pPrv = pPrv->GetPrevContentFrame(); // #i78254# Restart line numbering at page change // First body content may be in table! - if ( bRestart && pPrv && pPrv->FindPageFrm() != FindPageFrm() ) + if ( bRestart && pPrv && pPrv->FindPageFrame() != FindPageFrame() ) pPrv = nullptr; - nNewNum = pPrv ? static_cast<SwTextFrm*>(pPrv)->GetAllLines() : 0; + nNewNum = pPrv ? static_cast<SwTextFrame*>(pPrv)->GetAllLines() : 0; } if ( rLineNum.IsCount() ) nNewNum += GetThisLines(); @@ -2537,10 +2537,10 @@ void SwTextFrm::RecalcAllLines() if ( nOld != nNewNum ) { mnAllLines = nNewNum; - SwContentFrm *pNxt = GetNextContentFrm(); + SwContentFrame *pNxt = GetNextContentFrame(); while ( pNxt && (pNxt->IsInTab() || pNxt->IsInDocBody() != IsInDocBody()) ) - pNxt = pNxt->GetNextContentFrm(); + pNxt = pNxt->GetNextContentFrame(); if ( pNxt ) { if ( pNxt->GetUpper() != GetUpper() ) @@ -2552,7 +2552,7 @@ void SwTextFrm::RecalcAllLines() } } -void SwTextFrm::VisitPortions( SwPortionHandler& rPH ) const +void SwTextFrame::VisitPortions( SwPortionHandler& rPH ) const { const SwParaPortion* pPara = IsValid() ? GetPara() : nullptr; @@ -2579,29 +2579,29 @@ void SwTextFrm::VisitPortions( SwPortionHandler& rPH ) const rPH.Finish(); } -const SwScriptInfo* SwTextFrm::GetScriptInfo() const +const SwScriptInfo* SwTextFrame::GetScriptInfo() const { const SwParaPortion* pPara = GetPara(); return pPara ? &pPara->GetScriptInfo() : nullptr; } /** - * Helper function for SwTextFrm::CalcBasePosForFly() + * Helper function for SwTextFrame::CalcBasePosForFly() */ -static SwTwips lcl_CalcFlyBasePos( const SwTextFrm& rFrm, SwRect aFlyRect, +static SwTwips lcl_CalcFlyBasePos( const SwTextFrame& rFrame, SwRect aFlyRect, SwTextFly& rTextFly ) { - SWRECTFN( (&rFrm) ) - SwTwips nRet = rFrm.IsRightToLeft() ? - (rFrm.Frm().*fnRect->fnGetRight)() : - (rFrm.Frm().*fnRect->fnGetLeft)(); + SWRECTFN( (&rFrame) ) + SwTwips nRet = rFrame.IsRightToLeft() ? + (rFrame.Frame().*fnRect->fnGetRight)() : + (rFrame.Frame().*fnRect->fnGetLeft)(); do { - SwRect aRect = rTextFly.GetFrm( aFlyRect ); + SwRect aRect = rTextFly.GetFrame( aFlyRect ); if ( 0 != (aRect.*fnRect->fnGetWidth)() ) { - if ( rFrm.IsRightToLeft() ) + if ( rFrame.IsRightToLeft() ) { if ( (aRect.*fnRect->fnGetRight)() - (aFlyRect.*fnRect->fnGetRight)() >= 0 ) @@ -2634,10 +2634,10 @@ static SwTwips lcl_CalcFlyBasePos( const SwTextFrm& rFrm, SwRect aFlyRect, return nRet; } -void SwTextFrm::CalcBaseOfstForFly() +void SwTextFrame::CalcBaseOfstForFly() { OSL_ENSURE( !IsVertical() || !IsSwapped(), - "SwTextFrm::CalcBasePosForFly with swapped frame!" ); + "SwTextFrame::CalcBasePosForFly with swapped frame!" ); const SwNode* pNode = GetTextNode(); if ( !pNode->getIDocumentSettingAccess()->get(DocumentSettingId::ADD_FLY_OFFSETS) ) @@ -2645,7 +2645,7 @@ void SwTextFrm::CalcBaseOfstForFly() SWRECTFN( this ) - SwRect aFlyRect( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + SwRect aFlyRect( Frame().Pos() + Prt().Pos(), Prt().SSize() ); // Get first 'real' line and adjust position and height of line rectangle // OD 08.09.2003 #110978#, #108749#, #110354# - correct behaviour, @@ -2678,8 +2678,8 @@ void SwTextFrm::CalcBaseOfstForFly() // make values relative to frame start position SwTwips nLeft = IsRightToLeft() ? - (Frm().*fnRect->fnGetRight)() : - (Frm().*fnRect->fnGetLeft)(); + (Frame().*fnRect->fnGetRight)() : + (Frame().*fnRect->fnGetLeft)(); mnFlyAnchorOfst = nRet1 - nLeft; mnFlyAnchorOfstNoWrap = nRet2 - nLeft; @@ -2688,14 +2688,14 @@ void SwTextFrm::CalcBaseOfstForFly() /** * Repaint all text frames of the given text node */ -void SwTextFrm::repaintTextFrames( const SwTextNode& rNode ) +void SwTextFrame::repaintTextFrames( const SwTextNode& rNode ) { - SwIterator<SwTextFrm,SwTextNode> aIter( rNode ); - for( const SwTextFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( rNode ); + for( const SwTextFrame *pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - SwRect aRec( pFrm->PaintArea() ); - const SwRootFrm *pRootFrm = pFrm->getRootFrm(); - SwViewShell *pCurShell = pRootFrm ? pRootFrm->GetCurrShell() : nullptr; + SwRect aRec( pFrame->PaintArea() ); + const SwRootFrame *pRootFrame = pFrame->getRootFrame(); + SwViewShell *pCurShell = pRootFrame ? pRootFrame->GetCurrShell() : nullptr; if( pCurShell ) pCurShell->InvalidateWindows( aRec ); } diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 2c5255cff428..c9169818a3c5 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -55,35 +55,35 @@ using namespace ::com::sun::star; -bool SwTextFrm::_IsFootnoteNumFrm() const +bool SwTextFrame::_IsFootnoteNumFrame() const { - const SwFootnoteFrm* pFootnote = FindFootnoteFrm()->GetMaster(); + const SwFootnoteFrame* pFootnote = FindFootnoteFrame()->GetMaster(); while( pFootnote && !pFootnote->ContainsContent() ) pFootnote = pFootnote->GetMaster(); return !pFootnote; } /** - * Looks for the TextFrm matching the SwTextFootnote within a master-follow chain + * Looks for the TextFrame matching the SwTextFootnote within a master-follow chain */ -SwTextFrm *SwTextFrm::FindFootnoteRef( const SwTextFootnote *pFootnote ) +SwTextFrame *SwTextFrame::FindFootnoteRef( const SwTextFootnote *pFootnote ) { - SwTextFrm *pFrm = this; + SwTextFrame *pFrame = this; const bool bFwd = pFootnote->GetStart() >= GetOfst(); - while( pFrm ) + while( pFrame ) { - if( SwFootnoteBossFrm::FindFootnote( pFrm, pFootnote ) ) - return pFrm; - pFrm = bFwd ? pFrm->GetFollow() : - pFrm->IsFollow() ? pFrm->FindMaster() : nullptr; + if( SwFootnoteBossFrame::FindFootnote( pFrame, pFootnote ) ) + return pFrame; + pFrame = bFwd ? pFrame->GetFollow() : + pFrame->IsFollow() ? pFrame->FindMaster() : nullptr; } - return pFrm; + return pFrame; } #ifdef DBG_UTIL -void SwTextFrm::CalcFootnoteFlag( sal_Int32 nStop )// For testing the SplitFrm +void SwTextFrame::CalcFootnoteFlag( sal_Int32 nStop )// For testing the SplitFrame #else -void SwTextFrm::CalcFootnoteFlag() +void SwTextFrame::CalcFootnoteFlag() #endif { mbFootnote = false; @@ -118,33 +118,33 @@ void SwTextFrm::CalcFootnoteFlag() } } -bool SwTextFrm::CalcPrepFootnoteAdjust() +bool SwTextFrame::CalcPrepFootnoteAdjust() { OSL_ENSURE( HasFootnote(), "Who´s calling me?" ); - SwFootnoteBossFrm *pBoss = FindFootnoteBossFrm( true ); - const SwFootnoteFrm *pFootnote = pBoss->FindFirstFootnote( this ); + SwFootnoteBossFrame *pBoss = FindFootnoteBossFrame( true ); + const SwFootnoteFrame *pFootnote = pBoss->FindFirstFootnote( this ); if( pFootnote && FTNPOS_CHAPTER != GetNode()->GetDoc()->GetFootnoteInfo().ePos && - ( !pBoss->GetUpper()->IsSctFrm() || - !static_cast<SwSectionFrm*>(pBoss->GetUpper())->IsFootnoteAtEnd() ) ) + ( !pBoss->GetUpper()->IsSctFrame() || + !static_cast<SwSectionFrame*>(pBoss->GetUpper())->IsFootnoteAtEnd() ) ) { - const SwFootnoteContFrm *pCont = pBoss->FindFootnoteCont(); + const SwFootnoteContFrame *pCont = pBoss->FindFootnoteCont(); bool bReArrange = true; SWRECTFN( this ) - if ( pCont && (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), - (Frm().*fnRect->fnGetBottom)() ) > 0 ) + if ( pCont && (*fnRect->fnYDiff)( (pCont->Frame().*fnRect->fnGetTop)(), + (Frame().*fnRect->fnGetBottom)() ) > 0 ) { - pBoss->RearrangeFootnotes( (Frm().*fnRect->fnGetBottom)(), false, + pBoss->RearrangeFootnotes( (Frame().*fnRect->fnGetBottom)(), false, pFootnote->GetAttr() ); - ValidateBodyFrm(); - ValidateFrm(); + ValidateBodyFrame(); + ValidateFrame(); pFootnote = pBoss->FindFirstFootnote( this ); } else bReArrange = false; - if( !pCont || !pFootnote || bReArrange != (pFootnote->FindFootnoteBossFrm() == pBoss) ) + if( !pCont || !pFootnote || bReArrange != (pFootnote->FindFootnoteBossFrame() == pBoss) ) { - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this ); SwTextFormatter aLine( this, &aInf ); aLine.TruncLines(); SetPara( nullptr ); // May be deleted! @@ -159,45 +159,45 @@ bool SwTextFrm::CalcPrepFootnoteAdjust() * Local helper function. Checks if nLower should be taken as the boundary * for the footnote. */ -static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) +static SwTwips lcl_GetFootnoteLower( const SwTextFrame* pFrame, SwTwips nLower ) { // nLower is an absolute value. It denotes the bottom of the line // containing the footnote. - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) - OSL_ENSURE( !pFrm->IsVertical() || !pFrm->IsSwapped(), + OSL_ENSURE( !pFrame->IsVertical() || !pFrame->IsSwapped(), "lcl_GetFootnoteLower with swapped frame" ); SwTwips nAdd; SwTwips nRet = nLower; // Check if text is inside a table. - if ( pFrm->IsInTab() ) + if ( pFrame->IsInTab() ) { - // If pFrm is inside a table, we have to check if + // If pFrame is inside a table, we have to check if // a) The table is not allowed to split or // b) The table row is not allowed to split // Inside a table, there are no footnotes, - // see SwFrm::FindFootnoteBossFrm. So we don't have to check - // the case that pFrm is inside a (footnote collecting) section + // see SwFrame::FindFootnoteBossFrame. So we don't have to check + // the case that pFrame is inside a (footnote collecting) section // within the table. - const SwFrm* pRow = pFrm; - while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) + const SwFrame* pRow = pFrame; + while( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) pRow = pRow->GetUpper(); - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pRow->GetUpper()); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pRow->GetUpper()); - OSL_ENSURE( pTabFrm && pRow && - pRow->GetUpper()->IsTabFrm(), "Upper of row should be tab" ); + OSL_ENSURE( pTabFrame && pRow && + pRow->GetUpper()->IsTabFrame(), "Upper of row should be tab" ); - const bool bDontSplit = !pTabFrm->IsFollow() && - !pTabFrm->IsLayoutSplitAllowed(); + const bool bDontSplit = !pTabFrame->IsFollow() && + !pTabFrame->IsLayoutSplitAllowed(); SwTwips nMin = 0; if ( bDontSplit ) - nMin = (pTabFrm->Frm().*fnRect->fnGetBottom)(); - else if ( !static_cast<const SwRowFrm*>(pRow)->IsRowSplitAllowed() ) - nMin = (pRow->Frm().*fnRect->fnGetBottom)(); + nMin = (pTabFrame->Frame().*fnRect->fnGetBottom)(); + else if ( !static_cast<const SwRowFrame*>(pRow)->IsRowSplitAllowed() ) + nMin = (pRow->Frame().*fnRect->fnGetBottom)(); if ( nMin && (*fnRect->fnYDiff)( nMin, nLower ) > 0 ) nRet = nMin; @@ -205,7 +205,7 @@ static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) nAdd = (pRow->GetUpper()->*fnRect->fnGetBottomMargin)(); } else - nAdd = (pFrm->*fnRect->fnGetBottomMargin)(); + nAdd = (pFrame->*fnRect->fnGetBottomMargin)(); if( nAdd > 0 ) { @@ -217,22 +217,22 @@ static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) // #i10770#: If there are fly frames anchored at previous paragraphs, // the deadline should consider their lower borders. - const SwFrm* pStartFrm = pFrm->GetUpper()->GetLower(); - OSL_ENSURE( pStartFrm, "Upper has no lower" ); + const SwFrame* pStartFrame = pFrame->GetUpper()->GetLower(); + OSL_ENSURE( pStartFrame, "Upper has no lower" ); SwTwips nFlyLower = bVert ? LONG_MAX : 0; - while ( pStartFrm != pFrm ) + while ( pStartFrame != pFrame ) { - OSL_ENSURE( pStartFrm, "Frame chain is broken" ); - if ( pStartFrm->GetDrawObjs() ) + OSL_ENSURE( pStartFrame, "Frame chain is broken" ); + if ( pStartFrame->GetDrawObjs() ) { - const SwSortedObjs &rObjs = *pStartFrm->GetDrawObjs(); + const SwSortedObjs &rObjs = *pStartFrame->GetDrawObjs(); for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; SwRect aRect( pAnchoredObj->GetObjRect() ); - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr || - static_cast<SwFlyFrm*>(pAnchoredObj)->IsValid() ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr || + static_cast<SwFlyFrame*>(pAnchoredObj)->IsValid() ) { const SwTwips nBottom = (aRect.*fnRect->fnGetBottom)(); if ( (*fnRect->fnYDiff)( nBottom, nFlyLower ) > 0 ) @@ -241,7 +241,7 @@ static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) } } - pStartFrm = pStartFrm->GetNext(); + pStartFrame = pStartFrame->GetNext(); } if ( bVert ) @@ -252,12 +252,12 @@ static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) return nRet; } -SwTwips SwTextFrm::GetFootnoteLine( const SwTextFootnote *pFootnote ) const +SwTwips SwTextFrame::GetFootnoteLine( const SwTextFootnote *pFootnote ) const { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::GetFootnoteLine with swapped frame" ); + "SwTextFrame::GetFootnoteLine with swapped frame" ); - SwTextFrm *pThis = const_cast<SwTextFrm*>(this); + SwTextFrame *pThis = const_cast<SwTextFrame*>(this); if( !HasPara() ) { @@ -265,12 +265,12 @@ SwTwips SwTextFrm::GetFootnoteLine( const SwTextFootnote *pFootnote ) const // the frame is currently locked. We return the previous value. return pThis->mnFootnoteLine > 0 ? pThis->mnFootnoteLine : - IsVertical() ? Frm().Left() : Frm().Bottom(); + IsVertical() ? Frame().Left() : Frame().Bottom(); } SwTwips nRet; { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); SwTextInfo aInf( pThis ); SwTextIter aLine( pThis, &aInf ); @@ -289,40 +289,40 @@ SwTwips SwTextFrm::GetFootnoteLine( const SwTextFootnote *pFootnote ) const } /** - * Calculates the maximum reachable height for the TextFrm in the Footnote Area. + * Calculates the maximum reachable height for the TextFrame in the Footnote Area. * The cell's bottom margin with the Footnote Reference limit's this height. */ -SwTwips SwTextFrm::_GetFootnoteFrmHeight() const +SwTwips SwTextFrame::_GetFootnoteFrameHeight() const { - OSL_ENSURE( !IsFollow() && IsInFootnote(), "SwTextFrm::SetFootnoteLine: moon walk" ); + OSL_ENSURE( !IsFollow() && IsInFootnote(), "SwTextFrame::SetFootnoteLine: moon walk" ); - const SwFootnoteFrm *pFootnoteFrm = FindFootnoteFrm(); - const SwTextFrm *pRef = static_cast<const SwTextFrm *>(pFootnoteFrm->GetRef()); - const SwFootnoteBossFrm *pBoss = FindFootnoteBossFrm(); - if( pBoss != pRef->FindFootnoteBossFrm( !pFootnoteFrm->GetAttr()-> + const SwFootnoteFrame *pFootnoteFrame = FindFootnoteFrame(); + const SwTextFrame *pRef = static_cast<const SwTextFrame *>(pFootnoteFrame->GetRef()); + const SwFootnoteBossFrame *pBoss = FindFootnoteBossFrame(); + if( pBoss != pRef->FindFootnoteBossFrame( !pFootnoteFrame->GetAttr()-> GetFootnote().IsEndNote() ) ) return 0; - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(this)); SwTwips nHeight = pRef->IsInFootnoteConnect() ? - 1 : pRef->GetFootnoteLine( pFootnoteFrm->GetAttr() ); + 1 : pRef->GetFootnoteLine( pFootnoteFrame->GetAttr() ); if( nHeight ) { // As odd as it may seem: the first Footnote on the page may not touch the // Footnote Reference, when entering text in the Footnote Area. - const SwFrm *pCont = pFootnoteFrm->GetUpper(); + const SwFrame *pCont = pFootnoteFrame->GetUpper(); // Height within the Container which we're allowed to consume anyways SWRECTFN( pCont ) SwTwips nTmp = (*fnRect->fnYDiff)( (pCont->*fnRect->fnGetPrtBottom)(), - (Frm().*fnRect->fnGetTop)() ); + (Frame().*fnRect->fnGetTop)() ); #if OSL_DEBUG_LEVEL > 0 if( nTmp < 0 ) { bool bInvalidPos = false; - const SwLayoutFrm* pTmp = GetUpper(); + const SwLayoutFrame* pTmp = GetUpper(); while( !bInvalidPos && pTmp ) { bInvalidPos = !pTmp->GetValidPosFlag() || @@ -335,16 +335,16 @@ SwTwips SwTextFrm::_GetFootnoteFrmHeight() const } #endif - if ( (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), nHeight) > 0 ) + if ( (*fnRect->fnYDiff)( (pCont->Frame().*fnRect->fnGetTop)(), nHeight) > 0 ) { // Growth potential of the container if ( !pRef->IsInFootnoteConnect() ) { - SwSaveFootnoteHeight aSave( const_cast<SwFootnoteBossFrm*>(pBoss), nHeight ); - nHeight = const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pCont))->Grow( LONG_MAX, true ); + SwSaveFootnoteHeight aSave( const_cast<SwFootnoteBossFrame*>(pBoss), nHeight ); + nHeight = const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pCont))->Grow( LONG_MAX, true ); } else - nHeight = const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pCont))->Grow( LONG_MAX, true ); + nHeight = const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pCont))->Grow( LONG_MAX, true ); nHeight += nTmp; if( nHeight < 0 ) @@ -352,7 +352,7 @@ SwTwips SwTextFrm::_GetFootnoteFrmHeight() const } else { // The container has to shrink - nTmp += (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), nHeight); + nTmp += (*fnRect->fnYDiff)( (pCont->Frame().*fnRect->fnGetTop)(), nHeight); if( nTmp > 0 ) nHeight = nTmp; else @@ -363,30 +363,30 @@ SwTwips SwTextFrm::_GetFootnoteFrmHeight() const return nHeight; } -SwTextFrm *SwTextFrm::FindQuoVadisFrm() +SwTextFrame *SwTextFrame::FindQuoVadisFrame() { - // Check whether we're in a FootnoteFrm + // Check whether we're in a FootnoteFrame if( GetIndPrev() || !IsInFootnote() ) return nullptr; - // To the preceding FootnoteFrm - SwFootnoteFrm *pFootnoteFrm = FindFootnoteFrm()->GetMaster(); - if( !pFootnoteFrm ) + // To the preceding FootnoteFrame + SwFootnoteFrame *pFootnoteFrame = FindFootnoteFrame()->GetMaster(); + if( !pFootnoteFrame ) return nullptr; // Now the last Content - SwContentFrm *pCnt = pFootnoteFrm->ContainsContent(); + SwContentFrame *pCnt = pFootnoteFrame->ContainsContent(); if( !pCnt ) return nullptr; - SwContentFrm *pLast; + SwContentFrame *pLast; do { pLast = pCnt; - pCnt = pCnt->GetNextContentFrm(); - } while( pCnt && pFootnoteFrm->IsAnLower( pCnt ) ); - return static_cast<SwTextFrm*>(pLast); + pCnt = pCnt->GetNextContentFrame(); + } while( pCnt && pFootnoteFrame->IsAnLower( pCnt ) ); + return static_cast<SwTextFrame*>(pLast); } -void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) +void SwTextFrame::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) { if ( !IsFootnoteAllowed() ) return; @@ -398,7 +398,7 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) bool bRollBack = nLen != COMPLETE_STRING; const size_t nSize = pHints->Count(); sal_Int32 nEnd; - SwTextFrm* pSource; + SwTextFrame* pSource; if( bRollBack ) { nEnd = nStart + nLen; @@ -414,10 +414,10 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) if( nSize ) { - SwPageFrm* pUpdate = nullptr; + SwPageFrame* pUpdate = nullptr; bool bRemove = false; - SwFootnoteBossFrm *pFootnoteBoss = nullptr; - SwFootnoteBossFrm *pEndBoss = nullptr; + SwFootnoteBossFrame *pFootnoteBoss = nullptr; + SwFootnoteBossFrame *pEndBoss = nullptr; bool bFootnoteEndDoc = FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFootnoteInfo().ePos; for ( size_t i = nSize; i; ) @@ -438,16 +438,16 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) if( bEndn ) { if( !pEndBoss ) - pEndBoss = pSource->FindFootnoteBossFrm(); + pEndBoss = pSource->FindFootnoteBossFrame(); } else { if( !pFootnoteBoss ) { - pFootnoteBoss = pSource->FindFootnoteBossFrm( true ); - if( pFootnoteBoss->GetUpper()->IsSctFrm() ) + pFootnoteBoss = pSource->FindFootnoteBossFrame( true ); + if( pFootnoteBoss->GetUpper()->IsSctFrame() ) { - SwSectionFrm* pSect = static_cast<SwSectionFrm*>( + SwSectionFrame* pSect = static_cast<SwSectionFrame*>( pFootnoteBoss->GetUpper()); if( pSect->IsFootnoteAtEnd() ) bFootnoteEndDoc = false; @@ -467,42 +467,42 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) // -> Footnote moves into the PrevFollow // // Both need to be on one Page/in one Column - SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote(pSource, pFootnote); + SwFootnoteFrame *pFootnoteFrame = SwFootnoteBossFrame::FindFootnote(pSource, pFootnote); - if( pFootnoteFrm ) + if( pFootnoteFrame ) { const bool bEndDoc = bEndn || bFootnoteEndDoc; if( bRollBack ) { - while ( pFootnoteFrm ) + while ( pFootnoteFrame ) { - pFootnoteFrm->SetRef( this ); - pFootnoteFrm = pFootnoteFrm->GetFollow(); + pFootnoteFrame->SetRef( this ); + pFootnoteFrame = pFootnoteFrame->GetFollow(); SetFootnote( true ); } } else if( GetFollow() ) { - SwContentFrm *pDest = GetFollow(); - while( pDest->GetFollow() && static_cast<SwTextFrm*>(pDest-> + SwContentFrame *pDest = GetFollow(); + while( pDest->GetFollow() && static_cast<SwTextFrame*>(pDest-> GetFollow())->GetOfst() <= nIdx ) pDest = pDest->GetFollow(); - OSL_ENSURE( !SwFootnoteBossFrm::FindFootnote( - pDest,pFootnote),"SwTextFrm::RemoveFootnote: footnote exists"); + OSL_ENSURE( !SwFootnoteBossFrame::FindFootnote( + pDest,pFootnote),"SwTextFrame::RemoveFootnote: footnote exists"); // Never deregister; always move if ( bEndDoc || - !pFootnoteFrm->FindFootnoteBossFrm()->IsBefore( pDest->FindFootnoteBossFrm( !bEndn ) ) + !pFootnoteFrame->FindFootnoteBossFrame()->IsBefore( pDest->FindFootnoteBossFrame( !bEndn ) ) ) { - SwPageFrm* pTmp = pFootnoteFrm->FindPageFrm(); + SwPageFrame* pTmp = pFootnoteFrame->FindPageFrame(); if( pUpdate && pUpdate != pTmp ) pUpdate->UpdateFootnoteNum(); pUpdate = pTmp; - while ( pFootnoteFrm ) + while ( pFootnoteFrame ) { - pFootnoteFrm->SetRef( pDest ); - pFootnoteFrm = pFootnoteFrm->GetFollow(); + pFootnoteFrame->SetRef( pDest ); + pFootnoteFrame = pFootnoteFrame->GetFollow(); } } else @@ -510,24 +510,24 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) pFootnoteBoss->MoveFootnotes( this, pDest, pFootnote ); bRemove = true; } - static_cast<SwTextFrm*>(pDest)->SetFootnote( true ); + static_cast<SwTextFrame*>(pDest)->SetFootnote( true ); - OSL_ENSURE( SwFootnoteBossFrm::FindFootnote( pDest, - pFootnote),"SwTextFrm::RemoveFootnote: footnote ChgRef failed"); + OSL_ENSURE( SwFootnoteBossFrame::FindFootnote( pDest, + pFootnote),"SwTextFrame::RemoveFootnote: footnote ChgRef failed"); } else { if( !bEndDoc || ( bEndn && pEndBoss->IsInSct() && !SwLayouter::Collecting( GetNode()->GetDoc(), - pEndBoss->FindSctFrm(), nullptr ) ) ) + pEndBoss->FindSctFrame(), nullptr ) ) ) { if( bEndn ) pEndBoss->RemoveFootnote( this, pFootnote ); else pFootnoteBoss->RemoveFootnote( this, pFootnote ); bRemove = bRemove || !bEndDoc; - OSL_ENSURE( !SwFootnoteBossFrm::FindFootnote( this, pFootnote ), - "SwTextFrm::RemoveFootnote: can't get off that footnote" ); + OSL_ENSURE( !SwFootnoteBossFrame::FindFootnote( this, pFootnote ), + "SwTextFrame::RemoveFootnote: can't get off that footnote" ); } } } @@ -539,8 +539,8 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) // We brake the oscillation if( bRemove && !bFootnoteEndDoc && HasPara() ) { - ValidateBodyFrm(); - ValidateFrm(); + ValidateBodyFrame(); + ValidateFrame(); } } @@ -564,7 +564,7 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) * We basically only have two possibilities: * * a) The Footnote is already present - * => we move it, if another pSrcFrm has been found + * => we move it, if another pSrcFrame has been found * * b) The Footnote is not present * => we have it created for us @@ -579,10 +579,10 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) * * @returns false on any type of error */ -void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine ) +void SwTextFrame::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine ) { OSL_ENSURE( !IsVertical() || !IsSwapped(), - "SwTextFrm::ConnectFootnote with swapped frame" ); + "SwTextFrame::ConnectFootnote with swapped frame" ); mbFootnote = true; mbInFootnoteConnect = true; // Just reset! @@ -593,122 +593,122 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL mnFootnoteLine = nDeadLine; // We always need a parent (Page/Column) - SwSectionFrm *pSect; - SwContentFrm *pContent = this; + SwSectionFrame *pSect; + SwContentFrame *pContent = this; if( bEnd && IsInSct() ) { - pSect = FindSctFrm(); + pSect = FindSctFrame(); if( pSect->IsEndnAtEnd() ) pContent = pSect->FindLastContent( FINDMODE_ENDNOTE ); if( !pContent ) pContent = this; } - SwFootnoteBossFrm *pBoss = pContent->FindFootnoteBossFrm( !bEnd ); + SwFootnoteBossFrame *pBoss = pContent->FindFootnoteBossFrame( !bEnd ); #if OSL_DEBUG_LEVEL > 1 SwTwips nRstHeight = GetRstHeight(); #endif - pSect = pBoss->FindSctFrm(); + pSect = pBoss->FindSctFrame(); bool bDocEnd = bEnd ? !( pSect && pSect->IsEndnAtEnd() ) : ( !( pSect && pSect->IsFootnoteAtEnd() ) && FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFootnoteInfo().ePos ); // Footnote can be registered with the Follow - SwContentFrm *pSrcFrm = FindFootnoteRef( pFootnote ); + SwContentFrame *pSrcFrame = FindFootnoteRef( pFootnote ); if( bDocEnd ) { - if( pSect && pSrcFrm ) + if( pSect && pSrcFrame ) { - SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ); - if( pFootnoteFrm && pFootnoteFrm->IsInSct() ) + SwFootnoteFrame *pFootnoteFrame = SwFootnoteBossFrame::FindFootnote( pSrcFrame, pFootnote ); + if( pFootnoteFrame && pFootnoteFrame->IsInSct() ) { - pBoss->RemoveFootnote( pSrcFrm, pFootnote ); - pSrcFrm = nullptr; + pBoss->RemoveFootnote( pSrcFrame, pFootnote ); + pSrcFrame = nullptr; } } } else if( bEnd && pSect ) { - SwFootnoteFrm *pFootnoteFrm = pSrcFrm ? SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ) : nullptr; - if( pFootnoteFrm && !pFootnoteFrm->GetUpper() ) - pFootnoteFrm = nullptr; + SwFootnoteFrame *pFootnoteFrame = pSrcFrame ? SwFootnoteBossFrame::FindFootnote( pSrcFrame, pFootnote ) : nullptr; + if( pFootnoteFrame && !pFootnoteFrame->GetUpper() ) + pFootnoteFrame = nullptr; SwDoc *pDoc = GetNode()->GetDoc(); - if( SwLayouter::Collecting( pDoc, pSect, pFootnoteFrm ) ) + if( SwLayouter::Collecting( pDoc, pSect, pFootnoteFrame ) ) { - if( !pSrcFrm ) + if( !pSrcFrame ) { - SwFootnoteFrm *pNew = new SwFootnoteFrm(pDoc->GetDfltFrameFormat(),this,this,pFootnote); + SwFootnoteFrame *pNew = new SwFootnoteFrame(pDoc->GetDfltFrameFormat(),this,this,pFootnote); SwNodeIndex aIdx( *pFootnote->GetStartNode(), 1 ); ::_InsertCnt( pNew, pDoc, aIdx.GetIndex() ); GetNode()->getIDocumentLayoutAccess().GetLayouter()->CollectEndnote( pNew ); } - else if( pSrcFrm != this ) - SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this ); + else if( pSrcFrame != this ) + SwFootnoteBossFrame::ChangeFootnoteRef( pSrcFrame, pFootnote, this ); mbInFootnoteConnect = false; return; } - else if( pSrcFrm ) + else if( pSrcFrame ) { - SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm(); + SwFootnoteBossFrame *pFootnoteBoss = pFootnoteFrame->FindFootnoteBossFrame(); if( !pFootnoteBoss->IsInSct() || - pFootnoteBoss->ImplFindSctFrm()->GetSection()!=pSect->GetSection() ) + pFootnoteBoss->ImplFindSctFrame()->GetSection()!=pSect->GetSection() ) { - pBoss->RemoveFootnote( pSrcFrm, pFootnote ); - pSrcFrm = nullptr; + pBoss->RemoveFootnote( pSrcFrame, pFootnote ); + pSrcFrame = nullptr; } } } if( bDocEnd || bEnd ) { - if( !pSrcFrm ) + if( !pSrcFrame ) pBoss->AppendFootnote( this, pFootnote ); - else if( pSrcFrm != this ) - SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this ); + else if( pSrcFrame != this ) + SwFootnoteBossFrame::ChangeFootnoteRef( pSrcFrame, pFootnote, this ); mbInFootnoteConnect = false; return; } SwSaveFootnoteHeight aHeight( pBoss, nDeadLine ); - if( !pSrcFrm ) // No Footnote was found at all + if( !pSrcFrame ) // No Footnote was found at all pBoss->AppendFootnote( this, pFootnote ); else { - SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ); - SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm(); + SwFootnoteFrame *pFootnoteFrame = SwFootnoteBossFrame::FindFootnote( pSrcFrame, pFootnote ); + SwFootnoteBossFrame *pFootnoteBoss = pFootnoteFrame->FindFootnoteBossFrame(); bool bBrutal = false; if( pFootnoteBoss == pBoss ) // Ref and Footnote are on the same Page/Column { - SwFrm *pCont = pFootnoteFrm->GetUpper(); + SwFrame *pCont = pFootnoteFrame->GetUpper(); SWRECTFN ( pCont ) - long nDiff = (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), + long nDiff = (*fnRect->fnYDiff)( (pCont->Frame().*fnRect->fnGetTop)(), nDeadLine ); if( nDiff >= 0 ) { // If the Footnote has been registered to a Follow, we need to // rewire it now too - if ( pSrcFrm != this ) - SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this ); + if ( pSrcFrame != this ) + SwFootnoteBossFrame::ChangeFootnoteRef( pSrcFrame, pFootnote, this ); // We have some room left, so the Footnote can grow - if ( pFootnoteFrm->GetFollow() && nDiff > 0 ) + if ( pFootnoteFrame->GetFollow() && nDiff > 0 ) { - SwTwips nHeight = (pCont->Frm().*fnRect->fnGetHeight)(); + SwTwips nHeight = (pCont->Frame().*fnRect->fnGetHeight)(); pBoss->RearrangeFootnotes( nDeadLine, false, pFootnote ); - ValidateBodyFrm(); - ValidateFrm(); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); - if ( pSh && nHeight == (pCont->Frm().*fnRect->fnGetHeight)() ) + ValidateBodyFrame(); + ValidateFrame(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); + if ( pSh && nHeight == (pCont->Frame().*fnRect->fnGetHeight)() ) // So that we don't miss anything - pSh->InvalidateWindows( pCont->Frm() ); + pSh->InvalidateWindows( pCont->Frame() ); } mbInFootnoteConnect = false; return; @@ -719,26 +719,26 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL else { // Ref and Footnote are not on one Page; attempt to move is necessary - SwFrm* pTmp = this; - while( pTmp->GetNext() && pSrcFrm != pTmp ) + SwFrame* pTmp = this; + while( pTmp->GetNext() && pSrcFrame != pTmp ) pTmp = pTmp->GetNext(); - if( pSrcFrm == pTmp ) + if( pSrcFrame == pTmp ) bBrutal = true; else { // If our Parent is in a column Area, but the Page already has a // FootnoteContainer, we can only brute force it - if( pSect && pSect->FindFootnoteBossFrm( !bEnd )->FindFootnoteCont() ) + if( pSect && pSect->FindFootnoteBossFrame( !bEnd )->FindFootnoteCont() ) bBrutal = true; - else if ( !pFootnoteFrm->GetPrev() || + else if ( !pFootnoteFrame->GetPrev() || pFootnoteBoss->IsBefore( pBoss ) ) { - SwFootnoteBossFrm *pSrcBoss = pSrcFrm->FindFootnoteBossFrm( !bEnd ); - pSrcBoss->MoveFootnotes( pSrcFrm, this, pFootnote ); + SwFootnoteBossFrame *pSrcBoss = pSrcFrame->FindFootnoteBossFrame( !bEnd ); + pSrcBoss->MoveFootnotes( pSrcFrame, this, pFootnote ); } else - SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this ); + SwFootnoteBossFrame::ChangeFootnoteRef( pSrcFrame, pFootnote, this ); } } @@ -747,7 +747,7 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL // nMaxFootnoteHeight after RemoveFootnote if( bBrutal ) { - pBoss->RemoveFootnote( pSrcFrm, pFootnote, false ); + pBoss->RemoveFootnote( pSrcFrame, pFootnote, false ); SwSaveFootnoteHeight *pHeight = bEnd ? nullptr : new SwSaveFootnoteHeight( pBoss, nDeadLine ); pBoss->AppendFootnote( this, pFootnote ); delete pHeight; @@ -760,20 +760,20 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL { // Validate environment, to avoid oscillation SwSaveFootnoteHeight aNochmal( pBoss, nDeadLine ); - ValidateBodyFrm(); + ValidateBodyFrame(); pBoss->RearrangeFootnotes( nDeadLine, true ); - ValidateFrm(); + ValidateFrame(); } else if( pSect->IsFootnoteAtEnd() ) { - ValidateBodyFrm(); - ValidateFrm(); + ValidateBodyFrame(); + ValidateFrame(); } #if OSL_DEBUG_LEVEL > 1 - // pFootnoteFrm may have changed due to Calc ... - SwFootnoteFrm *pFootnoteFrm = pBoss->FindFootnote( this, pFootnote ); - if( pFootnoteFrm && pBoss != pFootnoteFrm->FindFootnoteBossFrm( !bEnd ) ) + // pFootnoteFrame may have changed due to Calc ... + SwFootnoteFrame *pFootnoteFrame = pBoss->FindFootnote( this, pFootnote ); + if( pFootnoteFrame && pBoss != pFootnoteFrame->FindFootnoteBossFrame( !bEnd ) ) { int bla = 5; (void)bla; @@ -791,20 +791,20 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwTextAttr *pHint ) { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "NewFootnotePortion with unswapped frame" ); - if( !m_pFrm->IsFootnoteAllowed() ) + if( !m_pFrame->IsFootnoteAllowed() ) return nullptr; SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHint); const SwFormatFootnote& rFootnote = static_cast<const SwFormatFootnote&>(pFootnote->GetFootnote()); - SwDoc *pDoc = m_pFrm->GetNode()->GetDoc(); + SwDoc *pDoc = m_pFrame->GetNode()->GetDoc(); if( rInf.IsTest() ) return new SwFootnotePortion( rFootnote.GetViewNumStr( *pDoc ), pFootnote ); - SwSwapIfSwapped swap(m_pFrm); + SwSwapIfSwapped swap(m_pFrame); sal_uInt16 nReal; { @@ -822,23 +822,23 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwTwips nLower = Y() + nReal; - const bool bVertical = m_pFrm->IsVertical(); + const bool bVertical = m_pFrame->IsVertical(); if( bVertical ) - nLower = m_pFrm->SwitchHorizontalToVertical( nLower ); + nLower = m_pFrame->SwitchHorizontalToVertical( nLower ); - nLower = lcl_GetFootnoteLower( m_pFrm, nLower ); + nLower = lcl_GetFootnoteLower( m_pFrame, nLower ); // We just refresh. // The Connect does not do anything useful in this case, but will // mostly throw away the Footnote and create it anew. if( !rInf.IsQuick() ) - m_pFrm->ConnectFootnote( pFootnote, nLower ); + m_pFrame->ConnectFootnote( pFootnote, nLower ); - SwTextFrm *pScrFrm = m_pFrm->FindFootnoteRef( pFootnote ); - SwFootnoteBossFrm *pBoss = m_pFrm->FindFootnoteBossFrm( !rFootnote.IsEndNote() ); - SwFootnoteFrm *pFootnoteFrm = nullptr; - if( pScrFrm ) - pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pScrFrm, pFootnote ); + SwTextFrame *pScrFrame = m_pFrame->FindFootnoteRef( pFootnote ); + SwFootnoteBossFrame *pBoss = m_pFrame->FindFootnoteBossFrame( !rFootnote.IsEndNote() ); + SwFootnoteFrame *pFootnoteFrame = nullptr; + if( pScrFrame ) + pFootnoteFrame = SwFootnoteBossFrame::FindFootnote( pScrFrame, pFootnote ); // We see whether our Append has caused some Footnote to // still be on the Page/Column. If not, our line disappears too, @@ -851,15 +851,15 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, // the Footnote Reference should be moved to the next one. if( !rFootnote.IsEndNote() ) { - SwSectionFrm *pSct = pBoss->FindSctFrm(); + SwSectionFrame *pSct = pBoss->FindSctFrame(); bool bAtSctEnd = pSct && pSct->IsFootnoteAtEnd(); if( FTNPOS_CHAPTER != pDoc->GetFootnoteInfo().ePos || bAtSctEnd ) { - SwFrm* pFootnoteCont = pBoss->FindFootnoteCont(); + SwFrame* pFootnoteCont = pBoss->FindFootnoteCont(); // If the Parent is within an Area, it can only be a Column of this // Area. If this one is not the first Column, we can avoid it. - if( !m_pFrm->IsInTab() && ( GetLineNr() > 1 || m_pFrm->GetPrev() || - ( !bAtSctEnd && m_pFrm->GetIndPrev() ) || + if( !m_pFrame->IsInTab() && ( GetLineNr() > 1 || m_pFrame->GetPrev() || + ( !bAtSctEnd && m_pFrame->GetIndPrev() ) || ( pSct && pBoss->GetPrev() ) ) ) { if( !pFootnoteCont ) @@ -873,12 +873,12 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, // Page/Page column if( pSct && !bAtSctEnd ) // Is the Container in a (column) Area? { - SwFootnoteBossFrm* pTmp = pBoss->FindSctFrm()->FindFootnoteBossFrm( true ); - SwFootnoteContFrm* pFootnoteC = pTmp->FindFootnoteCont(); + SwFootnoteBossFrame* pTmp = pBoss->FindSctFrame()->FindFootnoteBossFrame( true ); + SwFootnoteContFrame* pFootnoteC = pTmp->FindFootnoteCont(); if( pFootnoteC ) { - SwFootnoteFrm* pTmpFrm = static_cast<SwFootnoteFrm*>(pFootnoteC->Lower()); - if( pTmpFrm && *pTmpFrm < pFootnote ) + SwFootnoteFrame* pTmpFrame = static_cast<SwFootnoteFrame*>(pFootnoteC->Lower()); + if( pTmpFrame && *pTmpFrame < pFootnote ) { rInf.SetStop( true ); return nullptr; @@ -889,19 +889,19 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwTwips nTmpBot = Y() + nReal * 2; if( bVertical ) - nTmpBot = m_pFrm->SwitchHorizontalToVertical( nTmpBot ); + nTmpBot = m_pFrame->SwitchHorizontalToVertical( nTmpBot ); SWRECTFN( pFootnoteCont ) const long nDiff = (*fnRect->fnYDiff)( - (pFootnoteCont->Frm().*fnRect->fnGetTop)(), + (pFootnoteCont->Frame().*fnRect->fnGetTop)(), nTmpBot ); - if( pScrFrm && nDiff < 0 ) + if( pScrFrame && nDiff < 0 ) { - if( pFootnoteFrm ) + if( pFootnoteFrame ) { - SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm(); + SwFootnoteBossFrame *pFootnoteBoss = pFootnoteFrame->FindFootnoteBossFrame(); if( pFootnoteBoss != pBoss ) { // We're in the last Line and the Footnote has moved @@ -928,19 +928,19 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, */ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf ) const { - OSL_ENSURE( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() && !rInf.IsFootnoteDone(), + OSL_ENSURE( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() && !rInf.IsFootnoteDone(), "This is the wrong place for a ftnnumber" ); if( rInf.GetTextStart() != m_nStart || rInf.GetTextStart() != rInf.GetIdx() ) return nullptr; - const SwFootnoteFrm* pFootnoteFrm = m_pFrm->FindFootnoteFrm(); - const SwTextFootnote* pFootnote = pFootnoteFrm->GetAttr(); + const SwFootnoteFrame* pFootnoteFrame = m_pFrame->FindFootnoteFrame(); + const SwTextFootnote* pFootnote = pFootnoteFrame->GetAttr(); // Aha! So we're in the Footnote Area! SwFormatFootnote& rFootnote = (SwFormatFootnote&)pFootnote->GetFootnote(); - SwDoc *pDoc = m_pFrm->GetNode()->GetDoc(); + SwDoc *pDoc = m_pFrame->GetNode()->GetDoc(); OUString aFootnoteText( rFootnote.GetViewNumStr( *pDoc, true )); const SwEndNoteInfo* pInfo; @@ -951,7 +951,7 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf const SwAttrSet& rSet = pInfo->GetCharFormat(*pDoc)->GetAttrSet(); const SwAttrSet* pParSet = &rInf.GetCharAttr(); - const IDocumentSettingAccess* pIDSA = m_pFrm->GetTextNode()->getIDocumentSettingAccess(); + const IDocumentSettingAccess* pIDSA = m_pFrame->GetTextNode()->getIDocumentSettingAccess(); SwFont *pNumFnt = new SwFont( pParSet, pIDSA ); // #i37142# @@ -970,16 +970,16 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf pNumFnt->SetWeight( WEIGHT_NORMAL, SW_CTL ); pNumFnt->SetDiffFnt(&rSet, pIDSA ); - pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrm->IsVertical() ); + pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrame->IsVertical() ); SwFootnoteNumPortion* pNewPor = new SwFootnoteNumPortion( aFootnoteText, pNumFnt ); - pNewPor->SetLeft( !m_pFrm->IsRightToLeft() ); + pNewPor->SetLeft( !m_pFrame->IsRightToLeft() ); return pNewPor; } -OUString lcl_GetPageNumber( const SwPageFrm* pPage ) +OUString lcl_GetPageNumber( const SwPageFrame* pPage ) { - OSL_ENSURE( pPage, "GetPageNumber: Homeless TextFrm" ); + OSL_ENSURE( pPage, "GetPageNumber: Homeless TextFrame" ); const sal_uInt16 nVirtNum = pPage->GetVirtPageNum(); const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType(); return rNum.GetNumStr( nVirtNum ); @@ -988,22 +988,22 @@ OUString lcl_GetPageNumber( const SwPageFrm* pPage ) SwErgoSumPortion *SwTextFormatter::NewErgoSumPortion( SwTextFormatInfo &rInf ) const { // We cannot assume we're a Follow - if( !m_pFrm->IsInFootnote() || m_pFrm->GetPrev() || - rInf.IsErgoDone() || rInf.GetIdx() != m_pFrm->GetOfst() || - m_pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) + if( !m_pFrame->IsInFootnote() || m_pFrame->GetPrev() || + rInf.IsErgoDone() || rInf.GetIdx() != m_pFrame->GetOfst() || + m_pFrame->ImplFindFootnoteFrame()->GetAttr()->GetFootnote().IsEndNote() ) return nullptr; // Aha, wir sind also im Fussnotenbereich - const SwFootnoteInfo &rFootnoteInfo = m_pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); - SwTextFrm *pQuoFrm = m_pFrm->FindQuoVadisFrm(); - if( !pQuoFrm ) + const SwFootnoteInfo &rFootnoteInfo = m_pFrame->GetNode()->GetDoc()->GetFootnoteInfo(); + SwTextFrame *pQuoFrame = m_pFrame->FindQuoVadisFrame(); + if( !pQuoFrame ) return nullptr; - const SwPageFrm* pPage = m_pFrm->FindPageFrm(); - const SwPageFrm* pQuoPage = pQuoFrm->FindPageFrm(); - if( pPage == pQuoFrm->FindPageFrm() ) + const SwPageFrame* pPage = m_pFrame->FindPageFrame(); + const SwPageFrame* pQuoPage = pQuoFrame->FindPageFrame(); + if( pPage == pQuoFrame->FindPageFrame() ) return nullptr; // If the QuoVadis is on the same Column/Page const OUString aPage = lcl_GetPageNumber( pPage ); - SwParaPortion *pPara = pQuoFrm->GetPara(); + SwParaPortion *pPara = pQuoFrame->GetPara(); if( pPara ) pPara->SetErgoSumNum( aPage ); if( rFootnoteInfo.aErgoSum.isEmpty() ) @@ -1015,36 +1015,36 @@ SwErgoSumPortion *SwTextFormatter::NewErgoSumPortion( SwTextFormatInfo &rInf ) c sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) { - OSL_ENSURE( ! m_pFrm->IsVertical() || ! m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || ! m_pFrame->IsSwapped(), "SwTextFormatter::FormatQuoVadis with swapped frame" ); - if( !m_pFrm->IsInFootnote() || m_pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) + if( !m_pFrame->IsInFootnote() || m_pFrame->ImplFindFootnoteFrame()->GetAttr()->GetFootnote().IsEndNote() ) return nOffset; - const SwFrm* pErgoFrm = m_pFrm->FindFootnoteFrm()->GetFollow(); - if( !pErgoFrm && m_pFrm->HasFollow() ) - pErgoFrm = m_pFrm->GetFollow(); - if( !pErgoFrm ) + const SwFrame* pErgoFrame = m_pFrame->FindFootnoteFrame()->GetFollow(); + if( !pErgoFrame && m_pFrame->HasFollow() ) + pErgoFrame = m_pFrame->GetFollow(); + if( !pErgoFrame ) return nOffset; - if( pErgoFrm == m_pFrm->GetNext() ) + if( pErgoFrame == m_pFrame->GetNext() ) { - SwFrm *pCol = m_pFrm->FindColFrm(); + SwFrame *pCol = m_pFrame->FindColFrame(); while( pCol && !pCol->GetNext() ) - pCol = pCol->GetUpper()->FindColFrm(); + pCol = pCol->GetUpper()->FindColFrame(); if( pCol ) return nOffset; } else { - const SwPageFrm* pPage = m_pFrm->FindPageFrm(); - const SwPageFrm* pErgoPage = pErgoFrm->FindPageFrm(); + const SwPageFrame* pPage = m_pFrame->FindPageFrame(); + const SwPageFrame* pErgoPage = pErgoFrame->FindPageFrame(); if( pPage == pErgoPage ) return nOffset; // If the ErgoSum is on the same Page } SwTextFormatInfo &rInf = GetInfo(); - const SwFootnoteInfo &rFootnoteInfo = m_pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); + const SwFootnoteInfo &rFootnoteInfo = m_pFrame->GetNode()->GetDoc()->GetFootnoteInfo(); if( rFootnoteInfo.aQuoVadis.isEmpty() ) return nOffset; @@ -1076,7 +1076,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) const sal_uInt16 nOldRealWidth = rInf.RealWidth(); rInf.RealWidth( nOldRealWidth - nLastLeft ); - OUString aErgo = lcl_GetPageNumber( pErgoFrm->FindPageFrm() ); + OUString aErgo = lcl_GetPageNumber( pErgoFrame->FindPageFrame() ); SwQuoVadisPortion *pQuo = new SwQuoVadisPortion(rFootnoteInfo.aQuoVadis, aErgo ); pQuo->SetAscent( rInf.GetAscent() ); pQuo->Height( rInf.GetTextHeight() ); @@ -1105,7 +1105,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) sal_Int32 nRet; { - SwSwapIfNotSwapped swap(m_pFrm); + SwSwapIfNotSwapped swap(m_pFrame); nRet = FormatLine( m_nStart ); } @@ -1215,7 +1215,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) */ void SwTextFormatter::MakeDummyLine() { - sal_uInt16 nRstHeight = GetFrmRstHeight(); + sal_uInt16 nRstHeight = GetFrameRstHeight(); if( m_pCurr && nRstHeight > m_pCurr->Height() ) { SwLineLayout *pLay = new SwLineLayout; @@ -1248,14 +1248,14 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf, , pFnt( nullptr ) , pOld( nullptr ) { - if( pTextFootnote && rInf.GetTextFrm() ) + if( pTextFootnote && rInf.GetTextFrame() ) { pFnt = ((SwTextSizeInfo&)rInf).GetFont(); pOld = new SwFont( *pFnt ); pOld->GetTox() = pFnt->GetTox(); pFnt->GetTox() = 0; SwFormatFootnote& rFootnote = (SwFormatFootnote&)pTextFootnote->GetFootnote(); - const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc(); + const SwDoc *pDoc = rInf.GetTextFrame()->GetNode()->GetDoc(); // #i98418# if ( bApplyGivenScriptType ) @@ -1275,7 +1275,7 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf, else pInfo = &pDoc->GetFootnoteInfo(); const SwAttrSet& rSet = pInfo->GetAnchorCharFormat((SwDoc&)*pDoc)->GetAttrSet(); - pFnt->SetDiffFnt( &rSet, rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess() ); + pFnt->SetDiffFnt( &rSet, rInf.GetTextFrame()->GetNode()->getIDocumentSettingAccess() ); // we reduce footnote size, if we are inside a double line portion if ( ! pOld->GetEscapement() && 50 == pOld->GetPropr() ) @@ -1291,7 +1291,7 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf, if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_ROTATE, true, &pItem )) pFnt->SetVertical( static_cast<const SvxCharRotateItem*>(pItem)->GetValue(), - rInf.GetTextFrm()->IsVertical() ); + rInf.GetTextFrame()->IsVertical() ); pFnt->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() ); @@ -1460,7 +1460,7 @@ SwErgoSumPortion::SwErgoSumPortion(const OUString &rExp, const OUString& rStr) SetWhichPor( POR_ERGOSUM ); } -sal_Int32 SwErgoSumPortion::GetCrsrOfst( const sal_uInt16 ) const +sal_Int32 SwErgoSumPortion::GetCursorOfst( const sal_uInt16 ) const { return 0; } @@ -1503,7 +1503,7 @@ void SwParaPortion::SetErgoSumNum( const OUString& rErgo ) } /** - * Is called in SwTextFrm::Prepare() + * Is called in SwTextFrame::Prepare() */ bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo ) { diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index 741cdca0bdc2..f6c70df42157 100644 --- a/sw/source/core/text/txthyph.cxx +++ b/sw/source/core/text/txthyph.cxx @@ -55,16 +55,16 @@ Reference< XHyphenatedWord > SwTextFormatInfo::HyphWord( /** * We format a row for interactive hyphenation */ -bool SwTextFrm::Hyphenate( SwInterHyphInfo &rHyphInf ) +bool SwTextFrame::Hyphenate( SwInterHyphInfo &rHyphInf ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); - OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTextFrm::Hyphenate" ); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTextFrame::Hyphenate" ); if( !g_pBreakIt->GetBreakIter().is() ) return false; // We lock it, to start with - OSL_ENSURE( !IsLocked(), "SwTextFrm::Hyphenate: this is locked" ); + OSL_ENSURE( !IsLocked(), "SwTextFrame::Hyphenate: this is locked" ); // The frame::Frame must have a valid SSize! Calc(pRenderContext); @@ -75,12 +75,12 @@ bool SwTextFrm::Hyphenate( SwInterHyphInfo &rHyphInf ) { // We always need to enable hyphenation // Don't be afraid: the SwTextIter saves the old row in the hyphenate - TextFrmLockGuard aLock( this ); + TextFrameLockGuard aLock( this ); if ( IsVertical() ) SwapWidthAndHeight(); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, true ); // true for interactive hyph! + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, true ); // true for interactive hyph! SwTextFormatter aLine( this, &aInf ); aLine.CharToLine( rHyphInf.nStart ); @@ -131,14 +131,14 @@ bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf ) // We never need to hyphenate anything in the last row // Except for, if it contains a FlyPortion or if it's the // last row of the Master - if( !GetNext() && !rInf.GetTextFly().IsOn() && !m_pFrm->GetFollow() ) + if( !GetNext() && !rInf.GetTextFly().IsOn() && !m_pFrame->GetFollow() ) return false; sal_Int32 nWrdStart = m_nStart; // We need to retain the old row // E.g.: The attribute for hyphenation was not set, but - // it's always set in SwTextFrm::Hyphenate, because we want + // it's always set in SwTextFrame::Hyphenate, because we want // to set breakpoints. SwLineLayout *pOldCurr = m_pCurr; @@ -164,7 +164,7 @@ bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf ) if( m_pCurr->PrtWidth() && m_pCurr->GetLen() ) { // Wir muessen uns darauf einstellen, dass in der Zeile - // FlyFrms haengen, an denen auch umgebrochen werden darf. + // FlyFrames haengen, an denen auch umgebrochen werden darf. // Wir suchen also die erste HyphPortion in dem angegebenen // Bereich. diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx index cc6e330dd405..c8ac851fa7e3 100644 --- a/sw/source/core/text/txtinit.cxx +++ b/sw/source/core/text/txtinit.cxx @@ -38,8 +38,8 @@ #include "txtfly.hxx" #include "dbg_lay.hxx" -SwCache *SwTextFrm::pTextCache = nullptr; -long SwTextFrm::nMinPrtLine = 0; +SwCache *SwTextFrame::pTextCache = nullptr; +long SwTextFrame::nMinPrtLine = 0; SwContourCache *pContourCache = nullptr; SwDropCapCache *pDropCapCache = nullptr; @@ -57,12 +57,12 @@ void _TextInit() { pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... } pSwFontCache = new SwFontCache; // Cache for SwTextFormatColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray } - SwCache *pTextCache = new SwCache( 250 // Cache for SwTextFrm -> SwTextLine = { SwParaPortion* pLine } + SwCache *pTextCache = new SwCache( 250 // Cache for SwTextFrame -> SwTextLine = { SwParaPortion* pLine } #ifdef DBG_UTIL - , "static SwTextFrm::pTextCache" + , "static SwTextFrame::pTextCache" #endif ); - SwTextFrm::SetTextCache( pTextCache ); + SwTextFrame::SetTextCache( pTextCache ); pWaveCol = new Color( COL_GRAY ); PROTOCOL_INIT } @@ -70,7 +70,7 @@ void _TextInit() void _TextFinit() { PROTOCOL_STOP - delete SwTextFrm::GetTextCache(); + delete SwTextFrame::GetTextCache(); delete pSwFontCache; delete pFntCache; delete pBlink; diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx index 1e29121a8cb9..98d3eb89a830 100644 --- a/sw/source/core/text/txtio.cxx +++ b/sw/source/core/text/txtio.cxx @@ -316,9 +316,9 @@ SvStream &SwFlyCntPortion::operator<<( SvStream &rOs ) const //$ ostream CONSTCHAR( pText2, " {FRM:" ); rOs.WriteCharPtr(pText2); rOs.WriteCharPtr(" {FRM:"); - WriteSwRect(rOs, GetFlyFrm()->Frm()).WriteCharPtr(pClose); + WriteSwRect(rOs, GetFlyFrame()->Frame()).WriteCharPtr(pClose); rOs.WriteCharPtr(" {PRT:"); - WriteSwRect(rOs, GetFlyFrm()->Prt()).WriteCharPtr(pClose); + WriteSwRect(rOs, GetFlyFrame()->Prt()).WriteCharPtr(pClose); rOs.WriteCharPtr(pClose); } rOs.WriteCharPtr(pClose); diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx index e055a8fd40d6..5db3d2e63d6b 100644 --- a/sw/source/core/text/txtpaint.cxx +++ b/sw/source/core/text/txtpaint.cxx @@ -39,17 +39,17 @@ void SwSaveClip::Reset() } } -void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTextFrm* pFrm, +void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTextFrame* pFrame, bool bEnlargeRect ) { SwRect aOldRect( rRect ); - const bool bVertical = pFrm && pFrm->IsVertical(); + const bool bVertical = pFrame && pFrame->IsVertical(); - if ( pFrm && pFrm->IsRightToLeft() ) - pFrm->SwitchLTRtoRTL( (SwRect&)rRect ); + if ( pFrame && pFrame->IsRightToLeft() ) + pFrame->SwitchLTRtoRTL( (SwRect&)rRect ); if ( bVertical ) - pFrm->SwitchHorizontalToVertical( (SwRect&)rRect ); + pFrame->SwitchHorizontalToVertical( (SwRect&)rRect ); if ( !pOut || (!rRect.HasArea() && !pOut->IsClipRegion()) ) { @@ -87,7 +87,7 @@ void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTextFrm* pFrm, } } - if( SwRootFrm::HasSameRect( rRect ) ) + if( SwRootFrame::HasSameRect( rRect ) ) pOut->SetClipRegion(); else { diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx index 16f883907427..3a791b720224 100644 --- a/sw/source/core/text/txtpaint.hxx +++ b/sw/source/core/text/txtpaint.hxx @@ -30,7 +30,7 @@ class SwSaveClip bool bChg; protected: VclPtr<OutputDevice> pOut; - void _ChgClip( const SwRect &rRect, const SwTextFrm* pFrm, + void _ChgClip( const SwRect &rRect, const SwTextFrame* pFrame, bool bEnlargeRect ); public: explicit SwSaveClip(OutputDevice* pOutDev) @@ -41,9 +41,9 @@ public: } inline ~SwSaveClip(); - inline void ChgClip( const SwRect &rRect, const SwTextFrm* pFrm = nullptr, + inline void ChgClip( const SwRect &rRect, const SwTextFrame* pFrame = nullptr, bool bEnlargeRect = false) - { if( pOut ) _ChgClip( rRect, pFrm, bEnlargeRect ); } + { if( pOut ) _ChgClip( rRect, pFrame, bEnlargeRect ); } void Reset(); inline bool IsOn() const { return bOn; } inline bool IsChg() const { return bChg; } diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index ba9e12742804..d4aace514393 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -70,17 +70,17 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto sal_uInt16 nNewTabPos; bool bAutoTabStop = true; { - const bool bRTL = m_pFrm->IsRightToLeft(); + const bool bRTL = m_pFrame->IsRightToLeft(); // #i24363# tab stops relative to indent // nTabLeft: The absolute value, the tab stops are relative to: Tabs origin. // #i91133# const bool bTabsRelativeToIndent = - m_pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT); + m_pFrame->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT); const SwTwips nTabLeft = bRTL - ? m_pFrm->Frm().Right() - + ? m_pFrame->Frame().Right() - ( bTabsRelativeToIndent ? GetTabLeft() : 0 ) - : m_pFrm->Frm().Left() + + : m_pFrame->Frame().Left() + ( bTabsRelativeToIndent ? GetTabLeft() : 0 ); // The absolute position, where we started the line formatting @@ -88,7 +88,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if ( bRTL ) { Point aPoint( nLinePos, 0 ); - m_pFrm->SwitchLTRtoRTL( aPoint ); + m_pFrame->SwitchLTRtoRTL( aPoint ); nLinePos = aPoint.X(); } @@ -105,15 +105,15 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto nLinePos + nTabPos; SwTwips nMyRight; - if ( m_pFrm->IsVertLR() ) + if ( m_pFrame->IsVertLR() ) nMyRight = Left(); else nMyRight = Right(); - if ( m_pFrm->IsVertical() ) + if ( m_pFrame->IsVertical() ) { - Point aRightTop( nMyRight, m_pFrm->Frm().Top() ); - m_pFrm->SwitchHorizontalToVertical( aRightTop ); + Point aRightTop( nMyRight, m_pFrame->Frame().Top() ); + m_pFrame->SwitchHorizontalToVertical( aRightTop ); nMyRight = aRightTop.Y(); } @@ -149,7 +149,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if( USHRT_MAX == nDefTabDist ) { const SvxTabStopItem& rTab = - static_cast<const SvxTabStopItem &>(m_pFrm->GetAttrSet()-> + static_cast<const SvxTabStopItem &>(m_pFrame->GetAttrSet()-> GetPool()->GetDefaultItem( RES_PARATR_TABSTOP )); if( rTab.Count() ) nDefTabDist = (sal_uInt16)rTab[0].GetTabPos(); @@ -169,7 +169,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto : ( ( nCount + 1 ) * nDefTabDist ); // --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips: - const SwTwips nMinimumTabWidth = m_pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ? 0 : 50; + const SwTwips nMinimumTabWidth = m_pFrame->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ? 0 : 50; if( ( bRTL && nTabLeft - nNextPos >= nCurrentAbsPos - nMinimumTabWidth ) || ( !bRTL && nNextPos + nTabLeft <= nCurrentAbsPos + nMinimumTabWidth ) ) { @@ -194,12 +194,12 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if ( bRTL ) { Point aPoint( Left(), 0 ); - m_pFrm->SwitchLTRtoRTL( aPoint ); - nLeftMarginTabPos = m_pFrm->Frm().Right() - aPoint.X(); + m_pFrame->SwitchLTRtoRTL( aPoint ); + nLeftMarginTabPos = m_pFrame->Frame().Right() - aPoint.X(); } else { - nLeftMarginTabPos = Left() - m_pFrm->Frm().Left(); + nLeftMarginTabPos = Left() - m_pFrame->Frame().Left(); } } if( m_pCurr->HasForcedLeftMargin() ) @@ -230,7 +230,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto !pTabStop || nNextPos != m_aLineInf.GetListTabStopPosition() ) || // compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST: - m_pFrm->GetTextNode()->getIDocumentSettingAccess()-> + m_pFrame->GetTextNode()->getIDocumentSettingAccess()-> get(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST); if ( bTabAtLeftMarginAllowed ) { @@ -323,8 +323,8 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) // Here we settle down ... Fix( static_cast<sal_uInt16>(rInf.X()) ); - const bool bTabCompat = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); - const bool bTabOverflow = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVERFLOW); + const bool bTabCompat = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); + const bool bTabOverflow = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVERFLOW); // The minimal width of a tab is one blank at least. // #i37686# In compatibility mode, the minimum width @@ -357,7 +357,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) ( rInf.Width() <= rInf.X() + PrtWidth() && rInf.X() <= rInf.Width() ) ; // #95477# Rotated tab stops get the width of one blank - const sal_uInt16 nDir = rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() ); + const sal_uInt16 nDir = rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() ); if( ! bFull && 0 == nDir ) { @@ -385,7 +385,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) bool bAtParaEnd = rInf.GetIdx() + GetLen() == rInf.GetText().getLength(); if ( bFull && bTabCompat && ( ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) ) || bAtParaEnd ) && - GetTabPos() >= rInf.GetTextFrm()->Frm().Width() ) + GetTabPos() >= rInf.GetTextFrame()->Frame().Width() ) { bFull = false; if ( bTabOverflow && !IsAutoTabStop() ) @@ -422,7 +422,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) else { // A trick with impact: The new Tabportions now behave like - // FlyFrms, located in the line - including adjustment ! + // FlyFrames, located in the line - including adjustment ! SetFixWidth( PrtWidth() ); return false; } @@ -430,7 +430,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf ) { - const bool bTabOverMargin = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); + const bool bTabOverMargin = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); // If the tab position is larger than the right margin, it gets scaled down by default. // However, if compat mode enabled, we allow tabs to go over the margin: the rest of the paragraph is not broken into lines. const sal_uInt16 nRight = bTabOverMargin ? GetTabPos() : std::min(GetTabPos(), rInf.Width()); @@ -445,7 +445,7 @@ bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf ) const sal_uInt16 nWhich = GetWhichPor(); OSL_ENSURE( POR_TABLEFT != nWhich, "SwTabPortion::PostFormat: already formatted" ); - const bool bTabCompat = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); + const bool bTabCompat = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); // #127428# Abandon dec. tab position if line is full if ( bTabCompat && POR_TABDECIMAL == nWhich ) diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index b995ee6cc8f2..11e8c7aa658b 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -44,37 +44,37 @@ namespace { // A Follow on the same page as its master is nasty. -inline bool IsNastyFollow( const SwTextFrm *pFrm ) +inline bool IsNastyFollow( const SwTextFrame *pFrame ) { - OSL_ENSURE( !pFrm->IsFollow() || !pFrm->GetPrev() || - static_cast<const SwTextFrm*>(pFrm->GetPrev())->GetFollow() == pFrm, + OSL_ENSURE( !pFrame->IsFollow() || !pFrame->GetPrev() || + static_cast<const SwTextFrame*>(pFrame->GetPrev())->GetFollow() == pFrame, "IsNastyFollow: Was ist denn hier los?" ); - return pFrm->IsFollow() && pFrm->GetPrev(); + return pFrame->IsFollow() && pFrame->GetPrev(); } } -SwTextFrmBreak::SwTextFrmBreak( SwTextFrm *pNewFrm, const SwTwips nRst ) - : m_nRstHeight(nRst), m_pFrm(pNewFrm) +SwTextFrameBreak::SwTextFrameBreak( SwTextFrame *pNewFrame, const SwTwips nRst ) + : m_nRstHeight(nRst), m_pFrame(pNewFrame) { - SwSwapIfSwapped swap(m_pFrm); - SWRECTFN( m_pFrm ) - m_nOrigin = (m_pFrm->*fnRect->fnGetPrtTop)(); - m_bKeep = !m_pFrm->IsMoveable() || IsNastyFollow( m_pFrm ); - if( !m_bKeep && m_pFrm->IsInSct() ) + SwSwapIfSwapped swap(m_pFrame); + SWRECTFN( m_pFrame ) + m_nOrigin = (m_pFrame->*fnRect->fnGetPrtTop)(); + m_bKeep = !m_pFrame->IsMoveable() || IsNastyFollow( m_pFrame ); + if( !m_bKeep && m_pFrame->IsInSct() ) { - const SwSectionFrm* const pSct = m_pFrm->FindSctFrm(); - m_bKeep = pSct->Lower()->IsColumnFrm() && !pSct->MoveAllowed( m_pFrm ); + const SwSectionFrame* const pSct = m_pFrame->FindSctFrame(); + m_bKeep = pSct->Lower()->IsColumnFrame() && !pSct->MoveAllowed( m_pFrame ); } - m_bKeep = m_bKeep || !m_pFrm->GetTextNode()->GetSwAttrSet().GetSplit().GetValue() || - m_pFrm->GetTextNode()->GetSwAttrSet().GetKeep().GetValue(); + m_bKeep = m_bKeep || !m_pFrame->GetTextNode()->GetSwAttrSet().GetSplit().GetValue() || + m_pFrame->GetTextNode()->GetSwAttrSet().GetKeep().GetValue(); m_bBreak = false; - if( !m_nRstHeight && !m_pFrm->IsFollow() && m_pFrm->IsInFootnote() && m_pFrm->HasPara() ) + if( !m_nRstHeight && !m_pFrame->IsFollow() && m_pFrame->IsInFootnote() && m_pFrame->HasPara() ) { - m_nRstHeight = m_pFrm->GetFootnoteFrmHeight(); - m_nRstHeight += (m_pFrm->Prt().*fnRect->fnGetHeight)() - - (m_pFrm->Frm().*fnRect->fnGetHeight)(); + m_nRstHeight = m_pFrame->GetFootnoteFrameHeight(); + m_nRstHeight += (m_pFrame->Prt().*fnRect->fnGetHeight)() - + (m_pFrame->Frame().*fnRect->fnGetHeight)(); if( m_nRstHeight < 0 ) m_nRstHeight = 0; } @@ -100,32 +100,32 @@ SwTextFrmBreak::SwTextFrmBreak( SwTextFrm *pNewFrm, const SwTwips nRst ) * be done until the Follow is formatted. Unfortunately this is crucial * to decide if the whole paragraph goes to the next page or not. */ -bool SwTextFrmBreak::IsInside( SwTextMargin &rLine ) const +bool SwTextFrameBreak::IsInside( SwTextMargin &rLine ) const { bool bFit = false; - SwSwapIfSwapped swap(m_pFrm); - SWRECTFN( m_pFrm ) + SwSwapIfSwapped swap(m_pFrame); + SWRECTFN( m_pFrame ) // nOrigin is an absolut value, rLine referes to the swapped situation. SwTwips nTmpY; - if ( m_pFrm->IsVertical() ) - nTmpY = m_pFrm->SwitchHorizontalToVertical( rLine.Y() + rLine.GetLineHeight() ); + if ( m_pFrame->IsVertical() ) + nTmpY = m_pFrame->SwitchHorizontalToVertical( rLine.Y() + rLine.GetLineHeight() ); else nTmpY = rLine.Y() + rLine.GetLineHeight(); SwTwips nLineHeight = (*fnRect->fnYDiff)( nTmpY , m_nOrigin ); // 7455 und 6114: Calculate extra space for bottom border. - nLineHeight += (m_pFrm->*fnRect->fnGetBottomMargin)(); + nLineHeight += (m_pFrame->*fnRect->fnGetBottomMargin)(); if( m_nRstHeight ) bFit = m_nRstHeight >= nLineHeight; else { - // The Frm has a height to fit on the page. + // The Frame has a height to fit on the page. SwTwips nHeight = - (*fnRect->fnYDiff)( (m_pFrm->GetUpper()->*fnRect->fnGetPrtBottom)(), m_nOrigin ); + (*fnRect->fnYDiff)( (m_pFrame->GetUpper()->*fnRect->fnGetPrtBottom)(), m_nOrigin ); // If everything is inside the existing frame the result is true; bFit = nHeight >= nLineHeight; @@ -133,25 +133,25 @@ bool SwTextFrmBreak::IsInside( SwTextMargin &rLine ) const if ( !bFit ) { if ( rLine.GetNext() && - m_pFrm->IsInTab() && !m_pFrm->GetFollow() && !m_pFrm->GetIndNext() ) + m_pFrame->IsInTab() && !m_pFrame->GetFollow() && !m_pFrame->GetIndNext() ) { // add additional space taken as lower space as last content in a table // for all text lines except the last one. - nHeight += m_pFrm->CalcAddLowerSpaceAsLastInTableCell(); + nHeight += m_pFrame->CalcAddLowerSpaceAsLastInTableCell(); bFit = nHeight >= nLineHeight; } } // <-- if( !bFit ) { - // The LineHeight exceeds the current Frm height. + // The LineHeight exceeds the current Frame height. // Call a test Grow to detect if the Frame could // grow the requested area. - nHeight += m_pFrm->GrowTst( LONG_MAX ); + nHeight += m_pFrame->GrowTst( LONG_MAX ); - // The Grow() returns the height by which the Upper of the TextFrm - // would let the TextFrm grow. - // The TextFrm itself can grow as much as it wants. + // The Grow() returns the height by which the Upper of the TextFrame + // would let the TextFrame grow. + // The TextFrame itself can grow as much as it wants. bFit = nHeight >= nLineHeight; } } @@ -159,9 +159,9 @@ bool SwTextFrmBreak::IsInside( SwTextMargin &rLine ) const return bFit; } -bool SwTextFrmBreak::IsBreakNow( SwTextMargin &rLine ) +bool SwTextFrameBreak::IsBreakNow( SwTextMargin &rLine ) { - SwSwapIfSwapped swap(m_pFrm); + SwSwapIfSwapped swap(m_pFrame); // bKeep is stronger than IsBreakNow() // Is there enough space ? @@ -180,15 +180,15 @@ bool SwTextFrmBreak::IsBreakNow( SwTextMargin &rLine ) bool bFirstLine = 1 == rLine.GetLineNr() && !rLine.GetPrev(); m_bBreak = true; - if( ( bFirstLine && m_pFrm->GetIndPrev() ) + if( ( bFirstLine && m_pFrame->GetIndPrev() ) || ( rLine.GetLineNr() <= rLine.GetDropLines() ) ) { m_bKeep = true; m_bBreak = false; } - else if(bFirstLine && m_pFrm->IsInFootnote() && !m_pFrm->FindFootnoteFrm()->GetPrev()) + else if(bFirstLine && m_pFrame->IsInFootnote() && !m_pFrame->FindFootnoteFrame()->GetPrev()) { - SwLayoutFrm* pTmp = m_pFrm->FindFootnoteBossFrm()->FindBodyCont(); + SwLayoutFrame* pTmp = m_pFrame->FindFootnoteBossFrame()->FindBodyCont(); if( !pTmp || !pTmp->Lower() ) m_bBreak = false; } @@ -198,53 +198,53 @@ bool SwTextFrmBreak::IsBreakNow( SwTextMargin &rLine ) } /// OD 2004-02-27 #106629# - no longer inline -void SwTextFrmBreak::SetRstHeight( const SwTextMargin &rLine ) +void SwTextFrameBreak::SetRstHeight( const SwTextMargin &rLine ) { // OD, FME 2004-02-27 #106629# - consider bottom margin - SWRECTFN( m_pFrm ) + SWRECTFN( m_pFrame ) - m_nRstHeight = (m_pFrm->*fnRect->fnGetBottomMargin)(); + m_nRstHeight = (m_pFrame->*fnRect->fnGetBottomMargin)(); if ( bVert ) { - if ( m_pFrm->IsVertLR() ) - m_nRstHeight = (*fnRect->fnYDiff)( m_pFrm->SwitchHorizontalToVertical( rLine.Y() ) , m_nOrigin ); + if ( m_pFrame->IsVertLR() ) + m_nRstHeight = (*fnRect->fnYDiff)( m_pFrame->SwitchHorizontalToVertical( rLine.Y() ) , m_nOrigin ); else - m_nRstHeight += m_nOrigin - m_pFrm->SwitchHorizontalToVertical( rLine.Y() ); + m_nRstHeight += m_nOrigin - m_pFrame->SwitchHorizontalToVertical( rLine.Y() ); } else m_nRstHeight += rLine.Y() - m_nOrigin; } -WidowsAndOrphans::WidowsAndOrphans( SwTextFrm *pNewFrm, const SwTwips nRst, +WidowsAndOrphans::WidowsAndOrphans( SwTextFrame *pNewFrame, const SwTwips nRst, bool bChkKeep ) - : SwTextFrmBreak( pNewFrm, nRst ), nWidLines( 0 ), nOrphLines( 0 ) + : SwTextFrameBreak( pNewFrame, nRst ), nWidLines( 0 ), nOrphLines( 0 ) { - SwSwapIfSwapped swap(m_pFrm); + SwSwapIfSwapped swap(m_pFrame); if( m_bKeep ) { // 5652: If pararagraph should not be split but is larger than // the page, then bKeep is overruled. - if( bChkKeep && !m_pFrm->GetPrev() && !m_pFrm->IsInFootnote() && - m_pFrm->IsMoveable() && - ( !m_pFrm->IsInSct() || m_pFrm->FindSctFrm()->MoveAllowed(m_pFrm) ) ) + if( bChkKeep && !m_pFrame->GetPrev() && !m_pFrame->IsInFootnote() && + m_pFrame->IsMoveable() && + ( !m_pFrame->IsInSct() || m_pFrame->FindSctFrame()->MoveAllowed(m_pFrame) ) ) m_bKeep = false; // Even if Keep is set, Orphans has to be respected. // e.g. if there are chained frames where a Follow in the last frame // receives a Keep, because it is not (forward) movable - // nevertheless the paragraph can request lines from the Master // because of the Orphan rule. - if( m_pFrm->IsFollow() ) - nWidLines = m_pFrm->GetTextNode()->GetSwAttrSet().GetWidows().GetValue(); + if( m_pFrame->IsFollow() ) + nWidLines = m_pFrame->GetTextNode()->GetSwAttrSet().GetWidows().GetValue(); } else { - const SwAttrSet& rSet = m_pFrm->GetTextNode()->GetSwAttrSet(); + const SwAttrSet& rSet = m_pFrame->GetTextNode()->GetSwAttrSet(); const SvxOrphansItem &rOrph = rSet.GetOrphans(); if ( rOrph.GetValue() > 1 ) nOrphLines = rOrph.GetValue(); - if ( m_pFrm->IsFollow() ) + if ( m_pFrame->IsFollow() ) nWidLines = rSet.GetWidows().GetValue(); } @@ -253,29 +253,29 @@ WidowsAndOrphans::WidowsAndOrphans( SwTextFrm *pNewFrm, const SwTwips nRst, { bool bResetFlags = false; - if ( m_pFrm->IsInTab() ) + if ( m_pFrame->IsInTab() ) { // For compatibility reasons, we disable Keep/Widows/Orphans // inside splittable row frames: - if ( m_pFrm->GetNextCellLeaf( MAKEPAGE_NONE ) || m_pFrm->IsInFollowFlowRow() ) + if ( m_pFrame->GetNextCellLeaf( MAKEPAGE_NONE ) || m_pFrame->IsInFollowFlowRow() ) { - const SwFrm* pTmpFrm = m_pFrm->GetUpper(); - while ( !pTmpFrm->IsRowFrm() ) - pTmpFrm = pTmpFrm->GetUpper(); - if ( static_cast<const SwRowFrm*>(pTmpFrm)->IsRowSplitAllowed() ) + const SwFrame* pTmpFrame = m_pFrame->GetUpper(); + while ( !pTmpFrame->IsRowFrame() ) + pTmpFrame = pTmpFrame->GetUpper(); + if ( static_cast<const SwRowFrame*>(pTmpFrame)->IsRowSplitAllowed() ) bResetFlags = true; } } - if( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() ) + if( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() ) { // Inside of footnotes there are good reasons to turn off the Keep attribute // as well as Widows/Orphans. - SwFootnoteFrm *pFootnote = m_pFrm->FindFootnoteFrm(); + SwFootnoteFrame *pFootnote = m_pFrame->FindFootnoteFrame(); const bool bFt = !pFootnote->GetAttr()->GetFootnote().IsEndNote(); if( !pFootnote->GetPrev() && - pFootnote->FindFootnoteBossFrm( bFt ) != pFootnote->GetRef()->FindFootnoteBossFrm( bFt ) - && ( !m_pFrm->IsInSct() || m_pFrm->FindSctFrm()->MoveAllowed(m_pFrm) ) ) + pFootnote->FindFootnoteBossFrame( bFt ) != pFootnote->GetRef()->FindFootnoteBossFrame( bFt ) + && ( !m_pFrame->IsInSct() || m_pFrame->FindSctFrame()->MoveAllowed(m_pFrame) ) ) { bResetFlags = true; } @@ -295,14 +295,14 @@ WidowsAndOrphans::WidowsAndOrphans( SwTextFrm *pNewFrm, const SwTwips nRst, * line where the paragraph should have a break and truncate the paragraph there. * FindBreak() */ -bool WidowsAndOrphans::FindBreak( SwTextFrm *pFrame, SwTextMargin &rLine, +bool WidowsAndOrphans::FindBreak( SwTextFrame *pFrame, SwTextMargin &rLine, bool bHasToFit ) { - // OD 2004-02-25 #i16128# - Why member <pFrm> _*and*_ parameter <pFrame>?? + // OD 2004-02-25 #i16128# - Why member <pFrame> _*and*_ parameter <pFrame>?? // Thus, assertion on situation, that these are different to figure out why. - OSL_ENSURE( m_pFrm == pFrame, "<WidowsAndOrphans::FindBreak> - pFrm != pFrame" ); + OSL_ENSURE( m_pFrame == pFrame, "<WidowsAndOrphans::FindBreak> - pFrame != pFrame" ); - SwSwapIfSwapped swap(m_pFrm); + SwSwapIfSwapped swap(m_pFrame); bool bRet = true; sal_uInt16 nOldOrphans = nOrphLines; @@ -346,7 +346,7 @@ bool WidowsAndOrphans::FindBreak( SwTextFrm *pFrame, SwTextMargin &rLine, * Returns true if the Widows-rule matches, that means that the * paragraph should not be split (keep) ! */ -bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) +bool WidowsAndOrphans::FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine ) { OSL_ENSURE( ! pFrame->IsVertical() || ! pFrame->IsSwapped(), "WidowsAndOrphans::FindWidows with swapped frame" ); @@ -357,7 +357,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) rLine.Bottom(); // We can still cut something off - SwTextFrm *pMaster = pFrame->FindMaster(); + SwTextFrame *pMaster = pFrame->FindMaster(); OSL_ENSURE(pMaster, "+WidowsAndOrphans::FindWidows: Widows in a master?"); if( !pMaster ) return false; @@ -399,7 +399,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) // multiple lines (e.g. via frames). if( !pMaster->IsLocked() && pMaster->GetUpper() ) { - const SwTwips nTmpRstHeight = (pMaster->Frm().*fnRect->fnBottomDist) + const SwTwips nTmpRstHeight = (pMaster->Frame().*fnRect->fnBottomDist) ( (pMaster->GetUpper()->*fnRect->fnGetPrtBottom)() ); if ( nTmpRstHeight >= SwTwips(rLine.GetInfo().GetParaPortion()->Height() ) ) @@ -422,7 +422,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) if( 0 > nChg && !pMaster->IsLocked() && pMaster->GetUpper() ) { - SwTwips nTmpRstHeight = (pMaster->Frm().*fnRect->fnBottomDist) + SwTwips nTmpRstHeight = (pMaster->Frame().*fnRect->fnBottomDist) ( (pMaster->GetUpper()->*fnRect->fnGetPrtBottom)() ); if( nTmpRstHeight >= SwTwips(rLine.GetInfo().GetParaPortion()->Height() ) ) { @@ -472,7 +472,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) bool WidowsAndOrphans::WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTst ) { - // Here it does not matter, if pFrm is swapped or not. + // Here it does not matter, if pFrame is swapped or not. // IsInside() takes care of itself // We expect that rLine is set to the last line @@ -499,14 +499,14 @@ bool WidowsAndOrphans::WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool return false; // Check the Widows-rule - if( !nWidLines && !m_pFrm->IsFollow() ) + if( !nWidLines && !m_pFrame->IsFollow() ) { // Usually we only have to check for Widows if we are a Follow. // On WouldFit the rule has to be checked for the Master too, // because we are just in the middle of calculating the break. // In Ctor of WidowsAndOrphans the nWidLines are only calced for // Follows from the AttrSet - so we catch up now: - const SwAttrSet& rSet = m_pFrm->GetTextNode()->GetSwAttrSet(); + const SwAttrSet& rSet = m_pFrame->GetTextNode()->GetSwAttrSet(); nWidLines = rSet.GetWidows().GetValue(); } diff --git a/sw/source/core/text/widorp.hxx b/sw/source/core/text/widorp.hxx index 207bfe3117e5..8b214a3f5e4f 100644 --- a/sw/source/core/text/widorp.hxx +++ b/sw/source/core/text/widorp.hxx @@ -18,22 +18,22 @@ */ #ifndef INCLUDED_SW_SOURCE_CORE_TEXT_WIDORP_HXX #define INCLUDED_SW_SOURCE_CORE_TEXT_WIDORP_HXX -class SwTextFrm; +class SwTextFrame; #include "swtypes.hxx" #include "itrtxt.hxx" -class SwTextFrmBreak +class SwTextFrameBreak { private: SwTwips m_nRstHeight; SwTwips m_nOrigin; protected: - SwTextFrm *m_pFrm; + SwTextFrame *m_pFrame; bool m_bBreak; bool m_bKeep; public: - SwTextFrmBreak( SwTextFrm *pFrm, const SwTwips nRst = 0 ); + SwTextFrameBreak( SwTextFrame *pFrame, const SwTwips nRst = 0 ); bool IsBreakNow( SwTextMargin &rLine ); bool IsKeepAlways() const { return m_bKeep; } @@ -42,7 +42,7 @@ public: bool IsInside( SwTextMargin &rLine ) const; // In order to be able to handle special cases with Footnote. - // SetRstHeight sets the rest height for SwTextFrmBreak. This is needed + // SetRstHeight sets the rest height for SwTextFrameBreak. This is needed // to call TruncLines() without IsBreakNow() returning another value. // We assume that rLine is pointing to the last non-fitting line. @@ -50,25 +50,25 @@ public: void SetRstHeight( const SwTextMargin &rLine ); }; -class WidowsAndOrphans : public SwTextFrmBreak +class WidowsAndOrphans : public SwTextFrameBreak { private: sal_uInt16 nWidLines, nOrphLines; public: - WidowsAndOrphans( SwTextFrm *pFrm, const SwTwips nRst = 0, + WidowsAndOrphans( SwTextFrame *pFrame, const SwTwips nRst = 0, bool bCheckKeep = true ); - bool FindWidows( SwTextFrm *pFrm, SwTextMargin &rLine ); + bool FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine ); sal_uInt16 GetWidowsLines() const { return nWidLines; } sal_uInt16 GetOrphansLines() const { return nOrphLines; } void ClrOrphLines(){ nOrphLines = 0; } - bool FindBreak( SwTextFrm *pFrm, SwTextMargin &rLine, bool bHasToFit ); + bool FindBreak( SwTextFrame *pFrame, SwTextMargin &rLine, bool bHasToFit ); bool WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTest ); // OD 2004-02-25 #i16128# - rename method to avoid confusion with base class - // method <SwTextFrmBreak::IsBreakNow>, which isn't virtual. + // method <SwTextFrameBreak::IsBreakNow>, which isn't virtual. bool IsBreakNowWidAndOrp( SwTextMargin &rLine ) { bool isOnFirstLine = (rLine.GetLineNr() == 1 && !rLine.GetPrev()); diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index cc173c3e1f84..83adb1f84fd7 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -227,7 +227,7 @@ namespace } } -void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const +void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const { bool bCreateWriter = ( nullptr == writer ); if ( bCreateWriter ) @@ -293,11 +293,11 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const dumpAsXmlAttributes( writer ); - if (IsRootFrm()) + if (IsRootFrame()) { - const SwRootFrm* pRootFrm = static_cast<const SwRootFrm*>(this); + const SwRootFrame* pRootFrame = static_cast<const SwRootFrame*>(this); xmlTextWriterStartElement(writer, BAD_CAST("shells")); - for (SwViewShell& rViewShell : pRootFrm->GetCurrShell()->GetRingContainer()) + for (SwViewShell& rViewShell : pRootFrame->GetCurrShell()->GetRingContainer()) rViewShell.dumpAsXml(writer); xmlTextWriterEndElement(writer); } @@ -322,10 +322,10 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const } // Dump the children - if ( IsTextFrm( ) ) + if ( IsTextFrame( ) ) { - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm *>(this); - OUString aText = pTextFrm->GetText( ); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame *>(this); + OUString aText = pTextFrame->GetText( ); for ( int i = 0; i < 32; i++ ) { aText = aText.replace( i, '*' ); @@ -335,7 +335,7 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const xmlTextWriterWriteString( writer, reinterpret_cast<const xmlChar *>(aText8.getStr( )) ); XmlPortionDumper pdumper( writer ); - pTextFrm->VisitPortions( pdumper ); + pTextFrame->VisitPortions( pdumper ); } else @@ -349,14 +349,14 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const lcl_freeWriter( writer ); } -void SwFrm::dumpInfosAsXml( xmlTextWriterPtr writer ) const +void SwFrame::dumpInfosAsXml( xmlTextWriterPtr writer ) const { - // output the Frm + // output the Frame xmlTextWriterStartElement( writer, BAD_CAST( "bounds" ) ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", Frm().Left() ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", Frm().Top() ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", Frm().Width() ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", Frm().Height() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", Frame().Left() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", Frame().Top() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", Frame().Width() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", Frame().Height() ); xmlTextWriterEndElement( writer ); } @@ -364,40 +364,40 @@ void SwFrm::dumpInfosAsXml( xmlTextWriterPtr writer ) const // bomb on two string litterals in the format. static const char* TMP_FORMAT = "%" SAL_PRIuUINTPTR; -void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const +void SwFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const { xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ptr" ), "%p", this ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "id" ), "%" SAL_PRIuUINT32, GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "id" ), "%" SAL_PRIuUINT32, GetFrameId() ); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "symbol" ), "%s", BAD_CAST( typeid( *this ).name( ) ) ); if ( GetNext( ) ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "next" ), "%" SAL_PRIuUINT32, GetNext()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "next" ), "%" SAL_PRIuUINT32, GetNext()->GetFrameId() ); if ( GetPrev( ) ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "prev" ), "%" SAL_PRIuUINT32, GetPrev()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "prev" ), "%" SAL_PRIuUINT32, GetPrev()->GetFrameId() ); if ( GetUpper( ) ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "upper" ), "%" SAL_PRIuUINT32, GetUpper()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "upper" ), "%" SAL_PRIuUINT32, GetUpper()->GetFrameId() ); if ( GetLower( ) ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "lower" ), "%" SAL_PRIuUINT32, GetLower()->GetFrmId() ); - if ( IsTextFrm( ) ) + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "lower" ), "%" SAL_PRIuUINT32, GetLower()->GetFrameId() ); + if ( IsTextFrame( ) ) { - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm *>(this); - const SwTextNode *pTextNode = pTextFrm->GetTextNode(); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame *>(this); + const SwTextNode *pTextNode = pTextFrame->GetTextNode(); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), TMP_FORMAT, pTextNode->GetIndex() ); } - if (IsHeaderFrm() || IsFooterFrm()) + if (IsHeaderFrame() || IsFooterFrame()) { - const SwHeadFootFrm *pHeadFootFrm = static_cast<const SwHeadFootFrm*>(this); - OUString aFormatName = pHeadFootFrm->GetFormat()->GetName(); + const SwHeadFootFrame *pHeadFootFrame = static_cast<const SwHeadFootFrame*>(this); + OUString aFormatName = pHeadFootFrame->GetFormat()->GetName(); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtName" ), "%s", BAD_CAST(OUStringToOString(aFormatName, RTL_TEXTENCODING_UTF8).getStr())); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtPtr" ), "%p", pHeadFootFrm->GetFormat()); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtPtr" ), "%p", pHeadFootFrame->GetFormat()); } } -void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer ) const +void SwFrame::dumpChildrenAsXml( xmlTextWriterPtr writer ) const { - const SwFrm *pFrm = GetLower( ); - for ( ; pFrm != nullptr; pFrm = pFrm->GetNext( ) ) + const SwFrame *pFrame = GetLower( ); + for ( ; pFrame != nullptr; pFrame = pFrame->GetNext( ) ) { - pFrm->dumpAsXml( writer ); + pFrame->dumpAsXml( writer ); } } @@ -431,34 +431,34 @@ void SwFont::dumpAsXml(xmlTextWriterPtr writer) const xmlTextWriterEndElement(writer); } -void SwTextFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const +void SwTextFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const { - SwFrm::dumpAsXmlAttributes( writer ); + SwFrame::dumpAsXmlAttributes( writer ); if ( HasFollow() ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() ); if (m_pPrecede != nullptr) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTextFrm*>(m_pPrecede)->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTextFrame*>(m_pPrecede)->GetFrameId() ); } -void SwSectionFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const +void SwSectionFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const { - SwFrm::dumpAsXmlAttributes( writer ); + SwFrame::dumpAsXmlAttributes( writer ); if ( HasFollow() ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() ); if (m_pPrecede != nullptr) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwSectionFrm*>( m_pPrecede )->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwSectionFrame*>( m_pPrecede )->GetFrameId() ); } -void SwTabFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const +void SwTabFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const { - SwFrm::dumpAsXmlAttributes( writer ); + SwFrame::dumpAsXmlAttributes( writer ); if ( HasFollow() ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() ); if (m_pPrecede != nullptr) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTabFrm*>( m_pPrecede )->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTabFrame*>( m_pPrecede )->GetFrameId() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |