dr78: #i115659# check validity of member and dimension settings

# HG changeset patch
# User Daniel Rentz [dr] <daniel.rentz@oracle.com>
# Date 1292344724 -3600
# Node ID 8ec1023e8658320deb61a5b3cdc40aeb9c3d34b1
# Parent  838c2fed9f13c5884d7cbc72c0239d1ec564dcb0
This commit is contained in:
Eike Rathke 2011-11-28 00:25:47 +01:00
parent 078796d286
commit 22029818cb
2 changed files with 8 additions and 6 deletions

View file

@ -78,12 +78,12 @@ public:
const ::rtl::OUString& GetName() const
{ return aName; }
bool HasIsVisible() const;
SC_DLLPUBLIC bool HasIsVisible() const;
SC_DLLPUBLIC void SetIsVisible(bool bSet);
bool GetIsVisible() const
{ return bool(nVisibleMode); }
bool HasShowDetails() const;
SC_DLLPUBLIC bool HasShowDetails() const;
SC_DLLPUBLIC void SetShowDetails(bool bSet);
bool GetShowDetails() const
{ return bool(nShowDetailsMode); }

View file

@ -991,8 +991,10 @@ const String& XclExpPTItem::GetItemName() const
void XclExpPTItem::SetPropertiesFromMember( const ScDPSaveMember& rSaveMem )
{
::set_flag( maItemInfo.mnFlags, EXC_SXVI_HIDDEN, !rSaveMem.GetIsVisible() );
::set_flag( maItemInfo.mnFlags, EXC_SXVI_HIDEDETAIL, !rSaveMem.GetShowDetails() );
// #i115659# GetIsVisible() is not valid if HasIsVisible() returns false, default is true then
::set_flag( maItemInfo.mnFlags, EXC_SXVI_HIDDEN, !rSaveMem.HasIsVisible() || !rSaveMem.GetIsVisible() );
// #i115659# GetShowDetails() is not valid if HasShowDetails() returns false, default is true then
::set_flag( maItemInfo.mnFlags, EXC_SXVI_HIDEDETAIL, !rSaveMem.HasShowDetails() || !rSaveMem.GetShowDetails() );
// visible name
const OUString* pVisName = rSaveMem.GetLayoutName();
@ -1082,8 +1084,8 @@ void XclExpPTField::SetPropertiesFromDim( const ScDPSaveDimension& rSaveDim )
OSL_ENSURE( eOrient != DataPilotFieldOrientation_DATA, "XclExpPTField::SetPropertiesFromDim - called for data field" );
maFieldInfo.AddApiOrient( eOrient );
// show empty items
::set_flag( maFieldExtInfo.mnFlags, EXC_SXVDEX_SHOWALL, rSaveDim.GetShowEmpty() );
// show empty items (#i115659# GetShowEmpty() is not valid if HasShowEmpty() returns false, default is false then)
::set_flag( maFieldExtInfo.mnFlags, EXC_SXVDEX_SHOWALL, rSaveDim.HasShowEmpty() && rSaveDim.GetShowEmpty() );
// visible name
const OUString* pLayoutName = rSaveDim.GetLayoutName();