作図ソフト dia の改良版
修订版 | d6d52246846b09916ff6d8feb7c1569ec159c0c7 (tree) |
---|---|
时间 | 2007-03-17 15:32:07 |
作者 | Lars Clausen <lclausen@src....> |
Commiter | Lars Clausen |
Pre8: Three crash bugs fixed.
svn path=/trunk/; revision=3634
@@ -1,3 +1,25 @@ | ||
1 | +2007-03-16 Lars Clausen <lars@raeder.dk> | |
2 | + | |
3 | + * NEWS: | |
4 | + * RELEASE-PROCESS: | |
5 | + * config.h.win32: | |
6 | + * doc/en/dia.xml: | |
7 | + * doc/pl/dia.xml: | |
8 | + * doc/eu/dia.xml: | |
9 | + * configure.in: Pre8? Really? Furrfu! | |
10 | + | |
11 | + * doc/en/Makefile.am (dia.1): Allow net access for getting the | |
12 | + XSLT. Let's see if it causes more problems than it solves. Fixes | |
13 | + bug #391545. | |
14 | + | |
15 | + * app/textedit.c (textedit_remove_focus): Do not free that which | |
16 | + has not been allocated (focus!). Fixes bug #418188. | |
17 | + | |
18 | + * plug-ins/pgf/render_pgf.c (draw_*_with_arrows): Don't | |
19 | + assume that the arrow pointers are non-null. Fixes bug #413309 | |
20 | + | |
21 | + * plug-ins/vdx/vdx-import.c: Patch to fix crash bug #417956. | |
22 | + | |
1 | 23 | 2007-03-14 Steffen Macke <sdteffen@gmail.com> |
2 | 24 | |
3 | 25 | * installer/win32/locale/slovak.nsh: (added) |
@@ -7,6 +29,9 @@ | ||
7 | 29 | |
8 | 30 | 2007-03-11 Lars Clausen <lars@raeder.dk> |
9 | 31 | |
32 | + * widgets.c (get_units_name_list): | |
33 | + * widgets.h: New function to give names of units for prefs. | |
34 | + | |
10 | 35 | * NEWS: |
11 | 36 | * RELEASE-PROCESS: |
12 | 37 | * config.h.win32: |
@@ -1,3 +1,7 @@ | ||
1 | +dia-0.96-pre8: 16-Mar-2007 | |
2 | + | |
3 | + * Eighth prerelease for 0.96. Fixes three crash bugs. | |
4 | + | |
1 | 5 | dia-0.96-pre7: 11-Mar-2007 |
2 | 6 | |
3 | 7 | * Seventh prerelease for 0.96. Fixes two crash bugs and image redrawing |
@@ -170,7 +170,6 @@ textedit_remove_focus(DiaObject *obj, Diagram *diagram) | ||
170 | 170 | /* TODO: make sure the focus is deactivated */ |
171 | 171 | textedit_end_edit(ddisplay_active(), old_focus); |
172 | 172 | } |
173 | - g_free(old_focus); | |
174 | 173 | } |
175 | 174 | |
176 | 175 | /** Call when the entire list of focusable texts gets reset. */ |
@@ -18,7 +18,7 @@ | ||
18 | 18 | #undef LOCALEDIR /* needs to be calculated at runtime */ |
19 | 19 | /* NOT: #define LOCALEDIR "../lib/locale" */ |
20 | 20 | |
21 | -#define VERSION "0.96-pre7" | |
21 | +#define VERSION "0.96-pre8" | |
22 | 22 | |
23 | 23 | /* |
24 | 24 | * We are linking libxml as DLL with either msvc or mingw, but this |
@@ -1,6 +1,6 @@ | ||
1 | 1 | dnl Process this -*- autoconf -*- file with autoconf to produce a |
2 | 2 | dnl configure script. |
3 | -AC_INIT(dia, 0.96-pre7, http://bugzilla.gnome.org/enter_bug.cgi?product=dia) | |
3 | +AC_INIT(dia, 0.96-pre8, http://bugzilla.gnome.org/enter_bug.cgi?product=dia) | |
4 | 4 | AC_CONFIG_SRCDIR(app/diagram.c) |
5 | 5 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION) |
6 | 6 |
@@ -39,7 +39,7 @@ DISTCLEANFILES = dia.1 | ||
39 | 39 | # --nonet. But I don't think that's going to solve more problems |
40 | 40 | # than it causes. |
41 | 41 | dia.1: dia.dbk |
42 | - xsltproc --nonet --novalid $(DB2MAN) $< >dia.1 | |
42 | + xsltproc --novalid $(DB2MAN) $< >dia.1 | |
43 | 43 | endif |
44 | 44 | |
45 | 45 | man_MANS = dia.1 |
@@ -1,189 +0,0 @@ | ||
1 | -.\"Generated by db2man.xsl. Don't modify this, modify the source. | |
2 | -.de Sh \" Subsection | |
3 | -.br | |
4 | -.if t .Sp | |
5 | -.ne 5 | |
6 | -.PP | |
7 | -\fB\\$1\fR | |
8 | -.PP | |
9 | -.. | |
10 | -.de Sp \" Vertical space (when we can't use .PP) | |
11 | -.if t .sp .5v | |
12 | -.if n .sp | |
13 | -.. | |
14 | -.de Ip \" List item | |
15 | -.br | |
16 | -.ie \\n(.$>=3 .ne \\$3 | |
17 | -.el .ne 3 | |
18 | -.IP "\\$1" \\$2 | |
19 | -.. | |
20 | -.TH "DIA" 1 "2004-11-26" "" "" | |
21 | -.SH NAME | |
22 | -dia \- a diagram drawing program | |
23 | -.SH "SYNOPSIS" | |
24 | -.ad l | |
25 | -.hy 0 | |
26 | -.HP 4 | |
27 | -\fBdia\fR [\fB\-c\fR] [\fB\-\-credits\fR] [\fB\-e\ \fIOUTPUT\fR\fR] [\fB\-\-export=\fIOUTPUT\fR\fR] [\fB\-L\ \fILAYER,LAYER,\&.\&.\&.\fR\fR] [\fB\-\-show\-layers=\fILAYER,LAYER,\&.\&.\&.\fR\fR] [\fB\-h\fR] [\fB\-\-help\fR] [\fB\-n\fR] [\fB\-\-nosplash\fR] [\fB\-s\ \fIWxH\fR\fR] [\fB\-\-size=\fIWxH\fR\fR] [\fB\-t\ \fIFORMAT\fR\fR] [\fB\-\-filter=\fIFORMAT\fR\fR] [\fB\-v\fR] [\fB\-\-version\fR] [file\ \&.\&.\&.] | |
28 | -.ad | |
29 | -.hy | |
30 | - | |
31 | -.SH "DESCRIPTION" | |
32 | - | |
33 | -.PP | |
34 | -\fBDia\fR is used to create diagrams\&. Dia has a number of basic tools, like lines and boxes but can also dynamically load \fIsheets\fR\&. A sheet is a collection of tools that are used in a certain type of diagram\&. | |
35 | - | |
36 | -.PP | |
37 | -Most diagram objects in \fBDia\fR have \fIconnection points\fR\&. Lines can be connected to these connection points and this way graph structures can be formed\&. When objects are moved or resized the connections will follow the objects\&. | |
38 | - | |
39 | -.PP | |
40 | -Diagrams drawn in \fBDia\fR can be exported PostScript\&. | |
41 | - | |
42 | -.SH "OPTIONS" | |
43 | - | |
44 | -.PP | |
45 | -\fBDia\fR accepts the following options: | |
46 | - | |
47 | -.TP | |
48 | -\fB\-c\fR \fB\-\-credits\fR | |
49 | -Display credits list and exit\&. | |
50 | - | |
51 | -.TP | |
52 | -\fB\-e \fIOUTPUT\fR\fR \fB\-\-export=\fIOUTPUT\fR\fR | |
53 | -Export loaded file to OUTPUT and exit\&. | |
54 | - | |
55 | -.TP | |
56 | -\fB\-h\fR \fB\-\-help\fR | |
57 | -Display a list of all commandline options\&. | |
58 | - | |
59 | -.TP | |
60 | -\fB\-n\fR \fB\-\-nosplash\fR | |
61 | -Do not show the splash screen\&. | |
62 | - | |
63 | -.TP | |
64 | -\fB\-s \fIWxH\fR\fR \fB\-\-size=\fIWxH\fR\fR | |
65 | -Export loaded file in decimal given width and/or height\&. It is allowed to only select width or height\&. E\&.g\&. \fB\-\-size=\fI520x\fR\fR exports an image that is 520 pixels wide, while \fB\-\-size=\fIx900\fR\fR exports an image of 900 pixels height\&. | |
66 | - | |
67 | -.RS | |
68 | -.Sh "Note" | |
69 | -This option is currently only implemented for the PNG export filter\&. | |
70 | - | |
71 | -.RE | |
72 | - | |
73 | -.TP | |
74 | -\fB\-L \fILAYER,LAYER,\&.\&.\&.\fR\fR \fB\-\-show\-layers=\fILAYER,LAYER,\&.\&.\&.\fR\fR | |
75 | -Only include specified layers when exporting\&. Layers can be specified either as a layer name, the layer number or a numeric range X\-Y of layers\&. \-\-show\-layers=background,2\-5 shows the layer named background and layers 2\-5, \-\-show\-layers=2\- shows layers 2 and up\&. | |
76 | - | |
77 | -.TP | |
78 | -\fB\-t \fIFORMAT\fR\fR \fB\-\-export\-to\-format=\fIFORMAT\fR\fR | |
79 | -Export loaded file in FORMAT and exit\&. Format are described below\&. | |
80 | - | |
81 | -.TP | |
82 | -\fB\-v\fR \fB\-\-version\fR | |
83 | -Display \fBdia\fR version and exit\&. | |
84 | - | |
85 | -.SH "EXPORT FORMATS" | |
86 | - | |
87 | -.PP | |
88 | -The following export formats are supported by \fBdia\fR\&. | |
89 | - | |
90 | -.TP 3 | |
91 | -\(bu | |
92 | -cgm (Computer Graphics Metafile, ISO 8632) | |
93 | -.TP | |
94 | -\(bu | |
95 | -dia (Native dia diagram) | |
96 | -.TP | |
97 | -\(bu | |
98 | -dxf (Drawing Interchange File) | |
99 | -.TP | |
100 | -\(bu | |
101 | -eps oreps\-builtin or eps\-pango (Encapsulated PostScript) | |
102 | - | |
103 | -The format specifications eps and eps\-pango both use the font renderer of the Pango library, whileeps\-builtin uses a dia specific font renderer\&. If you have problems with Pango rendering, e\&.g\&. Unicode, try eps\-builtin instead\&. | |
104 | -.TP | |
105 | -\(bu | |
106 | -fig (XFig format) | |
107 | -.TP | |
108 | -\(bu | |
109 | -mp (TeX MetaPost macros) | |
110 | -.TP | |
111 | -\(bu | |
112 | -plt or hpgl (HP Graphics Language) | |
113 | -.TP | |
114 | -\(bu | |
115 | -png (Portable Network Graphics) | |
116 | -.TP | |
117 | -\(bu | |
118 | -shape (Dia Shape File) | |
119 | -.TP | |
120 | -\(bu | |
121 | -svg (Scalable Vector Graphics) | |
122 | -.TP | |
123 | -\(bu | |
124 | -tex (TeX PSTricks macros) | |
125 | -.TP | |
126 | -\(bu | |
127 | -wpg (WordPerfect Graphics) | |
128 | -.TP | |
129 | -\(bu | |
130 | -wmf (Windows MetaFile) | |
131 | -.LP | |
132 | - | |
133 | -.SH "FILES" | |
134 | - | |
135 | -.PP | |
136 | -\fBdia\fR creates a directory \fI\&.dia\fR in the user's home, which contains different files to store user preferences\&. To reset \fBdia\fR to it's default behaviour, just remove the respective file: | |
137 | - | |
138 | -.TP 3 | |
139 | -\(bu | |
140 | -\fIdefaults\&.dia\fR: contains default values for elements (XML format)\&. | |
141 | -.TP | |
142 | -\(bu | |
143 | -\fIdiarc\fR: keeps\fBdia\fR preferences (ASCII)\&. | |
144 | -.TP | |
145 | -\(bu | |
146 | -\fIhistory\fR: keeps the list of last edited diagrams (ASCII)\&. | |
147 | -.TP | |
148 | -\(bu | |
149 | -\fImenurc\fR: contains an automated accelerator map dump (Lisp)\&. | |
150 | -.TP | |
151 | -\(bu | |
152 | -\fIpersistence\fR: contains GUI information, e\&.g\&. open windows (XML)\&. | |
153 | -.TP | |
154 | -\(bu | |
155 | -\fIpluginrc\fR: the list of loaded plugins (XML)\&. | |
156 | -.LP | |
157 | - | |
158 | -.SH "SEE ALSO" | |
159 | - | |
160 | -.PP | |
161 | -Pango: \fIhttp://www.pango.org/\fR | |
162 | - | |
163 | -.PP | |
164 | -X (1) | |
165 | - | |
166 | -.PP | |
167 | -xfig (1) | |
168 | - | |
169 | -.PP | |
170 | -inkscape (1) | |
171 | - | |
172 | -.SH "COPYRIGHT" | |
173 | - | |
174 | -.PP | |
175 | -Copyright 1999 Alexander Larsson\&. | |
176 | - | |
177 | -.PP | |
178 | -Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation\&. | |
179 | - | |
180 | -.SH "AUTHORS" | |
181 | - | |
182 | -.PP | |
183 | -Alexander Larsson | |
184 | - | |
185 | -.PP | |
186 | -This manual was written by Fredrik Hallenberg\&. | |
187 | - | |
188 | -.SH AUTHORS | |
189 | -Fredrik Hallenberg, W\&. Borgert, Alan Horkan. |
@@ -8,7 +8,7 @@ | ||
8 | 8 | |
9 | 9 | [ |
10 | 10 | |
11 | - <!ENTITY VERSION "0.96-pre7"> | |
11 | + <!ENTITY VERSION "0.96-pre8"> | |
12 | 12 | |
13 | 13 | <!ENTITY INTRODUCTION SYSTEM "intro.xml"> |
14 | 14 |
@@ -4,7 +4,7 @@ | ||
4 | 4 | |
5 | 5 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "../../dtd/docbookx.dtd" [ |
6 | 6 | |
7 | - <!ENTITY VERSION "0.96-pre7"> | |
7 | + <!ENTITY VERSION "0.96-pre8"> | |
8 | 8 | |
9 | 9 | <!ENTITY INTRODUCTION SYSTEM "intro.xml"> |
10 | 10 |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
2 | 2 | |
3 | 3 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "../../dtd/docbookx.dtd"[ |
4 | -<!ENTITY VERSION "0.96-pre7"> | |
4 | +<!ENTITY VERSION "0.96-pre8"> | |
5 | 5 | <!ENTITY INTRODUCTION SYSTEM "intro.xml"> |
6 | 6 | <!ENTITY QUICKSTART SYSTEM "usage-quickstart.xml"> |
7 | 7 | <!ENTITY CANVAS SYSTEM "usage-canvas.xml"> |
@@ -910,9 +910,21 @@ draw_line_with_arrows(DiaRenderer *self, Point *start, Point *end, | ||
910 | 910 | Arrow *start_arrow, Arrow *end_arrow) |
911 | 911 | { |
912 | 912 | int nat_arr; |
913 | - Arrow st_arrow=*start_arrow; | |
914 | - Arrow e_arrow=*end_arrow; | |
913 | + Arrow st_arrow; | |
914 | + Arrow e_arrow; | |
915 | 915 | PgfRenderer *renderer = PGF_RENDERER(self); |
916 | + | |
917 | + if (start_arrow != NULL) { | |
918 | + st_arrow = *start_arrow; | |
919 | + } else { | |
920 | + st_arrow.type = ARROW_NONE; | |
921 | + } | |
922 | + | |
923 | + if (end_arrow != NULL) { | |
924 | + e_arrow = *end_arrow; | |
925 | + } else { | |
926 | + e_arrow.type = ARROW_NONE; | |
927 | + } | |
916 | 928 | fprintf(renderer->file, "{\n"); |
917 | 929 | set_fill_color(renderer, line_color); |
918 | 930 | nat_arr = set_arrows(renderer, &st_arrow, &e_arrow); |
@@ -936,9 +948,22 @@ draw_arc_with_arrows(DiaRenderer *self, Point *start, Point *end, Point *midpoin | ||
936 | 948 | Arrow *start_arrow, Arrow *end_arrow) |
937 | 949 | { |
938 | 950 | int nat_arr; |
939 | - Arrow st_arrow=*start_arrow; | |
940 | - Arrow e_arrow=*end_arrow; | |
951 | + Arrow st_arrow; | |
952 | + Arrow e_arrow; | |
941 | 953 | PgfRenderer *renderer = PGF_RENDERER(self); |
954 | + | |
955 | + if (start_arrow != NULL) { | |
956 | + st_arrow = *start_arrow; | |
957 | + } else { | |
958 | + st_arrow.type = ARROW_NONE; | |
959 | + } | |
960 | + | |
961 | + if (end_arrow != NULL) { | |
962 | + e_arrow = *end_arrow; | |
963 | + } else { | |
964 | + e_arrow.type = ARROW_NONE; | |
965 | + } | |
966 | + | |
942 | 967 | fprintf(renderer->file, "{\n"); |
943 | 968 | set_fill_color(renderer, color); |
944 | 969 | nat_arr = set_arrows(renderer, &st_arrow, &e_arrow); |
@@ -959,9 +984,22 @@ draw_polyline_with_arrows(DiaRenderer *self, Point *points, int num_points, | ||
959 | 984 | Arrow *start_arrow, Arrow *end_arrow) |
960 | 985 | { |
961 | 986 | int nat_arr; |
962 | - Arrow st_arrow=*start_arrow; | |
963 | - Arrow e_arrow=*end_arrow; | |
987 | + Arrow st_arrow; | |
988 | + Arrow e_arrow; | |
964 | 989 | PgfRenderer *renderer = PGF_RENDERER(self); |
990 | + | |
991 | + if (start_arrow != NULL) { | |
992 | + st_arrow = *start_arrow; | |
993 | + } else { | |
994 | + st_arrow.type = ARROW_NONE; | |
995 | + } | |
996 | + | |
997 | + if (end_arrow != NULL) { | |
998 | + e_arrow = *end_arrow; | |
999 | + } else { | |
1000 | + e_arrow.type = ARROW_NONE; | |
1001 | + } | |
1002 | + | |
965 | 1003 | fprintf(renderer->file, "{\n"); |
966 | 1004 | set_fill_color(renderer, color); |
967 | 1005 | nat_arr = set_arrows(renderer, &st_arrow, &e_arrow); |
@@ -982,9 +1020,22 @@ draw_rounded_polyline_with_arrows(DiaRenderer *self, | ||
982 | 1020 | Arrow *start_arrow, Arrow *end_arrow, real radius) |
983 | 1021 | { |
984 | 1022 | int nat_arr; |
985 | - Arrow st_arrow=*start_arrow; | |
986 | - Arrow e_arrow=*end_arrow; | |
1023 | + Arrow st_arrow; | |
1024 | + Arrow e_arrow; | |
987 | 1025 | PgfRenderer *renderer = PGF_RENDERER(self); |
1026 | + | |
1027 | + if (start_arrow != NULL) { | |
1028 | + st_arrow = *start_arrow; | |
1029 | + } else { | |
1030 | + st_arrow.type = ARROW_NONE; | |
1031 | + } | |
1032 | + | |
1033 | + if (end_arrow != NULL) { | |
1034 | + e_arrow = *end_arrow; | |
1035 | + } else { | |
1036 | + e_arrow.type = ARROW_NONE; | |
1037 | + } | |
1038 | + | |
988 | 1039 | fprintf(renderer->file, "{\n"); |
989 | 1040 | set_fill_color(renderer, color); |
990 | 1041 | nat_arr = set_arrows(renderer, &st_arrow, &e_arrow); |
@@ -1007,9 +1058,22 @@ draw_bezier_with_arrows(DiaRenderer *self, BezPoint *points, int num_points, | ||
1007 | 1058 | Arrow *start_arrow, Arrow *end_arrow) |
1008 | 1059 | { |
1009 | 1060 | int nat_arr; |
1010 | - Arrow st_arrow=*start_arrow; | |
1011 | - Arrow e_arrow=*end_arrow; | |
1061 | + Arrow st_arrow; | |
1062 | + Arrow e_arrow; | |
1012 | 1063 | PgfRenderer *renderer = PGF_RENDERER(self); |
1064 | + | |
1065 | + if (start_arrow != NULL) { | |
1066 | + st_arrow = *start_arrow; | |
1067 | + } else { | |
1068 | + st_arrow.type = ARROW_NONE; | |
1069 | + } | |
1070 | + | |
1071 | + if (end_arrow != NULL) { | |
1072 | + e_arrow = *end_arrow; | |
1073 | + } else { | |
1074 | + e_arrow.type = ARROW_NONE; | |
1075 | + } | |
1076 | + | |
1013 | 1077 | fprintf(renderer->file, "{\n"); |
1014 | 1078 | set_fill_color(renderer, color); |
1015 | 1079 | nat_arr = set_arrows(renderer, &st_arrow, &e_arrow); |
@@ -213,10 +213,11 @@ vdx_parse_color(const char *s, const VDXDocument *theDoc) | ||
213 | 213 | { |
214 | 214 | /* Look in colour table */ |
215 | 215 | unsigned int i = atoi(s); |
216 | - if (i < theDoc->Colors->len) | |
216 | + if (theDoc->Colors && i < theDoc->Colors->len) | |
217 | 217 | return g_array_index(theDoc->Colors, Color, i); |
218 | 218 | } |
219 | - message_error(_("Couldn't read color: %s\n"), s); | |
219 | + message_warning(_("Couldn't read color: %s\n"), s); | |
220 | + g_debug("Couldn't read color: %s", s); | |
220 | 221 | return c; |
221 | 222 | } |
222 | 223 |
@@ -447,9 +448,14 @@ get_style_child(unsigned int type, unsigned int style, VDXDocument* theDoc) | ||
447 | 448 | { |
448 | 449 | struct vdx_StyleSheet theSheet; |
449 | 450 | struct vdx_any *Any; |
451 | + if (!theDoc->StyleSheets) | |
452 | + { | |
453 | + g_debug("Unknown stylesheet reference"); | |
454 | + return 0; | |
455 | + } | |
450 | 456 | while(1) |
451 | 457 | { |
452 | - g_assert(style < theDoc->StyleSheets->len); | |
458 | + g_assert(theDoc->StyleSheets && style < theDoc->StyleSheets->len); | |
453 | 459 | theSheet = g_array_index(theDoc->StyleSheets, |
454 | 460 | struct vdx_StyleSheet, style); |
455 | 461 | Any = find_child(type, &theSheet); |