diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2021-09-08 12:07:48 +1000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-18 11:51:52 +0200 |
commit | c2e6a068c112f4c5866b6371d02362bd71f903a3 (patch) | |
tree | fcfdccb4ded2c743a39ed466d825326743d2f165 /sw | |
parent | 9c289cfde6891eebac46270774ac5c16af093622 (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 'sw')
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dialog/ascfldlg.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index de601d0a6b7f..a8c7dba32850 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -766,10 +766,10 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) { // get the set of distinct available family names std::set< OUString > aFontNames; - int nFontNames = m_pPrt->GetDevFontCount(); + int nFontNames = m_pPrt->GetFontFaceCollectionCount(); for( int i = 0; i < nFontNames; i++ ) { - FontMetric aFontMetric( m_pPrt->GetDevFont( i ) ); + FontMetric aFontMetric( m_pPrt->GetFontMetricFromCollection( i ) ); aFontNames.insert( aFontMetric.GetFamilyName() ); } diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 5ed597d7fc83..895c0398feb2 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -204,10 +204,10 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( weld::Window* pParent, SwDocShell& rDocSh, // get the set of distinct available family names std::set< OUString > aFontNames; - int nFontNames = pPrt->GetDevFontCount(); + int nFontNames = pPrt->GetFontFaceCollectionCount(); for( int i = 0; i < nFontNames; i++ ) { - FontMetric aFontMetric( pPrt->GetDevFont( i ) ); + FontMetric aFontMetric( pPrt->GetFontMetricFromCollection( i ) ); aFontNames.insert( aFontMetric.GetFamilyName() ); } |