Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8b7aff3d
Kaydet (Commit)
8b7aff3d
authored
Nis 18, 2014
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Unused functions
Change-Id: I6c1f8dc33e3ba3257044889d7aae1223572590e9
üst
d7aef240
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
66 deletions
+0
-66
lwpfilter.cxx
lotuswordpro/source/filter/lwpfilter.cxx
+0
-66
No files found.
lotuswordpro/source/filter/lwpfilter.cxx
Dosyayı görüntüle @
8b7aff3d
...
@@ -97,9 +97,6 @@ using namespace ::com::sun::star::xml::sax;
...
@@ -97,9 +97,6 @@ using namespace ::com::sun::star::xml::sax;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
sal_Bool
IsWordproFile
(
uno
::
Reference
<
XInputStream
>&
rInputStream
);
sal_Bool
IsWordproFile
(
const
OUString
&
file
);
LWPFilterReader
::
LWPFilterReader
()
LWPFilterReader
::
LWPFilterReader
()
{
{
}
}
...
@@ -255,67 +252,4 @@ int ReadWordproFile(SvStream &rStream, uno::Reference<XDocumentHandler>& xHandle
...
@@ -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: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment