diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dpobject.hxx | 7 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/view/dbfunc3.cxx | 2 |
3 files changed, 16 insertions, 7 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 5f5496e9b43c..5b16b599ebbc 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -114,8 +114,11 @@ private: SC_DLLPRIVATE ScDPTableData* GetTableData(); SC_DLLPRIVATE void CreateObjects(); SC_DLLPRIVATE void CreateOutput(); - - bool FillLabelDataForDimension(const com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess>& xDims, sal_Int32 nDim, ScDPLabelData& rLabelData); + SC_DLLPRIVATE void ClearSource(); + SC_DLLPRIVATE bool FillLabelDataForDimension( + const com::sun::star::uno::Reference< + com::sun::star::container::XIndexAccess>& xDims, + sal_Int32 nDim, ScDPLabelData& rLabelData); public: ScDPObject(ScDocument* pD); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 31afb26d612d..e5496c83a867 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -544,8 +544,17 @@ void ScDPObject::InvalidateData() void ScDPObject::ClearTableData() { + ClearSource(); + + if (mpTableData) + mpTableData->GetCacheTable().getCache()->RemoveReference(this); + mpTableData.reset(); +} + +void ScDPObject::ClearSource() +{ Reference< XComponent > xObjectComp( xSource, UNO_QUERY ); - if ( xObjectComp.is() ) + if (xObjectComp.is()) { try { @@ -557,9 +566,6 @@ void ScDPObject::ClearTableData() } } xSource = NULL; - if (mpTableData) - mpTableData->GetCacheTable().getCache()->RemoveReference(this); - mpTableData.reset(); } ScRange ScDPObject::GetNewOutputRange( bool& rOverflow ) diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 7cbd71c8982f..e86d5858d051 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1150,7 +1150,7 @@ void ScDBFunc::GroupDataPilot() ScDPDimensionSaveData* pDimData = aData.GetDimensionData(); // created if not there // find original base - String aBaseDimName( aDimName ); + rtl::OUString aBaseDimName = aDimName; const ScDPSaveGroupDimension* pBaseGroupDim = pDimData->GetNamedGroupDim( aDimName ); if ( pBaseGroupDim ) { |