summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/font.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2021-09-05 13:35:13 +1000
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-18 07:52:10 +0200
commitd596eb99c887b52ab99c38665cf1cacbcd24b029 (patch)
tree2dcd68a1b338362c1eeeba5ad7b663c75eebfe16 /vcl/source/outdev/font.cxx
parent1f9a792a391f0811bbb5f570ad5c84d13312c539 (diff)
vcl: rename ImplDeviceFontList to PhysicalFontFaceCollection and test
- renamed ImplDeviceFontList to PhysicalFontFaceCollection and moved to own header file - wrote unit test for PhysicalFontFaceCollection Note that this is part of a series of patches where I also move font files into the relevant font directories, and into the vcl::font namespace. Change-Id: I43669137bcd9a9b2a9417b2369a5cb1b93b93733 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121663 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl/source/outdev/font.cxx')
-rw-r--r--vcl/source/outdev/font.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 4161ea8ce236..ed6f5be095b8 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -38,6 +38,7 @@
#include <window.h>
#include <ImplLayoutArgs.hxx>
+#include <font/PhysicalFontFaceCollection.hxx>
#include <PhysicalFontCollection.hxx>
#include <drawmode.hxx>
#include <font/FeatureCollector.hxx>
@@ -103,7 +104,7 @@ FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const
int nCount = GetDevFontCount();
if( nDevFontIndex < nCount )
{
- const PhysicalFontFace& rData = *mpDeviceFontList->Get( nDevFontIndex );
+ const PhysicalFontFace& rData = *mpFontFaceCollection->Get( nDevFontIndex );
aFontMetric.SetFamilyName( rData.GetFamilyName() );
aFontMetric.SetStyleName( rData.GetStyleName() );
aFontMetric.SetCharSet( rData.GetCharSet() );
@@ -121,22 +122,22 @@ FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const
int OutputDevice::GetDevFontCount() const
{
- if( !mpDeviceFontList )
+ if( !mpFontFaceCollection )
{
if (!mxFontCollection)
{
return 0;
}
- mpDeviceFontList = mxFontCollection->GetDeviceFontList();
+ mpFontFaceCollection = mxFontCollection->GetFontFaceCollection();
- if (!mpDeviceFontList->Count())
+ if (!mpFontFaceCollection->Count())
{
- mpDeviceFontList.reset();
+ mpFontFaceCollection.reset();
return 0;
}
}
- return mpDeviceFontList->Count();
+ return mpFontFaceCollection->Count();
}
bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const
@@ -512,7 +513,7 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists )
if ( bNewFontLists )
{
- mpDeviceFontList.reset();
+ mpFontFaceCollection.reset();
mpDeviceFontSizeList.reset();
// release all physically selected fonts on this device
@@ -1487,7 +1488,7 @@ void OutputDevice::ImplReleaseFonts()
mbInitFont = true;
mpFontInstance.clear();
- mpDeviceFontList.reset();
+ mpFontFaceCollection.reset();
mpDeviceFontSizeList.reset();
}