diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-05-14 19:01:44 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-05-22 12:17:19 +0200 |
commit | 1ae9a1396e09f9715afea0feabe66b6bfc923bed (patch) | |
tree | 57dd0ff38615a7ef93352236a0606f3a08f68d9f | |
parent | e25ed0d0690ee8d5f07c98ccbb79868415fef5fb (diff) |
svx: set the Model explicitly before using SDR objects
Change-Id: I176d1c1c7f759904ab36796a47e879e45ce4a5af
-rw-r--r-- | svx/source/svdraw/svdpdf.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index bb241986a199..8fe06e2bc18c 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -771,6 +771,7 @@ void ImpSdrPdfImport::InsertObj(SdrObject* pObj, bool bScale) if (!aNewRange.isEmpty()) { pObj = new SdrPathObj(aNewPoly.isClosed() ? OBJ_POLY : OBJ_PLIN, aNewPoly); + pObj->SetModel(mpModel); pObj->SetLayer(aOldLayer); pObj->SetMergedItemSet(aOldItemSet); @@ -1157,6 +1158,7 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const Size& rSize, const OUS Rectangle aTextRect(aPos, bSize); // SAL_WARN("sd.filter", "Text Rect: " << aTextRect); SdrRectObj* pText = new SdrRectObj(OBJ_TEXT, aTextRect); + pText->SetModel(mpModel); pText->SetMergedItem(makeSdrTextUpperDistItem(0)); pText->SetMergedItem(makeSdrTextLowerDistItem(0)); @@ -1304,6 +1306,7 @@ void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject, int nPageObjectIn SAL_WARN("sd.filter", "IMAGE Logical Rect FINAL: " << aRect); SdrGrafObj* pGraf = new SdrGrafObj(Graphic(aBitmap), aRect); + pGraf->SetModel(mpModel); // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE)); @@ -1450,6 +1453,7 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int nPageObjectInd // if(!mbLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(basegfx::B2DPolyPolygon(aSource))) SdrPathObj* pPath = new SdrPathObj(OBJ_POLY, aPolyPoly); + pPath->SetModel(mpModel); SetAttributes(pPath); InsertObj(pPath, false); } |