diff options
Diffstat (limited to 'sw/source/core/doc')
36 files changed, 781 insertions, 781 deletions
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 41b599f8396c..9b0b2947c768 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -126,28 +126,28 @@ namespace std::vector<MarkEntry> m_aBkmkEntries; std::vector<MarkEntry> m_aRedlineEntries; std::vector<MarkEntry> m_aFlyEntries; - std::vector<PaMEntry> m_aUnoCrsrEntries; - std::vector<PaMEntry> m_aShellCrsrEntries; + std::vector<PaMEntry> m_aUnoCursorEntries; + std::vector<PaMEntry> m_aShellCursorEntries; typedef std::function<void (SwPosition& rPos, sal_Int32 nContent)> updater_t; virtual void Clear() override { m_aBkmkEntries.clear(); m_aRedlineEntries.clear(); m_aFlyEntries.clear(); - m_aUnoCrsrEntries.clear(); - m_aShellCrsrEntries.clear(); + m_aUnoCursorEntries.clear(); + m_aShellCursorEntries.clear(); } virtual bool Empty() override { - return m_aBkmkEntries.empty() && m_aRedlineEntries.empty() && m_aFlyEntries.empty() && m_aUnoCrsrEntries.empty() && m_aShellCrsrEntries.empty(); + return m_aBkmkEntries.empty() && m_aRedlineEntries.empty() && m_aFlyEntries.empty() && m_aUnoCursorEntries.empty() && m_aShellCursorEntries.empty(); } virtual void Save(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent, bool bSaveFlySplit=false) override { SaveBkmks(pDoc, nNode, nContent); SaveRedlines(pDoc, nNode, nContent); SaveFlys(pDoc, nNode, nContent, bSaveFlySplit); - SaveUnoCrsrs(pDoc, nNode, nContent); - SaveShellCrsrs(pDoc, nNode, nContent); + SaveUnoCursors(pDoc, nNode, nContent); + SaveShellCursors(pDoc, nNode, nContent); } virtual void Restore(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nOffset=0, bool bAuto = false) override { @@ -156,8 +156,8 @@ namespace RestoreBkmks(pDoc, aUpdater); RestoreRedlines(pDoc, aUpdater); RestoreFlys(pDoc, aUpdater, bAuto); - RestoreUnoCrsrs(aUpdater); - RestoreShellCrsrs(aUpdater); + RestoreUnoCursors(aUpdater); + RestoreShellCursors(aUpdater); } virtual void Restore(SwNode& rNd, sal_Int32 nLen, sal_Int32 nCorrLen) override { @@ -167,8 +167,8 @@ namespace RestoreBkmks(pDoc, aUpdater); RestoreRedlines(pDoc, aUpdater); RestoreFlys(pDoc, aUpdater, false); - RestoreUnoCrsrs(aUpdater); - RestoreShellCrsrs(aUpdater); + RestoreUnoCursors(aUpdater); + RestoreShellCursors(aUpdater); } virtual ~ContentIdxStoreImpl(){}; private: @@ -178,10 +178,10 @@ namespace inline void RestoreRedlines(SwDoc* pDoc, updater_t& rUpdater); inline void SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent, bool bSaveFlySplit); inline void RestoreFlys(SwDoc* pDoc, updater_t& rUpdater, bool bAuto); - inline void SaveUnoCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreUnoCrsrs(updater_t& rUpdater); - inline void SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreShellCrsrs(updater_t& rUpdater); + inline void SaveUnoCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + inline void RestoreUnoCursors(updater_t& rUpdater); + inline void SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + inline void RestoreShellCursors(updater_t& rUpdater); static inline const SwPosition& GetRightMarkPos(::sw::mark::IMark* pMark, bool bOther) { return bOther ? pMark->GetOtherMarkPos() : pMark->GetMarkPos(); }; static inline void SetRightMarkPos(MarkBase* pMark, bool bOther, const SwPosition* const pPos) @@ -307,10 +307,10 @@ void ContentIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCont SwContentNode *pNode = pDoc->GetNodes()[nNode]->GetContentNode(); if( !pNode ) return; - SwFrm* pFrm = pNode->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); - if( pFrm ) + SwFrame* pFrame = pNode->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + if( pFrame ) { - if( !pFrm->GetDrawObjs() ) + if( !pFrame->GetDrawObjs() ) return; // if we have a layout and no DrawObjs, we can skip this } MarkEntry aSave = { 0, false, 0 }; @@ -376,64 +376,64 @@ void ContentIdxStoreImpl::RestoreFlys(SwDoc* pDoc, updater_t& rUpdater, bool bAu } } -void ContentIdxStoreImpl::SaveUnoCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) +void ContentIdxStoreImpl::SaveUnoCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) { - pDoc->cleanupUnoCrsrTable(); - for (const auto& pWeakUnoCrsr : pDoc->mvUnoCrsrTable) + pDoc->cleanupUnoCursorTable(); + for (const auto& pWeakUnoCursor : pDoc->mvUnoCursorTable) { - auto pUnoCrsr(pWeakUnoCrsr.lock()); - if(!pUnoCrsr) + auto pUnoCursor(pWeakUnoCursor.lock()); + if(!pUnoCursor) continue; - for(SwPaM& rPaM : pUnoCrsr.get()->GetRingContainer()) + for(SwPaM& rPaM : pUnoCursor.get()->GetRingContainer()) { - lcl_ChkPaMBoth( m_aUnoCrsrEntries, nNode, nContent, rPaM); + lcl_ChkPaMBoth( m_aUnoCursorEntries, nNode, nContent, rPaM); } - const SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<const SwUnoTableCrsr*>(pUnoCrsr.get()); - if( pUnoTableCrsr ) + const SwUnoTableCursor* pUnoTableCursor = dynamic_cast<const SwUnoTableCursor*>(pUnoCursor.get()); + if( pUnoTableCursor ) { - for(SwPaM& rPaM : (&(const_cast<SwUnoTableCrsr*>(pUnoTableCrsr))->GetSelRing())->GetRingContainer()) + for(SwPaM& rPaM : (&(const_cast<SwUnoTableCursor*>(pUnoTableCursor))->GetSelRing())->GetRingContainer()) { - lcl_ChkPaMBoth( m_aUnoCrsrEntries, nNode, nContent, rPaM); + lcl_ChkPaMBoth( m_aUnoCursorEntries, nNode, nContent, rPaM); } } } } -void ContentIdxStoreImpl::RestoreUnoCrsrs(updater_t& rUpdater) +void ContentIdxStoreImpl::RestoreUnoCursors(updater_t& rUpdater) { - for (const PaMEntry& aEntry : m_aUnoCrsrEntries) + for (const PaMEntry& aEntry : m_aUnoCursorEntries) { rUpdater(aEntry.m_pPaM->GetBound(!aEntry.m_isMark), aEntry.m_nContent); } } -void ContentIdxStoreImpl::SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) +void ContentIdxStoreImpl::SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) { - SwCrsrShell* pShell = pDoc->GetEditShell(); + SwCursorShell* pShell = pDoc->GetEditShell(); if( !pShell ) return; for(SwViewShell& rCurShell : pShell->GetRingContainer()) { - if( dynamic_cast<const SwCrsrShell *>(&rCurShell) != nullptr ) + if( dynamic_cast<const SwCursorShell *>(&rCurShell) != nullptr ) { - SwPaM *_pStkCrsr = static_cast<SwCrsrShell*>(&rCurShell)->GetStkCrsr(); - if( _pStkCrsr ) + SwPaM *_pStackCursor = static_cast<SwCursorShell*>(&rCurShell)->GetStackCursor(); + if( _pStackCursor ) do { - lcl_ChkPaMBoth( m_aShellCrsrEntries, nNode, nContent, *_pStkCrsr); - } while ( (_pStkCrsr != nullptr ) && - ((_pStkCrsr = _pStkCrsr->GetNext()) != static_cast<SwCrsrShell*>(&rCurShell)->GetStkCrsr()) ); + lcl_ChkPaMBoth( m_aShellCursorEntries, nNode, nContent, *_pStackCursor); + } while ( (_pStackCursor != nullptr ) && + ((_pStackCursor = _pStackCursor->GetNext()) != static_cast<SwCursorShell*>(&rCurShell)->GetStackCursor()) ); - for(SwPaM& rPaM : (static_cast<SwCrsrShell*>(&rCurShell)->_GetCrsr())->GetRingContainer()) + for(SwPaM& rPaM : (static_cast<SwCursorShell*>(&rCurShell)->_GetCursor())->GetRingContainer()) { - lcl_ChkPaMBoth( m_aShellCrsrEntries, nNode, nContent, rPaM); + lcl_ChkPaMBoth( m_aShellCursorEntries, nNode, nContent, rPaM); } } } } -void ContentIdxStoreImpl::RestoreShellCrsrs(updater_t& rUpdater) +void ContentIdxStoreImpl::RestoreShellCursors(updater_t& rUpdater) { - for (const PaMEntry& aEntry : m_aShellCrsrEntries) + for (const PaMEntry& aEntry : m_aShellCursorEntries) { rUpdater(aEntry.m_pPaM->GetBound(aEntry.m_isMark), aEntry.m_nContent); } diff --git a/sw/source/core/doc/DocumentChartDataProviderManager.cxx b/sw/source/core/doc/DocumentChartDataProviderManager.cxx index fb40e5d42f55..69f7c6fc9fb6 100644 --- a/sw/source/core/doc/DocumentChartDataProviderManager.cxx +++ b/sw/source/core/doc/DocumentChartDataProviderManager.cxx @@ -67,7 +67,7 @@ void DocumentChartDataProviderManager::CreateChartInternalDataProviders( const S ++aIdx; if( nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) && aName == pONd->GetChartTableName() /* OLE node is chart? */ && - nullptr != (pONd->getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout() )) /* chart frame is not hidden */ ) + nullptr != (pONd->getLayoutFrame( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout() )) /* chart frame is not hidden */ ) { uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef(); if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) ) diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index f7897d7539aa..d1d025459dc5 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -843,7 +843,7 @@ namespace } else { - pSrch->DelFrms(nullptr); + pSrch->DelFrames(nullptr); rFootnoteArr.erase( rFootnoteArr.begin() + nPos ); if( bSaveFootnote ) rSaveArr.insert( pSrch ); @@ -871,7 +871,7 @@ namespace } else { - pSrch->DelFrms(nullptr); + pSrch->DelFrames(nullptr); rFootnoteArr.erase( rFootnoteArr.begin() + nPos ); if( bSaveFootnote ) rSaveArr.insert( pSrch ); @@ -1295,7 +1295,7 @@ namespace //local functions originally from docfmt.cxx sal_Int32 nMkPos, nPtPos = rSt.GetIndex(); const OUString& rStr = pTextNd->GetText(); - // Special case: if the Crsr is located within a URL attribute, we take over it's area + // Special case: if the Cursor is located within a URL attribute, we take over it's area SwTextAttr const*const pURLAttr( pTextNd->GetTextAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT)); if (pURLAttr && !pURLAttr->GetINetFormat().GetValue().isEmpty()) @@ -1721,7 +1721,7 @@ void DocumentContentOperationsManager::DeleteSection( SwNode *pNode ) _DelBookmarks(aSttIdx, aEndIdx); { - // move all Crsr/StkCrsr/UnoCrsr out of the to-be-deleted area + // move all Cursor/StackCursor/UnoCursor out of the to-be-deleted area SwNodeIndex aMvStt( aSttIdx, 1 ); SwDoc::CorrAbs( aMvStt, aEndIdx, SwPosition( aSttIdx ), true ); } @@ -2217,8 +2217,8 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod pSaveInsPos = new SwNodeIndex( rRange.aStart, -1 ); // move the Nodes - bool bNoDelFrms = bool(SwMoveFlags::NO_DELFRMS & eMvFlags); - if( m_rDoc.GetNodes()._MoveNodes( rRange, m_rDoc.GetNodes(), rPos, !bNoDelFrms ) ) + bool bNoDelFrames = bool(SwMoveFlags::NO_DELFRMS & eMvFlags); + if( m_rDoc.GetNodes()._MoveNodes( rRange, m_rDoc.GetNodes(), rPos, !bNoDelFrames ) ) { ++aIdx; // again back to old position if( pSaveInsPos ) @@ -2774,11 +2774,11 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj( if( m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() ) { // create layout representation - pFormat->MakeFrms(); + pFormat->MakeFrames(); // #i42319# - follow-up of #i35635# // move object to visible layer // #i79391# - if ( pContact->GetAnchorFrm() ) + if ( pContact->GetAnchorFrame() ) { pContact->MoveObjToVisibleLayer( &rDrawObj ); } @@ -3127,7 +3127,7 @@ void DocumentContentOperationsManager::CopyWithFlyInFly( const sal_Int32 nEndContentIndex, const SwNodeIndex& rInsPos, const std::pair<const SwPaM&, const SwPosition&>* pCopiedPaM /*and real insert pos*/, - const bool bMakeNewFrms, + const bool bMakeNewFrames, const bool bDelRedlines, const bool bCopyFlyAtFly ) const { @@ -3140,7 +3140,7 @@ void DocumentContentOperationsManager::CopyWithFlyInFly( SwNodeIndex aSavePos( rInsPos, -1 ); bool bEndIsEqualEndPos = rInsPos == rRg.aEnd; - m_rDoc.GetNodes()._CopyNodes( rRg, rInsPos, bMakeNewFrms, true ); + m_rDoc.GetNodes()._CopyNodes( rRg, rInsPos, bMakeNewFrames, true ); ++aSavePos; if( bEndIsEqualEndPos ) const_cast<SwNodeIndex&>(rRg.aEnd) = aSavePos; @@ -4103,7 +4103,7 @@ static void lcl_PopNumruleState( SfxItemState aNumRuleState, const SwNumRuleItem } bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, - const bool bMakeNewFrms, const bool bCopyAll, + const bool bMakeNewFrames, const bool bCopyAll, SwPaM *const pCpyRange ) const { SwDoc* pDoc = rPos.nNode.GetNode().GetDoc(); @@ -4127,7 +4127,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, SwUndoCpyDoc* pUndo = nullptr; // lcl_DeleteRedlines may delete the start or end node of the cursor when // removing the redlines so use cursor that is corrected by PaMCorrAbs - std::shared_ptr<SwUnoCrsr> const pCopyPam(pDoc->CreateUnoCrsr(rPos)); + std::shared_ptr<SwUnoCursor> const pCopyPam(pDoc->CreateUnoCursor(rPos)); SwTableNumFormatMerge aTNFM( m_rDoc, *pDoc ); @@ -4417,13 +4417,13 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, if( aInsPos == pEnd->nNode ) { SwNodeIndex aSaveIdx( aInsPos, -1 ); - CopyWithFlyInFly( aRg, 0, aInsPos, &tmp, bMakeNewFrms, false ); + CopyWithFlyInFly( aRg, 0, aInsPos, &tmp, bMakeNewFrames, false ); ++aSaveIdx; pEnd->nNode = aSaveIdx; pEnd->nContent.Assign( aSaveIdx.GetNode().GetTextNode(), 0 ); } else - CopyWithFlyInFly( aRg, pEnd->nContent.GetIndex(), aInsPos, &tmp, bMakeNewFrms, false ); + CopyWithFlyInFly( aRg, pEnd->nContent.GetIndex(), aInsPos, &tmp, bMakeNewFrames, false ); bCopyBookmarks = false; diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx index 1b47d299138f..f67d2b68608c 100644 --- a/sw/source/core/doc/DocumentDeviceManager.cxx +++ b/sw/source/core/doc/DocumentDeviceManager.cxx @@ -309,7 +309,7 @@ void DocumentDeviceManager::PrtDataChanged() // #i41075# OSL_ENSURE( m_rDoc.getIDocumentSettingAccess().get(DocumentSettingId::USE_VIRTUAL_DEVICE) || nullptr != getPrinter( false ), "PrtDataChanged will be called recursively!" ); - SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); std::unique_ptr<SwWait> pWait; bool bEndAction = false; @@ -339,7 +339,7 @@ void DocumentDeviceManager::PrtDataChanged() pFntCache->Flush(); - for(SwRootFrm* aLayout : m_rDoc.GetAllLayouts()) + for(SwRootFrame* aLayout : m_rDoc.GetAllLayouts()) aLayout->InvalidateAllContent(INV_SIZE); for(SwViewShell& rShell : pSh->GetRingContainer()) diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx index b919180e3363..ecebc1302262 100644 --- a/sw/source/core/doc/DocumentDrawModelManager.cxx +++ b/sw/source/core/doc/DocumentDrawModelManager.cxx @@ -165,7 +165,7 @@ void DocumentDrawModelManager::InitDrawModel() { for(SwViewShell& rViewSh : pSh->GetRingContainer()) { - SwRootFrm* pRoot = rViewSh.GetLayout(); + SwRootFrame* pRoot = rViewSh.GetLayout(); if( pRoot && !pRoot->GetDrawPage() ) { // Disable "multiple layout" for the moment: @@ -174,7 +174,7 @@ void DocumentDrawModelManager::InitDrawModel() // mpDrawModel->InsertPage( pDrawPage ); SdrPage* pDrawPage = pMasterPage; pRoot->SetDrawPage( pDrawPage ); - pDrawPage->SetSize( pRoot->Frm().SSize() ); + pDrawPage->SetSize( pRoot->Frame().SSize() ); } } } @@ -344,12 +344,12 @@ SdrLayerID DocumentDrawModelManager::GetInvisibleLayerIdByVisibleOne( const SdrL bool DocumentDrawModelManager::Search(const SwPaM& rPaM, const SvxSearchItem& rSearchItem) { - SwPosFlyFrms aFrames = m_rDoc.GetAllFlyFormats(&rPaM, /*bDrawAlso=*/true); + SwPosFlyFrames aFrames = m_rDoc.GetAllFlyFormats(&rPaM, /*bDrawAlso=*/true); - for (const SwPosFlyFrmPtr& pPosFlyFrm : aFrames) + for (const SwPosFlyFramePtr& pPosFlyFrame : aFrames) { // Filter for at-paragraph anchored draw frames. - const SwFrameFormat& rFrameFormat = pPosFlyFrm->GetFormat(); + const SwFrameFormat& rFrameFormat = pPosFlyFrame->GetFormat(); const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor(); if (rAnchor.GetAnchorId() != FLY_AT_PARA || rFrameFormat.Which() != RES_DRAWFRMFMT) continue; diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 003364b8902d..7180489ce1f3 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -704,24 +704,24 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) // get the values of all SetExpression fields that are valid // until the table - SwFrm* pFrm = nullptr; + SwFrame* pFrame = nullptr; if( pTableNd->GetIndex() < m_rDoc.GetNodes().GetEndOfExtras().GetIndex() ) { // is in the special section, that's expensive! Point aPt; // return the first frame of the layout - Tab.Headline!! - pFrm = rTextNd.getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt ); - if( pFrm ) + pFrame = rTextNd.getLayoutFrame( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt ); + if( pFrame ) { SwPosition aPos( *pTableNd ); - if( GetBodyTextNode( m_rDoc, aPos, *pFrm ) ) + if( GetBodyTextNode( m_rDoc, aPos, *pFrame ) ) FieldsToCalc( *pCalc, _SetGetExpField( aPos.nNode, pFormatField->GetTextField(), &aPos.nContent )); else - pFrm = nullptr; + pFrame = nullptr; } } - if( !pFrm ) + if( !pFrame ) { // create index to determine the TextNode SwNodeIndex aIdx( rTextNd ); @@ -769,7 +769,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) // get the values of all SetExpression fields that are valid // until the table - SwFrm* pFrm = nullptr; + SwFrame* pFrame = nullptr; if( pTableNd->GetIndex() < m_rDoc.GetNodes().GetEndOfExtras().GetIndex() ) { // is in the special section, that's expensive! @@ -779,16 +779,16 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) if( !pCNd ) pCNd = m_rDoc.GetNodes().GoNext( &aCNdIdx ); - if( pCNd && nullptr != (pFrm = pCNd->getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )) ) + if( pCNd && nullptr != (pFrame = pCNd->getLayoutFrame( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )) ) { SwPosition aPos( *pCNd ); - if( GetBodyTextNode( m_rDoc, aPos, *pFrm ) ) + if( GetBodyTextNode( m_rDoc, aPos, *pFrame ) ) FieldsToCalc( *pCalc, _SetGetExpField( aPos.nNode )); else - pFrm = nullptr; + pFrame = nullptr; } } - if( !pFrm ) + if( !pFrame ) { // create index to determine the TextNode SwNodeIndex aIdx( *pTableNd ); diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx index a20c75f41d9a..72978cebac7e 100644 --- a/sw/source/core/doc/DocumentLayoutManager.cxx +++ b/sw/source/core/doc/DocumentLayoutManager.cxx @@ -68,14 +68,14 @@ void DocumentLayoutManager::SetCurrentViewShell( SwViewShell* pNew ) } // It must be able to communicate to a SwViewShell. This is going to be removed later. -const SwRootFrm *DocumentLayoutManager::GetCurrentLayout() const +const SwRootFrame *DocumentLayoutManager::GetCurrentLayout() const { if(GetCurrentViewShell()) return GetCurrentViewShell()->GetLayout(); return nullptr; } -SwRootFrm *DocumentLayoutManager::GetCurrentLayout() +SwRootFrame *DocumentLayoutManager::GetCurrentLayout() { if(GetCurrentViewShell()) return GetCurrentViewShell()->GetLayout(); @@ -239,7 +239,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat ) } // Destroy Frames - pFormat->DelFrms(); + pFormat->DelFrames(); // Only FlyFrames are undoable at first const sal_uInt16 nWh = pFormat->Which(); @@ -334,7 +334,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( const SwFrameFormat& rSource, const SwFormatAnchor& rNewAnchor, bool bSetTextFlyAtt, - bool bMakeFrms ) + bool bMakeFrames ) { const bool bFly = RES_FLYFRMFMT == rSource.Which(); const bool bDraw = RES_DRAWFRMFMT == rSource.Which(); @@ -467,8 +467,8 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( if( pDest->GetAnchor() == rNewAnchor ) { - // Do *not* connect to layout, if a <MakeFrms> will not be called. - if ( bMakeFrms ) + // Do *not* connect to layout, if a <MakeFrames> will not be called. + if ( bMakeFrames ) { pContact->ConnectToLayout( &rNewAnchor ); } @@ -490,8 +490,8 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( aFormat, pPos->nContent.GetIndex(), 0 ); } - if( bMakeFrms ) - pDest->MakeFrms(); + if( bMakeFrames ) + pDest->MakeFrames(); // If the draw format has a TextBox, then copy its fly format as well. if (SwFrameFormat* pSourceTextBox = SwTextBoxHelper::findTextBox(&rSource)) @@ -505,7 +505,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( // presumably these anchors are supported though not sure assert(FLY_AT_CHAR == boxAnchor.GetAnchorId() || FLY_AT_PARA == boxAnchor.GetAnchorId()); SwFrameFormat* pDestTextBox = CopyLayoutFormat(*pSourceTextBox, - boxAnchor, bSetTextFlyAtt, bMakeFrms); + boxAnchor, bSetTextFlyAtt, bMakeFrames); SwAttrSet aSet(pDest->GetAttrSet()); SwFormatContent aContent(pDestTextBox->GetContent().GetContentIdx()->GetNode().GetStartNode()); aSet.Put(aContent); @@ -521,7 +521,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( //by the SwLayouter void DocumentLayoutManager::ClearSwLayouterEntries() { - SwLayouter::ClearMovedFwdFrms( m_rDoc ); + SwLayouter::ClearMovedFwdFrames( m_rDoc ); SwLayouter::ClearObjsTmpConsiderWrapInfluence( m_rDoc ); // #i65250# SwLayouter::ClearMoveBwdLayoutInfo( m_rDoc ); diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index 3e4552badd7b..a249f2c82bbf 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -231,8 +231,8 @@ void DocumentLinksAdministrationManager::UpdateLinks( bool bUI ) if( bUpdate && (bUI || !bAskUpdate) ) { SfxMedium* pMedium = m_rDoc.GetDocShell()->GetMedium(); - SfxFrame* pFrm = pMedium ? pMedium->GetLoadTargetFrame() : nullptr; - vcl::Window* pDlgParent = pFrm ? &pFrm->GetWindow() : nullptr; + SfxFrame* pFrame = pMedium ? pMedium->GetLoadTargetFrame() : nullptr; + vcl::Window* pDlgParent = pFrame ? &pFrame->GetWindow() : nullptr; GetLinkManager().UpdateAllLinks( bAskUpdate, true, false, pDlgParent ); } diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 4944eac525e7..5a32cc431fcc 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -430,11 +430,11 @@ void sw::DocumentSettingManager::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLan pDrawModel->ReformatAllTextObjects(); } - SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot && !m_rDoc.IsInReading() ) { pTmpRoot->StartAllAction(); - for(SwRootFrm* aLayout : m_rDoc.GetAllLayouts()) + for(SwRootFrame* aLayout : m_rDoc.GetAllLayouts()) aLayout->InvalidateAllContent(INV_SIZE); pTmpRoot->EndAllAction(); } @@ -500,7 +500,7 @@ void sw::DocumentSettingManager::setCharacterCompressionType( /*[in]*/SwCharComp pDrawModel->ReformatAllTextObjects(); } - SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot && !m_rDoc.IsInReading() ) { pTmpRoot->StartAllAction(); diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 005750fbb74a..40e2e69fe231 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -106,7 +106,7 @@ namespace const SvxLRSpaceItem& rLR = rPgDscFormat.GetLRSpace(); const long nLeft = rLR.GetLeft(); const long nRight = rLR.GetRight(); - const long nWidth = rPgDscFormat.GetFrmSize().GetWidth(); + const long nWidth = rPgDscFormat.GetFrameSize().GetWidth(); return nWidth - nLeft - nRight; } @@ -266,14 +266,14 @@ namespace static void lcl_PutStdPageSizeIntoItemSet( SwDoc* pDoc, SfxItemSet& rSet ) { SwPageDesc* pStdPgDsc = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_STANDARD ); - SwFormatFrmSize aFrmSz( pStdPgDsc->GetMaster().GetFrmSize() ); + SwFormatFrameSize aFrameSz( pStdPgDsc->GetMaster().GetFrameSize() ); if( pStdPgDsc->GetLandscape() ) { - SwTwips nTmp = aFrmSz.GetHeight(); - aFrmSz.SetHeight( aFrmSz.GetWidth() ); - aFrmSz.SetWidth( nTmp ); + SwTwips nTmp = aFrameSz.GetHeight(); + aFrameSz.SetHeight( aFrameSz.GetWidth() ); + aFrameSz.SetWidth( nTmp ); } - rSet.Put( aFrmSz ); + rSet.Put( aFrameSz ); } } @@ -1328,7 +1328,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); aSet.Put( SwFormatSurround( SURROUND_PARALLEL )); // Set the default width to 3.5 cm, use the minimum value for the height - aSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, + aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, GetMetricVal( CM_1 ) * 3 + GetMetricVal( CM_05 ), MM50 )); } @@ -1477,7 +1477,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool { Size aPSize( SvxPaperInfo::GetPaperSize( PAPER_ENV_C65 ) ); LandscapeSwap( aPSize ); - aSet.Put( SwFormatFrmSize( ATT_FIX_SIZE, aPSize.Width(), aPSize.Height() )); + aSet.Put( SwFormatFrameSize( ATT_FIX_SIZE, aPSize.Width(), aPSize.Height() )); aLR.SetLeft( 0 ); aLR.SetRight( 0 ); aUL.SetUpper( 0 ); aUL.SetLower( 0 ); aSet.Put( aLR ); @@ -1519,14 +1519,14 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool case RES_POOLPAGE_LANDSCAPE: // "Landscape" { SwPageDesc* pStdPgDsc = GetPageDescFromPool( RES_POOLPAGE_STANDARD ); - SwFormatFrmSize aFrmSz( pStdPgDsc->GetMaster().GetFrmSize() ); + SwFormatFrameSize aFrameSz( pStdPgDsc->GetMaster().GetFrameSize() ); if ( !pStdPgDsc->GetLandscape() ) { - const SwTwips nTmp = aFrmSz.GetHeight(); - aFrmSz.SetHeight( aFrmSz.GetWidth() ); - aFrmSz.SetWidth( nTmp ); + const SwTwips nTmp = aFrameSz.GetHeight(); + aFrameSz.SetHeight( aFrameSz.GetWidth() ); + aFrameSz.SetWidth( nTmp ); } - aSet.Put( aFrmSz ); + aSet.Put( aFrameSz ); aSet.Put( aLR ); aSet.Put( aUL ); pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL ); diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx index 51a0f3d6657c..18e649a0e359 100644 --- a/sw/source/core/doc/DocumentTimerManager.cxx +++ b/sw/source/core/doc/DocumentTimerManager.cxx @@ -86,7 +86,7 @@ IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Idle*, pIdle, void ) pModLogFile = new ::rtl::Logfile( "First DoIdleJobs" ); #endif - SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot && !SfxProgress::GetActiveProgress( m_rDoc.GetDocShell() ) ) { @@ -110,8 +110,8 @@ IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Idle*, pIdle, void ) if (bIsOnlineSpell && bIsAutoGrammar) StartGrammarChecking( m_rDoc ); } - std::set<SwRootFrm*> aAllLayouts = m_rDoc.GetAllLayouts(); - std::set<SwRootFrm*>::iterator pLayIter = aAllLayouts.begin(); + std::set<SwRootFrame*> aAllLayouts = m_rDoc.GetAllLayouts(); + std::set<SwRootFrame*>::iterator pLayIter = aAllLayouts.begin(); for ( ;pLayIter != aAllLayouts.end();++pLayIter ) { if ((*pLayIter)->IsIdleFormat()) diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 27b2f4b39b37..644588e39f30 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -527,18 +527,18 @@ sal_uInt16 _PostItField::GetPageNo( //but the PostIt's first occurrence in the selected area. rVirtPgNo = 0; const sal_Int32 nPos = GetContent(); - SwIterator<SwTextFrm,SwTextNode> aIter( GetTextField()->GetTextNode() ); - for( SwTextFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( GetTextField()->GetTextNode() ); + for( SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - if( pFrm->GetOfst() > nPos || - (pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) ) + if( pFrame->GetOfst() > nPos || + (pFrame->HasFollow() && pFrame->GetFollow()->GetOfst() <= nPos) ) continue; - sal_uInt16 nPgNo = pFrm->GetPhyPageNum(); + sal_uInt16 nPgNo = pFrame->GetPhyPageNum(); if( rRangeEnum.hasValue( nPgNo, &rPossiblePages )) { - rLineNo = (sal_uInt16)(pFrm->GetLineCount( nPos ) + - pFrm->GetAllLines() - pFrm->GetThisLines()); - rVirtPgNo = pFrm->GetVirtPageNum(); + rLineNo = (sal_uInt16)(pFrame->GetLineCount( nPos ) + + pFrame->GetAllLines() - pFrame->GetThisLines()); + rVirtPgNo = pFrame->GetVirtPageNum(); return nPgNo; } } @@ -634,11 +634,11 @@ static void lcl_FormatPostIt( /// provide the paper tray to use according to the page style in use, /// but do that only if the respective item is NOT just the default item -static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm ) +static sal_Int32 lcl_GetPaperBin( const SwPageFrame *pStartFrame ) { sal_Int32 nRes = -1; - const SwFrameFormat &rFormat = pStartFrm->GetPageDesc()->GetMaster(); + const SwFrameFormat &rFormat = pStartFrame->GetPageDesc()->GetMaster(); const SfxPoolItem *pItem = nullptr; SfxItemState eState = rFormat.GetItemState( RES_PAPER_BIN, false, &pItem ); const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem); @@ -649,7 +649,7 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm ) } void SwDoc::CalculatePagesForPrinting( - const SwRootFrm& rLayout, + const SwRootFrame& rLayout, /* out */ SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, @@ -670,13 +670,13 @@ void SwDoc::CalculatePagesForPrinting( rValidPages.clear(); sal_Int32 nPageNum = 1; - const SwPageFrm *pStPage = dynamic_cast<const SwPageFrm*>( rLayout.Lower() ); + const SwPageFrame *pStPage = dynamic_cast<const SwPageFrame*>( rLayout.Lower() ); while (pStPage && nPageNum <= nDocPageCount) { const bool bPrintThisPage = ( (bPrintRightPages && pStPage->OnRightPage()) || (bPrintLeftPages && !pStPage->OnRightPage()) ) && - ( bPrintEmptyPages || pStPage->Frm().Height() ); + ( bPrintEmptyPages || pStPage->Frame().Height() ); if (bPrintThisPage) { @@ -685,7 +685,7 @@ void SwDoc::CalculatePagesForPrinting( } ++nPageNum; - pStPage = static_cast<const SwPageFrm*>(pStPage->GetNext()); + pStPage = static_cast<const SwPageFrame*>(pStPage->GetNext()); } // now that we have identified the valid pages for printing according @@ -813,15 +813,15 @@ void SwDoc::UpdatePagesForPrintingWithPostItData( // now we just need to add the post-it pages to be printed to the // end of the vector of pages to print sal_Int32 nPageNum = 0; - const SwPageFrm * pPageFrm = static_cast<SwPageFrm*>(rData.m_pPostItShell->GetLayout()->Lower()); - while( pPageFrm && nPageNum < nPostItDocPageCount ) + const SwPageFrame * pPageFrame = static_cast<SwPageFrame*>(rData.m_pPostItShell->GetLayout()->Lower()); + while( pPageFrame && nPageNum < nPostItDocPageCount ) { - OSL_ENSURE( pPageFrm, "Empty page frame. How are we going to print this?" ); + OSL_ENSURE( pPageFrame, "Empty page frame. How are we going to print this?" ); ++nPageNum; // negative page number indicates page is from the post-it doc rData.GetPagesToPrint().push_back( -nPageNum ); - OSL_ENSURE( pPageFrm, "pPageFrm is NULL!" ); - pPageFrm = static_cast<const SwPageFrm*>(pPageFrm->GetNext()); + OSL_ENSURE( pPageFrame, "pPageFrame is NULL!" ); + pPageFrame = static_cast<const SwPageFrame*>(pPageFrame->GetNext()); } OSL_ENSURE( nPageNum == nPostItDocPageCount, "unexpected number of pages" ); } @@ -865,7 +865,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData( } void SwDoc::CalculatePagePairsForProspectPrinting( - const SwRootFrm& rLayout, + const SwRootFrame& rLayout, /* out */ SwRenderData &rData, const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount ) @@ -873,7 +873,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting( std::map< sal_Int32, sal_Int32 > &rPrinterPaperTrays = rData.GetPrinterPaperTrays(); std::set< sal_Int32 > &rValidPagesSet = rData.GetValidPagesSet(); std::vector< std::pair< sal_Int32, sal_Int32 > > &rPagePairs = rData.GetPagePairsForProspectPrinting(); - std::map< sal_Int32, const SwPageFrm * > validStartFrms; + std::map< sal_Int32, const SwPageFrame * > validStartFrames; rPagePairs.clear(); rValidPagesSet.clear(); @@ -896,23 +896,23 @@ void SwDoc::CalculatePagePairsForProspectPrinting( if ( aRange.size() <= 0) return; - const SwPageFrm *pStPage = dynamic_cast<const SwPageFrm*>( rLayout.Lower() ); + const SwPageFrame *pStPage = dynamic_cast<const SwPageFrame*>( rLayout.Lower() ); for ( sal_Int32 i = 1; pStPage && i < nDocPageCount; ++i ) - pStPage = static_cast<const SwPageFrm*>(pStPage->GetNext()); + pStPage = static_cast<const SwPageFrame*>(pStPage->GetNext()); if ( !pStPage ) // Then it was that return; // currently for prospect printing all pages are valid to be printed // thus we add them all to the respective map and set for later use sal_Int32 nPageNum = 0; - const SwPageFrm *pPageFrm = dynamic_cast<const SwPageFrm*>( rLayout.Lower() ); - while( pPageFrm && nPageNum < nDocPageCount ) + const SwPageFrame *pPageFrame = dynamic_cast<const SwPageFrame*>( rLayout.Lower() ); + while( pPageFrame && nPageNum < nDocPageCount ) { - OSL_ENSURE( pPageFrm, "Empty page frame. How are we going to print this?" ); + OSL_ENSURE( pPageFrame, "Empty page frame. How are we going to print this?" ); ++nPageNum; rValidPagesSet.insert( nPageNum ); - validStartFrms[ nPageNum ] = pPageFrm; - pPageFrm = static_cast<const SwPageFrm*>(pPageFrm->GetNext()); + validStartFrames[ nPageNum ] = pPageFrame; + pPageFrame = static_cast<const SwPageFrame*>(pPageFrame->GetNext()); rPrinterPaperTrays[ nPageNum ] = lcl_GetPaperBin( pStPage ); } @@ -936,12 +936,12 @@ void SwDoc::CalculatePagePairsForProspectPrinting( // now fill the vector for calculating the page pairs with the start frames // from the above obtained vector - std::vector< const SwPageFrm * > aVec; + std::vector< const SwPageFrame * > aVec; for ( std::vector< sal_Int32 >::size_type i = 0; i < aPagesToPrint.size(); ++i) { const sal_Int32 nPage = aPagesToPrint[i]; - const SwPageFrm *pFrm = validStartFrms[ nPage ]; - aVec.push_back( pFrm ); + const SwPageFrame *pFrame = validStartFrames[ nPage ]; + aVec.push_back( pFrame ); } // just one page is special ... @@ -957,8 +957,8 @@ void SwDoc::CalculatePagePairsForProspectPrinting( } // make sure that all pages are in correct order - std::vector< const SwPageFrm * >::size_type nSPg = 0; - std::vector< const SwPageFrm * >::size_type nEPg = aVec.size(); + std::vector< const SwPageFrame * >::size_type nSPg = 0; + std::vector< const SwPageFrame * >::size_type nEPg = aVec.size(); sal_Int32 nStep = 1; if ( 0 == (nEPg & 1 )) // there are no uneven ones! --nEPg; @@ -978,12 +978,12 @@ void SwDoc::CalculatePagePairsForProspectPrinting( nPrintCount < nCntPage; ++nPrintCount ) { pStPage = aVec[ nSPg ]; - const SwPageFrm* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] : nullptr; + const SwPageFrame* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] : nullptr; short nRtlOfs = bPrintProspectRTL ? 1 : 0; if ( 0 == (( nSPg + nRtlOfs) & 1 ) ) // switch for odd number in LTR, even number in RTL { - const SwPageFrm* pTmp = pStPage; + const SwPageFrame* pTmp = pStPage; pStPage = pNxtPage; pNxtPage = pTmp; } @@ -1140,8 +1140,8 @@ static bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* ) */ void SwDoc::SpellItAgainSam( bool bInvalid, bool bOnlyWrong, bool bSmartTags ) { - std::set<SwRootFrm*> aAllLayouts = GetAllLayouts(); - OSL_ENSURE( getIDocumentLayoutAccess().GetCurrentLayout(), "SpellAgain: Where's my RootFrm?" ); + std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); + OSL_ENSURE( getIDocumentLayoutAccess().GetCurrentLayout(), "SpellAgain: Where's my RootFrame?" ); if( bInvalid ) { for ( auto aLayout : aAllLayouts ) @@ -1160,10 +1160,10 @@ void SwDoc::SpellItAgainSam( bool bInvalid, bool bOnlyWrong, bool bSmartTags ) void SwDoc::InvalidateAutoCompleteFlag() { - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot ) { - std::set<SwRootFrm*> aAllLayouts = GetAllLayouts(); + std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); for( auto aLayout : aAllLayouts ) aLayout->AllInvalidateAutoCompleteWords(); for( sal_uLong nNd = 1, nCnt = GetNodes().Count(); nNd < nCnt; ++nNd ) @@ -1544,7 +1544,7 @@ bool SwDoc::ConvertFieldsToText() if (pFieldAtEnd && pFieldAtEnd->Which() == RES_TXTATR_INPUTFIELD) { SwPosition &rEndPos = *aInsertPam.GetPoint(); - rEndPos.nContent = SwCrsrShell::EndOfInputFieldAtPos( *aInsertPam.End() ); + rEndPos.nContent = SwCursorShell::EndOfInputFieldAtPos( *aInsertPam.End() ); } else { @@ -1680,15 +1680,15 @@ bool SwDoc::ContainsHiddenChars() const return false; } -std::shared_ptr<SwUnoCrsr> SwDoc::CreateUnoCrsr( const SwPosition& rPos, bool bTableCrsr ) +std::shared_ptr<SwUnoCursor> SwDoc::CreateUnoCursor( const SwPosition& rPos, bool bTableCursor ) { - std::shared_ptr<SwUnoCrsr> pNew; - if( bTableCrsr ) - pNew = std::make_shared<SwUnoTableCrsr>(rPos); + std::shared_ptr<SwUnoCursor> pNew; + if( bTableCursor ) + pNew = std::make_shared<SwUnoTableCursor>(rPos); else - pNew = std::make_shared<SwUnoCrsr>(rPos); + pNew = std::make_shared<SwUnoCursor>(rPos); - mvUnoCrsrTable.push_back( pNew ); + mvUnoCursorTable.push_back( pNew ); return pNew; } diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index e61ef478006d..e0797bd849cc 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -118,7 +118,7 @@ void SwDoc::_UpdateCharts( const SwTable& rTable, SwViewShell const & rVSh ) con SwOLENode *pONd; if( nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) && aName == pONd->GetChartTableName() && - pONd->getLayoutFrm( rVSh.GetLayout() ) ) + pONd->getLayoutFrame( rVSh.GetLayout() ) ) { SwChartDataProvider *pPCD = getIDocumentChartDataProviderAccess().GetChartDataProvider(); if (pPCD) diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index 278d7f2a4a6d..b78d308edd46 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -35,9 +35,9 @@ namespace { - /// find the relevant section in which the SwUnoCrsr may wander. + /// find the relevant section in which the SwUnoCursor may wander. /// returns NULL if no restrictions apply - static const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode ) + static const SwStartNode* lcl_FindUnoCursorSection( const SwNode& rNode ) { const SwStartNode* pStartNode = rNode.StartOfSectionNode(); while( ( pStartNode != nullptr ) && @@ -95,35 +95,35 @@ void PaMCorrAbs( const SwPaM& rRange, SwPosition const aEnd( *rRange.End() ); SwPosition const aNewPos( rNewPos ); SwDoc *const pDoc = aStart.nNode.GetNode().GetDoc(); - SwCrsrShell *const pShell = pDoc->GetEditShell(); + SwCursorShell *const pShell = pDoc->GetEditShell(); if( pShell ) { for(const SwViewShell& rShell : pShell->GetRingContainer()) { - if(dynamic_cast<const SwCrsrShell *>(&rShell) == nullptr) + if(dynamic_cast<const SwCursorShell *>(&rShell) == nullptr) continue; - const SwCrsrShell* pCrsrShell = static_cast<const SwCrsrShell*>(&rShell); - SwPaM *_pStkCrsr = pCrsrShell->GetStkCrsr(); - if( _pStkCrsr ) + const SwCursorShell* pCursorShell = static_cast<const SwCursorShell*>(&rShell); + SwPaM *_pStackCursor = pCursorShell->GetStackCursor(); + if( _pStackCursor ) do { - lcl_PaMCorrAbs( *_pStkCrsr, aStart, aEnd, aNewPos ); - } while ( (_pStkCrsr != nullptr ) && - ((_pStkCrsr = static_cast<SwPaM *>(_pStkCrsr->GetNext())) != pCrsrShell->GetStkCrsr()) ); + lcl_PaMCorrAbs( *_pStackCursor, aStart, aEnd, aNewPos ); + } while ( (_pStackCursor != nullptr ) && + ((_pStackCursor = static_cast<SwPaM *>(_pStackCursor->GetNext())) != pCursorShell->GetStackCursor()) ); - for(SwPaM& rPaM : const_cast<SwShellCrsr*>(pCrsrShell->_GetCrsr())->GetRingContainer()) + for(SwPaM& rPaM : const_cast<SwShellCursor*>(pCursorShell->_GetCursor())->GetRingContainer()) { lcl_PaMCorrAbs( rPaM, aStart, aEnd, aNewPos ); } - if( pCrsrShell->IsTableMode() ) - lcl_PaMCorrAbs( const_cast<SwPaM &>(*pCrsrShell->GetTableCrs()), aStart, aEnd, aNewPos ); + if( pCursorShell->IsTableMode() ) + lcl_PaMCorrAbs( const_cast<SwPaM &>(*pCursorShell->GetTableCrs()), aStart, aEnd, aNewPos ); } } - for(const auto& pWeakUnoCrsr : pDoc->mvUnoCrsrTable) + for(const auto& pWeakUnoCursor : pDoc->mvUnoCursorTable) { - auto pUnoCursor(pWeakUnoCrsr.lock()); + auto pUnoCursor(pWeakUnoCursor.lock()); if(!pUnoCursor) continue; @@ -133,8 +133,8 @@ void PaMCorrAbs( const SwPaM& rRange, // section bool const bLeaveSection = pUnoCursor->IsRemainInSection() && - ( lcl_FindUnoCrsrSection( aNewPos.nNode.GetNode() ) != - lcl_FindUnoCrsrSection( + ( lcl_FindUnoCursorSection( aNewPos.nNode.GetNode() ) != + lcl_FindUnoCursorSection( pUnoCursor->GetPoint()->nNode.GetNode() ) ); for(SwPaM& rPaM : pUnoCursor->GetRingContainer()) @@ -142,11 +142,11 @@ void PaMCorrAbs( const SwPaM& rRange, bChange |= lcl_PaMCorrAbs( rPaM, aStart, aEnd, aNewPos ); } - SwUnoTableCrsr *const pUnoTableCrsr = - dynamic_cast<SwUnoTableCrsr *>(pUnoCursor.get()); - if( pUnoTableCrsr ) + SwUnoTableCursor *const pUnoTableCursor = + dynamic_cast<SwUnoTableCursor *>(pUnoCursor.get()); + if( pUnoTableCursor ) { - for(SwPaM& rPaM : (&pUnoTableCrsr->GetSelRing())->GetRingContainer()) + for(SwPaM& rPaM : (&pUnoTableCursor->GetSelRing())->GetRingContainer()) { bChange |= lcl_PaMCorrAbs( rPaM, aStart, aEnd, aNewPos ); @@ -167,7 +167,7 @@ void PaMCorrAbs( const SwPaM& rRange, void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const sal_Int32 nOffset, - bool bMoveCrsr) + bool bMoveCursor) { SwContentNode *const pContentNode( rOldNode.GetNode().GetContentNode() ); SwPaM const aPam(rOldNode, 0, @@ -200,7 +200,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, // To-Do - need to add here 'SwExtraRedlineTable' also ? } - if(bMoveCrsr) + if(bMoveCursor) { ::PaMCorrAbs(aPam, aNewPos); } @@ -209,7 +209,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, void SwDoc::CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos, - bool bMoveCrsr ) + bool bMoveCursor ) { SwPosition aStart(*rRange.Start()); SwPosition aEnd(*rRange.End()); @@ -217,7 +217,7 @@ void SwDoc::CorrAbs( _DelBookmarks( aStart.nNode, aEnd.nNode, nullptr, &aStart.nContent, &aEnd.nContent ); - if(bMoveCrsr) + if(bMoveCursor) ::PaMCorrAbs(rRange, rNewPos); } @@ -225,11 +225,11 @@ void SwDoc::CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode, const SwPosition& rNewPos, - bool bMoveCrsr ) + bool bMoveCursor ) { _DelBookmarks( rStartNode, rEndNode ); - if(bMoveCrsr) + if(bMoveCursor) { SwContentNode *const pContentNode( rEndNode.GetNode().GetContentNode() ); SwPaM const aPam(rStartNode, 0, @@ -248,47 +248,47 @@ void PaMCorrRel( const SwNodeIndex &rOldNode, const sal_Int32 nCntIdx = rNewPos.nContent.GetIndex() + nOffset; - SwCrsrShell const* pShell = pDoc->GetEditShell(); + SwCursorShell const* pShell = pDoc->GetEditShell(); if( pShell ) { for(const SwViewShell& rShell : pShell->GetRingContainer()) { - if(dynamic_cast<const SwCrsrShell *>(&rShell) == nullptr) + if(dynamic_cast<const SwCursorShell *>(&rShell) == nullptr) continue; - SwCrsrShell* pCrsrShell = const_cast<SwCrsrShell*>(static_cast<const SwCrsrShell*>(&rShell)); - SwPaM *_pStkCrsr = pCrsrShell->GetStkCrsr(); - if( _pStkCrsr ) + SwCursorShell* pCursorShell = const_cast<SwCursorShell*>(static_cast<const SwCursorShell*>(&rShell)); + SwPaM *_pStackCursor = pCursorShell->GetStackCursor(); + if( _pStackCursor ) do { - lcl_PaMCorrRel1( _pStkCrsr, pOldNode, aNewPos, nCntIdx ); - } while ( (_pStkCrsr != nullptr ) && - ((_pStkCrsr = static_cast<SwPaM *>(_pStkCrsr->GetNext())) != pCrsrShell->GetStkCrsr()) ); + lcl_PaMCorrRel1( _pStackCursor, pOldNode, aNewPos, nCntIdx ); + } while ( (_pStackCursor != nullptr ) && + ((_pStackCursor = static_cast<SwPaM *>(_pStackCursor->GetNext())) != pCursorShell->GetStackCursor()) ); - SwPaM* pStartPaM = pCrsrShell->_GetCrsr(); + SwPaM* pStartPaM = pCursorShell->_GetCursor(); for(SwPaM& rPaM : pStartPaM->GetRingContainer()) { lcl_PaMCorrRel1( &rPaM, pOldNode, aNewPos, nCntIdx); } - if( pCrsrShell->IsTableMode() ) - lcl_PaMCorrRel1( pCrsrShell->GetTableCrs(), pOldNode, aNewPos, nCntIdx ); + if( pCursorShell->IsTableMode() ) + lcl_PaMCorrRel1( pCursorShell->GetTableCrs(), pOldNode, aNewPos, nCntIdx ); } } - for(const auto& pWeakUnoCrsr : pDoc->mvUnoCrsrTable) + for(const auto& pWeakUnoCursor : pDoc->mvUnoCursorTable) { - auto pUnoCrsr(pWeakUnoCrsr.lock()); - if(!pUnoCrsr) + auto pUnoCursor(pWeakUnoCursor.lock()); + if(!pUnoCursor) continue; - for(SwPaM& rPaM : pUnoCrsr->GetRingContainer()) + for(SwPaM& rPaM : pUnoCursor->GetRingContainer()) { lcl_PaMCorrRel1( &rPaM, pOldNode, aNewPos, nCntIdx ); } - SwUnoTableCrsr* pUnoTableCrsr = - dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr.get()); - if( pUnoTableCrsr ) + SwUnoTableCursor* pUnoTableCursor = + dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); + if( pUnoTableCursor ) { - for(SwPaM& rPaM : (&pUnoTableCrsr->GetSelRing())->GetRingContainer()) + for(SwPaM& rPaM : (&pUnoTableCursor->GetSelRing())->GetRingContainer()) { lcl_PaMCorrRel1( &rPaM, pOldNode, aNewPos, nCntIdx ); } @@ -299,7 +299,7 @@ void PaMCorrRel( const SwNodeIndex &rOldNode, void SwDoc::CorrRel(const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const sal_Int32 nOffset, - bool bMoveCrsr) + bool bMoveCursor) { getIDocumentMarkAccess()->correctMarksRelative(rOldNode, rNewPos, nOffset); @@ -315,7 +315,7 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode, // To-Do - need to add here 'SwExtraRedlineTable' also ? } - if(bMoveCrsr) + if(bMoveCursor) ::PaMCorrRel(rOldNode, rNewPos, nOffset); } diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 60547a4371fc..98e34c39b242 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -72,9 +72,9 @@ static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId, // The default page size is obtained from the application //locale - SwFormatFrmSize aFrmSize( ATT_FIX_SIZE ); + SwFormatFrameSize aFrameSize( ATT_FIX_SIZE ); const Size aPhysSize = SvxPaperInfo::GetDefaultPaperSize(); - aFrmSize.SetSize( aPhysSize ); + aFrameSize.SetSize( aPhysSize ); // Prepare for default margins. // Margins have a default minimum size. @@ -110,19 +110,19 @@ static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId, aLR.SetRight( nMinRight ); aLR.SetLeft( nMinLeft ); - rFormat1.SetFormatAttr( aFrmSize ); + rFormat1.SetFormatAttr( aFrameSize ); rFormat1.SetFormatAttr( aLR ); rFormat1.SetFormatAttr( aUL ); - rFormat2.SetFormatAttr( aFrmSize ); + rFormat2.SetFormatAttr( aFrameSize ); rFormat2.SetFormatAttr( aLR ); rFormat2.SetFormatAttr( aUL ); - rFormat3.SetFormatAttr( aFrmSize ); + rFormat3.SetFormatAttr( aFrameSize ); rFormat3.SetFormatAttr( aLR ); rFormat3.SetFormatAttr( aUL ); - rFormat4.SetFormatAttr( aFrmSize ); + rFormat4.SetFormatAttr( aFrameSize ); rFormat4.SetFormatAttr( aLR ); rFormat4.SetFormatAttr( aUL ); } @@ -380,7 +380,7 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged ) OSL_ENSURE(i < m_PageDescs.size(), "PageDescs is out of range."); SwPageDesc& rDesc = *m_PageDescs[i]; - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if (GetIDocumentUndoRedo().DoesUndo()) { @@ -884,8 +884,8 @@ void SwDoc::CheckDefaultPageFormat() SwFrameFormat& rMaster = rDesc.GetMaster(); SwFrameFormat& rLeft = rDesc.GetLeft(); - const SwFormatFrmSize& rMasterSize = rMaster.GetFrmSize(); - const SwFormatFrmSize& rLeftSize = rLeft.GetFrmSize(); + const SwFormatFrameSize& rMasterSize = rMaster.GetFrameSize(); + const SwFormatFrameSize& rLeftSize = rLeft.GetFrameSize(); const bool bSetSize = LONG_MAX == rMasterSize.GetWidth() || LONG_MAX == rMasterSize.GetHeight() || diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index fe5219cdc1e9..ff1f0bae3740 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -87,21 +87,21 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat, SwTwips nHoriRelPos = 0; SwTwips nVertRelPos = 0; { - const SwFrm* pAnchorFrm = pContact->GetAnchoredObj( &_rSdrObj )->GetAnchorFrm(); - OSL_ENSURE( !pAnchorFrm || - !pAnchorFrm->IsTextFrm() || - !static_cast<const SwTextFrm*>(pAnchorFrm)->IsFollow(), + const SwFrame* pAnchorFrame = pContact->GetAnchoredObj( &_rSdrObj )->GetAnchorFrame(); + OSL_ENSURE( !pAnchorFrame || + !pAnchorFrame->IsTextFrame() || + !static_cast<const SwTextFrame*>(pAnchorFrame)->IsFollow(), "<lcl_AdjustPositioningAttr(..)> - anchor frame is a follow." ); bool bVert = false; bool bR2L = false; // #i45952# - use anchor position of anchor frame, if it exist. Point aAnchorPos; - if ( pAnchorFrm ) + if ( pAnchorFrame ) { // #i45952# - aAnchorPos = pAnchorFrm->GetFrmAnchorPos( ::HasWrap( &_rSdrObj ) ); - bVert = pAnchorFrm->IsVertical(); - bR2L = pAnchorFrm->IsRightToLeft(); + aAnchorPos = pAnchorFrame->GetFrameAnchorPos( ::HasWrap( &_rSdrObj ) ); + bVert = pAnchorFrame->IsVertical(); + bR2L = pAnchorFrame->IsRightToLeft(); } else { @@ -399,7 +399,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { SwFlyFrameFormat* pFrameFormat = - static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm()->GetFormat(); + static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->GetFormat(); if( pFrameFormat ) { getIDocumentLayoutAccess().DelLayoutFormat( pFrameFormat ); @@ -490,7 +490,7 @@ _ZSortFly::_ZSortFly( const SwFrameFormat* pFrameFormat, const SwFormatAnchor* p if( pFormat->getIDocumentLayoutAccess().GetCurrentViewShell() ) { // See if there is an SdrObject for it - SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFormat>( *pFrameFormat ).First(); + SwFlyFrame* pFly = SwIterator<SwFlyFrame,SwFormat>( *pFrameFormat ).First(); if( pFly ) nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum(); } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index b5628f10af60..c0b5d3656fee 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -80,8 +80,8 @@ void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx, // SetFormatAttr should call Modify() and add it to the node pFormat->SetFormatAttr( aAnchor ); SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode(); - if( pCNd && pCNd->getLayoutFrm( pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false ) ) - pFormat->MakeFrms(); + if( pCNd && pCNd->getLayoutFrame( pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false ) ) + pFormat->MakeFrames(); } sw::CheckAnchoredFlyConsistency(*rSttIdx.GetNode().GetDoc()); } @@ -102,7 +102,7 @@ void _SaveFlyInRange( const SwNodeRange& rRg, _SaveFlyArr& rArr ) _SaveFly aSave( pAPos->nNode.GetIndex() - rRg.aStart.GetIndex(), pFormat, false ); rArr.push_back( aSave ); - pFormat->DelFrms(); + pFormat->DelFrames(); // set a dummy anchor position to maintain anchoring invariants SwFormatAnchor aAnchor( pFormat->GetAnchor() ); aAnchor.SetAnchor(nullptr); @@ -168,7 +168,7 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos, _SaveFly aSave( pAPos->nNode.GetIndex() - rSttNdIdx.GetIndex(), pFormat, bInsPos ); rArr.push_back( aSave ); - pFormat->DelFrms(); + pFormat->DelFrames(); // set a dummy anchor position to maintain anchoring invariants SwFormatAnchor aAnchor( pFormat->GetAnchor() ); aAnchor.SetAnchor(nullptr); @@ -403,7 +403,7 @@ bool sw_JoinText( SwPaM& rPam, bool bJoinPrev ) if( !pContentStore->Empty() ) pContentStore->Restore( pDoc, aIdx.GetIndex() ); - // If the passed PaM is not in the Crsr ring, + // If the passed PaM is not in the Cursor ring, // treat it separately (e.g. when it's being called from AutoFormat) if( pOldTextNd == rPam.GetBound().nContent.GetIdxReg() ) rPam.GetBound() = aAlphaPos; @@ -513,7 +513,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, uno::Any aRet; if( nCurrNd <= nEndNd ) { - SwContentFrm* pCntFrm; + SwContentFrame* pContentFrame; bool bGoOn = true; while( bGoOn ) { @@ -521,18 +521,18 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, switch( pNd->GetNodeType() ) { case ND_TEXTNODE: - if( nullptr != ( pCntFrm = pNd->GetTextNode()->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout() )) ) + if( nullptr != ( pContentFrame = pNd->GetTextNode()->getLayoutFrame( getIDocumentLayoutAccess().GetCurrentLayout() )) ) { // skip protected and hidden Cells and Flys - if( pCntFrm->IsProtected() ) + if( pContentFrame->IsProtected() ) { nCurrNd = pNd->EndOfSectionIndex(); } - else if( !static_cast<SwTextFrm*>(pCntFrm)->IsHiddenNow() ) + else if( !static_cast<SwTextFrame*>(pContentFrame)->IsHiddenNow() ) { if( pPageCnt && *pPageCnt && pPageSt ) { - sal_uInt16 nPageNr = pCntFrm->GetPhyPageNum(); + sal_uInt16 nPageNr = pContentFrame->GetPhyPageNum(); if( !*pPageSt ) { *pPageSt = nPageNr; @@ -557,12 +557,12 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, { SwIndex aStartIndex( dynamic_cast< SwTextNode* >( pNd ), nBeginGrammarCheck ); SwPosition aStart( *pNd, aStartIndex ); - SwCursor aCrsr(aStart, nullptr, false); - SwPosition aOrigPos = *aCrsr.GetPoint(); - aCrsr.GoSentence( SwCursor::START_SENT ); - if( aOrigPos != *aCrsr.GetPoint() ) + SwCursor aCursor(aStart, nullptr, false); + SwPosition aOrigPos = *aCursor.GetPoint(); + aCursor.GoSentence( SwCursor::START_SENT ); + if( aOrigPos != *aCursor.GetPoint() ) { - nBeginGrammarCheck = aCrsr.GetPoint()->nContent.GetIndex(); + nBeginGrammarCheck = aCursor.GetPoint()->nContent.GetIndex(); } } nEndGrammarCheck = (pSpellArgs->pEndNode == pNd) @@ -689,9 +689,9 @@ public: inline sal_uInt16 *GetPageSt() { return pPageSt; } }; -SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCrsrPos, +SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCursorPos, sal_uInt16* pPageCount, sal_uInt16* pPageStart ) - : SwInterHyphInfo( rCrsrPos ), pNode(nullptr), + : SwInterHyphInfo( rCursorPos ), pNode(nullptr), pPageCnt( pPageCount ), pPageSt( pPageStart ) { // The following constraints have to be met: @@ -746,14 +746,14 @@ static bool lcl_HyphenateNode( const SwNodePtr& rpNd, void* pArgs ) SwHyphArgs *pHyphArgs = static_cast<SwHyphArgs*>(pArgs); if( pNode ) { - SwContentFrm* pCntFrm = pNode->getLayoutFrm( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - if( pCntFrm && !static_cast<SwTextFrm*>(pCntFrm)->IsHiddenNow() ) + SwContentFrame* pContentFrame = pNode->getLayoutFrame( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + if( pContentFrame && !static_cast<SwTextFrame*>(pContentFrame)->IsHiddenNow() ) { sal_uInt16 *pPageSt = pHyphArgs->GetPageSt(); sal_uInt16 *pPageCnt = pHyphArgs->GetPageCnt(); if( pPageCnt && *pPageCnt && pPageSt ) { - sal_uInt16 nPageNr = pCntFrm->GetPhyPageNum(); + sal_uInt16 nPageNr = pContentFrame->GetPhyPageNum(); if( !*pPageSt ) { *pPageSt = nPageNr; @@ -777,7 +777,7 @@ static bool lcl_HyphenateNode( const SwNodePtr& rpNd, void* pArgs ) } uno::Reference< XHyphenatedWord > SwDoc::Hyphenate( - SwPaM *pPam, const Point &rCrsrPos, + SwPaM *pPam, const Point &rCursorPos, sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) { OSL_ENSURE(this == pPam->GetDoc(), "SwDoc::Hyphenate: strangers in the night"); @@ -785,7 +785,7 @@ uno::Reference< XHyphenatedWord > SwDoc::Hyphenate( if( *pPam->GetPoint() > *pPam->GetMark() ) pPam->Exchange(); - SwHyphArgs aHyphArg( pPam, rCrsrPos, pPageCnt, pPageSt ); + SwHyphArgs aHyphArg( pPam, rCursorPos, pPageCnt, pPageSt ); SwNodeIndex aTmpIdx( pPam->GetMark()->nNode, 1 ); GetNodes().ForEach( pPam->GetPoint()->nNode, aTmpIdx, lcl_HyphenateNode, &aHyphArg ); diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 21acbc441d70..e0c6b2bc86df 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -198,14 +198,14 @@ void _SetGetExpField::GetPosOfContent( SwPosition& rPos ) const } } -void _SetGetExpField::SetBodyPos( const SwContentFrm& rFrm ) +void _SetGetExpField::SetBodyPos( const SwContentFrame& rFrame ) { - if( !rFrm.IsInDocBody() ) + if( !rFrame.IsInDocBody() ) { - SwNodeIndex aIdx( *rFrm.GetNode() ); + SwNodeIndex aIdx( *rFrame.GetNode() ); SwDoc& rDoc = *aIdx.GetNodes().GetDoc(); SwPosition aPos( aIdx ); - bool const bResult = ::GetBodyTextNode( rDoc, aPos, rFrm ); + bool const bResult = ::GetBodyTextNode( rDoc, aPos, rFrame ); OSL_ENSURE(bResult, "Where is the field?"); (void) bResult; // unused in non-debug nNode = aPos.nNode.GetIndex(); @@ -1006,12 +1006,12 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, sal_uInt16 nFiel // always the first! (in tab headline, header-/footer) Point aPt; - const SwContentFrm* pFrm = rTextNd.getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwContentFrame* pFrame = rTextNd.getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); _SetGetExpField* pNew = nullptr; bool bIsInBody = false; - if( !pFrm || pFrm->IsInDocBody() ) + if( !pFrame || pFrame->IsInDocBody() ) { // create index to determine the TextNode SwNodeIndex aIdx( rTextNd ); @@ -1021,14 +1021,14 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, sal_uInt16 nFiel // in frames whose anchor is in redline. However, we do want to update // fields in hidden sections. So: In order to be updated, a field 1) // must have a frame, or 2) it must be in the document body. - if( (pFrm != nullptr) || bIsInBody ) + if( (pFrame != nullptr) || bIsInBody ) pNew = new _SetGetExpField( aIdx, &rTField ); } else { // create index to determine the TextNode SwPosition aPos( rDoc.GetNodes().GetEndOfPostIts() ); - bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrm ); + bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame ); OSL_ENSURE(bResult, "where is the Field"); (void) bResult; // unused in non-debug pNew = new _SetGetExpField( aPos.nNode, &rTField, &aPos.nContent ); @@ -1071,11 +1071,11 @@ void SwDocUpdateField::GetBodyNode( const SwSectionNode& rSectNd ) // always the first! (in tab headline, header-/footer) Point aPt; - const SwContentFrm* pFrm = pCNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - if( !pFrm ) + const SwContentFrame* pFrame = pCNd->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + if( !pFrame ) break; - bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrm ); + bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame ); OSL_ENSURE(bResult, "where is the Field"); (void) bResult; // unused in non-debug pNew = new _SetGetExpField( rSectNd, &aPos ); diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 3553acf022d8..c2ae5a0baf03 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -181,9 +181,9 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, case FLY_AS_CHAR: if( pFlyFormat && rAnch.GetContentAnchor() ) { - const SwFrm* pOld = static_cast<const SwFlyFrameFormat*>(pFlyFormat)->GetFrm( &aRet ); + const SwFrame* pOld = static_cast<const SwFlyFrameFormat*>(pFlyFormat)->GetFrame( &aRet ); if( pOld ) - aRet = pOld->Frm().Pos(); + aRet = pOld->Frame().Pos(); } break; @@ -193,9 +193,9 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, { const SwPosition *pPos = rAnch.GetContentAnchor(); const SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode(); - const SwFrm* pOld = pNd ? pNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aRet, nullptr, false ) : nullptr; + const SwFrame* pOld = pNd ? pNd->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aRet, nullptr, false ) : nullptr; if( pOld ) - aRet = pOld->Frm().Pos(); + aRet = pOld->Frame().Pos(); } break; @@ -204,21 +204,21 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, { const SwFlyFrameFormat* pFormat = static_cast<SwFlyFrameFormat*>(rAnch.GetContentAnchor()-> nNode.GetNode().GetFlyFormat()); - const SwFrm* pOld = pFormat ? pFormat->GetFrm( &aRet ) : nullptr; + const SwFrame* pOld = pFormat ? pFormat->GetFrame( &aRet ) : nullptr; if( pOld ) - aRet = pOld->Frm().Pos(); + aRet = pOld->Frame().Pos(); } break; case FLY_AT_PAGE: { sal_uInt16 nPgNum = rAnch.GetPageNum(); - const SwPageFrm *pPage = static_cast<SwPageFrm*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower()); + const SwPageFrame *pPage = static_cast<SwPageFrame*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower()); for( sal_uInt16 i = 1; (i <= nPgNum) && pPage; ++i, - pPage =static_cast<const SwPageFrm*>(pPage->GetNext()) ) + pPage =static_cast<const SwPageFrame*>(pPage->GetNext()) ) if( i == nPgNum ) { - aRet = pPage->Frm().Pos(); + aRet = pPage->Frame().Pos(); break; } } @@ -233,7 +233,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, #define IGNOREANCHOR 1 #define DONTMAKEFRMS 2 -sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool bNewFrms ) +sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool bNewFrames ) { // Changing anchors is almost always allowed. // Exception: Paragraph and character bound frames must not become @@ -261,7 +261,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool // Destroy the old Frames. // The Views are hidden implicitly, so hiding them another time would be // kind of a show! - rFormat.DelFrms(); + rFormat.DelFrames(); if ( FLY_AS_CHAR == nOld ) { @@ -300,7 +300,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool { const SwPosition *pPos = aNewAnch.GetContentAnchor(); SwTextNode *pNd = pPos->nNode.GetNode().GetTextNode(); - OSL_ENSURE( pNd, "Crsr does not point to TextNode." ); + OSL_ENSURE( pNd, "Cursor does not point to TextNode." ); SwFormatFlyCnt aFormat( static_cast<SwFlyFrameFormat*>(&rFormat) ); pNd->InsertItem( aFormat, pPos->nContent.GetIndex(), 0 ); @@ -380,15 +380,15 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool break; } - if( bNewFrms ) - rFormat.MakeFrms(); + if( bNewFrames ) + rFormat.MakeFrames(); return MAKEFRMS; } static bool -lcl_SetFlyFrmAttr(SwDoc & rDoc, - sal_Int8 (SwDoc::*pSetFlyFrmAnchor)(SwFrameFormat &, SfxItemSet &, bool), +lcl_SetFlyFrameAttr(SwDoc & rDoc, + sal_Int8 (SwDoc::*pSetFlyFrameAnchor)(SwFrameFormat &, SfxItemSet &, bool), SwFrameFormat & rFlyFormat, SfxItemSet & rSet) { // #i32968# Inserting columns in the frame causes MakeFrameFormat to put two @@ -398,9 +398,9 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, // Is the anchor attribute included? // If so, we pass it to a special method, which returns true // if the Fly needs to be created anew, because we e.g change the FlyType. - sal_Int8 const nMakeFrms = + sal_Int8 const nMakeFrames = (SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) - ? (rDoc.*pSetFlyFrmAnchor)( rFlyFormat, rSet, false ) + ? (rDoc.*pSetFlyFrameAnchor)( rFlyFormat, rSet, false ) : DONTMAKEFRMS; const SfxPoolItem* pItem; @@ -421,7 +421,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, rSet.ClearItem( nWhich ); break; case RES_ANCHOR: - if( DONTMAKEFRMS != nMakeFrms ) + if( DONTMAKEFRMS != nMakeFrames ) break; default: @@ -440,10 +440,10 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, if( aTmpSet.Count() ) rFlyFormat.SetFormatAttr( aTmpSet ); - if( MAKEFRMS == nMakeFrms ) - rFlyFormat.MakeFrms(); + if( MAKEFRMS == nMakeFrames ) + rFlyFormat.MakeFrames(); - return aTmpSet.Count() || MAKEFRMS == nMakeFrms; + return aTmpSet.Count() || MAKEFRMS == nMakeFrames; } void SwDoc::CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet) @@ -504,7 +504,7 @@ void SwDoc::CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet) } } -bool SwDoc::SetFlyFrmAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ) +bool SwDoc::SetFlyFrameAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ) { if( !rSet.Count() ) return false; @@ -517,7 +517,7 @@ bool SwDoc::SetFlyFrmAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ) pSaveUndo.reset( new SwUndoFormatAttrHelper( rFlyFormat ) ); } - bool const bRet = lcl_SetFlyFrmAttr(*this, &SwDoc::SetFlyFrmAnchor, rFlyFormat, rSet); + bool const bRet = lcl_SetFlyFrameAttr(*this, &SwDoc::SetFlyFrameAnchor, rFlyFormat, rSet); if ( pSaveUndo.get() ) { @@ -529,13 +529,13 @@ bool SwDoc::SetFlyFrmAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ) getIDocumentState().SetModified(); - SwTextBoxHelper::syncFlyFrmAttr(rFlyFormat, rSet); + SwTextBoxHelper::syncFlyFrameAttr(rFlyFormat, rSet); return bRet; } // #i73249# -void SwDoc::SetFlyFrmTitle( SwFlyFrameFormat& rFlyFrameFormat, +void SwDoc::SetFlyFrameTitle( SwFlyFrameFormat& rFlyFrameFormat, const OUString& sNewTitle ) { if ( rFlyFrameFormat.GetObjTitle() == sNewTitle ) @@ -558,7 +558,7 @@ void SwDoc::SetFlyFrmTitle( SwFlyFrameFormat& rFlyFrameFormat, getIDocumentState().SetModified(); } -void SwDoc::SetFlyFrmDescription( SwFlyFrameFormat& rFlyFrameFormat, +void SwDoc::SetFlyFrameDescription( SwFlyFrameFormat& rFlyFrameFormat, const OUString& sNewDescription ) { if ( rFlyFrameFormat.GetObjDescription() == sNewDescription ) @@ -584,9 +584,9 @@ void SwDoc::SetFlyFrmDescription( SwFlyFrameFormat& rFlyFrameFormat, bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewFormat, SfxItemSet* pSet, bool bKeepOrient ) { - bool bChgAnchor = false, bFrmSz = false; + bool bChgAnchor = false, bFrameSz = false; - const SwFormatFrmSize aFrmSz( rFormat.GetFrmSize() ); + const SwFormatFrameSize aFrameSz( rFormat.GetFrameSize() ); const SwFormatVertOrient aVert( rFormat.GetVertOrient() ); const SwFormatHoriOrient aHori( rFormat.GetHoriOrient() ); @@ -617,7 +617,7 @@ bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewForm if( SfxItemState::SET == rNewFormat.GetAttrSet().GetItemState( RES_FRM_SIZE, false )) { rFormat.ResetFormatAttr( RES_FRM_SIZE ); - bFrmSz = true; + bFrameSz = true; } const SfxItemSet* pAsk = pSet; @@ -627,15 +627,15 @@ bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewForm rFormat.GetAnchor().GetAnchorId() ) { if( pSet ) - bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFormat, *pSet, false ); + bChgAnchor = MAKEFRMS == SetFlyFrameAnchor( rFormat, *pSet, false ); else { // Needs to have the FlyFormat range, because we set attributes in it, - // in SetFlyFrmAnchor. + // in SetFlyFrameAnchor. SfxItemSet aFlySet( *rNewFormat.GetAttrSet().GetPool(), rNewFormat.GetAttrSet().GetRanges() ); aFlySet.Put( *pItem ); - bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFormat, aFlySet, false); + bChgAnchor = MAKEFRMS == SetFlyFrameAnchor( rFormat, aFlySet, false); } } } @@ -656,11 +656,11 @@ bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewForm rFormat.ResetFormatAttr( RES_BACKGROUND, RES_COL ); rFormat.ResetFormatAttr( RES_URL, RES_EDIT_IN_READONLY ); - if( !bFrmSz ) - rFormat.SetFormatAttr( aFrmSz ); + if( !bFrameSz ) + rFormat.SetFormatAttr( aFrameSz ); if( bChgAnchor ) - rFormat.MakeFrms(); + rFormat.MakeFrames(); if( pUndo ) pUndo->DeRegisterFromFormat( rFormat ); @@ -718,8 +718,8 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, } // #i26791# - const SwFrm* pOldAnchorFrm = pContact->GetAnchorFrm( pObj ); - const SwFrm* pNewAnchorFrm = pOldAnchorFrm; + const SwFrame* pOldAnchorFrame = pContact->GetAnchorFrame( pObj ); + const SwFrame* pNewAnchorFrame = pOldAnchorFrame; // #i54336# // Instead of only keeping the index position for an as-character @@ -746,24 +746,24 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, case FLY_AT_PARA: case FLY_AT_CHAR: { - const Point aNewPoint = ( pOldAnchorFrm->IsVertical() || - pOldAnchorFrm->IsRightToLeft() ) + const Point aNewPoint = ( pOldAnchorFrame->IsVertical() || + pOldAnchorFrame->IsRightToLeft() ) ? aObjRect.TopRight() : aPt; // allow drawing objects in header/footer - pNewAnchorFrm = ::FindAnchor( pOldAnchorFrm, aNewPoint ); - if ( pNewAnchorFrm->IsTextFrm() && static_cast<const SwTextFrm*>(pNewAnchorFrm)->IsFollow() ) + pNewAnchorFrame = ::FindAnchor( pOldAnchorFrame, aNewPoint ); + if ( pNewAnchorFrame->IsTextFrame() && static_cast<const SwTextFrame*>(pNewAnchorFrame)->IsFollow() ) { - pNewAnchorFrm = static_cast<const SwTextFrm*>(pNewAnchorFrm)->FindMaster(); + pNewAnchorFrame = static_cast<const SwTextFrame*>(pNewAnchorFrame)->FindMaster(); } - if ( pNewAnchorFrm->IsProtected() ) + if ( pNewAnchorFrame->IsProtected() ) { - pNewAnchorFrm = nullptr; + pNewAnchorFrame = nullptr; } else { - SwPosition aPos( *static_cast<const SwContentFrm*>(pNewAnchorFrm)->GetNode() ); + SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode() ); aNewAnch.SetType( _eAnchorType ); aNewAnch.SetAnchor( &aPos ); } @@ -772,24 +772,24 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, case FLY_AT_FLY: // LAYER_IMPL { - // Search the closest SwFlyFrm starting from the upper left corner. - SwFrm *pTextFrm; + // Search the closest SwFlyFrame starting from the upper left corner. + SwFrame *pTextFrame; { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); SwPosition aPos( GetNodes() ); Point aPoint( aPt ); aPoint.setX(aPoint.getX() - 1); - getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( &aPos, aPoint, &aState ); // consider that drawing objects can be in - // header/footer. Thus, <GetFrm()> by left-top-corner - pTextFrm = aPos.nNode.GetNode(). - GetContentNode()->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + // header/footer. Thus, <GetFrame()> by left-top-corner + pTextFrame = aPos.nNode.GetNode(). + GetContentNode()->getLayoutFrame( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); } - const SwFrm *pTmp = ::FindAnchor( pTextFrm, aPt ); - pNewAnchorFrm = pTmp->FindFlyFrm(); - if( pNewAnchorFrm && !pNewAnchorFrm->IsProtected() ) + const SwFrame *pTmp = ::FindAnchor( pTextFrame, aPt ); + pNewAnchorFrame = pTmp->FindFlyFrame(); + if( pNewAnchorFrame && !pNewAnchorFrame->IsProtected() ) { - const SwFrameFormat *pTmpFormat = static_cast<const SwFlyFrm*>(pNewAnchorFrm)->GetFormat(); + const SwFrameFormat *pTmpFormat = static_cast<const SwFlyFrame*>(pNewAnchorFrame)->GetFormat(); const SwFormatContent& rContent = pTmpFormat->GetContent(); SwPosition aPos( *rContent.GetContentIdx() ); aNewAnch.SetAnchor( &aPos ); @@ -801,32 +801,32 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, } case FLY_AT_PAGE: { - pNewAnchorFrm = getIDocumentLayoutAccess().GetCurrentLayout()->Lower(); - while ( pNewAnchorFrm && !pNewAnchorFrm->Frm().IsInside( aPt ) ) - pNewAnchorFrm = pNewAnchorFrm->GetNext(); - if ( !pNewAnchorFrm ) + pNewAnchorFrame = getIDocumentLayoutAccess().GetCurrentLayout()->Lower(); + while ( pNewAnchorFrame && !pNewAnchorFrame->Frame().IsInside( aPt ) ) + pNewAnchorFrame = pNewAnchorFrame->GetNext(); + if ( !pNewAnchorFrame ) continue; - aNewAnch.SetPageNum( static_cast<const SwPageFrm*>(pNewAnchorFrm)->GetPhyPageNum()); + aNewAnch.SetPageNum( static_cast<const SwPageFrame*>(pNewAnchorFrame)->GetPhyPageNum()); } break; case FLY_AS_CHAR: if( _bSameOnly ) // Change of position/size { - if( !pOldAnchorFrm ) + if( !pOldAnchorFrame ) { pContact->ConnectToLayout(); - pOldAnchorFrm = pContact->GetAnchorFrm(); + pOldAnchorFrame = pContact->GetAnchorFrame(); } - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pOldAnchorFrm))->Prepare(); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pOldAnchorFrame))->Prepare(); } else // Change of anchors { // allow drawing objects in header/footer - pNewAnchorFrm = ::FindAnchor( pOldAnchorFrm, aPt ); - if( pNewAnchorFrm->IsProtected() ) + pNewAnchorFrame = ::FindAnchor( pOldAnchorFrame, aPt ); + if( pNewAnchorFrame->IsProtected() ) { - pNewAnchorFrm = nullptr; + pNewAnchorFrame = nullptr; break; } @@ -834,19 +834,19 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, Point aPoint( aPt ); aPoint.setX(aPoint.getX() - 1); // Do not load in the DrawObj! aNewAnch.SetType( FLY_AS_CHAR ); - SwPosition aPos( *static_cast<const SwContentFrm*>(pNewAnchorFrm)->GetNode() ); - if ( pNewAnchorFrm->Frm().IsInside( aPoint ) ) + SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode() ); + if ( pNewAnchorFrame->Frame().IsInside( aPoint ) ) { // We need to find a TextNode, because only there we can anchor a // content-bound DrawObject. - SwCrsrMoveState aState( MV_SETONLYTEXT ); - getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + SwCursorMoveState aState( MV_SETONLYTEXT ); + getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( &aPos, aPoint, &aState ); } else { SwContentNode &rCNd = (SwContentNode&) - *static_cast<const SwContentFrm*>(pNewAnchorFrm)->GetNode(); - if ( pNewAnchorFrm->Frm().Bottom() < aPt.Y() ) + *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode(); + if ( pNewAnchorFrame->Frame().Bottom() < aPt.Y() ) rCNd.MakeStartIndex( &aPos.nContent ); else rCNd.MakeEndIndex( &aPos.nContent ); @@ -868,8 +868,8 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, } if ( (FLY_AS_CHAR != _eAnchorType) && - pNewAnchorFrm && - ( !_bSameOnly || pNewAnchorFrm != pOldAnchorFrm ) ) + pNewAnchorFrame && + ( !_bSameOnly || pNewAnchorFrame != pOldAnchorFrame ) ) { // #i26791# - Direct object positioning no longer needed. Apply // of attributes (method call <SetAttr(..)>) takes care of the @@ -884,13 +884,13 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, { SwRect aNewObjRect( aObjRect ); static_cast<SwAnchoredDrawObject*>(pContact->GetAnchoredObj( nullptr )) - ->AdjustPositioningAttr( pNewAnchorFrm, + ->AdjustPositioningAttr( pNewAnchorFrame, &aNewObjRect ); } else { static_cast<SwAnchoredDrawObject*>(pContact->GetAnchoredObj( pObj )) - ->AdjustPositioningAttr( pNewAnchorFrm ); + ->AdjustPositioningAttr( pNewAnchorFrame ); } } } @@ -902,7 +902,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, // #i54336# if (xOldAsCharAnchorPos) { - if ( pNewAnchorFrm) + if ( pNewAnchorFrame) { // We need to handle InContents in a special way: // The TextAttribut needs to be destroyed which, unfortunately, also @@ -970,9 +970,9 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat & return SwChainRet::NOT_EMPTY; } - for( auto pSpzFrmFm : *GetSpzFrameFormats() ) + for( auto pSpzFrameFm : *GetSpzFrameFormats() ) { - const SwFormatAnchor& rAnchor = pSpzFrmFm->GetAnchor(); + const SwFormatAnchor& rAnchor = pSpzFrameFm->GetAnchor(); sal_uLong nTstSttNd; // #i20622# - to-frame anchored objects are allowed. if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) || @@ -1053,12 +1053,12 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest ) aChain.SetNext( &rDestFormat ); aSet.Put( aChain ); - SwFormatFrmSize aSize( rSource.GetFrmSize() ); + SwFormatFrameSize aSize( rSource.GetFrameSize() ); if ( aSize.GetHeightSizeType() != ATT_FIX_SIZE ) { - SwFlyFrm *pFly = SwIterator<SwFlyFrm,SwFormat>( rSource ).First(); + SwFlyFrame *pFly = SwIterator<SwFlyFrame,SwFormat>( rSource ).First(); if ( pFly ) - aSize.SetHeight( pFly->Frm().Height() ); + aSize.SetHeight( pFly->Frame().Height() ); aSize.SetHeightSizeType( ATT_FIX_SIZE ); aSet.Put( aSize ); } diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 55c4d81e4eaf..5c0f91413d0b 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -259,7 +259,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, SwIndex& rSt = pPam->GetPoint()->nContent; sal_Int32 nMkPos, nPtPos = rSt.GetIndex(); - // Special case: if the Crsr is located within a URL attribute, we take over it's area + // Special case: if the Cursor is located within a URL attribute, we take over it's area SwTextAttr const*const pURLAttr( pTextNd->GetTextAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT)); if (pURLAttr && !pURLAttr->GetINetFormat().GetValue().isEmpty()) @@ -1401,7 +1401,7 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, bool bCopyPoolIds ) { bool bNotifyLayout = false; - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); rDstDesc.SetLandscape( rSrcDesc.GetLandscape() ); rDstDesc.SetNumType( rSrcDesc.GetNumType() ); diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 8cca4cd8b0ba..5bec265ffe26 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -251,7 +251,7 @@ SwFootnoteInfo::SwFootnoteInfo(SwTextFormatColl *pFormat) : void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo) { - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if( !(GetFootnoteInfo() == rInfo) ) { const SwFootnoteInfo &rOld = GetFootnoteInfo(); @@ -277,7 +277,7 @@ void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo) if (pTmpRoot) { - std::set<SwRootFrm*> aAllLayouts = GetAllLayouts(); + std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); if ( bFootnotePos ) for( auto aLayout : aAllLayouts ) aLayout->AllRemoveFootnotes(); @@ -323,7 +323,7 @@ void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo) void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) { - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if( !(GetEndNoteInfo() == rInfo) ) { if(GetIDocumentUndoRedo().DoesUndo()) @@ -393,7 +393,7 @@ bool SwDoc::SetCurFootnote( const SwPaM& rPam, const OUString& rNumStr, sal_uInt16 nNumber, bool bIsEndNote ) { SwFootnoteIdxs& rFootnoteArr = GetFootnoteIdxs(); - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); const SwPosition* pStt = rPam.Start(), *pEnd = rPam.End(); const sal_uLong nSttNd = pStt->nNode.GetIndex(); diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index 5d9f9be892e5..6f26c6c4431d 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -127,7 +127,7 @@ void SwDoc::ReplaceDocumentProperties(const SwDoc& rSource, bool mailMerge) /// inserts an AutoText block bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, - SwPaM& rPaM, SwCrsrShell* pShell ) + SwPaM& rPaM, SwCursorShell* pShell ) { bool bRet = false; const sal_uInt16 nIdx = rBlock.GetIndex( rEntry ); @@ -168,10 +168,10 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, pContentNd, (pContentNd) ? pContentNd->Len() : 0 ); GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, nullptr ); - SwPaM *_pStartCrsr = &rPaM, *__pStartCrsr = _pStartCrsr; + SwPaM *_pStartCursor = &rPaM, *__pStartCursor = _pStartCursor; do { - SwPosition& rInsPos = *_pStartCrsr->GetPoint(); + SwPosition& rInsPos = *_pStartCursor->GetPoint(); SwStartNode* pBoxSttNd = const_cast<SwStartNode*>(rInsPos.nNode.GetNode(). FindTableBoxStartNode()); @@ -192,8 +192,8 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, aACD.RestoreDontExpandItems( rInsPos ); if( pShell ) pShell->SaveTableBoxContent( &rInsPos ); - } while( (_pStartCrsr = static_cast<SwPaM *>(_pStartCrsr->GetNext())) != - __pStartCrsr ); + } while( (_pStartCursor = static_cast<SwPaM *>(_pStartCursor->GetNext())) != + __pStartCursor ); GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, nullptr ); getIDocumentFieldsAccess().UnlockExpFields(); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 9bee9bf6d4c1..e05b5b6339da 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -104,7 +104,7 @@ using namespace ::com::sun::star; -#define DEF_FLY_WIDTH 2268 // Default width for FlyFrms (2268 == 4cm) +#define DEF_FLY_WIDTH 2268 // Default width for FlyFrames (2268 == 4cm) static bool lcl_IsItemSet(const SwContentNode & rNode, sal_uInt16 which) { @@ -261,7 +261,7 @@ SwFlyFrameFormat* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, if( SfxItemState::SET != pFormat->GetAttrSet().GetItemState( RES_FRM_SIZE )) { - SwFormatFrmSize aFormatSize( ATT_VAR_SIZE, 0, DEF_FLY_WIDTH ); + SwFormatFrameSize aFormatSize( ATT_VAR_SIZE, 0, DEF_FLY_WIDTH ); const SwNoTextNode* pNoTextNode = rNode.GetNoTextNode(); if( pNoTextNode ) { @@ -281,7 +281,7 @@ SwFlyFrameFormat* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, // Set up frames if( getIDocumentLayoutAccess().GetCurrentViewShell() ) - pFormat->MakeFrms(); // ??? + pFormat->MakeFrames(); // ??? if (GetIDocumentUndoRedo().DoesUndo()) { @@ -506,10 +506,10 @@ static bool lcl_TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos, return bOk; } -SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, +SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, bool bAsCharAlso ) const { - SwPosFlyFrms aRetval; + SwPosFlyFrames aRetval; // collect all anchored somehow to paragraphs for( auto pFly : *GetSpzFrameFormats() ) @@ -529,7 +529,7 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, if( pCmpRange && !lcl_TstFlyRange( pCmpRange, pAPos, rAnchor.GetAnchorId() )) continue; // not a valid FlyFrame - aRetval.insert(SwPosFlyFrmPtr(new SwPosFlyFrm(pAPos->nNode, pFly, aRetval.size()))); + aRetval.insert(SwPosFlyFramePtr(new SwPosFlyFrame(pAPos->nNode, pFly, aRetval.size()))); } } } @@ -541,7 +541,7 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, return aRetval; } - const SwPageFrm *pPage = static_cast<const SwPageFrm*>(getIDocumentLayoutAccess().GetCurrentLayout()->GetLower()); + const SwPageFrame *pPage = static_cast<const SwPageFrame*>(getIDocumentLayoutAccess().GetCurrentLayout()->GetLower()); while( pPage ) { if( pPage->GetSortedObjs() ) @@ -551,7 +551,7 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, { SwAnchoredObject* pAnchoredObj = rObjs[i]; SwFrameFormat *pFly; - if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr ) pFly = &(pAnchoredObj->GetFrameFormat()); else if ( bDrawAlso ) pFly = &(pAnchoredObj->GetFrameFormat()); @@ -563,28 +563,28 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, (FLY_AT_FLY != rAnchor.GetAnchorId()) && (FLY_AT_CHAR != rAnchor.GetAnchorId())) { - const SwContentFrm * pContentFrm = pPage->FindFirstBodyContent(); - if ( !pContentFrm ) + const SwContentFrame * pContentFrame = pPage->FindFirstBodyContent(); + if ( !pContentFrame ) { // Oops! An empty page. // In order not to lose the whole frame (RTF) we // look for the last Content before the page. - const SwPageFrm *pPrv = static_cast<const SwPageFrm*>(pPage->GetPrev()); - while ( !pContentFrm && pPrv ) + const SwPageFrame *pPrv = static_cast<const SwPageFrame*>(pPage->GetPrev()); + while ( !pContentFrame && pPrv ) { - pContentFrm = pPrv->FindFirstBodyContent(); - pPrv = static_cast<const SwPageFrm*>(pPrv->GetPrev()); + pContentFrame = pPrv->FindFirstBodyContent(); + pPrv = static_cast<const SwPageFrame*>(pPrv->GetPrev()); } } - if ( pContentFrm ) + if ( pContentFrame ) { - SwNodeIndex aIdx( *pContentFrm->GetNode() ); - aRetval.insert(SwPosFlyFrmPtr(new SwPosFlyFrm(aIdx, pFly, aRetval.size()))); + SwNodeIndex aIdx( *pContentFrame->GetNode() ); + aRetval.insert(SwPosFlyFramePtr(new SwPosFlyFrame(aIdx, pFly, aRetval.size()))); } } } } - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } return aRetval; @@ -717,8 +717,8 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, SwFrameFormat *pOldFormat = rDoc.GetNodes()[nNdIdx]->GetFlyFormat(); OSL_ENSURE( pOldFormat, "Couldn't find the Fly's Format." ); // #i115719# - // <title> and <description> attributes are lost when calling <DelFrms()>. - // Thus, keep them and restore them after the calling <MakeFrms()> + // <title> and <description> attributes are lost when calling <DelFrames()>. + // Thus, keep them and restore them after the calling <MakeFrames()> const bool bIsSwFlyFrameFormatInstance( dynamic_cast<SwFlyFrameFormat*>(pOldFormat) != nullptr ); const OUString sTitle( bIsSwFlyFrameFormatInstance ? static_cast<SwFlyFrameFormat*>(pOldFormat)->GetObjTitle() @@ -726,7 +726,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, const OUString sDescription( bIsSwFlyFrameFormatInstance ? static_cast<SwFlyFrameFormat*>(pOldFormat)->GetObjDescription() : OUString() ); - pOldFormat->DelFrms(); + pOldFormat->DelFrames(); pNewFormat = rDoc.MakeFlyFrameFormat( rDoc.GetUniqueFrameName(), rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool(RES_POOLFRM_FRAME) ); @@ -777,9 +777,9 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, pNewSet->Put( pOldFormat->GetAnchor() ); // The new one should be changeable in its height. - SwFormatFrmSize aFrmSize( pOldFormat->GetFrmSize() ); - aFrmSize.SetHeightSizeType( ATT_MIN_SIZE ); - pNewSet->Put( aFrmSize ); + SwFormatFrameSize aFrameSize( pOldFormat->GetFrameSize() ); + aFrameSize.SetHeightSizeType( ATT_MIN_SIZE ); + pNewSet->Put( aFrameSize ); SwStartNode* pSttNd = rDoc.GetNodes().MakeTextSection( SwNodeIndex( rDoc.GetNodes().GetEndOfAutotext() ), @@ -824,10 +824,10 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, pNewSet->Put( SwFormatVertOrient( 0, eVert ) ); pNewSet->Put( SwFormatHoriOrient( 0, text::HoriOrientation::CENTER ) ); - aFrmSize = pOldFormat->GetFrmSize(); - aFrmSize.SetWidthPercent(0); - aFrmSize.SetHeightPercent(SwFormatFrmSize::SYNCED); - pNewSet->Put( aFrmSize ); + aFrameSize = pOldFormat->GetFrameSize(); + aFrameSize.SetWidthPercent(0); + aFrameSize.SetHeightPercent(SwFormatFrameSize::SYNCED); + pNewSet->Put( aFrameSize ); // Hard-set the attributes, because they could come from the Template // and then size calculations could not be correct anymore. @@ -856,7 +856,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, // Have only the FlyFrames created. // We leave this to established methods (especially for InCntFlys). - pNewFormat->MakeFrms(); + pNewFormat->MakeFrames(); // #i115719# if ( bIsSwFlyFrameFormatInstance ) { @@ -1032,7 +1032,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable // Removing the frames of the drawing object changes its layer. const SdrLayerID nLayerId = rSdrObj.GetLayer(); - pOldFormat->DelFrms(); + pOldFormat->DelFrames(); // InContents need to be treated in a special way: // The TextAttribute needs to be destroyed. @@ -1072,8 +1072,8 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable // The new one should be variable in its height! Size aSz( rSdrObj.GetCurrentBoundRect().GetSize() ); - SwFormatFrmSize aFrmSize( ATT_MIN_SIZE, aSz.Width(), aSz.Height() ); - pNewSet->Put( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_MIN_SIZE, aSz.Width(), aSz.Height() ); + pNewSet->Put( aFrameSize ); // Apply the margin to the new Frame. // Don't set a border, use the one from the Template. @@ -1160,7 +1160,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable // Have only the FlyFrames created. // We leave this to established methods (especially for InCntFlys). - pNewFormat->MakeFrms(); + pNewFormat->MakeFrames(); OSL_ENSURE( pNew, "No Label inserted" ); @@ -1400,10 +1400,10 @@ void SwDoc::SetAllUniqueFlyNames() { sal_Int32 n, nFlyNum = 0, nGrfNum = 0, nOLENum = 0; - ResId nFrmId( STR_FRAME_DEFNAME, *pSwResMgr ), + ResId nFrameId( STR_FRAME_DEFNAME, *pSwResMgr ), nGrfId( STR_GRAPHIC_DEFNAME, *pSwResMgr ), nOLEId( STR_OBJECT_DEFNAME, *pSwResMgr ); - const OUString sFlyNm( nFrmId ); + const OUString sFlyNm( nFrameId ); const OUString sGrfNm( nGrfId ); const OUString sOLENm( nOLEId ); @@ -1584,7 +1584,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos, const SwFrameFormat* pFlyFormat = pNd->GetFlyFormat(); while( pFlyFormat ) { - pItem = &pFlyFormat->GetFrmDir(); + pItem = &pFlyFormat->GetFrameDir(); if( FRMDIR_ENVIRONMENT == pItem->GetValue() ) { pItem = nullptr; @@ -1606,7 +1606,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos, { const SwPageDesc* pPgDsc = pNd->FindPageDesc( false ); if( pPgDsc ) - pItem = &pPgDsc->GetMaster().GetFrmDir(); + pItem = &pPgDsc->GetMaster().GetFrameDir(); } } if( !pItem ) @@ -1623,9 +1623,9 @@ bool SwDoc::IsInVerticalText( const SwPosition& rPos, const Point* pPt ) const return FRMDIR_VERT_TOP_RIGHT == nDir || FRMDIR_VERT_TOP_LEFT == nDir; } -std::set<SwRootFrm*> SwDoc::GetAllLayouts() +std::set<SwRootFrame*> SwDoc::GetAllLayouts() { - std::set<SwRootFrm*> aAllLayouts; + std::set<SwRootFrame*> aAllLayouts; SwViewShell *pStart = getIDocumentLayoutAccess().GetCurrentViewShell(); if(pStart) { diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 076ca699fc99..9f44b12502ac 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -317,7 +317,7 @@ SwDoc::SwDoc() getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_STANDARD ); // Set to "Empty Page" - mpEmptyPageFormat->SetFormatAttr( SwFormatFrmSize( ATT_FIX_SIZE ) ); + mpEmptyPageFormat->SetFormatAttr( SwFormatFrameSize( ATT_FIX_SIZE ) ); // Set BodyFormat for columns mpColumnContFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT ) ); @@ -424,7 +424,7 @@ SwDoc::~SwDoc() getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAndDestroyAll(); const sw::DocDisposingHint aHint; - for(const auto& pWeakCursor : mvUnoCrsrTable) + for(const auto& pWeakCursor : mvUnoCursorTable) { auto pCursor(pWeakCursor.lock()); if(pCursor) @@ -479,7 +479,7 @@ SwDoc::~SwDoc() } delete mpDefTOXBases; - // Any of the FrmFormats can still have indices registered. + // Any of the FrameFormats can still have indices registered. // These need to be destroyed now at the latest. for( SwFrameFormat* pFormat : *mpFrameFormatTable ) lcl_DelFormatIndices( pFormat ); diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 5b44797f25bd..e60d415fc226 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1111,10 +1111,10 @@ void SwDoc::StopNumRuleAnimations( OutputDevice* pOut ) aTextNodeIter != aTextNodeList.end(); ++aTextNodeIter ) { SwTextNode* pTNd = *aTextNodeIter; - SwIterator<SwTextFrm,SwTextNode> aIter(*pTNd); - for(SwTextFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) - if( pFrm->HasAnimation() ) - pFrm->StopAnimation( pOut ); + SwIterator<SwTextFrame,SwTextNode> aIter(*pTNd); + for(SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) + if( pFrame->HasAnimation() ) + pFrame->StopAnimation( pOut ); } } } diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 0d0c18b83db8..0bb6e4ad18b7 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -48,14 +48,14 @@ using namespace ::com::sun::star::i18n; sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList, sal_uInt16 nMode ) { - const SwPaM *_pStartCrsr = rPam.GetNext(), - *__pStartCrsr = _pStartCrsr; - bool bCheckEmpty = &rPam != _pStartCrsr; + const SwPaM *_pStartCursor = rPam.GetNext(), + *__pStartCursor = _pStartCursor; + bool bCheckEmpty = &rPam != _pStartCursor; do { - const SwPosition* pStt = _pStartCrsr->Start(), - * pEnd = pStt == _pStartCrsr->GetPoint() - ? _pStartCrsr->GetMark() - : _pStartCrsr->GetPoint(); + const SwPosition* pStt = _pStartCursor->Start(), + * pEnd = pStt == _pStartCursor->GetPoint() + ? _pStartCursor->GetMark() + : _pStartCursor->GetPoint(); if( !bCheckEmpty || ( pStt != pEnd && *pStt != *pEnd )) { SwPaM aPam( *pStt ); @@ -85,7 +85,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList, } while( 30 > rList.size() && *aPam.GetPoint() < *pEnd ); } } while( 30 > rList.size() && - (_pStartCrsr = _pStartCrsr->GetNext()) != __pStartCrsr ); + (_pStartCursor = _pStartCursor->GetNext()) != __pStartCursor ); return rList.size(); } @@ -99,14 +99,14 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, sal_uInt16 nListEntry = 0; - const SwPaM *_pStartCrsr = rPam.GetNext(), - *__pStartCrsr = _pStartCrsr; - bool bCheckEmpty = &rPam != _pStartCrsr; + const SwPaM *_pStartCursor = rPam.GetNext(), + *__pStartCursor = _pStartCursor; + bool bCheckEmpty = &rPam != _pStartCursor; do { - const SwPosition* pStt = _pStartCrsr->Start(), - * pEnd = pStt == _pStartCrsr->GetPoint() - ? _pStartCrsr->GetMark() - : _pStartCrsr->GetPoint(); + const SwPosition* pStt = _pStartCursor->Start(), + * pEnd = pStt == _pStartCursor->GetPoint() + ? _pStartCursor->GetMark() + : _pStartCursor->GetPoint(); if( !bCheckEmpty || ( pStt != pEnd && *pStt != *pEnd )) { @@ -172,7 +172,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, } while( nListEntry < rList.size() && *aPam.GetPoint() < *pEnd ); } } while( 30 > rList.size() && - (_pStartCrsr = _pStartCrsr->GetNext()) != __pStartCrsr ); + (_pStartCursor = _pStartCursor->GetNext()) != __pStartCursor ); GetIDocumentUndoRedo().EndUndo( UNDO_SETRUBYATTR, nullptr ); diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 4619226d5c61..520500047ef9 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -532,12 +532,12 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) // Delete HTML layout pTableNd->GetTable().SetHTMLTableLayout( nullptr ); - // #i37739# A simple 'MakeFrms' after the node sorting + // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. SwNode2Layout aNode2Layout( *pTableNd ); // Delete the Table's Frames - pTableNd->DelFrms(); + pTableNd->DelFrames(); // ? TL_CHART2: ? SwUndoSort* pUndoSort = nullptr; @@ -581,10 +581,10 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) } // Restore table frames: - // #i37739# A simple 'MakeFrms' after the node sorting + // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. const sal_uLong nIdx = pTableNd->GetIndex(); - aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 ); + aNode2Layout.RestoreUpperFrames( GetNodes(), nIdx, nIdx + 1 ); // TL_CHART2: need to inform chart of probably changed cell names UpdateCharts( pTableNd->GetTable().GetFrameFormat()->GetName() ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 3508b079f9ce..1ddc0cad9558 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -242,11 +242,11 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark, continue; Point aPt; - const SwContentFrm* pCFrm = pTOXSrc->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - if (!pCFrm) + const SwContentFrame* pCFrame = pTOXSrc->getLayoutFrame( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + if (!pCFrame) continue; - if ( bInReadOnly || !pCFrm->IsProtected() ) + if ( bInReadOnly || !pCFrame->IsProtected() ) { CompareNodeContent aAbsNew( pTOXSrc->GetIndex(), pMark->GetStart() ); switch( eDir ) @@ -692,12 +692,12 @@ static const SwTextNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl // then find the "Anchor" (Body) position Point aPt; SwNode2Layout aNode2Layout( *pNd, pNd->GetIndex() ); - const SwFrm* pFrm = aNode2Layout.GetFrm( &aPt, nullptr, false ); + const SwFrame* pFrame = aNode2Layout.GetFrame( &aPt, nullptr, false ); - if( pFrm ) + if( pFrame ) { SwPosition aPos( *pNd ); - pNd = GetBodyTextNode( *pNd->GetDoc(), aPos, *pFrm ); + pNd = GetBodyTextNode( *pNd->GetDoc(), aPos, *pFrame ); OSL_ENSURE( pNd, "Where's the paragraph?" ); } } @@ -842,7 +842,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, : nullptr; SwNode2Layout aN2L( *pSectNd ); - const_cast<SwSectionNode*>(pSectNd)->DelFrms(); + const_cast<SwSectionNode*>(pSectNd)->DelFrames(); // remove old content an insert one empty textnode (to hold the layout!) SwTextNode* pFirstEmptyNd; @@ -1021,11 +1021,11 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, if(nIdx + 2 < pSectNd->EndOfSectionIndex()) pDoc->GetNodes().Delete( aInsPos ); - aN2L.RestoreUpperFrms( pDoc->GetNodes(), nIdx, nIdx + 1 ); - std::set<SwRootFrm*> aAllLayouts = pDoc->GetAllLayouts(); - for ( std::set<SwRootFrm*>::iterator pLayoutIter = aAllLayouts.begin(); pLayoutIter != aAllLayouts.end(); ++pLayoutIter) + aN2L.RestoreUpperFrames( pDoc->GetNodes(), nIdx, nIdx + 1 ); + std::set<SwRootFrame*> aAllLayouts = pDoc->GetAllLayouts(); + for ( std::set<SwRootFrame*>::iterator pLayoutIter = aAllLayouts.begin(); pLayoutIter != aAllLayouts.end(); ++pLayoutIter) { - SwFrm::CheckPageDescs( static_cast<SwPageFrm*>((*pLayoutIter)->Lower()) ); + SwFrame::CheckPageDescs( static_cast<SwPageFrame*>((*pLayoutIter)->Lower()) ); } SetProtect( SwTOXBase::IsProtected() ); @@ -1149,7 +1149,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl, // If selected use marks from the same chapter only if( pTOXSrc->GetNodes().IsDocNodes() && pTOXSrc->GetText().getLength() && pTOXSrc->HasWriterListeners() && - pTOXSrc->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && + pTOXSrc->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && (!IsFromChapter() || ::lcl_FindChapterNode( *pTOXSrc ) == pOwnChapterNode ) && !pTOXSrc->HasHiddenParaField() && !SwScriptInfo::IsInHiddenRange( *pTOXSrc, pTextMark->GetStart() ) ) @@ -1207,7 +1207,7 @@ void SwTOXBaseSection::UpdateOutline( const SwTextNode* pOwnChapterNode ) SwTextNode* pTextNd = pOutlineNode->GetTextNode(); if( pTextNd && pTextNd->Len() && pTextNd->HasWriterListeners() && sal_uInt16( pTextNd->GetAttrOutlineLevel()) <= GetLevel() && - pTextNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && + pTextNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && !pTextNd->HasHiddenParaField() && !pTextNd->HasHiddenCharAttribute( true ) && ( !IsFromChapter() || @@ -1247,7 +1247,7 @@ void SwTOXBaseSection::UpdateTemplate( const SwTextNode* pOwnChapterNode ) ::SetProgressState( 0, pDoc->GetDocShell() ); if (pTextNd->GetText().getLength() && - pTextNd->getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && + pTextNd->getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && pTextNd->GetNodes().IsDocNodes() && ( !IsFromChapter() || pOwnChapterNode == ::lcl_FindChapterNode( *pTextNd ) ) ) @@ -1278,7 +1278,7 @@ void SwTOXBaseSection::UpdateSequence( const SwTextNode* pOwnChapterNode ) ::SetProgressState( 0, pDoc->GetDocShell() ); if (rTextNode.GetText().getLength() && - rTextNode.getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && + rTextNode.getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && rTextNode.GetNodes().IsDocNodes() && ( !IsFromChapter() || ::lcl_FindChapterNode( rTextNode ) == pOwnChapterNode ) ) @@ -1321,15 +1321,15 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl ) ::SetProgressState( 0, pDoc->GetDocShell() ); if (rTextNode.GetText().getLength() && - rTextNode.getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && + rTextNode.getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && rTextNode.GetNodes().IsDocNodes() ) { //#106485# the body node has to be used! - SwContentFrm *pFrm = rTextNode.getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwContentFrame *pFrame = rTextNode.getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); SwPosition aFieldPos(rTextNode); const SwTextNode* pTextNode = nullptr; - if(pFrm && !pFrm->IsInDocBody()) - pTextNode = GetBodyTextNode( *pDoc, aFieldPos, *pFrm ); + if(pFrame && !pFrame->IsInDocBody()) + pTextNode = GetBodyTextNode( *pDoc, aFieldPos, *pFrame ); if(!pTextNode) pTextNode = &rTextNode; SwTOXAuthority* pNew = new SwTOXAuthority( *pTextNode, *pFormatField, rIntl ); @@ -1473,7 +1473,7 @@ void SwTOXBaseSection::UpdateContent( SwTOXElement eMyType, } } - if( pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && ( !IsFromChapter() || + if( pCNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && ( !IsFromChapter() || ::lcl_FindChapterNode( *pCNd ) == pOwnChapterNode )) { SwTOXPara * pNew = new SwTOXPara( *pCNd, eMyType, @@ -1511,7 +1511,7 @@ void SwTOXBaseSection::UpdateTable( const SwTextNode* pOwnChapterNode ) while( nullptr != ( pCNd = rNds.GoNext( &aContentIdx ) ) && aContentIdx.GetIndex() < pTableNd->EndOfSectionIndex() ) { - if( pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && (!IsFromChapter() || + if( pCNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && (!IsFromChapter() || ::lcl_FindChapterNode( *pCNd ) == pOwnChapterNode )) { SwTOXTable * pNew = new SwTOXTable( *pCNd ); @@ -1543,7 +1543,7 @@ void SwTOXBaseSection::UpdatePageNum() return ; // Insert the current PageNumber into the TOC - SwPageFrm* pAktPage = nullptr; + SwPageFrame* pAktPage = nullptr; sal_uInt16 nPage = 0; SwDoc* pDoc = GetFormat()->GetDoc(); @@ -1589,20 +1589,20 @@ void SwTOXBaseSection::UpdatePageNum() SwTOXSource& rTOXSource = pSortBase->aTOXSources[j]; if( rTOXSource.pNd ) { - SwContentFrm* pFrm = rTOXSource.pNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); - OSL_ENSURE( pFrm || pDoc->IsUpdateTOX(), "TOX, no Frame found"); - if( !pFrm ) + SwContentFrame* pFrame = rTOXSource.pNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + OSL_ENSURE( pFrame || pDoc->IsUpdateTOX(), "TOX, no Frame found"); + if( !pFrame ) continue; - if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->HasFollow() ) + if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->HasFollow() ) { // find the right one - SwTextFrm* pNext; - while( nullptr != ( pNext = static_cast<SwTextFrm*>(pFrm->GetFollow()) ) + SwTextFrame* pNext; + while( nullptr != ( pNext = static_cast<SwTextFrame*>(pFrame->GetFollow()) ) && rTOXSource.nPos >= pNext->GetOfst() ) - pFrm = pNext; + pFrame = pNext; } - SwPageFrm* pTmpPage = pFrm->FindPageFrm(); + SwPageFrame* pTmpPage = pFrame->FindPageFrame(); if( pTmpPage != pAktPage ) { nPage = pTmpPage->GetVirtPageNum(); diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index 2b54c13a72c7..4731017be4f8 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -170,8 +170,8 @@ void SwFootnoteIdxs::UpdateAllFootnote() SwUpdFootnoteEndNtAtEnd aNumArr; - SwRootFrm* pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); - std::set<SwRootFrm*> aAllLayouts = pDoc->GetAllLayouts(); + SwRootFrame* pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + std::set<SwRootFrame*> aAllLayouts = pDoc->GetAllLayouts(); // For normal Footnotes per-chapter and per-document numbering are treated separately. // For Endnotes we only have document-wise numbering. if( FTNNUM_CHAPTER == rFootnoteInfo.eNum ) diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index ecff26464812..e18e74d60744 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -319,12 +319,12 @@ void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol, SwFrameFormat *pFrameFormat = pBox->GetFrameFormat(); // calculate the box's width - SwTwips nFrmWidth = 0; + SwTwips nFrameWidth = 0; while( nColSpan-- ) - nFrmWidth += GetColumn( nCol++ )->GetRelColWidth(); + nFrameWidth += GetColumn( nCol++ )->GetRelColWidth(); // and reset - pFrameFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nFrmWidth, 0 )); + pFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nFrameWidth, 0 )); } void SwHTMLTableLayout::GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, @@ -354,12 +354,12 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByVisArea( const SwDoc& rDoc ) sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc ) { // If we have a layout, we can get the width from there. - const SwRootFrm *pRootFrm = rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); - if( pRootFrm ) + const SwRootFrame *pRootFrame = rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + if( pRootFrame ) { - const SwFrm *pPageFrm = pRootFrm->GetLower(); - if( pPageFrm ) - return (sal_uInt16)pPageFrm->Prt().Width(); + const SwFrame *pPageFrame = pRootFrame->GetLower(); + if( pPageFrame ) + return (sal_uInt16)pPageFrame->Prt().Width(); } // #i91658# @@ -369,21 +369,21 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc ) return GetBrowseWidthByVisArea( rDoc ); } -sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrm( - const SwTabFrm& rTabFrm ) const +sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrame( + const SwTabFrame& rTabFrame ) const { SwTwips nWidth = 0; - const SwFrm *pUpper = rTabFrm.GetUpper(); - if( MayBeInFlyFrame() && pUpper->IsFlyFrm() && - static_cast<const SwFlyFrm *>(pUpper)->GetAnchorFrm() ) + const SwFrame *pUpper = rTabFrame.GetUpper(); + if( MayBeInFlyFrame() && pUpper->IsFlyFrame() && + static_cast<const SwFlyFrame *>(pUpper)->GetAnchorFrame() ) { // If the table is located within a self-created frame, the anchor's // width is relevant not the frame's width. // For paragraph-bound frames we don't respect paragraph indents. - const SwFrm *pAnchor = static_cast<const SwFlyFrm *>(pUpper)->GetAnchorFrm(); - if( pAnchor->IsTextFrm() ) - nWidth = pAnchor->Frm().Width(); + const SwFrame *pAnchor = static_cast<const SwFlyFrame *>(pUpper)->GetAnchorFrame(); + if( pAnchor->IsTextFrame() ) + nWidth = pAnchor->Frame().Width(); else nWidth = pAnchor->Prt().Width(); } @@ -395,7 +395,7 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrm( SwTwips nUpperDummy = 0; long nRightOffset = 0, nLeftOffset = 0; - rTabFrm.CalcFlyOffsets( nUpperDummy, nLeftOffset, nRightOffset ); + rTabFrame.CalcFlyOffsets( nUpperDummy, nLeftOffset, nRightOffset ); nWidth -= (nLeftOffset + nRightOffset); return nWidth < USHRT_MAX ? static_cast<sal_uInt16>(nWidth) : USHRT_MAX; @@ -404,10 +404,10 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrm( sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTable( const SwDoc& rDoc ) const { sal_uInt16 nBrowseWidth = 0; - SwTabFrm* pFrm = SwIterator<SwTabFrm,SwFormat>( *m_pSwTable->GetFrameFormat() ).First(); - if( pFrm ) + SwTabFrame* pFrame = SwIterator<SwTabFrame,SwFormat>( *m_pSwTable->GetFrameFormat() ).First(); + if( pFrame ) { - nBrowseWidth = GetBrowseWidthByTabFrm( *pFrm ); + nBrowseWidth = GetBrowseWidthByTabFrame( *pFrame ); } else { @@ -1573,12 +1573,12 @@ static void lcl_ResizeBox( const SwTableBox* pBox, sal_uInt16* pWidth ) sal_uInt16 nWidth = 0; for( const SwTableLine *pLine : pBox->GetTabLines() ) lcl_ResizeLine( pLine, &nWidth ); - pBox->GetFrameFormat()->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth, 0 )); + pBox->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 )); *pWidth = *pWidth + nWidth; } else { - *pWidth = *pWidth + (sal_uInt16)pBox->GetFrameFormat()->GetFrmSize().GetSize().Width(); + *pWidth = *pWidth + (sal_uInt16)pBox->GetFrameFormat()->GetFrameSize().GetSize().Width(); } } @@ -1667,12 +1667,12 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail, // Also, we need to preserve a percent setting if it exists. SwFrameFormat *pFrameFormat = m_pSwTable->GetFrameFormat(); const_cast<SwTable *>(m_pSwTable)->LockModify(); - SwFormatFrmSize aFrmSize( pFrameFormat->GetFrmSize() ); - aFrmSize.SetWidth( m_nRelTabWidth ); + SwFormatFrameSize aFrameSize( pFrameFormat->GetFrameSize() ); + aFrameSize.SetWidth( m_nRelTabWidth ); bool bRel = m_bUseRelWidth && text::HoriOrientation::FULL!=pFrameFormat->GetHoriOrient().GetHoriOrient(); - aFrmSize.SetWidthPercent( (sal_uInt8)(bRel ? m_nWidthOption : 0) ); - pFrameFormat->SetFormatAttr( aFrmSize ); + aFrameSize.SetWidthPercent( (sal_uInt8)(bRel ? m_nWidthOption : 0) ); + pFrameFormat->SetFormatAttr( aFrameSize ); const_cast<SwTable *>(m_pSwTable)->UnlockModify(); // If the table is located in a frame, we also need to adapt the @@ -1682,23 +1682,23 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail, SwFrameFormat *pFlyFrameFormat = FindFlyFrameFormat(); if( pFlyFrameFormat ) { - SwFormatFrmSize aFlyFrmSize( ATT_VAR_SIZE, m_nRelTabWidth, MINLAY ); + SwFormatFrameSize aFlyFrameSize( ATT_VAR_SIZE, m_nRelTabWidth, MINLAY ); if( m_bUseRelWidth ) { // For percentage settings we set the width to the minimum. - aFlyFrmSize.SetWidth( m_nMin > USHRT_MAX ? USHRT_MAX + aFlyFrameSize.SetWidth( m_nMin > USHRT_MAX ? USHRT_MAX : m_nMin ); - aFlyFrmSize.SetWidthPercent( (sal_uInt8)m_nWidthOption ); + aFlyFrameSize.SetWidthPercent( (sal_uInt8)m_nWidthOption ); } - pFlyFrameFormat->SetFormatAttr( aFlyFrmSize ); + pFlyFrameFormat->SetFormatAttr( aFlyFrameSize ); } } #ifdef DBG_UTIL { // check if the tables have correct widths - SwTwips nSize = m_pSwTable->GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nSize = m_pSwTable->GetFrameFormat()->GetFrameSize().GetWidth(); const SwTableLines& rLines = m_pSwTable->GetTabLines(); for (size_t n = 0; n < rLines.size(); ++n) { @@ -1713,12 +1713,12 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail, if( m_pLeftFillerBox ) { m_pLeftFillerBox->GetFrameFormat()->SetFormatAttr( - SwFormatFrmSize( ATT_VAR_SIZE, m_nRelLeftFill, 0 )); + SwFormatFrameSize( ATT_VAR_SIZE, m_nRelLeftFill, 0 )); } if( m_pRightFillerBox ) { m_pRightFillerBox->GetFrameFormat()->SetFormatAttr( - SwFormatFrmSize( ATT_VAR_SIZE, m_nRelRightFill, 0 )); + SwFormatFrameSize( ATT_VAR_SIZE, m_nRelRightFill, 0 )); } } } @@ -1730,7 +1730,7 @@ void SwHTMLTableLayout::_Resize( sal_uInt16 nAbsAvail, bool bRecalc ) if( bRecalc ) AutoLayoutPass1(); - SwRootFrm *pRoot = GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell()->GetLayout(); + SwRootFrame *pRoot = GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell()->GetLayout(); if ( pRoot && pRoot->IsCallbackActionEnabled() ) pRoot->StartAllAction(); diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx index 1e736cf00187..3413a4a6ab0d 100644 --- a/sw/source/core/doc/lineinfo.cxx +++ b/sw/source/core/doc/lineinfo.cxx @@ -30,7 +30,7 @@ void SwDoc::SetLineNumberInfo( const SwLineNumberInfo &rNew ) { - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if ( pTmpRoot && (rNew.IsCountBlankLines() != mpLineNumberInfo->IsCountBlankLines() || rNew.IsRestartEachPage() != mpLineNumberInfo->IsRestartEachPage()) ) @@ -136,7 +136,7 @@ void SwLineNumberInfo::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew { CheckRegistration( pOld, pNew ); SwDoc *pDoc = static_cast<SwCharFormat*>(GetRegisteredIn())->GetDoc(); - SwRootFrm* pRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); if( pRoot ) { pRoot->StartAllAction(); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 9bb0bdebf891..4267bca0362f 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -94,7 +94,7 @@ inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText ) } static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, - const SwViewShell &rSh, const SwNoTextFrm *pFrm, + const SwViewShell &rSh, const SwNoTextFrame *pFrame, bool bDefect ) { static vcl::Font *pFont = nullptr; @@ -110,7 +110,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, Color aCol( COL_RED ); FontUnderline eUnderline = UNDERLINE_NONE; - const SwFormatURL &rURL = pFrm->FindFlyFrm()->GetFormat()->GetURL(); + const SwFormatURL &rURL = pFrame->FindFlyFrame()->GetFormat()->GetURL(); if( !rURL.GetURL().isEmpty() || rURL.GetMap() ) { bool bVisited = false; @@ -143,31 +143,31 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, Graphic::DrawEx( rSh.GetOut(), rText, *pFont, rBmp, rRect.Pos(), rRect.SSize() ); } -SwNoTextFrm::SwNoTextFrm(SwNoTextNode * const pNode, SwFrm* pSib ) - : SwContentFrm( pNode, pSib ) +SwNoTextFrame::SwNoTextFrame(SwNoTextNode * const pNode, SwFrame* pSib ) + : SwContentFrame( pNode, pSib ) { InitCtor(); } /// Initialization: Currently add the Frame to the Cache -void SwNoTextFrm::InitCtor() +void SwNoTextFrame::InitCtor() { - mnFrmType = FRM_NOTXT; + mnFrameType = FRM_NOTXT; } -SwContentFrm *SwNoTextNode::MakeFrm( SwFrm* pSib ) +SwContentFrame *SwNoTextNode::MakeFrame( SwFrame* pSib ) { - return new SwNoTextFrm(this, pSib); + return new SwNoTextFrame(this, pSib); } -void SwNoTextFrm::DestroyImpl() +void SwNoTextFrame::DestroyImpl() { StopAnimation(); - SwContentFrm::DestroyImpl(); + SwContentFrame::DestroyImpl(); } -SwNoTextFrm::~SwNoTextFrm() +SwNoTextFrame::~SwNoTextFrame() { } @@ -176,7 +176,7 @@ void SetOutDev( SwViewShell *pSh, OutputDevice *pOut ) pSh->mpOut = pOut; } -static void lcl_ClearArea( const SwFrm &rFrm, +static void lcl_ClearArea( const SwFrame &rFrame, vcl::RenderContext &rOut, const SwRect& rPtArea, const SwRect &rGrfArea ) { @@ -190,7 +190,7 @@ static void lcl_ClearArea( const SwFrm &rFrm, //UUUU drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; - if ( rFrm.GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigRect, false ) ) + if ( rFrame.GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigRect, false ) ) { SwRegionRects const region(rPtArea); const bool bDone(::DrawFillAttributes(aFillAttributes, aOrigRect, region, rOut)); @@ -206,7 +206,7 @@ static void lcl_ClearArea( const SwFrm &rFrm, else { rOut.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); - rOut.SetFillColor( rFrm.getRootFrm()->GetCurrShell()->Imp()->GetRetoucheColor()); + rOut.SetFillColor( rFrame.getRootFrame()->GetCurrShell()->Imp()->GetRetoucheColor()); rOut.SetLineColor(); for( const auto &rRegion : aRegion ) rOut.DrawRect( rRegion.SVRect() ); @@ -215,12 +215,12 @@ static void lcl_ClearArea( const SwFrm &rFrm, } } -void SwNoTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { - if ( Frm().IsEmpty() ) + if ( Frame().IsEmpty() ) return; - const SwViewShell* pSh = getRootFrm()->GetCurrShell(); + const SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( !pSh->GetViewOptions()->IsGraphic() ) { StopAnimation(); @@ -232,8 +232,8 @@ void SwNoTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, if ( aText.isEmpty() && pNd->IsGrfNode() ) GetRealURL( *static_cast<const SwGrfNode*>(pNd), aText ); if( aText.isEmpty() ) - aText = FindFlyFrm()->GetFormat()->GetName(); - lcl_PaintReplacement( Frm(), aText, *pSh, this, false ); + aText = FindFlyFrame()->GetFormat()->GetName(); + lcl_PaintReplacement( Frame(), aText, *pSh, this, false ); } return; } @@ -255,11 +255,11 @@ void SwNoTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, pGrfNd->SetFrameInPaint( true ); // #i13147# - add 2nd parameter with value <true> to - // method call <FindFlyFrm().GetContour(..)> to indicate that it is called + // method call <FindFlyFrame().GetContour(..)> to indicate that it is called // for paint in order to avoid load of the intrinsic graphic. if ( ( !rRenderContext.GetConnectMetaFile() || !pSh->GetWin() ) && - FindFlyFrm()->GetContour( aPoly, true ) + FindFlyFrame()->GetContour( aPoly, true ) ) { rRenderContext.SetClipRegion(vcl::Region(aPoly)); @@ -269,24 +269,24 @@ void SwNoTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwRect aOrigPaint( rRect ); if ( HasAnimation() && pSh->GetWin() ) { - aOrigPaint = Frm(); aOrigPaint += Prt().Pos(); + aOrigPaint = Frame(); aOrigPaint += Prt().Pos(); } - SwRect aGrfArea( Frm() ); + SwRect aGrfArea( Frame() ); SwRect aPaintArea( aGrfArea ); // In case the picture fly frm was clipped, render it with the origin // size instead of scaling it if ( rNoTNd.getIDocumentSettingAccess()->get( DocumentSettingId::CLIPPED_PICTURES ) ) { - const SwFlyFreeFrm *pFly = dynamic_cast< const SwFlyFreeFrm* >( FindFlyFrm() ); + const SwFlyFreeFrame *pFly = dynamic_cast< const SwFlyFreeFrame* >( FindFlyFrame() ); if( pFly ) - aGrfArea = SwRect( Frm().Pos( ), pFly->GetUnclippedFrm( ).SSize( ) ); + aGrfArea = SwRect( Frame().Pos( ), pFly->GetUnclippedFrame( ).SSize( ) ); } aPaintArea._Intersection( aOrigPaint ); - SwRect aNormal( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + SwRect aNormal( Frame().Pos() + Prt().Pos(), Prt().SSize() ); aNormal.Justify(); // Normalized rectangle for the comparisons if( aPaintArea.IsOver( aNormal ) ) @@ -336,7 +336,7 @@ static void lcl_CalcRect( Point& rPt, Size& rDim, sal_uInt16 nMirror ) } /** Calculate the Bitmap's position and the size within the passed rectangle */ -void SwNoTextFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, +void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, bool ) const { // Currently only used for scaling, cropping and mirroring the contour of graphics! @@ -351,7 +351,7 @@ void SwNoTextFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, if( rAttrSet.GetMirrorGrf().IsGrfToggle() ) { - if( !(FindPageFrm()->GetVirtPageNum() % 2) ) + if( !(FindPageFrame()->GetVirtPageNum() % 2) ) { switch ( nMirror ) { @@ -414,7 +414,7 @@ void SwNoTextFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, Size aVisSz( Prt().SSize() ); Size aGrfSz( aVisSz ); - Point aVisPt( Frm().Pos() + Prt().Pos() ); + Point aVisPt( Frame().Pos() + Prt().Pos() ); Point aGrfPt( aVisPt ); // Set the "visible" rectangle first @@ -454,19 +454,19 @@ void SwNoTextFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, } /** By returning the surrounding Fly's size which equals the graphic's size */ -const Size& SwNoTextFrm::GetSize() const +const Size& SwNoTextFrame::GetSize() const { // Return the Frame's size - const SwFrm *pFly = FindFlyFrm(); + const SwFrame *pFly = FindFlyFrame(); if( !pFly ) pFly = this; return pFly->Prt().SSize(); } -void SwNoTextFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) +void SwNoTextFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) { SwContentNotify aNotify( this ); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), this ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); const SwBorderAttrs &rAttrs = *aAccess.Get(); while ( !mbValidPos || !mbValidSize || !mbValidPrtArea ) @@ -474,19 +474,19 @@ void SwNoTextFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) MakePos(); if ( !mbValidSize ) - Frm().Width( GetUpper()->Prt().Width() ); + Frame().Width( GetUpper()->Prt().Width() ); MakePrtArea( rAttrs ); if ( !mbValidSize ) { mbValidSize = true; - Format(getRootFrm()->GetCurrShell()->GetOut()); + Format(getRootFrame()->GetCurrShell()->GetOut()); } } } /** Calculate the Bitmap's site, if needed */ -void SwNoTextFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) +void SwNoTextFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) { const Size aNewSize( GetSize() ); @@ -500,16 +500,16 @@ void SwNoTextFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder Shrink( std::min(Prt().Height(), -nChgHght) ); } -bool SwNoTextFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos, - SwCrsrMoveState *pCMS ) const +bool SwNoTextFrame::GetCharRect( SwRect &rRect, const SwPosition& rPos, + SwCursorMoveState *pCMS ) const { if ( &rPos.nNode.GetNode() != static_cast<SwNode const *>(GetNode()) ) return false; - Calc(getRootFrm()->GetCurrShell()->GetOut()); - SwRect aFrameRect( Frm() ); + Calc(getRootFrame()->GetCurrShell()->GetOut()); + SwRect aFrameRect( Frame() ); rRect = aFrameRect; - rRect.Pos( Frm().Pos() + Prt().Pos() ); + rRect.Pos( Frame().Pos() + Prt().Pos() ); rRect.SSize( Prt().SSize() ); rRect.Justify(); @@ -536,8 +536,8 @@ bool SwNoTextFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos, return true; } -bool SwNoTextFrm::GetCrsrOfst(SwPosition* pPos, Point& , - SwCrsrMoveState*, bool ) const +bool SwNoTextFrame::GetCursorOfst(SwPosition* pPos, Point& , + SwCursorMoveState*, bool ) const { SwContentNode* pCNd = const_cast<SwContentNode*>(GetNode()); pPos->nNode = *pCNd; @@ -546,26 +546,26 @@ bool SwNoTextFrm::GetCrsrOfst(SwPosition* pPos, Point& , } #define CLEARCACHE {\ - SwFlyFrm* pFly = FindFlyFrm();\ + SwFlyFrame* pFly = FindFlyFrame();\ if( pFly && pFly->GetFormat()->GetSurround().IsContour() )\ {\ ClrContourCache( pFly->GetVirtDrawObj() );\ - pFly->NotifyBackground( FindPageFrm(), Prt(), PREP_FLY_ATTR_CHG );\ + pFly->NotifyBackground( FindPageFrame(), Prt(), PREP_FLY_ATTR_CHG );\ }\ } -void SwNoTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { sal_uInt16 nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0; // #i73788# - // no <SwContentFrm::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED + // no <SwContentFrame::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED if ( RES_GRAPHIC_PIECE_ARRIVED != nWhich && RES_GRAPHIC_ARRIVED != nWhich && RES_GRF_REREAD_AND_INCACHE != nWhich && RES_LINKED_GRAPHIC_STREAM_ARRIVED != nWhich ) { - SwContentFrm::Modify( pOld, pNew ); + SwContentFrame::Modify( pOld, pNew ); } bool bComplete = true; @@ -594,9 +594,9 @@ void SwNoTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) if( rShell.GetWin() ) { if( rShell.IsPreview() ) - ::RepaintPagePreview( &rShell, Frm().SVRect() ); + ::RepaintPagePreview( &rShell, Frame().SVRect() ); else - rShell.GetWin()->Invalidate( Frm().SVRect() ); + rShell.GetWin()->Invalidate( Frame().SVRect() ); } } } @@ -639,7 +639,7 @@ void SwNoTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) CLEARCACHE - SwRect aRect( Frm() ); + SwRect aRect( Frame() ); SwViewShell *pVSh = pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); if( !pVSh ) @@ -831,9 +831,9 @@ void paintGraphicUsingPrimitivesHelper(vcl::RenderContext & rOutputDevice, @todo use aligned rectangle for drawing graphic. @todo pixel-align coordinations for drawing graphic. */ -void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea ) const +void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea ) const { - SwViewShell* pShell = getRootFrm()->GetCurrShell(); + SwViewShell* pShell = getRootFrame()->GetCurrShell(); SwNoTextNode& rNoTNd = const_cast<SwNoTextNode&>(*static_cast<const SwNoTextNode*>(GetNode())); SwGrfNode* pGrfNd = rNoTNd.GetGrfNode(); @@ -923,10 +923,10 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea pShell->GetWin(); if( bAnimate && - FindFlyFrm() != ::GetFlyFromMarked( nullptr, pShell )) + FindFlyFrame() != ::GetFlyFromMarked( nullptr, pShell )) { OutputDevice* pVout; - if( pOut == pShell->GetOut() && SwRootFrm::FlushVout() ) + if( pOut == pShell->GetOut() && SwRootFrame::FlushVout() ) pVout = pOut, pOut = pShell->GetOut(); else if( pShell->GetWin() && OUTDEV_VIRDEV == pOut->GetOutDevType() ) @@ -1041,13 +1041,13 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea ::svt::EmbeddedObjectRef::DrawPaintReplacement( Rectangle( aPosition, aSize ), pOLENd->GetOLEObj().GetCurrentPersistName(), pOut ); sal_Int64 nMiscStatus = pOLENd->GetOLEObj().GetOleRef()->getStatus( pOLENd->GetAspect() ); - if ( !bPrn && dynamic_cast< const SwCrsrShell *>( pShell ) != nullptr && ( + if ( !bPrn && dynamic_cast< const SwCursorShell *>( pShell ) != nullptr && ( (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) || pOLENd->GetOLEObj().GetObject().IsGLChart())) { - const SwFlyFrm *pFly = FindFlyFrm(); + const SwFlyFrame *pFly = FindFlyFrame(); assert( pFly != nullptr ); - static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frm()); + static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frame()); } } @@ -1059,9 +1059,9 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea } } -bool SwNoTextFrm::IsTransparent() const +bool SwNoTextFrame::IsTransparent() const { - const SwViewShell* pSh = getRootFrm()->GetCurrShell(); + const SwViewShell* pSh = getRootFrame()->GetCurrShell(); if ( !pSh || !pSh->GetViewOptions()->IsGraphic() ) return true; @@ -1073,7 +1073,7 @@ bool SwNoTextFrm::IsTransparent() const return true; } -void SwNoTextFrm::StopAnimation( OutputDevice* pOut ) const +void SwNoTextFrame::StopAnimation( OutputDevice* pOut ) const { // Stop animated graphics const SwGrfNode* pGrfNd = dynamic_cast< const SwGrfNode* >(GetNode()->GetGrfNode()); @@ -1084,7 +1084,7 @@ void SwNoTextFrm::StopAnimation( OutputDevice* pOut ) const } } -bool SwNoTextFrm::HasAnimation() const +bool SwNoTextFrame::HasAnimation() const { const SwGrfNode* pGrfNd = GetNode()->GetGrfNode(); return pGrfNd && pGrfNd->IsAnimated(); diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index b89e84921be3..9ba7ebd883a2 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -866,7 +866,7 @@ void SwTableAutoFormat::RestoreTableProperties(SwTable &table) const pFormat->SetFormatAttr(rSet); SwEditShell *pShell = pDoc->GetEditShell(); - pDoc->SetRowSplit(*pShell->getShellCrsr(false), SwFormatRowSplit(m_bRowSplit)); + pDoc->SetRowSplit(*pShell->getShellCursor(false), SwFormatRowSplit(m_bRowSplit)); table.SetRowsToRepeat(m_aRepeatHeading); } @@ -883,7 +883,7 @@ void SwTableAutoFormat::StoreTableProperties(const SwTable &table) SwEditShell *pShell = pDoc->GetEditShell(); SwFormatRowSplit *pRowSplit = nullptr; - SwDoc::GetRowSplit(*pShell->getShellCrsr(false), pRowSplit); + SwDoc::GetRowSplit(*pShell->getShellCursor(false), pRowSplit); m_bRowSplit = pRowSplit && pRowSplit->GetValue(); delete pRowSplit; pRowSplit = nullptr; diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 120b1a2b442c..f25cd8a6865e 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -325,7 +325,7 @@ namespace } else aInfo.mbSelected = false; - rnBorder += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + rnBorder += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); const sal_uInt16 nLeftCol = rnCol; while( rpCol != maCols.end() && *rpCol < rnBorder ) { @@ -701,7 +701,7 @@ bool SwTable::InsNewTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes aFndBox.SetTableLines( *this ); if( bClear ) aFndBox.ClearLineBehind(); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); // copy boxes aTarget.copyBoxes( rCpyTable, *this, pUndo ); @@ -709,7 +709,7 @@ bool SwTable::InsNewTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes // adjust row span attributes accordingly // make frames - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); return true; } @@ -736,7 +736,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwNodeIndex& rSttBox, // First delete the Table's Frames _FndBox aFndBox( nullptr, nullptr ); - aFndBox.DelFrms( pTableNd->GetTable() ); + aFndBox.DelFrames( pTableNd->GetTable() ); SwDoc* pCpyDoc = rCpyTable.GetFrameFormat()->GetDoc(); @@ -794,7 +794,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwNodeIndex& rSttBox, } } - aFndBox.MakeFrms( pTableNd->GetTable() ); // Create the Frames anew + aFndBox.MakeFrames( pTableNd->GetTable() ); // Create the Frames anew return true; } @@ -994,7 +994,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes, // Delete the Frames aFndBox.SetTableLines( *this ); //Not dispose accessible table - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); if( 1 == rCpyTable.GetTabSortBoxes().size() ) { @@ -1020,7 +1020,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes, } } - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); return true; } diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index e1c0cccf6238..4a7cb666d23a 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -78,7 +78,7 @@ using namespace ::com::sun::star; // In order to set the Frame Formats for the Boxes, it's enough to look // up the current one in the array. If it's already there return the new one. -struct _CpyTabFrm +struct _CpyTabFrame { union { SwTableBoxFormat *pFrameFormat; // for CopyCol @@ -86,15 +86,15 @@ struct _CpyTabFrm } Value; SwTableBoxFormat *pNewFrameFormat; - explicit _CpyTabFrm( SwTableBoxFormat* pAktFrameFormat ) : pNewFrameFormat( nullptr ) + explicit _CpyTabFrame( SwTableBoxFormat* pAktFrameFormat ) : pNewFrameFormat( nullptr ) { Value.pFrameFormat = pAktFrameFormat; } - _CpyTabFrm& operator=( const _CpyTabFrm& ); + _CpyTabFrame& operator=( const _CpyTabFrame& ); - bool operator==( const _CpyTabFrm& rCpyTabFrm ) const - { return (sal_uLong)Value.nSize == (sal_uLong)rCpyTabFrm.Value.nSize; } - bool operator<( const _CpyTabFrm& rCpyTabFrm ) const - { return (sal_uLong)Value.nSize < (sal_uLong)rCpyTabFrm.Value.nSize; } + bool operator==( const _CpyTabFrame& rCpyTabFrame ) const + { return (sal_uLong)Value.nSize == (sal_uLong)rCpyTabFrame.Value.nSize; } + bool operator<( const _CpyTabFrame& rCpyTabFrame ) const + { return (sal_uLong)Value.nSize < (sal_uLong)rCpyTabFrame.Value.nSize; } }; struct CR_SetBoxWidth @@ -165,7 +165,7 @@ typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, bool #define CHECKBOXWIDTH \ { \ - SwTwips nSize = GetFrameFormat()->GetFrmSize().GetWidth(); \ + SwTwips nSize = GetFrameFormat()->GetFrameSize().GetWidth(); \ for (size_t nTmp = 0; nTmp < m_aLines.size(); ++nTmp) \ ::_CheckBoxWidth( *m_aLines[ nTmp ], nSize ); \ } @@ -175,12 +175,12 @@ typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, bool for ( size_t i = 0; i < GetTabLines().size(); ++i ) \ { \ SwFrameFormat* pFormat = GetTabLines()[i]->GetFrameFormat(); \ - SwIterator<SwRowFrm,SwFormat> aIter( *pFormat ); \ - for (SwRowFrm* pFrm=aIter.First(); pFrm; pFrm=aIter.Next())\ + SwIterator<SwRowFrame,SwFormat> aIter( *pFormat ); \ + for (SwRowFrame* pFrame=aIter.First(); pFrame; pFrame=aIter.Next())\ { \ - if ( pFrm->GetTabLine() == GetTabLines()[i] ) \ + if ( pFrame->GetTabLine() == GetTabLines()[i] ) \ { \ - OSL_ENSURE( pFrm->GetUpper()->IsTabFrm(), \ + OSL_ENSURE( pFrame->GetUpper()->IsTabFrame(), \ "Table layout does not match table structure" ); \ } \ } \ @@ -239,21 +239,21 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, typedef bool (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, bool ); -_CpyTabFrm& _CpyTabFrm::operator=( const _CpyTabFrm& rCpyTabFrm ) +_CpyTabFrame& _CpyTabFrame::operator=( const _CpyTabFrame& rCpyTabFrame ) { - pNewFrameFormat = rCpyTabFrm.pNewFrameFormat; - Value = rCpyTabFrm.Value; + pNewFrameFormat = rCpyTabFrame.pNewFrameFormat; + Value = rCpyTabFrame.Value; return *this; } -typedef o3tl::sorted_vector<_CpyTabFrm> _CpyTabFrms; +typedef o3tl::sorted_vector<_CpyTabFrame> _CpyTabFrames; struct _CpyPara { std::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths; SwDoc* pDoc; SwTableNode* pTableNd; - _CpyTabFrms& rTabFrmArr; + _CpyTabFrames& rTabFrameArr; SwTableLine* pInsLine; SwTableBox* pInsBox; sal_uLong nOldSize, nNewSize; // in order to correct the size attributes @@ -263,9 +263,9 @@ struct _CpyPara sal_uInt8 nDelBorderFlag; bool bCpyContent; - _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrms& rFrmArr, + _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrames& rFrameArr, bool bCopyContent = true ) - : pDoc( pNd->GetDoc() ), pTableNd( pNd ), rTabFrmArr(rFrmArr), + : pDoc( pNd->GetDoc() ), pTableNd( pNd ), rTabFrameArr(rFrameArr), pInsLine(nullptr), pInsBox(nullptr), nOldSize(0), nNewSize(0), nMinLeft(ULONG_MAX), nMaxRight(0), nCpyCnt(nCopies), nInsPos(0), @@ -274,7 +274,7 @@ struct _CpyPara {} _CpyPara( const _CpyPara& rPara, SwTableLine* pLine ) : pWidths( rPara.pWidths ), pDoc(rPara.pDoc), pTableNd(rPara.pTableNd), - rTabFrmArr(rPara.rTabFrmArr), pInsLine(pLine), pInsBox(rPara.pInsBox), + rTabFrameArr(rPara.rTabFrameArr), pInsLine(pLine), pInsBox(rPara.pInsBox), nOldSize(0), nNewSize(rPara.nNewSize), nMinLeft( rPara.nMinLeft ), nMaxRight( rPara.nMaxRight ), nCpyCnt(rPara.nCpyCnt), nInsPos(0), nLnIdx( rPara.nLnIdx), nBoxIdx( rPara.nBoxIdx ), @@ -282,7 +282,7 @@ struct _CpyPara {} _CpyPara( const _CpyPara& rPara, SwTableBox* pBox ) : pWidths( rPara.pWidths ), pDoc(rPara.pDoc), pTableNd(rPara.pTableNd), - rTabFrmArr(rPara.rTabFrmArr), pInsLine(rPara.pInsLine), pInsBox(pBox), + rTabFrameArr(rPara.rTabFrameArr), pInsLine(rPara.pInsLine), pInsBox(pBox), nOldSize(rPara.nOldSize), nNewSize(rPara.nNewSize), nMinLeft( rPara.nMinLeft ), nMaxRight( rPara.nMaxRight ), nCpyCnt(rPara.nCpyCnt), nInsPos(0), nLnIdx(rPara.nLnIdx), nBoxIdx(rPara.nBoxIdx), @@ -296,21 +296,21 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) { // Look up the Frame Format in the Frame Format Array SwTableBox* pBox = rFndBox.GetBox(); - _CpyTabFrm aFindFrm( static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()) ); + _CpyTabFrame aFindFrame( static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()) ); sal_uInt16 nFndPos; if( pCpyPara->nCpyCnt ) { - _CpyTabFrms::const_iterator itFind = pCpyPara->rTabFrmArr.lower_bound( aFindFrm ); - nFndPos = itFind - pCpyPara->rTabFrmArr.begin(); - if( itFind == pCpyPara->rTabFrmArr.end() || !(*itFind == aFindFrm) ) + _CpyTabFrames::const_iterator itFind = pCpyPara->rTabFrameArr.lower_bound( aFindFrame ); + nFndPos = itFind - pCpyPara->rTabFrameArr.begin(); + if( itFind == pCpyPara->rTabFrameArr.end() || !(*itFind == aFindFrame) ) { // For nested copying, also save the new Format as an old one. SwTableBoxFormat* pNewFormat = static_cast<SwTableBoxFormat*>(pBox->ClaimFrameFormat()); // Find the selected Boxes in the Line: _FndLine const* pCmpLine = nullptr; - SwFormatFrmSize aFrmSz( pNewFormat->GetFrmSize() ); + SwFormatFrameSize aFrameSz( pNewFormat->GetFrameSize() ); bool bDiffCount = false; if( pBox->GetTabLines().size() ) @@ -328,49 +328,49 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) for( auto n = rFndBoxes.size(); n; ) { nSz += rFndBoxes[--n]->GetBox()-> - GetFrameFormat()->GetFrmSize().GetWidth(); + GetFrameFormat()->GetFrameSize().GetWidth(); } - aFrmSz.SetWidth( aFrmSz.GetWidth() - + aFrameSz.SetWidth( aFrameSz.GetWidth() - nSz / ( pCpyPara->nCpyCnt + 1 ) ); - pNewFormat->SetFormatAttr( aFrmSz ); - aFrmSz.SetWidth( nSz / ( pCpyPara->nCpyCnt + 1 ) ); + pNewFormat->SetFormatAttr( aFrameSz ); + aFrameSz.SetWidth( nSz / ( pCpyPara->nCpyCnt + 1 ) ); // Create a new Format for the new Box, specifying its size. - aFindFrm.pNewFrameFormat = reinterpret_cast<SwTableBoxFormat*>(pNewFormat->GetDoc()-> + aFindFrame.pNewFrameFormat = reinterpret_cast<SwTableBoxFormat*>(pNewFormat->GetDoc()-> MakeTableLineFormat()); - *aFindFrm.pNewFrameFormat = *pNewFormat; - aFindFrm.pNewFrameFormat->SetFormatAttr( aFrmSz ); + *aFindFrame.pNewFrameFormat = *pNewFormat; + aFindFrame.pNewFrameFormat->SetFormatAttr( aFrameSz ); } else { - aFrmSz.SetWidth( aFrmSz.GetWidth() / ( pCpyPara->nCpyCnt + 1 ) ); - pNewFormat->SetFormatAttr( aFrmSz ); + aFrameSz.SetWidth( aFrameSz.GetWidth() / ( pCpyPara->nCpyCnt + 1 ) ); + pNewFormat->SetFormatAttr( aFrameSz ); - aFindFrm.pNewFrameFormat = pNewFormat; - pCpyPara->rTabFrmArr.insert( aFindFrm ); - aFindFrm.Value.pFrameFormat = pNewFormat; - pCpyPara->rTabFrmArr.insert( aFindFrm ); + aFindFrame.pNewFrameFormat = pNewFormat; + pCpyPara->rTabFrameArr.insert( aFindFrame ); + aFindFrame.Value.pFrameFormat = pNewFormat; + pCpyPara->rTabFrameArr.insert( aFindFrame ); } } else { - aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]; - pBox->ChgFrameFormat( aFindFrm.pNewFrameFormat ); + aFindFrame = pCpyPara->rTabFrameArr[ nFndPos ]; + pBox->ChgFrameFormat( aFindFrame.pNewFrameFormat ); } } else { - _CpyTabFrms::const_iterator itFind = pCpyPara->rTabFrmArr.find( aFindFrm ); + _CpyTabFrames::const_iterator itFind = pCpyPara->rTabFrameArr.find( aFindFrame ); if( pCpyPara->nDelBorderFlag && - itFind != pCpyPara->rTabFrmArr.end() ) - aFindFrm = *itFind; + itFind != pCpyPara->rTabFrameArr.end() ) + aFindFrame = *itFind; else - aFindFrm.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); + aFindFrame.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); } if (!rFndBox.GetLines().empty()) { - pBox = new SwTableBox( aFindFrm.pNewFrameFormat, + pBox = new SwTableBox( aFindFrame.pNewFrameFormat, rFndBox.GetLines().size(), pCpyPara->pInsLine ); pCpyPara->pInsLine->GetTabBoxes().insert( pCpyPara->pInsLine->GetTabBoxes().begin() + pCpyPara->nInsPos++, pBox ); _CpyPara aPara( *pCpyPara, pBox ); @@ -384,7 +384,7 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) else { ::_InsTableBox( pCpyPara->pDoc, pCpyPara->pTableNd, pCpyPara->pInsLine, - aFindFrm.pNewFrameFormat, pBox, pCpyPara->nInsPos++ ); + aFindFrame.pNewFrameFormat, pBox, pCpyPara->nInsPos++ ); const FndBoxes_t& rFndBxs = rFndBox.GetUpper()->GetBoxes(); if( 8 > pCpyPara->nDelBorderFlag @@ -396,7 +396,7 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) ? rBoxItem.GetTop() : rBoxItem.GetRight() ) { - aFindFrm.Value.pFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); + aFindFrame.Value.pFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); SvxBoxItem aNew( rBoxItem ); if( 8 > pCpyPara->nDelBorderFlag ) @@ -412,14 +412,14 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) pCpyPara->nInsPos - 1 ]; } - aFindFrm.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); + aFindFrame.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); // Else we copy before that and the first Line keeps the TopLine // and we remove it at the original pBox->ClaimFrameFormat()->SetFormatAttr( aNew ); if( !pCpyPara->nCpyCnt ) - pCpyPara->rTabFrmArr.insert( aFindFrm ); + pCpyPara->rTabFrameArr.insert( aFindFrame ); } } } @@ -487,12 +487,12 @@ static void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt } } -SwRowFrm* GetRowFrm( SwTableLine& rLine ) +SwRowFrame* GetRowFrame( SwTableLine& rLine ) { - SwIterator<SwRowFrm,SwFormat> aIter( *rLine.GetFrameFormat() ); - for( SwRowFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) - if( pFrm->GetTabLine() == &rLine ) - return pFrm; + SwIterator<SwRowFrame,SwFormat> aIter( *rLine.GetFrameFormat() ); + for( SwRowFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) + if( pFrame->GetTabLine() == &rLine ) + return pFrame; return nullptr; } @@ -521,13 +521,13 @@ bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, // Find Lines for the layout update aFndBox.SetTableLines( *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); // TL_CHART2: nothing to be done since chart2 currently does not want to // get notified about new rows/cols. - _CpyTabFrms aTabFrmArr; - _CpyPara aCpyPara( pTableNd, nCnt, aTabFrmArr ); + _CpyTabFrames aTabFrameArr; + _CpyPara aCpyPara( pTableNd, nCnt, aTabFrameArr ); for (auto & rpLine : aFndBox.GetLines()) { @@ -538,7 +538,7 @@ bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, GCLines(); // Update Layout - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); CHECKBOXWIDTH; CHECKTABLELAYOUT; @@ -591,19 +591,19 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, // Find Lines for the layout update const bool bLayout = !IsNewModel() && - nullptr != SwIterator<SwTabFrm,SwFormat>( *GetFrameFormat() ).First(); + nullptr != SwIterator<SwTabFrame,SwFormat>( *GetFrameFormat() ).First(); if ( bLayout ) { aFndBox.SetTableLines( *this ); if( pFndBox != &aFndBox ) - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); // TL_CHART2: nothing to be done since chart2 currently does not want to // get notified about new rows/cols. } - _CpyTabFrms aTabFrmArr; - _CpyPara aCpyPara( pTableNd, 0, aTabFrmArr ); + _CpyTabFrames aTabFrameArr; + _CpyPara aCpyPara( pTableNd, 0, aTabFrameArr ); SwTableLine* pLine = pFndBox->GetLines()[ bBehind ? pFndBox->GetLines().size()-1 : 0 ]->GetLine(); @@ -639,9 +639,9 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, if ( bLayout ) { if( pFndBox != &aFndBox ) - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); else - aFndBox.MakeNewFrms( *this, nCnt, bBehind ); + aFndBox.MakeNewFrames( *this, nCnt, bBehind ); } CHECKBOXWIDTH; @@ -677,7 +677,7 @@ static void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset, // Adapt the Box const SwFrameFormat *pBoxFormat = rBox.GetFrameFormat(); - SwFormatFrmSize aNew( pBoxFormat->GetFrmSize() ); + SwFormatFrameSize aNew( pBoxFormat->GetFrameSize() ); aNew.SetWidth( aNew.GetWidth() + nOffset ); SwFrameFormat *pFormat = rShareFormats.GetFormat( *pBoxFormat, aNew ); if( pFormat ) @@ -700,7 +700,7 @@ void _DeleteBox( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo, { do { SwTwips nBoxSz = bCalcNewSize ? - pBox->GetFrameFormat()->GetFrmSize().GetWidth() : 0; + pBox->GetFrameFormat()->GetFrameSize().GetWidth() : 0; SwTableLine* pLine = pBox->GetUpper(); SwTableBoxes& rTableBoxes = pLine->GetTabBoxes(); sal_uInt16 nDelPos = rTableBoxes.GetPos( pBox ); @@ -792,7 +792,7 @@ void _DeleteBox( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo, pBox = rTableBoxes[nDelPos]; if( bCalcNewSize ) { - SwFormatFrmSize aNew( pBox->GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aNew( pBox->GetFrameFormat()->GetFrameSize() ); aNew.SetWidth( aNew.GetWidth() + nBoxSz ); if( pShareFormats ) pShareFormats->SetSize( *pBox, aNew ); @@ -867,7 +867,7 @@ lcl_FndNxtPrvDelBox( const SwTableLines& rTableLns, break; } pFndBox = pBox; - nFndBoxWidth = pFndBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nFndBoxWidth = pFndBox->GetFrameFormat()->GetFrameSize().GetWidth(); nFndWidth -= nFndBoxWidth; } @@ -933,8 +933,8 @@ lcl_SaveUpperLowerBorder( SwTable& rTable, const SwTableBox& rBox, // search in the top/bottom Line of the respective counterparts. SwTwips nBoxStt = 0; for( sal_uInt16 n = 0; n < nDelPos; ++n ) - nBoxStt += rTableBoxes[ n ]->GetFrameFormat()->GetFrmSize().GetWidth(); - SwTwips nBoxWidth = rBox.GetFrameFormat()->GetFrmSize().GetWidth(); + nBoxStt += rTableBoxes[ n ]->GetFrameFormat()->GetFrameSize().GetWidth(); + SwTwips nBoxWidth = rBox.GetFrameFormat()->GetFrameSize().GetWidth(); SwTableBox *pPrvBox = nullptr, *pNxtBox = nullptr; if( nLnPos ) // Predecessor? @@ -980,7 +980,7 @@ bool SwTable::DeleteSel( , const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged, SwUndo* pUndo, - const bool bDelMakeFrms, const bool bCorrBorder ) + const bool bDelMakeFrames, const bool bCorrBorder ) { OSL_ENSURE( pDoc, "No doc?" ); SwTableNode* pTableNd = nullptr; @@ -995,13 +995,13 @@ bool SwTable::DeleteSel( // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); - if ( bDelMakeFrms ) + if ( bDelMakeFrames ) { if( pMerged && !pMerged->empty() ) aFndBox.SetTableLines( *pMerged, *this ); else if( !rBoxes.empty() ) aFndBox.SetTableLines( rBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); } SwShareBoxFormats aShareFormats; @@ -1038,8 +1038,8 @@ bool SwTable::DeleteSel( // then clean up the structure of all Lines GCLines(); - if( bDelMakeFrms && aFndBox.AreLinesToRestore( *this ) ) - aFndBox.MakeFrms( *this ); + if( bDelMakeFrames && aFndBox.AreLinesToRestore( *this ) ) + aFndBox.MakeFrames( *this ); // TL_CHART2: now inform chart that sth has changed pDoc->UpdateCharts( GetFrameFormat()->GetName() ); @@ -1074,17 +1074,17 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn for (size_t n = 0; n < rBoxes.size(); ++n) { SwTableBox* pSelBox = rBoxes[n]; - const SwRowFrm* pRow = GetRowFrm( *pSelBox->GetUpper() ); + const SwRowFrame* pRow = GetRowFrame( *pSelBox->GetUpper() ); OSL_ENSURE( pRow, "Where is the SwTableLine's Frame?" ); SWRECTFN( pRow ) - pRowHeights[ n ] = (pRow->Frm().*fnRect->fnGetHeight)(); + pRowHeights[ n ] = (pRow->Frame().*fnRect->fnGetHeight)(); } } // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); for (size_t n = 0; n < rBoxes.size(); ++n) { @@ -1096,7 +1096,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn SwTableBoxFormat* pFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat()); // Respect the Line's height, reset if needed - SwFormatFrmSize aFSz( pInsLine->GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aFSz( pInsLine->GetFrameFormat()->GetFrameSize() ); if ( bSameHeight && ATT_VAR_SIZE == aFSz.GetHeightSizeType() ) aFSz.SetHeightSizeType( ATT_MIN_SIZE ); @@ -1186,7 +1186,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn GCLines(); - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); CHECKBOXWIDTH CHECKTABLELAYOUT @@ -1212,9 +1212,9 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( aSelBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); - _CpyTabFrms aFrmArr; + _CpyTabFrames aFrameArr; std::vector<SwTableBoxFormat*> aLastBoxArr; for (size_t n = 0; n < aSelBoxes.size(); ++n) { @@ -1222,7 +1222,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) OSL_ENSURE( pSelBox, "Box is not in the table" ); // We don't want to split small table cells into very very small cells - if( pSelBox->GetFrameFormat()->GetFrmSize().GetWidth()/( nCnt + 1 ) < 10 ) + if( pSelBox->GetFrameFormat()->GetFrameSize().GetWidth()/( nCnt + 1 ) < 10 ) continue; // Then split the nCnt Box up into nCnt Boxes @@ -1231,63 +1231,63 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) // Find the Frame Format in the Frame Format Array SwTableBoxFormat* pLastBoxFormat; - _CpyTabFrm aFindFrm( static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat()) ); - _CpyTabFrms::const_iterator itFind = aFrmArr.lower_bound( aFindFrm ); - const size_t nFndPos = itFind - aFrmArr.begin(); - if( itFind == aFrmArr.end() || !(*itFind == aFindFrm) ) + _CpyTabFrame aFindFrame( static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat()) ); + _CpyTabFrames::const_iterator itFind = aFrameArr.lower_bound( aFindFrame ); + const size_t nFndPos = itFind - aFrameArr.begin(); + if( itFind == aFrameArr.end() || !(*itFind == aFindFrame) ) { // Change the FrameFormat - aFindFrm.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->ClaimFrameFormat()); - SwTwips nBoxSz = aFindFrm.pNewFrameFormat->GetFrmSize().GetWidth(); + aFindFrame.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->ClaimFrameFormat()); + SwTwips nBoxSz = aFindFrame.pNewFrameFormat->GetFrameSize().GetWidth(); SwTwips nNewBoxSz = nBoxSz / ( nCnt + 1 ); - aFindFrm.pNewFrameFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, + aFindFrame.pNewFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nNewBoxSz, 0 ) ); - aFrmArr.insert( aFindFrm ); + aFrameArr.insert( aFindFrame ); - pLastBoxFormat = aFindFrm.pNewFrameFormat; + pLastBoxFormat = aFindFrame.pNewFrameFormat; if( nBoxSz != ( nNewBoxSz * (nCnt + 1))) { // We have a remainder, so we need to define an own Format // for the last Box. - pLastBoxFormat = new SwTableBoxFormat( *aFindFrm.pNewFrameFormat ); - pLastBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, + pLastBoxFormat = new SwTableBoxFormat( *aFindFrame.pNewFrameFormat ); + pLastBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nBoxSz - ( nNewBoxSz * nCnt ), 0 ) ); } aLastBoxArr.insert( aLastBoxArr.begin() + nFndPos, pLastBoxFormat ); } else { - aFindFrm = aFrmArr[ nFndPos ]; - pSelBox->ChgFrameFormat( aFindFrm.pNewFrameFormat ); + aFindFrame = aFrameArr[ nFndPos ]; + pSelBox->ChgFrameFormat( aFindFrame.pNewFrameFormat ); pLastBoxFormat = aLastBoxArr[ nFndPos ]; } // Insert the Boxes at the Position for( sal_uInt16 i = 1; i < nCnt; ++i ) - ::_InsTableBox( pDoc, pTableNd, pInsLine, aFindFrm.pNewFrameFormat, + ::_InsTableBox( pDoc, pTableNd, pInsLine, aFindFrame.pNewFrameFormat, pSelBox, nBoxPos + i ); // insert after ::_InsTableBox( pDoc, pTableNd, pInsLine, pLastBoxFormat, pSelBox, nBoxPos + nCnt ); // insert after // Special treatment for the Border: - const SvxBoxItem& aSelBoxItem = aFindFrm.pNewFrameFormat->GetBox(); + const SvxBoxItem& aSelBoxItem = aFindFrame.pNewFrameFormat->GetBox(); if( aSelBoxItem.GetRight() ) { pInsLine->GetTabBoxes()[ nBoxPos + nCnt ]->ClaimFrameFormat(); SvxBoxItem aTmp( aSelBoxItem ); aTmp.SetLine( nullptr, SvxBoxItemLine::RIGHT ); - aFindFrm.pNewFrameFormat->SetFormatAttr( aTmp ); + aFindFrame.pNewFrameFormat->SetFormatAttr( aTmp ); // Remove the Format from the "cache" - for( auto i = aFrmArr.size(); i; ) + for( auto i = aFrameArr.size(); i; ) { - const _CpyTabFrm& rCTF = aFrmArr[ --i ]; - if( rCTF.pNewFrameFormat == aFindFrm.pNewFrameFormat || - rCTF.Value.pFrameFormat == aFindFrm.pNewFrameFormat ) + const _CpyTabFrame& rCTF = aFrameArr[ --i ]; + if( rCTF.pNewFrameFormat == aFindFrame.pNewFrameFormat || + rCTF.Value.pFrameFormat == aFindFrame.pNewFrameFormat ) { - aFrmArr.erase( aFrmArr.begin() + i ); + aFrameArr.erase( aFrameArr.begin() + i ); aLastBoxArr.erase( aLastBoxArr.begin() + i ); } } @@ -1295,7 +1295,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) } // Update Layout - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); CHECKBOXWIDTH CHECKTABLELAYOUT @@ -1355,9 +1355,9 @@ static void lcl_CalcWidth( SwTableBox* pBox ) long nWidth = 0; for( auto pTabBox : pLine->GetTabBoxes() ) - nWidth += pTabBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth += pTabBox->GetFrameFormat()->GetFrameSize().GetWidth(); - pFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth, 0 )); + pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 )); // Boxes with Lines can only have Size/Fillorder pFormat->ResetFormatAttr( RES_LR_SPACE, RES_FRMATR_END - 1 ); @@ -1582,7 +1582,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, // Find Lines for the Layout update aFndBox.SetTableLines( *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); _FndBox* pFndBox = &aFndBox; while( 1 == pFndBox->GetLines().size() && @@ -1668,7 +1668,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, it != GetTabLines()[0]->GetTabBoxes().end(); ++it) lcl_BoxSetHeadCondColl(*it); - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); CHECKBOXWIDTH CHECKTABLELAYOUT @@ -1715,7 +1715,7 @@ static sal_uInt16 lcl_GetBoxOffset( const _FndBox& rBox ) { if (pBox==pCmp) break; - nRet = nRet + (sal_uInt16) pCmp->GetFrameFormat()->GetFrmSize().GetWidth(); + nRet = nRet + (sal_uInt16) pCmp->GetFrameFormat()->GetFrameSize().GetWidth(); } pBox = pBox->GetUpper()->GetUpper(); } while( pBox ); @@ -1728,7 +1728,7 @@ static sal_uInt16 lcl_GetLineWidth( const _FndLine& rLine ) for( auto n = rLine.GetBoxes().size(); n; ) { nRet = nRet + static_cast<sal_uInt16>(rLine.GetBoxes()[--n]->GetBox() - ->GetFrameFormat()->GetFrmSize().GetWidth()); + ->GetFrameFormat()->GetFrameSize().GetWidth()); } return nRet; } @@ -1763,7 +1763,7 @@ static void lcl_CalcNewWidths(const FndLines_t& rFndLines, _CpyPara& rPara) { SwTableBox* pBox = pLine->GetTabBoxes()[nBox++]; if( pBox != pSel ) - nPos += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nPos += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); else break; } @@ -1778,7 +1778,7 @@ static void lcl_CalcNewWidths(const FndLines_t& rFndLines, _CpyPara& rPara) for( nBox = 0; nBox < nBoxCount; ) { nPos += pFndLine->GetBoxes()[nBox] - ->GetBox()->GetFrameFormat()->GetFrmSize().GetWidth(); + ->GetBox()->GetFrameFormat()->GetFrameSize().GetWidth(); rWidth[ ++nBox ] = nPos; } // nPos: The right border of the last selected box @@ -1836,7 +1836,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara) else { nRealSize = pCpyPara->nNewSize; - nRealSize *= rFndBox.GetBox()->GetFrameFormat()->GetFrmSize().GetWidth(); + nRealSize *= rFndBox.GetBox()->GetFrameFormat()->GetFrameSize().GetWidth(); if (pCpyPara->nOldSize == 0) throw o3tl::divide_by_zero(); nRealSize /= pCpyPara->nOldSize; @@ -1854,29 +1854,29 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara) do { // Find the Frame Format in the list of all Frame Formats - _CpyTabFrm aFindFrm(static_cast<SwTableBoxFormat*>(rFndBox.GetBox()->GetFrameFormat())); - - SwFormatFrmSize aFrmSz; - _CpyTabFrms::const_iterator itFind = pCpyPara->rTabFrmArr.lower_bound( aFindFrm ); - const _CpyTabFrms::size_type nFndPos = itFind - pCpyPara->rTabFrmArr.begin(); - if( itFind == pCpyPara->rTabFrmArr.end() || !(*itFind == aFindFrm) || - ( aFrmSz = ( aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]).pNewFrameFormat-> - GetFrmSize()).GetWidth() != (SwTwips)nSize ) + _CpyTabFrame aFindFrame(static_cast<SwTableBoxFormat*>(rFndBox.GetBox()->GetFrameFormat())); + + SwFormatFrameSize aFrameSz; + _CpyTabFrames::const_iterator itFind = pCpyPara->rTabFrameArr.lower_bound( aFindFrame ); + const _CpyTabFrames::size_type nFndPos = itFind - pCpyPara->rTabFrameArr.begin(); + if( itFind == pCpyPara->rTabFrameArr.end() || !(*itFind == aFindFrame) || + ( aFrameSz = ( aFindFrame = pCpyPara->rTabFrameArr[ nFndPos ]).pNewFrameFormat-> + GetFrameSize()).GetWidth() != (SwTwips)nSize ) { // It doesn't exist yet, so copy it - aFindFrm.pNewFrameFormat = pCpyPara->pDoc->MakeTableBoxFormat(); - aFindFrm.pNewFrameFormat->CopyAttrs( *rFndBox.GetBox()->GetFrameFormat() ); + aFindFrame.pNewFrameFormat = pCpyPara->pDoc->MakeTableBoxFormat(); + aFindFrame.pNewFrameFormat->CopyAttrs( *rFndBox.GetBox()->GetFrameFormat() ); if( !pCpyPara->bCpyContent ) - aFindFrm.pNewFrameFormat->ResetFormatAttr( RES_BOXATR_FORMULA, RES_BOXATR_VALUE ); - aFrmSz.SetWidth( nSize ); - aFindFrm.pNewFrameFormat->SetFormatAttr( aFrmSz ); - pCpyPara->rTabFrmArr.insert( aFindFrm ); + aFindFrame.pNewFrameFormat->ResetFormatAttr( RES_BOXATR_FORMULA, RES_BOXATR_VALUE ); + aFrameSz.SetWidth( nSize ); + aFindFrame.pNewFrameFormat->SetFormatAttr( aFrameSz ); + pCpyPara->rTabFrameArr.insert( aFindFrame ); } SwTableBox* pBox; if (!rFndBox.GetLines().empty()) { - pBox = new SwTableBox( aFindFrm.pNewFrameFormat, + pBox = new SwTableBox( aFindFrame.pNewFrameFormat, rFndBox.GetLines().size(), pCpyPara->pInsLine ); pCpyPara->pInsLine->GetTabBoxes().insert( pCpyPara->pInsLine->GetTabBoxes().begin() + pCpyPara->nInsPos++, pBox ); _CpyPara aPara( *pCpyPara, pBox ); @@ -1890,7 +1890,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara) { // Create an empty Box pCpyPara->pDoc->GetNodes().InsBoxen( pCpyPara->pTableNd, pCpyPara->pInsLine, - aFindFrm.pNewFrameFormat, + aFindFrame.pNewFrameFormat, pCpyPara->pDoc->GetDfltTextFormatColl(), nullptr, pCpyPara->nInsPos ); pBox = pCpyPara->pInsLine->GetTabBoxes()[ pCpyPara->nInsPos ]; @@ -1952,19 +1952,19 @@ static void lcl_CopyLineToDoc(const _FndLine& rFndLine, _CpyPara *const pCpyPara) { // Find the Frame Format in the list of all Frame Formats - _CpyTabFrm aFindFrm( static_cast<SwTableBoxFormat*>(rFndLine.GetLine()->GetFrameFormat()) ); - _CpyTabFrms::const_iterator itFind = pCpyPara->rTabFrmArr.find( aFindFrm ); - if( itFind == pCpyPara->rTabFrmArr.end() ) + _CpyTabFrame aFindFrame( static_cast<SwTableBoxFormat*>(rFndLine.GetLine()->GetFrameFormat()) ); + _CpyTabFrames::const_iterator itFind = pCpyPara->rTabFrameArr.find( aFindFrame ); + if( itFind == pCpyPara->rTabFrameArr.end() ) { // It doesn't exist yet, so copy it - aFindFrm.pNewFrameFormat = reinterpret_cast<SwTableBoxFormat*>(pCpyPara->pDoc->MakeTableLineFormat()); - aFindFrm.pNewFrameFormat->CopyAttrs( *rFndLine.GetLine()->GetFrameFormat() ); - pCpyPara->rTabFrmArr.insert( aFindFrm ); + aFindFrame.pNewFrameFormat = reinterpret_cast<SwTableBoxFormat*>(pCpyPara->pDoc->MakeTableLineFormat()); + aFindFrame.pNewFrameFormat->CopyAttrs( *rFndLine.GetLine()->GetFrameFormat() ); + pCpyPara->rTabFrameArr.insert( aFindFrame ); } else - aFindFrm = *itFind; + aFindFrame = *itFind; - SwTableLine* pNewLine = new SwTableLine( reinterpret_cast<SwTableLineFormat*>(aFindFrm.pNewFrameFormat), + SwTableLine* pNewLine = new SwTableLine( reinterpret_cast<SwTableLineFormat*>(aFindFrame.pNewFrameFormat), rFndLine.GetBoxes().size(), pCpyPara->pInsBox ); if( pCpyPara->pInsBox ) { @@ -1994,13 +1994,13 @@ lcl_CopyLineToDoc(const _FndLine& rFndLine, _CpyPara *const pCpyPara) pFormat = rFndLine.GetLine()->GetUpper()->GetFrameFormat(); else pFormat = pCpyPara->pTableNd->GetTable().GetFrameFormat(); - aPara.nOldSize = pFormat->GetFrmSize().GetWidth(); + aPara.nOldSize = pFormat->GetFrameSize().GetWidth(); } else // Calculate it for (auto &rpBox : rFndLine.GetBoxes()) { - aPara.nOldSize += rpBox->GetBox()->GetFrameFormat()->GetFrmSize().GetWidth(); + aPara.nOldSize += rpBox->GetBox()->GetFrameFormat()->GetFrameSize().GetWidth(); } const FndBoxes_t& rBoxes = rFndLine.GetBoxes(); @@ -2035,9 +2035,9 @@ bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd ) GetFrameFormat()->GetDoc()->getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint ); } - _CpyTabFrms aCpyFormat; + _CpyTabFrames aCpyFormat; _CpyPara aPara( &rTableNd, 1, aCpyFormat, true ); - aPara.nNewSize = aPara.nOldSize = rTableNd.GetTable().GetFrameFormat()->GetFrmSize().GetWidth(); + aPara.nNewSize = aPara.nOldSize = rTableNd.GetTable().GetFrameFormat()->GetFrameSize().GetWidth(); // Copy if( IsNewModel() ) lcl_CalcNewWidths( aFndBox.GetLines(), aPara ); @@ -2115,7 +2115,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, pNewTable->SetTableChgMode( GetTableChgMode() ); // Destroy the already created Frames - pTableNd->DelFrms(); + pTableNd->DelFrames(); { // Conver the Table formulas to their relative representation @@ -2130,9 +2130,9 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, if( bCpyName ) pNewTable->GetFrameFormat()->SetName( GetFrameFormat()->GetName() ); - _CpyTabFrms aCpyFormat; + _CpyTabFrames aCpyFormat; _CpyPara aPara( pTableNd, 1, aCpyFormat, bCpyNds ); - aPara.nNewSize = aPara.nOldSize = GetFrameFormat()->GetFrmSize().GetWidth(); + aPara.nNewSize = aPara.nOldSize = GetFrameFormat()->GetFrameSize().GetWidth(); if( IsNewModel() ) lcl_CalcNewWidths( aFndBox.GetLines(), aPara ); @@ -2204,7 +2204,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, // Clean up pNewTable->GCLines(); - pTableNd->MakeFrms( &aIdx ); // re-generate the Frames + pTableNd->MakeFrames( &aIdx ); // re-generate the Frames CHECKTABLELAYOUT @@ -2366,7 +2366,7 @@ static SwTwips lcl_GetDistance( SwTableBox* pBox, bool bLeft ) while( nStt < nPos ) nRet += pLine->GetTabBoxes()[ nStt++ ]->GetFrameFormat() - ->GetFrmSize().GetWidth(); + ->GetFrameSize().GetWidth(); pBox = pLine->GetUpper(); } return nRet; @@ -2379,7 +2379,7 @@ static bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, for( auto pBox : rBoxes ) { SwFrameFormat* pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); SwTwips nWidth = rSz.GetWidth(); bool bGreaterBox = false; @@ -2430,7 +2430,7 @@ static bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, - rParam.nSide ) < COLFUZZY )) { // This column contains the Cursor - so decrease/increase - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); if( !nLowerDiff ) { @@ -2477,7 +2477,7 @@ static bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, for( auto pBox : rBoxes ) { SwFrameFormat* pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); SwTwips nWidth = rSz.GetWidth(); if( bCheck ) @@ -2527,7 +2527,7 @@ static bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, : nDist >= rParam.nSide - COLFUZZY) ) ) { - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); if( !nLowerDiff ) { @@ -2569,7 +2569,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, { SwTableBox* pBox = rBoxes[ n ]; SwTableBoxFormat* pFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); SwTwips nWidth = rSz.GetWidth(); int nCmp {0}; @@ -2636,7 +2636,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, if( !rParam.bSplittBox ) { // the current Box on - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); aNew.SetWidth( nWidth + rParam.nDiff ); rParam.aShareFormats.SetSize( *pBox, aNew ); } @@ -2652,7 +2652,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, pLine, pFormat, pBox, n ); SwTableBox* pNewBox = rBoxes[ n ]; - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); aNew.SetWidth( rParam.nDiff ); rParam.aShareFormats.SetSize( *pNewBox, aNew ); @@ -2660,7 +2660,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, if( rParam.bSplittBox ) { // the current Box on - SwFormatFrmSize aNewSize( rSz ); + SwFormatFrameSize aNewSize( rSz ); aNewSize.SetWidth( nWidth - rParam.nDiff ); rParam.aShareFormats.SetSize( *pBox, aNewSize ); } @@ -2710,7 +2710,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, SwTwips nTmpDist = nDist; for( auto pBox : rBoxes ) { - SwTwips nWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); if( (nTmpDist + nWidth / 2 ) > rParam.nSide ) { rParam.nRemainWidth = rParam.bLeft @@ -2726,7 +2726,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, { SwTableBox* pBox = rBoxes[ n ]; SwFrameFormat* pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); SwTwips nWidth = rSz.GetWidth(); if( bCheck ) @@ -2740,7 +2740,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, (TBLFIX_CHGABS != rParam.nMode || (n < rBoxes.size() && (nDist + nWidth + rBoxes[ n+1 ]-> - GetFrameFormat()->GetFrmSize().GetWidth() / 2) + GetFrameFormat()->GetFrameSize().GetWidth() / 2) > rParam.nSide) )) : (nDist + nWidth / 2 ) > rParam.nSide ) @@ -2773,7 +2773,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, pTmpBox = pTmpBox->GetUpper()->GetUpper(); nBoxPos = pTmpBox->GetUpper()->GetTabBoxes().GetPos( pTmpBox ); } - nTmpWidth = pTmpBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nTmpWidth = pTmpBox->GetFrameFormat()->GetFrameSize().GetWidth(); } if( nTmpWidth < nDiff || nTmpWidth - nDiff < MINLAY ) @@ -2800,7 +2800,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, (TBLFIX_CHGABS != rParam.nMode || (n < rBoxes.size() && (nDist + nWidth + rBoxes[ n+1 ]-> - GetFrameFormat()->GetFrmSize().GetWidth() / 2) + GetFrameFormat()->GetFrameSize().GetWidth() / 2) > rParam.nSide) )) : (nDist + nWidth / 2 ) > rParam.nSide )) { @@ -2817,7 +2817,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, nLowerDiff = rParam.nDiff; } - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); rParam.nLowerDiff += nLowerDiff; if( rParam.bBigger ) @@ -2888,7 +2888,7 @@ static void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam SwTwips nBoxWidth = 0; for( auto n = rBoxes.size(); n; ) - nBoxWidth += rBoxes[ --n ]->GetFrameFormat()->GetFrmSize().GetWidth(); + nBoxWidth += rBoxes[ --n ]->GetFrameFormat()->GetFrameSize().GetWidth(); if( COLFUZZY < std::abs( nWidth - nBoxWidth )) { @@ -2896,7 +2896,7 @@ static void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam for( auto n = rBoxes.size(); n; ) { SwTableBox* pBox = rBoxes[ --n ]; - SwFormatFrmSize aNew( pBox->GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aNew( pBox->GetFrameFormat()->GetFrameSize() ); long nDiff = aNew.GetWidth(); nDiff *= nWidth; nDiff /= nBoxWidth; @@ -2916,7 +2916,7 @@ static void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam } static void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam, - const SwFormatFrmSize& rOldSz, + const SwFormatFrameSize& rOldSz, sal_uInt16& rDelWidth, SwTwips nDist ) { long nDiff = 0; @@ -2963,7 +2963,7 @@ static void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam, if( bSetSize ) { - SwFormatFrmSize aNew( rOldSz ); + SwFormatFrameSize aNew( rOldSz ); aNew.SetWidth( aNew.GetWidth() + nDiff ); rParam.aShareFormats.SetSize( rBox, aNew ); @@ -3046,7 +3046,7 @@ static bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam, pBox = rBoxes[ n++ ]; SwFrameFormat* pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); long nWidth = rSz.GetWidth(); bool bDelBox = false, bChgLowers = false; @@ -3209,7 +3209,7 @@ static bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam, else { // Or else we need to adapt the Box's size - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); bool bCorrRel = false; if( TBLVAR_CHGABS != rParam.nMode ) @@ -3297,7 +3297,7 @@ static void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam ) SwTableBoxes& rBoxes = pLine->GetTabBoxes(); for( auto pBox : rBoxes ) { - SwFormatFrmSize aSz( pBox->GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aSz( pBox->GetFrameFormat()->GetFrameSize() ); SwTwips nWidth = aSz.GetWidth(); nWidth *= rParam.nDiff; nWidth /= rParam.nMaxSize; @@ -3319,7 +3319,7 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize ) for (SwTableBoxes::const_iterator i(rBoxes.begin()); i != rBoxes.end(); ++i) { const SwTableBox* pBox = *i; - const SwTwips nBoxW = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + const SwTwips nBoxW = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); nAktSize += nBoxW; for( auto pLn : pBox->GetTabLines() ) @@ -3373,7 +3373,7 @@ static _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo, } // Find Lines for the Layout update - pFndBox->DelFrms( rTable ); + pFndBox->DelFrames( rTable ); // TL_CHART2: this function get called from SetColWidth exclusively, // thus it is currently speculated that nothing needs to be done here. @@ -3387,7 +3387,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, { SetHTMLTableLayout( nullptr ); // Delete HTML Layout - const SwFormatFrmSize& rSz = GetFrameFormat()->GetFrmSize(); + const SwFormatFrameSize& rSz = GetFrameFormat()->GetFrameSize(); const SvxLRSpaceItem& rLR = GetFrameFormat()->GetLRSpace(); std::unique_ptr<_FndBox> xFndBox; // for insertion/deletion @@ -3416,7 +3416,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, { fnSelBox = lcl_DelSelBox; fnOtherBox = lcl_DelOtherBox; - aParam.nBoxWidth = (sal_uInt16)rAktBox.GetFrameFormat()->GetFrmSize().GetWidth(); + aParam.nBoxWidth = (sal_uInt16)rAktBox.GetFrameFormat()->GetFrameSize().GetWidth(); if( bLeft ) nDistStt = rSz.GetWidth(); } @@ -3512,9 +3512,9 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, else if( ppUndo ) *ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true ); - long nFrmWidth = LONG_MAX; + long nFrameWidth = LONG_MAX; LockModify(); - SwFormatFrmSize aSz( rSz ); + SwFormatFrameSize aSz( rSz ); SvxLRSpaceItem aLR( rLR ); if( bBigger ) { @@ -3559,15 +3559,15 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, if( GetFrameFormat()->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE) && !rSz.GetWidthPercent() ) { - SwTabFrm* pTabFrm = SwIterator<SwTabFrm,SwFormat>( *GetFrameFormat() ).First(); - if( pTabFrm && - pTabFrm->Prt().Width() != rSz.GetWidth() ) + SwTabFrame* pTabFrame = SwIterator<SwTabFrame,SwFormat>( *GetFrameFormat() ).First(); + if( pTabFrame && + pTabFrame->Prt().Width() != rSz.GetWidth() ) { - nFrmWidth = pTabFrm->Prt().Width(); + nFrameWidth = pTabFrame->Prt().Width(); if( bBigger ) - nFrmWidth += nAbsDiff; + nFrameWidth += nAbsDiff; else - nFrmWidth -= nAbsDiff; + nFrameWidth -= nAbsDiff; } } } @@ -3596,10 +3596,10 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, // If the Table happens to contain relative values (USHORT_MAX), // we need to convert them to absolute ones now. // Bug 61494 - if( LONG_MAX != nFrmWidth ) + if( LONG_MAX != nFrameWidth ) { - SwFormatFrmSize aAbsSz( aSz ); - aAbsSz.SetWidth( nFrmWidth ); + SwFormatFrameSize aAbsSz( aSz ); + aAbsSz.SetWidth( nFrameWidth ); GetFrameFormat()->SetFormatAttr( aAbsSz ); } } @@ -3644,7 +3644,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, bRet = false; } - if( !bRet && rAktBox.GetFrameFormat()->GetFrmSize().GetWidth() + if( !bRet && rAktBox.GetFrameFormat()->GetFrameSize().GetWidth() - nRelDiff > COLFUZZY + ( 567 / 2 /*leave room for at least 0.5 cm*/) ) { @@ -3775,7 +3775,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, aParam.nMaxSize = aParam.nSide; else aParam.nMaxSize = pLine->GetUpper()->GetFrameFormat()-> - GetFrmSize().GetWidth() - aParam.nSide; + GetFrameSize().GetWidth() - aParam.nSide; } // First, see if there is enough room at all @@ -3791,7 +3791,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, } if( !bRet && !aParam.bBigger && rAktBox.GetFrameFormat()-> - GetFrmSize().GetWidth() - nRelDiff > COLFUZZY + + GetFrameSize().GetWidth() - nRelDiff > COLFUZZY + ( 567 / 2 /*leave room for at least 0.5 cm*/) ) { // Consume the room from the current Cell @@ -3846,7 +3846,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, // Update Layout if( !bBigger || xFndBox->AreLinesToRestore( *this ) ) - xFndBox->MakeFrms( *this ); + xFndBox->MakeFrames( *this ); // TL_CHART2: it is currently unclear if sth has to be done here. // The function name hints that nothing needs to be done, on the other @@ -3902,7 +3902,7 @@ static _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo, } // Find Lines for the Layout update - pFndBox->DelFrms( rTable ); + pFndBox->DelFrames( rTable ); // TL_CHART2: it is currently unclear if sth has to be done here. @@ -3912,12 +3912,12 @@ static _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo, void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight, bool bMinSize ) { - SwLayoutFrm* pLineFrm = GetRowFrm( rLine ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine?" ); + SwLayoutFrame* pLineFrame = GetRowFrame( rLine ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine?" ); SwFrameFormat* pFormat = rLine.ClaimFrameFormat(); - SwTwips nMyNewH, nMyOldH = pLineFrm->Frm().Height(); + SwTwips nMyNewH, nMyOldH = pLineFrame->Frame().Height(); if( !nOldHeight ) // the BaseLine and absolute nMyNewH = nMyOldH + nNewHeight; else @@ -3929,12 +3929,12 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight, nMyNewH = aTmp; } - SwFrmSize eSize = ATT_MIN_SIZE; + SwFrameSize eSize = ATT_MIN_SIZE; if( !bMinSize && - ( nMyOldH - nMyNewH ) > ( CalcRowRstHeight( pLineFrm ) + ROWFUZZY )) + ( nMyOldH - nMyNewH ) > ( CalcRowRstHeight( pLineFrame ) + ROWFUZZY )) eSize = ATT_FIX_SIZE; - pFormat->SetFormatAttr( SwFormatFrmSize( eSize, 0, nMyNewH ) ); + pFormat->SetFormatAttr( SwFormatFrameSize( eSize, 0, nMyNewH ) ); // First adapt all internal ones for( auto pBox : rLine.GetTabBoxes() ) @@ -3957,9 +3957,9 @@ static bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam, else if( !rParam.bBigger ) { // Calculate the new relative size by means of the old one - SwLayoutFrm* pLineFrm = GetRowFrm( *pLine ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine?" ); - SwTwips nRstHeight = CalcRowRstHeight( pLineFrm ); + SwLayoutFrame* pLineFrame = GetRowFrame( *pLine ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine?" ); + SwTwips nRstHeight = CalcRowRstHeight( pLineFrame ); if( (nRstHeight + ROWFUZZY) < nDist ) bRet = false; } @@ -3975,15 +3975,15 @@ static bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam if( rParam.bBigger ) { // Calculate the new relative size by means of the old one - SwLayoutFrm* pLineFrm = GetRowFrm( *pLine ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine?" ); + SwLayoutFrame* pLineFrame = GetRowFrame( *pLine ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine?" ); if( TBLFIX_CHGPROP == rParam.nMode ) { - nDist *= pLineFrm->Frm().Height(); + nDist *= pLineFrame->Frame().Height(); nDist /= rParam.nMaxHeight; } - bRet = nDist <= CalcRowRstHeight( pLineFrm ); + bRet = nDist <= CalcRowRstHeight( pLineFrame ); } } else @@ -3992,21 +3992,21 @@ static bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam // pLine is the following/preceding, thus adjust it if( TBLFIX_CHGPROP == rParam.nMode ) { - SwLayoutFrm* pLineFrm = GetRowFrm( *pLine ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine??" ); + SwLayoutFrame* pLineFrame = GetRowFrame( *pLine ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine??" ); // Calculate the new relative size by means of the old one // If the selected Box get bigger, adjust via the max space else // via the max height. if( true /*!rParam.bBigger*/ ) { - nDist *= pLineFrm->Frm().Height(); + nDist *= pLineFrame->Frame().Height(); nDist /= rParam.nMaxHeight; } else { // Calculate the new relative size by means of the old one - nDist *= CalcRowRstHeight( pLineFrm ); + nDist *= CalcRowRstHeight( pLineFrame ); nDist /= rParam.nMaxSpace; } } @@ -4055,7 +4055,7 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, pLines->insert( pLines->begin() + nPos, pNewLine ); SwFrameFormat* pNewFormat = pNewLine->ClaimFrameFormat(); - pNewFormat->SetFormatAttr( SwFormatFrmSize( ATT_MIN_SIZE, 0, nDist ) ); + pNewFormat->SetFormatAttr( SwFormatFrameSize( ATT_MIN_SIZE, 0, nDist ) ); // And once again calculate the Box count SwTableBoxes& rNewBoxes = pNewLine->GetTabBoxes(); @@ -4066,7 +4066,7 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, if( !pOld->GetSttNd() ) { // Not a normal content Box, so fall back to the 1st next Box - nWidth = pOld->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pOld->GetFrameFormat()->GetFrameSize().GetWidth(); while( !pOld->GetSttNd() ) pOld = pOld->GetTabLines()[ 0 ]->GetTabBoxes()[ 0 ]; } @@ -4087,7 +4087,7 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, if( nWidth ) rParam.aShareFormats.SetAttr( *rNewBoxes[ n ], - SwFormatFrmSize( ATT_FIX_SIZE, nWidth, 0 ) ); + SwFormatFrameSize( ATT_FIX_SIZE, nWidth, 0 ) ); } } } @@ -4166,7 +4166,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, { if( bInsDel && !bBigger ) // By how much does it get higher? { - nAbsDiff = GetRowFrm( *pBaseLine )->Frm().Height(); + nAbsDiff = GetRowFrame( *pBaseLine )->Frame().Height(); } if( TBLVAR_CHGABS == m_eTableChgMode ) @@ -4225,10 +4225,10 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, { for( auto n = nStt; n < nEnd; ++n ) { - SwLayoutFrm* pLineFrm = GetRowFrm( *(*pLines)[ n ] ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine??" ); - aParam.nMaxSpace += CalcRowRstHeight( pLineFrm ); - aParam.nMaxHeight += pLineFrm->Frm().Height(); + SwLayoutFrame* pLineFrame = GetRowFrame( *(*pLines)[ n ] ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine??" ); + aParam.nMaxSpace += CalcRowRstHeight( pLineFrame ); + aParam.nMaxHeight += pLineFrame->Frame().Height(); } if( bBigger && aParam.nMaxSpace < nAbsDiff ) bRet = false; @@ -4334,7 +4334,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, // Update Layout if( bBigger || xFndBox->AreLinesToRestore( *this ) ) - xFndBox->MakeFrms( *this ); + xFndBox->MakeFrames( *this ); // TL_CHART2: it is currently unclear if sth has to be done here. @@ -4358,7 +4358,7 @@ SwFrameFormat* SwShareBoxFormat::GetFormat( long nWidth ) const { SwFrameFormat *pRet = nullptr, *pTmp; for( auto n = aNewFormats.size(); n; ) - if( ( pTmp = aNewFormats[ --n ])->GetFrmSize().GetWidth() + if( ( pTmp = aNewFormats[ --n ])->GetFrameSize().GetWidth() == nWidth ) { pRet = pTmp; @@ -4372,11 +4372,11 @@ SwFrameFormat* SwShareBoxFormat::GetFormat( const SfxPoolItem& rItem ) const const SfxPoolItem* pItem; sal_uInt16 nWhich = rItem.Which(); SwFrameFormat *pRet = nullptr, *pTmp; - const SfxPoolItem& rFrmSz = pOldFormat->GetFormatAttr( RES_FRM_SIZE, false ); + const SfxPoolItem& rFrameSz = pOldFormat->GetFormatAttr( RES_FRM_SIZE, false ); for( auto n = aNewFormats.size(); n; ) if( SfxItemState::SET == ( pTmp = aNewFormats[ --n ])-> GetItemState( nWhich, false, &pItem ) && *pItem == rItem && - pTmp->GetFormatAttr( RES_FRM_SIZE, false ) == rFrmSz ) + pTmp->GetFormatAttr( RES_FRM_SIZE, false ) == rFrameSz ) { pRet = pTmp; break; @@ -4462,7 +4462,7 @@ void SwShareBoxFormats::ChangeFrameFormat( SwTableBox* pBox, SwTableLine* pLn, } } -void SwShareBoxFormats::SetSize( SwTableBox& rBox, const SwFormatFrmSize& rSz ) +void SwShareBoxFormats::SetSize( SwTableBox& rBox, const SwFormatFrameSize& rSz ) { SwFrameFormat *pBoxFormat = rBox.GetFrameFormat(), *pRet = GetFormat( *pBoxFormat, rSz.GetWidth() ); diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 4c89861a2c41..33c3ad0b4c16 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -152,13 +152,13 @@ std::set<const SwFrameFormat*> SwTextBoxHelper::findTextBoxes(const SwNode& rNod { const SwDoc* pDoc = rNode.GetDoc(); const SwContentNode* pContentNode = nullptr; - const SwContentFrm* pContentFrm = nullptr; + const SwContentFrame* pContentFrame = nullptr; bool bHaveViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); - if (bHaveViewShell && (pContentNode = rNode.GetContentNode()) && (pContentFrm = pContentNode->getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()))) + if (bHaveViewShell && (pContentNode = rNode.GetContentNode()) && (pContentFrame = pContentNode->getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()))) { // We can use the layout information to iterate over only the frames which are anchored to us. std::set<const SwFrameFormat*> aRet; - const SwSortedObjs* pSortedObjs = pContentFrm->GetDrawObjs(); + const SwSortedObjs* pSortedObjs = pContentFrame->GetDrawObjs(); if (pSortedObjs) { for (size_t i = 0; i < pSortedObjs->size(); ++i) @@ -620,7 +620,7 @@ void SwTextBoxHelper::restoreLinks(std::set<_ZSortFly>& rOld, std::vector<SwFram } } -void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) +void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet& rSet) { if (SwFrameFormat* pFormat = findTextBox(&rShape)) { @@ -644,7 +644,7 @@ void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) aTextBoxSet.Put(aOrient); // restore height (shrinked for extending beyond the page bottom - tdf#91260) - SwFormatFrmSize aSize(pFormat->GetFrmSize()); + SwFormatFrameSize aSize(pFormat->GetFrameSize()); if (!aRect.IsEmpty()) { aSize.SetHeight(aRect.getHeight()); @@ -672,7 +672,7 @@ void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) // textbox). SwFormatVertOrient aVertOrient(rShape.GetVertOrient()); SwFormatHoriOrient aHoriOrient(rShape.GetHoriOrient()); - SwFormatFrmSize aSize(pFormat->GetFrmSize()); + SwFormatFrameSize aSize(pFormat->GetFrameSize()); Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); if (!aRect.IsEmpty()) @@ -690,7 +690,7 @@ void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) } break; default: - SAL_WARN("sw.core", "SwTextBoxHelper::syncFlyFrmAttr: unhandled which-id: " << nWhich); + SAL_WARN("sw.core", "SwTextBoxHelper::syncFlyFrameAttr: unhandled which-id: " << nWhich); break; } @@ -700,7 +700,7 @@ void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) while (0 != (nWhich = aIter.NextItem()->Which())); if (aTextBoxSet.Count()) - pFormat->GetDoc()->SetFlyFrmAttr(*pFormat, aTextBoxSet); + pFormat->GetDoc()->SetFlyFrameAttr(*pFormat, aTextBoxSet); } } |