diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-28 11:42:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-28 13:08:56 +0100 |
commit | 7b9462fad75914a8e0bd59f45e2b5b1e77286c60 (patch) | |
tree | dae1ed99f4dfdff7ba75b85ae3a3b5f02ebbef34 /filter | |
parent | ee8d062e0d71a622105840e8be6dc7cb14d16c3b (diff) |
unused global rtl::OUStrings
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/placeware/Base64Codec.cxx | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/filter/source/placeware/Base64Codec.cxx b/filter/source/placeware/Base64Codec.cxx index 49cfcc028c2f..99b93eda3be6 100644 --- a/filter/source/placeware/Base64Codec.cxx +++ b/filter/source/placeware/Base64Codec.cxx @@ -140,67 +140,4 @@ void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Seque } } -const rtl::OUString s2equal(RTL_CONSTASCII_USTRINGPARAM("==")); -const rtl::OUString s1equal(RTL_CONSTASCII_USTRINGPARAM("=")); -#if 0 -void FourByteToThreeByte (sal_uInt8* pBuffer, sal_Int32& nLength, const sal_Int32 nStart, const rtl::OUString& sString) -{ - nLength = 0; - sal_Int32 nLen (sString.getLength()); - - if (nLen != 4) - { - return; - } - - - if (sString.indexOf(s2equal) == 2) - nLength = 1; - else if (sString.indexOf(s1equal) == 3) - nLength = 2; - else - nLength = 3; - - sal_Int32 nBinaer ((aBase64DecodeTable [sString [0]] << 18) + - (aBase64DecodeTable [sString [1]] << 12) + - (aBase64DecodeTable [sString [2]] << 6) + - (aBase64DecodeTable [sString [3]])); - - sal_uInt8 OneByte = static_cast< sal_uInt8 >((nBinaer & 0xFF0000) >> 16); - pBuffer[nStart + 0] = (sal_uInt8)OneByte; - - if (nLength == 1) - return; - - OneByte = static_cast< sal_uInt8 >((nBinaer & 0xFF00) >> 8); - pBuffer[nStart + 1] = (sal_uInt8)OneByte; - - if (nLength == 2) - return; - - OneByte = static_cast< sal_uInt8 >(nBinaer & 0xFF); - pBuffer[nStart + 2] = (sal_uInt8)OneByte; -} - -void Base64Codec::decodeBase64(uno::Sequence< sal_uInt8 >& aBuffer, const rtl::OUString& sBuffer) -{ - sal_Int32 nFirstLength((sBuffer.getLength() / 4) * 3); - sal_uInt8* pBuffer = new sal_uInt8[nFirstLength]; - sal_Int32 nSecondLength(0); - sal_Int32 nLength(0); - sal_Int32 i = 0; - sal_Int32 k = 0; - while (i < sBuffer.getLength()) - { - FourByteToThreeByte (pBuffer, nLength, k, sBuffer.copy(i, 4)); - nSecondLength += nLength; - nLength = 0; - i += 4; - k += 3; - } - aBuffer = uno::Sequence<sal_uInt8>(pBuffer, nSecondLength); - delete[] pBuffer; -} -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |