summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-15 20:16:20 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-16 11:01:17 +1100
commit0174562fa9e49bf989a571c6ccd51e558109b561 (patch)
tree6e7a15df999135eb895680e1f0296eaf6df740bd /vcl
parentd86963b5e84eebf102676efeb718b5bd05515f31 (diff)
vcl: ImplFontMetric and FontAttributes is *very* familiar
So much so that I think we only need one or the other. As such, I'm implementing the functionality that is in one of the classes so that (and vice versa) might eventually be able to use the same class! Change-Id: I1b32a5a5213ea406a96386ac4a4553cd81d3728d
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/impfont.hxx52
-rw-r--r--vcl/source/outdev/textline.cxx8
2 files changed, 51 insertions, 9 deletions
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index cc4d19429cea..a4d9e25ec2af 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -27,17 +27,59 @@
#include <boost/intrusive_ptr.hpp>
+/* The following class is extraordinarily similar to FontAttributes. */
+
class ImplFont
{
public:
explicit ImplFont();
explicit ImplFont( const ImplFont& );
- FontPitch GetPitch() { if(mePitch==PITCH_DONTKNOW) AskConfig(); return mePitch; }
- FontFamily GetFamily() { if(meFamily==FAMILY_DONTKNOW) AskConfig(); return meFamily; }
- FontItalic GetItalic() { if(meItalic==ITALIC_DONTKNOW) AskConfig(); return meItalic; }
- FontWeight GetWeight() { if(meWeight==WEIGHT_DONTKNOW) AskConfig(); return meWeight; }
- FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW)AskConfig(); return meWidthType; }
+ // device independent font functions
+ const OUString& GetFamilyName() const { return maFamilyName; }
+ FontFamily GetFamily() { if(meFamily==FAMILY_DONTKNOW) AskConfig(); return meFamily; }
+ FontFamily GetFamilyType() { return GetFamily(); }
+ const OUString& GetStyleName() const { return maStyleName; }
+
+ FontWeight GetWeight() { if(meWeight==WEIGHT_DONTKNOW) AskConfig(); return meWeight; }
+ FontItalic GetSlantType() { return GetItalic(); }
+ FontItalic GetItalic() { if(meItalic==ITALIC_DONTKNOW) AskConfig(); return meItalic; }
+ FontPitch GetPitch() { if(mePitch==PITCH_DONTKNOW) AskConfig(); return mePitch; }
+ FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW)AskConfig(); return meWidthType; }
+
+ bool IsSymbolFont() const { return mbSymbol; }
+
+ void SetFamilyName( const OUString& sFamilyName ) { maFamilyName = sFamilyName; }
+ void SetStyleName( const OUString& sStyleName ) { maStyleName = sStyleName; }
+ void SetFamilyType( const FontFamily eFontFamily ) { meFamily = eFontFamily; }
+
+ void SetPitch( const FontPitch ePitch ) { mePitch = ePitch; }
+ void SetItalic( const FontItalic eItalic ) { meItalic = eItalic; }
+ void SetWeight( const FontWeight eWeight ) { meWeight = eWeight; }
+ void SetWidthType( const FontWidth eWidthType ) { meWidthType = eWidthType; }
+
+ void SetSymbolFlag( const bool bSymbolFlag ) { mbSymbol = bSymbolFlag; }
+
+ // device dependent functions
+ /* Missing function: int GetQuality() const; */
+ /* Missing function: OUString GetMapNames() const; */
+
+ /* Missing function: bool IsBuiltInFont() const; */
+ /* Missing function: bool CanEmbed() const; */
+ /* Missing function: bool CanSubSet() const; */
+ /* Missing function: bool CanRotate() const; */
+ /* Missing function: bool HasMapNames() const; */
+
+ /* Missing function: void SetQuality( int nQuality ); */
+ /* Missing function: void IncreaseQualityBy( int nQualityAmount ); */
+ /* Missing function: void DecreaseQualityBy( int nQualityAmount ); */
+ /* Missing function: void SetNames( OUString const& ); */
+ /* Missing function: Vod AddMapName( OUString const& ); */
+
+ /* Missing function: SetBuiltInFontFlag( bool ); */
+ /* Missing function: SetEmbeddableFlag( bool ); */
+ /* Missing function: SetSettableFlag( bool ); */
+ /* missing function: SetOrientationFlag( bool ); */
bool operator==( const ImplFont& ) const;
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 556004447776..c5cb80e0f889 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -32,10 +32,10 @@
#include "impfont.hxx"
#include "outdata.hxx"
-#include <config_graphite.h>
-#if ENABLE_GRAPHITE
-#include "graphite_features.hxx"
-#endif
+//#include <config_graphite.h>
+//#if ENABLE_GRAPHITE
+//#include "graphite_features.hxx"
+//#endif
#define UNDERLINE_LAST UNDERLINE_BOLDWAVE
#define STRIKEOUT_LAST STRIKEOUT_X