summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-02-29 15:32:49 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-09 11:13:27 -0500
commitfb5286177df3e7f9ebf1286383f4e4e91e2023a2 (patch)
treeb839d110d5a7ab0aff838940e7bd91dcb4db010f
parentf43ceb03f6d00204ae9a2dedc6dcddba788a26c9 (diff)
We don't need the date part flag.
-rw-r--r--sc/inc/dpitemdata.hxx6
-rw-r--r--sc/source/core/data/dpgroup.cxx4
-rw-r--r--sc/source/core/data/dpitemdata.cxx8
3 files changed, 4 insertions, 14 deletions
diff --git a/sc/inc/dpitemdata.hxx b/sc/inc/dpitemdata.hxx
index d33a21883f9b..79763630ad52 100644
--- a/sc/inc/dpitemdata.hxx
+++ b/sc/inc/dpitemdata.hxx
@@ -44,13 +44,13 @@ class ScDocument;
class SC_DLLPUBLIC ScDPItemData
{
+ friend class ScDPCache;
public:
enum {
MK_VAL = 0x01,
MK_DATA = 0x02,
MK_ERR = 0x04,
- MK_DATE = 0x08,
- MK_DATEPART = 0x10
+ MK_DATE = 0x08
};
static bool isDate( sal_uLong nNumType );
@@ -61,7 +61,6 @@ private:
double mfValue;
sal_uInt8 mbFlag;
- friend class ScDPCache;
public:
ScDPItemData();
ScDPItemData(sal_uLong nNF, const rtl::OUString & rS, double fV, sal_uInt8 bF);
@@ -87,7 +86,6 @@ public:
double GetValue() const ;
bool HasStringData() const ;
bool IsDate() const;
- bool HasDatePart() const;
void SetDate( bool b ) ;
sal_uInt8 GetType() const;
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index e52211d70a75..c84cdb3e9582 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -149,7 +149,7 @@ void lcl_InsertValue ( SCCOL nSourceDim, const ScDPCache* pCache, std::vector<
template<bool bUpdateData>
void lcl_InsertValue ( SCCOL nSourceDim, const ScDPCache* pCache, std::vector< SCROW >& vIdx, const String& rString, const double& fValue, sal_Int32 nDatePart )
{
- lcl_InsertValue<bUpdateData>( nSourceDim, pCache, vIdx, ScDPItemData( nDatePart, rString, fValue, ScDPItemData::MK_DATA|ScDPItemData::MK_VAL|ScDPItemData::MK_DATEPART ) );
+ lcl_InsertValue<bUpdateData>( nSourceDim, pCache, vIdx, ScDPItemData(nDatePart, rString, fValue, ScDPItemData::MK_DATA|ScDPItemData::MK_VAL) );
}
void lcl_AppendDateStr( rtl::OUStringBuffer& rBuffer, double fValue, SvNumberFormatter* pFormatter )
@@ -1388,7 +1388,7 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt
sal_Int32 nPartValue = lcl_GetDatePartValue(
pData->GetValue(), pDateHelper->GetDatePart(), pDoc->GetFormatTable(),
&pDateHelper->GetNumInfo() );
- ScDPItemData aItemData( pDateHelper->GetDatePart(), String(), nPartValue, ScDPItemData::MK_DATA|ScDPItemData::MK_VAL|ScDPItemData::MK_DATEPART );
+ ScDPItemData aItemData(pDateHelper->GetDatePart(), String(), nPartValue, ScDPItemData::MK_DATA|ScDPItemData::MK_VAL);
pItemDataIndex[nDim] = GetCacheTable().getCache()->GetAdditionalItemID( aItemData );
}
}
diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx
index 6583b4eb545b..a5f512c251e0 100644
--- a/sc/source/core/data/dpitemdata.cxx
+++ b/sc/source/core/data/dpitemdata.cxx
@@ -115,9 +115,6 @@ bool ScDPItemData::operator==( const ScDPItemData& r ) const
{
if ( IsValue() )
{
- if (HasDatePart() != r.HasDatePart())
- return false;
-
if ( IsDate() != r.IsDate() )
return false;
else if ( r.IsValue() )
@@ -207,11 +204,6 @@ bool ScDPItemData::IsDate() const
return !!(mbFlag&MK_DATE);
}
-bool ScDPItemData::HasDatePart() const
-{
- return !!(mbFlag&MK_DATEPART);
-}
-
void ScDPItemData::SetDate( bool b )
{
b ? ( mbFlag |= MK_DATE ) : ( mbFlag &= ~MK_DATE );