Kaydet (Commit) a2554ac1 authored tarafından Balazs Varga's avatar Balazs Varga Kaydeden (comit) László Németh

Related: tdf#48041 Chart: vertical value axis labels

Do not duplicate vertical axis labels and gridlines
if same value labels follow each other, because of
the number format and rounding.
Supplement of commit: 7f373a4c

Change-Id: I7a5d8196d4f16024c279fa4417a0c8809fb8aec7
Reviewed-on: https://gerrit.libreoffice.org/73432
Tested-by: Jenkins
Reviewed-by: 's avatarLászló Németh <nemeth@numbertext.org>
üst d160bca0
...@@ -1554,13 +1554,9 @@ sal_Int32 VCartesianAxis::estimateMaximumAutoMainIncrementCount() ...@@ -1554,13 +1554,9 @@ sal_Int32 VCartesianAxis::estimateMaximumAutoMainIncrementCount()
sal_Int32 nSingleNeeded = m_nMaximumTextHeightSoFar; sal_Int32 nSingleNeeded = m_nMaximumTextHeightSoFar;
sal_Int32 nMaxSameLabel = 0; sal_Int32 nMaxSameLabel = 0;
//for horizontal axis: // tdf#48041: do not duplicate the value labels because of rounding
if( (m_nDimensionIndex == 0 && !m_aAxisProperties.m_bSwapXAndY)
|| (m_nDimensionIndex == 1 && m_aAxisProperties.m_bSwapXAndY) )
{
if (m_aAxisProperties.m_nAxisType != css::chart2::AxisType::DATE) if (m_aAxisProperties.m_nAxisType != css::chart2::AxisType::DATE)
{ {
// tdf#48041: do not duplicate the value labels because of rounding
FixedNumberFormatter aFixedNumberFormatterTest(m_xNumberFormatsSupplier, m_aAxisLabelProperties.nNumberFormatKey); FixedNumberFormatter aFixedNumberFormatterTest(m_xNumberFormatsSupplier, m_aAxisLabelProperties.nNumberFormatKey);
OUString sPreviousValueLabel; OUString sPreviousValueLabel;
sal_Int32 nSameLabel = 0; sal_Int32 nSameLabel = 0;
...@@ -1580,7 +1576,10 @@ sal_Int32 VCartesianAxis::estimateMaximumAutoMainIncrementCount() ...@@ -1580,7 +1576,10 @@ sal_Int32 VCartesianAxis::estimateMaximumAutoMainIncrementCount()
sPreviousValueLabel = sValueLabel; sPreviousValueLabel = sValueLabel;
} }
} }
//for horizontal axis:
if( (m_nDimensionIndex == 0 && !m_aAxisProperties.m_bSwapXAndY)
|| (m_nDimensionIndex == 1 && m_aAxisProperties.m_bSwapXAndY) )
{
nTotalAvailable = nMaxWidth; nTotalAvailable = nMaxWidth;
nSingleNeeded = m_nMaximumTextWidthSoFar; nSingleNeeded = m_nMaximumTextWidthSoFar;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment