diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-12 15:07:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-12 19:57:24 +0200 |
commit | f7a86c5cdf4323c99d26512bf78de7f7c380667d (patch) | |
tree | f299cbf4ca27b5db0e81a90cc6551469fa280e63 /basctl/source/basicide | |
parent | c5e5467f6a13aba68b4706a4d7feb130e824bcc6 (diff) |
simplify the vcl<->toolkit connection
No need to store two different pointers and hide the
underlying class behind an UNO interface
Change-Id: I72c55e912caa9eae1cffa6c9d1b1d480e5668d40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115496
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/basicide')
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 9 | ||||
-rw-r--r-- | basctl/source/basicide/textwindowpeer.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/textwindowpeer.hxx | 9 |
4 files changed, 9 insertions, 13 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 06045356bccb..fd17b340ca54 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -100,7 +100,7 @@ private: bool bDoSyntaxHighlight; bool bDelayHighlight; - virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface(bool bCreate = true) override; + virtual VCLXWindow* GetComponentInterface(bool bCreate = true) override; CodeCompleteDataCache aCodeCompleteCache; VclPtr<CodeCompleteWindow> pCodeCompleteWnd; OUString GetActualSubName( sal_uLong nLine ); // gets the actual subroutine name according to line number diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index ecba2d5fa873..3168f5090532 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2040,11 +2040,10 @@ void ComplexEditorWindow::SetLineNumberDisplay(bool b) Resize(); } -uno::Reference< awt::XWindowPeer > +VCLXWindow* EditorWindow::GetComponentInterface(bool bCreate) { - uno::Reference< awt::XWindowPeer > xPeer( - Window::GetComponentInterface(false)); + rtl::Reference< VCLXWindow > xPeer = Window::GetComponentInterface(false); if (!xPeer.is() && bCreate) { // Make sure edit engine and view are available: @@ -2052,9 +2051,9 @@ EditorWindow::GetComponentInterface(bool bCreate) CreateEditEngine(); xPeer = createTextWindowPeer(*GetEditView()); - SetComponentInterface(xPeer); + SetComponentInterface(xPeer.get()); } - return xPeer; + return xPeer.get(); } static sal_uInt32 getCorrectedPropCount(SbxArray* p) diff --git a/basctl/source/basicide/textwindowpeer.cxx b/basctl/source/basicide/textwindowpeer.cxx index fc458453778b..cbe9781fce90 100644 --- a/basctl/source/basicide/textwindowpeer.cxx +++ b/basctl/source/basicide/textwindowpeer.cxx @@ -62,7 +62,7 @@ TextWindowPeer::CreateAccessibleContext() { } -css::uno::Reference<css::awt::XWindowPeer> basctl::createTextWindowPeer( +rtl::Reference<VCLXWindow> basctl::createTextWindowPeer( TextView & view) { return new TextWindowPeer(view); diff --git a/basctl/source/basicide/textwindowpeer.hxx b/basctl/source/basicide/textwindowpeer.hxx index 077ad32cd79f..701c134c3a5f 100644 --- a/basctl/source/basicide/textwindowpeer.hxx +++ b/basctl/source/basicide/textwindowpeer.hxx @@ -21,17 +21,14 @@ #include <sal/config.h> -#include <com/sun/star/uno/Reference.hxx> +#include <rtl/ref.hxx> -namespace com::sun::star::awt -{ -class XWindowPeer; -} +class VCLXWindow; class TextView; namespace basctl { -css::uno::Reference<css::awt::XWindowPeer> createTextWindowPeer(TextView& view); +rtl::Reference<VCLXWindow> createTextWindowPeer(TextView& view); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |