diff options
author | Dennis Francis <dennisfrancis.in@gmail.com> | 2016-02-06 03:12:20 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-02-10 23:08:04 +0000 |
commit | bc20c6d0f397c0c1aef6ef7d6f750c2f81af8db6 (patch) | |
tree | 72d84f3356709b4e4413bf28e40f83b3565a2608 /sc/source/ui | |
parent | 7f02815bf90f4dee5c76f2bdb4fd84f03e27527e (diff) |
Refactor ScMarkData for tdf#50916
Made the container for storing multimarks dynamic.
Also let the full row marks to be stored in a dedicated
ScMarkArray object rather than in the multimarks container.
Unit tests for ScMarkData and ScMultiSel will come in a follow up
patch.
Change-Id: I300ff80bebd6f4f39c284c1e8cb7deece82c1bec
Reviewed-on: https://gerrit.libreoffice.org/22163
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index fffe810fb340..c7d409757c8e 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -2716,21 +2716,18 @@ short ScFormatShell::GetCurrentNumberFormatType() ScRange aRange; aMark.GetMultiMarkArea(aRange); - const ScMarkArray* pArray = aMark.GetArray(); - if (!pArray) - return nType; + const ScMultiSel& rMultiSel = aMark.GetMultiSelData(); short nComboType = css::util::NumberFormat::ALL; bool bFirstItem = true; for (SCCOL nCol = aRange.aStart.Col(); nCol <= aRange.aEnd.Col(); ++nCol) { - const ScMarkArray& rColArray = pArray[nCol]; - if (!rColArray.HasMarks()) + if (!rMultiSel.HasMarks(nCol)) continue; SCROW nRow1, nRow2; - ScMarkArrayIter aMarkIter(&rColArray); - while (aMarkIter.Next(nRow1, nRow2)) + ScMultiSelIter aMultiIter(rMultiSel, nCol); + while (aMultiIter.Next(nRow1, nRow2)) { ScRange aColRange(nCol, nRow1, aRange.aStart.Tab()); aColRange.aEnd.SetRow(nRow2); |