From 4d90e1655a9756c1075993f77b0d760da7404253 Mon Sep 17 00:00:00 2001 From: wandererfan Date: Sat, 6 Jul 2024 14:36:20 -0400 Subject: [PATCH] [TD]fix display of spreadsheet cells with no horiz alignment --- src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp b/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp index a7b293152a..9ee90dffae 100644 --- a/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp +++ b/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp @@ -353,6 +353,18 @@ std::string DrawViewSpreadsheet::getSheetImage() << " font-size=\"" << TextSize.getValue() << "\"" << " fill=\"" << fcolor << "\">" << celltext << "" << std::endl; } + if (!(alignment & Spreadsheet::Cell::ALIGNMENT_LEFT) && + !(alignment & Spreadsheet::Cell::ALIGNMENT_RIGHT) && + !(alignment & Spreadsheet::Cell::ALIGNMENT_HCENTER) ) { + // no horizontal alignment specified, so we will default to + // Spreadsheet::Cell::ALIGNMENT_LEFT + result << " " << celltext << "" << std::endl; + } } rowoffset += sheet->getRowHeight(address.row()); }