Created attachment 172218 [details] attachment 90834 [details] converted to compatibilitymode 15 with Word 2019 Attached example file was converted from attachment 90834 [details] with Word 2019 to the latest docx format. Another example file was converted from the same attachment with Word 2010. These look differently in Word, but not in Writer: In newer Word versions the tabs at the end of the line are not swallowed, but broken into new lines. Steps to reproduce: 1. Open attached file Actual results: The four tabs at the end of the line are not broken into new lines. Expected results: The four tabs at the end of the line should be broken into new lines. But not with the 2010-compatibility mode file, there any amount of extra tabs should be swallowed, per: https://bugs.documentfoundation.org/show_bug.cgi?id=107476#c7 LibreOffice details: Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community Build ID: eda109d5d91e82adb675ebf6db952bf6d82b3391 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL
Created attachment 172219 [details] attachment 90834 [details] converted to compatibilitymode 14 with Word 2010
Created attachment 172220 [details] Screenshot of the compatibilitymode 15 document side by side in Word and Writer
Created attachment 172221 [details] Screenshot of the compatibilitymode 14 document side by side in Word and Writer
I think Miklos will be interested in hearing about this compat change. CC'd. I confirmed that just changing word/settings.xml compatibilityMode from 14 to 15 is enough to make this rather dramatic change.
Nice, for once Word giving up its own stupid behavior for new docs. :-)
It looks like this is not just TabOverMargin, but also TabOverflow. Plus something else which we don't handle yet - the first tab should be full page width, so that it jumps to a new line if there are any characters before the tab? [Trading one bad implementation for another?] It looks like we could set c14 values in SettingsTable::ApplyProperties and remove TabOverMargin from filter/Writerfilter::setTargetDocument (and set TabOverflow to false here). tdf90681-1.odt from ooxmlexport5 is one barely-noticable existing unit test that demonstrates the c15 behaviour. (The footer is two empty lines instead of one.)
Sometimes compat settings are hijacked for another purpose. However, I didn't notice that for either tabOverMargin or tabOverflow. Good.
Created attachment 172352 [details] tabStopsTripleSpacingc11.doc: shows general problem with IgnoreTabsAndBlanksForLineCalculation that is not related to compatibility mode. (In reply to Justin L from comment #6) > Plus something else which we don't handle yet - the first tab should be full > page width, so that it always takes up a full line. It looks like SwTabPortion::PreFormat (either bFull or PrtWidth(rInf.Width()) can handle this. One thing I hadn't noticed before is that some tab-only-lines are double-spaced and some are single spaced, but in LO they show as single-spaced. That started in LO 4.0 range https://cgit.freedesktop.org/libreoffice/core/log/?id=c26e9fc152f6a52fd95a7ef2a3e6ffbd9439ca4c&qt=range&q=179a6db61ee30cf776747802f06edeef45fec461..5f91f8a368343d8921a01edb7359cd300892f09d). The specific commit is "n#779627: added quite some compat options from the ww8 filter on writerfilter" https://cgit.freedesktop.org/libreoffice/core/commit/?id=355d25eac764713f4d52eac801ade6e2ff1deab0, because of IgnoreTabsAndBlanksForLineCalculation.
Created attachment 172354 [details] tabStopsTripleSpacingc11_word2003.pdf: two pages long with triple-spaced tab lines
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/89e7341025b607491c90efdb74708e63d875c1e5 tdf#142404 sw compat layout: ignore blank size only on one-liners It will be available in 7.2.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.
Created attachment 172516 [details] tabOverflow.odt: Various tabOverflow scenarios. When we have TabOverMargin, that also involves TabOverflow. So what does Microsoft do in this case now? Note that LibreOffice changed its OWN behaviour in 2011, so that tab-fill would overflow the margin, just like MS Word did. But now DOCX has changed, so do we change LO's OWN behaviour back again just for DOCX and therefore be less compatible with DOC/RTF? See the discussion about this in https://gerrit.libreoffice.org/c/core/+/116336.
Created attachment 172517 [details] tabOverflow_comparison.pdf: Writer, Word 2016 in compatibile mode, and then in native mode When LO 6.4 saves tabOverflow.ODT as a DOCX, Word opens it in compatible mode. When LO 7.0 saves it as a DOCX, Word opens it in native mode. Writer displays it somewhere in the middle...
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/29bd00f7628e7a54e69cabcc7e2a1792c24aa55c tdf#142404 DOCX c15: TabOverMargin no longer true in 2013+ It will be available in 7.2.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.
Created attachment 172553 [details] tabOverflowB.odt: tabOverSpacing still applies in c15 though I'm going to delay backporting to 7.1 until I've had a chance to try to figure out how to allow "tab over right spacing" as seen in this example document. That still applies in Word 2016 (but is lost in LO when turning off tabOverMargin).
Created attachment 172589 [details] tabOverSpacing_odd_c12.docx: MS Word 2016 renders this very strangely. I just wanted to preserve this DOCX that makes NO LOGICAL SENSE in how MS Word renders it. This is in compatibility mode. The super strange line is "A left tab positioned at 15cm" which for whatever reason breaks into multiple lines - the most bizarre being the one starting with "1 and forever". What could possibly have induced that to wrap at that point? LO also handles it really poorly. The extra defined tab at 2cm seems to cause problems for initial layout.
Created attachment 172590 [details] tabOverSpacing_odd_c12.pdf: How Word 2016 renders it.
Proposed patch that seems to handle the tab over paragraph-margins nicely. http://gerrit.libreoffice.org/c/core/+/116667
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a2d8a737f41cbb0ed8a51a99b1c233b25e433d1c tdf#142404 DOCX c15: add compat flag TabOverSpacing It will be available in 7.2.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/39251e461bfe628da875bb17e91dc374f137eec5 tdf#142404 DOCX c15: allow autoTabStop after TabOverSpacing It will be available in 7.3.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c54de8cca177154d267238ed6d0b6cb4f3f86c8d tdf#142404 DOCX c15: line full before out-of-bounds TabOverSpacing It will be available in 7.3.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3f5311271ea6e41583c581b8a0172e322f5a179a tdf#142404 DOCX c15: fix centering when TabOverSpacing It will be available in 7.3.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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/d7a7ac3581290f9d4820d01d0a64269fc47d00f6 tdf#142404 DOCX c15: fix centering when TabOverSpacing It will be available in 7.2.0.0.beta2. 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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b85491e40ccb83ff78c7c4b2c0d535eafa5d23ed tdf#142404 DOCX c15: handle remaining TabOverSpacing tabs It will be available in 7.3.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.
I'm tempted to mark this as fixed, even though comment 0's 40787_TabsAtEndOfParagraphC15.docx isn't yet identical to Word 2016. That's because Word does REALLY STRANGE THINGS. If the tab is connected directly to a word, the word is pulled down, and then the tab follows - usually again on another line. When - as in this case - the tab follows some whitespace, then only the tab starts a new line, and it does NOT pull down any of the whitespace. So there is still a difference, since I don't have the first tabstop always start on a new line. But that doesn't seem logical to do that, and there seem to be some bugs in MS implementation, so we probably shouldn't try TOO hard to exactly match what we see in Word.
Dear NISZ LibreOffice Team, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Created attachment 194249 [details] A regression testcase for 89e734 (In reply to Commit Notification from comment #10) > Justin Luth committed a patch related to this issue. > It has been pushed to "master": > > https://git.libreoffice.org/core/commit/ > 89e7341025b607491c90efdb74708e63d875c1e5 > > tdf#142404 sw compat layout: ignore blank size only on one-liners > > It will be available in 7.2.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. Seems these changes are causing (In reply to Commit Notification from comment #10) > Justin Luth committed a patch related to this issue. > It has been pushed to "master": > > https://git.libreoffice.org/core/commit/ > 89e7341025b607491c90efdb74708e63d875c1e5 > > tdf#142404 sw compat layout: ignore blank size only on one-liners > > It will be available in 7.2.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. Seems this patch is causing regressions in MS docs layout. See attached file. Commit message states: If the paragraph is longer than one line, then do not IgnoreBlanksAndTabsForLineHeightCalculation, which was introduced in LO 4.0. But I can't reproduce this behavior with Word 365. Can you give a scenario to test this?
(In reply to Vasily Melenchuk (CIB) from comment #26) > But I can't reproduce this behavior with Word 365. Can you give a scenario > to test this? Sure. There is a unit test document attached to the patch you can test with. My guess: your document has a line-feed at the end of each line. Probably a line feed makes it look like a one-liner from a layout perspective, even though it isn't reset rInf.GetLineStart() to 0? (All assumptions - I have no intimate knowledge of any of this, so everything I say or imply may be incorrect.) My patches were simply based on trial and error - looking for some rational pattern.