summaryrefslogtreecommitdiff
path: root/sdext/source
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source')
-rw-r--r--sdext/source/pdfimport/sax/emitcontext.cxx3
-rw-r--r--sdext/source/presenter/PresenterAccessibility.cxx3
-rw-r--r--sdext/source/presenter/PresenterNotesView.cxx11
-rw-r--r--sdext/source/presenter/PresenterNotesView.hxx7
-rw-r--r--sdext/source/presenter/PresenterProtocolHandler.cxx3
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.cxx4
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.hxx8
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx5
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.hxx8
-rw-r--r--sdext/source/presenter/PresenterToolBar.cxx5
-rw-r--r--sdext/source/presenter/PresenterToolBar.hxx8
-rw-r--r--sdext/source/presenter/PresenterViewFactory.cxx16
-rw-r--r--sdext/source/presenter/PresenterViewFactory.hxx5
13 files changed, 11 insertions, 75 deletions
diff --git a/sdext/source/pdfimport/sax/emitcontext.cxx b/sdext/source/pdfimport/sax/emitcontext.cxx
index 59f110191bfd..a923488d688d 100644
--- a/sdext/source/pdfimport/sax/emitcontext.cxx
+++ b/sdext/source/pdfimport/sax/emitcontext.cxx
@@ -25,7 +25,6 @@
#include <rtl/strbuf.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/xml/sax/SAXException.hpp>
-#include <comphelper/servicehelper.hxx>
#include <xmloff/xmlimp.hxx>
#if OSL_DEBUG_LEVEL > 0
@@ -43,7 +42,7 @@ SaxEmitter::SaxEmitter( const uno::Reference< xml::sax::XDocumentHandler >& xDoc
m_xDocHdl( xDocHdl )
{
OSL_PRECOND(m_xDocHdl.is(), "SaxEmitter(): invalid doc handler");
- if (SvXMLImport *pFastHandler = comphelper::getFromUnoTunnel<SvXMLImport>(m_xDocHdl))
+ if (SvXMLImport *pFastHandler = dynamic_cast<SvXMLImport*>(m_xDocHdl.get()))
m_xDocHdl.set( new SvXMLLegacyToFastDocHandler( pFastHandler ) );
try
{
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 7040da4a3c51..4f2fa33f3866 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -38,7 +38,6 @@
#include <com/sun/star/drawing/framework/XPane.hpp>
#include <com/sun/star/drawing/framework/XView.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/implbase.hxx>
#include <o3tl/safeint.hxx>
@@ -514,7 +513,7 @@ void PresenterAccessible::UpdateAccessibilityHierarchy()
if (pNotesPane)
xNotesView = pNotesPane->mxView;
rtl::Reference<PresenterNotesView> pNotesView (
- comphelper::getFromUnoTunnel<PresenterNotesView>(xNotesView));
+ dynamic_cast<PresenterNotesView*>(xNotesView.get()));
UpdateAccessibilityHierarchy(
pPreviewPane ? pPreviewPane->mxContentWindow : Reference<awt::XWindow>(),
diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx
index 7bfc1bfa2c06..457be1f612b7 100644
--- a/sdext/source/presenter/PresenterNotesView.cxx
+++ b/sdext/source/presenter/PresenterNotesView.cxx
@@ -37,7 +37,6 @@
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
#include <com/sun/star/text/XTextRange.hpp>
-#include <comphelper/servicehelper.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -377,16 +376,6 @@ void SAL_CALL PresenterNotesView::keyPressed (const awt::KeyEvent& rEvent)
void SAL_CALL PresenterNotesView::keyReleased (const awt::KeyEvent&) {}
-sal_Int64 PresenterNotesView::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(
- aIdentifier, this, comphelper::FallbackToGetSomethingOf<CachablePresenterView>{});
-}
-
-css::uno::Sequence<sal_Int8> const & PresenterNotesView::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
void PresenterNotesView::Layout()
{
diff --git a/sdext/source/presenter/PresenterNotesView.hxx b/sdext/source/presenter/PresenterNotesView.hxx
index 05368a7151c6..1af3f241f004 100644
--- a/sdext/source/presenter/PresenterNotesView.hxx
+++ b/sdext/source/presenter/PresenterNotesView.hxx
@@ -31,7 +31,6 @@
#include <com/sun/star/drawing/framework/XView.hpp>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <rtl/ref.hxx>
#include <memory>
@@ -46,8 +45,7 @@ typedef cppu::WeakComponentImplHelper<
css::awt::XPaintListener,
css::drawing::framework::XView,
css::drawing::XDrawView,
- css::awt::XKeyListener,
- css::lang::XUnoTunnel
+ css::awt::XKeyListener
> PresenterNotesViewInterfaceBase;
/** A drawing framework view of the notes of a slide. At the moment this is
@@ -119,9 +117,6 @@ public:
virtual void SAL_CALL keyPressed (const css::awt::KeyEvent& rEvent) override;
virtual void SAL_CALL keyReleased (const css::awt::KeyEvent& rEvent) override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
private:
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
::rtl::Reference<PresenterController> mpPresenterController;
diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx
index bda104ce37d8..a32a73b6180e 100644
--- a/sdext/source/presenter/PresenterProtocolHandler.cxx
+++ b/sdext/source/presenter/PresenterProtocolHandler.cxx
@@ -24,7 +24,6 @@
#include "PresenterPaneContainer.hxx"
#include "PresenterViewFactory.hxx"
#include "PresenterWindowManager.hxx"
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <algorithm>
@@ -793,7 +792,7 @@ NotesFontSizeCommand::NotesFontSizeCommand(
if (!pDescriptor)
return nullptr;
- return comphelper::getFromUnoTunnel<PresenterNotesView>(pDescriptor->mxView);
+ return dynamic_cast<PresenterNotesView*>(pDescriptor->mxView.get());
}
void NotesFontSizeCommand::Execute()
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx
index be4cc6a65d20..132eaf35f85e 100644
--- a/sdext/source/presenter/PresenterSlideShowView.cxx
+++ b/sdext/source/presenter/PresenterSlideShowView.cxx
@@ -279,10 +279,6 @@ css::uno::Reference<css::drawing::XDrawPage> SAL_CALL PresenterSlideShowView::ge
return mxCurrentSlide;
}
-sal_Int64 PresenterSlideShowView::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return CachablePresenterView::getSomething(aIdentifier);
-}
-
//----- CachablePresenterView -------------------------------------------------
void PresenterSlideShowView::ReleaseView()
diff --git a/sdext/source/presenter/PresenterSlideShowView.hxx b/sdext/source/presenter/PresenterSlideShowView.hxx
index 7f93e4b0e6e2..e4466522eddf 100644
--- a/sdext/source/presenter/PresenterSlideShowView.hxx
+++ b/sdext/source/presenter/PresenterSlideShowView.hxx
@@ -32,7 +32,6 @@
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <com/sun/star/drawing/framework/XView.hpp>
#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/presentation/XSlideShowController.hpp>
#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -48,8 +47,7 @@ typedef cppu::WeakComponentImplHelper<
css::awt::XMouseMotionListener,
css::awt::XWindowListener,
css::drawing::framework::XView,
- css::drawing::XDrawView,
- css::lang::XUnoTunnel
+ css::drawing::XDrawView
> PresenterSlideShowViewInterfaceBase;
/** Life view in a secondary window of a full screen slide show.
@@ -168,10 +166,6 @@ public:
virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage() override;
- // XUnoTunnel
-
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
// CachablePresenterView
virtual void ActivatePresenterView() override;
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx
index 1b3fb0a1d753..ef33a4dde634 100644
--- a/sdext/source/presenter/PresenterSlideSorter.cxx
+++ b/sdext/source/presenter/PresenterSlideSorter.cxx
@@ -612,11 +612,6 @@ Reference<drawing::XDrawPage> SAL_CALL PresenterSlideSorter::getCurrentPage()
}
-sal_Int64 PresenterSlideSorter::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return CachablePresenterView::getSomething(aIdentifier);
-}
-
-
void PresenterSlideSorter::UpdateLayout()
{
if ( ! mxWindow.is())
diff --git a/sdext/source/presenter/PresenterSlideSorter.hxx b/sdext/source/presenter/PresenterSlideSorter.hxx
index 7f1f3ac845d8..807bc439929e 100644
--- a/sdext/source/presenter/PresenterSlideSorter.hxx
+++ b/sdext/source/presenter/PresenterSlideSorter.hxx
@@ -35,7 +35,6 @@
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/geometry/RealRectangle2D.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
namespace sdext::presenter {
@@ -51,8 +50,7 @@ typedef cppu::WeakComponentImplHelper<
css::drawing::XSlidePreviewCacheListener,
css::awt::XMouseListener,
css::awt::XMouseMotionListener,
- css::drawing::XDrawView,
- css::lang::XUnoTunnel
+ css::drawing::XDrawView
> PresenterSlideSorterInterfaceBase;
/** A simple slide sorter for the presenter screen. It uses a preview cache
@@ -131,10 +129,6 @@ public:
virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage() override;
- // XUnoTunnel
-
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
private:
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx
index b095975680e4..867459423d8e 100644
--- a/sdext/source/presenter/PresenterToolBar.cxx
+++ b/sdext/source/presenter/PresenterToolBar.cxx
@@ -575,11 +575,6 @@ Reference<drawing::XDrawPage> SAL_CALL PresenterToolBar::getCurrentPage()
}
-sal_Int64 PresenterToolBar::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return CachablePresenterView::getSomething(aIdentifier);
-}
-
-
void PresenterToolBar::CreateControls (
const OUString& rsConfigurationPath)
{
diff --git a/sdext/source/presenter/PresenterToolBar.hxx b/sdext/source/presenter/PresenterToolBar.hxx
index 50937ea8d3bd..1b789955689c 100644
--- a/sdext/source/presenter/PresenterToolBar.hxx
+++ b/sdext/source/presenter/PresenterToolBar.hxx
@@ -34,7 +34,6 @@
#include <com/sun/star/drawing/framework/XView.hpp>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <functional>
@@ -45,8 +44,7 @@ typedef cppu::WeakComponentImplHelper<
css::awt::XPaintListener,
css::awt::XMouseListener,
css::awt::XMouseMotionListener,
- css::drawing::XDrawView,
- css::lang::XUnoTunnel
+ css::drawing::XDrawView
> PresenterToolBarInterfaceBase;
typedef cppu::WeakComponentImplHelper<
@@ -136,10 +134,6 @@ public:
virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage() override;
- // XUnoTunnel
-
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
class Context;
private:
diff --git a/sdext/source/presenter/PresenterViewFactory.cxx b/sdext/source/presenter/PresenterViewFactory.cxx
index 2768edf763ab..06eff32f7d3f 100644
--- a/sdext/source/presenter/PresenterViewFactory.cxx
+++ b/sdext/source/presenter/PresenterViewFactory.cxx
@@ -26,7 +26,6 @@
#include "PresenterSlideSorter.hxx"
#include "PresenterToolBar.hxx"
#include <com/sun/star/drawing/framework/XControllerManager.hpp>
-#include <comphelper/servicehelper.hxx>
#include <utility>
using namespace ::com::sun::star;
@@ -216,7 +215,7 @@ void SAL_CALL PresenterViewFactory::releaseResource (const Reference<XResource>&
pDescriptor->SetActivationState(false);
// Dispose only views that we can not put into the cache.
- CachablePresenterView* pView = comphelper::getFromUnoTunnel<CachablePresenterView>(rxView);
+ CachablePresenterView* pView = dynamic_cast<CachablePresenterView*>(rxView.get());
if (pView == nullptr || mpResourceCache == nullptr)
{
try
@@ -272,7 +271,7 @@ Reference<XResource> PresenterViewFactory::GetViewFromCache(
if (iView->second.second == rxAnchorPane)
{
CachablePresenterView* pView
- = comphelper::getFromUnoTunnel<CachablePresenterView>(iView->second.first);
+ = dynamic_cast<CachablePresenterView*>(iView->second.first.get());
if (pView != nullptr)
pView->ActivatePresenterView();
return iView->second.first;
@@ -323,7 +322,7 @@ Reference<XResource> PresenterViewFactory::CreateView(
}
// Activate it.
- CachablePresenterView* pView = comphelper::getFromUnoTunnel<CachablePresenterView>(xView);
+ CachablePresenterView* pView = dynamic_cast<CachablePresenterView*>(xView.get());
if (pView != nullptr)
pView->ActivatePresenterView();
}
@@ -481,15 +480,6 @@ void PresenterViewFactory::ThrowIfDisposed() const
//===== CachablePresenterView =================================================
-sal_Int64 CachablePresenterView::getSomething(css::uno::Sequence<sal_Int8> const & id) {
- return comphelper::getSomethingImpl(id, this);
-}
-
-css::uno::Sequence<sal_Int8> const & CachablePresenterView::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
CachablePresenterView::CachablePresenterView()
: mbIsPresenterViewActive(true)
{
diff --git a/sdext/source/presenter/PresenterViewFactory.hxx b/sdext/source/presenter/PresenterViewFactory.hxx
index 32429c790cff..7f3468d4e57a 100644
--- a/sdext/source/presenter/PresenterViewFactory.hxx
+++ b/sdext/source/presenter/PresenterViewFactory.hxx
@@ -39,7 +39,7 @@ typedef ::cppu::WeakComponentImplHelper <
/** Base class for presenter views that allows the view factory to store
them in a cache and reuse deactivated views.
*/
-class CachablePresenterView
+class SAL_LOPLUGIN_ANNOTATE("crosscast") CachablePresenterView
{
public:
virtual void ActivatePresenterView();
@@ -55,9 +55,6 @@ public:
*/
virtual void ReleaseView();
- sal_Int64 getSomething(css::uno::Sequence<sal_Int8> const & id);
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
protected:
bool mbIsPresenterViewActive;