Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Page format limited to 300 mm | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Draw | Reporter: | jirkaz <zaloha> | ||||||
Component: | formatting | Assignee: | christian.guenther | ||||||
Status: | CLOSED FIXED | QA Contact: | issues@graphics <issues> | ||||||
Severity: | Trivial | ||||||||
Priority: | P2 | CC: | Armin.Le.Grand, issues, jnavrati, kpalagin, philipp.lohmann, rainerbielefeld_ooo_qa | ||||||
Version: | OOo 2.3 | Keywords: | regression | ||||||
Target Milestone: | OOo 3.0 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Issue Type: | PATCH | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
jirkaz
2007-09-21 09:22:57 UTC
I can confirm this issue to be reproducible in m226 as well. The maximum values for page width/height are set to 300 centimeters. If you change units to centimeters (or other units), you can set width or height up to 300. I don't know now, where OOo ignores currently set unit system. Or perhaps there is error in parsing an edit field. I will do more investigating. *** Issue 81883 has been marked as a duplicate of this issue. *** There is some bug in units conversion. Reassign to myself and will keep working on it. Hello, It seems that the maximum width or hight is 300 whatever unit is (mm, cm, pica, km, in...). So, for A3 size in mm it is problematic. Created attachment 48699 [details]
patch
I've uploaded patch that fix the main problem. Maximum width/height size was set in "undefined" format, that's why comparison with a current field value doesn't work properly. I've changed a maximum paper width/height value to 300 cm. This value is then converted according to field's unit. Now, it is possible to set a paper size up to 300cm, doesn't matter which unit are currently used. Further, there are some minor issues which should be fixed as well: - margin's max value is 99999 "unknown" units -> fix could be similar as with paper width/height - size in points could be set with a decimal value, e.g. 768,12pt. Is this ever possible ? *** Issue 82590 has been marked as a duplicate of this issue. *** set aw to cc AW: Adding PL to CC. AW->PL: The patch touches VCL Control, please have a look if this is acceptable. Thanks. I think the Control part of the patch is wrong; the normalization is done by the ConvertValue method (the digit parameter is for that). This ought to be right since normalization/denormalization is responsibility of the NumericFormatter, not the MetricFormatter. AW->PL: So do You have a suggestion how to do it right? I don't think it was wrong before. Just skip that part of the patch. AW->PL: Please give somemore hints. Should i skip the vcl/source/control/field.cxx parts completely? Only one call of it? Two? Which ones? Are You sure the patch will work without those? pl->aw: Yes, you should not touch vcl/source/control/field.cxx. No, I don't know what that does to the rest of the patch, but I don't think the modifications in field.cxx are correct. AW->jnavrati: Please see comments above. Please check if Your patch works without the changes in Contol. If not, let us know. pl->jnavrati: I think instead of aPaperWidthEdit.SetMax(aDrawinglayerOpt.GetMaximumPaperWidth(), FUNIT_CM); you should do aPaperWidthEdit.SetMax( aPaperWidthEdit.Normalize( aDrawinglayerOpt.GetMaximumPaperWidth() ), FUNIT_CM); The Min/Max values of the field are in the same range as the values, that is with 10^(GetDecimalDidgets()) Hi guys, thank you for your comments. I wasn't sure from the beginning if the patch is correct or not, because I felt changing field.cxx wasn't a good step. I'm very happy for your comments and suggestions. I think that the last pl's modification should work as well and we don't have to touch field.cxx at all. I'll try this asap and send the results. Good news, it works in the same way without changes in Control. Thanks to pl. Bad news, I see some other suspicious behaviour in this case that regards units conversation generally. e.g. changing page format from "Screen" to "A4" gives page size 296.99mmx209.99mm that is not very nic. And changing back to "Screen" shows 280.00mmx209.99mm. I will try to do more investigating in this area, but I think that there are lots of ways how to set metric values and a mixture of these methods causes the problems. imho it would be fine to do it one way. *** Issue 83350 has been marked as a duplicate of this issue. *** AW->jnavrati: Probably a numerical problem since all that stuff uses integers for calculation. Is Your current solution good enough to go with it or do You think it's better/necessary to hunt that numerical problem and solve it? ->AW: I'd rather fix it completely. But question is, if we either accept this patch that doesn't work correctly in some ways (i.e. gives a strange numbers), but that fixes the primary issue (i.e. page format). Or if we do more investigation to solve the problem that will probably take longer. From my point of few, as a user, I would be happy if all the stuff worked fine. Instead of complaining of a wrong numbers and logging more similar issues. *** Issue 81665 has been marked as a duplicate of this issue. *** Although this is a serious regression, the workaround is so easy and effective that I (at least) would vote for a higher-quality fix that may take a little longer, over a quick fix that leads to more problems. I can't understand the principle of this problem.... In 2.2.1 and earlier versions of OOo was the page format without any problem - why don't you go back to the old good solution? *** Issue 84775 has been marked as a duplicate of this issue. *** Created attachment 50804 [details]
updated patch
I attached an updated patch that fix a issue about maximum page size. Now, I can set the page size up to 300cm. Please, verify. *** Issue 85259 has been marked as a duplicate of this issue. *** Unfortunately this problem also exists for CALC and WRITER. "Blocks" and "DUP" seems to be a little excessive ->aw: What do you thing about my latest patch? I can confirm it fixes the page format limits and it works for me fine. AW->jnavrati: I took a short look at the code, will look the next days (when i have a fresh BugFixing CWS) and check functionality. I'll keep You informed. AW->PL: What do You think? AW: Added to CWS aw055 (BugFixing for 3.0) and tesing now. Adding needed modules (svx, svtools, officecfg). Will apply patch and test... AW: Checked on m245, looks very good. Checked in. AW->jnavrati: Thanks! Works wery well! Patch added and accepted. AW: Oops, setting target... AW->CGU: Please verify. Follow the first example. You need to change units to mm in extras/options first. *** Issue 88062 has been marked as a duplicate of this issue. *** CGU: Verified in cws aw055 CGU: integrated in dev300m19 |