[Libreoffice-commits] .: sc/inc sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Nov 12 15:04:32 PST 2010
sc/inc/dptablecache.hxx | 57 +++++++++++++++--------------------
sc/source/core/data/dptablecache.cxx | 2 -
2 files changed, 26 insertions(+), 33 deletions(-)
New commits:
commit ea57ce755cafe38fb30dc332b30dfd71fb4a8b87
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Nov 12 18:03:35 2010 -0500
More cleanup, tab removal, bogus comments etc.
diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx
index c6bec4b..b3bb082 100644
--- a/sc/inc/dptablecache.hxx
+++ b/sc/inc/dptablecache.hxx
@@ -41,30 +41,24 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
-class ScDPTableDataCache;
-class TypedStrData;
struct ScQueryParam;
-// --------------------------------------------------------------------
-//
-// base class ScDPTableData to allow implementation with tabular data
-// by deriving only of this
-//
-
class SC_DLLPUBLIC ScDPTableDataCache
{
- long mnID;
ScDocument* mpDoc;
- long mnColumnCount; // Column count
+ long mnID;
+ long mnColumnCount;
+
+ std::vector<ScDPItemData*>* mpTableDataValues; //Data Pilot Table's index - value map
+ std::vector<SCROW>* mpSourceData; //Data Pilot Table's Source data
+ std::vector<SCROW>* mpGlobalOrder; //Sorted members index
+ std::vector<SCROW>* mpIndexOrder; //Index the sorted number
+ std::vector<ScDPItemData*> mrLabelNames; //Source Label data
+ std::vector<bool> mbEmptyRow; //If empty row?
+
+ mutable ScDPItemDataPool maAdditionalDatas;
- std::vector<ScDPItemData*>* mpTableDataValues; //Data Pilot Table's index - value map
- std::vector<SCROW>* mpSourceData; //Data Pilot Table's Source data
- std::vector<SCROW>* mpGlobalOrder; //Sorted members index
- std::vector<SCROW>* mpIndexOrder; //Index the sorted number
- std::vector<ScDPItemData*> mrLabelNames; //Source Label data
- std::vector<bool> mbEmptyRow; //If empty row?
- mutable ScDPItemDataPool maAdditionalDatas;
public:
SCROW GetOrder( long nDim, SCROW nIndex ) const;
SCROW GetIdByItemData( long nDim, String sItemData ) const;
@@ -83,22 +77,22 @@ public:
SCROW GetSortedItemDataId( SCCOL nDim, SCROW nOrder ) const;
const std::vector<ScDPItemData*>& GetDimMemberValues( SCCOL nDim )const;
- void SetId( long nId ){ mnID = nId;}
- void AddRow( ScDPItemData* pRow, USHORT nCount );
- bool InitFromDoc( ScDocument* pDoc, const ScRange& rRange );
+ void SetId( long nId ){ mnID = nId;}
+ void AddRow( ScDPItemData* pRow, USHORT nCount );
+ bool InitFromDoc( ScDocument* pDoc, const ScRange& rRange );
bool InitFromDataBase (const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& xRowSet, const Date& rNullDate);
- SCROW GetRowCount() const;
- SCROW GetItemDataId( USHORT nDim, SCROW nRow, bool bRepeatIfEmpty ) const;
- String GetDimensionName( USHORT nColumn ) const;
- bool IsEmptyMember( SCROW nRow, USHORT nColumn ) const;
- bool IsRowEmpty( SCROW nRow ) const;
- bool IsValid() const;
- bool ValidQuery( SCROW nRow, const ScQueryParam& rQueryParam, bool* pSpecial );
+ SCROW GetRowCount() const;
+ SCROW GetItemDataId( USHORT nDim, SCROW nRow, bool bRepeatIfEmpty ) const;
+ String GetDimensionName( USHORT nColumn ) const;
+ bool IsEmptyMember( SCROW nRow, USHORT nColumn ) const;
+ bool IsRowEmpty( SCROW nRow ) const;
+ bool IsValid() const;
+ bool ValidQuery( SCROW nRow, const ScQueryParam& rQueryParam, bool* pSpecial );
ScDocument* GetDoc() const;//ms-cache-core
long GetColumnCount() const;
- long GetId() const;
+ long GetId() const;
const ScDPItemData* GetItemDataById( long nDim, SCROW nId ) const;
@@ -107,12 +101,11 @@ public:
ScDPTableDataCache( ScDocument* pDoc );
virtual ~ScDPTableDataCache();
-protected:
private:
- void AddLabel( ScDPItemData* pData);
- bool AddData( long nDim, ScDPItemData* itemData );
+ void AddLabel( ScDPItemData* pData);
+ bool AddData( long nDim, ScDPItemData* itemData );
};
-#endif //DPTABLECACHE_HXX
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index a8585df..028b8ea 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -399,13 +399,13 @@ bool ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const
ScDPTableDataCache::ScDPTableDataCache( ScDocument* pDoc ) :
mpDoc( pDoc ),
+ mnID(-1),
mnColumnCount ( 0 ),
mpTableDataValues ( NULL ),
mpSourceData ( NULL ),
mpGlobalOrder( NULL ),
mpIndexOrder( NULL)
{
- mnID = -1;
}
ScDPTableDataCache::~ScDPTableDataCache()
More information about the Libreoffice-commits
mailing list