diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-28 10:01:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-28 13:47:28 +0200 |
commit | e75a545f2869a4406bb434c356d481745f000271 (patch) | |
tree | 5f7b64b1c21096a98c18c47e4df855a58572be8a /starmath/source | |
parent | c1e31ee0433232104c73cfa56e24e056833213dc (diff) |
loplugin:constmethod in sdext..starmath
Change-Id: Ib1b60382c9ec62f35f0f232c3f2c2d5664ea669e
Reviewed-on: https://gerrit.libreoffice.org/79779
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/cursor.cxx | 4 | ||||
-rw-r--r-- | starmath/source/document.cxx | 2 | ||||
-rw-r--r-- | starmath/source/mathmlexport.hxx | 2 | ||||
-rw-r--r-- | starmath/source/mathmlimport.hxx | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index b6575b8655b3..c7a1ba31e90e 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -40,7 +40,7 @@ void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool bMov best_line, //Best approximated line found so far curr_line; //Current line long dbp_sq = 0; //Distance squared to best line - for(auto &pEntry : *mpGraph) + for(const auto &pEntry : *mpGraph) { //Reject it if it's the current position if(pEntry->CaretPos == mpPosition->CaretPos) continue; @@ -84,7 +84,7 @@ void SmCursor::MoveTo(OutputDevice* pDev, const Point& pos, bool bMoveAnchor) SmCaretPosGraphEntry* NewPos = nullptr; long dp_sq = 0, //Distance to current line squared dbp_sq = 1; //Distance to best line squared - for(auto &pEntry : *mpGraph) + for(const auto &pEntry : *mpGraph) { OSL_ENSURE(pEntry->CaretPos.IsValid(), "The caret position graph may not have invalid positions!"); //Compute current line diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index b3c7c512e3b0..62f0e0fc04fd 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -468,7 +468,7 @@ SmCursor& SmDocShell::GetCursor(){ return *mpCursor; } -bool SmDocShell::HasCursor() { return mpCursor != nullptr; } +bool SmDocShell::HasCursor() const { return mpCursor != nullptr; } SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell ) { diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx index ba7abf51d0ce..72ce800ad3af 100644 --- a/starmath/source/mathmlexport.hxx +++ b/starmath/source/mathmlexport.hxx @@ -107,7 +107,7 @@ public: virtual void GetViewSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override; virtual void GetConfigurationSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override; - bool GetSuccess() {return bSuccess;} + bool GetSuccess() const {return bSuccess;} }; diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx index c9a2f9d1f17c..2357c9f09bf9 100644 --- a/starmath/source/mathmlimport.hxx +++ b/starmath/source/mathmlimport.hxx @@ -180,8 +180,8 @@ public: SmNodeStack & GetNodeStack() { return aNodeStack; } - bool GetSuccess() { return bSuccess; } - [[nodiscard]] const OUString& GetText() { return aText; } + bool GetSuccess() const { return bSuccess; } + [[nodiscard]] const OUString& GetText() const { return aText; } void SetText(const OUString &rStr) { aText = rStr; } virtual void SetViewSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps) override; |