summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-07-06 12:49:35 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-07-06 12:51:50 -0400
commitfad3a6bbddaf003d185d248d232e65b94939963b (patch)
tree015a08bdac5c92a3a20b3eba650b761a35feba6d /sc
parent89bec37621dd45847d47aef8b3f807eb476ea0af (diff)
Properly rehash row visibility when the layout dialog is dismissed.
Without this, changing the settings 'ignore empty rows' and 'identify categories' in the dialog and pressing OK wouldn't work as expected. Change-Id: Ib1f3bad5b6c3ddef08cd56d40abfe60da979d14f
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/dpgroup.hxx2
-rw-r--r--sc/inc/dpsdbtab.hxx2
-rw-r--r--sc/inc/dpshttab.hxx2
-rw-r--r--sc/inc/dptabdat.hxx2
-rw-r--r--sc/source/core/data/dpgroup.cxx4
-rw-r--r--sc/source/core/data/dpobject.cxx9
-rw-r--r--sc/source/core/data/dpsdbtab.cxx3
-rw-r--r--sc/source/core/data/dpshttab.cxx3
-rw-r--r--sc/source/core/data/dptabres.cxx1
9 files changed, 17 insertions, 11 deletions
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index 5d48af06231e..afa3933efe48 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -182,7 +182,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rData);
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow);
virtual const ScDPCacheTable& GetCacheTable() const;
- virtual void ClearCacheTable();
+ virtual void ReloadCacheTable();
virtual sal_Bool IsBaseForGroup(long nDim) const;
virtual long GetGroupBase(long nGroupDim) const;
diff --git a/sc/inc/dpsdbtab.hxx b/sc/inc/dpsdbtab.hxx
index a96b0115014b..3a852ef2d3e7 100644
--- a/sc/inc/dpsdbtab.hxx
+++ b/sc/inc/dpsdbtab.hxx
@@ -88,7 +88,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rData);
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow);
virtual const ScDPCacheTable& GetCacheTable() const;
- virtual void ClearCacheTable();
+ virtual void ReloadCacheTable();
};
diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx
index 510105d36723..dc1ce1ad1cd1 100644
--- a/sc/inc/dpshttab.hxx
+++ b/sc/inc/dpshttab.hxx
@@ -128,7 +128,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rData);
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow);
virtual const ScDPCacheTable& GetCacheTable() const;
- virtual void ClearCacheTable();
+ virtual void ReloadCacheTable();
};
diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx
index f19a6ba7a0a4..16b8ef323dbf 100644
--- a/sc/inc/dptabdat.hxx
+++ b/sc/inc/dptabdat.hxx
@@ -154,7 +154,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rData) = 0;
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) = 0;
virtual const ScDPCacheTable& GetCacheTable() const = 0;
- virtual void ClearCacheTable() = 0;
+ virtual void ReloadCacheTable() = 0;
// overloaded in ScDPGroupTableData:
virtual sal_Bool IsBaseForGroup(long nDim) const;
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 4a263df2c22c..232f7fc9a1e2 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -784,9 +784,9 @@ const ScDPCacheTable& ScDPGroupTableData::GetCacheTable() const
return pSourceData->GetCacheTable();
}
-void ScDPGroupTableData::ClearCacheTable()
+void ScDPGroupTableData::ReloadCacheTable()
{
- pSourceData->ClearCacheTable();
+ pSourceData->ReloadCacheTable();
}
void ScDPGroupTableData::FillGroupValues(vector<SCROW>& rItems, const vector<long>& rDims)
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 569b8c674662..1c7786a463d8 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -499,6 +499,12 @@ void ScDPObject::CreateObjects()
ScDPTableData* pData = GetTableData();
if (pData)
{
+ if (pSaveData)
+ // Make sure to transfer these flags to the table data
+ // since they may have changed.
+ pData->SetEmptyFlags(pSaveData->GetIgnoreEmptyRows(), pSaveData->GetRepeatIfEmpty());
+
+ pData->ReloadCacheTable();
ScDPSource* pSource = new ScDPSource( pData );
xSource = pSource;
}
@@ -709,8 +715,7 @@ void ScDPObject::SyncAllDimensionMembers()
ScDPTableData* pData = GetTableData();
// Refresh the cache wrapper since the cache may have changed.
pData->SetEmptyFlags(pSaveData->GetIgnoreEmptyRows(), pSaveData->GetRepeatIfEmpty());
- pData->ClearCacheTable();
- pData->CreateCacheTable();
+ pData->ReloadCacheTable();
pSaveData->SyncAllDimensionMembers(pData);
}
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index f1621eb08f64..edec6e3993f7 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -172,9 +172,10 @@ const ScDPCacheTable& ScDatabaseDPData::GetCacheTable() const
return aCacheTable;
}
-void ScDatabaseDPData::ClearCacheTable()
+void ScDatabaseDPData::ReloadCacheTable()
{
aCacheTable.clear();
+ CreateCacheTable();
}
// -----------------------------------------------------------------------
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index 797fa274cafd..13f198037550 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -223,9 +223,10 @@ const ScDPCacheTable& ScSheetDPData::GetCacheTable() const
return aCacheTable;
}
-void ScSheetDPData::ClearCacheTable()
+void ScSheetDPData::ReloadCacheTable()
{
aCacheTable.clear();
+ CreateCacheTable();
}
ScSheetSourceDesc::ScSheetSourceDesc(ScDocument* pDoc) :
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 8a2e30e1d2a2..4a4a2020d201 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -1342,7 +1342,6 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
const String* pMemberName,
const String* pMemberCaption )
{
-// stack_printer __stack_printer__("ScDPResultMember::FillMemberResults");
// IsVisible() test is in ScDPResultDimension::FillMemberResults
// (not on data layout dimension)