Kaydet (Commit) fd19e3f8 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: nAnz -> nCount

Change-Id: Ia8c237009634eb0c750db42da4f68a31d40c5368
üst 998d30b6
......@@ -69,7 +69,7 @@ public:
void Insert( long nValue, bool bValue, size_t nPos );
void Insert( long nValue, long nMin, long nMax, bool bValue, size_t nPos );
void Remove( size_t nPos, size_t nAnz = 1 );
void Remove( size_t nPos, size_t nCount = 1 );
const SwTabColsEntry& GetEntry( size_t nPos ) const { return aData[nPos]; }
SwTabColsEntry& GetEntry( size_t nPos ) { return aData[nPos]; }
......
......@@ -105,10 +105,10 @@ void SwTabCols::Insert( long nValue, bool bValue, size_t nPos )
#endif
}
void SwTabCols::Remove( size_t nPos, size_t nAnz )
void SwTabCols::Remove( size_t nPos, size_t nCount )
{
SwTabColsEntries::iterator aStart = aData.begin() + nPos;
aData.erase( aStart, aStart + nAnz );
aData.erase( aStart, aStart + nCount );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -1161,21 +1161,21 @@ bool SwTableAutoFmtTbl::Load( SvStream& rStream )
aVersions.Load( rStream, nVal ); // Item versions
SwTableAutoFmt* pNew;
sal_uInt16 nAnz = 0;
rStream.ReadUInt16( nAnz );
sal_uInt16 nCount = 0;
rStream.ReadUInt16( nCount );
bRet = 0 == rStream.GetError();
if (bRet)
{
const size_t nMinRecordSize = sizeof(sal_uInt16);
const size_t nMaxRecords = rStream.remainingSize() / nMinRecordSize;
if (nAnz > nMaxRecords)
if (nCount > nMaxRecords)
{
SAL_WARN("vcl.gdi", "Parsing error: " << nMaxRecords <<
" max possible entries, but " << nAnz << " claimed, truncating");
nAnz = nMaxRecords;
SAL_WARN("sw.core", "Parsing error: " << nMaxRecords <<
" max possible entries, but " << nCount << " claimed, truncating");
nCount = nMaxRecords;
}
for (sal_uInt16 i = 0; i < nAnz; ++i)
for (sal_uInt16 i = 0; i < nCount; ++i)
{
pNew = new SwTableAutoFmt( OUString() );
bRet = pNew->Load( rStream, aVersions );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment