basctl/source/basicide/baside3.cxx | 6 ++++++ basctl/source/inc/baside3.hxx | 3 ++- sw/source/core/inc/sectfrm.hxx | 2 +- sw/source/core/layout/calcmove.cxx | 2 +- sw/source/core/layout/sectfrm.cxx | 5 ++--- 5 files changed, 12 insertions(+), 6 deletions(-)
New commits: commit 0943adb2f7ec319891c11889b40c9a69f0d1027e Author: Caolán McNamara <[email protected]> Date: Thu Nov 12 12:25:16 2015 +0000 Resolves: tdf#95021 crash on closing macro dialog editor VclPtr related, dialog dtor is never called, so timer is never stopped and timer refers to deleted parent data Change-Id: I804ba082817802c0017e61c6b86c5d3694995ea8 diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 6b1edfb..09e3c87 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -97,6 +97,12 @@ DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rD SetReadOnly(true); } +void DialogWindow::dispose() +{ + pEditor.reset(); + BaseWindow::dispose(); +} + void DialogWindow::LoseFocus() { if ( IsModified() ) diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index ebafb49..3ac12e1 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -57,13 +57,14 @@ class DialogWindow: public BaseWindow { private: DialogWindowLayout& rLayout; - std::unique_ptr<DlgEditor> pEditor; // never nullptr + std::unique_ptr<DlgEditor> pEditor; std::unique_ptr<SfxUndoManager> pUndoMgr; // never nullptr OUString aCurPath; protected: virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; virtual void Resize() override; + virtual void dispose() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; commit 0d33c2884f7b02e9e754d2754a45ab29ad63ddf6 Author: Caolán McNamara <[email protected]> Date: Thu Nov 12 11:11:24 2015 +0000 two methods with the same name that do slightly different things depending on constness is a little worrying, lets just use different names Change-Id: I3e7ca96c8c7dc8d58a7415d39b937984961aa619 diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx index 9330196..b5ddcd9 100644 --- a/sw/source/core/inc/sectfrm.hxx +++ b/sw/source/core/inc/sectfrm.hxx @@ -129,7 +129,7 @@ public: * We need this in the FormatWidthCols to "deflate" columns there. */ SwTwips Undersize(bool bOverSize = false); - SwTwips Undersize() const; + SwTwips CalcUndersize() const; /// Adapt size to surroundings void _CheckClipping( bool bGrow, bool bMaximize ); diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 2ac5a3f..9469f2a 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -664,7 +664,7 @@ size_t SwPageFrm::GetContentHeight(const long nTop, const long nBottom) const else if (pCnt->IsSctFrm()) { // Grow if undersized, but don't shrink if oversized. - const auto delta = static_cast<const SwSectionFrm*>(pCnt)->Undersize(); + const auto delta = static_cast<const SwSectionFrm*>(pCnt)->CalcUndersize(); if (delta > 0) nTmp += delta; } diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 1b3e9dd..00ffaec 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -2492,7 +2492,7 @@ void SwSectionFrm::InvalidateFootnotePos() } } -SwTwips SwSectionFrm::Undersize() const +SwTwips SwSectionFrm::CalcUndersize() const { SWRECTFN(this); return InnerHeight() - (Prt().*fnRect->fnGetHeight)(); @@ -2500,8 +2500,7 @@ SwTwips SwSectionFrm::Undersize() const SwTwips SwSectionFrm::Undersize(bool bOverSize) { - SWRECTFN(this); - const auto nRet = InnerHeight() - (Prt().*fnRect->fnGetHeight)(); + const auto nRet = CalcUndersize(); m_bUndersized = (nRet > 0); return (nRet <= 0 && !bOverSize) ? 0 : nRet; }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
