summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/unocontrolmodel.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-11 13:30:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-12 08:46:17 +0200
commitd5ed07d2a249e61937dd42a4b2efb7e7fbef02d6 (patch)
treebdba1a2775fc89ef333c39f0e52f4af147d41d7f /toolkit/source/controls/unocontrolmodel.cxx
parentb0a2ab4c68fa11b0a713583946718a60fda19c0c (diff)
make ControlModelContainerBase::Clone return by rtl::Reference
Change-Id: Ie5d80688293dea42bea8b38fb1699e93980dd668 Reviewed-on: https://gerrit.libreoffice.org/52747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source/controls/unocontrolmodel.cxx')
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 2c53f1563921..2e7b75ddd0e1 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -436,9 +436,8 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoControlModel, UnoControlModel_Base, ::cppu:
uno::Reference< util::XCloneable > UnoControlModel::createClone()
{
- UnoControlModel* pClone = Clone();
- uno::Reference< util::XCloneable > xClone( static_cast<cppu::OWeakObject*>(pClone), uno::UNO_QUERY );
- return xClone;
+ rtl::Reference<UnoControlModel> pClone = Clone();
+ return pClone.get();
}
// css::lang::XComponent