summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-05-14 19:01:44 -0400
committerJan Holesovsky <kendy@collabora.com>2018-06-01 08:59:22 +0200
commit5590b3a606abfc4bd84a8099b89661a4bac74dcc (patch)
treebc9c36c55eff9999b3e2b793b8378e5605e4f497 /svx/source
parentf297bee5e6f372b70360bc5c6f215c8f8897ae10 (diff)
svx: set the Model explicitly before using SDR objects
Change-Id: I176d1c1c7f759904ab36796a47e879e45ce4a5af
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdpdf.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index e981f7b1a68f..7f76e2a97ab3 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -774,6 +774,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);
@@ -1160,6 +1161,7 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const Size& rSize, const OUS
tools::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));
@@ -1307,6 +1309,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));
@@ -1453,6 +1456,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);
}