summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-18 08:27:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-18 09:46:28 +0200
commit5fb66ae5595b7435e8954df31473fad15a74b8c2 (patch)
tree3b3f0ce3eafa10557a7e78b10851c97ee16c7ebf /fpicker
parent181a1b36ac728e3a43e054496ceb53fd3315abdb (diff)
clang-tidy readability-simplify-boolean-expr
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/iodlg.cxx26
1 files changed, 6 insertions, 20 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 514260d359b2..04d57289ede5 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1823,27 +1823,13 @@ bool SvtFileDialog::PrepareExecute()
Reference< XResultSet > xResultSet
= aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_ONLY );
- if ( xResultSet.is() )
+ if ( xResultSet.is() && !xResultSet->next() )
{
- bool bEmpty = true;
- if ( !xResultSet->next() )
- {
- // folder is empty
- bEmpty = true;
- }
- else
- {
- bEmpty = false;
- }
-
- if ( bEmpty )
- {
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
- VclMessageType::Warning, VclButtonsType::Ok,
- FpsResId(STR_SVT_NOREMOVABLEDEVICE)));
- xBox->run();
- return false;
- }
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Warning, VclButtonsType::Ok,
+ FpsResId(STR_SVT_NOREMOVABLEDEVICE)));
+ xBox->run();
+ return false;
}
}
catch ( ContentCreationException const & )