summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-22 16:21:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-22 21:56:13 +0200
commitc816cb847da9a3302f23e113171c81fed6b319c0 (patch)
tree59c68cf6d5008e65dbdd379cbbe6fca5a887ee8b /sfx2
parent7354da6ccfd0492a3f38ff07ce65500ec9f727b7 (diff)
pvs-studio: V571 Recurring check
Change-Id: I1ad7bcfa557b38488adf26b434433e6bae259f43 Reviewed-on: https://gerrit.libreoffice.org/62190 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/mailmodel.cxx23
-rw-r--r--sfx2/source/doc/objstor.cxx2
2 files changed, 11 insertions, 14 deletions
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 894496c38a5b..7e2d8f71b666 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -537,20 +537,17 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
if( bNeedsPreparation && xPrepareDispatch.is() )
{
- if ( xPrepareDispatch.is() )
+ try
+ {
+ css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs;
+ xPrepareDispatch->dispatch( aPrepareURL, aDispatchArgs );
+ }
+ catch ( css::uno::RuntimeException& )
+ {
+ throw;
+ }
+ catch ( css::uno::Exception& )
{
- try
- {
- css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs;
- xPrepareDispatch->dispatch( aPrepareURL, aDispatchArgs );
- }
- catch ( css::uno::RuntimeException& )
- {
- throw;
- }
- catch ( css::uno::Exception& )
- {
- }
}
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index de3b42c70df3..2d00677ad01a 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1558,7 +1558,7 @@ bool SfxObjectShell::SaveTo_Impl
bTryToPreserveScriptSignature = ( SotStorage::GetVersion( rMedium.GetStorage() ) == SOFFICE_FILEFORMAT_60 );
uno::Reference< security::XDocumentDigitalSignatures > xDDSigns;
- if ( bOk && bTryToPreserveScriptSignature )
+ if (bTryToPreserveScriptSignature)
{
// if the scripting code was not changed and it is signed the signature should be preserved
// unfortunately at this point we have only information whether the basic code has changed or not