summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/output.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2022-02-25 11:57:15 +0900
committerTomaž Vajngerl <quikee@gmail.com>2022-04-10 15:32:32 +0200
commitc3e4faa0302de338b7dd07e1c6f4a0c53da59f35 (patch)
tree2c5c24f7c5a699606f5bdb8e3dd384762e8f9440 /sc/source/ui/view/output.cxx
parent33e8e6495c8949da4a5219b987148124d0e29658 (diff)
sc: use enums instead strings for some SparklineGroup props.
Change-Id: I082c0a7693c97a67bc4972398224bce4bdae85eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131489 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 055fcef3fe3c3f74ed485a35451c48f6723991b6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132550 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sc/source/ui/view/output.cxx')
-rw-r--r--sc/source/ui/view/output.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 72c14d61ac31..86d37d8d6cc2 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2424,12 +2424,13 @@ void drawSparkline(sc::Sparkline* pSparkline, vcl::RenderContext& rRenderContext
}
}
- if (pSparklineGroup->m_sType == "column")
+ if (pSparklineGroup->m_eType == sc::SparklineType::Column)
{
drawColumn(rRenderContext, rRectangle, aValues, nMin, nMax);
}
- else if (pSparklineGroup->m_sType == "stacked")
+ else if (pSparklineGroup->m_eType == sc::SparklineType::Stacked)
{
+ // transform the data to 1, -1
for (auto & rValue : aValues)
{
if (rValue != 0.0)
@@ -2437,7 +2438,7 @@ void drawSparkline(sc::Sparkline* pSparkline, vcl::RenderContext& rRenderContext
}
drawColumn(rRenderContext, rRectangle, aValues, -1, 1);
}
- else if (pSparklineGroup->m_sType == "line")
+ else if (pSparklineGroup->m_eType == sc::SparklineType::Line)
{
drawLine(rRenderContext, rRectangle, aValues, nMin, nMax);
}