• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

修订版d6d52246846b09916ff6d8feb7c1569ec159c0c7 (tree)
时间2007-03-17 15:32:07
作者Lars Clausen <lclausen@src....>
CommiterLars Clausen

Log Message

Pre8: Three crash bugs fixed.

svn path=/trunk/; revision=3634

更改概述

差异

--- a/ChangeLog
+++ b/ChangeLog
@@ -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+
123 2007-03-14 Steffen Macke <sdteffen@gmail.com>
224
325 * installer/win32/locale/slovak.nsh: (added)
@@ -7,6 +29,9 @@
729
830 2007-03-11 Lars Clausen <lars@raeder.dk>
931
32+ * widgets.c (get_units_name_list):
33+ * widgets.h: New function to give names of units for prefs.
34+
1035 * NEWS:
1136 * RELEASE-PROCESS:
1237 * config.h.win32:
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
1+dia-0.96-pre8: 16-Mar-2007
2+
3+ * Eighth prerelease for 0.96. Fixes three crash bugs.
4+
15 dia-0.96-pre7: 11-Mar-2007
26
37 * Seventh prerelease for 0.96. Fixes two crash bugs and image redrawing
--- a/app/textedit.c
+++ b/app/textedit.c
@@ -170,7 +170,6 @@ textedit_remove_focus(DiaObject *obj, Diagram *diagram)
170170 /* TODO: make sure the focus is deactivated */
171171 textedit_end_edit(ddisplay_active(), old_focus);
172172 }
173- g_free(old_focus);
174173 }
175174
176175 /** Call when the entire list of focusable texts gets reset. */
--- a/config.h.win32
+++ b/config.h.win32
@@ -18,7 +18,7 @@
1818 #undef LOCALEDIR /* needs to be calculated at runtime */
1919 /* NOT: #define LOCALEDIR "../lib/locale" */
2020
21-#define VERSION "0.96-pre7"
21+#define VERSION "0.96-pre8"
2222
2323 /*
2424 * We are linking libxml as DLL with either msvc or mingw, but this
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
11 dnl Process this -*- autoconf -*- file with autoconf to produce a
22 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)
44 AC_CONFIG_SRCDIR(app/diagram.c)
55 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION)
66
--- a/doc/en/Makefile.am
+++ b/doc/en/Makefile.am
@@ -39,7 +39,7 @@ DISTCLEANFILES = dia.1
3939 # --nonet. But I don't think that's going to solve more problems
4040 # than it causes.
4141 dia.1: dia.dbk
42- xsltproc --nonet --novalid $(DB2MAN) $< >dia.1
42+ xsltproc --novalid $(DB2MAN) $< >dia.1
4343 endif
4444
4545 man_MANS = dia.1
--- a/doc/en/dia.1
+++ b/doc/en/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.
--- a/doc/en/dia.xml
+++ b/doc/en/dia.xml
@@ -8,7 +8,7 @@
88
99 [
1010
11- <!ENTITY VERSION "0.96-pre7">
11+ <!ENTITY VERSION "0.96-pre8">
1212
1313 <!ENTITY INTRODUCTION SYSTEM "intro.xml">
1414
--- a/doc/eu/dia.xml
+++ b/doc/eu/dia.xml
@@ -4,7 +4,7 @@
44
55 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "../../dtd/docbookx.dtd" [
66
7- <!ENTITY VERSION "0.96-pre7">
7+ <!ENTITY VERSION "0.96-pre8">
88
99 <!ENTITY INTRODUCTION SYSTEM "intro.xml">
1010
--- a/doc/pl/dia.xml
+++ b/doc/pl/dia.xml
@@ -1,7 +1,7 @@
11 <?xml version="1.0" encoding="iso-8859-1"?>
22
33 <!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">
55 <!ENTITY INTRODUCTION SYSTEM "intro.xml">
66 <!ENTITY QUICKSTART SYSTEM "usage-quickstart.xml">
77 <!ENTITY CANVAS SYSTEM "usage-canvas.xml">
--- a/plug-ins/pgf/render_pgf.c
+++ b/plug-ins/pgf/render_pgf.c
@@ -910,9 +910,21 @@ draw_line_with_arrows(DiaRenderer *self, Point *start, Point *end,
910910 Arrow *start_arrow, Arrow *end_arrow)
911911 {
912912 int nat_arr;
913- Arrow st_arrow=*start_arrow;
914- Arrow e_arrow=*end_arrow;
913+ Arrow st_arrow;
914+ Arrow e_arrow;
915915 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+ }
916928 fprintf(renderer->file, "{\n");
917929 set_fill_color(renderer, line_color);
918930 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
936948 Arrow *start_arrow, Arrow *end_arrow)
937949 {
938950 int nat_arr;
939- Arrow st_arrow=*start_arrow;
940- Arrow e_arrow=*end_arrow;
951+ Arrow st_arrow;
952+ Arrow e_arrow;
941953 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+
942967 fprintf(renderer->file, "{\n");
943968 set_fill_color(renderer, color);
944969 nat_arr = set_arrows(renderer, &st_arrow, &e_arrow);
@@ -959,9 +984,22 @@ draw_polyline_with_arrows(DiaRenderer *self, Point *points, int num_points,
959984 Arrow *start_arrow, Arrow *end_arrow)
960985 {
961986 int nat_arr;
962- Arrow st_arrow=*start_arrow;
963- Arrow e_arrow=*end_arrow;
987+ Arrow st_arrow;
988+ Arrow e_arrow;
964989 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+
9651003 fprintf(renderer->file, "{\n");
9661004 set_fill_color(renderer, color);
9671005 nat_arr = set_arrows(renderer, &st_arrow, &e_arrow);
@@ -982,9 +1020,22 @@ draw_rounded_polyline_with_arrows(DiaRenderer *self,
9821020 Arrow *start_arrow, Arrow *end_arrow, real radius)
9831021 {
9841022 int nat_arr;
985- Arrow st_arrow=*start_arrow;
986- Arrow e_arrow=*end_arrow;
1023+ Arrow st_arrow;
1024+ Arrow e_arrow;
9871025 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+
9881039 fprintf(renderer->file, "{\n");
9891040 set_fill_color(renderer, color);
9901041 nat_arr = set_arrows(renderer, &st_arrow, &e_arrow);
@@ -1007,9 +1058,22 @@ draw_bezier_with_arrows(DiaRenderer *self, BezPoint *points, int num_points,
10071058 Arrow *start_arrow, Arrow *end_arrow)
10081059 {
10091060 int nat_arr;
1010- Arrow st_arrow=*start_arrow;
1011- Arrow e_arrow=*end_arrow;
1061+ Arrow st_arrow;
1062+ Arrow e_arrow;
10121063 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+
10131077 fprintf(renderer->file, "{\n");
10141078 set_fill_color(renderer, color);
10151079 nat_arr = set_arrows(renderer, &st_arrow, &e_arrow);
--- a/plug-ins/vdx/vdx-import.c
+++ b/plug-ins/vdx/vdx-import.c
@@ -213,10 +213,11 @@ vdx_parse_color(const char *s, const VDXDocument *theDoc)
213213 {
214214 /* Look in colour table */
215215 unsigned int i = atoi(s);
216- if (i < theDoc->Colors->len)
216+ if (theDoc->Colors && i < theDoc->Colors->len)
217217 return g_array_index(theDoc->Colors, Color, i);
218218 }
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);
220221 return c;
221222 }
222223
@@ -447,9 +448,14 @@ get_style_child(unsigned int type, unsigned int style, VDXDocument* theDoc)
447448 {
448449 struct vdx_StyleSheet theSheet;
449450 struct vdx_any *Any;
451+ if (!theDoc->StyleSheets)
452+ {
453+ g_debug("Unknown stylesheet reference");
454+ return 0;
455+ }
450456 while(1)
451457 {
452- g_assert(style < theDoc->StyleSheets->len);
458+ g_assert(theDoc->StyleSheets && style < theDoc->StyleSheets->len);
453459 theSheet = g_array_index(theDoc->StyleSheets,
454460 struct vdx_StyleSheet, style);
455461 Any = find_child(type, &theSheet);