diff --git a/cyberiadaml.c b/cyberiadaml.c index ddac345..4fc6cd1 100644 --- a/cyberiadaml.c +++ b/cyberiadaml.c @@ -2418,24 +2418,24 @@ static int cyberiada_write_node_title_yed(xmlTextWriterPtr writer, const char* t int res; XML_WRITE_OPEN_E_NS_I(writer, GRAPHML_YED_LABELNODE, GRAPHML_YED_NS, indent); - XML_WRITE_ATTR(writer, "alignment", "center"); - XML_WRITE_ATTR(writer, "backgroundColor", "#EBEBEB"); - XML_WRITE_ATTR(writer, "fontSize", "15"); - XML_WRITE_ATTR(writer, "fontStyle", "bold"); - XML_WRITE_ATTR(writer, "textColor", "#000000"); - XML_WRITE_ATTR(writer, "xml:space", "preserve"); - XML_WRITE_ATTR(writer, "hasLineColor", "false"); - XML_WRITE_ATTR(writer, "visible", "true"); - XML_WRITE_ATTR(writer, "horizontalTextPosition", "center"); - XML_WRITE_ATTR(writer, "verticalTextPosition", "top"); - XML_WRITE_ATTR(writer, "autoSizePolicy", "node_width"); - XML_WRITE_ATTR(writer, "y", "0"); - XML_WRITE_ATTR(writer, "height", "20"); - XML_WRITE_ATTR(writer, "configuration", "com.yworks.entityRelationship.label.name"); - XML_WRITE_ATTR(writer, "modelName", "internal"); - XML_WRITE_ATTR(writer, "modelPosition", "t"); - + if (*title) { + XML_WRITE_ATTR(writer, "alignment", "center"); + XML_WRITE_ATTR(writer, "backgroundColor", "#EBEBEB"); + XML_WRITE_ATTR(writer, "fontSize", "15"); + XML_WRITE_ATTR(writer, "fontStyle", "bold"); + XML_WRITE_ATTR(writer, "textColor", "#000000"); + XML_WRITE_ATTR(writer, "xml:space", "preserve"); + XML_WRITE_ATTR(writer, "hasLineColor", "false"); + XML_WRITE_ATTR(writer, "visible", "true"); + XML_WRITE_ATTR(writer, "horizontalTextPosition", "center"); + XML_WRITE_ATTR(writer, "verticalTextPosition", "top"); + XML_WRITE_ATTR(writer, "autoSizePolicy", "node_width"); + XML_WRITE_ATTR(writer, "y", "0"); + XML_WRITE_ATTR(writer, "height", "20"); + XML_WRITE_ATTR(writer, "configuration", "com.yworks.entityRelationship.label.name"); + XML_WRITE_ATTR(writer, "modelName", "internal"); + XML_WRITE_ATTR(writer, "modelPosition", "t"); XML_WRITE_TEXT(writer, title); } XML_WRITE_CLOSE_E(writer); diff --git a/cyberiadaml.h b/cyberiadaml.h index 78ea1d2..0fd69b3 100644 --- a/cyberiadaml.h +++ b/cyberiadaml.h @@ -189,7 +189,7 @@ typedef enum { /* Allocate the SM structure in memory (for heap usage) */ CyberiadaSM* cyberiada_create_sm(void); - /* Initialize the SM structure. */ + /* Initialize the SM structure */ /* Do not use the structure before the initialization! */ int cyberiada_init_sm(CyberiadaSM* sm); diff --git a/test.c b/test.c index 392e9c0..8109dbf 100644 --- a/test.c +++ b/test.c @@ -43,7 +43,7 @@ const char* commands[] = { const char* command_descr[] = { "print HSM diagram content to stdout; use -f key to set the scheme format (default - unknown)", - "convert HSM from format to into the file named " + "convert HSM from to into the file named " };