From beb8cfcf32f855a0fb638caef4782d9d867e3102 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 21 Nov 2016 11:45:50 +0200 Subject: convert inventorId to scoped enum SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the ScOrSwDraw enum constant Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724 Reviewed-on: https://gerrit.libreoffice.org/31037 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/filter/ww8/ww8graf.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'sw/source/filter/ww8/ww8graf.cxx') diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 35059e45b998..09e6dfd3f893 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2626,20 +2626,16 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) for (sal_uInt16 i = 0; i < nCount; i++ ) { SdrObjUserData* pData = pObject->GetUserData( i ); - if( pData && pData->GetInventor() == SW_DRAWLAYER + if( pData && pData->GetInventor() == SdrInventor::ScOrSwDraw && pData->GetId() == SW_UD_IMAPDATA) { SwMacroInfo* macInf = dynamic_cast(pData); - if( macInf )// && macInf->GetShapeId() == pF->nSpId) + if( macInf && macInf->GetShapeId() == pF->nSpId ) { - sal_Int32 nShapeId = macInf->GetShapeId(); - if ( nShapeId == pF->nSpId ) - { - lnName = macInf->GetHlink(); - aObjName = macInf->GetName(); - aTarFrame = macInf->GetTarFrame(); - break; - } + lnName = macInf->GetHlink(); + aObjName = macInf->GetName(); + aTarFrame = macInf->GetTarFrame(); + break; } } } -- cgit