diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-04-13 15:22:45 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-04-13 17:28:33 +0200 |
commit | 28db2de99a85f3b6397fbd372658853e8020bf15 (patch) | |
tree | 7ac326e56cd94f048b669a8c2249f34e63e3e92f | |
parent | 78d774381b09fc244de162211e9c3fbfe891cbea (diff) |
tdf#83877 Show signing instructions in sign dialog
Change-Id: I230ff1fcbc6f98755ae588dca32d77c442d5f042
Reviewed-on: https://gerrit.libreoffice.org/52832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r-- | cui/source/dialogs/SignSignatureLineDialog.cxx | 15 | ||||
-rw-r--r-- | cui/source/inc/SignSignatureLineDialog.hxx | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/signsignatureline.ui | 32 |
3 files changed, 48 insertions, 1 deletions
diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx index 3c3052901c26..1b39b1f8e61b 100644 --- a/cui/source/dialogs/SignSignatureLineDialog.cxx +++ b/cui/source/dialogs/SignSignatureLineDialog.cxx @@ -53,6 +53,8 @@ SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc , m_xEditComment(m_xBuilder->weld_text_view("edit_comment")) , m_xBtnChooseCertificate(m_xBuilder->weld_button("btn_select_certificate")) , m_xBtnSign(m_xBuilder->weld_button("ok")) + , m_xLabelHint(m_xBuilder->weld_label("label_hint")) + , m_xLabelHintText(m_xBuilder->weld_label("label_hint_text")) { Reference<container::XIndexAccess> xIndexAccess(m_xModel->getCurrentSelection(), UNO_QUERY_THROW); @@ -84,8 +86,21 @@ SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc >>= m_aSuggestedSignerName; m_xShapeProperties->getPropertyValue("SignatureLineSuggestedSignerTitle") >>= m_aSuggestedSignerTitle; + OUString aSigningInstructions; + m_xShapeProperties->getPropertyValue("SignatureLineSigningInstructions") + >>= aSigningInstructions; m_xShapeProperties->getPropertyValue("SignatureLineShowSignDate") >>= m_bShowSignDate; + if (aSigningInstructions.isEmpty()) + { + m_xLabelHint->hide(); + m_xLabelHintText->hide(); + } + else + { + m_xLabelHintText->set_label(aSigningInstructions); + } + ValidateFields(); } diff --git a/cui/source/inc/SignSignatureLineDialog.hxx b/cui/source/inc/SignSignatureLineDialog.hxx index c7a6e565bd7b..fb9c1c1ca2d0 100644 --- a/cui/source/inc/SignSignatureLineDialog.hxx +++ b/cui/source/inc/SignSignatureLineDialog.hxx @@ -25,6 +25,8 @@ private: std::unique_ptr<weld::TextView> m_xEditComment; std::unique_ptr<weld::Button> m_xBtnChooseCertificate; std::unique_ptr<weld::Button> m_xBtnSign; + std::unique_ptr<weld::Label> m_xLabelHint; + std::unique_ptr<weld::Label> m_xLabelHintText; css::uno::Reference<css::beans::XPropertySet> m_xShapeProperties; css::uno::Reference<css::security::XCertificate> m_xSelectedCertifate; diff --git a/cui/uiconfig/ui/signsignatureline.ui b/cui/uiconfig/ui/signsignatureline.ui index 860da621d4f4..87bdefdfa74c 100644 --- a/cui/uiconfig/ui/signsignatureline.ui +++ b/cui/uiconfig/ui/signsignatureline.ui @@ -190,7 +190,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -212,6 +212,36 @@ </object> <packing> <property name="left_attach">0</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_hint"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="signsignatureline|label_hint">Instructions from the document creator:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">label_hint_text</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_hint_text"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="margin_left">12</property> + <property name="mnemonic_widget">edit_comment</property> + <attributes> + <attribute name="style" value="oblique"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> <property name="top_attach">1</property> </packing> </child> |