diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-04 16:07:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-05 08:26:56 +0200 |
commit | f8f606297d53eb216ff0c3c269de40058513e0a5 (patch) | |
tree | e1acc5482082d74016567a16cfc7a94763734c80 /chart2/source | |
parent | 0f3fb26e7622f99560c6514f4b3ae663636025c9 (diff) |
loplugin:constmethod in chart2
Change-Id: Ib97571b3750bd832d0d69a1530e6c8589134c633
Reviewed-on: https://gerrit.libreoffice.org/78601
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
20 files changed, 28 insertions, 28 deletions
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index c25f2467ea33..00f7bd590fd0 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -121,7 +121,7 @@ ExplicitValueProvider* Chart2ModelContact::getExplicitValueProvider() const return pProvider; } -uno::Reference< drawing::XDrawPage > Chart2ModelContact::getDrawPage() +uno::Reference< drawing::XDrawPage > Chart2ModelContact::getDrawPage() const { uno::Reference< drawing::XDrawPage > xResult; ExplicitValueProvider* pProvider( getExplicitValueProvider() ); diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx index 8dd51ad29f00..c9651cbf3d34 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx @@ -65,7 +65,7 @@ public: css::uno::Reference< css::chart2::XChartDocument > getChart2Document() const; css::uno::Reference< css::chart2::XDiagram > getChart2Diagram() const; - css::uno::Reference< css::drawing::XDrawPage > getDrawPage(); + css::uno::Reference< css::drawing::XDrawPage > getDrawPage() const; /** get the current values calculated for an axis in the current view in case properties are 'auto'. diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx index f74321d69c23..e8eed08a0438 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx @@ -68,7 +68,7 @@ public: virtual ~DataSeriesPointWrapper() override; bool isSupportingAreaProperties(); - bool isLinesForbidden() { return !m_bLinesAllowed;} + bool isLinesForbidden() const { return !m_bLinesAllowed;} /// XServiceInfo declarations virtual OUString SAL_CALL getImplementationName() override; diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 24e5f5e0ed2a..a698262eb61f 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -767,7 +767,7 @@ bool DataBrowser::ShowQueryBox() return xQueryBox->run() == RET_YES; } -bool DataBrowser::IsDataValid() +bool DataBrowser::IsDataValid() const { bool bValid = true; const sal_Int32 nCol = lcl_getColumnInData( GetCurColumnId()); diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx index 213f3ef9175a..ad359ce769cf 100644 --- a/chart2/source/controller/dialogs/DataBrowser.hxx +++ b/chart2/source/controller/dialogs/DataBrowser.hxx @@ -133,8 +133,8 @@ public: sal_uInt32 GetNumberFormatKey( sal_uInt16 nCol ) const; - bool IsEnableItem() { return m_bDataValid;} - bool IsDataValid(); + bool IsEnableItem() const { return m_bDataValid;} + bool IsDataValid() const; void ShowWarningBox(); bool ShowQueryBox(); diff --git a/chart2/source/controller/dialogs/res_Titles.cxx b/chart2/source/controller/dialogs/res_Titles.cxx index 4a46bb5c8018..e4cbe6d526e3 100644 --- a/chart2/source/controller/dialogs/res_Titles.cxx +++ b/chart2/source/controller/dialogs/res_Titles.cxx @@ -61,7 +61,7 @@ void TitleResources::connect_changed( const Link<weld::Entry&,void>& rLink ) m_xEd_SecondaryYAxis->connect_changed( rLink ); } -bool TitleResources::get_value_changed_from_saved() +bool TitleResources::get_value_changed_from_saved() const { return m_xEd_Main->get_value_changed_from_saved() || m_xEd_Sub->get_value_changed_from_saved() diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx index 2b21e171d949..6b4d7782be89 100644 --- a/chart2/source/controller/inc/ChartController.hxx +++ b/chart2/source/controller/inc/ChartController.hxx @@ -331,15 +331,15 @@ public: ViewElementListProvider getViewElementListProvider(); DrawModelWrapper* GetDrawModelWrapper(); DrawViewWrapper* GetDrawViewWrapper(); - VclPtr<ChartWindow> GetChartWindow(); + VclPtr<ChartWindow> GetChartWindow() const; weld::Window* GetChartFrame(); - bool isAdditionalShapeSelected(); + bool isAdditionalShapeSelected() const; void SetAndApplySelection(const css::uno::Reference<css::drawing::XShape>& rxShape); void StartTextEdit( const Point* pMousePixel = nullptr ); void NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> ); - css::uno::Reference<css::uno::XInterface> const & getChartView(); + css::uno::Reference<css::uno::XInterface> const & getChartView() const; private: class TheModel : public salhelper::SimpleReferenceObject diff --git a/chart2/source/controller/inc/SelectionHelper.hxx b/chart2/source/controller/inc/SelectionHelper.hxx index 19a40c9a5af2..09a701fc14a7 100644 --- a/chart2/source/controller/inc/SelectionHelper.hxx +++ b/chart2/source/controller/inc/SelectionHelper.hxx @@ -32,10 +32,10 @@ namespace chart class Selection { public: //methods - bool hasSelection(); + bool hasSelection() const; - OUString const & getSelectedCID(); - css::uno::Reference< css::drawing::XShape > const & getSelectedAdditionalShape(); + OUString const & getSelectedCID() const; + css::uno::Reference< css::drawing::XShape > const & getSelectedAdditionalShape() const; const ObjectIdentifier& getSelectedOID() const { return m_aSelectedOID;} bool isResizeableObjectSelected() const; diff --git a/chart2/source/controller/inc/res_Titles.hxx b/chart2/source/controller/inc/res_Titles.hxx index e8e7644809ee..f18c99b5b460 100644 --- a/chart2/source/controller/inc/res_Titles.hxx +++ b/chart2/source/controller/inc/res_Titles.hxx @@ -39,7 +39,7 @@ public: void readFromResources( TitleDialogData& rOutput ); void connect_changed( const Link<weld::Entry&,void>& rLink ); - bool get_value_changed_from_saved(); + bool get_value_changed_from_saved() const; void save_value(); private: diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index fb3c659077c4..9a5917915187 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1485,7 +1485,7 @@ DrawViewWrapper* ChartController::GetDrawViewWrapper() } -VclPtr<ChartWindow> ChartController::GetChartWindow() +VclPtr<ChartWindow> ChartController::GetChartWindow() const { // clients getting the naked VCL Window from UNO should always have the // solar mutex (and keep it over the lifetime of this ptr), as VCL might @@ -1505,7 +1505,7 @@ weld::Window* ChartController::GetChartFrame() return Application::GetFrameWeld(m_xViewWindow); } -bool ChartController::isAdditionalShapeSelected() +bool ChartController::isAdditionalShapeSelected() const { return m_aSelection.isAdditionalShapeSelected(); } diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index a0dbd9877b60..2d28b7d9f233 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -2036,7 +2036,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) pChartWindow->SetPointer( PointerStyle::Arrow ); } -css::uno::Reference<css::uno::XInterface> const & ChartController::getChartView() +css::uno::Reference<css::uno::XInterface> const & ChartController::getChartView() const { return m_xChartView; } diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index e950f292d238..c73bcb093a0a 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -59,17 +59,17 @@ void impl_selectObject( SdrObject* pObjectToSelect, DrawViewWrapper& rDrawViewWr }//anonymous namespace -bool Selection::hasSelection() +bool Selection::hasSelection() const { return m_aSelectedOID.isValid(); } -OUString const & Selection::getSelectedCID() +OUString const & Selection::getSelectedCID() const { return m_aSelectedOID.getObjectCID(); } -uno::Reference< drawing::XShape > const & Selection::getSelectedAdditionalShape() +uno::Reference< drawing::XShape > const & Selection::getSelectedAdditionalShape() const { return m_aSelectedOID.getAdditionalShape(); } diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx index d91856ea7f6f..9e6cfa35a430 100644 --- a/chart2/source/inc/ExplicitCategoriesProvider.hxx +++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx @@ -84,7 +84,7 @@ public: sal_Int32 getCategoryLevelCount() const; const css::uno::Sequence< css::uno::Reference< - css::chart2::data::XLabeledDataSequence> >& getSplitCategoriesList() { return m_aSplitCategoriesList;} + css::chart2::data::XLabeledDataSequence> >& getSplitCategoriesList() const { return m_aSplitCategoriesList;} bool isDateAxis(); const std::vector< double >& getDateCategories(); diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx index d91b36652883..85f88b1a1e0e 100644 --- a/chart2/source/inc/MediaDescriptorHelper.hxx +++ b/chart2/source/inc/MediaDescriptorHelper.hxx @@ -48,7 +48,7 @@ class OOO_DLLPUBLIC_CHARTTOOLS MediaDescriptorHelper final public: MediaDescriptorHelper( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor ); - const css::uno::Sequence< css::beans::PropertyValue >& getReducedForModel() { return m_aModelProperties;} + const css::uno::Sequence< css::beans::PropertyValue >& getReducedForModel() const { return m_aModelProperties;} //all properties given in the constructor are stored in the following three sequences diff --git a/chart2/source/inc/NumberFormatterWrapper.hxx b/chart2/source/inc/NumberFormatterWrapper.hxx index bf999ea6e1e2..7170d96966e9 100644 --- a/chart2/source/inc/NumberFormatterWrapper.hxx +++ b/chart2/source/inc/NumberFormatterWrapper.hxx @@ -38,7 +38,7 @@ public: SvNumberFormatter* getSvNumberFormatter() const { return m_pNumberFormatter;} const css::uno::Reference< css::util::XNumberFormatsSupplier >& - getNumberFormatsSupplier() { return m_xNumberFormatsSupplier; }; + getNumberFormatsSupplier() const { return m_xNumberFormatsSupplier; }; OUString getFormattedString( sal_Int32 nNumberFormatKey, double fValue, Color& rLabelColor, bool& rbColorChanged ) const; Date getNullDate() const; diff --git a/chart2/source/inc/PopupRequest.hxx b/chart2/source/inc/PopupRequest.hxx index 78ddc9b6b5b9..0c9af2f50bad 100644 --- a/chart2/source/inc/PopupRequest.hxx +++ b/chart2/source/inc/PopupRequest.hxx @@ -32,7 +32,7 @@ public: explicit PopupRequest(); virtual ~PopupRequest() override; - css::uno::Reference<css::awt::XCallback> const & getCallback() + css::uno::Reference<css::awt::XCallback> const & getCallback() const { return m_xCallback; } diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 75109a20f79e..3989f8d7e86a 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -1284,7 +1284,7 @@ bool ChartModel::isDataFromSpreadsheet() return !isDataFromPivotTable() && !hasInternalDataProvider(); } -bool ChartModel::isDataFromPivotTable() +bool ChartModel::isDataFromPivotTable() const { uno::Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider(m_xDataProvider, uno::UNO_QUERY); return xPivotTableDataProvider.is(); diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx index 997c23e7c571..895ac94f00a6 100644 --- a/chart2/source/view/inc/VCoordinateSystem.hxx +++ b/chart2/source/view/inc/VCoordinateSystem.hxx @@ -64,7 +64,7 @@ public: void setParticle( const OUString& rCooSysParticle ); void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix ); - const css::drawing::HomogenMatrix& getTransformationSceneToScreen() { return m_aMatrixSceneToScreen;} + const css::drawing::HomogenMatrix& getTransformationSceneToScreen() const { return m_aMatrixSceneToScreen;} //better performance for big data virtual css::uno::Sequence< sal_Int32 > getCoordinateSystemResolution( const css::awt::Size& rPageSize diff --git a/chart2/source/view/inc/VDiagram.hxx b/chart2/source/view/inc/VDiagram.hxx index da6504d19328..1472b66e8a6a 100644 --- a/chart2/source/view/inc/VDiagram.hxx +++ b/chart2/source/view/inc/VDiagram.hxx @@ -58,7 +58,7 @@ public: //methods , const css::awt::Size& rSize ); css::uno::Reference< css::drawing::XShapes > - getCoordinateRegion() { return css::uno::Reference<css::drawing::XShapes>( m_xCoordinateRegionShape, css::uno::UNO_QUERY );} + getCoordinateRegion() const { return css::uno::Reference<css::drawing::XShapes>( m_xCoordinateRegionShape, css::uno::UNO_QUERY );} /** * Get current bounding rectangle for the diagram without axes. diff --git a/chart2/source/view/main/VButton.hxx b/chart2/source/view/main/VButton.hxx index d2616bb818c2..060f09b79747 100644 --- a/chart2/source/view/main/VButton.hxx +++ b/chart2/source/view/main/VButton.hxx @@ -72,7 +72,7 @@ public: { m_aPosition = rPosition; } - css::awt::Size const & getSize() + css::awt::Size const & getSize() const { return m_aSize; } |