Kaydet (Commit) 1cc6db3c authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Check for member visibility in the dimension code.

Change-Id: Ic3370f96c0582b7b0c80c6872ee9a55e38c2b842
üst 7c936145
...@@ -1715,7 +1715,7 @@ void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, ...@@ -1715,7 +1715,7 @@ void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
if ( bHasChild && nUserSubCount > 1 ) if ( bHasChild && nUserSubCount > 1 )
{ {
aSubState.nRowSubTotalFunc = nUserPos; aSubState.nRowSubTotalFunc = nUserPos;
aSubState.eRowForce = lcl_GetForceFunc( /*pParentLevel*/GetParentLevel(), nUserPos ); aSubState.eRowForce = lcl_GetForceFunc(GetParentLevel(), nUserPos);
} }
for ( long nSubCount=0; nSubCount<nSubSize; nSubCount++ ) for ( long nSubCount=0; nSubCount<nSubSize; nSubCount++ )
...@@ -1725,8 +1725,9 @@ void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, ...@@ -1725,8 +1725,9 @@ void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
else if ( pResultData->GetColStartMeasure() == SC_DPMEASURE_ALL ) else if ( pResultData->GetColStartMeasure() == SC_DPMEASURE_ALL )
nMemberMeasure = SC_DPMEASURE_ALL; nMemberMeasure = SC_DPMEASURE_ALL;
pDataRoot->UpdateRunningTotals( pRefMember, nMemberMeasure, if (pRefMember->IsVisible())
bHasChild, aSubState, rRunning, rTotals, *this ); pDataRoot->UpdateRunningTotals(
pRefMember, nMemberMeasure, bHasChild, aSubState, rRunning, rTotals, *this);
} }
} }
} }
...@@ -2221,8 +2222,6 @@ void ScDPDataMember::UpdateRunningTotals( ...@@ -2221,8 +2222,6 @@ void ScDPDataMember::UpdateRunningTotals(
{ {
OSL_ENSURE( pRefMember == pResultMember || !pResultMember, "bla" ); OSL_ENSURE( pRefMember == pResultMember || !pResultMember, "bla" );
if ( pRefMember->IsVisible() ) //! here or in ScDPDataDimension::UpdateRunningTotals ???
{
const ScDPDataDimension* pDataChild = GetChildDimension(); const ScDPDataDimension* pDataChild = GetChildDimension();
const ScDPResultDimension* pRefChild = pRefMember->GetChildDimension(); const ScDPResultDimension* pRefChild = pRefMember->GetChildDimension();
...@@ -2595,7 +2594,6 @@ void ScDPDataMember::UpdateRunningTotals( ...@@ -2595,7 +2594,6 @@ void ScDPDataMember::UpdateRunningTotals(
pDataChild->UpdateRunningTotals( pRefChild, nMeasure, pDataChild->UpdateRunningTotals( pRefChild, nMeasure,
bIsSubTotalRow, rSubState, rRunning, rTotals, rRowParent ); bIsSubTotalRow, rSubState, rRunning, rTotals, rRowParent );
} }
}
} }
#if DEBUG_PIVOT_TABLE #if DEBUG_PIVOT_TABLE
...@@ -3781,7 +3779,7 @@ void ScDPDataDimension::UpdateRunningTotals( const ScDPResultDimension* pRefDim, ...@@ -3781,7 +3779,7 @@ void ScDPDataDimension::UpdateRunningTotals( const ScDPResultDimension* pRefDim,
} }
const ScDPResultMember* pRefMember = pRefDim->GetMember(nMemberPos); const ScDPResultMember* pRefMember = pRefDim->GetMember(nMemberPos);
if ( pRefMember->IsVisible() ) //! here or in ScDPDataMember::UpdateRunningTotals ??? if ( pRefMember->IsVisible() )
{ {
if ( bIsDataLayout ) if ( bIsDataLayout )
rRunning.AddColIndex( 0, 0 ); rRunning.AddColIndex( 0, 0 );
...@@ -3789,8 +3787,8 @@ void ScDPDataDimension::UpdateRunningTotals( const ScDPResultDimension* pRefDim, ...@@ -3789,8 +3787,8 @@ void ScDPDataDimension::UpdateRunningTotals( const ScDPResultDimension* pRefDim,
rRunning.AddColIndex( i, nSorted ); rRunning.AddColIndex( i, nSorted );
ScDPDataMember* pDataMember = maMembers[nMemberPos]; ScDPDataMember* pDataMember = maMembers[nMemberPos];
pDataMember->UpdateRunningTotals( pRefMember, nMemberMeasure, pDataMember->UpdateRunningTotals(
bIsSubTotalRow, rSubState, rRunning, rTotals, rRowParent ); pRefMember, nMemberMeasure, bIsSubTotalRow, rSubState, rRunning, rTotals, rRowParent);
rRunning.RemoveColIndex(); rRunning.RemoveColIndex();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment