tdf#117629 Fix FontWork UNO API/SdrPage settings
Change-Id: Id4da3ac2ff9f8bba382512cfafbca323d1002137 Reviewed-on: https://gerrit.libreoffice.org/54722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
This commit is contained in:
@@ -216,6 +216,18 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
|
||||
pPage->GetObj(0)->CloneSdrObject(
|
||||
bUseSpecialCalcMode ? *mpDestModel : mpSdrView->getSdrModelFromSdrView()));
|
||||
|
||||
// tdf#117629
|
||||
// Since the 'old' ::CloneSdrObject also copies the SdrPage* the
|
||||
// SdrObject::getUnoShape() *will* create the wrong UNO API object
|
||||
// early. This IS one of the reasons I do change these things - this
|
||||
// error does not happen with my next change I am working on already
|
||||
// ARGH! For now, reset the SdrPage* to nullptr.
|
||||
// What sense does it have to copy the SdrPage* of the original SdrObject ?!?
|
||||
// TTTT: This also *might* be the hidden reason for the strange code at the
|
||||
// end of SdrObject::SetPage that tries to delete the SvxShape under some
|
||||
// circumstances...
|
||||
pNewObject->SetPage(nullptr);
|
||||
|
||||
tools::Rectangle aObjRect( pNewObject->GetLogicRect() );
|
||||
tools::Rectangle aVisArea = pOutDev->PixelToLogic(tools::Rectangle(Point(0,0), pOutDev->GetOutputSizePixel()));
|
||||
Point aPagePos = aVisArea.Center();
|
||||
|
Reference in New Issue
Block a user