Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1959
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/59/1959/1
bnc#801152: Scan all columns to determine the first data row.
When scanning the entire data range in an attempt to determine where
the first data row is, we shouldn't stop at the first column. We should
scan all data columns to make sure we pick the lowest value row
position among all columns.
Change-Id: I693ec169857b181c6b4237efcba3fa6a46eaa531
---
M sc/source/ui/unoobj/chart2uno.cxx
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 5ea6f54..e877469 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -294,13 +294,14 @@
bool bFoundValues = false;
bool bFoundAnything = false;
FormulaTokenMapMap::const_iterator it1 = rCols.begin();
- for (SCCOL nCol = 0; !bFoundValues && nCol < nAllColCount; ++nCol)
+ for (SCCOL nCol = 0; nCol < nAllColCount; ++nCol)
{
if (it1 != rCols.end() && nCol>=nHeaderColCount)
{
+ bool bFoundValuesInRow = false;
FormulaTokenMap* pCol = it1->second;
FormulaTokenMap::const_iterator it2 = pCol->begin();
- for (SCROW nRow = 0; !bFoundValues && nRow < nSmallestValueRowIndex && it2 !=
pCol->end(); ++nRow)
+ for (SCROW nRow = 0; !bFoundValuesInRow && nRow < nSmallestValueRowIndex && it2 !=
pCol->end(); ++nRow)
{
FormulaToken* pToken = it2->second;
if (pToken && nRow>=nHeaderRowCount)
@@ -318,7 +319,7 @@
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
if (pDoc && pDoc->HasValueData( nCol1, nRow1, nTab1 ))
{
- bFoundValues = bFoundAnything = true;
+ bFoundValuesInRow = bFoundValues = bFoundAnything = true;
nSmallestValueRowIndex = std::min( nSmallestValueRowIndex, nRow );
}
if( !bFoundAnything )
--
To view, visit https://gerrit.libreoffice.org/1959
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I693ec169857b181c6b4237efcba3fa6a46eaa531
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Kohei Yoshida <kohei.yoshida@gmail.com>
Context
- [PATCH libreoffice-4-0] bnc#801152: Scan all columns to determine the first data row... · Kohei Yoshida (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.