1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: consoli.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_CONSOLI_HXX
32 #define SC_CONSOLI_HXX
35 #include "address.hxx"
39 // -----------------------------------------------------------------------
41 struct ScReferenceEntry
// ohne Constructor !
49 //! Delta-Wert fuer Daten benutzen?
51 class ScReferenceList
// ohne Constructor !
55 SCSIZE nFullSize
; // inkl. Fuell-Eintraege
56 ScReferenceEntry
* pData
;
59 void Init() { nCount
=0; nFullSize
=0; pData
=NULL
; }
60 void Clear() { delete[] pData
; }
62 SCSIZE
GetCount() { return nCount
; }
63 const ScReferenceEntry
& GetEntry( SCSIZE nPos
) { return pData
[nPos
]; }
64 void SetFullSize( SCSIZE nNew
) { nFullSize
= nNew
; }
66 void AddEntry( SCCOL nCol
, SCROW nRow
, SCTAB nTab
);
69 // -----------------------------------------------------------------------
74 // 1) ScConsData anlegen
75 // 2) Parameter (Size/Flags)
76 // 3) AddFields fuer alle Bereiche (nur noetig bei bColByName oder bRowByName)
77 // 4) DoneFields ( " " )
78 // 5) AddData fuer alle Bereiche
79 // evtl. AddName nach jedem Bereich
80 // 6) OutputToDocument
83 //! ab bestimmter Groesse ScDocument Struktur benutzen?
89 ScSubTotalFunc eFunction
;
100 ScReferenceList
** ppRefs
;
101 String
** ppColHeaders
;
102 String
** ppRowHeaders
;
108 String aCornerText
; // nur bei bColByName && bRowByName
114 void SetSize( SCCOL nCols
, SCROW nRows
);
115 void SetFlags( ScSubTotalFunc eFunc
, BOOL bColName
, BOOL bRowName
, BOOL bRef
);
117 void InitData(BOOL bDelete
=TRUE
);
120 void AddFields( ScDocument
* pSrcDoc
, SCTAB nTab
,
121 SCCOL nCol1
, SCROW nRow1
, SCCOL nCol2
, SCROW nRow2
);
124 void AddData( ScDocument
* pSrcDoc
, SCTAB nTab
,
125 SCCOL nCol1
, SCROW nRow1
, SCCOL nCol2
, SCROW nRow2
);
126 void AddName( const String
& rName
);
128 void OutputToDocument( ScDocument
* pDestDoc
, SCCOL nCol
, SCROW nRow
, SCTAB nTab
);
130 void GetSize( SCCOL
& rCols
, SCROW
& rRows
) const;
131 SCROW
GetInsertCount() const;