[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/inc sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Fri Dec 5 07:06:50 PST 2014
sc/inc/address.hxx | 2 +-
sc/source/core/data/bcaslot.cxx | 12 ++++++------
sc/source/core/tool/address.cxx | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 4377676c353236618d8d8e50649cf0ace8267b3f
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Dec 5 10:01:42 2014 -0500
I got the terms 'union' and 'intersection' mixed up.
When I said 'Union' originally, I meant 'Intersection'. Let's fix that.
Change-Id: Iaef5035bb1dbb676c63bd17b3650266605104181
(cherry picked from commit c62cf85d482b82b41551ab5e7893c3b22ae5df6f)
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index bf41328..a7e1a07 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 8a5913f..31b665c 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 7cb2935..1efcac7 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());
More information about the Libreoffice-commits
mailing list