summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2021-09-08 12:07:48 +1000
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-18 11:51:52 +0200
commitc2e6a068c112f4c5866b6371d02362bd71f903a3 (patch)
treefcfdccb4ded2c743a39ed466d825326743d2f165 /svtools
parent9c289cfde6891eebac46270774ac5c16af093622 (diff)
vcl: create FontMetric from PhysicalFontFace
A FontMetric can be created from a PhysicalFontFace, so setup a constructor that takes a PhysicalFontFace object to instantiate the FontMetric. The OutputDevice functions GetDevFont() and GetDevFontCount() don't necessarily make much sense, so have changed GetDevFont() to GetFontMetricFromCollection() and GetDevFontCount() to GetFontFaceCollectionCount(). Change-Id: I1577679b949a49a7cf1248838786d0f5e84a5245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121796 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrltool.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index f9c7f30c6b97..14968cdf77f0 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -252,16 +252,16 @@ void FontList::ImplInsertFonts(OutputDevice* pDevice, bool bInsertData)
nType = FontListFontNameType::PRINTER;
// inquire all fonts from the device
- int n = pDevice->GetDevFontCount();
+ int n = pDevice->GetFontFaceCollectionCount();
if (n == 0 && comphelper::LibreOfficeKit::isActive())
{
pDevice->RefreshFontData(true);
- n = pDevice->GetDevFontCount();
+ n = pDevice->GetFontFaceCollectionCount();
}
for (int i = 0; i < n; ++i)
{
- FontMetric aFontMetric = pDevice->GetDevFont( i );
+ FontMetric aFontMetric = pDevice->GetFontMetricFromCollection( i );
OUString aSearchName(aFontMetric.GetFamilyName());
ImplFontListNameInfo* pData;
sal_uInt32 nIndex;