From 2e860b8508c17a3aea353c3ce3d4ac1fd28d9477 Mon Sep 17 00:00:00 2001 From: aan Date: Tue, 17 Feb 2009 12:53:44 +0000 Subject: [PATCH] added number_precision and changed DoubleToQString --- src/TableViewer/TableViewer_ViewWindow.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/TableViewer/TableViewer_ViewWindow.cxx b/src/TableViewer/TableViewer_ViewWindow.cxx index 9e9305ed1..83c958974 100755 --- a/src/TableViewer/TableViewer_ViewWindow.cxx +++ b/src/TableViewer/TableViewer_ViewWindow.cxx @@ -528,10 +528,12 @@ void TableViewer_ViewWindow::exportTableData( Handle(HTMLService_HTMLTable)& tab bool isExpImg = true; bool dotToComma = false; + int number_precision; SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); if ( resMgr ) { isExpImg = resMgr->booleanValue( "TableViewer", "export_table_images", true ); dotToComma = resMgr->booleanValue( "TableViewer", "replace_dot_by_comma", true ); + number_precision = resMgr->integerValue( "TableViewer", "number_precision", 6 ); } for ( int c = 0, nbC = numCols( type ); c < nbC; c++ ) { @@ -554,7 +556,7 @@ void TableViewer_ViewWindow::exportTableData( Handle(HTMLService_HTMLTable)& tab double aVal = TableViewer_Tool::ToDouble( txt, aDbl ); if ( aDbl ) cell->InsertText( TableViewer_Tool::ToExtString( - TableViewer_Tool::DoubleToQString( aVal, dotToComma ) ) ); + TableViewer_Tool::DoubleToQString( aVal, number_precision, false, dotToComma ) ) ); else cell->InsertText( TableViewer_Tool::ToExtString( txt ) ); } -- 2.39.2