I found the problem that causes #1 but I didn't found the source that writes the root width and height with the units.
Initially it's set in document.cpp:
/* Quick hack 2 - get default image size into document */ if (!sp_repr_attr (rroot, "width")) sp_repr_set_attr (rroot, "width", A4_WIDTH_STR); if (!sp_repr_attr (rroot, "height")) sp_repr_set_attr (rroot, "height", A4_HEIGHT_STR);
but that uses preset strings "210mm" and "297mm" so you don't need to change that. (Ugly, btw, this needs to be reqritten properly, so it takes initial page size from a template.)
Then it may also be set in root.cpp, but that is already covered, because it uses sp_repr_set_double. Finally it is also set in dialogs/desktop-properties.cpp (document options dialog):
g_snprintf ( c, 32, "%g%s", adjustment->value, sp_unit_selector_get_unit (us)->abbr );
and this one needs to be replaced.
_________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN Premium http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI...