1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef SC_CONSOLI_HXX
29 #define SC_CONSOLI_HXX
32 #include "address.hxx"
36 // -----------------------------------------------------------------------
38 struct ScReferenceEntry
// ohne Constructor !
46 //! Delta-Wert fuer Daten benutzen?
48 class ScReferenceList
// ohne Constructor !
52 SCSIZE nFullSize
; // inkl. Fuell-Eintraege
53 ScReferenceEntry
* pData
;
56 void Init() { nCount
=0; nFullSize
=0; pData
=NULL
; }
57 void Clear() { delete[] pData
; }
59 SCSIZE
GetCount() { return nCount
; }
60 const ScReferenceEntry
& GetEntry( SCSIZE nPos
) { return pData
[nPos
]; }
61 void SetFullSize( SCSIZE nNew
) { nFullSize
= nNew
; }
63 void AddEntry( SCCOL nCol
, SCROW nRow
, SCTAB nTab
);
66 // -----------------------------------------------------------------------
71 // 1) ScConsData anlegen
72 // 2) Parameter (Size/Flags)
73 // 3) AddFields fuer alle Bereiche (nur noetig bei bColByName oder bRowByName)
74 // 4) DoneFields ( " " )
75 // 5) AddData fuer alle Bereiche
76 // evtl. AddName nach jedem Bereich
77 // 6) OutputToDocument
80 //! ab bestimmter Groesse ScDocument Struktur benutzen?
86 ScSubTotalFunc eFunction
;
97 ScReferenceList
** ppRefs
;
98 String
** ppColHeaders
;
99 String
** ppRowHeaders
;
105 String aCornerText
; // nur bei bColByName && bRowByName
111 void SetSize( SCCOL nCols
, SCROW nRows
);
112 void SetFlags( ScSubTotalFunc eFunc
, BOOL bColName
, BOOL bRowName
, BOOL bRef
);
114 void InitData(BOOL bDelete
=TRUE
);
117 void AddFields( ScDocument
* pSrcDoc
, SCTAB nTab
,
118 SCCOL nCol1
, SCROW nRow1
, SCCOL nCol2
, SCROW nRow2
);
121 void AddData( ScDocument
* pSrcDoc
, SCTAB nTab
,
122 SCCOL nCol1
, SCROW nRow1
, SCCOL nCol2
, SCROW nRow2
);
123 void AddName( const String
& rName
);
125 void OutputToDocument( ScDocument
* pDestDoc
, SCCOL nCol
, SCROW nRow
, SCTAB nTab
);
127 void GetSize( SCCOL
& rCols
, SCROW
& rRows
) const;
128 SCROW
GetInsertCount() const;