sc/qa/uitest/autofilter/tdf36383.py | 59 ------------------------------------ sc/source/ui/view/viewfunc.cxx | 22 +------------ 2 files changed, 2 insertions(+), 79 deletions(-)
New commits: commit 9e7f07dc1378354a5228898e339f8336bbbb41f3 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Sep 2 15:29:21 2021 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Sep 3 09:34:31 2021 +0200 tdf#144155: Revert "tdf#36383 sc AutoFilter: fix changing row height" This reverts commit 3678e0efcb8bedc58dd329a430da0ac3b1572df8. Conflicts: sc/qa/uitest/autofilter/tdf36383.py Change-Id: Ie1abd0cdea013571a27b187ffcb20125a0656442 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121512 Reviewed-by: László Németh <nem...@numbertext.org> Tested-by: Jenkins diff --git a/sc/qa/uitest/autofilter/tdf36383.py b/sc/qa/uitest/autofilter/tdf36383.py deleted file mode 100644 index df0ce88b84f6..000000000000 --- a/sc/qa/uitest/autofilter/tdf36383.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -from uitest.framework import UITestCase -from uitest.uihelper.calc import enter_text_to_cell -from libreoffice.uno.propertyvalue import mkPropertyValues -from libreoffice.calc.document import get_row - -#Bug 36383 - EDITING auto row height or change row height removes AutoFilter result - -class tdf36383(UITestCase): - def test_tdf36383_row_height(self): - with self.ui_test.create_doc_in_start_center("calc") as document: - calcDoc = self.xUITest.getTopFocusWindow() - gridwin = calcDoc.getChild("grid_window") - - enter_text_to_cell(gridwin, "A1", "A") - enter_text_to_cell(gridwin, "A2", "1") - enter_text_to_cell(gridwin, "A3", "2") - enter_text_to_cell(gridwin, "A4", "3") - - gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"})) - - self.xUITest.executeCommand(".uno:DataFilterAutoFilter") - - gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"})) - xFloatWindow = self.xUITest.getFloatWindow() - xCheckListMenu = xFloatWindow.getChild("check_list_menu") - xList = xCheckListMenu.getChild("check_list_box") - xEntry = xList.getChild("1") - xEntry.executeAction("CLICK", tuple()) - - xOkButton = xFloatWindow.getChild("ok") - xOkButton.executeAction("CLICK", tuple()) - - row = get_row(document, 2) - self.assertFalse(row.getPropertyValue("IsVisible")) - - #row height - with self.ui_test.execute_dialog_through_command(".uno:RowHeight") as xDialog: - xvalue = xDialog.getChild("value") - xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) - xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) - xvalue.executeAction("TYPE", mkPropertyValues({"TEXT":"1 cm"})) - - - self.assertFalse(row.getPropertyValue("IsVisible")) - - #optimal row height - with self.ui_test.execute_dialog_through_command(".uno:SetOptimalRowHeight"): - pass - - self.assertFalse(row.getPropertyValue("IsVisible")) - - -# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index dec4209f75a7..9e091eeed8cc 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2186,17 +2186,7 @@ void ScViewFunc::SetWidthOrHeight( aCxt.setExtraHeight(nSizeTwips); rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab, true); if (bAll) - { - for (SCROW nRow = nStartNo; nRow <= nEndNo; ++nRow) - { - SCROW nLastRow = nRow; - // tdf#36383 skip consecutive rows hidden by AutoFilter - if (rDoc.RowFiltered(nRow, nTab, nullptr, &nLastRow)) - nRow = nLastRow; - else - rDoc.ShowRow(nRow, nTab, true); - } - } + rDoc.ShowRows( nStartNo, nEndNo, nTab, true ); // Manual-Flag already (re)set in SetOptimalHeight in case of bAll=sal_True // (set for Extra-Height, else reset). @@ -2209,15 +2199,7 @@ void ScViewFunc::SetWidthOrHeight( rDoc.SetManualHeight( nStartNo, nEndNo, nTab, true ); // height was set manually } - for (SCROW nRow = nStartNo; nRow <= nEndNo; ++nRow) - { - SCROW nLastRow = nRow; - // tdf#36383 skip consecutive rows hidden by AutoFilter - if (rDoc.RowFiltered(nRow, nTab, nullptr, &nLastRow)) - nRow = nLastRow; - else - rDoc.ShowRow(nRow, nTab, nSizeTwips != 0); - } + rDoc.ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 ); if (!bShow && nStartNo <= nCurY && nCurY <= nEndNo && nTab == nCurTab) {