summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2023-01-05 08:21:35 +0100
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2023-01-05 16:06:06 +0000
commita8d3b8985a79c216c3c132fb2e6bb0f85a27831a (patch)
tree3cdd1f523d79d9209bd74919eedf7779a8c35d2f /sc
parent88a67c50af61fa9ee5fa677589ce5db2039d6f2e (diff)
tdf#56973 - Copy/paste (single) sheet is checked but not enabled
Enable the "copy" radio button in the move/copy sheet dialog, if there is just a single sheet in a spreadsheet document. Otherwise, users get the impression that a single sheet cannot be copied because the "copy" radio button is selected but not enabled, i.e., greyed out. Change-Id: Icf98973585491b0c8c9a74aad3900f6cc2895d11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145064 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/uitest/calc_tests6/moveCopySheet.py13
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx1
2 files changed, 13 insertions, 1 deletions
diff --git a/sc/qa/uitest/calc_tests6/moveCopySheet.py b/sc/qa/uitest/calc_tests6/moveCopySheet.py
index a80b7c329173..80bd9f830a27 100644
--- a/sc/qa/uitest/calc_tests6/moveCopySheet.py
+++ b/sc/qa/uitest/calc_tests6/moveCopySheet.py
@@ -63,6 +63,19 @@ class moveCopySheet(UITestCase):
self.assertEqual(document.Sheets[1].Name, "Sheet1")
self.assertEqual(document.Sheets[2].Name, "moveName")
+ # tdf#56973 - copy/paste (single) sheet is checked but not enabled
+ def test_tdf56973_copy_paste_inactive(self):
+ with self.ui_test.create_doc_in_start_center("calc"):
+ with self.ui_test.execute_dialog_through_command(".uno:Move") as xDialog:
+ # A single sheet can only be copied
+ xCopyButton = xDialog.getChild("copy")
+ self.assertEqual(get_state_as_dict(xCopyButton)["Checked"], "true")
+ self.assertEqual(get_state_as_dict(xCopyButton)["Enabled"], "true")
+ # A single sheet can not be moved
+ xMoveButton = xDialog.getChild("move")
+ self.assertEqual(get_state_as_dict(xMoveButton)["Checked"], "false")
+ self.assertEqual(get_state_as_dict(xMoveButton)["Enabled"], "false")
+
#tdf#139464 Set OK button label to selected action: Move or Copy
def test_tdf139464_move_sheet(self):
with self.ui_test.create_doc_in_start_center("calc"):
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 9cc587aa56e0..e64a29b6b471 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -74,7 +74,6 @@ void ScMoveTableDlg::SetForceCopyTable()
{
m_xBtnCopy->set_active(true);
m_xBtnMove->set_sensitive(false);
- m_xBtnCopy->set_sensitive(false);
SetOkBtnLabel();
}