/* -*- Mode: C; c-basic-offset: 4 -*- */
/* Dia -- a diagram creation/manipulation program
*
* vdx-xml.c: Visio XML import filter for dia
* Copyright (C) 2006-2007 Ian Redfern
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Generated Wed Jan 24 17:00:55 2007 */
/* From: All.vdx animation_tests.vdx Arrows-2.vdx Arrow & Text samples.vdx BasicShapes.vdx basic_tests.vdx Beispiel 1.vdx Beispiel 2.vdx Beispiel 3.vdx cable loom EL axis.vdx Circle1.vdx Circle2.vdx circle with angles.vdx curve_tests.vdx Drawing2.vdx Electrical system SatMax.vdx Embedded-Pics-1.vdx emf_dump_test2.orig.vdx emf_dump_test2.vdx Entreprise_etat_desire.vdx IMU-DD Ver2.vdx ISAD_page1.vdx ISAD_page2.vdx Line1.vdx Line2.vdx Line3.vdx Line4.vdx Line5.vdx Line6.vdx LombardiWireframe.vdx London-Citibank-Network-detail-02-15-2006.vdx London-Citibank-Network Detail-11-07-2005.vdx London-Citibank-racks-11-04-2005.vdx London-colo-move.vdx London-Colo-Network-detail-11-01-2005.vdx London-Colo-Racks-11-03-2005.vdx Network DiagramV2.vdx pattern_tests.vdx Processflow.vdx Rectangle1.vdx Rectangle2.vdx Rectangle3.vdx Rectangle4.vdx render-test.vdx sample1.vdx Sample2.vdx samp_vdx.vdx Satmax RF path.vdx seq_test.vdx Servo block diagram V2.vdx Servo block diagram V3.vdx Servo block diagram.vdx Sigma-function.vdx SmithWireframe.vdx states.vdx Text1.vdx Text2.vdx Text3.vdx text_tests.vdx Tracking Array - Level.vdx Tracking Array - Phase.vdx Wayzata-WAN-Detail.vdx Wayzata-WAN-Overview.vdx WDS Cabling.vdx */
#include <glib.h>
#include <string.h>
#include <libxml/tree.h>
#include "intl.h"
#include "message.h"
#include "geometry.h"
#include "filter.h"
#include "object.h"
#include "properties.h"
#include "propinternals.h"
#include "dia_xml_libxml.h"
#include "intl.h"
#include "create.h"
#include "group.h"
#include "font.h"
#include "vdx.h"
#include "visio-types.h"
/** Parses an XML object into internal representation
* @param cur the current XML node
* @param theDoc the current document (with its colour table)
* @param p a pointer to the storage to use, or NULL to allocate some
* @returns An internal representation, or NULL if unknown
*/
void *
vdx_read_object(xmlNodePtr cur, VDXDocument *theDoc, void *p)
{
xmlNodePtr child;
xmlAttrPtr attr;
if (!strcmp((char *)cur->name, "Act")) {
struct vdx_Act *s;
if (p) { s = (struct vdx_Act *)(p); }
else { s = g_new0(struct vdx_Act, 1); }
s->children = 0;
s->type = vdx_types_Act;
for (attr = cur->properties; attr; attr = attr->next) {
if (!strcmp((char *)attr->name, "ID") &&
attr->children && attr->children->content)
s->ID = atoi((char *)attr->children->content);
else if (!strcmp((char *)attr->name, "IX") &&
attr->children && attr->children->content)
s->IX = atoi((char *)attr->children->content);
else if (!strcmp((char *)attr->name, "Name") &&
attr->children && attr->children->content)
s->Name = (char *)attr->children->content;
else if (!strcmp((char *)attr->name, "NameU") &&
attr->children && attr->children->content)
s->NameU = (char *)attr->children->content;
}
for (child = cur->xmlChildrenNode; child; child = child->next) {
if (xmlIsBlankNode(child)) { continue; }
if (!strcmp((char *)child->name, "Action"))
{ if (child->children && child->children->content)
s->Action = atof((char *)child->children->content); }
else if (!strcmp((char *)child->name, "BeginGroup"))
{ if (child->children && child->children->content)
s->BeginGroup = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "ButtonFace"))
{ if (child->children && child->children->content)
s->ButtonFace = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "Checked"))
{ if (child->children && child->children->content)
s->Checked = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "Disabled"))
{ if (child->children && child->children->content)
s->Disabled = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "Invisible"))
{ if (child->children && child->children->content)
s->Invisible = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "Menu"))
{ if (child->children && child->children->content)
s->Menu = (char *)child->children->content; }
else if (!strcmp((char *)child->name, "ReadOnly"))
{ if (child->children && child->children->content)
s->ReadOnly = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "SortKey"))
{ if (child->children && child->children->content)
s->SortKey = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "TagName"))
{ if (child->children && child->children->content)
s->TagName = atoi((char *)child->children->content); }
else s->children =
g_slist_append(s->children,
vdx_read_object(child, theDoc, 0));
}
return s;
}
if (!strcmp((char *)cur->name, "Align")) {
struct vdx_Align *s;
if (p) { s = (struct vdx_Align *)(p); }
else { s = g_new0(struct vdx_Align, 1); }
s->children = 0;
s->type = vdx_types_Align;
for (attr = cur->properties; attr; attr = attr->next) {
}
for (child = cur->xmlChildrenNode; child; child = child->next) {
if (xmlIsBlankNode(child)) { continue; }
if (!strcmp((char *)child->name, "AlignBottom"))
{ if (child->children && child->children->content)
s->AlignBottom = atof((char *)child->children->content); }
else if (!strcmp((char *)child->name, "AlignCenter"))
{ if (child->children && child->children->content)
s->AlignCenter = atof((char *)child->children->content); }
else if (!strcmp((char *)child->name, "AlignLeft"))
{ if (child->children && child->children->content)
s->AlignLeft = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "AlignMiddle"))
{ if (child->children && child->children->content)
s->AlignMiddle = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "AlignRight"))
{ if (child->children && child->children->content)
s->AlignRight = atoi((char *)child->children->content); }
else if (!strcmp((char *)child->name, "AlignTop"))
{ if (child->children && child->children->content)
s->AlignTop = atof((char *)child->children->content); }
else s->children =
g_slist_append(s->children,
vdx_read_object
没有合适的资源?快使用搜索试试~ 我知道了~
dia 开源画图工具
需积分: 47 20 下载量 61 浏览量
2009-06-13
14:07:22
上传
评论
收藏 8.58MB GZ 举报
温馨提示
共2000个文件
png:1015个
shape:769个
c:342个
dia是开源的画图工具,可以清晰地画出流程图
资源推荐
资源详情
资源评论
收起资源包目录
dia 开源画图工具 (2000个子文件)
Makefile.am 14KB
Makefile.am 7KB
Makefile.am 4KB
Makefile.am 4KB
Makefile.am 3KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 980B
Makefile.am 885B
Makefile.am 869B
Makefile.am 783B
Makefile.am 780B
Makefile.am 742B
Makefile.am 701B
Makefile.am 698B
Makefile.am 674B
Makefile.am 660B
Makefile.am 655B
Makefile.am 652B
Makefile.am 651B
Makefile.am 630B
Makefile.am 621B
Makefile.am 617B
Makefile.am 593B
Makefile.am 574B
Makefile.am 570B
Makefile.am 556B
Makefile.am 543B
Makefile.am 532B
Makefile.am 506B
Makefile.am 502B
Makefile.am 480B
Makefile.am 474B
Makefile.am 474B
Makefile.am 471B
Makefile.am 467B
Makefile.am 459B
Makefile.am 445B
Makefile.am 439B
Makefile.am 436B
Makefile.am 417B
Makefile.am 417B
Makefile.am 402B
Makefile.am 368B
Makefile.am 365B
Makefile.am 352B
Makefile.am 348B
Makefile.am 347B
Makefile.am 330B
Makefile.am 329B
Makefile.am 325B
Makefile.am 317B
Makefile.am 313B
Makefile.am 283B
Makefile.am 282B
Makefile.am 271B
Makefile.am 266B
Makefile.am 258B
Makefile.am 247B
Makefile.am 239B
Makefile.am 235B
Makefile.am 224B
Makefile.am 221B
Makefile.am 218B
Makefile.am 214B
Makefile.am 207B
Makefile.am 207B
Makefile.am 207B
Makefile.am 205B
Makefile.am 199B
Makefile.am 196B
Makefile.am 196B
Makefile.am 196B
Makefile.am 189B
Makefile.am 183B
Makefile.am 165B
Makefile.am 131B
Makefile.am 106B
Makefile.am 89B
Makefile.am 76B
Makefile.am 18B
Makefile.am 16B
Makefile.am 15B
Makefile.am 15B
Makefile.am 15B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
loveyoukissyou
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功