diff options
Diffstat (limited to 'sw/source/core/fields/docufld.cxx')
-rw-r--r-- | sw/source/core/fields/docufld.cxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 45c0caa71c9d..cd54815d2ea0 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -159,7 +159,7 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc, const SwContentNode* pNd = dynamic_cast<const SwContentNode*>( pDesc->GetDefinedIn() ); if( pNd ) { - if ( SwIterator<SwFrm,SwContentNode>(*pNd).First() ) + if ( SwIterator<SwFrame,SwContentNode>(*pNd).First() ) bVirtuell = true; } else if( dynamic_cast< const SwFormat* >(pDesc->GetDefinedIn()) != nullptr) @@ -792,11 +792,11 @@ void SwDocStatField::SetSubType(sal_uInt16 nSub) nSubType = nSub; } -void SwDocStatField::ChangeExpansion( const SwFrm* pFrm ) +void SwDocStatField::ChangeExpansion( const SwFrame* pFrame ) { if( DS_PAGE == nSubType && SVX_NUM_PAGEDESC == GetFormat() ) static_cast<SwDocStatFieldType*>(GetTyp())->SetNumFormat( - pFrm->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType() ); + pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType() ); } bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const @@ -2104,15 +2104,15 @@ bool SwRefPageGetFieldType::MakeSetList( _SetGetExpFields& rTmpLst ) // Always the first! (in Tab-Headline, header/footer ) Point aPt; - const SwContentFrm* pFrm = rTextNd.getLayoutFrm( rTextNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwContentFrame* pFrame = rTextNd.getLayoutFrame( rTextNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); _SetGetExpField* pNew; - if( !pFrm || - pFrm->IsInDocBody() || + if( !pFrame || + pFrame->IsInDocBody() || // #i31868# - // Check if pFrm is not yet connected to the layout. - !pFrm->FindPageFrm() ) + // Check if pFrame is not yet connected to the layout. + !pFrame->FindPageFrame() ) { // create index for determination of the TextNode SwNodeIndex aIdx( rTextNd ); @@ -2122,7 +2122,7 @@ bool SwRefPageGetFieldType::MakeSetList( _SetGetExpFields& rTmpLst ) { // create index for determination of the TextNode SwPosition aPos( pDoc->GetNodes().GetEndOfPostIts() ); - bool const bResult = GetBodyTextNode( *pDoc, aPos, *pFrm ); + bool const bResult = GetBodyTextNode( *pDoc, aPos, *pFrame ); OSL_ENSURE(bResult, "where is the Field?"); (void) bResult; // unused in non-debug pNew = new _SetGetExpField( aPos.nNode, pTField, @@ -2163,18 +2163,18 @@ void SwRefPageGetFieldType::UpdateField( SwTextField* pTextField, { // determine the correct offset Point aPt; - const SwContentFrm* pFrm = pTextNode->getLayoutFrm( pTextNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - const SwContentFrm* pRefFrm = pRefTextField->GetTextNode().getLayoutFrm( pRefTextField->GetTextNode().GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - const SwPageFrm* pPgFrm = nullptr; - const short nDiff = ( pFrm && pRefFrm ) - ? (pPgFrm = pFrm->FindPageFrm())->GetPhyPageNum() - - pRefFrm->FindPageFrm()->GetPhyPageNum() + 1 + const SwContentFrame* pFrame = pTextNode->getLayoutFrame( pTextNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwContentFrame* pRefFrame = pRefTextField->GetTextNode().getLayoutFrame( pRefTextField->GetTextNode().GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwPageFrame* pPgFrame = nullptr; + const short nDiff = ( pFrame && pRefFrame ) + ? (pPgFrame = pFrame->FindPageFrame())->GetPhyPageNum() - + pRefFrame->FindPageFrame()->GetPhyPageNum() + 1 : 1; sal_uInt32 nTmpFormat = SVX_NUM_PAGEDESC == pGetField->GetFormat() - ? ( !pPgFrm + ? ( !pPgFrame ? (sal_uInt32)SVX_NUM_ARABIC - : pPgFrm->GetPageDesc()->GetNumType().GetNumberingType() ) + : pPgFrame->GetPageDesc()->GetNumType().GetNumberingType() ) : pGetField->GetFormat(); const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff); pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) ); @@ -2206,7 +2206,7 @@ SwField* SwRefPageGetField::Copy() const return pCpy; } -void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm, +void SwRefPageGetField::ChangeExpansion( const SwFrame* pFrame, const SwTextField* pField ) { // only fields in Footer, Header, FootNote, Flys @@ -2218,7 +2218,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm, sText.clear(); - OSL_ENSURE( !pFrm->IsInDocBody(), "Flag incorrect, frame is in DocBody" ); + OSL_ENSURE( !pFrame->IsInDocBody(), "Flag incorrect, frame is in DocBody" ); // collect all SetPageRefFields _SetGetExpFields aTmpLst; @@ -2227,7 +2227,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm, // create index for determination of the TextNode SwPosition aPos( SwNodeIndex( pDoc->GetNodes() ) ); - SwTextNode* pTextNode = const_cast<SwTextNode*>(GetBodyTextNode( *pDoc, aPos, *pFrm )); + SwTextNode* pTextNode = const_cast<SwTextNode*>(GetBodyTextNode( *pDoc, aPos, *pFrame )); // If no layout exists, ChangeExpansion is called for header and // footer lines via layout formatting without existing TextNode. @@ -2246,17 +2246,17 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm, const SwRefPageSetField* pSetField = static_cast<const SwRefPageSetField*>(pRefTextField->GetFormatField().GetField()); Point aPt; - const SwContentFrm* pRefFrm = pRefTextField->GetTextNode().getLayoutFrm( pFrm->getRootFrm(), &aPt, nullptr, false ); - if( pSetField->IsOn() && pRefFrm ) + const SwContentFrame* pRefFrame = pRefTextField->GetTextNode().getLayoutFrame( pFrame->getRootFrame(), &aPt, nullptr, false ); + if( pSetField->IsOn() && pRefFrame ) { // determine the correct offset - const SwPageFrm* pPgFrm = pFrm->FindPageFrm(); - const short nDiff = pPgFrm->GetPhyPageNum() - - pRefFrm->FindPageFrm()->GetPhyPageNum() + 1; + const SwPageFrame* pPgFrame = pFrame->FindPageFrame(); + const short nDiff = pPgFrame->GetPhyPageNum() - + pRefFrame->FindPageFrame()->GetPhyPageNum() + 1; SwRefPageGetField* pGetField = const_cast<SwRefPageGetField*>(static_cast<const SwRefPageGetField*>(pField->GetFormatField().GetField())); sal_uInt32 nTmpFormat = SVX_NUM_PAGEDESC == pGetField->GetFormat() - ? pPgFrm->GetPageDesc()->GetNumType().GetNumberingType() + ? pPgFrame->GetPageDesc()->GetNumType().GetNumberingType() : pGetField->GetFormat(); const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff); pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) ); |