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
94040c20
Kaydet (Commit)
94040c20
authored
Haz 28, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ResolveStaticReference() to also dynamically recalc formula cells.
Change-Id: If42e5105be0e6db7c63d7c4e7c43de23716d6cbf
üst
f67fa232
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
column2.cxx
sc/source/core/data/column2.cxx
+21
-18
No files found.
sc/source/core/data/column2.cxx
Dosyayı görüntüle @
94040c20
...
...
@@ -1859,13 +1859,10 @@ formula::FormulaTokenRef ScColumn::ResolveStaticReference( SCROW nRow )
case
sc
:
:
element_type_formula
:
{
ScFormulaCell
*
p
=
sc
::
formula_block
::
at
(
*
it
->
data
,
aPos
.
second
);
if
(
p
->
GetDirty
())
// Dirty formula cell is not considered static (for now).
// Return null token. Later we will switch to dynamically
// interpreting all dirty formula cells.
return
formula
::
FormulaTokenRef
();
if
(
p
->
IsValue
())
return
formula
::
FormulaTokenRef
(
new
formula
::
FormulaDoubleToken
(
p
->
GetValue
()));
return
formula
::
FormulaTokenRef
(
new
formula
::
Formula
DoubleToken
(
p
->
GetResultDouble
()));
return
formula
::
FormulaTokenRef
(
new
formula
::
Formula
StringToken
(
p
->
GetString
()));
}
case
sc
:
:
element_type_empty
:
default
:
...
...
@@ -1881,28 +1878,34 @@ class ToMatrixHandler
ScMatrix
&
mrMat
;
SCCOL
mnMatCol
;
SCROW
mnTopRow
;
bool
mbSuccess
;
public
:
ToMatrixHandler
(
ScMatrix
&
rMat
,
SCCOL
nMatCol
,
SCROW
nTopRow
)
:
mrMat
(
rMat
),
mnMatCol
(
nMatCol
),
mnTopRow
(
nTopRow
)
,
mbSuccess
(
true
)
{}
mrMat
(
rMat
),
mnMatCol
(
nMatCol
),
mnTopRow
(
nTopRow
)
{}
void
operator
()
(
size_t
nRow
,
double
fVal
)
{
mrMat
.
PutDouble
(
fVal
,
mnMatCol
,
nRow
-
mnTopRow
);
}
void
operator
()
(
size_t
nRow
,
ScFormulaCell
*
p
)
void
operator
()
(
size_t
nRow
,
const
ScFormulaCell
*
p
)
{
if
(
p
->
GetDirty
())
{
mbSuccess
=
false
;
return
;
}
// Formula cell may need to re-calculate.
ScFormulaCell
&
rCell
=
const_cast
<
ScFormulaCell
&>
(
*
p
);
if
(
rCell
.
IsValue
())
mrMat
.
PutDouble
(
rCell
.
GetValue
(),
mnMatCol
,
nRow
-
mnTopRow
);
else
mrMat
.
PutString
(
rCell
.
GetString
(),
mnMatCol
,
nRow
-
mnTopRow
);
}
mrMat
.
PutDouble
(
p
->
GetResultDouble
(),
mnMatCol
,
nRow
-
mnTopRow
);
void
operator
()
(
size_t
nRow
,
const
OUString
&
rStr
)
{
mrMat
.
PutString
(
rStr
,
mnMatCol
,
nRow
-
mnTopRow
);
}
bool
isSuccess
()
const
{
return
mbSuccess
;
}
void
operator
()
(
size_t
nRow
,
const
EditTextObject
*
pStr
)
{
mrMat
.
PutString
(
ScEditUtil
::
GetString
(
*
pStr
),
mnMatCol
,
nRow
-
mnTopRow
);
}
};
}
...
...
@@ -1913,8 +1916,8 @@ bool ScColumn::ResolveStaticReference( ScMatrix& rMat, SCCOL nMatCol, SCROW nRow
return
false
;
ToMatrixHandler
aFunc
(
rMat
,
nMatCol
,
nRow1
);
sc
::
P
rocessFormulaNumeric
(
maCells
.
begin
(),
maCells
,
nRow1
,
nRow2
,
aFunc
);
return
aFunc
.
isSuccess
()
;
sc
::
P
arseAllNonEmpty
(
maCells
.
begin
(),
maCells
,
nRow1
,
nRow2
,
aFunc
);
return
true
;
}
namespace
{
...
...
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