summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-14 17:14:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-11 11:38:15 +0200
commit1f08bff31238d5818c54a0b86570689644dff087 (patch)
treed4d6f4b62a3c48ddeb85ba89818247c17f2578c8 /fpicker
parentff130af9661a57d290dbf89b54a4c0ce8d0f71ea (diff)
new loplugin:shouldreturnbool
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/iodlg.cxx10
-rw-r--r--fpicker/source/office/iodlg.hxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 6ccb634bf73f..ac43ea6ebe5d 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1799,10 +1799,10 @@ void SvtFileDialog::EnableControl( Control* _pControl, bool _bEnable )
}
-short SvtFileDialog::PrepareExecute()
+bool SvtFileDialog::PrepareExecute()
{
if (comphelper::LibreOfficeKit::isActive())
- return 0;
+ return false;
OUString aEnvValue;
if ( getEnvironmentValue( "WorkDirMustContainRemovableMedia", aEnvValue ) && aEnvValue == "1" )
@@ -1839,7 +1839,7 @@ short SvtFileDialog::PrepareExecute()
VclMessageType::Warning, VclButtonsType::Ok,
FpsResId(STR_SVT_NOREMOVABLEDEVICE)));
xBox->run();
- return 0;
+ return false;
}
}
}
@@ -1939,7 +1939,7 @@ short SvtFileDialog::PrepareExecute()
OUString aFilter;
if ( !IsolateFilterFromPath_Impl( _aPath, aFilter ) )
- return 0;
+ return false;
AdjustFilterFlags nNewFilterFlags = adjustFilter( aFilter );
if ( nNewFilterFlags & ( AdjustFilterFlags::NonEmpty | AdjustFilterFlags::UserFilter ) )
@@ -1979,7 +1979,7 @@ short SvtFileDialog::PrepareExecute()
// if applicable read and set size from ini
InitSize();
- return 1;
+ return true;
}
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 55d7270e09da..3cb4f631e307 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -165,7 +165,7 @@ private:
<member>EnableUI</member> for details.
*/
void EnableControl( Control* _pControl, bool _bEnable );
- short PrepareExecute();
+ bool PrepareExecute();
public:
SvtFileDialog( vcl::Window* _pParent, PickerFlags nBits );