summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-02-28 16:11:53 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-02-28 21:03:09 -0500
commit6fc139f068de791604157b70d331ebb171fc1049 (patch)
tree34fa937468a8e4ae5277cb6d4c5a9abb6454caaf
parent4a092a8de1c76612691979d0194a0346ed37cf02 (diff)
Properly prefixed members of ScDPNumGroupInfo.
-rw-r--r--sc/inc/dpgroup.hxx20
-rw-r--r--sc/source/core/data/dpgroup.cxx100
-rw-r--r--sc/source/filter/excel/xepivot.cxx34
-rw-r--r--sc/source/filter/excel/xipivot.cxx40
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx22
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx14
-rw-r--r--sc/source/ui/dbgui/dpgroupdlg.cxx52
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx46
-rw-r--r--sc/source/ui/view/cellsh1.cxx6
-rw-r--r--sc/source/ui/view/dbfunc3.cxx22
10 files changed, 179 insertions, 177 deletions
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index 356df1ca028e..f6be836c8567 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -40,19 +40,17 @@
class ScDocument;
class SvNumberFormatter;
-//! API struct?
struct ScDPNumGroupInfo
{
- sal_Bool Enable;
- sal_Bool DateValues;
- sal_Bool AutoStart;
- sal_Bool AutoEnd;
- double Start;
- double End;
- double Step;
-
- ScDPNumGroupInfo() : Enable(false), DateValues(false), AutoStart(false), AutoEnd(false),
- Start(0.0), End(0.0), Step(0.0) {}
+ bool mbEnable:1;
+ bool mbDateValues:1;
+ bool mbAutoStart:1;
+ bool mbAutoEnd:1;
+ double mfStart;
+ double mfEnd;
+ double mfStep;
+
+ SC_DLLPUBLIC ScDPNumGroupInfo();
};
// ScDPDateGroupHelper is used as part of ScDPGroupDimension (additional dim.)
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 8df6e91e1cf7..6fbb67b2d27a 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -73,6 +73,10 @@ const sal_uInt16 SC_DP_LEAPYEAR = 1648; // arbitrary leap year for date calc
const sal_Int32 SC_DP_DATE_FIRST = -1;
const sal_Int32 SC_DP_DATE_LAST = 10000;
+ScDPNumGroupInfo::ScDPNumGroupInfo() :
+ mbEnable(false), mbDateValues(false), mbAutoStart(false), mbAutoEnd(false),
+ mfStart(0.0), mfEnd(0.0), mfStep(0.0) {}
+
namespace {
sal_Bool lcl_Search( SCCOL nSourceDim, const ScDPCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex)
@@ -161,9 +165,9 @@ String lcl_GetNumGroupName( double fStartValue, const ScDPNumGroupInfo& rInfo,
{
OSL_ENSURE( cDecSeparator != 0, "cDecSeparator not initialized" );
- double fStep = rInfo.Step;
+ double fStep = rInfo.mfStep;
double fEndValue = fStartValue + fStep;
- if ( !bHasNonInteger && ( rInfo.DateValues || !rtl::math::approxEqual( fEndValue, rInfo.End ) ) )
+ if ( !bHasNonInteger && ( rInfo.mbDateValues || !rtl::math::approxEqual( fEndValue, rInfo.mfEnd ) ) )
{
// The second number of the group label is
// (first number + size - 1) if there are only integer numbers,
@@ -174,15 +178,15 @@ String lcl_GetNumGroupName( double fStartValue, const ScDPNumGroupInfo& rInfo,
fEndValue -= 1.0;
}
- if ( fEndValue > rInfo.End && !rInfo.AutoEnd )
+ if ( fEndValue > rInfo.mfEnd && !rInfo.mbAutoEnd )
{
// limit the last group to the end value
- fEndValue = rInfo.End;
+ fEndValue = rInfo.mfEnd;
}
rtl::OUStringBuffer aBuffer;
- if ( rInfo.DateValues )
+ if ( rInfo.mbDateValues )
{
lcl_AppendDateStr( aBuffer, fStartValue, pFormatter );
aBuffer.appendAscii( " - " ); // with spaces
@@ -225,26 +229,26 @@ String lcl_GetNumGroupForValue( double fValue, const ScDPNumGroupInfo& rInfo, bo
{
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- if ( fValue < rInfo.Start && !rtl::math::approxEqual( fValue, rInfo.Start ) )
+ if ( fValue < rInfo.mfStart && !rtl::math::approxEqual( fValue, rInfo.mfStart ) )
{
- rGroupValue = rInfo.Start - rInfo.Step;
- return lcl_GetSpecialNumGroupName( rInfo.Start, true, cDecSeparator, rInfo.DateValues, pFormatter );
+ rGroupValue = rInfo.mfStart - rInfo.mfStep;
+ return lcl_GetSpecialNumGroupName( rInfo.mfStart, true, cDecSeparator, rInfo.mbDateValues, pFormatter );
}
- if ( fValue > rInfo.End && !rtl::math::approxEqual( fValue, rInfo.End ) )
+ if ( fValue > rInfo.mfEnd && !rtl::math::approxEqual( fValue, rInfo.mfEnd ) )
{
- rGroupValue = rInfo.End + rInfo.Step;
- return lcl_GetSpecialNumGroupName( rInfo.End, false, cDecSeparator, rInfo.DateValues, pFormatter );
+ rGroupValue = rInfo.mfEnd + rInfo.mfStep;
+ return lcl_GetSpecialNumGroupName( rInfo.mfEnd, false, cDecSeparator, rInfo.mbDateValues, pFormatter );
}
- double fDiff = fValue - rInfo.Start;
- double fDiv = rtl::math::approxFloor( fDiff / rInfo.Step );
- double fGroupStart = rInfo.Start + fDiv * rInfo.Step;
+ double fDiff = fValue - rInfo.mfStart;
+ double fDiv = rtl::math::approxFloor( fDiff / rInfo.mfStep );
+ double fGroupStart = rInfo.mfStart + fDiv * rInfo.mfStep;
- if ( rtl::math::approxEqual( fGroupStart, rInfo.End ) &&
- !rtl::math::approxEqual( fGroupStart, rInfo.Start ) )
+ if ( rtl::math::approxEqual( fGroupStart, rInfo.mfEnd ) &&
+ !rtl::math::approxEqual( fGroupStart, rInfo.mfStart ) )
{
- if ( !rInfo.DateValues )
+ if ( !rInfo.mbDateValues )
{
// A group that would consist only of the end value is not created,
// instead the value is included in the last group before. So the
@@ -252,15 +256,15 @@ String lcl_GetNumGroupForValue( double fValue, const ScDPNumGroupInfo& rInfo, bo
// selected end value.
fDiv -= 1.0;
- fGroupStart = rInfo.Start + fDiv * rInfo.Step;
+ fGroupStart = rInfo.mfStart + fDiv * rInfo.mfStep;
}
else
{
// For date values, the end value is instead treated as above the limit
// if it would be a group of its own.
- rGroupValue = rInfo.End + rInfo.Step;
- return lcl_GetSpecialNumGroupName( rInfo.End, false, cDecSeparator, rInfo.DateValues, pFormatter );
+ rGroupValue = rInfo.mfEnd + rInfo.mfStep;
+ return lcl_GetSpecialNumGroupName( rInfo.mfEnd, false, cDecSeparator, rInfo.mbDateValues, pFormatter );
}
}
@@ -314,10 +318,10 @@ bool ScDPGroupDateFilter::match( const ScDPItemData & rCellData ) const
// Start and end dates are inclusive. (An end date without a time value
// is included, while an end date with a time value is not.)
- if ( rCellData.GetValue() < mpNumInfo->Start && !approxEqual(rCellData.GetValue(), mpNumInfo->Start) )
+ if ( rCellData.GetValue() < mpNumInfo->mfStart && !approxEqual(rCellData.GetValue(), mpNumInfo->mfStart) )
return static_cast<sal_Int32>(mfMatchValue) == SC_DP_DATE_FIRST;
- if ( rCellData.GetValue() > mpNumInfo->End && !approxEqual(rCellData.GetValue(), mpNumInfo->End) )
+ if ( rCellData.GetValue() > mpNumInfo->mfEnd && !approxEqual(rCellData.GetValue(), mpNumInfo->mfEnd) )
return static_cast<sal_Int32>(mfMatchValue) == SC_DP_DATE_LAST;
if (mnDatePart == DataPilotFieldGroupBy::HOURS || mnDatePart == DataPilotFieldGroupBy::MINUTES ||
@@ -466,9 +470,9 @@ sal_Int32 lcl_GetDatePartValue( double fValue, sal_Int32 nDatePart, SvNumberForm
if ( pNumInfo )
{
- if ( fValue < pNumInfo->Start && !rtl::math::approxEqual( fValue, pNumInfo->Start ) )
+ if ( fValue < pNumInfo->mfStart && !rtl::math::approxEqual( fValue, pNumInfo->mfStart ) )
return SC_DP_DATE_FIRST;
- if ( fValue > pNumInfo->End && !rtl::math::approxEqual( fValue, pNumInfo->End ) )
+ if ( fValue > pNumInfo->mfEnd && !rtl::math::approxEqual( fValue, pNumInfo->mfEnd ) )
return SC_DP_DATE_LAST;
}
@@ -633,10 +637,10 @@ void ScDPDateGroupHelper::FillColumnEntries(
// For the start/end values, use the same date rounding as in ScDPNumGroupDimension::GetNumEntries
// (but not for the list of available years):
- if ( aNumInfo.AutoStart )
- const_cast<ScDPDateGroupHelper*>(this)->aNumInfo.Start = rtl::math::approxFloor( fSourceMin );
- if ( aNumInfo.AutoEnd )
- const_cast<ScDPDateGroupHelper*>(this)->aNumInfo.End = rtl::math::approxFloor( fSourceMax ) + 1;
+ if ( aNumInfo.mbAutoStart )
+ const_cast<ScDPDateGroupHelper*>(this)->aNumInfo.mfStart = rtl::math::approxFloor( fSourceMin );
+ if ( aNumInfo.mbAutoEnd )
+ const_cast<ScDPDateGroupHelper*>(this)->aNumInfo.mfEnd = rtl::math::approxFloor( fSourceMax ) + 1;
//! if not automatic, limit fSourceMin/fSourceMax for list of year values?
SvNumberFormatter* pFormatter = pCache->GetDoc()->GetFormatTable();
@@ -667,10 +671,10 @@ void ScDPDateGroupHelper::FillColumnEntries(
}
// add first/last entry (min/max)
- String aFirstName = lcl_GetSpecialDateName( aNumInfo.Start, true, pFormatter );
+ String aFirstName = lcl_GetSpecialDateName( aNumInfo.mfStart, true, pFormatter );
lcl_InsertValue<true>( nSourceDim, pCache, rEntries, aFirstName, SC_DP_DATE_FIRST, nDatePart );
- String aLastName = lcl_GetSpecialDateName( aNumInfo.End, false, pFormatter );
+ String aLastName = lcl_GetSpecialDateName( aNumInfo.mfEnd, false, pFormatter );
lcl_InsertValue<true>( nSourceDim, pCache, rEntries, aLastName, SC_DP_DATE_LAST, nDatePart );
}
@@ -894,7 +898,7 @@ void ScDPNumGroupDimension::MakeDateHelper( const ScDPNumGroupInfo& rInfo, sal_I
delete pDateHelper;
pDateHelper = new ScDPDateGroupHelper( rInfo, nPart );
- aGroupInfo.Enable = sal_True; //! or query both?
+ aGroupInfo.mbEnable = sal_True; //! or query both?
}
const std::vector<SCROW>& ScDPNumGroupDimension::GetNumEntries(
@@ -917,9 +921,9 @@ const std::vector<SCROW>& ScDPNumGroupDimension::GetNumEntries(
cDecSeparator = ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0);
// non-integer GroupInfo values count, too
- bHasNonInteger = ( !aGroupInfo.AutoStart && !IsInteger( aGroupInfo.Start ) ) ||
- ( !aGroupInfo.AutoEnd && !IsInteger( aGroupInfo.End ) ) ||
- !IsInteger( aGroupInfo.Step );
+ bHasNonInteger = ( !aGroupInfo.mbAutoStart && !IsInteger( aGroupInfo.mfStart ) ) ||
+ ( !aGroupInfo.mbAutoEnd && !IsInteger( aGroupInfo.mfEnd ) ) ||
+ !IsInteger( aGroupInfo.mfStep );
double fSourceMin = 0.0;
double fSourceMax = 0.0;
bool bFirst = true;
@@ -957,7 +961,7 @@ const std::vector<SCROW>& ScDPNumGroupDimension::GetNumEntries(
}
}
- if ( aGroupInfo.DateValues )
+ if ( aGroupInfo.mbDateValues )
{
// special handling for dates: always integer, round down limits
bHasNonInteger = false;
@@ -965,15 +969,15 @@ const std::vector<SCROW>& ScDPNumGroupDimension::GetNumEntries(
fSourceMax = rtl::math::approxFloor( fSourceMax ) + 1;
}
- if ( aGroupInfo.AutoStart )
- const_cast<ScDPNumGroupDimension*>(this)->aGroupInfo.Start = fSourceMin;
- if ( aGroupInfo.AutoEnd )
- const_cast<ScDPNumGroupDimension*>(this)->aGroupInfo.End = fSourceMax;
+ if ( aGroupInfo.mbAutoStart )
+ const_cast<ScDPNumGroupDimension*>(this)->aGroupInfo.mfStart = fSourceMin;
+ if ( aGroupInfo.mbAutoEnd )
+ const_cast<ScDPNumGroupDimension*>(this)->aGroupInfo.mfEnd = fSourceMax;
//! limit number of entries?
long nLoopCount = 0;
- double fLoop = aGroupInfo.Start;
+ double fLoop = aGroupInfo.mfStart;
// Use "less than" instead of "less or equal" for the loop - don't create a group
// that consists only of the end value. Instead, the end value is then included
@@ -981,24 +985,24 @@ const std::vector<SCROW>& ScDPNumGroupDimension::GetNumEntries(
// The first group has to be created nonetheless. GetNumGroupForValue has corresponding logic.
bool bFirstGroup = true;
- while ( bFirstGroup || ( fLoop < aGroupInfo.End && !rtl::math::approxEqual( fLoop, aGroupInfo.End ) ) )
+ while ( bFirstGroup || ( fLoop < aGroupInfo.mfEnd && !rtl::math::approxEqual( fLoop, aGroupInfo.mfEnd ) ) )
{
String aName = lcl_GetNumGroupName( fLoop, aGroupInfo, bHasNonInteger, cDecSeparator, pFormatter );
// create a numerical entry to ensure proper sorting
// (in FillMemberResults this needs special handling)
lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aName, fLoop );
++nLoopCount;
- fLoop = aGroupInfo.Start + nLoopCount * aGroupInfo.Step;
+ fLoop = aGroupInfo.mfStart + nLoopCount * aGroupInfo.mfStep;
bFirstGroup = false;
// ScDPItemData values are compared with approxEqual
}
- String aFirstName = lcl_GetSpecialNumGroupName( aGroupInfo.Start, true, cDecSeparator, aGroupInfo.DateValues, pFormatter );
- lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aFirstName, aGroupInfo.Start - aGroupInfo.Step );
+ String aFirstName = lcl_GetSpecialNumGroupName( aGroupInfo.mfStart, true, cDecSeparator, aGroupInfo.mbDateValues, pFormatter );
+ lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aFirstName, aGroupInfo.mfStart - aGroupInfo.mfStep );
- String aLastName = lcl_GetSpecialNumGroupName( aGroupInfo.End, false, cDecSeparator, aGroupInfo.DateValues, pFormatter );
- lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aLastName, aGroupInfo.End + aGroupInfo.Step );
+ String aLastName = lcl_GetSpecialNumGroupName( aGroupInfo.mfEnd, false, cDecSeparator, aGroupInfo.mbDateValues, pFormatter );
+ lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aLastName, aGroupInfo.mfEnd + aGroupInfo.mfStep );
}
}
return maMemberEntries;
@@ -1054,7 +1058,7 @@ long ScDPGroupTableData::GetColumnCount()
bool ScDPGroupTableData::IsNumGroupDimension( long nDimension ) const
{
- return ( nDimension < nSourceCount && pNumGroups[nDimension].GetInfo().Enable );
+ return ( nDimension < nSourceCount && pNumGroups[nDimension].GetInfo().mbEnable );
}
void ScDPGroupTableData::GetNumGroupInfo( long nDimension, ScDPNumGroupInfo& rInfo,
@@ -1420,7 +1424,7 @@ sal_Bool ScDPGroupTableData::IsNumOrDateGroup(long nDimension) const
if ( nDimension < nSourceCount )
{
- return pNumGroups[nDimension].GetInfo().Enable ||
+ return pNumGroups[nDimension].GetInfo().mbEnable ||
pNumGroups[nDimension].GetDateHelper();
}
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index e1a9ad15d46c..234ecc065d50 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -229,12 +229,12 @@ XclExpPCField::XclExpPCField(
{
const ScDPNumGroupInfo& rNumInfo = pNumGroupDim->GetInfo();
const ScDPNumGroupInfo& rDateInfo = pNumGroupDim->GetDateInfo();
- OSL_ENSURE( !rNumInfo.Enable || !rDateInfo.Enable,
+ OSL_ENSURE( !rNumInfo.mbEnable || !rDateInfo.mbEnable,
"XclExpPCField::XclExpPCField - numeric and date grouping enabled" );
- if( rNumInfo.Enable )
+ if( rNumInfo.mbEnable )
InitNumGroupField( rDPObj, rNumInfo );
- else if( rDateInfo.Enable )
+ else if( rDateInfo.mbEnable )
InitDateGroupField( rDPObj, rDateInfo, pNumGroupDim->GetDatePart() );
}
}
@@ -261,7 +261,7 @@ XclExpPCField::XclExpPCField(
// add standard group info or date group info
const ScDPNumGroupInfo& rDateInfo = rGroupDim.GetDateInfo();
- if( rDateInfo.Enable && (rGroupDim.GetDatePart() != 0) )
+ if( rDateInfo.mbEnable && (rGroupDim.GetDatePart() != 0) )
InitDateGroupField( rDPObj, rDateInfo, rGroupDim.GetDatePart() );
else
InitStdGroupField( rBaseField, rGroupDim );
@@ -429,10 +429,10 @@ void XclExpPCField::InitStdGroupField( const XclExpPCField& rBaseField, const Sc
void XclExpPCField::InitNumGroupField( const ScDPObject& rDPObj, const ScDPNumGroupInfo& rNumInfo )
{
OSL_ENSURE( IsStandardField(), "XclExpPCField::InitNumGroupField - only for standard fields" );
- OSL_ENSURE( rNumInfo.Enable, "XclExpPCField::InitNumGroupField - numeric grouping not enabled" );
+ OSL_ENSURE( rNumInfo.mbEnable, "XclExpPCField::InitNumGroupField - numeric grouping not enabled" );
// new field type, date type, limit settings (min/max/step/auto)
- if( rNumInfo.DateValues )
+ if( rNumInfo.mbDateValues )
{
// special case: group by days with step count
meFieldType = EXC_PCFIELD_DATEGROUP;
@@ -453,7 +453,7 @@ void XclExpPCField::InitNumGroupField( const ScDPObject& rDPObj, const ScDPNumGr
void XclExpPCField::InitDateGroupField( const ScDPObject& rDPObj, const ScDPNumGroupInfo& rDateInfo, sal_Int32 nDatePart )
{
OSL_ENSURE( IsStandardField() || IsStdGroupField(), "XclExpPCField::InitDateGroupField - only for standard fields" );
- OSL_ENSURE( rDateInfo.Enable, "XclExpPCField::InitDateGroupField - date grouping not enabled" );
+ OSL_ENSURE( rDateInfo.mbEnable, "XclExpPCField::InitDateGroupField - date grouping not enabled" );
// new field type
meFieldType = IsStandardField() ? EXC_PCFIELD_DATEGROUP : EXC_PCFIELD_DATECHILD;
@@ -561,20 +561,20 @@ void XclExpPCField::InsertNumDateGroupItems( const ScDPObject& rDPObj, const ScD
void XclExpPCField::SetNumGroupLimit( const ScDPNumGroupInfo& rNumInfo )
{
- ::set_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMIN, rNumInfo.AutoStart );
- ::set_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMAX, rNumInfo.AutoEnd );
- maNumGroupLimits.AppendNewRecord( new XclExpPCItem( rNumInfo.Start ) );
- maNumGroupLimits.AppendNewRecord( new XclExpPCItem( rNumInfo.End ) );
- maNumGroupLimits.AppendNewRecord( new XclExpPCItem( rNumInfo.Step ) );
+ ::set_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMIN, rNumInfo.mbAutoStart );
+ ::set_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMAX, rNumInfo.mbAutoEnd );
+ maNumGroupLimits.AppendNewRecord( new XclExpPCItem( rNumInfo.mfStart ) );
+ maNumGroupLimits.AppendNewRecord( new XclExpPCItem( rNumInfo.mfEnd ) );
+ maNumGroupLimits.AppendNewRecord( new XclExpPCItem( rNumInfo.mfStep ) );
}
void XclExpPCField::SetDateGroupLimit( const ScDPNumGroupInfo& rDateInfo, bool bUseStep )
{
- ::set_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMIN, rDateInfo.AutoStart );
- ::set_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMAX, rDateInfo.AutoEnd );
- maNumGroupLimits.AppendNewRecord( new XclExpPCItem( GetDateTimeFromDouble( rDateInfo.Start ) ) );
- maNumGroupLimits.AppendNewRecord( new XclExpPCItem( GetDateTimeFromDouble( rDateInfo.End ) ) );
- sal_Int16 nStep = bUseStep ? limit_cast< sal_Int16 >( rDateInfo.Step, 1, SAL_MAX_INT16 ) : 1;
+ ::set_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMIN, rDateInfo.mbAutoStart );
+ ::set_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMAX, rDateInfo.mbAutoEnd );
+ maNumGroupLimits.AppendNewRecord( new XclExpPCItem( GetDateTimeFromDouble( rDateInfo.mfStart ) ) );
+ maNumGroupLimits.AppendNewRecord( new XclExpPCItem( GetDateTimeFromDouble( rDateInfo.mfEnd ) ) );
+ sal_Int16 nStep = bUseStep ? limit_cast< sal_Int16 >( rDateInfo.mfStep, 1, SAL_MAX_INT16 ) : 1;
maNumGroupLimits.AppendNewRecord( new XclExpPCItem( nStep ) );
}
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 0aff093aae79..2d30efb0d35e 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -459,7 +459,7 @@ void XclImpPCField::ConvertDateGroupField( ScDPSaveData& rSaveData, const ScfStr
{
case EXC_PCFIELD_DATEGROUP:
{
- if( aDateInfo.DateValues )
+ if( aDateInfo.mbDateValues )
{
// special case for days only with step value - create numeric grouping
ScDPSaveNumGroupDimension aNumGroupDim( GetFieldName( rVisNames ), aDateInfo );
@@ -497,23 +497,23 @@ void XclImpPCField::ConvertDateGroupField( ScDPSaveData& rSaveData, const ScfStr
ScDPNumGroupInfo XclImpPCField::GetScNumGroupInfo() const
{
ScDPNumGroupInfo aNumInfo;
- aNumInfo.Enable = sal_True;
- aNumInfo.DateValues = false;
- aNumInfo.AutoStart = sal_True;
- aNumInfo.AutoEnd = sal_True;
+ aNumInfo.mbEnable = sal_True;
+ aNumInfo.mbDateValues = false;
+ aNumInfo.mbAutoStart = sal_True;
+ aNumInfo.mbAutoEnd = sal_True;
if( const double* pfMinValue = GetNumGroupLimit( EXC_SXFIELD_INDEX_MIN ) )
{
- aNumInfo.Start = *pfMinValue;
- aNumInfo.AutoStart = ::get_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMIN );
+ aNumInfo.mfStart = *pfMinValue;
+ aNumInfo.mbAutoStart = ::get_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMIN );
}
if( const double* pfMaxValue = GetNumGroupLimit( EXC_SXFIELD_INDEX_MAX ) )
{
- aNumInfo.End = *pfMaxValue;
- aNumInfo.AutoEnd = ::get_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMAX );
+ aNumInfo.mfEnd = *pfMaxValue;
+ aNumInfo.mbAutoEnd = ::get_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMAX );
}
if( const double* pfStepValue = GetNumGroupLimit( EXC_SXFIELD_INDEX_STEP ) )
- aNumInfo.Step = *pfStepValue;
+ aNumInfo.mfStep = *pfStepValue;
return aNumInfo;
}
@@ -521,26 +521,26 @@ ScDPNumGroupInfo XclImpPCField::GetScNumGroupInfo() const
ScDPNumGroupInfo XclImpPCField::GetScDateGroupInfo() const
{
ScDPNumGroupInfo aDateInfo;
- aDateInfo.Enable = sal_True;
- aDateInfo.DateValues = false;
- aDateInfo.AutoStart = sal_True;
- aDateInfo.AutoEnd = sal_True;
+ aDateInfo.mbEnable = sal_True;
+ aDateInfo.mbDateValues = false;
+ aDateInfo.mbAutoStart = sal_True;
+ aDateInfo.mbAutoEnd = sal_True;
if( const DateTime* pMinDate = GetDateGroupLimit( EXC_SXFIELD_INDEX_MIN ) )
{
- aDateInfo.Start = GetDoubleFromDateTime( *pMinDate );
- aDateInfo.AutoStart = ::get_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMIN );
+ aDateInfo.mfStart = GetDoubleFromDateTime( *pMinDate );
+ aDateInfo.mbAutoStart = ::get_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMIN );
}
if( const DateTime* pMaxDate = GetDateGroupLimit( EXC_SXFIELD_INDEX_MAX ) )
{
- aDateInfo.End = GetDoubleFromDateTime( *pMaxDate );
- aDateInfo.AutoEnd = ::get_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMAX );
+ aDateInfo.mfEnd = GetDoubleFromDateTime( *pMaxDate );
+ aDateInfo.mbAutoEnd = ::get_flag( maNumGroupInfo.mnFlags, EXC_SXNUMGROUP_AUTOMAX );
}
// GetDateGroupStep() returns a value for date type "day" in single date groups only
if( const sal_Int16* pnStepValue = GetDateGroupStep() )
{
- aDateInfo.Step = *pnStepValue;
- aDateInfo.DateValues = sal_True;
+ aDateInfo.mfStep = *pnStepValue;
+ aDateInfo.mbDateValues = sal_True;
}
return aDateInfo;
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 4094a166205d..ade9d7dbe780 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -558,49 +558,49 @@ void ScXMLExportDataPilot::WriteDatePart(sal_Int32 nPart)
void ScXMLExportDataPilot::WriteNumGroupInfo(const ScDPNumGroupInfo& rGroupInfo)
{
- OSL_ENSURE(rGroupInfo.Enable, "group dimension should be enabled");
- if (rGroupInfo.DateValues)
+ OSL_ENSURE(rGroupInfo.mbEnable, "group dimension should be enabled");
+ if (rGroupInfo.mbDateValues)
{
- if (rGroupInfo.AutoStart)
+ if (rGroupInfo.mbAutoStart)
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATE_START, XML_AUTO);
else
{
rtl::OUStringBuffer sDate;
- rExport.GetMM100UnitConverter().convertDateTime(sDate, rGroupInfo.Start);
+ rExport.GetMM100UnitConverter().convertDateTime(sDate, rGroupInfo.mfStart);
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATE_START, sDate.makeStringAndClear());
}
- if (rGroupInfo.AutoEnd)
+ if (rGroupInfo.mbAutoEnd)
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATE_END, XML_AUTO);
else
{
rtl::OUStringBuffer sDate;
- rExport.GetMM100UnitConverter().convertDateTime(sDate, rGroupInfo.End);
+ rExport.GetMM100UnitConverter().convertDateTime(sDate, rGroupInfo.mfEnd);
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATE_END, sDate.makeStringAndClear());
}
}
else
{
- if (rGroupInfo.AutoStart)
+ if (rGroupInfo.mbAutoStart)
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_START, XML_AUTO);
else
{
- rtl::OUString sValue( ::rtl::math::doubleToUString( rGroupInfo.Start,
+ rtl::OUString sValue( ::rtl::math::doubleToUString( rGroupInfo.mfStart,
rtl_math_StringFormat_Automatic,
rtl_math_DecimalPlaces_Max, '.', true));
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_START, sValue);
}
- if (rGroupInfo.AutoEnd)
+ if (rGroupInfo.mbAutoEnd)
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_END, XML_AUTO);
else
{
rtl::OUStringBuffer sDate;
- rtl::OUString sValue( ::rtl::math::doubleToUString( rGroupInfo.End,
+ rtl::OUString sValue( ::rtl::math::doubleToUString( rGroupInfo.mfEnd,
rtl_math_StringFormat_Automatic,
rtl_math_DecimalPlaces_Max, '.', true));
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_END, sValue);
}
}
- rtl::OUString sValue( ::rtl::math::doubleToUString( rGroupInfo.Step,
+ rtl::OUString sValue( ::rtl::math::doubleToUString( rGroupInfo.mfStep,
rtl_math_StringFormat_Automatic,
rtl_math_DecimalPlaces_Max, '.', true));
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STEP, sValue);
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 86bf12b18f6c..ee8e3aa9665f 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -1073,13 +1073,13 @@ void ScXMLDataPilotFieldContext::EndElement()
if (bIsGroupField)
{
ScDPNumGroupInfo aInfo;
- aInfo.Enable = sal_True;
- aInfo.DateValues = bDateValue;
- aInfo.AutoStart = bAutoStart;
- aInfo.AutoEnd = bAutoEnd;
- aInfo.Start = fStart;
- aInfo.End = fEnd;
- aInfo.Step = fStep;
+ aInfo.mbEnable = true;
+ aInfo.mbDateValues = bDateValue;
+ aInfo.mbAutoStart = bAutoStart;
+ aInfo.mbAutoEnd = bAutoEnd;
+ aInfo.mfStart = fStart;
+ aInfo.mfEnd = fEnd;
+ aInfo.mfStep = fStep;
if (!sGroupSource.isEmpty())
{
ScDPSaveGroupDimension aGroupDim(sGroupSource, sName);
diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx
index 147e6762445f..fc39e7f08657 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.cxx
+++ b/sc/source/ui/dbgui/dpgroupdlg.cxx
@@ -177,9 +177,9 @@ ScDPNumGroupDlg::ScDPNumGroupDlg( Window* pParent, const ScDPNumGroupInfo& rInfo
{
FreeResource();
- maStartHelper.SetValue( rInfo.AutoStart, rInfo.Start );
- maEndHelper.SetValue( rInfo.AutoEnd, rInfo.End );
- maEdBy.SetValue( (rInfo.Step <= 0.0) ? 1.0 : rInfo.Step );
+ maStartHelper.SetValue( rInfo.mbAutoStart, rInfo.mfStart );
+ maEndHelper.SetValue( rInfo.mbAutoEnd, rInfo.mfEnd );
+ maEdBy.SetValue( (rInfo.mfStep <= 0.0) ? 1.0 : rInfo.mfStep );
/* Set the initial focus, currently it is somewhere after calling all the radio
button click handlers. Now the first enabled editable control is focused. */
@@ -194,19 +194,19 @@ ScDPNumGroupDlg::ScDPNumGroupDlg( Window* pParent, const ScDPNumGroupInfo& rInfo
ScDPNumGroupInfo ScDPNumGroupDlg::GetGroupInfo() const
{
ScDPNumGroupInfo aInfo;
- aInfo.Enable = sal_True;
- aInfo.DateValues = false;
- aInfo.AutoStart = maStartHelper.IsAuto();
- aInfo.AutoEnd = maEndHelper.IsAuto();
+ aInfo.mbEnable = sal_True;
+ aInfo.mbDateValues = false;
+ aInfo.mbAutoStart = maStartHelper.IsAuto();
+ aInfo.mbAutoEnd = maEndHelper.IsAuto();
// get values and silently auto-correct them, if they are not valid
// TODO: error messages in OK event?
- aInfo.Start = maStartHelper.GetValue();
- aInfo.End = maEndHelper.GetValue();
- if( !maEdBy.GetValue( aInfo.Step ) || (aInfo.Step <= 0.0) )
- aInfo.Step = 1.0;
- if( aInfo.End <= aInfo.Start )
- aInfo.End = aInfo.Start + aInfo.Step;
+ aInfo.mfStart = maStartHelper.GetValue();
+ aInfo.mfEnd = maEndHelper.GetValue();
+ if( !maEdBy.GetValue( aInfo.mfStep ) || (aInfo.mfStep <= 0.0) )
+ aInfo.mfStep = 1.0;
+ if( aInfo.mfEnd <= aInfo.mfStart )
+ aInfo.mfEnd = aInfo.mfStart + aInfo.mfStep;
return aInfo;
}
@@ -245,20 +245,20 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( Window* pParent,
maEdStart.SetShowDateCentury( sal_True );
maEdEnd.SetShowDateCentury( sal_True );
- maStartHelper.SetValue( rInfo.AutoStart, rInfo.Start );
- maEndHelper.SetValue( rInfo.AutoEnd, rInfo.End );
+ maStartHelper.SetValue( rInfo.mbAutoStart, rInfo.mfStart );
+ maEndHelper.SetValue( rInfo.mbAutoEnd, rInfo.mfEnd );
if( nDatePart == 0 )
nDatePart = com::sun::star::sheet::DataPilotFieldGroupBy::MONTHS;
for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
maLbUnits.CheckEntryPos( static_cast< sal_uInt16 >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 );
- if( rInfo.DateValues )
+ if( rInfo.mbDateValues )
{
maRbNumDays.Check();
ClickHdl( &maRbNumDays );
- double fNumDays = rInfo.Step;
+ double fNumDays = rInfo.mfStep;
if( fNumDays < 1.0 )
fNumDays = 1.0;
else if( fNumDays > 32767.0 )
@@ -290,19 +290,19 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( Window* pParent,
ScDPNumGroupInfo ScDPDateGroupDlg::GetGroupInfo() const
{
ScDPNumGroupInfo aInfo;
- aInfo.Enable = sal_True;
- aInfo.DateValues = maRbNumDays.IsChecked();
- aInfo.AutoStart = maStartHelper.IsAuto();
- aInfo.AutoEnd = maEndHelper.IsAuto();
+ aInfo.mbEnable = sal_True;
+ aInfo.mbDateValues = maRbNumDays.IsChecked();
+ aInfo.mbAutoStart = maStartHelper.IsAuto();
+ aInfo.mbAutoEnd = maEndHelper.IsAuto();
// get values and silently auto-correct them, if they are not valid
// TODO: error messages in OK event?
- aInfo.Start = maStartHelper.GetValue();
- aInfo.End = maEndHelper.GetValue();
+ aInfo.mfStart = maStartHelper.GetValue();
+ aInfo.mfEnd = maEndHelper.GetValue();
sal_Int64 nNumDays = maEdNumDays.GetValue();
- aInfo.Step = static_cast<double>( aInfo.DateValues ? nNumDays : 0L );
- if( aInfo.End <= aInfo.Start )
- aInfo.End = aInfo.Start + nNumDays;
+ aInfo.mfStep = static_cast<double>( aInfo.mbDateValues ? nNumDays : 0L );
+ if( aInfo.mfEnd <= aInfo.mfStart )
+ aInfo.mfEnd = aInfo.mfStart + nNumDays;
return aInfo;
}
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 7d9eea6a832b..9ff4cb9d03df 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -246,12 +246,12 @@ sal_uInt16 ScDataPilotConversion::FunctionBit( GeneralFunction eFunc )
void ScDataPilotConversion::FillGroupInfo( DataPilotFieldGroupInfo& rInfo, const ScDPNumGroupInfo& rGroupInfo )
{
- rInfo.HasDateValues = rGroupInfo.DateValues;
- rInfo.HasAutoStart = rGroupInfo.AutoStart;
- rInfo.Start = rGroupInfo.Start;
- rInfo.HasAutoEnd = rGroupInfo.AutoEnd;
- rInfo.End = rGroupInfo.End;
- rInfo.Step = rGroupInfo.Step;
+ rInfo.HasDateValues = rGroupInfo.mbDateValues;
+ rInfo.HasAutoStart = rGroupInfo.mbAutoStart;
+ rInfo.Start = rGroupInfo.mfStart;
+ rInfo.HasAutoEnd = rGroupInfo.mbAutoEnd;
+ rInfo.End = rGroupInfo.mfEnd;
+ rInfo.Step = rGroupInfo.mfStep;
}
//------------------------------------------------------------------------
@@ -2464,13 +2464,13 @@ void ScDataPilotFieldObj::setGroupInfo( const DataPilotFieldGroupInfo* pInfo )
if( pInfo && lclCheckMinMaxStep( *pInfo ) )
{
ScDPNumGroupInfo aInfo;
- aInfo.Enable = sal_True;
- aInfo.DateValues = pInfo->HasDateValues;
- aInfo.AutoStart = pInfo->HasAutoStart;
- aInfo.AutoEnd = pInfo->HasAutoEnd;
- aInfo.Start = pInfo->Start;
- aInfo.End = pInfo->End;
- aInfo.Step = pInfo->Step;
+ aInfo.mbEnable = sal_True;
+ aInfo.mbDateValues = pInfo->HasDateValues;
+ aInfo.mbAutoStart = pInfo->HasAutoStart;
+ aInfo.mbAutoEnd = pInfo->HasAutoEnd;
+ aInfo.mfStart = pInfo->Start;
+ aInfo.mfEnd = pInfo->End;
+ aInfo.mfStep = pInfo->Step;
Reference< XNamed > xNamed( pInfo->SourceField, UNO_QUERY );
if( xNamed.is() )
{
@@ -2746,13 +2746,13 @@ Reference < XDataPilotField > SAL_CALL ScDataPilotFieldObj::createDateGroup( con
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
ScDPNumGroupInfo aInfo;
- aInfo.Enable = sal_True;
- aInfo.DateValues = (rInfo.GroupBy == DAYS) && (rInfo.Step >= 1.0);
- aInfo.AutoStart = rInfo.HasAutoStart;
- aInfo.AutoEnd = rInfo.HasAutoEnd;
- aInfo.Start = rInfo.Start;
- aInfo.End = rInfo.End;
- aInfo.Step = static_cast< sal_Int32 >( rInfo.Step );
+ aInfo.mbEnable = true;
+ aInfo.mbDateValues = (rInfo.GroupBy == DAYS) && (rInfo.Step >= 1.0);
+ aInfo.mbAutoStart = rInfo.HasAutoStart;
+ aInfo.mbAutoEnd = rInfo.HasAutoEnd;
+ aInfo.mfStart = rInfo.Start;
+ aInfo.mfEnd = rInfo.End;
+ aInfo.mfStep = static_cast< sal_Int32 >( rInfo.Step );
// create a local copy of the entire save data (will be written back below)
ScDPSaveData aSaveData = *pDPObj->GetSaveData();
@@ -2769,12 +2769,12 @@ Reference < XDataPilotField > SAL_CALL ScDataPilotFieldObj::createDateGroup( con
const ScDPSaveNumGroupDimension* pNumGroupDim = rDimData.GetNumGroupDim( aSrcDimName );
// do not group by dates, if named groups or numeric grouping is present
- bool bHasNamedGrouping = pGroupDim && !pGroupDim->GetDateInfo().Enable;
- bool bHasNumGrouping = pNumGroupDim && pNumGroupDim->GetInfo().Enable && !pNumGroupDim->GetInfo().DateValues && !pNumGroupDim->GetDateInfo().Enable;
+ bool bHasNamedGrouping = pGroupDim && !pGroupDim->GetDateInfo().mbEnable;
+ bool bHasNumGrouping = pNumGroupDim && pNumGroupDim->GetInfo().mbEnable && !pNumGroupDim->GetInfo().mbDateValues && !pNumGroupDim->GetDateInfo().mbEnable;
if( bHasNamedGrouping || bHasNumGrouping )
throw IllegalArgumentException();
- if( aInfo.DateValues ) // create day ranges grouping
+ if( aInfo.mbDateValues ) // create day ranges grouping
{
// first remove all named group dimensions
while( pGroupDim )
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index c7a80249eba5..a1683b4ea6f0 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -988,9 +988,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) )
{
ScDPNumGroupInfo aNumInfo;
- aNumInfo.Enable = sal_True;
- aNumInfo.AutoStart = sal_True;
- aNumInfo.AutoEnd = sal_True;
+ aNumInfo.mbEnable = true;
+ aNumInfo.mbAutoStart = true;
+ aNumInfo.mbAutoEnd = true;
sal_Int32 nParts = 0;
if ( pTabViewShell->HasSelectionForDateGroup( aNumInfo, nParts ) )
{
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index ca1de035b2a3..127b9509c8ee 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -836,7 +836,7 @@ bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
rOldInfo = pNumGroupDim->GetDateInfo();
bFound = sal_True;
}
- else if ( pNumGroupDim->GetInfo().DateValues )
+ else if ( pNumGroupDim->GetInfo().mbDateValues )
{
// Numerical grouping with DateValues flag is used for grouping
// of days with a "Number of days" value.
@@ -890,10 +890,10 @@ bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
{
bFound = sal_True;
// use currently selected value for automatic limits
- if( rOldInfo.AutoStart )
- rOldInfo.Start = pDoc->GetValue( aSelRange.aStart );
- if( rOldInfo.AutoEnd )
- rOldInfo.End = pDoc->GetValue( aSelRange.aStart );
+ if( rOldInfo.mbAutoStart )
+ rOldInfo.mfStart = pDoc->GetValue( aSelRange.aStart );
+ if( rOldInfo.mbAutoEnd )
+ rOldInfo.mfEnd = pDoc->GetValue( aSelRange.aStart );
}
}
}
@@ -959,10 +959,10 @@ bool ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
{
bFound = sal_True;
// use currently selected value for automatic limits
- if( rOldInfo.AutoStart )
- rOldInfo.Start = pDoc->GetValue( aSelRange.aStart );
- if( rOldInfo.AutoEnd )
- rOldInfo.End = pDoc->GetValue( aSelRange.aStart );
+ if( rOldInfo.mbAutoStart )
+ rOldInfo.mfStart = pDoc->GetValue( aSelRange.aStart );
+ if( rOldInfo.mbAutoEnd )
+ rOldInfo.mfEnd = pDoc->GetValue( aSelRange.aStart );
}
}
}
@@ -1047,13 +1047,13 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
// innermost part: create NumGroupDimension (replacing original values)
// Dimension name is left unchanged
- if ( (nParts == sheet::DataPilotFieldGroupBy::DAYS) && (rInfo.Step >= 1.0) )
+ if ( (nParts == sheet::DataPilotFieldGroupBy::DAYS) && (rInfo.mfStep >= 1.0) )
{
// only days, and a step value specified: use numerical grouping
// with DateValues flag, not date grouping
ScDPNumGroupInfo aNumInfo( rInfo );
- aNumInfo.DateValues = sal_True;
+ aNumInfo.mbDateValues = true;
ScDPSaveNumGroupDimension aNumGroupDim( aBaseDimName, aNumInfo );
pDimData->AddNumGroupDimension( aNumGroupDim );