sc/source/ui/drawfunc/fuins1.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 3e9bea4dcb6b780a3ef720858bb5dca92b065a39 Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Date: Thu Dec 14 21:14:09 2017 +0100 tdf#86739 Anchor inserted images to cell by default As Calc is all about cells, many users expect images to be also anchored to cells, not the page. This is in preparation for tdf#98931 where we also want to keep images attached to their cell when users sort the cells. Change-Id: I5ba19f2524504ec018990c60098900d99e0db1c9 Reviewed-on: https://gerrit.libreoffice.org/46488 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 36cecff0384a..3672faf98788 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -164,6 +164,9 @@ static void lcl_InsertGraphic( const Graphic& rGraphic, OUString aName = pLayer->GetNewGraphicName(); // "Graphics" pObj->SetName(aName); + // Anchor images to cell by default, tdf#86739 + ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *(rData.GetDocument()), rData.GetTabNo()); + // don't select if from (dispatch) API, to allow subsequent cell operations SdrInsertFlags nInsOptions = bApi ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE; pView->InsertObjectAtView( pObj, *pPV, nInsOptions ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits