From bfd690701ff414496ad77c2b268bf7200947dc3a Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Wed, 13 Jan 2016 12:13:12 +1100 Subject: vcl: Create accessor and mutator for full stop centered in FontMetric Accessor and mutator created for full stop centered flag, removed 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 full stop centered flag - check equality operator on FontMetric after setting full stop centered flag Change-Id: I9cacb0fbf9ea65cfebcaebdc9f0481c0a796cbcf Reviewed-on: https://gerrit.libreoffice.org/21413 Reviewed-by: Chris Sherlock Tested-by: Chris Sherlock --- vcl/inc/impfont.hxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'vcl/inc/impfont.hxx') diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx index 376c0cb16ed5..5367a77f8a21 100644 --- a/vcl/inc/impfont.hxx +++ b/vcl/inc/impfont.hxx @@ -105,6 +105,7 @@ private: sal_uInt32 mnRefCount; // Reference Counter bool mbScalableFont; + bool mbFullstopCentered; // TODO: As these are progressively moved from bit fields into boolean variables, comment them out. // Eventually this enum will not be needed and we can remove it. @@ -113,8 +114,8 @@ private: /* SCALABLE_FLAG=2, */ LATIN_FLAG=4, CJK_FLAG=8, - CTL_FLAG=16, - FULLSTOP_CENTERED_FLAG=32 + CTL_FLAG=16 + /* FULLSTOP_CENTERED_FLAG=32 */ }; public: @@ -131,12 +132,13 @@ public: long GetExtLeading() const { return mnExtLeading; } long GetLineHeight() const { return mnLineHeight; } long GetSlant() const { return mnSlant; } + long GetBulletOffset() const { return mnBulletOffset; } bool IsScalable() const { return mbScalableFont; } - bool IsFullstopCentered() const { return ((mnMiscFlags & FULLSTOP_CENTERED_FLAG ) != 0); } - long GetBulletOffset() const { return mnBulletOffset; } + bool IsFullstopCentered() const { return mbFullstopCentered; } void SetScalableFlag(bool bScalable) { mbScalableFont = bScalable; } + void SetFullstopCenteredFlag(bool bCentered) { mbFullstopCentered = bCentered; } }; -- cgit