summaryrefslogtreecommitdiff
path: root/sd/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-12-21 16:09:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-12-22 07:44:42 +0000
commit99009c9535dfa3e0d838989ccc7d84bfa2320ff4 (patch)
treeb962a22ca2a274c4a664f6e49500cec9e472407d /sd/inc
parent0c7585c5fa78887e5459885ed744e8044fd76137 (diff)
loplugin:unocast (sd::Annotation)
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: Id600e83ae94409914b20a2a2620031ce340a9390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/inc')
-rw-r--r--sd/inc/Annotation.hxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx
index 707f2cdc8e78..b23cd2503bb3 100644
--- a/sd/inc/Annotation.hxx
+++ b/sd/inc/Annotation.hxx
@@ -23,6 +23,7 @@
#include <sal/types.h>
#include <memory>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/office/XAnnotation.hpp>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
@@ -74,7 +75,8 @@ struct SD_DLLPUBLIC CustomAnnotationMarker
};
class Annotation final : private ::cppu::BaseMutex,
- public ::cppu::WeakComponentImplHelper<css::office::XAnnotation>,
+ public ::cppu::WeakComponentImplHelper<
+ css::office::XAnnotation, css::lang::XUnoTunnel>,
public ::cppu::PropertySetMixin<css::office::XAnnotation>
{
public:
@@ -90,8 +92,8 @@ public:
// XInterface:
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) override;
- virtual void SAL_CALL acquire() noexcept override { ::cppu::WeakComponentImplHelper<css::office::XAnnotation>::acquire(); }
- virtual void SAL_CALL release() noexcept override { ::cppu::WeakComponentImplHelper<css::office::XAnnotation>::release(); }
+ virtual void SAL_CALL acquire() noexcept override { WeakComponentImplHelper::acquire(); }
+ virtual void SAL_CALL release() noexcept override { WeakComponentImplHelper::release(); }
// css::beans::XPropertySet:
virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override;
@@ -116,6 +118,9 @@ public:
virtual void SAL_CALL setDateTime(const css::util::DateTime & the_value) override;
virtual css::uno::Reference<css::text::XText> SAL_CALL getTextRange() override;
+ sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
+ static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
+
void createChangeUndo();
void createCustomAnnotationMarker()