summaryrefslogtreecommitdiffstats
path: root/cui
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 /cui
parentFix typo (diff)
downloadcore-c2e6a068c112f4c5866b6371d02362bd71f903a3.tar.gz
core-c2e6a068c112f4c5866b6371d02362bd71f903a3.zip
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 'cui')
-rw-r--r--cui/source/dialogs/cuicharmap.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index c8bf07cc5794..acdacbd803c0 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -451,12 +451,12 @@ void SvxCharacterMap::init()
OUString aDefStr( aFont.GetFamilyName() );
OUString aLastName;
- int nCount = m_xVirDev->GetDevFontCount();
+ int nCount = m_xVirDev->GetFontFaceCollectionCount();
std::vector<weld::ComboBoxEntry> aEntries;
aEntries.reserve(nCount);
for (int i = 0; i < nCount; ++i)
{
- OUString aFontName( m_xVirDev->GetDevFont( i ).GetFamilyName() );
+ OUString aFontName( m_xVirDev->GetFontMetricFromCollection( i ).GetFamilyName() );
if (aFontName != aLastName)
{
aLastName = aFontName;
@@ -657,7 +657,7 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph)
IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, weld::ComboBox&, void)
{
const sal_uInt32 nFont = m_xFontLB->get_active_id().toUInt32();
- aFont = m_xVirDev->GetDevFont(nFont);
+ aFont = m_xVirDev->GetFontMetricFromCollection(nFont);
aFont.SetWeight( WEIGHT_DONTKNOW );
aFont.SetItalic( ITALIC_NONE );
aFont.SetWidthType( WIDTH_DONTKNOW );