summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2002-09-20 09:07:34 +0000
committerNiklas Nebel <nn@openoffice.org>2002-09-20 09:07:34 +0000
commit5e441d65e193e9712617099cc5640eff4501fef8 (patch)
treead27bb0d507c9f708262c5c3a12c558083aef3ab
parent6579588568a58cfb4251b921570004073ccd3ac9 (diff)
#102955# don't rely on IsMarked at view's MarkData to detect selection
-rw-r--r--sc/source/ui/view/cellsh.cxx5
-rw-r--r--sc/source/ui/view/cellsh2.cxx13
-rw-r--r--sc/source/ui/view/cellsh3.cxx7
-rw-r--r--sc/source/ui/view/tabview2.cxx8
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx6
-rw-r--r--sc/source/ui/view/tabvwshc.cxx7
-rw-r--r--sc/source/ui/view/viewfun3.cxx6
7 files changed, 27 insertions, 25 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index d80384266648..b80eae117be8 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cellsh.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: nn $ $Date: 2002-09-16 16:22:11 $
+ * last change: $Author: nn $ $Date: 2002-09-20 10:07:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -302,6 +302,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
case SID_OPENDLG_FUNCTION:
{
ScMarkData aMarkData=GetViewData()->GetMarkData();
+ aMarkData.MarkToSimple();
ScRange aRange;
aMarkData.GetMarkArea(aRange);
if(aMarkData.IsMarked())
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 638051b316fc..e41099b7905c 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cellsh2.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: nn $ $Date: 2002-09-16 16:22:11 $
+ * last change: $Author: nn $ $Date: 2002-09-20 10:07:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -724,7 +724,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
// select database range or data
pTabViewShell->GetDBData( TRUE, SC_DB_OLD );
- if ( !GetViewData()->GetMarkData().IsMarked() )
+ const ScMarkData& rMark = GetViewData()->GetMarkData();
+ if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
pTabViewShell->MarkDataArea( FALSE );
// output to cursor position for non-sheet data
@@ -1191,13 +1192,11 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet )
USHORT nEndCol, nEndRow, nEndTab;
BOOL bAnyQuery = FALSE;
- ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSelected = rMark.IsMarked();
+ BOOL bSelected = GetViewData()->GetSimpleArea(
+ nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab );
if ( bSelected )
{
- GetViewData()->GetSimpleArea( nStartCol, nStartRow, nStartTab,
- nEndCol, nEndRow, nEndTab );
if (nStartCol==nEndCol && nStartRow==nEndRow)
bSelected = FALSE;
}
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 564f4b8c230d..3425186e0123 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cellsh3.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: sab $ $Date: 2002-09-13 08:10:43 $
+ * last change: $Author: nn $ $Date: 2002-09-20 10:07:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -787,7 +787,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
USHORT nEndRow;
USHORT nEndTab;
- if ( !GetViewData()->GetMarkData().IsMarked() )
+ const ScMarkData& rMark = GetViewData()->GetMarkData();
+ if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
pTabViewShell->MarkDataArea( TRUE );
GetViewData()->GetSimpleArea( nStartCol,nStartRow,nStartTab,
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 4b9fb8ec169d..4b925e19798c 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabview2.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: nn $ $Date: 2002-08-30 18:42:35 $
+ * last change: $Author: nn $ $Date: 2002-09-20 10:07:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -550,8 +550,8 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
ScMarkData& rMark = aViewData.GetMarkData();
ScDocument* pDoc = aViewData.GetDocument();
- if (!rMark.IsMarked())
- nZoom = 100; // nichts markiert
+ if (!rMark.IsMarked() && !rMark.IsMultiMarked())
+ nZoom = 100; // nothing selected
else
{
USHORT nTab = aViewData.GetTabNo();
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 0c7a23946141..8b4353f6e64c 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabvwsh3.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: sab $ $Date: 2002-09-12 08:17:12 $
+ * last change: $Author: nn $ $Date: 2002-09-20 10:07:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -623,7 +623,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
| SVX_ZOOM_ENABLE_WHOLEPAGE
| SVX_ZOOM_ENABLE_PAGEWIDTH;
- if ( rMark.IsMarked() )
+ if ( rMark.IsMarked() || rMark.IsMultiMarked() )
nBtnFlags = nBtnFlags | SVX_ZOOM_ENABLE_OPTIMAL;
aZoomItem.SetValueSet( nBtnFlags );
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 3487b4baa6c8..a6f43e303bb5 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabvwshc.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dr $ $Date: 2002-03-01 11:38:14 $
+ * last change: $Author: nn $ $Date: 2002-09-20 10:07:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -251,7 +251,8 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
{
// wenn auf einem bestehenden Bereich aufgerufen, den markieren
GetDBData( TRUE, SC_DB_OLD );
- if ( !GetViewData()->GetMarkData().IsMarked() )
+ const ScMarkData& rMark = GetViewData()->GetMarkData();
+ if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
MarkDataArea( FALSE );
pResult = new ScDbNameDlg( pB, pCW, pParent, GetViewData() );
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 9c9420c3071e..a70f6916a908 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewfun3.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: nn $ $Date: 2002-07-16 17:00:25 $
+ * last change: $Author: nn $ $Date: 2002-09-20 10:07:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -272,7 +272,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
ScDocShellModificator aModificator( *pDocSh );
- if (!rMark.IsMarked()) // Markierung setzen, falls nicht vorhanden
+ if ( !rMark.IsMarked() && !rMark.IsMultiMarked() ) // mark the range if not marked yet
{
DoneBlockMode();
InitOwnBlockMode();