summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-09 10:35:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-10 06:29:10 +0000
commit014b9ac2e4ec22a1eed2fde806edd7a840035a45 (patch)
tree9047e3932cf0fa46128ab570a69b4dd5d507903f /sc
parentb0229855057ed4d73e73ecd8c501a4564f2237ce (diff)
loplugin:unusedmethods
Change-Id: Ibe11923601760ded53a277c48631e4893606b2d6 Reviewed-on: https://gerrit.libreoffice.org/32875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/inc/biffcodec.hxx21
-rw-r--r--sc/source/filter/oox/biffcodec.cxx47
2 files changed, 0 insertions, 68 deletions
diff --git a/sc/source/filter/inc/biffcodec.hxx b/sc/source/filter/inc/biffcodec.hxx
index 959fed5d8a32..fed33b878593 100644
--- a/sc/source/filter/inc/biffcodec.hxx
+++ b/sc/source/filter/inc/biffcodec.hxx
@@ -50,13 +50,6 @@ private:
virtual css::uno::Sequence< css::beans::NamedValue > implVerifyPassword( const OUString& rPassword ) = 0;
virtual bool implVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) = 0;
- /** Implementation of decryption of a memory block. */
- virtual void implDecode(
- sal_uInt8* pnDestData,
- const sal_uInt8* pnSrcData,
- sal_Int64 nStreamPos,
- sal_uInt16 nBytes ) = 0;
-
private:
bool mbValid; /// True = decoder is correctly initialized.
};
@@ -74,13 +67,6 @@ private:
virtual css::uno::Sequence< css::beans::NamedValue > implVerifyPassword( const OUString& rPassword ) override;
virtual bool implVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) override;
- /** Implementation of decryption of a memory block. */
- virtual void implDecode(
- sal_uInt8* pnDestData,
- const sal_uInt8* pnSrcData,
- sal_Int64 nStreamPos,
- sal_uInt16 nBytes ) override;
-
private:
::oox::core::BinaryCodec_XOR maCodec; /// Cipher algorithm implementation.
css::uno::Sequence< css::beans::NamedValue > maEncryptionData;
@@ -99,13 +85,6 @@ private:
virtual css::uno::Sequence< css::beans::NamedValue > implVerifyPassword( const OUString& rPassword ) override;
virtual bool implVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) override;
- /** Implementation of decryption of a memory block. */
- virtual void implDecode(
- sal_uInt8* pnDestData,
- const sal_uInt8* pnSrcData,
- sal_Int64 nStreamPos,
- sal_uInt16 nBytes ) override;
-
private:
::oox::core::BinaryCodec_RCF maCodec; /// Cipher algorithm implementation.
css::uno::Sequence< css::beans::NamedValue > maEncryptionData;
diff --git a/sc/source/filter/oox/biffcodec.cxx b/sc/source/filter/oox/biffcodec.cxx
index 705db2764982..4cfb84e19e08 100644
--- a/sc/source/filter/oox/biffcodec.cxx
+++ b/sc/source/filter/oox/biffcodec.cxx
@@ -99,28 +99,6 @@ bool BiffDecoder_XOR::implVerifyEncryptionData( const Sequence< NamedValue >& rE
return maEncryptionData.hasElements();
}
-void BiffDecoder_XOR::implDecode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int64 nStreamPos, sal_uInt16 nBytes )
-{
- maCodec.startBlock();
- maCodec.skip( static_cast< sal_Int32 >( (nStreamPos + nBytes) & 0x0F ) );
- maCodec.decode( pnDestData, pnSrcData, nBytes );
-}
-
-namespace {
-
-/** Returns the block index of the passed stream position for RCF decryption. */
-sal_Int32 lclGetRcfBlock( sal_Int64 nStreamPos )
-{
- return static_cast< sal_Int32 >( nStreamPos / BIFF_RCF_BLOCKSIZE );
-}
-
-/** Returns the offset of the passed stream position in a block for RCF decryption. */
-sal_Int32 lclGetRcfOffset( sal_Int64 nStreamPos )
-{
- return static_cast< sal_Int32 >( nStreamPos % BIFF_RCF_BLOCKSIZE );
-}
-
-} // namespace
BiffDecoder_RCF::BiffDecoder_RCF( const BiffDecoder_RCF& rDecoder ) :
BiffDecoderBase(), // must be called to prevent compiler warning
@@ -173,31 +151,6 @@ bool BiffDecoder_RCF::implVerifyEncryptionData( const Sequence< NamedValue >& rE
return maEncryptionData.hasElements();
}
-void BiffDecoder_RCF::implDecode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int64 nStreamPos, sal_uInt16 nBytes )
-{
- sal_uInt8* pnCurrDest = pnDestData;
- const sal_uInt8* pnCurrSrc = pnSrcData;
- sal_Int64 nCurrPos = nStreamPos;
- sal_uInt16 nBytesLeft = nBytes;
- while( nBytesLeft > 0 )
- {
- // initialize codec for current stream position
- maCodec.startBlock( lclGetRcfBlock( nCurrPos ) );
- maCodec.skip( lclGetRcfOffset( nCurrPos ) );
-
- // decode the block
- sal_uInt16 nBlockLeft = static_cast< sal_uInt16 >( BIFF_RCF_BLOCKSIZE - lclGetRcfOffset( nCurrPos ) );
- sal_uInt16 nDecBytes = ::std::min( nBytesLeft, nBlockLeft );
- maCodec.decode( pnCurrDest, pnCurrSrc, static_cast< sal_Int32 >( nDecBytes ) );
-
- // prepare for next block
- pnCurrDest += nDecBytes;
- pnCurrSrc += nDecBytes;
- nCurrPos += nDecBytes;
- nBytesLeft = nBytesLeft - nDecBytes;
- }
-}
-
} // namespace xls
} // namespace oox