diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2024-06-05 17:33:08 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2024-06-05 17:26:09 +0200 |
commit | e467cb52d68692e936eb07c2c1faa45f03dd1f82 (patch) | |
tree | b47b6dd2dd777fef2c442ff7e67e27b341f83397 /include | |
parent | 367ba88092fbc0ba06a7f77157cd012ff0fe3caf (diff) |
annot: add {add,remove}Annotation that don't notify
Add addAnnotationNoNotify method, that doesn't broadcast that an
annotation was added, and change addAnnotation to call the method
and in addition call the broadcast bits. Previously all this had
happened in the addAnnotation without the choice to not broadcast.
Change removeAnnotation in a similar way.
Change-Id: Ie15a386a8b8d4493d5b41fcbcb55924a693b46d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168429
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/svdpage.hxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index 0747c4625773..eb1f04dc10ae 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -555,11 +555,13 @@ public: void dumpAsXml(xmlTextWriterPtr pWriter) const override; - virtual rtl::Reference<sdr::annotation::Annotation> createAnnotation() { assert(false); return nullptr; } - virtual void addAnnotation(rtl::Reference<sdr::annotation::Annotation> const& /*xAnnotation*/, int /*nIndex*/) { assert(false); } - virtual void removeAnnotation(rtl::Reference<sdr::annotation::Annotation> const& /*xAnnotation*/) { assert(false); } + virtual rtl::Reference<sdr::annotation::Annotation> createAnnotation(); + virtual void addAnnotation(rtl::Reference<sdr::annotation::Annotation> const& xAnnotation, int nIndex = -1); + virtual void addAnnotationNoNotify(rtl::Reference<sdr::annotation::Annotation> const& xAnnotation, int nIndex = -1); + virtual void removeAnnotation(rtl::Reference<sdr::annotation::Annotation> const& xAnnotation); + virtual void removeAnnotationNoNotify(rtl::Reference<sdr::annotation::Annotation> const& xAnnotation); - std::vector<rtl::Reference<sdr::annotation::Annotation>> const& getAnnotations() const { return maAnnotations; } + std::vector<rtl::Reference<sdr::annotation::Annotation>> const& getAnnotations() const; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |