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
0f8174da
Kaydet (Commit)
0f8174da
authored
Eki 19, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bail out early.
Change-Id: Id2dcaebd8213704c777f77bf7fb735a9788d68bd
üst
5df31d1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
54 deletions
+59
-54
interpr1.cxx
sc/source/core/tool/interpr1.cxx
+59
-54
No files found.
sc/source/core/tool/interpr1.cxx
Dosyayı görüntüle @
0f8174da
...
@@ -940,70 +940,75 @@ sc::RangeMatrix ScInterpreter::CompareMat( sc::CompareOptions* pOptions )
...
@@ -940,70 +940,75 @@ sc::RangeMatrix ScInterpreter::CompareMat( sc::CompareOptions* pOptions )
}
}
sc::RangeMatrix aRes;
sc::RangeMatrix aRes;
if( !nGlobalError )
{
if (nGlobalError)
if (aMat[0].mpMat && aMat[1].mpMat)
{
{
nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
SCSIZE nC0, nC1;
return aRes;
SCSIZE nR0, nR1;
}
aMat[0].mpMat->GetDimensions(nC0, nR0);
aMat[1].mpMat->GetDimensions(nC1, nR1);
if (aMat[0].mpMat && aMat[1].mpMat)
SCSIZE nC = std::max( nC0, nC1 );
{
SCSIZE nR = std::max( nR0, nR1 );
SCSIZE nC0, nC1;
aRes.mpMat = GetNewMat( nC, nR);
SCSIZE nR0, nR1;
if (!aRes.mpMat)
aMat[0].mpMat->GetDimensions(nC0, nR0);
return aRes;
aMat[1].mpMat->GetDimensions(nC1, nR1);
for ( SCSIZE j=0; j<nC; j++ )
SCSIZE nC = std::max( nC0, nC1 );
{
SCSIZE nR = std::max( nR0, nR1 );
for ( SCSIZE k=0; k<nR; k++ )
aRes.mpMat = GetNewMat( nC, nR);
{
if (!aRes.mpMat)
SCSIZE nCol = j, nRow = k;
return aRes;
if (aMat[0].mpMat->ValidColRowOrReplicated(nCol, nRow) &&
for ( SCSIZE j=0; j<nC; j++ )
aMat[1].mpMat->ValidColRowOrReplicated(nCol, nRow))
{
for ( SCSIZE k=0; k<nR; k++ )
{
SCSIZE nCol = j, nRow = k;
if (aMat[0].mpMat->ValidColRowOrReplicated(nCol, nRow) &&
aMat[1].mpMat->ValidColRowOrReplicated(nCol, nRow))
{
for ( short i=1; i>=0; i-- )
{
{
for ( short i=1; i>=0; i--
)
if (aMat[i].mpMat->IsString(j, k)
)
{
{
if (aMat[i].mpMat->IsString(j, k))
aComp.bVal[i] = false;
{
*aComp.pVal[i] = aMat[i].mpMat->GetString(j, k).getString();
aComp.bVal[i] = false;
aComp.bEmpty[i] = aMat[i].mpMat->IsEmpty(j, k);
*aComp.pVal[i] = aMat[i].mpMat->GetString(j, k).getString();
}
aComp.bEmpty[i] = aMat[i].mpMat->IsEmpty(j, k);
else
}
{
else
aComp.bVal[i] = true;
{
aComp.nVal[i] = aMat[i].mpMat->GetDouble(j, k);
aComp.bVal[i] = true;
aComp.bEmpty[i] = false;
aComp.nVal[i] = aMat[i].mpMat->GetDouble(j, k);
aComp.bEmpty[i] = false;
}
}
}
aRes.mpMat->PutDouble(sc::CompareFunc(aComp, pOptions), j, k);
}
}
else
aRes.mpMat->PutDouble(sc::CompareFunc(aComp, pOptions), j, k);
aRes.mpMat->PutString(mrStrPool.intern(ScGlobal::GetRscString(STR_NO_VALUE)), j, k);
}
}
else
aRes.mpMat->PutString(mrStrPool.intern(ScGlobal::GetRscString(STR_NO_VALUE)), j, k);
}
}
}
}
else if (aMat[0].mpMat || aMat[1].mpMat)
}
{
else if (aMat[0].mpMat || aMat[1].mpMat)
size_t i = ( aMat[0].mpMat ? 0 : 1);
{
SCSIZE nC, nR;
size_t i = ( aMat[0].mpMat ? 0 : 1);
aMat[i].mpMat->GetDimensions(nC, nR);
SCSIZE nC, nR;
aRes.mpMat = GetNewMat(nC, nR, false);
aMat[i].mpMat->GetDimensions(nC, nR);
if (!aRes.mpMat)
aRes.mpMat = GetNewMat(nC, nR, false);
return aRes;
if (!aRes.mpMat)
return aRes;
aRes.mnCol1 = aMat[i].mnCol1;
aRes.mnCol1 = aMat[i].mnCol1;
aRes.mnRow1 = aMat[i].mnRow1;
aRes.mnRow1 = aMat[i].mnRow1;
aRes.mnTab1 = aMat[i].mnTab1;
aRes.mnTab1 = aMat[i].mnTab1;
aRes.mnCol2 = aMat[i].mnCol2;
aRes.mnCol2 = aMat[i].mnCol2;
aRes.mnRow2 = aMat[i].mnRow2;
aRes.mnRow2 = aMat[i].mnRow2;
aRes.mnTab2 = aMat[i].mnTab2;
aRes.mnTab2 = aMat[i].mnTab2;
ScMatrix& rMat = *aMat[i].mpMat;
ScMatrix& rMat = *aMat[i].mpMat;
ScMatrix& rResMat = *aRes.mpMat;
ScMatrix& rResMat = *aRes.mpMat;
rMat.CompareMatrix(rResMat, aComp, i, pOptions);
rMat.CompareMatrix(rResMat, aComp, i, pOptions);
}
}
}
nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
return aRes;
return aRes;
}
}
...
...
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