diff options
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r-- | sw/source/core/docnode/ndcopy.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 98 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 392 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl1.cxx | 240 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 176 | ||||
-rw-r--r-- | sw/source/core/docnode/node2lay.cxx | 244 | ||||
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 174 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 50 | ||||
-rw-r--r-- | sw/source/core/docnode/swbaslnk.cxx | 8 |
9 files changed, 692 insertions, 692 deletions
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 673852c3db89..61c64da53c9d 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -309,7 +309,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const // Delete all frames from the copied area, they will be created // during the generation of the table frame - pTableNd->DelFrms(); + pTableNd->DelFrames(); _MapTableFrameFormats aMapArr; _CopyTable aPara( pDoc, aMapArr, GetIndex(), *pTableNd, &GetTable() ); diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 4c9d515246cf..e9d44141fbf5 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -130,7 +130,7 @@ static bool lcl_IsInSameTableBox( SwNodes& _rNds, return true; } -static void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData, +static void lcl_CheckEmptyLayFrame( SwNodes& rNds, SwSectionData& rSectionData, const SwNode& rStt, const SwNode& rEnd ) { SwNodeIndex aIdx( rStt ); @@ -174,7 +174,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, pEnd->nNode.GetNode().GetContentNode()->Len() == pEnd->nContent.GetIndex() ) { - ::lcl_CheckEmptyLayFrm( GetNodes(), + ::lcl_CheckEmptyLayFrame( GetNodes(), rNewData, pStt->nNode.GetNode(), pEnd->nNode.GetNode() ); @@ -667,7 +667,7 @@ void SwDoc::UpdateSection( size_t const nPos, SwSectionData & rNewData, pIdx->GetNode().GetSectionNode(); if (pSectNd) { - ::lcl_CheckEmptyLayFrm( GetNodes(), rNewData, + ::lcl_CheckEmptyLayFrame( GetNodes(), rNewData, *pSectNd, *pSectNd->EndOfSectionNode() ); } } @@ -762,8 +762,8 @@ void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd ) _SwTextFootnote_GetIndex( (pSrch = rFootnoteArr[ nPos ]) ) <= nEnd ) { // If the Nodes are not deleted, they need to deregister at the Pages - // (delete Frms) or else they will remain there (Undo does not delete them!) - pSrch->DelFrms(nullptr); + // (delete Frames) or else they will remain there (Undo does not delete them!) + pSrch->DelFrames(nullptr); ++nPos; } @@ -771,8 +771,8 @@ void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd ) _SwTextFootnote_GetIndex( (pSrch = rFootnoteArr[ nPos ]) ) >= nStt ) { // If the Nodes are not deleted, they need to deregister at the Pages - // (delete Frms) or else they will remain there (Undo does not delete them!) - pSrch->DelFrms(nullptr); + // (delete Frames) or else they will remain there (Undo does not delete them!) + pSrch->DelFrames(nullptr); } } } @@ -788,7 +788,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, SwSectionData const& rSectionData, SwTOXBase const*const pTOXBase, SwNodeIndex const*const pEnde, - bool const bInsAtStart, bool const bCreateFrms) + bool const bInsAtStart, bool const bCreateFrames) { SwNodeIndex aInsPos( rNdIdx ); if( !pEnde ) // No Area, thus create a new Section before/after it @@ -882,7 +882,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, pTNd->SetAttr( rSet ); } // Do not forget to create the Frame! - pCpyTNd->MakeFrms( *pTNd ); + pCpyTNd->MakeFrames( *pTNd ); } else new SwTextNode( aInsPos, GetDoc()->GetDfltTextFormatColl() ); @@ -894,13 +894,13 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, // We could optimize this, by not removing already contained Frames and recreating them, // but by simply rewiring them - bool bInsFrm = bCreateFrms && !pSectNd->GetSection().IsHidden() && + bool bInsFrame = bCreateFrames && !pSectNd->GetSection().IsHidden() && GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); SwNode2Layout *pNode2Layout = nullptr; - if( bInsFrm ) + if( bInsFrame ) { SwNodeIndex aTmp( *pSectNd ); - if( !pSectNd->GetNodes().FindPrvNxtFrmNode( aTmp, pSectNd->EndOfSectionNode() ) ) + if( !pSectNd->GetNodes().FindPrvNxtFrameNode( aTmp, pSectNd->EndOfSectionNode() ) ) // Collect all Uppers pNode2Layout = new SwNode2Layout( *pSectNd ); } @@ -926,34 +926,34 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, { static_cast<SwSectionNode*>(pNd)->GetSection().GetFormat()-> SetDerivedFrom( pSectFormat ); - static_cast<SwSectionNode*>(pNd)->DelFrms(); + static_cast<SwSectionNode*>(pNd)->DelFrames(); n = pNd->EndOfSectionIndex(); } else { if( pNd->IsTableNode() ) - static_cast<SwTableNode*>(pNd)->DelFrms(); + static_cast<SwTableNode*>(pNd)->DelFrames(); if( ULONG_MAX == nSkipIdx ) nSkipIdx = pNd->EndOfSectionIndex(); } } else if( pNd->IsContentNode() ) - static_cast<SwContentNode*>(pNd)->DelFrms(); + static_cast<SwContentNode*>(pNd)->DelFrames(); } sw_DeleteFootnote( pSectNd, nStart, nEnde ); - if( bInsFrm ) + if( bInsFrame ) { if( pNode2Layout ) { sal_uLong nIdx = pSectNd->GetIndex(); - pNode2Layout->RestoreUpperFrms( pSectNd->GetNodes(), nIdx, nIdx + 1 ); + pNode2Layout->RestoreUpperFrames( pSectNd->GetNodes(), nIdx, nIdx + 1 ); delete pNode2Layout; } else - pSectNd->MakeFrms( &aInsPos ); + pSectNd->MakeFrames( &aInsPos ); } return pSectNd; @@ -1004,7 +1004,7 @@ SwSectionNode::~SwSectionNode() { // mba: test if iteration works as clients will be removed in callback // use hint which allows to specify, if the content shall be saved or not - m_pSection->GetFormat()->CallSwClientNotify( SwSectionFrmMoveAndDeleteHint( true ) ); + m_pSection->GetFormat()->CallSwClientNotify( SwSectionFrameMoveAndDeleteHint( true ) ); SwSectionFormat* pFormat = m_pSection->GetFormat(); if( pFormat ) { @@ -1016,15 +1016,15 @@ SwSectionNode::~SwSectionNode() } } -SwFrm *SwSectionNode::MakeFrm( SwFrm *pSib ) +SwFrame *SwSectionNode::MakeFrame( SwFrame *pSib ) { m_pSection->m_Data.SetHiddenFlag(false); - return new SwSectionFrm( *m_pSection, pSib ); + return new SwSectionFrame( *m_pSection, pSib ); } // Creates all Document Views for the precedeing Node. // The created ContentFrames are attached to the corresponding Layout -void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) +void SwSectionNode::MakeFrames(const SwNodeIndex & rIdx ) { // Take my succsessive or preceding ContentFrame SwNodes& rNds = GetNodes(); @@ -1042,16 +1042,16 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) return; } pCNd = aIdx.GetNode().GetContentNode(); - pCNd->MakeFrms( static_cast<SwContentNode&>(rIdx.GetNode()) ); + pCNd->MakeFrames( static_cast<SwContentNode&>(rIdx.GetNode()) ); } else { SwNode2Layout aNode2Layout( *this, rIdx.GetIndex() ); - SwFrm *pFrm; - while( nullptr != (pFrm = aNode2Layout.NextFrm()) ) + SwFrame *pFrame; + while( nullptr != (pFrame = aNode2Layout.NextFrame()) ) { - OSL_ENSURE( pFrm->IsSctFrm(), "Depend of Section not a Section." ); - SwFrm *pNew = rIdx.GetNode().GetContentNode()->MakeFrm( pFrm ); + OSL_ENSURE( pFrame->IsSctFrame(), "Depend of Section not a Section." ); + SwFrame *pNew = rIdx.GetNode().GetContentNode()->MakeFrame( pFrame ); SwSectionNode* pS = rIdx.GetNode().FindSectionNode(); @@ -1073,14 +1073,14 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) bool bInitNewSect = false; if( pS ) { - SwSectionFrm *pSct = new SwSectionFrm( pS->GetSection(), pFrm ); + SwSectionFrame *pSct = new SwSectionFrame( pS->GetSection(), pFrame ); // prepare <Init()> of new section frame. bInitNewSect = true; - SwLayoutFrm* pUp = pSct; + SwLayoutFrame* pUp = pSct; while( pUp->Lower() ) // for columned sections { - OSL_ENSURE( pUp->Lower()->IsLayoutFrm(),"Who's in there?" ); - pUp = static_cast<SwLayoutFrm*>(pUp->Lower()); + OSL_ENSURE( pUp->Lower()->IsLayoutFrame(),"Who's in there?" ); + pUp = static_cast<SwLayoutFrame*>(pUp->Lower()); } pNew->Paste( pUp ); // #i27138# @@ -1088,15 +1088,15 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. - if ( pNew->IsTextFrm() ) + if ( pNew->IsTextFrame() ) { - 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<SwTextFrm*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); } } pNew = pSct; @@ -1105,36 +1105,36 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) // If a Node got Frames attached before or after if ( rIdx < GetIndex() ) // the new one precedes me - pNew->Paste( pFrm->GetUpper(), pFrm ); + pNew->Paste( pFrame->GetUpper(), pFrame ); else // the new one succeeds me - pNew->Paste( pFrm->GetUpper(), pFrm->GetNext() ); + pNew->Paste( pFrame->GetUpper(), pFrame->GetNext() ); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. - if ( pNew->IsTextFrm() ) + if ( pNew->IsTextFrame() ) { - 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<SwTextFrm*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); } } if ( bInitNewSect ) - static_cast<SwSectionFrm*>(pNew)->Init(); + static_cast<SwSectionFrame*>(pNew)->Init(); } } } } -// Create a new SectionFrm for every occurrence in the Layout and insert before -// the corresponding ContentFrm -void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx ) +// Create a new SectionFrame for every occurrence in the Layout and insert before +// the corresponding ContentFrame +void SwSectionNode::MakeFrames( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx ) { OSL_ENSURE( pIdxBehind, "no Index" ); SwNodes& rNds = GetNodes(); @@ -1148,13 +1148,13 @@ void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx ) { SwNodeIndex *pEnd = pEndIdx ? pEndIdx : new SwNodeIndex( *EndOfSectionNode(), 1 ); - ::MakeFrms( pDoc, *pIdxBehind, *pEnd ); + ::MakeFrames( pDoc, *pIdxBehind, *pEnd ); if( !pEndIdx ) delete pEnd; } } -void SwSectionNode::DelFrms() +void SwSectionNode::DelFrames() { sal_uLong nStt = GetIndex()+1, nEnd = EndOfSectionIndex(); if( nStt >= nEnd ) @@ -1163,7 +1163,7 @@ void SwSectionNode::DelFrms() } SwNodes& rNds = GetNodes(); - m_pSection->GetFormat()->DelFrms(); + m_pSection->GetFormat()->DelFrames(); // Update our Flag m_pSection->m_Data.SetHiddenFlag(true); @@ -1246,7 +1246,7 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c // Delete all Frames from the copied Area. They are created when creating // the SectionFrames. - pSectNd->DelFrms(); + pSectNd->DelFrames(); // Copy the Links/Server if( pNewSect->IsLinkType() ) // Add the Link diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 076d43ef009e..e5d68c8752f3 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -184,7 +184,7 @@ static SwTableBoxFormat *lcl_CreateDfltBoxFormat( SwDoc &rDoc, std::vector<SwTab { SwTableBoxFormat* pBoxFormat = rDoc.MakeTableBoxFormat(); if( USHRT_MAX != nCols ) - pBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, + pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); ::lcl_SetDfltBoxAttr( *pBoxFormat, nId ); rBoxFormatArr[ nId ] = pBoxFormat; @@ -203,7 +203,7 @@ static SwTableBoxFormat *lcl_CreateAFormatBoxFormat( SwDoc &rDoc, std::vector<Sw SwTableAutoFormat::UPDATE_BOX, rDoc.GetNumberFormatter( ) ); if( USHRT_MAX != nCols ) - pBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, + pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); rBoxFormatArr[ nId ] = pBoxFormat; } @@ -421,9 +421,9 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, sal_uInt16 nLastPos = pColArr->back(); if( text::HoriOrientation::NONE == eAdjust ) { - sal_uInt16 nFrmWidth = nLastPos; + sal_uInt16 nFrameWidth = nLastPos; nLastPos = (*pColArr)[ pColArr->size()-2 ]; - pTableFormat->SetFormatAttr( SvxLRSpaceItem( nSttPos, nFrmWidth - nLastPos, 0, 0, RES_LR_SPACE ) ); + pTableFormat->SetFormatAttr( SvxLRSpaceItem( nSttPos, nFrameWidth - nLastPos, 0, 0, RES_LR_SPACE ) ); } nWidth = nLastPos - nSttPos; } @@ -432,7 +432,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, nWidth /= nCols; nWidth *= nCols; // to avoid rounding problems } - pTableFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth )); + pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth )); if( !(rInsTableOpts.mnInsMode & tabopts::SPLIT_LAYOUT) ) pTableFormat->SetFormatAttr( SwFormatLayoutSplit( false )); @@ -469,7 +469,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, if( !bDfltBorders && !pTAFormat ) { pBoxFormat = MakeTableBoxFormat(); - pBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); + pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); } else { @@ -521,7 +521,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, if( pColArr ) { nWidth = (*pColArr)[ i + 1 ] - (*pColArr)[ i ]; - if( pBoxF->GetFrmSize().GetWidth() != nWidth ) + if( pBoxF->GetFrameSize().GetWidth() != nWidth ) { if( pBoxF->HasWriterListeners() ) // Create new Format { @@ -529,7 +529,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, *pNewFormat = *pBoxF; pBoxF = pNewFormat; } - pBoxF->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth )); + pBoxF->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth )); } } @@ -538,9 +538,9 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, aNdIdx += 3; // StartNode, TextNode, EndNode == 3 Nodes } } - // Insert Frms + // Insert Frames GetNodes().GoNext( &aNdIdx ); // Go to the next ContentNode - pTableNd->MakeFrms( &aNdIdx ); + pTableNd->MakeFrames( &aNdIdx ); // To-Do - add 'SwExtraRedlineTable' also ? if( getIDocumentRedlineAccess().IsRedlineOn() || (!getIDocumentRedlineAccess().IsIgnoreRedline() && !getIDocumentRedlineAccess().GetRedlineTable().empty() )) @@ -700,7 +700,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, // All Lines have a left-to-right Fill Order pLineFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT )); // The Table's SSize is USHRT_MAX - pTableFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, USHRT_MAX )); + pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX )); if( !(rInsTableOpts.mnInsMode & tabopts::SPLIT_LAYOUT) ) pTableFormat->SetFormatAttr( SwFormatLayoutSplit( false )); @@ -737,7 +737,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, // The Box's Formats already have the right size, we must only set // the right Border/AutoFormat. bUseBoxFormat = true; - pTableFormat->SetFormatAttr( pBoxFormat->GetFrmSize() ); + pTableFormat->SetFormatAttr( pBoxFormat->GetFrameSize() ); delete pBoxFormat; eAdjust = text::HoriOrientation::NONE; } @@ -833,7 +833,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, if( !bUseBoxFormat ) { if( bChgSz ) - pBoxF->SetFormatAttr( pBox->GetFrameFormat()->GetFrmSize() ); + pBoxF->SetFormatAttr( pBox->GetFrameFormat()->GetFrameSize() ); pBox->ChgFrameFormat( pBoxF ); } } @@ -858,7 +858,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, } sal_uLong nIdx = pTableNd->GetIndex(); - aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 ); + aNode2Layout.RestoreUpperFrames( GetNodes(), nIdx, nIdx + 1 ); { SwPaM& rTmp = (SwPaM&)rRange; // Point always at the Start @@ -881,7 +881,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, static void lcl_RemoveBreaks(SwContentNode & rNode, SwTableFormat *const pTableFormat) { // delete old layout frames, new ones need to be created... - rNode.DelFrms(); + rNode.DelFrames(); if (!rNode.IsTextNode()) { @@ -964,7 +964,7 @@ lcl_SetTableBoxWidths(SwTable & rTable, size_t const nMaxBoxes, { SwTableBoxFormat *pNewFormat = rDoc.MakeTableBoxFormat(); pNewFormat->SetFormatAttr( - SwFormatFrmSize(ATT_VAR_SIZE, (*pPositions)[n] - nLastPos)); + SwFormatFrameSize(ATT_VAR_SIZE, (*pPositions)[n] - nLastPos)); for (size_t nTmpLine = 0; nTmpLine < rLns.size(); ++nTmpLine) { // Have to do an Add here, because the BoxFormat @@ -978,12 +978,12 @@ lcl_SetTableBoxWidths(SwTable & rTable, size_t const nMaxBoxes, // propagate size upwards from format, so the table gets the right size SAL_WARN_IF(rBoxFormat.HasWriterListeners(), "sw.core", "who is still registered in the format?"); - rBoxFormat.SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nLastPos )); + rBoxFormat.SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nLastPos )); } else { size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX; - rBoxFormat.SetFormatAttr(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + rBoxFormat.SetFormatAttr(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); } } @@ -1020,7 +1020,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, cCh = 0x09; // Get the separator's position from the first Node, in order for the Boxes to be set accordingly - SwTextFrmInfo aFInfo( static_cast<SwTextFrm*>(pTextNd->getLayoutFrm( pTextNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )) ); + SwTextFrameInfo aFInfo( static_cast<SwTextFrame*>(pTextNd->getLayoutFrame( pTextNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )) ); if( aFInfo.IsOneLine() ) // only makes sense in this case { OUString const& rText(pTextNd->GetText()); @@ -1034,9 +1034,9 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, } aPosArr.push_back( - static_cast<sal_uInt16>(aFInfo.GetFrm()->IsVertical() ? - aFInfo.GetFrm()->Prt().Bottom() : - aFInfo.GetFrm()->Prt().Right()) ); + static_cast<sal_uInt16>(aFInfo.GetFrame()->IsVertical() ? + aFInfo.GetFrame()->Prt().Bottom() : + aFInfo.GetFrame()->Prt().Right()) ); } } @@ -1219,7 +1219,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > // All Lines have a left-to-right Fill Order pLineFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT )); // The Table's SSize is USHRT_MAX - pTableFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, USHRT_MAX )); + pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX )); /* If the first node in the selection is a context node and if it has an item FRAMEDIR set (no default) propagate the item to the @@ -1246,12 +1246,12 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > { // The Box's Formats already have the right size, we must only set // the right Border/AutoFormat. - pTableFormat->SetFormatAttr( pBoxFormat->GetFrmSize() ); + pTableFormat->SetFormatAttr( pBoxFormat->GetFrameSize() ); delete pBoxFormat; } sal_uLong nIdx = pTableNd->GetIndex(); - aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 ); + aNode2Layout.RestoreUpperFrames( GetNodes(), nIdx, nIdx + 1 ); getIDocumentState().SetModified(); getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 ); @@ -1335,14 +1335,14 @@ lcl_SetTableBoxWidths2(SwTable & rTable, size_t const nMaxBoxes, // default width for box at the end of an incomplete line SwTableBoxFormat *const pNewFormat = rDoc.MakeTableBoxFormat(); size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX; - pNewFormat->SetFormatAttr( SwFormatFrmSize(ATT_VAR_SIZE, + pNewFormat->SetFormatAttr( SwFormatFrameSize(ATT_VAR_SIZE, nWidth * (nMissing + 1)) ); pNewFormat->Add(rBoxes.back()); } } size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX; // default width for all boxes not at the end of an incomplete line - rBoxFormat.SetFormatAttr(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + rBoxFormat.SetFormatAttr(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); } SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, @@ -1586,14 +1586,14 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, // If the Table was alone in a Section, create the Frames via the Table's Upper SwNode2Layout* pNode2Layout = nullptr; - SwNodeIndex aFrmIdx( rRange.aStart ); - SwNode* pFrmNd = FindPrvNxtFrmNode( aFrmIdx, &rRange.aEnd.GetNode() ); - if( !pFrmNd ) + SwNodeIndex aFrameIdx( rRange.aStart ); + SwNode* pFrameNd = FindPrvNxtFrameNode( aFrameIdx, &rRange.aEnd.GetNode() ); + if( !pFrameNd ) // Collect all Uppers pNode2Layout = new SwNode2Layout( *pTableNd ); // Delete the Frames - pTableNd->DelFrms(); + pTableNd->DelFrames(); // "Delete" the Table and merge all Lines/Boxes _DelTabPara aDelPara( *this, cCh, pUndo ); @@ -1630,9 +1630,9 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, SectionUp( &aDelRg ); // Delete this Section and by that the Table // #i28006# sal_uLong nStt = aDelRg.aStart.GetIndex(), nEnd = aDelRg.aEnd.GetIndex(); - if( !pFrmNd ) + if( !pFrameNd ) { - pNode2Layout->RestoreUpperFrms( *this, + pNode2Layout->RestoreUpperFrames( *this, aDelRg.aStart.GetIndex(), aDelRg.aEnd.GetIndex() ); delete pNode2Layout; } @@ -1644,20 +1644,20 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, { if( nullptr != ( pCNd = aDelRg.aStart.GetNode().GetContentNode())) { - if( pFrmNd->IsContentNode() ) - static_cast<SwContentNode*>(pFrmNd)->MakeFrms( *pCNd ); - else if( pFrmNd->IsTableNode() ) - static_cast<SwTableNode*>(pFrmNd)->MakeFrms( aDelRg.aStart ); - else if( pFrmNd->IsSectionNode() ) - static_cast<SwSectionNode*>(pFrmNd)->MakeFrms( aDelRg.aStart ); - pFrmNd = pCNd; + if( pFrameNd->IsContentNode() ) + static_cast<SwContentNode*>(pFrameNd)->MakeFrames( *pCNd ); + else if( pFrameNd->IsTableNode() ) + static_cast<SwTableNode*>(pFrameNd)->MakeFrames( aDelRg.aStart ); + else if( pFrameNd->IsSectionNode() ) + static_cast<SwSectionNode*>(pFrameNd)->MakeFrames( aDelRg.aStart ); + pFrameNd = pCNd; } else if( nullptr != ( pSNd = aDelRg.aStart.GetNode().GetSectionNode())) { if( !pSNd->GetSection().IsHidden() && !pSNd->IsContentHidden() ) { - pSNd->MakeFrms( &aFrmIdx, &aDelRg.aEnd ); - pFrmNd = pSNd; + pSNd->MakeFrames( &aFrameIdx, &aDelRg.aEnd ); + pFrameNd = pSNd; break; } aDelRg.aStart = *pSNd->EndOfSectionNode(); @@ -1680,7 +1680,7 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, nStt <= pAPos->nNode.GetIndex() && pAPos->nNode.GetIndex() < nEnd ) { - pFormat->MakeFrms(); + pFormat->MakeFrames(); } } @@ -1829,7 +1829,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor ) if( ::HasProtectedCells( aBoxes )) return false; - // Remove the Crsr from the to-be-deleted Section. + // Remove the Cursor from the to-be-deleted Section. // The Cursor is placed after the table, except for // - when there's another Line, we place it in that one // - when a Line precedes it, we place it in that one @@ -1938,7 +1938,7 @@ bool SwDoc::DeleteCol( const SwCursor& rCursor ) if( pESh ) { const SwNode* pNd = rCursor.GetNode().FindTableBoxStartNode(); - pESh->ParkCrsr( SwNodeIndex( *pNd ) ); + pESh->ParkCursor( SwNodeIndex( *pNd ) ); } // Thus delete the Columns @@ -2101,7 +2101,7 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) pNextNd->SetAttr( *pItem ); } - pTableNd->DelFrms(); + pTableNd->DelFrames(); getIDocumentContentOperations().DeleteSection( pTableNd ); } @@ -2352,25 +2352,25 @@ SwTableNode::~SwTableNode() SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, pTableFormat ); pTableFormat->ModifyNotification( &aMsgHint, &aMsgHint ); - DelFrms(); + DelFrames(); delete m_pTable; } -SwTabFrm *SwTableNode::MakeFrm( SwFrm* pSib ) +SwTabFrame *SwTableNode::MakeFrame( SwFrame* pSib ) { - return new SwTabFrm( *m_pTable, pSib ); + return new SwTabFrame( *m_pTable, pSib ); } /** * Creates all Views from the Document for the preceding Node. The resulting ContentFrames * are added to the corresponding Layout. */ -void SwTableNode::MakeFrms(const SwNodeIndex & rIdx ) +void SwTableNode::MakeFrames(const SwNodeIndex & rIdx ) { if( !GetTable().GetFrameFormat()->HasWriterListeners()) // Do we actually have Frame? return; - SwFrm *pFrm; + SwFrame *pFrame; SwContentNode * pNode = rIdx.GetNode().GetContentNode(); OSL_ENSURE( pNode, "No ContentNode or CopyNode and new Node is identical"); @@ -2379,106 +2379,106 @@ void SwTableNode::MakeFrms(const SwNodeIndex & rIdx ) SwNode2Layout aNode2Layout( *this, rIdx.GetIndex() ); - while( nullptr != (pFrm = aNode2Layout.NextFrm()) ) + while( nullptr != (pFrame = aNode2Layout.NextFrame()) ) { - SwFrm *pNew = pNode->MakeFrm( pFrm ); + SwFrame *pNew = pNode->MakeFrame( pFrame ); // Will the Node receive Frames before or after? if ( bBefore ) // The new one precedes me - pNew->Paste( pFrm->GetUpper(), pFrm ); + pNew->Paste( pFrame->GetUpper(), pFrame ); else // The new one succeeds me - pNew->Paste( pFrm->GetUpper(), pFrm->GetNext() ); + pNew->Paste( pFrame->GetUpper(), pFrame->GetNext() ); } } /** - * Create a TableFrm for every Shell and insert before the corresponding ContentFrm. + * Create a TableFrame for every Shell and insert before the corresponding ContentFrame. */ -void SwTableNode::MakeFrms( SwNodeIndex* pIdxBehind ) +void SwTableNode::MakeFrames( SwNodeIndex* pIdxBehind ) { OSL_ENSURE( pIdxBehind, "No Index" ); *pIdxBehind = *this; - SwNode *pNd = GetNodes().FindPrvNxtFrmNode( *pIdxBehind, EndOfSectionNode() ); + SwNode *pNd = GetNodes().FindPrvNxtFrameNode( *pIdxBehind, EndOfSectionNode() ); if( !pNd ) return ; - SwFrm *pFrm( nullptr ); - SwLayoutFrm *pUpper( nullptr ); + SwFrame *pFrame( nullptr ); + SwLayoutFrame *pUpper( nullptr ); SwNode2Layout aNode2Layout( *pNd, GetIndex() ); - while( nullptr != (pUpper = aNode2Layout.UpperFrm( pFrm, *this )) ) + while( nullptr != (pUpper = aNode2Layout.UpperFrame( pFrame, *this )) ) { - SwTabFrm* pNew = MakeFrm( pUpper ); - pNew->Paste( pUpper, pFrm ); + SwTabFrame* pNew = MakeFrame( pUpper ); + pNew->Paste( pUpper, pFrame ); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph 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<SwTextFrm*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); } } pNew->RegistFlys(); } } -void SwTableNode::DelFrms() +void SwTableNode::DelFrames() { - /* For a start, cut out and delete the TabFrms (which will also delete the Columns and Rows) - The TabFrms are attached to the FrameFormat of the SwTable. + /* For a start, cut out and delete the TabFrames (which will also delete the Columns and Rows) + The TabFrames are attached to the FrameFormat of the SwTable. We need to delete them in a more cumbersome way, for the Master to also delete the Follows. */ - SwIterator<SwTabFrm,SwFormat> aIter( *(m_pTable->GetFrameFormat()) ); - SwTabFrm *pFrm = aIter.First(); - while ( pFrm ) + SwIterator<SwTabFrame,SwFormat> aIter( *(m_pTable->GetFrameFormat()) ); + SwTabFrame *pFrame = aIter.First(); + while ( pFrame ) { bool bAgain = false; { - if ( !pFrm->IsFollow() ) + if ( !pFrame->IsFollow() ) { - while ( pFrm->HasFollow() ) - pFrm->JoinAndDelFollows(); + while ( pFrame->HasFollow() ) + pFrame->JoinAndDelFollows(); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. { - SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) ); } } - pFrm->Cut(); - SwFrm::DestroyFrm(pFrm); + pFrame->Cut(); + SwFrame::DestroyFrame(pFrame); bAgain = true; } } - pFrm = bAgain ? aIter.First() : aIter.Next(); + pFrame = bAgain ? aIter.First() : aIter.Next(); } } void SwTableNode::SetNewTable( SwTable* pNewTable, bool bNewFrames ) { - DelFrms(); + DelFrames(); delete m_pTable; m_pTable = pNewTable; if( bNewFrames ) { SwNodeIndex aIdx( *EndOfSectionNode()); GetNodes().GoNext( &aIdx ); - MakeFrms( &aIdx ); + MakeFrames( &aIdx ); } } @@ -2493,38 +2493,38 @@ void SwTableNode::RemoveRedlines() } } -void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm ) +void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCursor, + const SwCellFrame* pBoxFrame ) { const SwTableBox* pBox = nullptr; - SwTabFrm *pTab = nullptr; + SwTabFrame *pTab = nullptr; - if( pBoxFrm ) + if( pBoxFrame ) { - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); - pBox = pBoxFrm->GetTabBox(); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + pBox = pBoxFrame->GetTabBox(); } - else if( pCrsr ) + else if( pCursor ) { - const SwContentNode* pCNd = pCrsr->GetContentNode(); + const SwContentNode* pCNd = pCursor->GetContentNode(); if( !pCNd ) return ; Point aPt; - const SwShellCrsr *pShCrsr = dynamic_cast<const SwShellCrsr*>(pCrsr); - if( pShCrsr ) - aPt = pShCrsr->GetPtPos(); + const SwShellCursor *pShCursor = dynamic_cast<const SwShellCursor*>(pCursor); + if( pShCursor ) + aPt = pShCursor->GetPtPos(); - const SwFrm* pTmpFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwFrame* pTmpFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); do { - pTmpFrm = pTmpFrm->GetUpper(); - } while ( !pTmpFrm->IsCellFrm() ); + pTmpFrame = pTmpFrame->GetUpper(); + } while ( !pTmpFrame->IsCellFrame() ); - pBoxFrm = static_cast<const SwCellFrm*>(pTmpFrm); - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); - pBox = pBoxFrm->GetTabBox(); + pBoxFrame = static_cast<const SwCellFrame*>(pTmpFrame); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + pBox = pBoxFrame->GetTabBox(); } - else if( !pCrsr && !pBoxFrm ) + else if( !pCursor && !pBoxFrame ) { OSL_ENSURE( false, "One of them needs to be specified!" ); return ; @@ -2532,11 +2532,11 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, // Set fixed points, LeftMin in Document coordinates, all others relative SWRECTFN( pTab ) - const SwPageFrm* pPage = pTab->FindPageFrm(); - const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() - - (pPage->Frm().*fnRect->fnGetLeft)(); - const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() - - (pPage->Frm().*fnRect->fnGetLeft)(); + const SwPageFrame* pPage = pTab->FindPageFrame(); + const sal_uLong nLeftMin = (pTab->Frame().*fnRect->fnGetLeft)() - + (pPage->Frame().*fnRect->fnGetLeft)(); + const sal_uLong nRightMax = (pTab->Frame().*fnRect->fnGetRight)() - + (pPage->Frame().*fnRect->fnGetLeft)(); rFill.SetLeftMin ( nLeftMin ); rFill.SetLeft ( (pTab->Prt().*fnRect->fnGetLeft)() ); @@ -2560,11 +2560,11 @@ bool FuzzyCompare::operator() ( long s1, long s2 ) const return ( s1 < s2 && std::abs( s1 - s2 ) > ROWFUZZY ); } -static bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes ) +static bool lcl_IsFrameInColumn( const SwCellFrame& rFrame, SwSelBoxes& rBoxes ) { for (size_t i = 0; i < rBoxes.size(); ++i) { - if ( rFrm.GetTabBox() == rBoxes[ i ] ) + if ( rFrame.GetTabBox() == rBoxes[ i ] ) return true; } @@ -2572,26 +2572,26 @@ static bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes ) } void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , - const SwCellFrm* pBoxFrm ) + const SwCellFrame* pBoxFrame ) { - OSL_ENSURE( pBoxFrm, "GetTabRows called without pBoxFrm" ); + OSL_ENSURE( pBoxFrame, "GetTabRows called without pBoxFrame" ); // Make code robust: - if ( !pBoxFrm ) + if ( !pBoxFrame ) return; // #i39552# Collection of the boxes of the current // column has to be done at the beginning of this function, because // the table may be formatted in ::GetTableSel. - SwDeletionChecker aDelCheck( pBoxFrm ); + SwDeletionChecker aDelCheck( pBoxFrame ); SwSelBoxes aBoxes; - const SwContentFrm* pContent = ::GetCellContent( *pBoxFrm ); - if ( pContent && pContent->IsTextFrm() ) + const SwContentFrame* pContent = ::GetCellContent( *pBoxFrame ); + if ( pContent && pContent->IsTextFrame() ) { - const SwPosition aPos( *static_cast<const SwTextFrm*>(pContent)->GetTextNode() ); - const SwCursor aTmpCrsr( aPos, nullptr, false ); - ::GetTableSel( aTmpCrsr, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); + const SwPosition aPos( *static_cast<const SwTextFrame*>(pContent)->GetTextNode() ); + const SwCursor aTmpCursor( aPos, nullptr, false ); + ::GetTableSel( aTmpCursor, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); } // Make code robust: @@ -2602,19 +2602,19 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , } // Make code robust: - const SwTabFrm* pTab = pBoxFrm->FindTabFrm(); + const SwTabFrame* pTab = pBoxFrame->FindTabFrame(); OSL_ENSURE( pTab, "GetTabRows called without a table" ); if ( !pTab ) return; - const SwFrm* pFrm = pTab->GetNextLayoutLeaf(); + const SwFrame* pFrame = pTab->GetNextLayoutLeaf(); // Set fixed points, LeftMin in Document coordinates, all others relative SWRECTFN( pTab ) - const SwPageFrm* pPage = pTab->FindPageFrm(); + const SwPageFrame* pPage = pTab->FindPageFrame(); const long nLeftMin = ( bVert ? - pTab->GetPrtLeft() - pPage->Frm().Left() : - pTab->GetPrtTop() - pPage->Frm().Top() ); + pTab->GetPrtLeft() - pPage->Frame().Left() : + pTab->GetPrtTop() - pPage->Frame().Top() ); const long nLeft = bVert ? LONG_MAX : 0; const long nRight = (pTab->Prt().*fnRect->fnGetHeight)(); const long nRightMax = bVert ? nRight : LONG_MAX; @@ -2633,13 +2633,13 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , HiddenMap aHidden; HiddenMap::iterator aHiddenIter; - while ( pFrm && pTab->IsAnLower( pFrm ) ) + while ( pFrame && pTab->IsAnLower( pFrame ) ) { - if ( pFrm->IsCellFrm() && pFrm->FindTabFrm() == pTab ) + if ( pFrame->IsCellFrame() && pFrame->FindTabFrame() == pTab ) { // upper and lower borders of current cell frame: - long nUpperBorder = (pFrm->Frm().*fnRect->fnGetTop)(); - long nLowerBorder = (pFrm->Frm().*fnRect->fnGetBottom)(); + long nUpperBorder = (pFrame->Frame().*fnRect->fnGetTop)(); + long nLowerBorder = (pFrame->Frame().*fnRect->fnGetBottom)(); // get boundaries for nUpperBorder: aIter = aBoundaries.find( nUpperBorder ); @@ -2669,18 +2669,18 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , { aHiddenIter = aHidden.find( nTmpVal ); if ( aHiddenIter == aHidden.end() ) - aHidden[ nTmpVal ] = !lcl_IsFrmInColumn( *static_cast<const SwCellFrm*>(pFrm), aBoxes ); + aHidden[ nTmpVal ] = !lcl_IsFrameInColumn( *static_cast<const SwCellFrame*>(pFrame), aBoxes ); else { if ( aHidden[ nTmpVal ] && - lcl_IsFrmInColumn( *static_cast<const SwCellFrm*>(pFrm), aBoxes ) ) + lcl_IsFrameInColumn( *static_cast<const SwCellFrame*>(pFrame), aBoxes ) ) aHidden[ nTmpVal ] = false; } nTmpVal = nLowerBorder; } } - pFrm = pFrm->GetNextLayoutLeaf(); + pFrame = pFrame->GetNextLayoutLeaf(); } // transfer calculated values from BoundaryMap and HiddenMap into rFill: @@ -2708,37 +2708,37 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , } void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, - const SwCursor* pCrsr, const SwCellFrm* pBoxFrm ) + const SwCursor* pCursor, const SwCellFrame* pBoxFrame ) { const SwTableBox* pBox = nullptr; - SwTabFrm *pTab = nullptr; + SwTabFrame *pTab = nullptr; - if( pBoxFrm ) + if( pBoxFrame ) { - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); - pBox = pBoxFrm->GetTabBox(); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + pBox = pBoxFrame->GetTabBox(); } - else if( pCrsr ) + else if( pCursor ) { - const SwContentNode* pCNd = pCrsr->GetContentNode(); + const SwContentNode* pCNd = pCursor->GetContentNode(); if( !pCNd ) return ; Point aPt; - const SwShellCrsr *pShCrsr = dynamic_cast<const SwShellCrsr*>(pCrsr); - if( pShCrsr ) - aPt = pShCrsr->GetPtPos(); + const SwShellCursor *pShCursor = dynamic_cast<const SwShellCursor*>(pCursor); + if( pShCursor ) + aPt = pShCursor->GetPtPos(); - const SwFrm* pTmpFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwFrame* pTmpFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); do { - pTmpFrm = pTmpFrm->GetUpper(); - } while ( !pTmpFrm->IsCellFrm() ); + pTmpFrame = pTmpFrame->GetUpper(); + } while ( !pTmpFrame->IsCellFrame() ); - pBoxFrm = static_cast<const SwCellFrm*>(pTmpFrm); - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); - pBox = pBoxFrm->GetTabBox(); + pBoxFrame = static_cast<const SwCellFrame*>(pTmpFrame); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + pBox = pBoxFrame->GetTabBox(); } - else if( !pCrsr && !pBoxFrm ) + else if( !pCursor && !pBoxFrame ) { OSL_ENSURE( false, "One of them needs to be specified!" ); return ; @@ -2747,7 +2747,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, // If the Table is still using relative values (USHRT_MAX) // we need to switch to absolute ones. SwTable& rTab = *pTab->GetTable(); - const SwFormatFrmSize& rTableFrmSz = rTab.GetFrameFormat()->GetFrmSize(); + const SwFormatFrameSize& rTableFrameSz = rTab.GetFrameFormat()->GetFrameSize(); SWRECTFN( pTab ) // #i17174# - With fix for #i9040# the shadow size is taken // from the table width. Thus, add its left and right size to current table @@ -2758,20 +2758,20 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, nPrtWidth += aShadow.CalcShadowSpace( SvxShadowItemSide::LEFT ) + aShadow.CalcShadowSpace( SvxShadowItemSide::RIGHT ); } - if( nPrtWidth != rTableFrmSz.GetWidth() ) + if( nPrtWidth != rTableFrameSz.GetWidth() ) { - SwFormatFrmSize aSz( rTableFrmSz ); + SwFormatFrameSize aSz( rTableFrameSz ); aSz.SetWidth( nPrtWidth ); rTab.GetFrameFormat()->SetFormatAttr( aSz ); } SwTabCols aOld( rNew.Count() ); - const SwPageFrm* pPage = pTab->FindPageFrm(); - const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() - - (pPage->Frm().*fnRect->fnGetLeft)(); - const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() - - (pPage->Frm().*fnRect->fnGetLeft)(); + const SwPageFrame* pPage = pTab->FindPageFrame(); + const sal_uLong nLeftMin = (pTab->Frame().*fnRect->fnGetLeft)() - + (pPage->Frame().*fnRect->fnGetLeft)(); + const sal_uLong nRightMax = (pTab->Frame().*fnRect->fnGetRight)() - + (pPage->Frame().*fnRect->fnGetLeft)(); // Set fixed points, LeftMin in Document coordinates, all others relative aOld.SetLeftMin ( nLeftMin ); @@ -2784,13 +2784,13 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, } void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor*, - const SwCellFrm* pBoxFrm ) + const SwCellFrame* pBoxFrame ) { - SwTabFrm *pTab; + SwTabFrame *pTab; - OSL_ENSURE( pBoxFrm, "SetTabRows called without pBoxFrm" ); + OSL_ENSURE( pBoxFrame, "SetTabRows called without pBoxFrame" ); - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); // If the Table is still using relative values (USHRT_MAX) // we need to switch to absolute ones. @@ -2798,26 +2798,26 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* SwTabCols aOld( rNew.Count() ); // Set fixed points, LeftMin in Document coordinates, all others relative - const SwPageFrm* pPage = pTab->FindPageFrm(); + const SwPageFrame* pPage = pTab->FindPageFrame(); aOld.SetRight( (pTab->Prt().*fnRect->fnGetHeight)() ); long nLeftMin; if ( bVert ) { - nLeftMin = pTab->GetPrtLeft() - pPage->Frm().Left(); + nLeftMin = pTab->GetPrtLeft() - pPage->Frame().Left(); aOld.SetLeft ( LONG_MAX ); aOld.SetRightMax( aOld.GetRight() ); } else { - nLeftMin = pTab->GetPrtTop() - pPage->Frm().Top(); + nLeftMin = pTab->GetPrtTop() - pPage->Frame().Top(); aOld.SetLeft ( 0 ); aOld.SetRightMax( LONG_MAX ); } aOld.SetLeftMin ( nLeftMin ); - GetTabRows( aOld, nullptr, pBoxFrm ); + GetTabRows( aOld, nullptr, pBoxFrame ); GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_ATTR, nullptr ); @@ -2842,50 +2842,50 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* const long nDiff = nNewRowHeight - nOldRowHeight; if ( std::abs( nDiff ) >= ROWFUZZY ) { - // For the old table model pTextFrm and pLine will be set for every box. - // For the new table model pTextFrm will be set if the box is not covered, + // For the old table model pTextFrame and pLine will be set for every box. + // For the new table model pTextFrame will be set if the box is not covered, // but the pLine will be set if the box is not an overlapping box // In the new table model the row height can be adjusted, // when both variables are set. - const SwTextFrm* pTextFrm = nullptr; + const SwTextFrame* pTextFrame = nullptr; const SwTableLine* pLine = nullptr; - // Iterate over all SwCellFrms with Bottom = nOldPos - const SwFrm* pFrm = pTab->GetNextLayoutLeaf(); - while ( pFrm && pTab->IsAnLower( pFrm ) ) + // Iterate over all SwCellFrames with Bottom = nOldPos + const SwFrame* pFrame = pTab->GetNextLayoutLeaf(); + while ( pFrame && pTab->IsAnLower( pFrame ) ) { - if ( pFrm->IsCellFrm() && pFrm->FindTabFrm() == pTab ) + if ( pFrame->IsCellFrame() && pFrame->FindTabFrame() == pTab ) { - const long nLowerBorder = (pFrm->Frm().*fnRect->fnGetBottom)(); + const long nLowerBorder = (pFrame->Frame().*fnRect->fnGetBottom)(); const sal_uLong nTabTop = (pTab->*fnRect->fnGetPrtTop)(); if ( std::abs( (*fnRect->fnYInc)( nTabTop, nOldRowEnd ) - nLowerBorder ) <= ROWFUZZY ) { - if ( !bCurColOnly || pFrm == pBoxFrm ) + if ( !bCurColOnly || pFrame == pBoxFrame ) { - const SwFrm* pContent = ::GetCellContent( static_cast<const SwCellFrm&>(*pFrm) ); + const SwFrame* pContent = ::GetCellContent( static_cast<const SwCellFrame&>(*pFrame) ); - if ( pContent && pContent->IsTextFrm() ) + if ( pContent && pContent->IsTextFrame() ) { - const SwTableBox* pBox = static_cast<const SwCellFrm*>(pFrm)->GetTabBox(); + const SwTableBox* pBox = static_cast<const SwCellFrame*>(pFrame)->GetTabBox(); const long nRowSpan = pBox->getRowSpan(); if( nRowSpan > 0 ) // Not overlapped - pTextFrm = static_cast<const SwTextFrm*>(pContent); + pTextFrame = static_cast<const SwTextFrame*>(pContent); if( nRowSpan < 2 ) // Not overlapping for row height pLine = pBox->GetUpper(); - if( pLine && pTextFrm ) // always for old table model + if( pLine && pTextFrame ) // always for old table model { // The new row height must not to be calculated from a overlapping box - SwFormatFrmSize aNew( pLine->GetFrameFormat()->GetFrmSize() ); - const long nNewSize = (pFrm->Frm().*fnRect->fnGetHeight)() + nDiff; + SwFormatFrameSize aNew( pLine->GetFrameFormat()->GetFrameSize() ); + const long nNewSize = (pFrame->Frame().*fnRect->fnGetHeight)() + nDiff; if( nNewSize != aNew.GetHeight() ) { aNew.SetHeight( nNewSize ); if ( ATT_VAR_SIZE == aNew.GetHeightSizeType() ) aNew.SetHeightSizeType( ATT_MIN_SIZE ); // This position must not be in an overlapped box - const SwPosition aPos( *static_cast<const SwTextFrm*>(pContent)->GetTextNode() ); - const SwCursor aTmpCrsr( aPos, nullptr, false ); - SetRowHeight( aTmpCrsr, aNew ); + const SwPosition aPos( *static_cast<const SwTextFrame*>(pContent)->GetTextNode() ); + const SwCursor aTmpCursor( aPos, nullptr, false ); + SetRowHeight( aTmpCursor, aNew ); // For the new table model we're done, for the old one // there might be another (sub)row to adjust... if( pTable->IsNewModel() ) @@ -2897,7 +2897,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* } } } - pFrm = pFrm->GetNextLayoutLeaf(); + pFrame = pFrame->GetNextLayoutLeaf(); } } } @@ -2951,7 +2951,7 @@ void SwCollectTableLineBoxes::AddBox( const SwTableBox& rBox ) aPosArr.push_back(nWidth); SwTableBox* p = const_cast<SwTableBox*>(&rBox); m_Boxes.push_back(p); - nWidth = nWidth + (sal_uInt16)rBox.GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = nWidth + (sal_uInt16)rBox.GetFrameFormat()->GetFrameSize().GetWidth(); } const SwTableBox* SwCollectTableLineBoxes::GetBoxOfPos( const SwTableBox& rBox ) @@ -2974,7 +2974,7 @@ const SwTableBox* SwCollectTableLineBoxes::GetBoxOfPos( const SwTableBox& rBox ) if( n >= aPosArr.size() ) --n; - nWidth = nWidth + (sal_uInt16)rBox.GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = nWidth + (sal_uInt16)rBox.GetFrameFormat()->GetFrameSize().GetWidth(); pRet = m_Boxes[ n ]; } return pRet; @@ -3175,7 +3175,7 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode, // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rTable ); - aFndBox.DelFrms( rTable ); + aFndBox.DelFrames( rTable ); SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, false, bCalcNewSize ); @@ -3250,10 +3250,10 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode, break; } - // And insert Frms + // And insert Frames SwNodeIndex aNdIdx( *pNew->EndOfSectionNode() ); GetNodes().GoNext( &aNdIdx ); // To the next ContentNode - pNew->MakeFrms( &aNdIdx ); + pNew->MakeFrames( &aNdIdx ); // Insert a paragraph between the Table GetNodes().MakeTextNode( SwNodeIndex( *pNew ), @@ -3261,7 +3261,7 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode, } // Update Layout - aFndBox.MakeFrms( rTable ); + aFndBox.MakeFrames( rTable ); // TL_CHART2: need to inform chart of probably changed cell names UpdateCharts( rTable.GetFrameFormat()->GetName() ); @@ -3281,7 +3281,7 @@ static bool lcl_ChgTableSize( SwTable& rTable ) // set back to 0. // So lock the Format. SwFrameFormat* pFormat = rTable.GetFrameFormat(); - SwFormatFrmSize aTableMaxSz( pFormat->GetFrmSize() ); + SwFormatFrameSize aTableMaxSz( pFormat->GetFrameSize() ); if( USHRT_MAX == aTableMaxSz.GetWidth() ) return false; @@ -3297,7 +3297,7 @@ static bool lcl_ChgTableSize( SwTable& rTable ) SwTwips nMaxLnWidth = 0; SwTableBoxes& rBoxes = pLn->GetTabBoxes(); for( auto pBox : rBoxes ) - nMaxLnWidth += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nMaxLnWidth += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); if( nMaxLnWidth > aTableMaxSz.GetWidth() ) aTableMaxSz.SetWidth( nMaxLnWidth ); @@ -3461,7 +3461,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter, } { - // Copy the Table FrmFormat + // Copy the Table FrameFormat SwFrameFormat* pOldTableFormat = rTable.GetFrameFormat(); SwFrameFormat* pNewTableFormat = pOldTableFormat->GetDoc()->MakeTableFrameFormat( pOldTableFormat->GetDoc()->GetUniqueTableName(), @@ -3562,7 +3562,7 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, if( !pDelTableNd || !pTableNd ) return false; - pDelTableNd->DelFrms(); + pDelTableNd->DelFrames(); SwTable& rDelTable = pDelTableNd->GetTable(); SwTable& rTable = pTableNd->GetTable(); @@ -3570,7 +3570,7 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rTable ); - aFndBox.DelFrms( rTable ); + aFndBox.DelFrames( rTable ); // TL_CHART2: // tell the charts about the table to be deleted and have them use their own data @@ -3578,8 +3578,8 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, // Sync the TableFormat's Width { - const SwFormatFrmSize& rTableSz = rTable.GetFrameFormat()->GetFrmSize(); - const SwFormatFrmSize& rDelTableSz = rDelTable.GetFrameFormat()->GetFrmSize(); + const SwFormatFrameSize& rTableSz = rTable.GetFrameFormat()->GetFrameSize(); + const SwFormatFrameSize& rDelTableSz = rDelTable.GetFrameFormat()->GetFrameSize(); if( rTableSz != rDelTableSz ) { // The needs correction @@ -3649,7 +3649,7 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, } // Update Layout - aFndBox.MakeFrms( rTable ); + aFndBox.MakeFrames( rTable ); return true; } diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 61c6a95fc386..99be14a5312e 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -94,38 +94,38 @@ void SwTableFormatCmp::Delete( std::vector<SwTableFormatCmp*> &rArr ) delete pCmp; } -static void lcl_GetStartEndCell( const SwCursor& rCrsr, - SwLayoutFrm *&prStart, SwLayoutFrm *&prEnd ) +static void lcl_GetStartEndCell( const SwCursor& rCursor, + SwLayoutFrame *&prStart, SwLayoutFrame *&prEnd ) { - OSL_ENSURE( rCrsr.GetContentNode() && rCrsr.GetContentNode( false ), + OSL_ENSURE( rCursor.GetContentNode() && rCursor.GetContentNode( false ), "Tab selection not at ContentNode" ); Point aPtPos, aMkPos; - const SwShellCrsr* pShCrsr = dynamic_cast<const SwShellCrsr*>(&rCrsr); - if( pShCrsr ) + const SwShellCursor* pShCursor = dynamic_cast<const SwShellCursor*>(&rCursor); + if( pShCursor ) { - aPtPos = pShCrsr->GetPtPos(); - aMkPos = pShCrsr->GetMkPos(); + aPtPos = pShCursor->GetPtPos(); + aMkPos = pShCursor->GetMkPos(); } // Robust: - SwContentNode* pPointNd = rCrsr.GetContentNode(); - SwContentNode* pMarkNd = rCrsr.GetContentNode(false); + SwContentNode* pPointNd = rCursor.GetContentNode(); + SwContentNode* pMarkNd = rCursor.GetContentNode(false); - SwFrm* pPointFrm = pPointNd ? pPointNd->getLayoutFrm( pPointNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos ) : nullptr; - SwFrm* pMarkFrm = pMarkNd ? pMarkNd->getLayoutFrm( pMarkNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos ) : nullptr; + SwFrame* pPointFrame = pPointNd ? pPointNd->getLayoutFrame( pPointNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos ) : nullptr; + SwFrame* pMarkFrame = pMarkNd ? pMarkNd->getLayoutFrame( pMarkNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos ) : nullptr; - prStart = pPointFrm ? pPointFrm->GetUpper() : nullptr; - prEnd = pMarkFrm ? pMarkFrm->GetUpper() : nullptr; + prStart = pPointFrame ? pPointFrame->GetUpper() : nullptr; + prEnd = pMarkFrame ? pMarkFrame->GetUpper() : nullptr; } static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, - bool bAllCrsr = false ) + bool bAllCursor = false ) { - const SwTableCursor* pTableCrsr = + const SwTableCursor* pTableCursor = dynamic_cast<const SwTableCursor*>(&rCursor); - if( pTableCrsr ) - ::GetTableSelCrs( *pTableCrsr, rBoxes ); + if( pTableCursor ) + ::GetTableSelCrs( *pTableCursor, rBoxes ); else { const SwPaM *pCurPam = &rCursor, *pSttPam = pCurPam; @@ -137,7 +137,7 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, GetTableBox( pNd->GetIndex() )); rBoxes.insert( pBox ); } - } while( bAllCrsr && + } while( bAllCursor && pSttPam != ( pCurPam = pCurPam->GetNext()) ); } return !rBoxes.empty(); @@ -268,9 +268,9 @@ static void lcl_ProcessRowAttr( std::vector<SwTableFormatCmp*>& rFormatCmp, SwTa } } -static void lcl_ProcessBoxSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableBox *pBox, const SwFormatFrmSize &rNew ); +static void lcl_ProcessBoxSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableBox *pBox, const SwFormatFrameSize &rNew ); -static void lcl_ProcessRowSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableLine *pLine, const SwFormatFrmSize &rNew ) +static void lcl_ProcessRowSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableLine *pLine, const SwFormatFrameSize &rNew ) { lcl_ProcessRowAttr( rFormatCmp, pLine, rNew ); SwTableBoxes &rBoxes = pLine->GetTabBoxes(); @@ -278,12 +278,12 @@ static void lcl_ProcessRowSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTa ::lcl_ProcessBoxSize( rFormatCmp, pBox, rNew ); } -static void lcl_ProcessBoxSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableBox *pBox, const SwFormatFrmSize &rNew ) +static void lcl_ProcessBoxSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableBox *pBox, const SwFormatFrameSize &rNew ) { SwTableLines &rLines = pBox->GetTabLines(); if ( !rLines.empty() ) { - SwFormatFrmSize aSz( rNew ); + SwFormatFrameSize aSz( rNew ); aSz.SetHeight( rNew.GetHeight() ? rNew.GetHeight() / rLines.size() : 0 ); for ( auto pLine : rLines ) ::lcl_ProcessRowSize( rFormatCmp, pLine, aSz ); @@ -363,7 +363,7 @@ void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFormatRowSplit *& rpSz ) * Of course we can only touch every Line once. */ -void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrmSize &rNew ) +void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrameSize &rNew ) { SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTableNd ) @@ -389,7 +389,7 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrmSize &rNew ) } } -void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz ) +void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrameSize *& rpSz ) { rpSz = nullptr; @@ -401,13 +401,13 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz ) if( !aRowArr.empty() ) { - rpSz = &(SwFormatFrmSize&)aRowArr[0]->GetFrameFormat()->GetFrmSize(); + rpSz = &(SwFormatFrameSize&)aRowArr[0]->GetFrameFormat()->GetFrameSize(); if (rpSz) { for ( auto pLn : aRowArr ) { - if ( *rpSz != pLn->GetFrameFormat()->GetFrmSize() ) + if ( *rpSz != pLn->GetFrameFormat()->GetFrameSize() ) { rpSz = nullptr; break; @@ -415,7 +415,7 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz ) } } if ( rpSz ) - rpSz = new SwFormatFrmSize( *rpSz ); + rpSz = new SwFormatFrameSize( *rpSz ); } } } @@ -437,15 +437,15 @@ bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly ) for ( auto pLn : aRowArr ) { - SwIterator<SwFrm,SwFormat> aIter( *pLn->GetFrameFormat() ); - SwFrm* pFrm = aIter.First(); - while ( pFrm ) + SwIterator<SwFrame,SwFormat> aIter( *pLn->GetFrameFormat() ); + SwFrame* pFrame = aIter.First(); + while ( pFrame ) { - nHeight = std::max( nHeight, pFrm->Frm().Height() ); - pFrm = aIter.Next(); + nHeight = std::max( nHeight, pFrame->Frame().Height() ); + pFrame = aIter.Next(); } } - SwFormatFrmSize aNew( ATT_MIN_SIZE, 0, nHeight ); + SwFormatFrameSize aNew( ATT_MIN_SIZE, 0, nHeight ); if (GetIDocumentUndoRedo().DoesUndo()) { @@ -519,28 +519,28 @@ bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) return bRet; } -inline void InsertCell( std::vector<SwCellFrm*>& rCellArr, SwCellFrm* pCellFrm ) +inline void InsertCell( std::vector<SwCellFrame*>& rCellArr, SwCellFrame* pCellFrame ) { - if( rCellArr.end() == std::find( rCellArr.begin(), rCellArr.end(), pCellFrm ) ) - rCellArr.push_back( pCellFrm ); + if( rCellArr.end() == std::find( rCellArr.begin(), rCellArr.end(), pCellFrame ) ) + rCellArr.push_back( pCellFrame ); } -static void lcl_CollectCells( std::vector<SwCellFrm*> &rArr, const SwRect &rUnion, - SwTabFrm *pTab ) +static void lcl_CollectCells( std::vector<SwCellFrame*> &rArr, const SwRect &rUnion, + SwTabFrame *pTab ) { - SwLayoutFrm *pCell = pTab->FirstCell(); + SwLayoutFrame *pCell = pTab->FirstCell(); do { // If the Cell contains a CellFrame, we need to use it // in order to get to the Cell - while ( !pCell->IsCellFrm() ) + while ( !pCell->IsCellFrame() ) pCell = pCell->GetUpper(); OSL_ENSURE( pCell, "Frame is not a Cell" ); - if ( rUnion.IsOver( pCell->Frm() ) ) - ::InsertCell( rArr, static_cast<SwCellFrm*>(pCell) ); + if ( rUnion.IsOver( pCell->Frame() ) ) + ::InsertCell( rArr, static_cast<SwCellFrame*>(pCell) ); // Make sure the Cell is left (Areas) - SwLayoutFrm *pTmp = pCell; + SwLayoutFrame *pTmp = pCell; do { pTmp = pTmp->GetNextLayoutLeaf(); } while ( pCell->IsAnLower( pTmp ) ); @@ -555,7 +555,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) if( !pTableNd ) return ; - SwLayoutFrm *pStart, *pEnd; + SwLayoutFrame *pStart, *pEnd; ::lcl_GetStartEndCell( rCursor, pStart, pEnd ); SwSelUnions aUnions; @@ -620,11 +620,11 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) for ( SwSelUnions::size_type i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - SwTabFrm *pTab = pUnion->GetTable(); + SwTabFrame *pTab = pUnion->GetTable(); const SwRect &rUnion = pUnion->GetUnion(); const bool bLast = (i == aUnions.size() - 1); - std::vector<SwCellFrm*> aCellArr; + std::vector<SwCellFrame*> aCellArr; aCellArr.reserve( 255 ); ::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab ); @@ -643,17 +643,17 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) bool bTopOver, bLeftOver, bRightOver, bBottomOver; if ( bVert ) { - bTopOver = pCell->Frm().Right() >= rUnion.Right(); - bLeftOver = pCell->Frm().Top() <= rUnion.Top(); - bRightOver = pCell->Frm().Bottom() >= rUnion.Bottom(); - bBottomOver = pCell->Frm().Left() <= rUnion.Left(); + bTopOver = pCell->Frame().Right() >= rUnion.Right(); + bLeftOver = pCell->Frame().Top() <= rUnion.Top(); + bRightOver = pCell->Frame().Bottom() >= rUnion.Bottom(); + bBottomOver = pCell->Frame().Left() <= rUnion.Left(); } else { - bTopOver = pCell->Frm().Top() <= rUnion.Top(); - bLeftOver = pCell->Frm().Left() <= rUnion.Left(); - bRightOver = pCell->Frm().Right() >= rUnion.Right(); - bBottomOver = pCell->Frm().Bottom() >= rUnion.Bottom(); + bTopOver = pCell->Frame().Top() <= rUnion.Top(); + bLeftOver = pCell->Frame().Left() <= rUnion.Left(); + bRightOver = pCell->Frame().Right() >= rUnion.Right(); + bBottomOver = pCell->Frame().Bottom() >= rUnion.Bottom(); } if ( bRTL ) @@ -800,11 +800,11 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrm* pFrm = rCursor.GetContentNode()->getLayoutFrm( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm(); + SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->BordersChanged( - pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), true ); + pTableLayout->GetBrowseWidthByTabFrame( *pTabFrame ), true ); } SwTableFormatCmp::Delete( aFormatCmp ); ::ClearFEShellTabCols(); @@ -839,7 +839,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, if( !pTableNd ) return ; - SwLayoutFrm *pStart, *pEnd; + SwLayoutFrame *pStart, *pEnd; ::lcl_GetStartEndCell( rCursor, pStart, pEnd ); SwSelUnions aUnions; @@ -856,8 +856,8 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, for( auto &rU : aUnions ) { SwSelUnion *pUnion = &rU; - SwTabFrm *pTab = pUnion->GetTable(); - std::vector<SwCellFrm*> aCellArr; + SwTabFrame *pTab = pUnion->GetTable(); + std::vector<SwCellFrame*> aCellArr; aCellArr.reserve( 255 ); ::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab ); @@ -895,11 +895,11 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrm* pFrm = rCursor.GetContentNode()->getLayoutFrm( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm(); + SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->BordersChanged( - pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), true ); + pTableLayout->GetBrowseWidthByTabFrame( *pTabFrame ), true ); } ::ClearFEShellTabCols(); getIDocumentState().SetModified(); @@ -913,7 +913,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) if( !pTableNd ) return ; - SwLayoutFrm *pStart, *pEnd; + SwLayoutFrame *pStart, *pEnd; ::lcl_GetStartEndCell( rCursor, pStart, pEnd ); SwSelUnions aUnions; @@ -938,14 +938,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) for ( SwSelUnions::size_type i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTab = pUnion->GetTable(); + const SwTabFrame *pTab = pUnion->GetTable(); const SwRect &rUnion = pUnion->GetUnion(); const bool bFirst = i == 0; const bool bLast = (i == aUnions.size() - 1); - std::vector<SwCellFrm*> aCellArr; + std::vector<SwCellFrame*> aCellArr; aCellArr.reserve(255); - ::lcl_CollectCells( aCellArr, rUnion, const_cast<SwTabFrm*>(pTab) ); + ::lcl_CollectCells( aCellArr, rUnion, const_cast<SwTabFrame*>(pTab) ); for ( auto pCell : aCellArr ) { @@ -954,17 +954,17 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) bool bTopOver, bLeftOver, bRightOver, bBottomOver; if ( bVert ) { - bTopOver = pCell->Frm().Right() >= rUnion.Right(); - bLeftOver = pCell->Frm().Top() <= rUnion.Top(); - bRightOver = pCell->Frm().Bottom() >= rUnion.Bottom(); - bBottomOver = pCell->Frm().Left() <= rUnion.Left(); + bTopOver = pCell->Frame().Right() >= rUnion.Right(); + bLeftOver = pCell->Frame().Top() <= rUnion.Top(); + bRightOver = pCell->Frame().Bottom() >= rUnion.Bottom(); + bBottomOver = pCell->Frame().Left() <= rUnion.Left(); } else { - bTopOver = pCell->Frm().Top() <= rUnion.Top(); - bLeftOver = pCell->Frm().Left() <= rUnion.Left(); - bRightOver = pCell->Frm().Right() >= rUnion.Right(); - bBottomOver = pCell->Frm().Bottom() >= rUnion.Bottom(); + bTopOver = pCell->Frame().Top() <= rUnion.Top(); + bLeftOver = pCell->Frame().Left() <= rUnion.Left(); + bRightOver = pCell->Frame().Right() >= rUnion.Right(); + bBottomOver = pCell->Frame().Bottom() >= rUnion.Bottom(); } if ( bRTL ) @@ -1162,11 +1162,11 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ) SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrm* pFrm = rCursor.GetContentNode()->getLayoutFrm( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm(); + SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->Resize( - pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), true ); + pTableLayout->GetBrowseWidthByTabFrame( *pTabFrame ), true ); } SwTableFormatCmp::Delete( aFormatCmp ); getIDocumentState().SetModified(); @@ -1204,7 +1204,7 @@ bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) case RES_FRAMEDIR: { const SvxFrameDirectionItem& rDir = - aBoxes[i]->GetFrameFormat()->GetFrmDir(); + aBoxes[i]->GetFrameFormat()->GetFrameDir(); if( !bOneFound ) { static_cast<SvxFrameDirectionItem&>(rToFill) = rDir; @@ -1254,26 +1254,26 @@ sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) return nAlign; } -static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell ) +static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrame *pCell ) { SwTwips nRet = 0; - const SwFrm *pFrm = pCell->Lower(); // The whole Line + const SwFrame *pFrame = pCell->Lower(); // The whole Line SWRECTFN( pCell ) - while ( pFrm ) + while ( pFrame ) { - const SwTwips nAdd = (pFrm->Frm().*fnRect->fnGetWidth)() - - (pFrm->Prt().*fnRect->fnGetWidth)(); + const SwTwips nAdd = (pFrame->Frame().*fnRect->fnGetWidth)() - + (pFrame->Prt().*fnRect->fnGetWidth)(); - // pFrm does not necessarily have to be a SwTextFrm! - const SwTwips nCalcFitToContent = pFrm->IsTextFrm() ? - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->CalcFitToContent() : - (pFrm->Prt().*fnRect->fnGetWidth)(); + // pFrame does not necessarily have to be a SwTextFrame! + const SwTwips nCalcFitToContent = pFrame->IsTextFrame() ? + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->CalcFitToContent() : + (pFrame->Prt().*fnRect->fnGetWidth)(); nRet = std::max( nRet, nCalcFitToContent + nAdd ); - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } // Surrounding border as well as left and Right Border also need to be respected - nRet += (pCell->Frm().*fnRect->fnGetWidth)() - + nRet += (pCell->Frame().*fnRect->fnGetWidth)() - (pCell->Prt().*fnRect->fnGetWidth)(); // To compensate for the accuracy of calculation later on in SwTable::SetTabCols @@ -1296,12 +1296,12 @@ static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell ) * the desired one. It's overwritten if it's smaller. */ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols &rCols, - const SwLayoutFrm *pCell, const SwLayoutFrm *pTab, + const SwLayoutFrame *pCell, const SwLayoutFrame *pTab, bool bWishValues ) { const sal_uInt16 nWish = bWishValues ? ::lcl_CalcCellFit( pCell ) : - MINLAY + sal_uInt16(pCell->Frm().Width() - pCell->Prt().Width()); + MINLAY + sal_uInt16(pCell->Frame().Width() - pCell->Prt().Width()); SWRECTFN( pTab ) @@ -1313,14 +1313,14 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC nColRight += rCols.GetLeftMin(); // Adapt values to the proportions of the Table (Follows) - if ( rCols.GetLeftMin() != (pTab->Frm().*fnRect->fnGetLeft)() ) + if ( rCols.GetLeftMin() != (pTab->Frame().*fnRect->fnGetLeft)() ) { - const long nDiff = (pTab->Frm().*fnRect->fnGetLeft)() - rCols.GetLeftMin(); + const long nDiff = (pTab->Frame().*fnRect->fnGetLeft)() - rCols.GetLeftMin(); nColLeft += nDiff; nColRight += nDiff; } - const long nCellLeft = (pCell->Frm().*fnRect->fnGetLeft)(); - const long nCellRight = (pCell->Frm().*fnRect->fnGetRight)(); + const long nCellLeft = (pCell->Frame().*fnRect->fnGetLeft)(); + const long nCellRight = (pCell->Frame().*fnRect->fnGetRight)(); // Calculate overlapping value long nWidth = 0; @@ -1330,9 +1330,9 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC nWidth = nCellRight - nColLeft; else if ( nColLeft >= nCellLeft && nColRight <= nCellRight ) nWidth = nColRight - nColLeft; - if ( nWidth && pCell->Frm().Width() ) + if ( nWidth && pCell->Frame().Width() ) { - long nTmp = nWidth * nWish / pCell->Frm().Width(); + long nTmp = nWidth * nWish / pCell->Frame().Width(); if ( sal_uInt16(nTmp) > rToFill[i] ) rToFill[i] = sal_uInt16(nTmp); } @@ -1357,7 +1357,7 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC * Selection. */ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols &rCols, - const SwLayoutFrm *pStart, const SwLayoutFrm *pEnd, + const SwLayoutFrame *pStart, const SwLayoutFrame *pEnd, bool bWishValues ) { SwSelUnions aUnions; @@ -1367,21 +1367,21 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols for ( auto &rU : aUnions ) { SwSelUnion *pSelUnion = &rU; - const SwTabFrm *pTab = pSelUnion->GetTable(); + const SwTabFrame *pTab = pSelUnion->GetTable(); const SwRect &rUnion = pSelUnion->GetUnion(); SWRECTFN( pTab ) bool bRTL = pTab->IsRightToLeft(); - const SwLayoutFrm *pCell = pTab->FirstCell(); + const SwLayoutFrame *pCell = pTab->FirstCell(); if (!pCell) continue; do { - if ( pCell->IsCellFrm() && pCell->FindTabFrm() == pTab && ::IsFrmInTableSel( rUnion, pCell ) ) + if ( pCell->IsCellFrame() && pCell->FindTabFrame() == pTab && ::IsFrameInTableSel( rUnion, pCell ) ) { - const long nCLeft = (pCell->Frm().*fnRect->fnGetLeft)(); - const long nCRight = (pCell->Frm().*fnRect->fnGetRight)(); + const long nCLeft = (pCell->Frame().*fnRect->fnGetLeft)(); + const long nCRight = (pCell->Frame().*fnRect->fnGetRight)(); bool bNotInCols = true; @@ -1404,9 +1404,9 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols // Adapt values to the proportions of the Table (Follows) long nLeftA = nColLeft; long nRightA = nColRight; - if ( rCols.GetLeftMin() != sal_uInt16((pTab->Frm().*fnRect->fnGetLeft)()) ) + if ( rCols.GetLeftMin() != sal_uInt16((pTab->Frame().*fnRect->fnGetLeft)()) ) { - const long nDiff = (pTab->Frm().*fnRect->fnGetLeft)() - rCols.GetLeftMin(); + const long nDiff = (pTab->Frame().*fnRect->fnGetLeft)() - rCols.GetLeftMin(); nLeftA += nDiff; nRightA += nDiff; } @@ -1422,7 +1422,7 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols nFit = nWish; } else - { const sal_uInt16 nMin = MINLAY + sal_uInt16(pCell->Frm().Width() - + { const sal_uInt16 nMin = MINLAY + sal_uInt16(pCell->Frame().Width() - pCell->Prt().Width()); if ( !nFit || nMin < nFit ) nFit = nMin; @@ -1436,32 +1436,32 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols } do { pCell = pCell->GetNextLayoutLeaf(); - } while( pCell && pCell->Frm().Width() == 0 ); + } while( pCell && pCell->Frame().Width() == 0 ); } while ( pCell && pTab->IsAnLower( pCell ) ); } } void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance ) { - // Check whether the current Crsr has it's Point/Mark in a Table + // Check whether the current Cursor has it's Point/Mark in a Table SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode(); SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr; if( !pTableNd ) return ; - SwLayoutFrm *pStart, *pEnd; + SwLayoutFrame *pStart, *pEnd; ::lcl_GetStartEndCell( rCursor, pStart, pEnd ); // Collect TabCols; we reset the Table with them - SwFrm* pBoxFrm = pStart; - while( pBoxFrm && !pBoxFrm->IsCellFrm() ) - pBoxFrm = pBoxFrm->GetUpper(); + SwFrame* pBoxFrame = pStart; + while( pBoxFrame && !pBoxFrame->IsCellFrame() ) + pBoxFrame = pBoxFrame->GetUpper(); - if ( !pBoxFrm ) + if ( !pBoxFrame ) return; // Robust SwTabCols aTabCols; - GetTabCols( aTabCols, nullptr, static_cast<SwCellFrm*>(pBoxFrm) ); + GetTabCols( aTabCols, nullptr, static_cast<SwCellFrame*>(pBoxFrame) ); if ( ! aTabCols.Count() ) return; @@ -1472,10 +1472,10 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance ) ::lcl_CalcColValues( aWish, aTabCols, pStart, pEnd, true ); // It's more robust if we calculate the minimum values for the whole Table - const SwTabFrm *pTab = pStart->ImplFindTabFrm(); - pStart = const_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm const *>(pTab->FirstCell())); - pEnd = const_cast<SwLayoutFrm*>(pTab->FindLastContent()->GetUpper()); - while( !pEnd->IsCellFrm() ) + const SwTabFrame *pTab = pStart->ImplFindTabFrame(); + pStart = const_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame const *>(pTab->FirstCell())); + pEnd = const_cast<SwLayoutFrame*>(pTab->FindLastContent()->GetUpper()); + while( !pEnd->IsCellFrame() ) pEnd = pEnd->GetUpper(); ::lcl_CalcColValues( aMins, aTabCols, pStart, pEnd, false ); @@ -1560,7 +1560,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance ) const sal_Int16 nOriHori = pFormat->GetHoriOrient().GetHoriOrient(); // We can leave the "real" work to the SwTable now - SetTabCols( aTabCols, false, nullptr, static_cast<SwCellFrm*>(pBoxFrm) ); + SetTabCols( aTabCols, false, nullptr, static_cast<SwCellFrame*>(pBoxFrame) ); // Alignment might have been changed in SetTabCols; restore old value const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient(); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 9c0612cfdbdd..6b348575c743 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -380,19 +380,19 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const if( pSh ) { - const SwFrm* pFrm; - if( pNd && nullptr != ( pFrm = pNd->getLayoutFrm( pSh->GetLayout(), nullptr, nullptr, false ) ) ) + const SwFrame* pFrame; + if( pNd && nullptr != ( pFrame = pNd->getLayoutFrame( pSh->GetLayout(), nullptr, nullptr, false ) ) ) { - if ( pFrm->IsInTab() ) - pFrm = pFrm->FindTabFrm(); + if ( pFrame->IsInTab() ) + pFrame = pFrame->FindTabFrame(); - if( !pFrm->IsValid() ) + if( !pFrame->IsValid() ) do - { pFrm = pFrm->FindPrev(); - } while ( pFrm && !pFrm->IsValid() ); + { pFrame = pFrame->FindPrev(); + } while ( pFrame && !pFrame->IsValid() ); - if( !pFrm || pSh->VisArea().IsOver( pFrm->Frm() ) ) + if( !pFrame || pSh->VisArea().IsOver( pFrame->Frame() ) ) bRet = true; } } @@ -419,9 +419,9 @@ bool SwNode::IsProtect() const if( nullptr != ( pSttNd = FindTableBoxStartNode() ) ) { - SwContentFrm* pCFrm; - if( IsContentNode() && nullptr != (pCFrm = static_cast<const SwContentNode*>(this)->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) )) - return pCFrm->IsProtected(); + SwContentFrame* pCFrame; + if( IsContentNode() && nullptr != (pCFrame = static_cast<const SwContentNode*>(this)->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) )) + return pCFrame->IsProtected(); const SwTableBox* pBox = pSttNd->FindTableNode()->GetTable(). GetTableBox( pSttNd->GetIndex() ); @@ -483,10 +483,10 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay, // Are we going through the layout? if( !pPgDesc ) { - const SwFrm* pFrm; - const SwPageFrm* pPage; - if( pNode && nullptr != ( pFrm = pNode->getLayoutFrm( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, bCalcLay ) ) && - nullptr != ( pPage = pFrm->FindPageFrm() ) ) + const SwFrame* pFrame; + const SwPageFrame* pPage; + if( pNode && nullptr != ( pFrame = pNode->getLayoutFrame( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, bCalcLay ) ) && + nullptr != ( pPage = pFrame->FindPageFrame() ) ) { pPgDesc = pPage->GetPageDesc(); if ( pPgDescNdIdx ) @@ -707,9 +707,9 @@ SwFrameFormat* SwNode::GetFlyFormat() const { if( IsContentNode() ) { - SwContentFrm* pFrm = SwIterator<SwContentFrm,SwContentNode>( *static_cast<const SwContentNode*>(this) ).First(); - if( pFrm ) - pRet = pFrm->FindFlyFrm()->GetFormat(); + SwContentFrame* pFrame = SwIterator<SwContentFrame,SwContentNode>( *static_cast<const SwContentNode*>(this) ).First(); + if( pFrame ) + pRet = pFrame->FindFlyFrame()->GetFormat(); } if( !pRet ) { @@ -779,11 +779,11 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const const SwContentNode* pCNd = GetContentNode(); Point aPt( 0, 0 ); - const SwFrm* pFrm = pRet->getLayoutFrm( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ), - * pMyFrm = pCNd ? pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ) : nullptr; - const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : nullptr; - if( pPgFrm && pMyFrm && - pPgFrm->Frm().Top() > pMyFrm->Frm().Top() ) + const SwFrame* pFrame = pRet->getLayoutFrame( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ), + * pMyFrame = pCNd ? pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ) : nullptr; + const SwPageFrame* pPgFrame = pFrame ? pFrame->FindPageFrame() : nullptr; + if( pPgFrame && pMyFrame && + pPgFrame->Frame().Top() > pMyFrame->Frame().Top() ) { // The one asking precedes the Page, thus its invalid pRet = nullptr; @@ -991,7 +991,7 @@ SwEndNode::SwEndNode( SwNodes& rNds, sal_uLong nPos, SwStartNode& rSttNd ) SwContentNode::SwContentNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType, SwFormatColl *pColl ) - : SwModify( pColl ), // CrsrsShell, FrameFormat, + : SwModify( pColl ), // CursorsShell, FrameFormat, SwNode( rWhere, nNdType ), m_pCondColl( nullptr ), mbSetModifyAtAttr( false ) @@ -1000,9 +1000,9 @@ SwContentNode::SwContentNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType SwContentNode::~SwContentNode() { - // The base class SwClient of SwFrm excludes itself from the dependency list! + // The base class SwClient of SwFrame excludes itself from the dependency list! // Thus, we need to delete all Frames in the dependency list. - DelFrms(false); + DelFrames(false); delete m_pCondColl; @@ -1106,32 +1106,32 @@ bool SwContentNode::InvalidateNumRule() return nullptr != pRule; } -SwContentFrm *SwContentNode::getLayoutFrm( const SwRootFrm* _pRoot, - const Point* pPoint, const SwPosition *pPos, const bool bCalcFrm ) const +SwContentFrame *SwContentNode::getLayoutFrame( const SwRootFrame* _pRoot, + const Point* pPoint, const SwPosition *pPos, const bool bCalcFrame ) const { - return static_cast<SwContentFrm*>( ::GetFrmOfModify( _pRoot, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_CNTNT, - pPoint, pPos, bCalcFrm )); + return static_cast<SwContentFrame*>( ::GetFrameOfModify( _pRoot, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_CNTNT, + pPoint, pPos, bCalcFrame )); } SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint, - const bool bCalcFrm ) const + const bool bCalcFrame ) const { SwRect aRet; - SwContentFrm* pFrm = static_cast<SwContentFrm*>( ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), - FRM_CNTNT, pPoint, nullptr, bCalcFrm ) ); - if( pFrm ) - aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm(); + SwContentFrame* pFrame = static_cast<SwContentFrame*>( ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), + FRM_CNTNT, pPoint, nullptr, bCalcFrame ) ); + if( pFrame ) + aRet = bPrtArea ? pFrame->Prt() : pFrame->Frame(); return aRet; } -SwRect SwContentNode::FindPageFrmRect( const bool bPrtArea, const Point* pPoint, - const bool bCalcFrm ) const +SwRect SwContentNode::FindPageFrameRect( const bool bPrtArea, const Point* pPoint, + const bool bCalcFrame ) const { SwRect aRet; - SwFrm* pFrm = ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), - FRM_CNTNT, pPoint, nullptr, bCalcFrm ); - if( pFrm && nullptr != ( pFrm = pFrm->FindPageFrm() )) - aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm(); + SwFrame* pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), + FRM_CNTNT, pPoint, nullptr, bCalcFrame ); + if( pFrame && nullptr != ( pFrame = pFrame->FindPageFrame() )) + aRet = bPrtArea ? pFrame->Prt() : pFrame->Frame(); return aRet; } @@ -1167,7 +1167,7 @@ SwFormatColl *SwContentNode::ChgFormatColl( SwFormatColl *pNewColl ) } if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } return pOldColl; @@ -1271,7 +1271,7 @@ bool SwContentNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const * Creates all Views for the Doc for this Node. * The created ContentFrames are attached to the corresponding Layout. */ -void SwContentNode::MakeFrms( SwContentNode& rNode ) +void SwContentNode::MakeFrames( SwContentNode& rNode ) { OSL_ENSURE( &rNode != this, "No ContentNode or CopyNode and new Node identical." ); @@ -1279,31 +1279,31 @@ void SwContentNode::MakeFrms( SwContentNode& rNode ) if( !HasWriterListeners() || &rNode == this ) // Do we actually have Frames? return; - SwFrm *pFrm; - SwLayoutFrm *pUpper; + SwFrame *pFrame; + SwLayoutFrame *pUpper; // Create Frames for Nodes which come after the Table? OSL_ENSURE( FindTableNode() == rNode.FindTableNode(), "Table confusion" ); SwNode2Layout aNode2Layout( *this, rNode.GetIndex() ); - while( nullptr != (pUpper = aNode2Layout.UpperFrm( pFrm, rNode )) ) + while( nullptr != (pUpper = aNode2Layout.UpperFrame( pFrame, rNode )) ) { - SwFrm *pNew = rNode.MakeFrm( pUpper ); - pNew->Paste( pUpper, pFrm ); + SwFrame *pNew = rNode.MakeFrame( pUpper ); + pNew->Paste( pUpper, pFrame ); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. - if ( pNew->IsTextFrm() ) + if ( pNew->IsTextFrame() ) { - 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<SwTextFrm*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); } } } @@ -1315,37 +1315,37 @@ void SwContentNode::MakeFrms( SwContentNode& rNode ) * * An input param to identify if the acc table should be disposed. */ -void SwContentNode::DelFrms( bool bIsDisposeAccTable ) +void SwContentNode::DelFrames( bool bIsDisposeAccTable ) { if( !HasWriterListeners() ) return; - SwIterator<SwContentFrm,SwContentNode> aIter( *this ); - for( SwContentFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwContentFrame,SwContentNode> aIter( *this ); + for( SwContentFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. - if ( pFrm->IsTextFrm() ) + if ( pFrame->IsTextFrame() ) { - SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) ); } } - if( pFrm->IsFollow() ) + if( pFrame->IsFollow() ) { - SwContentFrm* pMaster = pFrm->FindMaster(); - pMaster->SetFollow( pFrm->GetFollow() ); + SwContentFrame* pMaster = pFrame->FindMaster(); + pMaster->SetFollow( pFrame->GetFollow() ); } - pFrm->SetFollow( nullptr );//So it doesn't get funny ideas. + pFrame->SetFollow( nullptr );//So it doesn't get funny ideas. //Otherwise it could be possible that a follow //gets destroyed before its master. Following //the now invalid pointer will then lead to an @@ -1353,30 +1353,30 @@ void SwContentNode::DelFrms( bool bIsDisposeAccTable ) //crushed here because we'll destroy all of it //anyway. - if( pFrm->GetUpper() && pFrm->IsInFootnote() && !pFrm->GetIndNext() && - !pFrm->GetIndPrev() ) + if( pFrame->GetUpper() && pFrame->IsInFootnote() && !pFrame->GetIndNext() && + !pFrame->GetIndPrev() ) { - SwFootnoteFrm *pFootnote = pFrm->FindFootnoteFrm(); - OSL_ENSURE( pFootnote, "You promised a FootnoteFrm?" ); - SwContentFrm* pCFrm; + SwFootnoteFrame *pFootnote = pFrame->FindFootnoteFrame(); + OSL_ENSURE( pFootnote, "You promised a FootnoteFrame?" ); + SwContentFrame* pCFrame; if( !pFootnote->GetFollow() && !pFootnote->GetMaster() && - nullptr != ( pCFrm = pFootnote->GetRefFromAttr()) && pCFrm->IsFollow() ) + nullptr != ( pCFrame = pFootnote->GetRefFromAttr()) && pCFrame->IsFollow() ) { - OSL_ENSURE( pCFrm->IsTextFrm(), "NoTextFrm has Footnote?" ); - static_cast<SwTextFrm*>(pCFrm->FindMaster())->Prepare( PREP_FTN_GONE ); + OSL_ENSURE( pCFrame->IsTextFrame(), "NoTextFrame has Footnote?" ); + static_cast<SwTextFrame*>(pCFrame->FindMaster())->Prepare( PREP_FTN_GONE ); } } //Set acc table dispose state - pFrm->SetAccTableDispose( bIsDisposeAccTable ); - pFrm->Cut(); + pFrame->SetAccTableDispose( bIsDisposeAccTable ); + pFrame->Cut(); //Set acc table dispose state to default value - pFrm->SetAccTableDispose( true ); - SwFrm::DestroyFrm(pFrm); + pFrame->SetAccTableDispose( true ); + SwFrame::DestroyFrame(pFrame); } if( bIsDisposeAccTable && IsTextNode() ) { - GetTextNode()->DelFrms_TextNodePart(); + GetTextNode()->DelFrames_TextNodePart(); } } @@ -1411,7 +1411,7 @@ bool SwContentNode::GetInfo( SfxPoolItem& rInfo ) const case RES_CONTENT_VISIBLE: { static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = - SwIterator<SwFrm,SwContentNode>(*this).First(); + SwIterator<SwFrame,SwContentNode>(*this).First(); } return false; } @@ -1429,7 +1429,7 @@ bool SwContentNode::SetAttr(const SfxPoolItem& rAttr ) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1460,7 +1460,7 @@ bool SwContentNode::SetAttr( const SfxItemSet& rSet ) { if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1539,7 +1539,7 @@ bool SwContentNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1588,7 +1588,7 @@ bool SwContentNode::ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1628,7 +1628,7 @@ sal_uInt16 SwContentNode::ResetAllAttr() if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1803,7 +1803,7 @@ void SwContentNode::SetCondFormatColl( SwFormatColl* pColl ) } if( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } } @@ -1949,20 +1949,20 @@ short SwContentNode::GetTextDirection( const SwPosition& rPos, aPt = *pPt; // #i72024# - No format of the frame, because this can cause recursive layout actions - SwFrm* pFrm = getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, &rPos, false ); + SwFrame* pFrame = getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, &rPos, false ); - if ( pFrm ) + if ( pFrame ) { - if ( pFrm->IsVertical() ) + if ( pFrame->IsVertical() ) { - if ( pFrm->IsRightToLeft() ) + if ( pFrame->IsRightToLeft() ) nRet = FRMDIR_VERT_TOP_LEFT; else nRet = FRMDIR_VERT_TOP_RIGHT; } else { - if ( pFrm->IsRightToLeft() ) + if ( pFrame->IsRightToLeft() ) nRet = FRMDIR_HORI_RIGHT_TOP; else nRet = FRMDIR_HORI_LEFT_TOP; diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index b000d243748c..d73858662279 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -36,27 +36,27 @@ */ class SwNode2LayImpl { - SwIterator<SwFrm,SwModify>* pIter; + SwIterator<SwFrame,SwModify>* pIter; SwModify* pMod; - std::vector<SwFrm*>* pUpperFrms; // To collect the Upper + std::vector<SwFrame*>* pUpperFrames; // To collect the Upper sal_uLong nIndex; // The Index of the to-be-inserted Nodes bool bMaster : 1; // true => only Master, false => only Frames without Follow bool bInit : 1; // Did we already call First() at SwClient? public: SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch ); - ~SwNode2LayImpl() { delete pIter; delete pUpperFrms; } - SwFrm* NextFrm(); // Returns the next "useful" Frame - SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode &rNode ); - void SaveUpperFrms(); // Saves (and locks if needed) the pUpper + ~SwNode2LayImpl() { delete pIter; delete pUpperFrames; } + SwFrame* NextFrame(); // Returns the next "useful" Frame + SwLayoutFrame* UpperFrame( SwFrame* &rpFrame, const SwNode &rNode ); + void SaveUpperFrames(); // Saves (and locks if needed) the pUpper // Inserts a Frame under every pUpper of the array - void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ); + void RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ); - SwFrm* GetFrm( const Point* pDocPos = nullptr, + SwFrame* GetFrame( const Point* pDocPos = nullptr, const SwPosition *pPos = nullptr, - const bool bCalcFrm = true ) const; + const bool bCalcFrame = true ) const; }; -SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx) +SwNode* GoNextWithFrame(const SwNodes& rNodes, SwNodeIndex *pIdx) { if( pIdx->GetIndex() >= rNodes.Count() - 1 ) return nullptr; @@ -68,9 +68,9 @@ SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx) pNd = &aTmp.GetNode(); bool bFound = false; if ( pNd->IsContentNode() ) - bFound = SwIterator<SwFrm,SwContentNode>(*static_cast<SwContentNode*>(pNd)).First(); + bFound = SwIterator<SwFrame,SwContentNode>(*static_cast<SwContentNode*>(pNd)).First(); else if ( pNd->IsTableNode() ) - bFound = SwIterator<SwFrm,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First() ; + bFound = SwIterator<SwFrame,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First() ; else if( pNd->IsEndNode() && !pNd->StartOfSectionNode()->IsSectionNode() ) { pNd = nullptr; @@ -88,7 +88,7 @@ SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx) return pNd; } -SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx) +SwNode* GoPreviousWithFrame(SwNodeIndex *pIdx) { if( !pIdx->GetIndex() ) return nullptr; @@ -100,9 +100,9 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx) pNd = &aTmp.GetNode(); bool bFound = false; if ( pNd->IsContentNode() ) - bFound = SwIterator<SwFrm,SwContentNode>(*static_cast<SwContentNode*>(pNd)).First(); + bFound = SwIterator<SwFrame,SwContentNode>(*static_cast<SwContentNode*>(pNd)).First(); else if ( pNd->IsTableNode() ) - bFound = SwIterator<SwFrm,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First(); + bFound = SwIterator<SwFrame,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First(); else if( pNd->IsStartNode() && !pNd->IsSectionNode() ) { pNd = nullptr; @@ -130,7 +130,7 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx) * We insert before or after it. */ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch ) - : pUpperFrms( nullptr ), nIndex( nIdx ), bInit( false ) + : pUpperFrames( nullptr ), nIndex( nIdx ), bInit( false ) { const SwNode* pNd; if( bSearch || rNode.IsSectionNode() ) @@ -140,7 +140,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc if( !bSearch && rNode.GetIndex() < nIndex ) { SwNodeIndex aTmp( *rNode.EndOfSectionNode(), +1 ); - pNd = GoPreviousWithFrm( &aTmp ); + pNd = GoPreviousWithFrame( &aTmp ); if( !bSearch && pNd && rNode.GetIndex() > pNd->GetIndex() ) pNd = nullptr; // Do not go over the limits bMaster = false; @@ -148,7 +148,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc else { SwNodeIndex aTmp( rNode, -1 ); - pNd = GoNextWithFrm( rNode.GetNodes(), &aTmp ); + pNd = GoNextWithFrame( rNode.GetNodes(), &aTmp ); bMaster = true; if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() ) pNd = nullptr; // Do not go over the limits @@ -168,7 +168,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc OSL_ENSURE( pNd->IsTableNode(), "For Tablenodes only" ); pMod = pNd->GetTableNode()->GetTable().GetFrameFormat(); } - pIter = new SwIterator<SwFrm,SwModify>( *pMod ); + pIter = new SwIterator<SwFrame,SwModify>( *pMod ); } else { @@ -187,13 +187,13 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc * When inserting after it, we find and return the last Follow starting * from the Master. * - * If the Frame is located in a SectionFrm, we check to see whether the + * If the Frame is located in a SectionFrame, we check to see whether the * SectionFrame is the suitable return value (instead of the Frame itself). * This is the case if the to-be-inserted Node is outside of the Section. */ -SwFrm* SwNode2LayImpl::NextFrm() +SwFrame* SwNode2LayImpl::NextFrame() { - SwFrm* pRet; + SwFrame* pRet; if( !pIter ) return nullptr; if( !bInit ) @@ -205,7 +205,7 @@ SwFrm* SwNode2LayImpl::NextFrm() pRet = pIter->Next(); while( pRet ) { - SwFlowFrm* pFlow = SwFlowFrm::CastFlowFrm( pRet ); + SwFlowFrame* pFlow = SwFlowFrame::CastFlowFrame( pRet ); OSL_ENSURE( pFlow, "Content or Table expected?!" ); // Follows are pretty volatile, thus we ignore them. // Even if we insert after the Frame, we start from the Master @@ -216,16 +216,16 @@ SwFrm* SwNode2LayImpl::NextFrm() { while( pFlow->HasFollow() ) pFlow = pFlow->GetFollow(); - pRet = &(pFlow->GetFrm()); + pRet = &(pFlow->GetFrame()); } if( pRet->IsInSct() ) { - SwSectionFrm* pSct = pRet->FindSctFrm(); + SwSectionFrame* pSct = pRet->FindSctFrame(); // ATTENTION: If we are in a Footnote, from a Layout point of view // it could be located in a Section with columns, although it // should be outside of it when looking at the Nodes. // Thus, when dealing with Footnotes, we need to check whether the - // SectionFrm is also located within the Footnote and not outside of it. + // SectionFrame is also located within the Footnote and not outside of it. if( !pRet->IsInFootnote() || pSct->IsInFootnote() ) { OSL_ENSURE( pSct && pSct->GetSection(), "Where's my section?" ); @@ -233,7 +233,7 @@ SwFrm* SwNode2LayImpl::NextFrm() OSL_ENSURE( pNd, "Lost SectionNode" ); // If the result Frame is located within a Section Frame // whose Section does not contain the Node, we return with - // the SectionFrm, else we return with the Content/TabFrm + // the SectionFrame, else we return with the Content/TabFrame if( bMaster ) { if( pNd->GetIndex() >= nIndex ) @@ -250,24 +250,24 @@ SwFrm* SwNode2LayImpl::NextFrm() return nullptr; } -void SwNode2LayImpl::SaveUpperFrms() +void SwNode2LayImpl::SaveUpperFrames() { - pUpperFrms = new std::vector<SwFrm*>; - SwFrm* pFrm; - while( nullptr != (pFrm = NextFrm()) ) + pUpperFrames = new std::vector<SwFrame*>; + SwFrame* pFrame; + while( nullptr != (pFrame = NextFrame()) ) { - SwFrm* pPrv = pFrm->GetPrev(); - pFrm = pFrm->GetUpper(); - if( pFrm ) + SwFrame* pPrv = pFrame->GetPrev(); + pFrame = pFrame->GetUpper(); + if( pFrame ) { - if( pFrm->IsFootnoteFrm() ) - static_cast<SwFootnoteFrm*>(pFrm)->ColLock(); - else if( pFrm->IsInSct() ) - pFrm->FindSctFrm()->ColLock(); - if( pPrv && pPrv->IsSctFrm() ) - static_cast<SwSectionFrm*>(pPrv)->LockJoin(); - pUpperFrms->push_back( pPrv ); - pUpperFrms->push_back( pFrm ); + if( pFrame->IsFootnoteFrame() ) + static_cast<SwFootnoteFrame*>(pFrame)->ColLock(); + else if( pFrame->IsInSct() ) + pFrame->FindSctFrame()->ColLock(); + if( pPrv && pPrv->IsSctFrame() ) + static_cast<SwSectionFrame*>(pPrv)->LockJoin(); + pUpperFrames->push_back( pPrv ); + pUpperFrames->push_back( pFrame ); } } delete pIter; @@ -275,149 +275,149 @@ void SwNode2LayImpl::SaveUpperFrms() pMod = nullptr; } -SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode ) +SwLayoutFrame* SwNode2LayImpl::UpperFrame( SwFrame* &rpFrame, const SwNode &rNode ) { - rpFrm = NextFrm(); - if( !rpFrm ) + rpFrame = NextFrame(); + if( !rpFrame ) return nullptr; - SwLayoutFrm* pUpper = rpFrm->GetUpper(); - if( rpFrm->IsSctFrm() ) + SwLayoutFrame* pUpper = rpFrame->GetUpper(); + if( rpFrame->IsSctFrame() ) { const SwNode* pNode = rNode.StartOfSectionNode(); if( pNode->IsSectionNode() ) { - SwFrm* pFrm = bMaster ? rpFrm->FindPrev() : rpFrm->FindNext(); - if( pFrm && pFrm->IsSctFrm() ) + SwFrame* pFrame = bMaster ? rpFrame->FindPrev() : rpFrame->FindNext(); + if( pFrame && pFrame->IsSctFrame() ) { - // pFrm could be a "dummy"-section - if( static_cast<SwSectionFrm*>(pFrm)->GetSection() && + // pFrame could be a "dummy"-section + if( static_cast<SwSectionFrame*>(pFrame)->GetSection() && (&static_cast<const SwSectionNode*>(pNode)->GetSection() == - static_cast<SwSectionFrm*>(pFrm)->GetSection()) ) + static_cast<SwSectionFrame*>(pFrame)->GetSection()) ) { // #i22922# - consider columned sections // 'Go down' the section frame as long as the layout frame // is found, which would contain content. - while ( pFrm->IsLayoutFrm() && - static_cast<SwLayoutFrm*>(pFrm)->Lower() && - !static_cast<SwLayoutFrm*>(pFrm)->Lower()->IsFlowFrm() && - static_cast<SwLayoutFrm*>(pFrm)->Lower()->IsLayoutFrm() ) + while ( pFrame->IsLayoutFrame() && + static_cast<SwLayoutFrame*>(pFrame)->Lower() && + !static_cast<SwLayoutFrame*>(pFrame)->Lower()->IsFlowFrame() && + static_cast<SwLayoutFrame*>(pFrame)->Lower()->IsLayoutFrame() ) { - pFrm = static_cast<SwLayoutFrm*>(pFrm)->Lower(); + pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower(); } - OSL_ENSURE( pFrm->IsLayoutFrm(), - "<SwNode2LayImpl::UpperFrm(..)> - expected upper frame isn't a layout frame." ); - rpFrm = bMaster ? nullptr - : static_cast<SwLayoutFrm*>(pFrm)->Lower(); - OSL_ENSURE( !rpFrm || rpFrm->IsFlowFrm(), - "<SwNode2LayImpl::UpperFrm(..)> - expected sibling isn't a flow frame." ); - return static_cast<SwLayoutFrm*>(pFrm); + OSL_ENSURE( pFrame->IsLayoutFrame(), + "<SwNode2LayImpl::UpperFrame(..)> - expected upper frame isn't a layout frame." ); + rpFrame = bMaster ? nullptr + : static_cast<SwLayoutFrame*>(pFrame)->Lower(); + OSL_ENSURE( !rpFrame || rpFrame->IsFlowFrame(), + "<SwNode2LayImpl::UpperFrame(..)> - expected sibling isn't a flow frame." ); + return static_cast<SwLayoutFrame*>(pFrame); } - pUpper = new SwSectionFrm(const_cast<SwSectionNode*>(static_cast<const SwSectionNode*>(pNode))->GetSection(), rpFrm); - pUpper->Paste( rpFrm->GetUpper(), - bMaster ? rpFrm : rpFrm->GetNext() ); - static_cast<SwSectionFrm*>(pUpper)->Init(); - rpFrm = nullptr; + pUpper = new SwSectionFrame(const_cast<SwSectionNode*>(static_cast<const SwSectionNode*>(pNode))->GetSection(), rpFrame); + pUpper->Paste( rpFrame->GetUpper(), + bMaster ? rpFrame : rpFrame->GetNext() ); + static_cast<SwSectionFrame*>(pUpper)->Init(); + rpFrame = nullptr; // 'Go down' the section frame as long as the layout frame // is found, which would contain content. while ( pUpper->Lower() && - !pUpper->Lower()->IsFlowFrm() && - pUpper->Lower()->IsLayoutFrm() ) + !pUpper->Lower()->IsFlowFrame() && + pUpper->Lower()->IsLayoutFrame() ) { - pUpper = static_cast<SwLayoutFrm*>(pUpper->Lower()); + pUpper = static_cast<SwLayoutFrame*>(pUpper->Lower()); } return pUpper; } } } if( !bMaster ) - rpFrm = rpFrm->GetNext(); + rpFrame = rpFrame->GetNext(); return pUpper; } -void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ) +void SwNode2LayImpl::RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ) { - OSL_ENSURE( pUpperFrms, "RestoreUpper without SaveUpper?" ); + OSL_ENSURE( pUpperFrames, "RestoreUpper without SaveUpper?" ); SwNode* pNd; SwDoc *pDoc = rNds.GetDoc(); bool bFirst = true; for( ; nStt < nEnd; ++nStt ) { - SwFrm* pNew = nullptr; - SwFrm* pNxt; - SwLayoutFrm* pUp; + SwFrame* pNew = nullptr; + SwFrame* pNxt; + SwLayoutFrame* pUp; if( (pNd = rNds[nStt])->IsContentNode() ) - for( std::vector<SwFrm*>::size_type n = 0; n < pUpperFrms->size(); ) + for( std::vector<SwFrame*>::size_type n = 0; n < pUpperFrames->size(); ) { - pNxt = (*pUpperFrms)[n++]; - if( bFirst && pNxt && pNxt->IsSctFrm() ) - static_cast<SwSectionFrm*>(pNxt)->UnlockJoin(); - pUp = static_cast<SwLayoutFrm*>((*pUpperFrms)[n++]); + pNxt = (*pUpperFrames)[n++]; + if( bFirst && pNxt && pNxt->IsSctFrame() ) + static_cast<SwSectionFrame*>(pNxt)->UnlockJoin(); + pUp = static_cast<SwLayoutFrame*>((*pUpperFrames)[n++]); if( pNxt ) pNxt = pNxt->GetNext(); else pNxt = pUp->Lower(); - pNew = static_cast<SwContentNode*>(pNd)->MakeFrm( pUp ); + pNew = static_cast<SwContentNode*>(pNd)->MakeFrame( pUp ); pNew->Paste( pUp, pNxt ); - (*pUpperFrms)[n-2] = pNew; + (*pUpperFrames)[n-2] = pNew; } else if( pNd->IsTableNode() ) - for( std::vector<SwFrm*>::size_type x = 0; x < pUpperFrms->size(); ) + for( std::vector<SwFrame*>::size_type x = 0; x < pUpperFrames->size(); ) { - pNxt = (*pUpperFrms)[x++]; - if( bFirst && pNxt && pNxt->IsSctFrm() ) - static_cast<SwSectionFrm*>(pNxt)->UnlockJoin(); - pUp = static_cast<SwLayoutFrm*>((*pUpperFrms)[x++]); + pNxt = (*pUpperFrames)[x++]; + if( bFirst && pNxt && pNxt->IsSctFrame() ) + static_cast<SwSectionFrame*>(pNxt)->UnlockJoin(); + pUp = static_cast<SwLayoutFrame*>((*pUpperFrames)[x++]); if( pNxt ) pNxt = pNxt->GetNext(); else pNxt = pUp->Lower(); - pNew = static_cast<SwTableNode*>(pNd)->MakeFrm( pUp ); - OSL_ENSURE( pNew->IsTabFrm(), "Table expected" ); + pNew = static_cast<SwTableNode*>(pNd)->MakeFrame( pUp ); + OSL_ENSURE( pNew->IsTabFrame(), "Table expected" ); pNew->Paste( pUp, pNxt ); - static_cast<SwTabFrm*>(pNew)->RegistFlys(); - (*pUpperFrms)[x-2] = pNew; + static_cast<SwTabFrame*>(pNew)->RegistFlys(); + (*pUpperFrames)[x-2] = pNew; } else if( pNd->IsSectionNode() ) { nStt = pNd->EndOfSectionIndex(); - for( std::vector<SwFrm*>::size_type x = 0; x < pUpperFrms->size(); ) + for( std::vector<SwFrame*>::size_type x = 0; x < pUpperFrames->size(); ) { - pNxt = (*pUpperFrms)[x++]; - if( bFirst && pNxt && pNxt->IsSctFrm() ) - static_cast<SwSectionFrm*>(pNxt)->UnlockJoin(); - pUp = static_cast<SwLayoutFrm*>((*pUpperFrms)[x++]); - OSL_ENSURE( pUp->GetUpper() || pUp->IsFlyFrm(), "Lost Upper" ); + pNxt = (*pUpperFrames)[x++]; + if( bFirst && pNxt && pNxt->IsSctFrame() ) + static_cast<SwSectionFrame*>(pNxt)->UnlockJoin(); + pUp = static_cast<SwLayoutFrame*>((*pUpperFrames)[x++]); + OSL_ENSURE( pUp->GetUpper() || pUp->IsFlyFrame(), "Lost Upper" ); ::_InsertCnt( pUp, pDoc, pNd->GetIndex(), false, nStt+1, pNxt ); pNxt = pUp->GetLastLower(); - (*pUpperFrms)[x-2] = pNxt; + (*pUpperFrames)[x-2] = pNxt; } } bFirst = false; } - for( std::vector<SwFrm*>::size_type x = 0; x < pUpperFrms->size(); ++x ) + for( std::vector<SwFrame*>::size_type x = 0; x < pUpperFrames->size(); ++x ) { - SwFrm* pTmp = (*pUpperFrms)[++x]; - if( pTmp->IsFootnoteFrm() ) - static_cast<SwFootnoteFrm*>(pTmp)->ColUnlock(); + SwFrame* pTmp = (*pUpperFrames)[++x]; + if( pTmp->IsFootnoteFrame() ) + static_cast<SwFootnoteFrame*>(pTmp)->ColUnlock(); else if ( pTmp->IsInSct() ) { - SwSectionFrm* pSctFrm = pTmp->FindSctFrm(); - pSctFrm->ColUnlock(); + SwSectionFrame* pSctFrame = pTmp->FindSctFrame(); + pSctFrame->ColUnlock(); // #i18103# - invalidate size of section in order to // assure, that the section is formatted, unless it was 'Collocked' // from its 'collection' until its 'restoration'. - pSctFrm->_InvalidateSize(); + pSctFrame->_InvalidateSize(); } } } -SwFrm* SwNode2LayImpl::GetFrm( const Point* pDocPos, +SwFrame* SwNode2LayImpl::GetFrame( const Point* pDocPos, const SwPosition *pPos, - const bool bCalcFrm ) const + const bool bCalcFrame ) const { // test if change of member pIter -> pMod broke anything - return pMod ? ::GetFrmOfModify( nullptr, *pMod, USHRT_MAX, pDocPos, pPos, bCalcFrm ) : nullptr; + return pMod ? ::GetFrameOfModify( nullptr, *pMod, USHRT_MAX, pDocPos, pPos, bCalcFrame ) : nullptr; } SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ) @@ -428,34 +428,34 @@ SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ) SwNode2Layout::SwNode2Layout( const SwNode& rNd ) : pImpl( new SwNode2LayImpl( rNd, rNd.GetIndex(), true ) ) { - pImpl->SaveUpperFrms(); + pImpl->SaveUpperFrames(); } -void SwNode2Layout::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ) +void SwNode2Layout::RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ) { - OSL_ENSURE( pImpl, "RestoreUpperFrms without SaveUpperFrms" ); - pImpl->RestoreUpperFrms( rNds, nStt, nEnd ); + OSL_ENSURE( pImpl, "RestoreUpperFrames without SaveUpperFrames" ); + pImpl->RestoreUpperFrames( rNds, nStt, nEnd ); } -SwFrm* SwNode2Layout::NextFrm() +SwFrame* SwNode2Layout::NextFrame() { - return pImpl->NextFrm(); + return pImpl->NextFrame(); } -SwLayoutFrm* SwNode2Layout::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode ) +SwLayoutFrame* SwNode2Layout::UpperFrame( SwFrame* &rpFrame, const SwNode &rNode ) { - return pImpl->UpperFrm( rpFrm, rNode ); + return pImpl->UpperFrame( rpFrame, rNode ); } SwNode2Layout::~SwNode2Layout() { } -SwFrm* SwNode2Layout::GetFrm( const Point* pDocPos, +SwFrame* SwNode2Layout::GetFrame( const Point* pDocPos, const SwPosition *pPos, - const bool bCalcFrm ) const + const bool bCalcFrame ) const { - return pImpl->GetFrm( pDocPos, pPos, bCalcFrm ); + return pImpl->GetFrame( pDocPos, pPos, bCalcFrame ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 376aaea9ed1a..8fe1bc0c1d27 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -115,7 +115,7 @@ SwNodes::~SwNodes() } void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, - SwNodeIndex& rInsPos, bool bNewFrms ) + SwNodeIndex& rInsPos, bool bNewFrames ) { // no need for frames in the UndoArea SwNodes& rNds = rInsPos.GetNodes(); @@ -348,40 +348,40 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, if( rNds.GetDoc() != GetDoc() ) rNds.GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 ); - if( bNewFrms ) - bNewFrms = &GetDoc()->GetNodes() == &rNds && + if( bNewFrames ) + bNewFrames = &GetDoc()->GetNodes() == &rNds && GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); - if( bNewFrms ) + if( bNewFrames ) { // get the frames: SwNodeIndex aIdx( *pPrevInsNd, 1 ); - SwNodeIndex aFrmNdIdx( aIdx ); - SwNode* pFrmNd = rNds.FindPrvNxtFrmNode( aFrmNdIdx, + SwNodeIndex aFrameNdIdx( aIdx ); + SwNode* pFrameNd = rNds.FindPrvNxtFrameNode( aFrameNdIdx, rNds[ rInsPos.GetIndex() - 1 ] ); - if( !pFrmNd && aFrmNdIdx > rNds.GetEndOfExtras().GetIndex() ) + if( !pFrameNd && aFrameNdIdx > rNds.GetEndOfExtras().GetIndex() ) { OSL_ENSURE( false, "here, something wrong happened" ); - aFrmNdIdx = rNds.GetEndOfContent(); - pFrmNd = SwNodes::GoPrevSection( &aFrmNdIdx, true, false ); - if( pFrmNd && !static_cast<SwContentNode*>(pFrmNd)->HasWriterListeners() ) - pFrmNd = nullptr; - OSL_ENSURE( pFrmNd, "ChgNode() - no FrameNode found" ); + aFrameNdIdx = rNds.GetEndOfContent(); + pFrameNd = SwNodes::GoPrevSection( &aFrameNdIdx, true, false ); + if( pFrameNd && !static_cast<SwContentNode*>(pFrameNd)->HasWriterListeners() ) + pFrameNd = nullptr; + OSL_ENSURE( pFrameNd, "ChgNode() - no FrameNode found" ); } - if( pFrmNd ) + if( pFrameNd ) while( aIdx != rInsPos ) { SwContentNode* pCNd = aIdx.GetNode().GetContentNode(); if( pCNd ) { - if( pFrmNd->IsTableNode() ) - static_cast<SwTableNode*>(pFrmNd)->MakeFrms( aIdx ); - else if( pFrmNd->IsSectionNode() ) - static_cast<SwSectionNode*>(pFrmNd)->MakeFrms( aIdx ); + if( pFrameNd->IsTableNode() ) + static_cast<SwTableNode*>(pFrameNd)->MakeFrames( aIdx ); + else if( pFrameNd->IsSectionNode() ) + static_cast<SwSectionNode*>(pFrameNd)->MakeFrames( aIdx ); else - static_cast<SwContentNode*>(pFrmNd)->MakeFrms( *pCNd ); - pFrmNd = pCNd; + static_cast<SwContentNode*>(pFrameNd)->MakeFrames( *pCNd ); + pFrameNd = pCNd; } ++aIdx; } @@ -401,11 +401,11 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, * @param aRange range to move (excluding end node) * @param rNodes * @param aIndex - * @param bNewFrms + * @param bNewFrames * @return */ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, - const SwNodeIndex& aIndex, bool bNewFrms ) + const SwNodeIndex& aIndex, bool bNewFrames ) { SwNode * pAktNode; if( aIndex == 0 || @@ -457,9 +457,9 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, SwNodeRange aOrigInsPos( aIdx, -1, aIdx ); // original insertion position - // call DelFrms/MakeFrms for the upmost SectionNode + // call DelFrames/MakeFrames for the upmost SectionNode int nSectNdCnt = 0; - bool bSaveNewFrms = bNewFrms; + bool bSaveNewFrames = bNewFrames; // continue until everything has been moved while( aRg.aStart < aRg.aEnd ) @@ -472,7 +472,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // delete and copy. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos; nInsPos = 0; } @@ -493,9 +493,9 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, StartOfSectionNode()->GetIndex() < nNd && nNd < rNodes.GetEndOfRedlines().GetIndex() ); - if( bNewFrms ) + if( bNewFrames ) // delete all frames - pTableNd->DelFrms(); + pTableNd->DelFrames(); if( &rNodes == this ) // move into self? { // move all Start/End/ContentNodes @@ -591,10 +591,10 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, pTableFormat->ModifyNotification( &aMsgHint, &aMsgHint ); } } - if( bNewFrms ) + if( bNewFrames ) { SwNodeIndex aTmp( aIdx ); - pTableNd->MakeFrms( &aTmp ); + pTableNd->MakeFrames( &aTmp ); } aIdx -= nInsPos; nInsPos = 0; @@ -646,8 +646,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, --aRg.aStart; SwSectionNode* pSctNd = pSttNd->GetSectionNode(); - if( bNewFrms && pSctNd ) - pSctNd->DelFrms(); + if( bNewFrames && pSctNd ) + pSctNd->DelFrames(); RemoveNode( aRg.aEnd.GetIndex(), 1, false ); // EndNode loeschen sal_uLong nSttPos = pSttNd->GetIndex(); @@ -674,7 +674,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, { pSctNd->NodesArrChgd(); ++nSectNdCnt; - bNewFrms = false; + bNewFrames = false; } } } @@ -690,7 +690,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // delete and copy. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos; nInsPos = 0; } @@ -749,7 +749,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // copy array. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos+1; nInsPos = 0; } @@ -761,7 +761,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, "wrong StartNode" ); SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos+1; // before inserted StartNode nInsPos = 0; @@ -773,8 +773,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, if( pSectNd && !--nSectNdCnt ) { SwNodeIndex aTmp( *pSectNd ); - pSectNd->MakeFrms( &aTmp ); - bNewFrms = bSaveNewFrms; + pSectNd->MakeFrames( &aTmp ); + bNewFrames = bSaveNewFrames; } aSttNdStack.erase( aSttNdStack.begin() + nLevel ); // remove from stack nLevel--; @@ -795,8 +795,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, case ND_TEXTNODE: //Add special function to text node. { - if( bNewFrms && pAktNode->GetContentNode() ) - static_cast<SwContentNode*>(pAktNode)->DelFrms(); + if( bNewFrames && pAktNode->GetContentNode() ) + static_cast<SwContentNode*>(pAktNode)->DelFrames(); pAktNode->m_pStartOfSection = aSttNdStack[ nLevel ]; nInsPos++; --aRg.aEnd; @@ -805,8 +805,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, case ND_GRFNODE: case ND_OLENODE: { - if( bNewFrms && pAktNode->GetContentNode() ) - static_cast<SwContentNode*>(pAktNode)->DelFrms(); + if( bNewFrames && pAktNode->GetContentNode() ) + static_cast<SwContentNode*>(pAktNode)->DelFrames(); pAktNode->m_pStartOfSection = aSttNdStack[ nLevel ]; nInsPos++; @@ -832,7 +832,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // delete and copy. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos; nInsPos = 0; } @@ -857,7 +857,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, { // rest should be ok SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); } ++aRg.aEnd; // again, exclusive end @@ -1116,7 +1116,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) { SwTableNode* pTableNd = pAktNode->m_pStartOfSection->GetTableNode(); if( pTableNd ) - pTableNd->DelFrms(); + pTableNd->DelFrames(); SwNode *pNd, *pChkNd = pAktNode->m_pStartOfSection; sal_uInt16 nIdxPos; @@ -1137,7 +1137,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) } else if( pNd->IsEndNode() && pNd->m_pStartOfSection->IsTableNode() ) - static_cast<SwTableNode*>(pNd->m_pStartOfSection)->DelFrms(); + static_cast<SwTableNode*>(pNd->m_pStartOfSection)->DelFrames(); --aRg.aEnd; nCnt++; @@ -1396,7 +1396,7 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt ) if( pNd->IsContentNode() ) { static_cast<SwContentNode*>(pNd)->InvalidateNumRule(); - static_cast<SwContentNode*>(pNd)->DelFrms(); + static_cast<SwContentNode*>(pNd)->DelFrames(); } } RemoveNode( nSttIdx, nCnt, true ); @@ -1678,7 +1678,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) ///@see SwNodes::_MoveNodes (TODO: seems to be C&P programming here) void SwNodes::_CopyNodes( const SwNodeRange& rRange, - const SwNodeIndex& rIndex, bool bNewFrms, bool bTableInsDummyNode ) const + const SwNodeIndex& rIndex, bool bNewFrames, bool bTableInsDummyNode ) const { SwDoc* pDoc = rIndex.GetNode().GetDoc(); @@ -1767,7 +1767,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, SwStartNode* pSttNd = aRg.aStart.GetNode().GetStartNode(); _CopyNodes( SwNodeRange( *pSttNd, + 1, *pSttNd->EndOfSectionNode() ), - aInsPos, bNewFrms ); + aInsPos, bNewFrames ); // insert a DummyNode for the box-EndNode? if( bTableInsDummyNode ) @@ -1792,10 +1792,10 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, aRg.aStart = pAktNode->EndOfSectionIndex(); - if( bNewFrms && pTableNd ) + if( bNewFrames && pTableNd ) { nStt = aInsPos; - pTableNd->MakeFrms( &nStt ); + pTableNd->MakeFrames( &nStt ); } } break; @@ -1819,9 +1819,9 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, nNodeCnt = 1; aRg.aStart = pAktNode->EndOfSectionIndex(); - if( bNewFrms && pSectNd && + if( bNewFrames && pSectNd && !pSectNd->GetSection().IsHidden() ) - pSectNd->MakeFrms( &nStt ); + pSectNd->MakeFrames( &nStt ); } break; @@ -1857,8 +1857,8 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, SwContentNode* pNew = static_cast<SwContentNode*>(pAktNode)->MakeCopy( pDoc, aInsPos ); // frames are always created as default, so delete if needed - if( !bNewFrms ) - pNew->DelFrms(); + if( !bNewFrames ) + pNew->DelFrames(); } break; @@ -2041,21 +2041,21 @@ SwContentNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx, /** find the next/previous ContentNode or a table node with frames * * If no pEnd is given, search is started with FrameIndex; otherwise - * search is started with the one before rFrmIdx and after pEnd. + * search is started with the one before rFrameIdx and after pEnd. * - * @param rFrmIdx node with frames to search in + * @param rFrameIdx node with frames to search in * @param pEnd ??? * @return result node; 0 (!!!) if not found */ -SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, +SwNode* SwNodes::FindPrvNxtFrameNode( SwNodeIndex& rFrameIdx, const SwNode* pEnd ) const { - SwNode* pFrmNd = nullptr; + SwNode* pFrameNd = nullptr; // no layout -> skip if( GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ) { - SwNode* pSttNd = &rFrmIdx.GetNode(); + SwNode* pSttNd = &rFrameIdx.GetNode(); // move of a hidden section? SwSectionNode* pSectNd = pSttNd->IsSectionNode() @@ -2068,7 +2068,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, SwTableNode* pTableNd = pSttNd->IsTableNode() ? pSttNd->StartOfSectionNode()->FindTableNode() : pSttNd->FindTableNode(); - SwNodeIndex aIdx( rFrmIdx ); + SwNodeIndex aIdx( rFrameIdx ); SwNode* pNd; if( pEnd ) { @@ -2078,40 +2078,40 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, else pNd = pSttNd; - if( ( pFrmNd = pNd )->IsContentNode() ) - rFrmIdx = aIdx; + if( ( pFrameNd = pNd )->IsContentNode() ) + rFrameIdx = aIdx; // search forward or backward for a content node - else if( nullptr != ( pFrmNd = GoPrevSection( &aIdx, true, false )) && - ::CheckNodesRange( aIdx, rFrmIdx, true ) && + else if( nullptr != ( pFrameNd = GoPrevSection( &aIdx, true, false )) && + ::CheckNodesRange( aIdx, rFrameIdx, true ) && // Never out of the table at the start - pFrmNd->FindTableNode() == pTableNd && + pFrameNd->FindTableNode() == pTableNd && // Bug 37652: Never out of the table at the end - (!pFrmNd->FindTableNode() || pFrmNd->FindTableBoxStartNode() + (!pFrameNd->FindTableNode() || pFrameNd->FindTableBoxStartNode() == pSttNd->FindTableBoxStartNode() ) && (!pSectNd || pSttNd->IsSectionNode() || - pSectNd->GetIndex() < pFrmNd->GetIndex()) + pSectNd->GetIndex() < pFrameNd->GetIndex()) ) { - rFrmIdx = aIdx; + rFrameIdx = aIdx; } else { if( pEnd ) aIdx = pEnd->GetIndex() + 1; else - aIdx = rFrmIdx; + aIdx = rFrameIdx; // NEVER leave the section when doing this! - if( ( pEnd && ( pFrmNd = &aIdx.GetNode())->IsContentNode() ) || - ( nullptr != ( pFrmNd = GoNextSection( &aIdx, true, false )) && - ::CheckNodesRange( aIdx, rFrmIdx, true ) && - ( pFrmNd->FindTableNode() == pTableNd && + if( ( pEnd && ( pFrameNd = &aIdx.GetNode())->IsContentNode() ) || + ( nullptr != ( pFrameNd = GoNextSection( &aIdx, true, false )) && + ::CheckNodesRange( aIdx, rFrameIdx, true ) && + ( pFrameNd->FindTableNode() == pTableNd && // NEVER go out of the table cell at the end - (!pFrmNd->FindTableNode() || pFrmNd->FindTableBoxStartNode() + (!pFrameNd->FindTableNode() || pFrameNd->FindTableBoxStartNode() == pSttNd->FindTableBoxStartNode() ) ) && (!pSectNd || pSttNd->IsSectionNode() || - pSectNd->EndOfSectionIndex() > pFrmNd->GetIndex()) + pSectNd->EndOfSectionIndex() > pFrameNd->GetIndex()) )) { // Undo when merging a table with one before, if there is also one after it. @@ -2119,33 +2119,33 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, // SttNode is a section or a table! SwTableNode* pTableNode; if (pSttNd->IsTableNode() && - nullptr != (pTableNode = pFrmNd->FindTableNode()) && + nullptr != (pTableNode = pFrameNd->FindTableNode()) && // TABLE IN TABLE: pTableNode != pSttNd->StartOfSectionNode()->FindTableNode()) { - pFrmNd = pTableNode; - rFrmIdx = *pFrmNd; + pFrameNd = pTableNode; + rFrameIdx = *pFrameNd; } else - rFrmIdx = aIdx; + rFrameIdx = aIdx; } else if( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsTableNode() ) { - pFrmNd = pNd->StartOfSectionNode(); - rFrmIdx = *pFrmNd; + pFrameNd = pNd->StartOfSectionNode(); + rFrameIdx = *pFrameNd; } else { if( pEnd ) aIdx = pEnd->GetIndex() + 1; else - aIdx = rFrmIdx.GetIndex() + 1; + aIdx = rFrameIdx.GetIndex() + 1; - if( (pFrmNd = &aIdx.GetNode())->IsTableNode() ) - rFrmIdx = aIdx; + if( (pFrameNd = &aIdx.GetNode())->IsTableNode() ) + rFrameIdx = aIdx; else { - pFrmNd = nullptr; + pFrameNd = nullptr; // is there some sectionnodes before a tablenode? while( aIdx.GetNode().IsSectionNode() ) @@ -2159,15 +2159,15 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, } if( aIdx.GetNode().IsTableNode() ) { - rFrmIdx = aIdx; - pFrmNd = &aIdx.GetNode(); + rFrameIdx = aIdx; + pFrameNd = &aIdx.GetNode(); } } } } } } - return pFrmNd; + return pFrameNd; } void SwNodes::ForEach( sal_uLong nStart, sal_uLong nEnd, diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index e7214fee20b8..613721391863 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -317,12 +317,12 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) pFormat->ModifyNotification( &aMsgItem, &aMsgItem ); // Delete all Frames - pFormat->DelFrms(); + pFormat->DelFrames(); } } else if (m_Data.IsHiddenFlag()) // show Nodes again { - // Show all Frames (Child Sections are accounted for by MakeFrms) + // Show all Frames (Child Sections are accounted for by MakeFrames) // Only if the Parent Section is not restricting us! SwSection* pParentSect = pFormat->GetParentSection(); if( !pParentSect || !pParentSect->IsHiddenFlag() ) @@ -331,7 +331,7 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN ); pFormat->ModifyNotification( &aMsgItem, &aMsgItem ); - pFormat->MakeFrms(); + pFormat->MakeFrames(); } } } @@ -628,8 +628,8 @@ const SwTOXBase* SwSection::GetTOXBase() const return pRet; } -SwSectionFormat::SwSectionFormat( SwFrameFormat* pDrvdFrm, SwDoc *pDoc ) - : SwFrameFormat( pDoc->GetAttrPool(), OUString(), pDrvdFrm ) +SwSectionFormat::SwSectionFormat( SwFrameFormat* pDrvdFrame, SwDoc *pDoc ) + : SwFrameFormat( pDoc->GetAttrPool(), OUString(), pDrvdFrame ) { LockModify(); SetFormatAttr( *GetDfltAttr( RES_COL ) ); @@ -663,7 +663,7 @@ SwSectionFormat::~SwSectionFormat() } // mba: test iteration; objects are removed while iterating // use hint which allows to specify, if the content shall be saved or not - CallSwClientNotify( SwSectionFrmMoveAndDeleteHint( true ) ); + CallSwClientNotify( SwSectionFrameMoveAndDeleteHint( true ) ); // Raise the Section up SwNodeRange aRg( *pSectNd, 0, *pSectNd->EndOfSectionNode() ); @@ -680,25 +680,25 @@ SwSection * SwSectionFormat::GetSection() const return SwIterator<SwSection,SwSectionFormat>( *this ).First(); } -// Do not destroy all Frms in aDepend (Frms are recognized with a dynamic_cast). -void SwSectionFormat::DelFrms() +// Do not destroy all Frames in aDepend (Frames are recognized with a dynamic_cast). +void SwSectionFormat::DelFrames() { SwSectionNode* pSectNd; const SwNodeIndex* pIdx = GetContent(false).GetContentIdx(); if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() && nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() )) { - // First delete the <SwSectionFrm> of the <SwSectionFormat> instance + // First delete the <SwSectionFrame> of the <SwSectionFormat> instance // mba: test iteration as objects are removed in iteration // use hint which allows to specify, if the content shall be saved or not - CallSwClientNotify( SwSectionFrmMoveAndDeleteHint( false ) ); + CallSwClientNotify( SwSectionFrameMoveAndDeleteHint( false ) ); // Then delete frames of the nested <SwSectionFormat> instances SwIterator<SwSectionFormat,SwSectionFormat> aIter( *this ); SwSectionFormat *pLast = aIter.First(); while ( pLast ) { - pLast->DelFrms(); + pLast->DelFrames(); pLast = aIter.Next(); } @@ -722,7 +722,7 @@ void SwSectionFormat::DelFrms() } // Create the Views -void SwSectionFormat::MakeFrms() +void SwSectionFormat::MakeFrames() { SwSectionNode* pSectNd; const SwNodeIndex* pIdx = GetContent(false).GetContentIdx(); @@ -731,7 +731,7 @@ void SwSectionFormat::MakeFrms() nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() )) { SwNodeIndex aIdx( *pIdx ); - pSectNd->MakeFrms( &aIdx ); + pSectNd->MakeFrames( &aIdx ); } } @@ -856,19 +856,19 @@ bool SwSectionFormat::GetInfo( SfxPoolItem& rInfo ) const case RES_CONTENT_VISIBLE: { - SwFrm* pFrm = SwIterator<SwFrm,SwFormat>(*this).First(); + SwFrame* pFrame = SwIterator<SwFrame,SwFormat>(*this).First(); // if the current section has no own frame search for the children - if(!pFrm) + if(!pFrame) { SwIterator<SwSectionFormat,SwSectionFormat> aFormatIter(*this); SwSectionFormat* pChild = aFormatIter.First(); - while(pChild && !pFrm) + while(pChild && !pFrame) { - pFrm = SwIterator<SwFrm,SwFormat>(*pChild).First(); + pFrame = SwIterator<SwFrame,SwFormat>(*pChild).First(); pChild = aFormatIter.Next(); } } - static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = pFrm; + static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = pFrame; } return false; } @@ -1355,17 +1355,17 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( pCpyRg ) { SwNodeIndex& rInsPos = pPam->GetPoint()->nNode; - bool bCreateFrm = rInsPos.GetIndex() <= + bool bCreateFrame = rInsPos.GetIndex() <= pDoc->GetNodes().GetEndOfExtras().GetIndex() || rInsPos.GetNode().FindTableNode(); SwTableNumFormatMerge aTNFM( *pSrcDoc, *pDoc ); - pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pCpyRg, 0, rInsPos, nullptr, bCreateFrm ); + pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pCpyRg, 0, rInsPos, nullptr, bCreateFrame ); ++aSave; - if( !bCreateFrm ) - ::MakeFrms( pDoc, aSave, rInsPos ); + if( !bCreateFrame ) + ::MakeFrames( pDoc, aSave, rInsPos ); // Delete last Node, only if it was copied successfully // (the Section contains more than one Node) @@ -1406,10 +1406,10 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( pESh ) { pESh->Push(); - SwPaM* pCrsr = pESh->GetCrsr(); - *pCrsr->GetPoint() = *pPam->GetPoint(); + SwPaM* pCursor = pESh->GetCursor(); + *pCursor->GetPoint() = *pPam->GetPoint(); delete pPam; - pPam = pCrsr; + pPam = pCursor; } SvMemoryStream aStrm( const_cast<sal_Int8 *>(aSeq.getConstArray()), aSeq.getLength(), diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 852db82278b9..8620fce6a465 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -68,11 +68,11 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) { SwIterator<SwClient,SwGrfNode> aIter(rGrfNd); for(SwClient* pLast = aIter.First(); pLast; pLast = aIter.Next()) - if(dynamic_cast<const SwContentFrm*>( pLast) == nullptr) + if(dynamic_cast<const SwContentFrame*>( pLast) == nullptr) pLast->ModifyNotification(&rItem, &rItem); } { - SwIterator<SwContentFrm,SwGrfNode> aIter(rGrfNd); + SwIterator<SwContentFrame,SwGrfNode> aIter(rGrfNd); for(SwClient* pLast = aIter.First(); pLast; pLast = aIter.Next()) pLast->ModifyNotification(&rItem, &rItem); } @@ -322,10 +322,10 @@ static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size& rO rBox.CalcLineSpace(SvxBoxItemLine::RIGHT); aCalcSz.Height()+= rBox.CalcLineSpace(SvxBoxItemLine::TOP) + rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM); - const SwFormatFrmSize& rOldAttr = pFormat->GetFrmSize(); + const SwFormatFrameSize& rOldAttr = pFormat->GetFrameSize(); if( rOldAttr.GetSize() != aCalcSz ) { - SwFormatFrmSize aAttr( rOldAttr ); + SwFormatFrameSize aAttr( rOldAttr ); aAttr.SetSize( aCalcSz ); pFormat->SetFormatAttr( aAttr ); bRet = true; |