summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-04-12 16:26:48 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-04-13 14:25:00 +0200
commitf4b5a16688f63f5ab7f8b058d2cb3416ebfe84c4 (patch)
tree6d6502f24330499268620847219426a2c4aa3114
parent6f6f37b7a48e30b976eb1806364c83b69047cab9 (diff)
tdf#83877 SignatureLineDialog: Improve default values
Change-Id: Ie9da98870f1b6722c6e03b48db94bd448092ad34 Reviewed-on: https://gerrit.libreoffice.org/52782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--cui/source/dialogs/SignatureLineDialog.cxx6
-rw-r--r--sw/qa/uitest/writer_tests/insertSignatureLine.py8
2 files changed, 9 insertions, 5 deletions
diff --git a/cui/source/dialogs/SignatureLineDialog.cxx b/cui/source/dialogs/SignatureLineDialog.cxx
index bd2e79f9b961..87448c066b7b 100644
--- a/cui/source/dialogs/SignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignatureLineDialog.cxx
@@ -51,9 +51,13 @@ SignatureLineDialog::SignatureLineDialog(weld::Widget* pParent, Reference<XModel
m_xEditInstructions->set_size_request(m_xEditInstructions->get_approximate_digit_width() * 48,
m_xEditInstructions->get_text_height() * 5);
- // No signature line selected - start with empty dialog and generate a new one
+ // No signature line selected - start with empty dialog and set some default values
if (!bEditExisting)
+ {
+ m_xCheckboxCanAddComments->set_active(true);
+ m_xCheckboxShowSignDate->set_active(true);
return;
+ }
Reference<container::XIndexAccess> xIndexAccess(m_xModel->getCurrentSelection(),
UNO_QUERY_THROW);
diff --git a/sw/qa/uitest/writer_tests/insertSignatureLine.py b/sw/qa/uitest/writer_tests/insertSignatureLine.py
index 118e0f8c44a0..c4a021d4b464 100644
--- a/sw/qa/uitest/writer_tests/insertSignatureLine.py
+++ b/sw/qa/uitest/writer_tests/insertSignatureLine.py
@@ -39,8 +39,8 @@ class insertSignatureLine(UITestCase):
self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineSuggestedSignerTitle, "Title")
self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineSuggestedSignerEmail, "Email")
self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineSuggestedSignerTitle, "Title")
- self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineCanAddComment, True)
- self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineShowSignDate, False)
+ self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineCanAddComment, False)
+ self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineShowSignDate, True)
self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineSigningInstructions, "Instructions")
self.ui_test.close_doc()
@@ -75,8 +75,8 @@ class insertSignatureLine(UITestCase):
self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineSuggestedSignerTitle, "Title")
self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineSuggestedSignerEmail, "Email")
self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineSuggestedSignerTitle, "Title")
- self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineCanAddComment, True)
- self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineShowSignDate, True)
+ self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineCanAddComment, False)
+ self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineShowSignDate, False)
self.assertEqual(document.DrawPage.getByIndex(0).SignatureLineSigningInstructions, "Instructions")
self.ui_test.close_doc()