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
83c888bd
Kaydet (Commit)
83c888bd
authored
Nis 10, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
writerfilter: remove dead doctok detection code
Change-Id: Ib39d54ce37b9e41ab6aff742d7680a7cd76168cd
üst
5e00a299
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
41 deletions
+13
-41
WriterFilterDetection.cxx
writerfilter/source/filter/WriterFilterDetection.cxx
+13
-41
No files found.
writerfilter/source/filter/WriterFilterDetection.cxx
Dosyayı görüntüle @
83c888bd
...
...
@@ -71,53 +71,25 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
else
if
(
pValues
[
nProperty
].
Name
==
"InputStream"
)
pValues
[
nProperty
].
Value
>>=
xInputStream
;
}
bool
bBinary
=
sTypeName
==
"writer_MS_Word_97"
||
sTypeName
==
"writer_MS_Word_97_Vorlage"
;
try
{
if
(
bBinary
)
{
SvStream
*
pStream
=
::
utl
::
UcbStreamHelper
::
CreateStream
(
xInputStream
);
if
(
pStream
&&
SotStorage
::
IsStorageFile
(
pStream
)
)
{
SotStorageRef
xStg
=
new
SotStorage
(
pStream
,
false
);
bool
bTable2
=
xStg
->
IsContained
(
OUString
(
"1Table"
));
SotStorageStreamRef
xRef
=
xStg
->
OpenSotStream
(
OUString
(
"WordDocument"
),
STREAM_STD_READ
|
STREAM_NOCREATE
);
if
(
bTable2
&&
xStg
.
Is
())
{
xRef
->
Seek
(
2
);
sal_Int16
nWord
;
xRef
->
ReadInt16
(
nWord
);
//version detection
bWord
=
nWord
>=
0x6a
&&
nWord
<=
0xc1
;
}
}
}
uno
::
Reference
<
embed
::
XStorage
>
xDocStorage
;
if
(
sURL
==
"private:stream"
)
xDocStorage
=
comphelper
::
OStorageHelper
::
GetStorageFromInputStream
(
xInputStream
);
else
xDocStorage
=
comphelper
::
OStorageHelper
::
GetStorageFromURL
(
sURL
,
embed
::
ElementModes
::
READ
);
if
(
xDocStorage
.
is
()
)
{
uno
::
Reference
<
embed
::
XStorage
>
xDocStorage
;
if
(
sURL
==
"private:stream"
)
xDocStorage
=
comphelper
::
OStorageHelper
::
GetStorageFromInputStream
(
xInputStream
);
else
xDocStorage
=
comphelper
::
OStorageHelper
::
GetStorageFromURL
(
sURL
,
embed
::
ElementModes
::
READ
);
if
(
xDocStorage
.
is
()
)
uno
::
Sequence
<
OUString
>
aNames
=
xDocStorage
->
getElementNames
();
const
OUString
*
pNames
=
aNames
.
getConstArray
();
for
(
sal_Int32
nName
=
0
;
nName
<
aNames
.
getLength
();
++
nName
)
{
uno
::
Sequence
<
OUString
>
aNames
=
xDocStorage
->
getElementNames
();
const
OUString
*
pNames
=
aNames
.
getConstArray
();
for
(
sal_Int32
nName
=
0
;
nName
<
aNames
.
getLength
();
++
nName
)
if
(
pNames
[
nName
]
==
"word"
)
{
if
(
pNames
[
nName
]
==
"word"
)
{
bWord
=
true
;
if
(
sTypeName
.
isEmpty
()
)
sTypeName
=
"writer_MS_Word_2007"
;
break
;
}
bWord
=
true
;
if
(
sTypeName
.
isEmpty
()
)
sTypeName
=
"writer_MS_Word_2007"
;
break
;
}
}
}
...
...
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