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
ea6ee3f9
Kaydet (Commit)
ea6ee3f9
authored
Mar 28, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
GetValueCellValue() to take a double, not ScValueCell.
Change-Id: Idac293e6475caabe73e961cde5578c34d561e06a
üst
663b7062
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
49 deletions
+37
-49
interpre.hxx
sc/source/core/inc/interpre.hxx
+1
-1
interpr4.cxx
sc/source/core/tool/interpr4.cxx
+36
-48
No files found.
sc/source/core/inc/interpre.hxx
Dosyayı görüntüle @
ea6ee3f9
...
...
@@ -191,7 +191,7 @@ double GetCellValue( const ScAddress&, const ScBaseCell* );
double
GetCellValue
(
const
ScAddress
&
,
ScRefCellValue
&
rCell
);
double
GetCellValueOrZero
(
const
ScAddress
&
,
const
ScBaseCell
*
);
double
GetCellValueOrZero
(
const
ScAddress
&
,
ScRefCellValue
&
rCell
);
double
GetValueCellValue
(
const
ScAddress
&
,
const
ScValueCell
*
);
double
GetValueCellValue
(
const
ScAddress
&
,
double
fOrig
);
ScBaseCell
*
GetCell
(
const
ScAddress
&
rPos
);
void
GetCellString
(
String
&
rStr
,
const
ScBaseCell
*
pCell
);
void
GetCellString
(
OUString
&
rStr
,
ScRefCellValue
&
rCell
);
...
...
sc/source/core/tool/interpr4.cxx
Dosyayı görüntüle @
ea6ee3f9
...
...
@@ -178,16 +178,14 @@ sal_uLong ScInterpreter::GetCellNumberFormat( const ScAddress& rPos, ScRefCellVa
/// Only ValueCell, formula cells already store the result rounded.
double
ScInterpreter
::
GetValueCellValue
(
const
ScAddress
&
rPos
,
const
ScValueCell
*
pCell
)
double
ScInterpreter
::
GetValueCellValue
(
const
ScAddress
&
rPos
,
double
fOrig
)
{
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"sc"
,
"er"
,
"ScInterpreter::GetValueCellValue"
);
double
fVal
=
pCell
->
GetValue
();
if
(
bCalcAsShown
&&
fVal
!=
0.0
)
if
(
bCalcAsShown
&&
fOrig
!=
0.0
)
{
sal_uLong
nFormat
=
pDok
->
GetNumberFormat
(
rPos
);
f
Val
=
pDok
->
RoundValueAsShown
(
fVal
,
nFormat
);
f
Orig
=
pDok
->
RoundValueAsShown
(
fOrig
,
nFormat
);
}
return
f
Val
;
return
f
Orig
;
}
sal_uInt16
ScInterpreter
::
GetCellErrCode
(
const
ScRefCellValue
&
rCell
)
...
...
@@ -744,22 +742,24 @@ bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
while
(
nCol
<=
nCol2
)
{
aAdr
.
SetCol
(
nCol
);
ScBaseCell
*
pCell
=
pDok
->
GetCell
(
aAdr
);
if
(
pCell
)
ScRefCellValue
aCell
;
aCell
.
assign
(
*
pDok
,
aAdr
);
if
(
!
aCell
.
isEmpty
())
{
sal_uInt16
nErr
=
0
;
double
nVal
=
0.0
;
bool
bOk
=
true
;
switch
(
pCell
->
GetCellType
()
)
switch
(
aCell
.
meType
)
{
case
CELLTYPE_VALUE
:
nVal
=
GetValueCellValue
(
aAdr
,
(
ScValueCell
*
)
pCell
);
nVal
=
GetValueCellValue
(
aAdr
,
aCell
.
mfValue
);
break
;
case
CELLTYPE_FORMULA
:
if
(
((
ScFormulaCell
*
)
pCell
)
->
IsValue
())
if
(
aCell
.
mpFormula
->
IsValue
())
{
nErr
=
((
ScFormulaCell
*
)
pCell
)
->
GetErrCode
();
nVal
=
((
ScFormulaCell
*
)
pCell
)
->
GetValue
();
nErr
=
aCell
.
mpFormula
->
GetErrCode
();
nVal
=
aCell
.
mpFormula
->
GetValue
();
}
else
bOk
=
false
;
...
...
@@ -931,33 +931,31 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
while
(
nCol
<=
nCol2
)
{
aAdr
.
SetCol
(
nCol
);
ScBaseCell
*
pCell
=
pDok
->
GetCell
(
aAdr
);
if
(
pCell
)
ScRefCellValue
aCell
;
aCell
.
assign
(
*
pDok
,
aAdr
);
if
(
!
aCell
.
isEmpty
())
{
sal_uInt16
nErr
=
0
;
sal_uInt16
nType
=
0
;
// 0 = Zahl; 1 = String
double
nVal
=
0.0
;
String
aStr
;
bool
bOk
=
true
;
switch
(
pCell
->
GetCellType
()
)
switch
(
aCell
.
meType
)
{
case
CELLTYPE_STRING
:
aStr
=
((
ScStringCell
*
)
pCell
)
->
GetString
();
nType
=
1
;
break
;
case
CELLTYPE_EDIT
:
aStr
=
((
ScEditCell
*
)
pCell
)
->
G
etString
();
aStr
=
aCell
.
g
etString
();
nType
=
1
;
break
;
case
CELLTYPE_VALUE
:
nVal
=
GetValueCellValue
(
aAdr
,
(
ScValueCell
*
)
pCell
);
nVal
=
GetValueCellValue
(
aAdr
,
aCell
.
mfValue
);
break
;
case
CELLTYPE_FORMULA
:
nErr
=
((
ScFormulaCell
*
)
pCell
)
->
GetErrCode
();
if
(
((
ScFormulaCell
*
)
pCell
)
->
IsValue
())
nVal
=
((
ScFormulaCell
*
)
pCell
)
->
GetValue
();
nErr
=
aCell
.
mpFormula
->
GetErrCode
();
if
(
aCell
.
mpFormula
->
IsValue
())
nVal
=
aCell
.
mpFormula
->
GetValue
();
else
aStr
=
((
ScFormulaCell
*
)
pCell
)
->
GetString
();
aStr
=
aCell
.
mpFormula
->
GetString
();
break
;
default
:
bOk
=
false
;
...
...
@@ -3580,43 +3578,33 @@ bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
{
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"sc"
,
"er"
,
"ScInterpreter::SetSbxVariable"
);
bool
bOk
=
true
;
ScBaseCell
*
pCell
=
pDok
->
GetCell
(
rPos
);
if
(
pCell
)
ScRefCellValue
aCell
;
aCell
.
assign
(
*
pDok
,
rPos
);
if
(
!
aCell
.
isEmpty
())
{
sal_uInt16
nErr
;
double
nVal
;
switch
(
pCell
->
GetCellType
()
)
switch
(
aCell
.
meType
)
{
case
CELLTYPE_VALUE
:
nVal
=
GetValueCellValue
(
rPos
,
(
ScValueCell
*
)
pCell
);
nVal
=
GetValueCellValue
(
rPos
,
aCell
.
mfValue
);
pVar
->
PutDouble
(
nVal
);
break
;
break
;
case
CELLTYPE_STRING
:
{
OUString
aVal
=
((
ScStringCell
*
)
pCell
)
->
GetString
();
pVar
->
PutString
(
aVal
);
break
;
}
case
CELLTYPE_EDIT
:
{
OUString
aVal
=
((
ScEditCell
*
)
pCell
)
->
GetString
();
pVar
->
PutString
(
aVal
);
break
;
}
pVar
->
PutString
(
aCell
.
getString
());
break
;
case
CELLTYPE_FORMULA
:
nErr
=
((
ScFormulaCell
*
)
pCell
)
->
GetErrCode
();
nErr
=
aCell
.
mpFormula
->
GetErrCode
();
if
(
!
nErr
)
{
if
(
((
ScFormulaCell
*
)
pCell
)
->
IsValue
()
)
if
(
aCell
.
mpFormula
->
IsValue
()
)
{
nVal
=
((
ScFormulaCell
*
)
pCell
)
->
GetValue
();
pVar
->
PutDouble
(
nVal
);
nVal
=
aCell
.
mpFormula
->
GetValue
();
pVar
->
PutDouble
(
aCell
.
mpFormula
->
GetValue
()
);
}
else
{
OUString
aVal
=
((
ScFormulaCell
*
)
pCell
)
->
GetString
();
pVar
->
PutString
(
aVal
);
}
pVar
->
PutString
(
aCell
.
mpFormula
->
GetString
());
}
else
SetError
(
nErr
),
bOk
=
false
;
...
...
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