From d03fdfdffe016f557274814a9af9b11b3e89e2e9 Mon Sep 17 00:00:00 2001 From: hartmann Date: Fri, 17 Mar 2000 16:26:20 +0000 Subject: [PATCH] face lifting of the text output git-svn-id: https://svn.dealii.org/trunk@2594 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/table_handler.cc | 37 +++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/deal.II/base/source/table_handler.cc b/deal.II/base/source/table_handler.cc index 6b2eea8517..d34fa35820 100644 --- a/deal.II/base/source/table_handler.cc +++ b/deal.II/base/source/table_handler.cc @@ -215,18 +215,43 @@ void TableHandler::write_text(ostream &out) const for (unsigned int j=0; j >::const_iterator super_iter=supercolumns.find(key); - unsigned int max_string_size=6; - if (super_iter!=supercolumns.end()) - max_string_size+=8*(super_iter->second.size()-1); + + if (super_iter!=supercolumns.end()) // if supercolumn + { + vector::const_iterator col_key=super_iter->second.begin(); + for (;col_key!=super_iter->second.end(); ++col_key) + { + const map::const_iterator + col_iter=columns.find(*col_key); + if (col_iter->second.scientific && + col_iter->second.precision>1) + column_string_size+=16; + else + column_string_size+=8; + } + } + else + { + const map::const_iterator + col_iter=columns.find(key); + if (col_iter->second.scientific && + col_iter->second.precision>1) + column_string_size=16; + else + column_string_size=8; + } + column_string_size-=1; - if (key.size()>max_string_size) - key.erase(max_string_size); + if (key.size()>column_string_size) + key.erase(column_string_size); out.setf(ios::left); - out << setw(max_string_size) + out << setw(column_string_size) // << setfill('*') << key.c_str() << "\t"; } -- 2.39.5