diff options
author | Tibor Nagy <tibor.nagy.extern@allotropia.de> | 2024-01-31 16:49:24 +0100 |
---|---|---|
committer | Nagy Tibor <tibor.nagy.extern@allotropia.de> | 2024-02-09 12:06:01 +0100 |
commit | a67cd7b3cf03163f87811f7080cabc49750c4fd5 (patch) | |
tree | dcafe31ec7a97310ae2d94b822924769d50f9cb9 /sc/qa | |
parent | 7327752ef5d1fa2239cdd8355fb78da41c282717 (diff) |
tdf#155218 sc: fix different page orientation in print dialog
The page orientation is correct if you set it in the page style first.
However, if you change it in the Print dialog the page layout and size
refresh but the content orientation remains the same.
Change-Id: I5e494a0714e398221bee00744d7e25c419a41df7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162845
Tested-by: Jenkins
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/uitest/calc_dialogs/printDialog.py | 38 | ||||
-rw-r--r-- | sc/qa/uitest/data/tdf155218.ods | bin | 0 -> 9753 bytes |
2 files changed, 38 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_dialogs/printDialog.py b/sc/qa/uitest/calc_dialogs/printDialog.py new file mode 100644 index 000000000000..3e1290b9c8af --- /dev/null +++ b/sc/qa/uitest/calc_dialogs/printDialog.py @@ -0,0 +1,38 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# 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.common import get_state_as_dict, get_url_for_data_file, select_by_text + +class printDialog(UITestCase): + def test_printDialog(self): + with self.ui_test.load_file(get_url_for_data_file("tdf155218.ods")): + with self.ui_test.execute_dialog_through_command(".uno:Print", close_button="cancel") as xDialog: + + xPortraiTotalNumberPages = xDialog.getChild("totalnumpages") + self.assertEqual(get_state_as_dict(xPortraiTotalNumberPages)["Text"], "/ 2") + + xPortraiPageRange = xDialog.getChild("pagerange") + self.assertEqual(get_state_as_dict(xPortraiPageRange)["Text"], "1-2") + + xpageorientationbox = xDialog.getChild("pageorientationbox") + select_by_text(xpageorientationbox, "Landscape") + + # Without the fix in place, this test would have failed with + # Expected: "/ 1" + # Actual : "/ 2" + xLandscapeTotalNumberPages = xDialog.getChild("totalnumpages") + self.assertEqual(get_state_as_dict(xLandscapeTotalNumberPages)["Text"], "/ 1") + + # Without the fix in place, this test would have failed with + # Expected: "1" + # Actual : "1-2" + xLandscapePageRange = xDialog.getChild("pagerange") + self.assertEqual(get_state_as_dict(xLandscapePageRange)["Text"], "1") + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/data/tdf155218.ods b/sc/qa/uitest/data/tdf155218.ods Binary files differnew file mode 100644 index 000000000000..cd6417973972 --- /dev/null +++ b/sc/qa/uitest/data/tdf155218.ods |