summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/tabview.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-06 19:25:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-07 07:51:25 +0200
commite040894fbe0765883e13d51fd6d6331adb09832c (patch)
treed3cc19ec7add92ed751d7051b6cc52e15d91899a /sc/source/ui/inc/tabview.hxx
parentd5c6087979a6a01c16eff6dab15b4b94770a2c14 (diff)
tdf#118554 sc crash clicking outside of comments
regression from commit c7f762973d21118ce3f5b0baab8850dc89bc4765 loplugin:useuniqueptr in ScTabView Change-Id: If7fd580f1a2fedbc6b707f59f196cbceffc95fe3 Reviewed-on: https://gerrit.libreoffice.org/57090 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/inc/tabview.hxx')
-rw-r--r--sc/source/ui/inc/tabview.hxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 52f838705a13..cc8dd64568c9 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -148,7 +148,10 @@ private:
Size aFrameSize; // passed on as for DoResize
Point aBorderPos;
- std::unique_ptr<FuPoor> pDrawActual;
+ // The ownership of these two is rather weird. we seem to need
+ // to keep an old copy alive for some period of time to avoid crashing.
+ FuPoor* pDrawActual;
+ FuPoor* pDrawOld;
std::array<VclPtr<ScGridWindow>, 4> pGridWin;
std::array<VclPtr<ScColBar>, 2> pColBar;
@@ -325,8 +328,10 @@ public:
bool IsDrawSelMode() const { return bDrawSelMode; }
void SetDrawSelMode(bool bNew) { bDrawSelMode = bNew; }
- void SetDrawFuncPtr(std::unique_ptr<FuPoor> pFuncPtr);
- FuPoor* GetDrawFuncPtr() { return pDrawActual.get(); }
+ void SetDrawFuncPtr(FuPoor* pFuncPtr) { pDrawActual = pFuncPtr; }
+ void SetDrawFuncOldPtr(FuPoor* pFuncPtr) { pDrawOld = pFuncPtr; }
+ FuPoor* GetDrawFuncPtr() { return pDrawActual; }
+ FuPoor* GetDrawFuncOldPtr() { return pDrawOld; }
void DrawDeselectAll();
void DrawMarkListHasChanged();