diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-04-01 19:35:19 +0900 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-04-02 08:43:10 +0000 |
commit | 11a52df2216bf96a3869ac894513959098dc14da (patch) | |
tree | aa3440ea45227f7649f92037dda791e0fc9649f0 /starmath/inc | |
parent | 00bf3a4259c1f960eff05b17649cc734c275950f (diff) |
Replace FNTSIZ_* with a scoped enumeration FontSizeType
Change-Id: Ia6bcaaac60c18abda803f6a40db8a5c5076b9427
Reviewed-on: https://gerrit.libreoffice.org/15101
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'starmath/inc')
-rw-r--r-- | starmath/inc/node.hxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index a6aae542d0aa..27b539a08ae8 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -36,11 +36,13 @@ #define ATTR_ITALIC 0x0002 -#define FNTSIZ_ABSOLUT 1 -#define FNTSIZ_PLUS 2 -#define FNTSIZ_MINUS 3 -#define FNTSIZ_MULTIPLY 4 -#define FNTSIZ_DIVIDE 5 +enum class FontSizeType { + ABSOLUT = 1, + PLUS = 2, + MINUS = 3, + MULTIPLY = 4, + DIVIDE = 5 +}; // flags to interdict respective status changes #define FLG_FONT 0x0001 @@ -143,7 +145,7 @@ public: SmFace & GetFont() { return aFace; }; void SetFont(const SmFace &rFace); - void SetFontSize(const Fraction &rRelSize, sal_uInt16 nType); + void SetFontSize(const Fraction &rRelSize, FontSizeType nType); void SetSize(const Fraction &rScale); virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); @@ -1247,20 +1249,20 @@ public: */ class SmFontNode : public SmStructureNode { - sal_uInt16 nSizeType; + FontSizeType nSizeType; Fraction aFontSize; public: SmFontNode(const SmToken &rNodeToken) : SmStructureNode(NFONT, rNodeToken) { - nSizeType = FNTSIZ_MULTIPLY; + nSizeType = FontSizeType::MULTIPLY; aFontSize = Fraction(1L); } - void SetSizeParameter(const Fraction &rValue, sal_uInt16 nType); + void SetSizeParameter(const Fraction &rValue, FontSizeType nType); const Fraction & GetSizeParameter() const {return aFontSize;} - const sal_uInt16& GetSizeType() const {return nSizeType;} + const FontSizeType& GetSizeType() const {return nSizeType;} virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) SAL_OVERRIDE; virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat) SAL_OVERRIDE; |