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
3cd6485e
Kaydet (Commit)
3cd6485e
authored
Ock 10, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
BitmapWriteAccess* -> Bitmap::ScopedWriteAccess
Change-Id: I5b3980d8eecc61a6f63aa64a1b05c30afa2f57f7
üst
b3bddf8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
pngread.cxx
vcl/source/gdi/pngread.cxx
+5
-10
No files found.
vcl/source/gdi/pngread.cxx
Dosyayı görüntüle @
3cd6485e
...
@@ -76,7 +76,7 @@ private:
...
@@ -76,7 +76,7 @@ private:
std
::
vector
<
sal_uInt8
>::
iterator
maDataIter
;
std
::
vector
<
sal_uInt8
>::
iterator
maDataIter
;
std
::
unique_ptr
<
Bitmap
>
mpBmp
;
std
::
unique_ptr
<
Bitmap
>
mpBmp
;
Bitmap
WriteAccess
*
mpAcc
;
Bitmap
::
ScopedWriteAccess
mpAcc
;
std
::
unique_ptr
<
Bitmap
>
mpMaskBmp
;
std
::
unique_ptr
<
Bitmap
>
mpMaskBmp
;
std
::
unique_ptr
<
AlphaMask
>
mpAlphaMask
;
std
::
unique_ptr
<
AlphaMask
>
mpAlphaMask
;
BitmapWriteAccess
*
mpMaskAcc
;
BitmapWriteAccess
*
mpMaskAcc
;
...
@@ -167,7 +167,6 @@ public:
...
@@ -167,7 +167,6 @@ public:
PNGReaderImpl
::
PNGReaderImpl
(
SvStream
&
rPNGStream
)
PNGReaderImpl
::
PNGReaderImpl
(
SvStream
&
rPNGStream
)
:
mrPNGStream
(
rPNGStream
),
:
mrPNGStream
(
rPNGStream
),
mpAcc
(
nullptr
),
mpMaskAcc
(
nullptr
),
mpMaskAcc
(
nullptr
),
mpInflateInBuf
(
nullptr
),
mpInflateInBuf
(
nullptr
),
mpScanPrior
(
nullptr
),
mpScanPrior
(
nullptr
),
...
@@ -419,11 +418,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
...
@@ -419,11 +418,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
}
}
// release write access of the bitmaps
// release write access of the bitmaps
if
(
mpAcc
)
mpAcc
.
reset
();
{
Bitmap
::
ReleaseAccess
(
mpAcc
);
mpAcc
=
nullptr
;
}
if
(
mpMaskAcc
)
if
(
mpMaskAcc
)
{
{
...
@@ -662,7 +657,7 @@ bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
...
@@ -662,7 +657,7 @@ bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
return
false
;
return
false
;
mpBmp
=
o3tl
::
make_unique
<
Bitmap
>
(
maTargetSize
,
mnTargetDepth
);
mpBmp
=
o3tl
::
make_unique
<
Bitmap
>
(
maTargetSize
,
mnTargetDepth
);
mpAcc
=
mpBmp
->
AcquireWriteAccess
(
);
mpAcc
=
Bitmap
::
ScopedWriteAccess
(
*
mpBmp
);
if
(
!
mpAcc
)
if
(
!
mpAcc
)
return
false
;
return
false
;
...
@@ -1120,9 +1115,9 @@ void PNGReaderImpl::ImplApplyFilter()
...
@@ -1120,9 +1115,9 @@ void PNGReaderImpl::ImplApplyFilter()
namespace
namespace
{
{
void
SanitizePaletteIndexes
(
sal_uInt8
*
pEntries
,
int
nLen
,
BitmapWriteAccess
*
p
Acc
)
void
SanitizePaletteIndexes
(
sal_uInt8
*
pEntries
,
int
nLen
,
const
Bitmap
::
ScopedWriteAccess
&
r
Acc
)
{
{
sal_uInt16
nPaletteEntryCount
=
p
Acc
->
GetPaletteEntryCount
();
sal_uInt16
nPaletteEntryCount
=
r
Acc
->
GetPaletteEntryCount
();
for
(
int
nX
=
0
;
nX
<
nLen
;
++
nX
)
for
(
int
nX
=
0
;
nX
<
nLen
;
++
nX
)
{
{
if
(
pEntries
[
nX
]
>=
nPaletteEntryCount
)
if
(
pEntries
[
nX
]
>=
nPaletteEntryCount
)
...
...
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