[Libreoffice-commits] core.git: include/svx svx/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 20 19:02:34 UTC 2021
include/svx/sdr/table/tablecontroller.hxx | 4 ++--
svx/source/table/tablecontroller.cxx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 42f5b019dd508be71545c54e00b860f3a2b6c7fb
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jul 20 16:16:57 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jul 20 21:01:56 2021 +0200
no need to allocate the selectionOverlay separately in SvxTableController
Change-Id: Ifa4696991c79c9fa56aa4ccbb264c7c34110b85e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119289
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx
index e4b406b1f77a..0c4e701f1f4a 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -27,7 +27,7 @@
#include <svx/selectioncontroller.hxx>
#include <svx/svdotable.hxx>
#include <svx/svdview.hxx>
-#include <memory>
+#include <optional>
struct ImplSVEvent;
class SdrView;
@@ -182,7 +182,7 @@ private:
bool mbHasJustMerged;
CellPos maMouseDownPos;
bool mbLeftButtonDown;
- std::unique_ptr<sdr::overlay::OverlayObjectList> mpSelectionOverlay;
+ std::optional<sdr::overlay::OverlayObjectList> mpSelectionOverlay;
SdrView& mrView;
tools::WeakReference<SdrTableObj> mxTableObj;
css::uno::Reference< css::util::XModifyListener > mxModifyListener;
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 83561dcc9550..e12d5fb1d68b 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2357,7 +2357,7 @@ void SvxTableController::updateSelectionOverlay()
std::unique_ptr<sdr::overlay::OverlayObjectCell> pOverlay(new sdr::overlay::OverlayObjectCell( aHighlight, aRanges ));
xOverlayManager->add(*pOverlay);
- mpSelectionOverlay.reset(new sdr::overlay::OverlayObjectList);
+ mpSelectionOverlay.emplace();
mpSelectionOverlay->append(std::move(pOverlay));
}
}
More information about the Libreoffice-commits
mailing list