summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewfrm.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-01-31 09:07:14 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-01-31 12:21:48 +0000
commit2dff5e856ab343b1296f63d645c47382493fe2fe (patch)
tree6b548f9aebff0f48f276372a1dc03ed59e38df51 /sfx2/source/view/viewfrm.cxx
parent95db32acabaae2a1d32874ecb8429e828c52a7ae (diff)
tdf#105566 Show InfoBar when signature is invalid
gpg4libre Change-Id: I272ac155889e25b9af91ff723a014588a65b045a Reviewed-on: https://gerrit.libreoffice.org/33737 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2/source/view/viewfrm.cxx')
-rw-r--r--sfx2/source/view/viewfrm.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 42a259abaa95..ffa0d419e6aa 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1178,6 +1178,18 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
SfxBindings& rBind = GetBindings();
rBind.Invalidate( SID_RELOAD );
rBind.Invalidate( SID_EDITDOC );
+
+ SignatureState nSignatureState = GetObjectShell()->GetDocumentSignatureState();
+ if (nSignatureState == SignatureState::BROKEN) {
+ basegfx::BColor aBackgroundColor = basegfx::BColor(0.5, 0.0, 0.0);
+ auto pInfoBar = AppendInfoBar("signature", SfxResId(STR_SIGNATURE_BROKEN), &aBackgroundColor);
+ VclPtrInstance<PushButton> xBtn(&GetWindow());
+ xBtn->SetText(SfxResId(STR_SIGNATURE_SHOW));
+ xBtn->SetSizePixel(xBtn->GetOptimalSize());
+ xBtn->SetClickHdl(LINK(this, SfxViewFrame, SignDocumentHandler));
+ pInfoBar->addButton(xBtn);
+ }
+
const SfxViewShell *pVSh;
const SfxShell *pFSh;
if ( !m_xObjSh->IsReadOnly() ||