stgelem.cxx (40300343) stgelem.cxx (334aff22)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 184 unchanged lines hidden (view full) ---

193 && (short) ( nVersion >> 16 ) == 3 )
194 && nPageSize == 9
195 && lcl_wontoverflow(nPageSize)
196 && lcl_wontoverflow(nDataPageSize)
197 && nFATSize > 0
198 && nTOCstrm >= 0
199 && nThreshold > 0
200 && ( nDataFAT == STG_EOF || ( nDataFAT >= 0 && nDataFATSize > 0 ) )
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 184 unchanged lines hidden (view full) ---

193 && (short) ( nVersion >> 16 ) == 3 )
194 && nPageSize == 9
195 && lcl_wontoverflow(nPageSize)
196 && lcl_wontoverflow(nDataPageSize)
197 && nFATSize > 0
198 && nTOCstrm >= 0
199 && nThreshold > 0
200 && ( nDataFAT == STG_EOF || ( nDataFAT >= 0 && nDataFATSize > 0 ) )
201 && ( nMasterChain == STG_EOF || ( nMasterChain >=0 && nMaster > 0 ) )
201 && ( nMasterChain == STG_FREE || nMasterChain == STG_EOF || ( nMasterChain >=0 && nMaster > 0 ) )
202 && nMaster >= 0;
203}
204
205sal_Int32 StgHeader::GetFATPage( short n ) const
206{
207 if( n >= 0 && n < cFATPagesInHeader )
208 return nMasterFAT[ n ];
209 else

--- 223 unchanged lines hidden (view full) ---

433 >> nSize // 78 file size
434 >> nUnknown; // 7C unknown
435
436 sal_uInt16 n = nNameLen;
437 if( n )
438 n = ( n >> 1 ) - 1;
439 if ( n > 31 ||
440 (nSize < 0 && cType != STG_STORAGE) ||
202 && nMaster >= 0;
203}
204
205sal_Int32 StgHeader::GetFATPage( short n ) const
206{
207 if( n >= 0 && n < cFATPagesInHeader )
208 return nMasterFAT[ n ];
209 else

--- 223 unchanged lines hidden (view full) ---

433 >> nSize // 78 file size
434 >> nUnknown; // 7C unknown
435
436 sal_uInt16 n = nNameLen;
437 if( n )
438 n = ( n >> 1 ) - 1;
439 if ( n > 31 ||
440 (nSize < 0 && cType != STG_STORAGE) ||
441 ( nPage1 < 0 && nPage1 != STG_EOF ) )
441 ( nPage1 < 0 && nPage1 != STG_FREE && nPage1 != STG_EOF ) )
442 {
443 // the size makes no sence for the substorage
444 // TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb
445 return sal_False;
446 }
447
448 aName = String( nName, n );
449 // I don't know the locale, so en_US is hopefully fine

--- 28 unchanged lines hidden ---
442 {
443 // the size makes no sence for the substorage
444 // TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb
445 return sal_False;
446 }
447
448 aName = String( nName, n );
449 // I don't know the locale, so en_US is hopefully fine

--- 28 unchanged lines hidden ---