From aa8efc72d43c2000cb3b5571fdc6b48617eb9b94 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Thu, 23 Feb 2017 15:12:34 +0100 Subject: tdf#101652 No infobar when doc attr is readonly One can set the a document attribute to open the doc read-only. In this case the read-only infobar should not be shown. Change-Id: I92b78dc3e20ccf0d258cdf3e4a79530f87a2e311 Reviewed-on: https://gerrit.libreoffice.org/34581 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- sfx2/source/view/viewfrm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index b1fc522f32eb..f21710cf058e 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1213,9 +1213,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) const SfxViewShell *pVSh; const SfxShell *pFSh; - if ( m_xObjSh->IsReadOnly() && + if ( m_xObjSh->IsOriginallyReadOnlyMedium() && ( m_xObjSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED || - ( pVSh = m_xObjSh->GetViewShell()) && (pFSh = pVSh->GetFormShell()) && pFSh->IsDesignMode())) + (( pVSh = m_xObjSh->GetViewShell()) && (pFSh = pVSh->GetFormShell()) && pFSh->IsDesignMode()))) { bool bSignPDF = IsSignPDF(m_xObjSh); -- cgit v1.2.3