diff options
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/SwGrammarContact.cxx | 54 | ||||
-rw-r--r-- | sw/source/core/txtnode/atrfld.cxx | 354 | ||||
-rw-r--r-- | sw/source/core/txtnode/atrflyin.cxx | 150 | ||||
-rw-r--r-- | sw/source/core/txtnode/atrftn.cxx | 224 | ||||
-rw-r--r-- | sw/source/core/txtnode/atrref.cxx | 34 | ||||
-rw-r--r-- | sw/source/core/txtnode/atrtox.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/txtnode/chrfmt.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/txtnode/fmtatr2.cxx | 418 | ||||
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 104 | ||||
-rw-r--r-- | sw/source/core/txtnode/fntcap.cxx | 44 | ||||
-rw-r--r-- | sw/source/core/txtnode/modeltoviewhelper.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndhints.cxx | 76 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 1574 | ||||
-rw-r--r-- | sw/source/core/txtnode/swfntcch.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/txtnode/swfont.cxx | 32 | ||||
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 824 | ||||
-rw-r--r-- | sw/source/core/txtnode/txatbase.cxx | 32 | ||||
-rw-r--r-- | sw/source/core/txtnode/txatritr.cxx | 24 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtatr2.cxx | 188 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 256 |
20 files changed, 2220 insertions, 2220 deletions
diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx index caa60485b010..d1895dcf60df 100644 --- a/sw/source/core/txtnode/SwGrammarContact.cxx +++ b/sw/source/core/txtnode/SwGrammarContact.cxx @@ -43,7 +43,7 @@ class SwGrammarContact : public IGrammarContact, public SwClient Timer aTimer; SwGrammarMarkUp *mpProxyList; bool mbFinished; - SwTxtNode* getMyTxtNode() { return static_cast<SwTxtNode*>(GetRegisteredIn()); } + SwTextNode* getMyTextNode() { return static_cast<SwTextNode*>(GetRegisteredIn()); } DECL_LINK_TYPED( TimerRepaint, Timer *, void ); public: @@ -52,8 +52,8 @@ public: // (pure) virtual functions of IGrammarContact virtual void updateCursorPosition( const SwPosition& rNewPos ) SAL_OVERRIDE; - virtual SwGrammarMarkUp* getGrammarCheck( SwTxtNode& rTxtNode, bool bCreate ) SAL_OVERRIDE; - virtual void finishGrammarCheck( SwTxtNode& rTxtNode ) SAL_OVERRIDE; + virtual SwGrammarMarkUp* getGrammarCheck( SwTextNode& rTextNode, bool bCreate ) SAL_OVERRIDE; + virtual void finishGrammarCheck( SwTextNode& rTextNode ) SAL_OVERRIDE; protected: // virtual function of SwClient virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE; @@ -72,9 +72,9 @@ IMPL_LINK_TYPED( SwGrammarContact, TimerRepaint, Timer *, pTimer, void ) pTimer->Stop(); if( GetRegisteredIn() ) { //Replace the old wrong list by the proxy list and repaint all frames - getMyTxtNode()->SetGrammarCheck( mpProxyList, true ); + getMyTextNode()->SetGrammarCheck( mpProxyList, true ); mpProxyList = 0; - SwTxtFrm::repaintTextFrames( *getMyTxtNode() ); + SwTextFrm::repaintTextFrames( *getMyTextNode() ); } } } @@ -82,30 +82,30 @@ IMPL_LINK_TYPED( SwGrammarContact, TimerRepaint, Timer *, pTimer, void ) /* I'm always a client of the current paragraph */ void SwGrammarContact::updateCursorPosition( const SwPosition& rNewPos ) { - SwTxtNode* pTxtNode = rNewPos.nNode.GetNode().GetTxtNode(); - if( pTxtNode != GetRegisteredIn() ) // paragraph has been changed + SwTextNode* pTextNode = rNewPos.nNode.GetNode().GetTextNode(); + if( pTextNode != GetRegisteredIn() ) // paragraph has been changed { aTimer.Stop(); if( GetRegisteredIn() ) // My last paragraph has been left { if( mpProxyList ) { // replace old list by the proxy list and repaint - getMyTxtNode()->SetGrammarCheck( mpProxyList, true ); - SwTxtFrm::repaintTextFrames( *getMyTxtNode() ); + getMyTextNode()->SetGrammarCheck( mpProxyList, true ); + SwTextFrm::repaintTextFrames( *getMyTextNode() ); } GetRegisteredInNonConst()->Remove( this ); // good bye old paragraph mpProxyList = 0; } - if( pTxtNode ) - pTxtNode->Add( this ); // welcome new paragraph + if( pTextNode ) + pTextNode->Add( this ); // welcome new paragraph } } /* deliver a grammar check list for the given text node */ -SwGrammarMarkUp* SwGrammarContact::getGrammarCheck( SwTxtNode& rTxtNode, bool bCreate ) +SwGrammarMarkUp* SwGrammarContact::getGrammarCheck( SwTextNode& rTextNode, bool bCreate ) { SwGrammarMarkUp *pRet = 0; - if( GetRegisteredIn() == &rTxtNode ) // hey, that's my current paragraph! + if( GetRegisteredIn() == &rTextNode ) // hey, that's my current paragraph! { // so you will get a proxy list... if( bCreate ) { @@ -116,8 +116,8 @@ SwGrammarMarkUp* SwGrammarContact::getGrammarCheck( SwTxtNode& rTxtNode, bool bC } if( !mpProxyList ) { - if( rTxtNode.GetGrammarCheck() ) - mpProxyList = static_cast<SwGrammarMarkUp*>(rTxtNode.GetGrammarCheck()->Clone()); + if( rTextNode.GetGrammarCheck() ) + mpProxyList = static_cast<SwGrammarMarkUp*>(rTextNode.GetGrammarCheck()->Clone()); else { mpProxyList = new SwGrammarMarkUp(); @@ -130,13 +130,13 @@ SwGrammarMarkUp* SwGrammarContact::getGrammarCheck( SwTxtNode& rTxtNode, bool bC } else { - pRet = rTxtNode.GetGrammarCheck(); // do you have already a list? + pRet = rTextNode.GetGrammarCheck(); // do you have already a list? if( bCreate && !pRet ) // do you want to create a list? { pRet = new SwGrammarMarkUp(); pRet->SetInvalid( 0, COMPLETE_STRING ); - rTxtNode.SetGrammarCheck( pRet ); - rTxtNode.SetGrammarCheckDirty( true ); + rTextNode.SetGrammarCheck( pRet ); + rTextNode.SetGrammarCheckDirty( true ); } } return pRet; @@ -157,10 +157,10 @@ void SwGrammarContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem * ) } } -void SwGrammarContact::finishGrammarCheck( SwTxtNode& rTxtNode ) +void SwGrammarContact::finishGrammarCheck( SwTextNode& rTextNode ) { - if( &rTxtNode != GetRegisteredIn() ) // not my paragraph - SwTxtFrm::repaintTextFrames( rTxtNode ); // can be repainted directly + if( &rTextNode != GetRegisteredIn() ) // not my paragraph + SwTextFrm::repaintTextFrames( rTextNode ); // can be repainted directly else { if( mpProxyList ) @@ -168,10 +168,10 @@ void SwGrammarContact::finishGrammarCheck( SwTxtNode& rTxtNode ) mbFinished = true; aTimer.Start(); // will replace old list and repaint with delay } - else if( getMyTxtNode()->GetGrammarCheck() ) + else if( getMyTextNode()->GetGrammarCheck() ) { // all grammar problems seems to be gone, no delay needed - getMyTxtNode()->SetGrammarCheck( 0, true ); - SwTxtFrm::repaintTextFrames( *getMyTxtNode() ); + getMyTextNode()->SetGrammarCheck( 0, true ); + SwTextFrm::repaintTextFrames( *getMyTextNode() ); } } } @@ -181,11 +181,11 @@ IGrammarContact* createGrammarContact() return new SwGrammarContact(); } -void finishGrammarCheck( SwTxtNode& rTxtNode ) +void finishGrammarCheck( SwTextNode& rTextNode ) { - IGrammarContact* pGrammarContact = getGrammarContact( rTxtNode ); + IGrammarContact* pGrammarContact = getGrammarContact( rTextNode ); if( pGrammarContact ) - pGrammarContact->finishGrammarCheck( rTxtNode ); + pGrammarContact->finishGrammarCheck( rTextNode ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 2fb6b160b58a..0a25e5921637 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -38,35 +38,35 @@ #include <fieldhint.hxx> #include <svl/smplhint.hxx> -TYPEINIT3(SwFmtFld, SfxPoolItem, SwModify, SfxBroadcaster) +TYPEINIT3(SwFormatField, SfxPoolItem, SwModify, SfxBroadcaster) // constructor for default item in attribute-pool -SwFmtFld::SwFmtFld( sal_uInt16 nWhich ) +SwFormatField::SwFormatField( sal_uInt16 nWhich ) : SfxPoolItem( nWhich ) , SwModify(0) , SfxBroadcaster() , mpField( NULL ) - , mpTxtFld( NULL ) + , mpTextField( NULL ) { } -SwFmtFld::SwFmtFld( const SwField &rFld ) +SwFormatField::SwFormatField( const SwField &rField ) : SfxPoolItem( RES_TXTATR_FIELD ) - , SwModify( rFld.GetTyp() ) + , SwModify( rField.GetTyp() ) , SfxBroadcaster() - , mpField( rFld.CopyField() ) - , mpTxtFld( NULL ) + , mpField( rField.CopyField() ) + , mpTextField( NULL ) { if ( GetField()->GetTyp()->Which() == RES_INPUTFLD ) { // input field in-place editing SetWhich( RES_TXTATR_INPUTFIELD ); - static_cast<SwInputField*>(GetField())->SetFmtFld( *this ); + static_cast<SwInputField*>(GetField())->SetFormatField( *this ); } else if (GetField()->GetTyp()->Which() == RES_SETEXPFLD) { - // see SwWrtShell::StartInputFldDlg - static_cast<SwSetExpField *>(GetField())->SetFmtFld(*this); + // see SwWrtShell::StartInputFieldDlg + static_cast<SwSetExpField *>(GetField())->SetFormatField(*this); } else if ( GetField()->GetTyp()->Which() == RES_POSTITFLD ) { @@ -79,12 +79,12 @@ SwFmtFld::SwFmtFld( const SwField &rFld ) // Since Items are used in ItemPool and in default constructed ItemSets with // full pool range, all items need to be clonable. Thus, this one needed to be // corrected -SwFmtFld::SwFmtFld( const SwFmtFld& rAttr ) +SwFormatField::SwFormatField( const SwFormatField& rAttr ) : SfxPoolItem( RES_TXTATR_FIELD ) , SwModify(0) , SfxBroadcaster() , mpField( NULL ) - , mpTxtFld( NULL ) + , mpTextField( NULL ) { if ( rAttr.GetField() ) { @@ -97,12 +97,12 @@ SwFmtFld::SwFmtFld( const SwFmtFld& rAttr ) SwInputField *pField = dynamic_cast<SwInputField*>(GetField()); assert(pField); if (pField) - pField->SetFmtFld( *this ); + pField->SetFormatField( *this ); } else if (GetField()->GetTyp()->Which() == RES_SETEXPFLD) { - // see SwWrtShell::StartInputFldDlg - static_cast<SwSetExpField *>(GetField())->SetFmtFld(*this); + // see SwWrtShell::StartInputFieldDlg + static_cast<SwSetExpField *>(GetField())->SetFormatField(*this); } else if ( GetField()->GetTyp()->Which() == RES_POSTITFLD ) { @@ -112,14 +112,14 @@ SwFmtFld::SwFmtFld( const SwFmtFld& rAttr ) } } -SwFmtFld::~SwFmtFld() +SwFormatField::~SwFormatField() { SwFieldType* pType = mpField ? mpField->GetTyp() : 0; if (pType && pType->Which() == RES_DBFLD) pType = 0; // DB-Feldtypen zerstoeren sich selbst - Broadcast( SwFmtFldHint( this, SwFmtFldHintWhich::REMOVED ) ); + Broadcast( SwFormatFieldHint( this, SwFormatFieldHintWhich::REMOVED ) ); delete mpField; // bei einige FeldTypen muessen wir den FeldTypen noch loeschen @@ -150,64 +150,64 @@ SwFmtFld::~SwFmtFld() } } -void SwFmtFld::RegisterToFieldType( SwFieldType& rType ) +void SwFormatField::RegisterToFieldType( SwFieldType& rType ) { rType.Add(this); } // #111840# -void SwFmtFld::SetField(SwField * _pField) +void SwFormatField::SetField(SwField * _pField) { delete mpField; mpField = _pField; if ( GetField()->GetTyp()->Which() == RES_INPUTFLD ) { - static_cast<SwInputField* >(GetField())->SetFmtFld( *this ); + static_cast<SwInputField* >(GetField())->SetFormatField( *this ); } else if (GetField()->GetTyp()->Which() == RES_SETEXPFLD) { - // see SwWrtShell::StartInputFldDlg - static_cast<SwSetExpField *>(GetField())->SetFmtFld(*this); + // see SwWrtShell::StartInputFieldDlg + static_cast<SwSetExpField *>(GetField())->SetFormatField(*this); } - Broadcast( SwFmtFldHint( this, SwFmtFldHintWhich::CHANGED ) ); + Broadcast( SwFormatFieldHint( this, SwFormatFieldHintWhich::CHANGED ) ); } -void SwFmtFld::SetTxtFld( SwTxtFld& rTxtFld ) +void SwFormatField::SetTextField( SwTextField& rTextField ) { - mpTxtFld = &rTxtFld; + mpTextField = &rTextField; } -void SwFmtFld::ClearTxtFld() +void SwFormatField::ClearTextField() { - mpTxtFld = NULL; + mpTextField = NULL; } -bool SwFmtFld::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatField::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return ( ( mpField && static_cast<const SwFmtFld&>(rAttr).GetField() - && mpField->GetTyp() == static_cast<const SwFmtFld&>(rAttr).GetField()->GetTyp() - && mpField->GetFormat() == static_cast<const SwFmtFld&>(rAttr).GetField()->GetFormat() ) ) - || ( !mpField && !static_cast<const SwFmtFld&>(rAttr).GetField() ); + return ( ( mpField && static_cast<const SwFormatField&>(rAttr).GetField() + && mpField->GetTyp() == static_cast<const SwFormatField&>(rAttr).GetField()->GetTyp() + && mpField->GetFormat() == static_cast<const SwFormatField&>(rAttr).GetField()->GetFormat() ) ) + || ( !mpField && !static_cast<const SwFormatField&>(rAttr).GetField() ); } -SfxPoolItem* SwFmtFld::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatField::Clone( SfxItemPool* ) const { - return new SwFmtFld( *this ); + return new SwFormatField( *this ); } -void SwFmtFld::InvalidateField() +void SwFormatField::InvalidateField() { SwPtrMsgPoolItem const item(RES_REMOVE_UNO_OBJECT, &static_cast<SwModify&>(*this)); // cast to base class (void*) NotifyClients(&item, &item); } -void SwFmtFld::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) +void SwFormatField::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) { SwClient::SwClientNotify(rModify, rHint); - if( !mpTxtFld ) + if( !mpTextField ) return; const SwFieldHint* pHint = dynamic_cast<const SwFieldHint*>( &rHint ); @@ -216,9 +216,9 @@ void SwFmtFld::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) // replace field content by text SwPaM* pPaM = pHint->GetPaM(); SwDoc* pDoc = pPaM->GetDoc(); - const SwTxtNode& rTxtNode = mpTxtFld->GetTxtNode(); - pPaM->GetPoint()->nNode = rTxtNode; - pPaM->GetPoint()->nContent.Assign( const_cast<SwTxtNode*>(&rTxtNode), mpTxtFld->GetStart() ); + const SwTextNode& rTextNode = mpTextField->GetTextNode(); + pPaM->GetPoint()->nNode = rTextNode; + pPaM->GetPoint()->nContent.Assign( const_cast<SwTextNode*>(&rTextNode), mpTextField->GetStart() ); OUString const aEntry( GetField()->ExpandField( pDoc->IsClipBoard() ) ); pPaM->SetMark(); @@ -228,7 +228,7 @@ void SwFmtFld::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) } } -void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwFormatField::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) { // invalidate cached UNO object @@ -238,15 +238,15 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) return; } - if( !mpTxtFld ) + if( !mpTextField ) return; // don't do anything, especially not expand! if( pNew && pNew->Which() == RES_OBJECTDYING ) return; - SwTxtNode* pTxtNd = &mpTxtFld->GetTxtNode(); - OSL_ENSURE( pTxtNd, "wo ist denn mein Node?" ); + SwTextNode* pTextNd = &mpTextField->GetTextNode(); + OSL_ENSURE( pTextNd, "wo ist denn mein Node?" ); if( pNew ) { switch( pNew->Which() ) @@ -254,24 +254,24 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) case RES_TXTATR_FLDCHG: // "Farbe hat sich geaendert !" // this, this fuer "nur Painten" - pTxtNd->ModifyNotification( this, this ); + pTextNd->ModifyNotification( this, this ); return; case RES_REFMARKFLD_UPDATE: // GetReferenz-Felder aktualisieren if( RES_GETREFFLD == GetField()->GetTyp()->Which() ) { // #i81002# - static_cast<SwGetRefField*>(GetField())->UpdateField( mpTxtFld ); + static_cast<SwGetRefField*>(GetField())->UpdateField( mpTextField ); } break; case RES_DOCPOS_UPDATE: - // Je nach DocPos aktualisieren (SwTxtFrm::Modify()) - pTxtNd->ModifyNotification( pNew, this ); + // Je nach DocPos aktualisieren (SwTextFrm::Modify()) + pTextNd->ModifyNotification( pNew, this ); return; case RES_ATTRSET_CHG: case RES_FMT_CHG: - pTxtNd->ModifyNotification( pOld, pNew ); + pTextNd->ModifyNotification( pOld, pNew ); return; default: break; @@ -287,7 +287,7 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) case RES_DBNUMSETFLD: case RES_DBNEXTSETFLD: case RES_DBNAMEFLD: - pTxtNd->ModifyNotification( 0, pNew); + pTextNd->ModifyNotification( 0, pNew); return; } @@ -296,93 +296,93 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) SwUserFieldType* pType = static_cast<SwUserFieldType*>(GetField()->GetTyp()); if(!pType->IsValid()) { - SwCalc aCalc( *pTxtNd->GetDoc() ); + SwCalc aCalc( *pTextNd->GetDoc() ); pType->GetValue( aCalc ); } } const bool bForceNotify = (pOld == NULL) && (pNew == NULL); - mpTxtFld->ExpandTxtFld( bForceNotify ); + mpTextField->ExpandTextField( bForceNotify ); } -bool SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const +bool SwFormatField::GetInfo( SfxPoolItem& rInfo ) const { - const SwTxtNode* pTxtNd; + const SwTextNode* pTextNd; if( RES_AUTOFMT_DOCNODE != rInfo.Which() || - !mpTxtFld || 0 == ( pTxtNd = mpTxtFld->GetpTxtNode() ) || - &pTxtNd->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes ) + !mpTextField || 0 == ( pTextNd = mpTextField->GetpTextNode() ) || + &pTextNd->GetNodes() != static_cast<SwAutoFormatGetDocNode&>(rInfo).pNodes ) return true; - static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = pTxtNd; + static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = pTextNd; return false; } -bool SwFmtFld::IsFldInDoc() const +bool SwFormatField::IsFieldInDoc() const { - return mpTxtFld != NULL - && mpTxtFld->IsFldInDoc(); + return mpTextField != NULL + && mpTextField->IsFieldInDoc(); } -bool SwFmtFld::IsProtect() const +bool SwFormatField::IsProtect() const { - return mpTxtFld != NULL - && mpTxtFld->GetpTxtNode() != NULL - && mpTxtFld->GetpTxtNode()->IsProtect(); + return mpTextField != NULL + && mpTextField->GetpTextNode() != NULL + && mpTextField->GetpTextNode()->IsProtect(); } -// class SwTxtFld //////////////////////////////////////////////////// +// class SwTextField //////////////////////////////////////////////////// -SwTxtFld::SwTxtFld( - SwFmtFld & rAttr, +SwTextField::SwTextField( + SwFormatField & rAttr, sal_Int32 const nStartPos, bool const bInClipboard) - : SwTxtAttr( rAttr, nStartPos ) + : SwTextAttr( rAttr, nStartPos ) // fdo#39694 the ExpandField here may not give the correct result in all cases, // but is better than nothing , m_aExpand( rAttr.GetField()->ExpandField(bInClipboard) ) - , m_pTxtNode( NULL ) + , m_pTextNode( NULL ) { - rAttr.SetTxtFld( *this ); + rAttr.SetTextField( *this ); SetHasDummyChar(true); } -SwTxtFld::~SwTxtFld( ) +SwTextField::~SwTextField( ) { - SwFmtFld & rFmtFld( static_cast<SwFmtFld &>(GetAttr()) ); - if ( this == rFmtFld.GetTxtFld() ) + SwFormatField & rFormatField( static_cast<SwFormatField &>(GetAttr()) ); + if ( this == rFormatField.GetTextField() ) { - rFmtFld.ClearTxtFld(); + rFormatField.ClearTextField(); } } -bool SwTxtFld::IsFldInDoc() const +bool SwTextField::IsFieldInDoc() const { - return GetpTxtNode() != NULL - && GetpTxtNode()->GetNodes().IsDocNodes(); + return GetpTextNode() != NULL + && GetpTextNode()->GetNodes().IsDocNodes(); } -void SwTxtFld::ExpandTxtFld(const bool bForceNotify) const +void SwTextField::ExpandTextField(const bool bForceNotify) const { - OSL_ENSURE( m_pTxtNode, "SwTxtFld: where is my TxtNode?" ); + OSL_ENSURE( m_pTextNode, "SwTextField: where is my TextNode?" ); - const SwField* pFld = GetFmtFld().GetField(); - const OUString aNewExpand( pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) ); + const SwField* pField = GetFormatField().GetField(); + const OUString aNewExpand( pField->ExpandField(m_pTextNode->GetDoc()->IsClipBoard()) ); if (aNewExpand == m_aExpand) { // Bei Seitennummernfeldern - const sal_uInt16 nWhich = pFld->GetTyp()->Which(); + const sal_uInt16 nWhich = pField->GetTyp()->Which(); if ( RES_CHAPTERFLD != nWhich && RES_PAGENUMBERFLD != nWhich && RES_REFPAGEGETFLD != nWhich // Page count fields to not use aExpand during formatting, // therefore an invalidation of the text frame has to be triggered even if aNewExpand == aExpand: - && ( RES_DOCSTATFLD != nWhich || DS_PAGE != static_cast<const SwDocStatField*>(pFld)->GetSubType() ) - && ( RES_GETEXPFLD != nWhich || static_cast<const SwGetExpField*>(pFld)->IsInBodyTxt() ) ) + && ( RES_DOCSTATFLD != nWhich || DS_PAGE != static_cast<const SwDocStatField*>(pField)->GetSubType() ) + && ( RES_GETEXPFLD != nWhich || static_cast<const SwGetExpField*>(pField)->IsInBodyText() ) ) { - if( m_pTxtNode->CalcHiddenParaField() ) + if( m_pTextNode->CalcHiddenParaField() ) { - m_pTxtNode->ModifyNotification( 0, 0 ); + m_pTextNode->ModifyNotification( 0, 0 ); } if ( !bForceNotify ) { @@ -394,230 +394,230 @@ void SwTxtFld::ExpandTxtFld(const bool bForceNotify) const m_aExpand = aNewExpand; - const_cast<SwTxtFld*>(this)->NotifyContentChange( const_cast<SwFmtFld&>(GetFmtFld()) ); + const_cast<SwTextField*>(this)->NotifyContentChange( const_cast<SwFormatField&>(GetFormatField()) ); } -void SwTxtFld::CopyTxtFld( SwTxtFld *pDest ) const +void SwTextField::CopyTextField( SwTextField *pDest ) const { - OSL_ENSURE( m_pTxtNode, "SwTxtFld: where is my TxtNode?" ); - OSL_ENSURE( pDest->m_pTxtNode, "SwTxtFld: where is pDest's TxtNode?" ); + OSL_ENSURE( m_pTextNode, "SwTextField: where is my TextNode?" ); + OSL_ENSURE( pDest->m_pTextNode, "SwTextField: where is pDest's TextNode?" ); - IDocumentFieldsAccess* pIDFA = m_pTxtNode->getIDocumentFieldsAccess(); - IDocumentFieldsAccess* pDestIDFA = pDest->m_pTxtNode->getIDocumentFieldsAccess(); + IDocumentFieldsAccess* pIDFA = m_pTextNode->getIDocumentFieldsAccess(); + IDocumentFieldsAccess* pDestIDFA = pDest->m_pTextNode->getIDocumentFieldsAccess(); - SwFmtFld& rDestFmtFld = (SwFmtFld&)pDest->GetFmtFld(); - const sal_uInt16 nFldWhich = rDestFmtFld.GetField()->GetTyp()->Which(); + SwFormatField& rDestFormatField = (SwFormatField&)pDest->GetFormatField(); + const sal_uInt16 nFieldWhich = rDestFormatField.GetField()->GetTyp()->Which(); if( pIDFA != pDestIDFA ) { // Die Hints stehen in unterschiedlichen Dokumenten, // der Feldtyp muss im neuen Dokument angemeldet werden. // Z.B: Kopieren ins ClipBoard. - SwFieldType* pFldType; - if( nFldWhich != RES_DBFLD - && nFldWhich != RES_USERFLD - && nFldWhich != RES_SETEXPFLD - && nFldWhich != RES_DDEFLD - && RES_AUTHORITY != nFldWhich ) + SwFieldType* pFieldType; + if( nFieldWhich != RES_DBFLD + && nFieldWhich != RES_USERFLD + && nFieldWhich != RES_SETEXPFLD + && nFieldWhich != RES_DDEFLD + && RES_AUTHORITY != nFieldWhich ) { - pFldType = pDestIDFA->GetSysFldType( nFldWhich ); + pFieldType = pDestIDFA->GetSysFieldType( nFieldWhich ); } else { - pFldType = pDestIDFA->InsertFldType( *rDestFmtFld.GetField()->GetTyp() ); + pFieldType = pDestIDFA->InsertFieldType( *rDestFormatField.GetField()->GetTyp() ); } // Sonderbehandlung fuer DDE-Felder - if( RES_DDEFLD == nFldWhich ) + if( RES_DDEFLD == nFieldWhich ) { - if( rDestFmtFld.GetTxtFld() ) + if( rDestFormatField.GetTextField() ) { - static_cast<SwDDEFieldType*>(rDestFmtFld.GetField()->GetTyp())->DecRefCnt(); + static_cast<SwDDEFieldType*>(rDestFormatField.GetField()->GetTyp())->DecRefCnt(); } - static_cast<SwDDEFieldType*>(pFldType)->IncRefCnt(); + static_cast<SwDDEFieldType*>(pFieldType)->IncRefCnt(); } - OSL_ENSURE( pFldType, "unbekannter FieldType" ); - pFldType->Add( &rDestFmtFld ); // ummelden - rDestFmtFld.GetField()->ChgTyp( pFldType ); + OSL_ENSURE( pFieldType, "unbekannter FieldType" ); + pFieldType->Add( &rDestFormatField ); // ummelden + rDestFormatField.GetField()->ChgTyp( pFieldType ); } // Expressionfelder Updaten - if( nFldWhich == RES_SETEXPFLD - || nFldWhich == RES_GETEXPFLD - || nFldWhich == RES_HIDDENTXTFLD ) + if( nFieldWhich == RES_SETEXPFLD + || nFieldWhich == RES_GETEXPFLD + || nFieldWhich == RES_HIDDENTXTFLD ) { - SwTxtFld* pFld = const_cast<SwTxtFld*>(this); - pDestIDFA->UpdateExpFlds( pFld, true ); + SwTextField* pField = const_cast<SwTextField*>(this); + pDestIDFA->UpdateExpFields( pField, true ); } // Tabellenfelder auf externe Darstellung - else if( RES_TABLEFLD == nFldWhich - && static_cast<SwTblField*>(rDestFmtFld.GetField())->IsIntrnlName() ) + else if( RES_TABLEFLD == nFieldWhich + && static_cast<SwTableField*>(rDestFormatField.GetField())->IsIntrnlName() ) { // erzeuge aus der internen (fuer CORE) die externe (fuer UI) Formel - const SwTableNode* pTblNd = m_pTxtNode->FindTableNode(); - if( pTblNd ) // steht in einer Tabelle - static_cast<SwTblField*>(rDestFmtFld.GetField())->PtrToBoxNm( &pTblNd->GetTable() ); + const SwTableNode* pTableNd = m_pTextNode->FindTableNode(); + if( pTableNd ) // steht in einer Tabelle + static_cast<SwTableField*>(rDestFormatField.GetField())->PtrToBoxNm( &pTableNd->GetTable() ); } } -void SwTxtFld::NotifyContentChange(SwFmtFld& rFmtFld) +void SwTextField::NotifyContentChange(SwFormatField& rFormatField) { //if not in undo section notify the change - if (m_pTxtNode && m_pTxtNode->GetNodes().IsDocNodes()) + if (m_pTextNode && m_pTextNode->GetNodes().IsDocNodes()) { - m_pTxtNode->ModifyNotification(0, &rFmtFld); + m_pTextNode->ModifyNotification(0, &rFormatField); } } /*static*/ -void SwTxtFld::GetPamForTxtFld( - const SwTxtFld& rTxtFld, - boost::shared_ptr< SwPaM >& rPamForTxtFld ) +void SwTextField::GetPamForTextField( + const SwTextField& rTextField, + boost::shared_ptr< SwPaM >& rPamForTextField ) { - if (rTxtFld.GetpTxtNode() == NULL) + if (rTextField.GetpTextNode() == NULL) { - SAL_WARN("sw.core", "<SwTxtFld::GetPamForField> - missing <SwTxtNode>"); + SAL_WARN("sw.core", "<SwTextField::GetPamForField> - missing <SwTextNode>"); return; } - const SwTxtNode& rTxtNode = rTxtFld.GetTxtNode(); + const SwTextNode& rTextNode = rTextField.GetTextNode(); - rPamForTxtFld.reset( new SwPaM( rTxtNode, - (rTxtFld.End() != NULL) ? *(rTxtFld.End()) : ( rTxtFld.GetStart() + 1 ), - rTxtNode, - rTxtFld.GetStart() ) ); + rPamForTextField.reset( new SwPaM( rTextNode, + (rTextField.End() != NULL) ? *(rTextField.End()) : ( rTextField.GetStart() + 1 ), + rTextNode, + rTextField.GetStart() ) ); } /*static*/ -void SwTxtFld::DeleteTxtFld( const SwTxtFld& rTxtFld ) +void SwTextField::DeleteTextField( const SwTextField& rTextField ) { - if (rTxtFld.GetpTxtNode() != NULL) + if (rTextField.GetpTextNode() != NULL) { - boost::shared_ptr< SwPaM > pPamForTxtFld; - GetPamForTxtFld(rTxtFld, pPamForTxtFld); - if (pPamForTxtFld.get() != NULL) + boost::shared_ptr< SwPaM > pPamForTextField; + GetPamForTextField(rTextField, pPamForTextField); + if (pPamForTextField.get() != NULL) { - rTxtFld.GetTxtNode().GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPamForTxtFld); + rTextField.GetTextNode().GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPamForTextField); } } } -// class SwTxtInputFld /////////////////////////////////////////////// +// class SwTextInputField /////////////////////////////////////////////// // input field in-place editing -SwTxtInputFld::SwTxtInputFld( - SwFmtFld & rAttr, +SwTextInputField::SwTextInputField( + SwFormatField & rAttr, sal_Int32 const nStart, sal_Int32 const nEnd, bool const bInClipboard ) - : SwTxtAttr( rAttr, nStart ) - , SwTxtAttrNesting( rAttr, nStart, nEnd ) - , SwTxtFld( rAttr, nStart, bInClipboard ) + : SwTextAttr( rAttr, nStart ) + , SwTextAttrNesting( rAttr, nStart, nEnd ) + , SwTextField( rAttr, nStart, bInClipboard ) , m_bLockNotifyContentChange( false ) { SetHasDummyChar( false ); SetHasContent( true ); } -SwTxtInputFld::~SwTxtInputFld() +SwTextInputField::~SwTextInputField() { } -void SwTxtInputFld::LockNotifyContentChange() +void SwTextInputField::LockNotifyContentChange() { m_bLockNotifyContentChange = true; } -void SwTxtInputFld::UnlockNotifyContentChange() +void SwTextInputField::UnlockNotifyContentChange() { m_bLockNotifyContentChange = false; } -void SwTxtInputFld::NotifyContentChange( SwFmtFld& rFmtFld ) +void SwTextInputField::NotifyContentChange( SwFormatField& rFormatField ) { if ( !m_bLockNotifyContentChange ) { LockNotifyContentChange(); - SwTxtFld::NotifyContentChange( rFmtFld ); + SwTextField::NotifyContentChange( rFormatField ); UpdateTextNodeContent( GetFieldContent() ); UnlockNotifyContentChange(); } } -const OUString SwTxtInputFld::GetFieldContent() const +const OUString SwTextInputField::GetFieldContent() const { - return GetFmtFld().GetField()->ExpandField(false); + return GetFormatField().GetField()->ExpandField(false); } -void SwTxtInputFld::UpdateFieldContent() +void SwTextInputField::UpdateFieldContent() { - if ( IsFldInDoc() + if ( IsFieldInDoc() && GetStart() != (*End()) ) { OSL_ENSURE( (*End()) - GetStart() >= 2, - "<SwTxtInputFld::UpdateFieldContent()> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" ); + "<SwTextInputField::UpdateFieldContent()> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" ); // skip CH_TXT_ATR_INPUTFIELDSTART character const sal_Int32 nIdx = GetStart() + 1; // skip CH_TXT_ATR_INPUTFIELDEND character const sal_Int32 nLen = static_cast<sal_Int32>(std::max<sal_Int32>( 0, ( (*End()) - 1 - nIdx ) )); - const OUString aNewFieldContent = GetTxtNode().GetExpandTxt( nIdx, nLen ); + const OUString aNewFieldContent = GetTextNode().GetExpandText( nIdx, nLen ); - const SwInputField* pInputFld = dynamic_cast<const SwInputField*>(GetFmtFld().GetField()); - OSL_ENSURE( pInputFld != NULL, - "<SwTxtInputFld::GetContent()> - Missing <SwInputFld> instance!" ); - if ( pInputFld != NULL ) + const SwInputField* pInputField = dynamic_cast<const SwInputField*>(GetFormatField().GetField()); + OSL_ENSURE( pInputField != NULL, + "<SwTextInputField::GetContent()> - Missing <SwInputField> instance!" ); + if ( pInputField != NULL ) { - const_cast<SwInputField*>(pInputFld)->applyFieldContent( aNewFieldContent ); + const_cast<SwInputField*>(pInputField)->applyFieldContent( aNewFieldContent ); // trigger update of fields for scenarios in which the Input Field's content is part of e.g. a table formula - GetTxtNode().GetDoc()->getIDocumentFieldsAccess().GetUpdtFlds().SetFieldsDirty(true); + GetTextNode().GetDoc()->getIDocumentFieldsAccess().GetUpdateFields().SetFieldsDirty(true); } } } -void SwTxtInputFld::UpdateTextNodeContent( const OUString& rNewContent ) +void SwTextInputField::UpdateTextNodeContent( const OUString& rNewContent ) { - if ( !IsFldInDoc() ) + if ( !IsFieldInDoc() ) { - OSL_ENSURE( false, "<SwTxtInputFld::UpdateTextNodeContent(..)> - misusage as Input Field is not in document content." ); + OSL_ENSURE( false, "<SwTextInputField::UpdateTextNodeContent(..)> - misusage as Input Field is not in document content." ); return; } OSL_ENSURE( (*End()) - GetStart() >= 2, - "<SwTxtInputFld::UpdateTextNodeContent(..)> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" ); + "<SwTextInputField::UpdateTextNodeContent(..)> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" ); // skip CH_TXT_ATR_INPUTFIELDSTART character const sal_Int32 nIdx = GetStart() + 1; // skip CH_TXT_ATR_INPUTFIELDEND character const sal_Int32 nDelLen = std::max<sal_Int32>( 0, ( (*End()) - 1 - nIdx ) ); - SwIndex aIdx( &GetTxtNode(), nIdx ); - GetTxtNode().ReplaceText( aIdx, nDelLen, rNewContent ); + SwIndex aIdx( &GetTextNode(), nIdx ); + GetTextNode().ReplaceText( aIdx, nDelLen, rNewContent ); } -// class SwTxtAnnotationFld ////////////////////////////////////////// +// class SwTextAnnotationField ////////////////////////////////////////// // text annotation field -SwTxtAnnotationFld::SwTxtAnnotationFld( - SwFmtFld & rAttr, +SwTextAnnotationField::SwTextAnnotationField( + SwFormatField & rAttr, sal_Int32 const nStart, bool const bInClipboard ) - : SwTxtAttr( rAttr, nStart ) - , SwTxtFld( rAttr, nStart, bInClipboard ) + : SwTextAttr( rAttr, nStart ) + , SwTextField( rAttr, nStart, bInClipboard ) { } -SwTxtAnnotationFld::~SwTxtAnnotationFld() +SwTextAnnotationField::~SwTextAnnotationField() { } -::sw::mark::IMark* SwTxtAnnotationFld::GetAnnotationMark( +::sw::mark::IMark* SwTextAnnotationField::GetAnnotationMark( SwDoc* pDoc ) const { - const SwPostItField* pPostItField = dynamic_cast<const SwPostItField*>(GetFmtFld().GetField()); - OSL_ENSURE( pPostItField != NULL, "<SwTxtAnnotationFld::GetAnnotationMark()> - field missing" ); + const SwPostItField* pPostItField = dynamic_cast<const SwPostItField*>(GetFormatField().GetField()); + OSL_ENSURE( pPostItField != NULL, "<SwTextAnnotationField::GetAnnotationMark()> - field missing" ); if ( pPostItField == NULL ) { return NULL; @@ -627,7 +627,7 @@ SwTxtAnnotationFld::~SwTxtAnnotationFld() { pDoc = static_cast<const SwPostItFieldType*>(pPostItField->GetTyp())->GetDoc(); } - OSL_ENSURE( pDoc != NULL, "<SwTxtAnnotationFld::GetAnnotationMark()> - missing document" ); + OSL_ENSURE( pDoc != NULL, "<SwTextAnnotationField::GetAnnotationMark()> - missing document" ); if ( pDoc == NULL ) { return NULL; diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx index 009e5c004242..bca151d1dd74 100644 --- a/sw/source/core/txtnode/atrflyin.cxx +++ b/sw/source/core/txtnode/atrflyin.cxx @@ -35,87 +35,87 @@ #include <objectformatter.hxx> #include <calbck.hxx> -SwFmtFlyCnt::SwFmtFlyCnt( SwFrmFmt *pFrmFmt ) +SwFormatFlyCnt::SwFormatFlyCnt( SwFrameFormat *pFrameFormat ) : SfxPoolItem( RES_TXTATR_FLYCNT ), - pTxtAttr( 0 ), - pFmt( pFrmFmt ) + pTextAttr( 0 ), + pFormat( pFrameFormat ) { } -bool SwFmtFlyCnt::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatFlyCnt::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return( pTxtAttr && static_cast<const SwFmtFlyCnt&>(rAttr).pTxtAttr && - pTxtAttr->GetStart() == static_cast<const SwFmtFlyCnt&>(rAttr).pTxtAttr->GetStart() && - pFmt == static_cast<const SwFmtFlyCnt&>(rAttr).GetFrmFmt() ); + return( pTextAttr && static_cast<const SwFormatFlyCnt&>(rAttr).pTextAttr && + pTextAttr->GetStart() == static_cast<const SwFormatFlyCnt&>(rAttr).pTextAttr->GetStart() && + pFormat == static_cast<const SwFormatFlyCnt&>(rAttr).GetFrameFormat() ); } -SfxPoolItem* SwFmtFlyCnt::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatFlyCnt::Clone( SfxItemPool* ) const { - return new SwFmtFlyCnt( pFmt ); + return new SwFormatFlyCnt( pFormat ); } -SwTxtFlyCnt::SwTxtFlyCnt( SwFmtFlyCnt& rAttr, sal_Int32 nStartPos ) - : SwTxtAttr( rAttr, nStartPos ) +SwTextFlyCnt::SwTextFlyCnt( SwFormatFlyCnt& rAttr, sal_Int32 nStartPos ) + : SwTextAttr( rAttr, nStartPos ) { - rAttr.pTxtAttr = this; + rAttr.pTextAttr = this; SetHasDummyChar(true); } /* * An dieser Stelle soll einmal der Gesamtzusammenhang bei der Erzeugung - * eines neuen SwTxtFlyCnt erlaeutert werden. - * Das MakeTxtHint() wird z.B. im SwTxtNode::Copy() gerufen. + * eines neuen SwTextFlyCnt erlaeutert werden. + * Das MakeTextHint() wird z.B. im SwTextNode::Copy() gerufen. * Fuer die komplette Verdopplung sind folgende Schritte notwendig: - * 1) Duplizieren des pFmt incl. Inhalt, Attributen etc. + * 1) Duplizieren des pFormat incl. Inhalt, Attributen etc. * 2) Setzen des Ankers * 3) Benachrichtigung * Da fuer die Bewaeltigung der Aufgaben nicht immer alle Informationen * bereitstehen und darueber hinaus bestimmte Methoden erst zu einem * spaeteren Zeitpunkt gerufen werden duerfen (weil nocht nicht alle * Nodeinformationen vorliegen), verteilt sich der Ablauf. - * ad 1) MakeTxtHint() wird durch den Aufruf von SwDoc::CopyLayout() - * der das neue FlyFrmFmt erzeugt und mit dem duplizierten Inhalt des + * ad 1) MakeTextHint() wird durch den Aufruf von SwDoc::CopyLayout() + * der das neue FlyFrameFormat erzeugt und mit dem duplizierten Inhalt des * FlyFrm verbunden. - * ad 2) SetAnchor() wird von SwTxtNode::Insert() gerufen und sorgt fuer das - * setzen des Ankers (die SwPosition des Dummy-Zeichens wird dem FlyFrmFmt - * per SetAttr bekannt gegeben). Dies kann nicht im MakeTxtHint erledigt + * ad 2) SetAnchor() wird von SwTextNode::Insert() gerufen und sorgt fuer das + * setzen des Ankers (die SwPosition des Dummy-Zeichens wird dem FlyFrameFormat + * per SetAttr bekannt gegeben). Dies kann nicht im MakeTextHint erledigt * werden, da der Zielnode unbestimmt ist. * ad 3) _GetFlyFrm() wird im Formatierungsprozess vom LineIter gerufen - * und sucht den FlyFrm zum Dummyzeichen des aktuellen CntntFrm. Wird keiner + * und sucht den FlyFrm zum Dummyzeichen des aktuellen ContentFrm. Wird keiner * gefunden, so wird ein neuer FlyFrm angelegt. - * Kritisch an diesem Vorgehen ist, dass das pCntnt->AppendFly() eine - * sofortige Neuformatierung von pCntnt anstoesst. Die Rekursion kommt - * allerdings durch den Lockmechanismus in SwTxtFrm::Format() nicht + * Kritisch an diesem Vorgehen ist, dass das pContent->AppendFly() eine + * sofortige Neuformatierung von pContent anstoesst. Die Rekursion kommt + * allerdings durch den Lockmechanismus in SwTextFrm::Format() nicht * zu stande. * Attraktiv ist der Umstand, dass niemand ueber die vom Node abhaengigen - * CntntFrms iterieren braucht, um die FlyInCntFrm anzulegen. Dies geschieht + * ContentFrms iterieren braucht, um die FlyInCntFrm anzulegen. Dies geschieht * bei der Arbeit. */ -void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc ) +void SwTextFlyCnt::CopyFlyFormat( SwDoc* pDoc ) { - SwFrmFmt* pFmt = GetFlyCnt().GetFrmFmt(); - OSL_ENSURE( pFmt, "von welchem Format soll ich eine Kopie erzeugen?" ); - // Das FlyFrmFmt muss dupliziert werden. - // In CopyLayoutFmt (siehe doclay.cxx) wird das FlyFrmFmt erzeugt + SwFrameFormat* pFormat = GetFlyCnt().GetFrameFormat(); + OSL_ENSURE( pFormat, "von welchem Format soll ich eine Kopie erzeugen?" ); + // Das FlyFrameFormat muss dupliziert werden. + // In CopyLayoutFormat (siehe doclay.cxx) wird das FlyFrameFormat erzeugt // und der Inhalt dupliziert. // disable undo while copying attribute ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - SwFmtAnchor aAnchor( pFmt->GetAnchor() ); + SwFormatAnchor aAnchor( pFormat->GetAnchor() ); if ((FLY_AT_PAGE != aAnchor.GetAnchorId()) && - (pDoc != pFmt->GetDoc())) // different documents? + (pDoc != pFormat->GetDoc())) // different documents? { // JP 03.06.96: dann sorge dafuer, das der koperierte Anker auf // gueltigen Content zeigt! Die Umsetzung auf die // richtige Position erfolgt spaeter. SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), +2 ); - SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode(); + SwContentNode* pCNd = aIdx.GetNode().GetContentNode(); if( !pCNd ) pCNd = pDoc->GetNodes().GoNext( &aIdx ); - SwPosition pos = *aAnchor.GetCntntAnchor(); + SwPosition pos = *aAnchor.GetContentAnchor(); pos.nNode = aIdx; if (FLY_AS_CHAR == aAnchor.GetAnchorId()) { @@ -124,21 +124,21 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc ) else { pos.nContent.Assign( 0, 0 ); - OSL_ENSURE( false, "CopyFlyFmt: Was fuer ein Anker?" ); + OSL_ENSURE( false, "CopyFlyFormat: Was fuer ein Anker?" ); } aAnchor.SetAnchor( &pos ); } - SwFrmFmt* pNew = pDoc->getIDocumentLayoutAccess().CopyLayoutFmt( *pFmt, aAnchor, false, false ); - ((SwFmtFlyCnt&)GetFlyCnt()).SetFlyFmt( pNew ); + SwFrameFormat* pNew = pDoc->getIDocumentLayoutAccess().CopyLayoutFormat( *pFormat, aAnchor, false, false ); + ((SwFormatFlyCnt&)GetFlyCnt()).SetFlyFormat( pNew ); } -// SetAnchor() wird von SwTxtNode::Insert() gerufen und sorgt fuer das -// setzen des Ankers (die SwPosition des Dummy-Zeichens wird dem FlyFrmFmt -// per SetAttr bekannt gegeben). Dies kann nicht im MakeTxtHint erledigt +// SetAnchor() wird von SwTextNode::Insert() gerufen und sorgt fuer das +// setzen des Ankers (die SwPosition des Dummy-Zeichens wird dem FlyFrameFormat +// per SetAttr bekannt gegeben). Dies kann nicht im MakeTextHint erledigt // werden, da der Zielnode unbestimmt ist. -// (siehe Kommentar in SwTxtFlyCnt::MakeTxtHint) -void SwTxtFlyCnt::SetAnchor( const SwTxtNode *pNode ) +// (siehe Kommentar in SwTextFlyCnt::MakeTextHint) +void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode ) { // fuers Undo muss der neue Anker schon bekannt sein ! @@ -146,17 +146,17 @@ void SwTxtFlyCnt::SetAnchor( const SwTxtNode *pNode ) SwDoc* pDoc = const_cast<SwDoc*>(pNode->GetDoc()); - SwIndex aIdx( const_cast<SwTxtNode*>(pNode), GetStart() ); + SwIndex aIdx( const_cast<SwTextNode*>(pNode), GetStart() ); SwPosition aPos( *pNode->StartOfSectionNode(), aIdx ); - SwFrmFmt* pFmt = GetFlyCnt().GetFrmFmt(); - SwFmtAnchor aAnchor( pFmt->GetAnchor() ); + SwFrameFormat* pFormat = GetFlyCnt().GetFrameFormat(); + SwFormatAnchor aAnchor( pFormat->GetAnchor() ); - if( !aAnchor.GetCntntAnchor() || - !aAnchor.GetCntntAnchor()->nNode.GetNode().GetNodes().IsDocNodes() || - &aAnchor.GetCntntAnchor()->nNode.GetNode() != (SwNode*)pNode ) + if( !aAnchor.GetContentAnchor() || + !aAnchor.GetContentAnchor()->nNode.GetNode().GetNodes().IsDocNodes() || + &aAnchor.GetContentAnchor()->nNode.GetNode() != (SwNode*)pNode ) aPos.nNode = *pNode; else - aPos.nNode = aAnchor.GetCntntAnchor()->nNode; + aPos.nNode = aAnchor.GetContentAnchor()->nNode; aAnchor.SetType( FLY_AS_CHAR ); // default! aAnchor.SetAnchor( &aPos ); @@ -165,67 +165,67 @@ void SwTxtFlyCnt::SetAnchor( const SwTxtNode *pNode ) // JP 25.04.95: wird innerhalb des SplitNodes die Frames verschoben // koennen die Frames erhalten bleiben. if( ( !pNode->GetpSwpHints() || !pNode->GetpSwpHints()->IsInSplitNode() ) - && RES_DRAWFRMFMT != pFmt->Which() ) - pFmt->DelFrms(); + && RES_DRAWFRMFMT != pFormat->Which() ) + pFormat->DelFrms(); // stehen wir noch im falschen Dokument ? - if( pDoc != pFmt->GetDoc() ) + if( pDoc != pFormat->GetDoc() ) { // disable undo while copying attribute ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - SwFrmFmt* pNew = pDoc->getIDocumentLayoutAccess().CopyLayoutFmt( *pFmt, aAnchor, false, false ); + SwFrameFormat* pNew = pDoc->getIDocumentLayoutAccess().CopyLayoutFormat( *pFormat, aAnchor, false, false ); - ::sw::UndoGuard const undoGuardFmt( - pFmt->GetDoc()->GetIDocumentUndoRedo()); - pFmt->GetDoc()->getIDocumentLayoutAccess().DelLayoutFmt( pFmt ); - ((SwFmtFlyCnt&)GetFlyCnt()).SetFlyFmt( pNew ); + ::sw::UndoGuard const undoGuardFormat( + pFormat->GetDoc()->GetIDocumentUndoRedo()); + pFormat->GetDoc()->getIDocumentLayoutAccess().DelLayoutFormat( pFormat ); + ((SwFormatFlyCnt&)GetFlyCnt()).SetFlyFormat( pNew ); } else if( pNode->GetpSwpHints() && pNode->GetpSwpHints()->IsInSplitNode() && - RES_DRAWFRMFMT != pFmt->Which() ) + RES_DRAWFRMFMT != pFormat->Which() ) { - pFmt->LockModify(); - pFmt->SetFmtAttr( aAnchor ); // nur den Anker neu setzen - pFmt->UnlockModify(); + pFormat->LockModify(); + pFormat->SetFormatAttr( aAnchor ); // nur den Anker neu setzen + pFormat->UnlockModify(); } else - pFmt->SetFmtAttr( aAnchor ); // nur den Anker neu setzen + pFormat->SetFormatAttr( aAnchor ); // nur den Anker neu setzen // Am Node haengen u.a. abhaengige CntFrms. // Fuer jeden CntFrm wird ein SwFlyInCntFrm angelegt. } // _GetFlyFrm() wird im Formatierungsprozess vom LineIter gerufen -// und sucht den FlyFrm zum Dummyzeichen des aktuellen CntntFrm. Wird keiner +// und sucht den FlyFrm zum Dummyzeichen des aktuellen ContentFrm. Wird keiner // gefunden, so wird ein neuer FlyFrm angelegt. -// (siehe Kommentar ind SwTxtFlyCnt::MakeTxtHint) -SwFlyInCntFrm *SwTxtFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm ) +// (siehe Kommentar ind SwTextFlyCnt::MakeTextHint) +SwFlyInCntFrm *SwTextFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm ) { - SwFrmFmt* pFrmFmt = GetFlyCnt().GetFrmFmt(); - if( RES_DRAWFRMFMT == pFrmFmt->Which() ) + SwFrameFormat* pFrameFormat = GetFlyCnt().GetFrameFormat(); + if( RES_DRAWFRMFMT == pFrameFormat->Which() ) { - OSL_ENSURE( false, "SwTxtFlyCnt::_GetFlyFrm: DrawInCnt-Baustelle!" ); + OSL_ENSURE( false, "SwTextFlyCnt::_GetFlyFrm: DrawInCnt-Baustelle!" ); return NULL; } - SwIterator<SwFlyFrm,SwFmt> aIter( *GetFlyCnt().pFmt ); - OSL_ENSURE( pCurrFrm->IsTxtFrm(), "SwTxtFlyCnt::_GetFlyFrm for TxtFrms only." ); + SwIterator<SwFlyFrm,SwFormat> aIter( *GetFlyCnt().pFormat ); + OSL_ENSURE( pCurrFrm->IsTextFrm(), "SwTextFlyCnt::_GetFlyFrm for TextFrms only." ); SwFrm* pFrm = aIter.First(); if ( pFrm ) { - SwTxtFrm *pFirst = const_cast<SwTxtFrm*>(static_cast<const SwTxtFrm*>(pCurrFrm)); + SwTextFrm *pFirst = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCurrFrm)); while ( pFirst->IsFollow() ) pFirst = pFirst->FindMaster(); do { - SwTxtFrm *pTmp = pFirst; + SwTextFrm *pTmp = pFirst; do { if( static_cast<SwFlyFrm*>(pFrm)->GetAnchorFrm() == static_cast<SwFrm*>(pTmp) ) { if ( pTmp != pCurrFrm ) { pTmp->RemoveFly( static_cast<SwFlyFrm*>(pFrm) ); - const_cast<SwTxtFrm*>(static_cast<const SwTxtFrm*>(pCurrFrm))->AppendFly( static_cast<SwFlyFrm*>(pFrm) ); + const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCurrFrm))->AppendFly( static_cast<SwFlyFrm*>(pFrm) ); } return static_cast<SwFlyInCntFrm*>(pFrm); } @@ -240,10 +240,10 @@ SwFlyInCntFrm *SwTxtFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm ) // Wir haben keinen passenden FlyFrm gefunden, deswegen wird ein // neuer angelegt. // Dabei wird eine sofortige Neuformatierung von pCurrFrm angestossen. - // Die Rekursion wird durch den Lockmechanismus in SwTxtFrm::Format() + // Die Rekursion wird durch den Lockmechanismus in SwTextFrm::Format() // abgewuergt. SwFrm* pCurrFrame = const_cast< SwFrm* >(pCurrFrm); - SwFlyInCntFrm *pFly = new SwFlyInCntFrm( static_cast<SwFlyFrmFmt*>(pFrmFmt), pCurrFrame, pCurrFrame ); + SwFlyInCntFrm *pFly = new SwFlyInCntFrm( static_cast<SwFlyFrameFormat*>(pFrameFormat), pCurrFrame, pCurrFrame ); pCurrFrame->AppendFly( pFly ); pFly->RegistFlys(); diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 0d3db1110825..aab92d3e93a8 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -42,27 +42,27 @@ namespace { /// @param[in] pExclude A footnote whose reference number should be excluded from the set. /// @param[out] rUsedRef The set of used reference numbers. /// @param[out] rInvalid A returned list of all items that had an invalid reference number. - static void lcl_FillUsedFtnRefNumbers(SwDoc &rDoc, - SwTxtFtn *pExclude, + static void lcl_FillUsedFootnoteRefNumbers(SwDoc &rDoc, + SwTextFootnote *pExclude, std::set<sal_uInt16> &rUsedRef, - std::vector<SwTxtFtn*> &rInvalid) + std::vector<SwTextFootnote*> &rInvalid) { - SwFtnIdxs& ftnIdxs = rDoc.GetFtnIdxs(); + SwFootnoteIdxs& ftnIdxs = rDoc.GetFootnoteIdxs(); rInvalid.clear(); for( size_t n = 0; n < ftnIdxs.size(); ++n ) { - SwTxtFtn* pTxtFtn = ftnIdxs[ n ]; - if ( pTxtFtn != pExclude ) + SwTextFootnote* pTextFootnote = ftnIdxs[ n ]; + if ( pTextFootnote != pExclude ) { - if ( USHRT_MAX == pTxtFtn->GetSeqRefNo() ) + if ( USHRT_MAX == pTextFootnote->GetSeqRefNo() ) { - rInvalid.push_back(pTxtFtn); + rInvalid.push_back(pTextFootnote); } else { - rUsedRef.insert( pTxtFtn->GetSeqRefNo() ); + rUsedRef.insert( pTextFootnote->GetSeqRefNo() ); } } } @@ -117,33 +117,33 @@ namespace { } -SwFmtFtn::SwFmtFtn( bool bEndNote ) +SwFormatFootnote::SwFormatFootnote( bool bEndNote ) : SfxPoolItem( RES_TXTATR_FTN ) , SwModify(0) - , m_pTxtAttr(0) + , m_pTextAttr(0) , m_nNumber(0) , m_bEndNote(bEndNote) { } -bool SwFmtFtn::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatFootnote::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return m_nNumber == static_cast<const SwFmtFtn&>(rAttr).m_nNumber && - m_aNumber == static_cast<const SwFmtFtn&>(rAttr).m_aNumber && - m_bEndNote == static_cast<const SwFmtFtn&>(rAttr).m_bEndNote; + return m_nNumber == static_cast<const SwFormatFootnote&>(rAttr).m_nNumber && + m_aNumber == static_cast<const SwFormatFootnote&>(rAttr).m_aNumber && + m_bEndNote == static_cast<const SwFormatFootnote&>(rAttr).m_bEndNote; } -SfxPoolItem* SwFmtFtn::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatFootnote::Clone( SfxItemPool* ) const { - SwFmtFtn* pNew = new SwFmtFtn; + SwFormatFootnote* pNew = new SwFormatFootnote; pNew->m_aNumber = m_aNumber; pNew->m_nNumber = m_nNumber; pNew->m_bEndNote = m_bEndNote; return pNew; } -void SwFmtFtn::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew) +void SwFormatFootnote::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew) { NotifyClients(pOld, pNew); if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) @@ -152,45 +152,45 @@ void SwFmtFtn::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew) } } -void SwFmtFtn::InvalidateFootnote() +void SwFormatFootnote::InvalidateFootnote() { SwPtrMsgPoolItem const item(RES_REMOVE_UNO_OBJECT, &static_cast<SwModify&>(*this)); // cast to base class (void*) NotifyClients(&item, &item); } -void SwFmtFtn::SetEndNote( bool b ) +void SwFormatFootnote::SetEndNote( bool b ) { if ( b != m_bEndNote ) { - if ( GetTxtFtn() ) + if ( GetTextFootnote() ) { - GetTxtFtn()->DelFrms(0); + GetTextFootnote()->DelFrms(0); } m_bEndNote = b; } } -SwFmtFtn::~SwFmtFtn() +SwFormatFootnote::~SwFormatFootnote() { } -void SwFmtFtn::GetFtnText( OUString& rStr ) const +void SwFormatFootnote::GetFootnoteText( OUString& rStr ) const { - if( m_pTxtAttr->GetStartNode() ) + if( m_pTextAttr->GetStartNode() ) { - SwNodeIndex aIdx( *m_pTxtAttr->GetStartNode(), 1 ); - SwCntntNode* pCNd = aIdx.GetNode().GetTxtNode(); + SwNodeIndex aIdx( *m_pTextAttr->GetStartNode(), 1 ); + SwContentNode* pCNd = aIdx.GetNode().GetTextNode(); if( !pCNd ) pCNd = aIdx.GetNodes().GoNext( &aIdx ); - if( pCNd->IsTxtNode() ) { - rStr = static_cast<SwTxtNode*>(pCNd)->GetExpandTxt(); + if( pCNd->IsTextNode() ) { + rStr = static_cast<SwTextNode*>(pCNd)->GetExpandText(); ++aIdx; while ( !aIdx.GetNode().IsEndNode() ) { - if ( aIdx.GetNode().IsTxtNode() ) - rStr += " " + static_cast<SwTxtNode*>((aIdx.GetNode().GetTxtNode()))->GetExpandTxt(); + if ( aIdx.GetNode().IsTextNode() ) + rStr += " " + static_cast<SwTextNode*>((aIdx.GetNode().GetTextNode()))->GetExpandText(); ++aIdx; } } @@ -198,7 +198,7 @@ void SwFmtFtn::GetFtnText( OUString& rStr ) const } // returnt den anzuzeigenden String der Fuss-/Endnote -OUString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) const +OUString SwFormatFootnote::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) const { OUString sRet( GetNumStr() ); if( sRet.isEmpty() ) @@ -206,25 +206,25 @@ OUString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) const // dann ist die Nummer von Interesse, also ueber die Info diese // besorgen. bool bMakeNum = true; - const SwSectionNode* pSectNd = m_pTxtAttr - ? SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *m_pTxtAttr ) + const SwSectionNode* pSectNd = m_pTextAttr + ? SwUpdFootnoteEndNtAtEnd::FindSectNdWithEndAttr( *m_pTextAttr ) : 0; if( pSectNd ) { - const SwFmtFtnEndAtTxtEnd& rFtnEnd = static_cast<const SwFmtFtnEndAtTxtEnd&>( - pSectNd->GetSection().GetFmt()->GetFmtAttr( + const SwFormatFootnoteEndAtTextEnd& rFootnoteEnd = static_cast<const SwFormatFootnoteEndAtTextEnd&>( + pSectNd->GetSection().GetFormat()->GetFormatAttr( IsEndNote() ? static_cast<sal_uInt16>(RES_END_AT_TXTEND) : static_cast<sal_uInt16>(RES_FTN_AT_TXTEND) ) ); - if( FTNEND_ATTXTEND_OWNNUMANDFMT == rFtnEnd.GetValue() ) + if( FTNEND_ATTXTEND_OWNNUMANDFMT == rFootnoteEnd.GetValue() ) { bMakeNum = false; - sRet = rFtnEnd.GetSwNumType().GetNumStr( GetNumber() ); + sRet = rFootnoteEnd.GetSwNumType().GetNumStr( GetNumber() ); if( bInclStrings ) { - sRet = rFtnEnd.GetPrefix() + sRet + rFtnEnd.GetSuffix(); + sRet = rFootnoteEnd.GetPrefix() + sRet + rFootnoteEnd.GetSuffix(); } } } @@ -235,8 +235,8 @@ OUString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) const if( IsEndNote() ) pInfo = &rDoc.GetEndNoteInfo(); else - pInfo = &rDoc.GetFtnInfo(); - sRet = pInfo->aFmt.GetNumStr( GetNumber() ); + pInfo = &rDoc.GetFootnoteInfo(); + sRet = pInfo->aFormat.GetNumStr( GetNumber() ); if( bInclStrings ) { sRet = pInfo->GetPrefix() + sRet + pInfo->GetSuffix(); @@ -246,22 +246,22 @@ OUString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) const return sRet; } -SwTxtFtn::SwTxtFtn( SwFmtFtn& rAttr, sal_Int32 nStartPos ) - : SwTxtAttr( rAttr, nStartPos ) +SwTextFootnote::SwTextFootnote( SwFormatFootnote& rAttr, sal_Int32 nStartPos ) + : SwTextAttr( rAttr, nStartPos ) , m_pStartNode( 0 ) - , m_pTxtNode( 0 ) + , m_pTextNode( 0 ) , m_nSeqNo( USHRT_MAX ) { - rAttr.m_pTxtAttr = this; + rAttr.m_pTextAttr = this; SetHasDummyChar(true); } -SwTxtFtn::~SwTxtFtn() +SwTextFootnote::~SwTextFootnote() { SetStartNode( 0 ); } -void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, bool bDelNode ) +void SwTextFootnote::SetStartNode( const SwNodeIndex *pNewNode, bool bDelNode ) { if( pNewNode ) { @@ -280,16 +280,16 @@ void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, bool bDelNode ) // 1) Die Fussnoten muessen bei ihren Seiten abgemeldet werden // 2) Die Fussnoten-Sektion in den Inserts muss geloescht werden. SwDoc* pDoc; - if ( m_pTxtNode ) + if ( m_pTextNode ) { - pDoc = m_pTxtNode->GetDoc(); + pDoc = m_pTextNode->GetDoc(); } else { //JP 27.01.97: der sw3-Reader setzt einen StartNode aber das // Attribut ist noch nicht im TextNode verankert. // Wird es geloescht (z.B. bei Datei einfuegen mit - // Ftn in einen Rahmen), muss auch der Inhalt + // Footnote in einen Rahmen), muss auch der Inhalt // geloescht werden pDoc = m_pStartNode->GetNodes().GetDoc(); } @@ -314,58 +314,58 @@ void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, bool bDelNode ) DELETEZ( m_pStartNode ); // loesche die Fussnote noch aus dem Array am Dokument - for( size_t n = 0; n < pDoc->GetFtnIdxs().size(); ++n ) - if( this == pDoc->GetFtnIdxs()[n] ) + for( size_t n = 0; n < pDoc->GetFootnoteIdxs().size(); ++n ) + if( this == pDoc->GetFootnoteIdxs()[n] ) { - pDoc->GetFtnIdxs().erase( pDoc->GetFtnIdxs().begin() + n ); + pDoc->GetFootnoteIdxs().erase( pDoc->GetFootnoteIdxs().begin() + n ); // gibt noch weitere Fussnoten - if( !pDoc->IsInDtor() && n < pDoc->GetFtnIdxs().size() ) + if( !pDoc->IsInDtor() && n < pDoc->GetFootnoteIdxs().size() ) { - SwNodeIndex aTmp( pDoc->GetFtnIdxs()[n]->GetTxtNode() ); - pDoc->GetFtnIdxs().UpdateFtn( aTmp ); + SwNodeIndex aTmp( pDoc->GetFootnoteIdxs()[n]->GetTextNode() ); + pDoc->GetFootnoteIdxs().UpdateFootnote( aTmp ); } break; } } } -void SwTxtFtn::SetNumber( const sal_uInt16 nNewNum, const OUString &sNumStr ) +void SwTextFootnote::SetNumber( const sal_uInt16 nNewNum, const OUString &sNumStr ) { - SwFmtFtn& rFtn = (SwFmtFtn&)GetFtn(); + SwFormatFootnote& rFootnote = (SwFormatFootnote&)GetFootnote(); - rFtn.m_aNumber = sNumStr; + rFootnote.m_aNumber = sNumStr; if ( sNumStr.isEmpty() ) { - rFtn.m_nNumber = nNewNum; + rFootnote.m_nNumber = nNewNum; } - OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" ); - SwNodes &rNodes = m_pTxtNode->GetDoc()->GetNodes(); - m_pTxtNode->ModifyNotification( 0, &rFtn ); + OSL_ENSURE( m_pTextNode, "SwTextFootnote: where is my TextNode?" ); + SwNodes &rNodes = m_pTextNode->GetDoc()->GetNodes(); + m_pTextNode->ModifyNotification( 0, &rFootnote ); if ( m_pStartNode ) { - // must iterate over all TxtNodes because of footnotes on other pages + // must iterate over all TextNodes because of footnotes on other pages sal_uLong nSttIdx = m_pStartNode->GetIndex() + 1; sal_uLong nEndIdx = m_pStartNode->GetNode().EndOfSectionIndex(); for( ; nSttIdx < nEndIdx; ++nSttIdx ) { // Es koennen ja auch Grafiken in der Fussnote stehen ... SwNode* pNd; - if( ( pNd = rNodes[ nSttIdx ] )->IsTxtNode() ) - static_cast<SwTxtNode*>(pNd)->ModifyNotification( 0, &rFtn ); + if( ( pNd = rNodes[ nSttIdx ] )->IsTextNode() ) + static_cast<SwTextNode*>(pNd)->ModifyNotification( 0, &rFootnote ); } } } // Die Fussnoten duplizieren -void SwTxtFtn::CopyFtn( - SwTxtFtn & rDest, - SwTxtNode & rDestNode ) const +void SwTextFootnote::CopyFootnote( + SwTextFootnote & rDest, + SwTextNode & rDestNode ) const { if (m_pStartNode && !rDest.GetStartNode()) { // dest missing node section? create it here! - // (happens in SwTxtNode::CopyText if pDest == this) + // (happens in SwTextNode::CopyText if pDest == this) rDest.MakeNewTextSection( rDestNode.GetNodes() ); } if (m_pStartNode && rDest.GetStartNode()) @@ -379,12 +379,12 @@ void SwTxtFtn::CopyFtn( *m_pStartNode->GetNode().EndOfSectionNode() ); // insert at the end of rDest, i.e., the nodes are appended. - // nDestLen contains number of CntntNodes in rDest _before_ copy. + // nDestLen contains number of ContentNodes in rDest _before_ copy. SwNodeIndex aStart( *(rDest.GetStartNode()) ); SwNodeIndex aEnd( *aStart.GetNode().EndOfSectionNode() ); sal_uLong nDestLen = aEnd.GetIndex() - aStart.GetIndex() - 1; - m_pTxtNode->GetDoc()->GetDocumentContentOperationsManager().CopyWithFlyInFly( aRg, 0, aEnd, NULL, true ); + m_pTextNode->GetDoc()->GetDocumentContentOperationsManager().CopyWithFlyInFly( aRg, 0, aEnd, NULL, true ); // in case the destination section was not empty, delete the old nodes // before: Src: SxxxE, Dst: SnE @@ -395,61 +395,61 @@ void SwTxtFtn::CopyFtn( } // also copy user defined number string - if( !GetFtn().m_aNumber.isEmpty() ) + if( !GetFootnote().m_aNumber.isEmpty() ) { - const_cast<SwFmtFtn &>(rDest.GetFtn()).m_aNumber = GetFtn().m_aNumber; + const_cast<SwFormatFootnote &>(rDest.GetFootnote()).m_aNumber = GetFootnote().m_aNumber; } } // lege eine neue leere TextSection fuer diese Fussnote an -void SwTxtFtn::MakeNewTextSection( SwNodes& rNodes ) +void SwTextFootnote::MakeNewTextSection( SwNodes& rNodes ) { if ( m_pStartNode ) return; - // Nun verpassen wir dem TxtNode noch die Fussnotenvorlage. - SwTxtFmtColl *pFmtColl; + // Nun verpassen wir dem TextNode noch die Fussnotenvorlage. + SwTextFormatColl *pFormatColl; const SwEndNoteInfo* pInfo; sal_uInt16 nPoolId; - if( GetFtn().IsEndNote() ) + if( GetFootnote().IsEndNote() ) { pInfo = &rNodes.GetDoc()->GetEndNoteInfo(); nPoolId = RES_POOLCOLL_ENDNOTE; } else { - pInfo = &rNodes.GetDoc()->GetFtnInfo(); + pInfo = &rNodes.GetDoc()->GetFootnoteInfo(); nPoolId = RES_POOLCOLL_FOOTNOTE; } - if( 0 == (pFmtColl = pInfo->GetFtnTxtColl() ) ) - pFmtColl = rNodes.GetDoc()->getIDocumentStylePoolAccess().GetTxtCollFromPool( nPoolId ); + if( 0 == (pFormatColl = pInfo->GetFootnoteTextColl() ) ) + pFormatColl = rNodes.GetDoc()->getIDocumentStylePoolAccess().GetTextCollFromPool( nPoolId ); SwStartNode* pSttNd = rNodes.MakeTextSection( SwNodeIndex( rNodes.GetEndOfInserts() ), - SwFootnoteStartNode, pFmtColl ); + SwFootnoteStartNode, pFormatColl ); m_pStartNode = new SwNodeIndex( *pSttNd ); } -void SwTxtFtn::DelFrms( const SwFrm* pSib ) +void SwTextFootnote::DelFrms( const SwFrm* pSib ) { - // delete the FtnFrames from the pages - OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" ); - if ( !m_pTxtNode ) + // delete the FootnoteFrames from the pages + OSL_ENSURE( m_pTextNode, "SwTextFootnote: where is my TextNode?" ); + if ( !m_pTextNode ) return; const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : 0; bool bFrmFnd = false; { - SwIterator<SwCntntFrm,SwTxtNode> aIter( *m_pTxtNode ); - for( SwCntntFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) + SwIterator<SwContentFrm,SwTextNode> aIter( *m_pTextNode ); + for( SwContentFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) { if( pRoot != pFnd->getRootFrm() && pRoot ) continue; SwPageFrm* pPage = pFnd->FindPageFrm(); if( pPage ) { - pPage->RemoveFtn( pFnd, this ); + pPage->RemoveFootnote( pFnd, this ); bFrmFnd = true; } } @@ -459,37 +459,37 @@ void SwTxtFtn::DelFrms( const SwFrm* pSib ) if ( !bFrmFnd && m_pStartNode ) { SwNodeIndex aIdx( *m_pStartNode ); - SwCntntNode* pCNd = m_pTxtNode->GetNodes().GoNext( &aIdx ); + SwContentNode* pCNd = m_pTextNode->GetNodes().GoNext( &aIdx ); if( pCNd ) { - SwIterator<SwCntntFrm,SwCntntNode> aIter( *pCNd ); - for( SwCntntFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) + SwIterator<SwContentFrm,SwContentNode> aIter( *pCNd ); + for( SwContentFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) { if( pRoot != pFnd->getRootFrm() && pRoot ) continue; SwPageFrm* pPage = pFnd->FindPageFrm(); SwFrm *pFrm = pFnd->GetUpper(); - while ( pFrm && !pFrm->IsFtnFrm() ) + while ( pFrm && !pFrm->IsFootnoteFrm() ) pFrm = pFrm->GetUpper(); - SwFtnFrm *pFtn = static_cast<SwFtnFrm*>(pFrm); - while ( pFtn && pFtn->GetMaster() ) - pFtn = pFtn->GetMaster(); - OSL_ENSURE( pFtn->GetAttr() == this, "Ftn mismatch error." ); + SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pFrm); + while ( pFootnote && pFootnote->GetMaster() ) + pFootnote = pFootnote->GetMaster(); + OSL_ENSURE( pFootnote->GetAttr() == this, "Footnote mismatch error." ); - while ( pFtn ) + while ( pFootnote ) { - SwFtnFrm *pFoll = pFtn->GetFollow(); - pFtn->Cut(); - SwFrm::DestroyFrm(pFtn); - pFtn = pFoll; + SwFootnoteFrm *pFoll = pFootnote->GetFollow(); + pFootnote->Cut(); + SwFrm::DestroyFrm(pFootnote); + pFootnote = pFoll; } // #i20556# During hiding of a section, the connection // to the layout is already lost. pPage may be 0: if ( pPage ) - pPage->UpdateFtnNum(); + pPage->UpdateFootnoteNum(); } } } @@ -497,18 +497,18 @@ void SwTxtFtn::DelFrms( const SwFrm* pSib ) /// Set the sequence number for the current footnote. /// @returns The new sequence number or USHRT_MAX if invalid. -sal_uInt16 SwTxtFtn::SetSeqRefNo() +sal_uInt16 SwTextFootnote::SetSeqRefNo() { - if( !m_pTxtNode ) + if( !m_pTextNode ) return USHRT_MAX; - SwDoc* pDoc = m_pTxtNode->GetDoc(); + SwDoc* pDoc = m_pTextNode->GetDoc(); if( pDoc->IsInReading() ) return USHRT_MAX; std::set<sal_uInt16> aUsedNums; - std::vector<SwTxtFtn*> badRefNums; - ::lcl_FillUsedFtnRefNumbers(*pDoc, this, aUsedNums, badRefNums); + std::vector<SwTextFootnote*> badRefNums; + ::lcl_FillUsedFootnoteRefNumbers(*pDoc, this, aUsedNums, badRefNums); if ( ::lcl_IsRefNumAvailable(aUsedNums, m_nSeqNo) ) return m_nSeqNo; std::vector<sal_uInt16> unused; @@ -518,11 +518,11 @@ sal_uInt16 SwTxtFtn::SetSeqRefNo() /// Set a unique sequential reference number for every footnote in the document. /// @param[in] rDoc The document to be processed. -void SwTxtFtn::SetUniqueSeqRefNo( SwDoc& rDoc ) +void SwTextFootnote::SetUniqueSeqRefNo( SwDoc& rDoc ) { std::set<sal_uInt16> aUsedNums; - std::vector<SwTxtFtn*> badRefNums; - ::lcl_FillUsedFtnRefNumbers(rDoc, NULL, aUsedNums, badRefNums); + std::vector<SwTextFootnote*> badRefNums; + ::lcl_FillUsedFootnoteRefNumbers(rDoc, NULL, aUsedNums, badRefNums); std::vector<sal_uInt16> aUnused; ::lcl_FillUnusedSeqRefNums(aUnused, aUsedNums, badRefNums.size()); @@ -532,7 +532,7 @@ void SwTxtFtn::SetUniqueSeqRefNo( SwDoc& rDoc ) } } -void SwTxtFtn::CheckCondColl() +void SwTextFootnote::CheckCondColl() { //FEATURE::CONDCOLL if( GetStartNode() ) diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx index 3fbb19b17346..416e29ea9964 100644 --- a/sw/source/core/txtnode/atrref.cxx +++ b/sw/source/core/txtnode/atrref.cxx @@ -24,38 +24,38 @@ #include <txtrfmrk.hxx> #include <swfont.hxx> -SwFmtRefMark::~SwFmtRefMark( ) +SwFormatRefMark::~SwFormatRefMark( ) { } -SwFmtRefMark::SwFmtRefMark( const OUString& rName ) +SwFormatRefMark::SwFormatRefMark( const OUString& rName ) : SfxPoolItem(RES_TXTATR_REFMARK) , SwModify(0) - , pTxtAttr(0) + , pTextAttr(0) , aRefName(rName) { } -SwFmtRefMark::SwFmtRefMark( const SwFmtRefMark& rAttr ) +SwFormatRefMark::SwFormatRefMark( const SwFormatRefMark& rAttr ) : SfxPoolItem(RES_TXTATR_REFMARK) , SwModify(0) - , pTxtAttr(0) + , pTextAttr(0) , aRefName(rAttr.aRefName) { } -bool SwFmtRefMark::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatRefMark::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return aRefName == static_cast<const SwFmtRefMark&>(rAttr).aRefName; + return aRefName == static_cast<const SwFormatRefMark&>(rAttr).aRefName; } -SfxPoolItem* SwFmtRefMark::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatRefMark::Clone( SfxItemPool* ) const { - return new SwFmtRefMark( *this ); + return new SwFormatRefMark( *this ); } -void SwFmtRefMark::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew) +void SwFormatRefMark::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew) { NotifyClients(pOld, pNew); if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) @@ -64,7 +64,7 @@ void SwFmtRefMark::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew) } } -void SwFmtRefMark::InvalidateRefMark() +void SwFormatRefMark::InvalidateRefMark() { SwPtrMsgPoolItem const item(RES_REMOVE_UNO_OBJECT, &static_cast<SwModify&>(*this)); // cast to base class (void*) @@ -73,14 +73,14 @@ void SwFmtRefMark::InvalidateRefMark() // Attribut fuer Inhalts-/Positions-Referenzen im Text -SwTxtRefMark::SwTxtRefMark( SwFmtRefMark& rAttr, +SwTextRefMark::SwTextRefMark( SwFormatRefMark& rAttr, sal_Int32 const nStartPos, sal_Int32 const*const pEnd) - : SwTxtAttr(rAttr, nStartPos) - , SwTxtAttrEnd( rAttr, nStartPos, nStartPos ) - , m_pTxtNode( 0 ) + : SwTextAttr(rAttr, nStartPos) + , SwTextAttrEnd( rAttr, nStartPos, nStartPos ) + , m_pTextNode( 0 ) , m_pEnd( 0 ) { - rAttr.pTxtAttr = this; + rAttr.pTextAttr = this; if ( pEnd ) { m_nEnd = *pEnd; @@ -94,7 +94,7 @@ SwTxtRefMark::SwTxtRefMark( SwFmtRefMark& rAttr, SetOverlapAllowedAttr( true ); } -sal_Int32* SwTxtRefMark::GetEnd() +sal_Int32* SwTextRefMark::GetEnd() { return m_pEnd; } diff --git a/sw/source/core/txtnode/atrtox.cxx b/sw/source/core/txtnode/atrtox.cxx index 66aad100ca22..99e7382a00d4 100644 --- a/sw/source/core/txtnode/atrtox.cxx +++ b/sw/source/core/txtnode/atrtox.cxx @@ -23,14 +23,14 @@ #include <tox.hxx> #include <ndtxt.hxx> -SwTxtTOXMark::SwTxtTOXMark( SwTOXMark& rAttr, +SwTextTOXMark::SwTextTOXMark( SwTOXMark& rAttr, sal_Int32 const nStartPos, sal_Int32 const*const pEnd) - : SwTxtAttr( rAttr, nStartPos ) - , SwTxtAttrEnd( rAttr, nStartPos, nStartPos ) - , m_pTxtNode( 0 ) + : SwTextAttr( rAttr, nStartPos ) + , SwTextAttrEnd( rAttr, nStartPos, nStartPos ) + , m_pTextNode( 0 ) , m_pEnd( 0 ) { - rAttr.pTxtAttr = this; + rAttr.pTextAttr = this; if ( rAttr.GetAlternativeText().isEmpty() ) { m_nEnd = *pEnd; @@ -44,16 +44,16 @@ SwTxtTOXMark::SwTxtTOXMark( SwTOXMark& rAttr, SetOverlapAllowedAttr( true ); } -SwTxtTOXMark::~SwTxtTOXMark() +SwTextTOXMark::~SwTextTOXMark() { } -sal_Int32* SwTxtTOXMark::GetEnd() +sal_Int32* SwTextTOXMark::GetEnd() { return m_pEnd; } -void SwTxtTOXMark::CopyTOXMark( SwDoc* pDoc ) +void SwTextTOXMark::CopyTOXMark( SwDoc* pDoc ) { SwTOXMark& rTOX = (SwTOXMark&)GetTOXMark(); TOXTypes eType = rTOX.GetTOXType()->GetType(); diff --git a/sw/source/core/txtnode/chrfmt.cxx b/sw/source/core/txtnode/chrfmt.cxx index 9557ba8145fe..9e303170105e 100644 --- a/sw/source/core/txtnode/chrfmt.cxx +++ b/sw/source/core/txtnode/chrfmt.cxx @@ -22,21 +22,21 @@ #include <charfmt.hxx> #include <docary.hxx> -TYPEINIT1( SwCharFmt, SwFmt ); //rtti fuer SwCharFmt +TYPEINIT1( SwCharFormat, SwFormat ); //rtti fuer SwCharFormat -void SwCharFmt::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwCharFormat::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swCharFmt")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swCharFormat")); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("name"), BAD_CAST(GetName().toUtf8().getStr())); GetAttrSet().dumpAsXml(pWriter); xmlTextWriterEndElement(pWriter); } -void SwCharFmts::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwCharFormats::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swCharFmts")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swCharFormats")); for (size_t i = 0; i < size(); ++i) - GetFmt(i)->dumpAsXml(pWriter); + GetFormat(i)->dumpAsXml(pWriter); xmlTextWriterEndElement(pWriter); } diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index f2af63f11902..90a45b94b6a1 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -53,221 +53,221 @@ using namespace ::com::sun::star; -TYPEINIT1_AUTOFACTORY(SwFmtINetFmt, SfxPoolItem); -TYPEINIT1_AUTOFACTORY(SwFmtAutoFmt, SfxPoolItem); +TYPEINIT1_AUTOFACTORY(SwFormatINetFormat, SfxPoolItem); +TYPEINIT1_AUTOFACTORY(SwFormatAutoFormat, SfxPoolItem); -SwFmtCharFmt::SwFmtCharFmt( SwCharFmt *pFmt ) +SwFormatCharFormat::SwFormatCharFormat( SwCharFormat *pFormat ) : SfxPoolItem( RES_TXTATR_CHARFMT ), - SwClient(pFmt), - pTxtAttr( 0 ) + SwClient(pFormat), + pTextAttr( 0 ) { } -SwFmtCharFmt::SwFmtCharFmt( const SwFmtCharFmt& rAttr ) +SwFormatCharFormat::SwFormatCharFormat( const SwFormatCharFormat& rAttr ) : SfxPoolItem( RES_TXTATR_CHARFMT ), - SwClient( rAttr.GetCharFmt() ), - pTxtAttr( 0 ) + SwClient( rAttr.GetCharFormat() ), + pTextAttr( 0 ) { } -SwFmtCharFmt::~SwFmtCharFmt() {} +SwFormatCharFormat::~SwFormatCharFormat() {} -bool SwFmtCharFmt::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatCharFormat::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return GetCharFmt() == static_cast<const SwFmtCharFmt&>(rAttr).GetCharFmt(); + return GetCharFormat() == static_cast<const SwFormatCharFormat&>(rAttr).GetCharFormat(); } -SfxPoolItem* SwFmtCharFmt::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatCharFormat::Clone( SfxItemPool* ) const { - return new SwFmtCharFmt( *this ); + return new SwFormatCharFormat( *this ); } // weiterleiten an das TextAttribut -void SwFmtCharFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwFormatCharFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { - if( pTxtAttr ) - pTxtAttr->ModifyNotification( pOld, pNew ); + if( pTextAttr ) + pTextAttr->ModifyNotification( pOld, pNew ); } // weiterleiten an das TextAttribut -bool SwFmtCharFmt::GetInfo( SfxPoolItem& rInfo ) const +bool SwFormatCharFormat::GetInfo( SfxPoolItem& rInfo ) const { - return pTxtAttr && pTxtAttr->GetInfo( rInfo ); + return pTextAttr && pTextAttr->GetInfo( rInfo ); } -bool SwFmtCharFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const +bool SwFormatCharFormat::QueryValue( uno::Any& rVal, sal_uInt8 ) const { - OUString sCharFmtName; - if(GetCharFmt()) - SwStyleNameMapper::FillProgName(GetCharFmt()->GetName(), sCharFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); - rVal <<= sCharFmtName; + OUString sCharFormatName; + if(GetCharFormat()) + SwStyleNameMapper::FillProgName(GetCharFormat()->GetName(), sCharFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + rVal <<= sCharFormatName; return true; } -bool SwFmtCharFmt::PutValue( const uno::Any& , sal_uInt8 ) +bool SwFormatCharFormat::PutValue( const uno::Any& , sal_uInt8 ) { OSL_FAIL("Zeichenvorlage kann mit PutValue nicht gesetzt werden!"); return false; } -SwFmtAutoFmt::SwFmtAutoFmt( sal_uInt16 nInitWhich ) +SwFormatAutoFormat::SwFormatAutoFormat( sal_uInt16 nInitWhich ) : SfxPoolItem( nInitWhich ) { } -SwFmtAutoFmt::SwFmtAutoFmt( const SwFmtAutoFmt& rAttr ) +SwFormatAutoFormat::SwFormatAutoFormat( const SwFormatAutoFormat& rAttr ) : SfxPoolItem( rAttr.Which() ), mpHandle( rAttr.mpHandle ) { } -SwFmtAutoFmt::~SwFmtAutoFmt() +SwFormatAutoFormat::~SwFormatAutoFormat() { } -bool SwFmtAutoFmt::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatAutoFormat::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return mpHandle == static_cast<const SwFmtAutoFmt&>(rAttr).mpHandle; + return mpHandle == static_cast<const SwFormatAutoFormat&>(rAttr).mpHandle; } -SfxPoolItem* SwFmtAutoFmt::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatAutoFormat::Clone( SfxItemPool* ) const { - return new SwFmtAutoFmt( *this ); + return new SwFormatAutoFormat( *this ); } -bool SwFmtAutoFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const +bool SwFormatAutoFormat::QueryValue( uno::Any& rVal, sal_uInt8 ) const { - OUString sCharFmtName = StylePool::nameOf( mpHandle ); - rVal <<= OUString( sCharFmtName ); + OUString sCharFormatName = StylePool::nameOf( mpHandle ); + rVal <<= OUString( sCharFormatName ); return true; } -bool SwFmtAutoFmt::PutValue( const uno::Any& , sal_uInt8 ) +bool SwFormatAutoFormat::PutValue( const uno::Any& , sal_uInt8 ) { //the format is not renameable via API return false; } -void SwFmtAutoFmt::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwFormatAutoFormat::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtAutoFmt")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swFormatAutoFormat")); xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); mpHandle->dumpAsXml(pWriter); xmlTextWriterEndElement(pWriter); } -SwFmtINetFmt::SwFmtINetFmt() +SwFormatINetFormat::SwFormatINetFormat() : SfxPoolItem( RES_TXTATR_INETFMT ) , msURL() , msTargetFrame() - , msINetFmtName() - , msVisitedFmtName() + , msINetFormatName() + , msVisitedFormatName() , msHyperlinkName() - , mpMacroTbl( 0 ) - , mpTxtAttr( 0 ) - , mnINetFmtId( 0 ) - , mnVisitedFmtId( 0 ) + , mpMacroTable( 0 ) + , mpTextAttr( 0 ) + , mnINetFormatId( 0 ) + , mnVisitedFormatId( 0 ) {} -SwFmtINetFmt::SwFmtINetFmt( const OUString& rURL, const OUString& rTarget ) +SwFormatINetFormat::SwFormatINetFormat( const OUString& rURL, const OUString& rTarget ) : SfxPoolItem( RES_TXTATR_INETFMT ) , msURL( rURL ) , msTargetFrame( rTarget ) - , msINetFmtName() - , msVisitedFmtName() + , msINetFormatName() + , msVisitedFormatName() , msHyperlinkName() - , mpMacroTbl( 0 ) - , mpTxtAttr( 0 ) - , mnINetFmtId( RES_POOLCHR_INET_NORMAL ) - , mnVisitedFmtId( RES_POOLCHR_INET_VISIT ) + , mpMacroTable( 0 ) + , mpTextAttr( 0 ) + , mnINetFormatId( RES_POOLCHR_INET_NORMAL ) + , mnVisitedFormatId( RES_POOLCHR_INET_VISIT ) { - SwStyleNameMapper::FillUIName( mnINetFmtId, msINetFmtName ); - SwStyleNameMapper::FillUIName( mnVisitedFmtId, msVisitedFmtName ); + SwStyleNameMapper::FillUIName( mnINetFormatId, msINetFormatName ); + SwStyleNameMapper::FillUIName( mnVisitedFormatId, msVisitedFormatName ); } -SwFmtINetFmt::SwFmtINetFmt( const SwFmtINetFmt& rAttr ) +SwFormatINetFormat::SwFormatINetFormat( const SwFormatINetFormat& rAttr ) : SfxPoolItem( RES_TXTATR_INETFMT ) , msURL( rAttr.GetValue() ) , msTargetFrame( rAttr.msTargetFrame ) - , msINetFmtName( rAttr.msINetFmtName ) - , msVisitedFmtName( rAttr.msVisitedFmtName ) + , msINetFormatName( rAttr.msINetFormatName ) + , msVisitedFormatName( rAttr.msVisitedFormatName ) , msHyperlinkName( rAttr.msHyperlinkName ) - , mpMacroTbl( 0 ) - , mpTxtAttr( 0 ) - , mnINetFmtId( rAttr.mnINetFmtId ) - , mnVisitedFmtId( rAttr.mnVisitedFmtId ) + , mpMacroTable( 0 ) + , mpTextAttr( 0 ) + , mnINetFormatId( rAttr.mnINetFormatId ) + , mnVisitedFormatId( rAttr.mnVisitedFormatId ) { - if ( rAttr.GetMacroTbl() ) - mpMacroTbl = new SvxMacroTableDtor( *rAttr.GetMacroTbl() ); + if ( rAttr.GetMacroTable() ) + mpMacroTable = new SvxMacroTableDtor( *rAttr.GetMacroTable() ); } -SwFmtINetFmt::~SwFmtINetFmt() +SwFormatINetFormat::~SwFormatINetFormat() { - delete mpMacroTbl; + delete mpMacroTable; } -bool SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatINetFormat::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); bool bRet = SfxPoolItem::operator==( (SfxPoolItem&) rAttr ) - && msURL == static_cast<const SwFmtINetFmt&>(rAttr).msURL - && msHyperlinkName == static_cast<const SwFmtINetFmt&>(rAttr).msHyperlinkName - && msTargetFrame == static_cast<const SwFmtINetFmt&>(rAttr).msTargetFrame - && msINetFmtName == static_cast<const SwFmtINetFmt&>(rAttr).msINetFmtName - && msVisitedFmtName == static_cast<const SwFmtINetFmt&>(rAttr).msVisitedFmtName - && mnINetFmtId == static_cast<const SwFmtINetFmt&>(rAttr).mnINetFmtId - && mnVisitedFmtId == static_cast<const SwFmtINetFmt&>(rAttr).mnVisitedFmtId; + && msURL == static_cast<const SwFormatINetFormat&>(rAttr).msURL + && msHyperlinkName == static_cast<const SwFormatINetFormat&>(rAttr).msHyperlinkName + && msTargetFrame == static_cast<const SwFormatINetFormat&>(rAttr).msTargetFrame + && msINetFormatName == static_cast<const SwFormatINetFormat&>(rAttr).msINetFormatName + && msVisitedFormatName == static_cast<const SwFormatINetFormat&>(rAttr).msVisitedFormatName + && mnINetFormatId == static_cast<const SwFormatINetFormat&>(rAttr).mnINetFormatId + && mnVisitedFormatId == static_cast<const SwFormatINetFormat&>(rAttr).mnVisitedFormatId; if( !bRet ) return false; - const SvxMacroTableDtor* pOther = static_cast<const SwFmtINetFmt&>(rAttr).mpMacroTbl; - if( !mpMacroTbl ) + const SvxMacroTableDtor* pOther = static_cast<const SwFormatINetFormat&>(rAttr).mpMacroTable; + if( !mpMacroTable ) return ( !pOther || pOther->empty() ); if( !pOther ) - return mpMacroTbl->empty(); + return mpMacroTable->empty(); - const SvxMacroTableDtor& rOwn = *mpMacroTbl; + const SvxMacroTableDtor& rOwn = *mpMacroTable; const SvxMacroTableDtor& rOther = *pOther; return rOwn == rOther; } -SfxPoolItem* SwFmtINetFmt::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatINetFormat::Clone( SfxItemPool* ) const { - return new SwFmtINetFmt( *this ); + return new SwFormatINetFormat( *this ); } -void SwFmtINetFmt::SetMacroTbl( const SvxMacroTableDtor* pNewTbl ) +void SwFormatINetFormat::SetMacroTable( const SvxMacroTableDtor* pNewTable ) { - if( pNewTbl ) + if( pNewTable ) { - if( mpMacroTbl ) - *mpMacroTbl = *pNewTbl; + if( mpMacroTable ) + *mpMacroTable = *pNewTable; else - mpMacroTbl = new SvxMacroTableDtor( *pNewTbl ); + mpMacroTable = new SvxMacroTableDtor( *pNewTable ); } else - delete mpMacroTbl, mpMacroTbl = 0; + delete mpMacroTable, mpMacroTable = 0; } -void SwFmtINetFmt::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro ) +void SwFormatINetFormat::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro ) { - if( !mpMacroTbl ) - mpMacroTbl = new SvxMacroTableDtor; + if( !mpMacroTable ) + mpMacroTable = new SvxMacroTableDtor; - mpMacroTbl->Insert( nEvent, rMacro ); + mpMacroTable->Insert( nEvent, rMacro ); } -const SvxMacro* SwFmtINetFmt::GetMacro( sal_uInt16 nEvent ) const +const SvxMacro* SwFormatINetFormat::GetMacro( sal_uInt16 nEvent ) const { const SvxMacro* pRet = 0; - if( mpMacroTbl && mpMacroTbl->IsKeyValid( nEvent ) ) - pRet = mpMacroTbl->Get( nEvent ); + if( mpMacroTable && mpMacroTable->IsKeyValid( nEvent ) ) + pRet = mpMacroTable->Get( nEvent ); return pRet; } -bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const +bool SwFormatINetFormat::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) @@ -283,9 +283,9 @@ bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const break; case MID_URL_VISITED_FMT: { - OUString sVal = msVisitedFmtName; - if (sVal.isEmpty() && mnVisitedFmtId != 0) - SwStyleNameMapper::FillUIName(mnVisitedFmtId, sVal); + OUString sVal = msVisitedFormatName; + if (sVal.isEmpty() && mnVisitedFormatId != 0) + SwStyleNameMapper::FillUIName(mnVisitedFormatId, sVal); if (!sVal.isEmpty()) SwStyleNameMapper::FillProgName(sVal, sVal, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); @@ -294,9 +294,9 @@ bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const break; case MID_URL_UNVISITED_FMT: { - OUString sVal = msINetFmtName; - if (sVal.isEmpty() && mnINetFmtId != 0) - SwStyleNameMapper::FillUIName(mnINetFmtId, sVal); + OUString sVal = msINetFormatName; + if (sVal.isEmpty() && mnINetFormatId != 0) + SwStyleNameMapper::FillUIName(mnINetFormatId, sVal); if (!sVal.isEmpty()) SwStyleNameMapper::FillProgName(sVal, sVal, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); @@ -308,7 +308,7 @@ bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const // create (and return) event descriptor SwHyperlinkEventDescriptor* pEvents = new SwHyperlinkEventDescriptor(); - pEvents->copyMacrosFromINetFmt(*this); + pEvents->copyMacrosFromINetFormat(*this); uno::Reference<container::XNameReplace> xNameReplace(pEvents); // all others return a string; so we just set rVal here and exit @@ -321,7 +321,7 @@ bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const } return true; } -bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) +bool SwFormatINetFormat::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { bool bRet = true; nMemberId &= ~CONVERT_TWIPS; @@ -340,7 +340,7 @@ bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) SwHyperlinkEventDescriptor* pEvents = new SwHyperlinkEventDescriptor(); uno::Reference< lang::XServiceInfo> xHold = pEvents; pEvents->copyMacrosFromNameReplace(xReplace); - pEvents->copyMacrosIntoINetFmt(*this); + pEvents->copyMacrosIntoINetFormat(*this); } else { @@ -371,8 +371,8 @@ bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) rVal >>= sVal; OUString aString; SwStyleNameMapper::FillUIName( sVal, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); - msVisitedFmtName = aString; - mnVisitedFmtId = SwStyleNameMapper::GetPoolIdFromUIName( msVisitedFmtName, + msVisitedFormatName = aString; + mnVisitedFormatId = SwStyleNameMapper::GetPoolIdFromUIName( msVisitedFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); } break; @@ -382,8 +382,8 @@ bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) rVal >>= sVal; OUString aString; SwStyleNameMapper::FillUIName( sVal, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); - msINetFmtName = aString; - mnINetFmtId = SwStyleNameMapper::GetPoolIdFromUIName( msINetFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + msINetFormatName = aString; + mnINetFormatId = SwStyleNameMapper::GetPoolIdFromUIName( msINetFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); } break; default: @@ -393,70 +393,70 @@ bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return bRet; } -SwFmtRuby::SwFmtRuby( const OUString& rRubyTxt ) +SwFormatRuby::SwFormatRuby( const OUString& rRubyText ) : SfxPoolItem( RES_TXTATR_CJK_RUBY ), - sRubyTxt( rRubyTxt ), - pTxtAttr( 0 ), - nCharFmtId( 0 ), + sRubyText( rRubyText ), + pTextAttr( 0 ), + nCharFormatId( 0 ), nPosition( 0 ), nAdjustment( 0 ) { } -SwFmtRuby::SwFmtRuby( const SwFmtRuby& rAttr ) +SwFormatRuby::SwFormatRuby( const SwFormatRuby& rAttr ) : SfxPoolItem( RES_TXTATR_CJK_RUBY ), - sRubyTxt( rAttr.sRubyTxt ), - sCharFmtName( rAttr.sCharFmtName ), - pTxtAttr( 0 ), - nCharFmtId( rAttr.nCharFmtId), + sRubyText( rAttr.sRubyText ), + sCharFormatName( rAttr.sCharFormatName ), + pTextAttr( 0 ), + nCharFormatId( rAttr.nCharFormatId), nPosition( rAttr.nPosition ), nAdjustment( rAttr.nAdjustment ) { } -SwFmtRuby::~SwFmtRuby() +SwFormatRuby::~SwFormatRuby() { } -SwFmtRuby& SwFmtRuby::operator=( const SwFmtRuby& rAttr ) +SwFormatRuby& SwFormatRuby::operator=( const SwFormatRuby& rAttr ) { - sRubyTxt = rAttr.sRubyTxt; - sCharFmtName = rAttr.sCharFmtName; - nCharFmtId = rAttr.nCharFmtId; + sRubyText = rAttr.sRubyText; + sCharFormatName = rAttr.sCharFormatName; + nCharFormatId = rAttr.nCharFormatId; nPosition = rAttr.nPosition; nAdjustment = rAttr.nAdjustment; - pTxtAttr = 0; + pTextAttr = 0; return *this; } -bool SwFmtRuby::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatRuby::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return sRubyTxt == static_cast<const SwFmtRuby&>(rAttr).sRubyTxt && - sCharFmtName == static_cast<const SwFmtRuby&>(rAttr).sCharFmtName && - nCharFmtId == static_cast<const SwFmtRuby&>(rAttr).nCharFmtId && - nPosition == static_cast<const SwFmtRuby&>(rAttr).nPosition && - nAdjustment == static_cast<const SwFmtRuby&>(rAttr).nAdjustment; + return sRubyText == static_cast<const SwFormatRuby&>(rAttr).sRubyText && + sCharFormatName == static_cast<const SwFormatRuby&>(rAttr).sCharFormatName && + nCharFormatId == static_cast<const SwFormatRuby&>(rAttr).nCharFormatId && + nPosition == static_cast<const SwFormatRuby&>(rAttr).nPosition && + nAdjustment == static_cast<const SwFormatRuby&>(rAttr).nAdjustment; } -SfxPoolItem* SwFmtRuby::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatRuby::Clone( SfxItemPool* ) const { - return new SwFmtRuby( *this ); + return new SwFormatRuby( *this ); } -bool SwFmtRuby::QueryValue( uno::Any& rVal, +bool SwFormatRuby::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { bool bRet = true; nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { - case MID_RUBY_TEXT: rVal <<= sRubyTxt; break; + case MID_RUBY_TEXT: rVal <<= sRubyText; break; case MID_RUBY_ADJUST: rVal <<= (sal_Int16)nAdjustment; break; case MID_RUBY_CHARSTYLE: { OUString aString; - SwStyleNameMapper::FillProgName(sCharFmtName, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillProgName(sCharFormatName, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); rVal <<= aString; } break; @@ -470,7 +470,7 @@ bool SwFmtRuby::QueryValue( uno::Any& rVal, } return bRet; } -bool SwFmtRuby::PutValue( const uno::Any& rVal, +bool SwFormatRuby::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { bool bRet = true; @@ -481,7 +481,7 @@ bool SwFmtRuby::PutValue( const uno::Any& rVal, { OUString sTmp; bRet = rVal >>= sTmp; - sRubyTxt = sTmp; + sRubyText = sTmp; } break; case MID_RUBY_ADJUST: @@ -509,7 +509,7 @@ bool SwFmtRuby::PutValue( const uno::Any& rVal, OUString sTmp; bRet = rVal >>= sTmp; if(bRet) - sCharFmtName = SwStyleNameMapper::GetUIName(sTmp, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sCharFormatName = SwStyleNameMapper::GetUIName(sTmp, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); } break; default: @@ -518,95 +518,95 @@ bool SwFmtRuby::PutValue( const uno::Any& rVal, return bRet; } -SwFmtMeta * SwFmtMeta::CreatePoolDefault(const sal_uInt16 i_nWhich) +SwFormatMeta * SwFormatMeta::CreatePoolDefault(const sal_uInt16 i_nWhich) { - return new SwFmtMeta(i_nWhich); + return new SwFormatMeta(i_nWhich); } -SwFmtMeta::SwFmtMeta(const sal_uInt16 i_nWhich) +SwFormatMeta::SwFormatMeta(const sal_uInt16 i_nWhich) : SfxPoolItem( i_nWhich ) , m_pMeta() - , m_pTxtAttr( 0 ) + , m_pTextAttr( 0 ) { OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich), - "ERROR: SwFmtMeta: invalid which id!"); + "ERROR: SwFormatMeta: invalid which id!"); } -SwFmtMeta::SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta, +SwFormatMeta::SwFormatMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta, const sal_uInt16 i_nWhich ) : SfxPoolItem( i_nWhich ) , m_pMeta( i_pMeta ) - , m_pTxtAttr( 0 ) + , m_pTextAttr( 0 ) { OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich), - "ERROR: SwFmtMeta: invalid which id!"); - OSL_ENSURE(m_pMeta, "SwFmtMeta: no Meta ?"); - // DO NOT call m_pMeta->SetFmtMeta(this) here; only from SetTxtAttr! + "ERROR: SwFormatMeta: invalid which id!"); + OSL_ENSURE(m_pMeta, "SwFormatMeta: no Meta ?"); + // DO NOT call m_pMeta->SetFormatMeta(this) here; only from SetTextAttr! } -SwFmtMeta::~SwFmtMeta() +SwFormatMeta::~SwFormatMeta() { - if (m_pMeta && (m_pMeta->GetFmtMeta() == this)) + if (m_pMeta && (m_pMeta->GetFormatMeta() == this)) { - NotifyChangeTxtNode(0); - m_pMeta->SetFmtMeta(0); + NotifyChangeTextNode(0); + m_pMeta->SetFormatMeta(0); } } -bool SwFmtMeta::operator==( const SfxPoolItem & i_rOther ) const +bool SwFormatMeta::operator==( const SfxPoolItem & i_rOther ) const { assert(SfxPoolItem::operator==(i_rOther)); return SfxPoolItem::operator==( i_rOther ) - && (m_pMeta == static_cast<SwFmtMeta const &>( i_rOther ).m_pMeta); + && (m_pMeta == static_cast<SwFormatMeta const &>( i_rOther ).m_pMeta); } -SfxPoolItem * SwFmtMeta::Clone( SfxItemPool * /*pPool*/ ) const +SfxPoolItem * SwFormatMeta::Clone( SfxItemPool * /*pPool*/ ) const { // if this is indeed a copy, then DoCopy must be called later! return (m_pMeta) // #i105148# pool default may be cloned also! - ? new SwFmtMeta( m_pMeta, Which() ) : new SwFmtMeta( Which() ); + ? new SwFormatMeta( m_pMeta, Which() ) : new SwFormatMeta( Which() ); } -void SwFmtMeta::SetTxtAttr(SwTxtMeta * const i_pTxtAttr) +void SwFormatMeta::SetTextAttr(SwTextMeta * const i_pTextAttr) { - OSL_ENSURE(!(m_pTxtAttr && i_pTxtAttr), - "SwFmtMeta::SetTxtAttr: already has text attribute?"); - OSL_ENSURE( m_pTxtAttr || i_pTxtAttr , - "SwFmtMeta::SetTxtAttr: no attribute to remove?"); - m_pTxtAttr = i_pTxtAttr; - OSL_ENSURE(m_pMeta, "inserted SwFmtMeta has no sw::Meta?"); + OSL_ENSURE(!(m_pTextAttr && i_pTextAttr), + "SwFormatMeta::SetTextAttr: already has text attribute?"); + OSL_ENSURE( m_pTextAttr || i_pTextAttr , + "SwFormatMeta::SetTextAttr: no attribute to remove?"); + m_pTextAttr = i_pTextAttr; + OSL_ENSURE(m_pMeta, "inserted SwFormatMeta has no sw::Meta?"); // the sw::Meta must be able to find the current text attribute! if (m_pMeta) { - if (i_pTxtAttr) + if (i_pTextAttr) { - m_pMeta->SetFmtMeta(this); + m_pMeta->SetFormatMeta(this); } - else if (m_pMeta->GetFmtMeta() == this) + else if (m_pMeta->GetFormatMeta() == this) { // text attribute gone => de-register from text node! - NotifyChangeTxtNode(0); - m_pMeta->SetFmtMeta(0); + NotifyChangeTextNode(0); + m_pMeta->SetFormatMeta(0); } } } -void SwFmtMeta::NotifyChangeTxtNode(SwTxtNode *const pTxtNode) +void SwFormatMeta::NotifyChangeTextNode(SwTextNode *const pTextNode) { - // N.B.: do not reset m_pTxtAttr here: see call in nodes.cxx, + // N.B.: do not reset m_pTextAttr here: see call in nodes.cxx, // where the hint is not deleted! - OSL_ENSURE(m_pMeta, "SwFmtMeta::NotifyChangeTxtNode: no Meta?"); - if (m_pMeta && (m_pMeta->GetFmtMeta() == this)) + OSL_ENSURE(m_pMeta, "SwFormatMeta::NotifyChangeTextNode: no Meta?"); + if (m_pMeta && (m_pMeta->GetFormatMeta() == this)) { // do not call Modify, that would call SwXMeta::Modify! - m_pMeta->NotifyChangeTxtNode(pTxtNode); + m_pMeta->NotifyChangeTextNode(pTextNode); } } -// this SwFmtMeta has been cloned and points at the same sw::Meta as the source +// this SwFormatMeta has been cloned and points at the same sw::Meta as the source // this method copies the sw::Meta -void SwFmtMeta::DoCopy(::sw::MetaFieldManager & i_rTargetDocManager, - SwTxtNode & i_rTargetTxtNode) +void SwFormatMeta::DoCopy(::sw::MetaFieldManager & i_rTargetDocManager, + SwTextNode & i_rTargetTextNode) { - OSL_ENSURE(m_pMeta, "DoCopy called for SwFmtMeta with no sw::Meta?"); + OSL_ENSURE(m_pMeta, "DoCopy called for SwFormatMeta with no sw::Meta?"); if (m_pMeta) { const ::boost::shared_ptr< ::sw::Meta> pOriginal( m_pMeta ); @@ -622,7 +622,7 @@ void SwFmtMeta::DoCopy(::sw::MetaFieldManager & i_rTargetDocManager, pMetaField->m_nNumberFormat, pMetaField->IsFixedLanguage() ); } // Meta must have a text node before calling RegisterAsCopyOf - m_pMeta->NotifyChangeTxtNode(& i_rTargetTxtNode); + m_pMeta->NotifyChangeTextNode(& i_rTargetTextNode); // this cannot be done in Clone: a Clone is not necessarily a copy! m_pMeta->RegisterAsCopyOf(*pOriginal); } @@ -630,11 +630,11 @@ void SwFmtMeta::DoCopy(::sw::MetaFieldManager & i_rTargetDocManager, namespace sw { -Meta::Meta(SwFmtMeta * const i_pFmt) +Meta::Meta(SwFormatMeta * const i_pFormat) : ::sfx2::Metadatable() , SwModify() - , m_pFmt(i_pFmt) - , m_pTxtNode(0) + , m_pFormat(i_pFormat) + , m_pTextNode(0) { } @@ -642,29 +642,29 @@ Meta::~Meta() { } -SwTxtMeta * Meta::GetTxtAttr() const +SwTextMeta * Meta::GetTextAttr() const { - return (m_pFmt) ? m_pFmt->GetTxtAttr() : 0; + return (m_pFormat) ? m_pFormat->GetTextAttr() : 0; } -void Meta::NotifyChangeTxtNodeImpl() +void Meta::NotifyChangeTextNodeImpl() { - if (m_pTxtNode && (GetRegisteredIn() != m_pTxtNode)) + if (m_pTextNode && (GetRegisteredIn() != m_pTextNode)) { - m_pTxtNode->Add(this); + m_pTextNode->Add(this); } - else if (!m_pTxtNode && GetRegisteredIn()) + else if (!m_pTextNode && GetRegisteredIn()) { GetRegisteredInNonConst()->Remove(this); } } -void Meta::NotifyChangeTxtNode(SwTxtNode *const pTxtNode) +void Meta::NotifyChangeTextNode(SwTextNode *const pTextNode) { - m_pTxtNode = pTxtNode; - NotifyChangeTxtNodeImpl(); - if (!pTxtNode) // text node gone? invalidate UNO object! + m_pTextNode = pTextNode; + NotifyChangeTextNodeImpl(); + if (!pTextNode) // text node gone? invalidate UNO object! { SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, &static_cast<SwModify&>(*this) ); // cast to base class! @@ -685,34 +685,34 @@ void Meta::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNew ) // sfx2::Metadatable ::sfx2::IXmlIdRegistry& Meta::GetRegistry() { - SwTxtNode * const pTxtNode( GetTxtNode() ); + SwTextNode * const pTextNode( GetTextNode() ); // GetRegistry may only be called on a meta that is actually in the // document, which means it has a pointer to its text node - OSL_ENSURE(pTxtNode, "ERROR: GetRegistry: no text node?"); - if (!pTxtNode) + OSL_ENSURE(pTextNode, "ERROR: GetRegistry: no text node?"); + if (!pTextNode) throw uno::RuntimeException(); - return pTxtNode->GetRegistry(); + return pTextNode->GetRegistry(); } bool Meta::IsInClipboard() const { - const SwTxtNode * const pTxtNode( GetTxtNode() ); -// no text node: in UNDO OSL_ENSURE(pTxtNode, "IsInClipboard: no text node?"); - return pTxtNode && pTxtNode->IsInClipboard(); + const SwTextNode * const pTextNode( GetTextNode() ); +// no text node: in UNDO OSL_ENSURE(pTextNode, "IsInClipboard: no text node?"); + return pTextNode && pTextNode->IsInClipboard(); } bool Meta::IsInUndo() const { - const SwTxtNode * const pTxtNode( GetTxtNode() ); -// no text node: in UNDO OSL_ENSURE(pTxtNode, "IsInUndo: no text node?"); - return pTxtNode == nullptr || pTxtNode->IsInUndo(); + const SwTextNode * const pTextNode( GetTextNode() ); +// no text node: in UNDO OSL_ENSURE(pTextNode, "IsInUndo: no text node?"); + return pTextNode == nullptr || pTextNode->IsInUndo(); } bool Meta::IsInContent() const { - const SwTxtNode * const pTxtNode( GetTxtNode() ); - OSL_ENSURE(pTxtNode, "IsInContent: no text node?"); - return pTxtNode == nullptr || pTxtNode->IsInContent(); + const SwTextNode * const pTextNode( GetTextNode() ); + OSL_ENSURE(pTextNode, "IsInContent: no text node?"); + return pTextNode == nullptr || pTextNode->IsInContent(); } ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable > @@ -721,9 +721,9 @@ Meta::MakeUnoObject() return SwXMeta::CreateXMeta(*this); } -MetaField::MetaField(SwFmtMeta * const i_pFmt, +MetaField::MetaField(SwFormatMeta * const i_pFormat, const sal_uInt32 nNumberFormat, const bool bIsFixedLanguage) - : Meta(i_pFmt) + : Meta(i_pFormat) , m_nNumberFormat( nNumberFormat ) , m_bIsFixedLanguage( bIsFixedLanguage ) { @@ -739,8 +739,8 @@ void MetaField::GetPrefixAndSuffix( "GetPrefixAndSuffix: no SwXMetaField?"); if (xMetaField.is()) { - SwTxtNode * const pTxtNode( GetTxtNode() ); - SwDocShell const * const pShell(pTxtNode->GetDoc()->GetDocShell()); + SwTextNode * const pTextNode( GetTextNode() ); + SwDocShell const * const pShell(pTextNode->GetDoc()->GetDocShell()); const uno::Reference<frame::XModel> xModel( (pShell) ? pShell->GetModel() : 0, uno::UNO_SET_THROW); getPrefixAndSuffix(xModel, xMetaField, o_pPrefix, o_pSuffix); @@ -756,11 +756,11 @@ sal_uInt32 MetaField::GetNumberFormat(OUString const & rContent) const { //TODO: this probably lacks treatment for some special cases sal_uInt32 nNumberFormat( m_nNumberFormat ); - SwTxtNode * const pTxtNode( GetTxtNode() ); - if (pTxtNode) + SwTextNode * const pTextNode( GetTextNode() ); + if (pTextNode) { SvNumberFormatter *const pNumberFormatter( - pTxtNode->GetDoc()->GetNumberFormatter() ); + pTextNode->GetDoc()->GetNumberFormatter() ); double number; (void) pNumberFormatter->IsNumberFormat( rContent, nNumberFormat, number ); @@ -780,11 +780,11 @@ MetaFieldManager::MetaFieldManager() } ::boost::shared_ptr<MetaField> -MetaFieldManager::makeMetaField(SwFmtMeta * const i_pFmt, +MetaFieldManager::makeMetaField(SwFormatMeta * const i_pFormat, const sal_uInt32 nNumberFormat, const bool bIsFixedLanguage) { const ::boost::shared_ptr<MetaField> pMetaField( - new MetaField(i_pFmt, nNumberFormat, bIsFixedLanguage) ); + new MetaField(i_pFormat, nNumberFormat, bIsFixedLanguage) ); m_MetaFields.push_back(pMetaField); return pMetaField; } diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 9cb932048738..2aa82024bb69 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -1793,7 +1793,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) { - Size aTxtSize; + Size aTextSize; const sal_Int32 nLn = ( COMPLETE_STRING != rInf.GetLen() ) ? rInf.GetLen() : rInf.GetText().getLength(); @@ -1824,24 +1824,24 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) else pOutDev = rInf.GetpOut(); - aTxtSize.Width() = + aTextSize.Width() = pOutDev->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn ); OSL_ENSURE( !rInf.GetShell() || ( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != GetExtLeading() ), "Leading values should be already calculated" ); - aTxtSize.Height() = pOutDev->GetTextHeight() + + aTextSize.Height() = pOutDev->GetTextHeight() + GetFontLeading( rInf.GetShell(), rInf.GetOut() ); - long nAvgWidthPerChar = aTxtSize.Width() / nLn; + long nAvgWidthPerChar = aTextSize.Width() / nLn; const sal_uLong i = nAvgWidthPerChar ? ( nAvgWidthPerChar - 1 ) / nGridWidth + 1: 1; - aTxtSize.Width() = i * nGridWidth * nLn; + aTextSize.Width() = i * nGridWidth * nLn; rInf.SetKanaDiff( 0 ); - return aTxtSize; + return aTextSize; } } @@ -1862,15 +1862,15 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) } else pOutDev = rInf.GetpOut(); - aTxtSize.Width() = pOutDev->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn ); - aTxtSize.Height() = pOutDev->GetTextHeight() + + aTextSize.Width() = pOutDev->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn ); + aTextSize.Height() = pOutDev->GetTextHeight() + GetFontLeading( rInf.GetShell(), rInf.GetOut() ); - aTxtSize.Width() += nLn * nGridWidthAdd; + aTextSize.Width() += nLn * nGridWidthAdd; //if ( rInf.GetKern() && nLn ) - // aTxtSize.Width() += ( nLn ) * long( rInf.GetKern() ); + // aTextSize.Width() += ( nLn ) * long( rInf.GetKern() ); rInf.SetKanaDiff( 0 ); - return aTxtSize; + return aTextSize; } } @@ -1890,9 +1890,9 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) { if( !pPrtFont->IsSameInstance( pPrinter->GetFont() ) ) pPrinter->SetFont(*pPrtFont); - aTxtSize.Width() = pPrinter->GetTextWidth( rInf.GetText(), + aTextSize.Width() = pPrinter->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn ); - aTxtSize.Height() = pPrinter->GetTextHeight(); + aTextSize.Height() = pPrinter->GetTextHeight(); long* pKernArray = new long[nLn]; CreateScrFont( *rInf.GetShell(), rInf.GetOut() ); if( !GetScrFont()->IsSameInstance( rInf.GetOut().GetFont() ) ) @@ -1953,7 +1953,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) } delete[] pKernArray; - aTxtSize.Width() = nScrPos; + aTextSize.Width() = nScrPos; } else { @@ -1967,28 +1967,28 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray, rInf.GetIdx(), nLn, rInf.GetKanaComp(), (sal_uInt16) aFont.GetSize().Height() ) ); - aTxtSize.Width() = pKernArray[ nLn - 1 ]; + aTextSize.Width() = pKernArray[ nLn - 1 ]; delete[] pKernArray; } else { - aTxtSize.Width() = rInf.GetOut().GetTextWidth( rInf.GetText(), + aTextSize.Width() = rInf.GetOut().GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn, rInf.GetVclCache()); rInf.SetKanaDiff( 0 ); } - aTxtSize.Height() = rInf.GetOut().GetTextHeight(); + aTextSize.Height() = rInf.GetOut().GetTextHeight(); } if ( rInf.GetKern() && nLn ) - aTxtSize.Width() += ( nLn - 1 ) * long( rInf.GetKern() ); + aTextSize.Width() += ( nLn - 1 ) * long( rInf.GetKern() ); OSL_ENSURE( !rInf.GetShell() || ( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != GetExtLeading() ), "Leading values should be already calculated" ); - aTxtSize.Height() += GetFontLeading( rInf.GetShell(), rInf.GetOut() ); - return aTxtSize; + aTextSize.Height() += GetFontLeading( rInf.GetShell(), rInf.GetOut() ); + return aTextSize; } sal_Int32 SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf ) @@ -2301,7 +2301,7 @@ SwCacheObj *SwFntAccess::NewObj( ) return new SwFntObj( *static_cast<SwSubFont const *>(pOwner), ++pMagicNo, pShell ); } -sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth ) +sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth ) { ChgFnt( rInf.GetShell(), rInf.GetOut() ); @@ -2314,7 +2314,7 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth ) OSL_ENSURE( !bCompress || ( rInf.GetScriptInfo() && rInf.GetScriptInfo()-> CountCompChg()), "Compression without info" ); - sal_Int32 nTxtBreak = 0; + sal_Int32 nTextBreak = 0; long nKern = 0; sal_Int32 nLn = rInf.GetLen() == COMPLETE_STRING @@ -2342,14 +2342,14 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth ) nAvgWidthPerChar = i * nGridWidth; long nCurrPos = nAvgWidthPerChar; - while( nTxtBreak < rInf.GetLen() && nTextWidth >= nCurrPos ) + while( nTextBreak < rInf.GetLen() && nTextWidth >= nCurrPos ) { nCurrPos += nAvgWidthPerChar; - ++nTxtBreak; + ++nTextBreak; } delete[] pKernArray; - return nTxtBreak + rInf.GetIdx(); + return nTextBreak + rInf.GetIdx(); } } @@ -2365,20 +2365,20 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth ) long* pKernArray = new long[rInf.GetLen()]; rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray, rInf.GetIdx(), rInf.GetLen() ); - long nCurrPos = pKernArray[nTxtBreak] + nGridWidthAdd; - while( nTxtBreak < rInf.GetLen() && nTextWidth >= nCurrPos) + long nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd; + while( nTextBreak < rInf.GetLen() && nTextWidth >= nCurrPos) { - nTxtBreak++; - nCurrPos = pKernArray[nTxtBreak] + nGridWidthAdd * ( nTxtBreak + 1 ); + nTextBreak++; + nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd * ( nTextBreak + 1 ); } delete[] pKernArray; - return nTxtBreak + rInf.GetIdx(); + return nTextBreak + rInf.GetIdx(); } } if( aSub[nActual].IsCapital() && nLn ) { - nTxtBreak = GetCapitalBreak( rInf.GetShell(), rInf.GetpOut(), + nTextBreak = GetCapitalBreak( rInf.GetShell(), rInf.GetpOut(), rInf.GetScriptInfo(), rInf.GetText(), nTextWidth, rInf.GetIdx(), nLn ); } @@ -2429,38 +2429,38 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth ) if( rInf.GetHyphPos() ) { sal_Int32 nHyphPos = *rInf.GetHyphPos(); - nTxtBreak = rInf.GetOut().GetTextBreak( *pTmpText, nTextWidth, + nTextBreak = rInf.GetOut().GetTextBreak( *pTmpText, nTextWidth, static_cast<sal_Unicode>('-'), nHyphPos, nTmpIdx, nTmpLen, nKern, rInf.GetVclCache()); *rInf.GetHyphPos() = (nHyphPos == -1) ? COMPLETE_STRING : nHyphPos; } else - nTxtBreak = rInf.GetOut().GetTextBreak( *pTmpText, nTextWidth, + nTextBreak = rInf.GetOut().GetTextBreak( *pTmpText, nTextWidth, nTmpIdx, nTmpLen, nKern, rInf.GetVclCache()); - if ( bTextReplaced && nTxtBreak != -1 ) + if ( bTextReplaced && nTextBreak != -1 ) { if ( nTmpLen != nLn ) - nTxtBreak = sw_CalcCaseMap( *this, rInf.GetText(), - rInf.GetIdx(), nLn, nTxtBreak ); + nTextBreak = sw_CalcCaseMap( *this, rInf.GetText(), + rInf.GetIdx(), nLn, nTextBreak ); else - nTxtBreak = nTxtBreak + rInf.GetIdx(); + nTextBreak = nTextBreak + rInf.GetIdx(); } } - sal_Int32 nTxtBreak2 = nTxtBreak == -1 ? COMPLETE_STRING : nTxtBreak; + sal_Int32 nTextBreak2 = nTextBreak == -1 ? COMPLETE_STRING : nTextBreak; if ( ! bCompress ) - return nTxtBreak2; + return nTextBreak2; - nTxtBreak2 = nTxtBreak2 - rInf.GetIdx(); + nTextBreak2 = nTextBreak2 - rInf.GetIdx(); - if( nTxtBreak2 < nLn ) + if( nTextBreak2 < nLn ) { - if( !nTxtBreak2 && nLn ) + if( !nTextBreak2 && nLn ) nLn = 1; - else if( nLn > 2 * nTxtBreak2 ) - nLn = 2 * nTxtBreak2; + else if( nLn > 2 * nTextBreak2 ) + nLn = 2 * nTextBreak2; long* pKernArray = new long[ nLn ]; rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray, rInf.GetIdx(), nLn ); @@ -2468,22 +2468,22 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth ) rInf.GetKanaComp(), (sal_uInt16)GetHeight( nActual ) ) ) { long nKernAdd = nKern; - sal_Int32 nTmpBreak = nTxtBreak2; - if( nKern && nTxtBreak2 ) - nKern *= nTxtBreak2 - 1; - while( nTxtBreak2<nLn && nTextWidth >= pKernArray[nTxtBreak2] +nKern ) + sal_Int32 nTmpBreak = nTextBreak2; + if( nKern && nTextBreak2 ) + nKern *= nTextBreak2 - 1; + while( nTextBreak2<nLn && nTextWidth >= pKernArray[nTextBreak2] +nKern ) { nKern += nKernAdd; - ++nTxtBreak2; + ++nTextBreak2; } if( rInf.GetHyphPos() ) - *rInf.GetHyphPos() += nTxtBreak2 - nTmpBreak; // It's not perfect + *rInf.GetHyphPos() += nTextBreak2 - nTmpBreak; // It's not perfect } delete[] pKernArray; } - nTxtBreak2 = nTxtBreak2 + rInf.GetIdx(); + nTextBreak2 = nTextBreak2 + rInf.GetIdx(); - return nTxtBreak2; + return nTextBreak2; } extern Color aGlobalRetoucheColor; diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index b7b856045723..5087242b9ff2 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -108,26 +108,26 @@ public: class SwDoGetCapitalSize : public SwDoCapitals { protected: - Size aTxtSize; + Size aTextSize; public: SwDoGetCapitalSize( SwDrawTextInfo &rInfo ) : SwDoCapitals ( rInfo ) { } virtual ~SwDoGetCapitalSize() {} virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) SAL_OVERRIDE; virtual void Do() SAL_OVERRIDE; - const Size &GetSize() const { return aTxtSize; } + const Size &GetSize() const { return aTextSize; } }; void SwDoGetCapitalSize::Init( SwFntObj *, SwFntObj * ) { - aTxtSize.Height() = 0; - aTxtSize.Width() = 0; + aTextSize.Height() = 0; + aTextSize.Width() = 0; } void SwDoGetCapitalSize::Do() { - aTxtSize.Width() += rInf.GetSize().Width(); + aTextSize.Width() += rInf.GetSize().Width(); if( rInf.GetUpper() ) - aTxtSize.Height() = rInf.GetSize().Height(); + aTextSize.Height() = rInf.GetSize().Height(); } Size SwSubFont::GetCapitalSize( SwDrawTextInfo& rInf ) @@ -141,27 +141,27 @@ Size SwSubFont::GetCapitalSize( SwDrawTextInfo& rInf ) rInf.SetDrawSpace( false ); SwDoGetCapitalSize aDo( rInf ); DoOnCapitals( aDo ); - Size aTxtSize( aDo.GetSize() ); + Size aTextSize( aDo.GetSize() ); // End: - if( !aTxtSize.Height() ) + if( !aTextSize.Height() ) { SV_STAT( nGetTextSize ); - aTxtSize.Height() = short ( rInf.GetpOut()->GetTextHeight() ); + aTextSize.Height() = short ( rInf.GetpOut()->GetTextHeight() ); } rInf.SetKern( nOldKern ); - return aTxtSize; + return aTextSize; } class SwDoGetCapitalBreak : public SwDoCapitals { protected: - long nTxtWidth; + long nTextWidth; sal_Int32 m_nBreak; public: SwDoGetCapitalBreak( SwDrawTextInfo &rInfo, long const nWidth) : SwDoCapitals ( rInfo ) - , nTxtWidth( nWidth ) + , nTextWidth( nWidth ) , m_nBreak( -1 ) { } virtual ~SwDoGetCapitalBreak() {} @@ -176,14 +176,14 @@ void SwDoGetCapitalBreak::Init( SwFntObj *, SwFntObj * ) void SwDoGetCapitalBreak::Do() { - if ( nTxtWidth ) + if ( nTextWidth ) { - if ( rInf.GetSize().Width() < nTxtWidth ) - nTxtWidth -= rInf.GetSize().Width(); + if ( rInf.GetSize().Width() < nTextWidth ) + nTextWidth -= rInf.GetSize().Width(); else { sal_Int32 nEnd = rInf.GetEnd(); - m_nBreak = GetOut().GetTextBreak( rInf.GetText(), nTxtWidth, + m_nBreak = GetOut().GetTextBreak( rInf.GetText(), nTextWidth, rInf.GetIdx(), rInf.GetLen(), rInf.GetKern() ); if (m_nBreak > nEnd || m_nBreak < 0) @@ -202,18 +202,18 @@ void SwDoGetCapitalBreak::Do() m_nBreak = m_nBreak + GetCapInf()->nIdx; } - nTxtWidth = 0; + nTextWidth = 0; } } } sal_Int32 SwFont::GetCapitalBreak( SwViewShell const * pSh, const OutputDevice* pOut, - const SwScriptInfo* pScript, const OUString& rTxt, long const nTextWidth, + const SwScriptInfo* pScript, const OUString& rText, long const nTextWidth, const sal_Int32 nIdx, const sal_Int32 nLen ) { // Start: Point aPos( 0, 0 ); - SwDrawTextInfo aInfo(pSh, *const_cast<OutputDevice*>(pOut), pScript, rTxt, nIdx, nLen, + SwDrawTextInfo aInfo(pSh, *const_cast<OutputDevice*>(pOut), pScript, rText, nIdx, nLen, 0, false); aInfo.SetPos( aPos ); aInfo.SetSpace( 0 ); @@ -469,13 +469,13 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) OSL_ENSURE( pLastFont, "SwFont::DoOnCapitals: No LastFont?!" ); long nKana = 0; - const OUString aTxt( CalcCaseMap( rDo.GetInf().GetText() ) ); + const OUString aText( CalcCaseMap( rDo.GetInf().GetText() ) ); sal_Int32 nMaxPos = std::min( rDo.GetInf().GetText().getLength() - rDo.GetInf().GetIdx(), rDo.GetInf().GetLen() ); rDo.GetInf().SetLen( nMaxPos ); const OUString oldText = rDo.GetInf().GetText(); - rDo.GetInf().SetText( aTxt ); + rDo.GetInf().SetText( aText ); sal_Int32 nPos = rDo.GetInf().GetIdx(); sal_Int32 nOldPos = nPos; nMaxPos = nMaxPos + nPos; @@ -485,7 +485,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) // text is different. If yes, do special handling. OUString aNewText; SwCapitalInfo aCapInf(oldText); - bool bCaseMapLengthDiffers(aTxt.getLength() != oldText.getLength()); + bool bCaseMapLengthDiffers(aText.getLength() != oldText.getLength()); if ( bCaseMapLengthDiffers ) rDo.SetCapInf( aCapInf ); diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx index dddf82f23c94..b125f0507827 100644 --- a/sw/source/core/txtnode/modeltoviewhelper.cxx +++ b/sw/source/core/txtnode/modeltoviewhelper.cxx @@ -80,9 +80,9 @@ struct containsPos } }; -ModelToViewHelper::ModelToViewHelper(const SwTxtNode &rNode, ExpandMode eMode) +ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, ExpandMode eMode) { - const OUString& rNodeText = rNode.GetTxt(); + const OUString& rNodeText = rNode.GetText(); m_aRetText = rNodeText; if (eMode == ExpandMode::PassThrough) @@ -130,7 +130,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTxtNode &rNode, ExpandMode eMode) const SwpHints* pSwpHints2 = rNode.GetpSwpHints(); for ( size_t i = 0; pSwpHints2 && i < pSwpHints2->Count(); ++i ) { - const SwTxtAttr* pAttr = (*pSwpHints2)[i]; + const SwTextAttr* pAttr = (*pSwpHints2)[i]; if (pAttr->HasDummyChar()) { const sal_Int32 nDummyCharPos = pAttr->GetStart(); @@ -149,19 +149,19 @@ ModelToViewHelper::ModelToViewHelper(const SwTxtNode &rNode, ExpandMode eMode) { aFieldResult.m_sExpand = (eMode & ExpandMode::ReplaceMode) ? OUString(CHAR_ZWSP) - : static_txtattr_cast<SwTxtFld const*>(pAttr)-> - GetFmtFld().GetField()->ExpandField(true); + : static_txtattr_cast<SwTextField const*>(pAttr)-> + GetFormatField().GetField()->ExpandField(true); aFieldResult.m_eType = FieldResult::FIELD; } break; case RES_TXTATR_FTN: if (eMode & ExpandMode::ExpandFootnote) { - const SwFmtFtn& rFtn = static_cast<SwTxtFtn const*>(pAttr)->GetFtn(); + const SwFormatFootnote& rFootnote = static_cast<SwTextFootnote const*>(pAttr)->GetFootnote(); const SwDoc *pDoc = rNode.GetDoc(); aFieldResult.m_sExpand = (eMode & ExpandMode::ReplaceMode) ? OUString(CHAR_ZWSP) - : rFtn.GetViewNumStr(*pDoc); + : rFootnote.GetViewNumStr(*pDoc); aFieldResult.m_eType = FieldResult::FOOTNOTE; } break; diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx index bbaea16e05a0..cb312434eea0 100644 --- a/sw/source/core/txtnode/ndhints.cxx +++ b/sw/source/core/txtnode/ndhints.cxx @@ -30,7 +30,7 @@ // Sortierreihenfolge: Start, Ende (umgekehrt!), Which-Wert (umgekehrt!), // als letztes die Adresse selbst -static bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 ) +static bool lcl_IsLessStart( const SwTextAttr &rHt1, const SwTextAttr &rHt2 ) { if ( rHt1.GetStart() == rHt2.GetStart() ) { @@ -45,9 +45,9 @@ static bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 ) if ( RES_TXTATR_CHARFMT == nWhich1 ) { const sal_uInt16 nS1 = - static_txtattr_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber(); + static_txtattr_cast<const SwTextCharFormat&>(rHt1).GetSortNumber(); const sal_uInt16 nS2 = - static_txtattr_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber(); + static_txtattr_cast<const SwTextCharFormat&>(rHt2).GetSortNumber(); if ( nS1 != nS2 ) // robust return nS1 < nS2; } @@ -63,7 +63,7 @@ static bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 ) } // Zuerst nach Ende danach nach Ptr -static bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 ) +static bool lcl_IsLessEnd( const SwTextAttr &rHt1, const SwTextAttr &rHt2 ) { const sal_Int32 nHt1 = *rHt1.GetAnyEnd(); const sal_Int32 nHt2 = *rHt2.GetAnyEnd(); @@ -78,9 +78,9 @@ static bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 ) if ( RES_TXTATR_CHARFMT == nWhich1 ) { const sal_uInt16 nS1 = - static_txtattr_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber(); + static_txtattr_cast<const SwTextCharFormat&>(rHt1).GetSortNumber(); const sal_uInt16 nS2 = - static_txtattr_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber(); + static_txtattr_cast<const SwTextCharFormat&>(rHt2).GetSortNumber(); if ( nS1 != nS2 ) // robust return nS1 > nS2; } @@ -96,31 +96,31 @@ static bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 ) return ( nHt1 < nHt2 ); } -bool CompareSwpHtStart::operator()(SwTxtAttr* const lhs, SwTxtAttr* const rhs) const +bool CompareSwpHtStart::operator()(SwTextAttr* const lhs, SwTextAttr* const rhs) const { return lcl_IsLessStart( *lhs, *rhs ); } -bool CompareSwpHtEnd::operator()(SwTxtAttr* const lhs, SwTxtAttr* const rhs) const +bool CompareSwpHtEnd::operator()(SwTextAttr* const lhs, SwTextAttr* const rhs) const { return lcl_IsLessEnd( *lhs, *rhs ); } -void SwpHintsArray::Insert( const SwTxtAttr *pHt ) +void SwpHintsArray::Insert( const SwTextAttr *pHt ) { Resort(); - assert(m_HintStarts.find(const_cast<SwTxtAttr*>(pHt)) + assert(m_HintStarts.find(const_cast<SwTextAttr*>(pHt)) == m_HintStarts.end()); // "Insert: hint already in HtStart" - assert(m_HintEnds.find(const_cast<SwTxtAttr*>(pHt)) + assert(m_HintEnds.find(const_cast<SwTextAttr*>(pHt)) == m_HintEnds.end()); // "Insert: hint already in HtEnd" - m_HintStarts.insert( const_cast<SwTxtAttr*>(pHt) ); - m_HintEnds .insert( const_cast<SwTxtAttr*>(pHt) ); + m_HintStarts.insert( const_cast<SwTextAttr*>(pHt) ); + m_HintEnds .insert( const_cast<SwTextAttr*>(pHt) ); } void SwpHintsArray::DeleteAtPos( const size_t nPos ) { // optimization: nPos is the position in the Starts array - SwTxtAttr *pHt = m_HintStarts[ nPos ]; + SwTextAttr *pHt = m_HintStarts[ nPos ]; m_HintStarts.erase( m_HintStarts.begin() + nPos ); Resort(); @@ -130,10 +130,10 @@ void SwpHintsArray::DeleteAtPos( const size_t nPos ) (void) done; // unused in NDEBUG } -bool SwpHintsArray::Contains( const SwTxtAttr *pHt ) const +bool SwpHintsArray::Contains( const SwTextAttr *pHt ) const { // DO NOT use find() or CHECK here! - // if called from SwTxtNode::InsertItem, pHt has already been deleted, + // if called from SwTextNode::InsertItem, pHt has already been deleted, // so it cannot be dereferenced for (size_t i = 0; i < m_HintStarts.size(); ++i) { @@ -163,21 +163,21 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const sal_Int32 nLastStart = 0; sal_Int32 nLastEnd = 0; - const SwTxtAttr *pLastStart = 0; - const SwTxtAttr *pLastEnd = 0; - std::set<SwTxtAttr const*> RsidOnlyAutoFmts; + const SwTextAttr *pLastStart = 0; + const SwTextAttr *pLastEnd = 0; + std::set<SwTextAttr const*> RsidOnlyAutoFormats; if (bPortionsMerged) { for (size_t i = 0; i < Count(); ++i) { - SwTxtAttr const*const pHint(m_HintStarts[i]); + SwTextAttr const*const pHint(m_HintStarts[i]); if (RES_TXTATR_AUTOFMT == pHint->Which()) { std::shared_ptr<SfxItemSet> const pSet( - pHint->GetAutoFmt().GetStyleHandle()); + pHint->GetAutoFormat().GetStyleHandle()); if (pSet->Count() == 1 && pSet->GetItem(RES_CHRATR_RSID, false)) { - RsidOnlyAutoFmts.insert(pHint); + RsidOnlyAutoFormats.insert(pHint); } } } @@ -188,7 +188,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const // --- Start-Kontrolle --- // 2a) gueltiger Pointer? vgl. DELETEFF - const SwTxtAttr *pHt = m_HintStarts[i]; + const SwTextAttr *pHt = m_HintStarts[i]; CHECK_ERR( 0xFF != *reinterpret_cast<unsigned char const *>(pHt), "HintsCheck: start ptr was deleted" ); // 3a) Stimmt die Start-Sortierung? @@ -205,7 +205,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const // --- End-Kontrolle --- // 2b) gueltiger Pointer? vgl. DELETEFF - const SwTxtAttr *pHtEnd = m_HintEnds[i]; + const SwTextAttr *pHtEnd = m_HintEnds[i]; CHECK_ERR( 0xFF != *reinterpret_cast<unsigned char const *>(pHtEnd), "HintsCheck: end ptr was deleted" ); // 3b) Stimmt die End-Sortierung? @@ -223,13 +223,13 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const // --- Ueberkreuzungen --- // 5) gleiche Pointer in beiden Arrays - if (m_HintStarts.find(const_cast<SwTxtAttr*>(pHt)) == m_HintStarts.end()) + if (m_HintStarts.find(const_cast<SwTextAttr*>(pHt)) == m_HintStarts.end()) nIdx = COMPLETE_STRING; CHECK_ERR( COMPLETE_STRING != nIdx, "HintsCheck: no GetStartOf" ); // 6) gleiche Pointer in beiden Arrays - if (m_HintEnds.find(const_cast<SwTxtAttr*>(pHt)) == m_HintEnds.end()) + if (m_HintEnds.find(const_cast<SwTextAttr*>(pHt)) == m_HintEnds.end()) nIdx = COMPLETE_STRING; CHECK_ERR( COMPLETE_STRING != nIdx, "HintsCheck: no GetEndOf" ); @@ -245,8 +245,8 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const "HintsCheck: Character attribute in end array" ); // 8) style portion check - const SwTxtAttr* pHtThis = m_HintStarts[i]; - const SwTxtAttr* pHtLast = i > 0 ? m_HintStarts[i-1] : 0; + const SwTextAttr* pHtThis = m_HintStarts[i]; + const SwTextAttr* pHtLast = i > 0 ? m_HintStarts[i-1] : 0; CHECK_ERR( (0 == i) || ( (RES_TXTATR_CHARFMT != pHtLast->Which()) && (RES_TXTATR_AUTOFMT != pHtLast->Which())) @@ -261,9 +261,9 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const ) // never two AUTOFMT on same range && ( (pHtThis->Which() != RES_TXTATR_CHARFMT) || (pHtLast->Which() != RES_TXTATR_CHARFMT) - || (static_txtattr_cast<const SwTxtCharFmt *>(pHtThis) + || (static_txtattr_cast<const SwTextCharFormat *>(pHtThis) ->GetSortNumber() != - static_txtattr_cast<const SwTxtCharFmt *>(pHtLast) + static_txtattr_cast<const SwTextCharFormat *>(pHtLast) ->GetSortNumber()) ) // multiple CHARFMT on same range need distinct sortnr ) @@ -285,7 +285,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const bool bForbidContinuation(!bNoLength && !bNeedContinuation); if (RES_TXTATR_AUTOFMT == pHt->Which()) { - if (RsidOnlyAutoFmts.find(pHt) != RsidOnlyAutoFmts.end()) + if (RsidOnlyAutoFormats.find(pHt) != RsidOnlyAutoFormats.end()) { assert(pHt->IsFormatIgnoreStart()); bNeedContinuation = false; @@ -297,7 +297,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const bool bFound(false); for (size_t j = i + 1; j < Count(); ++j) { - SwTxtAttr *const pOther(m_HintStarts[j]); + SwTextAttr *const pOther(m_HintStarts[j]); if (pOther->GetStart() > *pHt->End()) { break; // done @@ -317,8 +317,8 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const bFound = true; } else if (bForbidContinuation && - (RsidOnlyAutoFmts.find(pOther) == - RsidOnlyAutoFmts.end())) + (RsidOnlyAutoFormats.find(pOther) == + RsidOnlyAutoFormats.end())) { assert(!pOther->IsFormatIgnoreStart()); } @@ -343,7 +343,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const { for ( size_t j = 0; j < Count(); ++j ) { - SwTxtAttr const * const pOther( m_HintStarts[j] ); + SwTextAttr const * const pOther( m_HintStarts[j] ); if ( pOther->IsNesting() && (i != j) ) { SwComparePosition cmp = ComparePosition( @@ -356,12 +356,12 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const } } - // 10) dummy char check (unfortunately cannot check SwTxtNode::m_Text) + // 10) dummy char check (unfortunately cannot check SwTextNode::m_Text) if (pHtThis->HasDummyChar()) { for ( sal_uInt16 j = 0; j < i; ++j ) { - SwTxtAttr const * const pOther( m_HintStarts[j] ); + SwTextAttr const * const pOther( m_HintStarts[j] ); if (pOther->HasDummyChar()) { CHECK_ERR( (pOther->GetStart() != pHtThis->GetStart()), @@ -376,7 +376,7 @@ bool SwpHintsArray::Check(bool bPortionsMerged) const #endif /* DBG_UTIL */ // Resort() is called before every Insert and Delete. -// Various SwTxtNode methods modify hints in a way that violates the +// Various SwTextNode methods modify hints in a way that violates the // sort order of the m_HintStarts, m_HintEnds arrays, so this method is needed // to restore the order. diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index f1a0a7bcb632..a56d67582aa0 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -93,9 +93,9 @@ using namespace ::com::sun::star; -typedef std::vector<SwTxtAttr*> SwpHts; +typedef std::vector<SwTextAttr*> SwpHts; -TYPEINIT1( SwTxtNode, SwCntntNode ) +TYPEINIT1( SwTextNode, SwContentNode ) // unfortunately everyone can change Hints without ensuring order or the linking between them #ifdef DBG_UTIL @@ -106,13 +106,13 @@ TYPEINIT1( SwTxtNode, SwCntntNode ) #define CHECK_SWPHINTS(pNd) #endif -SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere, - SwTxtFmtColl *pColl, +SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere, + SwTextFormatColl *pColl, SwAttrSet* pAutoAttr ) { OSL_ENSURE( pColl, "Collection pointer is 0." ); - SwTxtNode *pNode = new SwTxtNode( rWhere, pColl, pAutoAttr ); + SwTextNode *pNode = new SwTextNode( rWhere, pColl, pAutoAttr ); SwNodeIndex aIdx( *pNode ); @@ -143,7 +143,7 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere, case ND_SECTIONNODE: if( static_cast<SwSectionNode*>(pNd)->GetSection().IsHidden() || - static_cast<SwSectionNode*>(pNd)->IsCntntHidden() ) + static_cast<SwSectionNode*>(pNd)->IsContentHidden() ) { SwNodeIndex aTmpIdx( *pNode ); pNd = FindPrvNxtFrmNode( aTmpIdx, pNode ); @@ -158,7 +158,7 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere, case ND_TEXTNODE: case ND_GRFNODE: case ND_OLENODE: - static_cast<SwCntntNode*>(pNd)->MakeFrms( *pNode ); + static_cast<SwContentNode*>(pNd)->MakeFrms( *pNode ); return pNode; case ND_ENDNODE: @@ -194,8 +194,8 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere, } while( true ); } -SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl, const SfxItemSet* pAutoAttr ) -: SwCntntNode( rWhere, ND_TEXTNODE, pTxtColl ), +SwTextNode::SwTextNode( const SwNodeIndex &rWhere, SwTextFormatColl *pTextColl, const SfxItemSet* pAutoAttr ) +: SwContentNode( rWhere, ND_TEXTNODE, pTextColl ), m_pSwpHints( 0 ), mpNodeNum( 0 ), m_Text(), @@ -223,9 +223,9 @@ SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl, const S // apply paragraph style's assigned outline style list level as // list level of the paragraph, if it has none set already. if ( !HasAttrListLevel() && - pTxtColl && pTxtColl->IsAssignedToListLevelOfOutlineStyle() ) + pTextColl && pTextColl->IsAssignedToListLevelOfOutlineStyle() ) { - SetAttrListLevel( pTxtColl->GetAssignedOutlineStyleLevel() ); + SetAttrListLevel( pTextColl->GetAssignedOutlineStyleLevel() ); } AddToList(); } @@ -237,7 +237,7 @@ SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl, const S m_bRecalcHiddenCharFlags = true; } -SwTxtNode::~SwTxtNode() +SwTextNode::~SwTextNode() { // delete only removes the pointer not the array elements! if ( m_pSwpHints ) @@ -268,11 +268,11 @@ SwTxtNode::~SwTxtNode() if (HasWriterListeners()) { - DelFrms_TxtNodePart(); + DelFrms_TextNodePart(); } } -void SwTxtNode::FileLoadedInitHints() +void SwTextNode::FileLoadedInitHints() { if (m_pSwpHints) { @@ -280,110 +280,110 @@ void SwTxtNode::FileLoadedInitHints() } } -SwCntntFrm *SwTxtNode::MakeFrm( SwFrm* pSib ) +SwContentFrm *SwTextNode::MakeFrm( SwFrm* pSib ) { // fdo#52028: ODF file import does not result in MergePortions being called // for every attribute, since that would be inefficient. So call it here. FileLoadedInitHints(); - SwCntntFrm *pFrm = new SwTxtFrm( this, pSib ); + SwContentFrm *pFrm = new SwTextFrm( this, pSib ); return pFrm; } -sal_Int32 SwTxtNode::Len() const +sal_Int32 SwTextNode::Len() const { return m_Text.getLength(); } // After a split node, it's necessary to actualize the ref-pointer of the ftnfrms. -static void lcl_ChangeFtnRef( SwTxtNode &rNode ) +static void lcl_ChangeFootnoteRef( SwTextNode &rNode ) { SwpHints *pSwpHints = rNode.GetpSwpHints(); if( pSwpHints && rNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ) { - SwCntntFrm* pFrm = NULL; + SwContentFrm* pFrm = NULL; // OD 07.11.2002 #104840# - local variable to remember first footnote // of node <rNode> in order to invalidate position of its first content. // Thus, in its <MakeAll()> it will checked its position relative to its reference. - SwFtnFrm* pFirstFtnOfNode = 0; + SwFootnoteFrm* pFirstFootnoteOfNode = 0; for( size_t j = pSwpHints->Count(); j; ) { - SwTxtAttr* pHt = pSwpHints->GetTextHint(--j); + SwTextAttr* pHt = pSwpHints->GetTextHint(--j); if (RES_TXTATR_FTN == pHt->Which()) { if( !pFrm ) { - pFrm = SwIterator<SwCntntFrm,SwTxtNode>(rNode).First(); + pFrm = SwIterator<SwContentFrm,SwTextNode>(rNode).First(); if (!pFrm) return; } - SwTxtFtn *pAttr = static_cast<SwTxtFtn*>(pHt); - OSL_ENSURE( pAttr->GetStartNode(), "FtnAtr ohne StartNode." ); + SwTextFootnote *pAttr = static_cast<SwTextFootnote*>(pHt); + OSL_ENSURE( pAttr->GetStartNode(), "FootnoteAtr ohne StartNode." ); SwNodeIndex aIdx( *pAttr->GetStartNode(), 1 ); - SwCntntNode *pNd = aIdx.GetNode().GetCntntNode(); + SwContentNode *pNd = aIdx.GetNode().GetContentNode(); if ( !pNd ) pNd = pFrm->GetAttrSet()->GetDoc()-> GetNodes().GoNextSection( &aIdx, true, false ); if ( !pNd ) continue; - SwIterator<SwCntntFrm,SwCntntNode> aIter( *pNd ); - SwCntntFrm* pCntnt = aIter.First(); - if( pCntnt ) + SwIterator<SwContentFrm,SwContentNode> aIter( *pNd ); + SwContentFrm* pContent = aIter.First(); + if( pContent ) { - OSL_ENSURE( pCntnt->getRootFrm() == pFrm->getRootFrm(), - "lcl_ChangeFtnRef: Layout double?" ); - SwFtnFrm *pFtn = pCntnt->FindFtnFrm(); - if( pFtn && pFtn->GetAttr() == pAttr ) + OSL_ENSURE( pContent->getRootFrm() == pFrm->getRootFrm(), + "lcl_ChangeFootnoteRef: Layout double?" ); + SwFootnoteFrm *pFootnote = pContent->FindFootnoteFrm(); + if( pFootnote && pFootnote->GetAttr() == pAttr ) { - while( pFtn->GetMaster() ) - pFtn = pFtn->GetMaster(); + while( pFootnote->GetMaster() ) + pFootnote = pFootnote->GetMaster(); // #104840# - remember footnote frame - pFirstFtnOfNode = pFtn; - while ( pFtn ) + pFirstFootnoteOfNode = pFootnote; + while ( pFootnote ) { - pFtn->SetRef( pFrm ); - pFtn = pFtn->GetFollow(); - static_cast<SwTxtFrm*>(pFrm)->SetFtn( true ); + pFootnote->SetRef( pFrm ); + pFootnote = pFootnote->GetFollow(); + static_cast<SwTextFrm*>(pFrm)->SetFootnote( true ); } } #if OSL_DEBUG_LEVEL > 0 - while( 0 != (pCntnt = aIter.Next()) ) + while( 0 != (pContent = aIter.Next()) ) { - SwFtnFrm *pDbgFtn = pCntnt->FindFtnFrm(); - OSL_ENSURE( !pDbgFtn || pDbgFtn->GetRef() == pFrm, - "lcl_ChangeFtnRef: Who's that guy?" ); + SwFootnoteFrm *pDbgFootnote = pContent->FindFootnoteFrm(); + OSL_ENSURE( !pDbgFootnote || pDbgFootnote->GetRef() == pFrm, + "lcl_ChangeFootnoteRef: Who's that guy?" ); } #endif } } } // end of for-loop on <SwpHints> // #104840# - invalidate - if ( pFirstFtnOfNode ) + if ( pFirstFootnoteOfNode ) { - SwCntntFrm* pCntnt = pFirstFtnOfNode->ContainsCntnt(); - if ( pCntnt ) + SwContentFrm* pContent = pFirstFootnoteOfNode->ContainsContent(); + if ( pContent ) { - pCntnt->_InvalidatePos(); + pContent->_InvalidatePos(); } } } } -SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) +SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos ) { bool parentIsOutline = IsOutline(); // create a node "in front" of me const sal_Int32 nSplitPos = rPos.nContent.GetIndex(); - const sal_Int32 nTxtLen = m_Text.getLength(); - SwTxtNode* const pNode = - _MakeNewTxtNode( rPos.nNode, false, nSplitPos==nTxtLen ); + const sal_Int32 nTextLen = m_Text.getLength(); + SwTextNode* const pNode = + _MakeNewTextNode( rPos.nNode, false, nSplitPos==nTextLen ); // the first paragraph gets the XmlId, // _except_ if it is empty and the second is not empty if (nSplitPos != 0) { pNode->RegisterAsCopyOf(*this, true); - if (nSplitPos == nTxtLen) + if (nSplitPos == nTextLen) { this->RemoveMetadataReference(); // NB: SwUndoSplitNode will call pNode->JoinNext, @@ -400,7 +400,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) ResetAttr( RES_PARATR_LIST_LEVEL ); } - if ( HasWriterListeners() && !m_Text.isEmpty() && (nTxtLen / 2) < nSplitPos ) + if ( HasWriterListeners() && !m_Text.isEmpty() && (nTextLen / 2) < nSplitPos ) { // optimization for SplitNode: If a split is at the end of a node then // move the frames from the current to the new one and create new ones @@ -409,7 +409,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) LockModify(); // disable notifications // werden FlyFrames mit verschoben, so muessen diese nicht ihre - // Frames zerstoeren. Im SwTxtFly::SetAnchor wird es abgefragt! + // Frames zerstoeren. Im SwTextFly::SetAnchor wird es abgefragt! if ( HasHints() ) { pNode->GetOrCreateSwpHints().SetInSplitNode(true); @@ -460,10 +460,10 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) { for ( size_t j = m_pSwpHints->Count(); j; ) { - SwTxtAttr* const pHt = m_pSwpHints->GetTextHint( --j ); + SwTextAttr* const pHt = m_pSwpHints->GetTextHint( --j ); if ( RES_TXTATR_FLYCNT == pHt ->Which() ) { - pHt->GetFlyCnt().GetFrmFmt()->DelFrms(); + pHt->GetFlyCnt().GetFrameFormat()->DelFrms(); } else if ( pHt->DontExpand() ) { @@ -480,12 +480,12 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) } - SwIterator<SwCntntFrm,SwTxtNode> aIter( *this ); - for( SwCntntFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwContentFrm,SwTextNode> aIter( *this ); + for( SwContentFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) { pFrm->RegisterToNode( *pNode ); - if( pFrm->IsTxtFrm() && !pFrm->IsFollow() && static_cast<SwTxtFrm*>(pFrm)->GetOfst() ) - static_cast<SwTxtFrm*>(pFrm)->SetOfst( 0 ); + if( pFrm->IsTextFrm() && !pFrm->IsFollow() && static_cast<SwTextFrm*>(pFrm)->GetOfst() ) + static_cast<SwTextFrm*>(pFrm)->SetOfst( 0 ); } if ( IsInCache() ) @@ -500,28 +500,28 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) // with length zero, because we have to notify about the changed // text node. const SwRootFrm *pRootFrm; - if ( (nTxtLen != nSplitPos) || + if ( (nTextLen != nSplitPos) || ( (pRootFrm = pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()) != 0 && pRootFrm->IsAnyShellAccessible() ) ) { // dann sage den Frames noch, das am Ende etwas "geloescht" wurde - if( 1 == nTxtLen - nSplitPos ) + if( 1 == nTextLen - nSplitPos ) { SwDelChr aHint( nSplitPos ); pNode->NotifyClients( 0, &aHint ); } else { - SwDelTxt aHint( nSplitPos, nTxtLen - nSplitPos ); + SwDelText aHint( nSplitPos, nTextLen - nSplitPos ); pNode->NotifyClients( 0, &aHint ); } } if ( HasHints() ) { - MoveTxtAttr_To_AttrSet(); + MoveTextAttr_To_AttrSet(); } pNode->MakeFrms( *this ); // neue Frames anlegen. - lcl_ChangeFtnRef( *this ); + lcl_ChangeFootnoteRef( *this ); } else { @@ -548,7 +548,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) { for ( size_t j = m_pSwpHints->Count(); j; ) { - SwTxtAttr* const pHt = m_pSwpHints->GetTextHint( --j ); + SwTextAttr* const pHt = m_pSwpHints->GetTextHint( --j ); const sal_Int32* const pEnd = pHt->GetEnd(); if ( pHt->DontExpand() && pEnd && (pHt->GetStart() == *pEnd) ) { @@ -557,7 +557,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) DestroyAttr( pHt ); } } - MoveTxtAttr_To_AttrSet(); + MoveTextAttr_To_AttrSet(); } if( pList ) @@ -582,7 +582,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) { MakeFrms( *pNode ); // neue Frames anlegen. } - lcl_ChangeFtnRef( *pNode ); + lcl_ChangeFootnoteRef( *pNode ); } { @@ -600,12 +600,12 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) return pNode; } -void SwTxtNode::MoveTxtAttr_To_AttrSet() +void SwTextNode::MoveTextAttr_To_AttrSet() { - OSL_ENSURE( m_pSwpHints, "MoveTxtAttr_To_AttrSet without SwpHints?" ); + OSL_ENSURE( m_pSwpHints, "MoveTextAttr_To_AttrSet without SwpHints?" ); for ( size_t i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i ) { - SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i); + SwTextAttr *pHt = m_pSwpHints->GetTextHint(i); if( pHt->GetStart() ) break; @@ -615,7 +615,7 @@ void SwTxtNode::MoveTxtAttr_To_AttrSet() if( !pHtEndIdx ) continue; - if (*pHtEndIdx < m_Text.getLength() || pHt->IsCharFmtAttr()) + if (*pHtEndIdx < m_Text.getLength() || pHt->IsCharFormatAttr()) break; if( !pHt->IsDontMoveAttr() && @@ -629,83 +629,83 @@ void SwTxtNode::MoveTxtAttr_To_AttrSet() } -SwCntntNode *SwTxtNode::JoinNext() +SwContentNode *SwTextNode::JoinNext() { SwNodes& rNds = GetNodes(); SwNodeIndex aIdx( *this ); - if( SwCntntNode::CanJoinNext( &aIdx ) ) + if( SwContentNode::CanJoinNext( &aIdx ) ) { SwDoc* pDoc = rNds.GetDoc(); - const std::shared_ptr<sw::mark::CntntIdxStore> pCntntStore(sw::mark::CntntIdxStore::Create()); - pCntntStore->Save(pDoc, aIdx.GetIndex(), SAL_MAX_INT32); - SwTxtNode *pTxtNode = aIdx.GetNode().GetTxtNode(); + const std::shared_ptr<sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create()); + pContentStore->Save(pDoc, aIdx.GetIndex(), SAL_MAX_INT32); + SwTextNode *pTextNode = aIdx.GetNode().GetTextNode(); sal_Int32 nOldLen = m_Text.getLength(); // METADATA: merge - this->JoinMetadatable(*pTxtNode, !this->Len(), !pTxtNode->Len()); + this->JoinMetadatable(*pTextNode, !this->Len(), !pTextNode->Len()); SwWrongList *pList = GetWrong(); if( pList ) { - pList->JoinList( pTxtNode->GetWrong(), nOldLen ); + pList->JoinList( pTextNode->GetWrong(), nOldLen ); SetWrongDirty( true ); SetWrong( 0, false ); } else { - pList = pTxtNode->GetWrong(); + pList = pTextNode->GetWrong(); if( pList ) { pList->Move( 0, nOldLen ); SetWrongDirty( true ); - pTxtNode->SetWrong( 0, false ); + pTextNode->SetWrong( 0, false ); } } SwGrammarMarkUp *pList3 = GetGrammarCheck(); if( pList3 ) { - pList3->JoinGrammarList( pTxtNode->GetGrammarCheck(), nOldLen ); + pList3->JoinGrammarList( pTextNode->GetGrammarCheck(), nOldLen ); SetGrammarCheckDirty( true ); SetGrammarCheck( 0, false ); } else { - pList3 = pTxtNode->GetGrammarCheck(); + pList3 = pTextNode->GetGrammarCheck(); if( pList3 ) { pList3->MoveGrammar( 0, nOldLen ); SetGrammarCheckDirty( true ); - pTxtNode->SetGrammarCheck( 0, false ); + pTextNode->SetGrammarCheck( 0, false ); } } SwWrongList *pList2 = GetSmartTags(); if( pList2 ) { - pList2->JoinList( pTxtNode->GetSmartTags(), nOldLen ); + pList2->JoinList( pTextNode->GetSmartTags(), nOldLen ); SetSmartTagDirty( true ); SetSmartTags( 0, false ); } else { - pList2 = pTxtNode->GetSmartTags(); + pList2 = pTextNode->GetSmartTags(); if( pList2 ) { pList2->Move( 0, nOldLen ); SetSmartTagDirty( true ); - pTxtNode->SetSmartTags( 0, false ); + pTextNode->SetSmartTags( 0, false ); } } { // wg. SwIndex - pTxtNode->CutText( this, SwIndex(pTxtNode), pTxtNode->Len() ); + pTextNode->CutText( this, SwIndex(pTextNode), pTextNode->Len() ); } // verschiebe noch alle Bookmarks/TOXMarks - if( !pCntntStore->Empty()) - pCntntStore->Restore( pDoc, GetIndex(), nOldLen ); + if( !pContentStore->Empty()) + pContentStore->Restore( pDoc, GetIndex(), nOldLen ); - if( pTxtNode->HasAnyIndex() ) + if( pTextNode->HasAnyIndex() ) { // alle Crsr/StkCrsr/UnoCrsr aus dem Loeschbereich verschieben pDoc->CorrAbs( aIdx, SwPosition( *this ), nOldLen, true ); @@ -717,30 +717,30 @@ SwCntntNode *SwTxtNode::JoinNext() InvalidateNumRule(); } else { - OSL_FAIL( "kein TxtNode." ); + OSL_FAIL( "kein TextNode." ); } return this; } -SwCntntNode *SwTxtNode::JoinPrev() +SwContentNode *SwTextNode::JoinPrev() { SwNodes& rNds = GetNodes(); SwNodeIndex aIdx( *this ); - if( SwCntntNode::CanJoinPrev( &aIdx ) ) + if( SwContentNode::CanJoinPrev( &aIdx ) ) { SwDoc* pDoc = rNds.GetDoc(); - const std::shared_ptr<sw::mark::CntntIdxStore> pCntntStore(sw::mark::CntntIdxStore::Create()); - pCntntStore->Save( pDoc, aIdx.GetIndex(), SAL_MAX_INT32); - SwTxtNode *pTxtNode = aIdx.GetNode().GetTxtNode(); - const sal_Int32 nLen = pTxtNode->Len(); + const std::shared_ptr<sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create()); + pContentStore->Save( pDoc, aIdx.GetIndex(), SAL_MAX_INT32); + SwTextNode *pTextNode = aIdx.GetNode().GetTextNode(); + const sal_Int32 nLen = pTextNode->Len(); - SwWrongList *pList = pTxtNode->GetWrong(); + SwWrongList *pList = pTextNode->GetWrong(); if( pList ) { pList->JoinList( GetWrong(), Len() ); SetWrongDirty( true ); - pTxtNode->SetWrong( 0, false ); + pTextNode->SetWrong( 0, false ); SetWrong( NULL ); } else @@ -754,12 +754,12 @@ SwCntntNode *SwTxtNode::JoinPrev() } } - SwGrammarMarkUp *pList3 = pTxtNode->GetGrammarCheck(); + SwGrammarMarkUp *pList3 = pTextNode->GetGrammarCheck(); if( pList3 ) { pList3->JoinGrammarList( GetGrammarCheck(), Len() ); SetGrammarCheckDirty( true ); - pTxtNode->SetGrammarCheck( 0, false ); + pTextNode->SetGrammarCheck( 0, false ); SetGrammarCheck( NULL ); } else @@ -773,12 +773,12 @@ SwCntntNode *SwTxtNode::JoinPrev() } } - SwWrongList *pList2 = pTxtNode->GetSmartTags(); + SwWrongList *pList2 = pTextNode->GetSmartTags(); if( pList2 ) { pList2->JoinList( GetSmartTags(), Len() ); SetSmartTagDirty( true ); - pTxtNode->SetSmartTags( 0, false ); + pTextNode->SetSmartTags( 0, false ); SetSmartTags( NULL ); } else @@ -793,13 +793,13 @@ SwCntntNode *SwTxtNode::JoinPrev() } { // wg. SwIndex - pTxtNode->CutText( this, SwIndex(this), SwIndex(pTxtNode), nLen ); + pTextNode->CutText( this, SwIndex(this), SwIndex(pTextNode), nLen ); } // verschiebe noch alle Bookmarks/TOXMarks - if( !pCntntStore->Empty() ) - pCntntStore->Restore( pDoc, GetIndex() ); + if( !pContentStore->Empty() ) + pContentStore->Restore( pDoc, GetIndex() ); - if( pTxtNode->HasAnyIndex() ) + if( pTextNode->HasAnyIndex() ) { // alle Crsr/StkCrsr/UnoCrsr aus dem Loeschbereich verschieben pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, true ); @@ -811,36 +811,36 @@ SwCntntNode *SwTxtNode::JoinPrev() InvalidateNumRule(); } else { - OSL_FAIL( "kein TxtNode." ); + OSL_FAIL( "kein TextNode." ); } return this; } // erzeugt einen AttrSet mit Bereichen fuer Frame-/Para/Char-Attributen -void SwTxtNode::NewAttrSet( SwAttrPool& rPool ) +void SwTextNode::NewAttrSet( SwAttrPool& rPool ) { OSL_ENSURE( !mpAttrSet.get(), "AttrSet ist doch gesetzt" ); - SwAttrSet aNewAttrSet( rPool, aTxtNodeSetRange ); + SwAttrSet aNewAttrSet( rPool, aTextNodeSetRange ); // put names of parent style and conditional style: - const SwFmtColl* pAnyFmtColl = &GetAnyFmtColl(); - const SwFmtColl* pFmtColl = GetFmtColl(); + const SwFormatColl* pAnyFormatColl = &GetAnyFormatColl(); + const SwFormatColl* pFormatColl = GetFormatColl(); OUString sVal; - SwStyleNameMapper::FillProgName( pAnyFmtColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); - SfxStringItem aAnyFmtColl( RES_FRMATR_STYLE_NAME, sVal ); - if ( pFmtColl != pAnyFmtColl ) - SwStyleNameMapper::FillProgName( pFmtColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); - SfxStringItem aFmtColl( RES_FRMATR_CONDITIONAL_STYLE_NAME, sVal ); - aNewAttrSet.Put( aAnyFmtColl ); - aNewAttrSet.Put( aFmtColl ); - - aNewAttrSet.SetParent( &pAnyFmtColl->GetAttrSet() ); + SwStyleNameMapper::FillProgName( pAnyFormatColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SfxStringItem aAnyFormatColl( RES_FRMATR_STYLE_NAME, sVal ); + if ( pFormatColl != pAnyFormatColl ) + SwStyleNameMapper::FillProgName( pFormatColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SfxStringItem aFormatColl( RES_FRMATR_CONDITIONAL_STYLE_NAME, sVal ); + aNewAttrSet.Put( aAnyFormatColl ); + aNewAttrSet.Put( aFormatColl ); + + aNewAttrSet.SetParent( &pAnyFormatColl->GetAttrSet() ); mpAttrSet = GetDoc()->GetIStyleAccess().getAutomaticStyle( aNewAttrSet, IStyleAccess::AUTO_STYLE_PARA ); } // override SwIndexReg::Update => text hints do not need SwIndex for start/end! -void SwTxtNode::Update( +void SwTextNode::Update( SwIndex const & rPos, const sal_Int32 nChangeLen, const bool bNegative, @@ -855,14 +855,14 @@ void SwTxtNode::Update( { if ( bNegative ) { - std::vector<SwTxtInputFld*> aTxtInputFlds; + std::vector<SwTextInputField*> aTextInputFields; const sal_Int32 nChangeEnd = nChangePos + nChangeLen; for ( size_t n = 0; n < m_pSwpHints->Count(); ++n ) { - bool bTxtAttrChanged = false; - bool bStartOfTxtAttrChanged = false; - SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n); + bool bTextAttrChanged = false; + bool bStartOfTextAttrChanged = false; + SwTextAttr * const pHint = m_pSwpHints->GetTextHint(n); sal_Int32 & rStart = pHint->GetStart(); if ( rStart > nChangePos ) { @@ -874,7 +874,7 @@ void SwTxtNode::Update( { rStart = nChangePos; } - bStartOfTxtAttrChanged = true; + bStartOfTextAttrChanged = true; } sal_Int32 * const pEnd = pHint->GetEnd(); @@ -890,24 +890,24 @@ void SwTxtNode::Update( { *pEnd = nChangePos; } - bTxtAttrChanged = !bStartOfTxtAttrChanged; + bTextAttrChanged = !bStartOfTextAttrChanged; } } - if ( bTxtAttrChanged + if ( bTextAttrChanged && pHint->Which() == RES_TXTATR_INPUTFIELD ) { - SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pHint); - if ( pTxtInputFld ) - aTxtInputFlds.push_back(pTxtInputFld); + SwTextInputField* pTextInputField = dynamic_cast<SwTextInputField*>(pHint); + if ( pTextInputField ) + aTextInputFields.push_back(pTextInputField); } } //wait until all the attribute positions are correct //before updating the field contents - for (SwTxtInputFld* pTxtInputFld : aTxtInputFlds) + for (SwTextInputField* pTextInputField : aTextInputFields) { - pTxtInputFld->UpdateFieldContent(); + pTextInputField->UpdateFieldContent(); } m_pSwpHints->MergePortions( *this ); @@ -918,15 +918,15 @@ void SwTxtNode::Update( bool bResort = false; bool bMergePortionsNeeded = false; const int coArrSz = RES_TXTATR_WITHEND_END - RES_CHRATR_BEGIN; - std::vector<SwTxtInputFld*> aTxtInputFlds; + std::vector<SwTextInputField*> aTextInputFields; bool aDontExp[ coArrSz ]; memset( &aDontExp, 0, coArrSz * sizeof(bool) ); for ( size_t n = 0; n < m_pSwpHints->Count(); ++n ) { - bool bTxtAttrChanged = false; - SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n); + bool bTextAttrChanged = false; + SwTextAttr * const pHint = m_pSwpHints->GetTextHint(n); sal_Int32 & rStart = pHint->GetStart(); sal_Int32 * const pEnd = pHint->GetEnd(); if ( rStart >= nChangePos ) @@ -942,7 +942,7 @@ void SwTxtNode::Update( if ( (*pEnd > nChangePos) || IsIgnoreDontExpand() ) { *pEnd = *pEnd + nChangeLen; - bTxtAttrChanged = true; + bTextAttrChanged = true; } else // *pEnd == nChangePos { @@ -966,7 +966,7 @@ void SwTxtNode::Update( { bMergePortionsNeeded = true; } - if ( pHint->IsCharFmtAttr() ) + if ( pHint->IsCharFormatAttr() ) { bNoExp = true; aDontExp[ RES_TXTATR_CHARFMT - RES_CHRATR_BEGIN ] = true; @@ -983,42 +983,42 @@ void SwTxtNode::Update( } for(SwpHts::iterator it = pCollector->begin(); it != pCollector->end(); ++it) { - SwTxtAttr *pTmp = *it; + SwTextAttr *pTmp = *it; if( nWhich == pTmp->Which() ) { pCollector->erase( it ); - SwTxtAttr::Destroy( pTmp, + SwTextAttr::Destroy( pTmp, GetDoc()->GetAttrPool() ); break; } } - SwTxtAttr * const pTmp = - MakeTxtAttr( *GetDoc(), + SwTextAttr * const pTmp = + MakeTextAttr( *GetDoc(), pHint->GetAttr(), nChangePos, nChangePos + nChangeLen); pCollector->push_back( pTmp ); } else { *pEnd = *pEnd + nChangeLen; - bTxtAttrChanged = true; + bTextAttrChanged = true; } } } - if ( bTxtAttrChanged + if ( bTextAttrChanged && pHint->Which() == RES_TXTATR_INPUTFIELD ) { - SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pHint); - if ( pTxtInputFld ) - aTxtInputFlds.push_back(pTxtInputFld); + SwTextInputField* pTextInputField = dynamic_cast<SwTextInputField*>(pHint); + if ( pTextInputField ) + aTextInputFields.push_back(pTextInputField); } } //wait until all the attribute positions are correct //before updating the field contents - for (SwTxtInputFld* pTxtInputFld : aTxtInputFlds) + for (SwTextInputField* pTextInputField : aTextInputFields) { - pTxtInputFld->UpdateFieldContent(); + pTextInputField->UpdateFieldContent(); } if (bMergePortionsNeeded) @@ -1036,10 +1036,10 @@ void SwTxtNode::Update( SwIndexReg aTmpIdxReg; if ( !bNegative && !bDelete ) { - const SwRedlineTbl& rTbl = GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl(); - for ( size_t i = 0; i < rTbl.size(); ++i ) + const SwRedlineTable& rTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable(); + for ( size_t i = 0; i < rTable.size(); ++i ) { - SwRangeRedline *const pRedl = rTbl[ i ]; + SwRangeRedline *const pRedl = rTable[ i ]; if ( pRedl->HasMark() ) { SwPosition* const pEnd = pRedl->End(); @@ -1060,9 +1060,9 @@ void SwTxtNode::Update( { rIdx.Assign( &aTmpIdxReg, rIdx.GetIndex() ); } - // the unused position must not be on a SwTxtNode + // the unused position must not be on a SwTextNode bool const isOneUsed(&pRedl->GetBound(true) == pRedl->GetPoint()); - assert(!pRedl->GetBound(!isOneUsed).nNode.GetNode().IsTxtNode()); + assert(!pRedl->GetBound(!isOneUsed).nNode.GetNode().IsTextNode()); assert(!pRedl->GetBound(!isOneUsed).nContent.GetIdxReg()); (void)isOneUsed; } } @@ -1112,51 +1112,51 @@ void SwTxtNode::Update( // at-char anchored flys shouldn't be moved, either. #if OSL_DEBUG_LEVEL > 0 - std::list<SwFrmFmt*> checkFmts; - const SwFrmFmts& rFmts = *GetDoc()->GetSpzFrmFmts(); - for (SwFrmFmts::const_iterator pFmt = rFmts.begin(); pFmt != rFmts.end(); ++pFmt) + std::list<SwFrameFormat*> checkFormats; + const SwFrameFormats& rFormats = *GetDoc()->GetSpzFrameFormats(); + for (SwFrameFormats::const_iterator pFormat = rFormats.begin(); pFormat != rFormats.end(); ++pFormat) { - const SwFmtAnchor& rAnchor = (*pFmt)->GetAnchor(); - const SwPosition* pCntntAnchor = rAnchor.GetCntntAnchor(); - if (rAnchor.GetAnchorId() == FLY_AT_CHAR && pCntntAnchor) + const SwFormatAnchor& rAnchor = (*pFormat)->GetAnchor(); + const SwPosition* pContentAnchor = rAnchor.GetContentAnchor(); + if (rAnchor.GetAnchorId() == FLY_AT_CHAR && pContentAnchor) { // The fly is at-char anchored and has an anchor position. - SwIndex& rEndIdx = const_cast<SwIndex&>(pCntntAnchor->nContent); - if (&pCntntAnchor->nNode.GetNode() == this && rEndIdx.GetIndex() == rPos.GetIndex()) + SwIndex& rEndIdx = const_cast<SwIndex&>(pContentAnchor->nContent); + if (&pContentAnchor->nNode.GetNode() == this && rEndIdx.GetIndex() == rPos.GetIndex()) { // The anchor position is exactly our insert position. #if 0 rEndIdx.Assign(&aTmpIdxReg, rEndIdx.GetIndex()); #endif - checkFmts.push_back( *pFmt ); + checkFormats.push_back( *pFormat ); } } } #endif - std::vector<SwFrmFmt*> const*const pFlys(GetAnchoredFlys()); + std::vector<SwFrameFormat*> const*const pFlys(GetAnchoredFlys()); for (size_t i = 0; pFlys && i != pFlys->size(); ++i) { - SwFrmFmt const*const pFmt = (*pFlys)[i]; - const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - const SwPosition* pCntntAnchor = rAnchor.GetCntntAnchor(); - if (rAnchor.GetAnchorId() == FLY_AT_CHAR && pCntntAnchor) + SwFrameFormat const*const pFormat = (*pFlys)[i]; + const SwFormatAnchor& rAnchor = pFormat->GetAnchor(); + const SwPosition* pContentAnchor = rAnchor.GetContentAnchor(); + if (rAnchor.GetAnchorId() == FLY_AT_CHAR && pContentAnchor) { // The fly is at-char anchored and has an anchor position. - SwIndex& rEndIdx = const_cast<SwIndex&>(pCntntAnchor->nContent); - if (&pCntntAnchor->nNode.GetNode() == this && rEndIdx.GetIndex() == rPos.GetIndex()) + SwIndex& rEndIdx = const_cast<SwIndex&>(pContentAnchor->nContent); + if (&pContentAnchor->nNode.GetNode() == this && rEndIdx.GetIndex() == rPos.GetIndex()) { // The anchor position is exactly our insert position. rEndIdx.Assign(&aTmpIdxReg, rEndIdx.GetIndex()); #if OSL_DEBUG_LEVEL > 0 - std::list<SwFrmFmt*>::iterator checkPos = std::find( checkFmts.begin(), checkFmts.end(), pFmt ); - assert( checkPos != checkFmts.end()); - checkFmts.erase( checkPos ); + std::list<SwFrameFormat*>::iterator checkPos = std::find( checkFormats.begin(), checkFormats.end(), pFormat ); + assert( checkPos != checkFormats.end()); + checkFormats.erase( checkPos ); #endif } } } #if OSL_DEBUG_LEVEL > 0 - assert( checkFmts.empty()); + assert( checkFormats.empty()); #endif } @@ -1180,14 +1180,14 @@ void SwTxtNode::Update( //Any drawing objects anchored into this text node may be sorted by their //anchor position which may have changed here, so resort them - SwCntntFrm* pCntntFrm = getLayoutFrm(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()); - SwSortedObjs* pSortedObjs = pCntntFrm ? pCntntFrm->GetDrawObjs() : NULL; + SwContentFrm* pContentFrm = getLayoutFrm(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()); + SwSortedObjs* pSortedObjs = pContentFrm ? pContentFrm->GetDrawObjs() : NULL; if (pSortedObjs) pSortedObjs->UpdateAll(); } -void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl, - const SwTxtFmtColl *pNewColl) +void SwTextNode::_ChgTextCollUpdateNum( const SwTextFormatColl *pOldColl, + const SwTextFormatColl *pNewColl) { SwDoc* pDoc = GetDoc(); OSL_ENSURE( pDoc, "Kein Doc?" ); @@ -1209,13 +1209,13 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl, SwNodes& rNds = GetNodes(); // Update beim Level 0 noch die Fussnoten !! - if( ( !nNewLevel || !nOldLevel) && pDoc && !pDoc->GetFtnIdxs().empty() && - FTNNUM_CHAPTER == pDoc->GetFtnInfo().eNum && + if( ( !nNewLevel || !nOldLevel) && pDoc && !pDoc->GetFootnoteIdxs().empty() && + FTNNUM_CHAPTER == pDoc->GetFootnoteInfo().eNum && rNds.IsDocNodes() ) { SwNodeIndex aTmpIndex( rNds, GetIndex()); - pDoc->GetFtnIdxs().UpdateFtn( aTmpIndex); + pDoc->GetFootnoteIdxs().UpdateFootnote( aTmpIndex); } if( pNewColl && RES_CONDTXTFMTCOLL == pNewColl->Which() ) @@ -1228,13 +1228,13 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl, // Wenn man sich genau am Ende einer Text- bzw. INetvorlage befindet, // bekommt diese das DontExpand-Flag verpasst -bool SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag, - bool bFmtToTxtAttributes ) +bool SwTextNode::DontExpandFormat( const SwIndex& rIdx, bool bFlag, + bool bFormatToTextAttributes ) { const sal_Int32 nIdx = rIdx.GetIndex(); - if (bFmtToTxtAttributes && nIdx == m_Text.getLength()) + if (bFormatToTextAttributes && nIdx == m_Text.getLength()) { - FmtToTxtAttr( this ); + FormatToTextAttr( this ); } bool bRet = false; @@ -1244,7 +1244,7 @@ bool SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag, size_t nPos = nEndCnt; while( nPos ) { - SwTxtAttr *pTmp = m_pSwpHints->GetEnd( --nPos ); + SwTextAttr *pTmp = m_pSwpHints->GetEnd( --nPos ); sal_Int32 *pEnd = pTmp->GetEnd(); if( !pEnd || *pEnd > nIdx ) continue; @@ -1262,41 +1262,41 @@ bool SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag, return bRet; } -static bool lcl_GetTxtAttrDefault(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd) +static bool lcl_GetTextAttrDefault(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd) { return ((nHintStart <= nIndex) && (nIndex < nHintEnd)); } -static bool lcl_GetTxtAttrExpand(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd) +static bool lcl_GetTextAttrExpand(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd) { return ((nHintStart < nIndex) && (nIndex <= nHintEnd)); } -static bool lcl_GetTxtAttrParent(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd) +static bool lcl_GetTextAttrParent(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd) { return ((nHintStart < nIndex) && (nIndex < nHintEnd)); } static void -lcl_GetTxtAttrs( - ::std::vector<SwTxtAttr *> *const pVector, - SwTxtAttr **const ppTxtAttr, +lcl_GetTextAttrs( + ::std::vector<SwTextAttr *> *const pVector, + SwTextAttr **const ppTextAttr, SwpHints *const pSwpHints, sal_Int32 const nIndex, RES_TXTATR const nWhich, - enum SwTxtNode::GetTxtAttrMode const eMode) + enum SwTextNode::GetTextAttrMode const eMode) { size_t const nSize = (pSwpHints) ? pSwpHints->Count() : 0; sal_Int32 nPreviousIndex(0); // index of last hint with nWhich bool (*pMatchFunc)(sal_Int32, sal_Int32, sal_Int32)=0; switch (eMode) { - case SwTxtNode::DEFAULT: pMatchFunc = &lcl_GetTxtAttrDefault; break; - case SwTxtNode::EXPAND: pMatchFunc = &lcl_GetTxtAttrExpand; break; - case SwTxtNode::PARENT: pMatchFunc = &lcl_GetTxtAttrParent; break; + case SwTextNode::DEFAULT: pMatchFunc = &lcl_GetTextAttrDefault; break; + case SwTextNode::EXPAND: pMatchFunc = &lcl_GetTextAttrExpand; break; + case SwTextNode::PARENT: pMatchFunc = &lcl_GetTextAttrParent; break; default: assert(false); } for( size_t i = 0; i < nSize; ++i ) { - SwTxtAttr *const pHint = pSwpHints->GetTextHint(i); + SwTextAttr *const pHint = pSwpHints->GetTextHint(i); sal_Int32 const nHintStart = pHint->GetStart(); if (nIndex < nHintStart) { @@ -1329,7 +1329,7 @@ lcl_GetTxtAttrs( } else { - *ppTxtAttr = pHint; // and possibly overwrite outer hint + *ppTextAttr = pHint; // and possibly overwrite outer hint } if (!pEndIdx) { @@ -1339,18 +1339,18 @@ lcl_GetTxtAttrs( } } -::std::vector<SwTxtAttr *> -SwTxtNode::GetTxtAttrsAt(sal_Int32 const nIndex, RES_TXTATR const nWhich, - enum GetTxtAttrMode const eMode) const +::std::vector<SwTextAttr *> +SwTextNode::GetTextAttrsAt(sal_Int32 const nIndex, RES_TXTATR const nWhich, + enum GetTextAttrMode const eMode) const { - ::std::vector<SwTxtAttr *> ret; - lcl_GetTxtAttrs(& ret, 0, m_pSwpHints, nIndex, nWhich, eMode); + ::std::vector<SwTextAttr *> ret; + lcl_GetTextAttrs(& ret, 0, m_pSwpHints, nIndex, nWhich, eMode); return ret; } -SwTxtAttr * -SwTxtNode::GetTxtAttrAt(sal_Int32 const nIndex, RES_TXTATR const nWhich, - enum GetTxtAttrMode const eMode) const +SwTextAttr * +SwTextNode::GetTextAttrAt(sal_Int32 const nIndex, RES_TXTATR const nWhich, + enum GetTextAttrMode const eMode) const { assert( (nWhich == RES_TXTATR_META) || (nWhich == RES_TXTATR_METAFIELD) @@ -1359,28 +1359,28 @@ SwTxtNode::GetTxtAttrAt(sal_Int32 const nIndex, RES_TXTATR const nWhich, || (nWhich == RES_TXTATR_CJK_RUBY) || (nWhich == RES_TXTATR_UNKNOWN_CONTAINER) || (nWhich == RES_TXTATR_INPUTFIELD ) ); - // "GetTxtAttrAt() will give wrong result for this hint!") + // "GetTextAttrAt() will give wrong result for this hint!") - SwTxtAttr * pRet(0); - lcl_GetTxtAttrs(0, & pRet, m_pSwpHints, nIndex, nWhich, eMode); + SwTextAttr * pRet(0); + lcl_GetTextAttrs(0, & pRet, m_pSwpHints, nIndex, nWhich, eMode); return pRet; } -const SwTxtInputFld* SwTxtNode::GetOverlappingInputFld( const SwTxtAttr& rTxtAttr ) const +const SwTextInputField* SwTextNode::GetOverlappingInputField( const SwTextAttr& rTextAttr ) const { - const SwTxtInputFld* pTxtInputFld = NULL; + const SwTextInputField* pTextInputField = NULL; - pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( rTxtAttr.GetStart(), RES_TXTATR_INPUTFIELD, PARENT )); + pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( rTextAttr.GetStart(), RES_TXTATR_INPUTFIELD, PARENT )); - if ( pTxtInputFld == NULL && rTxtAttr.End() != NULL ) + if ( pTextInputField == NULL && rTextAttr.End() != NULL ) { - pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( *(rTxtAttr.End()), RES_TXTATR_INPUTFIELD, PARENT )); + pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( *(rTextAttr.End()), RES_TXTATR_INPUTFIELD, PARENT )); } - return pTxtInputFld; + return pTextInputField; } -void SwTxtNode::DelFrms_TxtNodePart() +void SwTextNode::DelFrms_TextNodePart() { SetWrong( NULL ); SetWrongDirty( true ); @@ -1395,39 +1395,39 @@ void SwTxtNode::DelFrms_TxtNodePart() SetAutoCompleteWordDirty( true ); } -SwTxtFld* SwTxtNode::GetFldTxtAttrAt( +SwTextField* SwTextNode::GetFieldTextAttrAt( const sal_Int32 nIndex, - const bool bIncludeInputFldAtStart ) const + const bool bIncludeInputFieldAtStart ) const { - SwTxtFld* pTxtFld = NULL; + SwTextField* pTextField = NULL; - pTxtFld = dynamic_cast<SwTxtFld*>(GetTxtAttrForCharAt( nIndex, RES_TXTATR_FIELD )); - if ( pTxtFld == NULL ) + pTextField = dynamic_cast<SwTextField*>(GetTextAttrForCharAt( nIndex, RES_TXTATR_FIELD )); + if ( pTextField == NULL ) { - pTxtFld = dynamic_cast<SwTxtFld*>(GetTxtAttrForCharAt( nIndex, RES_TXTATR_ANNOTATION )); + pTextField = dynamic_cast<SwTextField*>(GetTextAttrForCharAt( nIndex, RES_TXTATR_ANNOTATION )); } - if ( pTxtFld == NULL ) + if ( pTextField == NULL ) { - pTxtFld = - dynamic_cast<SwTxtFld*>( GetTxtAttrAt( + pTextField = + dynamic_cast<SwTextField*>( GetTextAttrAt( nIndex, RES_TXTATR_INPUTFIELD, - bIncludeInputFldAtStart ? DEFAULT : PARENT )); + bIncludeInputFieldAtStart ? DEFAULT : PARENT )); } - return pTxtFld; + return pTextField; } -static SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const OUString& rName ) +static SwCharFormat* lcl_FindCharFormat( const SwCharFormats* pCharFormats, const OUString& rName ) { if( !rName.isEmpty() ) { - const size_t nArrLen = pCharFmts->size(); + const size_t nArrLen = pCharFormats->size(); for( size_t i = 1; i < nArrLen; i++ ) { - SwCharFmt* pFmt = (*pCharFmts)[ i ]; - if( pFmt->GetName()==rName ) - return pFmt; + SwCharFormat* pFormat = (*pCharFormats)[ i ]; + if( pFormat->GetName()==rName ) + return pFormat; } } return NULL; @@ -1435,10 +1435,10 @@ static SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const OUString& void lcl_CopyHint( const sal_uInt16 nWhich, - const SwTxtAttr * const pHt, - SwTxtAttr *const pNewHt, + const SwTextAttr * const pHt, + SwTextAttr *const pNewHt, SwDoc *const pOtherDoc, - SwTxtNode *const pDest ) + SwTextNode *const pDest ) { assert(nWhich == pHt->Which()); // wrong hint-id switch( nWhich ) @@ -1446,7 +1446,7 @@ void lcl_CopyHint( // copy nodesarray section with footnote content case RES_TXTATR_FTN : assert(pDest); // "lcl_CopyHint: no destination text node?" - static_cast<const SwTxtFtn*>(pHt)->CopyFtn( *static_cast<SwTxtFtn*>(pNewHt), *pDest); + static_cast<const SwTextFootnote*>(pHt)->CopyFootnote( *static_cast<SwTextFootnote*>(pNewHt), *pDest); break; // Beim Kopieren von Feldern in andere Dokumente @@ -1457,24 +1457,24 @@ void lcl_CopyHint( { if( pOtherDoc != NULL ) { - static_txtattr_cast<const SwTxtFld*>(pHt)->CopyTxtFld( - static_txtattr_cast<SwTxtFld*>(pNewHt)); + static_txtattr_cast<const SwTextField*>(pHt)->CopyTextField( + static_txtattr_cast<SwTextField*>(pNewHt)); } // Tabellenformel ?? - const SwFmtFld& rFld = pHt->GetFmtFld(); - if( RES_TABLEFLD == rFld.GetField()->GetTyp()->Which() - && static_cast<const SwTblField*>(rFld.GetField())->IsIntrnlName()) + const SwFormatField& rField = pHt->GetFormatField(); + if( RES_TABLEFLD == rField.GetField()->GetTyp()->Which() + && static_cast<const SwTableField*>(rField.GetField())->IsIntrnlName()) { // wandel die interne in eine externe Formel um - const SwTableNode* const pDstTblNd = - static_txtattr_cast<const SwTxtFld*>(pHt)->GetTxtNode().FindTableNode(); - if( pDstTblNd ) + const SwTableNode* const pDstTableNd = + static_txtattr_cast<const SwTextField*>(pHt)->GetTextNode().FindTableNode(); + if( pDstTableNd ) { - SwTblField* const pTblFld = - const_cast<SwTblField*>(static_cast<const SwTblField*>( - pNewHt->GetFmtFld().GetField())); - pTblFld->PtrToBoxNm( &pDstTblNd->GetTable() ); + SwTableField* const pTableField = + const_cast<SwTableField*>(static_cast<const SwTableField*>( + pNewHt->GetFormatField().GetField())); + pTableField->PtrToBoxNm( &pDstTableNd->GetTable() ); } } } @@ -1484,8 +1484,8 @@ void lcl_CopyHint( case RES_TXTATR_ANNOTATION : if( pOtherDoc != NULL ) { - static_txtattr_cast<const SwTxtFld*>(pHt)->CopyTxtFld( - static_txtattr_cast<SwTxtFld*>(pNewHt)); + static_txtattr_cast<const SwTextField*>(pHt)->CopyTextField( + static_txtattr_cast<SwTextField*>(pNewHt)); } break; @@ -1495,7 +1495,7 @@ void lcl_CopyHint( { // Beim Kopieren von TOXMarks(Client) in andere Dokumente // muss der Verzeichnis (Modify) ausgetauscht werden - static_txtattr_cast<SwTxtTOXMark*>(pNewHt)->CopyTOXMark(pOtherDoc); + static_txtattr_cast<SwTextTOXMark*>(pNewHt)->CopyTOXMark(pOtherDoc); } break; @@ -1505,15 +1505,15 @@ void lcl_CopyHint( if( pDest && pDest->GetpSwpHints() && pDest->GetpSwpHints()->Contains( pNewHt ) ) { - SwCharFmt* pFmt = - static_cast<SwCharFmt*>(pHt->GetCharFmt().GetCharFmt()); + SwCharFormat* pFormat = + static_cast<SwCharFormat*>(pHt->GetCharFormat().GetCharFormat()); if (pOtherDoc) { - pFmt = pOtherDoc->CopyCharFmt( *pFmt ); + pFormat = pOtherDoc->CopyCharFormat( *pFormat ); } - const_cast<SwFmtCharFmt&>( static_cast<const SwFmtCharFmt&>( - pNewHt->GetCharFmt() ) ).SetCharFmt( pFmt ); + const_cast<SwFormatCharFormat&>( static_cast<const SwFormatCharFormat&>( + pNewHt->GetCharFormat() ) ).SetCharFormat( pFormat ); } break; case RES_TXTATR_INETFMT : @@ -1524,38 +1524,38 @@ void lcl_CopyHint( && pDest->GetpSwpHints()->Contains( pNewHt ) ) { const SwDoc* const pDoc = static_txtattr_cast< - const SwTxtINetFmt*>(pHt)->GetTxtNode().GetDoc(); + const SwTextINetFormat*>(pHt)->GetTextNode().GetDoc(); if ( pDoc ) { - const SwCharFmts* pCharFmts = pDoc->GetCharFmts(); - const SwFmtINetFmt& rFmt = pHt->GetINetFmt(); - SwCharFmt* pFmt; - pFmt = lcl_FindCharFmt( pCharFmts, rFmt.GetINetFmt() ); - if( pFmt ) - pOtherDoc->CopyCharFmt( *pFmt ); - pFmt = lcl_FindCharFmt( pCharFmts, rFmt.GetVisitedFmt() ); - if( pFmt ) - pOtherDoc->CopyCharFmt( *pFmt ); + const SwCharFormats* pCharFormats = pDoc->GetCharFormats(); + const SwFormatINetFormat& rFormat = pHt->GetINetFormat(); + SwCharFormat* pFormat; + pFormat = lcl_FindCharFormat( pCharFormats, rFormat.GetINetFormat() ); + if( pFormat ) + pOtherDoc->CopyCharFormat( *pFormat ); + pFormat = lcl_FindCharFormat( pCharFormats, rFormat.GetVisitedFormat() ); + if( pFormat ) + pOtherDoc->CopyCharFormat( *pFormat ); } } //JP 24.04.98: Bug 49753 - ein TextNode muss am Attribut // gesetzt sein, damit die Vorlagen erzeugt // werden koenne - SwTxtINetFmt *const pINetHt = static_txtattr_cast<SwTxtINetFmt*>(pNewHt); - if ( !pINetHt->GetpTxtNode() ) + SwTextINetFormat *const pINetHt = static_txtattr_cast<SwTextINetFormat*>(pNewHt); + if ( !pINetHt->GetpTextNode() ) { - pINetHt->ChgTxtNode( pDest ); + pINetHt->ChgTextNode( pDest ); } //JP 22.10.97: Bug 44875 - Verbindung zum Format herstellen - pINetHt->GetCharFmt(); + pINetHt->GetCharFormat(); break; } case RES_TXTATR_META: case RES_TXTATR_METAFIELD: OSL_ENSURE( pNewHt, "copying Meta should not fail!" ); OSL_ENSURE( pDest - && (CH_TXTATR_INWORD == pDest->GetTxt()[pNewHt->GetStart()]), + && (CH_TXTATR_INWORD == pDest->GetText()[pNewHt->GetStart()]), "missing CH_TXTATR?"); break; } @@ -1566,7 +1566,7 @@ void lcl_CopyHint( // kopiert! CopyAttr wird vornehmlich dann gerufen, // wenn Attribute fuer einen Node mit leerem String // gesetzt werden sollen. -void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx, +void SwTextNode::CopyAttr( SwTextNode *pDest, const sal_Int32 nTextStartIdx, const sal_Int32 nOldPos ) { if ( HasHints() ) // keine Attribute, keine Kekse @@ -1576,9 +1576,9 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx, for ( size_t i = 0; i < m_pSwpHints->Count(); ++i ) { - SwTxtAttr *const pHt = m_pSwpHints->GetTextHint(i); + SwTextAttr *const pHt = m_pSwpHints->GetTextHint(i); sal_Int32 const nAttrStartIdx = pHt->GetStart(); - if ( nTxtStartIdx < nAttrStartIdx ) + if ( nTextStartIdx < nAttrStartIdx ) break; // ueber das Textende, da nLen == 0 const sal_Int32 *const pEndIdx = pHt->GetEnd(); @@ -1586,14 +1586,14 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx, { sal_uInt16 const nWhich = pHt->Which(); if (RES_TXTATR_INPUTFIELD != nWhich // fdo#74981 skip fields - && ( *pEndIdx > nTxtStartIdx - || (*pEndIdx == nTxtStartIdx - && nAttrStartIdx == nTxtStartIdx))) + && ( *pEndIdx > nTextStartIdx + || (*pEndIdx == nTextStartIdx + && nAttrStartIdx == nTextStartIdx))) { if ( RES_TXTATR_REFMARK != nWhich ) { // attribute in the area => copy - SwTxtAttr *const pNewHt = + SwTextAttr *const pNewHt = pDest->InsertItem( pHt->GetAttr(), nOldPos, nOldPos, SetAttrMode::IS_COPY); if ( pNewHt ) { @@ -1615,7 +1615,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx, if( this != pDest ) { - // Frames benachrichtigen, sonst verschwinden die Ftn-Nummern + // Frames benachrichtigen, sonst verschwinden die Footnote-Nummern SwUpdateAttr aHint( nOldPos, nOldPos, @@ -1627,7 +1627,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx, // kopiert Zeichen und Attibute in pDest, wird angehaengt // introduction of new optional parameter to control, if all attributes have to be copied. -void SwTxtNode::CopyText( SwTxtNode *const pDest, +void SwTextNode::CopyText( SwTextNode *const pDest, const SwIndex &rStart, const sal_Int32 nLen, const bool bForceCopyOfAllAttrs ) @@ -1637,19 +1637,19 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, } // introduction of new optional parameter to control, if all attributes have to be copied. -void SwTxtNode::CopyText( SwTxtNode *const pDest, +void SwTextNode::CopyText( SwTextNode *const pDest, const SwIndex &rDestStart, const SwIndex &rStart, sal_Int32 nLen, const bool bForceCopyOfAllAttrs ) { - sal_Int32 nTxtStartIdx = rStart.GetIndex(); + sal_Int32 nTextStartIdx = rStart.GetIndex(); sal_Int32 nDestStart = rDestStart.GetIndex(); // alte Pos merken if (pDest->GetDoc()->IsClipBoard() && this->GetNum()) { // #i111677# cache expansion of source (for clipboard) - pDest->m_pNumStringCache.reset( (nTxtStartIdx != 0) + pDest->m_pNumStringCache.reset( (nTextStartIdx != 0) ? new OUString // fdo#49076: numbering only if copy from para start : new OUString(this->GetNumString())); } @@ -1658,7 +1658,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, { // wurde keine Laenge angegeben, dann Kopiere die Attribute // an der Position rStart. - CopyAttr( pDest, nTxtStartIdx, nDestStart ); + CopyAttr( pDest, nTextStartIdx, nDestStart ); // harte Absatz umspannende Attribute kopieren if( HasSwAttrSet() ) @@ -1668,7 +1668,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, if ( !bForceCopyOfAllAttrs && ( nDestStart || pDest->HasSwAttrSet() || - nLen != pDest->GetTxt().getLength())) + nLen != pDest->GetText().getLength())) { SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END-1, @@ -1695,7 +1695,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, //JP 15.02.96: Bug 25537 - Attributbehandlung am Ende fehlt! Darum // ueber die InsertMethode den Text einfuegen und nicht // selbst direkt - pDest->InsertText( m_Text.copy(nTxtStartIdx, nLen), rDestStart, + pDest->InsertText( m_Text.copy(nTextStartIdx, nLen), rDestStart, SwInsertFlags::EMPTYEXPAND ); // um reale Groesse Updaten ! @@ -1713,7 +1713,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, if ( !bForceCopyOfAllAttrs && ( nDestStart || pDest->HasSwAttrSet() || - nLen != pDest->GetTxt().getLength())) + nLen != pDest->GetText().getLength())) { SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END-1, @@ -1738,8 +1738,8 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, // Ende erst jetzt holen, weil beim Kopieren in sich selbst der // Start-Index und alle Attribute vorher aktualisiert werden. - nTxtStartIdx = rStart.GetIndex(); - const sal_Int32 nEnd = nTxtStartIdx + nLen; + nTextStartIdx = rStart.GetIndex(); + const sal_Int32 nEnd = nTextStartIdx + nLen; // 2. Attribute kopieren // durch das Attribute-Array, bis der Anfang des Geltungsbereiches @@ -1762,7 +1762,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, if (!( nAttrStartIdx < nEnd)) break; - SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(n); + SwTextAttr * const pHt = m_pSwpHints->GetTextHint(n); const sal_Int32 * const pEndIdx = pHt->GetEnd(); const sal_uInt16 nWhich = pHt->Which(); @@ -1789,8 +1789,8 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, if ( nWhich == RES_TXTATR_INPUTFIELD ) { OSL_ENSURE( pEndIdx != NULL, - "<SwTxtNode::CopyText(..)> - RES_TXTATR_INPUTFIELD without EndIndex!" ); - if ( nAttrStartIdx < nTxtStartIdx + "<SwTextNode::CopyText(..)> - RES_TXTATR_INPUTFIELD without EndIndex!" ); + if ( nAttrStartIdx < nTextStartIdx || ( pEndIdx != NULL && *(pEndIdx) > nEnd ) ) { @@ -1801,17 +1801,17 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, sal_Int32 nAttrStt = 0; sal_Int32 nAttrEnd = 0; - if( nAttrStartIdx < nTxtStartIdx ) + if( nAttrStartIdx < nTextStartIdx ) { // start is before selection // copy hints with end and CH_TXTATR only if dummy char is copied - if ( pEndIdx && (*pEndIdx > nTxtStartIdx) && !pHt->HasDummyChar() ) + if ( pEndIdx && (*pEndIdx > nTextStartIdx) && !pHt->HasDummyChar() ) { // attribute with extent and the end is in the selection nAttrStt = nDestStart; nAttrEnd = (*pEndIdx > nEnd) ? rDestStart.GetIndex() - : nDestStart + (*pEndIdx) - nTxtStartIdx; + : nDestStart + (*pEndIdx) - nTextStartIdx; } else { @@ -1821,12 +1821,12 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, else { // start is in the selection - nAttrStt = nDestStart + ( nAttrStartIdx - nTxtStartIdx ); + nAttrStt = nDestStart + ( nAttrStartIdx - nTextStartIdx ); if( pEndIdx ) { nAttrEnd = *pEndIdx > nEnd ? rDestStart.GetIndex() - : nDestStart + ( *pEndIdx - nTxtStartIdx ); + : nDestStart + ( *pEndIdx - nTextStartIdx ); } else { @@ -1834,12 +1834,12 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, } } - SwTxtAttr * pNewHt = 0; + SwTextAttr * pNewHt = 0; if( pDest == this ) { // copy the hint here, but insert it later - pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(), + pNewHt = MakeTextAttr( *GetDoc(), pHt->GetAttr(), nAttrStt, nAttrEnd, COPY, pDest ); lcl_CopyHint(nWhich, pHt, pNewHt, 0, pDest); @@ -1882,7 +1882,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, { for ( size_t i = 0; i < aRefMrkArr.size(); ++i ) { - SwTxtAttr * const pNewHt = aRefMrkArr[i]; + SwTextAttr * const pNewHt = aRefMrkArr[i]; if( pNewHt->GetEnd() ) { pDest->GetpSwpHints()->Delete( pNewHt ); @@ -1900,7 +1900,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, CHECK_SWPHINTS(pDest); } -OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx, +OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx, const SwInsertFlags nMode ) { assert(rIdx <= m_Text.getLength()); // invalid index @@ -1909,7 +1909,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx, sal_Int32 nLen = m_Text.getLength() - aPos; sal_Int32 const nOverflow(rStr.getLength() - GetSpaceLeft()); SAL_WARN_IF(nOverflow > 0, "sw.core", - "SwTxtNode::InsertText: node text with insertion > capacity."); + "SwTextNode::InsertText: node text with insertion > capacity."); OUString const sInserted( (nOverflow > 0) ? rStr.copy(0, rStr.getLength() - nOverflow) : rStr); if (sInserted.isEmpty()) @@ -1944,7 +1944,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx, for ( size_t i = 0; i < m_pSwpHints->Count() && rIdx >= (*m_pSwpHints)[i]->GetStart(); ++i ) { - SwTxtAttr * const pHt = m_pSwpHints->GetTextHint( i ); + SwTextAttr * const pHt = m_pSwpHints->GetTextHint( i ); sal_Int32 * const pEndIdx = pHt->GetEnd(); if( !pEndIdx ) continue; @@ -2009,24 +2009,24 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx, if ( HasWriterListeners() ) { - SwInsTxt aHint( aPos, nLen ); + SwInsText aHint( aPos, nLen ); NotifyClients( 0, &aHint ); } // By inserting a character, the hidden flags - // at the TxtNode can become invalid: + // at the TextNode can become invalid: SetCalcHiddenCharFlags(); CHECK_SWPHINTS(this); return sInserted; } -void SwTxtNode::CutText( SwTxtNode * const pDest, +void SwTextNode::CutText( SwTextNode * const pDest, const SwIndex & rStart, const sal_Int32 nLen ) { if(pDest) { - SwIndex aDestStt(pDest, pDest->GetTxt().getLength()); + SwIndex aDestStt(pDest, pDest->GetText().getLength()); CutImpl( pDest, aDestStt, rStart, nLen, false ); } else @@ -2037,7 +2037,7 @@ void SwTxtNode::CutText( SwTxtNode * const pDest, } } -void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, +void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart, const SwIndex & rStart, sal_Int32 nLen, const bool bUpdate ) { if(!pDest) @@ -2066,7 +2066,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, return; } - sal_Int32 nTxtStartIdx = rStart.GetIndex(); + sal_Int32 nTextStartIdx = rStart.GetIndex(); sal_Int32 nDestStart = rDestStart.GetIndex(); // alte Pos merken const sal_Int32 nInitSize = pDest->m_Text.getLength(); @@ -2076,9 +2076,9 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!"); assert(false); OUStringBuffer buf(m_Text); - buf.insert(nDestStart, m_Text.copy(nTxtStartIdx, nLen)); + buf.insert(nDestStart, m_Text.copy(nTextStartIdx, nLen)); buf.remove( - nTxtStartIdx + ((nDestStart < nTxtStartIdx) ? nLen : 0), nLen); + nTextStartIdx + ((nDestStart < nTextStartIdx) ? nLen : 0), nLen); m_Text = buf.makeStringAndClear(); const sal_Int32 nEnd = rStart.GetIndex() + nLen; @@ -2094,26 +2094,26 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, size_t nAttrCnt = 0; while ( m_pSwpHints && nAttrCnt < m_pSwpHints->Count() ) { - SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt); + SwTextAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt); const sal_Int32 nAttrStartIdx = pHt->GetStart(); if (!( nAttrStartIdx < nEnd )) break; const sal_Int32 * const pEndIdx = pHt->GetEnd(); const sal_uInt16 nWhich = pHt->Which(); - SwTxtAttr *pNewHt = 0; + SwTextAttr *pNewHt = 0; - if(nAttrStartIdx < nTxtStartIdx) + if(nAttrStartIdx < nTextStartIdx) { // Anfang liegt vor dem Bereich if ( RES_TXTATR_REFMARK != nWhich && !pHt->HasDummyChar() && - pEndIdx && *pEndIdx > nTxtStartIdx ) + pEndIdx && *pEndIdx > nTextStartIdx ) { // Attribut mit einem Bereich // und das Ende des Attribut liegt im Bereich - pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(), 0, + pNewHt = MakeTextAttr( *GetDoc(), pHt->GetAttr(), 0, *pEndIdx > nEnd ? nLen - : *pEndIdx - nTxtStartIdx ); + : *pEndIdx - nTextStartIdx ); } } else @@ -2124,21 +2124,21 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, // Attribut verschieben m_pSwpHints->Delete( pHt ); // die Start/End Indicies neu setzen - pHt->GetStart() = nAttrStartIdx - nTxtStartIdx; + pHt->GetStart() = nAttrStartIdx - nTextStartIdx; if( pEndIdx ) - *pHt->GetEnd() = *pEndIdx - nTxtStartIdx; + *pHt->GetEnd() = *pEndIdx - nTextStartIdx; aArr.push_back( pHt ); continue; // while-Schleife weiter, ohne ++ ! } // das Ende liegt dahinter else if (RES_TXTATR_REFMARK != nWhich && !pHt->HasDummyChar()) { - pNewHt = MakeTxtAttr( *GetDoc(), + pNewHt = MakeTextAttr( *GetDoc(), pHt->GetAttr(), - nAttrStartIdx - nTxtStartIdx, + nAttrStartIdx - nTextStartIdx, ( *pEndIdx > nEnd ? nLen - : *pEndIdx - nTxtStartIdx )); + : *pEndIdx - nTextStartIdx )); } } if( pNewHt ) @@ -2163,9 +2163,9 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, CHECK_SWPHINTS(this); // dann setze die kopierten/geloeschten Attribute in den Node - if( nDestStart <= nTxtStartIdx ) + if( nDestStart <= nTextStartIdx ) { - nTxtStartIdx = nTxtStartIdx + nLen; + nTextStartIdx = nTextStartIdx + nLen; } else { @@ -2174,7 +2174,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, for ( size_t n = 0; n < aArr.size(); ++n ) { - SwTxtAttr *const pNewHt = aArr[n]; + SwTextAttr *const pNewHt = aArr[n]; pNewHt->GetStart() = nDestStart + pNewHt->GetStart(); sal_Int32 * const pEndIdx = pNewHt->GetEnd(); if ( pEndIdx ) @@ -2187,8 +2187,8 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, else { pDest->m_Text = pDest->m_Text.replaceAt(nDestStart, 0, - m_Text.copy(nTxtStartIdx, nLen)); - m_Text = m_Text.replaceAt(nTxtStartIdx, nLen, ""); + m_Text.copy(nTextStartIdx, nLen)); + m_Text = m_Text.replaceAt(nTextStartIdx, nLen, ""); if (GetSpaceLeft()<0) { // FIXME: could only happen when called from SwRangeRedline::Show. // unfortunately can't really do anything here to handle that... @@ -2221,7 +2221,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, { // alle, oder nur die CharAttribute ? if( nInitSize || pDest->HasSwAttrSet() || - nLen != pDest->GetTxt().getLength()) + nLen != pDest->GetText().getLength()) { SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END-1, @@ -2246,29 +2246,29 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, size_t nAttrCnt = 0; while ( m_pSwpHints && (nAttrCnt < m_pSwpHints->Count()) ) { - SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt); + SwTextAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt); const sal_Int32 nAttrStartIdx = pHt->GetStart(); if (!( nAttrStartIdx < nEnd )) break; const sal_Int32 * const pEndIdx = pHt->GetEnd(); const sal_uInt16 nWhich = pHt->Which(); - SwTxtAttr *pNewHt = 0; + SwTextAttr *pNewHt = 0; // if the hint has a dummy character, then it must not be split! - if(nAttrStartIdx < nTxtStartIdx) + if(nAttrStartIdx < nTextStartIdx) { // Anfang liegt vor dem Bereich if( !pHt->HasDummyChar() && ( RES_TXTATR_REFMARK != nWhich - || bUndoNodes ) && pEndIdx && *pEndIdx > nTxtStartIdx ) + || bUndoNodes ) && pEndIdx && *pEndIdx > nTextStartIdx ) { // Attribut mit einem Bereich // und das Ende des Attribut liegt im Bereich - pNewHt = MakeTxtAttr( *pDest->GetDoc(), pHt->GetAttr(), + pNewHt = MakeTextAttr( *pDest->GetDoc(), pHt->GetAttr(), nDestStart, nDestStart + ( *pEndIdx > nEnd ? nLen - : *pEndIdx - nTxtStartIdx ) ); + : *pEndIdx - nTextStartIdx ) ); } } else @@ -2291,13 +2291,13 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, bMergePortionsNeeded = true; } pHt->GetStart() = - nDestStart + (nAttrStartIdx - nTxtStartIdx); + nDestStart + (nAttrStartIdx - nTextStartIdx); if( pEndIdx ) { *pHt->GetEnd() = nDestStart + ( *pEndIdx > nEnd ? nLen - : *pEndIdx - nTxtStartIdx ); + : *pEndIdx - nTextStartIdx ); } pDest->InsertHint( pHt, SetAttrMode::NOTXTATRCHR @@ -2311,11 +2311,11 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, // das Ende liegt dahinter else if( RES_TXTATR_REFMARK != nWhich || bUndoNodes ) { - pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(), - nDestStart + (nAttrStartIdx - nTxtStartIdx), + pNewHt = MakeTextAttr( *GetDoc(), pHt->GetAttr(), + nDestStart + (nAttrStartIdx - nTextStartIdx), nDestStart + ( *pEndIdx > nEnd ? nLen - : *pEndIdx - nTxtStartIdx )); + : *pEndIdx - nTextStartIdx )); } } if ( pNewHt ) @@ -2340,7 +2340,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, SwpHts aArr; while ( nAttrCnt < m_pSwpHints->Count() ) { - SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt); + SwTextAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt); if ( nEnd != pHt->GetStart() ) break; const sal_Int32 * const pEndIdx = pHt->GetEnd(); @@ -2358,7 +2358,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, for ( size_t n = 0; n < aArr.size(); ++n ) { - SwTxtAttr * const pHt = aArr[ n ]; + SwTextAttr * const pHt = aArr[ n ]; pHt->GetStart() = *pHt->GetEnd() = rStart.GetIndex(); InsertHint( pHt ); } @@ -2379,13 +2379,13 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, TryDeleteSwpHints(); // Frames benachrichtigen; - SwInsTxt aInsHint( nDestStart, nLen ); + SwInsText aInsHint( nDestStart, nLen ); pDest->ModifyNotification( 0, &aInsHint ); - SwDelTxt aDelHint( nTxtStartIdx, nLen ); + SwDelText aDelHint( nTextStartIdx, nLen ); ModifyNotification( 0, &aDelHint ); } -void SwTxtNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount, +void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount, const SwInsertFlags nMode ) { assert(rIdx <= m_Text.getLength()); // invalid index @@ -2403,7 +2403,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount, for ( size_t i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i ) { - SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i); + SwTextAttr *pHt = m_pSwpHints->GetTextHint(i); const sal_Int32 nHintStart = pHt->GetStart(); @@ -2473,20 +2473,20 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount, } else { - SwDelTxt aHint( nStartIdx, nCnt ); + SwDelText aHint( nStartIdx, nCnt ); NotifyClients( 0, &aHint ); } OSL_ENSURE(rIdx.GetIndex() == nStartIdx, "huh? start index has changed?"); // By deleting a character, the hidden flags - // at the TxtNode can become invalid: + // at the TextNode can become invalid: SetCalcHiddenCharFlags(); CHECK_SWPHINTS(this); } -void SwTxtNode::GCAttr() +void SwTextNode::GCAttr() { if ( !HasHints() ) return; @@ -2499,7 +2499,7 @@ void SwTxtNode::GCAttr() for ( size_t i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i ) { - SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(i); + SwTextAttr * const pHt = m_pSwpHints->GetTextHint(i); // wenn Ende und Start gleich sind --> loeschen const sal_Int32 * const pEndIdx = pHt->GetEnd(); @@ -2521,20 +2521,20 @@ void SwTxtNode::GCAttr() if(bChanged) { - //TxtFrm's reagieren auf aHint, andere auf aNew + //TextFrm's reagieren auf aHint, andere auf aNew SwUpdateAttr aHint( nMin, nMax, 0); NotifyClients( 0, &aHint ); - SwFmtChg aNew( GetTxtColl() ); + SwFormatChg aNew( GetTextColl() ); NotifyClients( 0, &aNew ); } } // #i23726# -SwNumRule* SwTxtNode::_GetNumRule(bool bInParent) const +SwNumRule* SwTextNode::_GetNumRule(bool bInParent) const { SwNumRule* pRet = 0; @@ -2559,7 +2559,7 @@ SwNumRule* SwTxtNode::_GetNumRule(bool bInParent) const SfxItemState::SET != GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, false ) ) ) { - SwTxtFmtColl* pColl = GetTxtColl(); + SwTextFormatColl* pColl = GetTextColl(); if ( pColl ) { const SwNumRuleItem& rDirectItem = pColl->GetNumRule( false ); @@ -2574,12 +2574,12 @@ SwNumRule* SwTxtNode::_GetNumRule(bool bInParent) const return pRet; } -SwNumRule* SwTxtNode::GetNumRule(bool bInParent) const +SwNumRule* SwTextNode::GetNumRule(bool bInParent) const { return _GetNumRule(bInParent); } -void SwTxtNode::NumRuleChgd() +void SwTextNode::NumRuleChgd() { if ( IsInList() ) { @@ -2598,7 +2598,7 @@ void SwTxtNode::NumRuleChgd() SetInSwFntCache( false ); // Sending "noop" modify in order to cause invalidations of registered - // <SwTxtFrm> instances to get the list style change respectively the change + // <SwTextFrm> instances to get the list style change respectively the change // in the list tree reflected in the layout. // Important note: { @@ -2610,13 +2610,13 @@ void SwTxtNode::NumRuleChgd() } // -> #i27615# -bool SwTxtNode::IsNumbered() const +bool SwTextNode::IsNumbered() const { SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; return pRule && IsCountedInList(); } -bool SwTxtNode::HasMarkedLabel() const +bool SwTextNode::HasMarkedLabel() const { bool bResult = false; @@ -2630,13 +2630,13 @@ bool SwTxtNode::HasMarkedLabel() const } // <- #i27615# -SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, +SwTextNode* SwTextNode::_MakeNewTextNode( const SwNodeIndex& rPos, bool bNext, bool bChgFollow ) { /* hartes PageBreak/PageDesc/ColumnBreak aus AUTO-Set ignorieren */ SwAttrSet* pNewAttrSet = 0; // #i75353# - bool bClearHardSetNumRuleWhenFmtCollChanges( false ); + bool bClearHardSetNumRuleWhenFormatCollChanges( false ); if( HasSwAttrSet() ) { pNewAttrSet = new SwAttrSet( *GetpSwAttrSet() ); @@ -2690,7 +2690,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, // #i75353# // No clear of hard set numbering rule at an outline paragraph at this point. // Only if the paragraph style changes - see below. - bClearHardSetNumRuleWhenFmtCollChanges = true; + bClearHardSetNumRuleWhenFormatCollChanges = true; } bRemoveFromCache = true; } @@ -2707,9 +2707,9 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, } SwNodes& rNds = GetNodes(); - SwTxtFmtColl* pColl = GetTxtColl(); + SwTextFormatColl* pColl = GetTextColl(); - SwTxtNode *pNode = new SwTxtNode( rPos, pColl, pNewAttrSet ); + SwTextNode *pNode = new SwTextNode( rPos, pColl, pNewAttrSet ); delete pNewAttrSet; @@ -2726,21 +2726,21 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, // jetzt kann es sein, das durch die Nummerierung dem neuen Node eine // Vorlage aus dem Pool zugewiesen wurde. Dann darf diese nicht // nochmal uebergeplaettet werden !! - if( pColl != pNode->GetTxtColl() || - ( bChgFollow && pColl != GetTxtColl() )) + if( pColl != pNode->GetTextColl() || + ( bChgFollow && pColl != GetTextColl() )) return pNode; // mehr duerfte nicht gemacht werden oder ???? - pNode->_ChgTxtCollUpdateNum( 0, pColl ); // fuer Nummerierung/Gliederung + pNode->_ChgTextCollUpdateNum( 0, pColl ); // fuer Nummerierung/Gliederung if( bNext || !bChgFollow ) return pNode; - SwTxtFmtColl *pNextColl = &pColl->GetNextTxtFmtColl(); + SwTextFormatColl *pNextColl = &pColl->GetNextTextFormatColl(); // #i101870# // perform action on different paragraph styles before applying the new paragraph style if (pNextColl != pColl) { // #i75353# - if ( bClearHardSetNumRuleWhenFmtCollChanges ) + if ( bClearHardSetNumRuleWhenFormatCollChanges ) { std::vector<sal_uInt16> aClearWhichIds; aClearWhichIds.push_back( RES_PARATR_NUMRULE ); @@ -2751,16 +2751,16 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, } } } - ChgFmtColl( pNextColl ); + ChgFormatColl( pNextColl ); return pNode; } -SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos ) +SwContentNode* SwTextNode::AppendNode( const SwPosition & rPos ) { // Position hinter dem eingefuegt wird SwNodeIndex aIdx( rPos.nNode, 1 ); - SwTxtNode* pNew = _MakeNewTxtNode( aIdx, true ); + SwTextNode* pNew = _MakeNewTextNode( aIdx, true ); // reset list attributes at appended text node pNew->ResetAttr( RES_PARATR_LIST_ISRESTART ); @@ -2782,7 +2782,7 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos ) return pNew; } -SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt( +SwTextAttr * SwTextNode::GetTextAttrForCharAt( const sal_Int32 nIndex, const RES_TXTATR nWhich ) const { @@ -2790,7 +2790,7 @@ SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt( { for ( size_t i = 0; i < m_pSwpHints->Count(); ++i ) { - SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(i); + SwTextAttr * const pHint = m_pSwpHints->GetTextHint(i); const sal_Int32 nStartPos = pHint->GetStart(); if ( nIndex < nStartPos ) { @@ -2817,33 +2817,33 @@ inline sal_uInt16 lcl_BoundListLevel(const int nActualLevel) } // -> #i29560# -bool SwTxtNode::HasNumber() const +bool SwTextNode::HasNumber() const { bool bResult = false; const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if ( pRule ) { - SwNumFmt aFmt(pRule->Get(lcl_BoundListLevel(GetActualListLevel()))); + SwNumFormat aFormat(pRule->Get(lcl_BoundListLevel(GetActualListLevel()))); // #i40041# - bResult = aFmt.IsEnumeration() && - SVX_NUM_NUMBER_NONE != aFmt.GetNumberingType(); + bResult = aFormat.IsEnumeration() && + SVX_NUM_NUMBER_NONE != aFormat.GetNumberingType(); } return bResult; } -bool SwTxtNode::HasBullet() const +bool SwTextNode::HasBullet() const { bool bResult = false; const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if ( pRule ) { - SwNumFmt aFmt(pRule->Get(lcl_BoundListLevel(GetActualListLevel()))); + SwNumFormat aFormat(pRule->Get(lcl_BoundListLevel(GetActualListLevel()))); - bResult = aFmt.IsItemize(); + bResult = aFormat.IsItemize(); } return bResult; @@ -2852,7 +2852,7 @@ bool SwTxtNode::HasBullet() const // #128041# - introduce parameter <_bInclPrefixAndSuffixStrings> //i53420 added max outline parameter -OUString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, +OUString SwTextNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, const unsigned int _nRestrictToThisLevel ) const { if (GetDoc()->IsClipBoard() && m_pNumStringCache.get()) @@ -2866,7 +2866,7 @@ OUString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, { SvxNumberType const& rNumberType( pRule->Get( lcl_BoundListLevel(GetActualListLevel()) ) ); - if (rNumberType.IsTxtFmt() || + if (rNumberType.IsTextFormat() || (style::NumberingType::NUMBER_NONE == rNumberType.GetNumberingType())) { @@ -2880,23 +2880,23 @@ OUString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, return OUString(); } -long SwTxtNode::GetLeftMarginWithNum( bool bTxtLeft ) const +long SwTextNode::GetLeftMarginWithNum( bool bTextLeft ) const { long nRet = 0; const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if( pRule ) { - const SwNumFmt& rFmt = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); + const SwNumFormat& rFormat = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - nRet = rFmt.GetAbsLSpace(); + nRet = rFormat.GetAbsLSpace(); - if( !bTxtLeft ) + if( !bTextLeft ) { - if( 0 > rFmt.GetFirstLineOffset() && - nRet > -rFmt.GetFirstLineOffset() ) - nRet = nRet + rFmt.GetFirstLineOffset(); + if( 0 > rFormat.GetFirstLineOffset() && + nRet > -rFormat.GetFirstLineOffset() ) + nRet = nRet + rFormat.GetFirstLineOffset(); else nRet = 0; } @@ -2904,17 +2904,17 @@ long SwTxtNode::GetLeftMarginWithNum( bool bTxtLeft ) const if( pRule->IsAbsSpaces() ) nRet = nRet - GetSwAttrSet().GetLRSpace().GetLeft(); } - else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + else if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { if ( AreListLevelIndentsApplicable() ) { - nRet = rFmt.GetIndentAt(); + nRet = rFormat.GetIndentAt(); // #i90401# // Only negative first line indents have consider for the left margin - if ( !bTxtLeft && - rFmt.GetFirstLineIndent() < 0 ) + if ( !bTextLeft && + rFormat.GetFirstLineIndent() < 0 ) { - nRet = nRet + rFmt.GetFirstLineIndent(); + nRet = nRet + rFormat.GetFirstLineIndent(); } } } @@ -2923,7 +2923,7 @@ long SwTxtNode::GetLeftMarginWithNum( bool bTxtLeft ) const return nRet; } -bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const +bool SwTextNode::GetFirstLineOfsWithNum( short& rFLOffset ) const { // #i95907# rFLOffset = 0; @@ -2934,27 +2934,27 @@ bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const { if ( IsCountedInList() ) { - const SwNumFmt& rFmt = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + const SwNumFormat& rFormat = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - rFLOffset = rFmt.GetFirstLineOffset(); + rFLOffset = rFormat.GetFirstLineOffset(); if (!getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)) { SvxLRSpaceItem aItem = GetSwAttrSet().GetLRSpace(); - rFLOffset = rFLOffset + aItem.GetTxtFirstLineOfst(); + rFLOffset = rFLOffset + aItem.GetTextFirstLineOfst(); } } - else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + else if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { if ( AreListLevelIndentsApplicable() ) { - rFLOffset = rFmt.GetFirstLineIndent(); + rFLOffset = rFormat.GetFirstLineIndent(); } else if (!getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)) { SvxLRSpaceItem aItem = GetSwAttrSet().GetLRSpace(); - rFLOffset = aItem.GetTxtFirstLineOfst(); + rFLOffset = aItem.GetTextFirstLineOfst(); } } } @@ -2962,33 +2962,33 @@ bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const return true; } - rFLOffset = GetSwAttrSet().GetLRSpace().GetTxtFirstLineOfst(); + rFLOffset = GetSwAttrSet().GetLRSpace().GetTextFirstLineOfst(); return false; } -SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const +SwTwips SwTextNode::GetAdditionalIndentForStartingNewList() const { SwTwips nAdditionalIndent = 0; const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if ( pRule ) { - const SwNumFmt& rFmt = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + const SwNumFormat& rFormat = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nAdditionalIndent = GetSwAttrSet().GetLRSpace().GetLeft(); if (getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)) { nAdditionalIndent = nAdditionalIndent - - GetSwAttrSet().GetLRSpace().GetTxtFirstLineOfst(); + GetSwAttrSet().GetLRSpace().GetTextFirstLineOfst(); } } - else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + else if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { if ( AreListLevelIndentsApplicable() ) { - nAdditionalIndent = rFmt.GetIndentAt() + rFmt.GetFirstLineIndent(); + nAdditionalIndent = rFormat.GetIndentAt() + rFormat.GetFirstLineIndent(); } else { @@ -2996,7 +2996,7 @@ SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const if (getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)) { nAdditionalIndent = nAdditionalIndent - - GetSwAttrSet().GetLRSpace().GetTxtFirstLineOfst(); + GetSwAttrSet().GetLRSpace().GetTextFirstLineOfst(); } } } @@ -3010,15 +3010,15 @@ SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const } // #i96772# -void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const +void SwTextNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const { if ( AreListLevelIndentsApplicable() ) { const SwNumRule* pRule = GetNumRule(); if ( pRule && GetActualListLevel() >= 0 ) { - const SwNumFmt& rFmt = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + const SwNumFormat& rFormat = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { SvxLRSpaceItem aLR( RES_LR_SPACE ); o_rLRSpaceItem = aLR; @@ -3028,7 +3028,7 @@ void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpac } // #i91133# -long SwTxtNode::GetLeftMarginForTabCalculation() const +long SwTextNode::GetLeftMarginForTabCalculation() const { long nLeftMarginForTabCalc = 0; @@ -3036,91 +3036,91 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0; if( pRule ) { - const SwNumFmt& rFmt = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + const SwNumFormat& rFormat = pRule->Get(lcl_BoundListLevel(GetActualListLevel())); + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { if ( AreListLevelIndentsApplicable() ) { - nLeftMarginForTabCalc = rFmt.GetIndentAt(); + nLeftMarginForTabCalc = rFormat.GetIndentAt(); bLeftMarginForTabCalcSetToListLevelIndent = true; } } } if ( !bLeftMarginForTabCalcSetToListLevelIndent ) { - nLeftMarginForTabCalc = GetSwAttrSet().GetLRSpace().GetTxtLeft(); + nLeftMarginForTabCalc = GetSwAttrSet().GetLRSpace().GetTextLeft(); } return nLeftMarginForTabCalc; } static void Replace0xFF( - SwTxtNode const& rNode, - OUStringBuffer & rTxt, - sal_Int32 & rTxtStt, + SwTextNode const& rNode, + OUStringBuffer & rText, + sal_Int32 & rTextStt, sal_Int32 nEndPos, - bool const bExpandFlds, - bool const bExpandFtn = true ) + bool const bExpandFields, + bool const bExpandFootnote = true ) { if (rNode.GetpSwpHints()) { sal_Unicode cSrchChr = CH_TXTATR_BREAKWORD; for( int nSrchIter = 0; 2 > nSrchIter; ++nSrchIter, cSrchChr = CH_TXTATR_INWORD ) { - sal_Int32 nPos = rTxt.indexOf(cSrchChr); + sal_Int32 nPos = rText.indexOf(cSrchChr); while (-1 != nPos && nPos < nEndPos) { - const SwTxtAttr* const pAttr = - rNode.GetTxtAttrForCharAt(rTxtStt + nPos); + const SwTextAttr* const pAttr = + rNode.GetTextAttrForCharAt(rTextStt + nPos); if( pAttr ) { switch( pAttr->Which() ) { case RES_TXTATR_FIELD: case RES_TXTATR_ANNOTATION: - rTxt.remove(nPos, 1); - if( bExpandFlds ) + rText.remove(nPos, 1); + if( bExpandFields ) { const OUString aExpand( - static_txtattr_cast<SwTxtFld const*>(pAttr)->GetFmtFld().GetField()->ExpandField(true)); - rTxt.insert(nPos, aExpand); + static_txtattr_cast<SwTextField const*>(pAttr)->GetFormatField().GetField()->ExpandField(true)); + rText.insert(nPos, aExpand); nPos = nPos + aExpand.getLength(); nEndPos = nEndPos + aExpand.getLength(); - rTxtStt = rTxtStt - aExpand.getLength(); + rTextStt = rTextStt - aExpand.getLength(); } - ++rTxtStt; + ++rTextStt; break; case RES_TXTATR_FTN: - rTxt.remove(nPos, 1); - if( bExpandFlds && bExpandFtn ) + rText.remove(nPos, 1); + if( bExpandFields && bExpandFootnote ) { - const SwFmtFtn& rFtn = pAttr->GetFtn(); + const SwFormatFootnote& rFootnote = pAttr->GetFootnote(); OUString sExpand; - if( !rFtn.GetNumStr().isEmpty() ) - sExpand = rFtn.GetNumStr(); - else if( rFtn.IsEndNote() ) - sExpand = rNode.GetDoc()->GetEndNoteInfo().aFmt. - GetNumStr( rFtn.GetNumber() ); + if( !rFootnote.GetNumStr().isEmpty() ) + sExpand = rFootnote.GetNumStr(); + else if( rFootnote.IsEndNote() ) + sExpand = rNode.GetDoc()->GetEndNoteInfo().aFormat. + GetNumStr( rFootnote.GetNumber() ); else - sExpand = rNode.GetDoc()->GetFtnInfo().aFmt. - GetNumStr( rFtn.GetNumber() ); - rTxt.insert(nPos, sExpand); + sExpand = rNode.GetDoc()->GetFootnoteInfo().aFormat. + GetNumStr( rFootnote.GetNumber() ); + rText.insert(nPos, sExpand); nPos = nPos + sExpand.getLength(); nEndPos = nEndPos + sExpand.getLength(); - rTxtStt = rTxtStt - sExpand.getLength(); + rTextStt = rTextStt - sExpand.getLength(); } - ++rTxtStt; + ++rTextStt; break; default: - rTxt.remove(nPos, 1); - ++rTxtStt; + rText.remove(nPos, 1); + ++rTextStt; } } else ++nPos, ++nEndPos; - nPos = rTxt.indexOf(cSrchChr, nPos); + nPos = rText.indexOf(cSrchChr, nPos); } } } @@ -3128,28 +3128,28 @@ static void Replace0xFF( // Expand fields // #i83479# - handling of new parameters -OUString SwTxtNode::GetExpandTxt( const sal_Int32 nIdx, +OUString SwTextNode::GetExpandText( const sal_Int32 nIdx, const sal_Int32 nLen, const bool bWithNum, const bool bAddSpaceAfterListLabelStr, const bool bWithSpacesForLevel, - const bool bWithFtn ) const + const bool bWithFootnote ) const { ExpandMode eMode = ExpandMode::ExpandFields; - if (bWithFtn) + if (bWithFootnote) eMode |= ExpandMode::ExpandFootnote; ModelToViewHelper aConversionMap(*this, eMode); OUString aExpandText = aConversionMap.getViewText(); const sal_Int32 nExpandBegin = aConversionMap.ConvertToViewPosition( nIdx ); - sal_Int32 nEnd = nLen == -1 ? GetTxt().getLength() : nIdx + nLen; + sal_Int32 nEnd = nLen == -1 ? GetText().getLength() : nIdx + nLen; const sal_Int32 nExpandEnd = aConversionMap.ConvertToViewPosition( nEnd ); - OUStringBuffer aTxt(aExpandText.copy(nExpandBegin, nExpandEnd-nExpandBegin)); + OUStringBuffer aText(aExpandText.copy(nExpandBegin, nExpandEnd-nExpandBegin)); // remove dummy characters of Input Fields - comphelper::string::remove(aTxt, CH_TXT_ATR_INPUTFIELDSTART); - comphelper::string::remove(aTxt, CH_TXT_ATR_INPUTFIELDEND); + comphelper::string::remove(aText, CH_TXT_ATR_INPUTFIELDSTART); + comphelper::string::remove(aText, CH_TXT_ATR_INPUTFIELDEND); if( bWithNum ) { @@ -3158,9 +3158,9 @@ OUString SwTxtNode::GetExpandTxt( const sal_Int32 nIdx, if ( bAddSpaceAfterListLabelStr ) { const sal_Unicode aSpace = ' '; - aTxt.insert(0, aSpace); + aText.insert(0, aSpace); } - aTxt.insert(0, GetNumString()); + aText.insert(0, GetNumString()); } } @@ -3169,28 +3169,28 @@ OUString SwTxtNode::GetExpandTxt( const sal_Int32 nIdx, const sal_Unicode aSpace = ' '; for (int nLevel = GetActualListLevel(); nLevel > 0; --nLevel) { - aTxt.insert(0, aSpace); - aTxt.insert(0, aSpace); + aText.insert(0, aSpace); + aText.insert(0, aSpace); } } - return aTxt.makeStringAndClear(); + return aText.makeStringAndClear(); } -bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, +bool SwTextNode::GetExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx, sal_Int32 nIdx, sal_Int32 nLen, bool bWithNum, - bool bWithFtn, bool bReplaceTabsWithSpaces ) const + bool bWithFootnote, bool bReplaceTabsWithSpaces ) const { if( &rDestNd == this ) return false; - SwIndex aDestIdx(&rDestNd, rDestNd.GetTxt().getLength()); + SwIndex aDestIdx(&rDestNd, rDestNd.GetText().getLength()); if( pDestIdx ) aDestIdx = *pDestIdx; const sal_Int32 nDestStt = aDestIdx.GetIndex(); // Text einfuegen - OUStringBuffer buf(GetTxt()); + OUStringBuffer buf(GetText()); if( bReplaceTabsWithSpaces ) buf.replace('\t', ' '); @@ -3217,7 +3217,7 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, sal_Int32 nInsPos = nDestStt - nIdx; for ( size_t i = 0; i < m_pSwpHints->Count(); ++i ) { - const SwTxtAttr* pHt = (*m_pSwpHints)[i]; + const SwTextAttr* pHt = (*m_pSwpHints)[i]; const sal_Int32 nAttrStartIdx = pHt->GetStart(); const sal_uInt16 nWhich = pHt->Which(); if (nIdx + nLen <= nAttrStartIdx) @@ -3231,7 +3231,7 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, { const SvxFontItem* const pFont = static_cast<const SvxFontItem*>( - CharFmt::GetItem( *pHt, RES_CHRATR_FONT )); + CharFormat::GetItem( *pHt, RES_CHRATR_FONT )); if ( pFont && RTL_TEXTENCODING_SYMBOL == pFont->GetCharSet() ) { // attribute in area => copy @@ -3248,14 +3248,14 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, case RES_TXTATR_ANNOTATION: { OUString const aExpand( - static_txtattr_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true)); + static_txtattr_cast<SwTextField const*>(pHt)->GetFormatField().GetField()->ExpandField(true)); if (!aExpand.isEmpty()) { ++aDestIdx; // dahinter einfuegen; OUString const ins( rDestNd.InsertText( aExpand, aDestIdx)); SAL_INFO_IF(ins.getLength() != aExpand.getLength(), - "sw.core", "GetExpandTxt lossage"); + "sw.core", "GetExpandText lossage"); aDestIdx = nInsPos + nAttrStartIdx; nInsPos += ins.getLength(); } @@ -3266,18 +3266,18 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, case RES_TXTATR_FTN: { - if ( bWithFtn ) + if ( bWithFootnote ) { - const SwFmtFtn& rFtn = pHt->GetFtn(); + const SwFormatFootnote& rFootnote = pHt->GetFootnote(); OUString sExpand; - if( !rFtn.GetNumStr().isEmpty() ) - sExpand = rFtn.GetNumStr(); - else if( rFtn.IsEndNote() ) - sExpand = GetDoc()->GetEndNoteInfo().aFmt. - GetNumStr( rFtn.GetNumber() ); + if( !rFootnote.GetNumStr().isEmpty() ) + sExpand = rFootnote.GetNumStr(); + else if( rFootnote.IsEndNote() ) + sExpand = GetDoc()->GetEndNoteInfo().aFormat. + GetNumStr( rFootnote.GetNumber() ); else - sExpand = GetDoc()->GetFtnInfo().aFmt. - GetNumStr( rFtn.GetNumber() ); + sExpand = GetDoc()->GetFootnoteInfo().aFormat. + GetNumStr( rFootnote.GetNumber() ); if( !sExpand.isEmpty() ) { ++aDestIdx; // insert behind @@ -3289,7 +3289,7 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, aDestIdx.GetIndex() ); OUString const ins( rDestNd.InsertText(sExpand, aDestIdx, SwInsertFlags::EMPTYEXPAND)); SAL_INFO_IF(ins.getLength() != sExpand.getLength(), - "sw.core", "GetExpandTxt lossage"); + "sw.core", "GetExpandText lossage"); aDestIdx = nInsPos + nAttrStartIdx; nInsPos += ins.getLength(); } @@ -3315,9 +3315,9 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, aDestIdx = 0; sal_Int32 nStartDelete(-1); - while (aDestIdx < rDestNd.GetTxt().getLength()) + while (aDestIdx < rDestNd.GetText().getLength()) { - sal_Unicode const cur(rDestNd.GetTxt()[aDestIdx.GetIndex()]); + sal_Unicode const cur(rDestNd.GetText()[aDestIdx.GetIndex()]); if ( (cChar == cur) // filter substituted hidden text || (CH_TXT_ATR_FIELDSTART == cur) // filter all fieldmarks || (CH_TXT_ATR_FIELDEND == cur) @@ -3328,7 +3328,7 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, nStartDelete = aDestIdx.GetIndex(); // start deletion range } ++aDestIdx; - if (aDestIdx < rDestNd.GetTxt().getLength()) + if (aDestIdx < rDestNd.GetText().getLength()) { continue; } // else: end of paragraph => delete, see below @@ -3352,8 +3352,8 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, return true; } -OUString SwTxtNode::GetRedlineTxt( sal_Int32 nIdx, sal_Int32 nLen, - bool bExpandFlds, bool bWithNum ) const +OUString SwTextNode::GetRedlineText( sal_Int32 nIdx, sal_Int32 nLen, + bool bExpandFields, bool bWithNum ) const { std::vector<sal_Int32> aRedlArr; const SwDoc* pDoc = GetDoc(); @@ -3362,9 +3362,9 @@ OUString SwTxtNode::GetRedlineTxt( sal_Int32 nIdx, sal_Int32 nLen, { // es existiert fuer den Node irgendein Redline-Delete-Object const sal_uLong nNdIdx = GetIndex(); - for( ; nRedlPos < pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size() ; ++nRedlPos ) + for( ; nRedlPos < pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() ; ++nRedlPos ) { - const SwRangeRedline* pTmp = pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[ nRedlPos ]; + const SwRangeRedline* pTmp = pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ]; if( nsRedlineType_t::REDLINE_DELETE == pTmp->GetType() ) { const SwPosition *pRStt = pTmp->Start(), *pREnd = pTmp->End(); @@ -3388,7 +3388,7 @@ OUString SwTxtNode::GetRedlineTxt( sal_Int32 nIdx, sal_Int32 nLen, aRedlArr.push_back( pREnd->nContent.GetIndex() ); else { - aRedlArr.push_back(GetTxt().getLength()); + aRedlArr.push_back(GetText().getLength()); break; // mehr kann nicht kommen } } @@ -3398,12 +3398,12 @@ OUString SwTxtNode::GetRedlineTxt( sal_Int32 nIdx, sal_Int32 nLen, } } - OUStringBuffer aTxt((nLen > GetTxt().getLength()) - ? GetTxt().copy(nIdx) - : GetTxt().copy(nIdx, nLen)); + OUStringBuffer aText((nLen > GetText().getLength()) + ? GetText().copy(nIdx) + : GetText().copy(nIdx, nLen)); - sal_Int32 nTxtStt = nIdx; - sal_Int32 nIdxEnd = nIdx + aTxt.getLength(); + sal_Int32 nTextStt = nIdx; + sal_Int32 nIdxEnd = nIdx + aText.getLength(); for( size_t n = 0; n < aRedlArr.size(); n += 2 ) { sal_Int32 nStt = aRedlArr[ n ]; @@ -3414,21 +3414,21 @@ OUString SwTxtNode::GetRedlineTxt( sal_Int32 nIdx, sal_Int32 nLen, if( nStt < nIdx ) nStt = nIdx; if( nIdxEnd < nEnd ) nEnd = nIdxEnd; const sal_Int32 nDelCnt = nEnd - nStt; - aTxt.remove(nStt - nTxtStt, nDelCnt); - Replace0xFF(*this, aTxt, nTxtStt, nStt - nTxtStt, bExpandFlds); - nTxtStt += nDelCnt; + aText.remove(nStt - nTextStt, nDelCnt); + Replace0xFF(*this, aText, nTextStt, nStt - nTextStt, bExpandFields); + nTextStt += nDelCnt; } else if( nStt >= nIdxEnd ) break; } - Replace0xFF(*this, aTxt, nTxtStt, aTxt.getLength(), bExpandFlds); + Replace0xFF(*this, aText, nTextStt, aText.getLength(), bExpandFields); if( bWithNum ) - aTxt.insert(0, GetNumString()); - return aTxt.makeStringAndClear(); + aText.insert(0, GetNumString()); + return aText.makeStringAndClear(); } -void SwTxtNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, +void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, const OUString & rStr) { assert( rStart.GetIndex() < m_Text.getLength() // index out of bounds @@ -3436,7 +3436,7 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, sal_Int32 const nOverflow(rStr.getLength() - nDelLen - GetSpaceLeft()); SAL_WARN_IF(nOverflow > 0, "sw.core", - "SwTxtNode::ReplaceText: node text with insertion > node capacity."); + "SwTextNode::ReplaceText: node text with insertion > node capacity."); OUString const sInserted( (nOverflow > 0) ? rStr.copy(0, rStr.getLength() - nOverflow) : rStr); if (sInserted.isEmpty() && 0 == nDelLen) @@ -3452,7 +3452,7 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, if ((CH_TXTATR_BREAKWORD == m_Text[nPos]) || (CH_TXTATR_INWORD == m_Text[nPos])) { - SwTxtAttr *const pHint = GetTxtAttrForCharAt( nPos ); + SwTextAttr *const pHint = GetTextAttrForCharAt( nPos ); if (pHint) { assert(!( pHint->GetEnd() && pHint->HasDummyChar() @@ -3479,9 +3479,9 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, m_Text = m_Text.replaceAt(rStart.GetIndex(), nLen - 1, ""); Update( rStart, nLen - 1, true ); - OUString aTmpTxt( sInserted.copy(1) ); - m_Text = m_Text.replaceAt(rStart.GetIndex(), 0, aTmpTxt); - Update( rStart, aTmpTxt.getLength(), false ); + OUString aTmpText( sInserted.copy(1) ); + m_Text = m_Text.replaceAt(rStart.GetIndex(), 0, aTmpText); + Update( rStart, aTmpText.getLength(), false ); } else { @@ -3493,15 +3493,15 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, } SetIgnoreDontExpand( bOldExpFlg ); - SwDelTxt aDelHint( nStartPos, nDelLen ); + SwDelText aDelHint( nStartPos, nDelLen ); NotifyClients( 0, &aDelHint ); - SwInsTxt aHint( nStartPos, sInserted.getLength() ); + SwInsText aHint( nStartPos, sInserted.getLength() ); NotifyClients( 0, &aHint ); } namespace { - static void lcl_ResetParAttrs( SwTxtNode &rTxtNode ) + static void lcl_ResetParAttrs( SwTextNode &rTextNode ) { std::set<sal_uInt16> aAttrs; aAttrs.insert( aAttrs.end(), RES_PARATR_LIST_ID ); @@ -3509,10 +3509,10 @@ namespace { aAttrs.insert( aAttrs.end(), RES_PARATR_LIST_ISRESTART ); aAttrs.insert( aAttrs.end(), RES_PARATR_LIST_RESTARTVALUE ); aAttrs.insert( aAttrs.end(), RES_PARATR_LIST_ISCOUNTED ); - SwPaM aPam( rTxtNode ); + SwPaM aPam( rTextNode ); // #i96644# // suppress side effect "send data changed events" - rTxtNode.GetDoc()->ResetAttrs( aPam, false, aAttrs, false ); + rTextNode.GetDoc()->ResetAttrs( aPam, false, aAttrs, false ); } // Helper method for special handling of modified attributes at text node. @@ -3524,7 +3524,7 @@ namespace { // Same as (1). // (3) on changing the list style - RES_PARATR_NUMRULE: // Same as (1). - void HandleModifyAtTxtNode( SwTxtNode& rTxtNode, + void HandleModifyAtTextNode( SwTextNode& rTextNode, const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) { @@ -3539,27 +3539,27 @@ namespace { case RES_FMT_CHG: { bParagraphStyleChanged = true; - if( rTxtNode.GetNodes().IsDocNodes() ) + if( rTextNode.GetNodes().IsDocNodes() ) { - const SwNumRule* pFormerNumRuleAtTxtNode = - rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0; - if ( pFormerNumRuleAtTxtNode ) + const SwNumRule* pFormerNumRuleAtTextNode = + rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : 0; + if ( pFormerNumRuleAtTextNode ) { - sOldNumRule = pFormerNumRuleAtTxtNode->GetName(); + sOldNumRule = pFormerNumRuleAtTextNode->GetName(); } - if ( rTxtNode.IsEmptyListStyleDueToSetOutlineLevelAttr() ) + if ( rTextNode.IsEmptyListStyleDueToSetOutlineLevelAttr() ) { - const SwNumRuleItem& rNumRuleItem = rTxtNode.GetTxtColl()->GetNumRule(); + const SwNumRuleItem& rNumRuleItem = rTextNode.GetTextColl()->GetNumRule(); if ( !rNumRuleItem.GetValue().isEmpty() ) { - rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + rTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); } } - const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule(); - if ( pNumRuleAtTxtNode ) + const SwNumRule* pNumRuleAtTextNode = rTextNode.GetNumRule(); + if ( pNumRuleAtTextNode ) { bNumRuleSet = true; - sNumRule = pNumRuleAtTxtNode->GetName(); + sNumRule = pNumRuleAtTextNode->GetName(); } } break; @@ -3567,11 +3567,11 @@ namespace { case RES_ATTRSET_CHG: { const SfxPoolItem* pItem = 0; - const SwNumRule* pFormerNumRuleAtTxtNode = - rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0; - if ( pFormerNumRuleAtTxtNode ) + const SwNumRule* pFormerNumRuleAtTextNode = + rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : 0; + if ( pFormerNumRuleAtTextNode ) { - sOldNumRule = pFormerNumRuleAtTxtNode->GetName(); + sOldNumRule = pFormerNumRuleAtTextNode->GetName(); } const SwAttrSetChg* pSet = dynamic_cast<const SwAttrSetChg*>(pNewValue); @@ -3579,41 +3579,41 @@ namespace { SfxItemState::SET ) { // #i70748# - rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + rTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); bNumRuleSet = true; } // #i70748# // The new list style set at the paragraph. - const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule(); - if ( pNumRuleAtTxtNode ) + const SwNumRule* pNumRuleAtTextNode = rTextNode.GetNumRule(); + if ( pNumRuleAtTextNode ) { - sNumRule = pNumRuleAtTxtNode->GetName(); + sNumRule = pNumRuleAtTextNode->GetName(); } break; } case RES_PARATR_NUMRULE: { - if ( rTxtNode.GetNodes().IsDocNodes() ) + if ( rTextNode.GetNodes().IsDocNodes() ) { - const SwNumRule* pFormerNumRuleAtTxtNode = - rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0; - if ( pFormerNumRuleAtTxtNode ) + const SwNumRule* pFormerNumRuleAtTextNode = + rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : 0; + if ( pFormerNumRuleAtTextNode ) { - sOldNumRule = pFormerNumRuleAtTxtNode->GetName(); + sOldNumRule = pFormerNumRuleAtTextNode->GetName(); } if ( pNewValue ) { // #i70748# - rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + rTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); bNumRuleSet = true; } // #i70748# // The new list style set at the paragraph. - const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule(); - if ( pNumRuleAtTxtNode ) + const SwNumRule* pNumRuleAtTextNode = rTextNode.GetNumRule(); + if ( pNumRuleAtTextNode ) { - sNumRule = pNumRuleAtTxtNode->GetName(); + sNumRule = pNumRuleAtTextNode->GetName(); } } break; @@ -3625,69 +3625,69 @@ namespace { { if (sNumRule.isEmpty()) { - rTxtNode.RemoveFromList(); + rTextNode.RemoveFromList(); if ( bParagraphStyleChanged ) { - lcl_ResetParAttrs(rTxtNode); + lcl_ResetParAttrs(rTextNode); } } else { - rTxtNode.RemoveFromList(); + rTextNode.RemoveFromList(); // If new list style is the outline style, apply outline // level as the list level. if (sNumRule==SwNumRule::GetOutlineRuleName()) { // #i70748# - OSL_ENSURE( rTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle(), - "<HandleModifyAtTxtNode()> - text node with outline style, but its paragraph style is not assigned to outline style." ); + OSL_ENSURE( rTextNode.GetTextColl()->IsAssignedToListLevelOfOutlineStyle(), + "<HandleModifyAtTextNode()> - text node with outline style, but its paragraph style is not assigned to outline style." ); const int nNewListLevel = - rTxtNode.GetTxtColl()->GetAssignedOutlineStyleLevel(); + rTextNode.GetTextColl()->GetAssignedOutlineStyleLevel(); if ( 0 <= nNewListLevel && nNewListLevel < MAXLEVEL ) { - rTxtNode.SetAttrListLevel( nNewListLevel ); + rTextNode.SetAttrListLevel( nNewListLevel ); } } - rTxtNode.AddToList(); + rTextNode.AddToList(); } } else // <sNumRule.Len() == 0 && sOldNumRule.Len() != 0> { - rTxtNode.RemoveFromList(); + rTextNode.RemoveFromList(); if ( bParagraphStyleChanged ) { - lcl_ResetParAttrs(rTxtNode); + lcl_ResetParAttrs(rTextNode); // #i70748# - if ( dynamic_cast<const SfxUInt16Item &>(rTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, false )).GetValue() > 0 ) + if ( dynamic_cast<const SfxUInt16Item &>(rTextNode.GetAttr( RES_PARATR_OUTLINELEVEL, false )).GetValue() > 0 ) { - rTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); + rTextNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); } } } } - else if (!sNumRule.isEmpty() && !rTxtNode.IsInList()) + else if (!sNumRule.isEmpty() && !rTextNode.IsInList()) { - rTxtNode.AddToList(); + rTextNode.AddToList(); } } - // End of method <HandleModifyAtTxtNode> + // End of method <HandleModifyAtTextNode> } -void SwTxtNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) +void SwTextNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) { bool bWasNotifiable = m_bNotifiable; m_bNotifiable = false; // Override Modify so that deleting styles works properly (outline // numbering!). - // Never call _ChgTxtCollUpdateNum for Nodes in Undo. + // Never call _ChgTextCollUpdateNum for Nodes in Undo. if( pOldValue && pNewValue && RES_FMT_CHG == pOldValue->Which() && - GetRegisteredIn() == static_cast<const SwFmtChg*>(pNewValue)->pChangedFmt && + GetRegisteredIn() == static_cast<const SwFormatChg*>(pNewValue)->pChangedFormat && GetNodes().IsDocNodes() ) { - _ChgTxtCollUpdateNum( - static_cast<const SwTxtFmtColl*>(static_cast<const SwFmtChg*>(pOldValue)->pChangedFmt), - static_cast<const SwTxtFmtColl*>(static_cast<const SwFmtChg*>(pNewValue)->pChangedFmt) ); + _ChgTextCollUpdateNum( + static_cast<const SwTextFormatColl*>(static_cast<const SwFormatChg*>(pOldValue)->pChangedFormat), + static_cast<const SwTextFormatColl*>(static_cast<const SwFormatChg*>(pNewValue)->pChangedFormat) ); } //UUUU reset fill information @@ -3714,10 +3714,10 @@ void SwTxtNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewVal if ( !mbInSetOrResetAttr ) { - HandleModifyAtTxtNode( *this, pOldValue, pNewValue ); + HandleModifyAtTextNode( *this, pOldValue, pNewValue ); } - SwCntntNode::Modify( pOldValue, pNewValue ); + SwContentNode::Modify( pOldValue, pNewValue ); SwDoc * pDoc = GetDoc(); // #125329# - assure that text node is in document nodes array @@ -3735,24 +3735,24 @@ void SwTxtNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewVal } } -SwFmtColl* SwTxtNode::ChgFmtColl( SwFmtColl *pNewColl ) +SwFormatColl* SwTextNode::ChgFormatColl( SwFormatColl *pNewColl ) { - OSL_ENSURE( pNewColl,"ChgFmtColl: Collectionpointer has value 0." ); - OSL_ENSURE( HAS_BASE( SwTxtFmtColl, pNewColl ), - "ChgFmtColl: is not a Text Collection pointer." ); + OSL_ENSURE( pNewColl,"ChgFormatColl: Collectionpointer has value 0." ); + OSL_ENSURE( HAS_BASE( SwTextFormatColl, pNewColl ), + "ChgFormatColl: is not a Text Collection pointer." ); - SwTxtFmtColl *pOldColl = GetTxtColl(); + SwTextFormatColl *pOldColl = GetTextColl(); if( pNewColl != pOldColl ) { SetCalcHiddenCharFlags(); - SwCntntNode::ChgFmtColl( pNewColl ); + SwContentNode::ChgFormatColl( pNewColl ); OSL_ENSURE( !mbInSetOrResetAttr, - "DEBUG OSL_ENSURE(ON - <SwTxtNode::ChgFmtColl(..)> called during <Set/ResetAttr(..)>" ); + "DEBUG OSL_ENSURE(ON - <SwTextNode::ChgFormatColl(..)> called during <Set/ResetAttr(..)>" ); if ( !mbInSetOrResetAttr ) { - SwFmtChg aTmp1( pOldColl ); - SwFmtChg aTmp2( pNewColl ); - HandleModifyAtTxtNode( *this, &aTmp1, &aTmp2 ); + SwFormatChg aTmp1( pOldColl ); + SwFormatChg aTmp2( pNewColl ); + HandleModifyAtTextNode( *this, &aTmp1, &aTmp2 ); } //UUUU reset fill information on parent style change @@ -3765,7 +3765,7 @@ SwFmtColl* SwTxtNode::ChgFmtColl( SwFmtColl *pNewColl ) // nur wenn im normalen Nodes-Array if( GetNodes().IsDocNodes() ) { - _ChgTxtCollUpdateNum( pOldColl, static_cast<SwTxtFmtColl *>(pNewColl) ); + _ChgTextCollUpdateNum( pOldColl, static_cast<SwTextFormatColl *>(pNewColl) ); } GetNodes().UpdateOutlineNode(*this); @@ -3773,16 +3773,16 @@ SwFmtColl* SwTxtNode::ChgFmtColl( SwFmtColl *pNewColl ) return pOldColl; } -SwNodeNum* SwTxtNode::CreateNum() const +SwNodeNum* SwTextNode::CreateNum() const { if ( !mpNodeNum ) { - mpNodeNum = new SwNodeNum( const_cast<SwTxtNode*>(this) ); + mpNodeNum = new SwNodeNum( const_cast<SwTextNode*>(this) ); } return mpNodeNum; } -SwNumberTree::tNumberVector SwTxtNode::GetNumberVector() const +SwNumberTree::tNumberVector SwTextNode::GetNumberVector() const { if ( GetNum() ) { @@ -3795,7 +3795,7 @@ SwNumberTree::tNumberVector SwTxtNode::GetNumberVector() const } } -bool SwTxtNode::IsOutline() const +bool SwTextNode::IsOutline() const { bool bResult = false; @@ -3815,22 +3815,22 @@ bool SwTxtNode::IsOutline() const return bResult; } -bool SwTxtNode::IsOutlineStateChanged() const +bool SwTextNode::IsOutlineStateChanged() const { return IsOutline() != m_bLastOutlineState; } -void SwTxtNode::UpdateOutlineState() +void SwTextNode::UpdateOutlineState() { m_bLastOutlineState = IsOutline(); } -int SwTxtNode::GetAttrOutlineLevel() const +int SwTextNode::GetAttrOutlineLevel() const { return static_cast<const SfxUInt16Item &>(GetAttr(RES_PARATR_OUTLINELEVEL)).GetValue(); } -void SwTxtNode::SetAttrOutlineLevel(int nLevel) +void SwTextNode::SetAttrOutlineLevel(int nLevel) { assert(0 <= nLevel && nLevel <= MAXLEVEL); // Level Out Of Range if ( 0 <= nLevel && nLevel <= MAXLEVEL ) @@ -3842,7 +3842,7 @@ void SwTxtNode::SetAttrOutlineLevel(int nLevel) // #i70748# -void SwTxtNode::SetEmptyListStyleDueToSetOutlineLevelAttr() +void SwTextNode::SetEmptyListStyleDueToSetOutlineLevelAttr() { if ( !mbEmptyListStyleSetDueToSetOutlineLevelAttr ) { @@ -3851,7 +3851,7 @@ void SwTxtNode::SetEmptyListStyleDueToSetOutlineLevelAttr() } } -void SwTxtNode::ResetEmptyListStyleDueToResetOutlineLevelAttr() +void SwTextNode::ResetEmptyListStyleDueToResetOutlineLevelAttr() { if ( mbEmptyListStyleSetDueToSetOutlineLevelAttr ) { @@ -3860,7 +3860,7 @@ void SwTxtNode::ResetEmptyListStyleDueToResetOutlineLevelAttr() } } -void SwTxtNode::SetAttrListLevel( int nLevel ) +void SwTextNode::SetAttrListLevel( int nLevel ) { if ( nLevel < 0 || nLevel >= MAXLEVEL ) { @@ -3873,13 +3873,13 @@ void SwTxtNode::SetAttrListLevel( int nLevel ) SetAttr( aNewListLevelItem ); } -bool SwTxtNode::HasAttrListLevel() const +bool SwTextNode::HasAttrListLevel() const { return GetpSwAttrSet() && GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, false ) == SfxItemState::SET; } -int SwTxtNode::GetAttrListLevel() const +int SwTextNode::GetAttrListLevel() const { int nAttrListLevel = 0; @@ -3890,12 +3890,12 @@ int SwTxtNode::GetAttrListLevel() const return nAttrListLevel; } -int SwTxtNode::GetActualListLevel() const +int SwTextNode::GetActualListLevel() const { return GetNum() ? GetNum()->GetLevelInListTree() : -1; } -void SwTxtNode::SetListRestart( bool bRestart ) +void SwTextNode::SetListRestart( bool bRestart ) { if ( !bRestart ) { @@ -3911,7 +3911,7 @@ void SwTxtNode::SetListRestart( bool bRestart ) } } -bool SwTxtNode::IsListRestart() const +bool SwTextNode::IsListRestart() const { const SfxBoolItem& aIsRestartItem = dynamic_cast<const SfxBoolItem&>(GetAttr( RES_PARATR_LIST_ISRESTART )); @@ -3923,7 +3923,7 @@ bool SwTxtNode::IsListRestart() const This includes all kinds of numbering/bullet/outlines. The concrete list label string has to be checked, too. */ -bool SwTxtNode::HasVisibleNumberingOrBullet() const +bool SwTextNode::HasVisibleNumberingOrBullet() const { const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if ( pRule && IsCountedInList()) @@ -3931,15 +3931,15 @@ bool SwTxtNode::HasVisibleNumberingOrBullet() const // #i87154# // Correction of #newlistlevelattrs#: // The numbering type has to be checked for bullet lists. - const SwNumFmt& rFmt = pRule->Get( lcl_BoundListLevel(GetActualListLevel()) ); - return SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() || + const SwNumFormat& rFormat = pRule->Get( lcl_BoundListLevel(GetActualListLevel()) ); + return SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType() || !pRule->MakeNumString( *(GetNum()) ).isEmpty(); } return false; } -void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber ) +void SwTextNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber ) { const bool bChanged( HasAttrListRestartValue() ? GetAttrListRestartValue() != nNumber @@ -3960,22 +3960,22 @@ void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber } } -bool SwTxtNode::HasAttrListRestartValue() const +bool SwTextNode::HasAttrListRestartValue() const { return GetpSwAttrSet() && GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, false ) == SfxItemState::SET; } -SwNumberTree::tSwNumTreeNumber SwTxtNode::GetAttrListRestartValue() const +SwNumberTree::tSwNumTreeNumber SwTextNode::GetAttrListRestartValue() const { OSL_ENSURE( HasAttrListRestartValue(), - "<SwTxtNode::GetAttrListRestartValue()> - only ask for list restart value, if attribute is set at text node." ); + "<SwTextNode::GetAttrListRestartValue()> - only ask for list restart value, if attribute is set at text node." ); const SfxInt16Item& aListRestartValueItem = dynamic_cast<const SfxInt16Item&>(GetAttr( RES_PARATR_LIST_RESTARTVALUE )); return static_cast<SwNumberTree::tSwNumTreeNumber>(aListRestartValueItem.GetValue()); } -SwNumberTree::tSwNumTreeNumber SwTxtNode::GetActualListStartValue() const +SwNumberTree::tSwNumTreeNumber SwTextNode::GetActualListStartValue() const { SwNumberTree::tSwNumTreeNumber nListRestartValue = 1; @@ -3988,11 +3988,11 @@ SwNumberTree::tSwNumTreeNumber SwTxtNode::GetActualListStartValue() const SwNumRule* pRule = GetNumRule(); if ( pRule ) { - const SwNumFmt* pFmt = - pRule->GetNumFmt( static_cast<sal_uInt16>(GetAttrListLevel()) ); - if ( pFmt ) + const SwNumFormat* pFormat = + pRule->GetNumFormat( static_cast<sal_uInt16>(GetAttrListLevel()) ); + if ( pFormat ) { - nListRestartValue = pFmt->GetStart(); + nListRestartValue = pFormat->GetStart(); } } } @@ -4000,12 +4000,12 @@ SwNumberTree::tSwNumTreeNumber SwTxtNode::GetActualListStartValue() const return nListRestartValue; } -bool SwTxtNode::IsNotifiable() const +bool SwTextNode::IsNotifiable() const { return m_bNotifiable && IsNotificationEnabled(); } -bool SwTxtNode::IsNotificationEnabled() const +bool SwTextNode::IsNotificationEnabled() const { bool bResult = false; const SwDoc * pDoc = GetDoc(); @@ -4016,7 +4016,7 @@ bool SwTxtNode::IsNotificationEnabled() const return bResult; } -void SwTxtNode::SetCountedInList( bool bCounted ) +void SwTextNode::SetCountedInList( bool bCounted ) { if ( bCounted ) { @@ -4031,7 +4031,7 @@ void SwTxtNode::SetCountedInList( bool bCounted ) } } -bool SwTxtNode::IsCountedInList() const +bool SwTextNode::IsCountedInList() const { const SfxBoolItem& aIsCountedInListItem = dynamic_cast<const SfxBoolItem&>(GetAttr( RES_PARATR_LIST_ISCOUNTED )); @@ -4039,11 +4039,11 @@ bool SwTxtNode::IsCountedInList() const return aIsCountedInListItem.GetValue(); } -void SwTxtNode::AddToList() +void SwTextNode::AddToList() { if ( IsInList() ) { - OSL_FAIL( "<SwTxtNode::AddToList()> - the text node is already added to a list. Serious defect -> please inform OD" ); + OSL_FAIL( "<SwTextNode::AddToList()> - the text node is already added to a list. Serious defect -> please inform OD" ); return; } @@ -4061,7 +4061,7 @@ void SwTxtNode::AddToList() } } OSL_ENSURE( pList != 0, - "<SwTxtNode::AddToList()> - no list for given list id. Serious defect -> please inform OD" ); + "<SwTextNode::AddToList()> - no list for given list id. Serious defect -> please inform OD" ); if ( pList ) { pList->InsertListItem( *CreateNum(), GetAttrListLevel() ); @@ -4070,7 +4070,7 @@ void SwTxtNode::AddToList() } } -void SwTxtNode::RemoveFromList() +void SwTextNode::RemoveFromList() { if ( IsInList() ) { @@ -4083,12 +4083,12 @@ void SwTxtNode::RemoveFromList() } } -bool SwTxtNode::IsInList() const +bool SwTextNode::IsInList() const { return GetNum() != 0 && GetNum()->GetParent() != 0; } -bool SwTxtNode::IsFirstOfNumRule() const +bool SwTextNode::IsFirstOfNumRule() const { bool bResult = false; @@ -4098,7 +4098,7 @@ bool SwTxtNode::IsFirstOfNumRule() const return bResult; } -void SwTxtNode::SetListId(OUString const& rListId) +void SwTextNode::SetListId(OUString const& rListId) { const SfxStringItem& rListIdItem = dynamic_cast<const SfxStringItem&>(GetAttr( RES_PARATR_LIST_ID )); @@ -4116,7 +4116,7 @@ void SwTxtNode::SetListId(OUString const& rListId) } } -OUString SwTxtNode::GetListId() const +OUString SwTextNode::GetListId() const { OUString sListId; @@ -4152,7 +4152,7 @@ OUString SwTxtNode::GetListId() const @return boolean */ -bool SwTxtNode::AreListLevelIndentsApplicable() const +bool SwTextNode::AreListLevelIndentsApplicable() const { bool bAreListLevelIndentsApplicable( true ); @@ -4180,7 +4180,7 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const // paragraph has no hard-set indent attributes // check, paragraph's - const SwTxtFmtColl* pColl = GetTxtColl(); + const SwTextFormatColl* pColl = GetTextColl(); while ( pColl ) { if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET ) @@ -4198,9 +4198,9 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const break; } - pColl = dynamic_cast<const SwTxtFmtColl*>(pColl->DerivedFrom()); + pColl = dynamic_cast<const SwTextFormatColl*>(pColl->DerivedFrom()); OSL_ENSURE( pColl, - "<SwTxtNode::AreListLevelIndentsApplicable()> - something wrong in paragraph's style hierarchy. The applied list style is not found." ); + "<SwTextNode::AreListLevelIndentsApplicable()> - something wrong in paragraph's style hierarchy. The applied list style is not found." ); } } @@ -4215,19 +4215,19 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const @return boolean - indicating, if a list tab stop position is provided */ -bool SwTxtNode::GetListTabStopPosition( long& nListTabStopPosition ) const +bool SwTextNode::GetListTabStopPosition( long& nListTabStopPosition ) const { bool bListTanStopPositionProvided( false ); const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : 0; if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 ) { - const SwNumFmt& rFmt = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) ); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && - rFmt.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB ) + const SwNumFormat& rFormat = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) ); + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && + rFormat.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB ) { bListTanStopPositionProvided = true; - nListTabStopPosition = rFmt.GetListtabPos(); + nListTabStopPosition = rFormat.GetListtabPos(); if ( getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT) ) { @@ -4235,12 +4235,12 @@ bool SwTxtNode::GetListTabStopPosition( long& nListTabStopPosition ) const // indent value of the paragraph. Thus, adjust <nListTabStopPos>. if ( AreListLevelIndentsApplicable() ) { - nListTabStopPosition -= rFmt.GetIndentAt(); + nListTabStopPosition -= rFormat.GetIndentAt(); } else if (!getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)) { SvxLRSpaceItem aItem = GetSwAttrSet().GetLRSpace(); - nListTabStopPosition -= aItem.GetTxtLeft(); + nListTabStopPosition -= aItem.GetTextLeft(); } } } @@ -4249,15 +4249,15 @@ bool SwTxtNode::GetListTabStopPosition( long& nListTabStopPosition ) const return bListTanStopPositionProvided; } -OUString SwTxtNode::GetLabelFollowedBy() const +OUString SwTextNode::GetLabelFollowedBy() const { const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : 0; if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 ) { - const SwNumFmt& rFmt = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) ); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + const SwNumFormat& rFormat = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) ); + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - switch ( rFmt.GetLabelFollowedBy() ) + switch ( rFormat.GetLabelFollowedBy() ) { case SvxNumberFormat::LISTTAB: { @@ -4276,7 +4276,7 @@ OUString SwTxtNode::GetLabelFollowedBy() const break; default: { - OSL_FAIL( "<SwTxtNode::GetLabelFollowedBy()> - unknown SvxNumberFormat::GetLabelFollowedBy() return value" ); + OSL_FAIL( "<SwTextNode::GetLabelFollowedBy()> - unknown SvxNumberFormat::GetLabelFollowedBy() return value" ); } } } @@ -4285,7 +4285,7 @@ OUString SwTxtNode::GetLabelFollowedBy() const return OUString(); } -void SwTxtNode::CalcHiddenCharFlags() const +void SwTextNode::CalcHiddenCharFlags() const { sal_Int32 nStartPos; sal_Int32 nEndPos; @@ -4294,7 +4294,7 @@ void SwTxtNode::CalcHiddenCharFlags() const } // #i12836# enhanced pdf export -bool SwTxtNode::IsHidden() const +bool SwTextNode::IsHidden() const { if ( HasHiddenParaField() || HasHiddenCharAttribute( true ) ) return true; @@ -4334,18 +4334,18 @@ namespace { // (6) Notify list tree, if count in list - RES_PARATR_LIST_ISCOUNTED - is set // and changed after the attributes have been set // (7) Set or Reset emtpy list style due to changed outline level - RES_PARATR_OUTLINELEVEL. - class HandleSetAttrAtTxtNode + class HandleSetAttrAtTextNode { public: - HandleSetAttrAtTxtNode( SwTxtNode& rTxtNode, + HandleSetAttrAtTextNode( SwTextNode& rTextNode, const SfxPoolItem& pItem ); - HandleSetAttrAtTxtNode( SwTxtNode& rTxtNode, + HandleSetAttrAtTextNode( SwTextNode& rTextNode, const SfxItemSet& rItemSet ); - ~HandleSetAttrAtTxtNode(); + ~HandleSetAttrAtTextNode(); private: - SwTxtNode& mrTxtNode; - bool mbAddTxtNodeToList; + SwTextNode& mrTextNode; + bool mbAddTextNodeToList; bool mbUpdateListLevel; bool mbUpdateListRestart; bool mbUpdateListCount; @@ -4353,10 +4353,10 @@ namespace { bool mbOutlineLevelSet; }; - HandleSetAttrAtTxtNode::HandleSetAttrAtTxtNode( SwTxtNode& rTxtNode, + HandleSetAttrAtTextNode::HandleSetAttrAtTextNode( SwTextNode& rTextNode, const SfxPoolItem& pItem ) - : mrTxtNode( rTxtNode ), - mbAddTxtNodeToList( false ), + : mrTextNode( rTextNode ), + mbAddTextNodeToList( false ), mbUpdateListLevel( false ), mbUpdateListRestart( false ), mbUpdateListCount( false ), @@ -4368,16 +4368,16 @@ namespace { // handle RES_PARATR_NUMRULE case RES_PARATR_NUMRULE: { - mrTxtNode.RemoveFromList(); + mrTextNode.RemoveFromList(); const SwNumRuleItem& pNumRuleItem = dynamic_cast<const SwNumRuleItem&>(pItem); if ( !pNumRuleItem.GetValue().isEmpty() ) { - mbAddTxtNodeToList = true; + mbAddTextNodeToList = true; // #i105562# - mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + mrTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); } } break; @@ -4388,14 +4388,14 @@ namespace { const SfxStringItem& pListIdItem = dynamic_cast<const SfxStringItem&>(pItem); OSL_ENSURE( pListIdItem.GetValue().getLength() > 0, - "<HandleSetAttrAtTxtNode(..)> - empty list id attribute not excepted. Serious defect -> please inform OD." ); - const OUString sListIdOfTxtNode = rTxtNode.GetListId(); - if ( pListIdItem.GetValue() != sListIdOfTxtNode ) + "<HandleSetAttrAtTextNode(..)> - empty list id attribute not excepted. Serious defect -> please inform OD." ); + const OUString sListIdOfTextNode = rTextNode.GetListId(); + if ( pListIdItem.GetValue() != sListIdOfTextNode ) { - mbAddTxtNodeToList = true; - if ( mrTxtNode.IsInList() ) + mbAddTextNodeToList = true; + if ( mrTextNode.IsInList() ) { - mrTxtNode.RemoveFromList(); + mrTextNode.RemoveFromList(); } } } @@ -4406,7 +4406,7 @@ namespace { { const SfxInt16Item& aListLevelItem = dynamic_cast<const SfxInt16Item&>(pItem); - if ( aListLevelItem.GetValue() != mrTxtNode.GetAttrListLevel() ) + if ( aListLevelItem.GetValue() != mrTextNode.GetAttrListLevel() ) { mbUpdateListLevel = true; } @@ -4419,7 +4419,7 @@ namespace { const SfxBoolItem& aListIsRestartItem = dynamic_cast<const SfxBoolItem&>(pItem); if ( aListIsRestartItem.GetValue() != - mrTxtNode.IsListRestart() ) + mrTextNode.IsListRestart() ) { mbUpdateListRestart = true; } @@ -4431,8 +4431,8 @@ namespace { { const SfxInt16Item& aListRestartValueItem = dynamic_cast<const SfxInt16Item&>(pItem); - if ( !mrTxtNode.HasAttrListRestartValue() || - aListRestartValueItem.GetValue() != mrTxtNode.GetAttrListRestartValue() ) + if ( !mrTextNode.HasAttrListRestartValue() || + aListRestartValueItem.GetValue() != mrTextNode.GetAttrListRestartValue() ) { mbUpdateListRestart = true; } @@ -4445,7 +4445,7 @@ namespace { const SfxBoolItem& aIsCountedInListItem = dynamic_cast<const SfxBoolItem&>(pItem); if ( aIsCountedInListItem.GetValue() != - mrTxtNode.IsCountedInList() ) + mrTextNode.IsCountedInList() ) { mbUpdateListCount = true; } @@ -4458,7 +4458,7 @@ namespace { { const SfxUInt16Item& aOutlineLevelItem = dynamic_cast<const SfxUInt16Item&>(pItem); - if ( aOutlineLevelItem.GetValue() != mrTxtNode.GetAttrOutlineLevel() ) + if ( aOutlineLevelItem.GetValue() != mrTextNode.GetAttrOutlineLevel() ) { mbOutlineLevelSet = true; } @@ -4468,10 +4468,10 @@ namespace { } - HandleSetAttrAtTxtNode::HandleSetAttrAtTxtNode( SwTxtNode& rTxtNode, + HandleSetAttrAtTextNode::HandleSetAttrAtTextNode( SwTextNode& rTextNode, const SfxItemSet& rItemSet ) - : mrTxtNode( rTxtNode ), - mbAddTxtNodeToList( false ), + : mrTextNode( rTextNode ), + mbAddTextNodeToList( false ), mbUpdateListLevel( false ), mbUpdateListRestart( false ), mbUpdateListCount( false ), @@ -4482,15 +4482,15 @@ namespace { // handle RES_PARATR_NUMRULE if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, false, &pItem ) == SfxItemState::SET ) { - mrTxtNode.RemoveFromList(); + mrTextNode.RemoveFromList(); const SwNumRuleItem* pNumRuleItem = dynamic_cast<const SwNumRuleItem*>(pItem); if ( !pNumRuleItem->GetValue().isEmpty() ) { - mbAddTxtNodeToList = true; + mbAddTextNodeToList = true; // #i70748# - mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + mrTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); } } @@ -4499,14 +4499,14 @@ namespace { { const SfxStringItem* pListIdItem = dynamic_cast<const SfxStringItem*>(pItem); - const OUString sListIdOfTxtNode = mrTxtNode.GetListId(); + const OUString sListIdOfTextNode = mrTextNode.GetListId(); if ( pListIdItem && - pListIdItem->GetValue() != sListIdOfTxtNode ) + pListIdItem->GetValue() != sListIdOfTextNode ) { - mbAddTxtNodeToList = true; - if ( mrTxtNode.IsInList() ) + mbAddTextNodeToList = true; + if ( mrTextNode.IsInList() ) { - mrTxtNode.RemoveFromList(); + mrTextNode.RemoveFromList(); } } } @@ -4516,7 +4516,7 @@ namespace { { const SfxInt16Item* pListLevelItem = dynamic_cast<const SfxInt16Item*>(pItem); - if (pListLevelItem && pListLevelItem->GetValue() != mrTxtNode.GetAttrListLevel()) + if (pListLevelItem && pListLevelItem->GetValue() != mrTextNode.GetAttrListLevel()) { mbUpdateListLevel = true; } @@ -4527,7 +4527,7 @@ namespace { { const SfxBoolItem* pListIsRestartItem = dynamic_cast<const SfxBoolItem*>(pItem); - if (pListIsRestartItem && pListIsRestartItem->GetValue() != mrTxtNode.IsListRestart()) + if (pListIsRestartItem && pListIsRestartItem->GetValue() != mrTextNode.IsListRestart()) { mbUpdateListRestart = true; } @@ -4538,8 +4538,8 @@ namespace { { const SfxInt16Item* pListRestartValueItem = dynamic_cast<const SfxInt16Item*>(pItem); - if ( !mrTxtNode.HasAttrListRestartValue() || (pListRestartValueItem && - pListRestartValueItem->GetValue() != mrTxtNode.GetAttrListRestartValue()) ) + if ( !mrTextNode.HasAttrListRestartValue() || (pListRestartValueItem && + pListRestartValueItem->GetValue() != mrTextNode.GetAttrListRestartValue()) ) { mbUpdateListRestart = true; } @@ -4551,7 +4551,7 @@ namespace { const SfxBoolItem* pIsCountedInListItem = dynamic_cast<const SfxBoolItem*>(pItem); if (pIsCountedInListItem && pIsCountedInListItem->GetValue() != - mrTxtNode.IsCountedInList()) + mrTextNode.IsCountedInList()) { mbUpdateListCount = true; } @@ -4564,89 +4564,89 @@ namespace { const SfxUInt16Item* pOutlineLevelItem = dynamic_cast<const SfxUInt16Item*>(pItem); if (pOutlineLevelItem && pOutlineLevelItem->GetValue() != - mrTxtNode.GetAttrOutlineLevel()) + mrTextNode.GetAttrOutlineLevel()) { mbOutlineLevelSet = true; } } } - HandleSetAttrAtTxtNode::~HandleSetAttrAtTxtNode() + HandleSetAttrAtTextNode::~HandleSetAttrAtTextNode() { - if ( mbAddTxtNodeToList ) + if ( mbAddTextNodeToList ) { - SwNumRule* pNumRuleAtTxtNode = mrTxtNode.GetNumRule(); - if ( pNumRuleAtTxtNode ) + SwNumRule* pNumRuleAtTextNode = mrTextNode.GetNumRule(); + if ( pNumRuleAtTextNode ) { - mrTxtNode.AddToList(); + mrTextNode.AddToList(); } } else { - if ( mbUpdateListLevel && mrTxtNode.IsInList() ) + if ( mbUpdateListLevel && mrTextNode.IsInList() ) { - const_cast<SwNodeNum*>(mrTxtNode.GetNum())->SetLevelInListTree( - mrTxtNode.GetAttrListLevel() ); + const_cast<SwNodeNum*>(mrTextNode.GetNum())->SetLevelInListTree( + mrTextNode.GetAttrListLevel() ); } - if ( mbUpdateListRestart && mrTxtNode.IsInList() ) + if ( mbUpdateListRestart && mrTextNode.IsInList() ) { - SwNodeNum* pNodeNum = const_cast<SwNodeNum*>(mrTxtNode.GetNum()); + SwNodeNum* pNodeNum = const_cast<SwNodeNum*>(mrTextNode.GetNum()); pNodeNum->InvalidateMe(); pNodeNum->NotifyInvalidSiblings(); } - if ( mbUpdateListCount && mrTxtNode.IsInList() ) + if ( mbUpdateListCount && mrTextNode.IsInList() ) { - const_cast<SwNodeNum*>(mrTxtNode.GetNum())->InvalidateAndNotifyTree(); + const_cast<SwNodeNum*>(mrTextNode.GetNum())->InvalidateAndNotifyTree(); } } // #i70748# if (mbOutlineLevelSet) { - mrTxtNode.GetNodes().UpdateOutlineNode(mrTxtNode); - if (mrTxtNode.GetAttrOutlineLevel() == 0) + mrTextNode.GetNodes().UpdateOutlineNode(mrTextNode); + if (mrTextNode.GetAttrOutlineLevel() == 0) { - mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + mrTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); } else { const SfxPoolItem* pItem = 0; - if ( mrTxtNode.GetSwAttrSet().GetItemState( RES_PARATR_NUMRULE, + if ( mrTextNode.GetSwAttrSet().GetItemState( RES_PARATR_NUMRULE, true, &pItem ) != SfxItemState::SET ) { - mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); + mrTextNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); } } } } - // End of class <HandleSetAttrAtTxtNode> + // End of class <HandleSetAttrAtTextNode> } -bool SwTxtNode::SetAttr( const SfxPoolItem& pItem ) +bool SwTextNode::SetAttr( const SfxPoolItem& pItem ) { const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr ); mbInSetOrResetAttr = true; - HandleSetAttrAtTxtNode aHandleSetAttr( *this, pItem ); + HandleSetAttrAtTextNode aHandleSetAttr( *this, pItem ); - bool bRet = SwCntntNode::SetAttr( pItem ); + bool bRet = SwContentNode::SetAttr( pItem ); mbInSetOrResetAttr = bOldIsSetOrResetAttr; return bRet; } -bool SwTxtNode::SetAttr( const SfxItemSet& rSet ) +bool SwTextNode::SetAttr( const SfxItemSet& rSet ) { const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr ); mbInSetOrResetAttr = true; - HandleSetAttrAtTxtNode aHandleSetAttr( *this, rSet ); + HandleSetAttrAtTextNode aHandleSetAttr( *this, rSet ); - bool bRet = SwCntntNode::SetAttr( rSet ); + bool bRet = SwContentNode::SetAttr( rSet ); mbInSetOrResetAttr = bOldIsSetOrResetAttr; @@ -4670,30 +4670,30 @@ namespace { // (5) Notify list tree, if list restart value - RES_PARATR_LIST_RESTARTVALUE - is reset. // (6) Notify list tree, if count in list - RES_PARATR_LIST_ISCOUNTED - is reset. // (7) Reset empty list style, if outline level attribute - RES_PARATR_OUTLINELEVEL - is reset. - class HandleResetAttrAtTxtNode + class HandleResetAttrAtTextNode { public: - HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode, + HandleResetAttrAtTextNode( SwTextNode& rTextNode, const sal_uInt16 nWhich1, const sal_uInt16 nWhich2 ); - HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode, + HandleResetAttrAtTextNode( SwTextNode& rTextNode, const std::vector<sal_uInt16>& rWhichArr ); - HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode ); + HandleResetAttrAtTextNode( SwTextNode& rTextNode ); - ~HandleResetAttrAtTxtNode(); + ~HandleResetAttrAtTextNode(); private: - SwTxtNode& mrTxtNode; + SwTextNode& mrTextNode; bool mbListStyleOrIdReset; bool mbUpdateListLevel; bool mbUpdateListRestart; bool mbUpdateListCount; }; - HandleResetAttrAtTxtNode::HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode, + HandleResetAttrAtTextNode::HandleResetAttrAtTextNode( SwTextNode& rTextNode, const sal_uInt16 nWhich1, const sal_uInt16 nWhich2 ) - : mrTxtNode( rTxtNode ), + : mrTextNode( rTextNode ), mbListStyleOrIdReset( false ), mbUpdateListLevel( false ), mbUpdateListRestart( false ), @@ -4705,13 +4705,13 @@ namespace { // RES_PARATR_NUMRULE and RES_PARATR_LIST_ID if ( nWhich1 <= RES_PARATR_NUMRULE && RES_PARATR_NUMRULE <= nWhich2 ) { - bRemoveFromList = mrTxtNode.GetNumRule() != 0; + bRemoveFromList = mrTextNode.GetNumRule() != 0; mbListStyleOrIdReset = true; } else if ( nWhich1 <= RES_PARATR_LIST_ID && RES_PARATR_LIST_ID <= nWhich2 ) { - bRemoveFromList = mrTxtNode.GetpSwAttrSet() && - mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET; + bRemoveFromList = mrTextNode.GetpSwAttrSet() && + mrTextNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET; // #i92898# mbListStyleOrIdReset = true; } @@ -4721,26 +4721,26 @@ namespace { // RES_PARATR_LIST_LEVEL mbUpdateListLevel = ( nWhich1 <= RES_PARATR_LIST_LEVEL && RES_PARATR_LIST_LEVEL <= nWhich2 && - mrTxtNode.HasAttrListLevel() ); + mrTextNode.HasAttrListLevel() ); // RES_PARATR_LIST_ISRESTART and RES_PARATR_LIST_RESTARTVALUE mbUpdateListRestart = ( nWhich1 <= RES_PARATR_LIST_ISRESTART && RES_PARATR_LIST_ISRESTART <= nWhich2 && - mrTxtNode.IsListRestart() ) || + mrTextNode.IsListRestart() ) || ( nWhich1 <= RES_PARATR_LIST_RESTARTVALUE && RES_PARATR_LIST_RESTARTVALUE <= nWhich2 && - mrTxtNode.HasAttrListRestartValue() ); + mrTextNode.HasAttrListRestartValue() ); // RES_PARATR_LIST_ISCOUNTED mbUpdateListCount = ( nWhich1 <= RES_PARATR_LIST_ISCOUNTED && RES_PARATR_LIST_ISCOUNTED <= nWhich2 && - !mrTxtNode.IsCountedInList() ); + !mrTextNode.IsCountedInList() ); } // #i70748# // RES_PARATR_OUTLINELEVEL if ( nWhich1 <= RES_PARATR_OUTLINELEVEL && RES_PARATR_OUTLINELEVEL <= nWhich2 ) { - mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + mrTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); } } else @@ -4748,13 +4748,13 @@ namespace { // RES_PARATR_NUMRULE and RES_PARATR_LIST_ID if ( nWhich1 == RES_PARATR_NUMRULE ) { - bRemoveFromList = mrTxtNode.GetNumRule() != 0; + bRemoveFromList = mrTextNode.GetNumRule() != 0; mbListStyleOrIdReset = true; } else if ( nWhich1 == RES_PARATR_LIST_ID ) { - bRemoveFromList = mrTxtNode.GetpSwAttrSet() && - mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET; + bRemoveFromList = mrTextNode.GetpSwAttrSet() && + mrTextNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET; // #i92898# mbListStyleOrIdReset = true; } @@ -4762,36 +4762,36 @@ namespace { // RES_PARATR_OUTLINELEVEL else if ( nWhich1 == RES_PARATR_OUTLINELEVEL ) { - mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + mrTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); } if ( !bRemoveFromList ) { // RES_PARATR_LIST_LEVEL mbUpdateListLevel = nWhich1 == RES_PARATR_LIST_LEVEL && - mrTxtNode.HasAttrListLevel(); + mrTextNode.HasAttrListLevel(); // RES_PARATR_LIST_ISRESTART and RES_PARATR_LIST_RESTARTVALUE mbUpdateListRestart = ( nWhich1 == RES_PARATR_LIST_ISRESTART && - mrTxtNode.IsListRestart() ) || + mrTextNode.IsListRestart() ) || ( nWhich1 == RES_PARATR_LIST_RESTARTVALUE && - mrTxtNode.HasAttrListRestartValue() ); + mrTextNode.HasAttrListRestartValue() ); // RES_PARATR_LIST_ISCOUNTED mbUpdateListCount = nWhich1 == RES_PARATR_LIST_ISCOUNTED && - !mrTxtNode.IsCountedInList(); + !mrTextNode.IsCountedInList(); } } - if ( bRemoveFromList && mrTxtNode.IsInList() ) + if ( bRemoveFromList && mrTextNode.IsInList() ) { - mrTxtNode.RemoveFromList(); + mrTextNode.RemoveFromList(); } } - HandleResetAttrAtTxtNode::HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode, + HandleResetAttrAtTextNode::HandleResetAttrAtTextNode( SwTextNode& rTextNode, const std::vector<sal_uInt16>& rWhichArr ) - : mrTxtNode( rTxtNode ), + : mrTextNode( rTextNode ), mbListStyleOrIdReset( false ), mbUpdateListLevel( false ), mbUpdateListRestart( false ), @@ -4806,14 +4806,14 @@ namespace { if ( *it == RES_PARATR_NUMRULE ) { bRemoveFromList = bRemoveFromList || - mrTxtNode.GetNumRule() != 0; + mrTextNode.GetNumRule() != 0; mbListStyleOrIdReset = true; } else if ( *it == RES_PARATR_LIST_ID ) { bRemoveFromList = bRemoveFromList || - ( mrTxtNode.GetpSwAttrSet() && - mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET ); + ( mrTextNode.GetpSwAttrSet() && + mrTextNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET ); // #i92898# mbListStyleOrIdReset = true; } @@ -4821,7 +4821,7 @@ namespace { // RES_PARATR_OUTLINELEVEL else if ( *it == RES_PARATR_OUTLINELEVEL ) { - mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + mrTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); } if ( !bRemoveFromList ) @@ -4829,161 +4829,161 @@ namespace { // RES_PARATR_LIST_LEVEL mbUpdateListLevel = mbUpdateListLevel || ( *it == RES_PARATR_LIST_LEVEL && - mrTxtNode.HasAttrListLevel() ); + mrTextNode.HasAttrListLevel() ); // RES_PARATR_LIST_ISRESTART and RES_PARATR_LIST_RESTARTVALUE mbUpdateListRestart = mbUpdateListRestart || ( *it == RES_PARATR_LIST_ISRESTART && - mrTxtNode.IsListRestart() ) || + mrTextNode.IsListRestart() ) || ( *it == RES_PARATR_LIST_RESTARTVALUE && - mrTxtNode.HasAttrListRestartValue() ); + mrTextNode.HasAttrListRestartValue() ); // RES_PARATR_LIST_ISCOUNTED mbUpdateListCount = mbUpdateListCount || ( *it == RES_PARATR_LIST_ISCOUNTED && - !mrTxtNode.IsCountedInList() ); + !mrTextNode.IsCountedInList() ); } } } - if ( bRemoveFromList && mrTxtNode.IsInList() ) + if ( bRemoveFromList && mrTextNode.IsInList() ) { - mrTxtNode.RemoveFromList(); + mrTextNode.RemoveFromList(); } } - HandleResetAttrAtTxtNode::HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode ) - : mrTxtNode( rTxtNode ), + HandleResetAttrAtTextNode::HandleResetAttrAtTextNode( SwTextNode& rTextNode ) + : mrTextNode( rTextNode ), mbListStyleOrIdReset( false ), mbUpdateListLevel( false ), mbUpdateListRestart( false ), mbUpdateListCount( false ) { mbListStyleOrIdReset = true; - if ( rTxtNode.IsInList() ) + if ( rTextNode.IsInList() ) { - rTxtNode.RemoveFromList(); + rTextNode.RemoveFromList(); } // #i70748# - mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + mrTextNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); } - HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode() + HandleResetAttrAtTextNode::~HandleResetAttrAtTextNode() { - if ( mbListStyleOrIdReset && !mrTxtNode.IsInList() ) + if ( mbListStyleOrIdReset && !mrTextNode.IsInList() ) { // check, if in spite of the reset of the list style or the list id // the paragraph still has to be added to a list. - if (mrTxtNode.GetNumRule() && !mrTxtNode.GetListId().isEmpty()) + if (mrTextNode.GetNumRule() && !mrTextNode.GetListId().isEmpty()) { // #i96062# // If paragraph has no list level attribute set and list style // is the outline style, apply outline level as the list level. - if ( !mrTxtNode.HasAttrListLevel() && - mrTxtNode.GetNumRule()->GetName()==SwNumRule::GetOutlineRuleName() && - mrTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle() ) + if ( !mrTextNode.HasAttrListLevel() && + mrTextNode.GetNumRule()->GetName()==SwNumRule::GetOutlineRuleName() && + mrTextNode.GetTextColl()->IsAssignedToListLevelOfOutlineStyle() ) { - int nNewListLevel = mrTxtNode.GetTxtColl()->GetAssignedOutlineStyleLevel(); + int nNewListLevel = mrTextNode.GetTextColl()->GetAssignedOutlineStyleLevel(); if ( 0 <= nNewListLevel && nNewListLevel < MAXLEVEL ) { - mrTxtNode.SetAttrListLevel( nNewListLevel ); + mrTextNode.SetAttrListLevel( nNewListLevel ); } } - mrTxtNode.AddToList(); + mrTextNode.AddToList(); } // #i70748# // #i105562# - else if ( mrTxtNode.GetpSwAttrSet() && - dynamic_cast<const SfxUInt16Item &>(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, false )).GetValue() > 0 ) + else if ( mrTextNode.GetpSwAttrSet() && + dynamic_cast<const SfxUInt16Item &>(mrTextNode.GetAttr( RES_PARATR_OUTLINELEVEL, false )).GetValue() > 0 ) { - mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); + mrTextNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); } } - if ( mrTxtNode.IsInList() ) + if ( mrTextNode.IsInList() ) { if ( mbUpdateListLevel ) { - SwNodeNum* pNodeNum = const_cast<SwNodeNum*>(mrTxtNode.GetNum()); - pNodeNum->SetLevelInListTree( mrTxtNode.GetAttrListLevel() ); + SwNodeNum* pNodeNum = const_cast<SwNodeNum*>(mrTextNode.GetNum()); + pNodeNum->SetLevelInListTree( mrTextNode.GetAttrListLevel() ); } if ( mbUpdateListRestart ) { - SwNodeNum* pNodeNum = const_cast<SwNodeNum*>(mrTxtNode.GetNum()); + SwNodeNum* pNodeNum = const_cast<SwNodeNum*>(mrTextNode.GetNum()); pNodeNum->InvalidateMe(); pNodeNum->NotifyInvalidSiblings(); } if ( mbUpdateListCount ) { - SwNodeNum* pNodeNum = const_cast<SwNodeNum*>(mrTxtNode.GetNum()); + SwNodeNum* pNodeNum = const_cast<SwNodeNum*>(mrTextNode.GetNum()); pNodeNum->InvalidateAndNotifyTree(); } } } - // End of class <HandleResetAttrAtTxtNode> + // End of class <HandleResetAttrAtTextNode> } -bool SwTxtNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) +bool SwTextNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) { const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr ); mbInSetOrResetAttr = true; - HandleResetAttrAtTxtNode aHandleResetAttr( *this, nWhich1, nWhich2 ); + HandleResetAttrAtTextNode aHandleResetAttr( *this, nWhich1, nWhich2 ); - bool bRet = SwCntntNode::ResetAttr( nWhich1, nWhich2 ); + bool bRet = SwContentNode::ResetAttr( nWhich1, nWhich2 ); mbInSetOrResetAttr = bOldIsSetOrResetAttr; return bRet; } -bool SwTxtNode::ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) +bool SwTextNode::ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) { const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr ); mbInSetOrResetAttr = true; - HandleResetAttrAtTxtNode aHandleResetAttr( *this, rWhichArr ); + HandleResetAttrAtTextNode aHandleResetAttr( *this, rWhichArr ); - bool bRet = SwCntntNode::ResetAttr( rWhichArr ); + bool bRet = SwContentNode::ResetAttr( rWhichArr ); mbInSetOrResetAttr = bOldIsSetOrResetAttr; return bRet; } -sal_uInt16 SwTxtNode::ResetAllAttr() +sal_uInt16 SwTextNode::ResetAllAttr() { const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr ); mbInSetOrResetAttr = true; - HandleResetAttrAtTxtNode aHandleResetAttr( *this ); + HandleResetAttrAtTextNode aHandleResetAttr( *this ); - const sal_uInt16 nRet = SwCntntNode::ResetAllAttr(); + const sal_uInt16 nRet = SwContentNode::ResetAllAttr(); mbInSetOrResetAttr = bOldIsSetOrResetAttr; return nRet; } -void SwTxtNode::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwTextNode::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swTxtNode")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swTextNode")); xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"), BAD_CAST(OString::number(GetIndex()).getStr())); - OUString sText = GetTxt(); + OUString sText = GetText(); for (int i = 0; i < 32; ++i) sText = sText.replace(i, '*'); xmlTextWriterStartElement(pWriter, BAD_CAST("m_Text")); xmlTextWriterWriteString(pWriter, BAD_CAST(sText.toUtf8().getStr())); xmlTextWriterEndElement(pWriter); - if (GetFmtColl()) + if (GetFormatColl()) { - xmlTextWriterStartElement(pWriter, BAD_CAST("swTxtFmtColl")); - xmlTextWriterWriteAttribute(pWriter, BAD_CAST("name"), BAD_CAST(GetFmtColl()->GetName().toUtf8().getStr())); + xmlTextWriterStartElement(pWriter, BAD_CAST("swTextFormatColl")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("name"), BAD_CAST(GetFormatColl()->GetName().toUtf8().getStr())); xmlTextWriterEndElement(pWriter); } @@ -5009,7 +5009,7 @@ void SwTxtNode::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterEndElement(pWriter); } -sal_uInt32 SwTxtNode::GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const +sal_uInt32 SwTextNode::GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const { SfxItemSet aSet( (SfxItemPool&) (GetDoc()->GetAttrPool()), RES_CHRATR_RSID, RES_CHRATR_RSID ); if ( GetAttr(aSet, nStt, nEnd) ) @@ -5022,51 +5022,51 @@ sal_uInt32 SwTxtNode::GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const return 0; } -sal_uInt32 SwTxtNode::GetParRsid() const +sal_uInt32 SwTextNode::GetParRsid() const { return reinterpret_cast<const SvxRsidItem&>(GetAttr( RES_PARATR_RSID )).GetValue(); } -bool SwTxtNode::CompareParRsid( const SwTxtNode &rTxtNode ) const +bool SwTextNode::CompareParRsid( const SwTextNode &rTextNode ) const { sal_uInt32 nThisRsid = GetParRsid(); - sal_uInt32 nRsid = rTxtNode.GetParRsid(); + sal_uInt32 nRsid = rTextNode.GetParRsid(); return nThisRsid == nRsid; } -bool SwTxtNode::CompareRsid( const SwTxtNode &rTxtNode, sal_Int32 nStt1, sal_Int32 nStt2, +bool SwTextNode::CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2, sal_Int32 nEnd1, sal_Int32 nEnd2 ) const { sal_uInt32 nThisRsid = GetRsid( nStt1, nEnd1 ? nEnd1 : nStt1 ); - sal_uInt32 nRsid = rTxtNode.GetRsid( nStt2, nEnd2 ? nEnd2 : nStt2 ); + sal_uInt32 nRsid = rTextNode.GetRsid( nStt2, nEnd2 ? nEnd2 : nStt2 ); return nThisRsid == nRsid; } // sw::Metadatable -::sfx2::IXmlIdRegistry& SwTxtNode::GetRegistry() +::sfx2::IXmlIdRegistry& SwTextNode::GetRegistry() { return GetDoc()->GetXmlIdRegistry(); } -bool SwTxtNode::IsInClipboard() const +bool SwTextNode::IsInClipboard() const { return GetDoc()->IsClipBoard(); } -bool SwTxtNode::IsInUndo() const +bool SwTextNode::IsInUndo() const { return GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(GetNodes()); } -bool SwTxtNode::IsInContent() const +bool SwTextNode::IsInContent() const { return !GetDoc()->IsInHeaderFooter( SwNodeIndex(*this) ); } -void SwTxtNode::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) +void SwTextNode::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) { SwClient::SwClientNotify(rModify, rHint); const SwAttrHint* pHint = dynamic_cast<const SwAttrHint*>(&rHint); @@ -5077,7 +5077,7 @@ void SwTxtNode::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) #include <unoparagraph.hxx> uno::Reference< rdf::XMetadatable > -SwTxtNode::MakeUnoObject() +SwTextNode::MakeUnoObject() { const uno::Reference<rdf::XMetadatable> xMeta( SwXParagraph::CreateXParagraph(*GetDoc(), this), uno::UNO_QUERY); @@ -5085,12 +5085,12 @@ SwTxtNode::MakeUnoObject() } //UUUU -drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwTxtNode::getSdrAllFillAttributesHelper() const +drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwTextNode::getSdrAllFillAttributesHelper() const { // create SdrAllFillAttributesHelper on demand if(!maFillAttributes.get()) { - const_cast< SwTxtNode* >(this)->maFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(GetSwAttrSet())); + const_cast< SwTextNode* >(this)->maFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(GetSwAttrSet())); } return maFillAttributes; diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx index b705bbfc0951..e867b1dcd7ac 100644 --- a/sw/source/core/txtnode/swfntcch.cxx +++ b/sw/source/core/txtnode/swfntcch.cxx @@ -26,15 +26,15 @@ extern const sal_uInt8 StackPos[]; // globale Variablen, werden in SwFntCch.Hxx bekanntgegeben -// Der FontCache wird in TxtInit.Cxx _TXTINIT erzeugt und in _TXTEXIT geloescht +// Der FontCache wird in TextInit.Cxx _TXTINIT erzeugt und in _TXTEXIT geloescht SwFontCache *pSwFontCache = NULL; SwFontObj::SwFontObj( const void *pOwn, SwViewShell *pSh ) : SwCacheObj( pOwn ), - aSwFont( &static_cast<SwTxtFmtColl const *>(pOwn)->GetAttrSet(), pSh ? pSh->getIDocumentSettingAccess() : 0 ) + aSwFont( &static_cast<SwTextFormatColl const *>(pOwn)->GetAttrSet(), pSh ? pSh->getIDocumentSettingAccess() : 0 ) { aSwFont.GoMagic( pSh, aSwFont.GetActual() ); - const SwAttrSet& rAttrSet = static_cast<SwTxtFmtColl const *>(pOwn)->GetAttrSet(); + const SwAttrSet& rAttrSet = static_cast<SwTextFormatColl const *>(pOwn)->GetAttrSet(); for (sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++) pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, true ); } @@ -45,7 +45,7 @@ SwFontObj::~SwFontObj() SwFontAccess::SwFontAccess( const void *pOwn, SwViewShell *pSh ) : SwCacheAccess( *pSwFontCache, pOwn, - static_cast<const SwTxtFmtColl*>(pOwn)->IsInSwFntCache() ), + static_cast<const SwTextFormatColl*>(pOwn)->IsInSwFntCache() ), pShell( pSh ) { } @@ -57,7 +57,7 @@ SwFontObj *SwFontAccess::Get( ) SwCacheObj *SwFontAccess::NewObj( ) { - const_cast<SwTxtFmtColl*>(static_cast<const SwTxtFmtColl*>(pOwner))->SetInSwFntCache( true ); + const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(pOwner))->SetInSwFntCache( true ); return new SwFontObj( pOwner, pShell ); } diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index c79495621574..60d50e794a59 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -1062,7 +1062,7 @@ sal_uInt16 SwSubFont::GetHeight( SwViewShell *pSh, const OutputDevice& rOut ) return nHeight; // + nLeading; } -Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) +Size SwSubFont::_GetTextSize( SwDrawTextInfo& rInf ) { // Robust: Eigentlich sollte der Font bereits eingestellt sein, aber // sicher ist sicher ... @@ -1072,20 +1072,20 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() ); - Size aTxtSize; + Size aTextSize; sal_Int32 nLn = ( rInf.GetLen() == COMPLETE_STRING ? rInf.GetText().getLength() : rInf.GetLen() ); rInf.SetLen( nLn ); if( IsCapital() && nLn ) - aTxtSize = GetCapitalSize( rInf ); + aTextSize = GetCapitalSize( rInf ); else { SV_STAT( nGetTextSize ); long nOldKern = rInf.GetKern(); - const OUString oldTxt = rInf.GetText(); + const OUString oldText = rInf.GetText(); rInf.SetKern( CheckKerning() ); if ( !IsCaseMap() ) - aTxtSize = pLastFont->GetTextSize( rInf ); + aTextSize = pLastFont->GetTextSize( rInf ); else { OUString aTmp = CalcCaseMap( rInf.GetText() ); @@ -1107,7 +1107,7 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) rInf.SetIdx( 0 ); rInf.SetLen( aNewText.getLength() ); - aTxtSize = pLastFont->GetTextSize( rInf ); + aTextSize = pLastFont->GetTextSize( rInf ); rInf.SetIdx( nOldIdx ); rInf.SetLen( nOldLen ); @@ -1115,21 +1115,21 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) else { rInf.SetText( aTmp ); - aTxtSize = pLastFont->GetTextSize( rInf ); + aTextSize = pLastFont->GetTextSize( rInf ); } rInf.SetText(oldStr); } rInf.SetKern( nOldKern ); - rInf.SetText(oldTxt); + rInf.SetText(oldText); // 15142: Ein Wort laenger als eine Zeile, beim Zeilenumbruch // hochgestellt, muss seine effektive Hoehe melden. if( GetEscapement() ) { const sal_uInt16 nAscent = pLastFont->GetFontAscent( rInf.GetShell(), rInf.GetOut() ); - aTxtSize.Height() = - (long)CalcEscHeight( (sal_uInt16)aTxtSize.Height(), nAscent); + aTextSize.Height() = + (long)CalcEscHeight( (sal_uInt16)aTextSize.Height(), nAscent); } } @@ -1141,7 +1141,7 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) rInf.SetText( aNewText ); rInf.SetIdx( 0 ); rInf.SetLen( aNewText.getLength() ); - aTxtSize = pLastFont->GetTextSize( rInf ); + aTextSize = pLastFont->GetTextSize( rInf ); rInf.SetIdx( nOldIdx ); rInf.SetLen( nOldLen ); } @@ -1153,12 +1153,12 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) rInf.SetText( aNewText ); rInf.SetIdx( 0 ); rInf.SetLen( aNewText.getLength() ); - aTxtSize = pLastFont->GetTextSize( rInf ); + aTextSize = pLastFont->GetTextSize( rInf ); rInf.SetIdx( nOldIdx ); rInf.SetLen( nOldLen ); } - return aTxtSize; + return aTextSize; } void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey ) @@ -1239,7 +1239,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey ) if( pUnderFnt && nOldUnder != UNDERLINE_NONE ) { - Size aFontSize = _GetTxtSize( rInf ); + Size aFontSize = _GetTextSize( rInf ); const OUString oldStr = rInf.GetText(); OUString aStr(" "); @@ -1390,7 +1390,7 @@ sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf ) nCrsr = GetCapitalCrsrOfst( rInf ); else { - const OUString oldTxt = rInf.GetText(); + const OUString oldText = rInf.GetText(); long nOldKern = rInf.GetKern(); rInf.SetKern( CheckKerning() ); SV_STAT( nGetTextSize ); @@ -1403,7 +1403,7 @@ sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf ) nCrsr = pLastFont->GetCrsrOfst( rInf ); } rInf.SetKern( nOldKern ); - rInf.SetText(oldTxt); + rInf.SetText(oldText); } return nCrsr; } diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 428256799a0c..452ae53001e9 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -96,26 +96,26 @@ SwpHints::SwpHints() { } -struct TxtAttrDeleter +struct TextAttrDeleter { SwAttrPool & m_rPool; - TxtAttrDeleter( SwDoc & rDoc ) : m_rPool( rDoc.GetAttrPool() ) { } - void operator() (SwTxtAttr * const pAttr) + TextAttrDeleter( SwDoc & rDoc ) : m_rPool( rDoc.GetAttrPool() ) { } + void operator() (SwTextAttr * const pAttr) { if (RES_TXTATR_META == pAttr->Which() || RES_TXTATR_METAFIELD == pAttr->Which()) { - static_txtattr_cast<SwTxtMeta *>(pAttr)->ChgTxtNode(0); // prevents ASSERT + static_txtattr_cast<SwTextMeta *>(pAttr)->ChgTextNode(0); // prevents ASSERT } - SwTxtAttr::Destroy( pAttr, m_rPool ); + SwTextAttr::Destroy( pAttr, m_rPool ); } }; -struct TxtAttrContains +struct TextAttrContains { sal_Int32 m_nPos; - TxtAttrContains( const sal_Int32 nPos ) : m_nPos( nPos ) { } - bool operator() (SwTxtAttrEnd * const pAttr) + TextAttrContains( const sal_Int32 nPos ) : m_nPos( nPos ) { } + bool operator() (SwTextAttrEnd * const pAttr) { return (pAttr->GetStart() < m_nPos) && (m_nPos < *pAttr->End()); } @@ -208,54 +208,54 @@ splitPolicy(const sal_uInt16 nWhichNew, const sal_uInt16 nWhichOther) } } -void SwTxtINetFmt::InitINetFmt(SwTxtNode & rNode) +void SwTextINetFormat::InitINetFormat(SwTextNode & rNode) { - ChgTxtNode(&rNode); - SwCharFmt * const pFmt( - rNode.GetDoc()->getIDocumentStylePoolAccess().GetCharFmtFromPool(RES_POOLCHR_INET_NORMAL) ); - pFmt->Add( this ); + ChgTextNode(&rNode); + SwCharFormat * const pFormat( + rNode.GetDoc()->getIDocumentStylePoolAccess().GetCharFormatFromPool(RES_POOLCHR_INET_NORMAL) ); + pFormat->Add( this ); } -void SwTxtRuby::InitRuby(SwTxtNode & rNode) +void SwTextRuby::InitRuby(SwTextNode & rNode) { - ChgTxtNode(&rNode); - SwCharFmt * const pFmt( - rNode.GetDoc()->getIDocumentStylePoolAccess().GetCharFmtFromPool(RES_POOLCHR_RUBYTEXT) ); - pFmt->Add( this ); + ChgTextNode(&rNode); + SwCharFormat * const pFormat( + rNode.GetDoc()->getIDocumentStylePoolAccess().GetCharFormatFromPool(RES_POOLCHR_RUBYTEXT) ); + pFormat->Add( this ); } /** Create a new nesting text hint. */ -static SwTxtAttrNesting * -MakeTxtAttrNesting(SwTxtNode & rNode, SwTxtAttrNesting & rNesting, +static SwTextAttrNesting * +MakeTextAttrNesting(SwTextNode & rNode, SwTextAttrNesting & rNesting, const sal_Int32 nStart, const sal_Int32 nEnd) { - SwTxtAttr * const pNew( MakeTxtAttr( + SwTextAttr * const pNew( MakeTextAttr( *rNode.GetDoc(), rNesting.GetAttr(), nStart, nEnd ) ); switch (pNew->Which()) { case RES_TXTATR_INETFMT: { - static_txtattr_cast<SwTxtINetFmt*>(pNew)->InitINetFmt(rNode); + static_txtattr_cast<SwTextINetFormat*>(pNew)->InitINetFormat(rNode); break; } case RES_TXTATR_CJK_RUBY: { - static_txtattr_cast<SwTxtRuby*>(pNew)->InitRuby(rNode); + static_txtattr_cast<SwTextRuby*>(pNew)->InitRuby(rNode); break; } default: - assert(!"MakeTxtAttrNesting: what the hell is that?"); + assert(!"MakeTextAttrNesting: what the hell is that?"); break; } - return static_txtattr_cast<SwTxtAttrNesting*>(pNew); + return static_txtattr_cast<SwTextAttrNesting*>(pNew); } -typedef ::std::vector<SwTxtAttrNesting *> NestList_t; +typedef ::std::vector<SwTextAttrNesting *> NestList_t; static void -lcl_DoSplitNew(NestList_t & rSplits, SwTxtNode & rNode, +lcl_DoSplitNew(NestList_t & rSplits, SwTextNode & rNode, const sal_Int32 nNewStart, const sal_Int32 nOtherStart, const sal_Int32 nOtherEnd, bool bOtherDummy) { @@ -264,12 +264,12 @@ lcl_DoSplitNew(NestList_t & rSplits, SwTxtNode & rNode, // first find the portion that is split (not necessarily the last one!) NestList_t::iterator const iter( ::std::find_if( rSplits.begin(), rSplits.end(), - TxtAttrContains(nSplitPos) ) ); + TextAttrContains(nSplitPos) ) ); if (iter != rSplits.end()) // already split here? { const sal_Int32 nStartPos( // skip other's dummy character! (bSplitAtStart && bOtherDummy) ? nSplitPos + 1 : nSplitPos ); - SwTxtAttrNesting * const pNew( MakeTxtAttrNesting( + SwTextAttrNesting * const pNew( MakeTextAttrNesting( rNode, **iter, nStartPos, *(*iter)->GetEnd() ) ); *(*iter)->GetEnd() = nSplitPos; rSplits.insert(iter + 1, pNew); @@ -280,7 +280,7 @@ lcl_DoSplitNew(NestList_t & rSplits, SwTxtNode & rNode, Insert nesting hint into the hints array. Also calls NoteInHistory. @param rNewHint the hint to be inserted (must not overlap existing!) */ -void SwpHints::InsertNesting(SwTxtAttrNesting & rNewHint) +void SwpHints::InsertNesting(SwTextAttrNesting & rNewHint) { SwpHintsArray::Insert(& rNewHint); NoteInHistory( & rNewHint, true ); @@ -354,7 +354,7 @@ splitting of exising hints that is necessary for backward compatibility. @returns true iff hint was successfully inserted */ bool -SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) +SwpHints::TryInsertNesting( SwTextNode & rNode, SwTextAttrNesting & rNewHint ) { // INVARIANT: the nestable hints in the array are properly nested const sal_uInt16 nNewWhich( rNewHint.Which() ); @@ -377,7 +377,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) // pass 1: split the inserted hint into fragments if necessary for ( size_t i = 0; i < GetEndCount(); ++i ) { - SwTxtAttr * const pOther = GetEnd(i); + SwTextAttr * const pOther = GetEnd(i); if (pOther->IsNesting()) { @@ -391,7 +391,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) case FAIL: SAL_INFO("sw.core", "cannot insert hint: overlap"); ::std::for_each(SplitNew.begin(), SplitNew.end(), - TxtAttrDeleter(*rNode.GetDoc())); + TextAttrDeleter(*rNode.GetDoc())); return false; case SPLIT_NEW: lcl_DoSplitNew(SplitNew, rNode, nNewStart, @@ -399,7 +399,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) break; case SPLIT_OTHER: OverlappingExisting.push_back( - static_txtattr_cast<SwTxtAttrNesting*>(pOther)); + static_txtattr_cast<SwTextAttrNesting*>(pOther)); break; default: assert(!"bad code monkey"); @@ -412,7 +412,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) { // ruby and hyperlink: if there is nesting, _overwrite_ OverwrittenExisting.push_back( - static_txtattr_cast<SwTxtAttrNesting*>(pOther)); + static_txtattr_cast<SwTextAttrNesting*>(pOther)); } else if ((nNewStart == nOtherStart) && pOther->HasDummyChar()) { @@ -488,8 +488,8 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) SAL_INFO("sw.core", "hints array full :-("); return false; } - SwTxtAttrNesting * const pOtherLeft( - MakeTxtAttrNesting( rNode, **itOther, + SwTextAttrNesting * const pOtherLeft( + MakeTextAttrNesting( rNode, **itOther, nOtherStart, nSplitNewEnd ) ); InsertNesting( *pOtherLeft ); } @@ -507,8 +507,8 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) SAL_INFO("sw.core", "hints array full :-("); return false; } - SwTxtAttrNesting * const pOtherRight( - MakeTxtAttrNesting( rNode, **itOther, + SwTextAttrNesting * const pOtherRight( + MakeTextAttrNesting( rNode, **itOther, nSplitNewStart, nOtherEnd ) ); InsertNesting( *pOtherRight ); } @@ -558,8 +558,8 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) Delete( *itOther ); // this also does NoteInHistory! if (nNewEnd < nOtherEnd) { - SwTxtAttrNesting * const pOtherRight( - MakeTxtAttrNesting( + SwTextAttrNesting * const pOtherRight( + MakeTextAttrNesting( rNode, **itOther, nNewEnd, nOtherEnd ) ); bool const bSuccess( TryInsertNesting(rNode, *pOtherRight) ); SAL_WARN_IF(!bSuccess, "sw.core", "recursive call 1 failed?"); @@ -588,7 +588,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) // RES_TXTATR_CHARFMT. The new attribute itself will // split any existing RES_TXTATR_AUTOFMT or RES_TXTATR_CHARFMT. -void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, +void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint, const SetAttrMode nMode ) { const sal_uInt16 nWhich = rNewHint.Which(); @@ -597,8 +597,8 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, const sal_Int32 nThisEnd = *rNewHint.GetEnd(); const bool bNoLengthAttribute = nThisStart == nThisEnd; - std::vector<SwTxtAttr*> aInsDelHints; - std::vector<SwTxtAttr*>::iterator aIter; + std::vector<SwTextAttr*> aInsDelHints; + std::vector<SwTextAttr*>::iterator aIter; assert( RES_TXTATR_CHARFMT == rNewHint.Which() || RES_TXTATR_AUTOFMT == rNewHint.Which() ); @@ -610,7 +610,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, { for ( size_t i = 0; i < Count(); ++i ) { - SwTxtAttr* pOther = GetTextHint(i); + SwTextAttr* pOther = GetTextHint(i); if ( RES_TXTATR_CHARFMT != pOther->Which() && RES_TXTATR_AUTOFMT != pOther->Which() ) @@ -623,12 +623,12 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, // Split pOther if necessary: if ( nOtherStart < nThisStart && nThisStart < nOtherEnd ) { - SwTxtAttr* pNewAttr = MakeTxtAttr( *rNode.GetDoc(), + SwTextAttr* pNewAttr = MakeTextAttr( *rNode.GetDoc(), pOther->GetAttr(), nOtherStart, nThisStart ); if ( RES_TXTATR_CHARFMT == pOther->Which() ) { - static_txtattr_cast<SwTxtCharFmt*>(pNewAttr)->SetSortNumber( - static_txtattr_cast<SwTxtCharFmt*>(pOther)->GetSortNumber() ); + static_txtattr_cast<SwTextCharFormat*>(pNewAttr)->SetSortNumber( + static_txtattr_cast<SwTextCharFormat*>(pOther)->GetSortNumber() ); } aInsDelHints.push_back( pNewAttr ); @@ -643,12 +643,12 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, // Split pOther if necessary: if ( nOtherStart < nThisEnd && nThisEnd < nOtherEnd ) { - SwTxtAttr* pNewAttr = MakeTxtAttr( *rNode.GetDoc(), + SwTextAttr* pNewAttr = MakeTextAttr( *rNode.GetDoc(), pOther->GetAttr(), nOtherStart, nThisEnd ); if ( RES_TXTATR_CHARFMT == pOther->Which() ) { - static_txtattr_cast<SwTxtCharFmt*>(pNewAttr)->SetSortNumber( - static_txtattr_cast<SwTxtCharFmt*>(pOther)->GetSortNumber()); + static_txtattr_cast<SwTextCharFormat*>(pNewAttr)->SetSortNumber( + static_txtattr_cast<SwTextCharFormat*>(pOther)->GetSortNumber()); } aInsDelHints.push_back( pNewAttr ); @@ -681,7 +681,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, { for ( size_t i = 0; i < Count(); ++i ) { - const SwTxtAttr* pOther = GetTextHint(i); + const SwTextAttr* pOther = GetTextHint(i); if ( RES_TXTATR_CHARFMT != pOther->Which() && RES_TXTATR_AUTOFMT != pOther->Which() ) @@ -713,7 +713,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, // Get all hints that are in [nPorStart, nPorEnd[: for ( size_t i = 0; i < Count(); ++i ) { - SwTxtAttr *pOther = GetTextHint(i); + SwTextAttr *pOther = GetTextHint(i); if ( RES_TXTATR_CHARFMT != pOther->Which() && RES_TXTATR_AUTOFMT != pOther->Which() ) @@ -731,7 +731,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, } } - SwTxtAttr* pNewAttr = 0; + SwTextAttr* pNewAttr = 0; if ( RES_TXTATR_CHARFMT == nWhich ) { // pNewHint can be inserted after calculating the sort value. @@ -744,16 +744,16 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, if ( RES_TXTATR_CHARFMT == (*aIter)->Which() ) { // #i74589# - const SwFmtCharFmt& rOtherCharFmt = (*aIter)->GetCharFmt(); - const SwFmtCharFmt& rThisCharFmt = rNewHint.GetCharFmt(); - const bool bSameCharFmt = rOtherCharFmt.GetCharFmt() == rThisCharFmt.GetCharFmt(); + const SwFormatCharFormat& rOtherCharFormat = (*aIter)->GetCharFormat(); + const SwFormatCharFormat& rThisCharFormat = rNewHint.GetCharFormat(); + const bool bSameCharFormat = rOtherCharFormat.GetCharFormat() == rThisCharFormat.GetCharFormat(); // #i90311# // Do not remove existing character format hint during XML import if ( !rNode.GetDoc()->IsInXMLImport() && ( !( SetAttrMode::DONTREPLACE & nMode ) || bNoLengthAttribute || - bSameCharFmt ) ) + bSameCharFormat ) ) { // Remove old hint Delete( *aIter ); @@ -767,18 +767,18 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, // remove all attributes from auto styles, which are explicitly set in // the new character format: OSL_ENSURE( RES_TXTATR_AUTOFMT == (*aIter)->Which(), "AUTOSTYLES - Misc trouble" ); - SwTxtAttr* pOther = *aIter; - std::shared_ptr<SfxItemSet> pOldStyle = static_cast<const SwFmtAutoFmt&>(pOther->GetAttr()).GetStyleHandle(); + SwTextAttr* pOther = *aIter; + std::shared_ptr<SfxItemSet> pOldStyle = static_cast<const SwFormatAutoFormat&>(pOther->GetAttr()).GetStyleHandle(); // For each attribute in the automatic style check if it // is also set the new character style: SfxItemSet aNewSet( *pOldStyle->GetPool(), - aCharAutoFmtSetRange); + aCharAutoFormatSetRange); SfxItemIter aItemIter( *pOldStyle ); const SfxPoolItem* pItem = aItemIter.GetCurItem(); while( true ) { - if ( !CharFmt::IsItemIncluded( pItem->Which(), &rNewHint ) ) + if ( !CharFormat::IsItemIncluded( pItem->Which(), &rNewHint ) ) { aNewSet.Put( *pItem ); } @@ -796,7 +796,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, // Create new AutoStyle if ( aNewSet.Count() ) { - pNewAttr = MakeTxtAttr( *rNode.GetDoc(), + pNewAttr = MakeTextAttr( *rNode.GetDoc(), aNewSet, nPorStart, nPorEnd ); SwpHintsArray::Insert( pNewAttr ); NoteInHistory( pNewAttr, true ); @@ -816,30 +816,30 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, } else { - pNewAttr = MakeTxtAttr( *rNode.GetDoc(), rNewHint.GetAttr(), + pNewAttr = MakeTextAttr( *rNode.GetDoc(), rNewHint.GetAttr(), nPorStart, nPorEnd ); - static_txtattr_cast<SwTxtCharFmt*>(pNewAttr)->SetSortNumber(nCharStyleCount); + static_txtattr_cast<SwTextCharFormat*>(pNewAttr)->SetSortNumber(nCharStyleCount); } } else { // Find the current autostyle. Mix attributes if necessary. - SwTxtAttr* pCurrentAutoStyle = 0; - SwTxtAttr* pCurrentCharFmt = 0; + SwTextAttr* pCurrentAutoStyle = 0; + SwTextAttr* pCurrentCharFormat = 0; aIter = aInsDelHints.begin(); while ( aIter != aInsDelHints.end() ) { if ( RES_TXTATR_AUTOFMT == (*aIter)->Which() ) pCurrentAutoStyle = *aIter; else if ( RES_TXTATR_CHARFMT == (*aIter)->Which() ) - pCurrentCharFmt = *aIter; + pCurrentCharFormat = *aIter; ++aIter; } - std::shared_ptr<SfxItemSet> pNewStyle = static_cast<const SwFmtAutoFmt&>(rNewHint.GetAttr()).GetStyleHandle(); + std::shared_ptr<SfxItemSet> pNewStyle = static_cast<const SwFormatAutoFormat&>(rNewHint.GetAttr()).GetStyleHandle(); if ( pCurrentAutoStyle ) { - std::shared_ptr<SfxItemSet> pCurrentStyle = static_cast<const SwFmtAutoFmt&>(pCurrentAutoStyle->GetAttr()).GetStyleHandle(); + std::shared_ptr<SfxItemSet> pCurrentStyle = static_cast<const SwFormatAutoFormat&>(pCurrentAutoStyle->GetAttr()).GetStyleHandle(); // Merge attributes SfxItemSet aNewSet( *pCurrentStyle ); @@ -860,7 +860,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, pTmpItem == pItem ) { // Do not clear item if the attribute is set in a character format: - if ( !pCurrentCharFmt || 0 == CharFmt::GetItem( *pCurrentCharFmt, pItem->Which() ) ) + if ( !pCurrentCharFormat || 0 == CharFormat::GetItem( *pCurrentCharFormat, pItem->Which() ) ) aNewSet.ClearItem( pItem->Which() ); } } @@ -873,7 +873,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, // Create new AutoStyle if ( aNewSet.Count() ) - pNewAttr = MakeTxtAttr( *rNode.GetDoc(), aNewSet, + pNewAttr = MakeTextAttr( *rNode.GetDoc(), aNewSet, nPorStart, nPorEnd ); } else @@ -898,7 +898,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, pTmpItem == pItem ) { // Do not clear item if the attribute is set in a character format: - if ( !pCurrentCharFmt || 0 == CharFmt::GetItem( *pCurrentCharFmt, pItem->Which() ) ) + if ( !pCurrentCharFormat || 0 == CharFormat::GetItem( *pCurrentCharFormat, pItem->Which() ) ) { if ( !pNewSet ) pNewSet = pNewStyle->Clone( true ); @@ -932,7 +932,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, } else if ( pNewStyle.get() ) { - pNewAttr = MakeTxtAttr( *rNode.GetDoc(), *pNewStyle, + pNewAttr = MakeTextAttr( *rNode.GetDoc(), *pNewStyle, nPorStart, nPorEnd ); } } @@ -958,7 +958,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, rNode.DestroyAttr( &rNewHint ); } -SwTxtAttr* MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem & rAttr ) +SwTextAttr* MakeRedlineTextAttr( SwDoc & rDoc, SfxPoolItem & rAttr ) { // this is intended _only_ for special-purpose redline attributes! switch (rAttr.Which()) @@ -984,38 +984,38 @@ SwTxtAttr* MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem & rAttr ) // FIXME: this const_cast is evil! SfxPoolItem& rNew = const_cast<SfxPoolItem&>( rDoc.GetAttrPool().Put( rAttr ) ); - return new SwTxtAttrEnd( rNew, 0, 0 ); + return new SwTextAttrEnd( rNew, 0, 0 ); } // create new text attribute -SwTxtAttr* MakeTxtAttr( +SwTextAttr* MakeTextAttr( SwDoc & rDoc, SfxPoolItem& rAttr, sal_Int32 const nStt, sal_Int32 const nEnd, CopyOrNew_t const bIsCopy, - SwTxtNode *const pTxtNode ) + SwTextNode *const pTextNode ) { if ( isCHRATR(rAttr.Which()) ) { - // Somebody wants to build a SwTxtAttr for a character attribute. + // Somebody wants to build a SwTextAttr for a character attribute. // Sorry, this is not allowed any longer. // You'll get a brand new autostyle attribute: SfxItemSet aItemSet( rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END ); aItemSet.Put( rAttr ); - return MakeTxtAttr( rDoc, aItemSet, nStt, nEnd ); + return MakeTextAttr( rDoc, aItemSet, nStt, nEnd ); } else if ( RES_TXTATR_AUTOFMT == rAttr.Which() && - static_cast<const SwFmtAutoFmt&>(rAttr).GetStyleHandle()-> + static_cast<const SwFormatAutoFormat&>(rAttr).GetStyleHandle()-> GetPool() != &rDoc.GetAttrPool() ) { // If the attribute is an auto-style which refers to a pool that is // different from rDoc's pool, we have to correct this: - const StylePool::SfxItemSet_Pointer_t pAutoStyle = static_cast<const SwFmtAutoFmt&>(rAttr).GetStyleHandle(); + const StylePool::SfxItemSet_Pointer_t pAutoStyle = static_cast<const SwFormatAutoFormat&>(rAttr).GetStyleHandle(); std::unique_ptr<const SfxItemSet> pNewSet( pAutoStyle->SfxItemSet::Clone( true, &rDoc.GetAttrPool() )); - SwTxtAttr* pNew = MakeTxtAttr( rDoc, *pNewSet, nStt, nEnd ); + SwTextAttr* pNew = MakeTextAttr( rDoc, *pNewSet, nStt, nEnd ); return pNew; } @@ -1024,104 +1024,104 @@ SwTxtAttr* MakeTxtAttr( SfxPoolItem& rNew = const_cast<SfxPoolItem&>( rDoc.GetAttrPool().Put( rAttr ) ); - SwTxtAttr* pNew = 0; + SwTextAttr* pNew = 0; switch( rNew.Which() ) { case RES_TXTATR_CHARFMT: { - SwFmtCharFmt &rFmtCharFmt = static_cast<SwFmtCharFmt&>(rNew); - if( !rFmtCharFmt.GetCharFmt() ) + SwFormatCharFormat &rFormatCharFormat = static_cast<SwFormatCharFormat&>(rNew); + if( !rFormatCharFormat.GetCharFormat() ) { - rFmtCharFmt.SetCharFmt( rDoc.GetDfltCharFmt() ); + rFormatCharFormat.SetCharFormat( rDoc.GetDfltCharFormat() ); } - pNew = new SwTxtCharFmt( rFmtCharFmt, nStt, nEnd ); + pNew = new SwTextCharFormat( rFormatCharFormat, nStt, nEnd ); } break; case RES_TXTATR_INETFMT: - pNew = new SwTxtINetFmt( static_cast<SwFmtINetFmt&>(rNew), nStt, nEnd ); + pNew = new SwTextINetFormat( static_cast<SwFormatINetFormat&>(rNew), nStt, nEnd ); break; case RES_TXTATR_FIELD: - pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt, + pNew = new SwTextField( static_cast<SwFormatField &>(rNew), nStt, rDoc.IsClipBoard() ); break; case RES_TXTATR_ANNOTATION: { - pNew = new SwTxtAnnotationFld( static_cast<SwFmtFld &>(rNew), nStt, rDoc.IsClipBoard() ); + pNew = new SwTextAnnotationField( static_cast<SwFormatField &>(rNew), nStt, rDoc.IsClipBoard() ); if (bIsCopy == COPY) { // On copy of the annotation field do not keep the annotated text range by removing // the relation to its annotation mark (relation established via annotation field's name). // If the annotation mark is also copied, the relation and thus the annotated text range will be reestablished, // when the annotation mark is created and inserted into the document. - const_cast<SwPostItField&>(dynamic_cast<const SwPostItField&>(*(pNew->GetFmtFld().GetField()))).SetName(OUString()); + const_cast<SwPostItField&>(dynamic_cast<const SwPostItField&>(*(pNew->GetFormatField().GetField()))).SetName(OUString()); } } break; case RES_TXTATR_INPUTFIELD: - pNew = new SwTxtInputFld( static_cast<SwFmtFld &>(rNew), nStt, nEnd, + pNew = new SwTextInputField( static_cast<SwFormatField &>(rNew), nStt, nEnd, rDoc.IsClipBoard() ); break; case RES_TXTATR_FLYCNT: { // erst hier wird das Frame-Format kopiert (mit Inhalt) !! - pNew = new SwTxtFlyCnt( static_cast<SwFmtFlyCnt&>(rNew), nStt ); + pNew = new SwTextFlyCnt( static_cast<SwFormatFlyCnt&>(rNew), nStt ); // Kopie von einem Text-Attribut - if ( static_cast<const SwFmtFlyCnt &>(rAttr).GetTxtFlyCnt() ) + if ( static_cast<const SwFormatFlyCnt &>(rAttr).GetTextFlyCnt() ) { // then the format must be copied - static_cast<SwTxtFlyCnt *>(pNew)->CopyFlyFmt( &rDoc ); + static_cast<SwTextFlyCnt *>(pNew)->CopyFlyFormat( &rDoc ); } } break; case RES_TXTATR_FTN: - pNew = new SwTxtFtn( static_cast<SwFmtFtn&>(rNew), nStt ); + pNew = new SwTextFootnote( static_cast<SwFormatFootnote&>(rNew), nStt ); // ggfs. SeqNo kopieren - if( static_cast<SwFmtFtn&>(rAttr).GetTxtFtn() ) - static_cast<SwTxtFtn*>(pNew)->SetSeqNo( static_cast<SwFmtFtn&>(rAttr).GetTxtFtn()->GetSeqRefNo() ); + if( static_cast<SwFormatFootnote&>(rAttr).GetTextFootnote() ) + static_cast<SwTextFootnote*>(pNew)->SetSeqNo( static_cast<SwFormatFootnote&>(rAttr).GetTextFootnote()->GetSeqRefNo() ); break; case RES_TXTATR_REFMARK: pNew = nStt == nEnd - ? new SwTxtRefMark( static_cast<SwFmtRefMark&>(rNew), nStt ) - : new SwTxtRefMark( static_cast<SwFmtRefMark&>(rNew), nStt, &nEnd ); + ? new SwTextRefMark( static_cast<SwFormatRefMark&>(rNew), nStt ) + : new SwTextRefMark( static_cast<SwFormatRefMark&>(rNew), nStt, &nEnd ); break; case RES_TXTATR_TOXMARK: - pNew = new SwTxtTOXMark( static_cast<SwTOXMark&>(rNew), nStt, &nEnd ); + pNew = new SwTextTOXMark( static_cast<SwTOXMark&>(rNew), nStt, &nEnd ); break; case RES_TXTATR_CJK_RUBY: - pNew = new SwTxtRuby( static_cast<SwFmtRuby&>(rNew), nStt, nEnd ); + pNew = new SwTextRuby( static_cast<SwFormatRuby&>(rNew), nStt, nEnd ); break; case RES_TXTATR_META: case RES_TXTATR_METAFIELD: - pNew = SwTxtMeta::CreateTxtMeta( rDoc.GetMetaFieldManager(), pTxtNode, - static_cast<SwFmtMeta&>(rNew), nStt, nEnd, bIsCopy == COPY ); + pNew = SwTextMeta::CreateTextMeta( rDoc.GetMetaFieldManager(), pTextNode, + static_cast<SwFormatMeta&>(rNew), nStt, nEnd, bIsCopy == COPY ); break; default: assert(RES_TXTATR_AUTOFMT == rNew.Which()); - pNew = new SwTxtAttrEnd( rNew, nStt, nEnd ); + pNew = new SwTextAttrEnd( rNew, nStt, nEnd ); break; } return pNew; } -SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, const SfxItemSet& rSet, +SwTextAttr* MakeTextAttr( SwDoc & rDoc, const SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd ) { IStyleAccess& rStyleAccess = rDoc.GetIStyleAccess(); const StylePool::SfxItemSet_Pointer_t pAutoStyle = rStyleAccess.getAutomaticStyle( rSet, IStyleAccess::AUTO_STYLE_CHAR ); - SwFmtAutoFmt aNewAutoFmt; - aNewAutoFmt.SetStyleHandle( pAutoStyle ); - SwTxtAttr* pNew = MakeTxtAttr( rDoc, aNewAutoFmt, nStt, nEnd ); + SwFormatAutoFormat aNewAutoFormat; + aNewAutoFormat.SetStyleHandle( pAutoStyle ); + SwTextAttr* pNew = MakeTextAttr( rDoc, aNewAutoFormat, nStt, nEnd ); return pNew; } // loesche das Text-Attribut (muss beim Pool abgemeldet werden!) -void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr ) +void SwTextNode::DestroyAttr( SwTextAttr* pAttr ) { if( pAttr ) { @@ -1132,10 +1132,10 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr ) case RES_TXTATR_FLYCNT: { // siehe auch die Anmerkung "Loeschen von Formaten - // zeichengebundener Frames" in fesh.cxx, SwFEShell::DelFmt() - SwFrmFmt* pFmt = pAttr->GetFlyCnt().GetFrmFmt(); - if( pFmt ) // vom Undo auf 0 gesetzt ?? - pDoc->getIDocumentLayoutAccess().DelLayoutFmt( pFmt ); + // zeichengebundener Frames" in fesh.cxx, SwFEShell::DelFormat() + SwFrameFormat* pFormat = pAttr->GetFlyCnt().GetFrameFormat(); + if( pFormat ) // vom Undo auf 0 gesetzt ?? + pDoc->getIDocumentLayoutAccess().DelLayoutFormat( pFormat ); } break; @@ -1144,8 +1144,8 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr ) break; case RES_TXTATR_FTN: - static_cast<SwTxtFtn*>(pAttr)->SetStartNode( 0 ); - static_cast<SwFmtFtn&>(pAttr->GetAttr()).InvalidateFootnote(); + static_cast<SwTextFootnote*>(pAttr)->SetStartNode( 0 ); + static_cast<SwFormatFootnote&>(pAttr->GetAttr()).InvalidateFootnote(); break; case RES_TXTATR_FIELD: @@ -1153,18 +1153,18 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr ) case RES_TXTATR_INPUTFIELD: if( !pDoc->IsInDtor() ) { - SwTxtFld *const pTxtFld(static_txtattr_cast<SwTxtFld*>(pAttr)); + SwTextField *const pTextField(static_txtattr_cast<SwTextField*>(pAttr)); // Wenn wir ein HiddenParaField sind, dann muessen wir // ggf. fuer eine Neuberechnung des Visible-Flags sorgen. - const SwField* pFld = pAttr->GetFmtFld().GetField(); + const SwField* pField = pAttr->GetFormatField().GetField(); //JP 06-08-95: DDE-Felder bilden eine Ausnahme - OSL_ENSURE( RES_DDEFLD == pFld->GetTyp()->Which() || - this == pTxtFld->GetpTxtNode(), + OSL_ENSURE( RES_DDEFLD == pField->GetTyp()->Which() || + this == pTextField->GetpTextNode(), "Wo steht denn dieses Feld?" ); // bestimmte Felder mussen am Doc das Calculations-Flag updaten - switch( pFld->GetTyp()->Which() ) + switch( pField->GetTyp()->Which() ) { case RES_HIDDENPARAFLD: SetCalcHiddenParaField(); @@ -1176,22 +1176,22 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr ) case RES_HIDDENTXTFLD: case RES_DBNUMSETFLD: case RES_DBNEXTSETFLD: - if( !pDoc->getIDocumentFieldsAccess().IsNewFldLst() && GetNodes().IsDocNodes() ) - pDoc->getIDocumentFieldsAccess().InsDelFldInFldLst(false, *pTxtFld); + if( !pDoc->getIDocumentFieldsAccess().IsNewFieldLst() && GetNodes().IsDocNodes() ) + pDoc->getIDocumentFieldsAccess().InsDelFieldInFieldLst(false, *pTextField); break; case RES_DDEFLD: - if (GetNodes().IsDocNodes() && pTxtFld->GetpTxtNode()) - static_cast<SwDDEFieldType*>(pFld->GetTyp())->DecRefCnt(); + if (GetNodes().IsDocNodes() && pTextField->GetpTextNode()) + static_cast<SwDDEFieldType*>(pField->GetTyp())->DecRefCnt(); break; case RES_POSTITFLD: { - const_cast<SwFmtFld&>(pAttr->GetFmtFld()).Broadcast( - SwFmtFldHint(&pTxtFld->GetFmtFld(), SwFmtFldHintWhich::REMOVED)); + const_cast<SwFormatField&>(pAttr->GetFormatField()).Broadcast( + SwFormatFieldHint(&pTextField->GetFormatField(), SwFormatFieldHintWhich::REMOVED)); break; } } } - static_cast<SwFmtFld&>(pAttr->GetAttr()).InvalidateField(); + static_cast<SwFormatField&>(pAttr->GetAttr()).InvalidateField(); break; case RES_TXTATR_TOXMARK: @@ -1199,23 +1199,23 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr ) break; case RES_TXTATR_REFMARK: - static_cast<SwFmtRefMark&>(pAttr->GetAttr()).InvalidateRefMark(); + static_cast<SwFormatRefMark&>(pAttr->GetAttr()).InvalidateRefMark(); break; case RES_TXTATR_META: case RES_TXTATR_METAFIELD: - static_txtattr_cast<SwTxtMeta*>(pAttr)->ChgTxtNode(0); + static_txtattr_cast<SwTextMeta*>(pAttr)->ChgTextNode(0); break; default: break; } - SwTxtAttr::Destroy( pAttr, pDoc->GetAttrPool() ); + SwTextAttr::Destroy( pAttr, pDoc->GetAttrPool() ); } } -SwTxtAttr* SwTxtNode::InsertItem( +SwTextAttr* SwTextNode::InsertItem( SfxPoolItem& rAttr, const sal_Int32 nStart, const sal_Int32 nEnd, @@ -1223,10 +1223,10 @@ SwTxtAttr* SwTxtNode::InsertItem( { // character attributes will be inserted as automatic styles: OSL_ENSURE( !isCHRATR(rAttr.Which()), "AUTOSTYLES - " - "SwTxtNode::InsertItem should not be called with character attributes"); + "SwTextNode::InsertItem should not be called with character attributes"); - SwTxtAttr *const pNew = - MakeTxtAttr( + SwTextAttr *const pNew = + MakeTextAttr( *GetDoc(), rAttr, nStart, @@ -1250,7 +1250,7 @@ SwTxtAttr* SwTxtNode::InsertItem( } // take ownership of pAttr; if insertion fails, delete pAttr -bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) +bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) { bool bHiddenPara = false; @@ -1274,8 +1274,8 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) { case RES_TXTATR_FLYCNT: { - SwTxtFlyCnt *pFly = static_cast<SwTxtFlyCnt *>(pAttr); - SwFrmFmt* pFmt = pAttr->GetFlyCnt().GetFrmFmt(); + SwTextFlyCnt *pFly = static_cast<SwTextFlyCnt *>(pAttr); + SwFrameFormat* pFormat = pAttr->GetFlyCnt().GetFrameFormat(); if( !(SetAttrMode::NOTXTATRCHR & nInsMode) ) { // Wir muessen zuerst einfuegen, da in SetAnchor() @@ -1284,18 +1284,18 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) // gesetzt ist, dann korrigiere dieses nach dem Einfuegen // des Zeichens. Sonst muesste das immer ausserhalb // erfolgen (Fehleranfaellig !) - const SwFmtAnchor* pAnchor = 0; - pFmt->GetItemState( RES_ANCHOR, false, + const SwFormatAnchor* pAnchor = 0; + pFormat->GetItemState( RES_ANCHOR, false, reinterpret_cast<const SfxPoolItem**>(&pAnchor) ); SwIndex aIdx( this, pAttr->GetStart() ); - const OUString c(GetCharOfTxtAttr(*pAttr)); + const OUString c(GetCharOfTextAttr(*pAttr)); OUString const ins( InsertText(c, aIdx, nInsertFlags) ); if (ins.isEmpty()) { // do not record deletion of Format! ::sw::UndoGuard const ug( - pFmt->GetDoc()->GetIDocumentUndoRedo()); + pFormat->GetDoc()->GetIDocumentUndoRedo()); DestroyAttr(pAttr); return false; // text node full :( } @@ -1303,34 +1303,34 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) if (pAnchor && (FLY_AS_CHAR == pAnchor->GetAnchorId()) && - pAnchor->GetCntntAnchor() && - pAnchor->GetCntntAnchor()->nNode == *this && - pAnchor->GetCntntAnchor()->nContent == aIdx ) + pAnchor->GetContentAnchor() && + pAnchor->GetContentAnchor()->nNode == *this && + pAnchor->GetContentAnchor()->nContent == aIdx ) { --const_cast<SwIndex&>( - pAnchor->GetCntntAnchor()->nContent); + pAnchor->GetContentAnchor()->nContent); } } pFly->SetAnchor( this ); // Format-Pointer kann sich im SetAnchor geaendert haben! // (Kopieren in andere Docs!) - pFmt = pAttr->GetFlyCnt().GetFrmFmt(); - SwDoc *pDoc = pFmt->GetDoc(); + pFormat = pAttr->GetFlyCnt().GetFrameFormat(); + SwDoc *pDoc = pFormat->GetDoc(); // OD 26.06.2003 #108784# - allow drawing objects in header/footer. // But don't allow control objects in header/footer - if( RES_DRAWFRMFMT == pFmt->Which() && - pDoc->IsInHeaderFooter( pFmt->GetAnchor().GetCntntAnchor()->nNode ) ) + if( RES_DRAWFRMFMT == pFormat->Which() && + pDoc->IsInHeaderFooter( pFormat->GetAnchor().GetContentAnchor()->nNode ) ) { SwDrawContact* pDrawContact = - static_cast<SwDrawContact*>(pFmt->FindContactObj()); + static_cast<SwDrawContact*>(pFormat->FindContactObj()); if ( pDrawContact && pDrawContact->GetMaster() && ::CheckControlLayer( pDrawContact->GetMaster() ) ) { // das soll nicht meoglich sein; hier verhindern - // Der Dtor des TxtHints loescht nicht das Zeichen. + // Der Dtor des TextHints loescht nicht das Zeichen. // Wenn ein CH_TXTATR_.. vorliegt, dann muss man // dieses explizit loeschen if( SetAttrMode::NOTXTATRCHR & nInsMode ) @@ -1358,7 +1358,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) case RES_TXTATR_FTN : { // Fussnoten, man kommt an alles irgendwie heran. - // CntntNode erzeugen und in die Inserts-Section stellen + // ContentNode erzeugen und in die Inserts-Section stellen SwDoc *pDoc = GetDoc(); SwNodes &rNodes = pDoc->GetNodes(); @@ -1366,7 +1366,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) if( StartOfSectionIndex() < rNodes.GetEndOfAutotext().GetIndex() ) { // das soll nicht meoglich sein; hier verhindern - // Der Dtor des TxtHints loescht nicht das Zeichen. + // Der Dtor des TextHints loescht nicht das Zeichen. // Wenn ein CH_TXTATR_.. vorliegt, dann muss man // dieses explizit loeschen if( SetAttrMode::NOTXTATRCHR & nInsMode ) @@ -1387,10 +1387,10 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) } // wird eine neue Fussnote eingefuegt ?? - bool bNewFtn = 0 == static_cast<SwTxtFtn*>(pAttr)->GetStartNode(); - if( bNewFtn ) + bool bNewFootnote = 0 == static_cast<SwTextFootnote*>(pAttr)->GetStartNode(); + if( bNewFootnote ) { - static_cast<SwTxtFtn*>(pAttr)->MakeNewTextSection( GetNodes() ); + static_cast<SwTextFootnote*>(pAttr)->MakeNewTextSection( GetNodes() ); SwRegHistory* pHist = GetpSwpHints() ? GetpSwpHints()->GetHistory() : 0; if( pHist ) @@ -1400,11 +1400,11 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) { // loesche alle Frames der Section, auf die der StartNode zeigt sal_uLong nSttIdx = - static_cast<SwTxtFtn*>(pAttr)->GetStartNode()->GetIndex(); + static_cast<SwTextFootnote*>(pAttr)->GetStartNode()->GetIndex(); sal_uLong nEndIdx = rNodes[ nSttIdx++ ]->EndOfSectionIndex(); for( ; nSttIdx < nEndIdx; ++nSttIdx ) { - SwCntntNode* pCNd = rNodes[ nSttIdx ]->GetCntntNode(); + SwContentNode* pCNd = rNodes[ nSttIdx ]->GetContentNode(); if( 0 != pCNd ) pCNd->DelFrms(); } @@ -1416,7 +1416,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) // entstehen koennen und das Attribut im _SortArr_ am // Dokument nicht eingetrage wird. SwIndex aNdIdx( this, pAttr->GetStart() ); - const OUString c(GetCharOfTxtAttr(*pAttr)); + const OUString c(GetCharOfTextAttr(*pAttr)); OUString const ins( InsertText(c, aNdIdx, nInsertFlags) ); if (ins.isEmpty()) { @@ -1426,40 +1426,40 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) nInsMode |= SetAttrMode::NOTXTATRCHR; } - // Wir tragen uns am FtnIdx-Array des Docs ein ... - SwTxtFtn* pTxtFtn = 0; - if( !bNewFtn ) + // Wir tragen uns am FootnoteIdx-Array des Docs ein ... + SwTextFootnote* pTextFootnote = 0; + if( !bNewFootnote ) { - // eine alte Ftn wird umgehaengt (z.B. SplitNode) - for( size_t n = 0; n < pDoc->GetFtnIdxs().size(); ++n ) - if( pAttr == pDoc->GetFtnIdxs()[n] ) + // eine alte Footnote wird umgehaengt (z.B. SplitNode) + for( size_t n = 0; n < pDoc->GetFootnoteIdxs().size(); ++n ) + if( pAttr == pDoc->GetFootnoteIdxs()[n] ) { // neuen Index zuweisen, dafuer aus dem SortArray // loeschen und neu eintragen - pTxtFtn = pDoc->GetFtnIdxs()[n]; - pDoc->GetFtnIdxs().erase( pDoc->GetFtnIdxs().begin() + n ); + pTextFootnote = pDoc->GetFootnoteIdxs()[n]; + pDoc->GetFootnoteIdxs().erase( pDoc->GetFootnoteIdxs().begin() + n ); break; } // wenn ueber Undo der StartNode gesetzt wurde, kann // der Index noch gar nicht in der Verwaltung stehen !! } - if( !pTxtFtn ) - pTxtFtn = static_cast<SwTxtFtn*>(pAttr); + if( !pTextFootnote ) + pTextFootnote = static_cast<SwTextFootnote*>(pAttr); // fuers Update der Nummern und zum Sortieren // muss der Node gesetzt sein. - static_cast<SwTxtFtn*>(pAttr)->ChgTxtNode( this ); + static_cast<SwTextFootnote*>(pAttr)->ChgTextNode( this ); - // FussNote im Redline-Bereich NICHT ins FtnArray einfuegen! + // FussNote im Redline-Bereich NICHT ins FootnoteArray einfuegen! if( StartOfSectionIndex() > rNodes.GetEndOfRedlines().GetIndex() ) { - const bool bSuccess = pDoc->GetFtnIdxs().insert(pTxtFtn).second; - OSL_ENSURE( bSuccess, "FtnIdx not inserted." ); + const bool bSuccess = pDoc->GetFootnoteIdxs().insert(pTextFootnote).second; + OSL_ENSURE( bSuccess, "FootnoteIdx not inserted." ); (void) bSuccess; // unused in non-debug } SwNodeIndex aTmpIndex( *this ); - pDoc->GetFtnIdxs().UpdateFtn( aTmpIndex); - static_cast<SwTxtFtn*>(pAttr)->SetSeqRefNo(); + pDoc->GetFootnoteIdxs().UpdateFootnote( aTmpIndex); + static_cast<SwTextFootnote*>(pAttr)->SetSeqRefNo(); } break; @@ -1467,7 +1467,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) { // fuer HiddenParaFields Benachrichtigungsmechanismus // anwerfen - if( RES_HIDDENPARAFLD == pAttr->GetFmtFld().GetField()->GetTyp()->Which() ) + if( RES_HIDDENPARAFLD == pAttr->GetFormatField().GetField()->GetTyp()->Which() ) { bHiddenPara = true; } @@ -1475,14 +1475,14 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) break; } - // Fuer SwTxtHints ohne Endindex werden CH_TXTATR_.. + // Fuer SwTextHints ohne Endindex werden CH_TXTATR_.. // eingefuegt, aStart muss danach um einen zurueckgesetzt werden. - // Wenn wir im SwTxtNode::Copy stehen, so wurde das Zeichen bereits + // Wenn wir im SwTextNode::Copy stehen, so wurde das Zeichen bereits // mitkopiert. In solchem Fall ist SETATTR_NOTXTATRCHR angegeben worden. if( !(SetAttrMode::NOTXTATRCHR & nInsMode) ) { SwIndex aIdx( this, pAttr->GetStart() ); - OUString const ins( InsertText(OUString(GetCharOfTxtAttr(*pAttr)), + OUString const ins( InsertText(OUString(GetCharOfTextAttr(*pAttr)), aIdx, nInsertFlags) ); if (ins.isEmpty()) { @@ -1510,19 +1510,19 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) { case RES_TXTATR_INPUTFIELD: { - SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pAttr); - if ( pTxtInputFld ) + SwTextInputField* pTextInputField = dynamic_cast<SwTextInputField*>(pAttr); + if ( pTextInputField ) { if( !(SetAttrMode::NOTXTATRCHR & nMode) ) { SwIndex aIdx( this, pAttr->GetStart() ); InsertText( OUString(CH_TXT_ATR_INPUTFIELDSTART), aIdx, nInsertFlags ); - const OUString aContent = pTxtInputFld->GetFieldContent(); + const OUString aContent = pTextInputField->GetFieldContent(); InsertText( aContent, aIdx, nInsertFlags ); InsertText( OUString(CH_TXT_ATR_INPUTFIELDEND), aIdx, nInsertFlags ); sal_Int32* const pEnd(pAttr->GetEnd()); - OSL_ENSURE( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" ); + OSL_ENSURE( pEnd != NULL, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" ); if ( pEnd != NULL ) { *pEnd = *pEnd + 2 + aContent.getLength(); @@ -1538,7 +1538,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) InsertText( OUString(CH_TXT_ATR_INPUTFIELDSTART), aIdx, nInsertFlags ); bInputFieldStartCharInserted = true; sal_Int32* const pEnd(pAttr->GetEnd()); - OSL_ENSURE( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" ); + OSL_ENSURE( pEnd != NULL, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" ); if ( pEnd != NULL ) { *pEnd = *pEnd + 1; @@ -1547,7 +1547,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) } sal_Int32* const pEnd(pAttr->GetEnd()); - OSL_ENSURE( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" ); + OSL_ENSURE( pEnd != NULL, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" ); if ( pEnd != NULL && m_Text[ *(pEnd) - 1 ] != CH_TXT_ATR_INPUTFIELDEND ) { @@ -1571,8 +1571,8 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) // handle overlap with an existing InputField bool bInsertHint = true; { - const SwTxtInputFld* pTxtInputFld = GetOverlappingInputFld( *pAttr ); - if ( pTxtInputFld != NULL ) + const SwTextInputField* pTextInputField = GetOverlappingInputField( *pAttr ); + if ( pTextInputField != NULL ) { if ( pAttr->End() == NULL ) { @@ -1580,13 +1580,13 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) } else { - if ( pAttr->GetStart() > pTxtInputFld->GetStart() ) + if ( pAttr->GetStart() > pTextInputField->GetStart() ) { - pAttr->GetStart() = pTxtInputFld->GetStart(); + pAttr->GetStart() = pTextInputField->GetStart(); } - if ( *(pAttr->End()) < *(pTxtInputFld->End()) ) + if ( *(pAttr->End()) < *(pTextInputField->End()) ) { - *(pAttr->GetEnd()) = *(pTxtInputFld->End()); + *(pAttr->GetEnd()) = *(pTextInputField->End()); } } } @@ -1646,7 +1646,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) return bRet; } -void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr ) +void SwTextNode::DeleteAttribute( SwTextAttr * const pAttr ) { if ( !HasHints() ) { @@ -1664,7 +1664,7 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr ) else if ( pAttr->HasContent() ) { const SwIndex aIdx( this, pAttr->GetStart() ); - OSL_ENSURE( pAttr->End() != NULL, "<SwTxtNode::DeleteAttribute(..)> - missing End() at <SwTxtAttr> instance which has content" ); + OSL_ENSURE( pAttr->End() != NULL, "<SwTextNode::DeleteAttribute(..)> - missing End() at <SwTextAttr> instance which has content" ); EraseText( aIdx, *pAttr->End() - pAttr->GetStart() ); } else @@ -1676,7 +1676,7 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr ) pAttr->Which()); m_pSwpHints->Delete( pAttr ); - SwTxtAttr::Destroy( pAttr, GetDoc()->GetAttrPool() ); + SwTextAttr::Destroy( pAttr, GetDoc()->GetAttrPool() ); NotifyClients( 0, &aHint ); TryDeleteSwpHints(); @@ -1684,7 +1684,7 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr ) } //FIXME: this does NOT respect SORT NUMBER (for CHARFMT)! -void SwTxtNode::DeleteAttributes( +void SwTextNode::DeleteAttributes( const sal_uInt16 nWhich, const sal_Int32 nStart, const sal_Int32 nEnd ) @@ -1694,13 +1694,13 @@ void SwTxtNode::DeleteAttributes( for ( size_t nPos = 0; m_pSwpHints && nPos < m_pSwpHints->Count(); ++nPos ) { - SwTxtAttr * const pTxtHt = m_pSwpHints->GetTextHint( nPos ); - const sal_Int32 nHintStart = pTxtHt->GetStart(); + SwTextAttr * const pTextHt = m_pSwpHints->GetTextHint( nPos ); + const sal_Int32 nHintStart = pTextHt->GetStart(); if (nStart < nHintStart) { break; // sorted by start } - else if ( (nStart == nHintStart) && (nWhich == pTxtHt->Which()) ) + else if ( (nStart == nHintStart) && (nWhich == pTextHt->Which()) ) { if ( nWhich == RES_CHRATR_HIDDEN ) { @@ -1710,36 +1710,36 @@ void SwTxtNode::DeleteAttributes( else if ( nWhich == RES_TXTATR_CHARFMT ) { // Check if character format contains hidden attribute: - const SwCharFmt* pFmt = pTxtHt->GetCharFmt().GetCharFmt(); + const SwCharFormat* pFormat = pTextHt->GetCharFormat().GetCharFormat(); const SfxPoolItem* pItem; - if ( SfxItemState::SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) ) + if ( SfxItemState::SET == pFormat->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) ) SetCalcHiddenCharFlags(); } // #i75430# Recalc hidden flags if necessary else if ( nWhich == RES_TXTATR_AUTOFMT ) { // Check if auto style contains hidden attribute: - const SfxPoolItem* pHiddenItem = CharFmt::GetItem( *pTxtHt, RES_CHRATR_HIDDEN ); + const SfxPoolItem* pHiddenItem = CharFormat::GetItem( *pTextHt, RES_CHRATR_HIDDEN ); if ( pHiddenItem ) SetCalcHiddenCharFlags(); // for auto styles DeleteAttributes is only called from Undo // so it shouldn't need to care about ignore start/end flags } - sal_Int32 const * const pEndIdx = pTxtHt->GetEnd(); + sal_Int32 const * const pEndIdx = pTextHt->GetEnd(); - if ( pTxtHt->HasDummyChar() ) + if ( pTextHt->HasDummyChar() ) { // Unbedingt Copy-konstruieren! const SwIndex aIdx( this, nStart ); - // erase the CH_TXTATR, which will also delete pTxtHt + // erase the CH_TXTATR, which will also delete pTextHt EraseText( aIdx, 1 ); } - else if ( pTxtHt->HasContent() ) + else if ( pTextHt->HasContent() ) { const SwIndex aIdx( this, nStart ); - OSL_ENSURE( pTxtHt->End() != NULL, "<SwTxtNode::DeleteAttributes(..)> - missing End() at <SwTxtAttr> instance which has content" ); - EraseText( aIdx, *pTxtHt->End() - nStart ); + OSL_ENSURE( pTextHt->End() != NULL, "<SwTextNode::DeleteAttributes(..)> - missing End() at <SwTextAttr> instance which has content" ); + EraseText( aIdx, *pTextHt->End() - nStart ); } else if( *pEndIdx == nEnd ) { @@ -1753,7 +1753,7 @@ void SwTxtNode::DeleteAttributes( nWhich); m_pSwpHints->DeleteAtPos( nPos ); // gefunden, loeschen, - SwTxtAttr::Destroy( pTxtHt, GetDoc()->GetAttrPool() ); + SwTextAttr::Destroy( pTextHt, GetDoc()->GetAttrPool() ); NotifyClients( 0, &aHint ); } } @@ -1761,7 +1761,7 @@ void SwTxtNode::DeleteAttributes( TryDeleteSwpHints(); } -void SwTxtNode::DelSoftHyph( const sal_Int32 nStt, const sal_Int32 nEnd ) +void SwTextNode::DelSoftHyph( const sal_Int32 nStt, const sal_Int32 nEnd ) { sal_Int32 nFndPos = nStt; sal_Int32 nEndPos = nEnd; @@ -1778,7 +1778,7 @@ void SwTxtNode::DelSoftHyph( const sal_Int32 nStt, const sal_Int32 nEnd ) } } -bool SwTxtNode::IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich) +bool SwTextNode::IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich) { return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_COLOR || nWhich == RES_CHRATR_BACKGROUND || nWhich == RES_CHRATR_ESCAPEMENT); } @@ -1787,7 +1787,7 @@ bool SwTxtNode::IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich) //Font underline; //Font Italic of Western, CJK and CTL; //Font Bold of Wertern, CJK and CTL; -bool lcl_IsIgnoredCharFmtForBullets(const sal_uInt16 nWhich) +bool lcl_IsIgnoredCharFormatForBullets(const sal_uInt16 nWhich) { return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_POSTURE || nWhich == RES_CHRATR_WEIGHT || nWhich == RES_CHRATR_CJK_POSTURE || nWhich == RES_CHRATR_CJK_WEIGHT @@ -1795,12 +1795,12 @@ bool lcl_IsIgnoredCharFmtForBullets(const sal_uInt16 nWhich) } //Condition for expanding char set to character style of specified number rule level: -//The item inside the set should not conflict to any exist and non-default item inside paragraph properties set (SwCntntNode::SwPAttrSet); +//The item inside the set should not conflict to any exist and non-default item inside paragraph properties set (SwContentNode::SwPAttrSet); //The node should have applied a number rule; //The node should be counted in a list, if not, make it to be; //The item should not conflict to any exist and non-default item inside the character of specified number rule level; //The item should not be ignored depend on the exact number rule type; -bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) +bool SwTextNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) { bool bRet = false; SfxItemIter aIter( aCharSet ); @@ -1823,21 +1823,21 @@ bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) if (nLevel != -1 && pCurrNum) { - const SwNumFmt* pCurrNumFmt = pCurrNum->GetNumFmt(static_cast<sal_uInt16>(nLevel)); - if (pCurrNumFmt) + const SwNumFormat* pCurrNumFormat = pCurrNum->GetNumFormat(static_cast<sal_uInt16>(nLevel)); + if (pCurrNumFormat) { - if (pCurrNumFmt->IsItemize() && lcl_IsIgnoredCharFmtForBullets(nWhich)) + if (pCurrNumFormat->IsItemize() && lcl_IsIgnoredCharFormatForBullets(nWhich)) return bRet; - if (pCurrNumFmt->IsEnumeration() && SwTxtNode::IsIgnoredCharFmtForNumbering(nWhich)) + if (pCurrNumFormat->IsEnumeration() && SwTextNode::IsIgnoredCharFormatForNumbering(nWhich)) return bRet; - SwCharFmt* pCurrCharFmt =pCurrNumFmt->GetCharFmt(); + SwCharFormat* pCurrCharFormat =pCurrNumFormat->GetCharFormat(); - if (pCurrCharFmt && pCurrCharFmt->GetItemState(nWhich,false) != SfxItemState::SET) + if (pCurrCharFormat && pCurrCharFormat->GetItemState(nWhich,false) != SfxItemState::SET) { - pCurrCharFmt->SetFmtAttr(*pItem); - SwNumFmt aNewNumFmt(*pCurrNumFmt); - aNewNumFmt.SetCharFmt(pCurrCharFmt); - pCurrNum->Set(nLevel,aNewNumFmt); + pCurrCharFormat->SetFormatAttr(*pItem); + SwNumFormat aNewNumFormat(*pCurrNumFormat); + aNewNumFormat.SetCharFormat(pCurrCharFormat); + pCurrNum->Set(nLevel,aNewNumFormat); bRet = true; } } @@ -1847,8 +1847,8 @@ bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) } // setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt, -// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr) -bool SwTxtNode::SetAttr( +// dann setze sie nur im AutoAttrSet (SwContentNode:: SetAttr) +bool SwTextNode::SetAttr( const SfxItemSet& rSet, const sal_Int32 nStt, const sal_Int32 nEnd, @@ -1859,7 +1859,7 @@ bool SwTxtNode::SetAttr( // teil die Sets auf (fuer Selektion in Nodes) const SfxItemSet* pSet = &rSet; - SfxItemSet aTxtSet( *rSet.GetPool(), RES_TXTATR_BEGIN, RES_TXTATR_END-1 ); + SfxItemSet aTextSet( *rSet.GetPool(), RES_TXTATR_BEGIN, RES_TXTATR_END-1 ); // gesamter Bereich if ( !nStt && (nEnd == m_Text.getLength()) && @@ -1867,50 +1867,50 @@ bool SwTxtNode::SetAttr( { // sind am Node schon Zeichenvorlagen gesetzt, muss man diese Attribute // (rSet) immer als TextAttribute setzen, damit sie angezeigt werden. - bool bHasCharFmts = false; + bool bHasCharFormats = false; if ( HasHints() ) { for ( size_t n = 0; n < m_pSwpHints->Count(); ++n ) { - if ( (*m_pSwpHints)[ n ]->IsCharFmtAttr() ) + if ( (*m_pSwpHints)[ n ]->IsCharFormatAttr() ) { - bHasCharFmts = true; + bHasCharFormats = true; break; } } } - if( !bHasCharFmts ) + if( !bHasCharFormats ) { - aTxtSet.Put( rSet ); + aTextSet.Put( rSet ); // If there are any character attributes in rSet, // we want to set them at the paragraph: - if( aTxtSet.Count() != rSet.Count() ) + if( aTextSet.Count() != rSet.Count() ) { const bool bRet = SetAttr( rSet ); - if( !aTxtSet.Count() ) + if( !aTextSet.Count() ) return bRet; } // check for auto style: const SfxPoolItem* pItem; - const bool bAutoStyle = SfxItemState::SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, false, &pItem ); + const bool bAutoStyle = SfxItemState::SET == aTextSet.GetItemState( RES_TXTATR_AUTOFMT, false, &pItem ); if ( bAutoStyle ) { - std::shared_ptr<SfxItemSet> pAutoStyleSet = static_cast<const SwFmtAutoFmt*>(pItem)->GetStyleHandle(); + std::shared_ptr<SfxItemSet> pAutoStyleSet = static_cast<const SwFormatAutoFormat*>(pItem)->GetStyleHandle(); const bool bRet = SetAttr( *pAutoStyleSet ); - if( 1 == aTxtSet.Count() ) + if( 1 == aTextSet.Count() ) return bRet; } // Continue with the text attributes: - pSet = &aTxtSet; + pSet = &aTextSet; } } GetOrCreateSwpHints(); - SfxItemSet aCharSet( *rSet.GetPool(), aCharAutoFmtSetRange ); + SfxItemSet aCharSet( *rSet.GetPool(), aCharAutoFormatSetRange ); size_t nCount = 0; SfxItemIter aIter( *pSet ); @@ -1922,16 +1922,16 @@ bool SwTxtNode::SetAttr( { const sal_uInt16 nWhich = pItem->Which(); OSL_ENSURE( isCHRATR(nWhich) || isTXTATR(nWhich), - "SwTxtNode::SetAttr(): unknown attribute" ); + "SwTextNode::SetAttr(): unknown attribute" ); if ( isCHRATR(nWhich) || isTXTATR(nWhich) ) { if ((RES_TXTATR_CHARFMT == nWhich) && - (GetDoc()->GetDfltCharFmt() == - static_cast<const SwFmtCharFmt*>(pItem)->GetCharFmt())) + (GetDoc()->GetDfltCharFormat() == + static_cast<const SwFormatCharFormat*>(pItem)->GetCharFormat())) { SwIndex aIndex( this, nStt ); - RstTxtAttr( aIndex, nEnd - nStt, RES_TXTATR_CHARFMT, 0 ); - DontExpandFmt( aIndex ); + RstTextAttr( aIndex, nEnd - nStt, RES_TXTATR_CHARFMT, 0 ); + DontExpandFormat( aIndex ); } else { @@ -1943,7 +1943,7 @@ bool SwTxtNode::SetAttr( else { - SwTxtAttr *const pNew = MakeTxtAttr( *GetDoc(), + SwTextAttr *const pNew = MakeTextAttr( *GetDoc(), const_cast<SfxPoolItem&>(*pItem), nStt, nEnd ); if ( pNew ) { @@ -1968,7 +1968,7 @@ bool SwTxtNode::SetAttr( if ( aCharSet.Count() ) { - SwTxtAttr* pTmpNew = MakeTxtAttr( *GetDoc(), aCharSet, nStt, nEnd ); + SwTextAttr* pTmpNew = MakeTextAttr( *GetDoc(), aCharSet, nStt, nEnd ); if ( InsertHint( pTmpNew, nMode ) ) { ++nCount; @@ -1984,7 +1984,7 @@ static void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr ) { if ( RES_TXTATR_AUTOFMT == rAttr.Which() ) { - const SfxItemSet* pCFSet = CharFmt::GetItemSet( rAttr ); + const SfxItemSet* pCFSet = CharFormat::GetItemSet( rAttr ); if ( !pCFSet ) return; SfxWhichIter aIter( *pCFSet ); @@ -2002,13 +2002,13 @@ static void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr ) rSet.Put( rAttr ); } -static void lcl_MergeAttr_ExpandChrFmt( SfxItemSet& rSet, const SfxPoolItem& rAttr ) +static void lcl_MergeAttr_ExpandChrFormat( SfxItemSet& rSet, const SfxPoolItem& rAttr ) { if( RES_TXTATR_CHARFMT == rAttr.Which() || RES_TXTATR_INETFMT == rAttr.Which() || RES_TXTATR_AUTOFMT == rAttr.Which() ) { - const SfxItemSet* pCFSet = CharFmt::GetItemSet( rAttr ); + const SfxItemSet* pCFSet = CharFormat::GetItemSet( rAttr ); if ( pCFSet ) { @@ -2047,20 +2047,20 @@ public: SwPoolItemEndPair() : mpItem( 0 ), mnEndPos( 0 ) {}; }; -static void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode, +static void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTextNode& rTextNode, SfxItemSet& rSet ) { - if ( rTxtNode.AreListLevelIndentsApplicable() ) + if ( rTextNode.AreListLevelIndentsApplicable() ) { - const SwNumRule* pRule = rTxtNode.GetNumRule(); - if ( pRule && rTxtNode.GetActualListLevel() >= 0 ) + const SwNumRule* pRule = rTextNode.GetNumRule(); + if ( pRule && rTextNode.GetActualListLevel() >= 0 ) { - const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(rTxtNode.GetActualListLevel())); - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + const SwNumFormat& rFormat = pRule->Get(static_cast<sal_uInt16>(rTextNode.GetActualListLevel())); + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { SvxLRSpaceItem aLR( RES_LR_SPACE ); - aLR.SetTxtLeft( rFmt.GetIndentAt() ); - aLR.SetTxtFirstLineOfst( static_cast<short>(rFmt.GetFirstLineIndent()) ); + aLR.SetTextLeft( rFormat.GetIndentAt() ); + aLR.SetTextFirstLineOfst( static_cast<short>(rFormat.GetFirstLineIndent()) ); rSet.Put( aLR ); } } @@ -2068,8 +2068,8 @@ static void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode, } // erfrage die Attribute vom TextNode ueber den Bereich -bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, - const bool bOnlyTxtAttr, const bool bGetFromChrFmt, +bool SwTextNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, + const bool bOnlyTextAttr, const bool bGetFromChrFormat, const bool bMergeIndentValuesOfNumRule ) const { if( HasHints() ) @@ -2087,17 +2087,17 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, */ void (*fnMergeAttr)( SfxItemSet&, const SfxPoolItem& ) - = bGetFromChrFmt ? &lcl_MergeAttr_ExpandChrFmt + = bGetFromChrFormat ? &lcl_MergeAttr_ExpandChrFormat : &lcl_MergeAttr; - // dann besorge mal die Auto-(Fmt)Attribute - SfxItemSet aFmtSet( *rSet.GetPool(), rSet.GetRanges() ); - if( !bOnlyTxtAttr ) + // dann besorge mal die Auto-(Format)Attribute + SfxItemSet aFormatSet( *rSet.GetPool(), rSet.GetRanges() ); + if( !bOnlyTextAttr ) { - SwCntntNode::GetAttr( aFmtSet ); + SwContentNode::GetAttr( aFormatSet ); if ( bMergeIndentValuesOfNumRule ) { - lcl_MergeListLevelIndentAsLRSpaceItem( *this, aFmtSet ); + lcl_MergeListLevelIndentAsLRSpaceItem( *this, aFormatSet ); } } @@ -2107,7 +2107,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, { for (size_t n = 0; n < nSize; ++n) { - const SwTxtAttr* pHt = (*m_pSwpHints)[n]; + const SwTextAttr* pHt = (*m_pSwpHints)[n]; const sal_Int32 nAttrStart = pHt->GetStart(); if( nAttrStart > nEnd ) // ueber den Bereich hinaus break; @@ -2133,7 +2133,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, for (size_t n = 0; n < nSize; ++n) { - const SwTxtAttr* pHt = (*m_pSwpHints)[n]; + const SwTextAttr* pHt = (*m_pSwpHints)[n]; const sal_Int32 nAttrStart = pHt->GetStart(); if( nAttrStart > nEnd ) // ueber den Bereich hinaus break; @@ -2149,14 +2149,14 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, continue; if( nEnd <= *pAttrEnd ) // hinter oder genau Ende - (*fnMergeAttr)( aFmtSet, pHt->GetAttr() ); + (*fnMergeAttr)( aFormatSet, pHt->GetAttr() ); else -// else if( pHt->GetAttr() != aFmtSet.Get( pHt->Which() ) ) +// else if( pHt->GetAttr() != aFormatSet.Get( pHt->Which() ) ) // uneindeutig bChkInvalid = true; } else if( nAttrStart < nEnd // reicht in den Bereich -)// && pHt->GetAttr() != aFmtSet.Get( pHt->Which() ) ) +)// && pHt->GetAttr() != aFormatSet.Get( pHt->Which() ) ) bChkInvalid = true; if( bChkInvalid ) @@ -2167,7 +2167,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, if ( RES_TXTATR_AUTOFMT == pHt->Which() ) { - const SfxItemSet* pAutoSet = CharFmt::GetItemSet( pHt->GetAttr() ); + const SfxItemSet* pAutoSet = CharFormat::GetItemSet( pHt->GetAttr() ); if ( pAutoSet ) { pItemIter.reset( new SfxItemIter( *pAutoSet ) ); @@ -2183,7 +2183,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, { const sal_uInt16 nHintWhich = pItem->Which(); OSL_ENSURE(!isUNKNOWNATR(nHintWhich), - "SwTxtNode::GetAttr(): unknown attribute?"); + "SwTextNode::GetAttr(): unknown attribute?"); if ( !pAttrArr.get() ) { @@ -2206,7 +2206,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, { if( !pPrev->mpItem ) { - if ( bOnlyTxtAttr || *pItem != aFmtSet.Get( nHintWhich ) ) + if ( bOnlyTextAttr || *pItem != aFormatSet.Get( nHintWhich ) ) { if( nAttrStart > nStt ) { @@ -2254,7 +2254,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, if( nEnd <= rItemPair.mnEndPos ) // hinter oder genau Ende { - if( *rItemPair.mpItem != aFmtSet.Get( nWh ) ) + if( *rItemPair.mpItem != aFormatSet.Get( nWh ) ) (*fnMergeAttr)( rSet, *rItemPair.mpItem ); } else @@ -2264,18 +2264,18 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, } } } - if( aFmtSet.Count() ) + if( aFormatSet.Count() ) { // aus dem Format-Set alle entfernen, die im TextSet auch gesetzt sind - aFmtSet.Differentiate( rSet ); + aFormatSet.Differentiate( rSet ); // jetzt alle zusammen "mergen" - rSet.Put( aFmtSet ); + rSet.Put( aFormatSet ); } } - else if( !bOnlyTxtAttr ) + else if( !bOnlyTextAttr ) { - // dann besorge mal die Auto-(Fmt)Attribute - SwCntntNode::GetAttr( rSet ); + // dann besorge mal die Auto-(Format)Attribute + SwContentNode::GetAttr( rSet ); if ( bMergeIndentValuesOfNumRule ) { lcl_MergeListLevelIndentAsLRSpaceItem( *this, rSet ); @@ -2289,7 +2289,7 @@ namespace { typedef std::pair<sal_Int32, sal_Int32> AttrSpan_t; -typedef std::multimap<AttrSpan_t, const SwTxtAttr*> AttrSpanMap_t; +typedef std::multimap<AttrSpan_t, const SwTextAttr*> AttrSpanMap_t; struct IsAutoStyle { @@ -2320,13 +2320,13 @@ struct RemovePresentAttrs return; } - const SwTxtAttr* const pAutoStyle(i_rAttrSpan.second); + const SwTextAttr* const pAutoStyle(i_rAttrSpan.second); SfxItemIter aIter(m_rAttrSet); const SfxPoolItem* pItem(aIter.GetCurItem()); while (pItem) { const sal_uInt16 nWhich(pItem->Which()); - if (CharFmt::IsItemIncluded(nWhich, pAutoStyle)) + if (CharFormat::IsItemIncluded(nWhich, pAutoStyle)) { m_rAttrSet.ClearItem(nWhich); } @@ -2357,7 +2357,7 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_Int32 nLength, for (size_t i = 0; i < i_rHints.Count(); ++i) { - const SwTxtAttr* const pHint(i_rHints[i]); + const SwTextAttr* const pHint(i_rHints[i]); const sal_uInt16 nWhich(pHint->Which()); if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT) { @@ -2369,7 +2369,7 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_Int32 nLength, { // insert dummy span covering the gap o_rSpanMap.insert(AttrSpanMap_t::value_type( - AttrSpan_t(nLastEnd, aSpan.first), (const SwTxtAttr *)0)); + AttrSpan_t(nLastEnd, aSpan.first), (const SwTextAttr *)0)); } nLastEnd = aSpan.second; @@ -2380,7 +2380,7 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_Int32 nLength, if (nLastEnd != nLength && nLength != 0) { o_rSpanMap.insert( - AttrSpanMap_t::value_type(AttrSpan_t(nLastEnd, nLength), (const SwTxtAttr *)0)); + AttrSpanMap_t::value_type(AttrSpan_t(nLastEnd, nLength), (const SwTextAttr *)0)); } } @@ -2411,11 +2411,11 @@ struct SfxItemSetClearer } -/** Does the hard work of SwTxtNode::FmtToTxtAttr: the real conversion +/** Does the hard work of SwTextNode::FormatToTextAttr: the real conversion of items to automatic styles. */ void -SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet) +SwTextNode::impl_FormatToTextAttr(const SfxItemSet& i_rAttrSet) { typedef AttrSpanMap_t::iterator AttrSpanMap_iterator_t; AttrSpanMap_t aAttrSpanMap; @@ -2454,9 +2454,9 @@ SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet) { // there already is an automatic style on that span: // create new one and remove the original one - SwTxtAttr* const pAutoStyle(const_cast<SwTxtAttr*>(aAutoStyleIt->second)); + SwTextAttr* const pAutoStyle(const_cast<SwTextAttr*>(aAutoStyleIt->second)); const std::shared_ptr<SfxItemSet> pOldStyle( - static_cast<const SwFmtAutoFmt&>( + static_cast<const SwFormatAutoFormat&>( pAutoStyle->GetAttr()).GetStyleHandle()); aCurSet.Put(*pOldStyle); @@ -2465,7 +2465,7 @@ SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet) DestroyAttr(pAutoStyle); } m_pSwpHints->Insert( - MakeTxtAttr(*GetDoc(), aCurSet, + MakeTextAttr(*GetDoc(), aCurSet, aCurRange->first.first, aCurRange->first.second)); } @@ -2481,9 +2481,9 @@ SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet) ClearItemsFromAttrSet(aClearedIds); } -void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) +void SwTextNode::FormatToTextAttr( SwTextNode* pNd ) { - SfxItemSet aThisSet( GetDoc()->GetAttrPool(), aCharFmtSetRange ); + SfxItemSet aThisSet( GetDoc()->GetAttrPool(), aCharFormatSetRange ); if( HasSwAttrSet() && GetpSwAttrSet()->Count() ) aThisSet.Put( *GetpSwAttrSet() ); @@ -2491,7 +2491,7 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) if( pNd == this ) { - impl_FmtToTxtAttr(aThisSet); + impl_FormatToTextAttr(aThisSet); } else { @@ -2506,7 +2506,7 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) // 4 a a clear item in this // 5 a b convert item to attr of this - SfxItemSet aNdSet( pNd->GetDoc()->GetAttrPool(), aCharFmtSetRange ); + SfxItemSet aNdSet( pNd->GetDoc()->GetAttrPool(), aCharFormatSetRange ); if( pNd->HasSwAttrSet() && pNd->GetpSwAttrSet()->Count() ) aNdSet.Put( *pNd->GetpSwAttrSet() ); @@ -2518,7 +2518,7 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) { SfxItemIter aIter( aThisSet ); const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem = 0; - SfxItemSet aConvertSet( GetDoc()->GetAttrPool(), aCharFmtSetRange ); + SfxItemSet aConvertSet( GetDoc()->GetAttrPool(), aCharFormatSetRange ); std::vector<sal_uInt16> aClearWhichIds; while( true ) @@ -2549,7 +2549,7 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) ClearItemsFromAttrSet( aClearWhichIds ); // 2, 5/ convert all other items to attrs - impl_FmtToTxtAttr(aConvertSet); + impl_FormatToTextAttr(aConvertSet); } { @@ -2557,11 +2557,11 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) SfxItemSetClearer(aNdSet)); // 3/ convert items to attrs - pNd->impl_FmtToTxtAttr(aNdSet); + pNd->impl_FormatToTextAttr(aNdSet); if( aNdSet.Count() ) { - SwFmtChg aTmp1( pNd->GetFmtColl() ); + SwFormatChg aTmp1( pNd->GetFormatColl() ); pNd->NotifyClients( &aTmp1, &aTmp1 ); } } @@ -2578,7 +2578,7 @@ void SwpHints::CalcFlags() const size_t nSize = Count(); for( size_t nPos = 0; nPos < nSize; ++nPos ) { - const SwTxtAttr* pAttr = (*this)[ nPos ]; + const SwTextAttr* pAttr = (*this)[ nPos ]; switch( pAttr->Which() ) { case RES_TXTATR_FTN: @@ -2588,8 +2588,8 @@ void SwpHints::CalcFlags() break; case RES_TXTATR_FIELD: { - const SwField* pFld = pAttr->GetFmtFld().GetField(); - if( RES_DDEFLD == pFld->GetTyp()->Which() ) + const SwField* pField = pAttr->GetFormatField().GetField(); + if( RES_DDEFLD == pField->GetTyp()->Which() ) { m_bDDEFields = true; if ( m_bFootnote ) @@ -2607,19 +2607,19 @@ bool SwpHints::CalcHiddenParaField() bool bOldHasHiddenParaField = m_bHasHiddenParaField; bool bNewHasHiddenParaField = false; const size_t nSize = Count(); - const SwTxtAttr *pTxtHt; + const SwTextAttr *pTextHt; for( size_t nPos = 0; nPos < nSize; ++nPos ) { - pTxtHt = (*this)[ nPos ]; - const sal_uInt16 nWhich = pTxtHt->Which(); + pTextHt = (*this)[ nPos ]; + const sal_uInt16 nWhich = pTextHt->Which(); if( RES_TXTATR_FIELD == nWhich ) { - const SwFmtFld& rFld = pTxtHt->GetFmtFld(); - if( RES_HIDDENPARAFLD == rFld.GetField()->GetTyp()->Which() ) + const SwFormatField& rField = pTextHt->GetFormatField(); + if( RES_HIDDENPARAFLD == rField.GetField()->GetTyp()->Which() ) { - if( !static_cast<const SwHiddenParaField*>(rFld.GetField())->IsHidden() ) + if( !static_cast<const SwHiddenParaField*>(rField.GetField())->IsHidden() ) { SetHiddenParaField(false); return bOldHasHiddenParaField != bNewHasHiddenParaField; @@ -2635,12 +2635,12 @@ bool SwpHints::CalcHiddenParaField() return bOldHasHiddenParaField != bNewHasHiddenParaField; } -void SwpHints::NoteInHistory( SwTxtAttr *pAttr, const bool bNew ) +void SwpHints::NoteInHistory( SwTextAttr *pAttr, const bool bNew ) { if ( m_pHistory ) { m_pHistory->AddHint( pAttr, bNew ); } } -bool SwpHints::MergePortions( SwTxtNode& rNode ) +bool SwpHints::MergePortions( SwTextNode& rNode ) { if ( !Count() ) return false; @@ -2649,28 +2649,28 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) SwpHintsArray::Resort(); bool bRet = false; - typedef std::multimap< int, std::pair<SwTxtAttr*, bool> > PortionMap; + typedef std::multimap< int, std::pair<SwTextAttr*, bool> > PortionMap; PortionMap aPortionMap; - std::map<int, bool> RsidOnlyAutoFmtFlagMap; + std::map<int, bool> RsidOnlyAutoFormatFlagMap; sal_Int32 nLastPorStart = COMPLETE_STRING; int nKey = 0; // get portions by start position: for ( size_t i = 0; i < Count(); ++i ) { - SwTxtAttr *pHt = GetTextHint( i ); + SwTextAttr *pHt = GetTextHint( i ); if ( RES_TXTATR_CHARFMT != pHt->Which() && RES_TXTATR_AUTOFMT != pHt->Which() ) //&& //RES_TXTATR_INETFMT != pHt->Which() ) continue; - bool isRsidOnlyAutoFmt(false); + bool isRsidOnlyAutoFormat(false); // check for RSID-only AUTOFMT if (RES_TXTATR_AUTOFMT == pHt->Which()) { std::shared_ptr<SfxItemSet> const pSet( - pHt->GetAutoFmt().GetStyleHandle()); + pHt->GetAutoFormat().GetStyleHandle()); if ((pSet->Count() == 1) && pSet->GetItem(RES_CHRATR_RSID, false)) { // fdo#70201: eliminate no-extent RSID-only AUTOFMT @@ -2678,7 +2678,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) if (pHt->GetStart() == *pHt->GetEnd()) { SwpHintsArray::DeleteAtPos(i); // kill it without History! - SwTxtAttr::Destroy(pHt, rNode.GetDoc()->GetAttrPool()); + SwTextAttr::Destroy(pHt, rNode.GetDoc()->GetAttrPool()); --i; continue; } @@ -2690,7 +2690,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) pHt->SetFormatIgnoreEnd (true); NoteInHistory(pHt, true); } - isRsidOnlyAutoFmt = true; + isRsidOnlyAutoFormat = true; } } @@ -2706,8 +2706,8 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) ++nKey; nLastPorStart = nPorStart; aPortionMap.insert(std::make_pair(nKey, - std::make_pair(pHt, isRsidOnlyAutoFmt))); - RsidOnlyAutoFmtFlagMap[nKey] = isRsidOnlyAutoFmt; + std::make_pair(pHt, isRsidOnlyAutoFormat))); + RsidOnlyAutoFormatFlagMap[nKey] = isRsidOnlyAutoFormat; } // check if portion i can be merged with portion i+1: @@ -2725,17 +2725,17 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) enum { MATCH, DIFFER_ONLY_RSID, DIFFER } eMerge(MATCH); size_t const nAttributesInPor1 = std::distance(aRange1.first, aRange1.second); size_t const nAttributesInPor2 = std::distance(aRange2.first, aRange2.second); - bool const isRsidOnlyAutoFmt1(RsidOnlyAutoFmtFlagMap[i]); - bool const isRsidOnlyAutoFmt2(RsidOnlyAutoFmtFlagMap[j]); + bool const isRsidOnlyAutoFormat1(RsidOnlyAutoFormatFlagMap[i]); + bool const isRsidOnlyAutoFormat2(RsidOnlyAutoFormatFlagMap[j]); // if both have one they could be equal, but not if only one has it - bool const bSkipRsidOnlyAutoFmt(nAttributesInPor1 != nAttributesInPor2); + bool const bSkipRsidOnlyAutoFormat(nAttributesInPor1 != nAttributesInPor2); // this loop needs to handle the case where one has a CHARFMT and the // other CHARFMT + RSID-only AUTOFMT, so... // want to skip over RSID-only AUTOFMT here, hence the -1 - if ((nAttributesInPor1 - ((isRsidOnlyAutoFmt1) ? 1 : 0)) == - (nAttributesInPor2 - ((isRsidOnlyAutoFmt2) ? 1 : 0)) + if ((nAttributesInPor1 - ((isRsidOnlyAutoFormat1) ? 1 : 0)) == + (nAttributesInPor2 - ((isRsidOnlyAutoFormat2) ? 1 : 0)) && (nAttributesInPor1 != 0 || nAttributesInPor2 != 0)) { // _if_ there is one element more either in aRange1 or aRange2 @@ -2750,8 +2750,8 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) eMerge = DIFFER; break; } - // skip it - cannot be equal if bSkipRsidOnlyAutoFmt is set - if (bSkipRsidOnlyAutoFmt + // skip it - cannot be equal if bSkipRsidOnlyAutoFormat is set + if (bSkipRsidOnlyAutoFormat && aIter1 != aRange1.second && aIter1->second.second) { assert(DIFFER != eMerge); @@ -2759,7 +2759,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) ++aIter1; continue; } - if (bSkipRsidOnlyAutoFmt + if (bSkipRsidOnlyAutoFormat && aIter2 != aRange2.second && aIter2->second.second) { assert(DIFFER != eMerge); @@ -2768,8 +2768,8 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) continue; } assert(aIter1 != aRange1.second && aIter2 != aRange2.second); - SwTxtAttr const*const p1 = aIter1->second.first; - SwTxtAttr const*const p2 = aIter2->second.first; + SwTextAttr const*const p1 = aIter1->second.first; + SwTextAttr const*const p2 = aIter2->second.first; if (p1->Which() != p2->Which()) { eMerge = DIFFER; @@ -2781,8 +2781,8 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) // in the RSID, which should have no effect on text layout if (RES_TXTATR_AUTOFMT == p1->Which()) { - SfxItemSet set1(*p1->GetAutoFmt().GetStyleHandle()); - SfxItemSet set2(*p2->GetAutoFmt().GetStyleHandle()); + SfxItemSet set1(*p1->GetAutoFormat().GetStyleHandle()); + SfxItemSet set2(*p2->GetAutoFormat().GetStyleHandle()); set1.ClearItem(RES_CHRATR_RSID); set2.ClearItem(RES_CHRATR_RSID); @@ -2843,7 +2843,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) sal_Int32 nNewPortionEnd = 0; for ( aIter2 = aRange2.first; aIter2 != aRange2.second; ++aIter2 ) { - SwTxtAttr *const p2 = aIter2->second.first; + SwTextAttr *const p2 = aIter2->second.first; nNewPortionEnd = *p2->GetEnd(); const size_t nCountBeforeDelete = Count(); @@ -2860,7 +2860,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) aRange1 = aPortionMap.equal_range( i ); for ( aIter1 = aRange1.first; aIter1 != aRange1.second; ++aIter1 ) { - SwTxtAttr *const p1 = aIter1->second.first; + SwTextAttr *const p1 = aIter1->second.first; NoteInHistory( p1 ); *p1->GetEnd() = nNewPortionEnd; NoteInHistory( p1, true ); @@ -2881,7 +2881,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) { if (!aIter1->second.second) // already set above, don't change { - SwTxtAttr *const pCurrent(aIter1->second.first); + SwTextAttr *const pCurrent(aIter1->second.first); if (pCurrent->IsFormatIgnoreEnd() != bSetIgnoreFlag) { NoteInHistory(pCurrent); @@ -2894,7 +2894,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) { if (!aIter2->second.second) // already set above, don't change { - SwTxtAttr *const pCurrent(aIter2->second.first); + SwTextAttr *const pCurrent(aIter2->second.first); if (pCurrent->IsFormatIgnoreStart() != bSetIgnoreFlag) { NoteInHistory(pCurrent); @@ -2912,15 +2912,15 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) } // check if there is already a character format and adjust the sort numbers -static void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharFmt ) +static void lcl_CheckSortNumber( const SwpHints& rHints, SwTextCharFormat& rNewCharFormat ) { - const sal_Int32 nHtStart = rNewCharFmt.GetStart(); - const sal_Int32 nHtEnd = *rNewCharFmt.GetEnd(); + const sal_Int32 nHtStart = rNewCharFormat.GetStart(); + const sal_Int32 nHtEnd = *rNewCharFormat.GetEnd(); sal_uInt16 nSortNumber = 0; for ( size_t i = 0; i < rHints.Count(); ++i ) { - const SwTxtAttr* pOtherHt = rHints[i]; + const SwTextAttr* pOtherHt = rHints[i]; const sal_Int32 nOtherStart = pOtherHt->GetStart(); @@ -2933,13 +2933,13 @@ static void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharF if ( nOtherStart == nHtStart && nOtherEnd == nHtEnd ) { - nSortNumber = static_txtattr_cast<const SwTxtCharFmt*>(pOtherHt)->GetSortNumber() + 1; + nSortNumber = static_txtattr_cast<const SwTextCharFormat*>(pOtherHt)->GetSortNumber() + 1; } } } if ( nSortNumber > 0 ) - rNewCharFmt.SetSortNumber( nSortNumber ); + rNewCharFormat.SetSortNumber( nSortNumber ); } /* @@ -2950,8 +2950,8 @@ static void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharF * The return value indicates successful insertion. */ bool SwpHints::TryInsertHint( - SwTxtAttr* const pHint, - SwTxtNode &rNode, + SwTextAttr* const pHint, + SwTextNode &rNode, const SetAttrMode nMode ) { if ( MAX_HINTS <= Count() ) // we're sorry, this flight is overbooked... @@ -2975,18 +2975,18 @@ bool SwpHints::TryInsertHint( case RES_TXTATR_CHARFMT: { // Check if character format contains hidden attribute: - const SwCharFmt* pFmt = pHint->GetCharFmt().GetCharFmt(); + const SwCharFormat* pFormat = pHint->GetCharFormat().GetCharFormat(); const SfxPoolItem* pItem; - if ( SfxItemState::SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) ) + if ( SfxItemState::SET == pFormat->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) ) rNode.SetCalcHiddenCharFlags(); - static_txtattr_cast<SwTxtCharFmt*>(pHint)->ChgTxtNode( &rNode ); + static_txtattr_cast<SwTextCharFormat*>(pHint)->ChgTextNode( &rNode ); break; } // #i75430# Recalc hidden flags if necessary case RES_TXTATR_AUTOFMT: { - std::shared_ptr<SfxItemSet> const pSet( pHint->GetAutoFmt().GetStyleHandle() ); + std::shared_ptr<SfxItemSet> const pSet( pHint->GetAutoFormat().GetStyleHandle() ); if (pHint->GetStart() == *pHint->GetEnd()) { if (pSet->Count() == 1 && pSet->GetItem(RES_CHRATR_RSID, false)) @@ -2996,11 +2996,11 @@ bool SwpHints::TryInsertHint( } } // Check if auto style contains hidden attribute: - const SfxPoolItem* pHiddenItem = CharFmt::GetItem( *pHint, RES_CHRATR_HIDDEN ); + const SfxPoolItem* pHiddenItem = CharFormat::GetItem( *pHint, RES_CHRATR_HIDDEN ); if ( pHiddenItem ) rNode.SetCalcHiddenCharFlags(); - // fdo#71556: populate aWhichFmtAttr member of SwMsgPoolItem + // fdo#71556: populate aWhichFormatAttr member of SwMsgPoolItem const sal_uInt16 *pRanges = pSet->GetRanges(); while( (*pRanges) != 0 ) { @@ -3015,24 +3015,24 @@ bool SwpHints::TryInsertHint( break; } case RES_TXTATR_INETFMT: - static_txtattr_cast<SwTxtINetFmt*>(pHint)->InitINetFmt(rNode); + static_txtattr_cast<SwTextINetFormat*>(pHint)->InitINetFormat(rNode); break; case RES_TXTATR_FIELD: case RES_TXTATR_ANNOTATION: case RES_TXTATR_INPUTFIELD: { - SwTxtFld *const pTxtFld(static_txtattr_cast<SwTxtFld*>(pHint)); - bool bDelFirst = 0 != pTxtFld->GetpTxtNode(); - pTxtFld->ChgTxtNode( &rNode ); + SwTextField *const pTextField(static_txtattr_cast<SwTextField*>(pHint)); + bool bDelFirst = 0 != pTextField->GetpTextNode(); + pTextField->ChgTextNode( &rNode ); SwDoc* pDoc = rNode.GetDoc(); - const SwField* pFld = pTxtFld->GetFmtFld().GetField(); + const SwField* pField = pTextField->GetFormatField().GetField(); - if( !pDoc->getIDocumentFieldsAccess().IsNewFldLst() ) + if( !pDoc->getIDocumentFieldsAccess().IsNewFieldLst() ) { // was fuer ein Feld ist es denn ?? // bestimmte Felder mussen am Doc das Calculations-Flag updaten - switch( pFld->GetTyp()->Which() ) + switch( pField->GetTyp()->Which() ) { case RES_DBFLD: case RES_SETEXPFLD: @@ -3042,14 +3042,14 @@ bool SwpHints::TryInsertHint( case RES_DBNEXTSETFLD: { if( bDelFirst ) - pDoc->getIDocumentFieldsAccess().InsDelFldInFldLst(false, *pTxtFld); + pDoc->getIDocumentFieldsAccess().InsDelFieldInFieldLst(false, *pTextField); if( rNode.GetNodes().IsDocNodes() ) - pDoc->getIDocumentFieldsAccess().InsDelFldInFldLst(true, *pTxtFld); + pDoc->getIDocumentFieldsAccess().InsDelFieldInFieldLst(true, *pTextField); } break; case RES_DDEFLD: if( rNode.GetNodes().IsDocNodes() ) - static_cast<SwDDEFieldType*>(pFld->GetTyp())->IncRefCnt(); + static_cast<SwDDEFieldType*>(pField->GetTyp())->IncRefCnt(); break; } } @@ -3057,58 +3057,58 @@ bool SwpHints::TryInsertHint( // gehts ins normale Nodes-Array? if( rNode.GetNodes().IsDocNodes() ) { - bool bInsFldType = false; - switch( pFld->GetTyp()->Which() ) + bool bInsFieldType = false; + switch( pField->GetTyp()->Which() ) { case RES_SETEXPFLD: - bInsFldType = static_cast<SwSetExpFieldType*>(pFld->GetTyp())->IsDeleted(); - if( nsSwGetSetExpType::GSE_SEQ & static_cast<SwSetExpFieldType*>(pFld->GetTyp())->GetType() ) + bInsFieldType = static_cast<SwSetExpFieldType*>(pField->GetTyp())->IsDeleted(); + if( nsSwGetSetExpType::GSE_SEQ & static_cast<SwSetExpFieldType*>(pField->GetTyp())->GetType() ) { // bevor die ReferenzNummer gesetzt wird, sollte // das Feld am richtigen FeldTypen haengen! - SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>( - pDoc->getIDocumentFieldsAccess().InsertFldType( *pFld->GetTyp() ) ); - if( pFldType != pFld->GetTyp() ) + SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>( + pDoc->getIDocumentFieldsAccess().InsertFieldType( *pField->GetTyp() ) ); + if( pFieldType != pField->GetTyp() ) { - SwFmtFld* pFmtFld = const_cast<SwFmtFld*>(&pTxtFld->GetFmtFld()); - pFmtFld->RegisterToFieldType( *pFldType ); - pFmtFld->GetField()->ChgTyp( pFldType ); + SwFormatField* pFormatField = const_cast<SwFormatField*>(&pTextField->GetFormatField()); + pFormatField->RegisterToFieldType( *pFieldType ); + pFormatField->GetField()->ChgTyp( pFieldType ); } - pFldType->SetSeqRefNo( *const_cast<SwSetExpField*>(static_cast<const SwSetExpField*>(pFld)) ); + pFieldType->SetSeqRefNo( *const_cast<SwSetExpField*>(static_cast<const SwSetExpField*>(pField)) ); } break; case RES_USERFLD: - bInsFldType = static_cast<SwUserFieldType*>(pFld->GetTyp())->IsDeleted(); + bInsFieldType = static_cast<SwUserFieldType*>(pField->GetTyp())->IsDeleted(); break; case RES_DDEFLD: - if( pDoc->getIDocumentFieldsAccess().IsNewFldLst() ) - static_cast<SwDDEFieldType*>(pFld->GetTyp())->IncRefCnt(); - bInsFldType = static_cast<SwDDEFieldType*>(pFld->GetTyp())->IsDeleted(); + if( pDoc->getIDocumentFieldsAccess().IsNewFieldLst() ) + static_cast<SwDDEFieldType*>(pField->GetTyp())->IncRefCnt(); + bInsFieldType = static_cast<SwDDEFieldType*>(pField->GetTyp())->IsDeleted(); break; case RES_POSTITFLD: if ( pDoc->GetDocShell() ) { - pDoc->GetDocShell()->Broadcast( SwFmtFldHint( - &pTxtFld->GetFmtFld(), SwFmtFldHintWhich::INSERTED)); + pDoc->GetDocShell()->Broadcast( SwFormatFieldHint( + &pTextField->GetFormatField(), SwFormatFieldHintWhich::INSERTED)); } break; } - if( bInsFldType ) - pDoc->getIDocumentFieldsAccess().InsDeletedFldType( *pFld->GetTyp() ); + if( bInsFieldType ) + pDoc->getIDocumentFieldsAccess().InsDeletedFieldType( *pField->GetTyp() ); } } break; case RES_TXTATR_FTN : - static_cast<SwTxtFtn*>(pHint)->ChgTxtNode( &rNode ); + static_cast<SwTextFootnote*>(pHint)->ChgTextNode( &rNode ); break; case RES_TXTATR_REFMARK: - static_txtattr_cast<SwTxtRefMark*>(pHint)->ChgTxtNode( &rNode ); + static_txtattr_cast<SwTextRefMark*>(pHint)->ChgTextNode( &rNode ); if( rNode.GetNodes().IsDocNodes() ) { // search for a reference with the same name - SwTxtAttr* pTmpHt; + SwTextAttr* pTmpHt; sal_Int32 *pTmpHtEnd; sal_Int32 *pTmpHintEnd; for( size_t n = 0, nEnd = Count(); n < nEnd; ++n ) @@ -3152,16 +3152,16 @@ bool SwpHints::TryInsertHint( } break; case RES_TXTATR_TOXMARK: - static_txtattr_cast<SwTxtTOXMark*>(pHint)->ChgTxtNode( &rNode ); + static_txtattr_cast<SwTextTOXMark*>(pHint)->ChgTextNode( &rNode ); break; case RES_TXTATR_CJK_RUBY: - static_txtattr_cast<SwTxtRuby*>(pHint)->InitRuby(rNode); + static_txtattr_cast<SwTextRuby*>(pHint)->InitRuby(rNode); break; case RES_TXTATR_META: case RES_TXTATR_METAFIELD: - static_txtattr_cast<SwTxtMeta *>(pHint)->ChgTxtNode( &rNode ); + static_txtattr_cast<SwTextMeta *>(pHint)->ChgTextNode( &rNode ); break; case RES_CHRATR_HIDDEN: @@ -3172,10 +3172,10 @@ bool SwpHints::TryInsertHint( if( SetAttrMode::DONTEXPAND & nMode ) pHint->SetDontExpand( true ); - // SwTxtAttrs ohne Ende werden sonderbehandelt: + // SwTextAttrs ohne Ende werden sonderbehandelt: // Sie werden natuerlich in das Array insertet, aber sie werden nicht // in die pPrev/Next/On/Off-Verkettung aufgenommen. - // Der Formatierer erkennt diese TxtHints an dem CH_TXTATR_.. im Text ! + // Der Formatierer erkennt diese TextHints an dem CH_TXTATR_.. im Text ! sal_Int32 nHtStart = pHint->GetStart(); if( !pHtEnd ) { @@ -3220,7 +3220,7 @@ bool SwpHints::TryInsertHint( if (pHint->IsNesting()) { const bool bRet( - TryInsertNesting(rNode, *static_txtattr_cast<SwTxtAttrNesting*>(pHint))); + TryInsertNesting(rNode, *static_txtattr_cast<SwTextAttrNesting*>(pHint))); if (!bRet) return false; } // Currently REFMARK and TOXMARK have OverlapAllowed set to true. @@ -3235,7 +3235,7 @@ bool SwpHints::TryInsertHint( RES_TXTATR_CHARFMT == nWhich ) ) { OSL_ENSURE( nWhich != RES_TXTATR_AUTOFMT || - static_cast<const SwFmtAutoFmt&>(pHint->GetAttr()).GetStyleHandle()->GetPool() == + static_cast<const SwFormatAutoFormat&>(pHint->GetAttr()).GetStyleHandle()->GetPool() == &rNode.GetDoc()->GetAttrPool(), "AUTOSTYLES - Pool mismatch" ); @@ -3262,7 +3262,7 @@ bool SwpHints::TryInsertHint( { // #i82989# Check sort numbers in NoHintAdjustMode if ( RES_TXTATR_CHARFMT == nWhich ) - lcl_CheckSortNumber(*this, *static_txtattr_cast<SwTxtCharFmt*>(pHint)); + lcl_CheckSortNumber(*this, *static_txtattr_cast<SwTextCharFormat*>(pHint)); SwpHintsArray::Insert( pHint ); NoteInHistory( pHint, true ); @@ -3290,33 +3290,33 @@ bool SwpHints::TryInsertHint( void SwpHints::DeleteAtPos( const size_t nPos ) { - SwTxtAttr *pHint = GetTextHint(nPos); + SwTextAttr *pHint = GetTextHint(nPos); // ChainDelete( pHint ); NoteInHistory( pHint ); SwpHintsArray::DeleteAtPos( nPos ); if( pHint->Which() == RES_TXTATR_FIELD ) { - SwTxtFld *const pTxtFld(static_txtattr_cast<SwTxtFld*>(pHint)); - const SwFieldType* pFldTyp = pTxtFld->GetFmtFld().GetField()->GetTyp(); - if( RES_DDEFLD == pFldTyp->Which() ) + SwTextField *const pTextField(static_txtattr_cast<SwTextField*>(pHint)); + const SwFieldType* pFieldTyp = pTextField->GetFormatField().GetField()->GetTyp(); + if( RES_DDEFLD == pFieldTyp->Which() ) { - const SwTxtNode* pNd = pTxtFld->GetpTxtNode(); + const SwTextNode* pNd = pTextField->GetpTextNode(); if( pNd && pNd->GetNodes().IsDocNodes() ) - const_cast<SwDDEFieldType*>(static_cast<const SwDDEFieldType*>(pFldTyp))->DecRefCnt(); - pTxtFld->ChgTxtNode(0); + const_cast<SwDDEFieldType*>(static_cast<const SwDDEFieldType*>(pFieldTyp))->DecRefCnt(); + pTextField->ChgTextNode(0); } else if ( m_bHasHiddenParaField && - RES_HIDDENPARAFLD == pFldTyp->Which() ) + RES_HIDDENPARAFLD == pFieldTyp->Which() ) { m_bCalcHiddenParaField = true; } } else if ( pHint->Which() == RES_TXTATR_ANNOTATION ) { - SwTxtFld *const pTxtFld(static_txtattr_cast<SwTxtFld*>(pHint)); - const_cast<SwFmtFld&>(pTxtFld->GetFmtFld()).Broadcast( - SwFmtFldHint(&pTxtFld->GetFmtFld(), SwFmtFldHintWhich::REMOVED)); + SwTextField *const pTextField(static_txtattr_cast<SwTextField*>(pHint)); + const_cast<SwFormatField&>(pTextField->GetFormatField()).Broadcast( + SwFormatFieldHint(&pTextField->GetFormatField(), SwFormatFieldHintWhich::REMOVED)); } CalcFlags(); @@ -3326,23 +3326,23 @@ void SwpHints::DeleteAtPos( const size_t nPos ) // Ist der Hint schon bekannt, dann suche die Position und loesche ihn. // Ist er nicht im Array, so gibt es ein OSL_ENSURE(!! -void SwpHints::Delete( SwTxtAttr* pTxtHt ) +void SwpHints::Delete( SwTextAttr* pTextHt ) { - // Attr 2.0: SwpHintsArr::Delete( pTxtHt ); - const size_t nPos = GetStartOf( pTxtHt ); + // Attr 2.0: SwpHintsArr::Delete( pTextHt ); + const size_t nPos = GetStartOf( pTextHt ); OSL_ENSURE( SAL_MAX_SIZE != nPos, "Attribut nicht im Attribut-Array!" ); if( SAL_MAX_SIZE != nPos ) DeleteAtPos( nPos ); } -void SwTxtNode::ClearSwpHintsArr( bool bDelFields ) +void SwTextNode::ClearSwpHintsArr( bool bDelFields ) { if ( HasHints() ) { size_t nPos = 0; while ( nPos < m_pSwpHints->Count() ) { - SwTxtAttr* pDel = m_pSwpHints->GetTextHint( nPos ); + SwTextAttr* pDel = m_pSwpHints->GetTextHint( nPos ); bool bDel = false; switch( pDel->Which() ) @@ -3372,7 +3372,7 @@ void SwTxtNode::ClearSwpHintsArr( bool bDelFields ) } } -sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, +sal_uInt16 SwTextNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, sal_uInt16 nScript ) const { sal_uInt16 nRet = LANGUAGE_DONTKNOW; @@ -3392,7 +3392,7 @@ sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, for ( size_t i = 0; i < nSize; ++i ) { // ist der Attribut-Anfang schon groesser als der Idx ? - const SwTxtAttr *pHt = m_pSwpHints->operator[](i); + const SwTextAttr *pHt = m_pSwpHints->operator[](i); const sal_Int32 nAttrStart = pHt->GetStart(); if( nEnd < nAttrStart ) break; @@ -3400,7 +3400,7 @@ sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, const sal_uInt16 nWhich = pHt->Which(); if( nWhichId == nWhich || - ( ( pHt->IsCharFmtAttr() || RES_TXTATR_AUTOFMT == nWhich ) && CharFmt::IsItemIncluded( nWhichId, pHt ) ) ) + ( ( pHt->IsCharFormatAttr() || RES_TXTATR_AUTOFMT == nWhich ) && CharFormat::IsItemIncluded( nWhichId, pHt ) ) ) { const sal_Int32 *pEndIdx = pHt->End(); // Ueberlappt das Attribut den Bereich? @@ -3419,7 +3419,7 @@ sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, if( pHt->DontExpand() ? nBegin >= *pEndIdx : nBegin > *pEndIdx) continue; } - const SfxPoolItem* pItem = CharFmt::GetItem( *pHt, nWhichId ); + const SfxPoolItem* pItem = CharFormat::GetItem( *pHt, nWhichId ); const sal_uInt16 nLng = static_cast<const SvxLanguageItem*>(pItem)->GetLanguage(); // Umfasst das Attribut den Bereich komplett? @@ -3439,7 +3439,7 @@ sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, return nRet; } -sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr ) +sal_Unicode GetCharOfTextAttr( const SwTextAttr& rAttr ) { sal_Unicode cRet = CH_TXTATR_BREAKWORD; switch ( rAttr.Which() ) @@ -3461,7 +3461,7 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr ) break; default: - OSL_FAIL("GetCharOfTxtAttr: unknown attr"); + OSL_FAIL("GetCharOfTextAttr: unknown attr"); break; } return cRet; diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx index d0be2b452cde..0d3c8dac089e 100644 --- a/sw/source/core/txtnode/txatbase.cxx +++ b/sw/source/core/txtnode/txatbase.cxx @@ -24,13 +24,13 @@ #include <fmtfld.hxx> #include <docufld.hxx> -SwTxtAttr::SwTxtAttr( SfxPoolItem& rAttr, sal_Int32 nStart ) +SwTextAttr::SwTextAttr( SfxPoolItem& rAttr, sal_Int32 nStart ) : m_pAttr( &rAttr ) , m_nStart( nStart ) , m_bDontExpand( false ) , m_bLockExpandFlag( false ) , m_bDontMoveAttr( false ) - , m_bCharFmtAttr( false ) + , m_bCharFormatAttr( false ) , m_bOverlapAllowedAttr( false ) , m_bPriorityAttr( false ) , m_bDontExpandStart( false ) @@ -42,16 +42,16 @@ SwTxtAttr::SwTxtAttr( SfxPoolItem& rAttr, sal_Int32 nStart ) { } -SwTxtAttr::~SwTxtAttr( ) +SwTextAttr::~SwTextAttr( ) { } -sal_Int32* SwTxtAttr::GetEnd() +sal_Int32* SwTextAttr::GetEnd() { return 0; } -void SwTxtAttr::Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool ) +void SwTextAttr::Destroy( SwTextAttr * pToDestroy, SfxItemPool& rPool ) { if (!pToDestroy) return; SfxPoolItem * const pAttr = pToDestroy->m_pAttr; @@ -59,25 +59,25 @@ void SwTxtAttr::Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool ) rPool.Remove( *pAttr ); } -bool SwTxtAttr::operator==( const SwTxtAttr& rAttr ) const +bool SwTextAttr::operator==( const SwTextAttr& rAttr ) const { return GetAttr() == rAttr.GetAttr(); } -SwTxtAttrEnd::SwTxtAttrEnd( SfxPoolItem& rAttr, +SwTextAttrEnd::SwTextAttrEnd( SfxPoolItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd ) : - SwTxtAttr( rAttr, nStart ), m_nEnd( nEnd ) + SwTextAttr( rAttr, nStart ), m_nEnd( nEnd ) { } -sal_Int32* SwTxtAttrEnd::GetEnd() +sal_Int32* SwTextAttrEnd::GetEnd() { return & m_nEnd; } -void SwTxtAttr::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swTxtAttr")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swTextAttr")); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("start"), BAD_CAST(OString::number(m_nStart).getStr())); if (End()) @@ -99,15 +99,15 @@ void SwTxtAttr::dumpAsXml(xmlTextWriterPtr pWriter) const case RES_TXTATR_CHARFMT: { pWhich = "character format"; - if (SwCharFmt* pCharFmt = GetCharFmt().GetCharFmt()) - oValue = "name: " + OUStringToOString(pCharFmt->GetName(), RTL_TEXTENCODING_UTF8); + if (SwCharFormat* pCharFormat = GetCharFormat().GetCharFormat()) + oValue = "name: " + OUStringToOString(pCharFormat->GetName(), RTL_TEXTENCODING_UTF8); break; } case RES_TXTATR_INETFMT: { pWhich = "inet format"; - const SwFmtINetFmt& rFmt = GetINetFmt(); - oValue = "url: " + rFmt.GetValue().toUtf8(); + const SwFormatINetFormat& rFormat = GetINetFormat(); + oValue = "url: " + rFormat.GetValue().toUtf8(); break; } default: @@ -118,7 +118,7 @@ void SwTxtAttr::dumpAsXml(xmlTextWriterPtr pWriter) const if (oValue) xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(oValue->getStr())); if (Which() == RES_TXTATR_AUTOFMT) - GetAutoFmt().dumpAsXml(pWriter); + GetAutoFormat().dumpAsXml(pWriter); xmlTextWriterEndElement(pWriter); } diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx index 132554012ff4..c9f7158ffe4a 100644 --- a/sw/source/core/txtnode/txatritr.cxx +++ b/sw/source/core/txtnode/txatritr.cxx @@ -93,17 +93,17 @@ bool SwScriptIterator::Next() return bRet; } -SwTxtAttrIterator::SwTxtAttrIterator( const SwTxtNode& rTNd, sal_uInt16 nWhchId, +SwTextAttrIterator::SwTextAttrIterator( const SwTextNode& rTNd, sal_uInt16 nWhchId, sal_Int32 nStt, bool bUseGetWhichOfScript ) - : aSIter( rTNd.GetTxt(), nStt ), rTxtNd( rTNd ), + : aSIter( rTNd.GetText(), nStt ), rTextNd( rTNd ), pParaItem( 0 ), nAttrPos( 0 ), nChgPos( nStt ), nWhichId( nWhchId ), bIsUseGetWhichOfScript( bUseGetWhichOfScript ) { SearchNextChg(); } -bool SwTxtAttrIterator::Next() +bool SwTextAttrIterator::Next() { bool bRet = false; if (nChgPos < aSIter.GetText().getLength()) @@ -112,7 +112,7 @@ bool SwTxtAttrIterator::Next() if( !aStack.empty() ) { do { - const SwTxtAttr* pHt = aStack.front(); + const SwTextAttr* pHt = aStack.front(); const sal_Int32 nEndPos = *pHt->End(); if( nChgPos >= nEndPos ) aStack.pop_front(); @@ -127,7 +127,7 @@ bool SwTxtAttrIterator::Next() SearchNextChg(); if( !aStack.empty() ) { - const SwTxtAttr* pHt = aStack.front(); + const SwTextAttr* pHt = aStack.front(); const sal_Int32 nEndPos = *pHt->End(); if( nChgPos >= nEndPos ) { @@ -139,7 +139,7 @@ bool SwTxtAttrIterator::Next() const sal_uInt16 nWId = bIsUseGetWhichOfScript ? GetWhichOfScript( nWhichId, aSIter.GetCurrScript() ) : nWhichId; - pCurItem = &pHt->GetCharFmt().GetCharFmt()->GetFmtAttr(nWId); + pCurItem = &pHt->GetCharFormat().GetCharFormat()->GetFormatAttr(nWId); } else pCurItem = &pHt->GetAttr(); @@ -154,7 +154,7 @@ bool SwTxtAttrIterator::Next() return bRet; } -void SwTxtAttrIterator::AddToStack( const SwTxtAttr& rAttr ) +void SwTextAttrIterator::AddToStack( const SwTextAttr& rAttr ) { size_t nIns = 0; const sal_Int32 nEndPos = *rAttr.End(); @@ -165,7 +165,7 @@ void SwTxtAttrIterator::AddToStack( const SwTxtAttr& rAttr ) aStack.insert( aStack.begin() + nIns, &rAttr ); } -void SwTxtAttrIterator::SearchNextChg() +void SwTextAttrIterator::SearchNextChg() { sal_uInt16 nWh = 0; if( nChgPos == aSIter.GetScriptChgPos() ) @@ -182,14 +182,14 @@ void SwTxtAttrIterator::SearchNextChg() nWh = bIsUseGetWhichOfScript ? GetWhichOfScript( nWhichId, aSIter.GetCurrScript() ) : nWhichId; - pParaItem = &rTxtNd.GetSwAttrSet().Get( nWh ); + pParaItem = &rTextNd.GetSwAttrSet().Get( nWh ); } sal_Int32 nStt = nChgPos; nChgPos = aSIter.GetScriptChgPos(); pCurItem = pParaItem; - const SwpHints* pHts = rTxtNd.GetpSwpHints(); + const SwpHints* pHts = rTextNd.GetpSwpHints(); if( pHts ) { if( !nWh ) @@ -202,7 +202,7 @@ void SwTxtAttrIterator::SearchNextChg() const SfxPoolItem* pItem = 0; for( ; nAttrPos < pHts->Count(); ++nAttrPos ) { - const SwTxtAttr* pHt = (*pHts)[ nAttrPos ]; + const SwTextAttr* pHt = (*pHts)[ nAttrPos ]; const sal_Int32* pEnd = pHt->End(); const sal_Int32 nHtStt = pHt->GetStart(); if( nHtStt < nStt && ( !pEnd || *pEnd <= nStt )) @@ -211,7 +211,7 @@ void SwTxtAttrIterator::SearchNextChg() if( nHtStt >= nChgPos ) break; - pItem = CharFmt::GetItem( *pHt, nWh ); + pItem = CharFormat::GetItem( *pHt, nWh ); if ( pItem ) { if( nHtStt > nStt ) diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index 923da67a3baf..34483d974781 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -35,58 +35,58 @@ #include <IDocumentState.hxx> #include <IDocumentStylePoolAccess.hxx> -TYPEINIT1(SwTxtINetFmt,SwClient); -TYPEINIT1(SwTxtRuby,SwClient); +TYPEINIT1(SwTextINetFormat,SwClient); +TYPEINIT1(SwTextRuby,SwClient); -SwTxtCharFmt::SwTxtCharFmt( SwFmtCharFmt& rAttr, +SwTextCharFormat::SwTextCharFormat( SwFormatCharFormat& rAttr, sal_Int32 nStt, sal_Int32 nEnde ) - : SwTxtAttr( rAttr, nStt ) - , SwTxtAttrEnd( rAttr, nStt, nEnde ) - , m_pTxtNode( 0 ) + : SwTextAttr( rAttr, nStt ) + , SwTextAttrEnd( rAttr, nStt, nEnde ) + , m_pTextNode( 0 ) , m_nSortNumber( 0 ) { - rAttr.pTxtAttr = this; - SetCharFmtAttr( true ); + rAttr.pTextAttr = this; + SetCharFormatAttr( true ); } -SwTxtCharFmt::~SwTxtCharFmt( ) +SwTextCharFormat::~SwTextCharFormat( ) { } -void SwTxtCharFmt::ModifyNotification( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwTextCharFormat::ModifyNotification( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich) || (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich), - "SwTxtCharFmt::Modify(): unknown Modify"); + "SwTextCharFormat::Modify(): unknown Modify"); - if ( m_pTxtNode ) + if ( m_pTextNode ) { SwUpdateAttr aUpdateAttr( GetStart(), *GetEnd(), nWhich); - m_pTxtNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr ); + m_pTextNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr ); } } -bool SwTxtCharFmt::GetInfo( SfxPoolItem& rInfo ) const +bool SwTextCharFormat::GetInfo( SfxPoolItem& rInfo ) const { - if ( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode || - &m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes ) + if ( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTextNode || + &m_pTextNode->GetNodes() != static_cast<SwAutoFormatGetDocNode&>(rInfo).pNodes ) { return true; } - static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode; + static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = m_pTextNode; return false; } -SwTxtAttrNesting::SwTxtAttrNesting( SfxPoolItem & i_rAttr, +SwTextAttrNesting::SwTextAttrNesting( SfxPoolItem & i_rAttr, const sal_Int32 i_nStart, const sal_Int32 i_nEnd ) - : SwTxtAttr( i_rAttr, i_nStart ) - , SwTxtAttrEnd( i_rAttr, i_nStart, i_nEnd ) + : SwTextAttr( i_rAttr, i_nStart ) + , SwTextAttrEnd( i_rAttr, i_nStart, i_nEnd ) { SetDontExpand( true ); // never expand this attribute // lock the expand flag: simple guarantee that nesting will not be @@ -96,46 +96,46 @@ SwTxtAttrNesting::SwTxtAttrNesting( SfxPoolItem & i_rAttr, SetNesting( true ); } -SwTxtAttrNesting::~SwTxtAttrNesting() +SwTextAttrNesting::~SwTextAttrNesting() { } -SwTxtINetFmt::SwTxtINetFmt( SwFmtINetFmt& rAttr, +SwTextINetFormat::SwTextINetFormat( SwFormatINetFormat& rAttr, sal_Int32 nStart, sal_Int32 nEnd ) - : SwTxtAttr( rAttr, nStart ) - , SwTxtAttrNesting( rAttr, nStart, nEnd ) + : SwTextAttr( rAttr, nStart ) + , SwTextAttrNesting( rAttr, nStart, nEnd ) , SwClient( 0 ) - , m_pTxtNode( 0 ) + , m_pTextNode( 0 ) , m_bVisited( false ) , m_bVisitedValid( false ) { - rAttr.mpTxtAttr = this; - SetCharFmtAttr( true ); + rAttr.mpTextAttr = this; + SetCharFormatAttr( true ); } -SwTxtINetFmt::~SwTxtINetFmt( ) +SwTextINetFormat::~SwTextINetFormat( ) { } -SwCharFmt* SwTxtINetFmt::GetCharFmt() +SwCharFormat* SwTextINetFormat::GetCharFormat() { - const SwFmtINetFmt& rFmt = SwTxtAttrEnd::GetINetFmt(); - SwCharFmt* pRet = NULL; + const SwFormatINetFormat& rFormat = SwTextAttrEnd::GetINetFormat(); + SwCharFormat* pRet = NULL; - if (!rFmt.GetValue().isEmpty()) + if (!rFormat.GetValue().isEmpty()) { - SwDoc* pDoc = GetTxtNode().GetDoc(); + SwDoc* pDoc = GetTextNode().GetDoc(); if( !IsVisitedValid() ) { - SetVisited( pDoc->IsVisitedURL( rFmt.GetValue() ) ); + SetVisited( pDoc->IsVisitedURL( rFormat.GetValue() ) ); SetVisitedValid( true ); } - const sal_uInt16 nId = IsVisited() ? rFmt.GetVisitedFmtId() : rFmt.GetINetFmtId(); - const OUString& rStr = IsVisited() ? rFmt.GetVisitedFmt() : rFmt.GetINetFmt(); + const sal_uInt16 nId = IsVisited() ? rFormat.GetVisitedFormatId() : rFormat.GetINetFormatId(); + const OUString& rStr = IsVisited() ? rFormat.GetVisitedFormat() : rFormat.GetINetFormat(); if (rStr.isEmpty()) { - OSL_ENSURE( false, "<SwTxtINetFmt::GetCharFmt()> - missing character format at hyperlink attribute"); + OSL_ENSURE( false, "<SwTextINetFormat::GetCharFormat()> - missing character format at hyperlink attribute"); } // JP 10.02.2000, Bug 72806: dont modify the doc for getting the @@ -148,9 +148,9 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt() pDoc->SetOle2Link( Link<>() ); } - pRet = IsPoolUserFmt( nId ) - ? pDoc->FindCharFmtByName( rStr ) - : pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( nId ); + pRet = IsPoolUserFormat( nId ) + ? pDoc->FindCharFormatByName( rStr ) + : pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( nId ); if ( bResetMod ) { @@ -167,98 +167,98 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt() return pRet; } -void SwTxtINetFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwTextINetFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich) || (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich), - "SwTxtINetFmt::Modify(): unknown Modify"); + "SwTextINetFormat::Modify(): unknown Modify"); - if ( m_pTxtNode ) + if ( m_pTextNode ) { SwUpdateAttr aUpdateAttr( GetStart(), *GetEnd(), nWhich); - m_pTxtNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr ); + m_pTextNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr ); } } // erfrage vom Modify Informationen -bool SwTxtINetFmt::GetInfo( SfxPoolItem& rInfo ) const +bool SwTextINetFormat::GetInfo( SfxPoolItem& rInfo ) const { - if ( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode || - &m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes ) + if ( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTextNode || + &m_pTextNode->GetNodes() != static_cast<SwAutoFormatGetDocNode&>(rInfo).pNodes ) { return true; } - static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode; + static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = m_pTextNode; return false; } -bool SwTxtINetFmt::IsProtect( ) const +bool SwTextINetFormat::IsProtect( ) const { - return m_pTxtNode && m_pTxtNode->IsProtect(); + return m_pTextNode && m_pTextNode->IsProtect(); } -SwTxtRuby::SwTxtRuby( SwFmtRuby& rAttr, +SwTextRuby::SwTextRuby( SwFormatRuby& rAttr, sal_Int32 nStart, sal_Int32 nEnd ) - : SwTxtAttr( rAttr, nStart ) - , SwTxtAttrNesting( rAttr, nStart, nEnd ) + : SwTextAttr( rAttr, nStart ) + , SwTextAttrNesting( rAttr, nStart, nEnd ) , SwClient( 0 ) - , m_pTxtNode( 0 ) + , m_pTextNode( 0 ) { - rAttr.pTxtAttr = this; + rAttr.pTextAttr = this; } -SwTxtRuby::~SwTxtRuby() +SwTextRuby::~SwTextRuby() { } -void SwTxtRuby::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) +void SwTextRuby::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich) || (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich), - "SwTxtRuby::Modify(): unknown Modify"); + "SwTextRuby::Modify(): unknown Modify"); - if ( m_pTxtNode ) + if ( m_pTextNode ) { SwUpdateAttr aUpdateAttr( GetStart(), *GetEnd(), nWhich); - m_pTxtNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr ); + m_pTextNode->ModifyNotification( &aUpdateAttr, &aUpdateAttr ); } } -bool SwTxtRuby::GetInfo( SfxPoolItem& rInfo ) const +bool SwTextRuby::GetInfo( SfxPoolItem& rInfo ) const { - if( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode || - &m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes ) + if( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTextNode || + &m_pTextNode->GetNodes() != static_cast<SwAutoFormatGetDocNode&>(rInfo).pNodes ) { return true; } - static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode; + static_cast<SwAutoFormatGetDocNode&>(rInfo).pContentNode = m_pTextNode; return false; } -SwCharFmt* SwTxtRuby::GetCharFmt() +SwCharFormat* SwTextRuby::GetCharFormat() { - const SwFmtRuby& rFmt = SwTxtAttrEnd::GetRuby(); - SwCharFmt* pRet = 0; + const SwFormatRuby& rFormat = SwTextAttrEnd::GetRuby(); + SwCharFormat* pRet = 0; - if( !rFmt.GetText().isEmpty() ) + if( !rFormat.GetText().isEmpty() ) { - const SwDoc* pDoc = GetTxtNode().GetDoc(); - const OUString rStr = rFmt.GetCharFmtName(); + const SwDoc* pDoc = GetTextNode().GetDoc(); + const OUString rStr = rFormat.GetCharFormatName(); const sal_uInt16 nId = rStr.isEmpty() ? static_cast<sal_uInt16>(RES_POOLCHR_RUBYTEXT) - : rFmt.GetCharFmtId(); + : rFormat.GetCharFormatId(); // JP 10.02.2000, Bug 72806: dont modify the doc for getting the // correct charstyle. @@ -270,9 +270,9 @@ SwCharFmt* SwTxtRuby::GetCharFmt() const_cast<SwDoc*>(pDoc)->SetOle2Link( Link<>() ); } - pRet = IsPoolUserFmt( nId ) - ? pDoc->FindCharFmtByName( rStr ) - : const_cast<SwDoc*>(pDoc)->getIDocumentStylePoolAccess().GetCharFmtFromPool( nId ); + pRet = IsPoolUserFormat( nId ) + ? pDoc->FindCharFormatByName( rStr ) + : const_cast<SwDoc*>(pDoc)->getIDocumentStylePoolAccess().GetCharFormatFromPool( nId ); if( bResetMod ) { @@ -289,48 +289,48 @@ SwCharFmt* SwTxtRuby::GetCharFmt() return pRet; } -SwTxtMeta * -SwTxtMeta::CreateTxtMeta( +SwTextMeta * +SwTextMeta::CreateTextMeta( ::sw::MetaFieldManager & i_rTargetDocManager, - SwTxtNode *const i_pTargetTxtNode, - SwFmtMeta & i_rAttr, + SwTextNode *const i_pTargetTextNode, + SwFormatMeta & i_rAttr, sal_Int32 const i_nStart, sal_Int32 const i_nEnd, bool const i_bIsCopy) { if (i_bIsCopy) { // i_rAttr is already cloned, now call DoCopy to copy the sw::Meta - OSL_ENSURE(i_pTargetTxtNode, "cannot copy Meta without target node"); - i_rAttr.DoCopy(i_rTargetDocManager, *i_pTargetTxtNode); + OSL_ENSURE(i_pTargetTextNode, "cannot copy Meta without target node"); + i_rAttr.DoCopy(i_rTargetDocManager, *i_pTargetTextNode); } - SwTxtMeta *const pTxtMeta(new SwTxtMeta(i_rAttr, i_nStart, i_nEnd)); - return pTxtMeta; + SwTextMeta *const pTextMeta(new SwTextMeta(i_rAttr, i_nStart, i_nEnd)); + return pTextMeta; } -SwTxtMeta::SwTxtMeta( SwFmtMeta & i_rAttr, +SwTextMeta::SwTextMeta( SwFormatMeta & i_rAttr, const sal_Int32 i_nStart, const sal_Int32 i_nEnd ) - : SwTxtAttr( i_rAttr, i_nStart ) - , SwTxtAttrNesting( i_rAttr, i_nStart, i_nEnd ) + : SwTextAttr( i_rAttr, i_nStart ) + , SwTextAttrNesting( i_rAttr, i_nStart, i_nEnd ) { - i_rAttr.SetTxtAttr( this ); + i_rAttr.SetTextAttr( this ); SetHasDummyChar(true); } -SwTxtMeta::~SwTxtMeta() +SwTextMeta::~SwTextMeta() { - SwFmtMeta & rFmtMeta( static_cast<SwFmtMeta &>(GetAttr()) ); - if (rFmtMeta.GetTxtAttr() == this) + SwFormatMeta & rFormatMeta( static_cast<SwFormatMeta &>(GetAttr()) ); + if (rFormatMeta.GetTextAttr() == this) { - rFmtMeta.SetTxtAttr(0); + rFormatMeta.SetTextAttr(0); } } -void SwTxtMeta::ChgTxtNode(SwTxtNode * const pNode) +void SwTextMeta::ChgTextNode(SwTextNode * const pNode) { - SwFmtMeta & rFmtMeta( static_cast<SwFmtMeta &>(GetAttr()) ); - if (rFmtMeta.GetTxtAttr() == this) + SwFormatMeta & rFormatMeta( static_cast<SwFormatMeta &>(GetAttr()) ); + if (rFormatMeta.GetTextAttr() == this) { - rFmtMeta.NotifyChangeTxtNode(pNode); + rFormatMeta.NotifyChangeTextNode(pNode); } } diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 06ebf9d4aef1..0c42a7662cb8 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -90,8 +90,8 @@ using namespace ::com::sun::star::smarttags; // Wir ersparen uns in Hyphenate ein GetFrm() // Achtung: in edlingu.cxx stehen die Variablen! -extern const SwTxtNode *pLinguNode; -extern SwTxtFrm *pLinguFrm; +extern const SwTextNode *pLinguNode; +extern SwTextFrm *pLinguFrm; /* * This has basically the same function as SwScriptInfo::MaskHiddenRanges, @@ -99,7 +99,7 @@ extern SwTxtFrm *pLinguFrm; */ static sal_Int32 -lcl_MaskRedlines( const SwTxtNode& rNode, OUStringBuffer& rText, +lcl_MaskRedlines( const SwTextNode& rNode, OUStringBuffer& rText, sal_Int32 nStt, sal_Int32 nEnd, const sal_Unicode cChar ) { @@ -107,9 +107,9 @@ lcl_MaskRedlines( const SwTxtNode& rNode, OUStringBuffer& rText, const SwDoc& rDoc = *rNode.GetDoc(); - for ( size_t nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( rNode, USHRT_MAX ); nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTbl().size(); ++nAct ) + for ( size_t nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( rNode, USHRT_MAX ); nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(); ++nAct ) { - const SwRangeRedline* pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTbl()[ nAct ]; + const SwRangeRedline* pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ]; if ( pRed->Start()->nNode > rNode.GetIndex() ) break; @@ -143,7 +143,7 @@ lcl_MaskRedlines( const SwTxtNode& rNode, OUStringBuffer& rText, * Used for spell checking. Deleted redlines and hidden characters are masked */ static bool -lcl_MaskRedlinesAndHiddenText( const SwTxtNode& rNode, OUStringBuffer& rText, +lcl_MaskRedlinesAndHiddenText( const SwTextNode& rNode, OUStringBuffer& rText, sal_Int32 nStt, sal_Int32 nEnd, const sal_Unicode cChar = CH_TXTATR_INWORD, bool bCheckShowHiddenChar = true ) @@ -177,21 +177,21 @@ lcl_MaskRedlinesAndHiddenText( const SwTxtNode& rNode, OUStringBuffer& rText, /** * Used for spell checking. Calculates a rectangle for repaint. */ -static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, sal_Int32 nChgStart, sal_Int32 nChgEnd ) +static SwRect lcl_CalculateRepaintRect( SwTextFrm& rTextFrm, sal_Int32 nChgStart, sal_Int32 nChgEnd ) { SwRect aRect; - SwTxtNode *pNode = rTxtFrm.GetTxtNode(); + SwTextNode *pNode = rTextFrm.GetTextNode(); SwNodeIndex aNdIdx( *pNode ); SwPosition aPos( aNdIdx, SwIndex( pNode, nChgEnd ) ); SwCrsrMoveState aTmpState( MV_NONE ); aTmpState.b2Lines = true; - rTxtFrm.GetCharRect( aRect, aPos, &aTmpState ); + rTextFrm.GetCharRect( aRect, aPos, &aTmpState ); // information about end of repaint area Sw2LinesPos* pEnd2Pos = aTmpState.p2Lines; - const SwTxtFrm *pEndFrm = &rTxtFrm; + const SwTextFrm *pEndFrm = &rTextFrm; while( pEndFrm->HasFollow() && nChgEnd >= pEndFrm->GetFollow()->GetOfst() ) @@ -214,12 +214,12 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, sal_Int32 nChgStart, aTmpState.p2Lines = NULL; SwRect aTmp; aPos = SwPosition( aNdIdx, SwIndex( pNode, nChgStart ) ); - rTxtFrm.GetCharRect( aTmp, aPos, &aTmpState ); + rTextFrm.GetCharRect( aTmp, aPos, &aTmpState ); // i63141: GetCharRect(..) could cause a formatting, - // during the formatting SwTxtFrms could be joined, deleted, created... + // during the formatting SwTextFrms could be joined, deleted, created... // => we have to reinit pStartFrm and pEndFrm after the formatting - const SwTxtFrm* pStartFrm = &rTxtFrm; + const SwTextFrm* pStartFrm = &rTextFrm; while( pStartFrm->HasFollow() && nChgStart >= pStartFrm->GetFollow()->GetOfst() ) pStartFrm = pStartFrm->GetFollow(); @@ -246,7 +246,7 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, sal_Int32 nChgStart, bool bSameFrame = true; - if( rTxtFrm.HasFollow() ) + if( rTextFrm.HasFollow() ) { if( pEndFrm != pStartFrm ) { @@ -371,7 +371,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess, * @param bInclRefToxMark ??? */ -void SwTxtNode::RstTxtAttr( +void SwTextNode::RstTextAttr( const SwIndex &rIdx, const sal_Int32 nLen, const sal_uInt16 nWhich, @@ -386,20 +386,20 @@ void SwTxtNode::RstTxtAttr( sal_Int32 nEnd = nStt + nLen; { // enlarge range for the reset of text attributes in case of an overlapping input field - const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( nStt, RES_TXTATR_INPUTFIELD, PARENT )); - if ( pTxtInputFld == NULL ) + const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( nStt, RES_TXTATR_INPUTFIELD, PARENT )); + if ( pTextInputField == NULL ) { - pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt(nEnd, RES_TXTATR_INPUTFIELD, PARENT )); + pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt(nEnd, RES_TXTATR_INPUTFIELD, PARENT )); } - if ( pTxtInputFld != NULL ) + if ( pTextInputField != NULL ) { - if ( nStt > pTxtInputFld->GetStart() ) + if ( nStt > pTextInputField->GetStart() ) { - nStt = pTxtInputFld->GetStart(); + nStt = pTextInputField->GetStart(); } - if ( nEnd < *(pTxtInputFld->End()) ) + if ( nEnd < *(pTextInputField->End()) ) { - nEnd = *(pTxtInputFld->End()); + nEnd = *(pTextInputField->End()); } } } @@ -413,13 +413,13 @@ void SwTxtNode::RstTxtAttr( // We have to remember the "new" attributes that have // been introduced by splitting surrounding attributes (case 2,3,4). - std::vector<SwTxtAttr *> newAttributes; - std::vector<SwTxtAttr *> delAttributes; + std::vector<SwTextAttr *> newAttributes; + std::vector<SwTextAttr *> delAttributes; // iterate over attribute array until start of attribute is behind deletion range size_t i = 0; sal_Int32 nAttrStart; - SwTxtAttr *pHt = NULL; + SwTextAttr *pHt = NULL; while ( (i < m_pSwpHints->Count()) && ( ( ( nAttrStart = (*m_pSwpHints)[i]->GetStart()) < nEnd ) || nLen==0 ) && !bExactRange) @@ -462,7 +462,7 @@ void SwTxtNode::RstTxtAttr( // if the current attribute is an autostyle, we have to check if the autostyle // and pSet have any attributes in common. If so, pStyleHandle will contain // a handle to AutoStyle / pSet: - bSkipAttr = !lcl_HaveCommonAttributes( getIDocumentStyleAccess(), pSet, 0, *static_cast<const SwFmtAutoFmt&>(pHt->GetAttr()).GetStyleHandle(), pStyleHandle ); + bSkipAttr = !lcl_HaveCommonAttributes( getIDocumentStyleAccess(), pSet, 0, *static_cast<const SwFormatAutoFormat&>(pHt->GetAttr()).GetStyleHandle(), pStyleHandle ); } } else if ( nWhich ) @@ -471,7 +471,7 @@ void SwTxtNode::RstTxtAttr( bSkipAttr = nWhich != pHt->Which(); if ( bSkipAttr && RES_TXTATR_AUTOFMT == pHt->Which() ) { - bSkipAttr = !lcl_HaveCommonAttributes( getIDocumentStyleAccess(), 0, nWhich, *static_cast<const SwFmtAutoFmt&>(pHt->GetAttr()).GetStyleHandle(), pStyleHandle ); + bSkipAttr = !lcl_HaveCommonAttributes( getIDocumentStyleAccess(), 0, nWhich, *static_cast<const SwFormatAutoFormat&>(pHt->GetAttr()).GetStyleHandle(), pStyleHandle ); } } else if ( !bInclRefToxMark ) @@ -511,7 +511,7 @@ void SwTxtNode::RstTxtAttr( if ( pStyleHandle.get() ) { - SwTxtAttr* pNew = MakeTxtAttr( *GetDoc(), + SwTextAttr* pNew = MakeTextAttr( *GetDoc(), *pStyleHandle, nAttrStart, nAttrEnd ); newAttributes.push_back(pNew); } @@ -526,7 +526,7 @@ void SwTxtNode::RstTxtAttr( if ( pStyleHandle.get() && nAttrStart < nEnd ) { - SwTxtAttr* pNew = MakeTxtAttr( *GetDoc(), + SwTextAttr* pNew = MakeTextAttr( *GetDoc(), *pStyleHandle, nAttrStart, nEnd ); newAttributes.push_back(pNew); } @@ -554,7 +554,7 @@ void SwTxtNode::RstTxtAttr( if ( pStyleHandle.get() ) { - SwTxtAttr* pNew = MakeTxtAttr( *GetDoc(), + SwTextAttr* pNew = MakeTextAttr( *GetDoc(), *pStyleHandle, nStt, nAttrEnd ); newAttributes.push_back(pNew); } @@ -576,20 +576,20 @@ void SwTxtNode::RstTxtAttr( if ( pStyleHandle.get() && nStt < nEnd ) { - SwTxtAttr* pNew = MakeTxtAttr( *GetDoc(), + SwTextAttr* pNew = MakeTextAttr( *GetDoc(), *pStyleHandle, nStt, nEnd ); newAttributes.push_back(pNew); } if( nEnd < nTmpEnd ) { - SwTxtAttr* pNew = MakeTxtAttr( *GetDoc(), + SwTextAttr* pNew = MakeTextAttr( *GetDoc(), pHt->GetAttr(), nEnd, nTmpEnd ); if ( pNew ) { - SwTxtCharFmt* pCharFmt = dynamic_cast<SwTxtCharFmt*>(pHt); - if ( pCharFmt ) - static_txtattr_cast<SwTxtCharFmt*>(pNew)->SetSortNumber(pCharFmt->GetSortNumber()); + SwTextCharFormat* pCharFormat = dynamic_cast<SwTextCharFormat*>(pHt); + if ( pCharFormat ) + static_txtattr_cast<SwTextCharFormat*>(pNew)->SetSortNumber(pCharFormat->GetSortNumber()); newAttributes.push_back(pNew); } @@ -605,7 +605,7 @@ void SwTxtNode::RstTxtAttr( // Only delete the hints which start at nStt and end at nEnd. for (i = 0; i < m_pSwpHints->Count(); ++i) { - SwTxtAttr* pHint = m_pSwpHints->GetTextHint(i); + SwTextAttr* pHint = m_pSwpHints->GetTextHint(i); if (pHint->GetStart() != nStt) continue; @@ -623,14 +623,14 @@ void SwTxtNode::RstTxtAttr( } // delay deleting the hints because it re-sorts the hints array - for (SwTxtAttr *const pDel : delAttributes) + for (SwTextAttr *const pDel : delAttributes) { m_pSwpHints->Delete(pDel); DestroyAttr(pDel); } // delay inserting the hints because it re-sorts the hints array - for (SwTxtAttr *const pNew : newAttributes) + for (SwTextAttr *const pNew : newAttributes) { InsertHint(pNew, SetAttrMode::NOHINTADJUST); } @@ -644,14 +644,14 @@ void SwTxtNode::RstTxtAttr( m_pSwpHints->MergePortions(*this); } - // TxtFrm's respond to aHint, others to aNew + // TextFrm's respond to aHint, others to aNew SwUpdateAttr aHint( nMin, nMax, 0); NotifyClients( 0, &aHint ); - SwFmtChg aNew( GetFmtColl() ); + SwFormatChg aNew( GetFormatColl() ); NotifyClients( 0, &aNew ); } } @@ -671,7 +671,7 @@ sal_Int32 clipIndexBounds(const OUString &rStr, sal_Int32 nPos) // Absatzes, dann wird das erste Wort zurueckgeliefert. // Wenn dieses erste Wort nur aus Whitespaces besteht, returnen wir // einen leeren String. -OUString SwTxtNode::GetCurWord( sal_Int32 nPos ) const +OUString SwTextNode::GetCurWord( sal_Int32 nPos ) const { assert(nPos <= m_Text.getLength()); // invalid index @@ -713,11 +713,11 @@ OUString SwTxtNode::GetCurWord( sal_Int32 nPos ) const aBndry.endPos - aBndry.startPos); } -SwScanner::SwScanner( const SwTxtNode& rNd, const OUString& rTxt, +SwScanner::SwScanner( const SwTextNode& rNd, const OUString& rText, const LanguageType* pLang, const ModelToViewHelper& rConvMap, sal_uInt16 nType, sal_Int32 nStart, sal_Int32 nEnde, bool bClp ) : rNode( rNd ) - , aPreDashReplacementText(rTxt) + , aPreDashReplacementText(rText) , pLanguage( pLang ) , m_ModelToView( rConvMap ) , nLen( 0 ) @@ -939,13 +939,13 @@ bool SwScanner::NextWord() return true; } -bool SwTxtNode::Spell(SwSpellArgs* pArgs) +bool SwTextNode::Spell(SwSpellArgs* pArgs) { - // Die Aehnlichkeiten zu SwTxtFrm::_AutoSpell sind beabsichtigt ... + // Die Aehnlichkeiten zu SwTextFrm::_AutoSpell sind beabsichtigt ... // ACHTUNG: Ev. Bugs in beiden Routinen fixen! // modify string according to redline information and hidden text - const OUString aOldTxt( m_Text ); + const OUString aOldText( m_Text ); OUStringBuffer buf(m_Text); const bool bRestoreString = lcl_MaskRedlinesAndHiddenText(*this, buf, 0, m_Text.getLength()); @@ -995,7 +995,7 @@ bool SwTxtNode::Spell(SwSpellArgs* pArgs) // reset original text if ( bRestoreString ) { - m_Text = aOldTxt; + m_Text = aOldText; } return false; } @@ -1060,13 +1060,13 @@ bool SwTxtNode::Spell(SwSpellArgs* pArgs) // reset original text if ( bRestoreString ) { - m_Text = aOldTxt; + m_Text = aOldText; } return pArgs->xSpellAlt.is(); } -void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM, +void SwTextNode::SetLanguageAndFont( const SwPaM &rPaM, LanguageType nLang, sal_uInt16 nLangWhichId, const vcl::Font *pFont, sal_uInt16 nFontWhichId ) { @@ -1101,7 +1101,7 @@ void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM, } -bool SwTxtNode::Convert( SwConversionArgs &rArgs ) +bool SwTextNode::Convert( SwConversionArgs &rArgs ) { // get range of text within node to be converted // (either all the text or the text within the selection @@ -1117,7 +1117,7 @@ bool SwTxtNode::Convert( SwConversionArgs &rArgs ) rArgs.aConvText.clear(); // modify string according to redline information and hidden text - const OUString aOldTxt( m_Text ); + const OUString aOldText( m_Text ); OUStringBuffer buf(m_Text); const bool bRestoreString = lcl_MaskRedlinesAndHiddenText(*this, buf, 0, m_Text.getLength()); @@ -1230,15 +1230,15 @@ bool SwTxtNode::Convert( SwConversionArgs &rArgs ) // restore original text if ( bRestoreString ) { - m_Text = aOldTxt; + m_Text = aOldText; } return !rArgs.aConvText.isEmpty(); } -// Die Aehnlichkeiten zu SwTxtNode::Spell sind beabsichtigt ... +// Die Aehnlichkeiten zu SwTextNode::Spell sind beabsichtigt ... // ACHTUNG: Ev. Bugs in beiden Routinen fixen! -SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, sal_Int32 nActPos ) +SwRect SwTextFrm::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos ) { SwRect aRect; #if OSL_DEBUG_LEVEL > 1 @@ -1246,29 +1246,29 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, sal_Int32 nActPos ) if ( bStop ) return aRect; #endif - // Die Aehnlichkeiten zu SwTxtNode::Spell sind beabsichtigt ... + // Die Aehnlichkeiten zu SwTextNode::Spell sind beabsichtigt ... // ACHTUNG: Ev. Bugs in beiden Routinen fixen! - SwTxtNode *pNode = GetTxtNode(); + SwTextNode *pNode = GetTextNode(); if( pNode != pActNode || !nActPos ) nActPos = COMPLETE_STRING; SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords(); // modify string according to redline information and hidden text - const OUString aOldTxt( pNode->GetTxt() ); + const OUString aOldText( pNode->GetText() ); OUStringBuffer buf(pNode->m_Text); const bool bRestoreString = - lcl_MaskRedlinesAndHiddenText(*pNode, buf, 0, pNode->GetTxt().getLength()); + lcl_MaskRedlinesAndHiddenText(*pNode, buf, 0, pNode->GetText().getLength()); if (bRestoreString) { // ??? UGLY: is it really necessary to modify m_Text here? pNode->m_Text = buf.makeStringAndClear(); } // a change of data indicates that at least one word has been modified - const bool bRedlineChg = (pNode->GetTxt().getStr() != aOldTxt.getStr()); + const bool bRedlineChg = (pNode->GetText().getStr() != aOldText.getStr()); sal_Int32 nBegin = 0; - sal_Int32 nEnd = pNode->GetTxt().getLength(); + sal_Int32 nEnd = pNode->GetText().getLength(); sal_Int32 nInsertPos = 0; sal_Int32 nChgStart = COMPLETE_STRING; sal_Int32 nChgEnd = 0; @@ -1283,7 +1283,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, sal_Int32 nActPos ) nBegin = pNode->GetWrong()->GetBeginInv(); if( COMPLETE_STRING != nBegin ) { - nEnd = std::max(pNode->GetWrong()->GetEndInv(), pNode->GetTxt().getLength()); + nEnd = std::max(pNode->GetWrong()->GetEndInv(), pNode->GetText().getLength()); } // get word around nBegin, we start at nBegin - 1 @@ -1294,7 +1294,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, sal_Int32 nActPos ) LanguageType eActLang = pNode->GetLang( nBegin ); Boundary aBound = - g_pBreakIt->GetBreakIter()->getWordBoundary( pNode->GetTxt(), nBegin, + g_pBreakIt->GetBreakIter()->getWordBoundary( pNode->GetText(), nBegin, g_pBreakIt->GetLocale( eActLang ), WordType::DICTIONARY_WORD, true ); nBegin = aBound.startPos; @@ -1323,7 +1323,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, sal_Int32 nActPos ) uno::Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() ); SwDoc* pDoc = pNode->GetDoc(); - SwScanner aScanner( *pNode, pNode->GetTxt(), 0, ModelToViewHelper(), + SwScanner aScanner( *pNode, pNode->GetText(), 0, ModelToViewHelper(), WordType::DICTIONARY_WORD, nBegin, nEnd); while( aScanner.NextWord() ) @@ -1381,7 +1381,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, sal_Int32 nActPos ) // i63141 before calling GetCharRect(..) with formatting! if ( bRestoreString ) { - pNode->m_Text = aOldTxt; + pNode->m_Text = aOldText; } if( pNode->GetWrong() ) { @@ -1426,11 +1426,11 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, sal_Int32 nActPos ) @param nActPos ??? @return SwRect Repaint area */ -SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, sal_Int32 /*nActPos*/ ) +SwRect SwTextFrm::SmartTagScan( SwContentNode* /*pActNode*/, sal_Int32 /*nActPos*/ ) { SwRect aRet; - SwTxtNode *pNode = GetTxtNode(); - const OUString& rText = pNode->GetTxt(); + SwTextNode *pNode = GetTextNode(); + const OUString& rText = pNode->GetText(); // Iterate over language portions SmartTagMgr& rSmartTagMgr = SwSmartTagMgr::Get(); @@ -1545,9 +1545,9 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, sal_Int32 /*nActPos*/ } // Wird vom CollectAutoCmplWords gerufen -void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, sal_Int32 nActPos ) +void SwTextFrm::CollectAutoCmplWrds( SwContentNode* pActNode, sal_Int32 nActPos ) { - SwTxtNode *pNode = GetTxtNode(); + SwTextNode *pNode = GetTextNode(); if( pNode != pActNode || !nActPos ) nActPos = COMPLETE_STRING; @@ -1555,14 +1555,14 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, sal_Int32 nActPos ) SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords(); sal_Int32 nBegin = 0; - sal_Int32 nEnd = pNode->GetTxt().getLength(); + sal_Int32 nEnd = pNode->GetText().getLength(); sal_Int32 nLen; bool bACWDirty = false, bAnyWrd = false; if( nBegin < nEnd ) { int nCnt = 200; - SwScanner aScanner( *pNode, pNode->GetTxt(), 0, ModelToViewHelper(), + SwScanner aScanner( *pNode, pNode->GetText(), 0, ModelToViewHelper(), WordType::DICTIONARY_WORD, nBegin, nEnd ); while( aScanner.NextWord() ) { @@ -1594,8 +1594,8 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, sal_Int32 nActPos ) pNode->SetAutoCompleteWordDirty( false ); } -/** Findet den TxtFrm und sucht dessen CalcHyph */ -bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf ) +/** Findet den TextFrm und sucht dessen CalcHyph */ +bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf ) { // Abkuerzung: am Absatz ist keine Sprache eingestellt: if ( LANGUAGE_NONE == sal_uInt16( GetSwAttrSet().GetLanguage().GetLanguage() ) @@ -1609,9 +1609,9 @@ bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf ) if( pLinguNode != this ) { pLinguNode = this; - pLinguFrm = static_cast<SwTxtFrm*>(getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), rHyphInf.GetCrsrPos() )); + pLinguFrm = static_cast<SwTextFrm*>(getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), rHyphInf.GetCrsrPos() )); } - SwTxtFrm *pFrm = pLinguFrm; + SwTextFrm *pFrm = pLinguFrm; if( pFrm ) pFrm = &(pFrm->GetFrmAtOfst( rHyphInf.nStart )); else @@ -1619,7 +1619,7 @@ bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf ) // 4935: Seit der Trennung ueber Sonderbereiche sind Faelle // moeglich, in denen kein Frame zum Node vorliegt. // Also keinOSL_ENSURE - OSL_ENSURE( pFrm, "!SwTxtNode::Hyphenate: can't find any frame" ); + OSL_ENSURE( pFrm, "!SwTextNode::Hyphenate: can't find any frame" ); return false; } @@ -1655,7 +1655,7 @@ namespace } // change text to Upper/Lower/Hiragana/Katagana/... -void SwTxtNode::TransliterateText( +void SwTextNode::TransliterateText( utl::TransliterationWrapper& rTrans, sal_Int32 nStt, sal_Int32 nEnd, SwUndoTransliterate* pUndo ) @@ -1685,12 +1685,12 @@ void SwTxtNode::TransliterateText( Boundary aSttBndry; Boundary aEndBndry; aSttBndry = g_pBreakIt->GetBreakIter()->getWordBoundary( - GetTxt(), nStt, + GetText(), nStt, g_pBreakIt->GetLocale( GetLang( nStt ) ), nWordType, true /*prefer forward direction*/); aEndBndry = g_pBreakIt->GetBreakIter()->getWordBoundary( - GetTxt(), nEnd, + GetText(), nEnd, g_pBreakIt->GetLocale( GetLang( nEnd ) ), nWordType, false /*prefer backward direction*/); @@ -1699,7 +1699,7 @@ void SwTxtNode::TransliterateText( if (aSttBndry.endPos <= nStt) { aSttBndry = g_pBreakIt->GetBreakIter()->nextWord( - GetTxt(), aSttBndry.endPos, + GetText(), aSttBndry.endPos, g_pBreakIt->GetLocale( GetLang( aSttBndry.endPos ) ), nWordType); } @@ -1707,7 +1707,7 @@ void SwTxtNode::TransliterateText( if (aEndBndry.startPos >= nEnd) { aEndBndry = g_pBreakIt->GetBreakIter()->previousWord( - GetTxt(), aEndBndry.startPos, + GetText(), aEndBndry.startPos, g_pBreakIt->GetLocale( GetLang( aEndBndry.startPos ) ), nWordType); } @@ -1722,7 +1722,7 @@ void SwTxtNode::TransliterateText( Sequence <sal_Int32> aOffsets; OUString const sChgd( rTrans.transliterate( - GetTxt(), GetLang(nStt), nStt, nLen, &aOffsets) ); + GetText(), GetLang(nStt), nStt, nLen, &aOffsets) ); assert(nStt < m_Text.getLength()); if (0 != rtl_ustr_shortenedCompare_WithLength( @@ -1737,7 +1737,7 @@ void SwTxtNode::TransliterateText( } aCurWordBndry = g_pBreakIt->GetBreakIter()->nextWord( - GetTxt(), nEnd, + GetText(), nEnd, g_pBreakIt->GetLocale( GetLang( nEnd ) ), nWordType); } @@ -1747,18 +1747,18 @@ void SwTxtNode::TransliterateText( // for 'sentence case' we need to iterate sentence by sentence sal_Int32 nLastStart = g_pBreakIt->GetBreakIter()->beginOfSentence( - GetTxt(), nEnd, + GetText(), nEnd, g_pBreakIt->GetLocale( GetLang( nEnd ) ) ); sal_Int32 nLastEnd = g_pBreakIt->GetBreakIter()->endOfSentence( - GetTxt(), nLastStart, + GetText(), nLastStart, g_pBreakIt->GetLocale( GetLang( nLastStart ) ) ); // extend nStt, nEnd to the current sentence boundaries sal_Int32 nCurrentStart = g_pBreakIt->GetBreakIter()->beginOfSentence( - GetTxt(), nStt, + GetText(), nStt, g_pBreakIt->GetLocale( GetLang( nStt ) ) ); sal_Int32 nCurrentEnd = g_pBreakIt->GetBreakIter()->endOfSentence( - GetTxt(), nCurrentStart, + GetText(), nCurrentStart, g_pBreakIt->GetLocale( GetLang( nCurrentStart ) ) ); // prevent backtracking to the previous sentence if selection starts at end of a sentence @@ -1769,16 +1769,16 @@ void SwTxtNode::TransliterateText( // Thus to get the real sentence start we should locate the next real word, // that is one found by DICTIONARY_WORD i18n::Boundary aBndry = g_pBreakIt->GetBreakIter()->nextWord( - GetTxt(), nCurrentEnd, + GetText(), nCurrentEnd, g_pBreakIt->GetLocale( GetLang( nCurrentEnd ) ), i18n::WordType::DICTIONARY_WORD); // now get new current sentence boundaries nCurrentStart = g_pBreakIt->GetBreakIter()->beginOfSentence( - GetTxt(), aBndry.startPos, + GetText(), aBndry.startPos, g_pBreakIt->GetLocale( GetLang( aBndry.startPos) ) ); nCurrentEnd = g_pBreakIt->GetBreakIter()->endOfSentence( - GetTxt(), nCurrentStart, + GetText(), nCurrentStart, g_pBreakIt->GetLocale( GetLang( nCurrentStart) ) ); } // prevent advancing to the next sentence if selection ends at start of a sentence @@ -1789,11 +1789,11 @@ void SwTxtNode::TransliterateText( // Thus to get the real sentence start we should locate the previous real word, // that is one found by DICTIONARY_WORD i18n::Boundary aBndry = g_pBreakIt->GetBreakIter()->previousWord( - GetTxt(), nLastStart, + GetText(), nLastStart, g_pBreakIt->GetLocale( GetLang( nLastStart) ), i18n::WordType::DICTIONARY_WORD); nLastEnd = g_pBreakIt->GetBreakIter()->endOfSentence( - GetTxt(), aBndry.startPos, + GetText(), aBndry.startPos, g_pBreakIt->GetLocale( GetLang( aBndry.startPos) ) ); if (nCurrentEnd > nLastEnd) nCurrentEnd = nLastEnd; @@ -1805,7 +1805,7 @@ void SwTxtNode::TransliterateText( OSL_ENSURE( nLen > 0, "invalid word length of 0" ); Sequence <sal_Int32> aOffsets; - OUString const sChgd( rTrans.transliterate(GetTxt(), + OUString const sChgd( rTrans.transliterate(GetText(), GetLang(nCurrentStart), nCurrentStart, nLen, &aOffsets) ); assert(nStt < m_Text.getLength()); @@ -1822,12 +1822,12 @@ void SwTxtNode::TransliterateText( Boundary aFirstWordBndry; aFirstWordBndry = g_pBreakIt->GetBreakIter()->nextWord( - GetTxt(), nCurrentEnd, + GetText(), nCurrentEnd, g_pBreakIt->GetLocale( GetLang( nCurrentEnd ) ), nWordType); nCurrentStart = aFirstWordBndry.startPos; nCurrentEnd = g_pBreakIt->GetBreakIter()->endOfSentence( - GetTxt(), nCurrentStart, + GetText(), nCurrentStart, g_pBreakIt->GetLocale( GetLang( nCurrentStart ) ) ); } } @@ -1892,7 +1892,7 @@ void SwTxtNode::TransliterateText( nSum += rData.sChanged.getLength() - rData.nLen; if (nSum > static_cast<size_t>(GetSpaceLeft())) { - SAL_WARN("sw.core", "SwTxtNode::ReplaceTextOnly: " + SAL_WARN("sw.core", "SwTextNode::ReplaceTextOnly: " "node text with insertion > node capacity."); return; } @@ -1904,7 +1904,7 @@ void SwTxtNode::TransliterateText( } } -void SwTxtNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen, +void SwTextNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen, const OUString & rText, const Sequence<sal_Int32>& rOffsets ) { @@ -1944,16 +1944,16 @@ void SwTxtNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen, Update( SwIndex( this, nMyOff ), nLen - nMyOff, true ); // notify the layout! - SwDelTxt aDelHint( nPos, nTLen ); + SwDelText aDelHint( nPos, nTLen ); NotifyClients( 0, &aDelHint ); - SwInsTxt aHint( nPos, nTLen ); + SwInsText aHint( nPos, nTLen ); NotifyClients( 0, &aHint ); } // the return values allows us to see if we did the heavy- // lifting required to actually break and count the words. -bool SwTxtNode::CountWords( SwDocStat& rStat, +bool SwTextNode::CountWords( SwDocStat& rStat, sal_Int32 nStt, sal_Int32 nEnd ) const { if( nStt > nEnd ) @@ -1964,7 +1964,7 @@ bool SwTxtNode::CountWords( SwDocStat& rStat, { //not counting txtnodes used to hold deleted redline content return false; } - bool bCountAll = ( (0 == nStt) && (GetTxt().getLength() == nEnd) ); + bool bCountAll = ( (0 == nStt) && (GetText().getLength() == nEnd) ); ++rStat.nAllPara; // #i93174#: count _all_ paragraphs if ( IsHidden() ) { // not counting hidden paras @@ -2135,7 +2135,7 @@ struct SwParaIdleData_Impl bAutoComplDirty ( true ) {}; }; -void SwTxtNode::InitSwParaStatistics( bool bNew ) +void SwTextNode::InitSwParaStatistics( bool bNew ) { if ( bNew ) { @@ -2151,7 +2151,7 @@ void SwTxtNode::InitSwParaStatistics( bool bNew ) } } -void SwTxtNode::SetWrong( SwWrongList* pNew, bool bDelete ) +void SwTextNode::SetWrong( SwWrongList* pNew, bool bDelete ) { if ( m_pParaIdleData_Impl ) { @@ -2163,18 +2163,18 @@ void SwTxtNode::SetWrong( SwWrongList* pNew, bool bDelete ) } } -SwWrongList* SwTxtNode::GetWrong() +SwWrongList* SwTextNode::GetWrong() { return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pWrong : 0; } // #i71360# -const SwWrongList* SwTxtNode::GetWrong() const +const SwWrongList* SwTextNode::GetWrong() const { return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pWrong : 0; } -void SwTxtNode::SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete ) +void SwTextNode::SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete ) { if ( m_pParaIdleData_Impl ) { @@ -2186,12 +2186,12 @@ void SwTxtNode::SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete ) } } -SwGrammarMarkUp* SwTxtNode::GetGrammarCheck() +SwGrammarMarkUp* SwTextNode::GetGrammarCheck() { return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pGrammarCheck : 0; } -void SwTxtNode::SetSmartTags( SwWrongList* pNew, bool bDelete ) +void SwTextNode::SetSmartTags( SwWrongList* pNew, bool bDelete ) { OSL_ENSURE( !pNew || SwSmartTagMgr::Get().IsSmartTagsEnabled(), "Weird - we have a smart tag list without any recognizers?" ); @@ -2206,12 +2206,12 @@ void SwTxtNode::SetSmartTags( SwWrongList* pNew, bool bDelete ) } } -SwWrongList* SwTxtNode::GetSmartTags() +SwWrongList* SwTextNode::GetSmartTags() { return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pSmartTags : 0; } -void SwTxtNode::SetParaNumberOfWords( sal_uLong nNew ) const +void SwTextNode::SetParaNumberOfWords( sal_uLong nNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2219,12 +2219,12 @@ void SwTxtNode::SetParaNumberOfWords( sal_uLong nNew ) const } } -sal_uLong SwTxtNode::GetParaNumberOfWords() const +sal_uLong SwTextNode::GetParaNumberOfWords() const { return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfWords : 0; } -void SwTxtNode::SetParaNumberOfAsianWords( sal_uLong nNew ) const +void SwTextNode::SetParaNumberOfAsianWords( sal_uLong nNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2232,12 +2232,12 @@ void SwTxtNode::SetParaNumberOfAsianWords( sal_uLong nNew ) const } } -sal_uLong SwTxtNode::GetParaNumberOfAsianWords() const +sal_uLong SwTextNode::GetParaNumberOfAsianWords() const { return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfAsianWords : 0; } -void SwTxtNode::SetParaNumberOfChars( sal_uLong nNew ) const +void SwTextNode::SetParaNumberOfChars( sal_uLong nNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2245,12 +2245,12 @@ void SwTxtNode::SetParaNumberOfChars( sal_uLong nNew ) const } } -sal_uLong SwTxtNode::GetParaNumberOfChars() const +sal_uLong SwTextNode::GetParaNumberOfChars() const { return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfChars : 0; } -void SwTxtNode::SetWordCountDirty( bool bNew ) const +void SwTextNode::SetWordCountDirty( bool bNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2258,12 +2258,12 @@ void SwTxtNode::SetWordCountDirty( bool bNew ) const } } -sal_uLong SwTxtNode::GetParaNumberOfCharsExcludingSpaces() const +sal_uLong SwTextNode::GetParaNumberOfCharsExcludingSpaces() const { return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfCharsExcludingSpaces : 0; } -void SwTxtNode::SetParaNumberOfCharsExcludingSpaces( sal_uLong nNew ) const +void SwTextNode::SetParaNumberOfCharsExcludingSpaces( sal_uLong nNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2271,12 +2271,12 @@ void SwTxtNode::SetParaNumberOfCharsExcludingSpaces( sal_uLong nNew ) const } } -bool SwTxtNode::IsWordCountDirty() const +bool SwTextNode::IsWordCountDirty() const { return m_pParaIdleData_Impl && m_pParaIdleData_Impl->bWordCountDirty; } -void SwTxtNode::SetWrongDirty( bool bNew ) const +void SwTextNode::SetWrongDirty( bool bNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2284,12 +2284,12 @@ void SwTxtNode::SetWrongDirty( bool bNew ) const } } -bool SwTxtNode::IsWrongDirty() const +bool SwTextNode::IsWrongDirty() const { return m_pParaIdleData_Impl && m_pParaIdleData_Impl->bWrongDirty; } -void SwTxtNode::SetGrammarCheckDirty( bool bNew ) const +void SwTextNode::SetGrammarCheckDirty( bool bNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2297,12 +2297,12 @@ void SwTxtNode::SetGrammarCheckDirty( bool bNew ) const } } -bool SwTxtNode::IsGrammarCheckDirty() const +bool SwTextNode::IsGrammarCheckDirty() const { return m_pParaIdleData_Impl && m_pParaIdleData_Impl->bGrammarCheckDirty; } -void SwTxtNode::SetSmartTagDirty( bool bNew ) const +void SwTextNode::SetSmartTagDirty( bool bNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2310,12 +2310,12 @@ void SwTxtNode::SetSmartTagDirty( bool bNew ) const } } -bool SwTxtNode::IsSmartTagDirty() const +bool SwTextNode::IsSmartTagDirty() const { return m_pParaIdleData_Impl && m_pParaIdleData_Impl->bSmartTagDirty; } -void SwTxtNode::SetAutoCompleteWordDirty( bool bNew ) const +void SwTextNode::SetAutoCompleteWordDirty( bool bNew ) const { if ( m_pParaIdleData_Impl ) { @@ -2323,7 +2323,7 @@ void SwTxtNode::SetAutoCompleteWordDirty( bool bNew ) const } } -bool SwTxtNode::IsAutoCompleteWordDirty() const +bool SwTextNode::IsAutoCompleteWordDirty() const { return m_pParaIdleData_Impl && m_pParaIdleData_Impl->bAutoComplDirty; } |