summaryrefslogtreecommitdiff
path: root/vcl/inc/impfont.hxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-16 12:24:17 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-16 05:59:52 +0000
commitbb3fc6cda5700e64eec3233737765e0ab55f5b9e (patch)
tree360f9fa9fd995927227a233e0f1a6c5daec0bd4c /vcl/inc/impfont.hxx
parent65c1137757e394961808a29b5607ee0ed6977a34 (diff)
vcl: created accessors and mutators for font classes
Font accessors: - GetFamily() - GetPitch() - GetWidthType() - GetWeight() - GetItalic() - GetName() <--- shouldn't that be GetFamilyName()?!? - GetStyleName() Font mutators did not need to be added. Font unit tests are testing: - Setting and getting FontFamily private member - Setting and getting FontPitch private member - Setting and getting FontWidth private member - Setting and getting FontWeight private member - Setting and getting FontItalic private member - Setting and getting the family name and style ImplFont accessors: - GetFamilyNoAsk() - GetPitchNoAsk() - GetWidthTypeNoAsk() - GetWeightNoAsk() - GetItalicNoAsk() - GetFamilyName() - GetStyleName() (These "NoAsk" functions are necessary because the default getters call on a function that checks the configuration for default values, something that is not wanted in all cases). Change-Id: Icfbc8b4e5253d55a80892df050b0803dfc7d7c9f Reviewed-on: https://gerrit.libreoffice.org/21501 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/inc/impfont.hxx')
-rw-r--r--vcl/inc/impfont.hxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index a4d9e25ec2af..54b4cf8135aa 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -38,14 +38,21 @@ public:
// device independent font functions
const OUString& GetFamilyName() const { return maFamilyName; }
FontFamily GetFamily() { if(meFamily==FAMILY_DONTKNOW) AskConfig(); return meFamily; }
+ FontFamily GetFamilyNoAsk() const { return meFamily; }
FontFamily GetFamilyType() { return GetFamily(); }
+ FontFamily GetFamilyTypeNoAsk() const { return GetFamilyNoAsk(); }
const OUString& GetStyleName() const { return maStyleName; }
FontWeight GetWeight() { if(meWeight==WEIGHT_DONTKNOW) AskConfig(); return meWeight; }
+ FontWeight GetWeightNoAsk() const { return meWeight; }
FontItalic GetSlantType() { return GetItalic(); }
+ FontItalic GetSlantType() const { return GetItalicNoAsk(); }
FontItalic GetItalic() { if(meItalic==ITALIC_DONTKNOW) AskConfig(); return meItalic; }
+ FontItalic GetItalicNoAsk() const { return meItalic; }
FontPitch GetPitch() { if(mePitch==PITCH_DONTKNOW) AskConfig(); return mePitch; }
- FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW)AskConfig(); return meWidthType; }
+ FontPitch GetPitchNoAsk() const { return mePitch; }
+ FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW) AskConfig(); return meWidthType; }
+ FontWidth GetWidthTypeNoAsk() const { return meWidthType; }
bool IsSymbolFont() const { return mbSymbol; }