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
f50e370d
Kaydet (Commit)
f50e370d
authored
Nis 16, 2018
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Resolves: tdf#116003 check presence of subtotal in group, tdf#107267 follow-up
Change-Id: Ifed6e28926c689dd17914b8b1cbf47b58e2ffcdc
üst
f942587a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
table3.cxx
sc/source/core/data/table3.cxx
+11
-3
No files found.
sc/source/core/data/table3.cxx
Dosyayı görüntüle @
f50e370d
...
@@ -2161,11 +2161,20 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
...
@@ -2161,11 +2161,20 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
for
(
sal_uInt16
nLevel
=
0
;
nLevel
<
nLevelCount
;
nLevel
++
)
for
(
sal_uInt16
nLevel
=
0
;
nLevel
<
nLevelCount
;
nLevel
++
)
{
{
const
sal_uInt16
nGroupNo
=
nLevelCount
-
nLevel
-
1
;
const
ScSubTotalFunc
*
pResFunc
=
rParam
.
pFunctions
[
nGroupNo
];
if
(
!
pResFunc
)
{
// No subtotal function given for this group => no formula or
// label and do not insert a row.
continue
;
}
// increment end row
// increment end row
nGlobalEndRow
++
;
nGlobalEndRow
++
;
// add row entry for formula
// add row entry for formula
aRowEntry
.
nGroupNo
=
n
LevelCount
-
nLevel
-
1
;
aRowEntry
.
nGroupNo
=
n
GroupNo
;
aRowEntry
.
nSubStartRow
=
nGlobalStartRow
;
aRowEntry
.
nSubStartRow
=
nGlobalStartRow
;
aRowEntry
.
nFuncStart
=
nGlobalStartFunc
;
aRowEntry
.
nFuncStart
=
nGlobalStartFunc
;
aRowEntry
.
nDestRow
=
nGlobalEndRow
;
aRowEntry
.
nDestRow
=
nGlobalEndRow
;
...
@@ -2183,10 +2192,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
...
@@ -2183,10 +2192,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
DBShowRow
(
aRowEntry
.
nDestRow
,
true
);
DBShowRow
(
aRowEntry
.
nDestRow
,
true
);
// insert label
// insert label
ScSubTotalFunc
*
eResFunc
=
rParam
.
pFunctions
[
aRowEntry
.
nGroupNo
];
OUString
label
=
ScGlobal
::
GetRscString
(
STR_TABLE_GRAND
);
OUString
label
=
ScGlobal
::
GetRscString
(
STR_TABLE_GRAND
);
label
+=
" "
;
label
+=
" "
;
label
+=
ScGlobal
::
GetRscString
(
lcl_GetSubTotalStrId
(
e
ResFunc
[
0
]));
label
+=
ScGlobal
::
GetRscString
(
lcl_GetSubTotalStrId
(
p
ResFunc
[
0
]));
SetString
(
nGroupCol
[
aRowEntry
.
nGroupNo
],
aRowEntry
.
nDestRow
,
nTab
,
label
);
SetString
(
nGroupCol
[
aRowEntry
.
nGroupNo
],
aRowEntry
.
nDestRow
,
nTab
,
label
);
ApplyStyle
(
nGroupCol
[
aRowEntry
.
nGroupNo
],
aRowEntry
.
nDestRow
,
pStyle
);
ApplyStyle
(
nGroupCol
[
aRowEntry
.
nGroupNo
],
aRowEntry
.
nDestRow
,
pStyle
);
}
}
...
...
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