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
83a88b94
Kaydet (Commit)
83a88b94
authored
May 10, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#77056: Treat empty cells as if they have a value of 0.0.
Change-Id: Ibe64cf7177a5298c1878e0014c049dc9c82b1344
üst
b44f8185
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
17 deletions
+26
-17
column3.cxx
sc/source/core/data/column3.cxx
+26
-17
No files found.
sc/source/core/data/column3.cxx
Dosyayı görüntüle @
83a88b94
...
@@ -1158,6 +1158,23 @@ class MixDataHandler
...
@@ -1158,6 +1158,23 @@ class MixDataHandler
bool
mbSkipEmpty
;
bool
mbSkipEmpty
;
void
doFunction
(
size_t
nDestRow
,
double
fVal1
,
double
fVal2
)
{
bool
bOk
=
lcl_DoFunction
(
fVal1
,
fVal2
,
mnFunction
);
if
(
bOk
)
miNewCellsPos
=
maNewCells
.
set
(
miNewCellsPos
,
nDestRow
-
mnRowOffset
,
fVal1
);
else
{
ScAddress
aPos
(
mrDestColumn
.
GetCol
(),
nDestRow
,
mrDestColumn
.
GetTab
());
ScFormulaCell
*
pFC
=
new
ScFormulaCell
(
&
mrDestColumn
.
GetDoc
(),
aPos
);
pFC
->
SetErrCode
(
errNoValue
);
miNewCellsPos
=
maNewCells
.
set
(
miNewCellsPos
,
nDestRow
-
mnRowOffset
,
pFC
);
}
}
public
:
public
:
MixDataHandler
(
MixDataHandler
(
sc
::
ColumnBlockPosition
&
rBlockPos
,
sc
::
ColumnBlockPosition
&
rBlockPos
,
...
@@ -1180,22 +1197,15 @@ public:
...
@@ -1180,22 +1197,15 @@ public:
mrBlockPos
.
miCellPos
=
aPos
.
first
;
mrBlockPos
.
miCellPos
=
aPos
.
first
;
switch
(
aPos
.
first
->
type
)
switch
(
aPos
.
first
->
type
)
{
{
case
sc
:
:
element_type_empty
:
case
sc
:
:
element_type_numeric
:
case
sc
:
:
element_type_numeric
:
{
{
// Both src and dest are of numeric type.
double
fSrcVal
=
0.0
;
bool
bOk
=
lcl_DoFunction
(
f
,
sc
::
numeric_block
::
at
(
*
aPos
.
first
->
data
,
aPos
.
second
),
mnFunction
);
if
(
aPos
.
first
->
type
==
sc
::
element_type_numeric
)
fSrcVal
=
sc
::
numeric_block
::
at
(
*
aPos
.
first
->
data
,
aPos
.
second
);
if
(
bOk
)
miNewCellsPos
=
maNewCells
.
set
(
miNewCellsPos
,
nRow
-
mnRowOffset
,
f
);
else
{
ScFormulaCell
*
pFC
=
new
ScFormulaCell
(
&
mrDestColumn
.
GetDoc
(),
ScAddress
(
mrDestColumn
.
GetCol
(),
nRow
,
mrDestColumn
.
GetTab
()));
pFC
->
SetErrCode
(
errNoValue
);
// Both src and dest are of numeric type.
miNewCellsPos
=
maNewCells
.
set
(
miNewCellsPos
,
nRow
-
mnRowOffset
,
pFC
);
doFunction
(
nRow
,
f
,
fSrcVal
);
}
}
}
break
;
break
;
case
sc
:
:
element_type_formula
:
case
sc
:
:
element_type_formula
:
...
@@ -1229,7 +1239,6 @@ public:
...
@@ -1229,7 +1239,6 @@ public:
break
;
break
;
case
sc
:
:
element_type_string
:
case
sc
:
:
element_type_string
:
case
sc
:
:
element_type_edittext
:
case
sc
:
:
element_type_edittext
:
case
sc
:
:
element_type_empty
:
{
{
// Destination cell is not a number. Just take the source cell.
// Destination cell is not a number. Just take the source cell.
miNewCellsPos
=
maNewCells
.
set
(
miNewCellsPos
,
nRow
-
mnRowOffset
,
f
);
miNewCellsPos
=
maNewCells
.
set
(
miNewCellsPos
,
nRow
-
mnRowOffset
,
f
);
...
@@ -1346,9 +1355,9 @@ public:
...
@@ -1346,9 +1355,9 @@ public:
{
{
case
sc
:
:
element_type_numeric
:
case
sc
:
:
element_type_numeric
:
{
{
double
fVal
=
sc
::
numeric_block
::
at
(
*
aPos
.
first
->
data
,
aPos
.
second
)
;
double
fVal
1
=
0.0
;
miNewCellsPos
=
maNewCells
.
set
(
double
fVal2
=
sc
::
numeric_block
::
at
(
*
aPos
.
first
->
data
,
aPos
.
second
);
miNewCellsPos
,
nDestRow
-
mnRowOffset
,
fVal
);
doFunction
(
nDestRow
,
fVal1
,
fVal2
);
}
}
break
;
break
;
case
sc
:
:
element_type_string
:
case
sc
:
:
element_type_string
:
...
...
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