Kaydet (Commit) 02981bec authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

remove pointer to local

Change-Id: I21cb1e1798d7ca127005fd047d84ff535eb48019
Reviewed-on: https://gerrit.libreoffice.org/29458Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst d0349556
...@@ -1303,12 +1303,11 @@ void SwDocShell::SetChangeRecording( bool bActivate ) ...@@ -1303,12 +1303,11 @@ void SwDocShell::SetChangeRecording( bool bActivate )
void SwDocShell::SetProtectionPassword( const OUString &rNewPassword ) void SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
{ {
const SfxAllItemSet aSet( GetPool() ); const SfxAllItemSet aSet( GetPool() );
const SfxItemSet* pArgs = &aSet;
const SfxPoolItem* pItem = nullptr; const SfxPoolItem* pItem = nullptr;
IDocumentRedlineAccess& rIDRA = m_pWrtShell->getIDocumentRedlineAccess(); IDocumentRedlineAccess& rIDRA = m_pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswd = rIDRA.GetRedlinePassword(); Sequence< sal_Int8 > aPasswd = rIDRA.GetRedlinePassword();
if (pArgs && SfxItemState::SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) if (SfxItemState::SET == aSet.GetItemState(FN_REDLINE_PROTECT, false, &pItem)
&& static_cast<const SfxBoolItem*>(pItem)->GetValue() == (aPasswd.getLength() > 0)) && static_cast<const SfxBoolItem*>(pItem)->GetValue() == (aPasswd.getLength() > 0))
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment