summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-08 14:47:23 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-09 10:51:56 +0200
commit06d8e6264487e3084b583e5158d9b89f8480b3eb (patch)
treef26bdc003f656b8d5c944b3bc361da33816adb22 /svx
parentaa02205fc46ed53a0af18517c3cd4064d514f85f (diff)
Make getSdrModelFromUnoModel work with SdrModel&
Change-Id: Iea3af7db77ef778db7bbdf2c1b6b1b956fd57fec Reviewed-on: https://gerrit.libreoffice.org/52592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmdmod.cxx5
-rw-r--r--svx/source/unodraw/unomod.cxx5
2 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx
index ac197b2ff419..509d4c4ed5dc 100644
--- a/svx/source/form/fmdmod.cxx
+++ b/svx/source/form/fmdmod.cxx
@@ -39,9 +39,8 @@ using namespace ::svxform;
}
else if ( rServiceSpecifier == "com.sun.star.drawing.ControlShape" )
{
- SdrModel* pTargetModel = getSdrModelFromUnoModel();
- OSL_ENSURE(pTargetModel, "Got no SdrModel for SdrShape construction (!)");
- SdrObject* pObj = new FmFormObj(*pTargetModel);
+ SdrModel& rTargetModel(getSdrModelFromUnoModel());
+ SdrObject* pObj = new FmFormObj(rTargetModel);
xRet = static_cast<cppu::OWeakObject*>(static_cast<SvxShape_UnoImplHelper*>(new SvxShapeControl(pObj)));
}
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index dd1d1317f7a6..83f621ab6e8e 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -246,9 +246,10 @@ uno::Sequence< OUString > SvxUnoDrawMSFactory::concatServiceNames( uno::Sequence
return aSeq;
}
-SdrModel* SvxUnoDrawingModel::getSdrModelFromUnoModel() const
+SdrModel& SvxUnoDrawingModel::getSdrModelFromUnoModel() const
{
- return mpDoc;
+ OSL_ENSURE(mpDoc, "No SdrModel in UnoDrawingModel, should not happen");
+ return *mpDoc;
}
SvxUnoDrawingModel::SvxUnoDrawingModel(SdrModel* pDoc) throw()