meta: don't crash on empty default properties

Some objects have no properties in case of defaults
[unit test] distance_from() vs. enclosing box (plus fixes)

This shall work for all objects so it does not check for full correctness,
but is currently tolerant enough for element and connection objects.
If it fails either the bounding calculation is bogus or distance_from method.

- lib/text.c(text_distance_from): use ascent and descent for first and
  last line, text height is the line height
- Database/reference.c: missing PolyBBExtras use and arrow parts outside
  bounding box
- Jackson/requirement.c: use distance_ellipse_point() and ellipse_bbox()
- network/wanlink.c: use distance_polygon_point()
- standard/image.c(text_distance_from): consider drawing border being optional
Bug 697741 - FS (straight) flow label position adjusts incorrectly

Actually two issues:
 - the adjustment was not correctly considering auto-gap
 - auto-gap with "FS - Function" was wrongly calculated due to
   bogus bounding box (have to adjust ElementBBExtras with
   every function_update_data())
svg: more samples/path-variations.svg

 - fill from attribute
 - a series of pathes with holes
Update Chinese simplified translation
svg: parse comments to meta info
svg: transform parsing robustness

Only transformations separated by comma were supported. Also an invalid
string could have crashed Dia. Now dia_svg_parse_transform() uses
g_regex_split_simple() to split on whitespace or comma and silently
ignores broken transform definitions.
svg: consume transform="skew..."

The offset calculation seems to be as incorrect as with
the rotating matrix, otherwise seems to work.
Tested with REC-SVG11-20110816/images/coords/Skew.svg
svg: comment on ignored <defs/>

Commonly seen in <defs/> are
  clipPath, font, filter, linearGradient, mask, marker, pattern, radialGradient, style
all not supported as of this writing.
Less commonly used are normal objects which could be supported here.
svg: support multiplicative opacity
svg: split style string parsing to it's own function

Introduce dia_svg_parse_style_string() - cut and paste from
the implmentation withing dia_svg_parse_style()
svg: initial support for CSS style for svg-import

The style is a applied to all the basic objects as before, but now
it can come from a style block, with keys tag.class#id and all
variations. CSS styled files will now be much closer to the intent
after loading, but CSS styling is also quite expensive for two reasons:
 - we have to try all the variations of tag.class#id to find if
   there actually is some style (unavoidable)
 - we parse a referenced over and over again (because that was the
   easiest way to get it working)
See comment on _css_parse_style for major things missing.
svg: support parsing of 12 bit color
svg: font style parsing improvements

SVG allows a list of families here, also there is some stange formatting
seen, like 'Arial'. If the given family name can not be resolved by
Pango it complaints loudly with g_warning().

We also had problems because whitespace was not trimmed.
svg: support linejoin and linecap style and attribute

Tested with unmodified files from
REC-SVG11-20110816/images/painting/linecap.svg
REC-SVG11-20110816/images/painting/linejoin.svg
svg: enable <defs/> definitions and referencing

This is just for shapes to be created by reference. More
interesting stuff like gradients etc. pp. are still unsupported.
svg: support last two path code Q and T

Everything from REC-SVG11-20110816/images/paths now works.
But I'm not sure about the relative variants.
svg: CSS style lookup also for tag alone
Sprinkle some more connection_adjust_for_autogap()

Review after bug 697741 and:

* move_handle() method needs to call connection_adjust_for_autogap() after

2007-01-03  Hans Breuer  <hans@breuer.org>

	* objects/UML/constraint.c objects/UML/implements.c
	  objects/UML/message.c objects/Jackson/phenomenon.c
	  objects/KAOS/metaandorrel.c : move_handle() method needs to call
	connection_adjust_for_autogap() after connection_move_handle() because
	the endpoints used for relative text movement need adjustment after
	possible autogap correction.
svg: parse font-* and text-* also as attributes

Small code restructuring to support more attributes with
only small code duplication. Related changes to the order
of <text/> vs. <tspan/> style parsing and some more matrix
usage when interpreting <text/>.