Kaydet (Commit) b9e9dde5 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constparams in reportdesign

Change-Id: Ibbaca071e1279a7b5302207fe27e71d2994d6768
Reviewed-on: https://gerrit.libreoffice.org/40713Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 89df4721
...@@ -45,7 +45,7 @@ class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage ...@@ -45,7 +45,7 @@ class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage
// method to remove temporary objects, created by 'special mode' // method to remove temporary objects, created by 'special mode'
// (BegDragObj) // (BegDragObj)
void removeTempObject(SdrObject *_pToRemoveObj); void removeTempObject(SdrObject const *_pToRemoveObj);
virtual ~OReportPage() override; virtual ~OReportPage() override;
......
...@@ -105,7 +105,7 @@ namespace rptui ...@@ -105,7 +105,7 @@ namespace rptui
* *
* \param _pPage * \param _pPage
*/ */
void RemoveSection(OReportPage* _pPage); void RemoveSection(OReportPage const * _pPage);
protected: protected:
// XEventListener // XEventListener
......
...@@ -191,7 +191,7 @@ namespace reportdesign ...@@ -191,7 +191,7 @@ namespace reportdesign
using namespace comphelper; using namespace comphelper;
using namespace rptui; using namespace rptui;
void lcl_setModelReadOnly(const uno::Reference< embed::XStorage >& _xStorage,std::shared_ptr<rptui::OReportModel>& _rModel) void lcl_setModelReadOnly(const uno::Reference< embed::XStorage >& _xStorage,std::shared_ptr<rptui::OReportModel> const & _rModel)
{ {
uno::Reference<beans::XPropertySet> xProp(_xStorage,uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xProp(_xStorage,uno::UNO_QUERY);
sal_Int32 nOpenMode = embed::ElementModes::READ; sal_Int32 nOpenMode = embed::ElementModes::READ;
......
...@@ -146,7 +146,7 @@ uno::Reference< uno::XInterface > OReportPage::createUnoPage() ...@@ -146,7 +146,7 @@ uno::Reference< uno::XInterface > OReportPage::createUnoPage()
return static_cast<cppu::OWeakObject*>( new reportdesign::OReportDrawPage(this,m_xSection) ); return static_cast<cppu::OWeakObject*>( new reportdesign::OReportDrawPage(this,m_xSection) );
} }
void OReportPage::removeTempObject(SdrObject *_pToRemoveObj) void OReportPage::removeTempObject(SdrObject const *_pToRemoveObj)
{ {
if (_pToRemoveObj) if (_pToRemoveObj)
{ {
......
...@@ -138,7 +138,7 @@ void OXUndoEnvironment::UnLock() ...@@ -138,7 +138,7 @@ void OXUndoEnvironment::UnLock()
} }
bool OXUndoEnvironment::IsLocked() const { return m_pImpl->m_nLocks != 0; } bool OXUndoEnvironment::IsLocked() const { return m_pImpl->m_nLocks != 0; }
void OXUndoEnvironment::RemoveSection(OReportPage* _pPage) void OXUndoEnvironment::RemoveSection(OReportPage const * _pPage)
{ {
if ( _pPage ) if ( _pPage )
{ {
......
...@@ -380,7 +380,7 @@ uno::Reference< sdbc::XConnection> OAddFieldWindow::getConnection() const ...@@ -380,7 +380,7 @@ uno::Reference< sdbc::XConnection> OAddFieldWindow::getConnection() const
return uno::Reference< sdbc::XConnection>(m_xRowSet->getPropertyValue( PROPERTY_ACTIVECONNECTION ),uno::UNO_QUERY); return uno::Reference< sdbc::XConnection>(m_xRowSet->getPropertyValue( PROPERTY_ACTIVECONNECTION ),uno::UNO_QUERY);
} }
void OAddFieldWindow::fillDescriptor(SvTreeListEntry* _pSelected,svx::ODataAccessDescriptor& _rDescriptor) void OAddFieldWindow::fillDescriptor(SvTreeListEntry const * _pSelected,svx::ODataAccessDescriptor& _rDescriptor)
{ {
if ( _pSelected && m_xColumns.is() ) if ( _pSelected && m_xColumns.is() )
{ {
......
...@@ -115,7 +115,7 @@ public: ...@@ -115,7 +115,7 @@ public:
* \param _pSelected the currently selected * \param _pSelected the currently selected
* \param _rDescriptor the descriptor will be filled * \param _rDescriptor the descriptor will be filled
*/ */
void fillDescriptor(SvTreeListEntry* _pSelected,svx::ODataAccessDescriptor& _rDescriptor); void fillDescriptor(SvTreeListEntry const * _pSelected,svx::ODataAccessDescriptor& _rDescriptor);
private: private:
// FmXChangeListener // FmXChangeListener
......
...@@ -173,7 +173,7 @@ namespace rptui ...@@ -173,7 +173,7 @@ namespace rptui
@param _pSectionView the section where to set the marked flag @param _pSectionView the section where to set the marked flag
@param _bMark the marked flag @param _bMark the marked flag
*/ */
void setMarked(OSectionView* _pSectionView, bool _bMark); void setMarked(OSectionView const * _pSectionView, bool _bMark);
void setMarked(const css::uno::Reference< css::report::XSection>& _xSection, bool _bMark); void setMarked(const css::uno::Reference< css::report::XSection>& _xSection, bool _bMark);
void setMarked(const css::uno::Sequence< css::uno::Reference< css::report::XReportComponent> >& _xShape, bool _bMark); void setMarked(const css::uno::Sequence< css::uno::Reference< css::report::XReportComponent> >& _xShape, bool _bMark);
......
...@@ -165,7 +165,7 @@ namespace rptui ...@@ -165,7 +165,7 @@ namespace rptui
@param _pSectionView the section where to set the marked flag @param _pSectionView the section where to set the marked flag
@param _bMark the marked flag @param _bMark the marked flag
*/ */
void setMarked(OSectionView* _pSectionView, bool _bMark); void setMarked(OSectionView const * _pSectionView, bool _bMark);
void setMarked(const css::uno::Reference< css::report::XSection>& _xSection, bool _bMark); void setMarked(const css::uno::Reference< css::report::XSection>& _xSection, bool _bMark);
void setMarked(const css::uno::Sequence< css::uno::Reference< css::report::XReportComponent> >& _xShape, bool _bMark); void setMarked(const css::uno::Sequence< css::uno::Reference< css::report::XReportComponent> >& _xShape, bool _bMark);
......
...@@ -126,7 +126,7 @@ namespace rptui ...@@ -126,7 +126,7 @@ namespace rptui
::comphelper::mem_fun(&TaskPaneList::AddWindow) ::comphelper::mem_fun(&TaskPaneList::AddWindow)
::comphelper::mem_fun(&TaskPaneList::RemoveWindow) ::comphelper::mem_fun(&TaskPaneList::RemoveWindow)
*/ */
void notifySystemWindow(vcl::Window* pWindow, vcl::Window* pToRegister, const ::comphelper::mem_fun1_t<TaskPaneList, vcl::Window*>& rMemFunc); void notifySystemWindow(vcl::Window const * pWindow, vcl::Window* pToRegister, const ::comphelper::mem_fun1_t<TaskPaneList, vcl::Window*>& rMemFunc);
const sal_Int16 ISOVER_IGNORE_CUSTOMSHAPES = 1; const sal_Int16 ISOVER_IGNORE_CUSTOMSHAPES = 1;
...@@ -138,9 +138,9 @@ namespace rptui ...@@ -138,9 +138,9 @@ namespace rptui
* \param _bAllObjects if <TRUE/> all objects are taken into account, otherwise only not marked ones * \param _bAllObjects if <TRUE/> all objects are taken into account, otherwise only not marked ones
* \return the object which is overlapped, otherwise <NULL/> * \return the object which is overlapped, otherwise <NULL/>
*/ */
SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects = false,SdrObject* _pIgnore = nullptr, sal_Int16 _nIgnoreType=0); SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage const & _rPage,SdrView const & _rView,bool _bAllObjects = false,SdrObject const * _pIgnore = nullptr, sal_Int16 _nIgnoreType=0);
SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects, SdrUnoObj* _pIgnoreList[], int _nIgnoreListLength); SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage const & _rPage,SdrView const & _rView,bool _bAllObjects, SdrUnoObj* _pIgnoreList[], int _nIgnoreListLength);
/** checks whether the given OUnoObject object rectangle overlapps another object in that view. /** checks whether the given OUnoObject object rectangle overlapps another object in that view.
* *
...@@ -149,7 +149,7 @@ namespace rptui ...@@ -149,7 +149,7 @@ namespace rptui
* \param _rView * \param _rView
* \return the object which is overlapped, otherwise <NULL/>. If the given object is not of type OUnoObject <NULL/> will be returned. * \return the object which is overlapped, otherwise <NULL/>. If the given object is not of type OUnoObject <NULL/> will be returned.
*/ */
SdrObject* isOver(SdrObject* _pObj,SdrPage& _rPage,SdrView& _rView); SdrObject* isOver(SdrObject const * _pObj,SdrPage const & _rPage,SdrView const & _rView);
/** retrieves the names of the parameters of the command which the given RowSet is bound to /** retrieves the names of the parameters of the command which the given RowSet is bound to
*/ */
...@@ -162,7 +162,7 @@ namespace rptui ...@@ -162,7 +162,7 @@ namespace rptui
* \param _pReportSection the section * \param _pReportSection the section
* \param _bInsert sal_True when the control should be inserted, otherwise not. * \param _bInsert sal_True when the control should be inserted, otherwise not.
*/ */
void correctOverlapping(SdrObject* pControl,OReportSection& _aReportSection,bool _bInsert = true); void correctOverlapping(SdrObject* pControl,OReportSection const & _aReportSection,bool _bInsert = true);
/** returns a Rectangle of a given SdrObject /** returns a Rectangle of a given SdrObject
* *
......
...@@ -187,7 +187,7 @@ namespace rptui ...@@ -187,7 +187,7 @@ namespace rptui
* *
* @param _pSectionView The view where the objects should not be unmarked. * @param _pSectionView The view where the objects should not be unmarked.
*/ */
void unmarkAllObjects(OSectionView* _pSectionView); void unmarkAllObjects(OSectionView const * _pSectionView);
/** returns the report section window for the given xsection /** returns the report section window for the given xsection
@param _xSection the section @param _xSection the section
...@@ -204,7 +204,7 @@ namespace rptui ...@@ -204,7 +204,7 @@ namespace rptui
@param _pSectionView the section where to set the marked flag @param _pSectionView the section where to set the marked flag
@param _bMark the marked flag @param _bMark the marked flag
*/ */
void setMarked(OSectionView* _pSectionView, bool _bMark); void setMarked(OSectionView const * _pSectionView, bool _bMark);
void setMarked(const css::uno::Reference< css::report::XSection>& _xSection, bool _bMark); void setMarked(const css::uno::Reference< css::report::XSection>& _xSection, bool _bMark);
void setMarked(const css::uno::Sequence< css::uno::Reference< css::report::XReportComponent> >& _xShape, bool _bMark); void setMarked(const css::uno::Sequence< css::uno::Reference< css::report::XReportComponent> >& _xShape, bool _bMark);
......
...@@ -831,7 +831,7 @@ void applyCharacterSettings( const uno::Reference< report::XReportControlFormat ...@@ -831,7 +831,7 @@ void applyCharacterSettings( const uno::Reference< report::XReportControlFormat
} }
} }
void notifySystemWindow(vcl::Window* _pWindow, vcl::Window* _pToRegister, const ::comphelper::mem_fun1_t<TaskPaneList,vcl::Window*>& rMemFunc) void notifySystemWindow(vcl::Window const * _pWindow, vcl::Window* _pToRegister, const ::comphelper::mem_fun1_t<TaskPaneList,vcl::Window*>& rMemFunc)
{ {
OSL_ENSURE(_pWindow,"Window can not be null!"); OSL_ENSURE(_pWindow,"Window can not be null!");
SystemWindow* pSystemWindow = _pWindow ? _pWindow->GetSystemWindow() : nullptr; SystemWindow* pSystemWindow = _pWindow ? _pWindow->GetSystemWindow() : nullptr;
...@@ -841,7 +841,7 @@ void notifySystemWindow(vcl::Window* _pWindow, vcl::Window* _pToRegister, const ...@@ -841,7 +841,7 @@ void notifySystemWindow(vcl::Window* _pWindow, vcl::Window* _pToRegister, const
} }
} }
SdrObject* isOver(const tools::Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, bool _bAllObjects, SdrObject* _pIgnore, sal_Int16 _nIgnoreType) SdrObject* isOver(const tools::Rectangle& _rRect, SdrPage const & _rPage, SdrView const & _rView, bool _bAllObjects, SdrObject const * _pIgnore, sal_Int16 _nIgnoreType)
{ {
SdrObject* pOverlappedObj = nullptr; SdrObject* pOverlappedObj = nullptr;
SdrObjListIter aIter(_rPage,SdrIterMode::DeepNoGroups); SdrObjListIter aIter(_rPage,SdrIterMode::DeepNoGroups);
...@@ -869,7 +869,7 @@ SdrObject* isOver(const tools::Rectangle& _rRect, SdrPage& _rPage, SdrView& _rVi ...@@ -869,7 +869,7 @@ SdrObject* isOver(const tools::Rectangle& _rRect, SdrPage& _rPage, SdrView& _rVi
return pOverlappedObj; return pOverlappedObj;
} }
bool checkArrayForOccurrence(SdrObject* _pObjToCheck, SdrUnoObj* _pIgnore[], int _nListLength) bool checkArrayForOccurrence(SdrObject const * _pObjToCheck, SdrUnoObj* _pIgnore[], int _nListLength)
{ {
for(int i=0;i<_nListLength;i++) for(int i=0;i<_nListLength;i++)
{ {
...@@ -882,7 +882,7 @@ bool checkArrayForOccurrence(SdrObject* _pObjToCheck, SdrUnoObj* _pIgnore[], int ...@@ -882,7 +882,7 @@ bool checkArrayForOccurrence(SdrObject* _pObjToCheck, SdrUnoObj* _pIgnore[], int
return false; return false;
} }
SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects, SdrUnoObj * _pIgnoreList[], int _nIgnoreListLength) SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage const & _rPage,SdrView const & _rView,bool _bAllObjects, SdrUnoObj * _pIgnoreList[], int _nIgnoreListLength)
{ {
SdrObject* pOverlappedObj = nullptr; SdrObject* pOverlappedObj = nullptr;
SdrObjListIter aIter(_rPage,SdrIterMode::DeepNoGroups); SdrObjListIter aIter(_rPage,SdrIterMode::DeepNoGroups);
...@@ -907,10 +907,10 @@ SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView ...@@ -907,10 +907,10 @@ SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView
} }
SdrObject* isOver(SdrObject* _pObj,SdrPage& _rPage,SdrView& _rView) SdrObject* isOver(SdrObject const * _pObj,SdrPage const & _rPage,SdrView const & _rView)
{ {
SdrObject* pOverlappedObj = nullptr; SdrObject* pOverlappedObj = nullptr;
if (dynamic_cast<OUnoObject*>(_pObj) != nullptr || dynamic_cast<OOle2Obj*>(_pObj) != nullptr) // this doesn't need to be done for shapes if (dynamic_cast<OUnoObject const *>(_pObj) != nullptr || dynamic_cast<OOle2Obj const *>(_pObj) != nullptr) // this doesn't need to be done for shapes
{ {
tools::Rectangle aRect = _pObj->GetCurrentBoundRect(); tools::Rectangle aRect = _pObj->GetCurrentBoundRect();
pOverlappedObj = isOver(aRect,_rPage,_rView,false/*_bUnMarkedObjects*/,_pObj); pOverlappedObj = isOver(aRect,_rPage,_rView,false/*_bUnMarkedObjects*/,_pObj);
...@@ -967,7 +967,7 @@ tools::Rectangle getRectangleFromControl(SdrObject* _pControl) ...@@ -967,7 +967,7 @@ tools::Rectangle getRectangleFromControl(SdrObject* _pControl)
} }
// check overlapping // check overlapping
void correctOverlapping(SdrObject* _pControl,OReportSection& _aReportSection,bool _bInsert) void correctOverlapping(SdrObject* _pControl,OReportSection const & _aReportSection,bool _bInsert)
{ {
OSectionView& rSectionView = _aReportSection.getSectionView(); OSectionView& rSectionView = _aReportSection.getSectionView();
uno::Reference< report::XReportComponent> xComponent(_pControl->getUnoShape(),uno::UNO_QUERY); uno::Reference< report::XReportComponent> xComponent(_pControl->getUnoShape(),uno::UNO_QUERY);
......
...@@ -2236,7 +2236,7 @@ void SAL_CALL OReportController::disposing( const lang::EventObject& Source ) ...@@ -2236,7 +2236,7 @@ void SAL_CALL OReportController::disposing( const lang::EventObject& Source )
static sal_uInt16 lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>& _xGroups static sal_uInt16 lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>& _xGroups
,sal_Int32 _nGroupPos ,sal_Int32 _nGroupPos
,::std::mem_fun_t<bool,OGroupHelper>&_pGroupMemberFunction) ,::std::mem_fun_t<bool,OGroupHelper> const & _pGroupMemberFunction)
{ {
uno::Reference< report::XGroup> xGroup; uno::Reference< report::XGroup> xGroup;
sal_uInt16 nNonVisibleGroups = 0; sal_uInt16 nNonVisibleGroups = 0;
......
...@@ -304,7 +304,7 @@ bool OReportWindow::handleKeyEvent(const KeyEvent& _rEvent) ...@@ -304,7 +304,7 @@ bool OReportWindow::handleKeyEvent(const KeyEvent& _rEvent)
return m_aViewsWindow->handleKeyEvent(_rEvent); return m_aViewsWindow->handleKeyEvent(_rEvent);
} }
void OReportWindow::setMarked(OSectionView* _pSectionView, bool _bMark) void OReportWindow::setMarked(OSectionView const * _pSectionView, bool _bMark)
{ {
if ( _pSectionView ) if ( _pSectionView )
m_aViewsWindow->setMarked(_pSectionView,_bMark); m_aViewsWindow->setMarked(_pSectionView,_bMark);
......
...@@ -284,7 +284,7 @@ bool OScrollWindowHelper::handleKeyEvent(const KeyEvent& _rEvent) ...@@ -284,7 +284,7 @@ bool OScrollWindowHelper::handleKeyEvent(const KeyEvent& _rEvent)
return m_aReportWindow->handleKeyEvent(_rEvent); return m_aReportWindow->handleKeyEvent(_rEvent);
} }
void OScrollWindowHelper::setMarked(OSectionView* _pSectionView, bool _bMark) void OScrollWindowHelper::setMarked(OSectionView const * _pSectionView, bool _bMark)
{ {
m_aReportWindow->setMarked(_pSectionView,_bMark); m_aReportWindow->setMarked(_pSectionView,_bMark);
} }
......
...@@ -54,7 +54,7 @@ namespace rptui ...@@ -54,7 +54,7 @@ namespace rptui
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::comphelper; using namespace ::comphelper;
bool lcl_getNewRectSize(const tools::Rectangle& _aObjRect,long& _nXMov, long& _nYMov,SdrObject* _pObj,SdrView* _pView, ControlModification _nControlModification, bool _bBoundRects) bool lcl_getNewRectSize(const tools::Rectangle& _aObjRect,long& _nXMov, long& _nYMov,SdrObject const * _pObj,SdrView const * _pView, ControlModification _nControlModification, bool _bBoundRects)
{ {
bool bMoveAllowed = _nXMov != 0 || _nYMov != 0; bool bMoveAllowed = _nXMov != 0 || _nYMov != 0;
if ( bMoveAllowed ) if ( bMoveAllowed )
...@@ -75,7 +75,7 @@ bool lcl_getNewRectSize(const tools::Rectangle& _aObjRect,long& _nXMov, long& _n ...@@ -75,7 +75,7 @@ bool lcl_getNewRectSize(const tools::Rectangle& _aObjRect,long& _nXMov, long& _n
aNewRect.Move(_nXMov,_nYMov); aNewRect.Move(_nXMov,_nYMov);
break; break;
} }
if (dynamic_cast<OUnoObject*>(_pObj) != nullptr || dynamic_cast<OOle2Obj*>(_pObj) != nullptr) if (dynamic_cast<OUnoObject const *>(_pObj) != nullptr || dynamic_cast<OOle2Obj const *>(_pObj) != nullptr)
{ {
pOverlappedObj = isOver(aNewRect,*_pObj->GetPage(),*_pView,true,_pObj); pOverlappedObj = isOver(aNewRect,*_pObj->GetPage(),*_pView,true,_pObj);
if ( pOverlappedObj && _pObj != pOverlappedObj ) if ( pOverlappedObj && _pObj != pOverlappedObj )
...@@ -504,7 +504,7 @@ void OViewsWindow::SelectAll(const sal_uInt16 _nObjectType) ...@@ -504,7 +504,7 @@ void OViewsWindow::SelectAll(const sal_uInt16 _nObjectType)
m_bInUnmark = false; m_bInUnmark = false;
} }
void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView) void OViewsWindow::unmarkAllObjects(OSectionView const * _pSectionView)
{ {
if ( !m_bInUnmark ) if ( !m_bInUnmark )
{ {
...@@ -598,7 +598,7 @@ OViewsWindow::TSectionsMap::iterator OViewsWindow::getIteratorAtPos(sal_uInt16 _ ...@@ -598,7 +598,7 @@ OViewsWindow::TSectionsMap::iterator OViewsWindow::getIteratorAtPos(sal_uInt16 _
return aRet; return aRet;
} }
void OViewsWindow::setMarked(OSectionView* _pSectionView, bool _bMark) void OViewsWindow::setMarked(OSectionView const * _pSectionView, bool _bMark)
{ {
OSL_ENSURE(_pSectionView != nullptr,"SectionView is NULL!"); OSL_ENSURE(_pSectionView != nullptr,"SectionView is NULL!");
if ( _pSectionView ) if ( _pSectionView )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment