diff --git a/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp b/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp index 36bd382ffd..3b1d7c8d6d 100644 --- a/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp +++ b/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp @@ -259,12 +259,16 @@ std::string DrawViewSpreadsheet::getSheetImage() col != validColNames.end(); ++col) { // create a group for each column result << " " << std::endl; + float naturalColumnWidth = 0.0; for (std::vector::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 << " " << std::endl; rowoffset = 0.0; - coloffset += cellwidth; + coloffset += naturalColumnWidth; } // close the containing group