Modified: openoffice/trunk/main/sw/source/core/txtnode/atrfld.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/txtnode/atrfld.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/txtnode/atrfld.cxx (original) +++ openoffice/trunk/main/sw/source/core/txtnode/atrfld.cxx Tue Sep 24 15:03:38 2013 @@ -53,17 +53,20 @@ TYPEINIT1(SwFmtFldHint, SfxHint); // Konstruktor fuers Default vom Attribut-Pool SwFmtFld::SwFmtFld() - : SfxPoolItem( RES_TXTATR_FIELD ), - SwClient( 0 ), - pField( 0 ), - pTxtAttr( 0 ) + : SfxPoolItem( RES_TXTATR_FIELD ) + , SwClient( 0 ) + , SfxBroadcaster() + , pField( 0 ) + , pTxtAttr( 0 ) { } SwFmtFld::SwFmtFld( const SwField &rFld ) - : SfxPoolItem( RES_TXTATR_FIELD ), - SwClient( rFld.GetTyp() ), - pTxtAttr( 0 ) + : SfxPoolItem( RES_TXTATR_FIELD ) + , SwClient( rFld.GetTyp() ) + , SfxBroadcaster() + , pField( 0 ) + , pTxtAttr( 0 ) { pField = rFld.CopyField(); } @@ -73,14 +76,16 @@ SwFmtFld::SwFmtFld( const SwField &rFld // full pool range, all items need to be clonable. Thus, this one needed to be // corrected SwFmtFld::SwFmtFld( const SwFmtFld& rAttr ) - : SfxPoolItem( RES_TXTATR_FIELD ), SwClient(), SfxBroadcaster(), - pField( 0 ), - pTxtAttr( 0 ) + : SfxPoolItem( RES_TXTATR_FIELD ) + , SwClient() + , SfxBroadcaster() + , pField( 0 ) + , pTxtAttr( 0 ) { - if(rAttr.GetFld()) - { - rAttr.GetFld()->GetTyp()->Add(this); - pField = rAttr.GetFld()->CopyField(); + if(rAttr.GetField()) + { + rAttr.GetField()->GetTyp()->Add(this); + pField = rAttr.GetField()->CopyField(); } } @@ -141,13 +146,10 @@ void SwFmtFld::SetFld(SwField * _pField) int SwFmtFld::operator==( const SfxPoolItem& rAttr ) const { ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" ); - // OD 2004-05-14 #i29146# - correction: check, if <pField> and - // <((SwFmtFld&)rAttr).GetFld()> are set. - // OD 2004-05-14 #i29146# - items are equal, if both fields aren't set. - return ( pField && ((SwFmtFld&)rAttr).GetFld() && - pField->GetTyp() == ((SwFmtFld&)rAttr).GetFld()->GetTyp() && - pField->GetFormat() == ((SwFmtFld&)rAttr).GetFld()->GetFormat() ) || - ( !pField && !((SwFmtFld&)rAttr).GetFld() ); + return ( ( pField && ((SwFmtFld&)rAttr).GetField() + && pField->GetTyp() == ((SwFmtFld&)rAttr).GetField()->GetTyp() + && pField->GetFormat() == ((SwFmtFld&)rAttr).GetField()->GetFormat() ) ) + || ( !pField && !((SwFmtFld&)rAttr).GetField() ); } SfxPoolItem* SwFmtFld::Clone( SfxItemPool* ) const @@ -170,7 +172,7 @@ void SwFmtFld::SwClientNotify( const SwM pPaM->GetPoint()->nNode = rTxtNode; pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, *pTxtAttr->GetStart() ); - String const aEntry( GetFld()->ExpandField( pDoc->IsClipBoard() ) ); + String const aEntry( GetField()->ExpandField( pDoc->IsClipBoard() ) ); pPaM->SetMark(); pPaM->Move( fnMoveForward ); pDoc->DeleteRange( *pPaM ); @@ -200,11 +202,11 @@ void SwFmtFld::Modify( const SfxPoolItem return; case RES_REFMARKFLD_UPDATE: // GetReferenz-Felder aktualisieren - if( RES_GETREFFLD == GetFld()->GetTyp()->Which() ) + if( RES_GETREFFLD == GetField()->GetTyp()->Which() ) { // --> OD 2007-09-06 #i81002# // ((SwGetRefField*)GetFld())->UpdateField(); - dynamic_cast<SwGetRefField*>(GetFld())->UpdateField( pTxtAttr ); + dynamic_cast<SwGetRefField*>(GetField())->UpdateField( pTxtAttr ); // <-- } break; @@ -222,7 +224,7 @@ void SwFmtFld::Modify( const SfxPoolItem } } - switch (GetFld()->GetTyp()->Which()) + switch (GetField()->GetTyp()->Which()) { case RES_HIDDENPARAFLD: if( !pOld || RES_HIDDENPARA_PRINT != pOld->Which() ) @@ -235,9 +237,9 @@ void SwFmtFld::Modify( const SfxPoolItem return; } - if( RES_USERFLD == GetFld()->GetTyp()->Which() ) + if( RES_USERFLD == GetField()->GetTyp()->Which() ) { - SwUserFieldType* pType = (SwUserFieldType*)GetFld()->GetTyp(); + SwUserFieldType* pType = (SwUserFieldType*)GetField()->GetTyp(); if(!pType->IsValid()) { SwCalc aCalc( *pTxtNd->GetDoc() ); @@ -286,7 +288,7 @@ sal_Bool SwFmtFld::IsProtect() const SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos) : SwTxtAttr( rAttr, nStartPos ) - , m_aExpand( rAttr.GetFld()->ExpandField(true) ) + , m_aExpand( rAttr.GetField()->ExpandField(true) ) , m_pTxtNode( 0 ) { rAttr.pTxtAttr = this; @@ -314,41 +316,40 @@ SwTxtFld::~SwTxtFld( ) void SwTxtFld::Expand() const { - // Wenn das expandierte Feld sich nicht veraendert hat, wird returnt + // Wenn das expandierte Feld sich nicht veraendert hat, wird returnt ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" ); - const SwField* pFld = GetFld().GetFld(); - XubString aNewExpand( - pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) ); + const SwField* pFld = GetFmtFld().GetField(); + XubString aNewExpand( pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) ); if( aNewExpand == m_aExpand ) - { - // Bei Seitennummernfeldern - const sal_uInt16 nWhich = pFld->GetTyp()->Which(); - if( RES_CHAPTERFLD != nWhich && RES_PAGENUMBERFLD != nWhich && - RES_REFPAGEGETFLD != nWhich && + { + // Bei Seitennummernfeldern + const sal_uInt16 nWhich = pFld->GetTyp()->Which(); + if( RES_CHAPTERFLD != nWhich && RES_PAGENUMBERFLD != nWhich && + RES_REFPAGEGETFLD != nWhich && // --> FME 2005-05-23 #122919# 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 || ((SwGetExpField*)pFld)->IsInBodyTxt() ) ) - { - // BP: das muesste man noch optimieren! - //JP 12.06.97: stimmt, man sollte auf jedenfall eine Status- - // aenderung an die Frames posten + { + // BP: das muesste man noch optimieren! + //JP 12.06.97: stimmt, man sollte auf jedenfall eine Status- + // aenderung an die Frames posten if( m_pTxtNode->CalcHiddenParaField() ) { m_pTxtNode->ModifyNotification( 0, 0 ); } - return; - } - } + return; + } + } m_aExpand = aNewExpand; // 0, this for formatting - m_pTxtNode->ModifyNotification( 0, const_cast<SwFmtFld*>( &GetFld() ) ); + m_pTxtNode->ModifyNotification( 0, const_cast<SwFmtFld*>( &GetFmtFld() ) ); } /************************************************************************* @@ -363,51 +364,51 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest IDocumentFieldsAccess* pIDFA = m_pTxtNode->getIDocumentFieldsAccess(); IDocumentFieldsAccess* pDestIDFA = pDest->m_pTxtNode->getIDocumentFieldsAccess(); - SwFmtFld& rFmtFld = (SwFmtFld&)pDest->GetFld(); - const sal_uInt16 nFldWhich = rFmtFld.GetFld()->GetTyp()->Which(); + SwFmtFld& rFmtFld = (SwFmtFld&)pDest->GetFmtFld(); + const sal_uInt16 nFldWhich = rFmtFld.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 ) + { + // 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 ) pFldType = pDestIDFA->GetSysFldType( nFldWhich ); - else - pFldType = pDestIDFA->InsertFldType( *rFmtFld.GetFld()->GetTyp() ); - - // Sonderbehandlung fuer DDE-Felder - if( RES_DDEFLD == nFldWhich ) - { - if( rFmtFld.GetTxtFld() ) - ((SwDDEFieldType*)rFmtFld.GetFld()->GetTyp())->DecRefCnt(); - ((SwDDEFieldType*)pFldType)->IncRefCnt(); - } + else + pFldType = pDestIDFA->InsertFldType( *rFmtFld.GetField()->GetTyp() ); - ASSERT( pFldType, "unbekannter FieldType" ); - pFldType->Add( &rFmtFld ); // ummelden - rFmtFld.GetFld()->ChgTyp( pFldType ); - } + // Sonderbehandlung fuer DDE-Felder + if( RES_DDEFLD == nFldWhich ) + { + if( rFmtFld.GetTxtFld() ) + ((SwDDEFieldType*)rFmtFld.GetField()->GetTyp())->DecRefCnt(); + ((SwDDEFieldType*)pFldType)->IncRefCnt(); + } + + ASSERT( pFldType, "unbekannter FieldType" ); + pFldType->Add( &rFmtFld ); // ummelden + rFmtFld.GetField()->ChgTyp( pFldType ); + } - // Expressionfelder Updaten - if( nFldWhich == RES_SETEXPFLD || nFldWhich == RES_GETEXPFLD || - nFldWhich == RES_HIDDENTXTFLD ) - { - SwTxtFld* pFld = (SwTxtFld*)this; + // Expressionfelder Updaten + if( nFldWhich == RES_SETEXPFLD || nFldWhich == RES_GETEXPFLD || + nFldWhich == RES_HIDDENTXTFLD ) + { + SwTxtFld* pFld = (SwTxtFld*)this; pDestIDFA->UpdateExpFlds( pFld, true ); - } - // Tabellenfelder auf externe Darstellung - else if( RES_TABLEFLD == nFldWhich && - ((SwTblField*)rFmtFld.GetFld())->IsIntrnlName() ) - { - // erzeuge aus der internen (fuer CORE) die externe (fuer UI) Formel + } + // Tabellenfelder auf externe Darstellung + else if( RES_TABLEFLD == nFldWhich && + ((SwTblField*)rFmtFld.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 - ((SwTblField*)rFmtFld.GetFld())->PtrToBoxNm( &pTblNd->GetTable() ); - } + if( pTblNd ) // steht in einer Tabelle + ((SwTblField*)rFmtFld.GetField())->PtrToBoxNm( &pTblNd->GetTable() ); + } } /* -----------------26.06.2003 13:54-----------------
Modified: openoffice/trunk/main/sw/source/core/txtnode/ndtxt.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/txtnode/ndtxt.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/txtnode/ndtxt.cxx (original) +++ openoffice/trunk/main/sw/source/core/txtnode/ndtxt.cxx Tue Sep 24 15:03:38 2013 @@ -1313,31 +1313,29 @@ void lcl_CopyHint( const sal_uInt16 nWhi // TabellenFormel muessen relativ kopiert werden. case RES_TXTATR_FIELD : { - const SwFmtFld& rFld = pHt->GetFld(); + const SwFmtFld& rFld = pHt->GetFmtFld(); if( pOtherDoc ) { static_cast<const SwTxtFld*>(pHt)->CopyFld( static_cast<SwTxtFld*>(pNewHt) ); } - // Tabellenformel ?? - if( RES_TABLEFLD == rFld.GetFld()->GetTyp()->Which() - && static_cast<const SwTblField*>(rFld.GetFld())->IsIntrnlName()) - { - // wandel die interne in eine externe Formel um + // Tabellenformel ?? + if( RES_TABLEFLD == rFld.GetField()->GetTyp()->Which() + && static_cast<const SwTblField*>(rFld.GetField())->IsIntrnlName()) + { + // wandel die interne in eine externe Formel um const SwTableNode* const pDstTblNd = - static_cast<const SwTxtFld*>(pHt)-> - GetTxtNode().FindTableNode(); - if( pDstTblNd ) - { + static_cast<const SwTxtFld*>(pHt)->GetTxtNode().FindTableNode(); + if( pDstTblNd ) + { SwTblField* const pTblFld = const_cast<SwTblField*>( - static_cast<const SwTblField*>( - pNewHt->GetFld().GetFld())); - pTblFld->PtrToBoxNm( &pDstTblNd->GetTable() ); - } - } - } - break; + static_cast<const SwTblField*>(pNewHt->GetFmtFld().GetField())); + pTblFld->PtrToBoxNm( &pDstTblNd->GetTable() ); + } + } + } + break; case RES_TXTATR_TOXMARK : if( pOtherDoc && pDest && pDest->GetpSwpHints() @@ -3041,8 +3039,7 @@ void SwTxtNode::Replace0xFF( XubString& if( bExpandFlds ) { const XubString aExpand( - static_cast<SwTxtFld const*>(pAttr)->GetFld() - .GetFld()->ExpandField(true)); + static_cast<SwTxtFld const*>(pAttr)->GetFmtFld().GetField()->ExpandField(true)); rTxt.Insert( aExpand, nPos ); nPos = nPos + aExpand.Len(); nEndPos = nEndPos + aExpand.Len(); @@ -3190,8 +3187,7 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtN case RES_TXTATR_FIELD: { XubString const aExpand( - static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld() - ->ExpandField(true)); + static_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true) ); if( aExpand.Len() ) { aDestIdx++; // dahinter einfuegen; @@ -3288,8 +3284,7 @@ const ModelToViewHelper::ConversionMap* if ( RES_TXTATR_FIELD == pAttr->Which() ) { const XubString aExpand( - static_cast<SwTxtFld const*>(pAttr)->GetFld().GetFld() - ->ExpandField(true)); + static_cast<SwTxtFld const*>(pAttr)->GetFmtFld().GetField()->ExpandField(true)); if ( aExpand.Len() > 0 ) { const xub_StrLen nFieldPos = *pAttr->GetStart(); @@ -5083,9 +5078,9 @@ bool SwTxtNode::HasPageNumberField() xub_StrLen nEnd = Len(); for(xub_StrLen nStart=0;nStart<nEnd;nStart++) { - SwTxtFld* pFld = GetTxtFld(nStart); + const SwTxtFld* pFld = GetTxtFld(nStart); const SwField* pSwField = pFld - ? pFld->GetFld().GetFld() + ? pFld->GetFmtFld().GetField() : NULL; const SwFieldType* pType = pSwField ? pSwField->GetTyp() Modified: openoffice/trunk/main/sw/source/core/txtnode/thints.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/txtnode/thints.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/txtnode/thints.cxx (original) +++ openoffice/trunk/main/sw/source/core/txtnode/thints.cxx Tue Sep 24 15:03:38 2013 @@ -1130,7 +1130,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* { // Wenn wir ein HiddenParaField sind, dann muessen wir // ggf. fuer eine Neuberechnung des Visible-Flags sorgen. - const SwField* pFld = pAttr->GetFld().GetFld(); + const SwField* pFld = pAttr->GetFmtFld().GetField(); //JP 06-08-95: DDE-Felder bilden eine Ausnahme ASSERT( RES_DDEFLD == pFld->GetTyp()->Which() || @@ -1160,7 +1160,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* break; case RES_POSTITFLD: { - const_cast<SwFmtFld&>(pAttr->GetFld()).Broadcast( SwFmtFldHint( &((SwTxtFld*)pAttr)->GetFld(), SWFMTFLD_REMOVED ) ); + const_cast<SwFmtFld&>(pAttr->GetFmtFld()).Broadcast( SwFmtFldHint( &((SwTxtFld*)pAttr)->GetFmtFld(), SWFMTFLD_REMOVED ) ); break; } } @@ -1435,7 +1435,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * // fuer HiddenParaFields Benachrichtigungsmechanismus // anwerfen if( RES_HIDDENPARAFLD == - pAttr->GetFld().GetFld()->GetTyp()->Which() ) + pAttr->GetFmtFld().GetField()->GetTyp()->Which() ) bHiddenPara = sal_True; } break; @@ -2425,21 +2425,21 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* void SwpHints::CalcFlags() { m_bDDEFields = m_bFootnote = false; - const sal_uInt16 nSize = Count(); - const SwTxtAttr* pAttr; - for( sal_uInt16 nPos = 0; nPos < nSize; ++nPos ) + const sal_uInt16 nSize = Count(); + const SwTxtAttr* pAttr; + for( sal_uInt16 nPos = 0; nPos < nSize; ++nPos ) { - switch( ( pAttr = (*this)[ nPos ])->Which() ) - { - case RES_TXTATR_FTN: + switch( ( pAttr = (*this)[ nPos ])->Which() ) + { + case RES_TXTATR_FTN: m_bFootnote = true; if ( m_bDDEFields ) return; - break; - case RES_TXTATR_FIELD: - { - const SwField* pFld = pAttr->GetFld().GetFld(); - if( RES_DDEFLD == pFld->GetTyp()->Which() ) + break; + case RES_TXTATR_FIELD: + { + const SwField* pFld = pAttr->GetFmtFld().GetField(); + if( RES_DDEFLD == pFld->GetTyp()->Which() ) { m_bDDEFields = true; if ( m_bFootnote ) @@ -2470,10 +2470,10 @@ bool SwpHints::CalcHiddenParaField() if( RES_TXTATR_FIELD == nWhich ) { - const SwFmtFld& rFld = pTxtHt->GetFld(); - if( RES_HIDDENPARAFLD == rFld.GetFld()->GetTyp()->Which() ) + const SwFmtFld& rFld = pTxtHt->GetFmtFld(); + if( RES_HIDDENPARAFLD == rFld.GetField()->GetTyp()->Which() ) { - if( !((SwHiddenParaField*)rFld.GetFld())->IsHidden() ) + if( !((SwHiddenParaField*)rFld.GetField())->IsHidden() ) { SetHiddenParaField(false); return bOldHasHiddenParaField != bNewHasHiddenParaField; @@ -2706,7 +2706,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* sal_Bool bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode(); ((SwTxtFld*)pHint)->ChgTxtNode( &rNode ); SwDoc* pDoc = rNode.GetDoc(); - const SwField* pFld = ((SwTxtFld*)pHint)->GetFld().GetFld(); + const SwField* pFld = ((SwTxtFld*)pHint)->GetFmtFld().GetField(); if( !pDoc->IsNewFldLst() ) { @@ -2734,51 +2734,50 @@ bool SwpHints::TryInsertHint( SwTxtAttr* } } - // gehts ins normale Nodes-Array? - if( rNode.GetNodes().IsDocNodes() ) - { - sal_Bool bInsFldType = sal_False; - switch( pFld->GetTyp()->Which() ) - { - case RES_SETEXPFLD: - bInsFldType = ((SwSetExpFieldType*)pFld->GetTyp())->IsDeleted(); - if( nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)pFld->GetTyp())->GetType() ) - { - // bevor die ReferenzNummer gesetzt wird, sollte - // das Feld am richtigen FeldTypen haengen! - SwSetExpFieldType* pFldType = (SwSetExpFieldType*) - pDoc->InsertFldType( *pFld->GetTyp() ); - if( pFldType != pFld->GetTyp() ) - { - SwFmtFld* pFmtFld = (SwFmtFld*)&((SwTxtFld*)pHint) - ->GetFld(); + // gehts ins normale Nodes-Array? + if( rNode.GetNodes().IsDocNodes() ) + { + sal_Bool bInsFldType = sal_False; + switch( pFld->GetTyp()->Which() ) + { + case RES_SETEXPFLD: + bInsFldType = ((SwSetExpFieldType*)pFld->GetTyp())->IsDeleted(); + if( nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)pFld->GetTyp())->GetType() ) + { + // bevor die ReferenzNummer gesetzt wird, sollte + // das Feld am richtigen FeldTypen haengen! + SwSetExpFieldType* pFldType = (SwSetExpFieldType*) + pDoc->InsertFldType( *pFld->GetTyp() ); + if( pFldType != pFld->GetTyp() ) + { + SwFmtFld* pFmtFld = (SwFmtFld*)&((SwTxtFld*)pHint)->GetFmtFld(); pFmtFld->RegisterToFieldType( *pFldType ); - pFmtFld->GetFld()->ChgTyp( pFldType ); - } - pFldType->SetSeqRefNo( *(SwSetExpField*)pFld ); - } - break; - case RES_USERFLD: - bInsFldType = ((SwUserFieldType*)pFld->GetTyp())->IsDeleted(); - break; + pFmtFld->GetField()->ChgTyp( pFldType ); + } + pFldType->SetSeqRefNo( *(SwSetExpField*)pFld ); + } + break; + case RES_USERFLD: + bInsFldType = ((SwUserFieldType*)pFld->GetTyp())->IsDeleted(); + break; - case RES_DDEFLD: - if( pDoc->IsNewFldLst() ) - ((SwDDEFieldType*)pFld->GetTyp())->IncRefCnt(); - bInsFldType = ((SwDDEFieldType*)pFld->GetTyp())->IsDeleted(); - break; + case RES_DDEFLD: + if( pDoc->IsNewFldLst() ) + ((SwDDEFieldType*)pFld->GetTyp())->IncRefCnt(); + bInsFldType = ((SwDDEFieldType*)pFld->GetTyp())->IsDeleted(); + break; - case RES_POSTITFLD: - if ( pDoc->GetDocShell() ) - pDoc->GetDocShell()->Broadcast( SwFmtFldHint( &((SwTxtFld*)pHint)->GetFld(), SWFMTFLD_INSERTED ) ); - break; - } - if( bInsFldType ) - pDoc->InsDeletedFldType( *pFld->GetTyp() ); - } - } - break; - case RES_TXTATR_FTN : + case RES_POSTITFLD: + if ( pDoc->GetDocShell() ) + pDoc->GetDocShell()->Broadcast( SwFmtFldHint( &((SwTxtFld*)pHint)->GetFmtFld(), SWFMTFLD_INSERTED ) ); + break; + } + if( bInsFldType ) + pDoc->InsDeletedFldType( *pFld->GetTyp() ); + } + } + break; + case RES_TXTATR_FTN : ((SwTxtFtn*)pHint)->ChgTxtNode( &rNode ); break; case RES_TXTATR_REFMARK: @@ -2966,23 +2965,23 @@ bool SwpHints::TryInsertHint( SwTxtAttr* void SwpHints::DeleteAtPos( const sal_uInt16 nPos ) { SwTxtAttr *pHint = GetTextHint(nPos); - // ChainDelete( pHint ); + // ChainDelete( pHint ); NoteInHistory( pHint ); - SwpHintsArray::DeleteAtPos( nPos ); + SwpHintsArray::DeleteAtPos( nPos ); - if( RES_TXTATR_FIELD == pHint->Which() ) - { - SwFieldType* pFldTyp = ((SwTxtFld*)pHint)->GetFld().GetFld()->GetTyp(); - if( RES_DDEFLD == pFldTyp->Which() ) - { - const SwTxtNode* pNd = ((SwTxtFld*)pHint)->GetpTxtNode(); - if( pNd && pNd->GetNodes().IsDocNodes() ) - ((SwDDEFieldType*)pFldTyp)->DecRefCnt(); - ((SwTxtFld*)pHint)->ChgTxtNode( 0 ); - } - else if( RES_POSTITFLD == pFldTyp->Which() ) - { - const_cast<SwFmtFld&>(((SwTxtFld*)pHint)->GetFld()).Broadcast( SwFmtFldHint( &((SwTxtFld*)pHint)->GetFld(), SWFMTFLD_REMOVED ) ); + if( RES_TXTATR_FIELD == pHint->Which() ) + { + const SwFieldType* pFldTyp = ((SwTxtFld*)pHint)->GetFmtFld().GetField()->GetTyp(); + if( RES_DDEFLD == pFldTyp->Which() ) + { + const SwTxtNode* pNd = ((SwTxtFld*)pHint)->GetpTxtNode(); + if( pNd && pNd->GetNodes().IsDocNodes() ) + ((SwDDEFieldType*)pFldTyp)->DecRefCnt(); + ((SwTxtFld*)pHint)->ChgTxtNode( 0 ); + } + else if( RES_POSTITFLD == pFldTyp->Which() ) + { + const_cast<SwFmtFld&>(((SwTxtFld*)pHint)->GetFmtFld()).Broadcast( SwFmtFldHint( &((SwTxtFld*)pHint)->GetFmtFld(), SWFMTFLD_REMOVED ) ); } else if ( m_bHasHiddenParaField && RES_HIDDENPARAFLD == pFldTyp->Which() ) @@ -2991,8 +2990,8 @@ void SwpHints::DeleteAtPos( const sal_uI } } - CalcFlags(); - CHECK; + CalcFlags(); + CHECK; } // Ist der Hint schon bekannt, dann suche die Position und loesche ihn. @@ -3125,7 +3124,7 @@ sal_Unicode GetCharOfTxtAttr( const SwTx // #i78149: PostIt fields should not break words for spell and grammar checking if (rAttr.Which() == RES_TXTATR_FIELD && - RES_POSTITFLD == rAttr.GetFld().GetFld()->GetTyp()->Which()) + RES_POSTITFLD == rAttr.GetFmtFld().GetField()->GetTyp()->Which()) cRet = CH_TXTATR_INWORD; } break; Modified: openoffice/trunk/main/sw/source/core/undo/SwUndoField.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/undo/SwUndoField.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/undo/SwUndoField.cxx (original) +++ openoffice/trunk/main/sw/source/core/undo/SwUndoField.cxx Tue Sep 24 15:03:38 2013 @@ -85,7 +85,7 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc( void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &) { SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition()); - const SwField * pField = pTxtFld->GetFld().GetFld(); + const SwField * pField = pTxtFld->GetFmtFld().GetField(); if (pField) { @@ -96,14 +96,14 @@ void SwUndoFieldFromDoc::UndoImpl(::sw:: void SwUndoFieldFromDoc::DoImpl() { SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition()); - const SwField * pField = pTxtFld->GetFld().GetFld(); + const SwField * pField = pTxtFld->GetFmtFld().GetField(); if (pField) { pDoc->UpdateFld(pTxtFld, *pNewField, pHnt, bUpdate); - SwFmtFld* pDstFmtFld = (SwFmtFld*)&pTxtFld->GetFld(); + SwFmtFld* pDstFmtFld = (SwFmtFld*)&pTxtFld->GetFmtFld(); - if ( pDoc->GetFldType(RES_POSTITFLD, aEmptyStr,false) == pDstFmtFld->GetFld()->GetTyp() ) + if ( pDoc->GetFldType(RES_POSTITFLD, aEmptyStr,false) == pDstFmtFld->GetField()->GetTyp() ) pDoc->GetDocShell()->Broadcast( SwFmtFldHint( pDstFmtFld, SWFMTFLD_INSERTED ) ); } } Modified: openoffice/trunk/main/sw/source/core/undo/rolbck.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/undo/rolbck.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/undo/rolbck.cxx (original) +++ openoffice/trunk/main/sw/source/core/undo/rolbck.cxx Tue Sep 24 15:03:38 2013 @@ -266,20 +266,20 @@ void SwHistorySetTxt::SetInDoc( SwDoc* p SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETTXTFLDHNT ) , m_pFldType( 0 ) - , m_pFld( new SwFmtFld( *pTxtFld->GetFld().GetFld() ) ) + , m_pFld( new SwFmtFld( *pTxtFld->GetFmtFld().GetField() ) ) { // only copy if not Sys-FieldType SwDoc* pDoc = pTxtFld->GetTxtNode().GetDoc(); - m_nFldWhich = m_pFld->GetFld()->GetTyp()->Which(); + m_nFldWhich = m_pFld->GetField()->GetTyp()->Which(); if (m_nFldWhich == RES_DBFLD || m_nFldWhich == RES_USERFLD || m_nFldWhich == RES_SETEXPFLD || m_nFldWhich == RES_DDEFLD || !pDoc->GetSysFldType( m_nFldWhich )) { - m_pFldType.reset( m_pFld->GetFld()->GetTyp()->Copy() ); - m_pFld->GetFld()->ChgTyp( m_pFldType.get() ); // change field type + m_pFldType.reset( m_pFld->GetField()->GetTyp()->Copy() ); + m_pFld->GetField()->ChgTyp( m_pFldType.get() ); // change field type } m_nNodeIndex = nNodePos; m_nPos = *pTxtFld->GetStart(); @@ -287,7 +287,7 @@ SwHistorySetTxtFld::SwHistorySetTxtFld( String SwHistorySetTxtFld::GetDescription() const { - return m_pFld->GetFld()->GetDescription();; + return m_pFld->GetField()->GetDescription();; } SwHistorySetTxtFld::~SwHistorySetTxtFld() @@ -311,7 +311,7 @@ void SwHistorySetTxtFld::SetInDoc( SwDoc pNewFldType = pDoc->InsertFldType( *m_pFldType ); } - m_pFld->GetFld()->ChgTyp( pNewFldType ); // change field type + m_pFld->GetField()->ChgTyp( pNewFldType ); // change field type SwTxtNode * pTxtNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetTxtNode(); ASSERT( pTxtNd, "SwHistorySetTxtFld: no TextNode" ); Modified: openoffice/trunk/main/sw/source/core/unocore/unocrsrhelper.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unocrsrhelper.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/unocore/unocrsrhelper.cxx (original) +++ openoffice/trunk/main/sw/source/core/unocore/unocrsrhelper.cxx Tue Sep 24 15:03:38 2013 @@ -382,8 +382,8 @@ sal_Bool getCrsrPropertyValue(const SfxI { if( pAny ) { - SwXTextField* pField = SwXTextField::CreateSwXTextField(*rPam.GetDoc(), - pTxtAttr->GetFld()); + SwXTextField* pField = + SwXTextField::CreateSwXTextField( *rPam.GetDoc(),pTxtAttr->GetFmtFld() ); *pAny <<= uno::Reference< XTextField >( pField ); } } Modified: openoffice/trunk/main/sw/source/core/unocore/unofield.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unofield.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/unocore/unofield.cxx (original) +++ openoffice/trunk/main/sw/source/core/unocore/unofield.cxx Tue Sep 24 15:03:38 2013 @@ -1002,7 +1002,7 @@ OUString SwXFieldMaster::LocalizeFormula SwXTextField* SwXTextField::CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt) { - SwIterator<SwXTextField,SwFieldType> aIter(*rFmt.GetFld()->GetTyp()); + SwIterator<SwXTextField,SwFieldType> aIter(*rFmt.GetField()->GetTyp()); SwXTextField * pField = 0; SwXTextField * pTemp = aIter.First(); while (pTemp) @@ -1116,7 +1116,7 @@ SwXTextField::SwXTextField(const SwFmtFl m_pTextObject(0), m_bIsDescriptor(sal_False), m_bCallUpdate(sal_False), - m_nServiceId( lcl_GetServiceForField( *pFmtFld->GetFld() ) ), + m_nServiceId( lcl_GetServiceForField( *pFmtFld->GetField() ) ), m_pProps(0) { pDc->GetUnoCallBack()->Add(this); @@ -1168,7 +1168,7 @@ uno::Reference< beans::XPropertySet > S { if(!GetRegisteredIn()) throw uno::RuntimeException(); - pType = pFmtFld->GetFld()->GetTyp(); + pType = pFmtFld->GetField()->GetTyp(); } SwXFieldMaster* pMaster = SwIterator<SwXFieldMaster,SwFieldType>::FirstElement( *pType ); @@ -1748,7 +1748,7 @@ void SwXTextField::attachToRange( // was passiert mit dem Update der Felder ? (siehe fldmgr.cxx) if(pTxtAttr) { - const SwFmtFld& rFld = pTxtAttr->GetFld(); + const SwFmtFld& rFld = pTxtAttr->GetFmtFld(); pFmtFld = &rFld; } } @@ -2366,9 +2366,11 @@ void SwXTextField::Modify( const SfxPool const SwField* SwXTextField::GetField() const { - if(GetRegisteredIn() && pFmtFld) - return pFmtFld->GetFld(); - return 0; + if ( GetRegisteredIn() && pFmtFld ) + { + return pFmtFld->GetField(); + } + return 0; } /****************************************************************** Modified: openoffice/trunk/main/sw/source/core/unocore/unoportenum.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unoportenum.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/unocore/unoportenum.cxx (original) +++ openoffice/trunk/main/sw/source/core/unocore/unoportenum.cxx Tue Sep 24 15:03:38 2013 @@ -757,7 +757,7 @@ lcl_ExportHints( xRef = pPortion = new SwXTextPortion( pUnoCrsr, xParent, PORTION_FIELD); Reference<XTextField> xField = - SwXTextField::CreateSwXTextField(*pDoc, pAttr->GetFld()); + SwXTextField::CreateSwXTextField(*pDoc, pAttr->GetFmtFld()); pPortion->SetTextField(xField); } break; Modified: openoffice/trunk/main/sw/source/core/unocore/unotext.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unotext.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/unocore/unotext.cxx (original) +++ openoffice/trunk/main/sw/source/core/unocore/unotext.cxx Tue Sep 24 15:03:38 2013 @@ -2167,7 +2167,7 @@ lcl_ApplyCellProperties( { xCellPS->setPropertyValue(rName, rValue); } - catch (uno::Exception const& e) + catch (uno::Exception const& ) { // Apply the paragraph and char properties to the cell's content const uno::Reference< text::XText > xCellText(xCell, Modified: openoffice/trunk/main/sw/source/core/view/vprint.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/view/vprint.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/view/vprint.cxx (original) +++ openoffice/trunk/main/sw/source/core/view/vprint.cxx Tue Sep 24 15:03:38 2013 @@ -659,19 +659,22 @@ void ViewShell::PrtOle2( SwDoc *pDoc, co sal_Bool ViewShell::IsAnyFieldInDoc() const { - const SfxPoolItem* pItem; - sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); - for( sal_uInt32 n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ))) - { - const SwFmtFld* pFmtFld = (SwFmtFld*)pItem; - const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld(); - //#i101026# mod: do not include postits in field check - const SwField* pFld = pFmtFld->GetFld(); - if( pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() && (pFld->Which() != RES_POSTITFLD)) - return sal_True; - } - return sal_False; + const SfxPoolItem* pItem; + sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ))) + { + const SwFmtFld* pFmtFld = (SwFmtFld*)pItem; + const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld(); + // do not include postits in field check + const SwField* pFld = pFmtFld->GetField(); + if( pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() + && (pFld->Which() != RES_POSTITFLD)) + { + return sal_True; + } + } + return sal_False; } Modified: openoffice/trunk/main/sw/source/filter/ascii/ascatr.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ascii/ascatr.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ascii/ascatr.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ascii/ascatr.cxx Tue Sep 24 15:03:38 2013 @@ -120,8 +120,8 @@ sal_Bool SwASC_AttrIter::OutAttr( xub_St switch( pHt->Which() ) { case RES_TXTATR_FIELD: - sOut = static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld() - ->ExpandField(true); + sOut = + static_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true); break; case RES_TXTATR_FTN: Modified: openoffice/trunk/main/sw/source/filter/html/htmlatr.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/htmlatr.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/html/htmlatr.cxx (original) +++ openoffice/trunk/main/sw/source/filter/html/htmlatr.cxx Tue Sep 24 15:03:38 2013 @@ -2588,7 +2588,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, pTxtHt = pHt; sal_uInt16 nFldWhich; if( RES_TXTATR_FIELD != pHt->Which() || - ( RES_POSTITFLD != (nFldWhich = ((const SwFmtFld&)pHt->GetAttr()).GetFld()->Which()) && + ( RES_POSTITFLD != (nFldWhich = ((const SwFmtFld&)pHt->GetAttr()).GetField()->Which()) && RES_SCRIPTFLD != nFldWhich ) ) bWriteBreak = sal_False; } @@ -3415,13 +3415,13 @@ SwAttrFnTab aHTMLAttrFnTab = { /* RES_TXTATR_UNKNOWN_CONTAINER */ 0, /* RES_TXTATR_DUMMY5 */ 0, -/* RES_TXTATR_FIELD */ OutHTML_SwFmtFld, -/* RES_TXTATR_FLYCNT */ OutHTML_SwFlyCnt, -/* RES_TXTATR_FTN */ OutHTML_SwFmtFtn, +/* RES_TXTATR_FIELD */ OutHTML_SwFmtFld, +/* RES_TXTATR_FLYCNT */ OutHTML_SwFlyCnt, +/* RES_TXTATR_FTN */ OutHTML_SwFmtFtn, /* RES_TXTATR_DUMMY4 */ 0, /* RES_TXTATR_DUMMY3 */ 0, -/* RES_TXTATR_DUMMY1 */ 0, // Dummy: -/* RES_TXTATR_DUMMY2 */ 0, // Dummy: +/* RES_TXTATR_DUMMY1 */ 0, // Dummy: +/* RES_TXTATR_DUMMY2 */ 0, // Dummy: /* RES_PARATR_LINESPACING */ 0, /* RES_PARATR_ADJUST */ OutHTML_SvxAdjust, Modified: openoffice/trunk/main/sw/source/filter/html/htmlfld.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/htmlfld.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/html/htmlfld.cxx (original) +++ openoffice/trunk/main/sw/source/filter/html/htmlfld.cxx Tue Sep 24 15:03:38 2013 @@ -643,8 +643,7 @@ void SwHTMLParser::InsertComment( const break; if( RES_TXTATR_FIELD == pAttr->pItem->Which() && - RES_SCRIPTFLD == ((const SwFmtFld *)pAttr->pItem)->GetFld() - ->GetTyp()->Which() ) + RES_SCRIPTFLD == ((const SwFmtFld *)pAttr->pItem)->GetField()->GetTyp()->Which() ) { bMoveFwd = sal_False; break; Modified: openoffice/trunk/main/sw/source/filter/html/htmlfldw.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/htmlfldw.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/html/htmlfldw.cxx (original) +++ openoffice/trunk/main/sw/source/filter/html/htmlfldw.cxx Tue Sep 24 15:03:38 2013 @@ -422,7 +422,7 @@ static Writer& OutHTML_SwField( Writer& Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt ) { SwFmtFld & rFld = (SwFmtFld&)rHt; - const SwField* pFld = rFld.GetFld(); + const SwField* pFld = rFld.GetField(); const SwFieldType* pFldTyp = pFld->GetTyp(); if( RES_SETEXPFLD == pFldTyp->Which() && Modified: openoffice/trunk/main/sw/source/filter/html/swhtml.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/swhtml.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/html/swhtml.cxx (original) +++ openoffice/trunk/main/sw/source/filter/html/swhtml.cxx Tue Sep 24 15:03:38 2013 @@ -2775,24 +2775,25 @@ void SwHTMLParser::_SetAttr( sal_Bool bC } } break; - case RES_TXTATR_FIELD: - { - sal_uInt16 nFldWhich = - pPostIts ? ((const SwFmtFld *)pAttr->pItem) - ->GetFld()->GetTyp()->Which() : 0; - if( pPostIts && (RES_POSTITFLD == nFldWhich || - RES_SCRIPTFLD == nFldWhich) ) - { - pPostIts->Insert( pAttr, 0 ); - } - else - { - aFields.Insert( pAttr, aFields.Count() ); - } - } - pAttrPam->DeleteMark(); - pAttr = pPrev; - continue; + case RES_TXTATR_FIELD: + { + sal_uInt16 nFldWhich = + pPostIts + ? ((const SwFmtFld *)pAttr->pItem)->GetField()->GetTyp()->Which() + : 0; + if( pPostIts && (RES_POSTITFLD == nFldWhich || + RES_SCRIPTFLD == nFldWhich) ) + { + pPostIts->Insert( pAttr, 0 ); + } + else + { + aFields.Insert( pAttr, aFields.Count() ); + } + } + pAttrPam->DeleteMark(); + pAttr = pPrev; + continue; case RES_LR_SPACE: if( pAttrPam->GetPoint()->nNode.GetIndex() == Modified: openoffice/trunk/main/sw/source/filter/html/wrthtml.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/wrthtml.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/html/wrthtml.cxx (original) +++ openoffice/trunk/main/sw/source/filter/html/wrthtml.cxx Tue Sep 24 15:03:38 2013 @@ -897,8 +897,8 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs( if( nPos-nOldPos > 1 || RES_TXTATR_FIELD != pHt->Which() ) break; - sal_uInt16 nFldWhich = ((const SwFmtFld&)pHt->GetAttr()).GetFld() - ->GetTyp()->Which(); + const sal_uInt16 nFldWhich = + ((const SwFmtFld&)pHt->GetAttr()).GetField()->GetTyp()->Which(); if( RES_POSTITFLD!=nFldWhich && RES_SCRIPTFLD!=nFldWhich ) break; Modified: openoffice/trunk/main/sw/source/filter/rtf/rtffld.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/rtf/rtffld.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/rtf/rtffld.cxx (original) +++ openoffice/trunk/main/sw/source/filter/rtf/rtffld.cxx Tue Sep 24 15:03:38 2013 @@ -1056,7 +1056,7 @@ void SwRTFParser::ReadField() if (pFldAttr) { - const SwField *pFld = pFldAttr->GetFld().GetFld(); + const SwField *pFld = pFldAttr->GetFmtFld().GetField(); SwFieldType *pTyp = pFld ? pFld->GetTyp() : 0; ASSERT(pTyp->Which() == RES_USERFLD, "expected a user field"); if (pTyp->Which() == RES_USERFLD) Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8atr.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8atr.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/ww8atr.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/ww8atr.cxx Tue Sep 24 15:03:38 2013 @@ -878,13 +878,13 @@ bool MSWordExportBase::HasRefToObject( s SwFieldType* pType = pDoc->GetSysFldType( RES_GETREFFLD ); SwIterator<SwFmtFld, SwFieldType> aFmtFlds( *pType ); - for ( SwFmtFld* pFld = aFmtFlds.First(); pFld; pFld = aFmtFlds.Next() ) + for ( SwFmtFld* pFmtFld = aFmtFlds.First(); pFmtFld; pFmtFld = aFmtFlds.Next() ) { - if ( pFld->GetTxtFld() && nTyp == pFld->GetFld()->GetSubType() && - 0 != ( pNd = pFld->GetTxtFld()->GetpTxtNode() ) && + if ( pFmtFld->GetTxtFld() && nTyp == pFmtFld->GetField()->GetSubType() && + 0 != ( pNd = pFmtFld->GetTxtFld()->GetpTxtNode() ) && pNd->GetNodes().IsDocNodes() ) { - const SwGetRefField& rRFld = *static_cast< SwGetRefField* >( pFld->GetFld() ); + const SwGetRefField& rRFld = *static_cast< SwGetRefField* >( pFmtFld->GetField() ); switch ( nTyp ) { case REF_BOOKMARK: @@ -2616,7 +2616,7 @@ void WW8AttributeOutput::WriteExpand( co void AttributeOutputBase::TextField( const SwFmtFld& rField ) { - const SwField* pFld = rField.GetFld(); + const SwField* pFld = rField.GetField(); String sStr; // fuer optionale Parameter bool bWriteExpand = false; sal_uInt16 nSubType = pFld->GetSubType(); Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx Tue Sep 24 15:03:38 2013 @@ -1405,7 +1405,7 @@ const SfxPoolItem* SwWW8FltControlStack: bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo) { - const SwField* pFld = rFmtFld.GetFld(); + const SwField* pFld = rFmtFld.GetField(); sal_uInt16 nSubType; if(pFld && (RES_GETREFFLD == pFld->Which()) && ((REF_FOOTNOTE == (nSubType = pFld->GetSubType())) || (REF_ENDNOTE == nSubType)) @@ -1440,7 +1440,7 @@ void SwWW8FltRefStack::SetAttrInDoc(cons SwPaM aPaM(aIdx, pEntry->nMkCntnt); SwFmtFld& rFmtFld = *(SwFmtFld*)pEntry->pAttr; - SwField* pFld = rFmtFld.GetFld(); + SwField* pFld = rFmtFld.GetField(); if (!RefToVar(pFld,pEntry)) { Modified: openoffice/trunk/main/sw/source/ui/docvw/AnnotationWin.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/docvw/AnnotationWin.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/docvw/AnnotationWin.cxx (original) +++ openoffice/trunk/main/sw/source/ui/docvw/AnnotationWin.cxx Tue Sep 24 15:03:38 2013 @@ -68,7 +68,7 @@ SwAnnotationWin::SwAnnotationWin( SwEdit SwFmtFld* aField ) : SwSidebarWin( rEditWin, nBits, aMgr, aBits, rSidebarItem ) , mpFmtFld(aField) - , mpFld( static_cast<SwPostItField*>(aField->GetFld())) + , mpFld( static_cast<SwPostItField*>(aField->GetField())) , mpButtonPopup(0) { } @@ -83,7 +83,7 @@ void SwAnnotationWin::SetPostItText() // get text from SwPostItField and insert into our textview Engine()->SetModifyHdl( Link() ); Engine()->EnableUndo( sal_False ); - mpFld = static_cast<SwPostItField*>(mpFmtFld->GetFld()); + mpFld = static_cast<SwPostItField*>(mpFmtFld->GetField()); if( mpFld->GetTextObject() ) Engine()->SetText( *mpFld->GetTextObject() ); else @@ -162,7 +162,7 @@ bool SwAnnotationWin::CalcFollow() aPosition.nContent = *pTxtFld->GetStart(); SwTxtAttr * const pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( aPosition.nContent.GetIndex() - 1, RES_TXTATR_FIELD ); - const SwField* pFld = pTxtAttr ? pTxtAttr->GetFld().GetFld() : 0; + const SwField* pFld = pTxtAttr ? pTxtAttr->GetFmtFld().GetField() : 0; return pFld && (pFld->Which()== RES_POSTITFLD); } @@ -178,7 +178,7 @@ sal_uInt32 SwAnnotationWin::CountFollowi aPosition.nContent.GetIndex() + 1, RES_TXTATR_FIELD ); SwField* pFld = pTxtAttr - ? const_cast<SwField*>(pTxtAttr->GetFld().GetFld()) + ? const_cast<SwField*>(pTxtAttr->GetFmtFld().GetField()) : 0; while ( pFld && ( pFld->Which()== RES_POSTITFLD ) ) { @@ -187,7 +187,7 @@ sal_uInt32 SwAnnotationWin::CountFollowi aPosition.nContent.GetIndex() + aCount, RES_TXTATR_FIELD ); pFld = pTxtAttr - ? const_cast<SwField*>(pTxtAttr->GetFld().GetFld()) + ? const_cast<SwField*>(pTxtAttr->GetFmtFld().GetField()) : 0; } return aCount - 1; Modified: openoffice/trunk/main/sw/source/ui/docvw/PostItMgr.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/docvw/PostItMgr.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/docvw/PostItMgr.cxx (original) +++ openoffice/trunk/main/sw/source/ui/docvw/PostItMgr.cxx Tue Sep 24 15:03:38 2013 @@ -416,7 +416,7 @@ void SwPostItMgr::Notify( SfxBroadcaster { if ((*i)->pPostIt) { - sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() ); + sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetField()->GetLanguage() ); sal_uInt16 nLangWhichId = 0; switch (nScriptType) { @@ -424,7 +424,7 @@ void SwPostItMgr::Notify( SfxBroadcaster case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break; } - (*i)->pPostIt->SetLanguage( SvxLanguageItem((*i)->GetFmtFld()->GetFld()->GetLanguage(), + (*i)->pPostIt->SetLanguage( SvxLanguageItem((*i)->GetFmtFld()->GetField()->GetLanguage(), nLangWhichId) ); } break; @@ -1384,7 +1384,7 @@ sw::annotation::SwAnnotationWin* SwPostI { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { - if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld)) + if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetField() == pFld)) return dynamic_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt); } return NULL; Modified: openoffice/trunk/main/sw/source/ui/fldui/fldpage.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/fldui/fldpage.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/fldui/fldpage.cxx (original) +++ openoffice/trunk/main/sw/source/ui/fldui/fldpage.cxx Tue Sep 24 15:03:38 2013 @@ -250,7 +250,7 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() ) { - if( pFmtFld->GetFld() == m_pCurFld) + if( pFmtFld->GetField() == m_pCurFld) { pFmtFld->RegisterToFieldType(*pTyp); pTmpFld->ChgTyp(pTyp); Modified: openoffice/trunk/main/sw/source/ui/shells/textfld.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/textfld.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/shells/textfld.cxx (original) +++ openoffice/trunk/main/sw/source/ui/shells/textfld.cxx Tue Sep 24 15:03:38 2013 @@ -375,7 +375,7 @@ void SwTextShell::ExecField(SfxRequest & SwFmtFld* pSwFmtFld = aIter.First(); while( pSwFmtFld ) { - if ( pSwFmtFld->GetFld() == pPostIt ) + if ( pSwFmtFld->GetField() == pPostIt ) { pSwFmtFld->Broadcast( SwFmtFldHint( 0, SWFMTFLD_FOCUS, &GetView() ) ); break; Modified: openoffice/trunk/main/sw/source/ui/utlui/content.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/utlui/content.cxx?rev=1525917&r1=1525916&r2=1525917&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/utlui/content.cxx (original) +++ openoffice/trunk/main/sw/source/ui/utlui/content.cxx Tue Sep 24 15:03:38 2013 @@ -416,7 +416,7 @@ void SwContentType::Init(sal_Bool* pbInv if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() && (*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE ) { - String sEntry = aFmtFld->GetFld()->GetPar2(); + String sEntry = aFmtFld->GetField()->GetPar2(); RemoveNewline(sEntry); SwPostItContent* pCnt = new SwPostItContent( this, @@ -427,25 +427,6 @@ void SwContentType::Init(sal_Bool* pbInv nMemberCount++; } } - /* - // this code can be used once we want redline comments in the margin - else // redcomment - { - SwRedline* pRedline = static_cast<SwRedline*>((*i)->GetBroadCaster()); - if ( pRedline->GetComment() != String(::rtl::OUString::createFromAscii("")) ) - { - String sEntry = pRedline->GetComment(); - RemoveNewline(sEntry); - SwPostItContent* pCnt = new SwPostItContent( - this, - sEntry, // hier steht der Text - pRedline, - nMemberCount); - pMember->Insert(pCnt); - nMemberCount++; - } - } - */ } } // @@ -783,7 +764,7 @@ void SwContentType::FillMemberList(sal_B if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() && (*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE ) { - String sEntry = aFmtFld->GetFld()->GetPar2(); + String sEntry = aFmtFld->GetField()->GetPar2(); RemoveNewline(sEntry); SwPostItContent* pCnt = new SwPostItContent( this,