Commit fce559ce authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

Bug 24228 - Файл с формулами портится после экспорта в XLSX.

изменена функция преобразования числа в строку.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56265 954022d7-b5bf-4e40-9824-e11837661b57
parent 5e587e81
......@@ -388,16 +388,15 @@ namespace OOX
static CString combineRef(int nRow, int nCol)
{
nRow++;
CString sRes;
if (nCol >= 702) {
int nDig = (nCol / 676 - 1) % 26;
sRes.AppendChar('A' + nDig);
}
if (nCol >= 26) {
int nDig = (nCol / 26 - 1) % 26;
sRes.AppendChar('A' + nDig);
CString sRes = _T("");
if(nCol >= 0){
int columnNumber = nCol + 1;
while(columnNumber > 0){
int currentLetterNumber = (columnNumber - 1) % 26;
sRes.Insert(0, 'A' + currentLetterNumber);
columnNumber = (columnNumber - (currentLetterNumber + 1)) / 26;
}
}
sRes.AppendChar('A' + (nCol % 26));
sRes.AppendFormat(_T("%d"), nRow);
return sRes;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment