summaryrefslogtreecommitdiff
path: root/sw/inc/unotbl.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-02-04 22:55:07 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-05 14:42:38 +0100
commit7e349c0eee15fa0f9d8d71a3c9e311d2da62e670 (patch)
tree426b92c8d29f88812530586b33202cfcc2edbe29 /sw/inc/unotbl.hxx
parent956d48b5a5970980894c02d85e72ed1a3e40078f (diff)
sw: fix SolarMutex asserts from SwXCellRange dtor
Happened when loading a report from the attachment of tdf#97033, but that bug is apparently about a different crash. Deploy the sw::UnoImplPtr, which is clearly the best way to avoid such problems. Also another silly weak pointer this, for tdf#72695. Change-Id: Ice8db95ca3eecc638bd4a4ef7fa8967d180bd525
Diffstat (limited to 'sw/inc/unotbl.hxx')
-rw-r--r--sw/inc/unotbl.hxx24
1 files changed, 11 insertions, 13 deletions
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index f79598e39934..ef5c42b9dad6 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -33,7 +33,6 @@
#include <com/sun/star/table/XAutoFormattable.hpp>
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer2.hxx>
#include <comphelper/uno3.hxx>
@@ -447,28 +446,31 @@ class SwXCellRange : public cppu::WeakImplHelper
css::chart::XChartDataArray,
css::util::XSortable,
css::sheet::XCellRangeData
->,
- public SwClient
+>
{
- ::osl::Mutex m_Mutex;
- ::comphelper::OInterfaceContainerHelper2 m_ChartListeners;
+private:
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
SwRangeDescriptor aRgDesc;
const SfxItemPropertySet* m_pPropSet;
- sw::UnoCursorPointer m_pTableCursor;
-
bool m_bFirstRowAsLabel;
bool m_bFirstColumnAsLabel;
std::tuple<sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32> getLabelCoordinates(bool bRow);
css::uno::Sequence<OUString> getLabelDescriptions(bool bRow);
void setLabelDescriptions(const css::uno::Sequence<OUString>& rDesc, bool bRow);
-public:
SwXCellRange(sw::UnoCursorPointer pCursor, SwFrameFormat& rFrameFormat, SwRangeDescriptor& rDesc);
+ virtual ~SwXCellRange();
+
+public:
+ static ::rtl::Reference<SwXCellRange> CreateXCellRange(
+ sw::UnoCursorPointer pCursor, SwFrameFormat& rFrameFormat,
+ SwRangeDescriptor& rDesc);
+
void SetLabels(bool bFirstRowAsLabel, bool bFirstColumnAsLabel)
{ m_bFirstRowAsLabel = bFirstRowAsLabel, m_bFirstColumnAsLabel = bFirstColumnAsLabel; }
- virtual ~SwXCellRange() {};
std::vector< css::uno::Reference< css::table::XCell > > GetCells();
@@ -533,10 +535,6 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override;
- //SwClient
- virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
-
- SwFrameFormat* GetFrameFormat() const { return const_cast<SwFrameFormat*>(static_cast<const SwFrameFormat*>(GetRegisteredIn())); }
sal_uInt16 getRowCount();
sal_uInt16 getColumnCount();