From abf04f6b0ad0dd83b4d479723144593e2f83ede0 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Thu, 21 Jan 2016 15:00:08 +1100 Subject: vcl: add embeddable font property functions to Font class Added setter and getter for embeddable font property to the Font class. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test this flag. Change-Id: I7f4ddf09d4a122c7c335b017efcb95f1774ae0d8 Reviewed-on: https://gerrit.libreoffice.org/21650 Tested-by: Jenkins Reviewed-by: Chris Sherlock --- vcl/inc/impfont.hxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vcl/inc/impfont.hxx') diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx index e7475e1ff1ff..4cd79dc9ae4c 100644 --- a/vcl/inc/impfont.hxx +++ b/vcl/inc/impfont.hxx @@ -63,6 +63,7 @@ public: void SetItalic( const FontItalic eItalic ) { meItalic = eItalic; } void SetWeight( const FontWeight eWeight ) { meWeight = eWeight; } void SetWidthType( const FontWidth eWidthType ) { meWidthType = eWidthType; } + void SetCharSet( const rtl_TextEncoding eCharSet ) { meCharSet = eCharSet; } void SetSymbolFlag( const bool bSymbolFlag ) { mbSymbol = bSymbolFlag; } @@ -75,7 +76,7 @@ public: /* Missing function: OUString GetMapNames() const; */ bool IsBuiltInFont() const { return mbDevice; } - /* Missing function: bool CanEmbed() const; */ + bool CanEmbed() const { return mbEmbeddable; } /* Missing function: bool CanSubSet() const; */ /* Missing function: bool CanRotate() const; */ /* Missing function: bool HasMapNames() const; */ @@ -84,10 +85,9 @@ public: /* Missing function: void AddMapName( OUString const& ); */ void SetBuiltInFontFlag( bool bIsBuiltInFont ) { mbDevice = bIsBuiltInFont; } - /* Missing function: void SetEmbeddableFlag( bool ); */ + void SetEmbeddableFlag( bool bEmbeddable ) { mbEmbeddable = bEmbeddable; } /* Missing function: void SetSettableFlag( bool ); */ /* missing function: void SetOrientationFlag( bool ); */ - void SetCharSet( const rtl_TextEncoding eCharSet ) { meCharSet = eCharSet; } bool operator==( const ImplFont& ) const; @@ -124,7 +124,8 @@ private: mbShadow:1, mbVertical:1, mbTransparent:1, // compatibility, now on output device - mbDevice:1; + mbDevice:1, + mbEmbeddable:1; int mnQuality; friend SvStream& ReadImplFont( SvStream& rIStm, ImplFont& ); -- cgit