summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-08-25 13:53:16 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-08-25 13:53:16 +0000
commitbb89c4132f4b2c9e8d071eb8812e2a28e89ac8aa (patch)
treea533ccdde0dbe2913bb1257e4d41c68fcd3f9058
parent9e8e36433e326a33d9c69de35b4e5dfdbe7b7cc5 (diff)
CWS-TOOLING: integrate CWS koheicoderemoval02
2009-07-24 Kohei Yoshida Resurrected one method that was now used after the rebase. Now the entire sc module builds. 2009-07-24 Kohei Yoshida Rebased to DEV300_m53. 2009-07-23 Kohei Yoshida resolved conflict during merge to DEV300_m52. 2009-05-09 Kohei Yoshida #i95953# partially applied Caolan's patch. 2009-05-09 Kohei Yoshida #i101326# Removed old pivot implementation code that was already disabled. 2009-05-09 Kohei Yoshida More unused methods commented out. 2009-05-09 Kohei Yoshida More unused methods commented out. 2009-05-08 Kohei Yoshida Removed more unused methods, mostly related to binfilter methods. 2009-05-08 Kohei Yoshida #i95953# the first round of unused method removal, based solely on Caolan's list. All removed methods were double-checked manually to make sure they are really unused, followed by a build test with debug on.
-rw-r--r--sc/inc/address.hxx2
-rw-r--r--sc/inc/attarray.hxx3
-rw-r--r--sc/inc/attrib.hxx4
-rw-r--r--sc/inc/cell.hxx7
-rw-r--r--sc/inc/chartarr.hxx1
-rw-r--r--sc/inc/chartpos.hxx5
-rw-r--r--sc/inc/chgtrack.hxx62
-rw-r--r--sc/inc/collect.hxx6
-rw-r--r--sc/inc/column.hxx10
-rw-r--r--sc/inc/conditio.hxx4
-rw-r--r--sc/inc/dapiuno.hxx3
-rw-r--r--sc/inc/dbcolect.hxx2
-rw-r--r--sc/inc/document.hxx25
-rw-r--r--sc/inc/docuno.hxx1
-rw-r--r--sc/inc/dpcachetable.hxx6
-rw-r--r--sc/inc/dpobject.hxx6
-rw-r--r--sc/inc/dpsave.hxx1
-rw-r--r--sc/inc/dptabsrc.hxx4
-rw-r--r--sc/inc/global.hxx9
-rw-r--r--sc/inc/markarr.hxx2
-rw-r--r--sc/inc/olinetab.hxx2
-rw-r--r--sc/inc/pivot.hxx232
-rw-r--r--sc/inc/rangenam.hxx6
-rw-r--r--sc/inc/rechead.hxx27
-rw-r--r--sc/inc/scmatrix.hxx10
-rw-r--r--sc/inc/stlpool.hxx2
-rw-r--r--sc/inc/subtotal.hxx29
-rw-r--r--sc/inc/table.hxx8
-rw-r--r--sc/inc/validat.hxx2
-rw-r--r--sc/source/core/data/attarray.cxx6
-rw-r--r--sc/source/core/data/attrib.cxx160
-rw-r--r--sc/source/core/data/cell.cxx17
-rw-r--r--sc/source/core/data/column.cxx10
-rw-r--r--sc/source/core/data/column2.cxx48
-rw-r--r--sc/source/core/data/conditio.cxx7
-rw-r--r--sc/source/core/data/documen2.cxx60
-rw-r--r--sc/source/core/data/documen3.cxx47
-rw-r--r--sc/source/core/data/document.cxx20
-rw-r--r--sc/source/core/data/dpcachetable.cxx25
-rw-r--r--sc/source/core/data/dpobject.cxx67
-rw-r--r--sc/source/core/data/dpsave.cxx25
-rw-r--r--sc/source/core/data/dpsdbtab.cxx9
-rw-r--r--sc/source/core/data/dpshttab.cxx6
-rw-r--r--sc/source/core/data/dptabsrc.cxx34
-rw-r--r--sc/source/core/data/global2.cxx42
-rw-r--r--sc/source/core/data/markarr.cxx8
-rw-r--r--sc/source/core/data/pivot.cxx1991
-rw-r--r--sc/source/core/data/pivot2.cxx426
-rw-r--r--sc/source/core/data/stlpool.cxx8
-rw-r--r--sc/source/core/data/table1.cxx10
-rw-r--r--sc/source/core/data/table2.cxx46
-rw-r--r--sc/source/core/data/validat.cxx7
-rw-r--r--sc/source/core/inc/refupdat.hxx5
-rw-r--r--sc/source/core/tool/address.cxx14
-rw-r--r--sc/source/core/tool/chartpos.cxx62
-rw-r--r--sc/source/core/tool/chgtrack.cxx514
-rw-r--r--sc/source/core/tool/collect.cxx32
-rw-r--r--sc/source/core/tool/compiler.cxx71
-rw-r--r--sc/source/core/tool/rangenam.cxx46
-rw-r--r--sc/source/core/tool/rechead.cxx56
-rw-r--r--sc/source/core/tool/refupdat.cxx33
-rw-r--r--sc/source/core/tool/scmatrix.cxx84
-rw-r--r--sc/source/core/tool/subtotal.cxx182
-rw-r--r--sc/source/filter/excel/excrecds.cxx6
-rw-r--r--sc/source/filter/excel/tokstack.cxx50
-rw-r--r--sc/source/filter/excel/xelink.cxx10
-rw-r--r--sc/source/filter/excel/xename.cxx8
-rw-r--r--sc/source/filter/excel/xepivot.cxx16
-rw-r--r--sc/source/filter/excel/xetable.cxx60
-rw-r--r--sc/source/filter/excel/xiescher.cxx8
-rw-r--r--sc/source/filter/excel/xihelper.cxx38
-rw-r--r--sc/source/filter/excel/xilink.cxx66
-rw-r--r--sc/source/filter/excel/xlstyle.cxx10
-rw-r--r--sc/source/filter/inc/excrecds.hxx1
-rw-r--r--sc/source/filter/inc/op.h2
-rw-r--r--sc/source/filter/inc/qpro.hxx1
-rw-r--r--sc/source/filter/inc/tokstack.hxx2
-rw-r--r--sc/source/filter/inc/xelink.hxx4
-rw-r--r--sc/source/filter/inc/xename.hxx4
-rw-r--r--sc/source/filter/inc/xepivot.hxx8
-rw-r--r--sc/source/filter/inc/xetable.hxx34
-rw-r--r--sc/source/filter/inc/xiescher.hxx4
-rw-r--r--sc/source/filter/inc/xihelper.hxx40
-rw-r--r--sc/source/filter/inc/xlstyle.hxx4
-rw-r--r--sc/source/filter/lotus/op.cxx28
-rw-r--r--sc/source/filter/qpro/qpro.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx74
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx56
-rw-r--r--sc/source/ui/docshell/docfunc.cxx72
-rw-r--r--sc/source/ui/docshell/docsh5.cxx7
-rw-r--r--sc/source/ui/formdlg/privsplt.cxx18
-rw-r--r--sc/source/ui/inc/AccessibleDocumentPagePreview.hxx6
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx1
-rw-r--r--sc/source/ui/inc/csvtablebox.hxx10
-rw-r--r--sc/source/ui/inc/docfunc.hxx2
-rw-r--r--sc/source/ui/inc/docsh.hxx7
-rw-r--r--sc/source/ui/inc/drawview.hxx2
-rw-r--r--sc/source/ui/inc/gridwin.hxx17
-rw-r--r--sc/source/ui/inc/output.hxx4
-rw-r--r--sc/source/ui/inc/privsplt.hxx1
-rw-r--r--sc/source/ui/inc/refundo.hxx6
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/inc/undotab.hxx40
-rw-r--r--sc/source/ui/inc/viewutil.hxx4
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx5
-rw-r--r--sc/source/ui/undo/refundo.cxx21
-rw-r--r--sc/source/ui/undo/undotab.cxx107
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx47
-rw-r--r--sc/source/ui/unoobj/docuno.cxx7
-rw-r--r--sc/source/ui/view/cellsh2.cxx16
-rw-r--r--sc/source/ui/view/drawview.cxx50
-rw-r--r--sc/source/ui/view/gridwin.cxx24
-rw-r--r--sc/source/ui/view/gridwin2.cxx444
-rw-r--r--sc/source/ui/view/output.cxx16
-rw-r--r--sc/source/ui/view/tabview.cxx32
-rw-r--r--sc/source/ui/view/tabview3.cxx10
-rw-r--r--sc/source/ui/view/viewutil.cxx60
117 files changed, 807 insertions, 5430 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index b8d5ecec1..001a0d187 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -276,7 +276,7 @@ public:
{}
/* Use the formula::FormulaGrammar::AddressConvention associated with rAddr::Tab() */
Details( const ScDocument* pDoc, const ScAddress & rAddr );
- void SetPos( const ScDocument* pDoc, const ScAddress & rAddr );
+//UNUSED2009-05 void SetPos( const ScDocument* pDoc, const ScAddress & rAddr );
};
SC_DLLPUBLIC static const Details detailsOOOa1;
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index 6fbec9597..f3bfa883d 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -110,8 +110,9 @@ public:
void SetTab(SCTAB nNewTab) { nTab = nNewTab; }
void SetCol(SCCOL nNewCol) { nCol = nNewCol; }
-
+#ifdef DBG_UTIL
void TestData() const;
+#endif
void Reset( const ScPatternAttr* pPattern, BOOL bAlloc = TRUE );
BOOL Concat(SCSIZE nPos);
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 590acd2c6..72a476960 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -244,8 +244,8 @@ public:
const IntlWrapper* pIntl = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- BOOL GetTableList( List& aList ) const;
- void SetTableList( const List& aList );
+//UNUSED2009-05 BOOL GetTableList( List& aList ) const;
+//UNUSED2009-05 void SetTableList( const List& aList );
public:
USHORT nCount;
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 4d450d395..96a32ab12 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -59,9 +59,6 @@ class ScCodeArray;
class ScProgress;
class ScPostIt;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
-
// ============================================================================
/** Default cell clone flags: do not start listening, do not adjust 3D refs to
@@ -196,10 +193,6 @@ public:
~ScNoteCell();
#endif
- ScNoteCell( SvStream& rStream, USHORT nVer );
-
- void Save( SvStream& rStream ) const;
-
private:
ScNoteCell( const ScNoteCell& );
};
diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx
index d87332220..ca54cfe68 100644
--- a/sc/inc/chartarr.hxx
+++ b/sc/inc/chartarr.hxx
@@ -40,7 +40,6 @@
class ScAddress;
class Table;
class ScDocument;
-class ScMultipleReadHeader;
// ScMemChart is a stripped-down SchMemChart from old chart,
diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx
index 9edf794e2..31e5d5395 100644
--- a/sc/inc/chartpos.hxx
+++ b/sc/inc/chartpos.hxx
@@ -100,8 +100,8 @@ public:
return ppRowHeader[ nChartRow ];
return NULL;
}
- ScRangeListRef GetColRanges( SCCOL nChartCol ) const;
- ScRangeListRef GetRowRanges( SCROW nChartRow ) const;
+//UNUSED2009-05 ScRangeListRef GetColRanges( SCCOL nChartCol ) const;
+//UNUSED2009-05 ScRangeListRef GetRowRanges( SCROW nChartRow ) const;
};
@@ -114,7 +114,6 @@ enum ScChartGlue {
};
class ScDocument;
-class ScMultipleReadHeader;
class ScChartPositioner // nur noch Parameter-Struct
{
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 91d433c9c..89cfcf5f2 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -89,8 +89,6 @@ enum ScChangeActionClipMode
};
class SvStream;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
// --- ScChangeActionLinkEntry ---------------------------------------------
@@ -278,28 +276,8 @@ protected:
const ScBigRange&,
const ULONG nAction);
- ScChangeAction( SvStream&,
- ScMultipleReadHeader&, ScChangeTrack* );
virtual ~ScChangeAction();
- static void StoreCell( ScBaseCell*, SvStream&,
- ScMultipleWriteHeader& );
- static ScBaseCell* LoadCell( SvStream&, ScMultipleReadHeader&,
- ScDocument*, USHORT nVer );
-
- static BOOL StoreLinkChain( ScChangeActionLinkEntry*,
- SvStream& );
- static BOOL LoadLinkChain( ScChangeAction*,
- ScChangeActionLinkEntry**,
- SvStream&, ScChangeTrack*,
- BOOL bLinkDeleted );
-
- static BOOL StoreCellList( ScChangeActionCellListEntry*,
- SvStream& );
- static BOOL LoadCellList( ScChangeAction* pOfAction,
- ScChangeActionCellListEntry*&, SvStream&,
- ScChangeTrack* );
-
String GetRefString( const ScBigRange&,
ScDocument*, BOOL bFlag3D = FALSE ) const;
@@ -367,10 +345,6 @@ protected:
// used in Reject() instead of IsRejectable()
BOOL IsInternalRejectable() const;
- virtual BOOL Store( SvStream&, ScMultipleWriteHeader& ) const;
- virtual BOOL StoreLinks( SvStream& ) const;
- virtual BOOL LoadLinks( SvStream&, ScChangeTrack* );
-
// Derived classes that hold a pointer to the
// ChangeTrack must return that. Otherwise NULL.
virtual const ScChangeTrack* GetChangeTrack() const = 0;
@@ -491,8 +465,6 @@ class ScChangeActionIns : public ScChangeAction
friend class ScChangeTrack;
ScChangeActionIns( const ScRange& rRange );
- ScChangeActionIns( SvStream&,
- ScMultipleReadHeader&, ScChangeTrack* );
virtual ~ScChangeActionIns();
virtual void AddContent( ScChangeActionContent* ) {}
@@ -500,8 +472,6 @@ class ScChangeActionIns : public ScChangeAction
virtual BOOL Reject( ScDocument* );
- virtual BOOL Store( SvStream&, ScMultipleWriteHeader& ) const;
-
virtual const ScChangeTrack* GetChangeTrack() const { return 0; }
public:
@@ -586,9 +556,6 @@ class ScChangeActionDel : public ScChangeAction
ScChangeActionDel( const ScRange& rRange,
SCsCOL nDx, SCsROW nDy, ScChangeTrack* );
- ScChangeActionDel( SvStream&,
- ScMultipleReadHeader&, ScDocument*,
- USHORT nVer, ScChangeTrack* );
virtual ~ScChangeActionDel();
ScChangeActionIns* GetCutOffInsert() { return pCutOff; }
@@ -607,9 +574,6 @@ class ScChangeActionDel : public ScChangeAction
virtual const ScChangeTrack* GetChangeTrack() const { return pTrack; }
- virtual BOOL StoreLinks( SvStream& ) const;
- virtual BOOL LoadLinks( SvStream&, ScChangeTrack* );
-
public:
ScChangeActionDel(const ULONG nActionNumber,
const ScChangeActionState eState,
@@ -687,8 +651,6 @@ class ScChangeActionMove : public ScChangeAction
nStartLastCut(0),
nEndLastCut(0)
{}
- ScChangeActionMove( SvStream&,
- ScMultipleReadHeader&, ScChangeTrack* );
virtual ~ScChangeActionMove();
virtual void AddContent( ScChangeActionContent* );
@@ -709,10 +671,6 @@ class ScChangeActionMove : public ScChangeAction
virtual const ScChangeTrack* GetChangeTrack() const { return pTrack; }
- virtual BOOL Store( SvStream&, ScMultipleWriteHeader& ) const;
- virtual BOOL StoreLinks( SvStream& ) const;
- virtual BOOL LoadLinks( SvStream&, ScChangeTrack* );
-
protected:
using ScChangeAction::GetRefString;
@@ -765,10 +723,6 @@ class ScChangeActionContent : public ScChangeAction
ScChangeActionContent* pNextInSlot; // in gleichem Slot
ScChangeActionContent** ppPrevInSlot;
- ScChangeActionContent( SvStream&,
- ScMultipleReadHeader&, ScDocument*,
- USHORT nVer, ScChangeTrack* );
-
void InsertInSlot( ScChangeActionContent** pp )
{
if ( !ppPrevInSlot )
@@ -849,10 +803,6 @@ class ScChangeActionContent : public ScChangeAction
void PutValueToDoc( ScBaseCell*, const String&,
ScDocument*, SCsCOL nDx, SCsROW nDy ) const;
- virtual BOOL Store( SvStream&, ScMultipleWriteHeader& ) const;
- virtual BOOL StoreLinks( SvStream& ) const;
- virtual BOOL LoadLinks( SvStream&, ScChangeTrack* );
-
protected:
using ScChangeAction::GetRefString;
@@ -983,8 +933,6 @@ class ScChangeActionReject : public ScChangeAction
SetRejectAction( nReject );
SetState( SC_CAS_ACCEPTED );
}
- ScChangeActionReject( SvStream&,
- ScMultipleReadHeader&, ScChangeTrack* );
virtual void AddContent( ScChangeActionContent* ) {}
virtual void DeleteCellEntries() {}
@@ -993,8 +941,6 @@ class ScChangeActionReject : public ScChangeAction
virtual const ScChangeTrack* GetChangeTrack() const { return 0; }
- virtual BOOL Store( SvStream&, ScMultipleWriteHeader& ) const;
-
public:
ScChangeActionReject(const ULONG nActionNumber,
const ScChangeActionState eState,
@@ -1282,11 +1228,6 @@ public:
// alter Wert aus pOldCell, Format aus Doc
void AppendContent( const ScAddress& rPos,
const ScBaseCell* pOldCell );
- // nachdem neuer Wert im Dokument gesetzt wurde,
- // alter Wert aus pOldCell, Format aus RefDoc
- void AppendContent( const ScAddress& rPos,
- const ScBaseCell* pOldCell,
- ScDocument* pRefDoc );
// nachdem neue Werte im Dokument gesetzt wurden,
// alte Werte aus RefDoc/UndoDoc.
// Alle Contents, wo im RefDoc eine Zelle steht.
@@ -1313,9 +1254,6 @@ public:
// bevor neuer Wert im Dokument gesetzt wird
void AppendContent( const ScAddress& rPos,
- const String& rNewValue );
- // bevor neuer Wert im Dokument gesetzt wird
- void AppendContent( const ScAddress& rPos,
const String& rNewValue,
ScBaseCell* pOldCell );
diff --git a/sc/inc/collect.hxx b/sc/inc/collect.hxx
index 49931d1b8..6c6987b55 100644
--- a/sc/inc/collect.hxx
+++ b/sc/inc/collect.hxx
@@ -143,9 +143,6 @@ public:
virtual ScDataObject* Clone() const;
StrData* operator[]( const USHORT nIndex) const {return (StrData*)At(nIndex);}
virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
-
- void Load( SvStream& );
- void Store( SvStream& ) const;
};
//------------------------------------------------------------------------
@@ -178,9 +175,6 @@ public:
private:
friend class TypedScStrCollection;
-#if OLD_PIVOT_IMPLEMENTATION
- friend class PivotScStrCollection;
-#endif
String aStrValue;
double nValue;
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index eff91ed76..fd2473b53 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -58,8 +58,6 @@ class ScBaseCell;
class ScDocument;
class ScFormulaCell;
class ScMarkData;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
class ScPatternAttr;
class ScStyleSheet;
class SvtBroadcaster;
@@ -146,8 +144,8 @@ public:
void SwapRow( SCROW nRow1, SCROW nRow2 );
void SwapCell( SCROW nRow, ScColumn& rCol);
- BOOL HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
- BOOL bLeft, BOOL bRight ) const;
+//UNUSED2009-05 BOOL HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
+//UNUSED2009-05 BOOL bLeft, BOOL bRight ) const;
BOOL HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const;
BOOL HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const;
BOOL ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
@@ -164,7 +162,7 @@ public:
SCSIZE GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const;
BOOL HasDataAt(SCROW nRow) const;
BOOL HasVisibleDataAt(SCROW nRow) const;
- SCROW GetFirstDataPos() const;
+//UNUSED2009-05 SCROW GetFirstDataPos() const;
SCROW GetLastDataPos() const;
SCROW GetLastVisDataPos(BOOL bNotes) const; // ohne Broadcaster
SCROW GetFirstVisDataPos(BOOL bNotes) const;
@@ -258,7 +256,7 @@ public:
BOOL HasStringData( SCROW nRow ) const;
BOOL HasValueData( SCROW nRow ) const;
- USHORT GetErrorData( SCROW nRow) const;
+//UNUSED2009-05 USHORT GetErrorData( SCROW nRow) const;
BOOL HasStringCells( SCROW nStartRow, SCROW nEndRow ) const;
/** Returns the pointer to a cell note object at the passed row. */
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index a9b2a6f3d..b71357ac2 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -40,8 +40,6 @@
class ScBaseCell;
class ScFormulaCell;
class ScTokenArray;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
class ScRangeList;
@@ -285,8 +283,6 @@ public:
ScConditionalFormat* GetFormat( sal_uInt32 nKey );
-//UNUSED2008-05 void ResetUsed();
-
void CompileAll();
void CompileXML();
void UpdateReference( UpdateRefMode eUpdateRefMode,
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index 3d2c876ab..056fb152a 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -72,9 +72,6 @@ namespace com { namespace sun { namespace star { namespace sheet {
}}}}
class ScDocShell;
-#if OLD_PIVOT_IMPLEMENTATION
-class ScPivot;
-#endif
class ScDPSaveDimension;
class ScDPSaveGroupDimension;
class ScDPSaveNumGroupDimension;
diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx
index 4c104f076..543904e5a 100644
--- a/sc/inc/dbcolect.hxx
+++ b/sc/inc/dbcolect.hxx
@@ -42,8 +42,6 @@
//------------------------------------------------------------------------
class ScDocument;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
//------------------------------------------------------------------------
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 81da5f695..b238b46ed 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -99,10 +99,6 @@ class ScFormulaCell;
class ScMarkData;
class ScOutlineTable;
class ScPatternAttr;
-#if OLD_PIVOT_IMPLEMENTATION
-class ScPivot;
-class ScPivotCollection;
-#endif
class ScPrintRangeSaver;
class ScRangeData;
class ScRangeName;
@@ -237,9 +233,6 @@ friend class ScHorizontalAttrIterator;
friend class ScDocAttrIterator;
friend class ScAttrRectIterator;
friend class ScDocShell;
-#if OLD_PIVOT_IMPLEMENTATION
-friend class ScPivot;
-#endif
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
@@ -261,9 +254,6 @@ private:
ScTable* pTab[MAXTABCOUNT];
ScRangeName* pRangeName;
ScDBCollection* pDBCollection;
-#if OLD_PIVOT_IMPLEMENTATION
- ScPivotCollection* pPivotCollection;
-#endif
ScDPCollection* pDPCollection;
ScChartCollection* pChartCollection;
std::auto_ptr< ScTemporaryChartLock > apTemporaryChartLock;
@@ -497,11 +487,6 @@ public:
SC_DLLPUBLIC ScDPCollection* GetDPCollection();
ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
-#if OLD_PIVOT_IMPLEMENTATION
- ScPivotCollection* GetPivotCollection() const;
- void SetPivotCollection(ScPivotCollection* pNewPivotCollection);
- ScPivot* GetPivotAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
-#endif
SC_DLLPUBLIC ScChartCollection* GetChartCollection() const;
void StopTemporaryChartLock();
@@ -724,8 +709,8 @@ public:
BOOL HasSubTotalCells( const ScRange& rRange );
SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell, BOOL bForceTab = FALSE );
- SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell,
- ULONG nFormatIndex, BOOL bForceTab = FALSE);
+//UNUSED2009-05 SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell,
+//UNUSED2009-05 ULONG nFormatIndex, BOOL bForceTab = FALSE);
SC_DLLPUBLIC void PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
BOOL bForceTab = FALSE );
SC_DLLPUBLIC void PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
@@ -1345,8 +1330,8 @@ public:
SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
/** Adds a new print ranges. */
SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
- /** Removes all old print ranges and sets the passed print ranges. */
- void SetPrintRange( SCTAB nTab, const ScRange& rNew );
+//UNUSED2009-05 /** Removes all old print ranges and sets the passed print ranges. */
+//UNUSED2009-05 void SetPrintRange( SCTAB nTab, const ScRange& rNew );
/** Marks the specified sheet to be printed completely. Deletes old print ranges on the sheet! */
SC_DLLPUBLIC void SetPrintEntireSheet( SCTAB nTab );
SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, const ScRange* pNew );
@@ -1683,7 +1668,7 @@ public:
SC_DLLPUBLIC SfxItemPool* GetEnginePool() const;
SC_DLLPUBLIC ScFieldEditEngine& GetEditEngine();
SC_DLLPUBLIC ScNoteEditEngine& GetNoteEngine();
- SfxItemPool& GetNoteItemPool();
+//UNUSED2009-05 SfxItemPool& GetNoteItemPool();
ScRefreshTimerControl* GetRefreshTimerControl() const
{ return pRefreshTimerControl; }
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index bc51c7425..1fbab2d75 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -127,7 +127,6 @@ public:
void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL );
- ScDrawLayer* MakeDrawLayer();
void BeforeXMLLoading();
void AfterXMLLoading(sal_Bool bRet);
diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx
index 051b87ed2..7a605354e 100644
--- a/sc/inc/dpcachetable.hxx
+++ b/sc/inc/dpcachetable.hxx
@@ -176,11 +176,6 @@ public:
const String* getFieldName(sal_Int32 nIndex) const;
- /** Get the field index (i.e. column ID in the original data source) based
- on the string value that corresponds with the column title. It returns
- -1 if no field matching the string value exists. */
- sal_Int32 getFieldIndex(const String& rStr) const;
-
/** Get the unique entries for a field specified by index. The caller must
make sure that the table is filled before calling function, or it will
get an empty collection. */
@@ -194,7 +189,6 @@ public:
const ::std::hash_set<sal_Int32>& rRepeatIfEmptyDims);
void clear();
- void swap(ScDPCacheTable& rOther);
bool empty() const;
private:
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 39b160abb..e96800727 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -55,8 +55,6 @@ class Rectangle;
class SvStream;
class ScDPSaveData;
class ScDPOutput;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
class ScPivot;
class ScPivotCollection;
struct ScPivotParam;
@@ -281,9 +279,7 @@ public:
virtual ScDataObject* Clone() const;
ScDPObject* operator[](USHORT nIndex) const {return (ScDPObject*)At(nIndex);}
-#if OLD_PIVOT_IMPLEMENTATION
- void ConvertOldTables( ScPivotCollection& rOldColl );
-#endif
+
void DeleteOnTab( SCTAB nTab );
void UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index 598d818de..11ed5d751 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -128,7 +128,6 @@ public:
void SetName( const String& rNew ); // used if the source dim was renamed (groups)
SC_DLLPUBLIC void SetOrientation(USHORT nNew);
- void SetSubTotals(BOOL bSet); // to be removed!
SC_DLLPUBLIC void SetSubTotals(long nCount, const USHORT* pFuncs);
long GetSubTotalsCount() const { return nSubTotalCount; }
USHORT GetSubTotalFunc(long nIndex) const { return pSubTotalFuncs[nIndex]; }
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index f7bbf56da..670f3147c 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -185,7 +185,7 @@ public:
ScDPDimensions* GetDimensionsObject();
- void DumpState( ScDocument* pDoc, const ScAddress& rPos );
+//UNUSED2009-05 void DumpState( ScDocument* pDoc, const ScAddress& rPos );
// XDimensionsSupplier
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
@@ -428,7 +428,7 @@ public:
const ::com::sun::star::sheet::DataPilotFieldReference& GetReferenceValue() const;
- BOOL IsValidPage( const ScDPItemData& rData );
+//UNUSED2009-05 BOOL IsValidPage( const ScDPItemData& rData );
};
class ScDPHierarchies : public cppu::WeakImplHelper2<
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 24fcb2eec..3e31be45b 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -86,13 +86,6 @@ extern "C" {
#define SC_TRANSLITERATION_CASESENSE 0
#endif
-// Remove the old pivot table implementation that the current data pilot
-// implementation has effectively replaced. The old pivot code was still
-// around to handle loading of the old binary format. Now that the old
-// binary filter is handled by binfilter, we can safely remove the old pivot
-// handling code.
-#define OLD_PIVOT_IMPLEMENTATION 0
-
//------------------------------------------------------------------------
struct LabelData;
//------------------------------------------------------------------------
@@ -467,7 +460,7 @@ struct ScImportParam
ScImportParam& operator= ( const ScImportParam& r );
BOOL operator== ( const ScImportParam& r ) const;
- void Clear ();
+//UNUSED2009-05 void Clear ();
};
struct ScStringHashCode
diff --git a/sc/inc/markarr.hxx b/sc/inc/markarr.hxx
index a676aea27..c8a22391c 100644
--- a/sc/inc/markarr.hxx
+++ b/sc/inc/markarr.hxx
@@ -65,7 +65,7 @@ public:
void CopyMarksTo( ScMarkArray& rDestMarkArray ) const;
BOOL Search( SCROW nRow, SCSIZE& nIndex ) const;
- void DeleteArea(SCROW nStartRow, SCROW nEndRow);
+//UNUSED2009-05 void DeleteArea(SCROW nStartRow, SCROW nEndRow);
/// Including current row, may return -1 if bUp and not found
SCsROW GetNextMarked( SCsROW nRow, BOOL bUp ) const;
diff --git a/sc/inc/olinetab.hxx b/sc/inc/olinetab.hxx
index 613c339ac..456d22366 100644
--- a/sc/inc/olinetab.hxx
+++ b/sc/inc/olinetab.hxx
@@ -39,8 +39,6 @@
#define SC_OL_MAXDEPTH 7
class SvStream;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
class ScOutlineEntry : public ScDataObject
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index a9062d8a9..d1b0fb939 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -65,20 +65,9 @@ class SubTotal;
#include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
-#if OLD_PIVOT_IMPLEMENTATION
-#define PIVOT_STYLE_INNER 0
-#define PIVOT_STYLE_RESULT 1
-#define PIVOT_STYLE_CATEGORY 2
-#define PIVOT_STYLE_TITLE 3
-#define PIVOT_STYLE_FIELDNAME 4
-#define PIVOT_STYLE_TOP 5
-#endif
-
class SvStream;
class ScDocument;
class ScUserListData;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
class ScProgress;
struct LabelData;
@@ -125,7 +114,7 @@ struct ScPivotParam
ScPivotParam& operator= ( const ScPivotParam& r );
BOOL operator== ( const ScPivotParam& r ) const;
- void Clear ();
+//UNUSED2009-05 void Clear ();
void ClearLabelData ();
void ClearPivotArrays();
void SetLabelData ( LabelData** ppLabArr,
@@ -142,228 +131,9 @@ struct ScPivotParam
// -----------------------------------------------------------------------
-#if OLD_PIVOT_IMPLEMENTATION
-struct PivotColRef
-{
- SCSIZE nDataIndex;
- SCSIZE nRecCount;
- USHORT nFuncMask;
- SCSIZE nIndex;
-
- PivotColRef()
- {
- nDataIndex = nRecCount = nIndex = 0;
- nFuncMask = PIVOT_FUNC_NONE;
- }
-};
-#endif
-
typedef PivotField PivotFieldArr[PIVOT_MAXFIELD];
typedef PivotField PivotPageFieldArr[PIVOT_MAXPAGEFIELD];
-#if OLD_PIVOT_IMPLEMENTATION
-class PivotScStrCollection : public ScStrCollection
-{
- ScUserListData* pUserData;
-public:
- PivotScStrCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) :
- ScStrCollection ( nLim, nDel, bDup ),
- pUserData (NULL) { }
- PivotScStrCollection(const PivotScStrCollection& rPivotScStrCollection) :
- ScStrCollection ( rPivotScStrCollection ),
- pUserData ( rPivotScStrCollection.pUserData) {}
-
- virtual ScDataObject* Clone() const;
- virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
-
- TypedStrData* operator[]( const USHORT nIndex) const
- { return (TypedStrData*)At(nIndex); }
- void SetUserData(ScUserListData* pData)
- { pUserData = pData; }
- const String& GetString(USHORT nIndex)
- { return ((TypedStrData*)At(nIndex))->GetString(); }
- USHORT GetIndex(TypedStrData* pData) const;
-};
-
-class ScPivot : public ScDataObject
-{
- ScDocument* pDoc;
- ScQueryParam aQuery;
- BOOL bHasHeader;
-
- BOOL bIgnoreEmpty; // Flags aus Dialog
- BOOL bDetectCat;
- BOOL bMakeTotalCol;
- BOOL bMakeTotalRow;
-
- String aName;
- String aTag;
- SCSIZE nColNameCount;
- String* pColNames; // Array
-
- SCCOL nSrcCol1;
- SCROW nSrcRow1;
- SCCOL nSrcCol2;
- SCROW nSrcRow2;
- SCTAB nSrcTab;
-
- SCCOL nDestCol1;
- SCROW nDestRow1;
- SCCOL nDestCol2;
- SCROW nDestRow2;
- SCTAB nDestTab;
-
- SCCOL nDataStartCol;
- SCROW nDataStartRow;
-
- SCSIZE nColCount;
- SCSIZE nRowCount;
- SCSIZE nDataCount;
-
- PivotFieldArr aColArr;
- PivotFieldArr aRowArr;
- PivotFieldArr aDataArr;
-
- PivotScStrCollection* pColList[PIVOT_MAXFIELD]; // pro Zeile alle Eintraege
- PivotScStrCollection* pRowList[PIVOT_MAXFIELD];
- PivotScStrCollection* pDataList; // Shortcut auf Col/RowList mit Daten
-
- SubTotal** ppDataArr;
- SCSIZE nDataColCount;
- SCSIZE nDataRowCount;
- SCSIZE nRowIndex;
- SCSIZE nColIndex;
- SCSIZE nDataIndex;
- SCSIZE nRecCount;
-
- PivotColRef* pColRef;
-
- BOOL bValidArea;
- BOOL bDataAtCol;
-
-public:
- ScPivot(ScDocument* pDocument);
- ScPivot(const ScPivot& rPivot);
- ~ScPivot();
-
- virtual ScDataObject* Clone() const;
-
- ScPivot* CreateNew() const;
-
- BOOL Load(SvStream& rStream, ScMultipleReadHeader& rHdr );
- BOOL Store(SvStream& rStream, ScMultipleWriteHeader& rHdr ) const;
-
- void SetQuery(const ScQueryParam& rQuery);
- void GetQuery(ScQueryParam& rQuery) const;
-
- void SetHeader(BOOL bHeader);
- BOOL GetHeader() const;
- void SetIgnoreEmpty(BOOL bIgnore);
- BOOL GetIgnoreEmpty() const;
- void SetDetectCat(BOOL bDetect);
- BOOL GetDetectCat() const;
- void SetMakeTotalCol(BOOL bSet);
- BOOL GetMakeTotalCol() const;
- void SetMakeTotalRow(BOOL bSet);
- BOOL GetMakeTotalRow() const;
-
- void SetName(const String& rNew);
- const String& GetName() const;
- void SetTag(const String& rNew);
- const String& GetTag() const;
-
- void SetSrcArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab);
- void GetSrcArea(SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2, SCTAB& rTab) const;
- ScRange GetSrcArea() const;
-
- void SetDestPos(SCCOL nCol, SCROW nRow, SCTAB nTab);
- void GetDestArea(SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2, SCTAB& rTab) const;
- ScRange GetDestArea() const;
-
- void SetColFields(const PivotField* pFieldArr, SCSIZE nCount);
- void GetColFields(PivotField* pFieldArr, SCSIZE& rCount) const;
- SCSIZE GetColFieldCount() const { return nColCount; }
-
- void SetRowFields(const PivotField* pFieldArr, SCSIZE nCount);
- void GetRowFields(PivotField* pFieldArr, SCSIZE& rCount) const;
- SCSIZE GetRowFieldCount() const { return nRowCount; }
-
- void SetDataFields(const PivotField* pFieldArr, SCSIZE nCount);
- void GetDataFields(PivotField* pFieldArr, SCSIZE& rCount) const;
-
- void GetParam( ScPivotParam& rParam, ScQueryParam& rQuery, ScArea& rSrcArea ) const;
- void SetParam( const ScPivotParam& rParam, const ScQueryParam& rQuery,
- const ScArea& rSrcArea );
-
- BOOL CreateData(BOOL bKeepDest = FALSE);
- void DrawData();
- void ReleaseData();
-
- BOOL IsPivotAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
- BOOL IsFilterAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
- BOOL GetColFieldAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL& rField) const;
- BOOL GetRowFieldAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL& rField) const;
-
- // Referenz-Anpassung:
-
- void MoveSrcArea( SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab );
- void MoveDestArea( SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab );
- void ExtendSrcArea( SCCOL nNewEndCol, SCROW nNewEndRow );
-
-private:
- BOOL CreateFields();
- void CreateFieldData();
- void CalcArea();
-
- void SetDataLine(SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE nRIndex);
- void SetFuncLine(SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nFunc, SCSIZE nIndex, SCSIZE nStartRIndex, SCSIZE nEndRIndex);
- void ColToTable(SCSIZE nField, SCROW& nRow, ScProgress& rProgress);
- void RowToTable(SCSIZE nField, SCCOL& nCol);
- void SetFrame(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nWidth = 20);
- void SetFrameHor(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
- void SetFrameVer(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
- void SetFontBold(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
- void SetJustifyLeft(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
- void SetJustifyRight(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
- void SetStyle(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nId);
- void SetButton(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
- void SetValue(SCCOL nCol, SCROW nRow, const SubTotal& rTotal, USHORT nFunc);
- SCROW GetCategoryRow( SCCOL nCol, SCROW nRow );
-};
-
-//------------------------------------------------------------------------
-class ScPivotCollection : public ScCollection
-{
-
-private:
- ScDocument* pDoc;
-public:
- ScPivotCollection(USHORT nLim = 4, USHORT nDel = 4, ScDocument* pDocument = NULL) :
- ScCollection ( nLim, nDel),
- pDoc ( pDocument ) {}
- ScPivotCollection(const ScPivotCollection& rScPivotCollection) :
- ScCollection ( rScPivotCollection ),
- pDoc ( rScPivotCollection.pDoc ) {}
-
- virtual ScDataObject* Clone() const;
- ScPivot* operator[]( const USHORT nIndex) const {return (ScPivot*)At(nIndex);}
- ScPivot* GetPivotAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
-
- BOOL Load( SvStream& rStream );
- BOOL Store( SvStream& rStream ) const;
-
- void UpdateReference(UpdateRefMode eUpdateRefMode,
- SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
- void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
-
- BOOL operator==(const ScPivotCollection& rCmp) const;
-
- String CreateNewName( USHORT nMin = 1 ) const;
-};
-#endif
-
//------------------------------------------------------------------------
struct LabelData
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index e93bfda6d..87b279f9a 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -40,8 +40,6 @@
//------------------------------------------------------------------------
class ScDocument;
-class ScMultipleReadHeader;
-class ScMultipleWriteHeader;
namespace rtl {
class OUStringBuffer;
@@ -146,7 +144,7 @@ public:
BOOL IsReference( ScRange& rRef, const ScAddress& rPos ) const;
BOOL IsValidReference( ScRange& rRef ) const;
- BOOL IsRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const;
+//UNUSED2009-05 BOOL IsRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const;
BOOL IsRangeAtBlock( const ScRange& ) const;
void UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable);
@@ -203,7 +201,7 @@ public:
virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const;
- ScRangeData* GetRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const;
+//UNUSED2009-05 ScRangeData* GetRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const;
SC_DLLPUBLIC ScRangeData* GetRangeAtBlock( const ScRange& ) const;
SC_DLLPUBLIC BOOL SearchName( const String& rName, USHORT& rPos ) const;
diff --git a/sc/inc/rechead.hxx b/sc/inc/rechead.hxx
index 6237dccc8..fee399b23 100644
--- a/sc/inc/rechead.hxx
+++ b/sc/inc/rechead.hxx
@@ -130,33 +130,6 @@ class SvStream;
// -----------------------------------------------------------------------
-// "Automatischer" Record-Header mit Groessenangabe
-
-class ScReadHeader
-{
-private:
- SvStream& rStream;
- ULONG nDataEnd;
-
-public:
- ScReadHeader(SvStream& rNewStream);
- ~ScReadHeader();
-
- ULONG BytesLeft() const;
-};
-
-class ScWriteHeader
-{
-private:
- SvStream& rStream;
- ULONG nDataPos;
- sal_uInt32 nDataSize;
-
-public:
- ScWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault = 0);
- ~ScWriteHeader();
-};
-
// Header mit Groessenangaben fuer mehrere Objekte
class ScMultipleReadHeader
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index dd60b2023..c557e0820 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -401,11 +401,11 @@ public:
void MatTrans( ScMatrix& mRes) const;
void MatCopy ( ScMatrix& mRes) const;
- /** Copy upper left of this matrix to mRes matrix.
- This matrix's dimensions must be greater or equal to the mRes matrix
- dimensions.
- */
- void MatCopyUpperLeft( ScMatrix& mRes) const;
+//UNUSED2009-05 /** Copy upper left of this matrix to mRes matrix.
+//UNUSED2009-05 This matrix's dimensions must be greater or equal to the mRes matrix
+//UNUSED2009-05 dimensions.
+//UNUSED2009-05 */
+//UNUSED2009-05 void MatCopyUpperLeft( ScMatrix& mRes) const;
// Convert ScInterpreter::CompareMat values (-1,0,1) to boolean values
void CompareEqual();
diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx
index 9450f034f..510448d85 100644
--- a/sc/inc/stlpool.hxx
+++ b/sc/inc/stlpool.hxx
@@ -63,7 +63,7 @@ public:
ScStyleSheet* FindCaseIns( const String& rName, SfxStyleFamily eFam );
- void SetForceStdName( const String* pSet );
+//UNUSED2009-05 void SetForceStdName( const String* pSet );
const String* GetForceStdName() const { return pForceStdName; }
virtual SfxStyleSheetBase& Make( const String&, SfxStyleFamily eFam,
diff --git a/sc/inc/subtotal.hxx b/sc/inc/subtotal.hxx
index 92a8cb58c..2005ed97b 100644
--- a/sc/inc/subtotal.hxx
+++ b/sc/inc/subtotal.hxx
@@ -35,35 +35,6 @@
class SubTotal
{
-#if OLD_PIVOT_IMPLEMENTATION
-private:
- long nCount;
- long nCount2;
- double nSum;
- double nSumSqr;
- double nMax;
- double nMin;
- double nProduct;
- BOOL bSumOk;
- BOOL bSumSqrOk;
- BOOL bProductOk;
- USHORT nProgress;
-
-public:
- SCSIZE nIndex; // Test
-
-public:
- SubTotal();
- ~SubTotal();
-
- void UpdateNoVal();
- void Update( double nVal );
- void Update( const SubTotal& rVal );
-
- short Valid( USHORT nFunction ) const;
- // return 0 => Fehler, -1 => kein Wert, 1 => ok
- double Result( USHORT nFunction ) const;
-#endif
public:
static BOOL SafePlus( double& fVal1, double fVal2);
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 029403d70..a33ebb911 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -256,7 +256,7 @@ public:
BOOL IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes = false ) const;
void PutCell( const ScAddress&, ScBaseCell* pCell );
- void PutCell( const ScAddress&, ULONG nFormatIndex, ScBaseCell* pCell);
+//UNUSED2009-05 void PutCell( const ScAddress&, ULONG nFormatIndex, ScBaseCell* pCell);
void PutCell( SCCOL nCol, SCROW nRow, ScBaseCell* pCell );
void PutCell(SCCOL nCol, SCROW nRow, ULONG nFormatIndex, ScBaseCell* pCell);
// TRUE = Zahlformat gesetzt
@@ -459,7 +459,7 @@ public:
const SvxBorderLine** ppLeft, const SvxBorderLine** ppTop,
const SvxBorderLine** ppRight, const SvxBorderLine** ppBottom ) const;
- BOOL HasLines( const ScRange& rRange, Rectangle& rSizes ) const;
+//UNUSED2009-05 BOOL HasLines( const ScRange& rRange, Rectangle& rSizes ) const;
BOOL HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nMask ) const;
BOOL HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const;
BOOL ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
@@ -542,8 +542,8 @@ public:
void ClearPrintRanges();
/** Adds a new print ranges. */
void AddPrintRange( const ScRange& rNew );
- /** Removes all old print ranges and sets the passed print ranges. */
- void SetPrintRange( const ScRange& rNew );
+//UNUSED2009-05 /** Removes all old print ranges and sets the passed print ranges. */
+//UNUSED2009-05 void SetPrintRange( const ScRange& rNew );
/** Marks the specified sheet to be printed completely. Deletes old print ranges! */
void SetPrintEntireSheet();
diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx
index ee2a84885..c48652df6 100644
--- a/sc/inc/validat.hxx
+++ b/sc/inc/validat.hxx
@@ -200,8 +200,6 @@ public:
ScValidationData* GetData( sal_uInt32 nKey );
- void ResetUsed();
-
void CompileXML();
void UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index bc0767a4c..64cbcfccb 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -103,10 +103,10 @@ ScAttrArray::~ScAttrArray()
}
//------------------------------------------------------------------------
-
+#ifdef DBG_UTIL
void ScAttrArray::TestData() const
{
-#ifdef DBG_UTIL
+
USHORT nErr = 0;
if (pData)
{
@@ -129,8 +129,8 @@ void ScAttrArray::TestData() const
aMsg += ByteString::CreateFromInt32(nCol);
DBG_ERROR( aMsg.GetBuffer() );
}
-#endif
}
+#endif
//------------------------------------------------------------------------
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 011271bd2..f9943906e 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -636,32 +636,32 @@ SfxItemPresentation ScTableListItem::GetPresentation
// -----------------------------------------------------------------------
-BOOL ScTableListItem::GetTableList( List& aList ) const
-{
- for ( USHORT i=0; i<nCount; i++ )
- aList.Insert( new SCTAB( pTabArr[i] ) );
-
- return ( nCount > 0 );
-}
+//UNUSED2009-05 BOOL ScTableListItem::GetTableList( List& aList ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 for ( USHORT i=0; i<nCount; i++ )
+//UNUSED2009-05 aList.Insert( new SCTAB( pTabArr[i] ) );
+//UNUSED2009-05
+//UNUSED2009-05 return ( nCount > 0 );
+//UNUSED2009-05 }
// -----------------------------------------------------------------------
-void ScTableListItem::SetTableList( const List& rList )
-{
- nCount = (USHORT)rList.Count();
-
- delete [] pTabArr;
-
- if ( nCount > 0 )
- {
- pTabArr = new SCTAB [nCount];
-
- for ( USHORT i=0; i<nCount; i++ )
- pTabArr[i] = *( (SCTAB*)rList.GetObject( i ) );
- }
- else
- pTabArr = NULL;
-}
+//UNUSED2009-05 void ScTableListItem::SetTableList( const List& rList )
+//UNUSED2009-05 {
+//UNUSED2009-05 nCount = (USHORT)rList.Count();
+//UNUSED2009-05
+//UNUSED2009-05 delete [] pTabArr;
+//UNUSED2009-05
+//UNUSED2009-05 if ( nCount > 0 )
+//UNUSED2009-05 {
+//UNUSED2009-05 pTabArr = new SCTAB [nCount];
+//UNUSED2009-05
+//UNUSED2009-05 for ( USHORT i=0; i<nCount; i++ )
+//UNUSED2009-05 pTabArr[i] = *( (SCTAB*)rList.GetObject( i ) );
+//UNUSED2009-05 }
+//UNUSED2009-05 else
+//UNUSED2009-05 pTabArr = NULL;
+//UNUSED2009-05 }
// -----------------------------------------------------------------------
@@ -934,63 +934,63 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
//------------------------------------------------------------------------
-class ScFieldChangerEditEngine : public ScEditEngineDefaulter
-{
- TypeId aExtFileId;
- USHORT nConvPara;
- xub_StrLen nConvPos;
- BOOL bConvert;
-
-public:
- ScFieldChangerEditEngine( SfxItemPool* pEnginePool, BOOL bDeleteEnginePool );
- virtual ~ScFieldChangerEditEngine() {}
-
- virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara,
- USHORT nPos, Color*& rTxtColor,
- Color*& rFldColor );
-
-//UNUSED2008-05 BOOL ConvertFields();
-};
-
-ScFieldChangerEditEngine::ScFieldChangerEditEngine( SfxItemPool* pEnginePoolP,
- BOOL bDeleteEnginePoolP ) :
- ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP ),
- aExtFileId( TYPE( SvxExtFileField ) ),
- nConvPara( 0 ),
- nConvPos( 0 ),
- bConvert( FALSE )
-{
-}
-
-String ScFieldChangerEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- USHORT nPara, USHORT nPos, Color*& /* rTxtColor */, Color*& /* rFldColor */ )
-{
- const SvxFieldData* pFieldData = rField.GetField();
- if ( pFieldData && pFieldData->Type() == aExtFileId )
- {
- bConvert = TRUE;
- nConvPara = nPara;
- nConvPos = nPos;
- }
- return EMPTY_STRING;
-}
-
-//UNUSED2008-05 BOOL ScFieldChangerEditEngine::ConvertFields()
-//UNUSED2008-05 {
-//UNUSED2008-05 BOOL bConverted = FALSE;
-//UNUSED2008-05 do
-//UNUSED2008-05 {
-//UNUSED2008-05 bConvert = FALSE;
-//UNUSED2008-05 UpdateFields();
-//UNUSED2008-05 if ( bConvert )
-//UNUSED2008-05 {
-//UNUSED2008-05 ESelection aSel( nConvPara, nConvPos, nConvPara, nConvPos+1 );
-//UNUSED2008-05 QuickInsertField( SvxFieldItem( SvxFileField(), EE_FEATURE_FIELD), aSel );
-//UNUSED2008-05 bConverted = TRUE;
-//UNUSED2008-05 }
-//UNUSED2008-05 } while ( bConvert );
-//UNUSED2008-05 return bConverted;
-//UNUSED2008-05 }
+//UNUSED2009-05 class ScFieldChangerEditEngine : public ScEditEngineDefaulter
+//UNUSED2009-05 {
+//UNUSED2009-05 TypeId aExtFileId;
+//UNUSED2009-05 USHORT nConvPara;
+//UNUSED2009-05 xub_StrLen nConvPos;
+//UNUSED2009-05 BOOL bConvert;
+//UNUSED2009-05
+//UNUSED2009-05 public:
+//UNUSED2009-05 ScFieldChangerEditEngine( SfxItemPool* pEnginePool, BOOL bDeleteEnginePool );
+//UNUSED2009-05 virtual ~ScFieldChangerEditEngine() {}
+//UNUSED2009-05
+//UNUSED2009-05 virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara,
+//UNUSED2009-05 USHORT nPos, Color*& rTxtColor,
+//UNUSED2009-05 Color*& rFldColor );
+//UNUSED2009-05
+//UNUSED2009-05 BOOL ConvertFields();
+//UNUSED2009-05 };
+//UNUSED2009-05
+//UNUSED2009-05 ScFieldChangerEditEngine::ScFieldChangerEditEngine( SfxItemPool* pEnginePoolP,
+//UNUSED2009-05 BOOL bDeleteEnginePoolP ) :
+//UNUSED2009-05 ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP ),
+//UNUSED2009-05 aExtFileId( TYPE( SvxExtFileField ) ),
+//UNUSED2009-05 nConvPara( 0 ),
+//UNUSED2009-05 nConvPos( 0 ),
+//UNUSED2009-05 bConvert( FALSE )
+//UNUSED2009-05 {
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 String ScFieldChangerEditEngine::CalcFieldValue( const SvxFieldItem& rField,
+//UNUSED2009-05 USHORT nPara, USHORT nPos, Color*& /* rTxtColor */, Color*& /* rFldColor */ )
+//UNUSED2009-05 {
+//UNUSED2009-05 const SvxFieldData* pFieldData = rField.GetField();
+//UNUSED2009-05 if ( pFieldData && pFieldData->Type() == aExtFileId )
+//UNUSED2009-05 {
+//UNUSED2009-05 bConvert = TRUE;
+//UNUSED2009-05 nConvPara = nPara;
+//UNUSED2009-05 nConvPos = nPos;
+//UNUSED2009-05 }
+//UNUSED2009-05 return EMPTY_STRING;
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 BOOL ScFieldChangerEditEngine::ConvertFields()
+//UNUSED2009-05 {
+//UNUSED2009-05 BOOL bConverted = FALSE;
+//UNUSED2009-05 do
+//UNUSED2009-05 {
+//UNUSED2009-05 bConvert = FALSE;
+//UNUSED2009-05 UpdateFields();
+//UNUSED2009-05 if ( bConvert )
+//UNUSED2009-05 {
+//UNUSED2009-05 ESelection aSel( nConvPara, nConvPos, nConvPara, nConvPos+1 );
+//UNUSED2009-05 QuickInsertField( SvxFieldItem( SvxFileField(), EE_FEATURE_FIELD), aSel );
+//UNUSED2009-05 bConverted = TRUE;
+//UNUSED2009-05 }
+//UNUSED2009-05 } while ( bConvert );
+//UNUSED2009-05 return bConverted;
+//UNUSED2009-05 }
void ScPageHFItem::SetLeftArea( const EditTextObject& rNew )
{
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 99bf993b0..789357fdb 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -582,23 +582,6 @@ ScNoteCell::~ScNoteCell()
}
#endif
-ScNoteCell::ScNoteCell( SvStream& rStream, USHORT nVer ) :
- ScBaseCell( CELLTYPE_NOTE )
-{
- if( nVer >= SC_DATABYTES2 )
- {
- BYTE cData;
- rStream >> cData;
- if( cData & 0x0F )
- rStream.SeekRel( cData & 0x0F );
- }
-}
-
-void ScNoteCell::Save( SvStream& rStream ) const
-{
- rStream << (BYTE) 0x00;
-}
-
// ============================================================================
ScValueCell::ScValueCell() :
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 73d28c403..0932cda16 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -240,11 +240,11 @@ BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const
}
-BOOL ScColumn::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
- BOOL bLeft, BOOL bRight ) const
-{
- return pAttrArray->HasLines( nRow1, nRow2, rSizes, bLeft, bRight );
-}
+//UNUSED2009-05 BOOL ScColumn::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
+//UNUSED2009-05 BOOL bLeft, BOOL bRight ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 return pAttrArray->HasLines( nRow1, nRow2, rSizes, bLeft, bRight );
+//UNUSED2009-05 }
BOOL ScColumn::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 8f8d5ff04..067f07432 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1191,23 +1191,23 @@ BOOL ScMarkedDataIter::Next( SCSIZE& rIndex )
return TRUE;
}
-USHORT ScColumn::GetErrorData( SCROW nRow ) const
-{
- SCSIZE nIndex;
- if (Search(nRow, nIndex))
- {
- ScBaseCell* pCell = pItems[nIndex].pCell;
- switch (pCell->GetCellType())
- {
- case CELLTYPE_FORMULA :
- return ((ScFormulaCell*)pCell)->GetErrCode();
-// break;
- default:
- return 0;
- }
- }
- return 0;
-}
+//UNUSED2009-05 USHORT ScColumn::GetErrorData( SCROW nRow ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 SCSIZE nIndex;
+//UNUSED2009-05 if (Search(nRow, nIndex))
+//UNUSED2009-05 {
+//UNUSED2009-05 ScBaseCell* pCell = pItems[nIndex].pCell;
+//UNUSED2009-05 switch (pCell->GetCellType())
+//UNUSED2009-05 {
+//UNUSED2009-05 case CELLTYPE_FORMULA :
+//UNUSED2009-05 return ((ScFormulaCell*)pCell)->GetErrCode();
+//UNUSED2009-05 // break;
+//UNUSED2009-05 default:
+//UNUSED2009-05 return 0;
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 return 0;
+//UNUSED2009-05 }
//------------
@@ -1376,13 +1376,13 @@ SCSIZE ScColumn::GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirecti
return nLines;
}
-SCROW ScColumn::GetFirstDataPos() const
-{
- if (nCount)
- return pItems[0].nRow;
- else
- return 0;
-}
+//UNUSED2009-05 SCROW ScColumn::GetFirstDataPos() const
+//UNUSED2009-05 {
+//UNUSED2009-05 if (nCount)
+//UNUSED2009-05 return pItems[0].nRow;
+//UNUSED2009-05 else
+//UNUSED2009-05 return 0;
+//UNUSED2009-05 }
SCROW ScColumn::GetLastDataPos() const
{
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index b47b30086..cbfea174e 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1553,13 +1553,6 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
return NULL;
}
-//UNUSED2008-05 void ScConditionalFormatList::ResetUsed()
-//UNUSED2008-05 {
-//UNUSED2008-05 USHORT nCount = Count();
-//UNUSED2008-05 for (USHORT i=0; i<nCount; i++)
-//UNUSED2008-05 (*this)[i]->SetUsed(FALSE);
-//UNUSED2008-05 }
-
void ScConditionalFormatList::CompileAll()
{
USHORT nCount = Count();
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index cdbc33310..4ba0bb0a4 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -248,9 +248,6 @@ ScDocument::ScDocument( ScDocumentMode eMode,
pRangeName = new ScRangeName( 4, 4, FALSE, this );
pDBCollection = new ScDBCollection( 4, 4, FALSE, this );
-#if OLD_PIVOT_IMPLEMENTATION
- pPivotCollection = new ScPivotCollection(4, 4, this );
-#endif
pSelectionAttr = NULL;
pChartCollection = new ScChartCollection;
apTemporaryChartLock = std::auto_ptr< ScTemporaryChartLock >( new ScTemporaryChartLock(this) );
@@ -421,9 +418,6 @@ ScDocument::~ScDocument()
}
delete pRangeName;
delete pDBCollection;
-#if OLD_PIVOT_IMPLEMENTATION
- delete pPivotCollection;
-#endif
delete pSelectionAttr;
apTemporaryChartLock.reset();
delete pChartCollection;
@@ -548,12 +542,12 @@ ScNoteEditEngine& ScDocument::GetNoteEngine()
return *pNoteEngine;
}
-SfxItemPool& ScDocument::GetNoteItemPool()
-{
- if ( !pNoteItemPool )
- pNoteItemPool = new SfxItemPool(SdrObject::GetGlobalDrawObjectItemPool());
- return *pNoteItemPool;
-}
+//UNUSED2009-05 SfxItemPool& ScDocument::GetNoteItemPool()
+//UNUSED2009-05 {
+//UNUSED2009-05 if ( !pNoteItemPool )
+//UNUSED2009-05 pNoteItemPool = new SfxItemPool(SdrObject::GetGlobalDrawObjectItemPool());
+//UNUSED2009-05 return *pNoteItemPool;
+//UNUSED2009-05 }
void ScDocument::ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks )
{
@@ -623,22 +617,22 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
}
}
-void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell,
- ULONG nFormatIndex, BOOL bForceTab )
-{
- SCTAB nTab = rPos.Tab();
- if ( bForceTab && !pTab[nTab] )
- {
- BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
-
- pTab[nTab] = new ScTable(this, nTab,
- String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
- bExtras, bExtras);
- }
-
- if (pTab[nTab])
- pTab[nTab]->PutCell( rPos, nFormatIndex, pCell );
-}
+//UNUSED2009-05 void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell,
+//UNUSED2009-05 ULONG nFormatIndex, BOOL bForceTab )
+//UNUSED2009-05 {
+//UNUSED2009-05 SCTAB nTab = rPos.Tab();
+//UNUSED2009-05 if ( bForceTab && !pTab[nTab] )
+//UNUSED2009-05 {
+//UNUSED2009-05 BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
+//UNUSED2009-05
+//UNUSED2009-05 pTab[nTab] = new ScTable(this, nTab,
+//UNUSED2009-05 String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
+//UNUSED2009-05 bExtras, bExtras);
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 if (pTab[nTab])
+//UNUSED2009-05 pTab[nTab]->PutCell( rPos, nFormatIndex, pCell );
+//UNUSED2009-05 }
BOOL ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
BOOL bNotes ) const
@@ -759,11 +753,6 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
pDBCollection->UpdateMoveTab( nOldPos, nNewPos );
xColNameRanges->UpdateReference( URM_REORDER, this, aSourceRange, 0,0,nDz );
xRowNameRanges->UpdateReference( URM_REORDER, this, aSourceRange, 0,0,nDz );
-#if OLD_PIVOT_IMPLEMENTATION
- if (pPivotCollection)
- pPivotCollection->UpdateReference( URM_REORDER,
- 0,0,nOldPos, MAXCOL,MAXROW,nOldPos, 0,0,nDz );
-#endif
if (pDPCollection)
pDPCollection->UpdateReference( URM_REORDER, aSourceRange, 0,0,nDz );
if (pDetOpList)
@@ -858,11 +847,6 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
pRangeName->UpdateTabRef(nNewPos, 1);
pDBCollection->UpdateReference(
URM_INSDEL, 0,0,nNewPos, MAXCOL,MAXROW,MAXTAB, 0,0,1 );
-#if OLD_PIVOT_IMPLEMENTATION
- if (pPivotCollection)
- pPivotCollection->UpdateReference(
- URM_INSDEL, 0,0,nNewPos, MAXCOL,MAXROW,MAXTAB, 0,0,1 );
-#endif
if (pDPCollection)
pDPCollection->UpdateReference( URM_INSDEL, aRange, 0,0,1 );
if (pDetOpList)
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 3f79e2fb8..a0b524fbe 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -230,46 +230,6 @@ ScDPObject* ScDocument::GetDPAtBlock( const ScRange & rBlock ) const
return NULL;
}
-#if OLD_PIVOT_IMPLEMENTATION
-ScPivotCollection* ScDocument::GetPivotCollection() const
-{
- return pPivotCollection;
-}
-
-void ScDocument::SetPivotCollection(ScPivotCollection* pNewPivotCollection)
-{
- if ( pPivotCollection && pNewPivotCollection &&
- *pPivotCollection == *pNewPivotCollection )
- {
- delete pNewPivotCollection;
- return;
- }
-
- if (pPivotCollection)
- delete pPivotCollection;
- pPivotCollection = pNewPivotCollection;
-
- if (pPivotCollection)
- {
- USHORT nCount = pPivotCollection->GetCount();
- for (USHORT i=0; i<nCount; i++)
- {
- ScPivot* pPivot = (*pPivotCollection)[i];
- if (pPivot->CreateData())
- pPivot->ReleaseData();
- }
- }
-}
-
-ScPivot* ScDocument::GetPivotAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
-{
- if (pPivotCollection)
- return pPivotCollection->GetPivotAtCursor(nCol, nRow, nTab);
- else
- return NULL;
-}
-#endif
-
ScChartCollection* ScDocument::GetChartCollection() const
{
return pChartCollection;
@@ -845,10 +805,6 @@ void ScDocument::UpdateReference( UpdateRefMode eUpdateRefMode,
xRowNameRanges->UpdateReference( eUpdateRefMode, this, aRange, nDx, nDy, nDz );
pDBCollection->UpdateReference( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz );
pRangeName->UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz );
-#if OLD_PIVOT_IMPLEMENTATION
- if (pPivotCollection)
- pPivotCollection->UpdateReference( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz );
-#endif
if ( pDPCollection )
pDPCollection->UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz );
UpdateChartRef( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz );
@@ -938,9 +894,6 @@ void ScDocument::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
//! UpdateChartRef
pRangeName->UpdateGrow( rArea, nGrowX, nGrowY );
-#if OLD_PIVOT_IMPLEMENTATION
- pPivotCollection->UpdateGrow( rArea, nGrowX, nGrowY );
-#endif
for (SCTAB i=0; i<=MAXTAB && pTab[i]; i++)
pTab[i]->UpdateGrow( rArea, nGrowX, nGrowY );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index e94a5522c..39ff75e0b 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -304,11 +304,6 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
pRangeName->UpdateTabRef( nPos, 1 );
pDBCollection->UpdateReference(
URM_INSDEL, 0,0,nPos, MAXCOL,MAXROW,MAXTAB, 0,0,1 );
-#if OLD_PIVOT_IMPLEMENTATION
- if (pPivotCollection)
- pPivotCollection->UpdateReference(
- URM_INSDEL, 0,0,nPos, MAXCOL,MAXROW,MAXTAB, 0,0,1 );
-#endif
if (pDPCollection)
pDPCollection->UpdateReference( URM_INSDEL, aRange, 0,0,1 );
if (pDetOpList)
@@ -396,11 +391,6 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
pRangeName->UpdateTabRef( nTab, 2 );
pDBCollection->UpdateReference(
URM_INSDEL, 0,0,nTab, MAXCOL,MAXROW,MAXTAB, 0,0,-1 );
-#if OLD_PIVOT_IMPLEMENTATION
- if (pPivotCollection)
- pPivotCollection->UpdateReference(
- URM_INSDEL, 0,0,nTab, MAXCOL,MAXROW,MAXTAB, 0,0,-1 );
-#endif
if (pDPCollection)
pDPCollection->UpdateReference( URM_INSDEL, aRange, 0,0,-1 );
if (pDetOpList)
@@ -4548,11 +4538,11 @@ void ScDocument::AddPrintRange( SCTAB nTab, const ScRange& rNew )
}
-void ScDocument::SetPrintRange( SCTAB nTab, const ScRange& rNew )
-{
- if (ValidTab(nTab) && pTab[nTab])
- pTab[nTab]->SetPrintRange( rNew );
-}
+//UNUSED2009-05 void ScDocument::SetPrintRange( SCTAB nTab, const ScRange& rNew )
+//UNUSED2009-05 {
+//UNUSED2009-05 if (ValidTab(nTab) && pTab[nTab])
+//UNUSED2009-05 pTab[nTab]->SetPrintRange( rNew );
+//UNUSED2009-05 }
void ScDocument::SetPrintEntireSheet( SCTAB nTab )
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx
index a27c16d9e..015c6512d 100644
--- a/sc/source/core/data/dpcachetable.cxx
+++ b/sc/source/core/data/dpcachetable.cxx
@@ -522,23 +522,6 @@ const String* ScDPCacheTable::getFieldName(sal_Int32 nIndex) const
return mrSharedString.getString(maHeader[nIndex]);
}
-sal_Int32 ScDPCacheTable::getFieldIndex(const String& rStr) const
-{
- sal_Int32 nStrId = mrSharedString.getStringId(rStr);
- if (nStrId < 0)
- // string not found.
- return nStrId;
-
- sal_Int32 n = maHeader.size();
- for (sal_Int32 i = 0; i < n; ++i)
- {
- if (maHeader[i] == nStrId)
- return i;
- }
-
- return -1;
-}
-
const TypedScStrCollection& ScDPCacheTable::getFieldEntries(sal_Int32 nIndex) const
{
if (nIndex < 0 || static_cast<size_t>(nIndex) >= maFieldEntries.size())
@@ -638,14 +621,6 @@ void ScDPCacheTable::clear()
maRowsVisible.clear();
}
-void ScDPCacheTable::swap(ScDPCacheTable& rOther)
-{
- maTable.swap(rOther.maTable);
- maHeader.swap(rOther.maHeader);
- maFieldEntries.swap(rOther.maFieldEntries);
- maRowsVisible.swap(rOther.maRowsVisible);
-}
-
bool ScDPCacheTable::empty() const
{
return maTable.empty();
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 20eb1ca15..ff15b824f 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2122,50 +2122,6 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
}
}
-#if OLD_PIVOT_IMPLEMENTATION
-void ScDPObject::InitFromOldPivot( const ScPivot& rOld, ScDocument* pDocP, BOOL bSetSource )
-{
- ScDPSaveData aSaveData;
-
- ScPivotParam aParam;
- ScQueryParam aQuery;
- ScArea aArea;
- rOld.GetParam( aParam, aQuery, aArea );
-
- ConvertOrientation( aSaveData, aParam.aPageArr, aParam.nPageCount,
- sheet::DataPilotFieldOrientation_PAGE, pDocP, aArea.nRowStart, aArea.nTab,
- uno::Reference<sheet::XDimensionsSupplier>(), TRUE );
- ConvertOrientation( aSaveData, aParam.aColArr, aParam.nColCount,
- sheet::DataPilotFieldOrientation_COLUMN, pDocP, aArea.nRowStart, aArea.nTab,
- uno::Reference<sheet::XDimensionsSupplier>(), TRUE );
- ConvertOrientation( aSaveData, aParam.aRowArr, aParam.nRowCount,
- sheet::DataPilotFieldOrientation_ROW, pDocP, aArea.nRowStart, aArea.nTab,
- uno::Reference<sheet::XDimensionsSupplier>(), TRUE );
- ConvertOrientation( aSaveData, aParam.aDataArr, aParam.nDataCount,
- sheet::DataPilotFieldOrientation_DATA, pDocP, aArea.nRowStart, aArea.nTab,
- uno::Reference<sheet::XDimensionsSupplier>(), TRUE,
- aParam.aColArr, aParam.nColCount, aParam.aRowArr, aParam.nRowCount );
-
- aSaveData.SetIgnoreEmptyRows( rOld.GetIgnoreEmpty() );
- aSaveData.SetRepeatIfEmpty( rOld.GetDetectCat() );
- aSaveData.SetColumnGrand( rOld.GetMakeTotalCol() );
- aSaveData.SetRowGrand( rOld.GetMakeTotalRow() );
-
- SetSaveData( aSaveData );
- if (bSetSource)
- {
- ScSheetSourceDesc aDesc;
- aDesc.aSourceRange = rOld.GetSrcArea();
- rOld.GetQuery( aDesc.aQueryParam );
- SetSheetDesc( aDesc );
- }
- SetOutRange( rOld.GetDestArea() );
-
- aTableName = rOld.GetName();
- aTableTag = rOld.GetTag();
-}
-#endif
-
// -----------------------------------------------------------------------
// static
@@ -2506,26 +2462,3 @@ void ScDPCollection::clearCacheCellPool()
for_each(ps.begin(), ps.end(), DeleteCacheCells());
}
-//------------------------------------------------------------------------
-// convert old pivot tables into new datapilot tables
-
-#if OLD_PIVOT_IMPLEMENTATION
-void ScDPCollection::ConvertOldTables( ScPivotCollection& rOldColl )
-{
- // convert old pivot tables into new datapilot tables
-
- USHORT nOldCount = rOldColl.GetCount();
- for (USHORT i=0; i<nOldCount; i++)
- {
- ScDPObject* pNewObj = new ScDPObject(pDoc);
- pNewObj->InitFromOldPivot( *(rOldColl)[i], pDoc, TRUE );
- pNewObj->SetAlive( TRUE );
- Insert( pNewObj );
- }
- rOldColl.FreeAll();
-}
-#endif
-
-
-
-
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 6d5282d12..b7e04fc58 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -97,20 +97,6 @@ void lcl_SetBoolProperty( const uno::Reference<beans::XPropertySet>& xProp,
// -----------------------------------------------------------------------
-void lcl_SkipExtra( SvStream& rStream )
-{
- USHORT nExtra;
- rStream >> nExtra;
- if ( nExtra )
- {
- rStream.SeekRel( nExtra );
- if ( rStream.GetError() == SVSTREAM_OK )
- rStream.SetError( SCWARN_IMPORT_INFOLOST );
- }
-}
-
-// -----------------------------------------------------------------------
-
ScDPSaveMember::ScDPSaveMember(const String& rName) :
aName( rName ),
nVisibleMode( SC_DPSAVEMODE_DONTKNOW ),
@@ -352,17 +338,6 @@ void ScDPSaveDimension::SetOrientation(USHORT nNew)
nOrientation = nNew;
}
-void ScDPSaveDimension::SetSubTotals(BOOL bSet)
-{
- if (bSet)
- {
- USHORT nFunc = sheet::GeneralFunction_AUTO;
- SetSubTotals( 1, &nFunc );
- }
- else
- SetSubTotals( 0, NULL );
-}
-
void ScDPSaveDimension::SetSubTotals(long nCount, const USHORT* pFuncs)
{
if (pSubTotalFuncs)
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index 8a36305b7..80dd69eb2 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -231,15 +231,6 @@ long ScDatabaseDPData::GetColumnCount()
return pImpl->nColCount;
}
-void lcl_Reset( const uno::Reference<sdbc::XRowSet>& xRowSet )
- throw(sdbc::SQLException, uno::RuntimeException)
-{
- // isBeforeFirst / beforeFirst is not always available
- //! query if it is allowed
-
- xRowSet->execute(); // restart
-}
-
const TypedScStrCollection& ScDatabaseDPData::GetColumnEntries(long nColumn)
{
CreateCacheTable();
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index 29d9012d9..8ecf19a97 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -140,12 +140,6 @@ long ScSheetDPData::GetColumnCount()
return pImpl->aCacheTable.getColSize();
}
-BOOL lcl_HasQuery( const ScQueryParam& rParam )
-{
- return rParam.GetEntryCount() > 0 &&
- rParam.GetEntry(0).bDoQuery;
-}
-
const TypedScStrCollection& ScSheetDPData::GetColumnEntries(long nColumn)
{
DBG_ASSERT(nColumn>=0 && nColumn < pImpl->aCacheTable.getColSize(), "ScSheetDPData: wrong column");
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 891a68c86..3b5a6e035 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -991,16 +991,16 @@ void ScDPSource::CreateRes_Impl()
}
}
-void ScDPSource::DumpState( ScDocument* pDoc, const ScAddress& rPos )
-{
- CreateRes_Impl();
-
- ScAddress aDocPos( rPos );
-
- if (pColResRoot->GetChildDimension())
- pColResRoot->GetChildDimension()->DumpState( NULL, pDoc, aDocPos );
- pRowResRoot->DumpState( pColResRoot, pDoc, aDocPos );
-}
+//UNUSED2009-05 void ScDPSource::DumpState( ScDocument* pDoc, const ScAddress& rPos )
+//UNUSED2009-05 {
+//UNUSED2009-05 CreateRes_Impl();
+//UNUSED2009-05
+//UNUSED2009-05 ScAddress aDocPos( rPos );
+//UNUSED2009-05
+//UNUSED2009-05 if (pColResRoot->GetChildDimension())
+//UNUSED2009-05 pColResRoot->GetChildDimension()->DumpState( NULL, pDoc, aDocPos );
+//UNUSED2009-05 pRowResRoot->DumpState( pColResRoot, pDoc, aDocPos );
+//UNUSED2009-05 }
void ScDPSource::FillLevelList( USHORT nOrientation, List& rList )
{
@@ -1497,13 +1497,13 @@ const ScDPItemData& ScDPDimension::GetSelectedData()
return *pSelectedData;
}
-BOOL ScDPDimension::IsValidPage( const ScDPItemData& rData )
-{
- if ( bHasSelectedPage )
- return rData.IsCaseInsEqual( GetSelectedData() );
-
- return TRUE; // no selection -> all data
-}
+//UNUSED2009-05 BOOL ScDPDimension::IsValidPage( const ScDPItemData& rData )
+//UNUSED2009-05 {
+//UNUSED2009-05 if ( bHasSelectedPage )
+//UNUSED2009-05 return rData.IsCaseInsEqual( GetSelectedData() );
+//UNUSED2009-05
+//UNUSED2009-05 return TRUE; // no selection -> all data
+//UNUSED2009-05 }
// XPropertySet
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index a5e6fda45..925f34e4f 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -96,17 +96,17 @@ ScImportParam::~ScImportParam()
{
}
-void ScImportParam::Clear()
-{
- nCol1 = nCol2 = 0;
- nRow1 = nRow2 = 0;
- bImport = FALSE;
- bNative = FALSE;
- bSql = TRUE;
- nType = ScDbTable;
- aDBName.Erase();
- aStatement.Erase();
-}
+//UNUSED2009-05 void ScImportParam::Clear()
+//UNUSED2009-05 {
+//UNUSED2009-05 nCol1 = nCol2 = 0;
+//UNUSED2009-05 nRow1 = nRow2 = 0;
+//UNUSED2009-05 bImport = FALSE;
+//UNUSED2009-05 bNative = FALSE;
+//UNUSED2009-05 bSql = TRUE;
+//UNUSED2009-05 nType = ScDbTable;
+//UNUSED2009-05 aDBName.Erase();
+//UNUSED2009-05 aStatement.Erase();
+//UNUSED2009-05 }
ScImportParam& ScImportParam::operator=( const ScImportParam& r )
{
@@ -849,16 +849,16 @@ __EXPORT ScPivotParam::~ScPivotParam()
//------------------------------------------------------------------------
-void __EXPORT ScPivotParam::Clear()
-{
- nCol = 0;
- nRow = 0;
- nTab = 0;
- bIgnoreEmptyRows = bDetectCategories = FALSE;
- bMakeTotalCol = bMakeTotalRow = TRUE;
- ClearLabelData();
- ClearPivotArrays();
-}
+//UNUSED2009-05 void __EXPORT ScPivotParam::Clear()
+//UNUSED2009-05 {
+//UNUSED2009-05 nCol = 0;
+//UNUSED2009-05 nRow = 0;
+//UNUSED2009-05 nTab = 0;
+//UNUSED2009-05 bIgnoreEmptyRows = bDetectCategories = FALSE;
+//UNUSED2009-05 bMakeTotalCol = bMakeTotalRow = TRUE;
+//UNUSED2009-05 ClearLabelData();
+//UNUSED2009-05 ClearPivotArrays();
+//UNUSED2009-05 }
//------------------------------------------------------------------------
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index 787690185..343c0927c 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -254,10 +254,10 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
// InfoBox(0, String(nCount) + String(" Eintraege") ).Execute();
}
-void ScMarkArray::DeleteArea(SCROW nStartRow, SCROW nEndRow)
-{
- SetMarkArea(nStartRow, nEndRow, FALSE);
-}
+//UNUSED2009-05 void ScMarkArray::DeleteArea(SCROW nStartRow, SCROW nEndRow)
+//UNUSED2009-05 {
+//UNUSED2009-05 SetMarkArea(nStartRow, nEndRow, FALSE);
+//UNUSED2009-05 }
BOOL ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
{
diff --git a/sc/source/core/data/pivot.cxx b/sc/source/core/data/pivot.cxx
index 1e038bd20..87a3b2909 100644
--- a/sc/source/core/data/pivot.cxx
+++ b/sc/source/core/data/pivot.cxx
@@ -34,1995 +34,4 @@
// -----------------------------------------------------------------------
-#if OLD_PIVOT_IMPLEMENTATION
-#ifdef _MSC_VER
-#pragma optimize("",off)
-#endif
-
-// INCLUDE ---------------------------------------------------------------
-
-#include <svtools/zforlist.hxx>
-#include <tools/solar.h>
-
-#include "globstr.hrc"
-#include "global.hxx"
-#include "subtotal.hxx"
-#include "scitems.hxx"
-#include "attrib.hxx"
-#include "patattr.hxx"
-#include "docpool.hxx"
-#include "document.hxx"
-#include "userlist.hxx"
-#include "pivot.hxx"
-#include "cell.hxx"
-#include "rechead.hxx"
-#include "compiler.hxx" // fuer errNoValue
-#include "progress.hxx"
-
-#include <string.h>
-#include <math.h>
-
-// STATIC DATA -----------------------------------------------------------
-
-//! bei Gelegenheit...
-
-static short nStaticStrRefCount = 0;
-static String* pLabel[PIVOT_MAXFUNC+1]; // incl. "auto"
-static String* pLabelTotal;
-static String* pLabelData;
-
-static SCSIZE nDataMult = 1;
-
-#define nFirstLine 2
-
-static const USHORT nFuncMaskArr[PIVOT_MAXFUNC+1] =
- { PIVOT_FUNC_SUM,
- PIVOT_FUNC_COUNT,
- PIVOT_FUNC_AVERAGE,
- PIVOT_FUNC_MAX,
- PIVOT_FUNC_MIN,
- PIVOT_FUNC_PRODUCT,
- PIVOT_FUNC_COUNT_NUM,
- PIVOT_FUNC_STD_DEV,
- PIVOT_FUNC_STD_DEVP,
- PIVOT_FUNC_STD_VAR,
- PIVOT_FUNC_STD_VARP,
- PIVOT_FUNC_AUTO }; // automatisch
-
-// -----------------------------------------------------------------------
-
-// 1 Filter-Knopf
-// 2 Feldnamen links
-// 3 "Daten" links
-// 4 Feldnamen oben
-// 5 "Daten" oben
-// 6 einzelne "Gesamt" oben rechts
-// 7 "Gesamt" oben rechts
-// 8 einzelne "Gesamt" unten links
-// 9 "Gesamt" unten links
-// 10 innere Kategorie links
-// 11 Teilergebnis Label einzeln links
-// 12 Teilergebnis Label gesamt links
-// 13 letzte Kategorie links
-// 14 innere Kategorie oben
-// 15 Teilergebnis Label einzeln oben
-// 16 Teilergebnis Label gesamt oben
-// 17 letzte Kategorie oben
-// 18 Werte innen
-// 19 Werte in Teilergebnisspalte
-// 20 Werte in Gesamt-Spalte
-// 21 Werte in einzelnen Gesamt-Spalten
-// 22 Werte in Ergebnis-Zeile Teilergebnis oder Gesamt
-// 23 Kreuzung von Spalte/Zeile (Teilergebnis-Spalte)
-// 24 Kreuzung von Spalte/Zeile (Gesamt-Spalte)
-// 25 wie 24 bei einzelnen "Gesamt"
-
-SCSIZE lcl_MaskToIndex( USHORT nFuncMask )
-{
- SCSIZE i;
- for (i=0; i<=PIVOT_MAXFUNC; i++)
- if (nFuncMask == nFuncMaskArr[i])
- return i;
-
- DBG_ERROR("Falsche Maske in MaskToIndex");
- return 0;
-}
-
-BOOL lcl_IsEmptyLine( ScDocument* pDoc, const ScAddress& rPos, SCCOL nCol2 )
-{
- //! ans Document verschieben !!!
-
- ScAddress aAdr( rPos );
- for (SCCOL nCol=aAdr.Col(); nCol<=nCol2; nCol++)
- {
- aAdr.SetCol( nCol );
- if ( pDoc->GetCell( aAdr ) )
- return FALSE;
- }
- return TRUE;
-}
-
-ScPivot::ScPivot(ScDocument* pDocument) :
- pDoc (pDocument),
- aQuery (),
- bHasHeader (FALSE),
- bIgnoreEmpty (FALSE),
- bDetectCat (FALSE),
- bMakeTotalCol (TRUE),
- bMakeTotalRow (TRUE),
- nColNameCount (0),
- pColNames (NULL),
- nSrcCol1 (0),
- nSrcRow1 (0),
- nSrcCol2 (0),
- nSrcRow2 (0),
- nSrcTab (0),
- nDestCol1 (0),
- nDestRow1 (0),
- nDestCol2 (0),
- nDestRow2 (0),
- nDestTab (0),
- nDataStartCol (0),
- nDataStartRow (0),
- nColCount (0),
- nRowCount (0),
- nDataCount (0),
- bValidArea (FALSE),
- bDataAtCol (FALSE)
-{
- for (SCSIZE i=0; i<PIVOT_MAXFIELD; i++)
- {
- pColList[i] = new PivotScStrCollection();
- pRowList[i] = new PivotScStrCollection();
- }
- pDataList = pColList[0];
- ppDataArr = NULL;
- nDataColCount = 0;
- nDataRowCount = 0;
- nRecCount = 0;
- pColRef = NULL;
-
- // Initialisierung der statischen Strings, wenn noetig
- nStaticStrRefCount += 1;
- if ( nStaticStrRefCount < 2 )
- {
- pLabelTotal = new String( ScGlobal::GetRscString(STR_PIVOT_TOTAL) );
- pLabelData = new String( ScGlobal::GetRscString(STR_PIVOT_DATA) );
-
- for (SCSIZE i=0; i<=PIVOT_MAXFUNC; i++ ) // incl. "auto"
- pLabel[i] = new String; // kein Leerzeichen
-
- *pLabel[ 0] = ScGlobal::GetRscString(STR_FUN_TEXT_SUM);
- *pLabel[ 1] = ScGlobal::GetRscString(STR_FUN_TEXT_COUNT);
- *pLabel[ 2] = ScGlobal::GetRscString(STR_FUN_TEXT_AVG);
- *pLabel[ 3] = ScGlobal::GetRscString(STR_FUN_TEXT_MAX);
- *pLabel[ 4] = ScGlobal::GetRscString(STR_FUN_TEXT_MIN);
- *pLabel[ 5] = ScGlobal::GetRscString(STR_FUN_TEXT_PRODUCT);
- *pLabel[ 6] = ScGlobal::GetRscString(STR_FUN_TEXT_COUNT); // Count2
- *pLabel[ 7] = ScGlobal::GetRscString(STR_FUN_TEXT_STDDEV);
- *pLabel[ 8] = ScGlobal::GetRscString(STR_FUN_TEXT_STDDEV); // Stddev2
- *pLabel[ 9] = ScGlobal::GetRscString(STR_FUN_TEXT_VAR);
- *pLabel[10] = ScGlobal::GetRscString(STR_FUN_TEXT_VAR); // Var2
- *pLabel[11] = ScGlobal::GetRscString(STR_TABLE_ERGEBNIS);
- }
-}
-
-ScPivot::ScPivot(const ScPivot& rPivot):
- ScDataObject(),
- pDoc (rPivot.pDoc),
- aQuery (rPivot.aQuery),
- bHasHeader (rPivot.bHasHeader),
- bIgnoreEmpty (rPivot.bIgnoreEmpty),
- bDetectCat (rPivot.bDetectCat),
- bMakeTotalCol (rPivot.bMakeTotalCol),
- bMakeTotalRow (rPivot.bMakeTotalRow),
- aName (rPivot.aName),
- aTag (rPivot.aTag),
- nColNameCount (0),
- pColNames (NULL),
- nSrcCol1 (rPivot.nSrcCol1),
- nSrcRow1 (rPivot.nSrcRow1),
- nSrcCol2 (rPivot.nSrcCol2),
- nSrcRow2 (rPivot.nSrcRow2),
- nSrcTab (rPivot.nSrcTab),
- nDestCol1 (rPivot.nDestCol1),
- nDestRow1 (rPivot.nDestRow1),
- nDestCol2 (rPivot.nDestCol2),
- nDestRow2 (rPivot.nDestRow2),
- nDestTab (rPivot.nDestTab),
- nDataStartCol (0),
- nDataStartRow (0),
- nColCount (0),
- nRowCount (0),
- nDataCount (0),
- bValidArea (FALSE),
- bDataAtCol (FALSE)
-{
- if (rPivot.nColNameCount>0 && rPivot.pColNames)
- {
- nColNameCount = rPivot.nColNameCount;
- pColNames = new String[nColNameCount];
- for (SCSIZE nCol=0; nCol<nColNameCount; nCol++)
- pColNames[nCol] = rPivot.pColNames[nCol];
- }
-
- for (SCSIZE i=0; i<PIVOT_MAXFIELD; i++)
- {
- pColList[i] = new PivotScStrCollection();
- pRowList[i] = new PivotScStrCollection();
- }
- pDataList = pColList[0];
- ppDataArr = NULL;
- nRecCount = 0;
- pColRef = NULL;
-
- SetColFields( rPivot.aColArr, rPivot.nColCount );
- SetRowFields( rPivot.aRowArr, rPivot.nRowCount );
- SetDataFields( rPivot.aDataArr, rPivot.nDataCount );
-
- nStaticStrRefCount += 1;
-}
-
-ScPivot::~ScPivot()
-{
- for (SCSIZE i=0; i<PIVOT_MAXFIELD; i++)
- {
- delete pColList[i];
- delete pRowList[i];
- }
- if (ppDataArr)
- {
- for (SCSIZE j=0; j<nDataRowCount; j++)
- delete[] ppDataArr[j];
- delete[] ppDataArr;
- ppDataArr = NULL;
- }
- delete[] pColRef;
-
- delete[] pColNames;
-
- // statische Strings ggF. wieder abraeumen
- nStaticStrRefCount -= 1;
- if ( nStaticStrRefCount == 0 )
- {
- delete pLabelTotal;
- delete pLabelData;
-
- for ( SCSIZE k=0; k<=PIVOT_MAXFUNC; k++ ) // incl. "auto"
- delete pLabel[k];
- }
-}
-
-ScPivot* ScPivot::CreateNew() const
-{
- ScPivot* pNewPivot = new ScPivot( pDoc );
-
- pNewPivot->SetQuery(aQuery);
- pNewPivot->SetHeader(bHasHeader);
- pNewPivot->SetIgnoreEmpty(bIgnoreEmpty);
- pNewPivot->SetDetectCat(bDetectCat);
- pNewPivot->SetMakeTotalCol(bMakeTotalCol);
- pNewPivot->SetMakeTotalRow(bMakeTotalRow);
-
- pNewPivot->SetSrcArea( nSrcCol1, nSrcRow1, nSrcCol2, nSrcRow2, nSrcTab );
- pNewPivot->SetDestPos( nDestCol1, nDestRow1, nDestTab );
-
- return pNewPivot;
-}
-
-void lcl_LoadFieldArr30( SvStream& /* rStream */, PivotField* /* pField */, USHORT /* nCount */ )
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- USHORT i;
-
- for (i=0; i<nCount; i++)
- {
- rStream >> pField[i].nCol
- >> pField[i].nFuncMask
- >> pField[i].nFuncCount;
- }
-#endif
-}
-
-void lcl_LoadFieldArr( SvStream& /* rStream */, PivotField* /* pField */, USHORT /* nCount */ )
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- USHORT i;
-
- for (i=0; i<nCount; i++)
- {
- BYTE cData;
- rStream >> cData;
- if( cData & 0x0F )
- rStream.SeekRel( cData & 0x0F );
- rStream >> pField[i].nCol
- >> pField[i].nFuncMask
- >> pField[i].nFuncCount;
- }
-#endif
-}
-
-void lcl_SaveFieldArr( SvStream& /* rStream */, const PivotField* /* pField */, USHORT /* nCount */ )
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- USHORT i;
-
- for (i=0; i<nCount; i++)
- {
- rStream << (BYTE) 0x00
- << pField[i].nCol
- << pField[i].nFuncMask
- << pField[i].nFuncCount;
- }
-#endif
-}
-
-// nach Load muessen Daten neu berechnet werden !
-
-BOOL ScPivot::Load( SvStream& /* rStream */, ScMultipleReadHeader& rHdr )
-{
- rHdr.StartEntry();
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
-
- rStream >> bHasHeader
-
- >> nSrcCol1
- >> nSrcRow1
- >> nSrcCol2
- >> nSrcRow2
- >> nSrcTab
-
- >> nDestCol1
- >> nDestRow1
- >> nDestCol2
- >> nDestRow2
- >> nDestTab;
-
- // Arrays immer ueber Set...Fields initalisieren!
-
- short nCount;
- PivotFieldArr aFieldArr;
-
- if( pDoc->GetSrcVersion() >= SC_DATABYTES2 )
- {
- rStream >> nCount;
- lcl_LoadFieldArr( rStream, aFieldArr, nCount );
- SetColFields(aFieldArr, nCount);
-
- rStream >> nCount;
- lcl_LoadFieldArr( rStream, aFieldArr, nCount );
- SetRowFields(aFieldArr, nCount);
-
- rStream >> nCount;
- lcl_LoadFieldArr( rStream, aFieldArr, nCount );
- SetDataFields(aFieldArr, nCount);
- }
- else
- {
- rStream >> nCount;
- lcl_LoadFieldArr30( rStream, aFieldArr, nCount );
- SetColFields(aFieldArr, nCount);
-
- rStream >> nCount;
- lcl_LoadFieldArr30( rStream, aFieldArr, nCount );
- SetRowFields(aFieldArr, nCount);
-
- rStream >> nCount;
- lcl_LoadFieldArr30( rStream, aFieldArr, nCount );
- SetDataFields(aFieldArr, nCount);
- }
-
- aQuery.Load( rStream );
-
- rStream >> bIgnoreEmpty;
- rStream >> bDetectCat;
-
- if (rHdr.BytesLeft())
- {
- rStream >> bMakeTotalCol; // ab 355i
- rStream >> bMakeTotalRow;
- }
-
- if (rHdr.BytesLeft()) // ab 500a
- {
- rStream.ReadByteString( aName, rStream.GetStreamCharSet() );
- rStream.ReadByteString( aTag, rStream.GetStreamCharSet() );
-
- DBG_ASSERT(!pColNames, "Spaltennamen schon gesetzt?");
- rStream >> nColNameCount;
- if (nColNameCount)
- {
- pColNames = new String[nColNameCount];
- for (SCCOL nCol=0; nCol<nColNameCount; nCol++)
- rStream.ReadByteString( pColNames[nCol], rStream.GetStreamCharSet() );
- }
- }
- // sonst wird hinterher aus ScPivotCollection::Load ein Name vergeben
-
- rHdr.EndEntry();
-#endif
- return TRUE;
-}
-
-BOOL ScPivot::Store( SvStream& /* rStream */, ScMultipleWriteHeader& rHdr ) const
-{
- rHdr.StartEntry();
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
-
- rStream << bHasHeader
-
- << nSrcCol1
- << nSrcRow1
- << nSrcCol2
- << nSrcRow2
- << nSrcTab
-
- << nDestCol1
- << nDestRow1
- << nDestCol2
- << nDestRow2
- << nDestTab
-
- << nColCount;
- lcl_SaveFieldArr( rStream, aColArr, nColCount );
- rStream << nRowCount;
- lcl_SaveFieldArr( rStream, aRowArr, nRowCount );
- rStream << nDataCount;
- lcl_SaveFieldArr( rStream, aDataArr, nDataCount );
-
- aQuery.Store( rStream );
-
- rStream << bIgnoreEmpty;
- rStream << bDetectCat;
-
- rStream << bMakeTotalCol; // ab 355i
- rStream << bMakeTotalRow;
-
- if( rStream.GetVersion() > SOFFICE_FILEFORMAT_40 ) // Name/Tag/Spalten ab 5.0
- {
- rStream.WriteByteString( aName, rStream.GetStreamCharSet() );
- rStream.WriteByteString( aTag, rStream.GetStreamCharSet() );
-
- if (!pColNames) ((ScPivot*)this)->nColNameCount = 0; // soll nicht sein
- rStream << nColNameCount;
- for (SCCOL nCol=0; nCol<nColNameCount; nCol++)
- rStream.WriteByteString( pColNames[nCol], rStream.GetStreamCharSet() );
- }
-
- rHdr.EndEntry();
-#endif
- return TRUE;
-}
-
-void ScPivot::SetQuery(const ScQueryParam& rQuery)
-{
- aQuery = rQuery;
-
- bValidArea = FALSE;
-}
-
-void ScPivot::GetQuery(ScQueryParam& rQuery) const
-{
- rQuery = aQuery;
-}
-
-void ScPivot::SetHeader(BOOL bHeader)
-{
- bHasHeader = bHeader;
- bValidArea = FALSE;
-}
-
-BOOL ScPivot::GetHeader() const
-{
- return bHasHeader;
-}
-
-void ScPivot::SetIgnoreEmpty(BOOL bIgnore)
-{
- bIgnoreEmpty = bIgnore;
- bValidArea = FALSE;
-}
-
-BOOL ScPivot::GetIgnoreEmpty() const
-{
- return bIgnoreEmpty;
-}
-
-void ScPivot::SetDetectCat(BOOL bDetect)
-{
- bDetectCat = bDetect;
- bValidArea = FALSE;
-}
-
-BOOL ScPivot::GetDetectCat() const
-{
- return bDetectCat;
-}
-
-void ScPivot::SetMakeTotalCol(BOOL bSet)
-{
- bMakeTotalCol = bSet;
- bValidArea = FALSE;
-}
-
-BOOL ScPivot::GetMakeTotalCol() const
-{
- return bMakeTotalCol;
-}
-
-void ScPivot::SetMakeTotalRow(BOOL bSet)
-{
- bMakeTotalRow = bSet;
- bValidArea = FALSE;
-}
-
-BOOL ScPivot::GetMakeTotalRow() const
-{
- return bMakeTotalRow;
-}
-
-void ScPivot::SetName(const String& rNew)
-{
- aName = rNew;
-}
-
-const String& ScPivot::GetName() const
-{
- return aName;
-}
-
-void ScPivot::SetTag(const String& rNew)
-{
- aTag = rNew;
-}
-
-const String& ScPivot::GetTag() const
-{
- return aTag;
-}
-
-void ScPivot::SetSrcArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab)
-{
- nSrcCol1 = Min(nCol1, (SCCOL)MAXCOL);
- nSrcRow1 = Min(nRow1, (SCROW)MAXROW);
- nSrcCol2 = Min(nCol2, (SCCOL)MAXCOL);
- nSrcRow2 = Min(nRow2, (SCROW)MAXROW);
- nSrcTab = nTab;
- bValidArea = FALSE;
-}
-
-void ScPivot::GetSrcArea(SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2, SCTAB& rTab) const
-{
- rCol1 = nSrcCol1;
- rRow1 = nSrcRow1;
- rCol2 = nSrcCol2;
- rRow2 = nSrcRow2;
- rTab = nSrcTab;
-}
-
-ScRange ScPivot::GetSrcArea() const
-{
- return ScRange( nSrcCol1,nSrcRow1,nSrcTab, nSrcCol2,nSrcRow2,nSrcTab );
-}
-
-void ScPivot::SetDestPos(SCCOL nCol, SCROW nRow, SCTAB nTab)
-{
- nDestCol1 = nCol;
- nDestRow1 = nRow;
- nDestTab = nTab;
- bValidArea = FALSE;
-}
-
-void ScPivot::GetDestArea(SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2, SCTAB& rTab) const
-{
- rCol1 = nDestCol1;
- rRow1 = nDestRow1;
- rTab = nDestTab;
- if (bValidArea)
- {
- rCol2 = nDestCol2;
- rRow2 = nDestRow2;
- }
- else
- {
- rCol2 = nDestCol1;
- rRow2 = nDestRow1;
- }
-}
-
-ScRange ScPivot::GetDestArea() const
-{
- ScAddress aStart( nDestCol1, nDestRow1, nDestTab );
- ScAddress aEnd = aStart;
- if ( bValidArea )
- aEnd = ScAddress( nDestCol2, nDestRow2, nDestTab );
- return ScRange( aStart, aEnd );
-}
-
-void ScPivot::MoveSrcArea( SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab )
-{
- if ( nNewCol != nSrcCol1 || nNewRow != nSrcRow1 || nNewTab != nSrcTab )
- {
- SCsCOL nDiffX = nNewCol - (SCsCOL) nSrcCol1;
- SCsROW nDiffY = nNewRow - (SCsROW) nSrcRow1;
-
- nSrcTab = nNewTab;
- nSrcCol1 = sal::static_int_cast<SCCOL>( nSrcCol1 + nDiffX );
- nSrcCol2 = sal::static_int_cast<SCCOL>( nSrcCol2 + nDiffX );
- nSrcRow1 = sal::static_int_cast<SCROW>( nSrcRow1 + nDiffY );
- nSrcRow2 = sal::static_int_cast<SCROW>( nSrcRow2 + nDiffY );
-
- aQuery.nCol1 = sal::static_int_cast<SCCOL>( aQuery.nCol1 + nDiffX );
- aQuery.nCol2 = sal::static_int_cast<SCCOL>( aQuery.nCol2 + nDiffX );
- aQuery.nRow1 = sal::static_int_cast<SCROW>( aQuery.nRow1 + nDiffY );
- aQuery.nRow2 = sal::static_int_cast<SCROW>( aQuery.nRow2 + nDiffY );
-
- SCSIZE nEC = aQuery.GetEntryCount();
- for (SCSIZE i=0; i<nEC; i++)
- if (aQuery.GetEntry(i).bDoQuery)
- aQuery.GetEntry(i).nField += nDiffX;
-
- if (bValidArea)
- {
- SCSIZE nC;
- SCSIZE nR;
- for (nC=0; nC<nColCount; nC++)
- if (aColArr[nC].nCol != PIVOT_DATA_FIELD)
- aColArr[nC].nCol = sal::static_int_cast<SCsCOL>( aColArr[nC].nCol + nDiffX );
- for (nR=0; nR<nRowCount; nR++)
- if (aRowArr[nR].nCol != PIVOT_DATA_FIELD)
- aRowArr[nR].nCol = sal::static_int_cast<SCsCOL>( aRowArr[nR].nCol + nDiffX );
- for (nC=0; nC<nDataCount; nC++)
- if (aDataArr[nC].nCol != PIVOT_DATA_FIELD)
- aDataArr[nC].nCol = sal::static_int_cast<SCsCOL>( aDataArr[nC].nCol + nDiffX );
- }
- }
-}
-
-void ScPivot::ExtendSrcArea( SCCOL nNewEndCol, SCROW nNewEndRow )
-{
- DBG_ASSERT( nNewEndCol >= nSrcCol2 && nNewEndRow >= nSrcRow2, "ExtendSrcArea: zu klein" );
-
- nSrcCol2 = nNewEndCol;
- nSrcRow2 = nNewEndRow;
-
- // alles andere bleibt erhalten
-}
-
-void ScPivot::MoveDestArea( SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab )
-{
- if ( nNewCol != nDestCol1 || nNewRow != nDestRow1 || nNewTab != nDestTab )
- {
- SCsCOL nDiffX = nNewCol - (SCsCOL) nDestCol1;
- SCsROW nDiffY = nNewRow - (SCsROW) nDestRow1;
-
- nDestTab = nNewTab;
- nDestCol1 = sal::static_int_cast<SCCOL>( nDestCol1 + nDiffX );
- nDestRow1 = sal::static_int_cast<SCROW>( nDestRow1 + nDiffY );
-
- if (bValidArea)
- {
- nDestCol2 = sal::static_int_cast<SCCOL>( nDestCol2 + nDiffX );
- nDestRow2 = sal::static_int_cast<SCROW>( nDestRow2 + nDiffY );
-
- nDataStartCol = sal::static_int_cast<SCCOL>( nDataStartCol + nDiffX );
- nDataStartRow = sal::static_int_cast<SCROW>( nDataStartRow + nDiffY );
- }
- }
-}
-
-void ScPivot::SetColFields(const PivotField* pFieldArr, SCSIZE nCount)
-{
- nColCount = Max(static_cast<SCSIZE>(0), Min(nCount, PIVOT_MAXFIELD));
- for (SCSIZE i = 0; i < nColCount; i++)
- {
- aColArr[i] = pFieldArr[i];
- aColArr[i].nFuncCount = 0;
- if (aColArr[i].nCol == PIVOT_DATA_FIELD)
- {
- aColArr[i].nFuncMask = PIVOT_FUNC_NONE;
- pDataList = pColList[i];
- bDataAtCol = TRUE;
- }
- else
- {
- for (SCsCOL j=0; j<=PIVOT_MAXFUNC; j++) // incl. "auto"
- if (aColArr[i].nFuncMask & nFuncMaskArr[j])
- aColArr[i].nFuncCount++;
- }
- }
- bValidArea = FALSE;
-}
-
-void ScPivot::GetColFields(PivotField* pFieldArr, SCSIZE& rCount) const
-{
- for (SCSIZE i=0; i<nColCount; i++)
- pFieldArr[i] = aColArr[i];
- rCount = nColCount;
-}
-
-void ScPivot::SetRowFields(const PivotField* pFieldArr, SCSIZE nCount)
-{
- nRowCount = Max(static_cast<SCSIZE>(0), Min(nCount, PIVOT_MAXFIELD));
- for (SCSIZE i = 0; i < nRowCount; i++)
- {
- aRowArr[i] = pFieldArr[i];
- aRowArr[i].nFuncCount = 0;
- if (aRowArr[i].nCol == PIVOT_DATA_FIELD)
- {
- aRowArr[i].nFuncMask = PIVOT_FUNC_NONE;
- pDataList = pRowList[i];
- bDataAtCol = FALSE;
- }
- else
- {
- for (SCSIZE j=0; j<=PIVOT_MAXFUNC; j++) // incl. "auto"
- if (aRowArr[i].nFuncMask & nFuncMaskArr[j])
- aRowArr[i].nFuncCount++;
- }
- }
- bValidArea = FALSE;
-}
-
-void ScPivot::GetRowFields(PivotField* pFieldArr, SCSIZE& rCount) const
-{
- for (SCSIZE i=0; i<nRowCount; i++)
- pFieldArr[i] = aRowArr[i];
- rCount = nRowCount;
-}
-
-void ScPivot::SetDataFields(const PivotField* pFieldArr, SCSIZE nCount)
-{
- USHORT nFuncNo;
- SCSIZE i;
-
- //
- // nDataCount vorausberechnen (wie unten)
- //
-
- nDataCount = 0;
- for (i = 0; i < nCount; i++)
- for (nFuncNo=0; nFuncNo<PIVOT_MAXFUNC; nFuncNo++)
- if (pFieldArr[i].nFuncMask & nFuncMaskArr[nFuncNo])
- if (nDataCount+1 < PIVOT_MAXFIELD)
- ++nDataCount;
-
- //
- // Eintraege anpassen
- //
-
- if ((nRowCount == 1) && (aRowArr[0].nCol == PIVOT_DATA_FIELD) && (nDataCount == 1))
- {
- aColArr[nColCount] = aRowArr[0];
- pDataList = pColList[nColCount];
- nColCount++;
- nRowCount--;
- bDataAtCol = TRUE;
- }
- if ((nColCount == 1) && (aColArr[0].nCol == PIVOT_DATA_FIELD) && (nDataCount == 1))
- {
- aRowArr[nRowCount] = aColArr[0];
- pDataList = pRowList[nRowCount];
- nRowCount++;
- nColCount--;
- bDataAtCol = FALSE;
- }
-
- if ((nDataCount == 1)
- && (aColArr[nColCount-1].nCol != PIVOT_DATA_FIELD)
- && (aColArr[nRowCount-1].nCol != PIVOT_DATA_FIELD))
- {
- if (bDataAtCol)
- {
- PivotField aField;
- SCSIZE nIndex = PIVOT_MAXFIELD;
- for (i=0; i<nColCount; i++)
- {
- if (aColArr[i].nCol == PIVOT_DATA_FIELD)
- {
- aField = aColArr[i];
- nIndex = i;
- }
- }
- DBG_ASSERT(nIndex < PIVOT_MAXFIELD, "no data field (GPF in old versions!)");
- if ( nIndex < PIVOT_MAXFIELD )
- {
- memcpy(&aColArr[nIndex], &aColArr[nIndex+1], (PIVOT_MAXFIELD - nIndex - 1) * sizeof(PivotField));
- aColArr[nColCount-1] = aField;
- pDataList = pColList[nColCount-1];
- }
- }
- else
- {
- PivotField aField;
- SCSIZE nIndex = PIVOT_MAXFIELD;
- for (i=0; i<nRowCount; i++)
- {
- if (aRowArr[i].nCol == PIVOT_DATA_FIELD)
- {
- aField = aRowArr[i];
- nIndex = i;
- }
- }
- DBG_ASSERT(nIndex < PIVOT_MAXFIELD, "no data field (GPF in old versions!)");
- if ( nIndex < PIVOT_MAXFIELD )
- {
- memcpy(&aRowArr[nIndex], &aRowArr[nIndex+1], (PIVOT_MAXFIELD - nIndex - 1) * sizeof(PivotField));
- aRowArr[nRowCount-1] = aField;
- pDataList = pRowList[nRowCount-1];
- }
- }
- }
-
- //
- // Datenfelder in Eintraege mit nur einer Funktion aufteilen
- //
-
- pDataList->FreeAll();
- nDataCount = 0;
- for (i = 0; i < nCount; i++)
- {
- for (nFuncNo=0; nFuncNo<PIVOT_MAXFUNC; nFuncNo++)
- if (pFieldArr[i].nFuncMask & nFuncMaskArr[nFuncNo])
- if (nDataCount+1 < PIVOT_MAXFIELD)
- {
- aDataArr[nDataCount] = pFieldArr[i];
- aDataArr[nDataCount].nFuncCount = 0;
- aDataArr[nDataCount].nFuncMask = nFuncMaskArr[nFuncNo];
-
- String aStr;
- pDoc->GetString(aDataArr[nDataCount].nCol, nSrcRow1, nSrcTab, aStr);
- if (aStr.Len() == 0)
- aStr = ScColToAlpha( aDataArr[nDataCount].nCol );
- TypedStrData* pStrData = new TypedStrData(aStr);
- if (!(pDataList->AtInsert(pDataList->GetCount(), pStrData)))
- {
- delete pStrData;
- DBG_ERROR("Fehler bei pDataList->AtInsert");
- }
-
- ++nDataCount;
- }
- }
-
- //
- //
- //
-
- bValidArea = FALSE;
-}
-
-void ScPivot::GetDataFields(PivotField* pFieldArr, SCSIZE& rCount) const
-{
-/* for (SCSIZE i=0; i<nDataCount; i++)
- pFieldArr[i] = aDataArr[i];
- rCount = nDataCount;
-*/
-
- rCount = 0;
- for (SCSIZE i=0; i<nDataCount; i++)
- {
- BOOL bFound = FALSE;
- for (SCSIZE j=0; j<rCount && !bFound; j++)
- if (pFieldArr[j].nCol == aDataArr[i].nCol)
- {
- // add to previous column only if new bits aren't already set there
- if ( ( pFieldArr[j].nFuncMask & aDataArr[i].nFuncMask ) == 0 )
- {
- pFieldArr[j].nFuncMask |= aDataArr[i].nFuncMask;
- pFieldArr[j].nFuncCount++;
- bFound = TRUE;
- }
- }
- if (!bFound)
- {
- pFieldArr[rCount] = aDataArr[i];
- ++rCount;
- }
- }
-}
-
-BOOL ScPivot::CreateData(BOOL bKeepDest)
-{
- //
- //
- //
-
- SCCOL nOldCol2 = nDestCol2;
- SCROW nOldRow2 = nDestRow2;
-
- pColRef = new PivotColRef[MAXCOL];
- aQuery.nCol1 = nSrcCol1;
- aQuery.nRow1 = nSrcRow1;
- aQuery.nCol2 = nSrcCol2;
- aQuery.nRow2 = nSrcRow2;
- aQuery.bHasHeader = bHasHeader;
- BOOL bRet = CreateFields();
- if (bRet)
- {
- SCSIZE i=0; // nDataMult berechnen - nach CreateFields, vor CreateFieldData !!!
- nDataMult = 1;
- if (nDataCount > 1)
- {
- if (bDataAtCol)
- {
- while (i<nColCount && aColArr[i].nCol != PIVOT_DATA_FIELD) i++;
- i++;
- while (i<nColCount)
- nDataMult *= pColList[i++]->GetCount();
- }
- else
- {
- while (i<nRowCount && aRowArr[i].nCol != PIVOT_DATA_FIELD) i++;
- i++;
- while (i<nRowCount)
- nDataMult *= pRowList[i++]->GetCount();
- }
- }
- DBG_ASSERT(nDataMult,"nDataMult==0");
-
- CalcArea();
- if ((ValidCol(nDestCol2)) && (ValidRow(nDestRow2)))
- {
- CreateFieldData();
- bValidArea = TRUE;
- }
- else
- bRet = FALSE;
- }
-
- if ( bKeepDest )
- {
- bValidArea = TRUE; //! ???
- nDestCol2 = nOldCol2;
- nDestRow2 = nOldRow2;
- }
-
- return bRet;
-}
-
-void ScPivot::DrawData()
-{
- ScProgress aProgress( pDoc->GetDocumentShell(), ScGlobal::GetRscString(STR_PIVOT_PROGRESS), nDestRow2-nDestRow1 );
-
- SCSIZE i;
-
- SCCOL nCol;
- SCROW nRow;
- String aStr;
- pDoc->pTab[nDestTab]->DeleteArea(nDestCol1, nDestRow1, nDestCol2, nDestRow2, IDF_ALL);
-
- if ( nDataStartRow > nDestRow1+nFirstLine )
- SetStyle(nDestCol1, nDestRow1+nFirstLine, nDestCol2, nDataStartRow-1, PIVOT_STYLE_TOP);
- SetStyle(nDataStartCol, nDataStartRow, nDestCol2, nDestRow2, PIVOT_STYLE_INNER);
-
- pDoc->SetString(nDestCol1, nDestRow1, nDestTab, ScGlobal::GetRscString(STR_CELL_FILTER));
- // Kategorie 1
- SetButton(nDestCol1, nDestRow1, nDestCol1, nDestRow1);
-
- if (bHasHeader) // Spalten / Zeilennamen ausgeben
- {
- if (nColCount != 0)
- {
- nCol = nDestCol1;
- nRow = nDataStartRow - 1;
- for (i=0; i<nColCount; i++)
- {
- if (aColArr[i].nCol != PIVOT_DATA_FIELD)
- {
- pDoc->GetString(aColArr[i].nCol, nSrcRow1, nSrcTab, aStr);
- if ( !aStr.Len() )
- aStr = ScColToAlpha( aColArr[i].nCol );
- pDoc->SetString(nCol, nRow, nDestTab, aStr);
- // Kategorie 2
- nCol++;
- }
- else if (nDataCount > 1)
- {
- pDoc->SetString(nCol, nRow, nDestTab, *pLabelData);
- // Kategorie 3
- nCol++;
- }
- }
- SetButton(nDestCol1, nRow, nCol-1, nRow);
- SetStyle(nDestCol1, nRow, nCol-1, nRow, PIVOT_STYLE_FIELDNAME);
- }
- if (nRowCount != 0)
- {
- nCol = nDataStartCol;
- nRow = nDestRow1 + nFirstLine;
- for (i=0; i<nRowCount; i++)
- {
- if (aRowArr[i].nCol != PIVOT_DATA_FIELD)
- {
- pDoc->GetString(aRowArr[i].nCol, nSrcRow1, nSrcTab, aStr);
- if ( !aStr.Len() )
- aStr = ScColToAlpha( aRowArr[i].nCol );
- pDoc->SetString(nCol, nRow, nDestTab, aStr);
- // Kategorie 4
- nCol++;
- }
- else if (nDataCount > 1)
- {
- pDoc->SetString(nCol, nRow, nDestTab, *pLabelData);
- // Kategorie 5
- nCol++;
- }
- }
- SetButton(nDataStartCol, nRow, nCol-1, nRow);
- SetStyle(nDataStartCol, nRow, nCol-1, nRow, PIVOT_STYLE_FIELDNAME);
- }
- }
-
- BOOL bNoRows = (nRowCount == 0) || ( nRowCount == 1 && aRowArr[0].nCol == PIVOT_DATA_FIELD );
- BOOL bNoCols = (nColCount == 0) || ( nColCount == 1 && aColArr[0].nCol == PIVOT_DATA_FIELD );
- if (!bMakeTotalCol) bNoRows = TRUE;
- if (!bMakeTotalRow) bNoCols = TRUE;
-
- SCCOL nTotalCol = nDestCol2;
- SCROW nTotalRow = nDestRow2;
- if (bDataAtCol)
- nTotalRow = sal::static_int_cast<SCROW>( nTotalRow - ( nDataCount - 1 ) );
- else
- nTotalCol = sal::static_int_cast<SCCOL>( nTotalCol - ( nDataCount - 1 ) );
-
- // Spaltenkoepfe ausgeben und ColRef initialisieren
- // (String-Collections sind initialisiert)
- nDataIndex = 0;
- nColIndex = 0;
- nCol = nDataStartCol;
- nRecCount = 0;
- RowToTable(0, nCol);
-
- // Zeilenkoepfe und Daten ausgeben
- // (ruft SetDataLine/SetFuncLine auf)
- nRowIndex = 0;
- nRow = nDataStartRow;
- ColToTable(0, nRow, aProgress);
-
- // Gesamtergebnis-Zeilen
-
- if (!bNoCols)
- {
- if (bDataAtCol)
- for (SCSIZE nTotCnt = 0; nTotCnt<nDataCount; nTotCnt++)
- SetFuncLine(nDataStartCol, nRow+nTotCnt, nDestTab,
- aDataArr[nTotCnt].nFuncMask, nTotCnt, 0, nDataRowCount);
- else
- SetFuncLine(nDataStartCol, nRow, nDestTab, PIVOT_FUNC_AUTO, SCSIZE_MAX, 0, nDataRowCount);
- }
-
-
- // Rahmen Spaltenergebnis
-
- if (!bNoRows)
- {
- if (!bDataAtCol)
- {
- for (i=0; i<nDataCount; i++)
- {
- String aLab = *pLabelTotal;
- aLab += ' ';
- aLab += *pLabel[lcl_MaskToIndex( aDataArr[i].nFuncMask )];
- aLab += ' ';
- aLab += pDataList->GetString(sal::static_int_cast<USHORT>(i));
- pDoc->SetString(sal::static_int_cast<SCCOL>(nTotalCol+i),
- sal::static_int_cast<SCROW>(nDestRow1 + nFirstLine), nDestTab, aLab);
- // Kategorie 6
- }
- }
- else
- {
- pDoc->SetString(nTotalCol, nDestRow1 + nFirstLine, nDestTab, *pLabelTotal);
- // Kategorie 7
- }
-
- if ( nDataStartRow > 0 )
- SetStyle(nTotalCol, nDestRow1+nFirstLine, nDestCol2, nDataStartRow-1, PIVOT_STYLE_TITLE);
- SetStyle(nTotalCol, nDataStartRow, nDestCol2, nDestRow2, PIVOT_STYLE_RESULT);
- SetFrame(nTotalCol, nDestRow1 + nFirstLine, nDestCol2, nDestRow2);
- }
-
- // Rahmen Zeilenergebnis
-
- if (!bNoCols)
- {
- if (bDataAtCol)
- {
- for (i=0; i<nDataCount; i++)
- {
- String aLab = *pLabelTotal;
- aLab += ' ';
- aLab += *pLabel[lcl_MaskToIndex( aDataArr[i].nFuncMask )];
- aLab += ' ';
- aLab += pDataList->GetString(sal::static_int_cast<USHORT>(i));
- pDoc->SetString(nDestCol1, nTotalRow+i, nDestTab, aLab);
- // Kategorie 8
- }
- }
- else
- {
- pDoc->SetString(nDestCol1, nTotalRow, nDestTab, *pLabelTotal);
- // Kategorie 9
- }
-
- if ( nDataStartCol > 0 )
- SetStyle(nDestCol1, nTotalRow, nDataStartCol-1, nDestRow2, PIVOT_STYLE_TITLE);
- SetStyle(nDataStartCol, nTotalRow, nDestCol2, nDestRow2, PIVOT_STYLE_RESULT);
- SetFrame(nDestCol1, nTotalRow, nDestCol2, nDestRow2);
- }
-
- // Rahmen gesamt
- SetFrame(nDestCol1, nDestRow1 + nFirstLine, nDestCol2, nDestRow2, 40);
-}
-
-void ScPivot::ReleaseData()
-{
- for (SCSIZE i = 0; i < PIVOT_MAXFIELD; i++)
- {
- pColList[i]->FreeAll();
- pRowList[i]->FreeAll();
- }
- if (ppDataArr)
- {
- for (SCSIZE i=0; i<nDataRowCount; i++)
- delete[] ppDataArr[i];
- delete[] ppDataArr;
- ppDataArr = NULL;
- }
- nDataColCount = 0;
- nDataRowCount = 0;
- delete[] pColRef;
- pColRef = NULL;
-}
-
-BOOL ScPivot::IsPivotAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
-{
- if (bValidArea)
- return ( nTab == nDestTab
- && nCol >= nDestCol1 && nCol <= nDestCol2
- && nRow >= nDestRow1 && nRow <= nDestRow2 );
- else
- return FALSE;
-}
-
-BOOL ScPivot::IsFilterAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
-{
- if (bValidArea)
- return (nCol == nDestCol1 && nRow == nDestRow1 && nTab == nDestTab);
- else
- return FALSE;
-}
-
-BOOL ScPivot::GetColFieldAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL& rField) const
-{
- rField = 0;
- BOOL bRet = FALSE;
- if (bValidArea)
- {
- bRet = ( nCol >= nDestCol1 && nCol < nDataStartCol
- && nRow == nDataStartRow - 1
- && nTab == nDestTab );
- if (bRet)
- {
- rField = aColArr[nCol - nDestCol1].nCol;
- if (rField == PIVOT_DATA_FIELD)
- bRet = (nDataCount > 1);
- }
- }
- return bRet;
-}
-
-BOOL ScPivot::GetRowFieldAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL& rField) const
-{
- rField = 0;
- BOOL bRet = FALSE;
- if (bValidArea)
- {
- bRet = ( nCol >= nDataStartCol && nCol < sal::static_int_cast<SCCOL>(nDataStartCol + nRowCount)
- && nRow == nDestRow1 + nFirstLine
- && nTab == nDestTab );
- if (bRet)
- {
- rField = aRowArr[nCol - nDataStartCol].nCol;
- if (rField == PIVOT_DATA_FIELD)
- bRet = (nDataCount > 1);
- }
- }
- return bRet;
-}
-
-
-//--------------------------------------------------------------------------------------------------
-// Private Methoden
-//--------------------------------------------------------------------------------------------------
-
-BOOL ScPivot::CreateFields()
-{
- SCSIZE i;
- SCROW nRow;
- SCROW nHeader;
- String aStr;
- TypedStrData* pStrData;
- if (bHasHeader)
- nHeader = 1;
- else
- nHeader = 0;
-
- // Sortieren nach Benutzerdefinierte Listen ??
- for (i = 0; i < nColCount; i++)
- {
- if (aColArr[i].nCol != PIVOT_DATA_FIELD)
- {
- pDoc->GetString(aColArr[i].nCol, nSrcRow1 + nHeader, nSrcTab, aStr);
- pColList[i]->SetUserData(ScGlobal::GetUserList()->GetData(aStr));
- }
- else
- pColList[i]->SetUserData(NULL);
- }
- for (i = 0; i < nRowCount; i++)
- {
- if (aRowArr[i].nCol != PIVOT_DATA_FIELD)
- {
- pDoc->GetString(aRowArr[i].nCol, nSrcRow1 + nHeader, nSrcTab, aStr);
- pRowList[i]->SetUserData(ScGlobal::GetUserList()->GetData(aStr));
- }
- else
- pRowList[i]->SetUserData(NULL);
- }
-
- ScAddress aSrcAdr( nSrcCol1, 0, nSrcTab );
- for (nRow = nSrcRow1 + nHeader; nRow <= nSrcRow2; nRow++)
- {
- BOOL bValidLine = TRUE;
- if (bIgnoreEmpty)
- {
- aSrcAdr.SetRow( nRow );
- bValidLine = !lcl_IsEmptyLine( pDoc, aSrcAdr, nSrcCol2 );
- }
- if (bValidLine)
- bValidLine = pDoc->pTab[nSrcTab]->ValidQuery(nRow, aQuery);
- if (bValidLine)
- {
- // Sortierte Liste der Felder erzeugen
- //! statt GetCategoryString leere weglassen !
-
- for (i = 0; i < nColCount; i++)
- {
- if (aColArr[i].nCol != PIVOT_DATA_FIELD)
- {
- SCROW nCatRow = bDetectCat ? GetCategoryRow( aColArr[i].nCol, nRow ) : nRow;
- pStrData = new TypedStrData( pDoc, aColArr[i].nCol, nCatRow, nSrcTab, TRUE );
- if (!(pColList[i]->Insert(pStrData)))
- delete pStrData;
- }
- }
- for (i = 0; i < nRowCount; i++)
- {
- if (aRowArr[i].nCol != PIVOT_DATA_FIELD)
- {
- SCROW nCatRow = bDetectCat ? GetCategoryRow( aRowArr[i].nCol, nRow ) : nRow;
- pStrData = new TypedStrData( pDoc, aRowArr[i].nCol, nCatRow, nSrcTab, TRUE );
- if (!(pRowList[i]->Insert(pStrData)))
- delete pStrData;
- }
- }
- }
- }
- return TRUE;
-}
-
-void ScPivot::CreateFieldData()
-{
- SCSIZE* pRowListIndex = nRowCount ? new SCSIZE[nRowCount] : NULL;
- SCSIZE* pColListIndex = nColCount ? new SCSIZE[nColCount] : NULL;
-
- SCSIZE i,j,k;
-
- ppDataArr = new SubTotal*[nDataRowCount];
- for (i=0; i<nDataRowCount; i++)
- ppDataArr[i] = new SubTotal[nDataColCount];
-
- if (bDataAtCol)
- for (j=0; j<nDataRowCount; j++)
- for (i=0; i<nDataColCount; i++)
- ppDataArr[j][i].nIndex = j/nDataMult%nDataCount;
- else
- for (j=0; j<nDataRowCount; j++)
- for (i=0; i<nDataColCount; i++)
- ppDataArr[j][i].nIndex = i/nDataMult%nDataCount;
-
- SCROW nHeader;
- if (bHasHeader)
- nHeader = 1;
- else
- nHeader = 0;
- ScAddress aSrcAdr( nSrcCol1, 0, nSrcTab );
- for (SCROW nRow = nSrcRow1 + nHeader; nRow <= nSrcRow2; nRow++)
- {
- BOOL bValidLine = TRUE;
- if (bIgnoreEmpty)
- {
- aSrcAdr.SetRow( nRow );
- bValidLine = !lcl_IsEmptyLine( pDoc, aSrcAdr, nSrcCol2 );
- }
- if (bValidLine)
- bValidLine = pDoc->pTab[nSrcTab]->ValidQuery(nRow, aQuery);
- if (bValidLine)
- {
- // Indizes der Kategorien nur einmal ausserhalb nDataCount
- for (j=0; j<nRowCount; j++)
- if (aRowArr[j].nCol != PIVOT_DATA_FIELD)
- {
- SCROW nCatRow = bDetectCat ? GetCategoryRow( aRowArr[j].nCol, nRow ) : nRow;
- TypedStrData aStrData( pDoc, aRowArr[j].nCol, nCatRow, nSrcTab, TRUE );
- pRowListIndex[j] = pRowList[j]->GetIndex(&aStrData);
- }
- for (j=0; j<nColCount; j++)
- if (aColArr[j].nCol != PIVOT_DATA_FIELD)
- {
- SCROW nCatRow = bDetectCat ? GetCategoryRow( aColArr[j].nCol, nRow ) : nRow;
- TypedStrData aStrData( pDoc, aColArr[j].nCol, nCatRow, nSrcTab, TRUE );
- pColListIndex[j] = pColList[j]->GetIndex(&aStrData);
- }
-
- String aStr;
- SCSIZE nCIndex;
- SCSIZE nRIndex;
- SCSIZE nIndex;
- ScAddress aAdr( 0, nRow, nSrcTab );
-
- for (i=0; i<nDataCount; i++)
- {
- // ColIndex Berechnen
- nCIndex = 0;
- for (j=0; j<nRowCount; j++)
- {
- if (aRowArr[j].nCol == PIVOT_DATA_FIELD)
- nIndex = i;
- else
- nIndex = pRowListIndex[j];
- if (nIndex)
- {
- for (k=j+1; k<nRowCount; k++)
- nIndex *= pRowList[k]->GetCount();
- nCIndex += nIndex;
- }
- }
- // RowIndex Berechnen
- nRIndex = 0;
- for (j=0; j<nColCount; j++)
- {
- if (aColArr[j].nCol == PIVOT_DATA_FIELD)
- nIndex = i;
- else
- nIndex = pColListIndex[j];
- if (nIndex)
- {
- for (k=j+1; k<nColCount; k++)
- nIndex *= pColList[k]->GetCount();
- nRIndex += nIndex;
- }
- }
- // Daten eintragen
- if ((nCIndex < nDataColCount) && (nRIndex < nDataRowCount))
- {
- DBG_ASSERT(ppDataArr[nRIndex][nCIndex].nIndex == i, "falsch init.");
-
- ppDataArr[nRIndex][nCIndex].nIndex = i;
- aAdr.SetCol( aDataArr[i].nCol );
- CellType eCellType = pDoc->GetCellType( aAdr );
- if ((eCellType != CELLTYPE_NONE) && (eCellType != CELLTYPE_NOTE))
- {
- BOOL bValue = (eCellType == CELLTYPE_VALUE);
- if (eCellType == CELLTYPE_FORMULA)
- {
- ScBaseCell* pCell = pDoc->GetCell( aAdr );
- bValue = ((ScFormulaCell*)pCell)->IsValue();
- }
-
- if (bValue)
- {
- double nVal = pDoc->GetValue( aAdr );
- ppDataArr[nRIndex][nCIndex].Update(nVal);
- }
- else
- ppDataArr[nRIndex][nCIndex].UpdateNoVal(); // nur nCount
- }
- }
- }
- }
- }
-
- delete pColListIndex;
- delete pRowListIndex;
-}
-
-void ScPivot::CalcArea()
-{
- BOOL bNoRows = (nRowCount == 0) || ( nRowCount == 1 && aRowArr[0].nCol == PIVOT_DATA_FIELD );
- BOOL bNoCols = (nColCount == 0) || ( nColCount == 1 && aColArr[0].nCol == PIVOT_DATA_FIELD );
- if (!bMakeTotalCol) bNoRows = TRUE;
- if (!bMakeTotalRow) bNoCols = TRUE;
-
- // StartSpalte/StartZeile des Datenbereichs berechnen
- if (bDataAtCol)
- {
- if (nDataCount > 1)
- nDataStartCol = sal::static_int_cast<SCCOL>(nDestCol1 + nColCount);
- else
- nDataStartCol = sal::static_int_cast<SCCOL>(nDestCol1 + Max(static_cast<SCSIZE>(0), nColCount - 1));
- }
- else
- nDataStartCol = sal::static_int_cast<SCCOL>(nDestCol1 + nColCount);
- if (!bDataAtCol)
- {
- if (nDataCount > 1)
- nDataStartRow = nDestRow1 + nRowCount + nFirstLine + 1;
- else
- nDataStartRow = nDestRow1 + Max(static_cast<SCSIZE>(0), nRowCount - 1) + nFirstLine + 1;
- }
- else
- nDataStartRow = nDestRow1 + nRowCount + nFirstLine + 1;
-
- //
- // Groesse der PivotTabelle berechnen
- //
-
- if (nRowCount == 0 || (nRowCount==1 && aRowArr[0].nCol==PIVOT_DATA_FIELD && nDataCount==1))
- {
- nDataColCount = 1;
- if (nDataCount == 1)
- nDestCol2 = sal::static_int_cast<SCCOL>(nDestCol1 + nColCount - 1);
- else
- nDestCol2 = sal::static_int_cast<SCCOL>(nDestCol1 + nColCount);
- }
- else
- {
- SCSIZE nDx;
- // Anzahl Spalten
- if ((aRowArr[nRowCount-1].nCol == PIVOT_DATA_FIELD) && (nDataCount == 1))
- nDx = 2;
- else
- nDx = 1;
- SCSIZE nColLines = pRowList[nRowCount-nDx]->GetCount(); // SCSIZE to recognize overflow
- nDataColCount = pRowList[nRowCount-nDx]->GetCount();
- for (SCSIZE i=nRowCount-nDx; i-- > 0; )
- {
- nColLines *= pRowList[i]->GetCount();
- nDataColCount *= pRowList[i]->GetCount();
- if (!bDataAtCol)
- nColLines += (pRowList[i]->GetCount() * aRowArr[i].nFuncCount * nDataCount);
- else
- nColLines += (pRowList[i]->GetCount() * aRowArr[i].nFuncCount);
- }
- /*
- // Ergebnisspalten des letzten Elements
- if (aRowArr[nRowCount-1].nCol != PIVOT_DATA_FIELD)
- nColLines += (pRowList[nRowCount-1]->GetCount() * aRowArr[nRowCount-1].nFuncCount);
- */
- if (nColLines > static_cast<SCSIZE>(MAXCOL))
- nDestCol2 = MAXCOL+2; // ungueltig, 1 wird unten abgezogen
- else if (bDataAtCol)
- {
- if (nDataCount > 1)
- nDestCol2 = sal::static_int_cast<SCCOL>(nDestCol1 + nColCount + nColLines);
- else
- nDestCol2 = sal::static_int_cast<SCCOL>(nDestCol1 + (nColCount - 1) + nColLines);
- if (!bMakeTotalCol)
- --nDestCol2;
- }
- else
- nDestCol2 = sal::static_int_cast<SCCOL>(nDestCol1 + nColCount + nColLines);
- }
-
- if (nColCount == 0 || (nColCount==1 && aColArr[0].nCol==PIVOT_DATA_FIELD && nDataCount==1))
- {
- nDataRowCount = 1;
- if (nDataCount == 1)
- nDestRow2 = nDestRow1 + (nRowCount - 1) + nFirstLine + 1;
- else
- nDestRow2 = nDestRow1 + nRowCount + nFirstLine + 1;
- }
- else
- {
- SCSIZE nDx;
- // Anzahl Zeilen
- if ((aColArr[nColCount-1].nCol == PIVOT_DATA_FIELD) && (nDataCount == 1))
- nDx = 2;
- else
- nDx = 1;
- SCSIZE nRowLines = pColList[nColCount-nDx]->GetCount(); // SCSIZE to recognize overflow
- nDataRowCount = pColList[nColCount-nDx]->GetCount();
- for (SCSIZE i=nColCount-nDx; i-- > 0; )
- {
- nRowLines *= pColList[i]->GetCount();
- nDataRowCount *= pColList[i]->GetCount();
- if (bDataAtCol)
- nRowLines += (pColList[i]->GetCount() * aColArr[i].nFuncCount * nDataCount);
- else
- nRowLines += (pColList[i]->GetCount() * aColArr[i].nFuncCount);
- }
- /*
- // Ergebniszeilen des letzten Elements
- if (aColArr[nColCount-1].nCol != PIVOT_DATA_FIELD)
- nRowLines += (pColList[nColCount-1]->GetCount() * aColArr[nColCount-1].nFuncCount);
- */
- if (nRowLines > static_cast<SCSIZE>(MAXROW))
- nDestRow2 = MAXROW+2; // ungueltig, 1 wird unten abgezogen
- else if (!bDataAtCol)
- {
- if (nDataCount > 1)
- nDestRow2 = nDestRow1 + nRowCount + nRowLines + nFirstLine + 1;
- else
- nDestRow2 = nDestRow1 + (nRowCount - 1) + nRowLines + nFirstLine + 1;
- if (!bMakeTotalRow)
- --nDestRow2;
- }
- else
- nDestRow2 = nDestRow1 + nRowCount + nRowLines + nFirstLine + 1;
- }
-
- if (bDataAtCol)
- {
- if (!bNoCols)
- nDestRow2 += nDataCount;
- nDestRow2 --;
- }
- else
- {
- if (!bNoRows)
- nDestCol2 = sal::static_int_cast<SCCOL>(nDestCol2 + nDataCount);
- nDestCol2 --;
- }
-}
-
-void ScPivot::SetDataLine(SCCOL nCol, SCROW nRow, SCTAB /* nTab */, SCSIZE nRIndex)
-{
- SCSIZE nCIndex2;
-
- SubTotal aGrandTotal[PIVOT_MAXFIELD]; // pro Daten-Feld
-
- for (SCSIZE i=0; i < nColIndex; i++)
- {
- SCSIZE nCIndex = pColRef[i].nDataIndex;
- if (nCIndex != sal::static_int_cast<SCSIZE>(PIVOT_FUNC_REF))
- {
-// if ( ppDataArr[nRIndex][nCIndex].GetCount() )
- {
- SCSIZE nDIndex = ppDataArr[nRIndex][nCIndex].nIndex;
- SetValue( sal::static_int_cast<SCCOL>(nCol+i), nRow, ppDataArr[nRIndex][nCIndex], aDataArr[nDIndex].nFuncMask );
- // Kategorie 18
-
- if (bDataAtCol)
- aGrandTotal[0].Update(ppDataArr[nRIndex][nCIndex]);
- else
- aGrandTotal[nDIndex].Update(ppDataArr[nRIndex][nCIndex]);
- }
- }
- else
- {
- SubTotal aTotal;
- SCSIZE k = i-1;
- while ((pColRef[k].nDataIndex == sal::static_int_cast<SCSIZE>(PIVOT_FUNC_REF)) && (k > 0))
- k--;
- for (SCSIZE j=k+1; (j-- > 0) && (pColRef[j].nRecCount > pColRef[i].nRecCount); )
- {
- nCIndex2 = pColRef[j].nDataIndex;
- if (nCIndex2 != sal::static_int_cast<SCSIZE>(PIVOT_FUNC_REF))
- {
- if ((pColRef[i].nIndex == ppDataArr[nRIndex][nCIndex2].nIndex) ||
- (pColRef[i].nIndex == SCSIZE_MAX))
- {
- aTotal.Update( ppDataArr[nRIndex][nCIndex2] );
- }
- }
- }
-
- USHORT nFunc = pColRef[i].nFuncMask;
- if (nFunc == PIVOT_FUNC_AUTO)
- nFunc = aDataArr[nRIndex/nDataMult%nDataCount].nFuncMask;
- SetValue( sal::static_int_cast<SCCOL>(nCol+i), nRow, aTotal, nFunc );
- // Kategorie 19
- }
- }
-
- BOOL bNoRows = (nRowCount == 0) || ( nRowCount == 1 && aRowArr[0].nCol == PIVOT_DATA_FIELD );
- if (!bMakeTotalCol) bNoRows = TRUE;
-
- if (!bNoRows)
- {
- if (bDataAtCol)
- {
- SetValue( nDestCol2, nRow, aGrandTotal[0], aDataArr[nRIndex/nDataMult%nDataCount].nFuncMask );
- // Kategorie 20
- }
- else
- {
- SCCOL nTotalCol = sal::static_int_cast<SCCOL>(nDestCol2 - nDataCount + 1);
- for (SCSIZE nTotCnt = 0; nTotCnt<nDataCount; nTotCnt++)
- {
- SetValue( sal::static_int_cast<SCCOL>(nTotalCol+nTotCnt), nRow, aGrandTotal[nTotCnt], aDataArr[nTotCnt].nFuncMask );
- // Kategorie 21
- }
- }
- }
-}
-
-void ScPivot::SetFuncLine(SCCOL nCol, SCROW nRow, SCTAB /* nTab */, USHORT nFunc, SCSIZE nIndex, SCSIZE nStartRIndex, SCSIZE nEndRIndex)
-{
- SCSIZE nSubtCount = 0;
- SubTotal aGrandTotal[PIVOT_MAXFIELD];
- USHORT nThisFunc = nFunc;
-
- for (SCSIZE i=0; i<nColIndex; i++)
- {
- SCSIZE nCIndex = pColRef[i].nDataIndex;
- if (nCIndex != sal::static_int_cast<SCSIZE>(PIVOT_FUNC_REF))
- {
- SubTotal aTotal;
- for (SCSIZE j = nStartRIndex; j < nEndRIndex; j++)
- {
- SCSIZE nDIndex = ppDataArr[j][nCIndex].nIndex;
- if ((nIndex == nDIndex) || (nIndex == SCSIZE_MAX))
- {
- aTotal.Update( ppDataArr[j][nCIndex] );
- }
- }
-
- if (bDataAtCol)
- aGrandTotal[0].Update( aTotal );
- else
- aGrandTotal[nCIndex/nDataMult%nDataCount].Update( aTotal ); //! immer ?
-
- if (nFunc == PIVOT_FUNC_AUTO)
- {
- if (bDataAtCol)
- {
- if (nIndex<nDataCount)
- nThisFunc = aDataArr[nIndex].nFuncMask;
- else
- {
- DBG_ERROR("wat fuer'n Index ???");
- }
- }
- else
- nThisFunc = aDataArr[nCIndex/nDataMult%nDataCount].nFuncMask;
- }
- SetValue( sal::static_int_cast<SCCOL>(nCol+i), nRow, aTotal, nThisFunc );
- // Kategorie 22
- }
- else
- { // Kreuzungspunkte kompatibel ?
-
- if ( nFunc == pColRef[i].nFuncMask )
- {
- SCSIZE nEffIndex = nIndex;
- if (nEffIndex == SCSIZE_MAX)
- {
- nEffIndex = nSubtCount % nDataCount;
- ++nSubtCount;
- }
- SubTotal aTotal;
-
- SCSIZE k = i-1;
- while ((pColRef[k].nDataIndex == sal::static_int_cast<SCSIZE>(PIVOT_FUNC_REF)) && (k > 0))
- k--;
- for (SCSIZE j=k+1; (j-- > 0) && (pColRef[j].nRecCount > pColRef[i].nRecCount); )
- {
- nCIndex = pColRef[j].nDataIndex;
- if (nCIndex != sal::static_int_cast<SCSIZE>(PIVOT_FUNC_REF))
- {
- for (SCSIZE nRIndex = nStartRIndex; nRIndex < nEndRIndex; nRIndex++)
- {
- SCSIZE nDIndex = ppDataArr[nRIndex][nCIndex].nIndex;
- if (nEffIndex == nDIndex)
- {
- aTotal.Update( ppDataArr[nRIndex][nCIndex] );
- }
- }
- }
- }
-
- if (nFunc == PIVOT_FUNC_AUTO)
- {
- if (nEffIndex<nDataCount)
- nThisFunc = aDataArr[nEffIndex].nFuncMask;
- else
- {
- DBG_ERROR("wat fuer'n Index ???");
- }
- }
- SetValue( sal::static_int_cast<SCCOL>(nCol+i), nRow, aTotal, nThisFunc );
- // Kategorie 23
- }
- }
- }
-
- BOOL bNoRows = (nRowCount == 0) || ( nRowCount == 1 && aRowArr[0].nCol == PIVOT_DATA_FIELD );
- if (!bMakeTotalCol) bNoRows = TRUE;
-
- if (!bNoRows)
- {
- if (bDataAtCol)
- {
- if (nFunc == PIVOT_FUNC_AUTO)
- {
- if (nIndex<nDataCount)
- nThisFunc = aDataArr[nIndex].nFuncMask;
- else
- {
- DBG_ERROR("wat fuer'n Index ???");
- }
- }
- SetValue( nDestCol2, nRow, aGrandTotal[0], nThisFunc );
- // Kategorie 24
- }
- else
- {
- SCCOL nTotalCol = sal::static_int_cast<SCCOL>(nDestCol2 - nDataCount + 1);
- for (SCSIZE nTotCnt = 0; nTotCnt<nDataCount; nTotCnt++)
- {
- if (nFunc == PIVOT_FUNC_AUTO)
- nThisFunc = aDataArr[nTotCnt%nDataCount].nFuncMask;
- SetValue( sal::static_int_cast<SCCOL>(nTotalCol+nTotCnt), nRow, aGrandTotal[nTotCnt], nThisFunc );
- // Kategorie 25
- }
- }
- }
-}
-
-void ScPivot::ColToTable(SCSIZE nField, SCROW& nRow, ScProgress& rProgress)
-{
- SCCOL nCol = sal::static_int_cast<SCCOL>(nDestCol1 + nField);
- if (nColCount == 0)
- {
-// SetDataLine(nCol + 1, nRow, nDestTab, nRowIndex);
- SetDataLine(nCol, nRow, nDestTab, nRowIndex);
- nRowIndex++;
- return;
- }
-
- SCSIZE nDx;
- if ((aColArr[nColCount -1].nCol == PIVOT_DATA_FIELD) && (nDataCount == 1))
- nDx = 2;
- else
- nDx = 1;
- if (nField < nColCount - nDx)
- {
- for (USHORT i = 0; i < pColList[nField]->GetCount(); i++)
- {
- SCSIZE nSaveIndex = nRowIndex;
- String aStr = pColList[nField]->GetString(i);
- if (!aStr.Len()) aStr = ScGlobal::GetRscString(STR_EMPTYDATA);
- pDoc->SetString(nCol, nRow, nDestTab, aStr);
- // Kategorie 10
- SCROW nSaveRow = nRow;
- ColToTable(nField + 1, nRow, rProgress);
- SetStyle(nCol, nSaveRow, nCol, nRow - 1, PIVOT_STYLE_CATEGORY);
- SetFrame(nCol, nSaveRow, nCol, nRow - 1);
- if (aColArr[nField].nFuncCount > 0) // Zwischenergebnisse eingestellt?
- {
- nSaveRow = nRow;
- for (SCSIZE j=0; j<=PIVOT_MAXFUNC; j++) // incl. "auto"
- {
- if (aColArr[nField].nFuncMask & nFuncMaskArr[j])
- {
- String aLab;
- if (bDataAtCol)
- {
- for (SCSIZE k=0; k < nDataCount; k++)
- {
- String aDataStr = pDataList->GetString(sal::static_int_cast<USHORT>(k)); // always String
- aLab = aStr;
- SCSIZE nFuncType;
- if ( j==PIVOT_MAXFUNC )
- nFuncType = lcl_MaskToIndex( aDataArr[k].nFuncMask );
- else
- nFuncType = j;
- aLab += ' ';
- aLab += *pLabel[nFuncType];
- aLab += ' ';
- aLab += aDataStr;
- pDoc->SetString(nCol, nRow, nDestTab, aLab);
- // Kategorie 11
- SetFuncLine(nDataStartCol, nRow, nDestTab, nFuncMaskArr[j], k, nSaveIndex, nRowIndex);
- nRow++;
- }
- }
- else
- {
- aLab = aStr;
- aLab += ' ';
- aLab += *pLabel[j];
- pDoc->SetString(nCol, nRow, nDestTab, aLab);
- // Kategorie 12
- SetFuncLine(nDataStartCol, nRow, nDestTab, nFuncMaskArr[j], SCSIZE_MAX, nSaveIndex, nRowIndex);
- nRow++;
- }
- }
- }
- if ( nDataStartCol > 0 )
- SetStyle(nCol, nSaveRow, nDataStartCol-1, nRow-1, PIVOT_STYLE_TITLE);
- SetStyle(nDataStartCol, nSaveRow, nDestCol2, nRow-1, PIVOT_STYLE_RESULT);
- SetFrameHor(nCol, nSaveRow, nDestCol2, nRow-1);
- }
- nSaveIndex = nRowIndex;
- }
- }
- else if (nField < nColCount)
- {
- SCSIZE nCatCount = pColList[nField]->GetCount();
- SetStyle(nCol, nRow, nCol, nRow+nCatCount-1, PIVOT_STYLE_CATEGORY);
- SetFrame(nCol, nRow, nDestCol2, nRow+nCatCount-1);
- for (SCSIZE i = 0; i < nCatCount; i++)
- {
- String aTmpStr = pColList[nField]->GetString(sal::static_int_cast<USHORT>(i));
- if (!aTmpStr.Len()) aTmpStr = ScGlobal::GetRscString(STR_EMPTYDATA);
-
- String aPutStr;
- if (pColList[nField] == pDataList)
- {
- SCSIZE nFuncType = lcl_MaskToIndex( aDataArr[i].nFuncMask );
- aPutStr = *pLabel[nFuncType];
- aPutStr += ' ';
- aPutStr += aTmpStr;
- }
- else
- aPutStr += aTmpStr;
-
- pDoc->SetString(nCol, nRow, nDestTab, aPutStr);
- // Kategorie 13
- SetDataLine(nCol + 1, nRow, nDestTab, nRowIndex);
- nRowIndex++;
- nRow++;
-
- rProgress.SetState( nRow - nDestRow1 );
- }
- }
-}
-
-void ScPivot::RowToTable(SCSIZE nField, SCCOL& nCol)
-{
- nRecCount++;
- SCROW nRow = nDestRow1 + nFirstLine + nField + 1;
- if (nRowCount == 0)
- {
- pColRef[nColIndex].nDataIndex = nDataIndex;
- nColIndex++;
- nDataIndex++;
- return;
- }
-
- SCSIZE nDx;
- if ((aRowArr[nRowCount -1].nCol == PIVOT_DATA_FIELD) && (nDataCount == 1))
- nDx = 2;
- else
- nDx = 1;
-
- if (nField < nRowCount - nDx)
- {
- for (USHORT i = 0; i < pRowList[nField]->GetCount(); i++)
- {
- String aStr = pRowList[nField]->GetString(i);
- if (!aStr.Len()) aStr = ScGlobal::GetRscString(STR_EMPTYDATA);
- pDoc->SetString(nCol, nRow, nDestTab, aStr);
- // Kategorie 14
- SCCOL nSaveCol = nCol;
- RowToTable(nField + 1, nCol);
- SetStyle(nSaveCol, nRow, nCol - 1, nRow, PIVOT_STYLE_CATEGORY);
- SetFrame(nSaveCol, nRow, nCol - 1, nRow);
- if (aRowArr[nField].nFuncCount > 0)
- {
- nSaveCol = nCol;
- for (SCSIZE j=0; j<=PIVOT_MAXFUNC; j++) // incl. "auto"
- {
- if (aRowArr[nField].nFuncMask & nFuncMaskArr[j])
- {
- String aLab;
- if (!bDataAtCol)
- {
- for (SCSIZE k=0; k < nDataCount; k++)
- {
- aLab = aStr;
- SCSIZE nFuncType;
- if ( j==PIVOT_MAXFUNC )
- nFuncType = lcl_MaskToIndex( aDataArr[k].nFuncMask );
- else
- nFuncType = j;
- aLab += ' ';
- aLab += *pLabel[nFuncType];
- aLab += ' ';
- aLab += pDataList->GetString(sal::static_int_cast<USHORT>(k));
- pDoc->SetString(nCol, nRow, nDestTab, aLab);
- // Kategorie 15
- pColRef[nColIndex].nDataIndex = PIVOT_FUNC_REF;
- pColRef[nColIndex].nRecCount = nRecCount;
- pColRef[nColIndex].nIndex = k;
- pColRef[nColIndex].nFuncMask = nFuncMaskArr[j];
- nColIndex++;
- nCol++;
- }
- }
- else
- {
- aLab = aStr;
- aLab += ' ';
- aLab += *pLabel[j];
- pDoc->SetString(nCol, nRow, nDestTab, aLab);
- // Kategorie 16
- pColRef[nColIndex].nDataIndex = PIVOT_FUNC_REF;
- pColRef[nColIndex].nRecCount = nRecCount;
- pColRef[nColIndex].nIndex = SCSIZE_MAX;
- pColRef[nColIndex].nFuncMask = nFuncMaskArr[j];
- nColIndex++;
- nCol++;
- }
- }
- }
- if ( nDataStartRow > 0 )
- SetStyle(nSaveCol, nRow,
- nCol-1, nDataStartRow-1, PIVOT_STYLE_TITLE);
- SetStyle(nSaveCol, nDataStartRow, nCol-1, nDestRow2, PIVOT_STYLE_RESULT);
- SetFrameVer(nSaveCol, nRow, nCol-1, nDestRow2);
- }
- }
- }
- else if (nField < nRowCount)
- {
- SCSIZE nCatCount = pRowList[nField]->GetCount();
- SetStyle(nCol, nRow, sal::static_int_cast<SCCOL>(nCol+nCatCount-1), nRow, PIVOT_STYLE_CATEGORY);
- SetFrame(nCol, nRow, sal::static_int_cast<SCCOL>(nCol+nCatCount-1), nDestRow2);
- for (SCSIZE i = 0; i < nCatCount; i++)
- {
- String aTmpStr = pRowList[nField]->GetString(sal::static_int_cast<USHORT>(i));
- if (!aTmpStr.Len()) aTmpStr = ScGlobal::GetRscString(STR_EMPTYDATA);
-
- String aPutStr;
- if (pRowList[nField] == pDataList)
- {
- SCSIZE nFuncType = lcl_MaskToIndex( aDataArr[i].nFuncMask );
- aPutStr = *pLabel[nFuncType];
- aPutStr += ' ';
- aPutStr += aTmpStr;
- }
- else
- aPutStr = aTmpStr;
-
- pDoc->SetString(nCol, nRow, nDestTab, aPutStr);
- // Kategorie 17
- pColRef[nColIndex].nDataIndex = nDataIndex;
- pColRef[nColIndex].nRecCount = nRecCount;
- pColRef[nColIndex].nIndex = SCSIZE_MAX;
- pColRef[nColIndex].nFuncMask = PIVOT_FUNC_NONE;
- nColIndex++;
- nDataIndex++;
- nCol++;
- }
- }
- nRecCount--;
-}
-
-SCROW ScPivot::GetCategoryRow( SCCOL nCol, SCROW nRow )
-{
- SCROW nMinRow = nSrcRow1;
- if (bHasHeader) ++nMinRow;
- BOOL bFound = FALSE;
- do
- {
- if ( !pDoc->HasData( nCol, nRow, nSrcTab ) && nRow>nMinRow )
- --nRow;
- else
- bFound = TRUE;
- }
- while (!bFound);
- return nRow;
-}
-
-#endif
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 8ce67c1a3..70f48dcbc 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -64,432 +64,6 @@ using ::com::sun::star::sheet::DataPilotFieldReference;
// STATIC DATA -----------------------------------------------------------
-#if OLD_PIVOT_IMPLEMENTATION
-//--------------------------------------------------------------------------------------------------
-// Hilfsmethoden von ScPivot
-//--------------------------------------------------------------------------------------------------
-
-void ScPivot::SetFrame(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nWidth)
-{
- if (pDoc->pTab[nDestTab])
- {
- SvxBorderLine aLine;
- aLine.SetOutWidth(nWidth);
- SvxBoxItem aBox( ATTR_BORDER );
- aBox.SetLine(&aLine, BOX_LINE_LEFT);
- aBox.SetLine(&aLine, BOX_LINE_TOP);
- aBox.SetLine(&aLine, BOX_LINE_RIGHT);
- aBox.SetLine(&aLine, BOX_LINE_BOTTOM);
- SvxBoxInfoItem aBoxInfo( ATTR_BORDER_INNER );
- aBoxInfo.SetValid(VALID_HORI,FALSE);
- aBoxInfo.SetValid(VALID_VERT,FALSE);
- aBoxInfo.SetValid(VALID_DISTANCE,FALSE);
- pDoc->pTab[nDestTab]->ApplyBlockFrame(&aBox, &aBoxInfo, nCol1, nRow1, nCol2, nRow2);
- }
-}
-
-void ScPivot::SetFrameHor(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
-{
- if (pDoc->pTab[nDestTab])
- {
- SvxBorderLine aLine;
- aLine.SetOutWidth(20);
- SvxBoxItem aBox( ATTR_BORDER );
- aBox.SetLine(&aLine, BOX_LINE_LEFT);
- aBox.SetLine(&aLine, BOX_LINE_TOP);
- aBox.SetLine(&aLine, BOX_LINE_RIGHT);
- aBox.SetLine(&aLine, BOX_LINE_BOTTOM);
- SvxBoxInfoItem aBoxInfo(ATTR_BORDER_INNER);
- aBoxInfo.SetValid(VALID_VERT,FALSE);
- aBoxInfo.SetValid(VALID_DISTANCE,FALSE);
- aBoxInfo.SetLine(&aLine, BOXINFO_LINE_HORI);
- pDoc->pTab[nDestTab]->ApplyBlockFrame(&aBox, &aBoxInfo, nCol1, nRow1, nCol2, nRow2);
- }
-}
-
-void ScPivot::SetFrameVer(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
-{
- if (pDoc->pTab[nDestTab])
- {
- SvxBorderLine aLine;
- aLine.SetOutWidth(20);
- SvxBoxItem aBox( ATTR_BORDER );
- aBox.SetLine(&aLine, BOX_LINE_LEFT);
- aBox.SetLine(&aLine, BOX_LINE_TOP);
- aBox.SetLine(&aLine, BOX_LINE_RIGHT);
- aBox.SetLine(&aLine, BOX_LINE_BOTTOM);
- SvxBoxInfoItem aBoxInfo( ATTR_BORDER_INNER );
- aBoxInfo.SetValid(VALID_HORI,FALSE);
- aBoxInfo.SetValid(VALID_DISTANCE,FALSE);
- aBoxInfo.SetLine(&aLine, BOXINFO_LINE_VERT);
- pDoc->pTab[nDestTab]->ApplyBlockFrame(&aBox, &aBoxInfo, nCol1, nRow1, nCol2, nRow2);
- }
-}
-
-void ScPivot::SetFontBold(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
-{
- if (pDoc->pTab[nDestTab])
- {
- ScPatternAttr aPattern( pDoc->GetPool() );
- aPattern.GetItemSet().Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) );
- pDoc->pTab[nDestTab]->ApplyPatternArea(nCol1, nRow1, nCol2, nRow2, aPattern);
- }
-}
-
-void ScPivot::SetJustifyLeft(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
-{
- if (pDoc->pTab[nDestTab])
- {
- ScPatternAttr aPattern( pDoc->GetPool() );
- aPattern.GetItemSet().Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
- pDoc->pTab[nDestTab]->ApplyPatternArea(nCol1, nRow1, nCol2, nRow2, aPattern);
- }
-}
-
-void ScPivot::SetJustifyRight(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
-{
- if (pDoc->pTab[nDestTab])
- {
- ScPatternAttr aPattern( pDoc->GetPool() );
- aPattern.GetItemSet().Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY ) );
- pDoc->pTab[nDestTab]->ApplyPatternArea(nCol1, nRow1, nCol2, nRow2, aPattern);
- }
-}
-
-void ScPivot::SetButton(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
-{
- if (pDoc->pTab[nDestTab])
- {
- ScPatternAttr aPattern( pDoc->GetPool() );
- aPattern.GetItemSet().Put( ScMergeFlagAttr(SC_MF_BUTTON) );
- pDoc->pTab[nDestTab]->ApplyPatternArea(nCol1, nRow1, nCol2, nRow2, aPattern);
- }
-}
-
-void ScPivot::SetStyle(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nId)
-{
- if ( nCol1 > nCol2 || nRow1 > nRow2 )
- return; // Falls Bereiche leer sind
-
- USHORT nStringId = 0;
- switch (nId)
- {
- case PIVOT_STYLE_INNER: nStringId = STR_PIVOT_STYLE_INNER; break;
- case PIVOT_STYLE_RESULT: nStringId = STR_PIVOT_STYLE_RESULT; break;
- case PIVOT_STYLE_CATEGORY: nStringId = STR_PIVOT_STYLE_CATEGORY; break;
- case PIVOT_STYLE_TITLE: nStringId = STR_PIVOT_STYLE_TITLE; break;
- case PIVOT_STYLE_FIELDNAME: nStringId = STR_PIVOT_STYLE_FIELDNAME; break;
- case PIVOT_STYLE_TOP: nStringId = STR_PIVOT_STYLE_TOP; break;
- default:
- DBG_ERROR("falsche ID bei ScPivot::SetStyle");
- return;
- }
- String aStyleName = ScGlobal::GetRscString(nStringId);
-
- ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool();
- ScStyleSheet* pStyle = (ScStyleSheet*) pStlPool->Find( aStyleName, SFX_STYLE_FAMILY_PARA );
- if (!pStyle)
- {
- // neu anlegen
-
- pStyle = (ScStyleSheet*) &pStlPool->Make( aStyleName, SFX_STYLE_FAMILY_PARA,
- SFXSTYLEBIT_USERDEF );
- pStyle->SetParent( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
- SfxItemSet& rSet = pStyle->GetItemSet();
- if ( nId==PIVOT_STYLE_RESULT || nId==PIVOT_STYLE_TITLE )
- rSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) );
- if ( nId==PIVOT_STYLE_CATEGORY || nId==PIVOT_STYLE_TITLE )
- rSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
- }
-
- pDoc->pTab[nDestTab]->ApplyStyleArea( nCol1, nRow1, nCol2, nRow2, *pStyle );
-}
-
-void ScPivot::SetValue(SCCOL nCol, SCROW nRow, const SubTotal& rTotal, USHORT nFunc)
-{
- if ( rTotal.Valid( nFunc ) == 1)
- pDoc->SetValue(nCol, nRow, nDestTab, rTotal.Result( nFunc ));
- else if ( rTotal.Valid( nFunc ) == 0)
- pDoc->SetError(nCol, nRow, nDestTab, errNoValue);
-}
-
-//--------------------------------------------------------------------------------------------------
-
-void ScPivot::GetParam( ScPivotParam& rParam, ScQueryParam& rQuery, ScArea& rSrcArea ) const
-{
- SCSIZE nCount;
- SCCOL nDummyCol;
- SCROW nDummyRow;
- GetDestArea( rParam.nCol,rParam.nRow, nDummyCol,nDummyRow, rParam.nTab );
-
- // Row und Col in der Bedeutung vertauscht:
- GetRowFields( rParam.aColArr, nCount );
- rParam.nColCount = nCount;
- GetColFields( rParam.aRowArr, nCount );
- rParam.nRowCount = nCount;
- GetDataFields( rParam.aDataArr, nCount );
- rParam.nDataCount = nCount;
-
- rParam.bIgnoreEmptyRows = GetIgnoreEmpty();
- rParam.bDetectCategories = GetDetectCat();
- rParam.bMakeTotalCol = GetMakeTotalCol();
- rParam.bMakeTotalRow = GetMakeTotalRow();
-
- GetQuery(rQuery);
- GetSrcArea( rSrcArea.nColStart, rSrcArea.nRowStart,
- rSrcArea.nColEnd, rSrcArea.nRowEnd, rSrcArea.nTab );
-}
-
-void ScPivot::SetParam( const ScPivotParam& rParam, const ScQueryParam& rQuery,
- const ScArea& rSrcArea )
-{
- SetQuery( rQuery );
- SetHeader( TRUE );
- SetSrcArea( rSrcArea.nColStart, rSrcArea.nRowStart,
- rSrcArea.nColEnd, rSrcArea.nRowEnd, rSrcArea.nTab );
- SetDestPos( rParam.nCol, rParam.nRow, rParam.nTab );
- SetIgnoreEmpty( rParam.bIgnoreEmptyRows );
- SetDetectCat( rParam.bDetectCategories );
- SetMakeTotalCol( rParam.bMakeTotalCol );
- SetMakeTotalRow( rParam.bMakeTotalRow );
-
- // Row und Col in der Bedeutung vertauscht:
- SetRowFields( rParam.aColArr, rParam.nColCount );
- SetColFields( rParam.aRowArr, rParam.nRowCount );
- SetDataFields( rParam.aDataArr, rParam.nDataCount );
-}
-
-ScDataObject* ScPivot::Clone() const
-{
- return new ScPivot(*this);
-}
-
-//--------------------------------------------------------------------------------------------------
-// PivotScStrCollection
-//--------------------------------------------------------------------------------------------------
-
-ScDataObject* PivotScStrCollection::Clone() const
-{
- return new PivotScStrCollection(*this);
-}
-
-short PivotScStrCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
-{
- DBG_ASSERT(pKey1&&pKey2,"0-Zeiger bei PivotScStrCollection::Compare");
-
- short nResult = 0;
-
- TypedStrData& rData1 = (TypedStrData&)*pKey1;
- TypedStrData& rData2 = (TypedStrData&)*pKey2;
-
- if ( rData1.nStrType > rData2.nStrType )
- nResult = 1;
- else if ( rData1.nStrType < rData2.nStrType )
- nResult = -1;
- else if ( !rData1.nStrType /* && !rData2.nStrType */ )
- {
- // Zahlen vergleichen:
-
- if ( rData1.nValue == rData2.nValue )
- nResult = 0;
- else if ( rData1.nValue < rData2.nValue )
- nResult = -1;
- else
- nResult = 1;
- }
- else /* if ( rData1.nStrType && rData2.nStrType ) */
- {
- // Strings vergleichen:
-
- if (pUserData)
- nResult = sal::static_int_cast<short>(pUserData->ICompare(rData1.aStrValue, rData2.aStrValue));
- else
- {
- nResult = (short) ScGlobal::pTransliteration->compareString(
- rData1.aStrValue, rData2.aStrValue );
- }
- }
-
- return nResult;
-}
-
-USHORT PivotScStrCollection::GetIndex(TypedStrData* pData) const
-{
- USHORT nIndex = 0;
- if (!Search(pData, nIndex))
- nIndex = 0;
- return nIndex;
-}
-
-//--------------------------------------------------------------------------------------------------
-// PivotCollection
-//--------------------------------------------------------------------------------------------------
-
-String ScPivotCollection::CreateNewName( USHORT nMin ) const
-{
- String aBase( RTL_CONSTASCII_USTRINGPARAM("DataPilot") );
- //! from Resource?
-
- for (USHORT nAdd=0; nAdd<=nCount; nAdd++) // nCount+1 Versuche
- {
- String aNewName = aBase;
- aNewName += String::CreateFromInt32( nMin + nAdd );
- BOOL bFound = FALSE;
- for (USHORT i=0; i<nCount && !bFound; i++)
- if (((ScPivot*)pItems[i])->GetName() == aNewName)
- bFound = TRUE;
- if (!bFound)
- return aNewName; // freien Namen gefunden
- }
- return String(); // sollte nicht vorkommen
-}
-
-ScPivot* ScPivotCollection::GetPivotAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
-{
- if (pItems)
- {
- for (USHORT i = 0; i < nCount; i++)
- if (((ScPivot*)pItems[i])->IsPivotAtCursor(nCol, nRow, nTab))
- {
- return (ScPivot*)pItems[i];
- }
- }
- return NULL;
-}
-
-BOOL ScPivotCollection::Load(SvStream& rStream)
-{
- BOOL bSuccess = TRUE;
- USHORT nNewCount, i;
- FreeAll();
-
- ScMultipleReadHeader aHdr( rStream );
-
- rStream >> nNewCount;
- for (i=0; i<nNewCount && bSuccess; i++)
- {
- ScPivot* pPivot = new ScPivot( pDoc );
- if (pPivot)
- {
- bSuccess = pPivot->Load(rStream, aHdr);
- Insert( pPivot );
- }
- else
- bSuccess = FALSE;
- }
-
- // fuer alte Dateien: eindeutige Namen vergeben
-
- if (bSuccess)
- for (i=0; i<nCount; i++)
- if (!((const ScPivot*)At(i))->GetName().Len())
- ((ScPivot*)At(i))->SetName( CreateNewName() );
-
- return bSuccess;
-}
-
-BOOL ScPivotCollection::Store(SvStream& rStream) const
-{
- BOOL bSuccess = TRUE;
-
- ScMultipleWriteHeader aHdr( rStream );
-
- rStream << nCount;
-
- for (USHORT i=0; i<nCount && bSuccess; i++)
- bSuccess = ((const ScPivot*)At(i))->Store( rStream, aHdr );
-
- return bSuccess;
-}
-
-void ScPivotCollection::UpdateReference(UpdateRefMode eUpdateRefMode,
- SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
-{
- for (USHORT i=0; i<nCount; i++)
- {
- SCCOL theCol1;
- SCROW theRow1;
- SCTAB theTab1;
- SCCOL theCol2;
- SCROW theRow2;
- SCTAB theTab2;
- ScRefUpdateRes eRes;
- ScPivot* pPivot = (ScPivot*)pItems[i];
-
- // Source
-
- pPivot->GetSrcArea( theCol1, theRow1, theCol2, theRow2, theTab1 );
- theTab2 = theTab1;
-
- eRes = ScRefUpdate::Update( pDoc, eUpdateRefMode,
- nCol1,nRow1,nTab1, nCol2,nRow2,nTab2, nDx,nDy,nDz,
- theCol1,theRow1,theTab1, theCol2,theRow2,theTab2 );
-
- if (eRes != UR_NOTHING)
- pPivot->MoveSrcArea( theCol1, theRow1, theTab1 );
-
- // Dest
-
- pPivot->GetDestArea( theCol1, theRow1, theCol2, theRow2, theTab1 );
- theTab2 = theTab1;
-
- eRes = ScRefUpdate::Update( pDoc, eUpdateRefMode,
- nCol1,nRow1,nTab1, nCol2,nRow2,nTab2, nDx,nDy,nDz,
- theCol1,theRow1,theTab1, theCol2,theRow2,theTab2 );
-
- if (eRes != UR_NOTHING)
- pPivot->MoveDestArea( theCol1, theRow1, theTab1 );
- }
-}
-
-void ScPivotCollection::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
-{
- // nur Quell-Bereich
-
- for (USHORT i=0; i<nCount; i++)
- {
- ScPivot* pPivot = (ScPivot*)pItems[i];
- ScRange aSrc = pPivot->GetSrcArea();
- ScRefUpdateRes eRes = ScRefUpdate::DoGrow( rArea, nGrowX, nGrowY, aSrc );
- if (eRes != UR_NOTHING)
- pPivot->ExtendSrcArea( aSrc.aEnd.Col(), aSrc.aEnd.Row() );
- }
-}
-
-BOOL ScPivotCollection::operator==(const ScPivotCollection& rCmp) const
-{
- if (nCount != rCmp.nCount)
- return FALSE;
-
- if (!nCount)
- return TRUE; // beide leer - nicht erst die Param's anlegen!
-
- ScPivotParam aMyParam, aCmpParam;
- ScQueryParam aMyQuery, aCmpQuery;
- ScArea aMyArea, aCmpArea;
-
- for (USHORT i=0; i<nCount; i++)
- {
- ScPivot* pMyPivot = (ScPivot*)pItems[i];
- pMyPivot->GetParam( aMyParam, aMyQuery, aMyArea );
- ScPivot* pCmpPivot = (ScPivot*)rCmp.pItems[i];
- pCmpPivot->GetParam( aCmpParam, aCmpQuery, aCmpArea );
- if (!( aMyArea==aCmpArea && aMyParam==aCmpParam && aMyQuery==aCmpQuery ))
- return FALSE;
- }
-
- return TRUE;
-}
-
-ScDataObject* ScPivotCollection::Clone() const
-{
- return new ScPivotCollection(*this);
-}
-
-#endif
-
// ============================================================================
LabelData::LabelData( const String& rName, short nCol, bool bIsValue ) :
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 3f4ac8319..0fd6fb056 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -95,10 +95,10 @@ void ScStyleSheetPool::SetDocument( ScDocument* pDocument )
//------------------------------------------------------------------------
-void ScStyleSheetPool::SetForceStdName( const String* pSet )
-{
- pForceStdName = pSet;
-}
+//UNUSED2009-05 void ScStyleSheetPool::SetForceStdName( const String* pSet )
+//UNUSED2009-05 {
+//UNUSED2009-05 pForceStdName = pSet;
+//UNUSED2009-05 }
//------------------------------------------------------------------------
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index dc4cc5f6f..c3d613394 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1458,11 +1458,11 @@ void ScTable::AddPrintRange( const ScRange& rNew )
aPrintRanges.push_back( rNew );
}
-void ScTable::SetPrintRange( const ScRange& rNew )
-{
- ClearPrintRanges();
- AddPrintRange( rNew );
-}
+//UNUSED2009-05 void ScTable::SetPrintRange( const ScRange& rNew )
+//UNUSED2009-05 {
+//UNUSED2009-05 ClearPrintRanges();
+//UNUSED2009-05 AddPrintRange( rNew );
+//UNUSED2009-05 }
void ScTable::SetPrintEntireSheet()
{
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 2231ce9a9..464bf4c8c 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -837,13 +837,13 @@ void ScTable::PutCell( const ScAddress& rPos, ScBaseCell* pCell )
}
-void ScTable::PutCell( const ScAddress& rPos, ULONG nFormatIndex, ScBaseCell* pCell )
-{
- if (pCell)
- aCol[rPos.Col()].Insert( rPos.Row(), nFormatIndex, pCell );
- else
- aCol[rPos.Col()].Delete( rPos.Row() );
-}
+//UNUSED2009-05 void ScTable::PutCell( const ScAddress& rPos, ULONG nFormatIndex, ScBaseCell* pCell )
+//UNUSED2009-05 {
+//UNUSED2009-05 if (pCell)
+//UNUSED2009-05 aCol[rPos.Col()].Insert( rPos.Row(), nFormatIndex, pCell );
+//UNUSED2009-05 else
+//UNUSED2009-05 aCol[rPos.Col()].Delete( rPos.Row() );
+//UNUSED2009-05 }
BOOL ScTable::SetString( SCCOL nCol, SCROW nRow, SCTAB nTabP, const String& rString )
@@ -1182,22 +1182,22 @@ BOOL ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
}
-BOOL ScTable::HasLines( const ScRange& rRange, Rectangle& rSizes ) const
-{
- SCCOL nCol1 = rRange.aStart.Col();
- SCROW nRow1 = rRange.aStart.Row();
- SCCOL nCol2 = rRange.aEnd.Col();
- SCROW nRow2 = rRange.aEnd.Row();
- PutInOrder( nCol1, nCol2 );
- PutInOrder( nRow1, nRow2 );
-
- BOOL bFound = FALSE;
- for (SCCOL i=nCol1; i<=nCol2; i++)
- if (aCol[i].HasLines( nRow1, nRow2, rSizes, (i==nCol1), (i==nCol2) ))
- bFound = TRUE;
-
- return bFound;
-}
+//UNUSED2009-05 BOOL ScTable::HasLines( const ScRange& rRange, Rectangle& rSizes ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 SCCOL nCol1 = rRange.aStart.Col();
+//UNUSED2009-05 SCROW nRow1 = rRange.aStart.Row();
+//UNUSED2009-05 SCCOL nCol2 = rRange.aEnd.Col();
+//UNUSED2009-05 SCROW nRow2 = rRange.aEnd.Row();
+//UNUSED2009-05 PutInOrder( nCol1, nCol2 );
+//UNUSED2009-05 PutInOrder( nRow1, nRow2 );
+//UNUSED2009-05
+//UNUSED2009-05 BOOL bFound = FALSE;
+//UNUSED2009-05 for (SCCOL i=nCol1; i<=nCol2; i++)
+//UNUSED2009-05 if (aCol[i].HasLines( nRow1, nRow2, rSizes, (i==nCol1), (i==nCol2) ))
+//UNUSED2009-05 bFound = TRUE;
+//UNUSED2009-05
+//UNUSED2009-05 return bFound;
+//UNUSED2009-05 }
BOOL ScTable::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 77e3e8fde..13b9b03b2 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -953,13 +953,6 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey )
return NULL;
}
-void ScValidationDataList::ResetUsed()
-{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
- (*this)[i]->SetUsed(FALSE);
-}
-
void ScValidationDataList::CompileXML()
{
USHORT nCount = Count();
diff --git a/sc/source/core/inc/refupdat.hxx b/sc/source/core/inc/refupdat.hxx
index 1a4c66d54..e0d2679c6 100644
--- a/sc/source/core/inc/refupdat.hxx
+++ b/sc/source/core/inc/refupdat.hxx
@@ -96,11 +96,6 @@ public:
static ScRefUpdateRes UpdateGrow(
const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY,
ScComplexRefData& rRef );
-
-#if OLD_PIVOT_IMPLEMENTATION
- static ScRefUpdateRes DoGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY,
- ScRange& rRef );
-#endif
};
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 6d62216f5..2113ccc56 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -59,13 +59,13 @@ ScAddress::Details::Details ( const ScDocument* pDoc,
{
}
-void ScAddress::Details::SetPos ( const ScDocument* pDoc,
- const ScAddress & rAddr )
-{
- nRow = rAddr.Row();
- nCol = rAddr.Col();
- eConv = pDoc->GetAddressConvention();
-}
+//UNUSED2009-05 void ScAddress::Details::SetPos ( const ScDocument* pDoc,
+//UNUSED2009-05 const ScAddress & rAddr )
+//UNUSED2009-05 {
+//UNUSED2009-05 nRow = rAddr.Row();
+//UNUSED2009-05 nCol = rAddr.Col();
+//UNUSED2009-05 eConv = pDoc->GetAddressConvention();
+//UNUSED2009-05 }
////////////////////////////////////////////////////////////////////////////
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 2327555de..de1a053b3 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -616,34 +616,34 @@ ScChartPositionMap::~ScChartPositionMap()
}
-ScRangeListRef ScChartPositionMap::GetColRanges( SCCOL nChartCol ) const
-{
- ScRangeListRef xRangeList = new ScRangeList;
- if ( nChartCol < nColCount )
- {
- ULONG nStop = GetIndex( nChartCol, nRowCount );
- for ( ULONG nIndex = GetIndex( nChartCol, 0 ); nIndex < nStop; nIndex++ )
- {
- if ( ppData[ nIndex ] )
- xRangeList->Join( *ppData[ nIndex ] );
- }
- }
- return xRangeList;
-}
-
-
-ScRangeListRef ScChartPositionMap::GetRowRanges( SCROW nChartRow ) const
-{
- ScRangeListRef xRangeList = new ScRangeList;
- if ( nChartRow < nRowCount )
- {
- ULONG nStop = GetIndex( nColCount, nChartRow );
- for ( ULONG nIndex = GetIndex( 0, nChartRow ); nIndex < nStop;
- nIndex += nRowCount )
- {
- if ( ppData[ nIndex ] )
- xRangeList->Join( *ppData[ nIndex ] );
- }
- }
- return xRangeList;
-}
+//UNUSED2009-05 ScRangeListRef ScChartPositionMap::GetColRanges( SCCOL nChartCol ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 ScRangeListRef xRangeList = new ScRangeList;
+//UNUSED2009-05 if ( nChartCol < nColCount )
+//UNUSED2009-05 {
+//UNUSED2009-05 ULONG nStop = GetIndex( nChartCol, nRowCount );
+//UNUSED2009-05 for ( ULONG nIndex = GetIndex( nChartCol, 0 ); nIndex < nStop; nIndex++ )
+//UNUSED2009-05 {
+//UNUSED2009-05 if ( ppData[ nIndex ] )
+//UNUSED2009-05 xRangeList->Join( *ppData[ nIndex ] );
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 return xRangeList;
+//UNUSED2009-05 }
+
+
+//UNUSED2009-05 ScRangeListRef ScChartPositionMap::GetRowRanges( SCROW nChartRow ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 ScRangeListRef xRangeList = new ScRangeList;
+//UNUSED2009-05 if ( nChartRow < nRowCount )
+//UNUSED2009-05 {
+//UNUSED2009-05 ULONG nStop = GetIndex( nColCount, nChartRow );
+//UNUSED2009-05 for ( ULONG nIndex = GetIndex( 0, nChartRow ); nIndex < nStop;
+//UNUSED2009-05 nIndex += nRowCount )
+//UNUSED2009-05 {
+//UNUSED2009-05 if ( ppData[ nIndex ] )
+//UNUSED2009-05 xRangeList->Join( *ppData[ nIndex ] );
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 return xRangeList;
+//UNUSED2009-05 }
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 76af46921..cba879a86 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -157,29 +157,6 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRa
aDateTime.ConvertToUTC();
}
-ScChangeAction::ScChangeAction( SvStream& rStrm, ScMultipleReadHeader& /* rHdr */,
- ScChangeTrack* /* pTrack */ )
- :
- pNext( NULL ),
- pPrev( NULL ),
- pLinkAny( NULL ),
- pLinkDeletedIn( NULL ),
- pLinkDeleted( NULL ),
- pLinkDependent( NULL )
-{
- // ScChangeTrack speichert aUser als Index auf Collection und eType selber
- UINT32 n32;
- UINT16 n16;
- rStrm >> aBigRange;
- rStrm >> n32; aDateTime.SetDate( n32 );
- rStrm >> n32; aDateTime.SetTime( n32 );
- rStrm >> n32; nAction = n32;
- rStrm >> n32; nRejectAction = n32;
- rStrm >> n16; eState = (ScChangeActionState) n16;
- rStrm.ReadByteString( aComment, rStrm.GetStreamCharSet() );
- // LinkEntries in zweiter Runde
-}
-
ScChangeAction::~ScChangeAction()
{
@@ -187,40 +164,6 @@ ScChangeAction::~ScChangeAction()
}
-BOOL ScChangeAction::Store( SvStream& rStrm, ScMultipleWriteHeader& /* rHdr */ ) const
-{
- // ScChangeTrack speichert aUser als Index auf Collection und eType selber
- rStrm << aBigRange;
- rStrm << (UINT32) aDateTime.GetDate();
- rStrm << (UINT32) aDateTime.GetTime();
- rStrm << (UINT32) nAction;
- rStrm << (UINT32) nRejectAction;
- rStrm << (UINT16) eState;
- rStrm.WriteByteString( aComment, rStrm.GetStreamCharSet() );
- // LinkEntries in zweiter Runde
-
- return TRUE;
-}
-
-
-BOOL ScChangeAction::StoreLinks( SvStream& rStrm ) const
-{
- BOOL bOk = ScChangeAction::StoreLinkChain( pLinkDeleted, rStrm );
- bOk &= ScChangeAction::StoreLinkChain( pLinkDependent, rStrm );
- return bOk;
-}
-
-
-BOOL ScChangeAction::LoadLinks( SvStream& rStrm, ScChangeTrack* pTrack )
-{
- BOOL bOk = ScChangeAction::LoadLinkChain( this, &pLinkDeleted, rStrm,
- pTrack, TRUE );
- bOk &= ScChangeAction::LoadLinkChain( this, &pLinkDependent, rStrm,
- pTrack, FALSE );
- return bOk;
-}
-
-
BOOL ScChangeAction::IsVisible() const
{
//! sequence order of execution is significant
@@ -682,159 +625,6 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack,
}
-// static
-void ScChangeAction::StoreCell( ScBaseCell* /* pCell */, SvStream& /* rStrm */,
- ScMultipleWriteHeader& /* rHdr */ )
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- if ( pCell )
- {
- CellType eCellType = pCell->GetCellType();
- switch( eCellType )
- {
- case CELLTYPE_VALUE:
- rStrm << (BYTE) eCellType;
- ((ScValueCell*)pCell)->Save( rStrm );
- break;
- case CELLTYPE_STRING:
- rStrm << (BYTE) eCellType;
- ((ScStringCell*)pCell)->Save( rStrm );
- break;
- case CELLTYPE_EDIT:
- rStrm << (BYTE) eCellType;
- ((ScEditCell*)pCell)->Save( rStrm );
- break;
- case CELLTYPE_FORMULA:
- rStrm << (BYTE) eCellType;
- rStrm << ((ScFormulaCell*)pCell)->aPos;
- ((ScFormulaCell*)pCell)->Save( rStrm, rHdr );
- break;
- default:
- DBG_ERROR( "ScChangeAction::StoreCell: unknown CellType" );
- rStrm << (BYTE) CELLTYPE_NONE;
- }
- }
- else
- rStrm << (BYTE) CELLTYPE_NONE;
-#endif // SC_ROWLIMIT_STREAM_ACCESS
-}
-
-
-// static
-ScBaseCell* ScChangeAction::LoadCell( SvStream& /* rStrm */,
- ScMultipleReadHeader& /* rHdr */, ScDocument* /* pDoc */, USHORT /* nVer */ )
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- ScBaseCell* pCell;
- BYTE nByte;
- rStrm >> nByte;
- switch ( (CellType) nByte )
- {
- case CELLTYPE_VALUE:
- {
- pCell = new ScValueCell( rStrm, nVer );
- }
- break;
- case CELLTYPE_STRING:
- {
- pCell = new ScStringCell( rStrm, nVer );
- }
- break;
- case CELLTYPE_EDIT:
- {
- pCell = new ScEditCell( rStrm, nVer, pDoc );
- }
- break;
- case CELLTYPE_FORMULA:
- {
- ScAddress aPos;
- rStrm >> aPos;
- pCell = new ScFormulaCell( pDoc, aPos, rStrm, rHdr );
- ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE );
- }
- break;
- case CELLTYPE_NONE :
- pCell = NULL;
- break;
- default:
- DBG_ERROR( "ScChangeAction::LoadCell: unknown CellType" );
- rStrm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- pCell = NULL;
- }
- return pCell;
-#else
- return 0;
-#endif // SC_ROWLIMIT_STREAM_ACCESS
-}
-
-
-// static
-BOOL ScChangeAction::StoreLinkChain( ScChangeActionLinkEntry* pLinkFirst,
- SvStream& rStrm )
-{
- BOOL bOk = TRUE;
- UINT32 nCount = 0;
- if ( pLinkFirst )
- {
- // rueckwaerts speichern, damit onLoad mit Insert die Reihenfolge wieder stimmt
- Stack* pStack = new Stack;
- for ( ScChangeActionLinkEntry* pL = pLinkFirst; pL; pL = pL->GetNext() )
- {
- ++nCount;
- pStack->Push( pL );
- }
- rStrm << nCount;
- ScChangeActionLinkEntry* pHere;
- while ( ( pHere = (ScChangeActionLinkEntry*) pStack->Pop() ) != NULL )
- {
- ScChangeAction* p = pHere->GetAction();
- rStrm << (UINT32) ( p ? p->GetActionNumber() : 0 );
- }
- delete pStack;
- }
- else
- rStrm << nCount;
- return bOk;
-}
-
-
-// static
-BOOL ScChangeAction::LoadLinkChain( ScChangeAction* pOfAction,
- ScChangeActionLinkEntry** ppLinkFirst, SvStream& rStrm,
- ScChangeTrack* pTrack, BOOL bLinkDeleted )
-{
- BOOL bOk = TRUE;
- UINT32 nCount;
- rStrm >> nCount;
- for ( UINT32 j = 0; j < nCount; j++ )
- {
- ScChangeAction* pAct = NULL;
- UINT32 nAct;
- rStrm >> nAct;
- if ( nAct )
- {
- pAct = pTrack->GetActionOrGenerated( nAct );
- DBG_ASSERT( pAct, "ScChangeAction::LoadLinkChain: missing Action" );
- }
- if ( bLinkDeleted )
- {
- if ( pAct )
- pAct->SetDeletedIn( pOfAction );
- }
- else
- {
- ScChangeActionLinkEntry* pLink = new ScChangeActionLinkEntry(
- ppLinkFirst, pAct );
- if ( pAct )
- pAct->AddLink( pOfAction, pLink );
- }
- }
- return bOk;
-}
-
-
void ScChangeAction::SetDeletedInThis( ULONG nActionNumber,
const ScChangeTrack* pTrack )
{
@@ -863,52 +653,6 @@ void ScChangeAction::AddDependent( ULONG nActionNumber,
}
}
-// static
-BOOL ScChangeAction::StoreCellList( ScChangeActionCellListEntry* pFirstCell,
- SvStream& rStrm )
-{
- UINT32 nCount = 0;
- for ( const ScChangeActionCellListEntry* pE = pFirstCell; pE;
- pE = pE->pNext )
- ++nCount;
- rStrm << nCount;
-
- if ( nCount )
- {
- for ( const ScChangeActionCellListEntry* pE = pFirstCell; pE;
- pE = pE->pNext )
- { // Store/Load vertauscht die Reihenfolge, aber das ist hierbei egal
- rStrm << (UINT32) pE->pContent->GetActionNumber();
- }
- }
- return TRUE;
-}
-
-
-BOOL ScChangeAction::LoadCellList( ScChangeAction* pOfAction,
- ScChangeActionCellListEntry*& /* pFirstCell */, SvStream& rStrm,
- ScChangeTrack* pTrack )
-{
- UINT32 nCount;
- rStrm >> nCount;
- if ( nCount )
- {
- for ( UINT32 j = 0; j < nCount; j++ )
- {
- ScChangeActionContent* pContent;
- UINT32 nContent;
- rStrm >> nContent;
- pContent = (ScChangeActionContent*) pTrack->GetActionOrGenerated( nContent );
- if ( pContent )
- pOfAction->AddContent( pContent );
- else
- {
- DBG_ERROR( "ScChangeActionDel::LoadLinks: missing Content" );
- }
- }
- }
- return TRUE;
-}
#if DEBUG_CHANGETRACK
String ScChangeAction::ToString( ScDocument* pDoc ) const
@@ -1082,13 +826,6 @@ ScChangeActionIns::ScChangeActionIns( const ScRange& rRange )
}
-ScChangeActionIns::ScChangeActionIns( SvStream& rStrm,
- ScMultipleReadHeader& rHdr, ScChangeTrack* pTrack )
- :
- ScChangeAction( rStrm, rHdr, pTrack )
-{
-}
-
ScChangeActionIns::ScChangeActionIns(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment,
const ScChangeActionType eTypeP)
@@ -1102,13 +839,6 @@ ScChangeActionIns::~ScChangeActionIns()
}
-BOOL ScChangeActionIns::Store( SvStream& rStrm, ScMultipleWriteHeader& rHdr ) const
-{
- BOOL bOk = ScChangeAction::Store( rStrm, rHdr );
- return bOk;
-}
-
-
void ScChangeActionIns::GetDescription( String& rStr, ScDocument* pDoc,
BOOL bSplitRange, bool bWarning ) const
{
@@ -1209,26 +939,6 @@ ScChangeActionDel::ScChangeActionDel( const ScRange& rRange,
}
-ScChangeActionDel::ScChangeActionDel( SvStream& rStrm,
- ScMultipleReadHeader& rHdr, ScDocument* /* pDoc */, USHORT /* nVer */,
- ScChangeTrack* pTrackP )
- :
- ScChangeAction( rStrm, rHdr, pTrackP ),
- pTrack( pTrackP ),
- pFirstCell( NULL ),
- pLinkMove( NULL )
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- UINT32 n32;
- INT16 n16s;
- rStrm >> n32; pCutOff = (ScChangeActionIns*)(ULONG) n32;
- rStrm >> n16s; nCutOff = n16s;
- rStrm >> n16s; nDx = n16s;
- rStrm >> n16s; nDy = n16s;
-#endif // SC_ROWLIMIT_STREAM_ACCESS
-}
-
ScChangeActionDel::ScChangeActionDel(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String &sComment,
const ScChangeActionType eTypeP, const SCsCOLROW nD, ScChangeTrack* pTrackP) // wich of nDx and nDy is set is depend on the type
@@ -1255,72 +965,6 @@ ScChangeActionDel::~ScChangeActionDel()
delete pLinkMove;
}
-BOOL ScChangeActionDel::StoreLinks( SvStream& rStrm ) const
-{
- BOOL bOk = ScChangeAction::StoreLinks( rStrm );
- UINT32 nCount = 0;
- if ( pLinkMove )
- {
- // rueckwaerts speichern, damit onLoad mit Insert die Reihenfolge wieder stimmt
- Stack* pStack = new Stack;
- for ( ScChangeActionDelMoveEntry* pL = pLinkMove; pL; pL = pL->GetNext() )
- {
- ++nCount;
- pStack->Push( pL );
- }
- rStrm << nCount;
- ScChangeActionDelMoveEntry* pHere;
- while ( ( pHere = (ScChangeActionDelMoveEntry*) pStack->Pop() ) != NULL )
- {
- ScChangeAction* p = pHere->GetAction();
- rStrm << (UINT32) ( p ? p->GetActionNumber() : 0 );
- rStrm << (INT16) pHere->GetCutOffFrom();
- rStrm << (INT16) pHere->GetCutOffTo();
- }
- delete pStack;
- }
- else
- rStrm << nCount;
-
- bOk &= ScChangeAction::StoreCellList( pFirstCell, rStrm );
-
- return bOk;
-}
-
-
-BOOL ScChangeActionDel::LoadLinks( SvStream& rStrm, ScChangeTrack* pTrackP )
-{
- BOOL bOk = ScChangeAction::LoadLinks( rStrm, pTrackP );
- UINT32 nCount;
- rStrm >> nCount;
- for ( UINT32 j = 0; j < nCount; j++ )
- {
- ScChangeActionMove* pAct = NULL;
- UINT32 nAct;
- rStrm >> nAct;
- if ( nAct )
- {
- pAct = (ScChangeActionMove*) pTrackP->GetAction( nAct );
- DBG_ASSERT( pAct, "ScChangeActionDel::LoadLinks: missing Move" );
- }
- INT16 nFrom, nTo;
- rStrm >> nFrom >> nTo;
- ScChangeActionDelMoveEntry* pLink = new ScChangeActionDelMoveEntry(
- &pLinkMove, pAct, nFrom, nTo );
- if ( pAct )
- pAct->AddLink( this, pLink );
- }
- if ( pCutOff )
- {
- pCutOff = (ScChangeActionIns*) pTrackP->GetAction( (ULONG) pCutOff );
- DBG_ASSERT( pCutOff, "ScChangeActionDel::LoadLinks: missing Insert" );
- }
-
- bOk &= ScChangeAction::LoadCellList( this, pFirstCell, rStrm, pTrackP );
-
- return bOk;
-}
-
void ScChangeActionDel::AddContent( ScChangeActionContent* pContent )
{
ScChangeActionCellListEntry* pE = new ScChangeActionCellListEntry(
@@ -1623,18 +1267,6 @@ void ScChangeActionDel::UndoCutOffInsert()
// --- ScChangeActionMove --------------------------------------------------
-ScChangeActionMove::ScChangeActionMove( SvStream& rStrm,
- ScMultipleReadHeader& rHdr, ScChangeTrack* pTrackP )
- :
- ScChangeAction( rStrm, rHdr, pTrackP ),
- pTrack( pTrackP ),
- pFirstCell( NULL ),
- nStartLastCut(0),
- nEndLastCut(0)
-{
- rStrm >> aFromRange;
-}
-
ScChangeActionMove::ScChangeActionMove(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
const ScBigRange& aToBigRange, const String& aUserP, const DateTime& aDateTimeP, const String &sComment,
const ScBigRange& aFromBigRange, ScChangeTrack* pTrackP) // wich of nDx and nDy is set is depend on the type
@@ -1654,30 +1286,6 @@ ScChangeActionMove::~ScChangeActionMove()
}
-BOOL ScChangeActionMove::Store( SvStream& rStrm, ScMultipleWriteHeader& rHdr ) const
-{
- BOOL bOk = ScChangeAction::Store( rStrm, rHdr );
- rStrm << aFromRange;
- return bOk;
-}
-
-
-BOOL ScChangeActionMove::StoreLinks( SvStream& rStrm ) const
-{
- BOOL bOk = ScChangeAction::StoreLinks( rStrm );
- bOk &= ScChangeAction::StoreCellList( pFirstCell, rStrm );
- return bOk;
-}
-
-
-BOOL ScChangeActionMove::LoadLinks( SvStream& rStrm, ScChangeTrack* pTrackP )
-{
- BOOL bOk = ScChangeAction::LoadLinks( rStrm, pTrackP );
- bOk &= ScChangeAction::LoadCellList( this, pFirstCell, rStrm, pTrackP );
- return bOk;
-}
-
-
void ScChangeActionMove::AddContent( ScChangeActionContent* pContent )
{
ScChangeActionCellListEntry* pE = new ScChangeActionCellListEntry(
@@ -1816,28 +1424,6 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc )
const USHORT nMemPoolChangeActionContent = (0x8000 - 64) / sizeof(ScChangeActionContent);
IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionContent, nMemPoolChangeActionContent, nMemPoolChangeActionContent )
-
-ScChangeActionContent::ScChangeActionContent( SvStream& rStrm,
- ScMultipleReadHeader& rHdr, ScDocument* pDoc, USHORT nVer,
- ScChangeTrack* pTrack )
- :
- ScChangeAction( rStrm, rHdr, pTrack ),
- pNextInSlot( NULL ),
- ppPrevInSlot( NULL )
-{
- UINT32 n32;
- rStrm.ReadByteString( aOldValue, rStrm.GetStreamCharSet() );
- rStrm.ReadByteString( aNewValue, rStrm.GetStreamCharSet() );
- rStrm >> n32; pNextContent = (ScChangeActionContent*)(ULONG) n32;
- rStrm >> n32; pPrevContent = (ScChangeActionContent*)(ULONG) n32;
-
- {
- ScMultipleReadHeader aDataHdr( rStrm );
- pOldCell = ScChangeAction::LoadCell( rStrm, aDataHdr, pDoc, nVer );
- pNewCell = ScChangeAction::LoadCell( rStrm, aDataHdr, pDoc, nVer );
- }
-}
-
ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber,
const ScChangeActionState eStateP, const ULONG nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP,
@@ -1895,52 +1481,6 @@ void ScChangeActionContent::ClearTrack()
}
-BOOL ScChangeActionContent::Store( SvStream& rStrm, ScMultipleWriteHeader& rHdr ) const
-{
- BOOL bOk = ScChangeAction::Store( rStrm, rHdr );
- rStrm.WriteByteString( aOldValue, rStrm.GetStreamCharSet() );
- rStrm.WriteByteString( aNewValue, rStrm.GetStreamCharSet() );
- rStrm << (UINT32) ( pNextContent ? pNextContent->GetActionNumber() : 0 );
- rStrm << (UINT32) ( pPrevContent ? pPrevContent->GetActionNumber() : 0 );
-
- {
- ScMultipleWriteHeader aDataHdr( rStrm );
- ScChangeAction::StoreCell( pOldCell, rStrm, aDataHdr );
- ScChangeAction::StoreCell( pNewCell, rStrm, aDataHdr );
- }
-
- return bOk;
-}
-
-
-BOOL ScChangeActionContent::StoreLinks( SvStream& rStrm ) const
-{
- BOOL bOk = ScChangeAction::StoreLinks( rStrm );
- return bOk;
-}
-
-
-BOOL ScChangeActionContent::LoadLinks( SvStream& rStrm, ScChangeTrack* pTrack )
-{
- BOOL bOk = ScChangeAction::LoadLinks( rStrm, pTrack );
- if ( pNextContent )
- {
- pNextContent = (ScChangeActionContent*) pTrack->GetAction(
- (ULONG) pNextContent );
- DBG_ASSERT( pNextContent,
- "ScChangeActionContent::LoadLinks: missing NextContent" );
- }
- if ( pPrevContent )
- {
- pPrevContent = (ScChangeActionContent*) pTrack->GetAction(
- (ULONG) pPrevContent );
- DBG_ASSERT( pPrevContent,
- "ScChangeActionContent::LoadLinks: missing PrevContent" );
- }
- return bOk;
-}
-
-
ScChangeActionContent* ScChangeActionContent::GetTopContent() const
{
if ( pNextContent )
@@ -2658,13 +2198,6 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
// --- ScChangeActionReject ------------------------------------------------
-ScChangeActionReject::ScChangeActionReject( SvStream& rStrm,
- ScMultipleReadHeader& rHdr, ScChangeTrack* pTrack )
- :
- ScChangeAction( rStrm, rHdr, pTrack )
-{
-}
-
ScChangeActionReject::ScChangeActionReject(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment)
:
@@ -2672,12 +2205,6 @@ ScChangeActionReject::ScChangeActionReject(const ULONG nActionNumber, const ScCh
{
}
-BOOL ScChangeActionReject::Store( SvStream& rStrm, ScMultipleWriteHeader& rHdr ) const
-{
- (void)ScChangeAction::Store( rStrm, rHdr );
- return TRUE;
-}
-
// --- ScChangeTrack -------------------------------------------------------
@@ -2915,29 +2442,6 @@ void ScChangeTrack::NotifyModified( ScChangeTrackMsgType eMsgType,
}
-void lcl_EnsureSorting( ScStrCollection& rCollection )
-{
- BOOL bSorted = TRUE;
- USHORT nCount = rCollection.GetCount();
- USHORT i;
- for (i=0; i+1<nCount; i++)
- if ( rCollection.Compare( rCollection[i], rCollection[i+1] ) != -1 )
- bSorted = FALSE;
-
- if ( !bSorted )
- {
- // if not sorted, rebuild collection
- ScStrCollection aNewColl;
- for (i=0; i<nCount; i++)
- {
- ScDataObject* pNewObj = rCollection[i]->Clone();
- if (!aNewColl.Insert(pNewObj))
- delete pNewObj;
- }
- rCollection = aNewColl;
- }
-}
-
void ScChangeTrack::MasterLinks( ScChangeAction* pAppend )
{
ScChangeActionType eType = pAppend->GetType();
@@ -3244,14 +2748,6 @@ BOOL ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell,
void ScChangeTrack::AppendContent( const ScAddress& rPos,
- const String& rNewValue )
-{
- ScBaseCell* pCell = pDoc->GetCell( rPos );
- AppendContent( rPos, rNewValue, pCell );
-}
-
-
-void ScChangeTrack::AppendContent( const ScAddress& rPos,
const String& rNewValue, ScBaseCell* pOldCell )
{
String aOldValue;
@@ -3321,16 +2817,6 @@ void ScChangeTrack::AppendContent( const ScAddress& rPos,
}
-void ScChangeTrack::AppendContent( const ScAddress& rPos,
- const ScBaseCell* pOldCell, ScDocument* pRefDoc )
-{
- if ( ScChangeActionContent::NeedsNumberFormat( pOldCell ) )
- AppendContent( rPos, pOldCell, pRefDoc->GetNumberFormat( rPos ), pRefDoc );
- else
- AppendContent( rPos, pOldCell, 0, pRefDoc );
-}
-
-
void ScChangeTrack::SetLastCutMoveRange( const ScRange& rRange,
ScDocument* pRefDoc )
{
diff --git a/sc/source/core/tool/collect.cxx b/sc/source/core/tool/collect.cxx
index de5f67b0e..d5982aa9e 100644
--- a/sc/source/core/tool/collect.cxx
+++ b/sc/source/core/tool/collect.cxx
@@ -334,38 +334,6 @@ ScDataObject* ScStrCollection::Clone() const
}
//------------------------------------------------------------------------
-
-void ScStrCollection::Load( SvStream& rStream )
-{
- ScReadHeader aHdr( rStream );
- lcl_DeleteScDataObjects( pItems, nCount );
- BOOL bDups;
- rStream >> bDups;
- SetDups( bDups );
- rStream >> nCount >> nLimit >> nDelta;
- pItems = new ScDataObject*[nLimit];
- String aStr;
- rtl_TextEncoding eSet = rStream.GetStreamCharSet();
- for ( USHORT i=0; i<nCount; i++ )
- {
- rStream.ReadByteString( aStr, eSet );
- pItems[i] = new StrData( aStr );
- }
-}
-
-void ScStrCollection::Store( SvStream& rStream ) const
-{
- ScWriteHeader aHdr( rStream );
- BOOL bDups = IsDups();
- rStream << bDups << nCount << nLimit << nDelta;
- rtl_TextEncoding eSet = rStream.GetStreamCharSet();
- for ( USHORT i=0; i<nCount; i++ )
- {
- rStream.WriteByteString( ((StrData*)pItems[i])->GetString(), eSet );
- }
-}
-
-//------------------------------------------------------------------------
// TypedScStrCollection
//------------------------------------------------------------------------
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 987cfa435..397111263 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -127,77 +127,6 @@ enum ScanState
static const sal_Char* pInternal[ 5 ] = { "GAME", "SPEW", "TTT", "STARCALCTEAM", "ANTWORT" };
using namespace ::com::sun::star::i18n;
-/////////////////////////////////////////////////////////////////////////
-
-short lcl_GetRetFormat( OpCode eOpCode )
-{
- switch (eOpCode)
- {
- case ocEqual:
- case ocNotEqual:
- case ocLess:
- case ocGreater:
- case ocLessEqual:
- case ocGreaterEqual:
- case ocAnd:
- case ocOr:
- case ocNot:
- case ocTrue:
- case ocFalse:
- case ocIsEmpty:
- case ocIsString:
- case ocIsNonString:
- case ocIsLogical:
- case ocIsRef:
- case ocIsValue:
- case ocIsFormula:
- case ocIsNA:
- case ocIsErr:
- case ocIsError:
- case ocIsEven:
- case ocIsOdd:
- case ocExact:
- return NUMBERFORMAT_LOGICAL;
- case ocGetActDate:
- case ocGetDate:
- case ocEasterSunday :
- return NUMBERFORMAT_DATE;
- case ocGetActTime:
- return NUMBERFORMAT_DATETIME;
- case ocGetTime:
- return NUMBERFORMAT_TIME;
- case ocNPV:
- case ocBW:
- case ocDIA:
- case ocGDA:
- case ocGDA2:
- case ocVBD:
- case ocLIA:
- case ocRMZ:
- case ocZW:
- case ocZinsZ:
- case ocKapz:
- case ocKumZinsZ:
- case ocKumKapZ:
- return NUMBERFORMAT_CURRENCY;
- case ocZins:
- case ocIRR:
- case ocMIRR:
- case ocZGZ:
- case ocEffektiv:
- case ocNominal:
- case ocPercentSign:
- return NUMBERFORMAT_PERCENT;
-// case ocSum:
-// case ocSumSQ:
-// case ocProduct:
-// case ocAverage:
-// return -1;
- default:
- return NUMBERFORMAT_NUMBER;
- }
- return NUMBERFORMAT_NUMBER;
-}
/////////////////////////////////////////////////////////////////////////
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index a249cc71c..500aa123e 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -363,19 +363,19 @@ BOOL ScRangeData::operator== (const ScRangeData& rData) const // fuer Undo
return TRUE;
}
-BOOL ScRangeData::IsRangeAtCursor( const ScAddress& rPos, BOOL bStartOnly ) const
-{
- BOOL bRet = FALSE;
- ScRange aRange;
- if ( IsReference(aRange) )
- {
- if ( bStartOnly )
- bRet = ( rPos == aRange.aStart );
- else
- bRet = ( aRange.In( rPos ) );
- }
- return bRet;
-}
+//UNUSED2009-05 BOOL ScRangeData::IsRangeAtCursor( const ScAddress& rPos, BOOL bStartOnly ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 BOOL bRet = FALSE;
+//UNUSED2009-05 ScRange aRange;
+//UNUSED2009-05 if ( IsReference(aRange) )
+//UNUSED2009-05 {
+//UNUSED2009-05 if ( bStartOnly )
+//UNUSED2009-05 bRet = ( rPos == aRange.aStart );
+//UNUSED2009-05 else
+//UNUSED2009-05 bRet = ( aRange.In( rPos ) );
+//UNUSED2009-05 }
+//UNUSED2009-05 return bRet;
+//UNUSED2009-05 }
BOOL ScRangeData::IsRangeAtBlock( const ScRange& rBlock ) const
{
@@ -799,16 +799,16 @@ ScRangeData* ScRangeName::FindIndex( USHORT nIndex )
return NULL;
}
-ScRangeData* ScRangeName::GetRangeAtCursor( const ScAddress& rPos, BOOL bStartOnly ) const
-{
- if ( pItems )
- {
- for ( USHORT i = 0; i < nCount; i++ )
- if ( ((ScRangeData*)pItems[i])->IsRangeAtCursor( rPos, bStartOnly ) )
- return (ScRangeData*)pItems[i];
- }
- return NULL;
-}
+//UNUSED2009-05 ScRangeData* ScRangeName::GetRangeAtCursor( const ScAddress& rPos, BOOL bStartOnly ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 if ( pItems )
+//UNUSED2009-05 {
+//UNUSED2009-05 for ( USHORT i = 0; i < nCount; i++ )
+//UNUSED2009-05 if ( ((ScRangeData*)pItems[i])->IsRangeAtCursor( rPos, bStartOnly ) )
+//UNUSED2009-05 return (ScRangeData*)pItems[i];
+//UNUSED2009-05 }
+//UNUSED2009-05 return NULL;
+//UNUSED2009-05 }
ScRangeData* ScRangeName::GetRangeAtBlock( const ScRange& rBlock ) const
{
diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index c88b89144..10539002c 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -44,62 +44,6 @@
// =======================================================================
-ScReadHeader::ScReadHeader(SvStream& rNewStream) :
- rStream( rNewStream )
-{
- sal_uInt32 nDataSize;
- rStream >> nDataSize;
- nDataEnd = rStream.Tell() + nDataSize;
-}
-
-ScReadHeader::~ScReadHeader()
-{
- ULONG nReadEnd = rStream.Tell();
- DBG_ASSERT( nReadEnd <= nDataEnd, "zuviele Bytes gelesen" );
- if ( nReadEnd != nDataEnd )
- {
- if ( rStream.GetError() == SVSTREAM_OK )
- rStream.SetError( SCWARN_IMPORT_INFOLOST );
- rStream.Seek(nDataEnd); // Rest ueberspringen
- }
-}
-
-ULONG ScReadHeader::BytesLeft() const
-{
- ULONG nReadEnd = rStream.Tell();
- if (nReadEnd <= nDataEnd)
- return nDataEnd-nReadEnd;
-
- DBG_ERROR("Fehler bei ScReadHeader::BytesLeft");
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-ScWriteHeader::ScWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault) :
- rStream( rNewStream )
-{
- nDataSize = nDefault;
- rStream << nDataSize;
-
- nDataPos = rStream.Tell();
-}
-
-ScWriteHeader::~ScWriteHeader()
-{
- ULONG nPos = rStream.Tell();
-
- if ( nPos - nDataPos != nDataSize ) // Default getroffen?
- {
- nDataSize = nPos - nDataPos;
- rStream.Seek(nDataPos - sizeof(sal_uInt32));
- rStream << nDataSize; // Groesse am Anfang eintragen
- rStream.Seek(nPos);
- }
-}
-
-// =======================================================================
-
ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
rStream( rNewStream )
{
diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx
index 461a1d73f..ca415af08 100644
--- a/sc/source/core/tool/refupdat.cxx
+++ b/sc/source/core/tool/refupdat.cxx
@@ -939,37 +939,4 @@ ScRefUpdateRes ScRefUpdate::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCRO
return eRet;
}
-#if OLD_PIVOT_IMPLEMENTATION
-ScRefUpdateRes ScRefUpdate::DoGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY,
- ScRange& rRef )
-{
- // wie UpdateGrow, nur mit Range statt RefData
-
- ScRefUpdateRes eRet = UR_NOTHING;
-
- BOOL bUpdateX = ( nGrowX &&
- rRef.aStart.Col() == rArea.aStart.Col() && rRef.aEnd.Col() == rArea.aEnd.Col() &&
- rRef.aStart.Row() >= rArea.aStart.Row() && rRef.aEnd.Row() <= rArea.aEnd.Row() &&
- rRef.aStart.Tab() >= rArea.aStart.Tab() && rRef.aEnd.Tab() <= rArea.aEnd.Tab() );
- BOOL bUpdateY = ( nGrowY &&
- rRef.aStart.Col() >= rArea.aStart.Col() && rRef.aEnd.Col() <= rArea.aEnd.Col() &&
- ( rRef.aStart.Row() == rArea.aStart.Row() || rRef.aStart.Row() == rArea.aStart.Row()+1 ) &&
- rRef.aEnd.Row() == rArea.aEnd.Row() &&
- rRef.aStart.Tab() >= rArea.aStart.Tab() && rRef.aEnd.Tab() <= rArea.aEnd.Tab() );
-
- if ( bUpdateX )
- {
- rRef.aEnd.SetCol( rRef.aEnd.Col() + nGrowX );
- eRet = UR_UPDATED;
- }
- if ( bUpdateY )
- {
- rRef.aEnd.SetRow( rRef.aEnd.Row() + nGrowY );
- eRet = UR_UPDATED;
- }
-
- return eRet;
-}
-#endif
-
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index c0edcbf54..35541bc1e 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -608,48 +608,48 @@ void ScMatrix::MatTrans(ScMatrix& mRes) const
}
}
-void ScMatrix::MatCopyUpperLeft(ScMatrix& mRes) const
-{
- if (nColCount < mRes.nColCount || nRowCount < mRes.nRowCount)
- {
- DBG_ERRORFILE("ScMatrix::MatCopyUpperLeft: dimension error");
- }
- else
- {
- if (mnValType)
- {
- ScMatValType nType;
- mRes.ResetIsString();
- for ( SCSIZE i = 0; i < mRes.nColCount; i++ )
- {
- SCSIZE nStart = i * nRowCount;
- for ( SCSIZE j = 0; j < mRes.nRowCount; j++ )
- {
- if ( IsNonValueType( (nType = mnValType[nStart+j]) ))
- mRes.PutStringEntry( pMat[nStart+j].pS, nType,
- i*mRes.nRowCount+j );
- else
- {
- mRes.pMat[i*mRes.nRowCount+j].fVal = pMat[nStart+j].fVal;
- mRes.mnValType[i*mRes.nRowCount+j] = nType;
- }
- }
- }
- }
- else
- {
- mRes.DeleteIsString();
- for ( SCSIZE i = 0; i < mRes.nColCount; i++ )
- {
- SCSIZE nStart = i * nRowCount;
- for ( SCSIZE j = 0; j < mRes.nRowCount; j++ )
- {
- mRes.pMat[i*mRes.nRowCount+j].fVal = pMat[nStart+j].fVal;
- }
- }
- }
- }
-}
+//UNUSED2009-05 void ScMatrix::MatCopyUpperLeft(ScMatrix& mRes) const
+//UNUSED2009-05 {
+//UNUSED2009-05 if (nColCount < mRes.nColCount || nRowCount < mRes.nRowCount)
+//UNUSED2009-05 {
+//UNUSED2009-05 DBG_ERRORFILE("ScMatrix::MatCopyUpperLeft: dimension error");
+//UNUSED2009-05 }
+//UNUSED2009-05 else
+//UNUSED2009-05 {
+//UNUSED2009-05 if (mnValType)
+//UNUSED2009-05 {
+//UNUSED2009-05 ScMatValType nType;
+//UNUSED2009-05 mRes.ResetIsString();
+//UNUSED2009-05 for ( SCSIZE i = 0; i < mRes.nColCount; i++ )
+//UNUSED2009-05 {
+//UNUSED2009-05 SCSIZE nStart = i * nRowCount;
+//UNUSED2009-05 for ( SCSIZE j = 0; j < mRes.nRowCount; j++ )
+//UNUSED2009-05 {
+//UNUSED2009-05 if ( IsNonValueType( (nType = mnValType[nStart+j]) ))
+//UNUSED2009-05 mRes.PutStringEntry( pMat[nStart+j].pS, nType,
+//UNUSED2009-05 i*mRes.nRowCount+j );
+//UNUSED2009-05 else
+//UNUSED2009-05 {
+//UNUSED2009-05 mRes.pMat[i*mRes.nRowCount+j].fVal = pMat[nStart+j].fVal;
+//UNUSED2009-05 mRes.mnValType[i*mRes.nRowCount+j] = nType;
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 else
+//UNUSED2009-05 {
+//UNUSED2009-05 mRes.DeleteIsString();
+//UNUSED2009-05 for ( SCSIZE i = 0; i < mRes.nColCount; i++ )
+//UNUSED2009-05 {
+//UNUSED2009-05 SCSIZE nStart = i * nRowCount;
+//UNUSED2009-05 for ( SCSIZE j = 0; j < mRes.nRowCount; j++ )
+//UNUSED2009-05 {
+//UNUSED2009-05 mRes.pMat[i*mRes.nRowCount+j].fVal = pMat[nStart+j].fVal;
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 }
void ScMatrix::FillDouble( double fVal, SCSIZE nC1, SCSIZE nR1, SCSIZE nC2, SCSIZE nR2 )
{
diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx
index faf87c316..8819b2e4c 100644
--- a/sc/source/core/tool/subtotal.cxx
+++ b/sc/source/core/tool/subtotal.cxx
@@ -39,188 +39,6 @@
// -----------------------------------------------------------------------
-#if OLD_PIVOT_IMPLEMENTATION
-SubTotal::SubTotal()
-{
- nIndex = 0; //! test fuer Pivot
-
- nCount = 0;
- nCount2 = 0;
- nSum = 0.0;
- nSumSqr = 0.0;
- nMax = -MAXDOUBLE;
- nMin = MAXDOUBLE;
- nProduct = 1.0;
- bSumOk = TRUE;
- bSumSqrOk = TRUE;
- bProductOk = TRUE;
-}
-
-
-SubTotal::~SubTotal()
-{
-}
-
-
-void SubTotal::UpdateNoVal()
-{
- nCount++;
-}
-
-
-void SubTotal::Update( double nVal )
-{
- SAL_MATH_FPEXCEPTIONS_OFF();
- nCount++;
- nCount2++;
- if (nVal > nMax) nMax = nVal;
- if (nVal < nMin) nMin = nVal;
- nProgress = 0;
- if (bSumOk) nSum += nVal;
- nProgress = 1;
- if (bProductOk) nProduct *= nVal;
- nProgress = 2;
- if (bSumSqrOk) nSumSqr += nVal*nVal;
- if (!::rtl::math::isFinite(nSum))
- bSumOk = FALSE;
- if (!::rtl::math::isFinite(nProduct))
- bProductOk = FALSE;
- if (!::rtl::math::isFinite(nSumSqr))
- bSumSqrOk = FALSE;
-}
-
-
-void SubTotal::Update( const SubTotal& rVal )
-{
- SAL_MATH_FPEXCEPTIONS_OFF();
- nCount += rVal.nCount;
- nCount2 += rVal.nCount2;
- if (rVal.nMax > nMax) nMax = rVal.nMax;
- if (rVal.nMin < nMin) nMin = rVal.nMin;
- nProgress = 0;
- if (rVal.bSumOk && bSumOk)
- nSum += rVal.nSum;
- else
- bSumOk = FALSE;
- nProgress = 1;
- if (rVal.bProductOk && bProductOk)
- nProduct *= rVal.nProduct;
- else
- bProductOk = FALSE;
- nProgress = 2;
- if (rVal.bSumSqrOk && bSumSqrOk)
- nSumSqr += rVal.nSumSqr;
- else
- bSumSqrOk = FALSE;
- if (!::rtl::math::isFinite(nSum))
- bSumOk = FALSE;
- if (!::rtl::math::isFinite(nProduct))
- bProductOk = FALSE;
- if (!::rtl::math::isFinite(nSumSqr))
- bSumSqrOk = FALSE;
-}
-
-
-short SubTotal::Valid( USHORT nFunction ) const
- // return 0 => Fehler, -1 => kein Wert, 1 => ok
-{
- short nRet;
- switch (nFunction)
- {
- case PIVOT_FUNC_AVERAGE:
- if (nCount2 == 0)
- nRet = -1;
- else
- nRet = bSumOk;
- break;
- case PIVOT_FUNC_STD_DEVP:
- case PIVOT_FUNC_STD_VARP:
- if (nCount2 == 0)
- nRet = -1;
- else
- nRet = bSumSqrOk;
- break;
- case PIVOT_FUNC_STD_DEV:
- case PIVOT_FUNC_STD_VAR:
- if (nCount2 < 2)
- nRet = -1;
- else
- nRet = bSumSqrOk;
- break;
- case PIVOT_FUNC_MAX:
- if (nCount2 == 0)
- nRet = -1;
- else
- nRet = 1;
- break;
- case PIVOT_FUNC_MIN:
- if (nCount2 == 0)
- nRet = -1;
- else
- nRet = 1;
- break;
- case PIVOT_FUNC_SUM:
- if (nCount2 == 0)
- nRet = -1;
- else
- nRet = bSumOk;
- break;
- case PIVOT_FUNC_PRODUCT:
- if (nCount2 == 0)
- nRet = -1;
- else
- nRet = bProductOk;
- break;
- default:
- nRet = 1;
- break;
- }
- return nRet;
-}
-
-
-double SubTotal::Result( USHORT nFunction ) const
-{
- double nRet = 0.0;
- switch (nFunction)
- {
- case PIVOT_FUNC_COUNT: nRet = (double) nCount; break;
- case PIVOT_FUNC_COUNT_NUM: nRet = (double) nCount2; break;
- case PIVOT_FUNC_SUM: nRet = nSum; break;
- case PIVOT_FUNC_MAX: nRet = nMax; break;
- case PIVOT_FUNC_MIN: nRet = nMin; break;
- case PIVOT_FUNC_PRODUCT: nRet = nProduct; break;
- case PIVOT_FUNC_AVERAGE:
- if (nCount2 > 0)
- nRet = nSum / (double) nCount2;
- break;
- case PIVOT_FUNC_STD_DEV:
- if (nCount2 > 1)
- nRet = sqrt((nSumSqr - nSum*nSum/(double)(nCount2))
- / (double)(nCount2-1));
- break;
- case PIVOT_FUNC_STD_DEVP:
- if (nCount2 > 0)
- nRet = sqrt((nSumSqr - nSum*nSum/(double)(nCount2))
- / (double)nCount2);
- break;
- case PIVOT_FUNC_STD_VAR:
- if (nCount2 > 1)
- nRet = (nSumSqr - nSum*nSum/(double)(nCount2))
- / (double)(nCount2-1);
- break;
- case PIVOT_FUNC_STD_VARP:
- if (nCount2 > 0)
- nRet = (nSumSqr - nSum*nSum/(double)(nCount2))
- / (double)(nCount2);
- break;
- default:
- DBG_ERROR("unbekannte Funktion bei SubTotal::Result");
- }
- return nRet;
-}
-#endif
-
BOOL SubTotal::SafePlus(double& fVal1, double fVal2)
{
BOOL bOk = TRUE;
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 4c04725a3..d6584c76d 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -218,12 +218,6 @@ UINT16 ExcDummyRec::GetNum( void ) const
//------------------------------------------------------- class ExcBoolRecord -
-ExcBoolRecord::ExcBoolRecord( SfxItemSet* pItemSet, USHORT nWhich, BOOL bDefault )
-{
- bVal = pItemSet? ( ( const SfxBoolItem& ) pItemSet->Get( nWhich ) ).GetValue() : bDefault;
-}
-
-
void ExcBoolRecord::SaveCont( XclExpStream& rStrm )
{
rStrm << (UINT16)(bVal ? 0x0001 : 0x0000);
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index 160b8414e..d24dac42c 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -208,20 +208,20 @@ void TokenPool::GrowDouble( void )
}
-void TokenPool::GrowError( void )
-{
- UINT16 nP_ErrNew = nP_Err * 2;
-
- USHORT* pP_ErrNew = new USHORT[ nP_ErrNew ];
-
- for( UINT16 nL = 0 ; nL < nP_Err ; nL++ )
- pP_ErrNew[ nL ] = pP_Err[ nL ];
-
- nP_Err = nP_ErrNew;
-
- delete[] pP_Err;
- pP_Err = pP_ErrNew;
-}
+//UNUSED2009-05 void TokenPool::GrowError( void )
+//UNUSED2009-05 {
+//UNUSED2009-05 UINT16 nP_ErrNew = nP_Err * 2;
+//UNUSED2009-05
+//UNUSED2009-05 USHORT* pP_ErrNew = new USHORT[ nP_ErrNew ];
+//UNUSED2009-05
+//UNUSED2009-05 for( UINT16 nL = 0 ; nL < nP_Err ; nL++ )
+//UNUSED2009-05 pP_ErrNew[ nL ] = pP_Err[ nL ];
+//UNUSED2009-05
+//UNUSED2009-05 nP_Err = nP_ErrNew;
+//UNUSED2009-05
+//UNUSED2009-05 delete[] pP_Err;
+//UNUSED2009-05 pP_Err = pP_ErrNew;
+//UNUSED2009-05 }
void TokenPool::GrowTripel( void )
@@ -593,28 +593,6 @@ const TokenId TokenPool::Store( const double& rDouble )
}
-//UNUSED2008-05 const TokenId TokenPool::StoreError( USHORT nError )
-//UNUSED2008-05 {
-//UNUSED2008-05 if( nElementAkt >= nElement )
-//UNUSED2008-05 GrowElement();
-//UNUSED2008-05
-//UNUSED2008-05 if( nP_ErrAkt >= nP_Err )
-//UNUSED2008-05 GrowError();
-//UNUSED2008-05
-//UNUSED2008-05 pElement[ nElementAkt ] = nP_ErrAkt; // Index in Error-Array
-//UNUSED2008-05 pType[ nElementAkt ] = T_Err; // Typinfo Error eintragen
-//UNUSED2008-05
-//UNUSED2008-05 pP_Err[ nP_ErrAkt ] = nError;
-//UNUSED2008-05
-//UNUSED2008-05 pSize[ nElementAkt ] = 1; // eigentlich Banane
-//UNUSED2008-05
-//UNUSED2008-05 nElementAkt++;
-//UNUSED2008-05 nP_ErrAkt++;
-//UNUSED2008-05
-//UNUSED2008-05 return ( const TokenId ) nElementAkt; // Ausgabe von altem Wert + 1!
-//UNUSED2008-05 }
-
-
const TokenId TokenPool::Store( const UINT16 nIndex )
{
if( nElementAkt >= nElement )
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 0277877c0..6eee24348 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -846,11 +846,11 @@ SCTAB XclExpTabInfo::GetRealScTab( SCTAB nSortedScTab ) const
return (nSortedScTab < mnScCnt) ? maFromSortedVec[ nSortedScTab ] : SCTAB_INVALID;
}
-SCTAB XclExpTabInfo::GetSortedScTab( SCTAB nScTab ) const
-{
- DBG_ASSERT( nScTab < mnScCnt, "XclExpTabInfo::GetSortedScTab - sheet out of range" );
- return (nScTab < mnScCnt) ? maToSortedVec[ nScTab ] : SCTAB_INVALID;
-}
+//UNUSED2009-05 SCTAB XclExpTabInfo::GetSortedScTab( SCTAB nScTab ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 DBG_ASSERT( nScTab < mnScCnt, "XclExpTabInfo::GetSortedScTab - sheet out of range" );
+//UNUSED2009-05 return (nScTab < mnScCnt) ? maToSortedVec[ nScTab ] : SCTAB_INVALID;
+//UNUSED2009-05 }
bool XclExpTabInfo::GetFlag( SCTAB nScTab, sal_uInt8 nFlags ) const
{
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index b4de11269..ace7a66dc 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -720,10 +720,10 @@ sal_uInt16 XclExpNameManager::InsertDBRange( USHORT nScDBRangeIdx )
return mxImpl->InsertDBRange( nScDBRangeIdx );
}
-sal_uInt16 XclExpNameManager::InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab )
-{
- return mxImpl->InsertBuiltInName( cBuiltIn, xTokArr, nScTab );
-}
+//UNUSED2009-05 sal_uInt16 XclExpNameManager::InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab )
+//UNUSED2009-05 {
+//UNUSED2009-05 return mxImpl->InsertBuiltInName( cBuiltIn, xTokArr, nScTab );
+//UNUSED2009-05 }
sal_uInt16 XclExpNameManager::InsertBuiltInName( sal_Unicode cBuiltIn, const ScRange& rRange )
{
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 4f88e0a6f..d7bf0b3c1 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -701,10 +701,10 @@ const XclExpPCField* XclExpPivotCache::GetField( sal_uInt16 nFieldIdx ) const
return maFieldList.GetRecord( nFieldIdx ).get();
}
-const XclExpPCField* XclExpPivotCache::GetField( const String& rFieldName ) const
-{
- return const_cast< XclExpPivotCache* >( this )->GetFieldAcc( rFieldName );
-}
+//UNUSED2009-05 const XclExpPCField* XclExpPivotCache::GetField( const String& rFieldName ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 return const_cast< XclExpPivotCache* >( this )->GetFieldAcc( rFieldName );
+//UNUSED2009-05 }
bool XclExpPivotCache::HasAddFields() const
{
@@ -1014,10 +1014,10 @@ sal_uInt16 XclExpPTField::GetLastDataInfoIndex() const
return static_cast< sal_uInt16 >( maDataInfoVec.size() - 1 );
}
-const XclExpPTItem* XclExpPTField::GetItem( const String& rName ) const
-{
- return const_cast< XclExpPTField* >( this )->GetItemAcc( rName );
-}
+//UNUSED2009-05 const XclExpPTItem* XclExpPTField::GetItem( const String& rName ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 return const_cast< XclExpPTField* >( this )->GetItemAcc( rName );
+//UNUSED2009-05 }
sal_uInt16 XclExpPTField::GetItemIndex( const String& rName, sal_uInt16 nDefaultIdx ) const
{
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 8d27d2d9a..2aef64c8a 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -653,36 +653,36 @@ void XclExpBooleanCell::WriteContents( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
-IMPL_FIXEDMEMPOOL_NEWDEL( XclExpErrorCell, 256, 256 )
-
-XclExpErrorCell::XclExpErrorCell(
- const XclExpRoot rRoot, const XclAddress& rXclPos,
- const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId, sal_uInt8 nErrCode ) :
- // #i41210# always use latin script for error cells
- XclExpSingleCellBase( rRoot, EXC_ID3_BOOLERR, 2, rXclPos, pPattern, ApiScriptType::LATIN, nForcedXFId ),
- mnErrCode( nErrCode )
-{
-}
-
-void XclExpErrorCell::SaveXml( XclExpXmlStream& rStrm )
-{
- sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_c,
- XML_r, XclXmlUtils::ToOString( GetXclPos() ).getStr(),
- XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
- XML_t, "e",
- // OOXTODO: XML_cm, XML_vm, XML_ph
- FSEND );
- rWorksheet->startElement( XML_v, FSEND );
- rWorksheet->write( (sal_Int32) mnErrCode );
- rWorksheet->endElement( XML_v );
- rWorksheet->endElement( XML_c );
-}
-
-void XclExpErrorCell::WriteContents( XclExpStream& rStrm )
-{
- rStrm << mnErrCode << EXC_BOOLERR_ERROR;
-}
+//UNUSED2009-05 IMPL_FIXEDMEMPOOL_NEWDEL( XclExpErrorCell, 256, 256 )
+//UNUSED2009-05
+//UNUSED2009-05 XclExpErrorCell::XclExpErrorCell(
+//UNUSED2009-05 const XclExpRoot rRoot, const XclAddress& rXclPos,
+//UNUSED2009-05 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId, sal_uInt8 nErrCode ) :
+//UNUSED2009-05 // #i41210# always use latin script for error cells
+//UNUSED2009-05 XclExpSingleCellBase( rRoot, EXC_ID3_BOOLERR, 2, rXclPos, pPattern, ApiScriptType::LATIN, nForcedXFId ),
+//UNUSED2009-05 mnErrCode( nErrCode )
+//UNUSED2009-05 {
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 void XclExpErrorCell::SaveXml( XclExpXmlStream& rStrm )
+//UNUSED2009-05 {
+//UNUSED2009-05 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+//UNUSED2009-05 rWorksheet->startElement( XML_c,
+//UNUSED2009-05 XML_r, XclXmlUtils::ToOString( GetXclPos() ).getStr(),
+//UNUSED2009-05 XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
+//UNUSED2009-05 XML_t, "e",
+//UNUSED2009-05 // OOXTODO: XML_cm, XML_vm, XML_ph
+//UNUSED2009-05 FSEND );
+//UNUSED2009-05 rWorksheet->startElement( XML_v, FSEND );
+//UNUSED2009-05 rWorksheet->write( (sal_Int32) mnErrCode );
+//UNUSED2009-05 rWorksheet->endElement( XML_v );
+//UNUSED2009-05 rWorksheet->endElement( XML_c );
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 void XclExpErrorCell::WriteContents( XclExpStream& rStrm )
+//UNUSED2009-05 {
+//UNUSED2009-05 rStrm << mnErrCode << EXC_BOOLERR_ERROR;
+//UNUSED2009-05 }
// ----------------------------------------------------------------------------
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 98e871941..599b33f9c 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2900,10 +2900,10 @@ void XclImpPictureObj::ReadPictFmla( XclImpStream& rStrm, sal_uInt16 nLinkSize )
// DFF stream conversion ======================================================
-void XclImpSolverContainer::ReadSolverContainer( SvStream& rDffStrm )
-{
- rDffStrm >> *this;
-}
+//UNUSED2009-05 void XclImpSolverContainer::ReadSolverContainer( SvStream& rDffStrm )
+//UNUSED2009-05 {
+//UNUSED2009-05 rDffStrm >> *this;
+//UNUSED2009-05 }
void XclImpSolverContainer::InsertSdrObjectInfo( SdrObject& rSdrObj, sal_uInt32 nDffShapeId, sal_uInt32 nDffFlags )
{
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 1a3869742..f39bb1e18 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -137,23 +137,23 @@ bool XclImpAddressConverter::ConvertRange( ScRange& rScRange,
return bValidStart;
}
-ScRange XclImpAddressConverter::CreateValidRange(
- const XclRange& rXclRange, SCTAB nScTab1, SCTAB nScTab2, bool bWarn )
-{
- return ScRange(
- CreateValidAddress( rXclRange.maFirst, nScTab1, bWarn ),
- CreateValidAddress( rXclRange.maLast, nScTab2, bWarn ) );
-}
+//UNUSED2009-05 ScRange XclImpAddressConverter::CreateValidRange(
+//UNUSED2009-05 const XclRange& rXclRange, SCTAB nScTab1, SCTAB nScTab2, bool bWarn )
+//UNUSED2009-05 {
+//UNUSED2009-05 return ScRange(
+//UNUSED2009-05 CreateValidAddress( rXclRange.maFirst, nScTab1, bWarn ),
+//UNUSED2009-05 CreateValidAddress( rXclRange.maLast, nScTab2, bWarn ) );
+//UNUSED2009-05 }
// cell range list ------------------------------------------------------------
-bool XclImpAddressConverter::CheckRangeList( const XclRangeList& rXclRanges, bool bWarn )
-{
- for( XclRangeList::const_iterator aIt = rXclRanges.begin(), aEnd = rXclRanges.end(); aIt != aEnd; ++aIt )
- if( !CheckRange( *aIt, bWarn ) )
- return false;
- return true;
-}
+//UNUSED2009-05 bool XclImpAddressConverter::CheckRangeList( const XclRangeList& rXclRanges, bool bWarn )
+//UNUSED2009-05 {
+//UNUSED2009-05 for( XclRangeList::const_iterator aIt = rXclRanges.begin(), aEnd = rXclRanges.end(); aIt != aEnd; ++aIt )
+//UNUSED2009-05 if( !CheckRange( *aIt, bWarn ) )
+//UNUSED2009-05 return false;
+//UNUSED2009-05 return true;
+//UNUSED2009-05 }
void XclImpAddressConverter::ConvertRangeList( ScRangeList& rScRanges,
const XclRangeList& rXclRanges, SCTAB nScTab, bool bWarn )
@@ -254,11 +254,11 @@ EditTextObject* XclImpStringHelper::CreateTextObject(
return lclCreateTextObject( rRoot, rString, EXC_FONTITEM_EDITENG, 0 );
}
-EditTextObject* XclImpStringHelper::CreateNoteObject(
- const XclImpRoot& rRoot, const XclImpString& rString )
-{
- return lclCreateTextObject( rRoot, rString, EXC_FONTITEM_NOTE, 0 );
-}
+//UNUSED2009-05 EditTextObject* XclImpStringHelper::CreateNoteObject(
+//UNUSED2009-05 const XclImpRoot& rRoot, const XclImpString& rString )
+//UNUSED2009-05 {
+//UNUSED2009-05 return lclCreateTextObject( rRoot, rString, EXC_FONTITEM_NOTE, 0 );
+//UNUSED2009-05 }
ScBaseCell* XclImpStringHelper::CreateCell(
const XclImpRoot& rRoot, const XclImpString& rString, sal_uInt16 nXFIndex )
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 2c2426382..9033ecc12 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -206,20 +206,20 @@ public:
private:
/** Returns the specified SUPBOOK (external document). */
const XclImpSupbook* GetSupbook( sal_uInt32 nXtiIndex ) const;
- /** Returns the SUPBOOK (external workbook) specified by its URL. */
- const XclImpSupbook* GetSupbook( const String& rUrl ) const;
+//UNUSED2009-05 /** Returns the SUPBOOK (external workbook) specified by its URL. */
+//UNUSED2009-05 const XclImpSupbook* GetSupbook( const String& rUrl ) const;
void LoadCachedValues();
- /** Finds the largest range of sheet indexes in a SUPBOOK after a start sheet index.
- @param rnSBTabFirst (out-param) The first sheet index of the range in SUPBOOK is returned here.
- @param rnSBTabLast (out-param) The last sheet index of the range in SUPBOOK is returned here (inclusive).
- @param nSupbook The list index of the SUPBOOK.
- @param nSBTabStart The first allowed sheet index. Sheet ranges with an earlier start index are ignored.
- @return true = the return values are valid; false = nothing found. */
- bool FindNextTabRange(
- sal_uInt16& rnSBTabFirst, sal_uInt16& rnSBTabLast,
- sal_uInt16 nSupbook, sal_uInt16 nSBTabStart ) const;
+//UNUSED2009-05 /** Finds the largest range of sheet indexes in a SUPBOOK after a start sheet index.
+//UNUSED2009-05 @param rnSBTabFirst (out-param) The first sheet index of the range in SUPBOOK is returned here.
+//UNUSED2009-05 @param rnSBTabLast (out-param) The last sheet index of the range in SUPBOOK is returned here (inclusive).
+//UNUSED2009-05 @param nSupbook The list index of the SUPBOOK.
+//UNUSED2009-05 @param nSBTabStart The first allowed sheet index. Sheet ranges with an earlier start index are ignored.
+//UNUSED2009-05 @return true = the return values are valid; false = nothing found. */
+//UNUSED2009-05 bool FindNextTabRange(
+//UNUSED2009-05 sal_uInt16& rnSBTabFirst, sal_uInt16& rnSBTabLast,
+//UNUSED2009-05 sal_uInt16 nSupbook, sal_uInt16 nSBTabStart ) const;
private:
typedef ScfDelList< XclImpXti > XclImpXtiList;
@@ -677,13 +677,13 @@ const XclImpSupbook* XclImpLinkManagerImpl::GetSupbook( sal_uInt32 nXtiIndex ) c
return pXti ? maSupbookList.GetObject( pXti->mnSupbook ) : 0;
}
-const XclImpSupbook* XclImpLinkManagerImpl::GetSupbook( const String& rUrl ) const
-{
- for( const XclImpSupbook* pSupbook = maSupbookList.First(); pSupbook; pSupbook = maSupbookList.Next() )
- if( pSupbook->GetXclUrl() == rUrl )
- return pSupbook;
- return 0;
-}
+//UNUSED2009-05 const XclImpSupbook* XclImpLinkManagerImpl::GetSupbook( const String& rUrl ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 for( const XclImpSupbook* pSupbook = maSupbookList.First(); pSupbook; pSupbook = maSupbookList.Next() )
+//UNUSED2009-05 if( pSupbook->GetXclUrl() == rUrl )
+//UNUSED2009-05 return pSupbook;
+//UNUSED2009-05 return 0;
+//UNUSED2009-05 }
void XclImpLinkManagerImpl::LoadCachedValues()
{
@@ -698,21 +698,21 @@ void XclImpLinkManagerImpl::LoadCachedValues()
}
}
-bool XclImpLinkManagerImpl::FindNextTabRange(
- sal_uInt16& rnSBTabFirst, sal_uInt16& rnSBTabLast,
- sal_uInt16 nSupbook, sal_uInt16 nSBTabStart ) const
-{
- rnSBTabFirst = rnSBTabLast = EXC_NOTAB;
- for( const XclImpXti* pXti = maXtiList.First(); pXti; pXti = maXtiList.Next() )
- {
- if( (nSupbook == pXti->mnSupbook) && (nSBTabStart <= pXti->mnSBTabLast) && (pXti->mnSBTabFirst < rnSBTabFirst) )
- {
- rnSBTabFirst = ::std::max( nSBTabStart, pXti->mnSBTabFirst );
- rnSBTabLast = pXti->mnSBTabLast;
- }
- }
- return rnSBTabFirst != EXC_NOTAB;
-}
+//UNUSED2009-05 bool XclImpLinkManagerImpl::FindNextTabRange(
+//UNUSED2009-05 sal_uInt16& rnSBTabFirst, sal_uInt16& rnSBTabLast,
+//UNUSED2009-05 sal_uInt16 nSupbook, sal_uInt16 nSBTabStart ) const
+//UNUSED2009-05 {
+//UNUSED2009-05 rnSBTabFirst = rnSBTabLast = EXC_NOTAB;
+//UNUSED2009-05 for( const XclImpXti* pXti = maXtiList.First(); pXti; pXti = maXtiList.Next() )
+//UNUSED2009-05 {
+//UNUSED2009-05 if( (nSupbook == pXti->mnSupbook) && (nSBTabStart <= pXti->mnSBTabLast) && (pXti->mnSBTabFirst < rnSBTabFirst) )
+//UNUSED2009-05 {
+//UNUSED2009-05 rnSBTabFirst = ::std::max( nSBTabStart, pXti->mnSBTabFirst );
+//UNUSED2009-05 rnSBTabLast = pXti->mnSBTabLast;
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 return rnSBTabFirst != EXC_NOTAB;
+//UNUSED2009-05 }
// ============================================================================
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index 4e5bf9b75..401f135b3 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -471,11 +471,11 @@ void XclFontData::SetApiFamily( sal_Int16 nApiFamily )
}
}
-void XclFontData::SetApiFontEncoding( sal_Int16 nApiFontEnc )
-{
- // API constants are equal to rtl_TextEncoding constants
- SetFontEncoding( static_cast< rtl_TextEncoding >( nApiFontEnc ) );
-}
+//UNUSED2009-05 void XclFontData::SetApiFontEncoding( sal_Int16 nApiFontEnc )
+//UNUSED2009-05 {
+//UNUSED2009-05 // API constants are equal to rtl_TextEncoding constants
+//UNUSED2009-05 SetFontEncoding( static_cast< rtl_TextEncoding >( nApiFontEnc ) );
+//UNUSED2009-05 }
void XclFontData::SetApiPosture( Awt::FontSlant eApiPosture )
{
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index c56bc1f4b..e668114c7 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -149,7 +149,6 @@ protected:
public:
inline ExcBoolRecord( const BOOL bDefault ) : bVal( bDefault ) {}
- ExcBoolRecord( SfxItemSet*, USHORT nWhich, BOOL bDefault );
virtual sal_Size GetLen( void ) const;
};
diff --git a/sc/source/filter/inc/op.h b/sc/source/filter/inc/op.h
index feffa9ba5..646a592eb 100644
--- a/sc/source/filter/inc/op.h
+++ b/sc/source/filter/inc/op.h
@@ -42,7 +42,7 @@ void OP_EOF( SvStream &aStream, USHORT nLaenge );
void OP_Integer( SvStream &aStream, USHORT nLaenge );
void OP_Number( SvStream &aStream, USHORT nLaenge );
void OP_Label( SvStream &aStream, USHORT nLaenge );
-void OP_Text( SvStream &aStream, USHORT nLaenge ); // WK3
+//UNUSED2009-05 void OP_Text( SvStream &aStream, USHORT nLaenge ); // WK3
void OP_Integer3( SvStream &aStream, USHORT nLaenge ); // WK3
void OP_Number3( SvStream &aStream, USHORT nLaenge ); // WK3
void OP_Formula( SvStream &aStream, USHORT nLaenge );
diff --git a/sc/source/filter/inc/qpro.hxx b/sc/source/filter/inc/qpro.hxx
index 0db26b9c2..a9b1c6195 100644
--- a/sc/source/filter/inc/qpro.hxx
+++ b/sc/source/filter/inc/qpro.hxx
@@ -48,7 +48,6 @@ class ScQProReader : public ScBiffReader
{
public:
bool recordsLeft();
- bool IsEndOfFile();
void SetEof( bool bValue ){ mbEndOfFile = bValue; }
bool nextRecord();
sal_uInt16 getId() { return mnId; }
diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx
index e201eceeb..e11c2807d 100644
--- a/sc/source/filter/inc/tokstack.hxx
+++ b/sc/source/filter/inc/tokstack.hxx
@@ -179,7 +179,7 @@ class TokenPool
void GrowString( void );
void GrowDouble( void );
- void GrowError( void );
+//UNUSED2009-05 void GrowError( void );
void GrowTripel( void );
void GrowId( void );
void GrowElement( void );
diff --git a/sc/source/filter/inc/xelink.hxx b/sc/source/filter/inc/xelink.hxx
index 82067f271..7da521f70 100644
--- a/sc/source/filter/inc/xelink.hxx
+++ b/sc/source/filter/inc/xelink.hxx
@@ -84,8 +84,8 @@ public:
/** Returns the Calc sheet index of the nSortedTab-th entry in the sorted sheet names list. */
SCTAB GetRealScTab( SCTAB nSortedScTab ) const;
- /** Returns the index of the passed Calc sheet in the sorted sheet names list. */
- SCTAB GetSortedScTab( SCTAB nScTab ) const;
+//UNUSED2009-05 /** Returns the index of the passed Calc sheet in the sorted sheet names list. */
+//UNUSED2009-05 SCTAB GetSortedScTab( SCTAB nScTab ) const;
/** Returns the number of Calc sheets. */
inline SCTAB GetScTabCount() const { return mnScCnt; }
diff --git a/sc/source/filter/inc/xename.hxx b/sc/source/filter/inc/xename.hxx
index e2cfb1535..1c6f5e32b 100644
--- a/sc/source/filter/inc/xename.hxx
+++ b/sc/source/filter/inc/xename.hxx
@@ -56,8 +56,8 @@ public:
/** Inserts the Calc database range with the passed index and returns the Excel NAME index. */
sal_uInt16 InsertDBRange( USHORT nScDBRangeIdx );
- /** Inserts a new built-in defined name. */
- sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab );
+//UNUSED2009-05 /** Inserts a new built-in defined name. */
+//UNUSED2009-05 sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab );
/** Inserts a new built-in defined name, referring to the passed sheet range. */
sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, const ScRange& rRange );
/** Inserts a new built-in defined name, referring to the passed sheet range list. */
diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx
index 48fdf16ba..32ba1a050 100644
--- a/sc/source/filter/inc/xepivot.hxx
+++ b/sc/source/filter/inc/xepivot.hxx
@@ -198,8 +198,8 @@ public:
sal_uInt16 GetFieldCount() const;
/** Returns the specified pivot cache field. */
const XclExpPCField* GetField( sal_uInt16 nFieldIdx ) const;
- /** Returns a pivot cache field by its name. */
- const XclExpPCField* GetField( const String& rFieldName ) const;
+//UNUSED2009-05 /** Returns a pivot cache field by its name. */
+//UNUSED2009-05 const XclExpPCField* GetField( const String& rFieldName ) const;
/** Returns true, if this pivot cache contains non-standard fields (e.g. grouping fields). */
bool HasAddFields() const;
@@ -301,8 +301,8 @@ public:
/** Returns the index of the last inserted data info struct. */
sal_uInt16 GetLastDataInfoIndex() const;
- /** Returns an item by its name. */
- const XclExpPTItem* GetItem( const String& rName ) const;
+//UNUSED2009-05 /** Returns an item by its name. */
+//UNUSED2009-05 const XclExpPTItem* GetItem( const String& rName ) const;
/** Returns the list index of an item by its name.
@param nDefaultIdx This value will be returned, if the item could not be found. */
sal_uInt16 GetItemIndex( const String& rName, sal_uInt16 nDefaultIdx ) const;
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index 3da59d290..2beb423bf 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -409,23 +409,23 @@ private:
// ----------------------------------------------------------------------------
-/** Represents a BOOLERR record that describes a cell with an error code. */
-class XclExpErrorCell : public XclExpSingleCellBase
-{
- DECL_FIXEDMEMPOOL_NEWDEL( XclExpErrorCell )
-
-public:
- explicit XclExpErrorCell( const XclExpRoot rRoot, const XclAddress& rXclPos,
- const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
- sal_uInt8 nErrCode );
-
- virtual void SaveXml( XclExpXmlStream& rStrm );
-private:
- virtual void WriteContents( XclExpStream& rStrm );
-
-private:
- sal_uInt8 mnErrCode; /// The error code.
-};
+//UNUSED2009-05 /** Represents a BOOLERR record that describes a cell with an error code. */
+//UNUSED2009-05 class XclExpErrorCell : public XclExpSingleCellBase
+//UNUSED2009-05 {
+//UNUSED2009-05 DECL_FIXEDMEMPOOL_NEWDEL( XclExpErrorCell )
+//UNUSED2009-05
+//UNUSED2009-05 public:
+//UNUSED2009-05 explicit XclExpErrorCell( const XclExpRoot rRoot, const XclAddress& rXclPos,
+//UNUSED2009-05 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
+//UNUSED2009-05 sal_uInt8 nErrCode );
+//UNUSED2009-05
+//UNUSED2009-05 virtual void SaveXml( XclExpXmlStream& rStrm );
+//UNUSED2009-05 private:
+//UNUSED2009-05 virtual void WriteContents( XclExpStream& rStrm );
+//UNUSED2009-05
+//UNUSED2009-05 private:
+//UNUSED2009-05 sal_uInt8 mnErrCode; /// The error code.
+//UNUSED2009-05 };
// ----------------------------------------------------------------------------
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index 5fd785992..c9d2daa6b 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -917,8 +917,8 @@ private:
class XclImpSolverContainer : public SvxMSDffSolverContainer
{
public:
- /** Reads the entire solver container. Stream must point to begin of container header. */
- void ReadSolverContainer( SvStream& rDffStrm );
+//UNUSED2009-05 /** Reads the entire solver container. Stream must point to begin of container header. */
+//UNUSED2009-05 void ReadSolverContainer( SvStream& rDffStrm );
/** Inserts information about a new SdrObject. */
void InsertSdrObjectInfo( SdrObject& rSdrObj, sal_uInt32 nDffShapeId, sal_uInt32 nDffFlags );
diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx
index 9cc94174d..a99c74991 100644
--- a/sc/source/filter/inc/xihelper.hxx
+++ b/sc/source/filter/inc/xihelper.hxx
@@ -89,24 +89,24 @@ public:
bool ConvertRange( ScRange& rScRange, const XclRange& rXclRange,
SCTAB nScTab1, SCTAB nScTab2, bool bWarn );
- /** Returns a valid cell range by moving it into allowed dimensions.
- @descr The start and/or end position of the range may be modified.
- @param rXclRange The Excel cell range to convert.
- @param bWarn true = Sets the internal flag that produces a warning box
- after loading/saving the file, if the cell range contains invalid cells.
- @return The converted Calc cell range. */
- ScRange CreateValidRange( const XclRange& rXclRange,
- SCTAB nScTab1, SCTAB nScTab2, bool bWarn );
+//UNUSED2009-05 /** Returns a valid cell range by moving it into allowed dimensions.
+//UNUSED2009-05 @descr The start and/or end position of the range may be modified.
+//UNUSED2009-05 @param rXclRange The Excel cell range to convert.
+//UNUSED2009-05 @param bWarn true = Sets the internal flag that produces a warning box
+//UNUSED2009-05 after loading/saving the file, if the cell range contains invalid cells.
+//UNUSED2009-05 @return The converted Calc cell range. */
+//UNUSED2009-05 ScRange CreateValidRange( const XclRange& rXclRange,
+//UNUSED2009-05 SCTAB nScTab1, SCTAB nScTab2, bool bWarn );
// cell range list --------------------------------------------------------
- /** Checks if the passed cell range list is valid.
- @param rXclRanges The Excel cell range list to check.
- @param bWarn true = Sets the internal flag that produces a warning box
- after loading/saving the file, if the cell range list contains at
- least one invalid range.
- @return true = Cell range list in rScRanges is completly valid. */
- bool CheckRangeList( const XclRangeList& rXclRanges, bool bWarn );
+//UNUSED2009-05 /** Checks if the passed cell range list is valid.
+//UNUSED2009-05 @param rXclRanges The Excel cell range list to check.
+//UNUSED2009-05 @param bWarn true = Sets the internal flag that produces a warning box
+//UNUSED2009-05 after loading/saving the file, if the cell range list contains at
+//UNUSED2009-05 least one invalid range.
+//UNUSED2009-05 @return true = Cell range list in rScRanges is completly valid. */
+//UNUSED2009-05 bool CheckRangeList( const XclRangeList& rXclRanges, bool bWarn );
/** Converts the passed Excel cell range list to a Calc cell range list.
@descr The start position of the ranges will not be modified. Cell
@@ -139,11 +139,11 @@ public:
const XclImpRoot& rRoot,
const XclImpString& rString );
- /** Returns a new edit engine text object for a cell note.
- @param nXFIndex Index to XF for first text portion (for escapement). */
- static EditTextObject* CreateNoteObject(
- const XclImpRoot& rRoot,
- const XclImpString& rString );
+//UNUSED2009-05 /** Returns a new edit engine text object for a cell note.
+//UNUSED2009-05 @param nXFIndex Index to XF for first text portion (for escapement). */
+//UNUSED2009-05 static EditTextObject* CreateNoteObject(
+//UNUSED2009-05 const XclImpRoot& rRoot,
+//UNUSED2009-05 const XclImpString& rString );
/** Creates a new text cell or edit cell for a Calc document.
@param nXFIndex Index to XF for first text portion (for escapement). */
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index 303da212d..9d02f0720 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -372,8 +372,8 @@ struct XclFontData
void SetApiHeight( float fPoint );
/** Sets the API font family. */
void SetApiFamily( sal_Int16 nApiFamily );
- /** Sets the API font text encoding. */
- void SetApiFontEncoding( sal_Int16 nApiFontEnc );
+//UNUSED2009-05 /** Sets the API font text encoding. */
+//UNUSED2009-05 void SetApiFontEncoding( sal_Int16 nApiFontEnc );
/** Sets the API font posture. */
void SetApiPosture( ::com::sun::star::awt::FontSlant eApiPosture );
/** Sets the API font weight. */
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index c5132d07e..028993bd4 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -171,20 +171,20 @@ void OP_Label( SvStream& r, UINT16 n )
}
-void OP_Text( SvStream& r, UINT16 n ) // WK3
-{
- UINT16 nRow;
- BYTE nCol, nTab;
- sal_Char pText[ 256 ];
-
- r >> nRow >> nTab >> nCol;
- n -= 4;
-
- r.Read( pText, n );
- pText[ n ] = 0; // zur Sicherheit Nullterminator anhaengen
-
- PutFormString( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), static_cast<SCTAB> (nTab), pText );
-}
+//UNUSED2009-05 void OP_Text( SvStream& r, UINT16 n ) // WK3
+//UNUSED2009-05 {
+//UNUSED2009-05 UINT16 nRow;
+//UNUSED2009-05 BYTE nCol, nTab;
+//UNUSED2009-05 sal_Char pText[ 256 ];
+//UNUSED2009-05
+//UNUSED2009-05 r >> nRow >> nTab >> nCol;
+//UNUSED2009-05 n -= 4;
+//UNUSED2009-05
+//UNUSED2009-05 r.Read( pText, n );
+//UNUSED2009-05 pText[ n ] = 0; // zur Sicherheit Nullterminator anhaengen
+//UNUSED2009-05
+//UNUSED2009-05 PutFormString( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), static_cast<SCTAB> (nTab), pText );
+//UNUSED2009-05 }
void OP_Formula( SvStream& r, UINT16 /*n*/ )
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index fe12ba2f1..df1a0d614 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -217,12 +217,6 @@ bool ScQProReader::recordsLeft()
return bValue;
}
-bool ScQProReader::IsEndOfFile()
-{
- bool bValue = ScBiffReader::mbEndOfFile;
- return bValue;
-}
-
bool ScQProReader::nextRecord()
{
bool bValue = ScBiffReader::nextRecord();
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 34d53c998..6664ba58d 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1906,40 +1906,40 @@ ScShapeChilds* ScAccessibleDocumentPagePreview::GetShapeChilds()
return mpShapeChilds;
}
-uno::Reference < XAccessible > ScAccessibleDocumentPagePreview::GetCurrentAccessibleTable()
-{
- if (!mpTable)
- {
- if ( mpViewShell )
- {
- const ScPreviewLocationData& rData = mpViewShell->GetLocationData();
- ScPagePreviewCountData aCount( rData, mpViewShell->GetWindow(), GetNotesChilds(), GetShapeChilds() );
- //! order is background shapes, header, table or notes, footer, foreground shapes, controls
- sal_Int32 nIndex (aCount.nBackShapes + aCount.nHeaders);
-
- mpTable = new ScAccessiblePreviewTable( this, mpViewShell, nIndex );
- mpTable->acquire();
- mpTable->Init();
- }
- }
- return mpTable;
-}
-
-void ScAccessibleDocumentPagePreview::ChildCountChanged()
-{
- if (mpViewShell)
- {
- const ScPreviewLocationData& rData = mpViewShell->GetLocationData();
- ScPagePreviewCountData aCount( rData, mpViewShell->GetWindow(), GetNotesChilds(), GetShapeChilds() );
- //! order is background shapes, header, table or notes, footer, foreground shapes, controls
- if(mpHeader)
- mpHeader->SetCurrentIndexInParent(aCount.nBackShapes);
- if (mpTable)
- mpTable->SetCurrentIndexInParent(aCount.nBackShapes + aCount.nHeaders);
- if (mpFooter)
- mpFooter->SetCurrentIndexInParent(aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs);
-
- if (mpNotesChilds)
- mpNotesChilds->SetOffset(aCount.nBackShapes + aCount.nHeaders);
- }
-}
+//UNUSED2009-05 uno::Reference < XAccessible > ScAccessibleDocumentPagePreview::GetCurrentAccessibleTable()
+//UNUSED2009-05 {
+//UNUSED2009-05 if (!mpTable)
+//UNUSED2009-05 {
+//UNUSED2009-05 if ( mpViewShell )
+//UNUSED2009-05 {
+//UNUSED2009-05 const ScPreviewLocationData& rData = mpViewShell->GetLocationData();
+//UNUSED2009-05 ScPagePreviewCountData aCount( rData, mpViewShell->GetWindow(), GetNotesChilds(), GetShapeChilds() );
+//UNUSED2009-05 //! order is background shapes, header, table or notes, footer, foreground shapes, controls
+//UNUSED2009-05 sal_Int32 nIndex (aCount.nBackShapes + aCount.nHeaders);
+//UNUSED2009-05
+//UNUSED2009-05 mpTable = new ScAccessiblePreviewTable( this, mpViewShell, nIndex );
+//UNUSED2009-05 mpTable->acquire();
+//UNUSED2009-05 mpTable->Init();
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 return mpTable;
+//UNUSED2009-05 }
+
+//UNUSED2009-05 void ScAccessibleDocumentPagePreview::ChildCountChanged()
+//UNUSED2009-05 {
+//UNUSED2009-05 if (mpViewShell)
+//UNUSED2009-05 {
+//UNUSED2009-05 const ScPreviewLocationData& rData = mpViewShell->GetLocationData();
+//UNUSED2009-05 ScPagePreviewCountData aCount( rData, mpViewShell->GetWindow(), GetNotesChilds(), GetShapeChilds() );
+//UNUSED2009-05 //! order is background shapes, header, table or notes, footer, foreground shapes, controls
+//UNUSED2009-05 if(mpHeader)
+//UNUSED2009-05 mpHeader->SetCurrentIndexInParent(aCount.nBackShapes);
+//UNUSED2009-05 if (mpTable)
+//UNUSED2009-05 mpTable->SetCurrentIndexInParent(aCount.nBackShapes + aCount.nHeaders);
+//UNUSED2009-05 if (mpFooter)
+//UNUSED2009-05 mpFooter->SetCurrentIndexInParent(aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs);
+//UNUSED2009-05
+//UNUSED2009-05 if (mpNotesChilds)
+//UNUSED2009-05 mpNotesChilds->SetOffset(aCount.nBackShapes + aCount.nHeaders);
+//UNUSED2009-05 }
+//UNUSED2009-05 }
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index d80f72938..c2c9f4a3d 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -42,16 +42,16 @@
// ============================================================================
-ScCsvTableBox::ScCsvTableBox( Window* pParent ) :
- ScCsvControl( pParent, maData, WB_BORDER | WB_TABSTOP | WB_DIALOGCONTROL ),
- maRuler( *this ),
- maGrid( *this ),
- maHScroll( this, WB_HORZ | WB_DRAG ),
- maVScroll( this, WB_VERT | WB_DRAG ),
- maScrollBox( this )
-{
- Init();
-}
+//UNUSED2009-05 ScCsvTableBox::ScCsvTableBox( Window* pParent ) :
+//UNUSED2009-05 ScCsvControl( pParent, maData, WB_BORDER | WB_TABSTOP | WB_DIALOGCONTROL ),
+//UNUSED2009-05 maRuler( *this ),
+//UNUSED2009-05 maGrid( *this ),
+//UNUSED2009-05 maHScroll( this, WB_HORZ | WB_DRAG ),
+//UNUSED2009-05 maVScroll( this, WB_VERT | WB_DRAG ),
+//UNUSED2009-05 maScrollBox( this )
+//UNUSED2009-05 {
+//UNUSED2009-05 Init();
+//UNUSED2009-05 }
ScCsvTableBox::ScCsvTableBox( Window* pParent, const ResId& rResId ) :
ScCsvControl( pParent, maData, rResId ),
@@ -225,24 +225,24 @@ void ScCsvTableBox::SetUniStrings(
EnableRepaint();
}
-void ScCsvTableBox::SetByteStrings(
- const ByteString* pTextLines, CharSet eCharSet,
- const String& rSepChars, sal_Unicode cTextSep, bool bMergeSep )
-{
- // assuming that pTextLines is a string array with size CSV_PREVIEW_LINES
- // -> will be dynamic sometime
- DisableRepaint();
- sal_Int32 nEndLine = GetFirstVisLine() + CSV_PREVIEW_LINES;
- const ByteString* pString = pTextLines;
- for( sal_Int32 nLine = GetFirstVisLine(); nLine < nEndLine; ++nLine, ++pString )
- {
- if( mbFixedMode )
- maGrid.ImplSetTextLineFix( nLine, String( *pString, eCharSet ) );
- else
- maGrid.ImplSetTextLineSep( nLine, String( *pString, eCharSet ), rSepChars, cTextSep, bMergeSep );
- }
- EnableRepaint();
-}
+//UNUSED2009-05 void ScCsvTableBox::SetByteStrings(
+//UNUSED2009-05 const ByteString* pTextLines, CharSet eCharSet,
+//UNUSED2009-05 const String& rSepChars, sal_Unicode cTextSep, bool bMergeSep )
+//UNUSED2009-05 {
+//UNUSED2009-05 // assuming that pTextLines is a string array with size CSV_PREVIEW_LINES
+//UNUSED2009-05 // -> will be dynamic sometime
+//UNUSED2009-05 DisableRepaint();
+//UNUSED2009-05 sal_Int32 nEndLine = GetFirstVisLine() + CSV_PREVIEW_LINES;
+//UNUSED2009-05 const ByteString* pString = pTextLines;
+//UNUSED2009-05 for( sal_Int32 nLine = GetFirstVisLine(); nLine < nEndLine; ++nLine, ++pString )
+//UNUSED2009-05 {
+//UNUSED2009-05 if( mbFixedMode )
+//UNUSED2009-05 maGrid.ImplSetTextLineFix( nLine, String( *pString, eCharSet ) );
+//UNUSED2009-05 else
+//UNUSED2009-05 maGrid.ImplSetTextLineSep( nLine, String( *pString, eCharSet ), rSepChars, cTextSep, bMergeSep );
+//UNUSED2009-05 }
+//UNUSED2009-05 EnableRepaint();
+//UNUSED2009-05 }
// column settings ------------------------------------------------------------
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 9979601fc..ba0276b97 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2766,42 +2766,42 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ )
return TRUE;
}
-BOOL ScDocFunc::SetGrammar( formula::FormulaGrammar::Grammar eGrammar )
-{
- ScDocument* pDoc = rDocShell.GetDocument();
-
- if ( pDoc->GetGrammar() == eGrammar )
- return TRUE;
-
- BOOL bUndo(pDoc->IsUndoEnabled());
- ScDocShellModificator aModificator( rDocShell );
-
- pDoc->SetGrammar( eGrammar );
-
- if (bUndo)
- {
- rDocShell.GetUndoManager()->AddUndoAction( new ScUndoSetGrammar( &rDocShell, eGrammar ) );
- }
-
- rDocShell.PostPaint( 0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_ALL );
-
- ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
- if (NULL != pViewSh)
- {
- pViewSh->UpdateInputHandler( FALSE, FALSE );
- }
-
- aModificator.SetDocumentModified();
-
- SfxBindings* pBindings = rDocShell.GetViewBindings();
- if (pBindings)
- {
- // erAck: 2006-09-07T22:19+0200 commented out in CWS scr1c1
- //pBindings->Invalidate( FID_TAB_USE_R1C1 );
- }
-
- return TRUE;
-}
+//UNUSED2009-05 BOOL ScDocFunc::SetGrammar( formula::FormulaGrammar::Grammar eGrammar )
+//UNUSED2009-05 {
+//UNUSED2009-05 ScDocument* pDoc = rDocShell.GetDocument();
+//UNUSED2009-05
+//UNUSED2009-05 if ( pDoc->GetGrammar() == eGrammar )
+//UNUSED2009-05 return TRUE;
+//UNUSED2009-05
+//UNUSED2009-05 BOOL bUndo(pDoc->IsUndoEnabled());
+//UNUSED2009-05 ScDocShellModificator aModificator( rDocShell );
+//UNUSED2009-05
+//UNUSED2009-05 pDoc->SetGrammar( eGrammar );
+//UNUSED2009-05
+//UNUSED2009-05 if (bUndo)
+//UNUSED2009-05 {
+//UNUSED2009-05 rDocShell.GetUndoManager()->AddUndoAction( new ScUndoSetGrammar( &rDocShell, eGrammar ) );
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 rDocShell.PostPaint( 0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_ALL );
+//UNUSED2009-05
+//UNUSED2009-05 ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
+//UNUSED2009-05 if (NULL != pViewSh)
+//UNUSED2009-05 {
+//UNUSED2009-05 pViewSh->UpdateInputHandler( FALSE, FALSE );
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 aModificator.SetDocumentModified();
+//UNUSED2009-05
+//UNUSED2009-05 SfxBindings* pBindings = rDocShell.GetViewBindings();
+//UNUSED2009-05 if (pBindings)
+//UNUSED2009-05 {
+//UNUSED2009-05 // erAck: 2006-09-07T22:19+0200 commented out in CWS scr1c1
+//UNUSED2009-05 //pBindings->Invalidate( FID_TAB_USE_R1C1 );
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 return TRUE;
+//UNUSED2009-05 }
BOOL ScDocFunc::RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi )
{
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index dd8e60988..ee0276a9d 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -440,13 +440,6 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
aDocument.EnableUndo( bIsUndoEnabled );
}
-#if OLD_PIVOT_IMPLEMENTATION
-void ScDocShell::PivotUpdate( ScPivot*, ScPivot*, BOOL, BOOL )
-{
- DBG_ERRORFILE("PivotUpdate is obsolete!");
-}
-#endif
-
void ScDocShell::RefreshPivotTables( const ScRange& rSource )
{
//! rename to RefreshDataPilotTables?
diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx
index ca8808079..c419c2114 100644
--- a/sc/source/ui/formdlg/privsplt.cxx
+++ b/sc/source/ui/formdlg/privsplt.cxx
@@ -232,24 +232,6 @@ void ScPrivatSplit::MouseMove( const MouseEvent& rMEvt )
}
/*************************************************************************
-#* Member: SetXRange Datum:14.10.97
-#*------------------------------------------------------------------------
-#*
-#* Klasse: ScPrivatSplit
-#*
-#* Funktion: Setzt den Range fuer die X- Verschiebung
-#*
-#* Input: neuer Bereich
-#*
-#* Output: ---
-#*
-#************************************************************************/
-void ScPrivatSplit::SetXRange(Range cRgeX)
-{
- aXMovingRange=cRgeX;
-}
-
-/*************************************************************************
#* Member: SetYRange Datum:14.10.97
#*------------------------------------------------------------------------
#*
diff --git a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
index 095b296c0..91b41c449 100644
--- a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
+++ b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
@@ -116,10 +116,10 @@ public:
///===== internal ========================================================
- com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible >
- GetCurrentAccessibleTable();
+//UNUSED2009-05 com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible >
+//UNUSED2009-05 GetCurrentAccessibleTable();
- void ChildCountChanged();
+//UNUSED2009-05 void ChildCountChanged();
protected:
/// Return this object's description.
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index cd052f50d..d912d670f 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -128,7 +128,6 @@ private:
protected:
virtual BOOL DoClose( USHORT nId );
- void EnableSpreadsheets( BOOL bFlag = TRUE, BOOL bChilds = TRUE );
void SetDispatcherLock( BOOL bLock );
virtual long PreNotify( NotifyEvent& rNEvt );
diff --git a/sc/source/ui/inc/csvtablebox.hxx b/sc/source/ui/inc/csvtablebox.hxx
index 95eecf170..8850d7ee7 100644
--- a/sc/source/ui/inc/csvtablebox.hxx
+++ b/sc/source/ui/inc/csvtablebox.hxx
@@ -77,7 +77,7 @@ private:
// ------------------------------------------------------------------------
public:
- explicit ScCsvTableBox( Window* pParent );
+//UNUSED2009-05 explicit ScCsvTableBox( Window* pParent );
explicit ScCsvTableBox( Window* pParent, const ResId& rResId );
// common table box handling ----------------------------------------------
@@ -112,10 +112,10 @@ public:
void SetUniStrings(
const String* pTextLines, const String& rSepChars,
sal_Unicode cTextSep, bool bMergeSep );
- /** Fills all cells of all lines with the passed texts (ByteStrings). */
- void SetByteStrings(
- const ByteString* pLineTexts, CharSet eCharSet,
- const String& rSepChars, sal_Unicode cTextSep, bool bMergeSep );
+//UNUSED2009-05 /** Fills all cells of all lines with the passed texts (ByteStrings). */
+//UNUSED2009-05 void SetByteStrings(
+//UNUSED2009-05 const ByteString* pLineTexts, CharSet eCharSet,
+//UNUSED2009-05 const String& rSepChars, sal_Unicode cTextSep, bool bMergeSep );
// column settings --------------------------------------------------------
public:
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 0f851533c..b02cf98c7 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -124,7 +124,7 @@ public:
BOOL SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL bApi );
- BOOL SetGrammar( formula::FormulaGrammar::Grammar eGrammar );
+//UNUSED2009-05 BOOL SetGrammar( formula::FormulaGrammar::Grammar eGrammar );
SC_DLLPUBLIC BOOL SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
SCTAB nTab, ScSizeMode eMode, USHORT nSizeTwips,
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 572a862ec..8aa9efe54 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -59,9 +59,6 @@ class INetURLObject;
class ScPaintItem;
class ScViewData;
class ScDocFunc;
-#if OLD_PIVOT_IMPLEMENTATION
-class ScPivot;
-#endif
class ScDrawLayer;
class ScTabViewShell;
class ScSbxDocHelper;
@@ -293,10 +290,6 @@ public:
void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL );
void UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore = false );
-#if OLD_PIVOT_IMPLEMENTATION
- void PivotUpdate( ScPivot* pOldPivot, ScPivot* pNewPivot,
- BOOL bRecord = TRUE, BOOL bApi = FALSE );
-#endif
void RefreshPivotTables( const ScRange& rSource );
void DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE );
void UseScenario( SCTAB nTab, const String& rName, BOOL bRecord = TRUE );
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index dfe14fd4e..c9b4d5580 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -143,7 +143,7 @@ public:
inline void UnlockInternalLayer() { LockInternalLayer( false ); }
SdrEndTextEditKind ScEndTextEdit(); // ruft SetDrawTextUndo(0)
- void CaptionTextDirection(USHORT nSlot);
+//UNUSED2009-05 void CaptionTextDirection(USHORT nSlot);
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CopyToTransferable();
};
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 4db9ff1c6..0a6b45cbf 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -44,9 +44,6 @@
struct ScTableInfo;
class ScViewSelectionEngine;
-#if OLD_PIVOT_IMPLEMENTATION
-class ScPivot;
-#endif
class ScDPObject;
class ScOutputData;
class ScFilterListBox;
@@ -170,14 +167,6 @@ private:
BYTE nMouseStatus;
BYTE nNestedButtonState; // track nested button up/down calls
-#if OLD_PIVOT_IMPLEMENTATION
- BOOL bPivotMouse; // Pivot-D&D (alte Pivottabellen)
- ScPivot* pDragPivot;
- BOOL bPivotColField;
- SCCOL nPivotCol;
- SCCOL nPivotField;
-#endif
-
BOOL bDPMouse; // DataPilot-D&D (neue Pivottabellen)
long nDPField;
ScDPObject* pDragDPObj; //! name?
@@ -235,12 +224,6 @@ private:
BOOL DoPageFieldSelection( SCCOL nCol, SCROW nRow );
void DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
-#if OLD_PIVOT_IMPLEMENTATION
- void PivotMouseMove( const MouseEvent& rMEvt );
- void PivotMouseButtonUp( const MouseEvent& rMEvt );
- BOOL PivotTestMouse( const MouseEvent& rMEvt, BOOL bMove );
- void DoPivotDrop( BOOL bDelete, BOOL bToCols, SCSIZE nDestPos );
-#endif
void DPMouseMove( const MouseEvent& rMEvt );
void DPMouseButtonUp( const MouseEvent& rMEvt );
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 6179209f2..cf1001fec 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -244,7 +244,9 @@ public:
void FindChanged();
void SetPagebreakMode( ScPageBreakData* pPageData );
- void DrawMark( Window* pWin );
+#ifdef OLD_SELECTION_PAINT
+ void DrawMark( Window* pWin );
+#endif
void DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
const Color& rColor, BOOL bHandle );
diff --git a/sc/source/ui/inc/privsplt.hxx b/sc/source/ui/inc/privsplt.hxx
index 3e6813404..b36da36c9 100644
--- a/sc/source/ui/inc/privsplt.hxx
+++ b/sc/source/ui/inc/privsplt.hxx
@@ -73,7 +73,6 @@ class ScPrivatSplit : public Control
virtual void CtrModified();
- void SetXRange(Range cRgeX);
void SetYRange(Range cRgeY);
void MoveSplitTo(Point aPos);
diff --git a/sc/source/ui/inc/refundo.hxx b/sc/source/ui/inc/refundo.hxx
index 690135387..e1e7a6fc6 100644
--- a/sc/source/ui/inc/refundo.hxx
+++ b/sc/source/ui/inc/refundo.hxx
@@ -37,9 +37,6 @@ class ScDocument;
class ScDBCollection;
class ScRangeName;
class ScPrintRangeSaver;
-#if OLD_PIVOT_IMPLEMENTATION
-class ScPivotCollection;
-#endif
class ScDPCollection;
class ScChartCollection;
class ScConditionalFormatList;
@@ -54,9 +51,6 @@ private:
ScDBCollection* pDBCollection;
ScRangeName* pRangeName;
ScPrintRangeSaver* pPrintRanges;
-#if OLD_PIVOT_IMPLEMENTATION
- ScPivotCollection* pPivotCollection;
-#endif
ScDPCollection* pDPCollection;
ScConditionalFormatList* pCondFormList;
ScDetOpList* pDetOpList;
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index d65139f69..8e69d44fe 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -227,7 +227,7 @@ protected:
public:
ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
- ScTabView( Window* pParent, const ScTabView& rScTabView, ScTabViewShell* pViewShell );
+//UNUSED2009-05 ScTabView( Window* pParent, const ScTabView& rScTabView, ScTabViewShell* pViewShell );
~ScTabView();
void MakeDrawLayer();
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index f9e5764ca..7f18fdbb3 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -493,26 +493,26 @@ private:
};
-class ScUndoSetGrammar : public ScSimpleUndo
-{
-public:
- TYPEINFO();
- ScUndoSetGrammar( ScDocShell* pShell,
- formula::FormulaGrammar::Grammar eGrammar );
- virtual ~ScUndoSetGrammar();
-
- virtual void Undo();
- virtual void Redo();
- virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
-
- virtual String GetComment() const;
-
-private:
- formula::FormulaGrammar::Grammar meNewGrammar, meOldGrammar;
-
- void DoChange( formula::FormulaGrammar::Grammar eGrammar );
-};
+//UNUSED2009-05 class ScUndoSetGrammar : public ScSimpleUndo
+//UNUSED2009-05 {
+//UNUSED2009-05 public:
+//UNUSED2009-05 TYPEINFO();
+//UNUSED2009-05 ScUndoSetGrammar( ScDocShell* pShell,
+//UNUSED2009-05 formula::FormulaGrammar::Grammar eGrammar );
+//UNUSED2009-05 virtual ~ScUndoSetGrammar();
+//UNUSED2009-05
+//UNUSED2009-05 virtual void Undo();
+//UNUSED2009-05 virtual void Redo();
+//UNUSED2009-05 virtual void Repeat(SfxRepeatTarget& rTarget);
+//UNUSED2009-05 virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+//UNUSED2009-05
+//UNUSED2009-05 virtual String GetComment() const;
+//UNUSED2009-05
+//UNUSED2009-05 private:
+//UNUSED2009-05 formula::FormulaGrammar::Grammar meNewGrammar, meOldGrammar;
+//UNUSED2009-05
+//UNUSED2009-05 void DoChange( formula::FormulaGrammar::Grammar eGrammar );
+//UNUSED2009-05 };
#endif
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 7130f4d6b..55f0039dc 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -106,8 +106,10 @@ public:
ScUpdateRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
void SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
BOOL GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
+#ifdef OLD_SELECTION_PAINT
BOOL GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, BOOL& rCont );
- void GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
+ void GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
+#endif
};
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 76d77dbc9..73b43aa2a 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -826,11 +826,6 @@ BOOL __EXPORT ScAnyRefDlg::DoClose( USHORT nId )
return TRUE;
}
-void ScAnyRefDlg::EnableSpreadsheets(BOOL bFlag, BOOL bChilds)
-{
- m_aHelper.EnableSpreadsheets(bFlag, bChilds);
-}
-
void ScAnyRefDlg::SetDispatcherLock( BOOL bLock )
{
m_aHelper.SetDispatcherLock( bLock );
diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx
index 6d4177a82..7675338f4 100644
--- a/sc/source/ui/undo/refundo.cxx
+++ b/sc/source/ui/undo/refundo.cxx
@@ -66,10 +66,6 @@ ScRefUndoData::ScRefUndoData( const ScDocument* pDoc ) :
pPrintRanges = pDoc->CreatePrintRangeSaver(); // neu erzeugt
-#if OLD_PIVOT_IMPLEMENTATION
- ScPivotCollection* pOldPivot = pDoc->GetPivotCollection();
- pPivotCollection = pOldPivot ? new ScPivotCollection(*pOldPivot) : NULL;
-#endif
//! bei Pivot nur Bereiche merken ???
ScDPCollection* pOldDP = ((ScDocument*)pDoc)->GetDPCollection(); //! const
@@ -96,9 +92,6 @@ ScRefUndoData::~ScRefUndoData()
delete pDBCollection;
delete pRangeName;
delete pPrintRanges;
-#if OLD_PIVOT_IMPLEMENTATION
- delete pPivotCollection;
-#endif
delete pDPCollection;
delete pCondFormList;
delete pDetOpList;
@@ -130,15 +123,6 @@ void ScRefUndoData::DeleteUnchanged( const ScDocument* pDoc )
delete pNewRanges;
}
-#if OLD_PIVOT_IMPLEMENTATION
- if (pPivotCollection)
- {
- ScPivotCollection* pNewPivot = pDoc->GetPivotCollection();
- if ( pNewPivot && *pPivotCollection == *pNewPivot )
- DELETEZ(pPivotCollection);
- }
-#endif
-
if (pDPCollection)
{
ScDPCollection* pNewDP = ((ScDocument*)pDoc)->GetDPCollection(); //! const
@@ -195,11 +179,6 @@ void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst )
if (pPrintRanges)
pDoc->RestorePrintRanges(*pPrintRanges);
-#if OLD_PIVOT_IMPLEMENTATION
- if (pPivotCollection)
- pDoc->SetPivotCollection( new ScPivotCollection(*pPivotCollection) );
-#endif
-
if (pDPCollection)
{
ScDPCollection* pDocDP = pDoc->GetDPCollection();
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index af43a6777..5650376b0 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -92,7 +92,7 @@ TYPEINIT1(ScUndoPrintRange, SfxUndoAction);
TYPEINIT1(ScUndoScenarioFlags, SfxUndoAction);
TYPEINIT1(ScUndoRenameObject, SfxUndoAction);
TYPEINIT1(ScUndoLayoutRTL, SfxUndoAction);
-TYPEINIT1(ScUndoSetGrammar, SfxUndoAction);
+//UNUSED2009-05 TYPEINIT1(ScUndoSetGrammar, SfxUndoAction);
// -----------------------------------------------------------------------
@@ -1611,59 +1611,54 @@ String ScUndoLayoutRTL::GetComment() const
// Set the grammar used for the sheet
//
-ScUndoSetGrammar::ScUndoSetGrammar( ScDocShell* pShell,
- formula::FormulaGrammar::Grammar eGrammar ) :
- ScSimpleUndo( pShell ),
- meNewGrammar( eGrammar )
-{
- meOldGrammar = pDocShell->GetDocument()->GetGrammar();
-}
-
-ScUndoSetGrammar::~ScUndoSetGrammar()
-{
-}
-
-void ScUndoSetGrammar::DoChange( formula::FormulaGrammar::Grammar eGrammar )
-{
- pDocShell->SetInUndo( TRUE );
- ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->SetGrammar( eGrammar );
- pDocShell->SetDocumentModified();
- pDocShell->SetInUndo( FALSE );
-}
-
-void ScUndoSetGrammar::Undo()
-{
- DoChange( meOldGrammar );
-}
-
-void ScUndoSetGrammar::Redo()
-{
- DoChange( meNewGrammar );
-}
-
-void ScUndoSetGrammar::Repeat(SfxRepeatTarget& /* rTarget */)
-{
-#if 0
-// erAck: 2006-09-07T23:00+0200 commented out in CWS scr1c1
- if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData()->GetDispatcher().
- Execute( FID_TAB_USE_R1C1, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
-#endif
-}
-
-BOOL ScUndoSetGrammar::CanRepeat(SfxRepeatTarget& rTarget) const
-{
- return (rTarget.ISA(ScTabViewTarget));
-}
-
-String ScUndoSetGrammar::GetComment() const
-{
- return ScGlobal::GetRscString( STR_UNDO_TAB_R1C1 );
-}
-
-
-
-
-
+//UNUSED2009-05 ScUndoSetGrammar::ScUndoSetGrammar( ScDocShell* pShell,
+//UNUSED2009-05 formula::FormulaGrammar::Grammar eGrammar ) :
+//UNUSED2009-05 ScSimpleUndo( pShell ),
+//UNUSED2009-05 meNewGrammar( eGrammar )
+//UNUSED2009-05 {
+//UNUSED2009-05 meOldGrammar = pDocShell->GetDocument()->GetGrammar();
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 __EXPORT ScUndoSetGrammar::~ScUndoSetGrammar()
+//UNUSED2009-05 {
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 void ScUndoSetGrammar::DoChange( formula::FormulaGrammar::Grammar eGrammar )
+//UNUSED2009-05 {
+//UNUSED2009-05 pDocShell->SetInUndo( TRUE );
+//UNUSED2009-05 ScDocument* pDoc = pDocShell->GetDocument();
+//UNUSED2009-05 pDoc->SetGrammar( eGrammar );
+//UNUSED2009-05 pDocShell->SetDocumentModified();
+//UNUSED2009-05 pDocShell->SetInUndo( FALSE );
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 void __EXPORT ScUndoSetGrammar::Undo()
+//UNUSED2009-05 {
+//UNUSED2009-05 DoChange( meOldGrammar );
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 void __EXPORT ScUndoSetGrammar::Redo()
+//UNUSED2009-05 {
+//UNUSED2009-05 DoChange( meNewGrammar );
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 void __EXPORT ScUndoSetGrammar::Repeat(SfxRepeatTarget& /* rTarget */)
+//UNUSED2009-05 {
+//UNUSED2009-05 #if 0
+//UNUSED2009-05 // erAck: 2006-09-07T23:00+0200 commented out in CWS scr1c1
+//UNUSED2009-05 if (rTarget.ISA(ScTabViewTarget))
+//UNUSED2009-05 ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData()->GetDispatcher().
+//UNUSED2009-05 Execute( FID_TAB_USE_R1C1, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+//UNUSED2009-05 #endif
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 BOOL __EXPORT ScUndoSetGrammar::CanRepeat(SfxRepeatTarget& rTarget) const
+//UNUSED2009-05 {
+//UNUSED2009-05 return (rTarget.ISA(ScTabViewTarget));
+//UNUSED2009-05 }
+//UNUSED2009-05
+//UNUSED2009-05 String __EXPORT ScUndoSetGrammar::GetComment() const
+//UNUSED2009-05 {
+//UNUSED2009-05 return ScGlobal::GetRscString( STR_UNDO_TAB_R1C1 );
+//UNUSED2009-05 }
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index c8ad1f17f..6e8ae0a13 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -957,15 +957,6 @@ void lcl_convertTokensToString(OUString& rStr, const vector<ScSharedTokenRef>& r
func.getString(rStr);
}
-void lcl_convertTokenToString(OUString& rStr, const ScSharedTokenRef& rToken, ScDocument* pDoc,
- FormulaGrammar::Grammar eGrammar)
-{
- const sal_Unicode cRangeSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
- Tokens2RangeString func(pDoc, eGrammar, cRangeSep);
- func.operator() (rToken);
- func.getString(rStr);
-}
-
} // anonymous namespace
// DataProvider ==============================================================
@@ -995,44 +986,6 @@ void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
}
}
-void lcl_SeperateOneColumnRange(ScRange aR, const ScAddress& rPos, ScRangeListRef& xRanges)
-{
- if (aR.aStart == rPos)
- {
- aR.aStart.SetRow(aR.aStart.Row() + 1);
- xRanges->Join(aR);
- }
- else if (aR.aEnd == rPos)
- {
- aR.aStart.SetRow(aR.aStart.Row() - 1);
- xRanges->Join(aR);
- }
- else
- {
- xRanges->Join(ScRange(aR.aStart, ScAddress(rPos.Col(), rPos.Row() - 1, rPos.Tab())));
- xRanges->Join(ScRange(ScAddress(rPos.Col(), rPos.Row() + 1, rPos.Tab()), aR.aEnd ));
- }
-}
-
-void lcl_SeperateOneRowRange(ScRange aR, const ScAddress& rPos, ScRangeListRef& xRanges)
-{
- if (aR.aStart == rPos)
- {
- aR.aStart.SetCol(aR.aStart.Col() + 1);
- xRanges->Join(aR);
- }
- else if (aR.aEnd == rPos)
- {
- aR.aStart.SetCol(aR.aStart.Col() - 1);
- xRanges->Join(aR);
- }
- else
- {
- xRanges->Join(ScRange(aR.aStart, ScAddress(rPos.Col() - 1, rPos.Row(), rPos.Tab())));
- xRanges->Join(ScRange(ScAddress(rPos.Col() + 1, rPos.Row(), rPos.Tab()), aR.aEnd ));
- }
-}
-
::sal_Bool SAL_CALL ScChart2DataProvider::createDataSourcePossible( const uno::Sequence< beans::PropertyValue >& aArguments )
throw (uno::RuntimeException)
{
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 896fc134b..494b75f21 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -277,13 +277,6 @@ void ScModelObj::UpdateAllRowHeights(const ScMarkData* pTabMark)
pDocShell->UpdateAllRowHeights(pTabMark);
}
-ScDrawLayer* ScModelObj::MakeDrawLayer()
-{
- if (pDocShell)
- return pDocShell->MakeDrawLayer();
- return NULL;
-}
-
void ScModelObj::BeforeXMLLoading()
{
if (pDocShell)
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 2e41ac4ff..6d734797f 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -1235,22 +1235,6 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet )
bOk = pDBData->HasQueryParam() ||
pDBData->HasSortParam() ||
pDBData->HasSubTotalParam();
-#if OLD_PIVOT_IMPLEMENTATION
- if (!bOk)
- {
- // Pivottabelle mit den Daten als Quellbereich ?
- ScRange aDataRange;
- pDBData->GetArea(aDataRange);
- ScPivotCollection* pPivotCollection = pDoc->GetPivotCollection();
- USHORT nCount = pPivotCollection ? pPivotCollection->GetCount() : 0;
- for (USHORT i=0; i<nCount; i++)
- {
- ScPivot* pTemp = (*pPivotCollection)[i];
- if ( pTemp && pTemp->GetSrcArea().Intersects( aDataRange ) )
- bOk = TRUE;
- }
- }
-#endif
}
}
if (!bOk)
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index a2435bde6..07d9ba6ed 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -828,28 +828,28 @@ void ScDrawView::MarkDropObj( SdrObject* pObj )
}
}
-void ScDrawView::CaptionTextDirection( USHORT nSlot )
-{
- if(nSlot != SID_TEXTDIRECTION_LEFT_TO_RIGHT && nSlot != SID_TEXTDIRECTION_TOP_TO_BOTTOM)
- return;
-
- SdrObject* pObject = GetTextEditObject();
- if ( ScDrawLayer::IsNoteCaption( pObject ) )
- {
- if( SdrCaptionObj* pCaption = dynamic_cast< SdrCaptionObj* >( pObject ) )
- {
- SfxItemSet aAttr(pCaption->GetMergedItemSet());
- aAttr.Put( SvxWritingModeItem(
- nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
- com::sun::star::text::WritingMode_LR_TB : com::sun::star::text::WritingMode_TB_RL,
- SDRATTR_TEXTDIRECTION ) );
- pCaption->SetMergedItemSet(aAttr);
- FuPoor* pPoor = pViewData->GetView()->GetDrawFuncPtr();
- if ( pPoor )
- {
- FuText* pText = static_cast<FuText*>(pPoor);
- pText->StopEditMode(TRUE);
- }
- }
- }
-}
+//UNUSED2009-05 void ScDrawView::CaptionTextDirection( USHORT nSlot )
+//UNUSED2009-05 {
+//UNUSED2009-05 if(nSlot != SID_TEXTDIRECTION_LEFT_TO_RIGHT && nSlot != SID_TEXTDIRECTION_TOP_TO_BOTTOM)
+//UNUSED2009-05 return;
+//UNUSED2009-05
+//UNUSED2009-05 SdrObject* pObject = GetTextEditObject();
+//UNUSED2009-05 if ( ScDrawLayer::IsNoteCaption( pObject ) )
+//UNUSED2009-05 {
+//UNUSED2009-05 if( SdrCaptionObj* pCaption = dynamic_cast< SdrCaptionObj* >( pObject ) )
+//UNUSED2009-05 {
+//UNUSED2009-05 SfxItemSet aAttr(pCaption->GetMergedItemSet());
+//UNUSED2009-05 aAttr.Put( SvxWritingModeItem(
+//UNUSED2009-05 nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
+//UNUSED2009-05 com::sun::star::text::WritingMode_LR_TB : com::sun::star::text::WritingMode_TB_RL,
+//UNUSED2009-05 SDRATTR_TEXTDIRECTION ) );
+//UNUSED2009-05 pCaption->SetMergedItemSet(aAttr);
+//UNUSED2009-05 FuPoor* pPoor = pViewData->GetView()->GetDrawFuncPtr();
+//UNUSED2009-05 if ( pPoor )
+//UNUSED2009-05 {
+//UNUSED2009-05 FuText* pText = static_cast<FuText*>(pPoor);
+//UNUSED2009-05 pText->StopEditMode(TRUE);
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 }
+//UNUSED2009-05 }
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b161e0461..86ea619e7 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -383,9 +383,6 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
bEEMouse( FALSE ),
nMouseStatus( SC_GM_NONE ),
nNestedButtonState( SC_NESTEDBUTTON_NONE ),
-#if OLD_PIVOT_IMPLEMENTATION
- bPivotMouse( FALSE ),
-#endif
bDPMouse( FALSE ),
bRFMouse( FALSE ),
nPagebreakMouse( SC_PD_NONE ),
@@ -1844,15 +1841,6 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
return;
}
-#if OLD_PIVOT_IMPLEMENTATION
- if (bPivotMouse)
- {
- PivotMouseButtonUp( rMEvt );
- bPivotMouse = FALSE;
- return;
- }
-#endif
-
if (bDPMouse)
{
DPMouseButtonUp( rMEvt ); // resets bDPMouse
@@ -2260,14 +2248,6 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt )
return;
}
-#if OLD_PIVOT_IMPLEMENTATION
- if (bPivotMouse)
- {
- PivotMouseMove( rMEvt );
- return;
- }
-#endif
-
if (bDPMouse)
{
DPMouseMove( rMEvt );
@@ -2478,10 +2458,6 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
{
if (!pViewData->GetView()->IsInActivatePart())
{
-#if OLD_PIVOT_IMPLEMENTATION
- if (bPivotMouse)
- bPivotMouse = FALSE; // gezeichnet wird per bDragRect
-#endif
if (bDPMouse)
bDPMouse = FALSE; // gezeichnet wird per bDragRect
if (bDragRect)
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index f2019cb55..7c5993673 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -104,91 +104,6 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
ScDPObject* pDPObj = pDoc->GetDPAtCursor(nCol, nRow, nTab);
-#if OLD_PIVOT_IMPLEMENTATION
- ScPivotCollection* pPivotCollection = pDoc->GetPivotCollection();
- ScPivot* pPivot = pPivotCollection->GetPivotAtCursor(nCol, nRow, nTab);
-
- if (pPivot) // alte Pivottabellen
- {
- if (pPivot->IsFilterAtCursor(nCol, nRow, nTab))
- {
- ReleaseMouse(); // falls schon beim ButtonDown gecaptured, #44018#
-
- ScQueryParam aQueryParam;
- pPivot->GetQuery(aQueryParam);
- SCTAB nSrcTab = pPivot->GetSrcArea().aStart.Tab();
-
- SfxItemSet aArgSet( pViewData->GetViewShell()->GetPool(),
- SCITEM_QUERYDATA, SCITEM_QUERYDATA );
- aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, pViewData, &aQueryParam ) );
-
- //CHINA001 ScPivotFilterDlg* pDlg = new ScPivotFilterDlg(
- //CHINA001 pViewData->GetViewShell()->GetDialogParent(),
- //CHINA001 aArgSet, nSrcTab );
- ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001
-
- AbstractScPivotFilterDlg* pDlg = pFact->CreateScPivotFilterDlg( pViewData->GetViewShell()->GetDialogParent(),
- aArgSet, nSrcTab,
- RID_SCDLG_PIVOTFILTER);
- DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001
- if ( pDlg->Execute() == RET_OK )
- {
- ScPivot* pNewPivot = pPivot->CreateNew();
-
- const ScQueryItem& rQueryItem = pDlg->GetOutputItem();
- pNewPivot->SetQuery(rQueryItem.GetQueryData());
-
- PivotField* pColArr = new PivotField[PIVOT_MAXFIELD];
- SCSIZE nColCount;
- pPivot->GetColFields( pColArr, nColCount );
- PivotField* pRowArr = new PivotField[PIVOT_MAXFIELD];
- SCSIZE nRowCount;
- pPivot->GetRowFields( pRowArr, nRowCount );
- PivotField* pDataArr = new PivotField[PIVOT_MAXFIELD];
- SCSIZE nDataCount;
- pPivot->GetDataFields( pDataArr, nDataCount );
-
- pNewPivot->SetColFields( pColArr, nColCount );
- pNewPivot->SetRowFields( pRowArr, nRowCount );
- pNewPivot->SetDataFields( pDataArr, nDataCount );
-
- pNewPivot->SetName( pPivot->GetName() );
- pNewPivot->SetTag( pPivot->GetTag() );
-
- pViewData->GetDocShell()->PivotUpdate( pPivot, pNewPivot );
- }
- delete pDlg;
- }
- else
- {
- SCCOL nField;
- if (pPivot->GetColFieldAtCursor(nCol, nRow, nTab, nField))
- {
- bPivotMouse = TRUE;
- nPivotField = nField;
- bPivotColField = TRUE;
- nPivotCol = nCol;
- pDragPivot = pPivot;
- PivotTestMouse( rMEvt, TRUE );
- // CaptureMouse();
- StartTracking();
- }
- else if (pPivot->GetRowFieldAtCursor(nCol, nRow, nTab, nField))
- {
- bPivotMouse = TRUE;
- nPivotField = nField;
- bPivotColField = FALSE;
- nPivotCol = nCol;
- pDragPivot = pPivot;
- PivotTestMouse( rMEvt, TRUE );
- // CaptureMouse();
- StartTracking();
- }
- }
- }
-#endif
-
if (pDPObj)
{
USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
@@ -256,365 +171,6 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
}
}
-#if OLD_PIVOT_IMPLEMENTATION
-void ScGridWindow::DoPivotDrop( BOOL bDelete, BOOL bToCols, SCSIZE nDestPos )
-{
- if ( nPivotField == PIVOT_DATA_FIELD && bDelete )
- {
- pViewData->GetView()->ErrorMessage(STR_PIVOT_MOVENOTALLOWED);
- return;
- }
-
- if ( bPivotColField != bToCols && !bDelete )
- {
- SCSIZE nDestCount = bToCols ? pDragPivot->GetColFieldCount()
- : pDragPivot->GetRowFieldCount();
- if ( nDestCount >= PIVOT_MAXFIELD ) // schon voll?
- {
- // Versuch, mehr als PIVOT_MAXFIELD Eintraege zu erzeugen
- pViewData->GetView()->ErrorMessage(STR_PIVOT_ERROR);
- return;
- }
- }
-
- PivotField* pColArr = new PivotField[PIVOT_MAXFIELD];
- SCSIZE nColCount;
- pDragPivot->GetColFields( pColArr, nColCount );
-
- PivotField* pRowArr = new PivotField[PIVOT_MAXFIELD];
- SCSIZE nRowCount;
- pDragPivot->GetRowFields( pRowArr, nRowCount );
-
- PivotField* pDataArr = new PivotField[PIVOT_MAXFIELD];
- SCSIZE nDataCount;
- pDragPivot->GetDataFields( pDataArr, nDataCount );
-
- SCSIZE nOldPos = 0;
- PivotField aMoveField;
-
- PivotField* pSource = bPivotColField ? pColArr : pRowArr;
- SCSIZE& rCount = bPivotColField ? nColCount : nRowCount;
-
- BOOL bFound = FALSE;
- for (SCSIZE i=0; i<rCount && !bFound; i++)
- if (pSource[i].nCol == nPivotField)
- {
- nOldPos = i;
- aMoveField = pSource[i];
- --rCount;
- if (i<rCount)
- memmove( &pSource[i], &pSource[i+1], (rCount-i)*sizeof(PivotField) );
- if ( bPivotColField == bToCols )
- if (nDestPos > i)
- --nDestPos;
- bFound = TRUE;
- }
-
- if (bFound)
- {
- if (!bDelete)
- {
- PivotField* pDest = bToCols ? pColArr : pRowArr;
- SCSIZE& rDestCount = bToCols ? nColCount : nRowCount;
-
- if (nDestPos < rDestCount)
- memmove( &pDest[nDestPos+1], &pDest[nDestPos],
- (rDestCount-nDestPos)*sizeof(PivotField) );
- pDest[nDestPos] = aMoveField;
- ++rDestCount;
- }
-
- BOOL bEmpty = ( nColCount + nRowCount == 0 ||
- ( nColCount + nRowCount == 1 && nDataCount <= 1 ) );
-
- if ( bEmpty ) // Pivottabelle loeschen
- {
- pViewData->GetDocShell()->PivotUpdate( pDragPivot, NULL );
- }
- else
- {
- ScPivot* pNewPivot = pDragPivot->CreateNew();
- pNewPivot->SetColFields( pColArr, nColCount );
- pNewPivot->SetRowFields( pRowArr, nRowCount );
- pNewPivot->SetDataFields( pDataArr, nDataCount );
-
- pNewPivot->SetName( pDragPivot->GetName() );
- pNewPivot->SetTag( pDragPivot->GetTag() );
-
- pViewData->GetDocShell()->PivotUpdate( pDragPivot, pNewPivot );
- }
- pDragPivot = NULL;
- }
- else
- {
- DBG_ASSERT(0,"Pivot-Eintrag nicht gefunden");
- }
-
- delete[] pColArr;
- delete[] pRowArr;
- delete[] pDataArr;
-}
-
-BOOL ScGridWindow::PivotTestMouse( const MouseEvent& rMEvt, BOOL bMove )
-{
- BOOL bRet = FALSE;
- BOOL bTimer = FALSE;
- Point aPos = rMEvt.GetPosPixel();
-
- SCsCOL nDx = 0;
- SCsROW nDy = 0;
- if ( aPos.X() < 0 )
- nDx = -1;
- if ( aPos.Y() < 0 )
- nDy = -1;
- Size aSize = GetOutputSizePixel();
- if ( aPos.X() >= aSize.Width() )
- nDx = 1;
- if ( aPos.Y() >= aSize.Height() )
- nDy = 1;
- if ( nDx != 0 || nDy != 0 )
- {
- if (bDragRect)
- {
- // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, FALSE );
- bDragRect = FALSE;
- UpdateDragRectOverlay();
- }
-
- if ( nDx != 0 )
- pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) );
- if ( nDy != 0 )
- pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
-
- bTimer = TRUE;
- }
-
- SCsCOL nPosX;
- SCsROW nPosY;
- pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
- BOOL bMouseLeft;
- BOOL bMouseTop;
- pViewData->GetMouseQuadrant( aPos, eWhich, nPosX, nPosY, bMouseLeft, bMouseTop );
-
- SCCOL nPiCol1;
- SCROW nPiRow1;
- SCCOL nPiCol2;
- SCROW nPiRow2;
- SCTAB nTab;
- pDragPivot->GetDestArea( nPiCol1, nPiRow1, nPiCol2, nPiRow2, nTab );
-
- if ( nPosX >= (SCsCOL) nPiCol1 && nPosX <= (SCsCOL) nPiCol2 &&
- nPosY >= (SCsROW) nPiRow1 && nPosY <= (SCsROW) nPiRow2 )
- {
- SCsROW nFilterAdd = 2; // Platz fuer Filter-Button
- SCsROW nColRows = 1; //! Ueberschrift: 0, wenn keine Zeilen, aber mehrere Datenfelder
- SCCOL nNewStartX;
- SCROW nNewStartY;
- SCCOL nNewEndX;
- SCROW nNewEndY;
-
- SCsCOL nRelX = nPosX - (SCsCOL) nPiCol1;
- SCsROW nRelY = nPosY - (SCsROW) nPiRow1 - nFilterAdd;
-
- PivotField* pFieldArr = new PivotField[PIVOT_MAXFIELD];
- SCSIZE nColCount;
- pDragPivot->GetColFields( pFieldArr, nColCount );
- SCSIZE nRowCount;
- pDragPivot->GetRowFields( pFieldArr, nRowCount );
- delete[] pFieldArr;
-
- BOOL bBefore;
- SCsCOL nColSize = static_cast<SCsCOL>(Max( nColCount, (SCSIZE) 1 ));
- SCsROW nRowSize = static_cast<SCsROW>(Max( nRowCount, (SCSIZE) 1 ));
-
- BOOL bToCols;
- if (nRelX < nColSize && nRelY >= nRowSize)
- bToCols = TRUE; // links
- else if (nRelY < nRowSize && nRelX >= nColSize)
- bToCols = FALSE; // oben
- else
- bToCols = ( nRelY-nRowSize > static_cast<SCsCOLROW>(nRelX-nColSize) );
-
- SCsCOL nDestCol = 0;
- SCsROW nDestRow = 0;
- BOOL bNothing = FALSE;
-
- if ( bToCols )
- {
- bBefore = bMouseLeft;
- nDestCol = nRelX;
- if (nDestCol < 0)
- {
- nDestCol = 0;
- bBefore = TRUE;
- }
- if (nDestCol >= static_cast<SCsCOL>(nColCount))
- {
- nDestCol = static_cast<SCsCOL>(nColCount)-1;
- bBefore = FALSE;
- }
-
- nNewStartY = nPiRow1 + nFilterAdd + static_cast<SCROW>(nRowCount) + nColRows;
- nNewEndY = nPiRow2 - 1;
- nNewStartX = nPiCol1 + (SCCOL) nDestCol;
- nNewEndX = nNewStartX;
-
- if ( !bPivotColField ) // von der anderen Seite
- {
- if (bBefore)
- nNewEndX = nNewStartX - 1; // vor dem Feld
- else
- nNewStartX = nNewEndX + 1; // hinter dem Feld
- }
- else
- {
- SCCOL nThisCol = (SCCOL) nPosX; // absolute Spalte ( == Maus )
- if ( nThisCol < nPivotCol )
- {
- nNewEndX = nNewStartX - 1; // vor dem Feld
- bBefore = TRUE;
- }
- else if ( nThisCol > nPivotCol )
- {
- nNewStartX = nNewEndX + 1; // hinter dem Feld
- bBefore = FALSE;
- }
- else
- bNothing = TRUE;
- }
- SetPointer( Pointer( POINTER_PIVOT_ROW ) );
- }
- else
- {
- if (nRelY <= 0 && static_cast<SCsCOLROW>(nRelX) < static_cast<SCsCOLROW>(nColCount)+static_cast<SCsCOLROW>(nRowCount))
- {
- nDestRow = static_cast<SCsCOLROW>(nRelX) - static_cast<SCsCOLROW>(nColCount);
- bBefore = bMouseLeft;
- }
- else
- {
- nDestRow = nRelY-1;
- bBefore = bMouseTop;
- }
- if (nDestRow < 0)
- {
- nDestRow = 0;
- bBefore = TRUE;
- }
- if (nDestRow >= static_cast<SCsROW>(nRowCount))
- {
- nDestRow = static_cast<SCsROW>(nRowCount)-1;
- bBefore = FALSE;
- }
-
- nNewStartX = nPiCol1 + (SCCOL) nColCount;
- nNewEndX = nPiCol2 - 1;
- nNewStartY = nPiRow1 + nFilterAdd + nDestRow + nColRows;
- nNewEndY = nNewStartY;
- if ( bPivotColField ) // von der anderen Seite
- {
- if (bBefore)
- nNewEndY = nNewStartY - 1; // vor dem Feld
- else
- nNewStartY = nNewEndY + 1; // hinter dem Feld
- }
- else
- {
- SCCOL nThisCol =
- static_cast<SCCOL>(static_cast<SCCOLROW>(nDestRow) +
- static_cast<SCCOLROW>(nColCount) + nPiCol1);
- // absolute Spalte
- if ( nThisCol < nPivotCol )
- {
- bBefore = TRUE;
- nNewEndY = nNewStartY - 1; // vor dem Feld
- }
- else if ( nThisCol > nPivotCol )
- {
- bBefore = FALSE;
- nNewStartY = nNewEndY + 1; // hinter dem Feld
- }
- else
- bNothing = TRUE;
- }
- SetPointer( Pointer( POINTER_PIVOT_COL ) );
- }
-
- if (bMove)
- {
- if ( nNewStartX != nDragStartX || nNewEndX != nDragEndX ||
- nNewStartY != nDragStartY || nNewEndY != nDragEndY || !bDragRect )
- {
- //if (bDragRect)
- // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, FALSE );
-
- nDragStartX = nNewStartX;
- nDragStartY = nNewStartY;
- nDragEndX = nNewEndX;
- nDragEndY = nNewEndY;
- bDragRect = TRUE;
-
- // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, FALSE );
-
- UpdateDragRectOverlay();
- }
- }
- else
- {
- if (bDragRect)
- {
- // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, FALSE );
- bDragRect = FALSE;
- UpdateDragRectOverlay();
- }
-
- if (!bNothing)
- {
- SCSIZE nDestPos = bToCols ? static_cast<SCSIZE>(nDestCol) : static_cast<SCSIZE>(nDestRow);
- if (!bBefore)
- ++nDestPos;
- DoPivotDrop( FALSE, bToCols, nDestPos );
- }
- }
-
- bRet = TRUE;
- }
- else
- {
- if (bMove)
- SetPointer( Pointer( POINTER_PIVOT_DELETE ) );
- // if (bDragRect)
- // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, FALSE );
- bDragRect = FALSE;
- UpdateDragRectOverlay();
-
- if (!bMove)
- DoPivotDrop( TRUE, FALSE,0 );
- }
-
- if (bTimer && bMove)
- pViewData->GetView()->SetTimer( this, rMEvt ); // Event wiederholen
- else
- pViewData->GetView()->ResetTimer();
-
- return bRet;
-}
-
-void ScGridWindow::PivotMouseMove( const MouseEvent& rMEvt )
-{
- PivotTestMouse( rMEvt, TRUE );
-}
-
-void ScGridWindow::PivotMouseButtonUp( const MouseEvent& rMEvt )
-{
- bPivotMouse = FALSE; // als erstes, falls PivotTestMouse eine Fehlermeldung bringt
- ReleaseMouse();
-
- PivotTestMouse( rMEvt, FALSE );
- SetPointer( Pointer( POINTER_ARROW ) );
-}
-#endif
-
// -----------------------------------------------------------------------
//
// Data Pilot interaction
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 603dad3a7..efc26c691 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1816,6 +1816,7 @@ void ScOutputData::FindChanged()
pDoc->DisableIdle( bWasIdleDisabled );
}
+#ifdef OLD_SELECTION_PAINT
void ScOutputData::DrawMark( Window* pWin )
{
Rectangle aRect;
@@ -1826,14 +1827,14 @@ void ScOutputData::DrawMark( Window* pWin )
for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
- if ( pThisRowInfo->bChanged )
+ if (pThisRowInfo->bChanged)
{
long nPosX = nScrX;
- if ( bLayoutRTL )
- nPosX += nMirrorW - 1; // always in pixels
+ if (bLayoutRTL)
+ nPosX += nMirrorW - 1; // always in pixels
aRect = Rectangle( Point( nPosX,nPosY ), Size(1, pThisRowInfo->nHeight) );
- if ( bLayoutRTL )
+ if (bLayoutRTL)
aRect.Left() = aRect.Right() + 1;
else
aRect.Right() = aRect.Left() - 1;
@@ -1841,12 +1842,12 @@ void ScOutputData::DrawMark( Window* pWin )
BOOL bOldMarked = FALSE;
for (SCCOL nX=nX1; nX<=nX2; nX++)
{
- if ( pThisRowInfo->pCellInfo[nX+1].bMarked != bOldMarked )
+ if (pThisRowInfo->pCellInfo[nX+1].bMarked != bOldMarked)
{
if (bOldMarked && aRect.Right() >= aRect.Left())
aInvert.AddRect( aRect );
- if ( bLayoutRTL )
+ if (bLayoutRTL)
aRect.Right() = nPosX;
else
aRect.Left() = nPosX;
@@ -1854,7 +1855,7 @@ void ScOutputData::DrawMark( Window* pWin )
bOldMarked = pThisRowInfo->pCellInfo[nX+1].bMarked;
}
- if ( bLayoutRTL )
+ if (bLayoutRTL)
{
nPosX -= pRowInfo[0].pCellInfo[nX+1].nWidth;
aRect.Left() = nPosX+1;
@@ -1871,6 +1872,7 @@ void ScOutputData::DrawMark( Window* pWin )
nPosY += pThisRowInfo->nHeight;
}
}
+#endif
void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 75ad4ba1b..b8d248696 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -398,22 +398,22 @@ ScTabView::ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pView
Init();
}
-ScTabView::ScTabView( Window* pParent, const ScTabView& rScTabView, ScTabViewShell* pViewShell ) :
- pFrameWin( pParent ),
- aViewData( rScTabView.aViewData ),
- TABVIEW_INIT
-{
- RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScTabView::ScTabView" );
-
- aViewData.SetViewShell( pViewShell );
- Init();
-
- UpdateShow();
- if ( aViewData.GetActivePart() != SC_SPLIT_BOTTOMLEFT )
- pGridWin[SC_SPLIT_BOTTOMLEFT]->Show();
-
- InvalidateSplit();
-}
+//UNUSED2009-05 ScTabView::ScTabView( Window* pParent, const ScTabView& rScTabView, ScTabViewShell* pViewShell ) :
+//UNUSED2009-05 pFrameWin( pParent ),
+//UNUSED2009-05 aViewData( rScTabView.aViewData ),
+//UNUSED2009-05 TABVIEW_INIT
+//UNUSED2009-05 {
+//UNUSED2009-05 RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScTabView::ScTabView" );
+//UNUSED2009-05
+//UNUSED2009-05 aViewData.SetViewShell( pViewShell );
+//UNUSED2009-05 Init();
+//UNUSED2009-05
+//UNUSED2009-05 UpdateShow();
+//UNUSED2009-05 if ( aViewData.GetActivePart() != SC_SPLIT_BOTTOMLEFT )
+//UNUSED2009-05 pGridWin[SC_SPLIT_BOTTOMLEFT]->Show();
+//UNUSED2009-05
+//UNUSED2009-05 InvalidateSplit();
+//UNUSED2009-05 }
void ScTabView::InitScrollBar( ScrollBar& rScrollBar, long nMaxVal )
{
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 125aa3b5f..22837d00e 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -466,19 +466,9 @@ void ScTabView::CursorPosChanged()
// Broadcast, damit andere Views des Dokuments auch umschalten
ScDocument* pDoc = aViewData.GetDocument();
-#if OLD_PIVOT_IMPLEMENTATION
- BOOL bPivot = ( NULL != pDoc->GetPivotAtCursor( aViewData.GetCurX(),
- aViewData.GetCurY(),
- aViewData.GetTabNo() ) ||
- NULL != pDoc->GetDPAtCursor( aViewData.GetCurX(),
- aViewData.GetCurY(),
- aViewData.GetTabNo() ) );
- aViewData.GetViewShell()->SetPivotShell(bPivot);
-#else
bool bDP = NULL != pDoc->GetDPAtCursor(
aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo() );
aViewData.GetViewShell()->SetPivotShell(bDP);
-#endif
// UpdateInputHandler jetzt in CellContentChanged
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 91a3d4855..964695cb6 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -481,12 +481,13 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
return TRUE;
}
+#ifdef OLD_SELECTION_PAINT
BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, BOOL& rCont )
{
rCont = FALSE;
- if ( nNewStartX == nOldStartX && nNewEndX == nOldEndX &&
- nNewStartY == nOldStartY && nNewEndY == nOldEndY )
+ if (nNewStartX == nOldStartX && nNewEndX == nOldEndX &&
+ nNewStartY == nOldStartY && nNewEndY == nOldEndY)
{
rX1 = nNewStartX;
rY1 = nNewStartY;
@@ -500,14 +501,14 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B
rX2 = Max(nNewEndX,nOldEndX);
rY2 = Max(nNewEndY,nOldEndY);
- if ( nNewStartX == nOldStartX && nNewEndX == nOldEndX ) // nur vertikal
+ if (nNewStartX == nOldStartX && nNewEndX == nOldEndX) // nur vertikal
{
- if ( nNewStartY == nOldStartY )
+ if (nNewStartY == nOldStartY)
{
rY1 = Min( nNewEndY, nOldEndY ) + 1;
rY2 = Max( nNewEndY, nOldEndY );
}
- else if ( nNewEndY == nOldEndY )
+ else if (nNewEndY == nOldEndY)
{
rY1 = Min( nNewStartY, nOldStartY );
rY2 = Max( nNewStartY, nOldStartY ) - 1;
@@ -523,14 +524,14 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B
nContX2 = rX2;
}
}
- else if ( nNewStartY == nOldStartY && nNewEndY == nOldEndY ) // nur horizontal
+ else if (nNewStartY == nOldStartY && nNewEndY == nOldEndY) // nur horizontal
{
- if ( nNewStartX == nOldStartX )
+ if (nNewStartX == nOldStartX)
{
rX1 = Min( nNewEndX, nOldEndX ) + 1;
rX2 = Max( nNewEndX, nOldEndX );
}
- else if ( nNewEndX == nOldEndX )
+ else if (nNewEndX == nOldEndX)
{
rX1 = Min( nNewStartX, nOldStartX );
rX2 = Max( nNewStartX, nOldStartX ) - 1;
@@ -546,67 +547,67 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B
nContY2 = rY2;
}
}
- else if ( nNewEndX == nOldEndX && nNewEndY == nOldEndY ) // links oben
+ else if (nNewEndX == nOldEndX && nNewEndY == nOldEndY) // links oben
{
- if ( (nNewStartX<nOldStartX) == (nNewStartY<nOldStartY) )
+ if ((nNewStartX<nOldStartX) == (nNewStartY<nOldStartY))
rX1 = Min( nNewStartX, nOldStartX );
else
- rX1 = Max( nNewStartX, nOldStartX ); // Ecke weglassen
+ rX1 = Max( nNewStartX, nOldStartX ); // Ecke weglassen
rX2 = nOldEndX;
- rY1 = Min( nNewStartY, nOldStartY ); // oben
+ rY1 = Min( nNewStartY, nOldStartY ); // oben
rY2 = Max( nNewStartY, nOldStartY ) - 1;
rCont = TRUE;
nContY1 = rY2+1;
nContY2 = nOldEndY;
- nContX1 = Min( nNewStartX, nOldStartX ); // links
+ nContX1 = Min( nNewStartX, nOldStartX ); // links
nContX2 = Max( nNewStartX, nOldStartX ) - 1;
}
- else if ( nNewStartX == nOldStartX && nNewEndY == nOldEndY ) // rechts oben
+ else if (nNewStartX == nOldStartX && nNewEndY == nOldEndY) // rechts oben
{
- if ( (nNewEndX<nOldEndX) != (nNewStartY<nOldStartY) )
+ if ((nNewEndX<nOldEndX) != (nNewStartY<nOldStartY))
rX2 = Max( nNewEndX, nOldEndX );
else
- rX2 = Min( nNewEndX, nOldEndX ); // Ecke weglassen
+ rX2 = Min( nNewEndX, nOldEndX ); // Ecke weglassen
rX1 = nOldStartX;
- rY1 = Min( nNewStartY, nOldStartY ); // oben
+ rY1 = Min( nNewStartY, nOldStartY ); // oben
rY2 = Max( nNewStartY, nOldStartY ) - 1;
rCont = TRUE;
nContY1 = rY2+1;
nContY2 = nOldEndY;
- nContX1 = Min( nNewEndX, nOldEndX ) + 1; // rechts
+ nContX1 = Min( nNewEndX, nOldEndX ) + 1; // rechts
nContX2 = Max( nNewEndX, nOldEndX );
}
- else if ( nNewEndX == nOldEndX && nNewStartY == nOldStartY ) // links unten
+ else if (nNewEndX == nOldEndX && nNewStartY == nOldStartY) // links unten
{
- if ( (nNewStartX<nOldStartX) != (nNewEndY<nOldEndY) )
+ if ((nNewStartX<nOldStartX) != (nNewEndY<nOldEndY))
rX1 = Min( nNewStartX, nOldStartX );
else
- rX1 = Max( nNewStartX, nOldStartX ); // Ecke weglassen
+ rX1 = Max( nNewStartX, nOldStartX ); // Ecke weglassen
rX2 = nOldEndX;
- rY1 = Min( nNewEndY, nOldEndY ) + 1; // unten
+ rY1 = Min( nNewEndY, nOldEndY ) + 1; // unten
rY2 = Max( nNewEndY, nOldEndY );
rCont = TRUE;
nContY1 = nOldStartY;
nContY2 = rY1-1;
- nContX1 = Min( nNewStartX, nOldStartX ); // links
+ nContX1 = Min( nNewStartX, nOldStartX ); // links
nContX2 = Max( nNewStartX, nOldStartX ) - 1;
}
- else if ( nNewStartX == nOldStartX && nNewStartY == nOldStartY ) // rechts unten
+ else if (nNewStartX == nOldStartX && nNewStartY == nOldStartY) // rechts unten
{
- if ( (nNewEndX<nOldEndX) == (nNewEndY<nOldEndY) )
+ if ((nNewEndX<nOldEndX) == (nNewEndY<nOldEndY))
rX2 = Max( nNewEndX, nOldEndX );
else
- rX2 = Min( nNewEndX, nOldEndX ); // Ecke weglassen
+ rX2 = Min( nNewEndX, nOldEndX ); // Ecke weglassen
rX1 = nOldStartX;
- rY1 = Min( nNewEndY, nOldEndY ) + 1; // unten
+ rY1 = Min( nNewEndY, nOldEndY ) + 1; // unten
rY2 = Max( nNewEndY, nOldEndY );
rCont = TRUE;
nContY1 = nOldStartY;
nContY2 = rY1-1;
- nContX1 = Min( nNewEndX, nOldEndX ) + 1; // rechts
+ nContX1 = Min( nNewEndX, nOldEndX ) + 1; // rechts
nContX2 = Max( nNewEndX, nOldEndX );
}
- else // Ueberschlag
+ else // Ueberschlag
{
rX1 = nOldStartX;
rY1 = nOldStartY;
@@ -629,6 +630,7 @@ void ScUpdateRect::GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
rX2 = nContX2;
rY2 = nContY2;
}
+#endif