Bug 146529 - page setup for A4 shows initially strange numbers
Summary: page setup for A4 shows initially strange numbers
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P3 normal
Target Milestone: 1.0.1   Edit
Assignee: Syed Atif CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-06-12 05:50 EDT by Henrik Rentz-Reichert CLA
Modified: 2006-09-13 09:01 EDT (History)
0 users

See Also:


Attachments
screenshot of initial settings (38.77 KB, image/jpeg)
2006-06-12 05:51 EDT, Henrik Rentz-Reichert CLA
no flags Details
Here's a patch that fixes this. (9.28 KB, patch)
2006-06-16 15:47 EDT, Syed Atif CLA
no flags Details | Diff
Updated patch. (11.87 KB, patch)
2006-07-05 16:05 EDT, Syed Atif CLA
no flags Details | Diff
Patch for reopened problem (1.45 KB, patch)
2006-09-12 12:43 EDT, Syed Atif CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Rentz-Reichert CLA 2006-06-12 05:50:28 EDT
The page setup of the ecore editor shows initially strange numbers.
When I switch to another paper format and back to A4 they seem alright (though the margins with unchanged 5 inches still don't leave any space to print).
Comment 1 Henrik Rentz-Reichert CLA 2006-06-12 05:51:45 EDT
Created attachment 44124 [details]
screenshot of initial settings
Comment 2 Henrik Rentz-Reichert CLA 2006-06-12 06:01:17 EDT
If one of the margins is changed the OK button is disabled and not enabled anymore even if the old value is restored.
Comment 3 Alex Shatalin CLA 2006-06-12 06:27:08 EDT
Changing the component
Comment 4 Syed Atif CLA 2006-06-16 15:47:49 EDT
Created attachment 44669 [details]
Here's a patch that fixes this.

Changes:
1. The page width and height fields will now be updated correctly.
2. Fixed conversion from inches to mm.
3. The page width and height for each of the defined paper sizes will now be accurate each time.
4. It will now not allow you to set margins to be bigger than the page size. For example, the sum of the right and left margins cannot be bigger than the width of the page (this is what caused the page breaks to disappear). Same goes for top and bottom margins.
Comment 5 Syed Atif CLA 2006-07-05 16:05:45 EDT
Created attachment 45791 [details]
Updated patch.

This updated patch also fixes the problems from Bug 149726. In addition, it also fixes another bug where the margins check will now behave properly if landscape is selected (see point 4 above).
Comment 6 Henrik Rentz-Reichert CLA 2006-07-06 05:26:29 EDT
Tryed the patch with HEAD revision of org.eclipse.gmf.runtime.diagram.ui.

All my usage scenarios worked just fine
- portrait/landscape
- workspace/diagram setings
- mm/inch units
- page margins

Thanks
Comment 7 Syed Atif CLA 2006-07-18 11:20:01 EDT
patch committed for 1.0.100
Comment 8 Syed Atif CLA 2006-09-12 11:06:09 EDT
Reopening.

In the page setup dialog, page size and margin values change when the user enters values as millimeters and then restores them. Steps to reproduce:

1. Open a GMF editor.
2. Go to File-> Page Setup and change teh Radio Button to 'Use Diagram Settings' 
3. Change units to millimeters.
4. Enter 10, 30 , 40 and 40 agin into the Top, Bottom, Left and Right Margins Values.
5. Enter 200 respective 400 in Width and respective Height Paper Size values.
6. Apply changes then Exit Page setup dialog ad reopen again from File->Page setup menu

RESULTS:
Margins
Top:10.008 mm
Bottom:  29.997 mm 
Left:40.005 mm
Right: 40.005 mm

Size
Height: 399.99 mm
Wiidth:200 mm


EXPECTED: 
Margins
Top:10 mm
Bottom:  30 mm 
Left:40 mm
Right: 40 mm

Size
Height: 400 mm
Width:200 mm
Comment 9 Syed Atif CLA 2006-09-12 12:43:06 EDT
Created attachment 49949 [details]
Patch for reopened problem

This patch will fix the problem described in the comment above.

Files affected:
org.eclipse.gmf.runtime.diagram.ui.internal.dialogs.PageSetupConfigBlock
Comment 10 Syed Atif CLA 2006-09-12 12:49:59 EDT
The bug described in comment #8 has reappeared from Bug 113084.
Comment 11 Syed Atif CLA 2006-09-13 09:01:14 EDT
committed the patch for the reopened problem.
Comment 12 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug