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
99b40c2e
Kaydet (Commit)
99b40c2e
authored
Mar 13, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ofz#837 divide by zero in met
Change-Id: I7acdea720ba29eb9b9fb3ef8e8cbc76a673d17c2
üst
d4b89fdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
ios2met.cxx
filter/source/graphicfilter/ios2met/ios2met.cxx
+6
-5
No files found.
filter/source/graphicfilter/ios2met/ios2met.cxx
Dosyayı görüntüle @
99b40c2e
...
@@ -2301,9 +2301,10 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
...
@@ -2301,9 +2301,10 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
// do have a different RGB ordering when using 24-bit
// do have a different RGB ordering when using 24-bit
std
::
unique_ptr
<
sal_uInt8
[]
>
pBuf
(
new
sal_uInt8
[
nDataLen
]);
std
::
unique_ptr
<
sal_uInt8
[]
>
pBuf
(
new
sal_uInt8
[
nDataLen
]);
pOS2MET
->
ReadBytes
(
pBuf
.
get
(),
nDataLen
);
pOS2MET
->
ReadBytes
(
pBuf
.
get
(),
nDataLen
);
if
(
p
->
nBitsPerPixel
==
24
)
{
sal_uLong
nBytesPerLineToSwap
=
(
p
->
nBitsPerPixel
==
24
)
?
sal_uLong
nBytesPerLine
=
(
p
->
nWidth
*
3
+
3
)
&
0xfffffffc
;
((
p
->
nWidth
*
3
+
3
)
&
0xfffffffc
)
:
0
;
sal_uLong
nAlign
=
p
->
nMapPos
-
(
p
->
nMapPos
%
nBytesPerLine
);
if
(
nBytesPerLineToSwap
)
{
sal_uLong
nAlign
=
p
->
nMapPos
-
(
p
->
nMapPos
%
nBytesPerLineToSwap
);
sal_uLong
i
=
0
;
sal_uLong
i
=
0
;
while
(
nAlign
+
i
+
2
<
p
->
nMapPos
+
nDataLen
)
{
while
(
nAlign
+
i
+
2
<
p
->
nMapPos
+
nDataLen
)
{
if
(
nAlign
+
i
>=
p
->
nMapPos
)
{
if
(
nAlign
+
i
>=
p
->
nMapPos
)
{
...
@@ -2311,8 +2312,8 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
...
@@ -2311,8 +2312,8 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
std
::
swap
(
pBuf
[
j
],
pBuf
[
j
+
2
]);
std
::
swap
(
pBuf
[
j
],
pBuf
[
j
+
2
]);
}
}
i
+=
3
;
i
+=
3
;
if
(
i
+
2
>=
nBytesPerLine
)
{
if
(
i
+
2
>=
nBytesPerLineToSwap
)
{
nAlign
+=
nBytesPerLine
;
nAlign
+=
nBytesPerLineToSwap
;
i
=
0
;
i
=
0
;
}
}
}
}
...
...
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