Description: Inner border of an embedded table can't be dragged around Steps to Reproduce: 1. Open attached 1435021 2. Select the embedded table 3. Open table properties 4. Change the alignment to left 5. Set Spacing Right to -2.7 (preferably with the buttons) & Press OK 6. Try to drag the inner border -> Broken 7. Reopen the table properties dialog 8. Change the alignment automatic & back to left (dialog problem already reported) 9. Check relative checkbox & Press OK 10. Try to drag the inner border -> still not possible 11. Save the file & reload -> Inner border will move & and everything is back to normal Actual Results: Inner border of an embedded table can't be dragged around Expected Results: Should be possible. At least checking relative should make things work again (instead of save and reload) Reproducible: Always User Profile Reset: No Additional Info: Repro with Version: 6.2.0.0.alpha0+ Build ID: bb1d5780226bb1b9156580972eea9aa849178742 CPU threads: 4; OS: Windows 6.3; UI render: GL; TinderBox: Win-x86@42, Branch:master, Time: 2018-07-03_05:56:48 Locale: nl-NL (nl_NL); Calc: CL but not with Versie: 4.4.7.2 Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600 Locale: nl_NL
No repro with Version: 6.0.0.1.0+ Build ID: 47cc374c0659fd3db74a1b184c870eaa56bc385b CPU threads: 4; OS: Windows 6.3; UI render: GL; Locale: nl-NL (nl_NL); Calc: CL
Created attachment 143513 [details] Example file
Created attachment 143534 [details] Bibisect log Bisected to author Noel Grandin <noel.grandin@collabora.co.uk> 2018-01-08 17:01:49 +0200 committer Noel Grandin <noel.grandin@collabora.co.uk> 2018-01-11 07:35:43 +0100 commit f14b9d30293f180500fc56d81e5390021758e7c1 (patch) tree a6cd0b853169203cfa0953230e6774e7b1dd81b4 parent d11120b95ee27cb4b05db466ed07f7a996dda125 (diff) convert (a>b?a:b) to std::max(a,b) with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2'
@Dieter Could you verify this one. It's blocking me from using LibO6.1 ;-). It does happen quite often in daily usage (this report is mere an illustration) Thanks!
Reproduced in Version: 6.2.0.0.alpha0+ Build ID: 95b00f1bfa341003af23e150d316d943d47909cf CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded I also confirmed it's a regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=f14b9d30293f180500fc56d81e5390021758e7c1 Adding Cc: to Noel Grandin
Created attachment 143625 [details] Screencast for clarification
Hi Noel, This reversion fixes the issue: --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -1699,9 +1699,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft(); const int nRgt = (bTableVertical ? nPageHeight : nPageWidth) - (aTabCols.GetLeftMin() + aTabCols.GetRight()); - - const sal_uInt16 nL = std::max< sal_uInt16 >(nLft, 0); - const sal_uInt16 nR = std::max< sal_uInt16 >(nRgt, 0); + const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0); + const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0); SvxColumnItem aColItem(nNum, nL, nR); However, your change seems correct...
Xisco, your change is correct, my patch was inadvisable. In this code int a; std::max<sal_uInt16>(a,0) std::max will first convert a and b to sal_uInt16, therefore potentially converting a negative number to a positive number due to the conversion rules. Then it will take the larger number. While this code int a; static_cast<sal_uInt16>(a > 0 ? a : 0) will compare first, and then convert the larger number to sal_uInt16, which might result in making a "a" that is larger than 2^16 into a smaller value, but which will never convert a negative "a" value into a positive value.
Hi Noel, Thanks for the nice clarification. In your initial commit, I see 3 or 4 places where static_cast<sal_uInt16> was converted to std::max< sal_uInt16 >, should they be reverted just in case as well? Would you mind providing a fix for this issue, or should I do it ?
Noel Grandin committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c13865a4caf7898c4e59a5b22bbd493d6dad9661 tdf#118716 Inner border of an embedded table can't be dragged around It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Verified in Version: 6.2.0.0.alpha0+ Build ID: dcbb65f2a4a3ee70ccd4896d7a5e975dbd9e6509 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded @Noel, Thanks for fixing this!!!
Many thanks for fixing this! And more in general for all the useuniqueptr work :-)
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=af7b9609fee603756f8cb0668ae45af37c5fb4fb&h=libreoffice-6-1 tdf#118716 Inner border of an embedded table can't be dragged around It will be available in 6.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-6-1-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5e013eab178df3a27fe036230c80611dd1dccc7d&h=libreoffice-6-1-0 tdf#118716 Inner border of an embedded table can't be dragged around It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.