]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
added number_precision and changed DoubleToQString
authoraan <aan@opencascade.com>
Tue, 17 Feb 2009 12:53:44 +0000 (12:53 +0000)
committeraan <aan@opencascade.com>
Tue, 17 Feb 2009 12:53:44 +0000 (12:53 +0000)
src/TableViewer/TableViewer_ViewWindow.cxx

index 9e9305ed105fe0b644e74d48eb54ce2f2146c68d..83c95897409b63feccb32c3df14153db184f129f 100755 (executable)
@@ -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 ) );
       }