WaE: unused functions
This commit is contained in:
parent
f98ffc5be6
commit
4cc5092938
@ -257,91 +257,6 @@ void BiffDecoder_RCF::implDecode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcD
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
||||
namespace {
|
||||
|
||||
const sal_uInt16 BIFF_FILEPASS_XOR = 0;
|
||||
const sal_uInt16 BIFF_FILEPASS_RCF = 1;
|
||||
|
||||
const sal_uInt16 BIFF_FILEPASS_BIFF8_RCF = 1;
|
||||
const sal_uInt16 BIFF_FILEPASS_BIFF8_CRYPTOAPI_2003 = 2;
|
||||
const sal_uInt16 BIFF_FILEPASS_BIFF8_CRYPTOAPI_2007 = 3;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BiffDecoderRef lclReadFilePass_XOR( BiffInputStream& rStrm )
|
||||
{
|
||||
BiffDecoderRef xDecoder;
|
||||
OSL_ENSURE( rStrm.getRemaining() == 4, "lclReadFilePass_XOR - wrong record size" );
|
||||
if( rStrm.getRemaining() == 4 )
|
||||
{
|
||||
sal_uInt16 nBaseKey, nHash;
|
||||
rStrm >> nBaseKey >> nHash;
|
||||
xDecoder.reset( new BiffDecoder_XOR( nBaseKey, nHash ) );
|
||||
}
|
||||
return xDecoder;
|
||||
}
|
||||
|
||||
BiffDecoderRef lclReadFilePass_RCF( BiffInputStream& rStrm )
|
||||
{
|
||||
BiffDecoderRef xDecoder;
|
||||
OSL_ENSURE( rStrm.getRemaining() == 48, "lclReadFilePass_RCF - wrong record size" );
|
||||
if( rStrm.getRemaining() == 48 )
|
||||
{
|
||||
sal_uInt8 pnSalt[ 16 ];
|
||||
sal_uInt8 pnVerifier[ 16 ];
|
||||
sal_uInt8 pnVerifierHash[ 16 ];
|
||||
rStrm.readMemory( pnSalt, 16 );
|
||||
rStrm.readMemory( pnVerifier, 16 );
|
||||
rStrm.readMemory( pnVerifierHash, 16 );
|
||||
xDecoder.reset( new BiffDecoder_RCF( pnSalt, pnVerifier, pnVerifierHash ) );
|
||||
}
|
||||
return xDecoder;
|
||||
}
|
||||
|
||||
BiffDecoderRef lclReadFilePass_CryptoApi( BiffInputStream& /*rStrm*/ )
|
||||
{
|
||||
// not supported
|
||||
return BiffDecoderRef();
|
||||
}
|
||||
|
||||
BiffDecoderRef lclReadFilePassBiff8( BiffInputStream& rStrm )
|
||||
{
|
||||
BiffDecoderRef xDecoder;
|
||||
switch( rStrm.readuInt16() )
|
||||
{
|
||||
case BIFF_FILEPASS_XOR:
|
||||
xDecoder = lclReadFilePass_XOR( rStrm );
|
||||
break;
|
||||
|
||||
case BIFF_FILEPASS_RCF:
|
||||
{
|
||||
sal_uInt16 nMajor = rStrm.readuInt16();
|
||||
rStrm.skip( 2 );
|
||||
switch( nMajor )
|
||||
{
|
||||
case BIFF_FILEPASS_BIFF8_RCF:
|
||||
xDecoder = lclReadFilePass_RCF( rStrm );
|
||||
break;
|
||||
case BIFF_FILEPASS_BIFF8_CRYPTOAPI_2003:
|
||||
case BIFF_FILEPASS_BIFF8_CRYPTOAPI_2007:
|
||||
xDecoder = lclReadFilePass_CryptoApi( rStrm );
|
||||
break;
|
||||
default:
|
||||
OSL_FAIL( "lclReadFilePassBiff8 - unknown BIFF8 encryption sub mode" );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
OSL_FAIL( "lclReadFilePassBiff8 - unknown encryption mode" );
|
||||
}
|
||||
return xDecoder;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BiffCodecHelper::BiffCodecHelper( const WorkbookHelper& rHelper ) :
|
||||
|
Loading…
x
Reference in New Issue
Block a user