summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-09-15 12:24:31 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-15 14:09:38 +0200
commit0018eb8a1e2aaa52ce3a798a958331e59f68250a (patch)
tree3c8786530d1caed375a477a8ac3a160841fd56c0
parentd50261fd21f2e7b6bd83f68f07d1dc078f0de779 (diff)
sc-excel-chart-default-xlabels.diff: Change x-y plot chart numbering scheme
n#257079, i#83679 Change default numbering scheme of x-y plot chart from Row 1, Row2, ... to 1, 2, 3... when the X labels are not explicitly given. This is what Excel does.
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 8a8081e412d3..f87818553ee1 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -3690,14 +3690,9 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::getTextualDat
}
else
{
- for (sal_Int32 nRow = p->aStart.Row(); nRow <= p->aEnd.Row(); ++nRow)
- {
- String aString = ScGlobal::GetRscString(STR_ROW);
- aString += ' ';
- aString += String::CreateFromInt32( nRow+1 );
- pArr[nCount] = aString;
- ++nCount;
- }
+ sal_Int32 n = p->aEnd.Row() - p->aStart.Row() + 1;
+ for (sal_Int32 i = 0; i < n; ++i)
+ pArr[nCount++] = String::CreateFromInt32( i+1 );
}
}
return aSeq;