summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-10 14:54:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-10 14:54:27 +0200
commit015578db97bec8926441a9440de6067937f63143 (patch)
treed4a82cb0614ff63a71e2d01d2a09de77827494a2 /sc/source/ui/docshell/docsh5.cxx
parent16e09c988e7b164c520f26160a518278963298fb (diff)
partial revert of "loplugin:checkunusedparams in sc(part4)"
<erAck> noelgrandin: actually that "also fix bug in ScDocShell::DBAreaDeleted" with 4d047221945b34a9023d852bbd19a2a24a7f54c3 wasn't a bug because the aDocument.RemoveFlagsTab() call with ScMF::Auto removes the AutoFilter which is in the first row of the DB-Area <erAck> noelgrandin: now it unnecessarily processes the entire range <noelgrandin> erAck, does that also apply to the PostPaint call? <erAck> noelgrandin: should so, as only the row with the AF-buttons needs to be repainted <noelgrandin> erAck, will revert that part Change-Id: I29b9ee4e1b6517a01bf67f8efc09217d9df453a5
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index f69cbeb66f5c..d247d39ab25d 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -96,11 +96,12 @@ bool ScDocShell::IsEditable() const
return !IsReadOnly() || aDocument.IsImportingXML() || aDocument.IsChangeReadOnlyEnabled();
}
-void ScDocShell::DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 )
+void ScDocShell::DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2 )
{
ScDocShellModificator aModificator( *this );
- aDocument.RemoveFlagsTab( nX1, nY1, nX2, nY2, nTab, ScMF::Auto );
- PostPaint( nX1, nY1, nTab, nX2, nY2, nTab, PaintPartFlags::Grid );
+ // the auto-filter is in the first row of the area
+ aDocument.RemoveFlagsTab( nX1, nY1, nX2, nY1, nTab, ScMF::Auto );
+ PostPaint( nX1, nY1, nTab, nX2, nY1, nTab, PaintPartFlags::Grid );
// No SetDocumentModified, as the unnamed database range might have to be restored later.
// The UNO hint is broadcast directly instead, to keep UNO objects in valid state.
aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
@@ -254,7 +255,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
nStartCol <= nOldY2 && nOldY1 <= nEndCol)
bHasHeader = true;
- DBAreaDeleted( nOldTab, nOldX1, nOldY1, nOldX2, nOldY2 );
+ DBAreaDeleted( nOldTab, nOldX1, nOldY1, nOldX2 );
pNoNameData->SetSortParam( ScSortParam() ); // reset parameter
pNoNameData->SetQueryParam( ScQueryParam() );
@@ -365,7 +366,7 @@ void ScDocShell::CancelAutoDBRange()
SCROW nRangeY2;
SCTAB nRangeTab;
pDBData->GetArea( nRangeTab, nRangeX1, nRangeY1, nRangeX2, nRangeY2 );
- DBAreaDeleted( nRangeTab, nRangeX1, nRangeY1, nRangeX2, nRangeY2 );
+ DBAreaDeleted( nRangeTab, nRangeX1, nRangeY1, nRangeX2 );
*pDBData = *pOldAutoDBRange; // restore old settings