Kaydet (Commit) 7b9462fa authored tarafından Caolán McNamara's avatar Caolán McNamara

unused global rtl::OUStrings

üst ee8d062e
...@@ -140,67 +140,4 @@ void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Seque ...@@ -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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment