INTEGRATION: CWS swenhancedfields2 (1.38.230); FILE MERGED

2008/08/12 12:09:45 b_michaelsen 1.38.230.3: explicit casts to prevent win32 warnings
2008/08/04 14:17:33 b_michaelsen 1.38.230.2: RESYNC: (1.38-1.39); FILE MERGED
2008/04/23 14:29:17 ama 1.38.230.1: #i33737#: Enhanced fields
This commit is contained in:
Rüdiger Timm 2008-09-04 09:20:30 +00:00
parent 9e8b0e2102
commit 74dbeebc53

View file

@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: itratr.cxx,v $
* $Revision: 1.39 $
* $Revision: 1.40 $
*
* This file is part of OpenOffice.org.
*
@ -346,6 +346,17 @@ xub_StrLen SwAttrIter::GetNextAttr( ) const
if ( nNextEnd<nNext ) nNext = nNextEnd; // Wer ist naeher?
}
}
if (m_pTxtNode!=NULL) {
//TODO maybe use hints like FieldHints for this instead of looking at the text...
int l=(nNext<m_pTxtNode->Len()?nNext:m_pTxtNode->Len());
USHORT p=nPos;
const sal_Unicode *txt=m_pTxtNode->GetTxt().GetBuffer();
while(p<l && txt[p]!=CH_TXT_ATR_FIELDSTART && txt[p]!=CH_TXT_ATR_FIELDEND && txt[p]!=CH_TXT_ATR_FORMELEMENT) p++;
if ((p<l && p>nPos) || nNext<=p)
nNext=p;
else
nNext=p+1;
}
if( pRedln )
return pRedln->GetNextRedln( nNext );
return nNext;