[Libreoffice-commits] core.git: lotuswordpro/source
Tor Lillqvist
tml at collabora.com
Fri Apr 18 05:11:31 PDT 2014
lotuswordpro/source/filter/lwpfilter.cxx | 66 -------------------------------
1 file changed, 66 deletions(-)
New commits:
commit 8b7aff3d430649eed279a81984cb6f5c8a1a4f66
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Apr 18 13:36:34 2014 +0300
Unused functions
Change-Id: I6c1f8dc33e3ba3257044889d7aae1223572590e9
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index edf53d5..6f5ef47 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -97,9 +97,6 @@ using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star;
using ::com::sun::star::uno::Sequence;
-sal_Bool IsWordproFile( uno::Reference<XInputStream>& rInputStream);
-sal_Bool IsWordproFile(const OUString& file);
-
LWPFilterReader::LWPFilterReader()
{
}
@@ -255,67 +252,4 @@ int ReadWordproFile(SvStream &rStream, uno::Reference<XDocumentHandler>& xHandle
}
}
-/**
- * @descr Compare if pBuf equals with the first 16 bytes
- * @param pBuf that contains the file data
- * @return if equals with the Word Pro characteristic strings
- */
-sal_Bool IsWordProStr(const sal_Int8 *pBuf)
-{
- sal_Bool bRet = sal_True;
- const sal_Int8 pLotusLwp[] =
- {
- 0x57, 0x6F, 0x72, 0x64,
- 0x50, 0x72, 0x6F
- };
- for(size_t i=0; i<sizeof(pLotusLwp); ++i)
- {
- if( pBuf[i] != pLotusLwp[i] )
- {
- bRet = sal_False;
- }
- }
- return bRet;
-}
-
-sal_Bool IsWordproFile(const OUString& file)
-{
- sal_Bool bRet = sal_False;
- SfxMedium aMedium( file, STREAM_STD_READ);
- SvStream* pStm = aMedium.GetInStream();
-
- if(pStm)
- {
- sal_Int8 buf[16];
- bRet = sal_True;
-
- pStm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- pStm->Seek(STREAM_SEEK_TO_BEGIN);
- sal_Size nRead = pStm->Read(buf, sizeof(buf));
- if( nRead< sizeof(buf) )
- bRet = sal_False;
- else
- bRet = IsWordProStr(buf);
- }
- return bRet;
-}
-
-sal_Bool IsWordproFile( uno::Reference<XInputStream>& rInputStream)
-{
- Sequence<sal_Int8> aData;
- sal_Bool bRet = sal_False;
-
- sal_Int32 nRead = rInputStream->readBytes(aData, 16);
- if( nRead != 16 )
- {
- bRet = sal_False;
- }
- else
- {
- const sal_Int8 *data = aData.getConstArray();
- bRet = IsWordProStr(data);
- }
- return bRet;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list