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
f222849b
Kaydet (Commit)
f222849b
authored
May 27, 2014
tarafından
Stephan Bergmann
Kaydeden (comit)
Fridrich Štrba
May 28, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix memory leak (as observed with CppunitTest_filter_pcx_test)
Change-Id: Ic00653cad7f15f60a8f2613938def25820d7e9ae
üst
fed9b024
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
ipcx.cxx
filter/source/graphicfilter/ipcx/ipcx.cxx
+6
-8
No files found.
filter/source/graphicfilter/ipcx/ipcx.cxx
Dosyayı görüntüle @
f222849b
...
...
@@ -32,7 +32,6 @@ private:
SvStream
&
m_rPCX
;
// the PCX file to read
Bitmap
aBmp
;
BitmapWriteAccess
*
pAcc
;
sal_uInt8
nVersion
;
// PCX-Version
sal_uInt8
nEncoding
;
// compression type
sal_uLong
nBitsPerPlanePix
;
// bits per plane per pixel
...
...
@@ -48,7 +47,7 @@ private:
bool
Callback
(
sal_uInt16
nPercent
);
void
ImplReadBody
();
void
ImplReadBody
(
BitmapWriteAccess
*
pAcc
);
void
ImplReadPalette
(
sal_uLong
nCol
);
void
ImplReadHeader
();
...
...
@@ -63,7 +62,6 @@ public:
PCXReader
::
PCXReader
(
SvStream
&
rStream
)
:
m_rPCX
(
rStream
)
,
pAcc
(
NULL
)
,
nVersion
(
0
)
,
nEncoding
(
0
)
,
nBitsPerPlanePix
(
0
)
...
...
@@ -112,7 +110,8 @@ bool PCXReader::ReadPCX(Graphic & rGraphic)
if
(
nStatus
)
{
aBmp
=
Bitmap
(
Size
(
nWidth
,
nHeight
),
nDestBitsPerPixel
);
if
(
(
pAcc
=
aBmp
.
AcquireWriteAccess
()
)
==
0
)
Bitmap
::
ScopedWriteAccess
pAcc
(
aBmp
);
if
(
pAcc
==
0
)
return
false
;
if
(
nDestBitsPerPixel
<=
8
)
...
...
@@ -126,7 +125,7 @@ bool PCXReader::ReadPCX(Graphic & rGraphic)
}
}
// read bitmap data
ImplReadBody
();
ImplReadBody
(
pAcc
.
get
()
);
// If an extended color palette exists at the end of the file, then read it and
// and write again in palette:
...
...
@@ -148,9 +147,8 @@ bool PCXReader::ReadPCX(Graphic & rGraphic)
rBitmap.SetPrefMapMode(aMapMode);
rBitmap.SetPrefSize(Size(nWidth,nHeight));
}
*/
if
(
nStatus
&&
pAcc
)
*/
if
(
nStatus
)
{
aBmp
.
ReleaseAccess
(
pAcc
),
pAcc
=
NULL
;
rGraphic
=
aBmp
;
return
true
;
}
...
...
@@ -217,7 +215,7 @@ void PCXReader::ImplReadHeader()
}
}
void
PCXReader
::
ImplReadBody
()
void
PCXReader
::
ImplReadBody
(
BitmapWriteAccess
*
pAcc
)
{
sal_uInt8
*
pPlane
[
4
],
*
pDest
,
*
pSource1
,
*
pSource2
,
*
pSource3
,
*
pSource4
;
sal_uLong
i
,
nx
,
ny
,
np
,
nCount
,
nPercent
;
...
...
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