summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-09-15 19:07:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-09-16 08:12:33 +0200
commit4fb7f81c7e543f5b9b38aa1bc118e1f07046ce4c (patch)
tree6a02912d6885144a59a006c87a91138588a7bcb5 /sd/source/ui
parentf2f6a5df1e8bcedc2dc675573ada5eb426867dbb (diff)
use more concrete UNO types in sd
Change-Id: Ia8d04372662af5fb6234be87403daa48a6d41390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173414 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/inc/framework/FrameworkHelper.hxx3
-rw-r--r--sd/source/ui/inc/unopage.hxx5
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx5
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.hxx3
-rw-r--r--sd/source/ui/unoidl/unopage.cxx9
5 files changed, 12 insertions, 13 deletions
diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx
index f25e5886ff9f..1dc36f552ef1 100644
--- a/sd/source/ui/inc/framework/FrameworkHelper.hxx
+++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx
@@ -304,8 +304,7 @@ private:
class DisposeListener;
friend class DisposeListener;
- css::uno::Reference<css::lang::XComponent>
- mxDisposeListener;
+ rtl::Reference<DisposeListener> mxDisposeListener;
FrameworkHelper (ViewShellBase& rBase);
FrameworkHelper (const FrameworkHelper& rHelper) = delete;
diff --git a/sd/source/ui/inc/unopage.hxx b/sd/source/ui/inc/unopage.hxx
index 14b4975b2cb2..534aa8c1c6a4 100644
--- a/sd/source/ui/inc/unopage.hxx
+++ b/sd/source/ui/inc/unopage.hxx
@@ -109,6 +109,8 @@ public:
virtual css::uno::Reference<css::drawing::XShape> CreateShape(SdrObject *pObj) const override;
// XInterface
+ virtual void SAL_CALL acquire() noexcept override { SvxDrawPage::acquire(); }
+ virtual void SAL_CALL release() noexcept override { SvxDrawPage::release(); }
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
// XShapeCombiner
@@ -272,8 +274,7 @@ class SdPageLinkTargets final : public ::cppu::WeakImplHelper< css::container::X
css::lang::XServiceInfo >
{
private:
- css::uno::Reference< css::drawing::XDrawPage > mxPage;
- SdGenericDrawPage* mpUnoPage;
+ rtl::Reference< SdGenericDrawPage > mxPage;
public:
SdPageLinkTargets( SdGenericDrawPage* pUnoPage ) noexcept;
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index c5d2684102e7..c0a3447a47e7 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -218,9 +218,8 @@ void LayoutMenu::Dispose()
mbIsDisposed = true;
- Reference<lang::XComponent> xComponent (mxListener, UNO_QUERY);
- if (xComponent.is())
- xComponent->dispose();
+ if (mxListener.is())
+ mxListener->dispose();
Clear();
Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,LayoutMenu,EventMultiplexerListener));
diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx
index 0b1f7b451211..26dd966a485e 100644
--- a/sd/source/ui/sidebar/LayoutMenu.hxx
+++ b/sd/source/ui/sidebar/LayoutMenu.hxx
@@ -44,6 +44,7 @@ class ViewShellBase;
namespace sd::tools
{
class EventMultiplexerEvent;
+class SlotStateListener;
}
namespace sd::sidebar
@@ -99,7 +100,7 @@ private:
/** If we are asked for the preferred window size, then use this
many columns for the calculation.
*/
- css::uno::Reference<css::frame::XStatusListener> mxListener;
+ rtl::Reference<::sd::tools::SlotStateListener> mxListener;
bool mbIsMainViewChangePending;
css::uno::Reference<css::ui::XSidebar> mxSidebar;
bool mbIsDisposed;
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index d5a3056b5499..d4878a84e4df 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1914,7 +1914,6 @@ Reference< XAnimationNode > SAL_CALL SdGenericDrawPage::getAnimationNode()
SdPageLinkTargets::SdPageLinkTargets( SdGenericDrawPage* pUnoPage ) noexcept
{
mxPage = pUnoPage;
- mpUnoPage = pUnoPage;
}
SdPageLinkTargets::~SdPageLinkTargets() noexcept
@@ -1931,7 +1930,7 @@ sal_Bool SAL_CALL SdPageLinkTargets::hasElements()
{
::SolarMutexGuard aGuard;
- SdPage* pPage = mpUnoPage->GetPage();
+ SdPage* pPage = mxPage->GetPage();
if( pPage != nullptr )
{
SdrObjListIter aIter( pPage, SdrIterMode::DeepWithGroups );
@@ -1958,7 +1957,7 @@ Any SAL_CALL SdPageLinkTargets::getByName( const OUString& aName )
{
::SolarMutexGuard aGuard;
- SdPage* pPage = mpUnoPage->GetPage();
+ SdPage* pPage = mxPage->GetPage();
if( pPage != nullptr )
{
SdrObject* pObj = FindObject( aName );
@@ -1978,7 +1977,7 @@ Sequence< OUString > SAL_CALL SdPageLinkTargets::getElementNames()
sal_uInt32 nObjCount = 0;
- SdPage* pPage = mpUnoPage->GetPage();
+ SdPage* pPage = mxPage->GetPage();
if( pPage != nullptr )
{
SdrObjListIter aIter( pPage, SdrIterMode::DeepWithGroups );
@@ -2024,7 +2023,7 @@ sal_Bool SAL_CALL SdPageLinkTargets::hasByName( const OUString& aName )
SdrObject* SdPageLinkTargets::FindObject( std::u16string_view rName ) const noexcept
{
- SdPage* pPage = mpUnoPage->GetPage();
+ SdPage* pPage = mxPage->GetPage();
if( pPage == nullptr )
return nullptr;