summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/cellsh2.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-04-18 10:42:04 +0000
committerRüdiger Timm <rt@openoffice.org>2008-04-18 10:42:04 +0000
commit243d7e8fe410c54700f122f2037c6a524b26ebf6 (patch)
tree8f5ea177d79fbc105ef32bda9b8d105ea49208e4 /sc/source/ui/view/cellsh2.cxx
parent710b591cde6e5dc2258641c59c530218508cdae6 (diff)
INTEGRATION: CWS filteredrows (1.31.64); FILE MERGED
2008/03/28 17:19:32 er 1.31.64.2: #i33851# do not disable filter slots for filtered 2008/03/19 18:31:53 er 1.31.64.1: #i33851# first wave: treat filtered simple area selection as if it was a multi-selection, effectively disabling all operations that are not supported for a multi-selection
Diffstat (limited to 'sc/source/ui/view/cellsh2.cxx')
-rw-r--r--sc/source/ui/view/cellsh2.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 9a5e180a7849..ddaf95a2095d 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: cellsh2.cxx,v $
- * $Revision: 1.33 $
+ * $Revision: 1.34 $
*
* This file is part of OpenOffice.org.
*
@@ -710,7 +710,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
//! use database ranges (select before type dialog?)
ScRange aRange;
- if ( GetViewData()->GetSimpleArea( aRange ) )
+ if ( GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
{
BOOL bOK = TRUE;
if ( pDoc->HasSubTotalCells( aRange ) )
@@ -1118,7 +1118,9 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet )
case SID_FILTER:
case SID_SPECIAL_FILTER:
{
- if (GetViewData()->IsMultiMarked())
+ ScRange aDummy;
+ ScMarkType eMarkType = GetViewData()->GetSimpleArea( aDummy);
+ if (eMarkType != SC_MARK_SIMPLE && eMarkType != SC_MARK_SIMPLE_FILTERED)
{
rSet.DisableItem( nWhich );
}
@@ -1183,7 +1185,9 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet )
}
if ( nWhich == SID_AUTO_FILTER )
{
- if (GetViewData()->IsMultiMarked())
+ ScRange aDummy;
+ ScMarkType eMarkType = GetViewData()->GetSimpleArea( aDummy);
+ if (eMarkType != SC_MARK_SIMPLE && eMarkType != SC_MARK_SIMPLE_FILTERED)
{
rSet.DisableItem( nWhich );
}
@@ -1203,8 +1207,9 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet )
SCTAB nStartTab, nEndTab;
BOOL bAnyQuery = FALSE;
- BOOL bSelected = GetViewData()->GetSimpleArea(
- nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab );
+ BOOL bSelected = (GetViewData()->GetSimpleArea(
+ nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab )
+ == SC_MARK_SIMPLE);
if ( bSelected )
{