diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-15 15:53:44 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-15 18:39:30 +1100 |
commit | 51b1b469abdc33a3c92f2a95cd4d326d9166ef05 (patch) | |
tree | 7f400c76618a3b88cc75e0829f7e3bc4a9cd41de | |
parent | ed373ea7efd34ca6baab8ddbf809e6f2a06f1a9e (diff) |
vcl: create a default FontAttributes constructor
Change-Id: If2f297c9c4ee1dd4aff5d24ddd55fa4bb33073e0
-rw-r--r-- | vcl/inc/fontattributes.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/impfontmetric.hxx | 8 | ||||
-rw-r--r-- | vcl/source/font/fontattributes.cxx | 17 |
3 files changed, 20 insertions, 9 deletions
diff --git a/vcl/inc/fontattributes.hxx b/vcl/inc/fontattributes.hxx index 2c1a42df7dea..f1f768405187 100644 --- a/vcl/inc/fontattributes.hxx +++ b/vcl/inc/fontattributes.hxx @@ -26,6 +26,8 @@ class FontAttributes { public: + explicit FontAttributes(); + // device independent font functions const OUString& GetFamilyName() const { return maFamilyName; } FontFamily GetFamilyType() const { return meFamily; } @@ -91,10 +93,10 @@ private: OUString maFamilyName; // Font Family Name OUString maStyleName; // Font Style Name FontWeight meWeight; // Weight Type - FontItalic meItalic; // Slant Type FontFamily meFamily; // Family Type FontPitch mePitch; // Pitch Type FontWidth meWidthType; // Width Type + FontItalic meItalic; // Slant Type bool mbSymbolFlag; // Is font a symbol? // device dependent variables diff --git a/vcl/inc/impfontmetric.hxx b/vcl/inc/impfontmetric.hxx index e39a8bb5b668..8c021bfb5666 100644 --- a/vcl/inc/impfontmetric.hxx +++ b/vcl/inc/impfontmetric.hxx @@ -27,10 +27,6 @@ typedef boost::intrusive_ptr< ImplFontCharMap > ImplFontCharMapPtr; class ImplFontMetric { - friend class FontMetric; - friend void intrusive_ptr_add_ref(ImplFontMetric* pImplFontMetric); - friend void intrusive_ptr_release(ImplFontMetric* pImplFontMetric); - public: explicit ImplFontMetric(); @@ -61,6 +57,10 @@ public: bool operator==( const ImplFontMetric& ) const; private: + friend class FontMetric; + friend void intrusive_ptr_add_ref(ImplFontMetric* pImplFontMetric); + friend void intrusive_ptr_release(ImplFontMetric* pImplFontMetric); + long mnAscent; // Ascent long mnDescent; // Descent long mnIntLeading; // Internal Leading diff --git a/vcl/source/font/fontattributes.cxx b/vcl/source/font/fontattributes.cxx index e750e65538f8..74c120c43cf8 100644 --- a/vcl/source/font/fontattributes.cxx +++ b/vcl/source/font/fontattributes.cxx @@ -58,10 +58,19 @@ #include <memory> #include <algorithm> -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::rtl; -using namespace ::utl; +FontAttributes::FontAttributes() +: meWeight( WEIGHT_DONTKNOW ), + mePitch( PITCH_DONTKNOW ), + meWidthType ( WIDTH_DONTKNOW ), + meItalic ( ITALIC_NONE ), + mbSymbolFlag( false ), + mnQuality( 0 ), + mbOrientation( false ), + mbDevice( false ), + mbSubsettable( false ), + mbEmbeddable ( false ) +{} + bool FontAttributes::CompareDeviceIndependentFontAttributes(const FontAttributes& rOther) const { |