[Libreoffice-commits] core.git: sw/source
Armin Le Grand
Armin.Le.Grand at cib.de
Wed Apr 11 10:34:58 UTC 2018
sw/source/core/frmedt/fecopy.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit d19b3863a94be0a154026a71431c00afc690416e
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Tue Apr 10 16:19:48 2018 +0200
Use SdrObject& in lcl_ConvertSdrOle2ObjsToSdrGrafObjs
Change-Id: I5ea185ca66091e40153f18637b8b6f9634f5d1da
Reviewed-on: https://gerrit.libreoffice.org/52683
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 385f8dacc8d5..dfe4d11c834a 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1263,13 +1263,13 @@ bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf )
// #i50824#
// replace method <lcl_RemoveOleObjsFromSdrModel> by <lcl_ConvertSdrOle2ObjsToSdrGrafObjs>
-static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel )
+static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel& _rModel )
{
- for ( sal_uInt16 nPgNum = 0; nPgNum < _pModel->GetPageCount(); ++nPgNum )
+ for ( sal_uInt16 nPgNum = 0; nPgNum < _rModel.GetPageCount(); ++nPgNum )
{
// setup object iterator in order to iterate through all objects
// including objects in group objects, but exclusive group objects.
- SdrObjListIter aIter(*(_pModel->GetPage( nPgNum )));
+ SdrObjListIter aIter(*(_rModel.GetPage( nPgNum )));
while( aIter.IsMore() )
{
SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( aIter.Next() );
@@ -1288,7 +1288,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel )
// create new graphic shape with the ole graphic and shape size
SdrGrafObj* pGraphicObj = new SdrGrafObj(
- *_pModel, // TTTT should be reference
+ _rModel,
aGraphic,
pOle2Obj->GetCurrentBoundRect());
// apply layer of ole2 shape at graphic shape
@@ -1488,7 +1488,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
// #i50824#
// method <lcl_RemoveOleObjsFromSdrModel> replaced by <lcl_ConvertSdrOle2ObjsToSdrGrafObjs>
- lcl_ConvertSdrOle2ObjsToSdrGrafObjs( pModel.get() );
+ lcl_ConvertSdrOle2ObjsToSdrGrafObjs( *pModel.get() );
pView->Paste(*pModel, aPos, nullptr, SdrInsertFlags::NONE);
const size_t nCnt = pView->GetMarkedObjectList().GetMarkCount();
More information about the Libreoffice-commits
mailing list