diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-29 11:41:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-29 11:43:40 +0000 |
commit | 9bfd742d8cdc4aab3dd817f13ab4cfa5cc60ae12 (patch) | |
tree | 51815ec709869dd297c10b8359b3bc4736204a98 /oox/source | |
parent | cfaba15c589f882cc0bcce5cd07bdf3d30f547f6 (diff) |
loplugin:unusedmethods
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0
Reviewed-on: https://gerrit.libreoffice.org/35834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/core/binarycodec.cxx | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx index 9ea36ee7df48..10c3a2c8941a 100644 --- a/oox/source/core/binarycodec.cxx +++ b/oox/source/core/binarycodec.cxx @@ -204,49 +204,6 @@ bool BinaryCodec_XOR::verifyKey( sal_uInt16 nKey, sal_uInt16 nHash ) const return (nKey == mnBaseKey) && (nHash == mnHash); } -void BinaryCodec_XOR::startBlock() -{ - mnOffset = 0; -} - -void BinaryCodec_XOR::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int32 nBytes ) -{ - const sal_uInt8* pnCurrKey = mpnKey + mnOffset; - const sal_uInt8* pnKeyLast = mpnKey + 0x0F; - - // switch/case outside of the for loop (performance) - const sal_uInt8* pnSrcDataEnd = pnSrcData + nBytes; - switch( meCodecType ) - { - case CODEC_WORD: - { - for( ; pnSrcData < pnSrcDataEnd; ++pnSrcData, ++pnDestData ) - { - sal_uInt8 nData = *pnSrcData ^ *pnCurrKey; - if( (*pnSrcData != 0) && (nData != 0) ) - *pnDestData = nData; - if( pnCurrKey < pnKeyLast ) ++pnCurrKey; else pnCurrKey = mpnKey; - } - } - break; - case CODEC_EXCEL: - { - for( ; pnSrcData < pnSrcDataEnd; ++pnSrcData, ++pnDestData ) - { - *pnDestData = *pnSrcData; - lclRotateLeft( *pnDestData, 3 ); - *pnDestData ^= *pnCurrKey; - if( pnCurrKey < pnKeyLast ) ++pnCurrKey; else pnCurrKey = mpnKey; - } - } - break; - // compiler will warn, if new codec type is introduced and not handled here - } - - // update offset and leave - skip( nBytes ); -} - bool BinaryCodec_XOR::skip( sal_Int32 nBytes ) { mnOffset = static_cast< sal_Int32 >( (mnOffset + nBytes) & 0x0F ); @@ -390,20 +347,6 @@ bool BinaryCodec_RCF::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, return eResult == rtl_Cipher_E_None; } -void BinaryCodec_RCF::skip( sal_Int32 nBytes ) -{ - // decode dummy data in memory to update internal state of RC4 cipher - sal_uInt8 pnDummy[ 1024 ]; - sal_Int32 nBytesLeft = nBytes; - bool bResult = true; - while( bResult && (nBytesLeft > 0) ) - { - sal_Int32 nBlockLen = ::std::min( nBytesLeft, static_cast< sal_Int32 >( sizeof( pnDummy ) ) ); - bResult = decode( pnDummy, pnDummy, nBlockLen ); - nBytesLeft -= nBlockLen; - } -} - } // namespace core } // namespace oox |