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
e2adbfc3
Kaydet (Commit)
e2adbfc3
authored
Agu 21, 2014
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: factor out font name lookup for future re-use.
Change-Id: I35f80610862528d7525fa61135604468271ca37a
üst
dd1c49d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
PhysicalFontCollection.hxx
vcl/inc/PhysicalFontCollection.hxx
+1
-0
PhysicalFontCollection.cxx
vcl/source/font/PhysicalFontCollection.cxx
+18
-10
No files found.
vcl/inc/PhysicalFontCollection.hxx
Dosyayı görüntüle @
e2adbfc3
...
@@ -54,6 +54,7 @@ public:
...
@@ -54,6 +54,7 @@ public:
// find the device font
// find the device font
PhysicalFontFamily
*
FindFontFamily
(
const
OUString
&
rFontName
)
const
;
PhysicalFontFamily
*
FindFontFamily
(
const
OUString
&
rFontName
)
const
;
PhysicalFontFamily
*
FindOrCreateFamily
(
const
OUString
&
rFamilyName
);
PhysicalFontFamily
*
ImplFindByFont
(
FontSelectPattern
&
)
const
;
PhysicalFontFamily
*
ImplFindByFont
(
FontSelectPattern
&
)
const
;
PhysicalFontFamily
*
ImplFindBySearchName
(
const
OUString
&
)
const
;
PhysicalFontFamily
*
ImplFindBySearchName
(
const
OUString
&
)
const
;
...
...
vcl/source/font/PhysicalFontCollection.cxx
Dosyayı görüntüle @
e2adbfc3
...
@@ -353,16 +353,7 @@ void PhysicalFontCollection::Add( PhysicalFontFace* pNewData )
...
@@ -353,16 +353,7 @@ void PhysicalFontCollection::Add( PhysicalFontFace* pNewData )
GetEnglishSearchFontName
(
aSearchName
);
GetEnglishSearchFontName
(
aSearchName
);
PhysicalFontFamilies
::
const_iterator
it
=
maPhysicalFontFamilies
.
find
(
aSearchName
);
PhysicalFontFamilies
::
const_iterator
it
=
maPhysicalFontFamilies
.
find
(
aSearchName
);
PhysicalFontFamily
*
pFoundData
=
NULL
;
PhysicalFontFamily
*
pFoundData
=
FindOrCreateFamily
(
aSearchName
);
if
(
it
!=
maPhysicalFontFamilies
.
end
()
)
pFoundData
=
(
*
it
).
second
;
if
(
!
pFoundData
)
{
pFoundData
=
new
PhysicalFontFamily
(
aSearchName
);
maPhysicalFontFamilies
[
aSearchName
]
=
pFoundData
;
}
bool
bKeepNewData
=
pFoundData
->
AddFontFace
(
pNewData
);
bool
bKeepNewData
=
pFoundData
->
AddFontFace
(
pNewData
);
...
@@ -434,6 +425,23 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( const OUString& rFon
...
@@ -434,6 +425,23 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( const OUString& rFon
return
pFound
;
return
pFound
;
}
}
PhysicalFontFamily
*
PhysicalFontCollection
::
FindOrCreateFamily
(
const
OUString
&
rFamilyName
)
{
PhysicalFontFamilies
::
const_iterator
it
=
maPhysicalFontFamilies
.
find
(
rFamilyName
);
PhysicalFontFamily
*
pFoundData
=
NULL
;
if
(
it
!=
maPhysicalFontFamilies
.
end
()
)
pFoundData
=
(
*
it
).
second
;
if
(
!
pFoundData
)
{
pFoundData
=
new
PhysicalFontFamily
(
rFamilyName
);
maPhysicalFontFamilies
[
rFamilyName
]
=
pFoundData
;
}
return
pFoundData
;
}
PhysicalFontFamily
*
PhysicalFontCollection
::
ImplFindByTokenNames
(
const
OUString
&
rTokenStr
)
const
PhysicalFontFamily
*
PhysicalFontCollection
::
ImplFindByTokenNames
(
const
OUString
&
rTokenStr
)
const
{
{
PhysicalFontFamily
*
pFoundData
=
NULL
;
PhysicalFontFamily
*
pFoundData
=
NULL
;
...
...
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