summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-03-09 15:13:36 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-09 15:13:36 -0500
commit2877147c477f064c213af53a8f250ce96ad1e5f2 (patch)
tree9cffad47e621761e2a6569f39459ca853a061d61
parentbded4b782a1dcd22ccd7187262d1aea3b0d50e6a (diff)
IsValid() is superfluous.
-rw-r--r--sc/inc/dpcache.hxx1
-rw-r--r--sc/source/core/data/dpcache.cxx9
2 files changed, 0 insertions, 10 deletions
diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx
index 661c5cdd221c..31d5103b24da 100644
--- a/sc/inc/dpcache.hxx
+++ b/sc/inc/dpcache.hxx
@@ -151,7 +151,6 @@ public:
SCROW GetItemDataId( sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty ) const;
rtl::OUString GetDimensionName(LabelsType::size_type nDim) const;
bool IsRowEmpty( SCROW nRow ) const;
- bool IsValid() const;
bool ValidQuery(SCROW nRow, const ScQueryParam& rQueryParam) const;
ScDocument* GetDoc() const;
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 33a0a25ef738..9ae41a451b27 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -252,11 +252,6 @@ ScDPCache::~ScDPCache()
std::for_each(maRefObjects.begin(), maRefObjects.end(), ClearObjectSource());
}
-bool ScDPCache::IsValid() const
-{
- return !maFields.empty() && mnColumnCount > 0;
-}
-
namespace {
/**
@@ -622,7 +617,6 @@ bool ScDPCache::IsRowEmpty( SCROW nRow ) const
bool ScDPCache::AddData(long nDim, ScDPItemData* pData, sal_uLong nNumFormat)
{
- OSL_ENSURE( IsValid(), " IsValid() == false " );
OSL_ENSURE( nDim < mnColumnCount && nDim >=0 , "dimension out of bound" );
// Wrap this instance with scoped pointer to ensure proper deletion.
@@ -713,7 +707,6 @@ void ScDPCache::Clear()
void ScDPCache::AddLabel(const rtl::OUString& rLabel)
{
- OSL_ENSURE( IsValid(), " IsValid() == false " );
if ( maLabelNames.empty() )
maLabelNames.push_back(ScGlobal::GetRscString(STR_PIVOT_DATA));
@@ -741,7 +734,6 @@ void ScDPCache::AddLabel(const rtl::OUString& rLabel)
SCROW ScDPCache::GetItemDataId(sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty) const
{
- OSL_ENSURE( IsValid(), " IsValid() == false " );
OSL_ENSURE(nDim < mnColumnCount, "ScDPTableDataCache::GetItemDataId ");
const Field& rField = maFields[nDim];
@@ -1086,7 +1078,6 @@ void ScDPCache::ClearGroupFields()
SCROW ScDPCache::GetOrder(long nDim, SCROW nIndex) const
{
- OSL_ENSURE( IsValid(), " IsValid() == false " );
OSL_ENSURE( nDim >=0 && nDim < mnColumnCount, "ScDPTableDataCache::GetOrder : out of bound" );
const Field& rField = maFields[nDim];