diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-12-05 10:01:42 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-12-05 10:04:07 -0500 |
commit | c62cf85d482b82b41551ab5e7893c3b22ae5df6f (patch) | |
tree | 37fdfa1c6c3504ae48e68d03818d19ceffcd2c88 | |
parent | 7e3c931786c3cbe83ee170b8b0746d141b520ce6 (diff) |
I got the terms 'union' and 'intersection' mixed up.
When I said 'Union' originally, I meant 'Intersection'. Let's fix that.
Change-Id: Iaef5035bb1dbb676c63bd17b3650266605104181
-rw-r--r-- | sc/inc/address.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/bcaslot.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/tool/address.cxx | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index bf4132821404..a7e1a073f2cd 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -564,7 +564,7 @@ public: SC_DLLPUBLIC void ExtendTo( const ScRange& rRange ); SC_DLLPUBLIC bool Intersects( const ScRange& rRange ) const; // do two ranges intersect? - ScRange Union( const ScRange& rOther ) const; + ScRange Intersection( const ScRange& rOther ) const; void PutInOrder(); inline bool operator==( const ScRange& rRange ) const; diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 8a5913fec84b..31b665c50255 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -326,26 +326,26 @@ bool ScBroadcastAreaSlot::AreaBroadcast( const ScRange& rRange, sal_uLong nHint ScBroadcastArea* pArea = (*aIter).mpArea; const ScRange& rAreaRange = pArea->GetRange(); - // Take the union of the area range and the broadcast range. - ScRange aUnion = rAreaRange.Union(rRange); - if (!aUnion.IsValid()) + // Take the intersection of the area range and the broadcast range. + ScRange aIntersection = rAreaRange.Intersection(rRange); + if (!aIntersection.IsValid()) continue; if (pArea->IsGroupListening()) { if (pBASM->IsInBulkBroadcast()) { - pBASM->InsertBulkGroupArea(pArea, aUnion); + pBASM->InsertBulkGroupArea(pArea, aIntersection); } else { - broadcastRangeByCell(pArea->GetBroadcaster(), aUnion, nHint); + broadcastRangeByCell(pArea->GetBroadcaster(), aIntersection, nHint); bIsBroadcasted = true; } } else if (!pBASM->IsInBulkBroadcast() || pBASM->InsertBulkArea( pArea)) { - broadcastRangeByCell(pArea->GetBroadcaster(), aUnion, nHint); + broadcastRangeByCell(pArea->GetBroadcaster(), aIntersection, nHint); bIsBroadcasted = true; } } diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 7cb29351e1f2..1efcac723c3f 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1374,7 +1374,7 @@ bool ScRange::Intersects( const ScRange& rRange ) const ); } -ScRange ScRange::Union( const ScRange& rOther ) const +ScRange ScRange::Intersection( const ScRange& rOther ) const { SCCOL nCol1 = std::max(aStart.Col(), rOther.aStart.Col()); SCCOL nCol2 = std::min(aEnd.Col(), rOther.aEnd.Col()); |