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
7fca30bf
Kaydet (Commit)
7fca30bf
authored
Kas 24, 2014
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix fencepost errors
Change-Id: I4d22d535368569631be9c016f74b7c19b9019955
üst
47ec1044
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
calcoptionsdlg.cxx
sc/source/ui/optdlg/calcoptionsdlg.cxx
+19
-13
No files found.
sc/source/ui/optdlg/calcoptionsdlg.cxx
Dosyayı görüntüle @
7fca30bf
...
...
@@ -1217,7 +1217,7 @@ struct Reduction : Op
virtual
void
addHeader
(
ScDocument
*
pDoc
,
int
nTab
)
const
SAL_OVERRIDE
{
pDoc
->
SetString
(
ScAddress
(
0
,
0
,
nTab
),
"x"
);
pDoc
->
SetString
(
ScAddress
(
1
,
0
,
nTab
),
msOp
+
"("
+
OUString
::
number
(
mnNum
)
+
")"
);
pDoc
->
SetString
(
ScAddress
(
1
,
0
,
nTab
),
msOp
);
pDoc
->
SetString
(
ScAddress
(
2
,
0
,
nTab
),
"expected"
);
}
...
...
@@ -1231,33 +1231,39 @@ struct Reduction : Op
pDoc
->
SetValue
(
ScAddress
(
0
,
1
+
nRow
,
nTab
),
nArg
);
if
(
nRow
>=
mnNum
)
if
(
nRow
>=
mnNum
-
1
)
{
pDoc
->
SetString
(
ScAddress
(
1
,
1
+
nRow
,
nTab
),
pDoc
->
SetString
(
ScAddress
(
1
,
1
+
nRow
-
mnNum
+
1
,
nTab
),
OUString
(
"="
)
+
msOp
+
"("
+
ScRange
(
ScAddress
(
0
,
1
+
nRow
-
mnNum
,
nTab
),
ScRange
(
ScAddress
(
0
,
1
+
nRow
-
mnNum
+
1
,
nTab
),
ScAddress
(
0
,
1
+
nRow
,
nTab
)).
Format
(
SCA_VALID
|
SCA_TAB_3D
|
SCA_VALID_COL
|
SCA_VALID_ROW
)
+
")"
);
double
nAccum
(
mnAccumInitial
);
for
(
int
i
=
0
;
i
<
mnNum
;
i
++
)
nAccum
=
mpFun
(
nAccum
,
pDoc
->
GetValue
(
ScAddress
(
0
,
1
+
nRow
-
mnNum
+
i
,
nTab
)));
nAccum
=
mpFun
(
nAccum
,
pDoc
->
GetValue
(
ScAddress
(
0
,
1
+
nRow
-
mnNum
+
i
+
1
,
nTab
)));
pDoc
->
SetValue
(
ScAddress
(
2
,
1
+
nRow
,
nTab
),
nAccum
);
pDoc
->
SetValue
(
ScAddress
(
2
,
1
+
nRow
-
mnNum
+
1
,
nTab
),
nAccum
);
pDoc
->
SetString
(
ScAddress
(
3
,
1
+
nRow
,
nTab
),
OUString
(
"=IF(ABS("
)
+
ScAddress
(
1
,
1
+
nRow
,
nTab
).
Format
(
SCA_VALID_COL
|
SCA_VALID_ROW
)
+
"-"
+
ScAddress
(
2
,
1
+
nRow
,
nTab
).
Format
(
SCA_VALID_COL
|
SCA_VALID_ROW
)
+
")<="
+
OUString
::
number
(
mnEpsilon
)
+
",0,1)"
);
if
(
mnEpsilon
!=
0
)
pDoc
->
SetString
(
ScAddress
(
3
,
1
+
nRow
-
mnNum
+
1
,
nTab
),
OUString
(
"=IF(ABS("
)
+
ScAddress
(
1
,
1
+
nRow
-
mnNum
+
1
,
nTab
).
Format
(
SCA_VALID_COL
|
SCA_VALID_ROW
)
+
"-"
+
ScAddress
(
2
,
1
+
nRow
-
mnNum
+
1
,
nTab
).
Format
(
SCA_VALID_COL
|
SCA_VALID_ROW
)
+
")<="
+
OUString
::
number
(
mnEpsilon
)
+
",0,1)"
);
else
pDoc
->
SetString
(
ScAddress
(
3
,
1
+
nRow
-
mnNum
+
1
,
nTab
),
OUString
(
"=IF("
)
+
ScAddress
(
1
,
1
+
nRow
-
mnNum
+
1
,
nTab
).
Format
(
SCA_VALID_COL
|
SCA_VALID_ROW
)
+
"="
+
ScAddress
(
2
,
1
+
nRow
-
mnNum
+
1
,
nTab
).
Format
(
SCA_VALID_COL
|
SCA_VALID_ROW
)
+
",0,1)"
);
}
}
virtual
OUString
getSummaryFormula
(
ScDocument
*
pDoc
,
int
nTab
)
const
SAL_OVERRIDE
{
return
OUString
(
"=SUM("
)
+
ScRange
(
ScAddress
(
3
,
1
+
mnNum
,
nTab
),
ScAddress
(
3
,
1
+
mnRows
-
1
,
nTab
)).
Format
(
SCA_VALID
|
SCA_TAB_3D
|
SCA_VALID_COL
|
SCA_VALID_ROW
|
SCA_VALID_TAB
,
pDoc
)
+
ScRange
(
ScAddress
(
3
,
1
+
0
,
nTab
),
ScAddress
(
3
,
1
+
mnRows
-
mnNum
-
1
,
nTab
)).
Format
(
SCA_VALID
|
SCA_TAB_3D
|
SCA_VALID_COL
|
SCA_VALID_ROW
|
SCA_VALID_TAB
,
pDoc
)
+
")"
;
}
};
...
...
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