Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d7d3d778
Kaydet (Commit)
d7d3d778
authored
Mar 24, 2011
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved ScSubTotalParam from global.* into own files.
üst
76ec3cad
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
311 additions
and
238 deletions
+311
-238
datauno.hxx
sc/inc/datauno.hxx
+1
-0
global.hxx
sc/inc/global.hxx
+0
-33
subtotalparam.hxx
sc/inc/subtotalparam.hxx
+67
-0
global2.cxx
sc/source/core/data/global2.cxx
+0
-204
makefile.mk
sc/source/core/data/makefile.mk
+1
-0
sortparam.cxx
sc/source/core/data/sortparam.cxx
+2
-0
subtotalparam.cxx
sc/source/core/data/subtotalparam.cxx
+232
-0
table3.cxx
sc/source/core/data/table3.cxx
+1
-0
dbcolect.cxx
sc/source/core/tool/dbcolect.cxx
+1
-1
XMLExportDatabaseRanges.cxx
sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+2
-0
dbfunc.hxx
sc/source/ui/inc/dbfunc.hxx
+1
-0
tpsubt.hxx
sc/source/ui/inc/tpsubt.hxx
+1
-0
uiitems.hxx
sc/source/ui/inc/uiitems.hxx
+1
-0
undodat.hxx
sc/source/ui/inc/undodat.hxx
+1
-0
No files found.
sc/inc/datauno.hxx
Dosyayı görüntüle @
d7d3d778
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "global.hxx"
#include "global.hxx"
#include "queryparam.hxx"
#include "queryparam.hxx"
#include "subtotalparam.hxx"
#include <com/sun/star/sheet/TableFilterField.hpp>
#include <com/sun/star/sheet/TableFilterField.hpp>
#include <com/sun/star/sheet/GeneralFunction.hpp>
#include <com/sun/star/sheet/GeneralFunction.hpp>
...
...
sc/inc/global.hxx
Dosyayı görüntüle @
d7d3d778
...
@@ -761,39 +761,6 @@ struct ScQueryEntry
...
@@ -761,39 +761,6 @@ struct ScQueryEntry
sal_Bool
operator
==
(
const
ScQueryEntry
&
r
)
const
;
sal_Bool
operator
==
(
const
ScQueryEntry
&
r
)
const
;
};
};
struct
SC_DLLPUBLIC
ScSubTotalParam
{
SCCOL
nCol1
;
// selected area
SCROW
nRow1
;
SCCOL
nCol2
;
SCROW
nRow2
;
sal_uInt16
nUserIndex
;
// index into list
bool
bRemoveOnly
:
1
;
bool
bReplace
:
1
;
// replace existing results
bool
bPagebreak
:
1
;
// page break at change of group
bool
bCaseSens
:
1
;
//
bool
bDoSort
:
1
;
// presort
bool
bAscending
:
1
;
// sort ascending
bool
bUserDef
:
1
;
// sort user defined
bool
bIncludePattern
:
1
;
// sort formats
bool
bGroupActive
[
MAXSUBTOTAL
];
// active groups
SCCOL
nField
[
MAXSUBTOTAL
];
// associated field
SCCOL
nSubTotals
[
MAXSUBTOTAL
];
// number of SubTotals
SCCOL
*
pSubTotals
[
MAXSUBTOTAL
];
// array of columns to be calculated
ScSubTotalFunc
*
pFunctions
[
MAXSUBTOTAL
];
// array of associated functions
ScSubTotalParam
();
ScSubTotalParam
(
const
ScSubTotalParam
&
r
);
ScSubTotalParam
&
operator
=
(
const
ScSubTotalParam
&
r
);
bool
operator
==
(
const
ScSubTotalParam
&
r
)
const
;
void
Clear
();
void
SetSubTotals
(
sal_uInt16
nGroup
,
const
SCCOL
*
ptrSubTotals
,
const
ScSubTotalFunc
*
ptrFuncions
,
sal_uInt16
nCount
);
};
class
ScArea
;
class
ScArea
;
struct
ScConsolidateParam
struct
ScConsolidateParam
...
...
sc/inc/subtotalparam.hxx
0 → 100644
Dosyayı görüntüle @
d7d3d778
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Initial Developer of the Original Code is
* Kohei Yoshida <kyoshida@novell.com> (Novell, Inc.)
* Portions created by the Initial Developer are Copyright (C) 2010 the
* Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#ifndef __SC_SUBTOTALPARAM_HXX__
#define __SC_SUBTOTALPARAM_HXX__
#include "global.hxx"
#include "address.hxx"
struct
SC_DLLPUBLIC
ScSubTotalParam
{
SCCOL
nCol1
;
// selected area
SCROW
nRow1
;
SCCOL
nCol2
;
SCROW
nRow2
;
sal_uInt16
nUserIndex
;
// index into list
bool
bRemoveOnly
:
1
;
bool
bReplace
:
1
;
// replace existing results
bool
bPagebreak
:
1
;
// page break at change of group
bool
bCaseSens
:
1
;
//
bool
bDoSort
:
1
;
// presort
bool
bAscending
:
1
;
// sort ascending
bool
bUserDef
:
1
;
// sort user defined
bool
bIncludePattern
:
1
;
// sort formats
bool
bGroupActive
[
MAXSUBTOTAL
];
// active groups
SCCOL
nField
[
MAXSUBTOTAL
];
// associated field
SCCOL
nSubTotals
[
MAXSUBTOTAL
];
// number of SubTotals
SCCOL
*
pSubTotals
[
MAXSUBTOTAL
];
// array of columns to be calculated
ScSubTotalFunc
*
pFunctions
[
MAXSUBTOTAL
];
// array of associated functions
ScSubTotalParam
();
ScSubTotalParam
(
const
ScSubTotalParam
&
r
);
ScSubTotalParam
&
operator
=
(
const
ScSubTotalParam
&
r
);
bool
operator
==
(
const
ScSubTotalParam
&
r
)
const
;
void
Clear
();
void
SetSubTotals
(
sal_uInt16
nGroup
,
const
SCCOL
*
ptrSubTotals
,
const
ScSubTotalFunc
*
ptrFuncions
,
sal_uInt16
nCount
);
};
#endif
sc/source/core/data/global2.cxx
Dosyayı görüntüle @
d7d3d778
...
@@ -227,210 +227,6 @@ utl::TextSearch* ScQueryEntry::GetSearchTextPtr( sal_Bool bCaseSens )
...
@@ -227,210 +227,6 @@ utl::TextSearch* ScQueryEntry::GetSearchTextPtr( sal_Bool bCaseSens )
return
pSearchText
;
return
pSearchText
;
}
}
//------------------------------------------------------------------------
// struct ScSubTotalParam:
ScSubTotalParam
::
ScSubTotalParam
()
{
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
;
i
++
)
{
nSubTotals
[
i
]
=
0
;
pSubTotals
[
i
]
=
NULL
;
pFunctions
[
i
]
=
NULL
;
}
Clear
();
}
//------------------------------------------------------------------------
ScSubTotalParam
::
ScSubTotalParam
(
const
ScSubTotalParam
&
r
)
:
nCol1
(
r
.
nCol1
),
nRow1
(
r
.
nRow1
),
nCol2
(
r
.
nCol2
),
nRow2
(
r
.
nRow2
),
nUserIndex
(
r
.
nUserIndex
),
bRemoveOnly
(
r
.
bRemoveOnly
),
bReplace
(
r
.
bReplace
),
bPagebreak
(
r
.
bPagebreak
),
bCaseSens
(
r
.
bCaseSens
),
bDoSort
(
r
.
bDoSort
),
bAscending
(
r
.
bAscending
),
bUserDef
(
r
.
bUserDef
),
bIncludePattern
(
r
.
bIncludePattern
)
{
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
;
i
++
)
{
bGroupActive
[
i
]
=
r
.
bGroupActive
[
i
];
nField
[
i
]
=
r
.
nField
[
i
];
if
(
(
r
.
nSubTotals
[
i
]
>
0
)
&&
r
.
pSubTotals
[
i
]
&&
r
.
pFunctions
[
i
]
)
{
nSubTotals
[
i
]
=
r
.
nSubTotals
[
i
];
pSubTotals
[
i
]
=
new
SCCOL
[
r
.
nSubTotals
[
i
]];
pFunctions
[
i
]
=
new
ScSubTotalFunc
[
r
.
nSubTotals
[
i
]];
for
(
SCCOL
j
=
0
;
j
<
r
.
nSubTotals
[
i
];
j
++
)
{
pSubTotals
[
i
][
j
]
=
r
.
pSubTotals
[
i
][
j
];
pFunctions
[
i
][
j
]
=
r
.
pFunctions
[
i
][
j
];
}
}
else
{
nSubTotals
[
i
]
=
0
;
pSubTotals
[
i
]
=
NULL
;
pFunctions
[
i
]
=
NULL
;
}
}
}
//------------------------------------------------------------------------
void
ScSubTotalParam
::
Clear
()
{
nCol1
=
nCol2
=
0
;
nRow1
=
nRow2
=
0
;
nUserIndex
=
0
;
bPagebreak
=
bCaseSens
=
bUserDef
=
bIncludePattern
=
bRemoveOnly
=
false
;
bAscending
=
bReplace
=
bDoSort
=
true
;
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
;
i
++
)
{
bGroupActive
[
i
]
=
false
;
nField
[
i
]
=
0
;
if
(
(
nSubTotals
[
i
]
>
0
)
&&
pSubTotals
[
i
]
&&
pFunctions
[
i
]
)
{
for
(
SCCOL
j
=
0
;
j
<
nSubTotals
[
i
];
j
++
)
{
pSubTotals
[
i
][
j
]
=
0
;
pFunctions
[
i
][
j
]
=
SUBTOTAL_FUNC_NONE
;
}
}
}
}
//------------------------------------------------------------------------
ScSubTotalParam
&
ScSubTotalParam
::
operator
=
(
const
ScSubTotalParam
&
r
)
{
nCol1
=
r
.
nCol1
;
nRow1
=
r
.
nRow1
;
nCol2
=
r
.
nCol2
;
nRow2
=
r
.
nRow2
;
bRemoveOnly
=
r
.
bRemoveOnly
;
bReplace
=
r
.
bReplace
;
bPagebreak
=
r
.
bPagebreak
;
bCaseSens
=
r
.
bCaseSens
;
bDoSort
=
r
.
bDoSort
;
bAscending
=
r
.
bAscending
;
bUserDef
=
r
.
bUserDef
;
nUserIndex
=
r
.
nUserIndex
;
bIncludePattern
=
r
.
bIncludePattern
;
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
;
i
++
)
{
bGroupActive
[
i
]
=
r
.
bGroupActive
[
i
];
nField
[
i
]
=
r
.
nField
[
i
];
nSubTotals
[
i
]
=
r
.
nSubTotals
[
i
];
if
(
pSubTotals
[
i
]
)
delete
[]
pSubTotals
[
i
];
if
(
pFunctions
[
i
]
)
delete
[]
pFunctions
[
i
];
if
(
r
.
nSubTotals
[
i
]
>
0
)
{
pSubTotals
[
i
]
=
new
SCCOL
[
r
.
nSubTotals
[
i
]];
pFunctions
[
i
]
=
new
ScSubTotalFunc
[
r
.
nSubTotals
[
i
]];
for
(
SCCOL
j
=
0
;
j
<
r
.
nSubTotals
[
i
];
j
++
)
{
pSubTotals
[
i
][
j
]
=
r
.
pSubTotals
[
i
][
j
];
pFunctions
[
i
][
j
]
=
r
.
pFunctions
[
i
][
j
];
}
}
else
{
nSubTotals
[
i
]
=
0
;
pSubTotals
[
i
]
=
NULL
;
pFunctions
[
i
]
=
NULL
;
}
}
return
*
this
;
}
//------------------------------------------------------------------------
bool
ScSubTotalParam
::
operator
==
(
const
ScSubTotalParam
&
rOther
)
const
{
bool
bEqual
=
(
nCol1
==
rOther
.
nCol1
)
&&
(
nRow1
==
rOther
.
nRow1
)
&&
(
nCol2
==
rOther
.
nCol2
)
&&
(
nRow2
==
rOther
.
nRow2
)
&&
(
nUserIndex
==
rOther
.
nUserIndex
)
&&
(
bRemoveOnly
==
rOther
.
bRemoveOnly
)
&&
(
bReplace
==
rOther
.
bReplace
)
&&
(
bPagebreak
==
rOther
.
bPagebreak
)
&&
(
bDoSort
==
rOther
.
bDoSort
)
&&
(
bCaseSens
==
rOther
.
bCaseSens
)
&&
(
bAscending
==
rOther
.
bAscending
)
&&
(
bUserDef
==
rOther
.
bUserDef
)
&&
(
bIncludePattern
==
rOther
.
bIncludePattern
);
if
(
bEqual
)
{
bEqual
=
true
;
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
&&
bEqual
;
i
++
)
{
bEqual
=
(
bGroupActive
[
i
]
==
rOther
.
bGroupActive
[
i
])
&&
(
nField
[
i
]
==
rOther
.
nField
[
i
])
&&
(
nSubTotals
[
i
]
==
rOther
.
nSubTotals
[
i
]);
if
(
bEqual
&&
(
nSubTotals
[
i
]
>
0
)
)
{
bEqual
=
(
pSubTotals
!=
NULL
)
&&
(
pFunctions
!=
NULL
);
for
(
SCCOL
j
=
0
;
(
j
<
nSubTotals
[
i
])
&&
bEqual
;
j
++
)
{
bEqual
=
bEqual
&&
(
pSubTotals
[
i
][
j
]
==
rOther
.
pSubTotals
[
i
][
j
])
&&
(
pFunctions
[
i
][
j
]
==
rOther
.
pFunctions
[
i
][
j
]);
}
}
}
}
return
bEqual
;
}
//------------------------------------------------------------------------
void
ScSubTotalParam
::
SetSubTotals
(
sal_uInt16
nGroup
,
const
SCCOL
*
ptrSubTotals
,
const
ScSubTotalFunc
*
ptrFunctions
,
sal_uInt16
nCount
)
{
DBG_ASSERT
(
(
nGroup
<=
MAXSUBTOTAL
),
"ScSubTotalParam::SetSubTotals(): nGroup > MAXSUBTOTAL!"
);
DBG_ASSERT
(
ptrSubTotals
,
"ScSubTotalParam::SetSubTotals(): ptrSubTotals == NULL!"
);
DBG_ASSERT
(
ptrFunctions
,
"ScSubTotalParam::SetSubTotals(): ptrFunctions == NULL!"
);
DBG_ASSERT
(
(
nCount
>
0
),
"ScSubTotalParam::SetSubTotals(): nCount <= 0!"
);
if
(
ptrSubTotals
&&
ptrFunctions
&&
(
nCount
>
0
)
&&
(
nGroup
<=
MAXSUBTOTAL
)
)
{
// 0 wird als 1 aufgefasst, sonst zum Array-Index dekrementieren
if
(
nGroup
!=
0
)
nGroup
--
;
delete
[]
pSubTotals
[
nGroup
];
delete
[]
pFunctions
[
nGroup
];
pSubTotals
[
nGroup
]
=
new
SCCOL
[
nCount
];
pFunctions
[
nGroup
]
=
new
ScSubTotalFunc
[
nCount
];
nSubTotals
[
nGroup
]
=
static_cast
<
SCCOL
>
(
nCount
);
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
{
pSubTotals
[
nGroup
][
i
]
=
ptrSubTotals
[
i
];
pFunctions
[
nGroup
][
i
]
=
ptrFunctions
[
i
];
}
}
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
// struct ScConsolidateParam:
// struct ScConsolidateParam:
...
...
sc/source/core/data/makefile.mk
Dosyayı görüntüle @
d7d3d778
...
@@ -103,6 +103,7 @@ EXCEPTIONSFILES= \
...
@@ -103,6 +103,7 @@ EXCEPTIONSFILES= \
$(SLO)$/
segmenttree.obj
\
$(SLO)$/
segmenttree.obj
\
$(SLO)$/
stlpool.obj
\
$(SLO)$/
stlpool.obj
\
$(SLO)$/
stlsheet.obj
\
$(SLO)$/
stlsheet.obj
\
$(SLO)$/
subtotalparam.obj
\
$(SLO)$/
tabbgcolor.obj
\
$(SLO)$/
tabbgcolor.obj
\
$(SLO)$/
table1.obj
\
$(SLO)$/
table1.obj
\
$(SLO)$/
table2.obj
\
$(SLO)$/
table2.obj
\
...
...
sc/source/core/data/sortparam.cxx
Dosyayı görüntüle @
d7d3d778
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
#include "global.hxx"
#include "global.hxx"
#include "address.hxx"
#include "address.hxx"
#include "queryparam.hxx"
#include "queryparam.hxx"
#include "subtotalparam.hxx"
#include <tools/debug.hxx>
#include <tools/debug.hxx>
...
...
sc/source/core/data/subtotalparam.cxx
0 → 100644
Dosyayı görüntüle @
d7d3d778
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Initial Developer of the Original Code is
* Kohei Yoshida <kyoshida@novell.com> (Novell, Inc.)
* Portions created by the Initial Developer are Copyright (C) 2010 the
* Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#include "subtotalparam.hxx"
ScSubTotalParam
::
ScSubTotalParam
()
{
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
;
i
++
)
{
nSubTotals
[
i
]
=
0
;
pSubTotals
[
i
]
=
NULL
;
pFunctions
[
i
]
=
NULL
;
}
Clear
();
}
//------------------------------------------------------------------------
ScSubTotalParam
::
ScSubTotalParam
(
const
ScSubTotalParam
&
r
)
:
nCol1
(
r
.
nCol1
),
nRow1
(
r
.
nRow1
),
nCol2
(
r
.
nCol2
),
nRow2
(
r
.
nRow2
),
nUserIndex
(
r
.
nUserIndex
),
bRemoveOnly
(
r
.
bRemoveOnly
),
bReplace
(
r
.
bReplace
),
bPagebreak
(
r
.
bPagebreak
),
bCaseSens
(
r
.
bCaseSens
),
bDoSort
(
r
.
bDoSort
),
bAscending
(
r
.
bAscending
),
bUserDef
(
r
.
bUserDef
),
bIncludePattern
(
r
.
bIncludePattern
)
{
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
;
i
++
)
{
bGroupActive
[
i
]
=
r
.
bGroupActive
[
i
];
nField
[
i
]
=
r
.
nField
[
i
];
if
(
(
r
.
nSubTotals
[
i
]
>
0
)
&&
r
.
pSubTotals
[
i
]
&&
r
.
pFunctions
[
i
]
)
{
nSubTotals
[
i
]
=
r
.
nSubTotals
[
i
];
pSubTotals
[
i
]
=
new
SCCOL
[
r
.
nSubTotals
[
i
]];
pFunctions
[
i
]
=
new
ScSubTotalFunc
[
r
.
nSubTotals
[
i
]];
for
(
SCCOL
j
=
0
;
j
<
r
.
nSubTotals
[
i
];
j
++
)
{
pSubTotals
[
i
][
j
]
=
r
.
pSubTotals
[
i
][
j
];
pFunctions
[
i
][
j
]
=
r
.
pFunctions
[
i
][
j
];
}
}
else
{
nSubTotals
[
i
]
=
0
;
pSubTotals
[
i
]
=
NULL
;
pFunctions
[
i
]
=
NULL
;
}
}
}
//------------------------------------------------------------------------
void
ScSubTotalParam
::
Clear
()
{
nCol1
=
nCol2
=
0
;
nRow1
=
nRow2
=
0
;
nUserIndex
=
0
;
bPagebreak
=
bCaseSens
=
bUserDef
=
bIncludePattern
=
bRemoveOnly
=
false
;
bAscending
=
bReplace
=
bDoSort
=
true
;
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
;
i
++
)
{
bGroupActive
[
i
]
=
false
;
nField
[
i
]
=
0
;
if
(
(
nSubTotals
[
i
]
>
0
)
&&
pSubTotals
[
i
]
&&
pFunctions
[
i
]
)
{
for
(
SCCOL
j
=
0
;
j
<
nSubTotals
[
i
];
j
++
)
{
pSubTotals
[
i
][
j
]
=
0
;
pFunctions
[
i
][
j
]
=
SUBTOTAL_FUNC_NONE
;
}
}
}
}
//------------------------------------------------------------------------
ScSubTotalParam
&
ScSubTotalParam
::
operator
=
(
const
ScSubTotalParam
&
r
)
{
nCol1
=
r
.
nCol1
;
nRow1
=
r
.
nRow1
;
nCol2
=
r
.
nCol2
;
nRow2
=
r
.
nRow2
;
bRemoveOnly
=
r
.
bRemoveOnly
;
bReplace
=
r
.
bReplace
;
bPagebreak
=
r
.
bPagebreak
;
bCaseSens
=
r
.
bCaseSens
;
bDoSort
=
r
.
bDoSort
;
bAscending
=
r
.
bAscending
;
bUserDef
=
r
.
bUserDef
;
nUserIndex
=
r
.
nUserIndex
;
bIncludePattern
=
r
.
bIncludePattern
;
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
;
i
++
)
{
bGroupActive
[
i
]
=
r
.
bGroupActive
[
i
];
nField
[
i
]
=
r
.
nField
[
i
];
nSubTotals
[
i
]
=
r
.
nSubTotals
[
i
];
if
(
pSubTotals
[
i
]
)
delete
[]
pSubTotals
[
i
];
if
(
pFunctions
[
i
]
)
delete
[]
pFunctions
[
i
];
if
(
r
.
nSubTotals
[
i
]
>
0
)
{
pSubTotals
[
i
]
=
new
SCCOL
[
r
.
nSubTotals
[
i
]];
pFunctions
[
i
]
=
new
ScSubTotalFunc
[
r
.
nSubTotals
[
i
]];
for
(
SCCOL
j
=
0
;
j
<
r
.
nSubTotals
[
i
];
j
++
)
{
pSubTotals
[
i
][
j
]
=
r
.
pSubTotals
[
i
][
j
];
pFunctions
[
i
][
j
]
=
r
.
pFunctions
[
i
][
j
];
}
}
else
{
nSubTotals
[
i
]
=
0
;
pSubTotals
[
i
]
=
NULL
;
pFunctions
[
i
]
=
NULL
;
}
}
return
*
this
;
}
//------------------------------------------------------------------------
bool
ScSubTotalParam
::
operator
==
(
const
ScSubTotalParam
&
rOther
)
const
{
bool
bEqual
=
(
nCol1
==
rOther
.
nCol1
)
&&
(
nRow1
==
rOther
.
nRow1
)
&&
(
nCol2
==
rOther
.
nCol2
)
&&
(
nRow2
==
rOther
.
nRow2
)
&&
(
nUserIndex
==
rOther
.
nUserIndex
)
&&
(
bRemoveOnly
==
rOther
.
bRemoveOnly
)
&&
(
bReplace
==
rOther
.
bReplace
)
&&
(
bPagebreak
==
rOther
.
bPagebreak
)
&&
(
bDoSort
==
rOther
.
bDoSort
)
&&
(
bCaseSens
==
rOther
.
bCaseSens
)
&&
(
bAscending
==
rOther
.
bAscending
)
&&
(
bUserDef
==
rOther
.
bUserDef
)
&&
(
bIncludePattern
==
rOther
.
bIncludePattern
);
if
(
bEqual
)
{
bEqual
=
true
;
for
(
sal_uInt16
i
=
0
;
i
<
MAXSUBTOTAL
&&
bEqual
;
i
++
)
{
bEqual
=
(
bGroupActive
[
i
]
==
rOther
.
bGroupActive
[
i
])
&&
(
nField
[
i
]
==
rOther
.
nField
[
i
])
&&
(
nSubTotals
[
i
]
==
rOther
.
nSubTotals
[
i
]);
if
(
bEqual
&&
(
nSubTotals
[
i
]
>
0
)
)
{
bEqual
=
(
pSubTotals
!=
NULL
)
&&
(
pFunctions
!=
NULL
);
for
(
SCCOL
j
=
0
;
(
j
<
nSubTotals
[
i
])
&&
bEqual
;
j
++
)
{
bEqual
=
bEqual
&&
(
pSubTotals
[
i
][
j
]
==
rOther
.
pSubTotals
[
i
][
j
])
&&
(
pFunctions
[
i
][
j
]
==
rOther
.
pFunctions
[
i
][
j
]);
}
}
}
}
return
bEqual
;
}
//------------------------------------------------------------------------
void
ScSubTotalParam
::
SetSubTotals
(
sal_uInt16
nGroup
,
const
SCCOL
*
ptrSubTotals
,
const
ScSubTotalFunc
*
ptrFunctions
,
sal_uInt16
nCount
)
{
DBG_ASSERT
(
(
nGroup
<=
MAXSUBTOTAL
),
"ScSubTotalParam::SetSubTotals(): nGroup > MAXSUBTOTAL!"
);
DBG_ASSERT
(
ptrSubTotals
,
"ScSubTotalParam::SetSubTotals(): ptrSubTotals == NULL!"
);
DBG_ASSERT
(
ptrFunctions
,
"ScSubTotalParam::SetSubTotals(): ptrFunctions == NULL!"
);
DBG_ASSERT
(
(
nCount
>
0
),
"ScSubTotalParam::SetSubTotals(): nCount <= 0!"
);
if
(
ptrSubTotals
&&
ptrFunctions
&&
(
nCount
>
0
)
&&
(
nGroup
<=
MAXSUBTOTAL
)
)
{
// 0 wird als 1 aufgefasst, sonst zum Array-Index dekrementieren
if
(
nGroup
!=
0
)
nGroup
--
;
delete
[]
pSubTotals
[
nGroup
];
delete
[]
pFunctions
[
nGroup
];
pSubTotals
[
nGroup
]
=
new
SCCOL
[
nCount
];
pFunctions
[
nGroup
]
=
new
ScSubTotalFunc
[
nCount
];
nSubTotals
[
nGroup
]
=
static_cast
<
SCCOL
>
(
nCount
);
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
{
pSubTotals
[
nGroup
][
i
]
=
ptrSubTotals
[
i
];
pFunctions
[
nGroup
][
i
]
=
ptrFunctions
[
i
];
}
}
}
sc/source/core/data/table3.cxx
Dosyayı görüntüle @
d7d3d778
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
#include "postit.hxx"
#include "postit.hxx"
#include "queryparam.hxx"
#include "queryparam.hxx"
#include "segmenttree.hxx"
#include "segmenttree.hxx"
#include "subtotalparam.hxx"
#include <vector>
#include <vector>
...
...
sc/source/core/tool/dbcolect.cxx
Dosyayı görüntüle @
d7d3d778
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include "document.hxx"
#include "document.hxx"
#include "queryparam.hxx"
#include "queryparam.hxx"
#include "globstr.hrc"
#include "globstr.hrc"
#include "subtotalparam.hxx"
//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------
...
...
sc/source/filter/xml/XMLExportDatabaseRanges.cxx
Dosyayı görüntüle @
d7d3d778
...
@@ -46,6 +46,8 @@
...
@@ -46,6 +46,8 @@
#include "globstr.hrc"
#include "globstr.hrc"
#include "XMLExportSharedData.hxx"
#include "XMLExportSharedData.hxx"
#include "rangeutl.hxx"
#include "rangeutl.hxx"
#include "subtotalparam.hxx"
#include <com/sun/star/sheet/DataImportMode.hpp>
#include <com/sun/star/sheet/DataImportMode.hpp>
#include <com/sun/star/table/TableSortField.hpp>
#include <com/sun/star/table/TableSortField.hpp>
#include <com/sun/star/table/TableSortFieldType.hpp>
#include <com/sun/star/table/TableSortFieldType.hpp>
...
...
sc/source/ui/inc/dbfunc.hxx
Dosyayı görüntüle @
d7d3d778
...
@@ -43,6 +43,7 @@ class ScDPObject;
...
@@ -43,6 +43,7 @@ class ScDPObject;
class
ScDPSaveData
;
class
ScDPSaveData
;
class
ScStrCollection
;
class
ScStrCollection
;
struct
ScDPNumGroupInfo
;
struct
ScDPNumGroupInfo
;
struct
ScSubTotalParam
;
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
...
...
sc/source/ui/inc/tpsubt.hxx
Dosyayı görüntüle @
d7d3d778
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
class
ScViewData
;
class
ScViewData
;
class
ScDocument
;
class
ScDocument
;
struct
ScSubTotalParam
;
//========================================================================
//========================================================================
// Gruppenseiten: Basisklasse
// Gruppenseiten: Basisklasse
...
...
sc/source/ui/inc/uiitems.hxx
Dosyayı görüntüle @
d7d3d778
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include "conditio.hxx"
#include "conditio.hxx"
#include "sortparam.hxx"
#include "sortparam.hxx"
#include "queryparam.hxx"
#include "queryparam.hxx"
#include "subtotalparam.hxx"
#include "paramisc.hxx"
#include "paramisc.hxx"
#include <svl/poolitem.hxx>
#include <svl/poolitem.hxx>
...
...
sc/source/ui/inc/undodat.hxx
Dosyayı görüntüle @
d7d3d778
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "markdata.hxx"
#include "markdata.hxx"
#include "sortparam.hxx"
#include "sortparam.hxx"
#include "queryparam.hxx"
#include "queryparam.hxx"
#include "subtotalparam.hxx"
#include "pivot.hxx"
#include "pivot.hxx"
class
ScDocShell
;
class
ScDocShell
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment