Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case DATETIME_TRANSFORMATION_TYPE::START_OF_YEAR:
- {
- for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
- {
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
- if (eType == CELLTYPE_VALUE)
- {
- double nVal = rDoc.GetValue(rCol, nRow, 0);
- SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
- Date aDate = getDate(nVal, pFormatter);
- nVal -= getDayOfYear(aDate.GetDay(), aDate.GetMonth(), aDate.GetYear()) + 1;
- SvNumFormatType nFormatType = SvNumFormatType::DATETIME;
- LanguageType eLanguage = ScGlobal::eLnge;
- ScAddress aAddress(rCol, nRow, 0);
- sal_uLong nFormat = pFormatter->GetStandardFormat( nFormatType, eLanguage );
- rDoc.SetValue(rCol, nRow, 0, nVal);
- rDoc.SetNumberFormat(aAddress, nFormat);
- }
- }
- }
Add Comment
Please, Sign In to add comment