summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2018-04-06 19:55:12 +0200
committerEike Rathke <erack@redhat.com>2018-04-09 20:51:19 +0200
commit2c51260d91490a6fc512875d8befb38367bf3227 (patch)
tree3f56f496e504184d34843066d6dff51003adeb15
parentc6e8460a5b47fa6fa971dde2a89e80662b6e97ae (diff)
tdf#116706 fix for AGGREGATE with hidden rows and single references.
Change-Id: I6ac88f26b46a17e1857b7b40d2034fb321973625 Reviewed-on: https://gerrit.libreoffice.org/52522 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 0a4c1fb68c3619e61099a7c548f550b0d3fd7a53) Reviewed-on: https://gerrit.libreoffice.org/52651
-rw-r--r--sc/qa/unit/data/functions/mathematical/fods/aggregate.fods40
-rw-r--r--sc/source/core/tool/interpr6.cxx6
2 files changed, 42 insertions, 4 deletions
diff --git a/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods b/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods
index 66162e697742..62e72ca08da6 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods
@@ -5881,7 +5881,43 @@
</table:table-cell>
<table:table-cell table:number-columns-repeated="1020"/>
</table:table-row>
- <table:table-row table:style-name="ro2" table:number-rows-repeated="1048392">
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=COM.MICROSOFT.AGGREGATE(3;5;[.$C$6])" office:value-type="float" office:value="0" calcext:value-type="float">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="0" calcext:value-type="float">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce18" table:formula="of:=[.A184]=[.B184]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>TRUE</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Default" table:formula="of:=FORMULA([.A184])" office:value-type="string" office:string-value="=AGGREGATE(3,5,$C$6)" calcext:value-type="string">
+ <text:p>=AGGREGATE(3,5,$C$6)</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>tdf116706</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="1019"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=COM.MICROSOFT.AGGREGATE(3;5;[.$C$6:.$C$6])" office:value-type="float" office:value="0" calcext:value-type="float">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="0" calcext:value-type="float">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce18" table:formula="of:=[.A185]=[.B185]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>TRUE</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Default" table:formula="of:=FORMULA([.A185])" office:value-type="string" office:string-value="=AGGREGATE(3,5,$C$6:$C$6)" calcext:value-type="string">
+ <text:p>=AGGREGATE(3,5,$C$6:$C$6)</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>tdf116706</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="1019"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2" table:number-rows-repeated="1048390">
<table:table-cell table:number-columns-repeated="1024"/>
</table:table-row>
<table:table-row table:style-name="ro2">
@@ -5920,4 +5956,4 @@
</table:named-expressions>
</office:spreadsheet>
</office:body>
-</office:document> \ No newline at end of file
+</office:document>
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 62c96376c664..449375638cb5 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -678,8 +678,10 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
++nCount;
break;
}
- if ( ( mnSubTotalFlags & SubtotalFlags::IgnoreFiltered ) &&
- pDok->RowFiltered( aAdr.Row(), aAdr.Tab() ) )
+ if ( ( ( mnSubTotalFlags & SubtotalFlags::IgnoreFiltered ) &&
+ pDok->RowFiltered( aAdr.Row(), aAdr.Tab() ) ) ||
+ ( ( mnSubTotalFlags & SubtotalFlags::IgnoreHidden ) &&
+ pDok->RowHidden( aAdr.Row(), aAdr.Tab() ) ) )
{
break;
}