summaryrefslogtreecommitdiff
path: root/sc/inc/postit.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-12-31 18:05:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-31 20:33:26 +0100
commit0a045a00e48978c72ba5053d8e663c193afdfc85 (patch)
tree91166fcadd67d26bb7596559034803f09557084a /sc/inc/postit.hxx
parent0b6aad2da3ef9c4c37fe141eb068e40d1ed4dfc0 (diff)
improve const-correctness in ScCaptionPtr
mostly to make my passstuffbyref loplugin happier Change-Id: I148b6b418100de860dfc49aaec6c544d0fe14c72 Reviewed-on: https://gerrit.libreoffice.org/47225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/postit.hxx')
-rw-r--r--sc/inc/postit.hxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index c13169f1b960..345d1e03b22d 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -52,9 +52,12 @@ public:
ScCaptionPtr& operator=( const ScCaptionPtr& r );
ScCaptionPtr& operator=( ScCaptionPtr&& r );
explicit operator bool() const { return mpCaption != nullptr; }
- SdrCaptionObj* get() const { return mpCaption; }
- SdrCaptionObj* operator->() const { return mpCaption; }
- SdrCaptionObj& operator*() const { return *mpCaption; }
+ const SdrCaptionObj* get() const { return mpCaption; }
+ SdrCaptionObj* get() { return mpCaption; }
+ const SdrCaptionObj* operator->() const { return mpCaption; }
+ SdrCaptionObj* operator->() { return mpCaption; }
+ const SdrCaptionObj& operator*() const { return *mpCaption; }
+ SdrCaptionObj& operator*() { return *mpCaption; }
// Does not default to nullptr to make it visually obvious where such is used.
void reset( SdrCaptionObj* p );