[Libreoffice-commits] core.git: vcl/inc vcl/source
Chris Sherlock
chris.sherlock79 at gmail.com
Fri Jan 15 16:01:52 PST 2016
vcl/inc/impfont.hxx | 52 +++++++++++++++++++++++++++++++++++++----
vcl/source/outdev/textline.cxx | 8 +++---
2 files changed, 51 insertions(+), 9 deletions(-)
New commits:
commit 0174562fa9e49bf989a571c6ccd51e558109b561
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Fri Jan 15 20:16:20 2016 +1100
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
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index cc4d194..a4d9e25 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 5560044..c5cb80e 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
More information about the Libreoffice-commits
mailing list