summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-04-08 15:34:19 +0000
committerRüdiger Timm <rt@openoffice.org>2003-04-08 15:34:19 +0000
commit5c17ffa6eef1a09e804651ad2aedaec97bd42bc3 (patch)
treed84267de164275e9bb1682e19e4b4abcd4e6ba23
parent553109aef2a1513e88954c9171e731e7cd0fb3ff (diff)
INTEGRATION: CWS calc06 (1.36.2.3.28); FILE MERGED
2003/03/17 18:52:08 nn 1.36.2.3.28.1: #108266# Removed parameter bMergeMark in GetSimpleArea / GetMultiArea
-rw-r--r--sc/source/ui/view/viewdata.cxx33
1 files changed, 20 insertions, 13 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index fa87b9407a8e..449e4c6237f7 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewdata.cxx,v $
*
- * $Revision: 1.37 $
+ * $Revision: 1.38 $
*
- * last change: $Author: hr $ $Date: 2003-03-26 18:06:51 $
+ * last change: $Author: rt $ $Date: 2003-04-08 16:34:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -646,15 +646,19 @@ void ScViewData::SetPagebreakMode( BOOL bSet )
}
BOOL ScViewData::GetSimpleArea( USHORT& rStartCol, USHORT& rStartRow, USHORT& rStartTab,
- USHORT& rEndCol, USHORT& rEndRow, USHORT& rEndTab, BOOL bMergeMark )
+ USHORT& rEndCol, USHORT& rEndRow, USHORT& rEndTab )
{
+ // parameter bMergeMark is no longer needed: The view's selection is never modified
+ // (a local copy is used), and a multi selection that adds to a single range can always
+ // be treated like a single selection (#108266# - GetSimpleArea isn't used in selection
+ // handling itself)
+
ScMarkData aNewMark( aMarkData ); // use a local copy for MarkToSimple
if ( aNewMark.IsMarked() || aNewMark.IsMultiMarked() )
{
- if ( bMergeMark )
- if ( aNewMark.IsMultiMarked() )
- aNewMark.MarkToSimple();
+ if ( aNewMark.IsMultiMarked() )
+ aNewMark.MarkToSimple();
if ( aNewMark.IsMarked() && !aNewMark.IsMultiMarked() )
{
@@ -684,15 +688,16 @@ BOOL ScViewData::GetSimpleArea( USHORT& rStartCol, USHORT& rStartRow, USHORT& rS
return TRUE;
}
-BOOL ScViewData::GetSimpleArea( ScRange& rRange, BOOL bMergeMark )
+BOOL ScViewData::GetSimpleArea( ScRange& rRange )
{
+ // parameter bMergeMark is no longer needed, see above
+
ScMarkData aNewMark( aMarkData ); // use a local copy for MarkToSimple
if ( aNewMark.IsMarked() || aNewMark.IsMultiMarked() )
{
- if ( bMergeMark )
- if ( aNewMark.IsMultiMarked() )
- aNewMark.MarkToSimple();
+ if ( aNewMark.IsMultiMarked() )
+ aNewMark.MarkToSimple();
if ( aNewMark.IsMarked() && !aNewMark.IsMultiMarked() )
aNewMark.GetMarkArea( rRange );
@@ -709,12 +714,14 @@ BOOL ScViewData::GetSimpleArea( ScRange& rRange, BOOL bMergeMark )
return TRUE;
}
-void ScViewData::GetMultiArea( ScRangeListRef& rRange, BOOL bMergeMark )
+void ScViewData::GetMultiArea( ScRangeListRef& rRange )
{
+ // parameter bMergeMark is no longer needed, see GetSimpleArea
+
ScMarkData aNewMark( aMarkData ); // use a local copy for MarkToSimple
BOOL bMulti = aNewMark.IsMultiMarked();
- if (bMulti && bMergeMark)
+ if (bMulti)
{
aNewMark.MarkToSimple();
bMulti = aNewMark.IsMultiMarked();
@@ -727,7 +734,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange, BOOL bMergeMark )
else
{
ScRange aSimple;
- GetSimpleArea(aSimple,FALSE);
+ GetSimpleArea(aSimple);
rRange = new ScRangeList;
rRange->Append(aSimple);
}