diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-11 15:33:23 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-11 23:37:11 -0500 |
commit | ecb7b8b698e47015b23cd4f7f7812df55c682a1f (patch) | |
tree | fdfae4248350d424ed48424973f445b9316f9a85 | |
parent | ab3c544633612a2079a918bf05bb59a21e17f208 (diff) |
Let's remove this underused bAlive flag....
It's no longer that useful in today's pivot table design.
Change-Id: I665a7707126793dfde17a2221ba563d22a59aad1
-rw-r--r-- | sc/inc/dpobject.hxx | 7 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/excel/xipivot.cxx | 1 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldpimp.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pvlaydlg.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/undo/undodat.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 1 |
9 files changed, 0 insertions, 26 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index b74db73e0266..fc8d066d2be0 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -100,7 +100,6 @@ private: long nHeaderRows; // page fields plus filter button bool mbHeaderLayout:1; // true : grid, false : standard bool bAllowMove:1; - bool bAlive:1; // false if only used to hold settings bool bSettingsChanged:1; bool mbEnableGetPivotData:1; @@ -120,12 +119,6 @@ public: void EnableGetPivotData(bool b); - /** - * When a DP object is "alive", it has table output on a sheet. This flag - * doesn't really change the behavior of the object, but is used only for - * testing purposes. - */ - void SetAlive(bool bSet); void SetAllowMove(bool bSet); void InvalidateData(); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 14d0da128da7..2d736de9a0dd 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1817,7 +1817,6 @@ ScDPObject* createDPFromSourceDesc( pDim->SetShowEmpty(true); pDPObj->SetSaveData(aSaveData); - pDPObj->SetAlive(true); pDPObj->InvalidateData(); return pDPObj; diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 69e7901aa851..d86a012118e3 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -315,7 +315,6 @@ ScDPObject::ScDPObject( ScDocument* pD ) : nHeaderRows( 0 ), mbHeaderLayout(false), bAllowMove(false), - bAlive(false), bSettingsChanged(false), mbEnableGetPivotData(true) { @@ -336,7 +335,6 @@ ScDPObject::ScDPObject(const ScDPObject& r) : nHeaderRows( r.nHeaderRows ), mbHeaderLayout( r.mbHeaderLayout ), bAllowMove(false), - bAlive(false), bSettingsChanged(false), mbEnableGetPivotData(r.mbEnableGetPivotData) { @@ -366,11 +364,6 @@ void ScDPObject::EnableGetPivotData(bool b) mbEnableGetPivotData = b; } -void ScDPObject::SetAlive(bool bSet) -{ - bAlive = bSet; -} - void ScDPObject::SetAllowMove(bool bSet) { bAllowMove = bSet; @@ -628,10 +621,6 @@ void ScDPObject::CreateObjects() { if (!xSource.is()) { - //! cache DPSource and/or Output? - - OSL_ENSURE( bAlive, "CreateObjects on non-inserted DPObject" ); - DELETEZ( pOutput ); // not valid when xSource is changed if ( pServDesc ) @@ -3295,7 +3284,6 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const // none found, re-insert deleted object (see ScUndoDataPilot::Undo) ScDPObject* pDestObj = new ScDPObject(rSrcObj); - pDestObj->SetAlive(true); r.InsertNewTable(pDestObj); } } diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index f20550207a89..7d0642614b80 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -1438,7 +1438,6 @@ void XclImpPivotTable::Convert() pDPObj->SetSaveData( aSaveData ); pDPObj->SetSheetDesc( aDesc ); pDPObj->SetOutRange( aOutRange ); - pDPObj->SetAlive(true); pDPObj->SetHeaderLayout( maPTViewEx9Info.mnGridLayout == 0 ); GetDoc().GetDPCollection()->InsertNewTable(pDPObj); diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx index 229db29e6355..ac42282316c7 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -551,7 +551,6 @@ void ScXMLDataPilotTableContext::EndElement() if ( pDPCollection->GetByName(pDPObject->GetName()) ) pDPObject->SetName( String() ); // ignore the invalid name, create a new name in AfterXMLLoading - pDPObject->SetAlive(sal_True); pDPCollection->InsertNewTable(pDPObject); } SetButtons(); diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 9f01ab230dfb..cc6f6f6a3883 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -133,7 +133,6 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window mnOffset(0), mbRefInputMode( false ) { - mxDlgDPObject->SetAlive( true ); // needed to get structure information mxDlgDPObject->FillOldParam( maPivotData ); mxDlgDPObject->FillLabelData( maPivotData ); diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 1f096108373b..18527d629e8d 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -1310,7 +1310,6 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb if ( pDoc->GetDPCollection()->GetByName(pDestObj->GetName()) ) pDestObj->SetName( String() ); // ignore the invalid name, create a new name below - pDestObj->SetAlive(sal_True); if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) ) { OSL_FAIL("cannot insert DPObject"); diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index 19f60ef2aeec..ee8105255ee1 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -1640,7 +1640,6 @@ void ScUndoDataPilot::Undo() // re-insert deleted object ScDPObject* pDestObj = new ScDPObject( *pOldDPObject ); - pDestObj->SetAlive(sal_True); if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) ) { OSL_FAIL("cannot insert DPObject"); diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 07c269384aa0..d3d2637a0fd1 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1413,7 +1413,6 @@ ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) : ScDataPilotDescriptorBase( pDocSh ), mpDPObject(new ScDPObject(pDocSh ? pDocSh->GetDocument() : NULL) ) { - mpDPObject->SetAlive(sal_True); ScDPSaveData aSaveData; // set defaults like in ScPivotParam constructor aSaveData.SetColumnGrand( sal_True ); |