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
41ba5f64
Kaydet (Commit)
41ba5f64
authored
Haz 01, 2017
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Perf: do not calculate a null-operation with the result matrix, tdf#58874
Change-Id: I6fe115ff7ec7960900863ddaf1cd1dc48975fd74
üst
9c32973e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
interpre.hxx
sc/source/core/inc/interpre.hxx
+1
-1
interpr1.cxx
sc/source/core/tool/interpr1.cxx
+14
-4
No files found.
sc/source/core/inc/interpre.hxx
Dosyayı görüntüle @
41ba5f64
...
@@ -575,7 +575,7 @@ size_t GetRefListArrayMaxSize( short nParamCount );
...
@@ -575,7 +575,7 @@ size_t GetRefListArrayMaxSize( short nParamCount );
/** Switch to array reference list if current TOS is one and create/init or
/** Switch to array reference list if current TOS is one and create/init or
update matrix and return true. Else return false. */
update matrix and return true. Else return false. */
bool
SwitchToArrayRefList
(
ScMatrixRef
&
xResMat
,
SCSIZE
nMatRows
,
double
fCurrent
,
bool
SwitchToArrayRefList
(
ScMatrixRef
&
xResMat
,
SCSIZE
nMatRows
,
double
fCurrent
,
const
std
::
function
<
void
(
SCSIZE
i
,
double
fCurrent
)
>&
MatOpFunc
);
const
std
::
function
<
void
(
SCSIZE
i
,
double
fCurrent
)
>&
MatOpFunc
,
bool
bDoMatOp
);
void
IterateParameters
(
ScIterFunc
,
bool
bTextAsZero
=
false
);
void
IterateParameters
(
ScIterFunc
,
bool
bTextAsZero
=
false
);
void
ScSumSQ
();
void
ScSumSQ
();
void
ScSum
();
void
ScSum
();
...
...
sc/source/core/tool/interpr1.cxx
Dosyayı görüntüle @
41ba5f64
...
@@ -3457,7 +3457,7 @@ void ScInterpreter::ScUnichar()
...
@@ -3457,7 +3457,7 @@ void ScInterpreter::ScUnichar()
}
}
bool ScInterpreter::SwitchToArrayRefList( ScMatrixRef& xResMat, SCSIZE nMatRows, double fCurrent,
bool ScInterpreter::SwitchToArrayRefList( ScMatrixRef& xResMat, SCSIZE nMatRows, double fCurrent,
const
std
::
function
<
void
(
SCSIZE
i
,
double
fCurrent
)
>&
MatOpFunc
)
const std::function<void( SCSIZE i, double fCurrent )>& MatOpFunc
, bool bDoMatOp
)
{
{
const ScRefListToken* p = dynamic_cast<const ScRefListToken*>(pStack[sp-1]);
const ScRefListToken* p = dynamic_cast<const ScRefListToken*>(pStack[sp-1]);
if (!p || !p->IsArrayResult())
if (!p || !p->IsArrayResult())
...
@@ -3470,7 +3470,7 @@ bool ScInterpreter::SwitchToArrayRefList( ScMatrixRef& xResMat, SCSIZE nMatRows,
...
@@ -3470,7 +3470,7 @@ bool ScInterpreter::SwitchToArrayRefList( ScMatrixRef& xResMat, SCSIZE nMatRows,
xResMat = GetNewMat( 1, nMatRows, true);
xResMat = GetNewMat( 1, nMatRows, true);
xResMat->FillDouble( fCurrent, 0,0, 0,nMatRows-1);
xResMat->FillDouble( fCurrent, 0,0, 0,nMatRows-1);
}
}
else
else
if (bDoMatOp)
{
{
// Current value and values from vector are operands
// Current value and values from vector are operands
// for each vector position.
// for each vector position.
...
@@ -3533,8 +3533,13 @@ void ScInterpreter::ScMin( bool bTextAsZero )
...
@@ -3533,8 +3533,13 @@ void ScInterpreter::ScMin( bool bTextAsZero )
break;
break;
case svRefList :
case svRefList :
{
{
if
(
SwitchToArrayRefList
(
xResMat
,
nMatRows
,
nMin
,
MatOpFunc
))
// bDoMatOp only for non-array value when switching to
// ArrayRefList.
if (SwitchToArrayRefList( xResMat, nMatRows, nMin, MatOpFunc,
nRefArrayPos == std::numeric_limits<size_t>::max()))
{
nRefArrayPos = nRefInList;
nRefArrayPos = nRefInList;
}
}
}
SAL_FALLTHROUGH;
SAL_FALLTHROUGH;
case svDoubleRef :
case svDoubleRef :
...
@@ -3683,8 +3688,13 @@ void ScInterpreter::ScMax( bool bTextAsZero )
...
@@ -3683,8 +3688,13 @@ void ScInterpreter::ScMax( bool bTextAsZero )
break;
break;
case svRefList :
case svRefList :
{
{
if
(
SwitchToArrayRefList
(
xResMat
,
nMatRows
,
nMax
,
MatOpFunc
))
// bDoMatOp only for non-array value when switching to
// ArrayRefList.
if (SwitchToArrayRefList( xResMat, nMatRows, nMax, MatOpFunc,
nRefArrayPos == std::numeric_limits<size_t>::max()))
{
nRefArrayPos = nRefInList;
nRefArrayPos = nRefInList;
}
}
}
SAL_FALLTHROUGH;
SAL_FALLTHROUGH;
case svDoubleRef :
case svDoubleRef :
...
...
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