lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 29e1c5a 8/8: Improve and expand PDF insuffici


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 29e1c5a 8/8: Improve and expand PDF insufficient-width warning
Date: Tue, 24 Apr 2018 07:02:37 -0400 (EDT)

branch: master
commit 29e1c5ad2554733385632d87a6a2559378818f8d
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Improve and expand PDF insufficient-width warning
---
 wx_table_generator.cpp | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index 9461876..a38d0c4 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -344,10 +344,20 @@ void wx_table_generator::do_compute_column_widths()
 // just because it's shorter and not necessarily worse (nor better).
             }
 
+        // PDF !! Before release, consider showing less information here.
         warning()
-            << "Not enough space for all fixed columns: "
-            << overflow
-            << " more pixels needed."
+            << "Not enough space for all " << num_columns << " columns."
+            << "\nPrintable width is " << total_width_ << " points."
+            << "\nData alone require " << total_fixed - 2 * column_margin_ * 
num_columns
+            << " points without any margins for legibility."
+            << "\nColumn margins of " << column_margin_ << " points on both 
sides"
+            << " would take up " << 2 * column_margin_ * num_columns << " 
additional points."
+            << "\nFor reference:"
+            << "\n'M' is " << dc_.GetTextExtent("M").x << " points wide."
+            << "\n'N' is " << dc_.GetTextExtent("N").x << " points wide."
+            << "\n'1' is " << dc_.GetTextExtent("1").x << " points wide."
+            << "\n'9' is " << dc_.GetTextExtent("9").x << " points wide."
+            << "\n',' is " << dc_.GetTextExtent(",").x << " points wide."
             << LMI_FLUSH
             ;
         return;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]