• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

作図ソフト dia の改良版


Commit MetaInfo

修訂c50dd864e789dc6aad63f7d7439e8b4e86fcc126 (tree)
時間2006-03-13 05:02:18
作者Lars Clausen <lclausen@src....>
CommiterLars Clausen

Log Message

UML fixes, autogaps, security fixes, dia.spec move...

Change Summary

差異

--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
1+ GNU GENERAL PUBLIC LICENSE
2+ Version 2, June 1991
3+
4+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6+ Everyone is permitted to copy and distribute verbatim copies
7+ of this license document, but changing it is not allowed.
8+
9+ Preamble
10+
11+ The licenses for most software are designed to take away your
12+freedom to share and change it. By contrast, the GNU General Public
13+License is intended to guarantee your freedom to share and change free
14+software--to make sure the software is free for all its users. This
15+General Public License applies to most of the Free Software
16+Foundation's software and to any other program whose authors commit to
17+using it. (Some other Free Software Foundation software is covered by
18+the GNU Library General Public License instead.) You can apply it to
19+your programs, too.
20+
21+ When we speak of free software, we are referring to freedom, not
22+price. Our General Public Licenses are designed to make sure that you
23+have the freedom to distribute copies of free software (and charge for
24+this service if you wish), that you receive source code or can get it
25+if you want it, that you can change the software or use pieces of it
26+in new free programs; and that you know you can do these things.
27+
28+ To protect your rights, we need to make restrictions that forbid
29+anyone to deny you these rights or to ask you to surrender the rights.
30+These restrictions translate to certain responsibilities for you if you
31+distribute copies of the software, or if you modify it.
32+
33+ For example, if you distribute copies of such a program, whether
34+gratis or for a fee, you must give the recipients all the rights that
35+you have. You must make sure that they, too, receive or can get the
36+source code. And you must show them these terms so they know their
37+rights.
38+
39+ We protect your rights with two steps: (1) copyright the software, and
40+(2) offer you this license which gives you legal permission to copy,
41+distribute and/or modify the software.
42+
43+ Also, for each author's protection and ours, we want to make certain
44+that everyone understands that there is no warranty for this free
45+software. If the software is modified by someone else and passed on, we
46+want its recipients to know that what they have is not the original, so
47+that any problems introduced by others will not reflect on the original
48+authors' reputations.
49+
50+ Finally, any free program is threatened constantly by software
51+patents. We wish to avoid the danger that redistributors of a free
52+program will individually obtain patent licenses, in effect making the
53+program proprietary. To prevent this, we have made it clear that any
54+patent must be licensed for everyone's free use or not licensed at all.
55+
56+ The precise terms and conditions for copying, distribution and
57+modification follow.
58+
59+ GNU GENERAL PUBLIC LICENSE
60+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61+
62+ 0. This License applies to any program or other work which contains
63+a notice placed by the copyright holder saying it may be distributed
64+under the terms of this General Public License. The "Program", below,
65+refers to any such program or work, and a "work based on the Program"
66+means either the Program or any derivative work under copyright law:
67+that is to say, a work containing the Program or a portion of it,
68+either verbatim or with modifications and/or translated into another
69+language. (Hereinafter, translation is included without limitation in
70+the term "modification".) Each licensee is addressed as "you".
71+
72+Activities other than copying, distribution and modification are not
73+covered by this License; they are outside its scope. The act of
74+running the Program is not restricted, and the output from the Program
75+is covered only if its contents constitute a work based on the
76+Program (independent of having been made by running the Program).
77+Whether that is true depends on what the Program does.
78+
79+ 1. You may copy and distribute verbatim copies of the Program's
80+source code as you receive it, in any medium, provided that you
81+conspicuously and appropriately publish on each copy an appropriate
82+copyright notice and disclaimer of warranty; keep intact all the
83+notices that refer to this License and to the absence of any warranty;
84+and give any other recipients of the Program a copy of this License
85+along with the Program.
86+
87+You may charge a fee for the physical act of transferring a copy, and
88+you may at your option offer warranty protection in exchange for a fee.
89+
90+ 2. You may modify your copy or copies of the Program or any portion
91+of it, thus forming a work based on the Program, and copy and
92+distribute such modifications or work under the terms of Section 1
93+above, provided that you also meet all of these conditions:
94+
95+ a) You must cause the modified files to carry prominent notices
96+ stating that you changed the files and the date of any change.
97+
98+ b) You must cause any work that you distribute or publish, that in
99+ whole or in part contains or is derived from the Program or any
100+ part thereof, to be licensed as a whole at no charge to all third
101+ parties under the terms of this License.
102+
103+ c) If the modified program normally reads commands interactively
104+ when run, you must cause it, when started running for such
105+ interactive use in the most ordinary way, to print or display an
106+ announcement including an appropriate copyright notice and a
107+ notice that there is no warranty (or else, saying that you provide
108+ a warranty) and that users may redistribute the program under
109+ these conditions, and telling the user how to view a copy of this
110+ License. (Exception: if the Program itself is interactive but
111+ does not normally print such an announcement, your work based on
112+ the Program is not required to print an announcement.)
113+
114+These requirements apply to the modified work as a whole. If
115+identifiable sections of that work are not derived from the Program,
116+and can be reasonably considered independent and separate works in
117+themselves, then this License, and its terms, do not apply to those
118+sections when you distribute them as separate works. But when you
119+distribute the same sections as part of a whole which is a work based
120+on the Program, the distribution of the whole must be on the terms of
121+this License, whose permissions for other licensees extend to the
122+entire whole, and thus to each and every part regardless of who wrote it.
123+
124+Thus, it is not the intent of this section to claim rights or contest
125+your rights to work written entirely by you; rather, the intent is to
126+exercise the right to control the distribution of derivative or
127+collective works based on the Program.
128+
129+In addition, mere aggregation of another work not based on the Program
130+with the Program (or with a work based on the Program) on a volume of
131+a storage or distribution medium does not bring the other work under
132+the scope of this License.
133+
134+ 3. You may copy and distribute the Program (or a work based on it,
135+under Section 2) in object code or executable form under the terms of
136+Sections 1 and 2 above provided that you also do one of the following:
137+
138+ a) Accompany it with the complete corresponding machine-readable
139+ source code, which must be distributed under the terms of Sections
140+ 1 and 2 above on a medium customarily used for software interchange; or,
141+
142+ b) Accompany it with a written offer, valid for at least three
143+ years, to give any third party, for a charge no more than your
144+ cost of physically performing source distribution, a complete
145+ machine-readable copy of the corresponding source code, to be
146+ distributed under the terms of Sections 1 and 2 above on a medium
147+ customarily used for software interchange; or,
148+
149+ c) Accompany it with the information you received as to the offer
150+ to distribute corresponding source code. (This alternative is
151+ allowed only for noncommercial distribution and only if you
152+ received the program in object code or executable form with such
153+ an offer, in accord with Subsection b above.)
154+
155+The source code for a work means the preferred form of the work for
156+making modifications to it. For an executable work, complete source
157+code means all the source code for all modules it contains, plus any
158+associated interface definition files, plus the scripts used to
159+control compilation and installation of the executable. However, as a
160+special exception, the source code distributed need not include
161+anything that is normally distributed (in either source or binary
162+form) with the major components (compiler, kernel, and so on) of the
163+operating system on which the executable runs, unless that component
164+itself accompanies the executable.
165+
166+If distribution of executable or object code is made by offering
167+access to copy from a designated place, then offering equivalent
168+access to copy the source code from the same place counts as
169+distribution of the source code, even though third parties are not
170+compelled to copy the source along with the object code.
171+
172+ 4. You may not copy, modify, sublicense, or distribute the Program
173+except as expressly provided under this License. Any attempt
174+otherwise to copy, modify, sublicense or distribute the Program is
175+void, and will automatically terminate your rights under this License.
176+However, parties who have received copies, or rights, from you under
177+this License will not have their licenses terminated so long as such
178+parties remain in full compliance.
179+
180+ 5. You are not required to accept this License, since you have not
181+signed it. However, nothing else grants you permission to modify or
182+distribute the Program or its derivative works. These actions are
183+prohibited by law if you do not accept this License. Therefore, by
184+modifying or distributing the Program (or any work based on the
185+Program), you indicate your acceptance of this License to do so, and
186+all its terms and conditions for copying, distributing or modifying
187+the Program or works based on it.
188+
189+ 6. Each time you redistribute the Program (or any work based on the
190+Program), the recipient automatically receives a license from the
191+original licensor to copy, distribute or modify the Program subject to
192+these terms and conditions. You may not impose any further
193+restrictions on the recipients' exercise of the rights granted herein.
194+You are not responsible for enforcing compliance by third parties to
195+this License.
196+
197+ 7. If, as a consequence of a court judgment or allegation of patent
198+infringement or for any other reason (not limited to patent issues),
199+conditions are imposed on you (whether by court order, agreement or
200+otherwise) that contradict the conditions of this License, they do not
201+excuse you from the conditions of this License. If you cannot
202+distribute so as to satisfy simultaneously your obligations under this
203+License and any other pertinent obligations, then as a consequence you
204+may not distribute the Program at all. For example, if a patent
205+license would not permit royalty-free redistribution of the Program by
206+all those who receive copies directly or indirectly through you, then
207+the only way you could satisfy both it and this License would be to
208+refrain entirely from distribution of the Program.
209+
210+If any portion of this section is held invalid or unenforceable under
211+any particular circumstance, the balance of the section is intended to
212+apply and the section as a whole is intended to apply in other
213+circumstances.
214+
215+It is not the purpose of this section to induce you to infringe any
216+patents or other property right claims or to contest validity of any
217+such claims; this section has the sole purpose of protecting the
218+integrity of the free software distribution system, which is
219+implemented by public license practices. Many people have made
220+generous contributions to the wide range of software distributed
221+through that system in reliance on consistent application of that
222+system; it is up to the author/donor to decide if he or she is willing
223+to distribute software through any other system and a licensee cannot
224+impose that choice.
225+
226+This section is intended to make thoroughly clear what is believed to
227+be a consequence of the rest of this License.
228+
229+ 8. If the distribution and/or use of the Program is restricted in
230+certain countries either by patents or by copyrighted interfaces, the
231+original copyright holder who places the Program under this License
232+may add an explicit geographical distribution limitation excluding
233+those countries, so that distribution is permitted only in or among
234+countries not thus excluded. In such case, this License incorporates
235+the limitation as if written in the body of this License.
236+
237+ 9. The Free Software Foundation may publish revised and/or new versions
238+of the General Public License from time to time. Such new versions will
239+be similar in spirit to the present version, but may differ in detail to
240+address new problems or concerns.
241+
242+Each version is given a distinguishing version number. If the Program
243+specifies a version number of this License which applies to it and "any
244+later version", you have the option of following the terms and conditions
245+either of that version or of any later version published by the Free
246+Software Foundation. If the Program does not specify a version number of
247+this License, you may choose any version ever published by the Free Software
248+Foundation.
249+
250+ 10. If you wish to incorporate parts of the Program into other free
251+programs whose distribution conditions are different, write to the author
252+to ask for permission. For software which is copyrighted by the Free
253+Software Foundation, write to the Free Software Foundation; we sometimes
254+make exceptions for this. Our decision will be guided by the two goals
255+of preserving the free status of all derivatives of our free software and
256+of promoting the sharing and reuse of software generally.
257+
258+ NO WARRANTY
259+
260+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268+REPAIR OR CORRECTION.
269+
270+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278+POSSIBILITY OF SUCH DAMAGES.
279+
280+ END OF TERMS AND CONDITIONS
281+
282+ How to Apply These Terms to Your New Programs
283+
284+ If you develop a new program, and you want it to be of the greatest
285+possible use to the public, the best way to achieve this is to make it
286+free software which everyone can redistribute and change under these terms.
287+
288+ To do so, attach the following notices to the program. It is safest
289+to attach them to the start of each source file to most effectively
290+convey the exclusion of warranty; and each file should have at least
291+the "copyright" line and a pointer to where the full notice is found.
292+
293+ <one line to give the program's name and a brief idea of what it does.>
294+ Copyright (C) <year> <name of author>
295+
296+ This program is free software; you can redistribute it and/or modify
297+ it under the terms of the GNU General Public License as published by
298+ the Free Software Foundation; either version 2 of the License, or
299+ (at your option) any later version.
300+
301+ This program is distributed in the hope that it will be useful,
302+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304+ GNU General Public License for more details.
305+
306+ You should have received a copy of the GNU General Public License
307+ along with this program; if not, write to the Free Software
308+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
309+
310+
311+Also add information on how to contact you by electronic and paper mail.
312+
313+If the program is interactive, make it output a short notice like this
314+when it starts in an interactive mode:
315+
316+ Gnomovision version 69, Copyright (C) year name of author
317+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318+ This is free software, and you are welcome to redistribute it
319+ under certain conditions; type `show c' for details.
320+
321+The hypothetical commands `show w' and `show c' should show the appropriate
322+parts of the General Public License. Of course, the commands you use may
323+be called something other than `show w' and `show c'; they could even be
324+mouse-clicks or menu items--whatever suits your program.
325+
326+You should also get your employer (if you work as a programmer) or your
327+school, if any, to sign a "copyright disclaimer" for the program, if
328+necessary. Here is a sample; alter the names:
329+
330+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
332+
333+ <signature of Ty Coon>, 1 April 1989
334+ Ty Coon, President of Vice
335+
336+This General Public License does not permit incorporating your program into
337+proprietary programs. If your program is a subroutine library, you may
338+consider it more useful to permit linking proprietary applications with the
339+library. If this is what you want to do, use the GNU Library General
340+Public License instead of this License.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,55 @@
1+2006-03-12 Lars Clausen <lars@raeder.dk>
2+
3+ * installer/win32/dia.nsi:
4+ * doc/en/dia.xml:
5+ * doc/eu/dia.xml:
6+ * doc/pl/dia.xml:
7+ * config.h.win32:
8+ * configure.in:
9+ * NEWS: -pre5
10+
11+ * objects/UML/constraint.c (constraint_update_data):
12+ * objects/UML/message.c (message_update_data):
13+ * objects/UML/implements.c (implements_update_data):
14+ * objects/SADT/annotation.c (annotation_update_data):
15+ * objects/Jackson/phenomenon.c (message_update_data):
16+ * objects/network/wanlink.c (wanlink_update_data):
17+ * objects/FS/flow.c (flow_update_data): Added autogap adjustment.
18+
19+ * objects/standard/line.c:
20+ * lib/connection.[ch] (connection_adjust_for_autogap): Moved autogap
21+ functionality for connections.
22+
23+2006-03-11 Lars Clausen <lars@raeder.dk>
24+
25+ * lib/diagdkrenderer.c (draw_object):
26+ * lib/dialibartrenderer.c (draw_object): Don't draw highlighting
27+ in the non-interactive rendering.
28+
29+ * dia.spec:
30+ * installer/rpm/dia.spec:
31+ * installer/rpm/README:
32+ Moving dia.spec to installer directory, where distribution
33+ maintainers can keep their own copies.
34+
35+ * objects/UML/uml.h:
36+ * objects/UML/class.h:
37+ * objects/UML/umloperation.c:
38+ * objects/UML/class.c:
39+ Preparations to fix bug #334037: Clean away the Lisp-like
40+ constructs confusing the issue.
41+
42+2006-03-10 Lars Clausen <lars@raeder.dk>
43+
44+ * lib/object.c: Don't compare floats with ==, even in sanity checks.
45+
46+2006-03-09 Lars Clausen <lars@raeder.dk>
47+
48+ * plug-ins/xfig/xfig-import.c: Fix three buffer overflows in color
49+ reading, depth reading, and points reading. Thanks to
50+
51+ * COPYING: Added copyright info again.
52+
153 2006-03-09 Steffen Macke <sdteffen@gmail.com>
254
355 * installer/win32/dia.nsi: don't uninstall old version; overwrite
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,7 @@ distuninstallcheck_listfiles = find . -type f -print | grep -v '^\./var/scrollke
4949 # @:
5050
5151 EXTRA_DIST = dia.xpm dia_gnome_icon.png dia_gnome_menu_icon.png \
52- dia.desktop.in dia.spec KNOWN_BUGS $(pkgdata_DATA) \
52+ dia.desktop.in KNOWN_BUGS $(pkgdata_DATA) \
5353 dia-diagram.png dia.mime dia.keys.in \
5454 po-checktrans.py po-checktrans \
5555 intltool-extract.in intltool-merge.in intltool-update.in \
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
1+dia-0.95-pre5: 12-Mar-2006
2+
3+* Fixed positioning and height of UML operations when wrapped.
4+
5+* Three security holes in the XFig importer fixed after review.
6+
7+* COPYING file readded.
8+
19 dia-0.95-pre4: 6-Mar-2006
210
311 * Fixed Fig import locale issues, TeX export escape issues.
--- a/RELEASE-PROCESS
+++ b/RELEASE-PROCESS
@@ -98,7 +98,7 @@ How to make a tarball
9898
9999 Script to update version:
100100
101-find . -name configure.in -o -name config.h.win32 -o -name dia.xml -o -name dia.dbk | xargs sed -i 's/0\.95-pre[0-9]*/0.95-pre5/;'
101+find . -name configure.in -o -name config.h.win32 -o -name dia.xml | xargs sed -i 's/0\.95-pre[0-9]*/0.95-pre5/;'
102102
103103 Issues to solve
104104 ---------------
--- 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.95-pre4"
21+#define VERSION "0.95-pre5"
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.95-pre4, http://bugzilla.gnome.org/enter_bug.cgi?product=dia)
3+AC_INIT(dia, 0.95-pre5, 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/dia.1
+++ b/doc/en/dia.1
@@ -1,189 +1,197 @@
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
1+.\" ** You probably do not want to edit this file directly **
2+.\" It was generated using the DocBook XSL Stylesheets (version 1.69.0).
3+.\" Instead of manually editing it, you probably should edit the DocBook XML
4+.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
5+.TH "DIA" "1" "2004\-11\-26" "" ""
6+.\" disable hyphenation
7+.nh
8+.\" disable justification (adjust text to left margin only)
9+.ad l
10+.SH "NAME"
2211 dia \- a diagram drawing program
2312 .SH "SYNOPSIS"
24-.ad l
25-.hy 0
2613 .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\-\-export\-to\-format=\fIFORMAT\fR\fR] [\fB\-v\fR] [\fB\-\-version\fR] [file\ \&.\&.\&.]
28-.ad
29-.hy
30-
14+\fBdia\fR [\fB\-c\fR] [\fB\-\-credits\fR] [\fB\-e\ \fR\fB\fIOUTPUT\fR\fR] [\fB\-\-export=\fR\fB\fIOUTPUT\fR\fR] [\fB\-L\ \fR\fB\fILAYER,LAYER,...\fR\fR] [\fB\-\-show\-layers=\fR\fB\fILAYER,LAYER,...\fR\fR] [\fB\-h\fR] [\fB\-\-help\fR] [\fB\-n\fR] [\fB\-\-nosplash\fR] [\fB\-s\ \fR\fB\fIWxH\fR\fR] [\fB\-\-size=\fR\fB\fIWxH\fR\fR] [\fB\-t\ \fR\fB\fIFORMAT\fR\fR] [\fB\-\-export\-to\-format=\fR\fB\fIFORMAT\fR\fR] [\fB\-v\fR] [\fB\-\-version\fR] [file\ ...]
3115 .SH "DESCRIPTION"
32-
3316 .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 sheets\&. A sheet is a collection of tools that are used in a certain type of diagram\&.
35-
17+\fBDia\fR
18+is used to create diagrams. Dia has a number of basic tools, like lines and boxes but can also dynamically load
19+\fIsheets\fR. A sheet is a collection of tools that are used in a certain type of diagram.
3620 .PP
37-Most diagram objects in \fBDia\fR have handles\&. Lines can be connected to these handles and this way graph structures can be formed\&. When objects are moved or resized the connections will follow the objects\&.
38-
21+Most diagram objects in
22+\fBDia\fR
23+have
24+\fIhandles\fR. Lines can be connected to these handles and this way graph structures can be formed. When objects are moved or resized the connections will follow the objects.
3925 .PP
40-Diagrams drawn in \fBDia\fR can be exported PostScript\&.
41-
26+Diagrams drawn in
27+\fBDia\fR
28+can be exported PostScript.
4229 .SH "OPTIONS"
43-
4430 .PP
45-\fBDia\fR accepts the following options:
46-
31+\fBDia\fR
32+accepts the following options:
4733 .TP
4834 \fB\-c\fR \fB\-\-credits\fR
49-Display credits list and exit\&.
50-
35+Display credits list and exit.
5136 .TP
52-\fB\-e \fIOUTPUT\fR\fR \fB\-\-export=\fIOUTPUT\fR\fR
53-Export loaded file to OUTPUT and exit\&.
54-
37+\fB\-e \fR\fB\fIOUTPUT\fR\fR \fB\-\-export=\fR\fB\fIOUTPUT\fR\fR
38+Export loaded file to OUTPUT and exit.
5539 .TP
5640 \fB\-h\fR \fB\-\-help\fR
57-Display a list of all commandline options\&.
58-
41+Display a list of all commandline options.
5942 .TP
6043 \fB\-n\fR \fB\-\-nosplash\fR
61-Do not show the splash screen\&.
62-
44+Do not show the splash screen.
45+.TP
46+\fB\-s \fR\fB\fIWxH\fR\fR \fB\-\-size=\fR\fB\fIWxH\fR\fR
47+Export loaded file in decimal given width and/or height. It is allowed to only select width or height. E.g.
48+\fB\-\-size=\fR\fB\fI520x\fR\fR
49+exports an image that is 520 pixels wide, while
50+\fB\-\-size=\fR\fB\fIx900\fR\fR
51+exports an image of 900 pixels height.
52+.sp
53+.it 1 an-trap
54+.nr an-no-space-flag 1
55+.nr an-break-flag 1
56+.br
57+\fBNote\fR
58+This option is currently only implemented for the PNG export filter.
6359 .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-
60+\fB\-L \fR\fB\fILAYER,LAYER,...\fR\fR \fB\-\-show\-layers=\fR\fB\fILAYER,LAYER,...\fR\fR
61+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.
7362 .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-
63+\fB\-t \fR\fB\fIFORMAT\fR\fR \fB\-\-export\-to\-format=\fR\fB\fIFORMAT\fR\fR
64+Export loaded file in FORMAT and exit. Format are described below.
8165 .TP
8266 \fB\-v\fR \fB\-\-version\fR
83-Display \fBdia\fR version and exit\&.
84-
67+Display
68+\fBdia\fR
69+version and exit.
8570 .SH "EXPORT FORMATS"
86-
8771 .PP
88-The following export formats are supported by \fBdia\fR\&.
89-
72+The following export formats are supported by
73+\fBdia\fR.
9074 .TP 3
9175 \(bu
92-cgm (Computer Graphics Metafile, ISO 8632)
76+cgm
77+(Computer Graphics Metafile, ISO 8632)
9378 .TP
9479 \(bu
95-dia (Native dia diagram)
80+dia
81+(Native dia diagram)
9682 .TP
9783 \(bu
98-dxf (Drawing Interchange File)
84+dxf
85+(Drawing Interchange File)
9986 .TP
10087 \(bu
101-eps or epsi oreps\-builtin or eps\-pango (Encapsulated PostScript)
88+eps
89+or
90+epsi
91+or
92+eps\-builtin
93+or
94+eps\-pango
95+(Encapsulated PostScript)
10296
103-The format specifications eps,epsi, and eps\-pango all 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\&.
97+The format specifications
98+eps,
99+epsi, and
100+eps\-pango
101+all use the font renderer of the Pango library, while
102+eps\-builtin
103+uses a dia specific font renderer. If you have problems with Pango rendering, e.g. Unicode, try
104+eps\-builtin
105+instead.
104106 .TP
105107 \(bu
106-fig (XFig format)
108+fig
109+(XFig format)
107110 .TP
108111 \(bu
109-mp (TeX MetaPost macros)
112+mp
113+(TeX MetaPost macros)
110114 .TP
111115 \(bu
112-plt or hpgl (HP Graphics Language)
116+plt
117+or
118+hpgl
119+(HP Graphics Language)
113120 .TP
114121 \(bu
115-png (Portable Network Graphics)
122+png
123+(Portable Network Graphics)
116124 .TP
117125 \(bu
118-shape (Dia Shape File)
126+shape
127+(Dia Shape File)
119128 .TP
120129 \(bu
121-svg (Scalable Vector Graphics)
130+svg
131+(Scalable Vector Graphics)
122132 .TP
123133 \(bu
124-tex (TeX PSTricks macros)
134+tex
135+(TeX PSTricks macros)
125136 .TP
126137 \(bu
127-wpg (WordPerfect Graphics)
138+wpg
139+(WordPerfect Graphics)
128140 .TP
129141 \(bu
130-wmf (Windows MetaFile)
131-.LP
132-
142+wmf
143+(Windows MetaFile)
133144 .SH "FILES"
134-
135145 .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-
146+\fBdia\fR
147+creates a directory
148+\fI.dia\fR
149+in the user's home, which contains different files to store user preferences. To reset
150+\fBdia\fR
151+to it's default behaviour, just remove the respective file:
138152 .TP 3
139153 \(bu
140-\fIdefaults\&.dia\fR: contains default values for elements (XML format)\&.
154+\fIdefaults.dia\fR: contains default values for elements (XML format).
141155 .TP
142156 \(bu
143-\fIdiarc\fR: keeps\fBdia\fR preferences (ASCII)\&.
157+\fIdiarc\fR: keeps
158+\fBdia\fR
159+preferences (ASCII).
144160 .TP
145161 \(bu
146-\fIhistory\fR: keeps the list of last edited diagrams (ASCII)\&.
162+\fIhistory\fR: keeps the list of last edited diagrams (ASCII).
147163 .TP
148164 \(bu
149-\fImenurc\fR: contains an automated accelerator map dump (Lisp)\&.
165+\fImenurc\fR: contains an automated accelerator map dump (Lisp).
150166 .TP
151167 \(bu
152-\fIpersistence\fR: contains GUI information, e\&.g\&. open windows (XML)\&.
168+\fIpersistence\fR: contains GUI information, e.g. open windows (XML).
153169 .TP
154170 \(bu
155-\fIpluginrc\fR: the list of loaded plugins (XML)\&.
156-.LP
157-
171+\fIpluginrc\fR: the list of loaded plugins (XML).
158172 .SH "SEE ALSO"
159-
160173 .PP
161-Pango: \fIhttp://www.pango.org/\fR
162-
174+[1]\&\fIPango\fR
163175 .PP
164176 X (1)
165-
166177 .PP
167178 xfig (1)
168-
169179 .PP
170180 inkscape (1)
171-
172181 .SH "COPYRIGHT"
173-
174182 .PP
175-Copyright 1999 Alexander Larsson\&.
176-
183+Copyright 1999 Alexander Larsson.
177184 .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-
185+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.
180186 .SH "AUTHORS"
181-
182187 .PP
183188 Alexander Larsson
184-
185189 .PP
186-This manual was written by Fredrik Hallenberg\&.
187-
188-.SH AUTHORS
189-Fredrik Hallenberg, W\&. Borgert, Alan Horkan.
190+This manual was written by
191+Fredrik Hallenberg.
192+.SH "AUTHOR"
193+Fredrik Hallenberg <hallon@lysator.liu.se>, W. Borgert <debacle@debian.org>, Alan Horkan <horkana@tcd.ie>.
194+.SH "REFERENCES"
195+.TP 3
196+1.\ Pango
197+\%http://www.pango.org/
--- a/doc/en/dia.xml
+++ b/doc/en/dia.xml
@@ -8,7 +8,7 @@
88
99 [
1010
11- <!ENTITY VERSION "0.95-pre4">
11+ <!ENTITY VERSION "0.95-pre5">
1212
1313 <!ENTITY INTRODUCTION SYSTEM "intro.xml">
1414
--- a/doc/eu/dia.1
+++ b/doc/eu/dia.1
@@ -1,51 +1,190 @@
1-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>dia</title><meta name="generator" content="DocBook XSL Stylesheets V1.48"></head><body text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="id2750613"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>dia &#8212; a diagram drawing program</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt>dia</tt> [<tt>-c</tt>] [<tt>--credits</tt>] [<tt>-e <i><tt>OUTPUT</tt></i></tt>] [<tt>--export=<i><tt>OUTPUT</tt></i></tt>] [<tt>-h</tt>] [<tt>--help</tt>] [<tt>-n</tt>] [<tt>--nosplash</tt>] [<tt>-s <i><tt>WxH</tt></i></tt>] [<tt>--size=<i><tt>WxH</tt></i></tt>] [<tt>-t <i><tt>FORMAT</tt></i></tt>] [<tt>--export-to-format=<i><tt>FORMAT</tt></i></tt>] [<tt>-v</tt>] [<tt>--version</tt>] [file ...]</p></div></div><div class="refsect1"><h2>Description</h2><p><b>Dia</b> is used to create diagrams. Dia has
2- a number of basic tools, like lines and boxes but can also
3- dynamically load <span class="emphasis"><i>sheets</i></span>. A sheet is a
4- collection of tools that are used in a certain type of
5- diagram.</p><p>Most diagram objects in <b>Dia</b> has
6- <span class="emphasis"><i>handles</i></span>. Lines can be connected to these
7- handles and this way graph structures can be formed. When objects
8- are moved or resized the connections will follow the
9- objects.</p><p>Diagrams drawn in <b>Dia</b> can be exported
10- PostScript.</p></div><div class="refsect1"><h2>Options</h2><p><b>Dia</b> accepts the following options:</p><div class="variablelist"><dl><dt><span class="term"><tt>-c</tt>
11- <tt>--credits</tt></span></dt><dd><p>Display credits list and exit.</p></dd><dt><span class="term"><tt>-e <i><tt>OUTPUT</tt></i></tt>
12- <tt>--export=<i><tt>OUTPUT</tt></i></tt></span></dt><dd><p>Export loaded file to OUTPUT and exit.</p></dd><dt><span class="term"><tt>-h</tt>
13- <tt>--help</tt></span></dt><dd><p>Display a list of all commandline options.</p></dd><dt><span class="term"><tt>-n</tt>
14- <tt>--nosplash</tt></span></dt><dd><p>Do not show the splash screen.</p></dd><dt><span class="term"><tt>-s <i><tt>WxH</tt></i></tt>
15- <tt>--size=<i><tt>WxH</tt></i></tt></span></dt><dd><p>Export loaded file in decimal given width and/or
16- height. It is allowed to only select width or height.
17- E.g. <tt>--size=<i><tt>520x</tt></i></tt>
18- exports an image that is 520 pixels wide, while
19- <tt>--size=<i><tt>x900</tt></i></tt>
20- exports an image of 900 pixels height.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This option is currently only implemented for the
21- PNG export filter.</p></div></dd><dt><span class="term"><tt>-t <i><tt>FORMAT</tt></i></tt>
22- <tt>--export-to-format=<i><tt>FORMAT</tt></i></tt></span></dt><dd><p>Export loaded file in FORMAT and exit. Format are
23- described below.</p></dd><dt><span class="term"><tt>-v</tt>
24- <tt>--version</tt></span></dt><dd><p>Display <b>dia</b> version and exit.</p></dd></dl></div></div><div class="refsect1"><h2>Export Formats</h2><p>The following export formats are supported by
25- <b>dia</b>.</p><div class="itemizedlist"><ul type="disc"><li><p><tt>cgm</tt> (Computer Graphics Metafile, ISO
26- 8632)</p></li><li><p><tt>dia</tt> (Native dia diagram)</p></li><li><p><tt>dxf</tt> (Drawing Interchange File)</p></li><li><p><tt>eps</tt> or <tt>epsi</tt> or
27- <tt>eps-builtin</tt> or <tt>eps-pango</tt>
28- (Encapsulated PostScript)</p><p>The format specifications <tt>eps</tt>,
29- <tt>epsi</tt>, and <tt>eps-pango</tt> all
30- use the font renderer of the Pango library, while
31- <tt>eps-builtin</tt> uses a dia specific font
32- renderer. If you have problems with Pango rendering,
33- e.g. Unicode, try <tt>eps-builtin</tt>
34- instead.</p></li><li><p><tt>fig</tt> (XFig format)</p></li><li><p><tt>mp</tt> (TeX MetaPost macros)</p></li><li><p><tt>plt</tt> or <tt>hpgl</tt> (HP
35- Graphics Language)</p></li><li><p><tt>png</tt> (Portable Network
36- Graphics)</p></li><li><p><tt>shape</tt> (Dia shape file)</p></li><li><p><tt>svg</tt> (Scalable Vector Graphics)</p></li><li><p><tt>tex</tt> (TeX PSTricks macros)</p></li><li><p><tt>wpg</tt> (WordPerfect Graphics)</p></li><li><p><tt>wmf</tt> (Windows MetaFile)</p></li></ul></div></div><div class="refsect1"><h2>Files</h2><p><b>dia</b> creates a directory
37- <tt>.dia</tt> in the user's home, which contains
38- different files to store user preferences. To reset
39- <b>dia</b> to it's default behaviour, just remove
40- the respective file:</p><div class="itemizedlist"><ul type="disc"><li><p><tt>defaults.dia</tt>: contains default
41- values for elements (XML format).</p></li><li><p><tt>diarc</tt>: keeps
42- <b>dia</b> preferences (ASCII).</p></li><li><p><tt>history</tt>: keeps the list of last
43- edited diagrams (ASCII).</p></li><li><p><tt>menurc</tt>: contains an automated
44- accelerator map dump (Lisp).</p></li><li><p><tt>persistence</tt>: contains GUI
45- information, e.g. open windows (XML).</p></li><li><p><tt>pluginrc</tt>: the list of loaded
46- plugins (XML).</p></li></ul></div></div><div class="refsect1"><h2>See Also</h2><p><a href="http://www.pango.org/" target="_top">Pango</a></p><p>X (1)</p></div><div class="refsect1"><h2>Copyright</h2><p>Copyright 1999 Alexander Larsson.</p><p>Permission to use, copy, modify, and distribute this
47- software and its documentation for any purpose and without fee is
48- hereby granted, provided that the above copyright notice appear in
49- all copies and that both that copyright notice and this permission
50- notice appear in supporting documentation.</p></div><div class="refsect1"><h2>Authors</h2><p><span class="author">Alexander Larsson</span></p><p>This manual was written by
51- <span class="author">Fredrik Hallenberg</span>.</p></div></div></body></html>
1+.\" ** You probably do not want to edit this file directly **
2+.\" It was generated using the DocBook XSL Stylesheets (version 1.69.0).
3+.\" Instead of manually editing it, you probably should edit the DocBook XML
4+.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
5+.TH "DIA" "1" "1999\-07\-03" "" ""
6+.\" disable hyphenation
7+.nh
8+.\" disable justification (adjust text to left margin only)
9+.ad l
10+.SH "NAME"
11+dia \- a diagram drawing program
12+.SH "SYNOPSIS"
13+.HP 4
14+\fBdia\fR [\fB\-c\fR] [\fB\-\-credits\fR] [\fB\-e\ \fR\fB\fIOUTPUT\fR\fR] [\fB\-\-export=\fR\fB\fIOUTPUT\fR\fR] [\fB\-h\fR] [\fB\-\-help\fR] [\fB\-n\fR] [\fB\-\-nosplash\fR] [\fB\-s\ \fR\fB\fIWxH\fR\fR] [\fB\-\-size=\fR\fB\fIWxH\fR\fR] [\fB\-t\ \fR\fB\fIFORMAT\fR\fR] [\fB\-\-export\-to\-format=\fR\fB\fIFORMAT\fR\fR] [\fB\-v\fR] [\fB\-\-version\fR] [file\ ...]
15+.SH "DESCRIPTION"
16+.PP
17+\fBDia\fR
18+is used to create diagrams. Dia has a number of basic tools, like lines and boxes but can also dynamically load
19+\fIsheets\fR. A sheet is a collection of tools that are used in a certain type of diagram.
20+.PP
21+Most diagram objects in
22+\fBDia\fR
23+has
24+\fIhandles\fR. Lines can be connected to these handles and this way graph structures can be formed. When objects are moved or resized the connections will follow the objects.
25+.PP
26+Diagrams drawn in
27+\fBDia\fR
28+can be exported PostScript.
29+.SH "OPTIONS"
30+.PP
31+\fBDia\fR
32+accepts the following options:
33+.TP
34+\fB\-c\fR \fB\-\-credits\fR
35+Display credits list and exit.
36+.TP
37+\fB\-e \fR\fB\fIOUTPUT\fR\fR \fB\-\-export=\fR\fB\fIOUTPUT\fR\fR
38+Export loaded file to OUTPUT and exit.
39+.TP
40+\fB\-h\fR \fB\-\-help\fR
41+Display a list of all commandline options.
42+.TP
43+\fB\-n\fR \fB\-\-nosplash\fR
44+Do not show the splash screen.
45+.TP
46+\fB\-s \fR\fB\fIWxH\fR\fR \fB\-\-size=\fR\fB\fIWxH\fR\fR
47+Export loaded file in decimal given width and/or height. It is allowed to only select width or height. E.g.
48+\fB\-\-size=\fR\fB\fI520x\fR\fR
49+exports an image that is 520 pixels wide, while
50+\fB\-\-size=\fR\fB\fIx900\fR\fR
51+exports an image of 900 pixels height.
52+.sp
53+.it 1 an-trap
54+.nr an-no-space-flag 1
55+.nr an-break-flag 1
56+.br
57+\fBNote\fR
58+This option is currently only implemented for the PNG export filter.
59+.TP
60+\fB\-t \fR\fB\fIFORMAT\fR\fR \fB\-\-export\-to\-format=\fR\fB\fIFORMAT\fR\fR
61+Export loaded file in FORMAT and exit. Format are described below.
62+.TP
63+\fB\-v\fR \fB\-\-version\fR
64+Display
65+\fBdia\fR
66+version and exit.
67+.SH "EXPORT FORMATS"
68+.PP
69+The following export formats are supported by
70+\fBdia\fR.
71+.TP 3
72+\(bu
73+cgm
74+(Computer Graphics Metafile, ISO 8632)
75+.TP
76+\(bu
77+dia
78+(Native dia diagram)
79+.TP
80+\(bu
81+dxf
82+(Drawing Interchange File)
83+.TP
84+\(bu
85+eps
86+or
87+epsi
88+or
89+eps\-builtin
90+or
91+eps\-pango
92+(Encapsulated PostScript)
93+
94+The format specifications
95+eps,
96+epsi, and
97+eps\-pango
98+all use the font renderer of the Pango library, while
99+eps\-builtin
100+uses a dia specific font renderer. If you have problems with Pango rendering, e.g. Unicode, try
101+eps\-builtin
102+instead.
103+.TP
104+\(bu
105+fig
106+(XFig format)
107+.TP
108+\(bu
109+mp
110+(TeX MetaPost macros)
111+.TP
112+\(bu
113+plt
114+or
115+hpgl
116+(HP Graphics Language)
117+.TP
118+\(bu
119+png
120+(Portable Network Graphics)
121+.TP
122+\(bu
123+shape
124+(Dia shape file)
125+.TP
126+\(bu
127+svg
128+(Scalable Vector Graphics)
129+.TP
130+\(bu
131+tex
132+(TeX PSTricks macros)
133+.TP
134+\(bu
135+wpg
136+(WordPerfect Graphics)
137+.TP
138+\(bu
139+wmf
140+(Windows MetaFile)
141+.SH "FILES"
142+.PP
143+\fBdia\fR
144+creates a directory
145+\fI.dia\fR
146+in the user's home, which contains different files to store user preferences. To reset
147+\fBdia\fR
148+to it's default behaviour, just remove the respective file:
149+.TP 3
150+\(bu
151+\fIdefaults.dia\fR: contains default values for elements (XML format).
152+.TP
153+\(bu
154+\fIdiarc\fR: keeps
155+\fBdia\fR
156+preferences (ASCII).
157+.TP
158+\(bu
159+\fIhistory\fR: keeps the list of last edited diagrams (ASCII).
160+.TP
161+\(bu
162+\fImenurc\fR: contains an automated accelerator map dump (Lisp).
163+.TP
164+\(bu
165+\fIpersistence\fR: contains GUI information, e.g. open windows (XML).
166+.TP
167+\(bu
168+\fIpluginrc\fR: the list of loaded plugins (XML).
169+.SH "SEE ALSO"
170+.PP
171+[1]\&\fIPango\fR
172+.PP
173+X (1)
174+.SH "COPYRIGHT"
175+.PP
176+Copyright 1999 Alexander Larsson.
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+.SH "AUTHORS"
180+.PP
181+Alexander Larsson
182+.PP
183+This manual was written by
184+Fredrik Hallenberg.
185+.SH "AUTHOR"
186+Fredrik Hallenberg <hallon@lysator.liu.se>, W. Borgert <debacle@debian.org>.
187+.SH "REFERENCES"
188+.TP 3
189+1.\ Pango
190+\%http://www.pango.org/
--- 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.95-pre4">
7+ <!ENTITY VERSION "0.95-pre5">
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.95-pre4">
4+<!ENTITY VERSION "0.95-pre5">
55 <!ENTITY INTRODUCTION SYSTEM "intro.xml">
66 <!ENTITY QUICKSTART SYSTEM "usage-quickstart.xml">
77 <!ENTITY CANVAS SYSTEM "usage-canvas.xml">
--- /dev/null
+++ b/installer/rpm/README
@@ -0,0 +1,15 @@
1+This directory contains dia.spec files for various distributions. The
2+dia.spec file can be used as a template at first, but will be removed
3+later. Maintainers of Dia on various distributions should update the spec
4+files as things like package names change. The files should be named to
5+indicate which distribution they belong to, e.g. dia.spec.suse or
6+dia.spec.redhat.el3.
7+
8+This step has been necessary because distributions cannot agree to what
9+their packages are called, mainly, but also some other details differ, and
10+I will not spend my time trying to fix one file back and forth. If a
11+distribution maintainer does not have CVS access, I am willing to apply
12+patches for them.
13+
14+-Lars
15+11/3/2006
--- a/installer/win32/dia.nsi
+++ b/installer/win32/dia.nsi
@@ -94,8 +94,8 @@ VIAddVersionKey "ProductName" "Dia for Windows"
9494 VIAddVersionKey "CompanyName" "The Dia Developers"
9595 VIAddVersionKey "LegalCopyright" "(c) 2003-2006 Alexander Larsson and others"
9696 VIAddVersionKey "FileDescription" "Dia for Windows Installer"
97-VIAddVersionKey "FileVersion" "0.95.0.4"
98-VIProductVersion "0.95.0.4"
97+VIAddVersionKey "FileVersion" "0.95.0.5"
98+VIProductVersion "0.95.0.5"
9999
100100 ;--------------------------------
101101 ;Modern UI Configuration
--- a/lib/connection.c
+++ b/lib/connection.c
@@ -26,6 +26,41 @@
2626 #include "connection.h"
2727 #include "message.h"
2828
29+/** Adjust connection endings for autogap. This function actually moves the
30+ * ends of the connection, but only when the end is connected to
31+ * a mainpoint.
32+ */
33+void
34+connection_adjust_for_autogap(Connection *connection)
35+{
36+ Point endpoints[2];
37+ ConnectionPoint *start_cp, *end_cp;
38+
39+ start_cp = connection->endpoint_handles[0].connected_to;
40+ end_cp = connection->endpoint_handles[1].connected_to;
41+
42+ endpoints[0] = connection->endpoints[0];
43+ endpoints[1] = connection->endpoints[1];
44+
45+ if (connpoint_is_autogap(start_cp)) {
46+ endpoints[0] = start_cp->pos;
47+ }
48+ if (connpoint_is_autogap(end_cp)) {
49+ endpoints[1] = end_cp->pos;
50+ }
51+
52+ if (connpoint_is_autogap(start_cp)) {
53+ connection->endpoints[0] = calculate_object_edge(&endpoints[0],
54+ &endpoints[1],
55+ start_cp->object);
56+ }
57+ if (connpoint_is_autogap(end_cp)) {
58+ connection->endpoints[1] = calculate_object_edge(&endpoints[1],
59+ &endpoints[0],
60+ end_cp->object);
61+ }
62+}
63+
2964 /** Function called to move one of the handles associated with the
3065 * object.
3166 * This is an object_ops function.
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -51,6 +51,8 @@ ObjectChange* connection_move_handle(Connection *conn, HandleId id,
5151 HandleMoveReason reason,
5252 ModifierKeys modifiers);
5353
54+void connection_adjust_for_autogap(Connection *conn);
55+
5456 /* base property stuff... */
5557 #define CONNECTION_COMMON_PROPERTIES \
5658 OBJECT_COMMON_PROPERTIES, \
--- a/lib/diagdkrenderer.c
+++ b/lib/diagdkrenderer.c
@@ -965,7 +965,8 @@ draw_polygon (DiaRenderer *self,
965965 static void
966966 draw_object (DiaRenderer *renderer, DiaObject *object)
967967 {
968- if (object->highlight_color != NULL) {
968+ if (renderer->is_interactive &&
969+ object->highlight_color != NULL) {
969970 DiaGdkRenderer *gdk_rend = DIA_GDK_RENDERER(renderer);
970971 gdk_rend->highlight_color = object->highlight_color;
971972 object->ops->draw(object, renderer);
--- a/lib/dialibartrenderer.c
+++ b/lib/dialibartrenderer.c
@@ -1331,7 +1331,8 @@ draw_image(DiaRenderer *self,
13311331 static void
13321332 draw_object (DiaRenderer *renderer, DiaObject *object)
13331333 {
1334- if (object->highlight_color != NULL) {
1334+ if (renderer->is_interactive &&
1335+ object->highlight_color != NULL) {
13351336 DiaLibartRenderer *libart_rend = DIA_LIBART_RENDERER(renderer);
13361337 libart_rend->highlight_color = object->highlight_color;
13371338 object->ops->draw(object, renderer);
--- a/lib/object.c
+++ b/lib/object.c
@@ -889,7 +889,8 @@ dia_object_sanity_check(const DiaObject *obj, const gchar *msg) {
889889 g_utf8_validate(cp->object->type->name, -1, NULL),
890890 "%s: Handle %d (%p) on object %p connects to CP %p with untyped object %p\n",
891891 msg, i, h, obj, cp, cp->object)) break;
892- dia_assert_true(cp->pos.x == h->pos.x && cp->pos.y == h->pos.y,
892+ dia_assert_true(fabs(cp->pos.x - h->pos.x) < 0.0000001 &&
893+ fabs(cp->pos.y - h->pos.y) < 0.0000001,
893894 "%s: Handle %d (%p) on object %p has pos %f, %f,\nbut its CP %p of object %p has pos %f, %f\n",
894895 msg, i, h, obj, h->pos.x, h->pos.y,
895896 cp, cp->object, cp->pos.x, cp->pos.y);
--- a/objects/FS/flow.c
+++ b/objects/FS/flow.c
@@ -470,6 +470,10 @@ flow_update_data(Flow *flow)
470470 Rectangle rect;
471471 Color* color = NULL;
472472
473+ if (connpoint_is_autogap(flow->connection.endpoint_handles[0].connected_to) ||
474+ connpoint_is_autogap(flow->connection.endpoint_handles[1].connected_to)) {
475+ connection_adjust_for_autogap(flow);
476+ }
473477 obj->position = conn->endpoints[0];
474478
475479 switch (flow->type) {
--- a/objects/Istar/link.c
+++ b/objects/Istar/link.c
@@ -629,6 +629,13 @@ link_update_data(Link *link)
629629 Rectangle rect;
630630 Point p1,p2,p3,p4,pa;
631631
632+/* Too complex to easily decide */
633+/*
634+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
635+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
636+ connection_adjust_for_autogap(conn);
637+ }
638+*/
632639 obj->position = conn->endpoints[0];
633640
634641 link->pm_handle.pos = link->pm;
--- a/objects/Jackson/phenomenon.c
+++ b/objects/Jackson/phenomenon.c
@@ -377,6 +377,10 @@ message_update_data(Message *message)
377377 DiaObject *obj = &conn->object;
378378 Rectangle rect;
379379
380+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
381+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
382+ connection_adjust_for_autogap(conn);
383+ }
380384 obj->position = conn->endpoints[0];
381385
382386 message->text_handle.pos = message->text_pos;
--- a/objects/KAOS/metaandorrel.c
+++ b/objects/KAOS/metaandorrel.c
@@ -578,7 +578,13 @@ maor_update_data(Maor *maor)
578578 Rectangle rect;
579579 Point p1,p2,p3,p4;
580580
581- obj->position = conn->endpoints[0];
581+/* Too complex to easily decide */
582+/*
583+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
584+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
585+ connection_adjust_for_autogap(conn);
586+ }
587+*/ obj->position = conn->endpoints[0];
582588
583589 maor->text_handle.pos = maor->text_pos;
584590
--- a/objects/KAOS/metabinrel.c
+++ b/objects/KAOS/metabinrel.c
@@ -536,6 +536,13 @@ mbr_update_data(Mbr *mbr)
536536 Point p3,p4;
537537 gchar *text;
538538
539+/* Too complex to easily decide */
540+/*
541+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
542+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
543+ connection_adjust_for_autogap(conn);
544+ }
545+*/
539546 obj->position = conn->endpoints[0];
540547
541548 mbr->pm_handle.pos = mbr->pm;
--- a/objects/SADT/annotation.c
+++ b/objects/SADT/annotation.c
@@ -399,6 +399,10 @@ annotation_update_data(Annotation *annotation)
399399 DiaObject *obj = &conn->object;
400400 Rectangle textrect;
401401
402+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
403+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
404+ connection_adjust_for_autogap(conn);
405+ }
402406 obj->position = conn->endpoints[0];
403407
404408 annotation->text_handle.pos = annotation->text->position;
--- a/objects/UML/class.c
+++ b/objects/UML/class.c
@@ -909,18 +909,16 @@ umlclass_draw_operationbox(UMLClass *umlclass, DiaRenderer *renderer, Element *e
909909
910910 wrapping_needed = 0;
911911 if( umlclass->wrap_operations ) {
912- wrapsublist = (GList*)g_list_nth( umlclass->operations_wrappos, i)->data;
913- wrapping_needed = GPOINTER_TO_INT( wrapsublist->data );
912+ wrapsublist = op->wrappos;
914913 }
915914
916915 ascent = dia_font_ascent(opstr, font, font_height);
916+ op->ascent = ascent;
917917 renderer_ops->set_font(renderer, font, font_height);
918918
919- if( umlclass->wrap_operations && wrapping_needed) {
920-
921- wrapsublist = g_list_next( wrapsublist);
922- ident = GPOINTER_TO_INT( wrapsublist->data);
923- wrapsublist = g_list_next( wrapsublist);
919+ if( umlclass->wrap_operations && op->needs_wrapping) {
920+ ident = op->wrap_indent;
921+ wrapsublist = op->wrappos;
924922 wrap_pos = last_wrap_pos = 0;
925923
926924 while( wrapsublist != NULL) {
@@ -1192,10 +1190,15 @@ umlclass_update_data(UMLClass *umlclass)
11921190 op->right_connection->pos.y = y;
11931191 op->right_connection->directions = DIR_EAST;
11941192
1195- y += umlclass->font_height;
1193+ if (op->needs_wrapping) { /* Wrapped */
1194+ int lines = g_list_length(op->wrappos);
1195+ y += umlclass->font_height - op->ascent;
1196+ y += op->ascent * lines;
1197+ } else {
1198+ y += umlclass->font_height;
1199+ }
11961200 if (umlclass->visible_comments && op->comment != NULL && op->comment[0] != '\0')
1197- y += umlclass->comment_font_height;
1198-
1201+ y += umlclass->comment_font_height; /* Not adjusted for wrap */
11991202 list = g_list_next(list);
12001203 }
12011204
@@ -1292,12 +1295,6 @@ static real
12921295 umlclass_calculate_attribute_data(UMLClass *umlclass)
12931296 {
12941297 int i;
1295- int pos_next_comma;
1296- int pos_brace;
1297- int wrap_pos;
1298- int last_wrap_pos;
1299- int maxlinewidth;
1300- int length;
13011298 real maxwidth = 0.0;
13021299 real width = 0.0;
13031300 GList *list;
@@ -1377,25 +1374,17 @@ umlclass_calculate_operation_data(UMLClass *umlclass)
13771374 int pos_brace;
13781375 int wrap_pos;
13791376 int last_wrap_pos;
1380- int ident;
1377+ int indent;
13811378 int offset;
13821379 int maxlinewidth;
13831380 int length;
13841381 real maxwidth = 0.0;
13851382 real width = 0.0;
13861383 GList *list;
1387- GList *sublist;
13881384 GList *wrapsublist;
13891385
13901386 /* operations box: */
13911387 umlclass->operationsbox_height = 2*0.1;
1392- /* dont leak string wrappings */
1393- if (umlclass->operations_wrappos != NULL)
1394- {
1395- g_list_foreach(umlclass->operations_wrappos, (GFunc)g_list_free, NULL);
1396- g_list_free(umlclass->operations_wrappos);
1397- umlclass->operations_wrappos = NULL;
1398- }
13991388
14001389 if (0 != g_list_length(umlclass->operations))
14011390 {
@@ -1405,35 +1394,60 @@ umlclass_calculate_operation_data(UMLClass *umlclass)
14051394 {
14061395 UMLOperation *op = (UMLOperation *) list->data;
14071396 gchar *opstr = uml_get_operation_string(op);
1397+ DiaFont *Font;
1398+ real FontHeight;
1399+
1400+ length = strlen( (const gchar*)opstr);
1401+
1402+ if (op->wrappos != NULL) {
1403+ g_list_free(op->wrappos);
1404+ }
1405+ op->wrappos = NULL;
1406+
1407+ switch(op->inheritance_type)
1408+ {
1409+ case UML_ABSTRACT:
1410+ Font = umlclass->abstract_font;
1411+ FontHeight = umlclass->abstract_font_height;
1412+ break;
1413+ case UML_POLYMORPHIC:
1414+ Font = umlclass->polymorphic_font;
1415+ FontHeight = umlclass->polymorphic_font_height;
1416+ break;
1417+ case UML_LEAF:
1418+ default:
1419+ Font = umlclass->normal_font;
1420+ FontHeight = umlclass->font_height;
1421+ }
1422+ op->ascent = dia_font_ascent(opstr, Font, FontHeight);
14081423
1409- length = 0;
14101424 if( umlclass->wrap_operations )
14111425 {
1412- length = strlen( (const gchar*)opstr);
1413- sublist = NULL;
14141426 if( length > umlclass->wrap_after_char)
14151427 {
14161428 gchar *part_opstr;
1417- sublist = g_list_append( sublist, GINT_TO_POINTER( 1));
1429+ op->needs_wrapping = TRUE;
14181430
14191431 /* count maximal line width to create a secure buffer (part_opstr)
14201432 and build the sublist with the wrapping data for the current operation, which will be used by umlclass_draw(), too.
1421- The content of the sublist is:
1422- 1st element: (bool) wrapping needed or not, 2nd: indentation in chars, 3rd-last: absolute wrapping positions */
1423- pos_next_comma = pos_brace = wrap_pos = offset = maxlinewidth = umlclass->max_wrapped_line_width = 0;
1433+ */
1434+ pos_next_comma = pos_brace = wrap_pos = offset
1435+ = maxlinewidth = umlclass->max_wrapped_line_width = 0;
14241436 while( wrap_pos + offset < length)
14251437 {
14261438 do
14271439 {
14281440 pos_next_comma = strcspn( (const gchar*)opstr + wrap_pos + offset, ",");
14291441 wrap_pos += pos_next_comma + 1;
1430- } while( wrap_pos < umlclass->wrap_after_char - pos_brace && wrap_pos + offset < length);
1442+ } while( wrap_pos < umlclass->wrap_after_char - pos_brace
1443+ && wrap_pos + offset < length);
14311444
14321445 if( offset == 0){
14331446 pos_brace = strcspn( opstr, "(");
1434- sublist = g_list_append( sublist, GINT_TO_POINTER( pos_brace+1));
1447+ op->wrap_indent = pos_brace + 1;
14351448 }
1436- sublist = g_list_append( sublist, GINT_TO_POINTER( wrap_pos + offset));
1449+ op->wrappos = g_list_append(op->wrappos,
1450+ GINT_TO_POINTER(wrap_pos + offset));
14371451
14381452 maxlinewidth = MAX(maxlinewidth, wrap_pos);
14391453
@@ -1442,17 +1456,13 @@ umlclass_calculate_operation_data(UMLClass *umlclass)
14421456 }
14431457 umlclass->max_wrapped_line_width = MAX( umlclass->max_wrapped_line_width, maxlinewidth+1);
14441458
1445- wrapsublist = g_list_next( sublist);
1446- ident = GPOINTER_TO_INT( wrapsublist->data);
1447- part_opstr = g_alloca(umlclass->max_wrapped_line_width+ident+1);
1448- pos_next_comma = pos_brace = wrap_pos = offset = 0;
1459+ indent = op->wrap_indent;
1460+ part_opstr = g_alloca(umlclass->max_wrapped_line_width+indent+1);
14491461
1450- wrapsublist = g_list_next( wrapsublist);
1462+ wrapsublist = op->wrappos;
14511463 wrap_pos = last_wrap_pos = 0;
14521464
14531465 while( wrapsublist != NULL){
1454- DiaFont *Font;
1455- real FontHeight;
14561466 wrap_pos = GPOINTER_TO_INT( wrapsublist->data);
14571467 if( last_wrap_pos == 0){
14581468 strncpy( part_opstr, opstr, wrap_pos);
@@ -1460,28 +1470,16 @@ umlclass_calculate_operation_data(UMLClass *umlclass)
14601470 }
14611471 else
14621472 {
1463- memset( part_opstr, ' ', ident);
1464- memset( part_opstr+ident, '\0', 1);
1473+ memset( part_opstr, ' ', indent);
1474+ memset( part_opstr+indent, '\0', 1);
14651475 strncat( part_opstr, opstr+last_wrap_pos, wrap_pos-last_wrap_pos);
14661476 }
14671477
1468- switch(op->inheritance_type)
1469- {
1470- case UML_ABSTRACT:
1471- Font = umlclass->abstract_font;
1472- FontHeight = umlclass->abstract_font_height;
1473- break;
1474- case UML_POLYMORPHIC:
1475- Font = umlclass->polymorphic_font;
1476- FontHeight = umlclass->polymorphic_font_height;
1477- break;
1478- case UML_LEAF:
1479- default:
1480- Font = umlclass->normal_font;
1481- FontHeight = umlclass->font_height;
1482- }
14831478 width = dia_font_string_width(part_opstr,Font,FontHeight);
1484- umlclass->operationsbox_height += FontHeight;
1479+ umlclass->operationsbox_height += op->ascent;
1480+ if (last_wrap_pos == 0) {
1481+ umlclass->operationsbox_height += (FontHeight - op->ascent);
1482+ }
14851483
14861484 maxwidth = MAX(width, maxwidth);
14871485 last_wrap_pos = wrap_pos;
@@ -1490,15 +1488,11 @@ umlclass_calculate_operation_data(UMLClass *umlclass)
14901488 }
14911489 else
14921490 {
1493- sublist = g_list_append( sublist, GINT_TO_POINTER( 0));
1491+ op->needs_wrapping = FALSE;
14941492 }
1495- umlclass->operations_wrappos = g_list_append( umlclass->operations_wrappos, sublist);
14961493 }
14971494
1498- if( !umlclass->wrap_operations || !(length > umlclass->wrap_after_char)) {
1499- DiaFont *Font;
1500- real FontHeight;
1501-
1495+ if (!(umlclass->wrap_operations && length > umlclass->wrap_after_char)) {
15021496 switch(op->inheritance_type)
15031497 {
15041498 case UML_ABSTRACT:
@@ -1532,7 +1526,8 @@ umlclass_calculate_operation_data(UMLClass *umlclass)
15321526 umlclass->comment_font_height);
15331527
15341528 g_free(Wrapped);
1535- umlclass->operationsbox_height += (umlclass->comment_font_height * (NumberOfLines+1));
1529+ umlclass->operationsbox_height +=
1530+ (umlclass->comment_font_height * (NumberOfLines+1));
15361531
15371532 maxwidth = MAX(width, maxwidth);
15381533 }
@@ -1568,21 +1563,10 @@ void
15681563 umlclass_calculate_data(UMLClass *umlclass)
15691564 {
15701565 int i;
1571- int pos_next_comma;
1572- int pos_brace;
1573- int wrap_pos;
1574- int last_wrap_pos;
1575- int ident;
1576- int offset;
1577- int maxlinewidth;
1578- int length;
15791566 int num_templates;
15801567 real maxwidth = 0.0;
15811568 real width;
15821569 GList *list;
1583- GList *sublist;
1584- GList *wrapsublist;
1585-
15861570
15871571 if (!umlclass->destroyed)
15881572 {
@@ -1748,7 +1732,6 @@ umlclass_create(Point *startpoint,
17481732 umlclass->formal_params = NULL;
17491733
17501734 umlclass->stereotype_string = NULL;
1751- umlclass->operations_wrappos = NULL;
17521735
17531736 umlclass->text_color = color_black;
17541737 umlclass->line_color = attributes_get_foreground();
@@ -1785,7 +1768,6 @@ umlclass_create(Point *startpoint,
17851768 static void
17861769 umlclass_destroy(UMLClass *umlclass)
17871770 {
1788- int i;
17891771 GList *list;
17901772 UMLAttribute *attr;
17911773 UMLOperation *op;
@@ -1840,12 +1822,6 @@ umlclass_destroy(UMLClass *umlclass)
18401822 g_free(umlclass->stereotype_string);
18411823 }
18421824
1843- if (umlclass->operations_wrappos != NULL) {
1844- g_list_foreach(umlclass->operations_wrappos, (GFunc)g_list_free, NULL);
1845- g_list_free(umlclass->operations_wrappos);
1846- umlclass->operations_wrappos = NULL;
1847- }
1848-
18491825 if (umlclass->properties_dialog != NULL) {
18501826 g_list_free(umlclass->properties_dialog->deleted_connections);
18511827 gtk_widget_destroy(umlclass->properties_dialog->dialog);
@@ -1958,7 +1934,6 @@ umlclass_copy(UMLClass *umlclass)
19581934 newumlclass->properties_dialog = NULL;
19591935
19601936 newumlclass->stereotype_string = NULL;
1961- newumlclass->operations_wrappos = NULL;
19621937
19631938 for (i=0;i<UMLCLASS_CONNECTIONPOINTS;i++) {
19641939 newobj->connections[i] = &newumlclass->connections[i];
@@ -2250,7 +2225,6 @@ static DiaObject *umlclass_load(ObjectNode obj_node, int version,
22502225 fill_in_fontdata(umlclass);
22512226
22522227 umlclass->stereotype_string = NULL;
2253- umlclass->operations_wrappos = NULL;
22542228
22552229 umlclass_calculate_data(umlclass);
22562230
--- a/objects/UML/class.h
+++ b/objects/UML/class.h
@@ -126,7 +126,8 @@ struct _UMLClass {
126126 real attributesbox_height;
127127
128128 real operationsbox_height;
129- GList *operations_wrappos;
129+/*
130+ GList *operations_wrappos;*/
130131 int max_wrapped_line_width;
131132
132133 real templates_height;
--- a/objects/UML/constraint.c
+++ b/objects/UML/constraint.c
@@ -350,6 +350,10 @@ constraint_update_data(Constraint *constraint)
350350 constraint->brtext = string_to_bracketted(constraint->text, "{", "}");
351351 }
352352
353+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
354+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
355+ connection_adjust_for_autogap(conn);
356+ }
353357 obj->position = conn->endpoints[0];
354358
355359 constraint->text_width = dia_font_string_width(constraint->brtext,
--- a/objects/UML/implements.c
+++ b/objects/UML/implements.c
@@ -366,6 +366,10 @@ implements_update_data(Implements *implements)
366366 implements_font,
367367 IMPLEMENTS_FONTHEIGHT);
368368
369+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
370+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
371+ connection_adjust_for_autogap(conn);
372+ }
369373 obj->position = conn->endpoints[0];
370374
371375 implements->text_handle.pos = implements->text_pos;
--- a/objects/UML/message.c
+++ b/objects/UML/message.c
@@ -420,6 +420,10 @@ message_update_data(Message *message)
420420 DiaObject *obj = &conn->object;
421421 Rectangle rect;
422422
423+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
424+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
425+ connection_adjust_for_autogap(conn);
426+ }
423427 obj->position = conn->endpoints[0];
424428
425429 message->text_handle.pos = message->text_pos;
--- a/objects/UML/uml.h
+++ b/objects/UML/uml.h
@@ -92,8 +92,14 @@ struct _UMLOperation {
9292
9393 ConnectionPoint* left_connection; /**< left */
9494 ConnectionPoint* right_connection; /**< right */
95+
96+ gboolean needs_wrapping; /** Whether this operation needs wrapping */
97+ gint wrap_indent; /** The amount of indentation in chars */
98+ GList *wrappos; /** Absolute wrapping positions */
99+ real ascent; /** The ascent amount used for line distance in wrapping */
95100 };
96101
102+
97103 /** \brief A list of UMLParameter is contained in UMLOperation
98104 * Some would call them functions parameters ;)
99105 */
--- a/objects/UML/umloperation.c
+++ b/objects/UML/umloperation.c
@@ -108,15 +108,10 @@ uml_operation_new(void)
108108 op = g_new0(UMLOperation, 1);
109109 op->internal_id = next_id++;
110110 op->name = g_strdup("");
111- op->type = NULL;
112- op->stereotype = NULL;
113111 op->comment = g_strdup("");
114112 op->visibility = UML_PUBLIC;
115- op->class_scope = FALSE;
116113 op->inheritance_type = UML_LEAF;
117- op->query = FALSE;
118114
119- op->parameters = NULL;
120115 #if 0 /* setup elsewhere */
121116 op->left_connection = g_new0(ConnectionPoint, 1);
122117 op->right_connection = g_new0(ConnectionPoint, 1);
@@ -238,6 +233,10 @@ uml_operation_destroy(UMLOperation *op)
238233 uml_parameter_destroy(param);
239234 list = g_list_next(list);
240235 }
236+ if (op->wrappos) {
237+ g_list_free(op->wrappos);
238+ }
239+
241240 #if 0 /* freed elsewhere */
242241 /* These are merely temporary reminders, don't need to unconnect */
243242 g_free(op->left_connection);
--- a/objects/network/bus.c
+++ b/objects/network/bus.c
@@ -445,7 +445,16 @@ bus_update_data(Bus *bus)
445445 Point *endpoints;
446446 real ulen;
447447 real min_par, max_par;
448-
448+
449+/*
450+ * This seems to break stuff wildly.
451+ */
452+/*
453+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
454+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
455+ connection_adjust_for_autogap(conn);
456+ }
457+*/
449458 endpoints = &conn->endpoints[0];
450459 obj->position = endpoints[0];
451460
--- a/objects/network/wanlink.c
+++ b/objects/network/wanlink.c
@@ -380,6 +380,10 @@ wanlink_update_data(WanLink *wanlink)
380380 width = wanlink->width;
381381 width_2 = width / 2.0;
382382
383+ if (connpoint_is_autogap(conn->endpoint_handles[0].connected_to) ||
384+ connpoint_is_autogap(conn->endpoint_handles[1].connected_to)) {
385+ connection_adjust_for_autogap(conn);
386+ }
383387 endpoints = &conn->endpoints[0];
384388 obj->position = endpoints[0];
385389
--- a/objects/standard/line.c
+++ b/objects/standard/line.c
@@ -85,8 +85,7 @@ static void line_save(Line *line, ObjectNode obj_node, const char *filename);
8585 static DiaObject *line_load(ObjectNode obj_node, int version, const char *filename);
8686 static DiaMenu *line_get_object_menu(Line *line, Point *clickedpoint);
8787
88-void line_adjust_for_autogap(Line *line);
89-void line_adjust_for_absolute_gap(Line *line, Point *gap_endpoints);
88+void Line_adjust_for_absolute_gap(Line *line, Point *gap_endpoints);
9089
9190 static ObjectTypeOps line_type_ops =
9291 {
@@ -305,41 +304,6 @@ calculate_object_edge(Point *objmid, Point *end, DiaObject *obj)
305304 }
306305
307306
308-/** Adjust line endings for autogap. This function actually moves the
309- * ends of the line, but only when the end is connected to
310- * a mainpoint.
311- */
312-void
313-line_adjust_for_autogap(Line *line)
314-{
315- Point endpoints[2];
316- ConnectionPoint *start_cp, *end_cp;
317-
318- start_cp = line->connection.endpoint_handles[0].connected_to;
319- end_cp = line->connection.endpoint_handles[1].connected_to;
320-
321- endpoints[0] = line->connection.endpoints[0];
322- endpoints[1] = line->connection.endpoints[1];
323-
324- if (connpoint_is_autogap(start_cp)) {
325- endpoints[0] = start_cp->pos;
326- }
327- if (connpoint_is_autogap(end_cp)) {
328- endpoints[1] = end_cp->pos;
329- }
330-
331- if (connpoint_is_autogap(start_cp)) {
332- line->connection.endpoints[0] = calculate_object_edge(&endpoints[0],
333- &endpoints[1],
334- start_cp->object);
335- }
336- if (connpoint_is_autogap(end_cp)) {
337- line->connection.endpoints[1] = calculate_object_edge(&endpoints[1],
338- &endpoints[0],
339- end_cp->object);
340- }
341-}
342-
343307 /** Calculate the absolute gap -- this gap is 'transient', in that
344308 * the actual end of the line is not moved, but it is made to look like
345309 * it is shorter.
@@ -560,7 +524,7 @@ line_update_data(Line *line)
560524
561525 if (connpoint_is_autogap(line->connection.endpoint_handles[0].connected_to) ||
562526 connpoint_is_autogap(line->connection.endpoint_handles[1].connected_to)) {
563- line_adjust_for_autogap(line);
527+ connection_adjust_for_autogap(line);
564528 }
565529 if (line->absolute_start_gap || line->absolute_end_gap ) {
566530 Point gap_endpoints[2];
--- a/plug-ins/xfig/xfig-import.c
+++ b/plug-ins/xfig/xfig-import.c
@@ -441,11 +441,17 @@ create_standard_group(GList *items, DiagramData *dia) {
441441 static Color
442442 fig_color(int color_index)
443443 {
444- if (color_index == -1)
444+ if (color_index <= -1)
445445 return color_black; /* Default color */
446- if (color_index < FIG_MAX_DEFAULT_COLORS)
446+ else if (color_index < FIG_MAX_DEFAULT_COLORS)
447447 return fig_default_colors[color_index];
448- else return fig_colors[color_index-FIG_MAX_DEFAULT_COLORS];
448+ else if (color_index < FIG_MAX_USER_COLORS)
449+ return fig_colors[color_index-FIG_MAX_DEFAULT_COLORS];
450+ else {
451+ message_error(_("Color index %d too high, only 512 colors allowed. Using black instead."),
452+ color_index);
453+ return color_black;
454+ }
449455 }
450456
451457 static Color
@@ -563,23 +569,25 @@ fig_simple_properties(DiaObject *obj,
563569 static int
564570 fig_read_n_points(FILE *file, int n, Point **points) {
565571 int i;
566- Point *new_points;
567-
568- new_points = (Point*)g_malloc(sizeof(Point)*n);
572+ GArray *points_list = g_array_sized_new(FALSE, FALSE, sizeof(Point), n);
569573
570574 for (i = 0; i < n; i++) {
571575 int x,y;
576+ Point p;
572577 if (fscanf(file, " %d %d ", &x, &y) != 2) {
573578 message_error(_("Error while reading %dth of %d points: %s\n"),
574579 i, n, strerror(errno));
575- g_free(new_points);
580+ g_array_free(points, TRUE);
576581 return FALSE;
577582 }
578- new_points[i].x = x/FIG_UNIT;
579- new_points[i].y = y/FIG_UNIT;
583+ p.x = x/FIG_UNIT;
584+ p.y = y/FIG_UNIT;
585+ g_array_append_val(points_list, p);
580586 }
581587 fscanf(file, "\n");
582- *points = new_points;
588+
589+ *points = (Point *)points_list->data;
590+ g_array_free(points, FALSE);
583591 return TRUE;
584592 }
585593
@@ -698,6 +706,26 @@ static GSList *compound_stack = NULL;
698706 level. Best we can do now. */
699707 static int compound_depth;
700708
709+/** Add an object at a given depth. This function checks for depth limits
710+ * and updates the compound depth if needed.
711+ *
712+ * @param newobj An object to add. If we're inside a compound, this
713+ * doesn't really add the object.
714+ * @param depth A depth as in the Fig format, max 999
715+ */
716+static void
717+add_at_depth(DiaObject *newobj, int depth) {
718+ if (depth < 0 || depth >= FIG_MAX_DEPTHS) {
719+ message_error(_("Depth %d of of range, only 0-%d allowed.\n"),
720+ depth, FIG_MAX_DEPTHS-1);
721+ depth = FIG_MAX_DEPTHS - 1;
722+ }
723+ if (compound_stack == NULL)
724+ depths[depth] = g_list_append(depths[depth], newobj);
725+ else
726+ if (compound_depth > depth) compound_depth = depth;
727+}
728+
701729 static DiaObject *
702730 fig_read_ellipse(FILE *file, DiagramData *dia) {
703731 int sub_type;
@@ -758,10 +786,7 @@ fig_read_ellipse(FILE *file, DiagramData *dia) {
758786 /* Angle -- can't rotate yet */
759787
760788 /* Depth field */
761- if (compound_stack == NULL)
762- depths[depth] = g_list_append(depths[depth], newobj);
763- else
764- if (compound_depth > depth) compound_depth = depth;
789+ add_at_depth(newobj, depth);
765790
766791 return newobj;
767792 }
@@ -896,10 +921,7 @@ fig_read_polyline(FILE *file, DiagramData *dia) {
896921 /* Cap style */
897922
898923 /* Depth field */
899- if (compound_stack == NULL)
900- depths[depth] = g_list_append(depths[depth], newobj);
901- else
902- if (compound_depth > depth) compound_depth = depth;
924+ add_at_depth(newobj, depth);
903925 exit:
904926 setlocale(LC_NUMERIC, old_locale);
905927 prop_list_free(props);
@@ -1125,10 +1147,7 @@ fig_read_spline(FILE *file, DiagramData *dia) {
11251147 /* Cap style */
11261148
11271149 /* Depth field */
1128- if (compound_stack == NULL)
1129- depths[depth] = g_list_append(depths[depth], newobj);
1130- else
1131- if (compound_depth > depth) compound_depth = depth;
1150+ add_at_depth(newobj, depth);
11321151 exit:
11331152 setlocale(LC_NUMERIC, old_locale);
11341153 prop_list_free(props);
@@ -1219,10 +1238,7 @@ fig_read_arc(FILE *file, DiagramData *dia) {
12191238 /* Cap style */
12201239
12211240 /* Depth field */
1222- if (compound_stack == NULL)
1223- depths[depth] = g_list_append(depths[depth], newobj);
1224- else
1225- if (compound_depth > depth) compound_depth = depth;
1241+ add_at_depth(newobj, depth);
12261242
12271243 exit:
12281244 setlocale(LC_NUMERIC, old_locale);
@@ -1319,10 +1335,7 @@ fig_read_text(FILE *file, DiagramData *dia) {
13191335 newobj->ops->set_props(newobj, props);
13201336
13211337 /* Depth field */
1322- if (compound_stack == NULL)
1323- depths[depth] = g_list_append(depths[depth], newobj);
1324- else
1325- if (compound_depth > depth) compound_depth = depth;
1338+ add_at_depth(newobj, depth);
13261339
13271340 exit:
13281341 setlocale(LC_NUMERIC, old_locale);
@@ -1369,6 +1382,12 @@ fig_read_object(FILE *file, DiagramData *dia) {
13691382 return FALSE;
13701383 }
13711384
1385+ if (colornumber < 0 || colornumber > FIG_MAX_USER_COLORS) {
1386+ message_error(_("Color number %d out of range 0..%d. Discarding color.\n"),
1387+ colornumber, FIG_MAX_USER_COLORS);
1388+ return FALSE;
1389+ }
1390+
13721391 color.red = ((colorvalues & 0x00ff0000)>>16) / 255.0;
13731392 color.green = ((colorvalues & 0x0000ff00)>>8) / 255.0;
13741393 color.blue = (colorvalues & 0x000000ff) / 255.0;
@@ -1415,7 +1434,7 @@ fig_read_object(FILE *file, DiagramData *dia) {
14151434 }
14161435 /* Group extends don't really matter */
14171436 if (compound_stack == NULL)
1418- compound_depth = 999;
1437+ compound_depth = FIG_MAX_DEPTHS - 1;
14191438 compound_stack = g_slist_append(compound_stack, NULL);
14201439 return TRUE;
14211440 break;
@@ -1577,7 +1596,7 @@ import_fig(const gchar *filename, DiagramData *dia, void* user_data) {
15771596 for (i = 0; i < FIG_MAX_USER_COLORS; i++) {
15781597 fig_colors[i] = color_black;
15791598 }
1580- for (i = 0; i < 1000; i++) {
1599+ for (i = 0; i < FIG_MAX_DEPTHS; i++) {
15811600 depths[i] = NULL;
15821601 }
15831602
@@ -1633,7 +1652,7 @@ import_fig(const gchar *filename, DiagramData *dia, void* user_data) {
16331652 } while (TRUE);
16341653
16351654 /* Now we can reorder for the depth fields */
1636- for (i = 0; i < 1000; i++) {
1655+ for (i = 0; i < FIG_MAX_DEPTHS; i++) {
16371656 if (depths[i] != NULL)
16381657 layer_add_objects_first(dia->active_layer, depths[i]);
16391658 }
--- a/plug-ins/xfig/xfig.h
+++ b/plug-ins/xfig/xfig.h
@@ -6,6 +6,7 @@ extern char *fig_fonts[];
66
77 #define FIG_MAX_DEFAULT_COLORS 32
88 #define FIG_MAX_USER_COLORS 512
9+#define FIG_MAX_DEPTHS 1000
910 /* 1200 PPI */
1011 #define FIG_UNIT 472.440944881889763779527559055118
1112 /* 1/80 inch */