diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-13 17:14:53 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-13 17:19:57 +0000 |
commit | e3746c66929f4f038d1dee58b4fa222fb3c31951 (patch) | |
tree | e0665a5f244949e9b936e659698287f72c94c004 /vcl/source/outdev | |
parent | 7c24813fe911e908450e22ec14922952db72dce9 (diff) |
vcl: Create accessor and mutator for builtin font flag in FontMetric
Accessor and mutator created for builtin font flag, removed the
existing bit field.
See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor
and mutator for font scaling in FontMetric") for reasoning behind
patch.
Unit tests
- check to ensure that can set builtin font flag
- check equality operator on FontMetric after setting builtin font
flag
Change-Id: Iac3f4270f86d10f9dcd0bb6e3951c0e983a4f22f
Reviewed-on: https://gerrit.libreoffice.org/21414
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/font.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 923347c1d74a..e56e07d4104d 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -83,8 +83,7 @@ FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const aFontMetric.SetItalic( rData.GetSlantType() ); aFontMetric.SetWidthType( rData.GetWidthType() ); aFontMetric.SetScalableFlag( rData.IsScalable() ); - if( rData.IsBuiltInFont() ) - aFontMetric.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG; + aFontMetric.SetBuiltInFontFlag( rData.IsBuiltInFont() ); } return aFontMetric; @@ -214,8 +213,7 @@ FontMetric OutputDevice::GetFontMetric() const // set remaining metric fields aMetric.mpImplMetric->mnMiscFlags = 0; - if( pFontAttributes->IsBuiltInFont() ) - aMetric.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG; + aMetric.SetBuiltInFontFlag( pFontAttributes->IsBuiltInFont() ); aMetric.SetScalableFlag( pFontAttributes->IsScalable() ); aMetric.SetFullstopCenteredFlag( pFontAttributes->IsFullstopCentered() ); aMetric.mpImplMetric->mnBulletOffset = pFontAttributes->GetBulletOffset(); |