summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-12-01 15:08:19 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-12-22 14:21:44 +0000
commit1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 (patch)
tree3c14b57a1aa3e413fa1feb47b1cf63bb1d53f7d8 /toolkit
parentf481f036deb1b1b46f3038074c4659f3a91b9c6c (diff)
loplugin:unocast (VCLXMultiPage)
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I7f755ce1483c5e2eca3066d12d90c5916d2f9087 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144751 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/awt/vclxwindows.hxx3
-rw-r--r--toolkit/source/awt/vclxwindows.cxx11
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx2
3 files changed, 15 insertions, 1 deletions
diff --git a/toolkit/inc/awt/vclxwindows.hxx b/toolkit/inc/awt/vclxwindows.hxx
index 78c73c06fcba..821418638492 100644
--- a/toolkit/inc/awt/vclxwindows.hxx
+++ b/toolkit/inc/awt/vclxwindows.hxx
@@ -177,6 +177,9 @@ public:
VCLXMultiPage();
virtual ~VCLXMultiPage() override;
+ sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
+ static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
+
// css::lang::XComponent
void SAL_CALL dispose( ) override;
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 036e57366a6a..d8b3c8109c8a 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2398,6 +2398,17 @@ void VCLXMultiPage::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds )
VCLXMultiPage::~VCLXMultiPage()
{
}
+
+sal_Int64 VCLXMultiPage::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
+ return comphelper::getSomethingImpl(
+ aIdentifier, this, comphelper::FallbackToGetSomethingOf<VCLXWindow>{});
+}
+
+css::uno::Sequence<sal_Int8> const & VCLXMultiPage::getUnoTunnelId() {
+ static comphelper::UnoIdInit const id;
+ return id.getSeq();
+}
+
void SAL_CALL VCLXMultiPage::dispose()
{
SolarMutexGuard aGuard;
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 92981a4f5fea..ba0054714c0c 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -792,7 +792,7 @@ void UnoMultiPageControl::bindPage( const uno::Reference< awt::XControl >& _rxCo
TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr;
if ( xTabCntrl.is() && pPage )
{
- VCLXMultiPage* pXTab = dynamic_cast< VCLXMultiPage* >( xTabCntrl.get() );
+ VCLXMultiPage* pXTab = comphelper::getFromUnoTunnel< VCLXMultiPage >( xTabCntrl );
if ( pXTab )
{
OUString sTitle;