-// Copyright (C) 2006-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <gvc.h>
+#include <Qtx.h> // for Localizer
+
#include "Resource.hxx"
//#define _DEVDEBUG_
clock_t start_t, end_t;
start_t = clock();
#endif //_DEVDEBUG_
- GVC_t* aGvc = 0;
SubjectComposedNode *scnode = dynamic_cast<SubjectComposedNode*>(getSubject());
// ---- Create a graphviz context
- if(!aGvc)
- {
- DEBTRACE(setlocale(LC_ALL,NULL));
- //Graphviz is sensitive to locale : set the mimimal one ("C")for numeric
- setlocale(LC_NUMERIC, "C");
- //aginit();
- aGvc = gvContext();
- }
+ // Graphviz is sensitive to locale : set the mimimal one ("C")for numeric
+ Qtx::Localizer loc;
+
+ //aginit();
+ GVC_t* aGvc = gvContext();
// ---- Create a graph
width = QString(_format.c_str()).arg(lw, 0, 'g', 3);
DEBTRACE(agnameof(aNode) << " (" << nh << "," << nw << ") = (" << height.toStdString() << " ; " << width.toStdString() <<")");
- agset(aNode, const_cast<char*>("height"), height.toAscii().data());
- agset(aNode, const_cast<char*>("width"), width.toAscii().data());
+ agset(aNode, const_cast<char*>("height"), height.toLatin1().data());
+ agset(aNode, const_cast<char*>("width"), width.toLatin1().data());
agset(aNode, const_cast<char*>("shape"), const_cast<char*>("box") );
agset(aNode, const_cast<char*>("fixedsize"), const_cast<char*>("true") );
}
// --- Create edges (i.e. links)
- Agnode_t* aNode;
+ Agnode_t* aNode = NULL;
for (aNode = agfstnode(_graph); aNode; aNode = agnxtnode(_graph, aNode))
{
string aNodeName = agnameof(aNode);