sc/source/ui/drawfunc/fuins1.cxx | 32 -------------------------------- sc/source/ui/view/viewfun7.cxx | 25 ------------------------- 2 files changed, 57 deletions(-)
New commits: commit 818052cb3c3080d331459a46f995481a676d4994 Author: Irgaliev Amin <[email protected]> AuthorDate: Mon Dec 22 14:57:27 2025 +0400 Commit: Mike Kaganski <[email protected]> CommitDate: Mon Feb 9 05:13:49 2026 +0100 tdf#165004 Removing image replacement in Calc Currently, inserting multiple images via drag and drop results in none of the images being displayed correctly. Also, the current implementation does not allow inserting multiple images via either drag and drop or the insert dialog. This change removes the image replacement functionality, which is triggered when a new image is dropped onto an existing one. Similar functionality has also been removed from the insert dialog. Change-Id: I03aedada082111bb7317a553319af82bdaff7856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196085 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index d11d86ebc83c..c1714e1300ff 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -126,38 +126,6 @@ static void lcl_InsertGraphic( const Graphic& rGraphic, } ScDrawView* pDrawView = rViewSh.GetScDrawView(); - // #i123922# check if an existing object is selected; if yes, evtl. replace - // the graphic for a SdrGraphObj (including link state updates) or adapt the fill - // style for other objects - if(pDrawView) - { - const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList(); - if (1 == rMarkList.GetMarkCount()) - { - SdrObject* pPickObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - - if(pPickObj) - { - //sal_Int8 nAction(DND_ACTION_MOVE); - //Point aPos; - const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); - - SdrObject* pResult = pDrawView->ApplyGraphicToObject( - *pPickObj, - rGraphic1, - aBeginUndo, - bAsLink ? rFileName : OUString()); - - if(pResult) - { - // we are done; mark the modified/new object - pDrawView->MarkObj(pResult, pDrawView->GetSdrPageView()); - return; - } - } - } - } - // set the size so the graphic has its original pixel size // at 100% view scale (as in SetMarkedOriginalSize), // instead of respecting the current view scale diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 2a58049840ac..234ebcbd03f2 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -389,31 +389,6 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, if (!pScDrawView) return false; - // #i123922# check if the drop was over an existing object; if yes, evtl. replace - // the graphic for a SdrGraphObj (including link state updates) or adapt the fill - // style for other objects - SdrPageView* pPageView = pScDrawView->GetSdrPageView(); - if (pPageView) - { - SdrObject* pPickObj = pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPageView); - if (pPickObj) - { - const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); - SdrObject* pResult = pScDrawView->ApplyGraphicToObject( - *pPickObj, - rGraphic, - aBeginUndo, - rFile); - - if (pResult) - { - // we are done; mark the modified/new object - pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView()); - return true; - } - } - } - Point aPos( rPos ); vcl::Window* pWin = GetActiveWin(); MapMode aSourceMap = rGraphic.GetPrefMapMode();
