[Libreoffice-commits] core.git: sw/inc sw/source
Oliver-Rainer Wittmann
orw at apache.org
Fri Nov 1 15:48:54 CET 2013
sw/inc/fmtfld.hxx | 10 ++-
sw/inc/txatbase.hxx | 4 -
sw/source/core/bastyp/init.cxx | 8 +-
sw/source/core/crsr/crstrvl.cxx | 8 +-
sw/source/core/crsr/findtxt.cxx | 30 ++++-----
sw/source/core/doc/doc.cxx | 26 ++++----
sw/source/core/doc/docedt.cxx | 4 -
sw/source/core/doc/docfld.cxx | 66 ++++++++++-----------
sw/source/core/doc/doctxm.cxx | 2
sw/source/core/docnode/nodedump.cxx | 10 +--
sw/source/core/docnode/nodes.cxx | 9 ++
sw/source/core/edit/edattr.cxx | 2
sw/source/core/edit/edfld.cxx | 8 +-
sw/source/core/edit/edfldexp.cxx | 10 +--
sw/source/core/fields/authfld.cxx | 4 -
sw/source/core/fields/cellfml.cxx | 2
sw/source/core/fields/dbfld.cxx | 22 +++----
sw/source/core/fields/docufld.cxx | 18 ++---
sw/source/core/fields/expfld.cxx | 12 +--
sw/source/core/fields/fldlst.cxx | 16 ++---
sw/source/core/fields/reffld.cxx | 26 ++++----
sw/source/core/fields/tblcalc.cxx | 2
sw/source/core/frmedt/fefly1.cxx | 2
sw/source/core/frmedt/tblsel.cxx | 3
sw/source/core/inc/docfld.hxx | 2
sw/source/core/inc/wrong.hxx | 8 +-
sw/source/core/layout/atrfrm.cxx | 36 +++++------
sw/source/core/layout/trvlfrm.cxx | 2
sw/source/core/table/swtable.cxx | 2
sw/source/core/text/EnhancedPDFExportHelper.cxx | 6 -
sw/source/core/text/inftxt.cxx | 2
sw/source/core/text/itratr.cxx | 4 -
sw/source/core/text/txtfld.cxx | 4 -
sw/source/core/tox/txmsrt.cxx | 17 ++---
sw/source/core/txtnode/atrfld.cxx | 74 ++++++++++++------------
sw/source/core/txtnode/ndtxt.cxx | 20 ++----
sw/source/core/txtnode/thints.cxx | 29 ++++-----
sw/source/core/undo/SwUndoField.cxx | 9 +-
sw/source/core/undo/rolbck.cxx | 12 +--
sw/source/core/unocore/unocrsrhelper.cxx | 2
sw/source/core/unocore/unofield.cxx | 12 ++-
sw/source/core/unocore/unoportenum.cxx | 4 -
sw/source/core/view/vprint.cxx | 9 +-
sw/source/filter/ascii/ascatr.cxx | 4 -
sw/source/filter/html/htmlatr.cxx | 2
sw/source/filter/html/htmlfld.cxx | 3
sw/source/filter/html/htmlfldw.cxx | 2
sw/source/filter/html/swhtml.cxx | 5 -
sw/source/filter/html/wrthtml.cxx | 4 -
sw/source/filter/ww8/ww8atr.cxx | 10 +--
sw/source/filter/ww8/ww8par.cxx | 4 -
sw/source/ui/docvw/AnnotationWin.cxx | 10 +--
sw/source/ui/docvw/PostItMgr.cxx | 6 -
sw/source/ui/fldui/fldpage.cxx | 2
sw/source/ui/shells/textfld.cxx | 2
sw/source/ui/utlui/content.cxx | 4 -
56 files changed, 313 insertions(+), 303 deletions(-)
New commits:
commit 0921642e7f15d3abf6a96e19529b313cf8fd1a8e
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Tue Sep 24 15:03:38 2013 +0000
Related: #i33737# some minor refactoring in advance
(cherry picked from commit b27ff0a078b7c1b32e88041f25314eaad267618b)
Conflicts:
sw/source/core/bastyp/init.cxx
sw/source/core/crsr/findtxt.cxx
sw/source/core/doc/doc.cxx
sw/source/core/doc/docfld.cxx
sw/source/core/edit/edfld.cxx
sw/source/core/fields/authfld.cxx
sw/source/core/fields/dbfld.cxx
sw/source/core/fields/docufld.cxx
sw/source/core/fields/expfld.cxx
sw/source/core/fields/fldlst.cxx
sw/source/core/fields/reffld.cxx
sw/source/core/frmedt/tblsel.cxx
sw/source/core/inc/wrong.hxx
sw/source/core/layout/atrfrm.cxx
sw/source/core/text/EnhancedPDFExportHelper.cxx
sw/source/core/text/atrstck.cxx
sw/source/core/text/itratr.cxx
sw/source/core/tox/txmsrt.cxx
sw/source/core/txtnode/atrfld.cxx
sw/source/core/txtnode/ndtxt.cxx
sw/source/core/txtnode/thints.cxx
sw/source/core/undo/SwUndoField.cxx
sw/source/core/undo/rolbck.cxx
sw/source/core/unocore/unocrsrhelper.cxx
sw/source/core/unocore/unofield.cxx
sw/source/core/unocore/unoportenum.cxx
sw/source/core/unocore/unotext.cxx
sw/source/filter/rtf/rtffld.cxx
sw/source/filter/ww8/ww8atr.cxx
sw/source/filter/ww8/ww8par.cxx
sw/source/ui/docvw/AnnotationWin.cxx
sw/source/ui/utlui/content.cxx
Change-Id: I372cfaed881188266c359867879ae92c8d45fee1
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index f18d31a..67ace36 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -76,8 +76,14 @@ public:
virtual bool GetInfo( SfxPoolItem& rInfo ) const;
- const SwField *GetFld() const { return pField; }
- SwField *GetFld() { return pField; }
+ const SwField* GetField() const
+ {
+ return pField;
+ }
+ SwField* GetField()
+ {
+ return pField;
+ }
/**
Sets current field.
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index cfa278e..eeba841 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -109,7 +109,7 @@ public:
inline const SwFmtCharFmt &GetCharFmt() const;
inline const SwFmtAutoFmt &GetAutoFmt() const;
- inline const SwFmtFld &GetFld() const;
+ inline const SwFmtFld &GetFmtFld() const;
inline const SwFmtFtn &GetFtn() const;
inline const SwFmtFlyCnt &GetFlyCnt() const;
inline const SwTOXMark &GetTOXMark() const;
@@ -180,7 +180,7 @@ inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
return (const SwFmtAutoFmt&)(*m_pAttr);
}
-inline const SwFmtFld& SwTxtAttr::GetFld() const
+inline const SwFmtFld& SwTxtAttr::GetFmtFld() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD );
return (const SwFmtFld&)(*m_pAttr);
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index c0498d4..f520125 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -502,15 +502,15 @@ void _InitCore()
aAttrTab[ RES_CHRATR_DUMMY2 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_CHRATR_DUMMY2 );
aAttrTab[ RES_CHRATR_DUMMY3 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_CHRATR_DUMMY3 );
- aAttrTab[ RES_TXTATR_AUTOFMT- POOLATTR_BEGIN ] = new SwFmtAutoFmt;
- aAttrTab[ RES_TXTATR_INETFMT - POOLATTR_BEGIN ] = new SwFmtINetFmt( OUString(), OUString() );
aAttrTab[ RES_TXTATR_REFMARK - POOLATTR_BEGIN ] = new SwFmtRefMark( aEmptyOUStr );
aAttrTab[ RES_TXTATR_TOXMARK - POOLATTR_BEGIN ] = new SwTOXMark;
+ aAttrTab[ RES_TXTATR_META - POOLATTR_BEGIN ] = SwFmtMeta::CreatePoolDefault(RES_TXTATR_META);
+ aAttrTab[ RES_TXTATR_METAFIELD - POOLATTR_BEGIN ] = SwFmtMeta::CreatePoolDefault(RES_TXTATR_METAFIELD);
+ aAttrTab[ RES_TXTATR_AUTOFMT- POOLATTR_BEGIN ] = new SwFmtAutoFmt;
+ aAttrTab[ RES_TXTATR_INETFMT - POOLATTR_BEGIN ] = new SwFmtINetFmt( OUString(), OUString() );
aAttrTab[ RES_TXTATR_CHARFMT- POOLATTR_BEGIN ] = new SwFmtCharFmt( 0 );
aAttrTab[ RES_TXTATR_CJK_RUBY - POOLATTR_BEGIN ] = new SwFmtRuby( aEmptyOUStr );
aAttrTab[ RES_TXTATR_UNKNOWN_CONTAINER - POOLATTR_BEGIN ] = new SvXMLAttrContainerItem( RES_TXTATR_UNKNOWN_CONTAINER );
- aAttrTab[ RES_TXTATR_META - POOLATTR_BEGIN ] = SwFmtMeta::CreatePoolDefault(RES_TXTATR_META);
- aAttrTab[ RES_TXTATR_METAFIELD - POOLATTR_BEGIN ] = SwFmtMeta::CreatePoolDefault(RES_TXTATR_METAFIELD);
aAttrTab[ RES_TXTATR_FIELD- POOLATTR_BEGIN ] = new SwFmtFld;
aAttrTab[ RES_TXTATR_FLYCNT - POOLATTR_BEGIN ] = new SwFmtFlyCnt( 0 );
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index a512e39..3fc909c 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -614,9 +614,9 @@ static void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
bool bSubType = nSubType != USHRT_MAX;
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
if( 0 != ( pTxtFld = pFmtFld->GetTxtFld() ) &&
- ( !bChkInpFlag || ((SwSetExpField*)pTxtFld->GetFld().GetFld())
+ ( !bChkInpFlag || ((SwSetExpField*)pTxtFld->GetFmtFld().GetField())
->GetInputFlag() ) &&
- (!bSubType || (pFmtFld->GetFld()->GetSubType()
+ (!bSubType || (pFmtFld->GetField()->GetSubType()
& 0xff ) == nSubType ))
{
SwCntntFrm* pCFrm;
@@ -1099,7 +1099,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
pTxtAttr = pTxtNd->GetTxtAttrForCharAt(
aPos.nContent.GetIndex(), RES_TXTATR_FIELD );
const SwField* pFld = pTxtAttr
- ? pTxtAttr->GetFld().GetFld()
+ ? pTxtAttr->GetFmtFld().GetField()
: 0;
if( SwContentAtPos::SW_CLICKFIELD & rCntntAtPos.eCntntAtPos &&
pFld && !pFld->HasClickHdl() )
@@ -1520,7 +1520,7 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
{
SwTxtAttr* pTxtAttr = pTxtNd->GetTxtAttrForCharAt(
pCursorPos->nContent.GetIndex(), RES_TXTATR_FIELD );
- const SwField* pFld = pTxtAttr ? pTxtAttr->GetFld().GetFld() : 0;
+ const SwField* pFld = pTxtAttr ? pTxtAttr->GetFmtFld().GetField() : 0;
if ( pFld && pFld->Which()== RES_POSTITFLD )
{
pPostItFld = static_cast<const SwPostItField*>(pFld);
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 6f32279..d38a5aa 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -111,13 +111,13 @@ lcl_CleanStr(const SwTxtNode& rNd, xub_StrLen const nStart, xub_StrLen& rEnd,
const SwTxtAttr* pHt = (*pHts)[n];
if ( pHt->HasDummyChar() && (nStt >= nStart) )
{
- switch( pHt->Which() )
+ switch( pHt->Which() )
{
case RES_TXTATR_FLYCNT:
case RES_TXTATR_FTN:
- case RES_TXTATR_FIELD:
+ case RES_TXTATR_FIELD:
case RES_TXTATR_REFMARK:
- case RES_TXTATR_TOXMARK:
+ case RES_TXTATR_TOXMARK:
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
{
@@ -130,24 +130,24 @@ lcl_CleanStr(const SwTxtNode& rNd, xub_StrLen const nStart, xub_StrLen& rEnd,
// end (might be normal 0x7f).
bool bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
(static_cast<SwTxtFld const*>(pHt)
- ->GetFld().GetFld()->ExpandField(true).isEmpty());
+ ->GetFmtFld().GetField()->ExpandField(true).isEmpty());
if ( bEmpty && nStart == nAkt )
- {
+ {
rArr.push_back( nAkt );
--rEnd;
buf.remove(nAkt, 1);
- }
+ }
else
- {
+ {
if ( bEmpty )
aReplaced.push_back( nAkt );
buf[nAkt] = '\x7f';
}
- }
- break;
- default:
- OSL_FAIL( "unknown case in lcl_CleanStr" );
+ }
break;
+ default:
+ OSL_FAIL( "unknown case in lcl_CleanStr" );
+ break;
}
}
++n;
@@ -188,7 +188,7 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
aIndex++;
const SwTxtAttr* pTxtAttr = (*pHts)[i];
if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
- (pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD))
+ (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
{
aCount--;
if (!aCount)
@@ -201,7 +201,7 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
{
const SwTxtAttr* pTxtAttr = (*pHts)[i];
if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
- (pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD))
+ (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
break;
else
aIndex++;
@@ -271,7 +271,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
xub_StrLen aPos = *(*pHts)[i]->GetStart();
const SwTxtAttr* pTxtAttr = (*pHts)[i];
if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
- (pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD))
+ (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
{
if ( (aPos >= nStart) && (aPos <= nEnd) )
aNumberPostits++;
@@ -356,7 +356,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
if ( (bSrchForward && (GetPostIt(aLoop + aIgnore,pHts) < pHts->Count()) ) || ( !bSrchForward && (aLoop!=0) ))
{
const SwTxtAttr* pTxtAttr = bSrchForward ? (*pHts)[GetPostIt(aLoop+aIgnore,pHts)] : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)];
- if ( pPostItMgr && pPostItMgr->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) )
+ if ( pPostItMgr && pPostItMgr->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFmtFld(),rSearchOpt,bSrchForward) )
{
bFound = true ;
break;
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index f580a1c..98992d69 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1149,7 +1149,7 @@ struct _PostItFld : public _SetGetExpFld
SwPostItField* GetPostIt() const
{
- return (SwPostItField*) GetFld()->GetFld().GetFld();
+ return (SwPostItField*) GetTxtFld()->GetFmtFld().GetField();
}
};
@@ -1165,7 +1165,7 @@ sal_uInt16 _PostItFld::GetPageNo(
//but the PostIt's first occurrence in the selected area.
rVirtPgNo = 0;
sal_uInt16 nPos = GetCntnt();
- SwIterator<SwTxtFrm,SwTxtNode> aIter( GetFld()->GetTxtNode() );
+ SwIterator<SwTxtFrm,SwTxtNode> aIter( GetTxtFld()->GetTxtNode() );
for( SwTxtFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
{
if( pFrm->GetOfst() > nPos ||
@@ -1293,7 +1293,7 @@ void SwDoc::CalculatePagesForPrinting(
bool bIsPDFExport,
sal_Int32 nDocPageCount )
{
- const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 );
+ const sal_Int64 nContent = rOptions.getIntValue( "PrintContent", 0 );
const bool bPrintSelection = nContent == 2;
// properties to take into account when calcualting the set of pages
@@ -1522,7 +1522,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// 0 -> print all pages (default if aPageRange is empty)
// 1 -> print range according to PageRange
// 2 -> print selection
- const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 );
+ const sal_Int64 nContent = rOptions.getIntValue( "PrintContent", 0 );
if (nContent == 1)
aPageRange = rOptions.getStringValue( "PageRange", OUString() );
if (aPageRange.isEmpty()) // empty string -> print all
@@ -1599,7 +1599,9 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
}
// make sure that all pages are in correct order
- sal_uInt16 nSPg = 0, nEPg = aVec.size(), nStep = 1;
+ sal_uInt16 nSPg = 0;
+ sal_uInt32 nEPg = aVec.size();
+ sal_uInt16 nStep = 1;
if ( 0 == (nEPg & 1 )) // there are no uneven ones!
--nEPg;
@@ -1690,7 +1692,7 @@ bool SwDoc::IncrementalDocStatCalculate(long nChars, bool bFields)
if (pFmtFld->IsFldInDoc())
{
SwPostItField const * const pField(
- static_cast<SwPostItField const*>(pFmtFld->GetFld()));
+ static_cast<SwPostItField const*>(pFmtFld->GetField()));
mpDocStat->nAllPara += pField->GetNumberOfParagraphs();
}
}
@@ -1834,8 +1836,8 @@ sal_uInt16 SwDoc::GetRefMarks( std::vector<OUString>* pNames ) const
const SfxPoolItem* pItem;
const SwTxtRefMark* pTxtRef;
- sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
- sal_uInt32 nCount = 0;
+ const sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ sal_uInt16 nCount = 0;
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) &&
@@ -1846,7 +1848,7 @@ sal_uInt16 SwDoc::GetRefMarks( std::vector<OUString>* pNames ) const
OUString pTmp(((SwFmtRefMark*)pItem)->GetRefName());
pNames->insert(pNames->begin() + nCount, pTmp);
}
- nCount ++;
+ ++nCount;
}
return nCount;
@@ -2406,8 +2408,8 @@ bool SwDoc::ConvertFieldsToText()
if (!bSkip)
{
bool bInHeaderFooter = IsInHeaderFooter(SwNodeIndex(*pTxtFld->GetpTxtNode()));
- const SwFmtFld& rFmtFld = pTxtFld->GetFld();
- const SwField* pField = rFmtFld.GetFld();
+ const SwFmtFld& rFmtFld = pTxtFld->GetFmtFld();
+ const SwField* pField = rFmtFld.GetField();
//#i55595# some fields have to be excluded in headers/footers
sal_uInt16 nWhich = pField->GetTyp()->Which();
@@ -2631,7 +2633,7 @@ SwField * SwDoc::GetField(const SwPosition & rPos)
{
SwTxtFld * const pAttr = GetTxtFld(rPos);
- return (pAttr) ? const_cast<SwField *>( pAttr->GetFld().GetFld() ) : 0;
+ return (pAttr) ? const_cast<SwField *>( pAttr->GetFmtFld().GetField() ) : 0;
}
SwTxtFld * SwDoc::GetTxtFld(const SwPosition & rPos)
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 15792b0..261b28d 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1617,9 +1617,9 @@ bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam)
if (pTxtNd->GetTxt()[nIndex] == CH_TXTATR_INWORD)
{
SwTxtAttr* pTxtAttr = pTxtNd->GetTxtAttrForCharAt(nIndex, RES_TXTATR_FIELD);
- if (pTxtAttr && pTxtAttr->GetFld().GetFld()->Which() == RES_POSTITFLD)
+ if (pTxtAttr && pTxtAttr->GetFmtFld().GetField()->Which() == RES_POSTITFLD)
{
- const SwPostItField* pField = dynamic_cast<const SwPostItField*>(pTxtAttr->GetFld().GetFld());
+ const SwPostItField* pField = dynamic_cast<const SwPostItField*>(pTxtAttr->GetFmtFld().GetField());
IDocumentMarkAccess::const_iterator_t ppMark = getIDocumentMarkAccess()->findMark(pField->GetName());
if (ppMark != getIDocumentMarkAccess()->getMarksEnd())
getIDocumentMarkAccess()->deleteMark(ppMark);
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 43850ed..68cfd8d 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -417,7 +417,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
{
if( pFmtFld->GetTxtFld() )
{
- SwTblField* pFld = (SwTblField*)pFmtFld->GetFld();
+ SwTblField* pFld = (SwTblField*)pFmtFld->GetField();
if( pUpdtFld )
{
@@ -502,7 +502,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
// mba: do we really need this "optimization"? Is it still valid?
SwTblField* pFld;
if( !pFmtFld->GetTxtFld() || (nsSwExtendedSubType::SUB_CMD &
- (pFld = (SwTblField*)pFmtFld->GetFld())->GetSubType() ))
+ (pFld = (SwTblField*)pFmtFld->GetField())->GetSubType() ))
continue;
// needs to be recalculated
@@ -1013,11 +1013,11 @@ static OUString lcl_GetDBVarName( SwDoc& rDoc, SwDBNameInfField& rDBFld )
static void lcl_CalcFld( SwDoc& rDoc, SwCalc& rCalc, const _SetGetExpFld& rSGEFld,
SwNewDBMgr* pMgr )
{
- const SwTxtFld* pTxtFld = rSGEFld.GetFld();
+ const SwTxtFld* pTxtFld = rSGEFld.GetTxtFld();
if( !pTxtFld )
return ;
- const SwField* pFld = pTxtFld->GetFld().GetFld();
+ const SwField* pFld = pTxtFld->GetFmtFld().GetField();
const sal_uInt16 nFldWhich = pFld->GetTyp()->Which();
if( RES_SETEXPFLD == nFldWhich )
@@ -1129,11 +1129,11 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, sal_uInt16& rTblSize,
for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != itLast; ++it )
{
- const SwTxtFld* pTxtFld = (*it)->GetFld();
+ const SwTxtFld* pTxtFld = (*it)->GetTxtFld();
if( !pTxtFld )
continue;
- const SwField* pFld = pTxtFld->GetFld().GetFld();
+ const SwField* pFld = pTxtFld->GetFmtFld().GetField();
switch( pFld->GetTyp()->Which() )
{
case RES_SETEXPFLD:
@@ -1302,15 +1302,15 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
continue;
}
- SwTxtFld* pTxtFld = (SwTxtFld*)(*it)->GetFld();
+ SwTxtFld* pTxtFld = (SwTxtFld*)(*it)->GetTxtFld();
if( !pTxtFld )
{
OSL_ENSURE( !this, "what's wrong now'" );
continue;
}
- SwFmtFld* pFmtFld = (SwFmtFld*)&pTxtFld->GetFld();
- SwField* pFld = pFmtFld->GetFld();
+ SwFmtFld* pFmtFld = (SwFmtFld*)&pTxtFld->GetFmtFld();
+ const SwField* pFld = pFmtFld->GetField();
switch( nWhich = pFld->GetTyp()->Which() )
{
@@ -1626,11 +1626,9 @@ const SwDBData& SwDoc::GetDBDesc()
if(pFld->IsFldInDoc())
{
if(RES_DBFLD == nWhich)
- maDBData =
- (static_cast < SwDBFieldType * > (pFld->GetFld()->GetTyp()))
- ->GetDBData();
+ maDBData = (static_cast < SwDBFieldType * > (pFld->GetField()->GetTyp()))->GetDBData();
else
- maDBData = (static_cast < SwDBNameInfField* > (pFld->GetFld()))->GetRealDBData();
+ maDBData = (static_cast < SwDBNameInfField* > (pFld->GetField()))->GetRealDBData();
break;
}
}
@@ -1699,7 +1697,7 @@ void SwDoc::GetAllUsedDB( std::vector<OUString>& rDBNameList,
if( !pTxtFld || !pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
continue;
- const SwField* pFld = pFmtFld->GetFld();
+ const SwField* pFld = pFmtFld->GetField();
switch( pFld->GetTyp()->Which() )
{
case RES_DBFLD:
@@ -1849,7 +1847,7 @@ void SwDoc::ChangeDBFields( const std::vector<OUString>& rOldNames,
if( !pTxtFld || !pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
continue;
- SwField* pFld = pFmtFld->GetFld();
+ SwField* pFld = pFmtFld->GetField();
bool bExpand = false;
switch( pFld->GetTyp()->Which() )
@@ -2002,18 +2000,18 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
{
SwFieldType* pFldType = GetSysFldType( aTypes[ nStt ] );
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
- for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
{
- if( pFld && pFld->GetTxtFld() )
+ if( pFmtFld && pFmtFld->GetTxtFld() )
{
bool bChgd = false;
switch( aTypes[ nStt ] )
{
case RES_DOCINFOFLD:
- if( ((SwDocInfoField*)pFld->GetFld())->IsFixed() )
+ if( ((SwDocInfoField*)pFmtFld->GetField())->IsFixed() )
{
bChgd = true;
- SwDocInfoField* pDocInfFld = (SwDocInfoField*)pFld->GetFld();
+ SwDocInfoField* pDocInfFld = (SwDocInfoField*)pFmtFld->GetField();
pDocInfFld->SetExpansion( ((SwDocInfoFieldType*)
pDocInfFld->GetTyp())->Expand(
pDocInfFld->GetSubType(),
@@ -2024,10 +2022,10 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
break;
case RES_AUTHORFLD:
- if( ((SwAuthorField*)pFld->GetFld())->IsFixed() )
+ if( ((SwAuthorField*)pFmtFld->GetField())->IsFixed() )
{
bChgd = true;
- SwAuthorField* pAuthorFld = (SwAuthorField*)pFld->GetFld();
+ SwAuthorField* pAuthorFld = (SwAuthorField*)pFmtFld->GetField();
pAuthorFld->SetExpansion( ((SwAuthorFieldType*)
pAuthorFld->GetTyp())->Expand(
pAuthorFld->GetFormat() ) );
@@ -2035,10 +2033,10 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
break;
case RES_EXTUSERFLD:
- if( ((SwExtUserField*)pFld->GetFld())->IsFixed() )
+ if( ((SwExtUserField*)pFmtFld->GetField())->IsFixed() )
{
bChgd = true;
- SwExtUserField* pExtUserFld = (SwExtUserField*)pFld->GetFld();
+ SwExtUserField* pExtUserFld = (SwExtUserField*)pFmtFld->GetField();
pExtUserFld->SetExpansion( ((SwExtUserFieldType*)
pExtUserFld->GetTyp())->Expand(
pExtUserFld->GetSubType(),
@@ -2047,20 +2045,20 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
break;
case RES_DATETIMEFLD:
- if( ((SwDateTimeField*)pFld->GetFld())->IsFixed() )
+ if( ((SwDateTimeField*)pFmtFld->GetField())->IsFixed() )
{
bChgd = true;
- ((SwDateTimeField*)pFld->GetFld())->SetDateTime(
+ ((SwDateTimeField*)pFmtFld->GetField())->SetDateTime(
DateTime(Date(nDate), Time(nTime)) );
}
break;
case RES_FILENAMEFLD:
- if( ((SwFileNameField*)pFld->GetFld())->IsFixed() )
+ if( ((SwFileNameField*)pFmtFld->GetField())->IsFixed() )
{
bChgd = true;
SwFileNameField* pFileNameFld =
- (SwFileNameField*)pFld->GetFld();
+ (SwFileNameField*)pFmtFld->GetField();
pFileNameFld->SetExpansion( ((SwFileNameFieldType*)
pFileNameFld->GetTyp())->Expand(
pFileNameFld->GetFormat() ) );
@@ -2070,7 +2068,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
// Trigger formatting
if( bChgd )
- pFld->ModifyNotification( 0, 0 );
+ pFmtFld->ModifyNotification( 0, 0 );
}
}
}
@@ -2142,7 +2140,7 @@ void SwDoc::ChangeAuthorityData( const SwAuthEntry* pNewData )
void SwDocUpdtFld::InsDelFldInFldLst( bool bIns, const SwTxtFld& rFld )
{
- sal_uInt16 nWhich = rFld.GetFld().GetFld()->GetTyp()->Which();
+ const sal_uInt16 nWhich = rFld.GetFmtFld().GetField()->GetTyp()->Which();
switch( nWhich )
{
case RES_DBFLD:
@@ -2274,7 +2272,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
continue;
OUString sFormula;
- const SwField* pFld = pFmtFld->GetFld();
+ const SwField* pFld = pFmtFld->GetField();
switch( nWhich = pFld->GetTyp()->Which() )
{
case RES_DBSETNUMBERFLD:
@@ -2408,12 +2406,12 @@ void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, sal_uInt16 nFldWhich )
// always set the BodyTxtFlag in GetExp or DB fields
if( RES_GETEXPFLD == nFldWhich )
{
- SwGetExpField* pGetFld = (SwGetExpField*)rTFld.GetFld().GetFld();
+ SwGetExpField* pGetFld = (SwGetExpField*)rTFld.GetFmtFld().GetField();
pGetFld->ChgBodyTxtFlag( bIsInBody );
}
else if( RES_DBFLD == nFldWhich )
{
- SwDBField* pDBFld = (SwDBField*)rTFld.GetFld().GetFld();
+ SwDBField* pDBFld = (SwDBField*)rTFld.GetFmtFld().GetField();
pDBFld->ChgBodyTxtFlag( bIsInBody );
}
@@ -2554,8 +2552,8 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
bool bTblSelBreak = false;
- SwFmtFld * pDstFmtFld = (SwFmtFld*)&pDstTxtFld->GetFld();
- SwField * pDstFld = pDstFmtFld->GetFld();
+ SwFmtFld * pDstFmtFld = (SwFmtFld*)&pDstTxtFld->GetFmtFld();
+ SwField * pDstFld = pDstFmtFld->GetField();
sal_uInt16 nFldWhich = rSrcFld.GetTyp()->Which();
SwNodeIndex aTblNdIdx(pDstTxtFld->GetTxtNode());
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 94a2f8a..ec8409f 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1273,7 +1273,7 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
( !IsFromChapter() ||
::lcl_FindChapterNode( rTxtNode, 0 ) == pOwnChapterNode ) )
{
- const SwSetExpField* pSeqField = dynamic_cast< const SwSetExpField* >( pFmtFld->GetFld() );
+ const SwSetExpField* pSeqField = dynamic_cast< const SwSetExpField* >( pFmtFld->GetField() );
OUString sName = GetSequenceName();
sName += OUString( cSequenceMarkSeparator );
sName += OUString::number( pSeqField->GetSeqNumber() );
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 82a3904..fc3c7f1 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -160,20 +160,20 @@ void SwFldTypes::dumpAsXml( xmlTextWriterPtr w )
writer.writeFormatAttribute("ptr", "%p", pCurFldFmt);
writer.writeFormatAttribute("pTxtAttr", "%p", pCurFldFmt->GetTxtFld());
const char* name = "???";
- switch(pCurFldFmt->GetFld()->GetTyp()->Which())
+ switch(pCurFldFmt->GetField()->GetTyp()->Which())
{
case RES_PAGENUMBERFLD: name = "swpagenumberfield"; break;
case RES_POSTITFLD: name = "swpostitfield"; break;
case RES_DATETIMEFLD: name = "swdatetimefield"; break;
default:
- SAL_INFO("sw.core", "unhandled field type " << pCurFldFmt->GetFld()->GetTyp()->Which());
+ SAL_INFO("sw.core", "unhandled field type " << pCurFldFmt->GetField()->GetTyp()->Which());
break;
}
writer.startElement(name);
- writer.writeFormatAttribute("ptr", "%p", pCurFldFmt->GetFld());
- if (pCurFldFmt->GetFld()->GetTyp()->Which() == RES_POSTITFLD)
+ writer.writeFormatAttribute("ptr", "%p", pCurFldFmt->GetField());
+ if (pCurFldFmt->GetField()->GetTyp()->Which() == RES_POSTITFLD)
{
- const SwPostItField* pField = dynamic_cast<const SwPostItField*>(pCurFldFmt->GetFld());
+ const SwPostItField* pField = dynamic_cast<const SwPostItField*>(pCurFldFmt->GetField());
OString txt8 = OUStringToOString(pField->GetName(), RTL_TEXTENCODING_UTF8);
writer.writeFormatAttribute("name", "%s", BAD_CAST( txt8.getStr()));
}
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 54f5e2e..f383902 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -269,10 +269,15 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
static_cast<SwTxtFld*>(pAttr);
rNds.GetDoc()->InsDelFldInFldLst( !bToUndo, *pTxtFld );
- const SwFieldType* pTyp = pTxtFld->GetFld().GetFld()->GetTyp();
+ const SwFieldType* pTyp = pTxtFld->GetFmtFld().GetField()->GetTyp();
if ( RES_POSTITFLD == pTyp->Which() )
{
- rNds.GetDoc()->GetDocShell()->Broadcast( SwFmtFldHint( &pTxtFld->GetFld(), pTxtFld->GetFld().IsFldInDoc() ? SWFMTFLD_INSERTED : SWFMTFLD_REMOVED ) );
+ rNds.GetDoc()->GetDocShell()->Broadcast(
+ SwFmtFldHint(
+ &pTxtFld->GetFmtFld(),
+ ( pTxtFld->GetFmtFld().IsFldInDoc()
+ ? SWFMTFLD_INSERTED
+ : SWFMTFLD_REMOVED ) ) );
}
else if( RES_DDEFLD == pTyp->Which() )
{
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 8e01455..131f314 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -502,7 +502,7 @@ static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
// defined as weak-script ?
if ( RES_TXTATR_FIELD == pAttr->Which() )
{
- const SwField* const pFld = pAttr->GetFld().GetFld();
+ const SwField* const pFld = pAttr->GetFmtFld().GetField();
if (pFld)
{
sExp += pFld->ExpandField(true);
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 4d40496..b20d04d 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -235,7 +235,7 @@ SwField* SwEditShell::GetCurFld() const
(pCrsr->End()->nContent.GetIndex() -
pCrsr->Start()->nContent.GetIndex()) <= 1)
{
- pCurFld = (SwField*)pTxtFld->GetFld().GetFld();
+ pCurFld = (SwField*)pTxtFld->GetFmtFld().GetField();
// Table formula? Convert internal into external name:
if( RES_TABLEFLD == pCurFld->GetTyp()->Which() )
{
@@ -264,7 +264,7 @@ static SwTxtFld* lcl_FindInputFld( SwDoc* pDoc, SwField& rFld )
for( n = 0; n < nMaxItems; ++n )
if( 0 != (pItem =
pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )
- && ((SwFmtFld*)pItem)->GetFld() == &rFld )
+ && ((SwFmtFld*)pItem)->GetField() == &rFld )
{
pTFld = ((SwFmtFld*)pItem)->GetTxtFld();
break;
@@ -333,8 +333,8 @@ void SwEditShell::UpdateFlds( SwField &rFld )
if( 0 != (pTxtFld = GetDocTxtFld( pCurStt )) )
{
- pFmtFld = (SwFmtFld*)&pTxtFld->GetFld();
- SwField *pCurFld = pFmtFld->GetFld();
+ pFmtFld = (SwFmtFld*)&pTxtFld->GetFmtFld();
+ SwField *pCurFld = pFmtFld->GetField();
// if there are mixed field types
if( pCurFld->GetTyp()->Which() !=
diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx
index 7def93e..6438301 100644
--- a/sw/source/core/edit/edfldexp.cxx
+++ b/sw/source/core/edit/edfldexp.cxx
@@ -52,13 +52,13 @@ sal_Bool SwEditShell::IsFieldDataSourceAvailable(OUString& rUsedDataSource) cons
case RES_DBFLD:
{
SwIterator<SwFmtFld,SwFieldType> aIter( rFldType );
- SwFmtFld* pFld = aIter.First();
- while(pFld)
+ SwFmtFld* pFmtFld = aIter.First();
+ while(pFmtFld)
{
- if(pFld->IsFldInDoc())
+ if(pFmtFld->IsFldInDoc())
{
const SwDBData& rData =
- ((SwDBFieldType*)pFld->GetFld()->GetTyp())->GetDBData();
+ ((SwDBFieldType*)pFmtFld->GetField()->GetTyp())->GetDBData();
try
{
return xDBContext->getByName(rData.sDataSource).hasValue();
@@ -69,7 +69,7 @@ sal_Bool SwEditShell::IsFieldDataSourceAvailable(OUString& rUsedDataSource) cons
return sal_False;
}
}
- pFld = aIter.Next();
+ pFmtFld = aIter.Next();
}
}
break;
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 9a86d3d..3f3e1af 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -275,7 +275,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
if(!pTxtFld || !pTxtFld->GetpTxtNode())
{
#if OSL_DEBUG_LEVEL > 0
- if(nHandle == ((SwAuthorityField*)pFmtFld->GetFld())->GetHandle())
+ if(nHandle == ((SwAuthorityField*)pFmtFld->GetField())->GetHandle())
bCurrentFieldWithoutTextNode = true;
#endif
continue;
@@ -335,7 +335,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
{
const SwTOXSortTabBase& rBase = *aSortArr[i];
SwFmtFld& rFmtFld = ((SwTOXAuthority&)rBase).GetFldFmt();
- SwAuthorityField* pAFld = (SwAuthorityField*)rFmtFld.GetFld();
+ SwAuthorityField* pAFld = (SwAuthorityField*)rFmtFld.GetField();
m_SequArr.push_back(pAFld->GetHandle());
}
for (SwTOXSortTabBases::const_iterator it = aSortArr.begin(); it != aSortArr.end(); ++it)
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 397dd96..0227b24 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -160,7 +160,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // reset status
- const SwField* pFld = pTxtFld->GetFld().GetFld();
+ const SwField* pFld = pTxtFld->GetFmtFld().GetField();
switch( pFld->GetTyp()->Which() )
{
case RES_SETEXPFLD:
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 074eb64..0a16277 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -138,18 +138,18 @@ bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sColumn = sTmp;
SwIterator<SwFmtFld,SwFieldType> aIter( *this );
- SwFmtFld* pFld = aIter.First();
- while(pFld)
+ SwFmtFld* pFmtFld = aIter.First();
+ while(pFmtFld)
{
// field in Undo?
- SwTxtFld *pTxtFld = pFld->GetTxtFld();
+ SwTxtFld *pTxtFld = pFmtFld->GetTxtFld();
if(pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
{
- SwDBField* pDBField = (SwDBField*)pFld->GetFld();
+ SwDBField* pDBField = (SwDBField*)pFmtFld->GetField();
pDBField->ClearInitialized();
pDBField->InitContent();
}
- pFld = aIter.Next();
+ pFmtFld = aIter.Next();
}
}
}
@@ -395,17 +395,17 @@ bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
if(GetTyp())
{
SwIterator<SwFmtFld,SwFieldType> aIter( *GetTyp() );
- SwFmtFld* pFld = aIter.First();
- while(pFld)
+ SwFmtFld* pFmtFld = aIter.First();
+ while(pFmtFld)
{
- SwTxtFld *pTxtFld = pFld->GetTxtFld();
- if(pTxtFld && (SwDBField*)pFld->GetFld() == this )
+ SwTxtFld *pTxtFld = pFmtFld->GetTxtFld();
+ if(pTxtFld && (SwDBField*)pFmtFld->GetField() == this )
{
//notify the change
- pTxtFld->NotifyContentChange(*pFld);
+ pTxtFld->NotifyContentChange(*pFmtFld);
break;
}
- pFld = aIter.Next();
+ pFmtFld = aIter.Next();
}
}
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 8345a68..6b12b7f 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1703,10 +1703,10 @@ const SwFmtFld* SwPostItField::GetByName(SwDoc* pDoc, const OUString& rName)
for (const SwFmtFld* pCurFldFmt = aIter.First(); pCurFldFmt; pCurFldFmt = aIter.Next())
{
// Ignore the field if it's not an annotation or it doesn't have an anchor.
- if (pCurFldFmt->GetFld()->GetTyp()->Which() != RES_POSTITFLD || !pCurFldFmt->GetTxtFld())
+ if (pCurFldFmt->GetField()->GetTyp()->Which() != RES_POSTITFLD || !pCurFldFmt->GetTxtFld())
continue;
- const SwPostItField* pField = dynamic_cast<const SwPostItField*>(pCurFldFmt->GetFld());
+ const SwPostItField* pField = dynamic_cast<const SwPostItField*>(pCurFldFmt->GetField());
if (pField->GetName() == rName)
return pCurFldFmt;
}
@@ -2201,7 +2201,7 @@ sal_uInt16 SwRefPageGetFieldType::MakeSetList( _SetGetExpFlds& rTmpLst )
void SwRefPageGetFieldType::UpdateField( SwTxtFld* pTxtFld,
_SetGetExpFlds& rSetList )
{
- SwRefPageGetField* pGetFld = (SwRefPageGetField*)pTxtFld->GetFld().GetFld();
+ SwRefPageGetField* pGetFld = (SwRefPageGetField*)pTxtFld->GetFmtFld().GetField();
pGetFld->SetText( OUString() );
// then search the correct RefPageSet field
@@ -2217,9 +2217,9 @@ void SwRefPageGetFieldType::UpdateField( SwTxtFld* pTxtFld,
if( itLast != rSetList.begin() )
{
--itLast;
- const SwTxtFld* pRefTxtFld = (*itLast)->GetFld();
+ const SwTxtFld* pRefTxtFld = (*itLast)->GetTxtFld();
const SwRefPageSetField* pSetFld =
- (SwRefPageSetField*)pRefTxtFld->GetFld().GetFld();
+ (SwRefPageSetField*)pRefTxtFld->GetFmtFld().GetField();
if( pSetFld->IsOn() )
{
// determine the correct offset
@@ -2243,7 +2243,7 @@ void SwRefPageGetFieldType::UpdateField( SwTxtFld* pTxtFld,
}
}
// start formatting
- ((SwFmtFld&)pTxtFld->GetFld()).ModifyNotification( 0, 0 );
+ ((SwFmtFld&)pTxtFld->GetFmtFld()).ModifyNotification( 0, 0 );
}
// queries for relative page numbering
@@ -2304,9 +2304,9 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
return; // there is no corresponding set-field in front
--itLast;
- const SwTxtFld* pRefTxtFld = (*itLast)->GetFld();
+ const SwTxtFld* pRefTxtFld = (*itLast)->GetTxtFld();
const SwRefPageSetField* pSetFld =
- (SwRefPageSetField*)pRefTxtFld->GetFld().GetFld();
+ (SwRefPageSetField*)pRefTxtFld->GetFmtFld().GetField();
Point aPt;
const SwCntntFrm* pRefFrm = pRefTxtFld ? pRefTxtFld->GetTxtNode().getLayoutFrm( pFrm->getRootFrm(), &aPt, 0, sal_False ) : 0;
if( pSetFld->IsOn() && pRefFrm )
@@ -2316,7 +2316,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
sal_uInt16 nDiff = pPgFrm->GetPhyPageNum() -
pRefFrm->FindPageFrm()->GetPhyPageNum() + 1;
- SwRefPageGetField* pGetFld = (SwRefPageGetField*)pFld->GetFld().GetFld();
+ SwRefPageGetField* pGetFld = (SwRefPageGetField*)pFld->GetFmtFld().GetField();
sal_uInt32 nTmpFmt = SVX_NUM_PAGEDESC == pGetFld->GetFormat()
? pPgFrm->GetPageDesc()->GetNumType().GetNumberingType()
: pGetFld->GetFormat();
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 388d2fe..21dc62a 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -518,8 +518,8 @@ void SwSetExpFieldType::Modify( const SfxPoolItem*, const SfxPoolItem* )
void SwSetExpFieldType::SetSeqFormat(sal_uLong nFmt)
{
SwIterator<SwFmtFld,SwFieldType> aIter(*this);
- for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
- pFld->GetFld()->ChangeFormat( nFmt );
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
+ pFmtFld->GetField()->ChangeFormat( nFmt );
}
sal_uLong SwSetExpFieldType::GetSeqFormat()
@@ -527,7 +527,7 @@ sal_uLong SwSetExpFieldType::GetSeqFormat()
if( !GetDepends() )
return SVX_NUM_ARABIC;
- SwField *pFld = ((SwFmtFld*)GetDepends())->GetFld();
+ SwField *pFld = ((SwFmtFld*)GetDepends())->GetField();
return pFld->GetFormat();
}
@@ -545,10 +545,10 @@ extern void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt
SwIterator<SwFmtFld,SwFieldType> aIter( *this );
const SwTxtNode* pNd;
for( SwFmtFld* pF = aIter.First(); pF; pF = aIter.Next() )
- if( pF->GetFld() != &rFld && pF->GetTxtFld() &&
+ if( pF->GetField() != &rFld && pF->GetTxtFld() &&
0 != ( pNd = pF->GetTxtFld()->GetpTxtNode() ) &&
pNd->GetNodes().IsDocNodes() )
- InsertSort( aArr, ((SwSetExpField*)pF->GetFld())->GetSeqNumber() );
+ InsertSort( aArr, ((SwSetExpField*)pF->GetField())->GetSeqNumber() );
// check first if number already exists
@@ -587,7 +587,7 @@ sal_uInt16 SwSetExpFieldType::GetSeqFldList( SwSeqFldList& rList )
{
_SeqFldLstElem* pNew = new _SeqFldLstElem(
pNd->GetExpandTxt( 0, USHRT_MAX ),
- ((SwSetExpField*)pF->GetFld())->GetSeqNumber() );
+ ((SwSetExpField*)pF->GetField())->GetSeqNumber() );
rList.InsertSort( pNew );
}
diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx
index fb55ce0..fae983f 100644
--- a/sw/source/core/fields/fldlst.cxx
+++ b/sw/source/core/fields/fldlst.cxx
@@ -49,13 +49,13 @@ SwInputFieldList::SwInputFieldList( SwEditShell* pShell, sal_Bool bBuildTmpLst )
if( RES_SETEXPFLD == nType || RES_INPUTFLD == nType || RES_DROPDOWN == nType )
{
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
- for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
{
- const SwTxtFld* pTxtFld = pFld->GetTxtFld();
+ const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
// only process InputFields, interactive SetExpFlds and DropDown fields
if( !pTxtFld || ( RES_SETEXPFLD == nType &&
- !((SwSetExpField*)pFld->GetFld())->GetInputFlag()))
+ !((SwSetExpField*)pFmtFld->GetField())->GetInputFlag()))
continue;
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
@@ -90,9 +90,9 @@ sal_uInt16 SwInputFieldList::Count() const
// get field from list in sorted order
SwField* SwInputFieldList::GetField(sal_uInt16 nId)
{
- const SwTxtFld* pTxtFld = (*pSrtLst)[ nId ]->GetFld();
+ const SwTxtFld* pTxtFld = (*pSrtLst)[ nId ]->GetTxtFld();
OSL_ENSURE( pTxtFld, "no TextFld" );
- return (SwField*)pTxtFld->GetFld().GetFld();
+ return (SwField*)pTxtFld->GetFmtFld().GetField();
}
/// save cursor
@@ -137,13 +137,13 @@ sal_uInt16 SwInputFieldList::BuildSortLst()
if( RES_SETEXPFLD == nType || RES_INPUTFLD == nType )
{
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
- for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
{
- const SwTxtFld* pTxtFld = pFld->GetTxtFld();
+ const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
// process only InputFields and interactive SetExpFlds
if( !pTxtFld || ( RES_SETEXPFLD == nType &&
- !((SwSetExpField*)pFld->GetFld())->GetInputFlag()))
+ !((SwSetExpField*)pFmtFld->GetField())->GetInputFlag()))
continue;
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 68ce4fc..ef5841f 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -332,7 +332,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
unsigned const nFrom = bHasCat ?
std::max<unsigned>(nNumStart + 1, nCatEnd) : nNumStart + 1;
nStart = SwGetExpField::GetReferenceTextPos(
- pTxtAttr->GetFld(), *pDoc, nFrom
+ pTxtAttr->GetFmtFld(), *pDoc, nFrom
);
} else {
nStart = bHasCat ?
@@ -790,14 +790,14 @@ void SwGetRefFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
if( !pNew && !pOld )
{
SwIterator<SwFmtFld,SwFieldType> aIter( *this );
- for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
{
// update only the GetRef fields
//JP 3.4.2001: Task 71231 - we need the correct language
- SwGetRefField* pGRef = (SwGetRefField*)pFld->GetFld();
+ SwGetRefField* pGRef = (SwGetRefField*)pFmtFld->GetField();
const SwTxtFld* pTFld;
if( !pGRef->GetLanguage() &&
- 0 != ( pTFld = pFld->GetTxtFld()) &&
+ 0 != ( pTFld = pFmtFld->GetTxtFld()) &&
pTFld->GetpTxtNode() )
{
pGRef->SetLanguage( pTFld->GetpTxtNode()->GetLang(
@@ -805,7 +805,7 @@ void SwGetRefFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
}
// #i81002#
- pGRef->UpdateField( pFld->GetTxtFld() );
+ pGRef->UpdateField( pFmtFld->GetTxtFld() );
}
}
// forward to text fields, they "expand" the text
@@ -841,12 +841,12 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark,
nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)pFldType)->GetType() )
{
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
- for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
{
- if( pFld->GetTxtFld() && nSeqNo ==
- ((SwSetExpField*)pFld->GetFld())->GetSeqNumber() )
+ if( pFmtFld->GetTxtFld() && nSeqNo ==
+ ((SwSetExpField*)pFmtFld->GetField())->GetSeqNumber() )
{
- SwTxtFld* pTxtFld = pFld->GetTxtFld();
+ SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
pTxtNd = (SwTxtNode*)pTxtFld->GetpTxtNode();
*pStt = *pTxtFld->GetStart();
if( pEnd )
@@ -960,7 +960,7 @@ void _RefIdsMap::GetFieldIdsFromDoc( SwDoc& rDoc, std::set<sal_uInt16> &rIds)
if( pF->GetTxtFld() &&
0 != ( pNd = pF->GetTxtFld()->GetpTxtNode() ) &&
pNd->GetNodes().IsDocNodes() )
- rIds.insert( ((SwSetExpField*)pF->GetFld())->GetSeqNumber() );
+ rIds.insert( ((SwSetExpField*)pF->GetField())->GetSeqNumber() );
}
}
@@ -999,8 +999,8 @@ void _RefIdsMap::Init( SwDoc& rDoc, SwDoc& rDestDoc, bool bField )
for( SwFmtFld* pF = aIter.First(); pF; pF = aIter.Next() )
if( pF->GetTxtFld() )
{
- sal_uInt16 n = ((SwSetExpField*)pF->GetFld())->GetSeqNumber( );
- ((SwSetExpField*)pF->GetFld())->SetSeqNumber( sequencedIds[ n ] );
+ sal_uInt16 n = ((SwSetExpField*)pF->GetField())->GetSeqNumber( );
+ ((SwSetExpField*)pF->GetField())->SetSeqNumber( sequencedIds[ n ] );
}
}
}
@@ -1092,7 +1092,7 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
SwIterator<SwFmtFld,SwFieldType> aIter( *this );
for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
{
- SwGetRefField& rRefFld = *(SwGetRefField*)pFld->GetFld();
+ SwGetRefField& rRefFld = *(SwGetRefField*)pFld->GetField();
switch( rRefFld.GetSubType() )
{
case REF_SEQUENCEFLD:
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index 61f86b4..b35344d 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -83,7 +83,7 @@ const SwNode* SwTblField::GetNodeOfFormula() const
SwIterator<SwFmtFld,SwFieldType> aIter( *GetTyp() );
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
- if( this == pFmtFld->GetFld() )
+ if( this == pFmtFld->GetField() )
return (SwTxtNode*)&pFmtFld->GetTxtFld()->GetTxtNode();
return 0;
}
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 2764167..1f49a51 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1388,7 +1388,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
for( sal_uInt16 n = 0, nEnd = pHts->Count(); n < nEnd; ++n )
if( RES_TXTATR_FIELD == ( pItem =
&(*pHts)[ n ]->GetAttr())->Which() &&
- TYP_SEQFLD == ((SwFmtFld*)pItem)->GetFld()->GetTypeId() )
+ TYP_SEQFLD == ((SwFmtFld*)pItem)->GetField()->GetTypeId() )
{
// sequence field found
SwFlyFrm* pChgFly = (SwFlyFrm*)pAnchor->GetUpper();
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 615ef1f..deb0be2 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -577,7 +577,8 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
// all cells of the (part) table together. Now check if
// they're all adjacent
- size_t n, nCellCnt = 0;
+ size_t n;
+ sal_uInt16 nCellCnt = 0;
long nYPos = LONG_MAX;
long nXPos = 0;
long nHeight = 0;
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index 4a38b07..3bc1287 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -84,7 +84,7 @@ public:
CNTNT.pTxtFld == rFld.CNTNT.pTxtFld ); }
bool operator<( const _SetGetExpFld& rFld ) const;
- const SwTxtFld* GetFld() const
+ const SwTxtFld* GetTxtFld() const
{ return TEXTFIELD == eSetGetExpFldType ? CNTNT.pTxtFld : 0; }
const SwTxtTOXMark* GetTOX() const
{ return TEXTTOXMARK == eSetGetExpFldType ? CNTNT.pTxtTOX : 0; }
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index 086c85a..abb4807 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -97,10 +97,10 @@ private:
}
}
}
- catch(::com::sun::star::container::NoSuchElementException&)
+ catch(const ::com::sun::star::container::NoSuchElementException&)
{
}
- catch(::com::sun::star::uno::RuntimeException&)
+ catch(const ::com::sun::star::uno::RuntimeException&)
{
}
@@ -131,10 +131,10 @@ private:
}
}
}
- catch(::com::sun::star::container::NoSuchElementException&)
+ catch(const ::com::sun::star::container::NoSuchElementException&)
{
}
- catch(::com::sun::star::uno::RuntimeException&)
+ catch(const ::com::sun::star::uno::RuntimeException&)
{
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 5c3a076..9da5139 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2706,27 +2706,21 @@ void SwFlyFrmFmt::MakeFrms()
{
sal_uInt16 nPgNum = aAnchorAttr.GetPageNum();
SwPageFrm *pPage = (SwPageFrm*)GetDoc()->GetCurrentLayout()->Lower();
- if( !nPgNum && aAnchorAttr.GetCntntAnchor() )
+ if( nPgNum == 0 && aAnchorAttr.GetCntntAnchor() )
{
- SwCntntNode *pCNd =
- aAnchorAttr.GetCntntAnchor()->nNode.GetNode().GetCntntNode();
+ SwCntntNode *pCNd = aAnchorAttr.GetCntntAnchor()->nNode.GetNode().GetCntntNode();
SwIterator<SwFrm,SwCntntNode> aIter( *pCNd );
- for (SwFrm* pFrm = aIter.First();
- pFrm;
- /* unreachable, note unconditional break below
- pFrm = aIter.Next()
- */ )
+ for ( SwFrm* pFrm = aIter.First(); pFrm != NULL; pFrm = aIter.Next() )
{
- pPage = pFrm->FindPageFrm();
- if( pPage )
- {
- nPgNum = pPage->GetPhyPageNum();
- // OD 24.07.2003 #111032# - update anchor attribute
- aAnchorAttr.SetPageNum( nPgNum );
- aAnchorAttr.SetAnchor( 0 );
- SetFmtAttr( aAnchorAttr );
- }
+ pPage = pFrm->FindPageFrm();
+ if( pPage )
+ {
+ nPgNum = pPage->GetPhyPageNum();
+ aAnchorAttr.SetPageNum( nPgNum );
+ aAnchorAttr.SetAnchor( 0 );
+ SetFmtAttr( aAnchorAttr );
break;
+ }
}
}
while ( pPage )
@@ -2842,17 +2836,21 @@ SwAnchoredObject* SwFlyFrmFmt::GetAnchoredObj( const Point* pPoint, const sal_Bo
bool SwFlyFrmFmt::GetInfo( SfxPoolItem& rInfo ) const
{
+ bool bRet = true;
switch( rInfo.Which() )
{
case RES_CONTENT_VISIBLE:
{
((SwPtrMsgPoolItem&)rInfo).pObject = SwIterator<SwFrm,SwFmt>::FirstElement( *this );
}
- return false;
+ bRet = false;
+ break;
default:
- return SwFrmFmt::GetInfo( rInfo );
+ bRet = SwFrmFmt::GetInfo( rInfo );
+ break;
}
+ return bRet;
}
// #i73249#
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 485b204..a1dbc6b 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -250,7 +250,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwTxtAttr* pTxtAttr = pTxtNd->GetTxtAttrForCharAt(aTextPos.nContent.GetIndex(), RES_TXTATR_FIELD);
if (pTxtAttr)
{
- const SwField* pField = pTxtAttr->GetFld().GetFld();
+ const SwField* pField = pTxtAttr->GetFmtFld().GetField();
if (pField->IsClickable())
bConsiderBackground = false;
}
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 5e41bcb..c9e4ee8 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2549,7 +2549,7 @@ sal_uLong SwTableBox::IsValidNumTxtNd( sal_Bool bCheckAttr ) const
// it inserts hidden variable-set fields at
// the beginning of para in cell, but they
// should not turn cell into text cell
- const SwField* pField = pAttr->GetFld().GetFld();
+ const SwField* pField = pAttr->GetFmtFld().GetField();
if (pField &&
(pField->GetTypeId() == TYP_SETFLD) &&
(0 != (static_cast<SwSetExpField const*>
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index a4516b4..d7f9611 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1448,7 +1448,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
const SwField* pFld = 0;
if ( pHint && RES_TXTATR_FIELD == pHint->Which() )
{
- pFld = (SwField*)pHint->GetFld().GetFld();
+ pFld = (SwField*)pHint->GetFmtFld().GetField();
if ( RES_GETREFFLD == pFld->Which() )
{
nPDFType = vcl::PDFWriter::Link;
@@ -1616,7 +1616,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
vcl::PDFNote aNote;
// Use the NumberFormatter to get the date string:
- const SwPostItField* pField = (SwPostItField*)pFirst->GetFld();
+ const SwPostItField* pField = (SwPostItField*)pFirst->GetField();
SvNumberFormatter* pNumFormatter = pDoc->GetNumberFormatter();
const Date aDateDiff( pField->GetDate() -
*pNumFormatter->GetNullDate() );
@@ -1854,7 +1854,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Destination Rectangle
const SwGetRefField* pField =
- (SwGetRefField*)pFirst->GetFld();
+ (SwGetRefField*)pFirst->GetField();
const OUString& rRefName = pField->GetSetRefName();
mrSh.GotoRefMark( rRefName, pField->GetSubType(), pField->GetSeqNo() );
const SwRect& rDestRect = mrSh.GetCharRect();
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 828aab6..7ee6c80 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1157,7 +1157,7 @@ void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
if (pField)
{
// Look up the author name
- const OUString& rAuthor = pField->GetFld()->GetPar1();
+ const OUString& rAuthor = pField->GetField()->GetPar1();
sal_uInt16 nIndex = pNd->GetDoc()->InsertRedlineAuthor(rAuthor);
pOutDev->SetFillColor(SwPostItMgr::GetColorLight(nIndex));
bFilled = true;
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index a61b1eb..478fde4 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -770,7 +770,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
}
case RES_TXTATR_FIELD :
{
- SwField *pFld = (SwField*)pHint->GetFld().GetFld();
+ SwField *pFld = (SwField*)pHint->GetFmtFld().GetField();
const OUString aTxt = pFld->ExpandField(true);
if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0,
aTxt.getLength() ) )
@@ -973,7 +973,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd
}
case RES_TXTATR_FIELD :
{
- SwField *pFld = (SwField*)pHint->GetFld().GetFld();
+ SwField *pFld = (SwField*)pHint->GetFmtFld().GetField();
OUString const aTxt = pFld->ExpandField(true);
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.getLength() );
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 5c0dc84..2588d2d 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -75,7 +75,7 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
{
SwExpandPortion *pRet = 0;
SwFrm *pFrame = (SwFrm*)pFrm;
- SwField *pFld = (SwField*)pHint->GetFld().GetFld();
+ SwField *pFld = (SwField*)pHint->GetFmtFld().GetField();
const sal_Bool bName = rInf.GetOpt().IsFldName();
SwCharFmt* pChFmt = 0;
@@ -88,7 +88,7 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
pFld->SetLanguage( GetFnt()->GetLanguage() );
// let the visual note know about its new language
if (pFld->GetTyp()->Which()==RES_POSTITFLD)
- const_cast<SwFmtFld*> (&pHint->GetFld())->Broadcast( SwFmtFldHint( &pHint->GetFld(), SWFMTFLD_LANGUAGE ) );
+ const_cast<SwFmtFld*> (&pHint->GetFmtFld())->Broadcast( SwFmtFldHint( &pHint->GetFmtFld(), SWFMTFLD_LANGUAGE ) );
}
SwViewShell *pSh = rInf.GetVsh();
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 0f38d19..37d239f 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -719,8 +719,7 @@ SwTOXAuthority::SwTOXAuthority( const SwCntntNode& rNd,
sal_uInt16 SwTOXAuthority::GetLevel() const
{
- OUString sText(((SwAuthorityField*)m_rField.GetFld())->
- GetFieldText(AUTH_FIELD_AUTHORITY_TYPE));
+ OUString sText(((SwAuthorityField*)m_rField.GetField())->GetFieldText(AUTH_FIELD_AUTHORITY_TYPE));
//#i18655# the level '0' is the heading level therefor the values are incremented here
sal_uInt16 nRet = 1;
if( pTOXIntl->IsNumeric( sText ) )
@@ -736,7 +735,7 @@ sal_uInt16 SwTOXAuthority::GetLevel() const
static OUString lcl_GetText(SwFmtFld const& rField)
{
- return rField.GetFld()->ExpandField(true);
+ return rField.GetField()->ExpandField(true);
}
TextAndReading SwTOXAuthority::GetText_Impl() const
@@ -747,7 +746,7 @@ TextAndReading SwTOXAuthority::GetText_Impl() const
void SwTOXAuthority::FillText( SwTxtNode& rNd,
const SwIndex& rInsPos, sal_uInt16 nAuthField ) const
{
- SwAuthorityField* pField = (SwAuthorityField*)m_rField.GetFld();
+ SwAuthorityField* pField = (SwAuthorityField*)m_rField.GetField();
OUString sText;
if(AUTH_FIELD_IDENTIFIER == nAuthField)
{
@@ -774,22 +773,22 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd,
bool SwTOXAuthority::operator==( const SwTOXSortTabBase& rCmp)
{
return nType == rCmp.nType &&
- ((SwAuthorityField*)m_rField.GetFld())->GetHandle() ==
- ((SwAuthorityField*)((SwTOXAuthority&)rCmp).m_rField.GetFld())->GetHandle();
+ ((SwAuthorityField*)m_rField.GetField())->GetHandle() ==
+ ((SwAuthorityField*)((SwTOXAuthority&)rCmp).m_rField.GetField())->GetHandle();
}
bool SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
{
bool bRet = false;
- SwAuthorityField* pField = (SwAuthorityField*)m_rField.GetFld();
+ SwAuthorityField* pField = (SwAuthorityField*)m_rField.GetField();
SwAuthorityFieldType* pType = (SwAuthorityFieldType*)
pField->GetTyp();
if(pType->IsSortByDocument())
bRet = SwTOXSortTabBase::operator<(rBase);
else
{
- SwAuthorityField* pCmpField = (SwAuthorityField*)
- ((SwTOXAuthority&)rBase).m_rField.GetFld();
+ SwAuthorityField* pCmpField =
+ (SwAuthorityField*)((SwTOXAuthority&)rBase).m_rField.GetField();
for(sal_uInt16 i = 0; i < pType->GetSortKeyCount(); i++)
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 7bf3e3f..872d898 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -48,17 +48,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();
}
@@ -68,14 +71,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())
+ if(rAttr.GetField())
{
- rAttr.GetFld()->GetTyp()->Add(this);
- pField = rAttr.GetFld()->CopyField();
+ rAttr.GetField()->GetTyp()->Add(this);
+ pField = rAttr.GetField()->CopyField();
}
}
@@ -135,13 +140,10 @@ void SwFmtFld::SetFld(SwField * _pField)
int SwFmtFld::operator==( const SfxPoolItem& rAttr ) const
{
OSL_ENSURE( 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
@@ -164,7 +166,7 @@ void SwFmtFld::SwClientNotify( const SwModify&, const SfxHint& rHint )
pPaM->GetPoint()->nNode = rTxtNode;
pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, *pTxtAttr->GetStart() );
- OUString const aEntry( GetFld()->ExpandField( pDoc->IsClipBoard() ) );
+ OUString const aEntry( GetField()->ExpandField( pDoc->IsClipBoard() ) );
pPaM->SetMark();
pPaM->Move( fnMoveForward );
pDoc->DeleteRange( *pPaM );
@@ -194,11 +196,11 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
return;
case RES_REFMARKFLD_UPDATE:
// GetReferenz-Felder aktualisieren
- if( RES_GETREFFLD == GetFld()->GetTyp()->Which() )
+ if( RES_GETREFFLD == GetField()->GetTyp()->Which() )
{
// #i81002#
// ((SwGetRefField*)GetFld())->UpdateField();
- dynamic_cast<SwGetRefField*>(GetFld())->UpdateField( pTxtAttr );
+ dynamic_cast<SwGetRefField*>(GetField())->UpdateField( pTxtAttr );
}
break;
case RES_DOCPOS_UPDATE:
@@ -215,7 +217,7 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
}
}
- switch (GetFld()->GetTyp()->Which())
+ switch (GetField()->GetTyp()->Which())
{
case RES_HIDDENPARAFLD:
if( !pOld || RES_HIDDENPARA_PRINT != pOld->Which() )
@@ -228,9 +230,9 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
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() );
@@ -280,7 +282,7 @@ SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos,
: SwTxtAttr( rAttr, nStartPos )
// fdo#39694 the ExpandField here may not give the correct result in all cases,
// but is better than nothing
- , m_aExpand( rAttr.GetFld()->ExpandField(bInClipboard) )
+ , m_aExpand( rAttr.GetField()->ExpandField(bInClipboard) )
, m_pTxtNode( 0 )
{
rAttr.pTxtAttr = this;
@@ -309,7 +311,7 @@ void SwTxtFld::Expand() const
// Wenn das expandierte Feld sich nicht veraendert hat, wird returnt
OSL_ENSURE( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
- const SwField* pFld = GetFld().GetFld();
+ const SwField* pFld = GetFmtFld().GetField();
OUString aNewExpand(
pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) );
@@ -339,7 +341,7 @@ void SwTxtFld::Expand() const
m_aExpand = aNewExpand;
// 0, this for formatting
- m_pTxtNode->ModifyNotification( 0, const_cast<SwFmtFld*>( &GetFld() ) );
+ m_pTxtNode->ModifyNotification( 0, const_cast<SwFmtFld*>( &GetFmtFld() ) );
}
/*************************************************************************
@@ -354,8 +356,8 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
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 )
{
@@ -368,19 +370,19 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
RES_AUTHORITY != nFldWhich )
pFldType = pDestIDFA->GetSysFldType( nFldWhich );
else
- pFldType = pDestIDFA->InsertFldType( *rFmtFld.GetFld()->GetTyp() );
+ pFldType = pDestIDFA->InsertFldType( *rFmtFld.GetField()->GetTyp() );
// Sonderbehandlung fuer DDE-Felder
if( RES_DDEFLD == nFldWhich )
{
if( rFmtFld.GetTxtFld() )
- ((SwDDEFieldType*)rFmtFld.GetFld()->GetTyp())->DecRefCnt();
+ ((SwDDEFieldType*)rFmtFld.GetField()->GetTyp())->DecRefCnt();
((SwDDEFieldType*)pFldType)->IncRefCnt();
}
OSL_ENSURE( pFldType, "unbekannter FieldType" );
pFldType->Add( &rFmtFld ); // ummelden
- rFmtFld.GetFld()->ChgTyp( pFldType );
+ rFmtFld.GetField()->ChgTyp( pFldType );
}
// Expressionfelder Updaten
@@ -392,12 +394,12 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
}
// Tabellenfelder auf externe Darstellung
else if( RES_TABLEFLD == nFldWhich &&
- ((SwTblField*)rFmtFld.GetFld())->IsIntrnlName() )
+ ((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() );
+ ((SwTblField*)rFmtFld.GetField())->PtrToBoxNm( &pTblNd->GetTable() );
}
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 0856cca..2943e53 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1284,7 +1284,7 @@ static void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
// 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(
@@ -1292,18 +1292,16 @@ static void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
}
// Tabellenformel ??
- if( RES_TABLEFLD == rFld.GetFld()->GetTyp()->Which()
- && static_cast<const SwTblField*>(rFld.GetFld())->IsIntrnlName())
+ 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();
+ static_cast<const SwTxtFld*>(pHt)->GetTxtNode().FindTableNode();
if( pDstTblNd )
{
SwTblField* const pTblFld = const_cast<SwTblField*>(
- static_cast<const SwTblField*>(
- pNewHt->GetFld().GetFld()));
+ static_cast<const SwTblField*>(pNewHt->GetFmtFld().GetField()));
pTblFld->PtrToBoxNm( &pDstTblNd->GetTable() );
}
}
@@ -2966,8 +2964,7 @@ Replace0xFF(SwTxtNode const& rNode, OUStringBuffer & rTxt, sal_Int32 & rTxtStt,
if( bExpandFlds )
{
const OUString aExpand(
- static_cast<SwTxtFld const*>(pAttr)->GetFld()
- .GetFld()->ExpandField(true));
+ static_cast<SwTxtFld const*>(pAttr)->GetFmtFld().GetField()->ExpandField(true));
rTxt.insert(nPos, aExpand);
nPos = nPos + aExpand.getLength();
nEndPos = nEndPos + aExpand.getLength();
@@ -3115,8 +3112,7 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
case RES_TXTATR_FIELD:
{
OUString const aExpand(
- static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
- ->ExpandField(true));
+ static_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true) );
if (!aExpand.isEmpty())
{
++aDestIdx; // dahinter einfuegen;
@@ -3332,7 +3328,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTxtNode &rNode, int eMode)
{
case RES_TXTATR_FIELD:
aExpand =
- static_cast<SwTxtFld const*>(pAttr)->GetFld().GetFld()
+ static_cast<SwTxtFld const*>(pAttr)->GetFmtFld().GetField()
->ExpandField(true);
break;
case RES_TXTATR_FTN:
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 6d04de2..cf280a8 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1116,7 +1116,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr )
{
// 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
OSL_ENSURE( RES_DDEFLD == pFld->GetTyp()->Which() ||
@@ -1146,7 +1146,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr )
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;
}
}
@@ -1430,7 +1430,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// fuer HiddenParaFields Benachrichtigungsmechanismus
// anwerfen
if( RES_HIDDENPARAFLD ==
- pAttr->GetFld().GetFld()->GetTyp()->Which() )
+ pAttr->GetFmtFld().GetField()->GetTyp()->Which() )
bHiddenPara = true;
}
break;
@@ -2428,7 +2428,7 @@ void SwpHints::CalcFlags()
break;
case RES_TXTATR_FIELD:
{
- const SwField* pFld = pAttr->GetFld().GetFld();
+ const SwField* pFld = pAttr->GetFmtFld().GetField();
if( RES_DDEFLD == pFld->GetTyp()->Which() )
{
m_bDDEFields = true;
@@ -2460,10 +2460,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;
@@ -2866,7 +2866,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
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() )
{
@@ -2910,10 +2910,9 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
pDoc->InsertFldType( *pFld->GetTyp() );
if( pFldType != pFld->GetTyp() )
{
- SwFmtFld* pFmtFld = (SwFmtFld*)&((SwTxtFld*)pHint)
- ->GetFld();
+ SwFmtFld* pFmtFld = (SwFmtFld*)&((SwTxtFld*)pHint)->GetFmtFld();
pFmtFld->RegisterToFieldType( *pFldType );
- pFmtFld->GetFld()->ChgTyp( pFldType );
+ pFmtFld->GetField()->ChgTyp( pFldType );
}
pFldType->SetSeqRefNo( *(SwSetExpField*)pFld );
}
@@ -2930,7 +2929,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
case RES_POSTITFLD:
if ( pDoc->GetDocShell() )
- pDoc->GetDocShell()->Broadcast( SwFmtFldHint( &((SwTxtFld*)pHint)->GetFld(), SWFMTFLD_INSERTED ) );
+ pDoc->GetDocShell()->Broadcast( SwFmtFldHint( &((SwTxtFld*)pHint)->GetFmtFld(), SWFMTFLD_INSERTED ) );
break;
}
if( bInsFldType )
@@ -3130,7 +3129,7 @@ void SwpHints::DeleteAtPos( const sal_uInt16 nPos )
if( RES_TXTATR_FIELD == pHint->Which() )
{
- SwFieldType* pFldTyp = ((SwTxtFld*)pHint)->GetFld().GetFld()->GetTyp();
+ const SwFieldType* pFldTyp = ((SwTxtFld*)pHint)->GetFmtFld().GetField()->GetTyp();
if( RES_DDEFLD == pFldTyp->Which() )
{
const SwTxtNode* pNd = ((SwTxtFld*)pHint)->GetpTxtNode();
@@ -3140,7 +3139,7 @@ void SwpHints::DeleteAtPos( const sal_uInt16 nPos )
}
else if( RES_POSTITFLD == pFldTyp->Which() )
{
- const_cast<SwFmtFld&>(((SwTxtFld*)pHint)->GetFld()).Broadcast( SwFmtFldHint( &((SwTxtFld*)pHint)->GetFld(), SWFMTFLD_REMOVED ) );
+ const_cast<SwFmtFld&>(((SwTxtFld*)pHint)->GetFmtFld()).Broadcast( SwFmtFldHint( &((SwTxtFld*)pHint)->GetFmtFld(), SWFMTFLD_REMOVED ) );
}
else if ( m_bHasHiddenParaField &&
RES_HIDDENPARAFLD == pFldTyp->Which() )
@@ -3282,7 +3281,7 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr )
// #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;
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 8de36ee..b4dbfb5 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -79,8 +79,7 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc()
void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
{
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
-
- const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
+ const SwField * pField = pTxtFld ? pTxtFld->GetFmtFld().GetField() : NULL;
if (pField)
{
@@ -91,14 +90,14 @@ void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
void SwUndoFieldFromDoc::DoImpl()
{
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
- const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
+ const SwField * pField = pTxtFld ? pTxtFld->GetFmtFld().GetField() : NULL;
if (pField)
{
pDoc->UpdateFld(pTxtFld, *pNewField, pHnt, bUpdate);
- SwFmtFld* pDstFmtFld = (SwFmtFld*)&pTxtFld->GetFld();
+ SwFmtFld* pDstFmtFld = (SwFmtFld*)&pTxtFld->GetFmtFld();
- if ( pDoc->GetFldType(RES_POSTITFLD, aEmptyOUStr,false) == pDstFmtFld->GetFld()->GetTyp() )
+ if ( pDoc->GetFldType(RES_POSTITFLD, aEmptyOUStr, false) == pDstFmtFld->GetField()->GetTyp() )
pDoc->GetDocShell()->Broadcast( SwFmtFldHint( pDstFmtFld, SWFMTFLD_INSERTED ) );
}
}
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 4ffa8fd..1fd3aa2 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -255,20 +255,20 @@ void SwHistorySetTxt::SetInDoc( SwDoc* pDoc, bool )
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();
@@ -276,7 +276,7 @@ SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, sal_uLong nNodePos )
OUString SwHistorySetTxtFld::GetDescription() const
{
- return m_pFld->GetFld()->GetDescription();
+ return m_pFld->GetField()->GetDescription();
}
SwHistorySetTxtFld::~SwHistorySetTxtFld()
@@ -299,7 +299,7 @@ void SwHistorySetTxtFld::SetInDoc( SwDoc* pDoc, bool )
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();
OSL_ENSURE( pTxtNd, "SwHistorySetTxtFld: no TextNode" );
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 596b7e1..db3d841 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -527,7 +527,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
{
uno::Reference<text::XTextField> const xField(
SwXTextField::CreateXTextField(*rPam.GetDoc(),
- pTxtAttr->GetFld()));
+ pTxtAttr->GetFmtFld()));
*pAny <<= xField;
}
}
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 48a2904..beb33ef 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1156,7 +1156,7 @@ public:
, m_bIsDescriptor(pFmt == 0)
, m_bCallUpdate(false)
, m_nServiceId((pFmt)
- ? lcl_GetServiceForField(*pFmt->GetFld())
+ ? lcl_GetServiceForField(*pFmt->GetField())
: nServiceId)
, m_pProps((pFmt) ? 0 : new SwFieldProperties_Impl)
{ }
@@ -1263,7 +1263,7 @@ SwXTextField::getTextFieldMaster() throw (uno::RuntimeException)
{
if (!m_pImpl->GetRegisteredIn())
throw uno::RuntimeException();
- pType = m_pImpl->m_pFmtFld->GetFld()->GetTyp();
+ pType = m_pImpl->m_pFmtFld->GetField()->GetTyp();
}
uno::Reference<beans::XPropertySet> const xRet(
@@ -1907,7 +1907,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
aPam,
OUString(),
ODF_COMMENTRANGE);
- SwPostItField* pPostItField = (SwPostItField*)aFmt.GetFld();
+ SwPostItField* pPostItField = (SwPostItField*)aFmt.GetField();
if (pPostItField->GetName().isEmpty())
// The fieldmark always has a (generated) name.
pPostItField->SetName(pFieldmark->GetName());
@@ -1928,7 +1928,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
// was passiert mit dem Update der Felder ? (siehe fldmgr.cxx)
if (pTxtAttr)
{
- const SwFmtFld& rFld = pTxtAttr->GetFld();
+ const SwFmtFld& rFld = pTxtAttr->GetFmtFld();
m_pImpl->m_pFmtFld = &rFld;
}
}
@@ -2545,7 +2545,9 @@ void SwXTextField::Impl::Modify(
const SwField* SwXTextField::Impl::GetField() const
{
if (GetRegisteredIn() && m_pFmtFld)
- return m_pFmtFld->GetFld();
+ {
+ return m_pFmtFld->GetField();
+ }
return 0;
}
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 01138ec..e87ebdf 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -724,12 +724,12 @@ lcl_ExportHints(
xRef = pPortion = new SwXTextPortion(
pUnoCrsr, xParent, PORTION_FIELD);
Reference<XTextField> const xField =
- SwXTextField::CreateXTextField(*pDoc, pAttr->GetFld());
+ SwXTextField::CreateXTextField(*pDoc, pAttr->GetFmtFld());
pPortion->SetTextField(xField);
// If this is a postit field and it has a fieldmark
// associated, set the fieldmark as a bookmark.
- const SwField* pField = pAttr->GetFld().GetFld();
+ const SwField* pField = pAttr->GetFmtFld().GetField();
if (pField->Which() == RES_POSTITFLD)
{
const SwPostItField* pPostItField = dynamic_cast<const SwPostItField*>(pField);
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 92cb36e..3518523 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -572,10 +572,13 @@ sal_Bool SwViewShell::IsAnyFieldInDoc() const
{
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))
+ // 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;
}
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 8fe6678..1b1b651 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -110,8 +110,8 @@ bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
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:
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index de4aacd..3717c80 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2475,7 +2475,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
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;
}
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 9c62e7d..0ee5826 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -630,8 +630,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag
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;
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 8a3f247..3554732 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -435,7 +435,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
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() &&
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 858ebb6..c877138 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2844,8 +2844,9 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
case RES_TXTATR_FIELD:
{
sal_uInt16 nFldWhich =
- pPostIts ? ((const SwFmtFld *)pAttr->pItem)
- ->GetFld()->GetTyp()->Which() : 0;
+ pPostIts
+ ? ((const SwFmtFld *)pAttr->pItem)->GetField()->GetTyp()->Which()
+ : 0;
if( pPostIts && (RES_POSTITFLD == nFldWhich ||
RES_SCRIPTFLD == nFldWhich) )
{
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 5a748dc..194e1e0 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -872,8 +872,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;
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index a068f77..56d32c2 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -840,13 +840,13 @@ bool MSWordExportBase::HasRefToObject( sal_uInt16 nTyp, const OUString* pName, 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:
@@ -2542,7 +2542,7 @@ void WW8AttributeOutput::WriteExpand( const SwField* pFld )
void AttributeOutputBase::TextField( const SwFmtFld& rField )
{
- const SwField* pFld = rField.GetFld();
+ const SwField* pFld = rField.GetField();
bool bWriteExpand = false;
sal_uInt16 nSubType = pFld->GetSubType();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 9559bf0..875f6b9 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1554,7 +1554,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list