summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-01-04 16:43:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-01-05 11:45:51 +0000
commit19691c3b6878c1ea09f8bcd53224341c40c9847b (patch)
treeee077b70b44586786c5ee8759edba14c1a23f64c /vcl
parent00b62877fa2f900d1c2dcf7b721f7a956408f8a0 (diff)
Revert all the recent loplugin:unocast changes
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/Library_vcl.mk1
-rw-r--r--vcl/inc/canvasbitmap.hxx8
-rw-r--r--vcl/inc/unx/gtk/gtkinst.hxx7
-rw-r--r--vcl/source/helper/canvasbitmap.cxx14
-rw-r--r--vcl/source/helper/canvastools.cxx4
-rw-r--r--vcl/source/window/weldutils.cxx21
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx3
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx3
8 files changed, 6 insertions, 55 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 0c018b7bb9b4..ca32ff803ebe 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -162,7 +162,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/window/taskpanelist \
vcl/source/window/toolbox2 \
vcl/source/window/toolbox \
- vcl/source/window/weldutils \
vcl/source/window/window2 \
vcl/source/window/window3 \
vcl/source/window/window \
diff --git a/vcl/inc/canvasbitmap.hxx b/vcl/inc/canvasbitmap.hxx
index 141d15ef948a..54586a1ad60e 100644
--- a/vcl/inc/canvasbitmap.hxx
+++ b/vcl/inc/canvasbitmap.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_VCL_INC_CANVASBITMAP_HXX
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
#include <com/sun/star/rendering/XIntegerBitmapColorSpace.hpp>
#include <com/sun/star/rendering/XBitmapPalette.hpp>
@@ -33,8 +32,7 @@ namespace vcl::unotools
class VCL_DLLPUBLIC VclCanvasBitmap final :
public cppu::WeakImplHelper< css::rendering::XIntegerReadOnlyBitmap,
css::rendering::XBitmapPalette,
- css::rendering::XIntegerBitmapColorSpace,
- css::lang::XUnoTunnel >
+ css::rendering::XIntegerBitmapColorSpace >
{
private:
BitmapEx m_aBmpEx;
@@ -105,10 +103,6 @@ namespace vcl::unotools
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const css::uno::Sequence< css::rendering::ARGBColor >& rgbColor ) override;
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const css::uno::Sequence< css::rendering::ARGBColor >& rgbColor ) override;
- sal_Int64 SAL_CALL getSomething(
- css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
/** Create API wrapper for given BitmapEx
@param rBitmap
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 6446122611e5..a597e5be2436 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -33,7 +33,6 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/awt/XWindow.hpp>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/compbase.hxx>
#include <vcl/weld.hxx>
#include <vcl/weldutils.hxx>
@@ -344,12 +343,6 @@ public:
{
return m_pWeldWidget;
}
-
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const& aIdentifier) override
- {
- return comphelper::getSomethingImpl(
- aIdentifier, this, comphelper::FallbackToGetSomethingOf<TransportAsXWindow>{});
- }
};
GdkPixbuf* load_icon_by_name(const OUString& rIconName);
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index ac5a0815638a..3f8507178b4f 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/rendering/RenderingIntent.hpp>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <canvasbitmap.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/BitmapReadAccess.hxx>
@@ -949,7 +948,7 @@ sal_Int8 SAL_CALL VclCanvasBitmap::getEndianness( )
uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< ::rendering::XColorSpace >& targetColorSpace )
{
- if( comphelper::getFromUnoTunnel<VclCanvasBitmap>(targetColorSpace) )
+ if( dynamic_cast<VclCanvasBitmap*>(targetColorSpace.get()) )
{
SolarMutexGuard aGuard;
@@ -1013,7 +1012,7 @@ uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( co
uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertToIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< ::rendering::XIntegerBitmapColorSpace >& targetColorSpace )
{
- if( comphelper::getFromUnoTunnel<VclCanvasBitmap>(targetColorSpace) )
+ if( dynamic_cast<VclCanvasBitmap*>(targetColorSpace.get()) )
{
// it's us, so simply pass-through the data
return deviceColor;
@@ -1345,14 +1344,5 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c
return aRes;
}
-sal_Int64 VclCanvasBitmap::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(aIdentifier, this);
-}
-
-css::uno::Sequence<sal_Int8> const & VclCanvasBitmap::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index 11b1588ecf04..595f12a959c8 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -38,7 +38,6 @@
#include <sal/log.hxx>
#include <tools/helpers.hxx>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <vcl/bitmapex.hxx>
@@ -175,8 +174,7 @@ namespace vcl::unotools
return ::BitmapEx();
// tunnel directly for known implementation
- VclCanvasBitmap* pImplBitmap
- = comphelper::getFromUnoTunnel<VclCanvasBitmap>(xInputBitmap);
+ VclCanvasBitmap* pImplBitmap = dynamic_cast<VclCanvasBitmap*>(xInputBitmap.get());
if( pImplBitmap )
return pImplBitmap->getBitmapEx();
diff --git a/vcl/source/window/weldutils.cxx b/vcl/source/window/weldutils.cxx
deleted file mode 100644
index 9a36f23b92d5..000000000000
--- a/vcl/source/window/weldutils.cxx
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <sal/config.h>
-
-#include <comphelper/servicehelper.hxx>
-#include <vcl/weldutils.hxx>
-
-css::uno::Sequence<sal_Int8> const& weld::TransportAsXWindow::getUnoTunnelId()
-{
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index 762f1338fe62..4068d57f2fa1 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -34,7 +34,6 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#include <comphelper/servicehelper.hxx>
#include <osl/diagnose.h>
#include <rtl/process.h>
#include <sal/log.hxx>
@@ -1632,7 +1631,7 @@ GtkWidget* SalGtkPicker::GetParentWidget(const uno::Sequence<uno::Any>& rArgumen
if (xParentWindow.is())
{
- if (SalGtkXWindow* pGtkXWindow = comphelper::getFromUnoTunnel<SalGtkXWindow>(xParentWindow))
+ if (SalGtkXWindow* pGtkXWindow = dynamic_cast<SalGtkXWindow*>(xParentWindow.get()))
pParentWidget = pGtkXWindow->getGtkWidget();
else
{
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 960aabe11a0b..0525f8118531 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -65,7 +65,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
#include <comphelper/string.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/implbase.hxx>
@@ -24484,7 +24483,7 @@ weld::MessageDialog* GtkInstance::CreateMessageDialog(weld::Widget* pParent, Vcl
weld::Window* GtkInstance::GetFrameWeld(const css::uno::Reference<css::awt::XWindow>& rWindow)
{
- if (SalGtkXWindow* pGtkXWindow = comphelper::getFromUnoTunnel<SalGtkXWindow>(rWindow))
+ if (SalGtkXWindow* pGtkXWindow = dynamic_cast<SalGtkXWindow*>(rWindow.get()))
return pGtkXWindow->getFrameWeld();
return SalInstance::GetFrameWeld(rWindow);
}