summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-05-14 11:44:04 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2019-05-15 11:51:41 +0200
commitfb978737245bcde30ad4861c40c476b6da53eea3 (patch)
tree88b4bef9d91e05f2cf7b1070765a237cf5853f29 /starmath
parentefca409b9917f290102bc0134f09fd037f705d2f (diff)
SM constify SmElement
Change-Id: I6334a6c87cb548c434f0dae05e7cb2cc6e6fd66a Reviewed-on: https://gerrit.libreoffice.org/72316 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/ElementsDockingWindow.hxx26
-rw-r--r--starmath/source/ElementsDockingWindow.cxx5
2 files changed, 8 insertions, 23 deletions
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 1e938f3e30e0..133c480d7100 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -34,6 +34,7 @@ class SmElement
std::unique_ptr<SmNode> mpNode;
OUString const maText;
OUString const maHelpText;
+
public:
Point mBoxLocation;
Size mBoxSize;
@@ -41,21 +42,11 @@ public:
SmElement(std::unique_ptr<SmNode>&& pNode, const OUString& aText, const OUString& aHelpText);
virtual ~SmElement();
- const std::unique_ptr<SmNode>& getNode();
- const OUString& getText()
- {
- return maText;
- }
-
- const OUString& getHelpText()
- {
- return maHelpText;
- }
-
- virtual bool isSeparator()
- {
- return false;
- }
+ const std::unique_ptr<SmNode>& getNode() const;
+ const OUString& getText() const { return maText; }
+ const OUString& getHelpText() const { return maHelpText; }
+
+ virtual bool isSeparator() const { return false; }
};
class SmElementSeparator : public SmElement
@@ -63,10 +54,7 @@ class SmElementSeparator : public SmElement
public:
SmElementSeparator();
- virtual bool isSeparator() override
- {
- return true;
- }
+ bool isSeparator() const override { return true; }
};
class SmElementsControl : public Control
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index f093723daf2a..95df76c4ec63 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -48,10 +48,7 @@ SmElement::SmElement(std::unique_ptr<SmNode>&& pNode, const OUString& aText, con
SmElement::~SmElement()
{}
-const std::unique_ptr<SmNode>& SmElement::getNode()
-{
- return mpNode;
-}
+const std::unique_ptr<SmNode>& SmElement::getNode() const { return mpNode; }
SmElementSeparator::SmElementSeparator() :
SmElement(std::unique_ptr<SmNode>(), OUString(), OUString())