[Libreoffice-commits] .: 2 commits - sc/inc sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Jul 6 09:51:08 PDT 2012


 sc/inc/dpgroup.hxx               |    2 +-
 sc/inc/dpsdbtab.hxx              |    2 +-
 sc/inc/dpshttab.hxx              |    2 +-
 sc/inc/dptabdat.hxx              |    2 +-
 sc/source/core/data/dpgroup.cxx  |    4 ++--
 sc/source/core/data/dpobject.cxx |   10 ++++++++--
 sc/source/core/data/dpsdbtab.cxx |    3 ++-
 sc/source/core/data/dpshttab.cxx |    3 ++-
 sc/source/core/data/dptabres.cxx |    1 -
 9 files changed, 18 insertions(+), 11 deletions(-)

New commits:
commit fad3a6bbddaf003d185d248d232e65b94939963b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Jul 6 12:49:35 2012 -0400

    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

diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index 5d48af0..afa3933 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 a96b011..3a852ef 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 510105d..dc1ce1a 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 f19a6ba..16b8ef3 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 4a263df..232f7fc 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 569b8c6..1c7786a 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 f1621eb..edec6e3 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 797fa27..13f1980 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 8a2e30e..4a4a202 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)
 
commit 89bec37621dd45847d47aef8b3f807eb476ea0af
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Jul 6 09:48:54 2012 -0400

    Sync the 'ignore empty rows' and 'repeat if empty' flags as appropriate.
    
    Change-Id: I8e2dca4c7c32aaee4088f533c4d0e88b862f4d56

diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 6d33843..569b8c6 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -708,6 +708,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();
     pSaveData->SyncAllDimensionMembers(pData);


More information about the Libreoffice-commits mailing list