diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-05-26 15:08:59 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-05-26 15:21:54 +0200 |
commit | 1925a57dee73933ffbdb3b57349b757470a8218a (patch) | |
tree | 07d5b1c8a1d67bd36b0143f0ebddb0eca126b629 /sw/inc/unotbl.hxx | |
parent | 0f98a035806aed03ba56e292bc7ee17b242ff2a0 (diff) |
Remove SwClients before destruction in some uno wrapper classes
- SwXTextTableCursor, SwXCellRange, SwXTextPortion, SwNavigationMgr,
SwXParaFrameEnumeration
- this was overlooked due to confusion over our bazillion different
debug modes
Change-Id: I0965184b3ffc4854c26838ff78aef06f4544a9b1
Diffstat (limited to 'sw/inc/unotbl.hxx')
-rw-r--r-- | sw/inc/unotbl.hxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 405d1d4531d9..28fecfbbc8fa 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -42,6 +42,7 @@ #include <unotext.hxx> #include <frmfmt.hxx> #include <tuple> +#include <unocrsr.hxx> class SwUnoCrsr; class SwTable; @@ -217,7 +218,6 @@ public: SwXTextTableCursor(SwFrameFormat* pFormat, SwTableBox* pBox); SwXTextTableCursor(SwFrameFormat& rTableFormat, const SwTableCursor* pTableSelection); - DECLARE_XINTERFACE() //XTextTableCursor @@ -276,6 +276,12 @@ public: SwUnoCrsr* GetCrsr(); std::shared_ptr<SwUnoCrsr> m_pUnoCrsr; SwFrameFormat* GetFrameFormat() const { return const_cast<SwFrameFormat*>(static_cast<const SwFrameFormat*>(GetRegisteredIn())); } + ~SwXTextTableCursor() + { + if(m_pUnoCrsr) + m_pUnoCrsr->Remove(&aCrsrDepend); + } + }; struct SwRangeDescriptor @@ -469,6 +475,11 @@ public: SwXCellRange(std::shared_ptr<SwUnoCrsr> pCrsr, SwFrameFormat& rFrameFormat, SwRangeDescriptor& rDesc); void SetLabels(bool bFirstRowAsLabel, bool bFirstColumnAsLabel) { m_bFirstRowAsLabel = bFirstRowAsLabel, m_bFirstColumnAsLabel = bFirstColumnAsLabel; } + virtual ~SwXCellRange() + { + if(m_pTableCrsr) + m_pTableCrsr->Remove(&aCursorDepend); + } std::vector< css::uno::Reference< css::table::XCell > > getCells(); TYPEINFO_OVERRIDE(); |