basctl/source/basicide/bastype2.cxx | 4 ++-- basctl/source/basicide/bastype3.cxx | 6 +++--- basctl/source/basicide/breakpoint.cxx | 2 +- basctl/source/basicide/breakpoint.hxx | 2 +- basctl/source/basicide/macrodlg.cxx | 2 +- basctl/source/basicide/macrodlg.hxx | 2 +- basctl/source/inc/bastype2.hxx | 12 ++++++------ basegfx/source/range/b2drangeclipper.cxx | 2 +- canvas/workben/canvasdemo.cxx | 2 +- chart2/source/controller/dialogs/tp_DataSource.cxx | 2 +- chart2/source/controller/dialogs/tp_DataSource.hxx | 2 +- connectivity/source/drivers/firebird/ResultSet.cxx | 2 +- connectivity/source/drivers/firebird/ResultSet.hxx | 2 +- connectivity/source/drivers/mysqlc/mysqlc_general.cxx | 5 ++++- connectivity/source/drivers/mysqlc/mysqlc_general.hxx | 2 +- connectivity/source/inc/odbc/OTools.hxx | 2 +- cui/source/inc/chardlg.hxx | 2 +- cui/source/inc/cuitabline.hxx | 4 ++-- cui/source/inc/numpages.hxx | 2 +- cui/source/inc/tabstpge.hxx | 2 +- cui/source/tabpages/chardlg.cxx | 2 +- cui/source/tabpages/numpages.cxx | 2 +- cui/source/tabpages/tabstpge.cxx | 2 +- cui/source/tabpages/tplnedef.cxx | 4 ++-- 24 files changed, 37 insertions(+), 34 deletions(-)
New commits: commit 48fd4199a665130947033ee431db766c04d8d023 Author: Noel Grandin <[email protected]> AuthorDate: Wed Jan 23 14:32:29 2019 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Jan 24 07:46:27 2019 +0100 loplugin:constparams in connectivity..cui Change-Id: Ia2ae97498a9aad8638c4b77ce20143eeec616751 Reviewed-on: https://gerrit.libreoffice.org/66792 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index f08be6983771..38384282040b 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -57,7 +57,7 @@ using namespace ::com::sun::star::util; OResultSet::OResultSet(Connection* pConnection, ::osl::Mutex& rMutex, const uno::Reference< XInterface >& xStatement, - isc_stmt_handle& aStatementHandle, + const isc_stmt_handle& aStatementHandle, XSQLDA* pSqlda ) : OResultSet_BASE(rMutex) , OPropertyContainer(OResultSet_BASE::rBHelper) diff --git a/connectivity/source/drivers/firebird/ResultSet.hxx b/connectivity/source/drivers/firebird/ResultSet.hxx index 008bc5b55263..ca1804629b2a 100644 --- a/connectivity/source/drivers/firebird/ResultSet.hxx +++ b/connectivity/source/drivers/firebird/ResultSet.hxx @@ -121,7 +121,7 @@ namespace connectivity OResultSet(Connection* pConnection, ::osl::Mutex& rMutex, const css::uno::Reference< css::uno::XInterface >& xStatement, - isc_stmt_handle& aStatementHandle, + const isc_stmt_handle& aStatementHandle, XSQLDA* aSqlda ); diff --git a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx index 56b92afd2245..ed1a71dd460d 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx @@ -225,7 +225,10 @@ sal_Int32 mysqlStrToOOOType(const OUString& sType) return css::sdbc::DataType::VARCHAR; } -OUString mysqlTypeToStr(MYSQL_FIELD* field) { return mysqlTypeToStr(field->type, field->flags); } +OUString mysqlTypeToStr(MYSQL_FIELD const* field) +{ + return mysqlTypeToStr(field->type, field->flags); +} OUString mysqlTypeToStr(unsigned type, unsigned flags) { diff --git a/connectivity/source/drivers/mysqlc/mysqlc_general.hxx b/connectivity/source/drivers/mysqlc/mysqlc_general.hxx index f8d866964318..67dbd7342597 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_general.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_general.hxx @@ -105,7 +105,7 @@ void throwSQLExceptionWithMsg(const char* msg, unsigned int errorNum, sal_Int32 mysqlToOOOType(int eType, int charsetnr) noexcept; -OUString mysqlTypeToStr(MYSQL_FIELD* pField); +OUString mysqlTypeToStr(MYSQL_FIELD const* pField); OUString mysqlTypeToStr(unsigned mysql_type, unsigned mysql_flags); diff --git a/connectivity/source/inc/odbc/OTools.hxx b/connectivity/source/inc/odbc/OTools.hxx index 377a42de0ada..3f2fddb8178e 100644 --- a/connectivity/source/inc/odbc/OTools.hxx +++ b/connectivity/source/inc/odbc/OTools.hxx @@ -231,7 +231,7 @@ namespace connectivity /// @throws css::sdbc::SQLException /// @throws css::uno::RuntimeException - template <class T> void getValue( OConnection* _pConnection, + template <class T> void getValue( const OConnection* _pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _nType, diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 0aa3cd9499f1..7f547c91711a 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -219,7 +219,7 @@ private: Color GetPreviewFontColor(const Color& rColor) const; void EnableNoneFontColor(); - void SelectHdl_Impl(weld::ComboBox*); + void SelectHdl_Impl(const weld::ComboBox*); DECL_LINK(SelectListBoxHdl_Impl, weld::ComboBox&, void); DECL_LINK(CbClickHdl_Impl, weld::ToggleButton&, void); DECL_LINK(TristClickHdl_Impl, weld::ToggleButton&, void); diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 284a0e656a55..1c0753b0c539 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -287,8 +287,8 @@ private: DECL_LINK(ClickSaveHdl_Impl, weld::Button&, void); DECL_LINK(ChangeMetricHdl_Impl, weld::ToggleButton&, void); DECL_LINK(SelectTypeListBoxHdl_Impl, weld::ComboBox&, void); - void SelectTypeHdl_Impl(weld::ComboBox*); - void ChangeMetricHdl_Impl(weld::ToggleButton*); + void SelectTypeHdl_Impl(const weld::ComboBox*); + void ChangeMetricHdl_Impl(const weld::ToggleButton*); void CheckChanges_Impl(); diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 3f3b429087f9..c1a1869c551a 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -315,7 +315,7 @@ class SvxNumOptionsTabPage : public SfxTabPage DECL_LINK(BulColorHdl_Impl, ColorListBox&, void); DECL_LINK(BulRelSizeHdl_Impl, weld::MetricSpinButton&, void); DECL_LINK(PreviewInvalidateHdl_Impl, Timer*, void); - void EditModifyHdl_Impl(weld::Entry*); + void EditModifyHdl_Impl(const weld::Entry*); public: SvxNumOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet); diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx index d244064b5c67..f3f10c4a3435 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -128,7 +128,7 @@ private: void InitTabPos_Impl( sal_uInt16 nPos = 0 ); void SetFillAndTabType_Impl(); - void NewHdl_Impl(weld::Button*); + void NewHdl_Impl(const weld::Button*); // Handler DECL_LINK(NewHdl_Impl, weld::Button&, void); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 0e4c952f3d22..ffcfd040493b 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1612,7 +1612,7 @@ IMPL_LINK( SvxCharEffectsPage, SelectListBoxHdl_Impl, weld::ComboBox&, rBox, voi SelectHdl_Impl(&rBox); } -void SvxCharEffectsPage::SelectHdl_Impl(weld::ComboBox* pBox) +void SvxCharEffectsPage::SelectHdl_Impl(const weld::ComboBox* pBox) { if (m_xEmphasisLB.get() == pBox) { diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 16b1186583a1..4142b7e06dfc 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -2118,7 +2118,7 @@ IMPL_LINK(SvxNumOptionsTabPage, EditModifyHdl_Impl, weld::Entry&, rEdit, void) EditModifyHdl_Impl(&rEdit); } -void SvxNumOptionsTabPage::EditModifyHdl_Impl(weld::Entry* pEdit) +void SvxNumOptionsTabPage::EditModifyHdl_Impl(const weld::Entry* pEdit) { bool bPrefix = pEdit == m_xPrefixED.get(); bool bSuffix = pEdit == m_xSuffixED.get(); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 8220e0b19d04..bc2ac9a6a4de 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -430,7 +430,7 @@ IMPL_LINK(SvxTabulatorTabPage, NewHdl_Impl, weld::Button&, rBtn, void) NewHdl_Impl(&rBtn); } -void SvxTabulatorTabPage::NewHdl_Impl(weld::Button* pBtn) +void SvxTabulatorTabPage::NewHdl_Impl(const weld::Button* pBtn) { // Add a new one and select it // Get the value from the display diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 1d38acd64070..a36fcfa37288 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -379,7 +379,7 @@ IMPL_LINK( SvxLineDefTabPage, ChangeMetricHdl_Impl, weld::ToggleButton&, r, void ChangeMetricHdl_Impl(&r); } -void SvxLineDefTabPage::ChangeMetricHdl_Impl(weld::ToggleButton* p) +void SvxLineDefTabPage::ChangeMetricHdl_Impl(const weld::ToggleButton* p) { if( !m_xCbxSynchronize->get_active() && m_xMtrLength1->get_unit() != eFUnit ) { @@ -450,7 +450,7 @@ IMPL_LINK( SvxLineDefTabPage, SelectTypeListBoxHdl_Impl, weld::ComboBox&, rListB SelectTypeHdl_Impl(&rListBox); } -void SvxLineDefTabPage::SelectTypeHdl_Impl(weld::ComboBox* p) +void SvxLineDefTabPage::SelectTypeHdl_Impl(const weld::ComboBox* p) { if (p == m_xLbType1.get() || !p) { commit d2cf4cb76268c600ff7cfcdb6dc97c859f8b6e38 Author: Noel Grandin <[email protected]> AuthorDate: Wed Jan 23 14:31:11 2019 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Jan 24 07:46:23 2019 +0100 loplugin:constparams in basctl..chart2 Change-Id: I9ac9a34ba58f411d5aad235407553df63216319c Reviewed-on: https://gerrit.libreoffice.org/66791 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 7e1380f9d7ed..11beb68d110a 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -1319,7 +1319,7 @@ bool SbTreeListBox::FindEntry(const OUString& rText, EntryType eType, weld::Tree return false; } -bool SbTreeListBox::IsEntryProtected(weld::TreeIter* pEntry) +bool SbTreeListBox::IsEntryProtected(const weld::TreeIter* pEntry) { bool bProtected = false; if (pEntry && m_xControl->get_iter_depth(*pEntry) == 1) @@ -1355,7 +1355,7 @@ void SbTreeListBox::AddEntry( m_xControl->insert(pParent, -1, &rText, &sId, nullptr, nullptr, &rImage, bChildrenOnDemand); } -void SbTreeListBox::SetEntryBitmaps(weld::TreeIter& rIter, const OUString& rImage) +void SbTreeListBox::SetEntryBitmaps(const weld::TreeIter& rIter, const OUString& rImage) { m_xControl->set_expander_image(rIter, rImage); } diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 33930b42e00d..69bfb2c4e200 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -258,7 +258,7 @@ void SbTreeListBox::ScanAllEntries() } } -SbxVariable* SbTreeListBox::FindVariable(weld::TreeIter* pEntry) +SbxVariable* SbTreeListBox::FindVariable(const weld::TreeIter* pEntry) { if ( !pEntry ) return nullptr; @@ -449,7 +449,7 @@ EntryDescriptor TreeListBox::GetEntryDescriptor( SvTreeListEntry* pEntry ) return EntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aName, aMethodName, eType ); } -EntryDescriptor SbTreeListBox::GetEntryDescriptor(weld::TreeIter* pEntry) +EntryDescriptor SbTreeListBox::GetEntryDescriptor(const weld::TreeIter* pEntry) { ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() ); LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN; @@ -691,7 +691,7 @@ bool SbTreeListBox::IsValidEntry(weld::TreeIter& rEntry) return bIsValid; } -SbModule* SbTreeListBox::FindModule(weld::TreeIter* pEntry) +SbModule* SbTreeListBox::FindModule(const weld::TreeIter* pEntry) { return dynamic_cast<SbModule*>(FindVariable(pEntry)); } diff --git a/basctl/source/basicide/breakpoint.cxx b/basctl/source/basicide/breakpoint.cxx index ff14d7087592..15d5139f6610 100644 --- a/basctl/source/basicide/breakpoint.cxx +++ b/basctl/source/basicide/breakpoint.cxx @@ -125,7 +125,7 @@ void BreakPointList::ResetHitCount() } } -void BreakPointList::remove(BreakPoint* ptr) +void BreakPointList::remove(const BreakPoint* ptr) { for ( auto i = maBreakPoints.begin(); i != maBreakPoints.end(); ++i ) { diff --git a/basctl/source/basicide/breakpoint.hxx b/basctl/source/basicide/breakpoint.hxx index 566275060d3b..61a23753e042 100644 --- a/basctl/source/basicide/breakpoint.hxx +++ b/basctl/source/basicide/breakpoint.hxx @@ -72,7 +72,7 @@ public: size_t size() const; BreakPoint& at(size_t i); const BreakPoint& at(size_t i) const; - void remove(BreakPoint* ptr); + void remove(const BreakPoint* ptr); void remove(size_t i); }; diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 4ce9619c8e21..d961c9afcda7 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -338,7 +338,7 @@ SbMethod* MacroChooser::CreateMacro() return pMethod; } -void MacroChooser::SaveSetCurEntry(weld::TreeView& rBox, weld::TreeIter& rEntry) +void MacroChooser::SaveSetCurEntry(weld::TreeView& rBox, const weld::TreeIter& rEntry) { // the edit would be killed by the highlight otherwise: diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx index c89886d380fe..9ab71acc13fa 100644 --- a/basctl/source/basicide/macrodlg.hxx +++ b/basctl/source/basicide/macrodlg.hxx @@ -61,7 +61,7 @@ private: DECL_LINK(ButtonHdl, weld::Button&, void); void CheckButtons(); - void SaveSetCurEntry(weld::TreeView& rBox, weld::TreeIter& rEntry); + void SaveSetCurEntry(weld::TreeView& rBox, const weld::TreeIter& rEntry); void UpdateFields(); void EnableButton(weld::Button& rButton, bool bEnable); diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx index 923e722d4bb8..4761fbb5ca9d 100644 --- a/basctl/source/inc/bastype2.hxx +++ b/basctl/source/inc/bastype2.hxx @@ -256,7 +256,7 @@ private: weld::Window* m_pTopLevel; BrowseMode nMode; DocumentEventNotifier m_aNotifier; - void SetEntryBitmaps(weld::TreeIter& rIter, const OUString& rImage); + void SetEntryBitmaps(const weld::TreeIter& rIter, const OUString& rImage); protected: DECL_LINK(RequestingChildrenHdl, weld::TreeIter&, bool); @@ -286,16 +286,16 @@ public: void ScanAllEntries(); void UpdateEntries(); - bool IsEntryProtected(weld::TreeIter* pEntry); + bool IsEntryProtected(const weld::TreeIter* pEntry); void SetMode( BrowseMode nM ) { nMode = nM; } BrowseMode GetMode() const { return nMode; } - SbModule* FindModule(weld::TreeIter* pEntry); - SbxVariable* FindVariable(weld::TreeIter* pEntry); + SbModule* FindModule(const weld::TreeIter* pEntry); + SbxVariable* FindVariable(const weld::TreeIter* pEntry); bool FindRootEntry(const ScriptDocument& rDocument, LibraryLocation eLocation, weld::TreeIter& rIter); bool FindEntry(const OUString& rText, EntryType eType, weld::TreeIter& rIter); - EntryDescriptor GetEntryDescriptor(weld::TreeIter* pEntry); + EntryDescriptor GetEntryDescriptor(const weld::TreeIter* pEntry); static ItemType ConvertType (EntryType eType); bool IsValidEntry(weld::TreeIter& rEntry); @@ -303,7 +303,7 @@ public: weld::TreeIter* pIter, bool bChildrenOnDemand, std::unique_ptr<Entry>&& rUserData); void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_changed(rLink); } - std::unique_ptr<weld::TreeIter> make_iterator(weld::TreeIter* pIter = nullptr) const { return m_xControl->make_iterator(pIter); } + std::unique_ptr<weld::TreeIter> make_iterator(const weld::TreeIter* pIter = nullptr) const { return m_xControl->make_iterator(pIter); } void copy_iterator(const weld::TreeIter& rSource, weld::TreeIter& rDest) const { m_xControl->copy_iterator(rSource, rDest); } bool get_selected(weld::TreeIter* pIter) const { return m_xControl->get_selected(pIter); } void select(const weld::TreeIter& rIter) { m_xControl->select(rIter); } diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx index bc25fa474682..1a61a1efb9c9 100644 --- a/basegfx/source/range/b2drangeclipper.cxx +++ b/basegfx/source/range/b2drangeclipper.cxx @@ -706,7 +706,7 @@ namespace basegfx Iterator first, Iterator last, ListOfEdges& rActiveEdgeList, - SweepLineEvent& rCurrEvent, + SweepLineEvent const & rCurrEvent, VectorOfPolygons& rPolygonPool, B2DPolyPolygon& rRes ) { diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx index c4b261c2a28d..e144c67b0047 100644 --- a/canvas/workben/canvasdemo.cxx +++ b/canvas/workben/canvasdemo.cxx @@ -155,7 +155,7 @@ class DemoRenderer mxCanvas->drawText( aText, mxDefaultFont, maViewState, aRenderState, 0); } - void drawRect( tools::Rectangle rRect, uno::Sequence< double > &aColor, int /*nWidth*/ ) + void drawRect( tools::Rectangle rRect, const uno::Sequence< double > &aColor, int /*nWidth*/ ) { uno::Sequence< geometry::RealPoint2D > aPoints(4); uno::Reference< rendering::XLinePolyPolygon2D > xPoly; diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 535e401ac1bd..17f32f126772 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -756,7 +756,7 @@ void DataSourceTabPage::disposingRangeSelection() m_rDialogModel.getRangeSelectionHelper()->stopRangeListening( false ); } -bool DataSourceTabPage::updateModelFromControl(weld::Entry* pField) +bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField) { if (!m_bIsDirty) return true; diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index 7c4f9b437e3e..6a4d9358bdfd 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -97,7 +97,7 @@ private: <TRUE/> if the text from the field is a valid format to the internal data was valid */ - bool updateModelFromControl(weld::Entry* pField = nullptr); + bool updateModelFromControl(const weld::Entry* pField = nullptr); /** @return </sal_True>, if the edit field contains a valid range entry. If no XCellRangesAccess can be obtained, </sal_False> is returned. _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
