diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-23 09:58:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-23 10:19:43 +0200 |
commit | 73140c6f3485e3f221fe6f272c21104b8575e12c (patch) | |
tree | 2dbe07d6915cb813c3f70fdccf3999e806439bc5 /fpicker | |
parent | f8a7bbdacbf00d85745281b843ed01d29657d109 (diff) |
loplugin:constantparam in fpicker
Change-Id: I7225c996030eed494e3ca8a9dabc501fc505e101
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 17 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.hxx | 12 |
2 files changed, 8 insertions, 21 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index ec41f7305060..dc1e570322ef 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -787,7 +787,7 @@ IMPL_LINK_NOARG_TYPED( SvtFileDialog, NewFolderHdl_Impl, Button*, void) } } -bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, bool _bAllowUserDefExt ) +bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter ) { // delete the old user filter and create a new one DELETEZ( _pImp->_pUserFilter ); @@ -817,13 +817,10 @@ bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, bool _bAll bUseCurFilterExt = false; } - if ( !_bAllowUserDefExt || bUseCurFilterExt ) - { - if ( _pImp->GetCurFilter( ) ) - SetDefaultExt( _pImp->GetCurFilter( )->GetExtension() ); - else - EraseDefaultExt(); - } + if ( _pImp->GetCurFilter( ) ) + SetDefaultExt( _pImp->GetCurFilter( )->GetExtension() ); + else + EraseDefaultExt(); // outta here return bIsAllFiles; @@ -861,7 +858,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter ) { nReturn |= FLT_USERFILTER; // no filter found : use it as user defined filter - if ( createNewUserFilter( _rFilter, false ) ) + if ( createNewUserFilter( _rFilter ) ) { // it's the "all files" filter nReturn |= FLT_ALLFILESFILTER; @@ -1386,7 +1383,7 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl // activate filter _rFilterChanged = _pImp->_pUserFilter || ( _pImp->GetCurFilter() != pFilter ); - createNewUserFilter( _rFilter, false ); + createNewUserFilter( _rFilter ); break; } diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx index c360d522df94..a83da18df277 100644 --- a/fpicker/source/office/iodlg.hxx +++ b/fpicker/source/office/iodlg.hxx @@ -239,19 +239,9 @@ private: /** updates _pUserFilter with a new filter <p>No checks for necessity are made.</p> - @param _bAllowUserDefExt - set to <TRUE/> if a filter like "*.txt" should reset the DefaultExtension to doc. - <p> - In a file-save-dialog this would have the following effect:<br/> - Say that auto-extension is checked, and the user enters *.txt, while a non-txt filter is selected.<br/> - If _bAllowUserDefExt is set to <TRUE/>, then a user input of "foo" would save a foo.txt, but in a format - which is determined by the filter selected (which is no txt file as said above).<br/> - If _bAllowUserDefExt is set to <FALSE/>, the default extension will be the one of the selected filter, means - in the above scenario a file "foo.<ext>" will be saved where ext is the extension of the selected filter. - </p> @return <TRUE/> if the new filter is "*.*" */ - bool createNewUserFilter( const OUString& _rNewFilter, bool _bAllowUserDefExt ); + bool createNewUserFilter( const OUString& _rNewFilter ); sal_uInt16 adjustFilter( const OUString& _rFilter ); |