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
7fd1ed86
Kaydet (Commit)
7fd1ed86
authored
Kas 10, 2014
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: add BitmapEx load from icon theme constructor.
Change-Id: I3dbad69664b7417928a6be10ac561307dd94f67b
üst
72e901c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
bitmapex.hxx
include/vcl/bitmapex.hxx
+2
-0
bitmapex.cxx
vcl/source/gdi/bitmapex.cxx
+14
-3
No files found.
include/vcl/bitmapex.hxx
Dosyayı görüntüle @
7fd1ed86
...
...
@@ -46,6 +46,7 @@ public:
BitmapEx
();
BitmapEx
(
const
ResId
&
rResId
);
BitmapEx
(
const
OUString
&
rIconName
);
BitmapEx
(
const
BitmapEx
&
rBitmapEx
);
BitmapEx
(
const
BitmapEx
&
rBitmapEx
,
Point
aSrc
,
Size
aSize
);
BitmapEx
(
const
Bitmap
&
rBmp
);
...
...
@@ -460,6 +461,7 @@ public:
private
:
friend
class
ImpGraphic
;
friend
bool
VCL_DLLPUBLIC
WriteDIBBitmapEx
(
const
BitmapEx
&
rSource
,
SvStream
&
rOStm
);
void
loadFromIconTheme
(
const
OUString
&
rIconName
);
Bitmap
aBitmap
;
Bitmap
aMask
;
...
...
vcl/source/gdi/bitmapex.cxx
Dosyayı görüntüle @
7fd1ed86
...
...
@@ -85,11 +85,15 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
CopyPixel
(
aDestRect
,
aSrcRect
,
&
rBitmapEx
);
}
BitmapEx
::
BitmapEx
(
const
OUString
&
rIconName
)
{
loadFromIconTheme
(
rIconName
);
}
BitmapEx
::
BitmapEx
(
const
ResId
&
rResId
)
:
eTransparent
(
TRANSPARENT_NONE
),
bAlpha
(
false
)
{
static
ImplImageTreeSingletonRef
aImageTree
;
ResMgr
*
pResMgr
=
NULL
;
ResMgr
::
GetResourceSkipHeader
(
rResId
.
SetRT
(
RSC_BITMAP
),
&
pResMgr
);
...
...
@@ -97,13 +101,20 @@ BitmapEx::BitmapEx( const ResId& rResId ) :
pResMgr
->
ReadLong
();
const
OUString
aFileName
(
pResMgr
->
ReadString
()
);
loadFromIconTheme
(
aFileName
);
}
void
BitmapEx
::
loadFromIconTheme
(
const
OUString
&
rIconName
)
{
static
ImplImageTreeSingletonRef
aImageTree
;
OUString
aIconTheme
=
Application
::
GetSettings
().
GetStyleSettings
().
DetermineIconTheme
();
if
(
!
aImageTree
->
loadImage
(
aFile
Name
,
aIconTheme
,
*
this
,
true
)
)
if
(
!
aImageTree
->
loadImage
(
rIcon
Name
,
aIconTheme
,
*
this
,
true
)
)
{
#ifdef DBG_UTIL
OStringBuffer
aErrorStr
(
"BitmapEx::BitmapEx(
const ResId& rResId
): could not load image <"
);
"BitmapEx::BitmapEx(): could not load image <"
);
aErrorStr
.
append
(
OUStringToOString
(
aFileName
,
RTL_TEXTENCODING_ASCII_US
)).
append
(
"> via icon theme "
);
aErrorStr
.
append
(
OUStringToOString
(
aIconTheme
,
RTL_TEXTENCODING_ASCII_US
)).
append
(
'.'
);
OSL_FAIL
(
aErrorStr
.
getStr
());
...
...
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