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
dfc58d2d
Kaydet (Commit)
dfc58d2d
authored
Şub 14, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
check data needed to fulfil ras claims before allocating
Change-Id: Ifdd820e4ea4287f97cc07cb86c0a180d06081449
üst
5e4fb242
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
iras.cxx
filter/source/graphicfilter/iras/iras.cxx
+10
-2
No files found.
filter/source/graphicfilter/iras/iras.cxx
Dosyayı görüntüle @
dfc58d2d
...
@@ -168,6 +168,14 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
...
@@ -168,6 +168,14 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
if
(
!
bOk
)
if
(
!
bOk
)
return
false
;
return
false
;
if
(
mnType
!=
RAS_TYPE_BYTE_ENCODED
)
//simple raw format
{
if
(
m_rRAS
.
remainingSize
()
<
static_cast
<
sal_uInt64
>
(
mnHeight
)
*
mnWidth
*
mnDepth
/
8
)
{
return
false
;
}
}
Bitmap
aBmp
(
Size
(
mnWidth
,
mnHeight
),
mnDstBitsPerPix
);
Bitmap
aBmp
(
Size
(
mnWidth
,
mnHeight
),
mnDstBitsPerPix
);
Bitmap
::
ScopedWriteAccess
pAcc
(
aBmp
);
Bitmap
::
ScopedWriteAccess
pAcc
(
aBmp
);
if
(
pAcc
==
nullptr
)
if
(
pAcc
==
nullptr
)
...
@@ -178,6 +186,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
...
@@ -178,6 +186,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
pAcc
->
SetPalette
(
aPalette
);
pAcc
->
SetPalette
(
aPalette
);
}
}
// Bitmap-Daten einlesen
// Bitmap-Daten einlesen
mbStatus
=
ImplReadBody
(
pAcc
.
get
());
mbStatus
=
ImplReadBody
(
pAcc
.
get
());
...
@@ -191,7 +200,7 @@ bool RASReader::ImplReadHeader()
...
@@ -191,7 +200,7 @@ bool RASReader::ImplReadHeader()
{
{
m_rRAS
.
ReadInt32
(
mnWidth
).
ReadInt32
(
mnHeight
).
ReadInt32
(
mnDepth
).
ReadInt32
(
mnImageDatSize
).
ReadInt32
(
mnType
).
ReadInt32
(
mnColorMapType
).
ReadInt32
(
mnColorMapSize
);
m_rRAS
.
ReadInt32
(
mnWidth
).
ReadInt32
(
mnHeight
).
ReadInt32
(
mnDepth
).
ReadInt32
(
mnImageDatSize
).
ReadInt32
(
mnType
).
ReadInt32
(
mnColorMapType
).
ReadInt32
(
mnColorMapSize
);
if
(
mnWidth
<=
0
||
mnHeight
<=
0
||
mnImageDatSize
<=
0
||
!
m_rRAS
.
good
()
)
if
(
!
m_rRAS
.
good
()
||
mnWidth
<=
0
||
mnHeight
<=
0
||
mnImageDatSize
<=
0
)
mbStatus
=
false
;
mbStatus
=
false
;
switch
(
mnDepth
)
switch
(
mnDepth
)
...
@@ -223,7 +232,6 @@ bool RASReader::ImplReadHeader()
...
@@ -223,7 +232,6 @@ bool RASReader::ImplReadHeader()
return
mbStatus
;
return
mbStatus
;
}
}
bool
RASReader
::
ImplReadBody
(
BitmapWriteAccess
*
pAcc
)
bool
RASReader
::
ImplReadBody
(
BitmapWriteAccess
*
pAcc
)
{
{
sal_Int32
x
,
y
;
sal_Int32
x
,
y
;
...
...
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