From 59768e605182dde4aabfd384d38b47b6317022e2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 6 Aug 2024 19:53:19 +0100 Subject: cid#555593 COPY_INSTEAD_OF_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1555849 COPY_INSTEAD_OF_MOVE cid#1555936 COPY_INSTEAD_OF_MOVE cid#1555951 COPY_INSTEAD_OF_MOVE cid#1555955 COPY_INSTEAD_OF_MOVE cid#1555960 COPY_INSTEAD_OF_MOVE cid#1555964 COPY_INSTEAD_OF_MOVE cid#1555965 COPY_INSTEAD_OF_MOVE cid#1555975 COPY_INSTEAD_OF_MOVE cid#1555979 COPY_INSTEAD_OF_MOVE cid#1555987 COPY_INSTEAD_OF_MOVE cid#1555990 COPY_INSTEAD_OF_MOVE cid#1555991 COPY_INSTEAD_OF_MOVE cid#1556002 COPY_INSTEAD_OF_MOVE cid#1556008 COPY_INSTEAD_OF_MOVE cid#1556011 COPY_INSTEAD_OF_MOVE cid#1556015 COPY_INSTEAD_OF_MOVE cid#1556017 COPY_INSTEAD_OF_MOVE cid#1556023 COPY_INSTEAD_OF_MOVE Change-Id: I8ab99d8e52a1780173a4272c59d408432c29de9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171572 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sd/inc/sdgrffilter.hxx | 2 +- sd/source/filter/grf/sdgrffilter.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sd') diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx index 28ce9de6dd29..a90934dd6dea 100644 --- a/sd/inc/sdgrffilter.hxx +++ b/sd/inc/sdgrffilter.hxx @@ -34,7 +34,7 @@ public: bool Export() override; static void HandleGraphicFilterError(ErrCode nFilterError, ErrCode nStreamError); - static void InsertSdrGrafObj(Graphic pGraphic, SdPage* pPage); + static void InsertSdrGrafObj(const Graphic& rGraphic, SdPage* pPage); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index c276c28c3ab0..7527b965ed79 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -181,11 +181,11 @@ bool SdGRFFilter::Import() return bRet; } -void SdGRFFilter::InsertSdrGrafObj(Graphic pGraphic, SdPage* pPage) +void SdGRFFilter::InsertSdrGrafObj(const Graphic& rGraphic, SdPage* pPage) { Point aPos; Size aPagSize(pPage->GetSize()); - Size aGrfSize(OutputDevice::LogicToLogic(pGraphic.GetPrefSize(), pGraphic.GetPrefMapMode(), + Size aGrfSize(OutputDevice::LogicToLogic(rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM))); aPagSize.AdjustWidth(-(pPage->GetLeftBorder() + pPage->GetRightBorder())); @@ -215,7 +215,7 @@ void SdGRFFilter::InsertSdrGrafObj(Graphic pGraphic, SdPage* pPage) aPos.setX(((aPagSize.Width() - aGrfSize.Width()) >> 1) + pPage->GetLeftBorder()); aPos.setY(((aPagSize.Height() - aGrfSize.Height()) >> 1) + pPage->GetUpperBorder()); - pPage->InsertObject(new SdrGrafObj(pPage->getSdrModelFromSdrPage(), pGraphic, + pPage->InsertObject(new SdrGrafObj(pPage->getSdrModelFromSdrPage(), rGraphic, ::tools::Rectangle(aPos, aGrfSize))); } -- cgit