summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-06 10:12:29 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-10 12:23:42 +0100
commit065edb4c8e91170017df482843d0c3eb8d4db114 (patch)
tree1d030ec9868a56b375a563c9d6e6d81c6115d717 /filter
parent0b34a5dd39e177ba99cd21b639d67ac8123b8458 (diff)
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I0b3c407331bfa1fa0c5003250d327d4f26de3643 Reviewed-on: https://gerrit.libreoffice.org/63235 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx35
1 files changed, 16 insertions, 19 deletions
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 7617eafeef1f..fb91a7b09d17 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -650,33 +650,30 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
bOk = false;
}
}
- else
+ else // bOk
{
- if( bOk )
+ try
+ {
+ Reference< XFlushable > xFlushable( mxFilterContainer, UNO_QUERY );
+ if( xFlushable.is() )
+ xFlushable->flush();
+ }
+ catch( const Exception& )
+ {
+ OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
+ bOk = false;
+ }
+
+ if( !bOk )
{
+ // we failed to add the filter, so lets remove the type
try
{
- Reference< XFlushable > xFlushable( mxFilterContainer, UNO_QUERY );
- if( xFlushable.is() )
- xFlushable->flush();
+ mxTypeDetection->removeByName( pFilterEntry->maType );
}
catch( const Exception& )
{
OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
- bOk = false;
- }
-
- if( !bOk )
- {
- // we failed to add the filter, so lets remove the type
- try
- {
- mxTypeDetection->removeByName( pFilterEntry->maType );
- }
- catch( const Exception& )
- {
- OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
- }
}
}