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
47fbe385
Kaydet (Commit)
47fbe385
authored
Kas 28, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid pointless class derivation for the CoreText SystemFontList
Change-Id: Ib3e6705d166dec9d7db8787496947faf73e3cfb3
üst
0379f8b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
40 deletions
+22
-40
ctfonts.cxx
vcl/coretext/ctfonts.cxx
+8
-31
salgdi2.cxx
vcl/coretext/salgdi2.cxx
+0
-6
salgdi2.h
vcl/inc/coretext/salgdi2.h
+14
-3
No files found.
vcl/coretext/ctfonts.cxx
Dosyayı görüntüle @
47fbe385
...
@@ -36,29 +36,6 @@
...
@@ -36,29 +36,6 @@
// =======================================================================
// =======================================================================
class
CTFontList
:
public
SystemFontList
{
public
:
explicit
CTFontList
(
void
);
virtual
~
CTFontList
(
void
);
bool
Init
(
void
);
void
AddFont
(
CoreTextFontData
*
);
virtual
void
AnnounceFonts
(
ImplDevFontList
&
)
const
;
virtual
CoreTextFontData
*
GetFontDataFromId
(
sal_IntPtr
)
const
;
private
:
CTFontCollectionRef
mpCTFontCollection
;
CFArrayRef
mpCTFontArray
;
typedef
boost
::
unordered_map
<
sal_IntPtr
,
CoreTextFontData
*>
CTFontContainer
;
CTFontContainer
maFontContainer
;
};
// =======================================================================
inline
double
toRadian
(
int
nDegree
)
inline
double
toRadian
(
int
nDegree
)
{
{
return
nDegree
*
(
M_PI
/
1800.0
);
return
nDegree
*
(
M_PI
/
1800.0
);
...
@@ -411,21 +388,21 @@ static void CTFontEnumCallBack( const void* pValue, void* pContext )
...
@@ -411,21 +388,21 @@ static void CTFontEnumCallBack( const void* pValue, void* pContext )
{
{
const
sal_IntPtr
nFontId
=
(
sal_IntPtr
)
pValue
;
const
sal_IntPtr
nFontId
=
(
sal_IntPtr
)
pValue
;
CoreTextFontData
*
pFontData
=
new
CoreTextFontData
(
rDFA
,
nFontId
);
CoreTextFontData
*
pFontData
=
new
CoreTextFontData
(
rDFA
,
nFontId
);
CTFontList
*
pFontList
=
(
CT
FontList
*
)
pContext
;
SystemFontList
*
pFontList
=
(
System
FontList
*
)
pContext
;
pFontList
->
AddFont
(
pFontData
);
pFontList
->
AddFont
(
pFontData
);
}
}
}
}
// =======================================================================
// =======================================================================
CTFontList
::
CT
FontList
()
SystemFontList
::
System
FontList
()
:
mpCTFontCollection
(
NULL
)
:
mpCTFontCollection
(
NULL
)
,
mpCTFontArray
(
NULL
)
,
mpCTFontArray
(
NULL
)
{}
{}
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
CTFontList
::~
CT
FontList
()
SystemFontList
::~
System
FontList
()
{
{
CTFontContainer
::
const_iterator
it
=
maFontContainer
.
begin
();
CTFontContainer
::
const_iterator
it
=
maFontContainer
.
begin
();
for
(;
it
!=
maFontContainer
.
end
();
++
it
)
for
(;
it
!=
maFontContainer
.
end
();
++
it
)
...
@@ -440,7 +417,7 @@ CTFontList::~CTFontList()
...
@@ -440,7 +417,7 @@ CTFontList::~CTFontList()
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
CT
FontList
::
AddFont
(
CoreTextFontData
*
pFontData
)
void
System
FontList
::
AddFont
(
CoreTextFontData
*
pFontData
)
{
{
sal_IntPtr
nFontId
=
pFontData
->
GetFontId
();
sal_IntPtr
nFontId
=
pFontData
->
GetFontId
();
maFontContainer
[
nFontId
]
=
pFontData
;
maFontContainer
[
nFontId
]
=
pFontData
;
...
@@ -448,7 +425,7 @@ void CTFontList::AddFont( CoreTextFontData* pFontData )
...
@@ -448,7 +425,7 @@ void CTFontList::AddFont( CoreTextFontData* pFontData )
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
CT
FontList
::
AnnounceFonts
(
ImplDevFontList
&
rFontList
)
const
void
System
FontList
::
AnnounceFonts
(
ImplDevFontList
&
rFontList
)
const
{
{
CTFontContainer
::
const_iterator
it
=
maFontContainer
.
begin
();
CTFontContainer
::
const_iterator
it
=
maFontContainer
.
begin
();
for
(;
it
!=
maFontContainer
.
end
();
++
it
)
for
(;
it
!=
maFontContainer
.
end
();
++
it
)
...
@@ -457,7 +434,7 @@ void CTFontList::AnnounceFonts( ImplDevFontList& rFontList ) const
...
@@ -457,7 +434,7 @@ void CTFontList::AnnounceFonts( ImplDevFontList& rFontList ) const
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
CoreTextFontData
*
CT
FontList
::
GetFontDataFromId
(
sal_IntPtr
nFontId
)
const
CoreTextFontData
*
System
FontList
::
GetFontDataFromId
(
sal_IntPtr
nFontId
)
const
{
{
CTFontContainer
::
const_iterator
it
=
maFontContainer
.
find
(
nFontId
);
CTFontContainer
::
const_iterator
it
=
maFontContainer
.
find
(
nFontId
);
if
(
it
==
maFontContainer
.
end
()
)
if
(
it
==
maFontContainer
.
end
()
)
...
@@ -467,7 +444,7 @@ CoreTextFontData* CTFontList::GetFontDataFromId( sal_IntPtr nFontId ) const
...
@@ -467,7 +444,7 @@ CoreTextFontData* CTFontList::GetFontDataFromId( sal_IntPtr nFontId ) const
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
bool
CT
FontList
::
Init
(
void
)
bool
System
FontList
::
Init
(
void
)
{
{
// enumerate available system fonts
// enumerate available system fonts
static
const
int
nMaxDictEntries
=
8
;
static
const
int
nMaxDictEntries
=
8
;
...
@@ -489,7 +466,7 @@ bool CTFontList::Init( void )
...
@@ -489,7 +466,7 @@ bool CTFontList::Init( void )
SystemFontList
*
GetCoretextFontList
(
void
)
SystemFontList
*
GetCoretextFontList
(
void
)
{
{
CTFontList
*
pList
=
new
CT
FontList
();
SystemFontList
*
pList
=
new
System
FontList
();
if
(
!
pList
->
Init
()
)
{
if
(
!
pList
->
Init
()
)
{
delete
pList
;
delete
pList
;
return
NULL
;
return
NULL
;
...
...
vcl/coretext/salgdi2.cxx
Dosyayı görüntüle @
47fbe385
...
@@ -59,12 +59,6 @@
...
@@ -59,12 +59,6 @@
using
namespace
vcl
;
using
namespace
vcl
;
// =======================================================================
SystemFontList
::~
SystemFontList
(
void
)
{}
// =======================================================================
// =======================================================================
CoreTextFontData
::
CoreTextFontData
(
const
CoreTextFontData
&
rSrc
)
CoreTextFontData
::
CoreTextFontData
(
const
CoreTextFontData
&
rSrc
)
...
...
vcl/inc/coretext/salgdi2.h
Dosyayı görüntüle @
47fbe385
...
@@ -119,10 +119,21 @@ private:
...
@@ -119,10 +119,21 @@ private:
class
SystemFontList
class
SystemFontList
{
{
public
:
public
:
virtual
~
SystemFontList
(
void
);
SystemFontList
(
void
);
~
SystemFontList
(
void
);
virtual
void
AnnounceFonts
(
ImplDevFontList
&
)
const
=
0
;
bool
Init
(
void
);
virtual
CoreTextFontData
*
GetFontDataFromId
(
sal_IntPtr
nFontId
)
const
=
0
;
void
AddFont
(
CoreTextFontData
*
);
void
AnnounceFonts
(
ImplDevFontList
&
)
const
;
CoreTextFontData
*
GetFontDataFromId
(
sal_IntPtr
nFontId
)
const
;
private
:
CTFontCollectionRef
mpCTFontCollection
;
CFArrayRef
mpCTFontArray
;
typedef
boost
::
unordered_map
<
sal_IntPtr
,
CoreTextFontData
*>
CTFontContainer
;
CTFontContainer
maFontContainer
;
};
};
#ifdef MACOSX
#ifdef MACOSX
...
...
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