从零参与Syncthing文档本地化:开源贡献的完整经验
2026/10/13 16:42:00
电子表格的单元格以矩阵形式组织,矩阵大小由常量ROWS和COLS决定。m_buffer是一个二维数组,用于存储单元格。
const int ROWS = 10; const int COLS = 5; class CellMatrix { public: CellMatrix(); CellMatrix(const CellMatrix& cellMatrix); CellMatrix operator=(const CellMatrix& cellMatrix); void SetTargetSetMatrix(TSetMatrix* pTargetSetMatrix); Cell* Get(int iRow, int iCol) const; Cell* Get(Reference home) const; void Serialize(CArchive& archive); private: Cell m_buffer[ROWS][COLS]; };CellMat