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
6aa4485d
Kaydet (Commit)
6aa4485d
authored
Agu 16, 2012
tarafından
Jianyuan Li
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#119535# Fix WMF image with type pattern brush
Reported by: Du Jing Patch by: Jianyuan Li Review by: SunYing
üst
cbdcdbff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
enhwmf.cxx
svtools/source/filter/wmf/enhwmf.cxx
+38
-0
No files found.
svtools/source/filter/wmf/enhwmf.cxx
Dosyayı görüntüle @
6aa4485d
...
...
@@ -1280,7 +1280,45 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
}
}
break
;
case
EMR_CREATEDIBPATTERNBRUSHPT
:
sal_uInt32
nTmp32
;
sal_uInt32
nOffset
;
*
pWMF
>>
nIndex
;
Bitmap
aBmp
;
BitmapReadAccess
*
pBmp
;
sal_uInt32
nRed
=
0
,
nGreen
=
0
,
nBlue
=
0
,
nCount
=
1
;
*
pWMF
>>
nTmp32
;
*
pWMF
>>
nOffset
;
for
(
sal_Int32
i
=
0
;
i
<
(
nOffset
-
20
)
/
4
;
i
++
)
{
*
pWMF
>>
nTmp32
;
}
aBmp
.
Read
(
*
pWMF
,
sal_False
);
pBmp
=
aBmp
.
AcquireReadAccess
();
if
(
pBmp
)
{
for
(
sal_Int32
y
=
0
;
y
<
pBmp
->
Height
();
y
++
)
{
for
(
sal_Int32
x
=
0
;
x
<
pBmp
->
Width
();
x
++
)
{
const
BitmapColor
aColor
(
pBmp
->
GetColor
(
y
,
x
)
);
nRed
+=
aColor
.
GetRed
();
nGreen
+=
aColor
.
GetGreen
();
nBlue
+=
aColor
.
GetBlue
();
}
}
nCount
=
pBmp
->
Height
()
*
pBmp
->
Width
();
if
(
!
nCount
)
nCount
++
;
aBmp
.
ReleaseAccess
(
pBmp
);
}
Color
aColor
(
(
sal_Char
)(
nRed
/
nCount
),
(
sal_Char
)(
nGreen
/
nCount
),
(
sal_Char
)(
nBlue
/
nCount
)
);
pOut
->
CreateObject
(
nIndex
,
GDI_BRUSH
,
new
WinMtfFillStyle
(
aColor
,
sal_False
)
);
break
;
#ifdef WIN_MTF_ASSERT
default
:
WinMtfAssertHandler
(
"Unknown Meta Action"
);
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