diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index e706d9de3c21..022c0e4d3439 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1801,7 +1801,7 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl() } // if there are no used styles selected or the user approved the changes - if ( !(!bUsedStyle || aApproved) ) + if ( bUsedStyle && !aApproved ) return; for (auto const& elem : aList) diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 4114273f2cc6..588568af05d0 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -793,10 +793,12 @@ void SfxMedium::StorageBackup_Impl() ::ucbhelper::Content aOriginalContent; Reference< css::ucb::XCommandEnvironment > xDummyEnv; - bool bBasedOnOriginalFile = ( !pImpl->pTempFile && !( !pImpl->m_aLogicName.isEmpty() && pImpl->m_bSalvageMode ) + bool bBasedOnOriginalFile = + !pImpl->pTempFile + && ( pImpl->m_aLogicName.isEmpty() || !pImpl->m_bSalvageMode ) && !GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ).isEmpty() && GetURLObject().GetProtocol() == INetProtocol::File - && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ); + && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); if ( bBasedOnOriginalFile && pImpl->m_aBackupURL.isEmpty() && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext(), aOriginalContent ) ) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 533650751d75..e0b657a928d8 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3028,7 +3028,7 @@ void SfxBaseModel::impl_store( const OUString& sURL } } - if ( !(!bSaved && m_pData->m_pObjectShell.is()) ) + if ( bSaved || !m_pData->m_pObjectShell.is() ) return; SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? SfxEventHintId::SaveToDoc : SfxEventHintId::SaveAsDoc, GlobalEventConfig::GetEventName( bSaveTo ? GlobalEventId::SAVETODOC : GlobalEventId::SAVEASDOC ), |