diff options
Diffstat (limited to 'sc/source/ui/docshell/dbdocfun.cxx')
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index f33efe8cf789..4cbbd06b2050 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -614,6 +614,12 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, ScDocShellModificator aModificator( rDocShell ); ScDocument& rDoc = rDocShell.GetDocument(); + + if (ScTabViewShell::isAnyEditViewInRange(/*bColumns*/ false, rQueryParam.nRow1, rQueryParam.nRow2)) + { + return false; + } + if (bRecord && !rDoc.IsUndoEnabled()) bRecord = false; ScDBData* pDBData = rDoc.GetDBAtArea( nTab, rQueryParam.nCol1, rQueryParam.nRow1, @@ -924,6 +930,16 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, pOld, bDoSize, pAdvSource ) ); } + ScTabViewShell* pViewSh = rDocShell.GetBestViewShell(); + if ( pViewSh ) + { + // could there be horizontal autofilter ? + // maybe it would be better to set bColumns to !rQueryParam.bByRow ? + // anyway at the beginning the value of bByRow is 'false' + // then after the first sort action it becomes 'true' + pViewSh->OnLOKShowHideColRow(/*bColumns*/ false, rQueryParam.nRow1 - 1); + } + if (bCopy) { SCCOL nEndX = aLocalParam.nCol2; |