From: hartmann Date: Fri, 17 Mar 2000 16:26:20 +0000 (+0000) Subject: face lifting of the text output X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d03fdfdffe016f557274814a9af9b11b3e89e2e9;p=dealii-svn.git face lifting of the text output git-svn-id: https://svn.dealii.org/trunk@2594 0785d39b-7218-0410-832d-ea1e28bc413d --- 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"; }