[Libreoffice-commits] core.git: svgio/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Sat May 1 07:31:17 UTC 2021
svgio/source/svgreader/svgtools.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit fe2f5f99636d938d57c1880c37d54c1b796f06f1
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat May 1 13:12:50 2021 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sat May 1 09:30:34 2021 +0200
svgio: covnert enum to enum class in svgtools.cxx
Change-Id: Ib442bfc60d16021f314a063643e199a776afa10f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114959
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx
index 66f89f2d60e1..b912ce568403 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -540,12 +540,12 @@ namespace svgio::svgreader
{
skip_char(rCandidate, ' ', nPos, nLen);
- enum DegreeType
+ enum class DegreeType
{
deg,
grad,
rad
- } aType(deg); // degrees is default
+ } aType(DegreeType::deg); // degrees is default
if(nPos < nLen)
{
@@ -562,7 +562,7 @@ namespace svgio::svgreader
{
// angle in grad
nPos += strlen(aStrGrad);
- aType = grad;
+ aType = DegreeType::grad;
}
break;
}
@@ -573,7 +573,7 @@ namespace svgio::svgreader
{
// angle in radians
nPos += strlen(aStrRad);
- aType = rad;
+ aType = DegreeType::rad;
}
break;
}
@@ -581,11 +581,11 @@ namespace svgio::svgreader
}
// convert to radians
- if(deg == aType)
+ if (DegreeType::deg == aType)
{
fAngle = basegfx::deg2rad(fAngle);
}
- else if(grad == aType)
+ else if (DegreeType::grad == aType)
{
// looks like 100 grad is 90 degrees
fAngle *= F_PI / 200.0;
More information about the Libreoffice-commits
mailing list