summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-29 00:04:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-11-29 14:03:10 +0100
commit811d39b4ed3487ac6eb81d04de70f9845fec32db (patch)
treeb2914f664d1a56718b20cf3736fe252f1dc555ed /sc
parentb2a5d84d0e4ce1ce85459398a6eca63b49c93dd1 (diff)
tdf#105236, only take number format from numeric cells
Change-Id: I55deaa1f0579582a45dc1e10bb578b680eb98647 Reviewed-on: https://gerrit.libreoffice.org/64200 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit fb04e7180cdf656dbbd3daa9c81615d9478229e0) Reviewed-on: https://gerrit.libreoffice.org/64204 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 34ab089b86f0..89ebe89061ee 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -3161,7 +3161,7 @@ sal_uInt32 getDisplayNumberFormat(const ScDocument* pDoc, const ScAddress& rPos)
for (const Item& rItem : m_aDataArray)
{
ScRefCellValue aCell(*m_pDocument, rItem.mAddress);
- if (!aCell.isEmpty())
+ if (!aCell.isEmpty() && aCell.hasNumeric())
{
return static_cast<sal_Int32>(getDisplayNumberFormat(m_pDocument, rItem.mAddress));
}