[Libreoffice-commits] .: filter/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Sep 16 06:21:16 PDT 2011
filter/source/xsltfilter/OleHandler.cxx | 34 ++++++++++++++------------------
1 file changed, 15 insertions(+), 19 deletions(-)
New commits:
commit 7ef9ec66780483c9887753013ef4bda919497e52
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 16 14:20:49 2011 +0100
WaE: remove impossible final return path
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index 79b0773..6baa99a 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -176,25 +176,21 @@ namespace XSLT
SAL_CALL OleHandler::getByName(const OUString& streamName)
{
if (streamName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("oledata.mso")))
- {
- //get the length and seek to 0
- Reference<XSeekable> xSeek (m_rootStream, UNO_QUERY);
- int oleLength = (int) xSeek->getLength();
- xSeek->seek(0);
- //read all bytes
- Reference<XInputStream> xInput = m_rootStream->getInputStream();
- Sequence<sal_Int8> oledata(oleLength);
- xInput->readBytes(oledata, oleLength);
- //return the base64 encoded string
- OUStringBuffer buf(oleLength);
- SvXMLUnitConverter::encodeBase64(buf, oledata);
- return ::rtl::OUStringToOString(buf.toString(), RTL_TEXTENCODING_UTF8);
- }
- else
- {
- return encodeSubStorage(streamName);
- }
- return "";
+ {
+ //get the length and seek to 0
+ Reference<XSeekable> xSeek (m_rootStream, UNO_QUERY);
+ int oleLength = (int) xSeek->getLength();
+ xSeek->seek(0);
+ //read all bytes
+ Reference<XInputStream> xInput = m_rootStream->getInputStream();
+ Sequence<sal_Int8> oledata(oleLength);
+ xInput->readBytes(oledata, oleLength);
+ //return the base64 encoded string
+ OUStringBuffer buf(oleLength);
+ SvXMLUnitConverter::encodeBase64(buf, oledata);
+ return ::rtl::OUStringToOString(buf.toString(), RTL_TEXTENCODING_UTF8);
+ }
+ return encodeSubStorage(streamName);
}
void SAL_CALL
More information about the Libreoffice-commits
mailing list