summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-03-13 16:30:49 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-14 00:35:29 -0400
commit6aeed3c93bb8c123154bbe47702080c9c1176f39 (patch)
tree34b87f00f51d8c017d42c0b4f19dd69284299eb6 /sc
parent49cb939de712163c90f3e989c846a68d5ae86ee2 (diff)
Re-added ClearSource() which will only clear the source. Nothing else.
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/dpobject.hxx7
-rw-r--r--sc/source/core/data/dpobject.cxx14
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
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 )
{