diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-07 17:16:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-08 08:08:35 +0200 |
commit | a209172669e7a2de6065486e385e4e3007b74bd2 (patch) | |
tree | 4a7e008cf700fb23ecc6e4cd44de1c6a08a9b7e7 /vcl/unx | |
parent | 2675cbf042130f24fe7ea299b85b8f5f4794a667 (diff) |
loplugin:constantparam
Change-Id: Ib92aba17c46a4ada75c2a0630f281759d995f32e
Reviewed-on: https://gerrit.libreoffice.org/40843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/gensys.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksys.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk/salprn-gtk.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/x11/x11sys.cxx | 6 |
4 files changed, 8 insertions, 10 deletions
diff --git a/vcl/unx/generic/app/gensys.cxx b/vcl/unx/generic/app/gensys.cxx index b336a90561eb..dbcb1fffd4f8 100644 --- a/vcl/unx/generic/app/gensys.cxx +++ b/vcl/unx/generic/app/gensys.cxx @@ -99,7 +99,7 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::OK, false/*bUseResources*/ ) ); nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK; - int nResult = ShowNativeDialog( rTitle, rMessage, aButtons, 0/*nDefButton*/ ); + int nResult = ShowNativeDialog( rTitle, rMessage, aButtons ); return nResult != -1 ? nButtonIds[ nResult ] : 0; } diff --git a/vcl/unx/gtk/gtksys.cxx b/vcl/unx/gtk/gtksys.cxx index 5c047e4453a8..7e46498e6461 100644 --- a/vcl/unx/gtk/gtksys.cxx +++ b/vcl/unx/gtk/gtksys.cxx @@ -269,8 +269,7 @@ static OString MapToGtkAccelerator(const OUString &rStr) } int GtkSalSystem::ShowNativeDialog (const OUString& rTitle, const OUString& rMessage, - const std::list< OUString >& rButtonNames, - int nDefaultButton) + const std::list< OUString >& rButtonNames) { OString aTitle (OUStringToOString (rTitle, RTL_TEXTENCODING_UTF8)); OString aMessage (OUStringToOString (rMessage, RTL_TEXTENCODING_UTF8)); @@ -285,7 +284,7 @@ int GtkSalSystem::ShowNativeDialog (const OUString& rTitle, const OUString& rMes std::list< OUString >::const_iterator it; for (it = rButtonNames.begin(); it != rButtonNames.end(); ++it) gtk_dialog_add_button (pDialog, MapToGtkAccelerator(*it).getStr(), nButton++); - gtk_dialog_set_default_response (pDialog, nDefaultButton); + gtk_dialog_set_default_response (pDialog, 0/*nDefaultButton*/); nButton = gtk_dialog_run (pDialog); if (nButton < 0) diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx index 7ffbffb9c939..f82525481731 100644 --- a/vcl/unx/gtk/salprn-gtk.cxx +++ b/vcl/unx/gtk/salprn-gtk.cxx @@ -172,7 +172,6 @@ GtkSalPrinter::impl_doJob( const OUString& i_rJobName, const OUString& i_rAppName, ImplJobSetup* const io_pSetupData, - const int i_nCopies, const bool i_bCollate, vcl::PrinterController& io_rController) { @@ -180,7 +179,7 @@ GtkSalPrinter::impl_doJob( io_rController.jobStarted(); const bool bJobStarted( PspSalPrinter::StartJob(i_pFileName, i_rJobName, i_rAppName, - i_nCopies, i_bCollate, true, io_pSetupData)) + 1/*i_nCopies*/, i_bCollate, true, io_pSetupData)) ; if (bJobStarted) @@ -253,7 +252,7 @@ GtkSalPrinter::StartJob( //To-Do, swap ps/pdf for gtk_printer_accepts_ps()/gtk_printer_accepts_pdf() ? - return impl_doJob(&aFileName, i_rJobName, i_rAppName, io_pSetupData, 1/*nCopies*/, bCollate, io_rController); + return impl_doJob(&aFileName, i_rJobName, i_rAppName, io_pSetupData, bCollate, io_rController); } bool diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index 69a626274a0c..19a9c41049eb 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -84,7 +84,7 @@ tools::Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScree return aRet; } -int X11SalSystem::ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, const std::list< OUString >& rButtons, int nDefButton ) +int X11SalSystem::ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, const std::list< OUString >& rButtons ) { int nRet = -1; @@ -99,10 +99,10 @@ int X11SalSystem::ShowNativeDialog( const OUString& rTitle, const OUString& rMes sal_uInt16 nButton = 0; for( std::list< OUString >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it ) { - aWarn->AddButton( *it, nButton+1, nButton == (sal_uInt16)nDefButton ? ButtonDialogFlags::Default : ButtonDialogFlags::NONE ); + aWarn->AddButton( *it, nButton+1, (nButton == 0) ? ButtonDialogFlags::Default : ButtonDialogFlags::NONE ); nButton++; } - aWarn->SetFocusButton( (sal_uInt16)nDefButton+1 ); + aWarn->SetFocusButton( (sal_uInt16)1 ); nRet = ((int)aWarn->Execute()) - 1; |