diff options
Diffstat (limited to 'sw/source/core/table')
-rw-r--r-- | sw/source/core/table/swnewtable.cxx | 86 | ||||
-rw-r--r-- | sw/source/core/table/swtable.cxx | 214 |
2 files changed, 150 insertions, 150 deletions
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 150fbc0acbdb..83a6a82cb9ca 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -131,7 +131,7 @@ static void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, s { SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox]; OSL_ENSURE( pBox, "Missing table box" ); - nWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); nNew += nWidth; } // nNew is the right border of the wished box @@ -167,7 +167,7 @@ static long lcl_Box2LeftBorder( const SwTableBox& rBox ) OSL_ENSURE( pBox, "Missing table box" ); if( pBox == &rBox ) return nLeft; - nLeft += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nLeft += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); } OSL_FAIL( "Box not found in own upper?" ); return nLeft; @@ -199,7 +199,7 @@ static SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine ) { SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; OSL_ENSURE( pBox, "Missing table box" ); - if( pBox->GetFrameFormat()->GetFrmSize().GetWidth() ) + if( pBox->GetFrameFormat()->GetFrameSize().GetWidth() ) { if( nCurrLeft == nLeft ) return pBox; @@ -214,7 +214,7 @@ static SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine ) return pBox; } } - nCurrLeft += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nCurrLeft += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); } OSL_FAIL( "Didn't found wished box" ); return nullptr; @@ -388,7 +388,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; OSL_ENSURE( pBox, "Missing table box" ); long nLeft = nRight; - nRight += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nRight += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); long nRowSpan = pBox->getRowSpan(); if( nRight <= nMin ) { @@ -569,8 +569,8 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const while( pCurr != aNewWidthList.end() ) { SwFrameFormat* pFormat = pCurr->first->ClaimFrameFormat(); - long nNewWidth = pFormat->GetFrmSize().GetWidth() + pCurr->second; - pFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nNewWidth, 0 ) ); + long nNewWidth = pFormat->GetFrameSize().GetWidth() + pCurr->second; + pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nNewWidth, 0 ) ); ++pCurr; } } @@ -582,19 +582,19 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const return pRet; } -/** lcl_InvalidateCellFrm(..) invalidates all layout representations of a given cell +/** lcl_InvalidateCellFrame(..) invalidates all layout representations of a given cell to initiate a reformatting */ -static void lcl_InvalidateCellFrm( const SwTableBox& rBox ) +static void lcl_InvalidateCellFrame( const SwTableBox& rBox ) { - SwIterator<SwCellFrm,SwFormat> aIter( *rBox.GetFrameFormat() ); - for( SwCellFrm* pCell = aIter.First(); pCell; pCell = aIter.Next() ) + SwIterator<SwCellFrame,SwFormat> aIter( *rBox.GetFrameFormat() ); + for( SwCellFrame* pCell = aIter.First(); pCell; pCell = aIter.Next() ) { if( pCell->GetTabBox() == &rBox ) { pCell->InvalidateSize(); - SwFrm* pLower = pCell->GetLower(); + SwFrame* pLower = pCell->GetLower(); if( pLower ) pLower->_InvalidateSize(); } @@ -614,7 +614,7 @@ static long lcl_InsertPosition( SwTable &rTable, std::vector<sal_uInt16>& rInsPo { SwTableBox *pBox = rBoxes[j]; SwTableLine* pLine = pBox->GetUpper(); - long nWidth = rBoxes[j]->GetFrameFormat()->GetFrmSize().GetWidth(); + long nWidth = rBoxes[j]->GetFrameFormat()->GetFrameSize().GetWidth(); nAddWidth += nWidth; sal_uInt16 nCurrBox = pLine->GetTabBoxes().GetPos( pBox ); sal_uInt16 nCurrLine = rTable.GetTabLines().GetPos( pLine ); @@ -662,7 +662,7 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, { // Calculation of the insert positions and the width of the new boxes sal_uInt64 nTableWidth = 0; for( size_t i = 0; i < m_aLines[0]->GetTabBoxes().size(); ++i ) - nTableWidth += m_aLines[0]->GetTabBoxes()[i]->GetFrameFormat()->GetFrmSize().GetWidth(); + nTableWidth += m_aLines[0]->GetTabBoxes()[i]->GetFrameFormat()->GetFrameSize().GetWidth(); // Fill the vector of insert positions and the (average) width to insert sal_uInt64 nAddWidth = lcl_InsertPosition( *this, aInsPos, rBoxes, bBehind ); @@ -687,7 +687,7 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); SwTableNode* pTableNd = GetTableNode(); std::vector<SwTableBoxFormat*> aInsFormat( nCnt, nullptr ); @@ -749,9 +749,9 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, { pCurrBox->setRowSpan( nLastRowSpan ); SwFrameFormat* pFrameFormat = pCurrBox->ClaimFrameFormat(); - SwFormatFrmSize aFrmSz( pFrameFormat->GetFrmSize() ); - aFrmSz.SetWidth( nNewBoxWidth ); - pFrameFormat->SetFormatAttr( aFrmSz ); + SwFormatFrameSize aFrameSz( pFrameFormat->GetFrameSize() ); + aFrameSz.SetWidth( nNewBoxWidth ); + pFrameFormat->SetFormatAttr( aFrameSz ); if( pNoRightBorder && ( !bBehind || j+1 < nCnt ) ) pFrameFormat->SetFormatAttr( *pNoRightBorder ); aInsFormat[j] = static_cast<SwTableBoxFormat*>(pFrameFormat); @@ -767,13 +767,13 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, delete pNoRightBorder; } - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); #if OSL_DEBUG_LEVEL > 0 { const SwTableBoxes &rTabBoxes = m_aLines[0]->GetTabBoxes(); long nNewWidth = 0; for( size_t i = 0; i < rTabBoxes.size(); ++i ) - nNewWidth += rTabBoxes[i]->GetFrameFormat()->GetFrmSize().GetWidth(); + nNewWidth += rTabBoxes[i]->GetFrameFormat()->GetFrameSize().GetWidth(); OSL_ENSURE( nNewWidth > 0, "Very small" ); } #endif @@ -924,7 +924,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, _FindSuperfluousRows( rBoxes, pFirstLn, pLastLn ); // pNewFormat will be set to the new master box and the overlapped cells SwFrameFormat* pNewFormat = pMergeBox->ClaimFrameFormat(); - pNewFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, pSel->mnMergeWidth, 0 ) ); + pNewFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, pSel->mnMergeWidth, 0 ) ); for( size_t nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine ) { const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ]; @@ -937,7 +937,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, // Even this box will be deleted soon, // we have to correct the width to avoid side effects SwFrameFormat* pFormat = pBox->ClaimFrameFormat(); - pFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, 0, 0 ) ); + pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, 0, 0 ) ); } else pBox->ChgFrameFormat( static_cast<SwTableBoxFormat*>(pNewFormat) ); @@ -1104,7 +1104,7 @@ static void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, size_t nCnt, { SwTableLine* pLine = aBoxes[ i ]->GetUpper(); SwFrameFormat *pRowFormat = pLine->GetFrameFormat(); - pHeights[ i ] = pRowFormat->GetFrmSize().GetHeight(); + pHeights[ i ] = pRowFormat->GetFrameSize().GetHeight(); nHeight += pHeights[ i ]; } SwTwips nSumH = 0; @@ -1129,7 +1129,7 @@ static void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, size_t nCnt, { size_t nNextIdx = pSplitIdx[ i ]; aBoxes[ nIdx ]->setRowSpan( nNextIdx - nIdx ); - lcl_InvalidateCellFrm( *aBoxes[ nIdx ] ); + lcl_InvalidateCellFrame( *aBoxes[ nIdx ] ); while( ++nIdx < nNextIdx ) aBoxes[ nIdx ]->setRowSpan( nIdx - nNextIdx ); } @@ -1156,7 +1156,7 @@ void SwTable::InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nRowIdx, sal_uInt16 nCnt SwSelBoxes aBoxes; SwTableLine& rLine = *GetTabLines()[ nRowIdx ]; lcl_FillSelBoxes( aBoxes, rLine ); - SwFormatFrmSize aFSz( rLine.GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aFSz( rLine.GetFrameFormat()->GetFrameSize() ); if( ATT_VAR_SIZE != aFSz.GetHeightSizeType() ) { SwFrameFormat* pFrameFormat = rLine.ClaimFrameFormat(); @@ -1408,7 +1408,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn SwSplitLines aSplitLines; sal_uInt16 nFirst = lcl_CalculateSplitLineHeights( aRowLines, aSplitLines, *this, rBoxes, nCnt ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); SwTwips nLast = 0; SwSplitLines::iterator pSplit = aSplitLines.begin(); SwSplitLines::iterator pCurr = aRowLines.begin(); @@ -1419,7 +1419,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn InsertSpannedRow( pDoc, nFirst, 1 ); SwTableLine* pRow = GetTabLines()[ nFirst ]; SwFrameFormat* pRowFormat = pRow->ClaimFrameFormat(); - SwFormatFrmSize aFSz( pRowFormat->GetFrmSize() ); + SwFormatFrameSize aFSz( pRowFormat->GetFrameSize() ); aFSz.SetHeightSizeType( ATT_MIN_SIZE ); aFSz.SetHeight( *pSplit - nLast ); pRowFormat->SetFormatAttr( aFSz ); @@ -1431,7 +1431,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn ++pSplit; SwTableLine* pRow = GetTabLines()[ nFirst ]; SwFrameFormat* pRowFormat = pRow->ClaimFrameFormat(); - SwFormatFrmSize aFSz( pRowFormat->GetFrmSize() ); + SwFormatFrameSize aFSz( pRowFormat->GetFrameSize() ); aFSz.SetHeightSizeType( ATT_MIN_SIZE ); aFSz.SetHeight( *pCurr - nLast ); pRowFormat->SetFormatAttr( aFSz ); @@ -1442,7 +1442,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn } else { - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); bSameHeight = false; } if( !bSameHeight ) @@ -1471,7 +1471,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn CHECK_TABLE( *this ) //Layout updaten - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); return true; } @@ -1492,7 +1492,7 @@ bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, { _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); bRet = true; SwTableLine *pLine = GetTabLines()[ nRowIdx ]; @@ -1529,7 +1529,7 @@ bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, if( nRowIdx ) lcl_ChangeRowSpan( *this, nCnt, --nRowIdx, true ); //Layout update - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); } CHECK_TABLE( *this ) } @@ -1550,7 +1550,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes ) { SwTableBox* pBox = rBoxes[i]; long nRowSpan = pBox->getRowSpan(); - if( nRowSpan != 1 && pBox->GetFrameFormat()->GetFrmSize().GetWidth() ) + if( nRowSpan != 1 && pBox->GetFrameFormat()->GetFrameSize().GetWidth() ) { long nLeft = lcl_Box2LeftBorder( *pBox ); SwTableLine *pLine = pBox->GetUpper(); @@ -1579,7 +1579,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes ) nRowSpan = pBox->getRowSpan(); if( nRowSpan > 1 ) { - lcl_InvalidateCellFrm( *pBox ); + lcl_InvalidateCellFrame( *pBox ); --nRowSpan; } else @@ -1611,7 +1611,7 @@ static void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nM { SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox]; OSL_ENSURE( pBox, "Missing table box" ); - long nWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + long nWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); nRight += nWidth; if( nRight > nMin ) { @@ -1830,7 +1830,7 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax { long nLeft = nRight; SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; - nRight += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nRight += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); if( nLeft >= rMin && nRight <= rMax ) rBoxes.insert( pBox ); } @@ -1846,7 +1846,7 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax ) if( m_aLines.empty() || nMax < nMin ) return; long nMid = nMin ? ( nMin + nMax ) / 2 : 0; - const SwTwips nTabSize = GetFrameFormat()->GetFrmSize().GetWidth(); + const SwTwips nTabSize = GetFrameFormat()->GetFrameSize().GetWidth(); if( nTabSize == nMax ) nMid = nMax; const size_t nLineCnt = m_aLines.size(); @@ -1859,7 +1859,7 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax ) { long nLeft = nRight; SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; - nRight += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nRight += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); if( nRight < nMin ) continue; if( nLeft > nMax ) @@ -1877,9 +1877,9 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax ) if( nNewWidth >= 0 ) { SwFrameFormat* pFrameFormat = pBox->ClaimFrameFormat(); - SwFormatFrmSize aFrmSz( pFrameFormat->GetFrmSize() ); - aFrmSz.SetWidth( nNewWidth ); - pFrameFormat->SetFormatAttr( aFrmSz ); + SwFormatFrameSize aFrameSz( pFrameFormat->GetFrameSize() ); + aFrameSz.SetWidth( nNewWidth ); + pFrameFormat->SetFormatAttr( aFrameSz ); } } } @@ -2102,7 +2102,7 @@ void SwTable::CheckConsistency() const if( !IsNewModel() ) return; const size_t nLineCount = GetTabLines().size(); - const SwTwips nTabSize = GetFrameFormat()->GetFrmSize().GetWidth(); + const SwTwips nTabSize = GetFrameFormat()->GetFrameSize().GetWidth(); SwTwips nLineWidth = 0; std::list< RowSpanCheck > aRowSpanCells; std::list< RowSpanCheck >::iterator aIter = aRowSpanCells.end(); @@ -2117,7 +2117,7 @@ void SwTable::CheckConsistency() const { SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol]; SAL_WARN_IF( !pBox, "sw.core", "Missing Table Box" ); - SwTwips nNewWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth() + nWidth; + SwTwips nNewWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth() + nWidth; long nRowSp = pBox->getRowSpan(); if( nRowSp < 0 ) { diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index b0363a4725f2..bfd91b614bd9 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -296,8 +296,8 @@ static void lcl_ModifyLines( SwTableLines &rLines, const long nOld, for( size_t i = 0; i < rFormatArr.size(); ++i ) { SwFormat* pFormat = rFormatArr[i]; - const SwTwips nBox = lcl_MulDiv64<SwTwips>(pFormat->GetFrmSize().GetWidth(), nNew, nOld); - SwFormatFrmSize aNewBox( ATT_VAR_SIZE, nBox, 0 ); + const SwTwips nBox = lcl_MulDiv64<SwTwips>(pFormat->GetFrameSize().GetWidth(), nNew, nOld); + SwFormatFrameSize aNewBox( ATT_VAR_SIZE, nBox, 0 ); pFormat->LockModify(); pFormat->SetFormatAttr( aNewBox ); pFormat->UnlockModify(); @@ -320,7 +320,7 @@ static void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld, } // Adjust the box SwFrameFormat *pFormat = rBox.GetFrameFormat(); - sal_uInt64 nBox = pFormat->GetFrmSize().GetWidth(); + sal_uInt64 nBox = pFormat->GetFrameSize().GetWidth(); nOriginalSum += nBox; nBox *= nNew; nBox /= nOld; @@ -333,7 +333,7 @@ static void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld, { nBox = nWishedSum; pFormat = rBox.ClaimFrameFormat(); - SwFormatFrmSize aNewBox( ATT_VAR_SIZE, static_cast< SwTwips >(nBox), 0 ); + SwFormatFrameSize aNewBox( ATT_VAR_SIZE, static_cast< SwTwips >(nBox), 0 ); pFormat->LockModify(); pFormat->SetFormatAttr( aNewBox ); pFormat->UnlockModify(); @@ -350,20 +350,20 @@ void SwTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { // catch SSize changes, to adjust the lines/boxes const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; - const SwFormatFrmSize* pNewSize = nullptr, *pOldSize = nullptr; + const SwFormatFrameSize* pNewSize = nullptr, *pOldSize = nullptr; if( RES_ATTRSET_CHG == nWhich ) { if (pOld && pNew && SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_FRM_SIZE, false, reinterpret_cast<const SfxPoolItem**>(&pNewSize))) { - pOldSize = &static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->GetFrmSize(); + pOldSize = &static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->GetFrameSize(); } } else if( RES_FRM_SIZE == nWhich ) { - pOldSize = static_cast<const SwFormatFrmSize*>(pOld); - pNewSize = static_cast<const SwFormatFrmSize*>(pNew); + pOldSize = static_cast<const SwFormatFrameSize*>(pOld); + pNewSize = static_cast<const SwFormatFrameSize*>(pNew); } else CheckRegistration( pOld, pNew ); @@ -395,7 +395,7 @@ static void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox, const SwFrameFormat *pTabFormat, const bool bHidden, const bool bRefreshHidden ) { - const long nWish = pTabFormat->GetFrmSize().GetWidth(); + const long nWish = pTabFormat->GetFrameSize().GetWidth(); OSL_ENSURE(nWish, "weird <= 0 width frmfrm"); // The value for the left edge of the box is calculated from the @@ -415,7 +415,7 @@ static void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox, const SwTableBoxes &rBoxes = pLine->GetTabBoxes(); for ( size_t i = 0; i < rBoxes.size(); ++i ) { - const SwTwips nWidth = rBoxes[i]->GetFrameFormat()->GetFrmSize().GetWidth(); + const SwTwips nWidth = rBoxes[i]->GetFrameFormat()->GetFrameSize().GetWidth(); nSum += nWidth; const long nTmp = lcl_MulDiv64<long>(nSum, nAct, nWish); @@ -674,7 +674,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) for ( size_t i = 0; (i < rBoxes.size()) && (rBoxes[i] != pCur); ++i) { nLeft += lcl_MulDiv64<long>( - rBoxes[i]->GetFrameFormat()->GetFrmSize().GetWidth(), + rBoxes[i]->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); } pCur = pLine->GetUpper(); @@ -686,7 +686,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) { // Right edge is left edge plus width. const long nWidth = lcl_MulDiv64<long>( - pBox->GetFrameFormat()->GetFrmSize().GetWidth(), + pBox->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); const long nRight = nLeft + nWidth; size_t nLeftPos = 0; @@ -720,7 +720,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) { // Calculate the difference to the edge touching the first box. const long nWidth = lcl_MulDiv64<long>( - pBox->GetFrameFormat()->GetFrmSize().GetWidth(), + pBox->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); const long nTmp = nWidth + rParm.rOld.GetLeft(); for ( size_t i = 0; i < rParm.rOld.Count(); ++i ) @@ -764,11 +764,11 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) // Adjust the box and all superiors by the difference amount. while ( pBox ) { - SwFormatFrmSize aFormatFrmSize( pBox->GetFrameFormat()->GetFrmSize() ); - aFormatFrmSize.SetWidth( aFormatFrmSize.GetWidth() + nDiff ); - if ( aFormatFrmSize.GetWidth() < 0 ) - aFormatFrmSize.SetWidth( -aFormatFrmSize.GetWidth() ); - rParm.aShareFormats.SetSize( *pBox, aFormatFrmSize ); + SwFormatFrameSize aFormatFrameSize( pBox->GetFrameFormat()->GetFrameSize() ); + aFormatFrameSize.SetWidth( aFormatFrameSize.GetWidth() + nDiff ); + if ( aFormatFrameSize.GetWidth() < 0 ) + aFormatFrameSize.SetWidth( -aFormatFrameSize.GetWidth() ); + rParm.aShareFormats.SetSize( *pBox, aFormatFrameSize ); // The outer cells of the last row are responsible to adjust a surrounding cell. // Last line check: @@ -830,10 +830,10 @@ static void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm ) ::lcl_AdjustLines( pBox->GetTabLines(), nDiff, rParm ); // Adjust the size of the box. - SwFormatFrmSize aFormatFrmSize( pBox->GetFrameFormat()->GetFrmSize() ); - aFormatFrmSize.SetWidth( aFormatFrmSize.GetWidth() + nDiff ); + SwFormatFrameSize aFormatFrameSize( pBox->GetFrameFormat()->GetFrameSize() ); + aFormatFrameSize.SetWidth( aFormatFrameSize.GetWidth() + nDiff ); - rParm.aShareFormats.SetSize( *pBox, aFormatFrmSize ); + rParm.aShareFormats.SetSize( *pBox, aFormatFrameSize ); } void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, @@ -855,7 +855,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, // For the size adjustment, we must not make use of the Modify, since that'd // adjust all boxes, which we really don't want. SwFrameFormat *pFormat = GetFrameFormat(); - aParm.nOldWish = aParm.nNewWish = pFormat->GetFrmSize().GetWidth(); + aParm.nOldWish = aParm.nNewWish = pFormat->GetFrameSize().GetWidth(); if ( (rOld.GetLeft() != rNew.GetLeft()) || (rOld.GetRight()!= rNew.GetRight()) ) { @@ -915,7 +915,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, aParm.nNewWish += nTabDiff; if ( aParm.nNewWish < 0 ) aParm.nNewWish = USHRT_MAX; // Oops! Have to roll back. - SwFormatFrmSize aSz( pFormat->GetFrmSize() ); + SwFormatFrameSize aSz( pFormat->GetFrameSize() ); if ( aSz.GetWidth() != aParm.nNewWish ) { aSz.SetWidth( aParm.nNewWish ); @@ -984,7 +984,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, #ifdef DBG_UTIL { // do some checking for correct table widths - SwTwips nSize = GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nSize = GetFrameFormat()->GetFrameSize().GetWidth(); for (size_t n = 0; n < m_aLines.size(); ++n) { _CheckBoxWidth( *m_aLines[ n ], nSize ); @@ -1008,7 +1008,7 @@ static void lcl_AdjustWidthsInLine( SwTableLine* pLine, ChangeList& rOldNew, for( size_t i = 0; i < nCount; ++i ) { SwTableBox* pBox = pLine->GetTabBoxes()[i]; - SwTwips nWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); SwTwips nNewWidth = nWidth - nRest; nRest = 0; nBorder += nWidth; @@ -1038,9 +1038,9 @@ static void lcl_AdjustWidthsInLine( SwTableLine* pLine, ChangeList& rOldNew, nRest += 1 - nNewWidth; nNewWidth = 1; } - SwFormatFrmSize aFormatFrmSize( pBox->GetFrameFormat()->GetFrmSize() ); - aFormatFrmSize.SetWidth( nNewWidth ); - rParm.aShareFormats.SetSize( *pBox, aFormatFrmSize ); + SwFormatFrameSize aFormatFrameSize( pBox->GetFrameFormat()->GetFrameSize() ); + aFormatFrameSize.SetWidth( nNewWidth ); + rParm.aShareFormats.SetSize( *pBox, aFormatFrameSize ); } } } @@ -1071,7 +1071,7 @@ static void lcl_CalcNewWidths( std::list<sal_uInt16> &rSpanPos, ChangeList& rCha for( size_t nCurrBox = 0; nCurrBox < nCount; ++nCurrBox ) { SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; - SwTwips nCurrWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nCurrWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); const long nRowSpan = pBox->getRowSpan(); const bool bCurrRowSpan = bTop ? nRowSpan < 0 : ( nRowSpan > 1 || nRowSpan < -1 ); @@ -1431,11 +1431,11 @@ SwTableBox* SwTable::GetTableBox( sal_uLong nSttIdx ) if ( pTableNd && pTableNd->GetTable().GetFrameFormat() ) pModify = pTableNd->GetTable().GetFrameFormat(); - SwFrm* pFrm = pModify ? SwIterator<SwFrm,SwModify>(*pModify).First() : nullptr; - while ( pFrm && !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); - if ( pFrm ) - pRet = const_cast<SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox()); + SwFrame* pFrame = pModify ? SwIterator<SwFrame,SwModify>(*pModify).First() : nullptr; + while ( pFrame && !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); + if ( pFrame ) + pRet = const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox()); } // In case the layout doesn't exist yet or anything else goes wrong. @@ -1506,11 +1506,11 @@ SwFrameFormat* SwTableLine::ClaimFrameFormat() SwTableLineFormat *pNewFormat = pRet->GetDoc()->MakeTableLineFormat(); *pNewFormat = *pRet; - // register SwRowFrms that know me as clients at the new Format - SwIterator<SwRowFrm,SwFormat> aFrmIter( *pRet ); - for( SwRowFrm* pFrm = aFrmIter.First(); pFrm; pFrm = aFrmIter.Next() ) - if( pFrm->GetTabLine() == this ) - pFrm->RegisterToFormat( *pNewFormat ); + // register SwRowFrames that know me as clients at the new Format + SwIterator<SwRowFrame,SwFormat> aFrameIter( *pRet ); + for( SwRowFrame* pFrame = aFrameIter.First(); pFrame; pFrame = aFrameIter.Next() ) + if( pFrame->GetTabLine() == this ) + pFrame->RegisterToFormat( *pNewFormat ); // register myself pNewFormat->Add( this ); @@ -1525,10 +1525,10 @@ SwFrameFormat* SwTableLine::ClaimFrameFormat() void SwTableLine::ChgFrameFormat( SwTableLineFormat *pNewFormat ) { SwFrameFormat *pOld = GetFrameFormat(); - SwIterator<SwRowFrm,SwFormat> aIter( *pOld ); + SwIterator<SwRowFrame,SwFormat> aIter( *pOld ); - // First, re-register the Frms. - for( SwRowFrm* pRow = aIter.First(); pRow; pRow = aIter.Next() ) + // First, re-register the Frames. + for( SwRowFrame* pRow = aIter.First(); pRow; pRow = aIter.Next() ) { if( pRow->GetTabLine() == this ) { @@ -1537,11 +1537,11 @@ void SwTableLine::ChgFrameFormat( SwTableLineFormat *pNewFormat ) pRow->InvalidateSize(); pRow->_InvalidatePrt(); pRow->SetCompletePaint(); - pRow->ReinitializeFrmSizeAttrFlags(); + pRow->ReinitializeFrameSizeAttrFlags(); // #i35063# // consider 'split row allowed' attribute - SwTabFrm* pTab = pRow->FindTabFrm(); + SwTabFrame* pTab = pRow->FindTabFrame(); bool bInFollowFlowRow = false; const bool bInFirstNonHeadlineRow = pTab->IsFollow() && pRow == pTab->GetFirstNonHeadlineRow(); @@ -1570,18 +1570,18 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const { SwTwips nRet = 0; bLayoutAvailable = false; - SwIterator<SwRowFrm,SwFormat> aIter( *GetFrameFormat() ); + SwIterator<SwRowFrame,SwFormat> aIter( *GetFrameFormat() ); // A row could appear several times in headers/footers so only one chain of master/follow tables // will be accepted... - const SwTabFrm* pChain = nullptr; // My chain - for( SwRowFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + const SwTabFrame* pChain = nullptr; // My chain + for( SwRowFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { if( pLast->GetTabLine() == this ) { - const SwTabFrm* pTab = pLast->FindTabFrm(); + const SwTabFrame* pTab = pLast->FindTabFrame(); bLayoutAvailable = ( pTab && pTab->IsVertical() ) ? - ( 0 < pTab->Frm().Height() ) : - ( 0 < pTab->Frm().Width() ); + ( 0 < pTab->Frame().Height() ) : + ( 0 < pTab->Frame().Width() ); // The first one defines the chain, if a chain is defined, only members of the chain // will be added. @@ -1589,9 +1589,9 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const { pChain = pTab; // defines my chain (even it is already) if( pTab->IsVertical() ) - nRet += pLast->Frm().Width(); + nRet += pLast->Frame().Width(); else - nRet += pLast->Frm().Height(); + nRet += pLast->Frame().Height(); // Optimization, if there are no master/follows in my chain, nothing more to add if( !pTab->HasFollow() && !pTab->IsFollow() ) break; @@ -1743,9 +1743,9 @@ SwFrameFormat* SwTableBox::ClaimFrameFormat() pNewFormat->ResetFormatAttr( RES_BOXATR_FORMULA, RES_BOXATR_VALUE ); pNewFormat->UnlockModify(); - // re-register SwCellFrm objects that know me - SwIterator<SwCellFrm,SwFormat> aFrmIter( *pRet ); - for( SwCellFrm* pCell = aFrmIter.First(); pCell; pCell = aFrmIter.Next() ) + // re-register SwCellFrame objects that know me + SwIterator<SwCellFrame,SwFormat> aFrameIter( *pRet ); + for( SwCellFrame* pCell = aFrameIter.First(); pCell; pCell = aFrameIter.Next() ) if( pCell->GetTabBox() == this ) pCell->RegisterToFormat( *pNewFormat ); @@ -1761,10 +1761,10 @@ SwFrameFormat* SwTableBox::ClaimFrameFormat() void SwTableBox::ChgFrameFormat( SwTableBoxFormat* pNewFormat ) { SwFrameFormat *pOld = GetFrameFormat(); - SwIterator<SwCellFrm,SwFormat> aIter( *pOld ); + SwIterator<SwCellFrame,SwFormat> aIter( *pOld ); - // First, re-register the Frms. - for( SwCellFrm* pCell = aIter.First(); pCell; pCell = aIter.Next() ) + // First, re-register the Frames. + for( SwCellFrame* pCell = aIter.First(); pCell; pCell = aIter.Next() ) { if( pCell->GetTabBox() == this ) { @@ -1779,10 +1779,10 @@ void SwTableBox::ChgFrameFormat( SwTableBoxFormat* pNewFormat ) // make sure that the row will be formatted, in order // to have the correct Get(Top|Bottom)MarginForLowers values // set at the row. - const SwTabFrm* pTab = pCell->FindTabFrm(); + const SwTabFrame* pTab = pCell->FindTabFrame(); if ( pTab && pTab->IsCollapsingBorders() ) { - SwFrm* pRow = pCell->GetUpper(); + SwFrame* pRow = pCell->GetUpper(); pRow->_InvalidateSize(); pRow->_InvalidatePrt(); } @@ -1927,7 +1927,7 @@ bool SwTable::GetInfo( SfxPoolItem& rInfo ) const break; case RES_CONTENT_VISIBLE: - static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrm,SwFormat>( *GetFrameFormat() ).First(); + static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrame,SwFormat>( *GetFrameFormat() ).First(); return false; } return true; @@ -2566,14 +2566,14 @@ void SwTableBox::ActualiseValueBox() struct SwTableCellInfo::Impl { const SwTable * m_pTable; - const SwCellFrm * m_pCellFrm; - const SwTabFrm * m_pTabFrm; + const SwCellFrame * m_pCellFrame; + const SwTabFrame * m_pTabFrame; typedef ::std::set<const SwTableBox *> TableBoxes_t; TableBoxes_t m_HandledTableBoxes; public: Impl() - : m_pTable(nullptr), m_pCellFrm(nullptr), m_pTabFrm(nullptr) + : m_pTable(nullptr), m_pCellFrame(nullptr), m_pTabFrame(nullptr) { } @@ -2583,42 +2583,42 @@ public: { m_pTable = pTable; SwFrameFormat * pFrameFormat = m_pTable->GetFrameFormat(); - m_pTabFrm = SwIterator<SwTabFrm,SwFormat>(*pFrameFormat).First(); - if (m_pTabFrm && m_pTabFrm->IsFollow()) - m_pTabFrm = m_pTabFrm->FindMaster(true); + m_pTabFrame = SwIterator<SwTabFrame,SwFormat>(*pFrameFormat).First(); + if (m_pTabFrame && m_pTabFrame->IsFollow()) + m_pTabFrame = m_pTabFrame->FindMaster(true); } - const SwCellFrm * getCellFrm() const { return m_pCellFrm; } + const SwCellFrame * getCellFrame() const { return m_pCellFrame; } - const SwFrm * getNextFrmInTable(const SwFrm * pFrm); - const SwCellFrm * getNextCellFrm(const SwFrm * pFrm); - const SwCellFrm * getNextTableBoxsCellFrm(const SwFrm * pFrm); + const SwFrame * getNextFrameInTable(const SwFrame * pFrame); + const SwCellFrame * getNextCellFrame(const SwFrame * pFrame); + const SwCellFrame * getNextTableBoxsCellFrame(const SwFrame * pFrame); bool getNext(); }; -const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm) +const SwFrame * SwTableCellInfo::Impl::getNextFrameInTable(const SwFrame * pFrame) { - const SwFrm * pResult = nullptr; + const SwFrame * pResult = nullptr; - if (((! pFrm->IsTabFrm()) || pFrm == m_pTabFrm) && pFrm->GetLower()) - pResult = pFrm->GetLower(); - else if (pFrm->GetNext()) - pResult = pFrm->GetNext(); + if (((! pFrame->IsTabFrame()) || pFrame == m_pTabFrame) && pFrame->GetLower()) + pResult = pFrame->GetLower(); + else if (pFrame->GetNext()) + pResult = pFrame->GetNext(); else { - while (pFrm->GetUpper() != nullptr) + while (pFrame->GetUpper() != nullptr) { - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); - if (pFrm->IsTabFrm()) + if (pFrame->IsTabFrame()) { - m_pTabFrm = static_cast<const SwTabFrm *>(pFrm)->GetFollow(); - pResult = m_pTabFrm; + m_pTabFrame = static_cast<const SwTabFrame *>(pFrame)->GetFollow(); + pResult = m_pTabFrame; break; } - else if (pFrm->GetNext()) + else if (pFrame->GetNext()) { - pResult = pFrm->GetNext(); + pResult = pFrame->GetNext(); break; } } @@ -2627,15 +2627,15 @@ const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm) return pResult; } -const SwCellFrm * SwTableCellInfo::Impl::getNextCellFrm(const SwFrm * pFrm) +const SwCellFrame * SwTableCellInfo::Impl::getNextCellFrame(const SwFrame * pFrame) { - const SwCellFrm * pResult = nullptr; + const SwCellFrame * pResult = nullptr; - while ((pFrm = getNextFrmInTable(pFrm)) != nullptr) + while ((pFrame = getNextFrameInTable(pFrame)) != nullptr) { - if (pFrm->IsCellFrm()) + if (pFrame->IsCellFrame()) { - pResult = static_cast<const SwCellFrm *>(pFrm); + pResult = static_cast<const SwCellFrame *>(pFrame); break; } } @@ -2643,19 +2643,19 @@ const SwCellFrm * SwTableCellInfo::Impl::getNextCellFrm(const SwFrm * pFrm) return pResult; } -const SwCellFrm * SwTableCellInfo::Impl::getNextTableBoxsCellFrm(const SwFrm * pFrm) +const SwCellFrame * SwTableCellInfo::Impl::getNextTableBoxsCellFrame(const SwFrame * pFrame) { - const SwCellFrm * pResult = nullptr; + const SwCellFrame * pResult = nullptr; - while ((pFrm = getNextCellFrm(pFrm)) != nullptr) + while ((pFrame = getNextCellFrame(pFrame)) != nullptr) { - const SwCellFrm * pCellFrm = static_cast<const SwCellFrm *>(pFrm); - const SwTableBox * pTabBox = pCellFrm->GetTabBox(); + const SwCellFrame * pCellFrame = static_cast<const SwCellFrame *>(pFrame); + const SwTableBox * pTabBox = pCellFrame->GetTabBox(); TableBoxes_t::const_iterator aIt = m_HandledTableBoxes.find(pTabBox); if (aIt == m_HandledTableBoxes.end()) { - pResult = pCellFrm; + pResult = pCellFrame; m_HandledTableBoxes.insert(pTabBox); break; } @@ -2664,22 +2664,22 @@ const SwCellFrm * SwTableCellInfo::Impl::getNextTableBoxsCellFrm(const SwFrm * p return pResult; } -const SwCellFrm * SwTableCellInfo::getCellFrm() const +const SwCellFrame * SwTableCellInfo::getCellFrame() const { - return m_pImpl->getCellFrm(); + return m_pImpl->getCellFrame(); } bool SwTableCellInfo::Impl::getNext() { - if (m_pCellFrm == nullptr) + if (m_pCellFrame == nullptr) { - if (m_pTabFrm != nullptr) - m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pTabFrm); + if (m_pTabFrame != nullptr) + m_pCellFrame = Impl::getNextTableBoxsCellFrame(m_pTabFrame); } else - m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pCellFrm); + m_pCellFrame = Impl::getNextTableBoxsCellFrame(m_pCellFrame); - return m_pCellFrm != nullptr; + return m_pCellFrame != nullptr; } SwTableCellInfo::SwTableCellInfo(const SwTable * pTable) @@ -2701,8 +2701,8 @@ SwRect SwTableCellInfo::getRect() const { SwRect aRet; - if (getCellFrm() != nullptr) - aRet = getCellFrm()->Frm(); + if (getCellFrame() != nullptr) + aRet = getCellFrame()->Frame(); return aRet; } @@ -2711,8 +2711,8 @@ const SwTableBox * SwTableCellInfo::getTableBox() const { const SwTableBox * pRet = nullptr; - if (getCellFrm() != nullptr) - pRet = getCellFrm()->GetTabBox(); + if (getCellFrame() != nullptr) + pRet = getCellFrame()->GetTabBox(); return pRet; } @@ -2726,7 +2726,7 @@ bool SwTable::HasLayout() const { const SwFrameFormat* pFrameFormat = GetFrameFormat(); //a table in a clipboard document doesn't have any layout information - return pFrameFormat && SwIterator<SwTabFrm,SwFormat>(*pFrameFormat).First(); + return pFrameFormat && SwIterator<SwTabFrame,SwFormat>(*pFrameFormat).First(); } void SwTableLine::RegisterToFormat( SwFormat& rFormat ) |