Your code looks definitely better than the original one. Well, I am
still not sure about the calculation. It makes perfect sense when I
imagine the paper with blank labels. On the other hand,
please look at http://download.go-oo.org/tmp/labels.png.
I looked at a lot of (blank) labels and also came to the conclusion that the
definition of the labels leaves room for interpretation.
My calculation is based on the assumption (presumption?) that the
page containing the labels is symmetrical, i.e. rotating the page
180 degrees is not a problem, left margine equals right margin and
top margin equals bottom margin.
It would be much better if the label-definitions contain all dimensions, i.e.
should include either right margin and bottom margin or the page size.
That was too great a change for me to commit without proper discussion.
Have you tested your code with real label printing?
Is just the visualization wrong in LO?
I have not looked at the visualisation/UI, but at the page size as shown in
format-page and at the printer behaviour (the printer at our office wants exact
A4 definiton, otherwise it asks for custom paper sheets).
PS: Just a nitpicking. I did not use the ?: operator in my example. I
think that it was not ideal in this case because you cut&pasted the long
calculation, so it was hard to read and prone to a typo ;-)
I'm the last to suggest my code is ideal or even close to ideal ;)
Should you wish further information (hacking ?), feel free to ask. Currently I am
wrestling with easyhack 34425, but should I get that right, I can have a go at further
improvements of labels.
For users, label printing is mostly troublesome, so any extra user-friendliness
of the application is a plus.
Winfried
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.