summaryrefslogtreecommitdiff
path: root/starmath/source/node.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-04-01 19:35:19 +0900
committerNoel Grandin <noelgrandin@gmail.com>2015-04-02 08:43:10 +0000
commit11a52df2216bf96a3869ac894513959098dc14da (patch)
treeaa3440ea45227f7649f92037dda791e0fc9649f0 /starmath/source/node.cxx
parent00bf3a4259c1f960eff05b17649cc734c275950f (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/source/node.cxx')
-rw-r--r--starmath/source/node.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 80bba2cf1e54..9f413ee2bd4a 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -164,7 +164,7 @@ void SmNode::SetFont(const SmFace &rFace)
}
-void SmNode::SetFontSize(const Fraction &rSize, sal_uInt16 nType)
+void SmNode::SetFontSize(const Fraction &rSize, FontSizeType nType)
//! 'rSize' is in units of pts
{
Size aFntSize;
@@ -179,23 +179,23 @@ void SmNode::SetFontSize(const Fraction &rSize, sal_uInt16 nType)
aFntSize.Width() = 0;
switch(nType)
{
- case FNTSIZ_ABSOLUT:
+ case FontSizeType::ABSOLUT:
aFntSize.Height() = nHeight;
break;
- case FNTSIZ_PLUS:
+ case FontSizeType::PLUS:
aFntSize.Height() += nHeight;
break;
- case FNTSIZ_MINUS:
+ case FontSizeType::MINUS:
aFntSize.Height() -= nHeight;
break;
- case FNTSIZ_MULTIPLY:
+ case FontSizeType::MULTIPLY:
aFntSize.Height() = (long) (Fraction(aFntSize.Height()) * rSize);
break;
- case FNTSIZ_DIVIDE:
+ case FontSizeType::DIVIDE:
if (rSize != Fraction(0L))
aFntSize.Height() = (long) (Fraction(aFntSize.Height()) / rSize);
break;
@@ -2038,19 +2038,19 @@ void SmFontNode::CreateTextFromNode(OUString &rText)
rText += "size ";
switch (nSizeType)
{
- case FNTSIZ_PLUS:
+ case FontSizeType::PLUS:
rText += "+";
break;
- case FNTSIZ_MINUS:
+ case FontSizeType::MINUS:
rText += "-";
break;
- case FNTSIZ_MULTIPLY:
+ case FontSizeType::MULTIPLY:
rText += "*";
break;
- case FNTSIZ_DIVIDE:
+ case FontSizeType::DIVIDE:
rText += "/";
break;
- case FNTSIZ_ABSOLUT:
+ case FontSizeType::ABSOLUT:
default:
break;
}
@@ -2205,7 +2205,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmFontNode::SetSizeParameter(const Fraction& rValue, sal_uInt16 Type)
+void SmFontNode::SetSizeParameter(const Fraction& rValue, FontSizeType Type)
{
nSizeType = Type;
aFontSize = rValue;