TechDraw: Fix spreadsheet incorrect render due to cell merges
This commit is contained in:
committed by
Chris Hennes
parent
ff349c81d6
commit
ddaa841036
@@ -259,12 +259,16 @@ std::string DrawViewSpreadsheet::getSheetImage()
|
||||
col != validColNames.end(); ++col) {
|
||||
// create a group for each column
|
||||
result << " <g id=\"" << ViewName << "_col" << (*col) << "\">" << std::endl;
|
||||
float naturalColumnWidth = 0.0;
|
||||
for (std::vector<int>::const_iterator row = validRowNumbers.begin();
|
||||
row != validRowNumbers.end(); ++row) {
|
||||
// get cell size
|
||||
std::stringstream srow;
|
||||
srow << (*row);
|
||||
App::CellAddress address((*col) + srow.str());
|
||||
if (naturalColumnWidth == 0.0) {
|
||||
naturalColumnWidth = sheet->getColumnWidth(address.col());
|
||||
}
|
||||
cellwidth = sheet->getColumnWidth(address.col());
|
||||
cellheight = sheet->getRowHeight(address.row());
|
||||
celltext = "";
|
||||
@@ -372,7 +376,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
|
||||
}
|
||||
result << " </g>" << std::endl;
|
||||
rowoffset = 0.0;
|
||||
coloffset += cellwidth;
|
||||
coloffset += naturalColumnWidth;
|
||||
}
|
||||
|
||||
// close the containing group
|
||||
|
||||
Reference in New Issue
Block a user