summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-01 14:35:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-01 19:30:37 +0100
commit3c699b2a480e0795a3a7085c2bcd1a9e8d649ed2 (patch)
treef8d64e0b8a57b7ad2a51528fe56277100a9b9ff5 /svx/source
parent86303d2372b30bf02e28ea2b223f0e0aa7a161a3 (diff)
loplugin:refcounting in svx
Change-Id: I87b1d0684e6e8921b222f76a13a36706c0eb8c87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111750 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/accessibility/ShapeTypeHandler.cxx2
-rw-r--r--svx/source/accessibility/SvxShapeTypes.cxx2
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/fmexch.cxx2
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx6
-rw-r--r--svx/source/inc/filtnav.hxx2
-rw-r--r--svx/source/inc/fmexch.hxx4
-rw-r--r--svx/source/inc/fmtextcontrolshell.hxx2
8 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index 03ef0bf86bb6..368c2f698ee9 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -40,7 +40,7 @@ ShapeTypeHandler* ShapeTypeHandler::instance = nullptr;
// Create an empty reference to an accessible object.
-static AccessibleShape*
+static rtl::Reference<AccessibleShape>
CreateEmptyShapeReference (
const AccessibleShapeInfo& /*rShapeInfo*/,
const AccessibleShapeTreeInfo& /*rShapeTreeInfo*/,
diff --git a/svx/source/accessibility/SvxShapeTypes.cxx b/svx/source/accessibility/SvxShapeTypes.cxx
index 5ca2804b5d7f..b02a153a4cdb 100644
--- a/svx/source/accessibility/SvxShapeTypes.cxx
+++ b/svx/source/accessibility/SvxShapeTypes.cxx
@@ -28,7 +28,7 @@
namespace accessibility {
-static AccessibleShape* CreateSvxAccessibleShape (
+static rtl::Reference<AccessibleShape> CreateSvxAccessibleShape (
const AccessibleShapeInfo& rShapeInfo,
const AccessibleShapeTreeInfo& rShapeTreeInfo,
ShapeTypeId nId)
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 7e9e53c62d7f..cee9f5d3c71b 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -103,7 +103,7 @@ SotClipboardFormatId OFilterItemExchange::getFormatId()
return s_nFormat;
}
-OLocalExchange* OFilterExchangeHelper::createExchange() const
+rtl::Reference<OLocalExchange> OFilterExchangeHelper::createExchange() const
{
return new OFilterItemExchange;
}
diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx
index 38e5fbd947cb..002b3b6175fc 100644
--- a/svx/source/form/fmexch.cxx
+++ b/svx/source/form/fmexch.cxx
@@ -306,7 +306,7 @@ namespace svxform
}
//= OControlExchangeHelper
- OLocalExchange* OControlExchangeHelper::createExchange() const
+ rtl::Reference<OLocalExchange> OControlExchangeHelper::createExchange() const
{
return new OControlExchange;
}
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index a9ec64108a85..0818e9c7be8a 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -1226,9 +1226,9 @@ namespace svx
SfxSlotId* pSlots = _pZeroTerminatedSlots;
while ( *pSlots )
{
- FmTextControlFeature* pDispatcher = implGetFeatureDispatcher( xProvider, pApplication, *pSlots );
+ rtl::Reference<FmTextControlFeature> pDispatcher = implGetFeatureDispatcher( xProvider, pApplication, *pSlots );
if ( pDispatcher )
- _rDispatchers.emplace( *pSlots, ControlFeature( pDispatcher ) );
+ _rDispatchers.emplace( *pSlots, pDispatcher );
++pSlots;
}
@@ -1236,7 +1236,7 @@ namespace svx
}
- FmTextControlFeature* FmTextControlShell::implGetFeatureDispatcher( const Reference< XDispatchProvider >& _rxProvider, SfxApplication const * _pApplication, SfxSlotId _nSlot )
+ rtl::Reference<FmTextControlFeature> FmTextControlShell::implGetFeatureDispatcher( const Reference< XDispatchProvider >& _rxProvider, SfxApplication const * _pApplication, SfxSlotId _nSlot )
{
OSL_PRECOND( _rxProvider.is() && _pApplication, "FmTextControlShell::implGetFeatureDispatcher: invalid arg(s)!" );
URL aFeatureURL;
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 5e6e91b58f1c..04b4d1991f71 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -209,7 +209,7 @@ public:
OFilterItemExchange& operator*() const { return *static_cast<OFilterItemExchange*>(m_xTransferable.get()); }
protected:
- virtual OLocalExchange* createExchange() const override;
+ virtual rtl::Reference<OLocalExchange> createExchange() const override;
};
class FmFilterNavigator;
diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx
index d3a7fdc969f5..ad8efc7faafe 100644
--- a/svx/source/inc/fmexch.hxx
+++ b/svx/source/inc/fmexch.hxx
@@ -104,7 +104,7 @@ namespace svxform
SVX_DLLPRIVATE void setClipboardListener( const Link<OLocalExchange&,void>& _rListener ) { if ( m_xTransferable.is() ) m_xTransferable->setClipboardListener( _rListener ); }
protected:
- SVX_DLLPRIVATE virtual OLocalExchange* createExchange() const = 0;
+ SVX_DLLPRIVATE virtual rtl::Reference<OLocalExchange> createExchange() const = 0;
protected:
SVX_DLLPRIVATE void implReset();
@@ -215,7 +215,7 @@ namespace svxform
OControlExchange& operator*() const { return *static_cast< OControlExchange* >( m_xTransferable.get() ); }
protected:
- virtual OLocalExchange* createExchange() const override;
+ virtual rtl::Reference<OLocalExchange> createExchange() const override;
};
diff --git a/svx/source/inc/fmtextcontrolshell.hxx b/svx/source/inc/fmtextcontrolshell.hxx
index 42a61dea27fa..4f6714de4d76 100644
--- a/svx/source/inc/fmtextcontrolshell.hxx
+++ b/svx/source/inc/fmtextcontrolshell.hxx
@@ -151,7 +151,7 @@ namespace svx
private:
bool isControllerListening() const { return !m_aControlObservers.empty(); }
- FmTextControlFeature*
+ rtl::Reference<FmTextControlFeature>
implGetFeatureDispatcher(
const css::uno::Reference< css::frame::XDispatchProvider >& _rxProvider,
SfxApplication const * _pApplication,