https://bz.apache.org/ooo/show_bug.cgi?id=128494
Peter <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #8 from Peter <[email protected]> --- code in question main/sc/source/core/tool/interpr1.cxx line:4349 if I check 4377 else if (GetStackType() == svMatrix) { pMatSrc = PopMatrix(); if (!pMatSrc) { PushIllegalParameter(); return; } } looking at Index (8347) in comparison case svMatrix: { if (nArea != 1) SetError(errIllegalArgument); sal_uInt16 nOldSp = sp; ScMatrixRef pMat = GetMatrix(); if (pMat) { SCSIZE nC, nR; pMat->GetDimensions(nC, nR); // Access one element of a vector independent of col/row // orientation? bool bVector = ((nCol == 0 || nRow == 0) && (nC == 1 || nR == 1)); SCSIZE nElement = ::std::max( static_cast<SCSIZE>(nCol), static_cast<SCSIZE>(nRow)); if (nC == 0 || nR == 0 || (!bVector && (static_cast<SCSIZE>(nCol) > nC || static_cast<SCSIZE>(nRow) > nR)) || (bVector && nElement > nC * nR)) PushIllegalArgument(); else if (nCol == 0 && nRow == 0) sp = nOldSp; else if (bVector) { --nElement; if (pMat->IsString( nElement)) PushString( pMat->GetString( nElement)); else PushDouble( pMat->GetDouble( nElement)); } else if (nCol == 0) { ScMatrixRef pResMat = GetNewMat(nC, 1); if (pResMat) { SCSIZE nRowMinus1 = static_cast<SCSIZE>(nRow - 1); for (SCSIZE i = 0; i < nC; i++) if (!pMat->IsString(i, nRowMinus1)) pResMat->PutDouble(pMat->GetDouble(i, nRowMinus1), i, 0); else pResMat->PutString(pMat->GetString(i, nRowMinus1), i, 0); PushMatrix(pResMat); } else PushIllegalArgument(); } else if (nRow == 0) { ScMatrixRef pResMat = GetNewMat(1, nR); if (pResMat) { SCSIZE nColMinus1 = static_cast<SCSIZE>(nCol - 1); for (SCSIZE i = 0; i < nR; i++) if (!pMat->IsString(nColMinus1, i)) pResMat->PutDouble(pMat->GetDouble(nColMinus1, i), i); else pResMat->PutString(pMat->GetString(nColMinus1, i), i); PushMatrix(pResMat); } else PushIllegalArgument(); } else { if (!pMat->IsString( static_cast<SCSIZE>(nCol-1), static_cast<SCSIZE>(nRow-1))) PushDouble( pMat->GetDouble( static_cast<SCSIZE>(nCol-1), static_cast<SCSIZE>(nRow-1))); else PushString( pMat->GetString( static_cast<SCSIZE>(nCol-1), static_cast<SCSIZE>(nRow-1))); } } } break; ohh my... -- You are receiving this mail because: You are the assignee for the issue.
