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: ...@@ -69,7 +69,7 @@ public:
void Insert( long nValue, bool bValue, size_t nPos ); void Insert( long nValue, bool bValue, size_t nPos );
void Insert( long nValue, long nMin, long nMax, 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]; } const SwTabColsEntry& GetEntry( size_t nPos ) const { return aData[nPos]; }
SwTabColsEntry& GetEntry( size_t nPos ) { 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 ) ...@@ -105,10 +105,10 @@ void SwTabCols::Insert( long nValue, bool bValue, size_t nPos )
#endif #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; SwTabColsEntries::iterator aStart = aData.begin() + nPos;
aData.erase( aStart, aStart + nAnz ); aData.erase( aStart, aStart + nCount );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -1161,21 +1161,21 @@ bool SwTableAutoFmtTbl::Load( SvStream& rStream ) ...@@ -1161,21 +1161,21 @@ bool SwTableAutoFmtTbl::Load( SvStream& rStream )
aVersions.Load( rStream, nVal ); // Item versions aVersions.Load( rStream, nVal ); // Item versions
SwTableAutoFmt* pNew; SwTableAutoFmt* pNew;
sal_uInt16 nAnz = 0; sal_uInt16 nCount = 0;
rStream.ReadUInt16( nAnz ); rStream.ReadUInt16( nCount );
bRet = 0 == rStream.GetError(); bRet = 0 == rStream.GetError();
if (bRet) if (bRet)
{ {
const size_t nMinRecordSize = sizeof(sal_uInt16); const size_t nMinRecordSize = sizeof(sal_uInt16);
const size_t nMaxRecords = rStream.remainingSize() / nMinRecordSize; const size_t nMaxRecords = rStream.remainingSize() / nMinRecordSize;
if (nAnz > nMaxRecords) if (nCount > nMaxRecords)
{ {
SAL_WARN("vcl.gdi", "Parsing error: " << nMaxRecords << SAL_WARN("sw.core", "Parsing error: " << nMaxRecords <<
" max possible entries, but " << nAnz << " claimed, truncating"); " max possible entries, but " << nCount << " claimed, truncating");
nAnz = nMaxRecords; nCount = nMaxRecords;
} }
for (sal_uInt16 i = 0; i < nAnz; ++i) for (sal_uInt16 i = 0; i < nCount; ++i)
{ {
pNew = new SwTableAutoFmt( OUString() ); pNew = new SwTableAutoFmt( OUString() );
bRet = pNew->Load( rStream, aVersions ); 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