diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-12 13:39:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-13 07:19:38 +0100 |
commit | d2bc01ff10f93a710296c7355efa8b11c6be0f56 (patch) | |
tree | 150a768a76778bd8205970c22eb67405375b70e0 /basctl | |
parent | 312eeeee42cb4a1e356943e17305555e41afc4ef (diff) |
loplugin:constantparam
Change-Id: I389f98d06058ba65a8c2d4df2bf7d4e5102659ad
Reviewed-on: https://gerrit.libreoffice.org/65017
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/macrodlg.cxx | 5 | ||||
-rw-r--r-- | basctl/source/basicide/macrodlg.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.hxx | 2 |
5 files changed, 8 insertions, 11 deletions
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index c127446433a2..708c35dbd7c1 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -247,7 +247,7 @@ OUString ChooseMacro(weld::Window* pParent, OUString aScriptURL; SbMethod* pMethod = nullptr; - MacroChooser aChooser(pParent, xDocFrame, true); + MacroChooser aChooser(pParent, xDocFrame); if ( bChooseOnly || !SvtModuleOptions::IsBasicIDE() ) aChooser.SetMode(MacroChooser::ChooseOnly); diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 182627597940..cd314bcb4ccd 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -45,7 +45,7 @@ using std::map; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame >& xDocFrame, bool bCreateEntries) +MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame >& xDocFrame) : SfxDialogController(pParnt, "modules/BasicIDE/ui/basicmacrodialog.ui", "BasicMacroDialog") , m_xDocumentFrame(xDocFrame) // the Sfx doesn't ask the BasicManager whether modified or not @@ -102,8 +102,7 @@ MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame if (SfxDispatcher* pDispatcher = GetDispatcher()) pDispatcher->Execute( SID_BASICIDE_STOREALLMODULESOURCES ); - if (bCreateEntries) - m_xBasicBox->ScanAllEntries(); + m_xBasicBox->ScanAllEntries(); } MacroChooser::~MacroChooser() diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx index 35e54799b734..c89886d380fe 100644 --- a/basctl/source/basicide/macrodlg.hxx +++ b/basctl/source/basicide/macrodlg.hxx @@ -89,7 +89,7 @@ private: std::unique_ptr<weld::Button> m_xNewLibButton; std::unique_ptr<weld::Button> m_xNewModButton; public: - MacroChooser(weld::Window *pParent, const ::css::uno::Reference< ::css::frame::XFrame >& xDocFrame, bool bCreateEntries); + MacroChooser(weld::Window *pParent, const ::css::uno::Reference< ::css::frame::XFrame >& xDocFrame); virtual ~MacroChooser() override; SbMethod* GetMacro(); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index ce81a182c82a..0baf1cb251fd 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -803,7 +803,7 @@ void ObjectPage::NewModule() if ( GetSelection( aDocument, aLibName ) ) { createModImpl(GetFrameWeld(), aDocument, - *m_pBasicBox, aLibName, OUString(), true); + *m_pBasicBox, aLibName, true); } } @@ -960,7 +960,7 @@ void LibDialog::SetStorageName( const OUString& rName ) // Helper function SbModule* createModImpl(weld::Window* pWin, const ScriptDocument& rDocument, - TreeListBox& rBasicBox, const OUString& rLibName, const OUString& _aModName, bool bMain ) + TreeListBox& rBasicBox, const OUString& rLibName, bool bMain ) { OSL_ENSURE( rDocument.isAlive(), "createModImpl: invalid document!" ); if ( !rDocument.isAlive() ) @@ -972,9 +972,7 @@ SbModule* createModImpl(weld::Window* pWin, const ScriptDocument& rDocument, if ( aLibName.isEmpty() ) aLibName = "Standard" ; rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName ); - OUString aModName = _aModName; - if ( aModName.isEmpty() ) - aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); + OUString aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); NewObjectDialog aNewDlg(pWin, ObjectMode::Module, true); aNewDlg.SetObjectName(aModName); diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index 38715d017e42..6758b8f94a9e 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -252,7 +252,7 @@ public: SbModule* createModImpl(weld::Window* pWin, const ScriptDocument& rDocument, SbTreeListBox& rBasicBox, const OUString& rLibName, const OUString& aModName, bool bMain); SbModule* createModImpl(weld::Window* pWin, const ScriptDocument& rDocument, - TreeListBox& rBasicBox, const OUString& rLibName, const OUString& aModName, bool bMain); + TreeListBox& rBasicBox, const OUString& rLibName, bool bMain); void createLibImpl(weld::Window* pWin, const ScriptDocument& rDocument, CheckBox* pLibBox, TreeListBox* pBasicBox); void createLibImpl(weld::Window* pWin, const ScriptDocument& rDocument, |