Description: Version: 6.2.4.2 (x64) Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64 CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; Locale: en-US (en_US); UI-Language: en-US Calc: CL Setting the page margins to outside of the print range, and maximizing the header/footer margins, then switching between the tabs sets the fields to negative values. Applying the changes pushes the content off the page. Using the replication steps, this issue can be repeated with the Footer tab (instead of Header), and you can use the right margin instead of the left as well (although the content will be pushed off to the other side of the page). I’d consider this an edge case as it would be very unlikely that anyone with good intentions would go anywhere near those margin values. Steps to Reproduce: 1. Open new LibreOffice document 2. Click on Format > Page … > Page tab 3. Set the Left Margin value to 0 4. Click on the Header tab 5. When prompted about margin being out of print range, click yes. 6. Toggle Header on. 7. Set the Left Margin to 9999 (anything beyond the current margin limit) 8. Click on the Page tab. 9. See the value for Left Margin is now negative. 10. Click on Header tab again. 11. See Left Margin now negative, and preview shows content area far off the page. 12. Click OK (to accept edits and close the window). 13. Try to type things in header or main content area. No text appears, but character count increases. Actual Results: Margins automatically got set to negative values. Text does not appear anywhere, but word count increases as you type. Expected Results: Margins should never be negative and cause text to appear outside of view. Reproducible: Always User Profile Reset: No Additional Info: I will attach a short video that goes through the steps and gives a visual overview of the issue.
Created attachment 152354 [details] Short video that goes through the steps to reproduce the issue.
I see these problems here: The dialog does not correct the input to a valid range, if you leave the tab. If you click in a different field to finish entering the new value, then the value will be restricted to a valid range. The dialog produces this negative value too, if you click "Apply" in the Header-tab. At least at that point the value should be corrected. The dialog goes into a faulty state, so that it is not possible at all, to set valid values.
I can reproduce it in Version: 6.4.0.0.alpha0+ Build ID: a294457eb95e60028539b6783abac78b56561fe2 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded but not in Version: 6.4.0.0.alpha0+ Build ID: a294457eb95e60028539b6783abac78b56561fe2 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded
Also reproduced in Version: 5.2.0.0.alpha1+ Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e CPU Threads: 4; OS Version: Linux 4.15; UI Render: default; Locale: ca-ES (ca_ES.UTF-8) @Caolán, would it make sense to set the margin to 0 if it's negative ?
svx/source/dialog/hdft.cxx and cui/source/tabpages/page.cxx have two different values for MINBODY before 9be17c52b7c565758088b8020a543d7b840e31a7 (2004) they had the same value
and another one in sw/source/uibase/sidebar/PageMarginControl.hxx
https://gerrit.libreoffice.org/#/c/75807/ to sync these to the same value would seem to give the right results
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/cefce1a247a4674c5726a31b61571eab16328a0b%5E%21 tdf#126051 sync MINBODY copies to same value It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
that seems to do the right thing