[Libreoffice-commits] core.git: cui/source sw/qa
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Fri Apr 13 12:26:46 UTC 2018
cui/source/dialogs/SignatureLineDialog.cxx | 6 +++++-
sw/qa/uitest/writer_tests/insertSignatureLine.py | 8 ++++----
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit f4b5a16688f63f5ab7f8b058d2cb3416ebfe84c4
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Thu Apr 12 16:26:48 2018 +0200
tdf#83877 SignatureLineDialog: Improve default values
Change-Id: Ie9da98870f1b6722c6e03b48db94bd448092ad34
Reviewed-on: https://gerrit.libreoffice.org/52782
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
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()
More information about the Libreoffice-commits
mailing list