[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 2 commits - sc/inc sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Jul 6 09:52:32 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 3a2863afd428958ea1ec78b4dc9971c73f704741
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 219e2e3..1c36237 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -183,7 +183,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 f3cf2fd..2892c52 100644
--- a/sc/inc/dpshttab.hxx
+++ b/sc/inc/dpshttab.hxx
@@ -130,7 +130,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 03107de..fbe0787 100644
--- a/sc/inc/dptabdat.hxx
+++ b/sc/inc/dptabdat.hxx
@@ -156,7 +156,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 2959a65..91e9cce 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -789,9 +789,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 edd3bf2..c21dfb6 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -502,6 +502,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;
             }
@@ -712,8 +718,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 27c2ef2..9466eb4 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -177,9 +177,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 8e9a982..8ee3d4e 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -228,9 +228,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 ec74d43..8abcf44 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -1347,7 +1347,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 89ca5bde1c0cf6617e646726e1ef21ca20f2487c
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 369307b..edd3bf2 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -711,6 +711,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