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
a2aea8ba
Kaydet (Commit)
a2aea8ba
authored
May 03, 2016
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
IFS/SWITCH propagate error only for active paths, tdf#97831 follow-up
Change-Id: Ief07f0d582e2f283a3ede88a7d202e8cff0e14bf
üst
bc4d4654
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
interpr4.cxx
sc/source/core/tool/interpr4.cxx
+2
-0
interpr8.cxx
sc/source/core/tool/interpr8.cxx
+10
-2
No files found.
sc/source/core/tool/interpr4.cxx
Dosyayı görüntüle @
a2aea8ba
...
@@ -3601,6 +3601,8 @@ bool IsErrFunc(OpCode oc)
...
@@ -3601,6 +3601,8 @@ bool IsErrFunc(OpCode oc)
case
ocIfError
:
case
ocIfError
:
case
ocIfNA
:
case
ocIfNA
:
case
ocErrorType_ODF
:
case
ocErrorType_ODF
:
case
ocIfs_MS
:
case
ocSwitch_MS
:
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
...
sc/source/core/tool/interpr8.cxx
Dosyayı görüntüle @
a2aea8ba
...
@@ -1872,6 +1872,7 @@ void ScInterpreter::ScIfs_MS()
...
@@ -1872,6 +1872,7 @@ void ScInterpreter::ScIfs_MS()
ReverseStack
(
nParamCount
);
ReverseStack
(
nParamCount
);
nGlobalError
=
0
;
// propagate only for condition or active result path
bool
bFinished
=
false
;
bool
bFinished
=
false
;
while
(
nParamCount
>
0
&&
!
bFinished
&&
!
nGlobalError
)
while
(
nParamCount
>
0
&&
!
bFinished
&&
!
nGlobalError
)
{
{
...
@@ -1930,6 +1931,7 @@ void ScInterpreter::ScSwitch_MS()
...
@@ -1930,6 +1931,7 @@ void ScInterpreter::ScSwitch_MS()
ReverseStack
(
nParamCount
);
ReverseStack
(
nParamCount
);
nGlobalError
=
0
;
// propagate only for match or active result path
bool
isValue
=
false
;
bool
isValue
=
false
;
double
fRefVal
=
0
;
double
fRefVal
=
0
;
svl
::
SharedString
aRefStr
;
svl
::
SharedString
aRefStr
;
...
@@ -1968,6 +1970,7 @@ void ScInterpreter::ScSwitch_MS()
...
@@ -1968,6 +1970,7 @@ void ScInterpreter::ScSwitch_MS()
return
;
return
;
}
}
nParamCount
--
;
nParamCount
--
;
sal_uInt16
nFirstMatchError
=
0
;
bool
bFinished
=
false
;
bool
bFinished
=
false
;
while
(
nParamCount
>
1
&&
!
bFinished
&&
!
nGlobalError
)
while
(
nParamCount
>
1
&&
!
bFinished
&&
!
nGlobalError
)
{
{
...
@@ -1977,14 +1980,17 @@ void ScInterpreter::ScSwitch_MS()
...
@@ -1977,14 +1980,17 @@ void ScInterpreter::ScSwitch_MS()
fVal
=
GetDouble
();
fVal
=
GetDouble
();
else
else
aStr
=
GetString
();
aStr
=
GetString
();
if
(
!
nFirstMatchError
)
nFirstMatchError
=
nGlobalError
;
nParamCount
--
;
nParamCount
--
;
if
(
(
isValue
&&
rtl
::
math
::
approxEqual
(
fRefVal
,
fVal
)
)
||
if
(
!
nGlobalError
&&
(
(
isValue
&&
rtl
::
math
::
approxEqual
(
fRefVal
,
fVal
)
)
||
(
!
isValue
&&
aRefStr
.
getDataIgnoreCase
()
==
aStr
.
getDataIgnoreCase
()
)
)
(
!
isValue
&&
aRefStr
.
getDataIgnoreCase
()
==
aStr
.
getDataIgnoreCase
()
)
)
)
{
{
// TRUE
// TRUE
if
(
nParamCount
<
1
)
if
(
nParamCount
<
1
)
{
{
// no parameter given for THEN
// no parameter given for THEN
nGlobalError
=
nFirstMatchError
;
PushParameterExpected
();
PushParameterExpected
();
return
;
return
;
}
}
...
@@ -2007,11 +2013,13 @@ void ScInterpreter::ScSwitch_MS()
...
@@ -2007,11 +2013,13 @@ void ScInterpreter::ScSwitch_MS()
PushNA
();
PushNA
();
return
;
return
;
}
}
nGlobalError
=
0
;
}
}
}
}
if
(
nGlobalError
||
!
bFinished
)
if
(
nGlobalError
||
!
bFinished
)
{
{
nGlobalError
=
nFirstMatchError
;
if
(
!
bFinished
)
if
(
!
bFinished
)
PushNA
();
// no true expression found
PushNA
();
// no true expression found
if
(
nGlobalError
)
if
(
nGlobalError
)
...
...
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