Description: it does not show line at left bottom, it shows rectangle Steps to Reproduce: 1. open attachment 130196 [details] on bug 105143 Actual Results: it shows rectangle at bottom left Expected Results: it shows sloped line at bottom left Reproducible: Always User Profile Reset: No Additional Info: libreoffice viwer android [fdroid version]: Version: 7.6.0.0.alpha0+ Build ID: d6c54b3d4ee7 probably regression of bug 105143?
Created attachment 184768 [details] screenshot showing sloped line at bottom left of docx file on word android app
Created attachment 184769 [details] screenshot showing rectangle instead of sloped line at bottom left of docx file on lo viewer 7.6 alpha android app
Created attachment 184908 [details] Modified screenshot with red rectangle around page area (In reply to jindam, vani from comment #0) > probably regression of bug 105143? From what I can see, the shape is correctly placed, i.e. it is not a regression regarding the implementation that was done to fix bug 105143. Do I understand correctly that the correct part of the shape is within the page area (s.a. attached screenshot, i.e. within the red rectangle there)? If so, is that which is confusing (and possibly incorrect) here that the shape is shown beyond the area covered by the actual page?
https://bugs.documentfoundation.org/show_bug.cgi?id=105143#c0 : See the attached bug document. In practice what should be visible is just a line at the bottom left corner of the page, not the whole triangle. i assumed it must show only line at bottom left of the document [ similar to attach 184768] not the whole triangle. [ similar to attach 184769 184908]
Created attachment 184923 [details] Screenshot with LO desktop, Version: 5.2.8.0.0+ Build ID: e5ebc3d73156f217161e6b857026eae49fa91ea9
(In reply to jindam, vani from comment #4) > https://bugs.documentfoundation.org/show_bug.cgi?id=105143#c0 : See the > attached bug document. In practice what should be visible is just a line at > the bottom left corner of the page, not the whole triangle. It probably makes sense to not show what goes beyond the page area (as in the desktop version of LO), but that's something different from what tdf#105143 was about (so it's not a regression to that). attachment 184923 [details] shows the the position/placement was incorrect before tdf#105143 was fixed, i.e. the whole shape is incorrectly positioned within the page area. The Android case now is different.
Created attachment 184924 [details] Screenshot with gtktiledviewer from LO master bfb8706466b52298def33d47d31b6efffc3ed531 Looks similar with gtktiledviewer, s. attached screenshot
Indeed, capture.docx looks different in LO and tiled viewer AKA android viewer (AV). The shape is a filled polygon. tn LO it gets clipped to the Page - due to writer pages not allowing overhanging objects, but in AV it's shown (partially - what is another error). AV just does different things when painting, not always to the better. It will not be sufficient to e.g. just clip the polygon to the page dimensions, that would create the clipped lines bottom and left. It is also not sufficient to only clip the line (and ignore the fill), that will not do the needed overpaint of the filled part. It needs to be a 'visual clip' aka limiting the paint area. LO does that already. Tried to re-create that just with LO for a new doc -> does not work since LO already prevents interactions that move the shape outside of the page, so that situation cannot be created by using LO. Using MSO Word you can move objects 'outside' the page, but only the part in the page gets visualized. Loading this in LO does (again) correct visual clip, while AW does (again) not -> error simply reproducible. Objects in SW get painted each single using primitives during the repaint. While in LO paint a ClipRegion using the old OutDev stuff seems to be set, this seems not the case for AV repaint.
Created attachment 188723 [details] Newly created test document with a rectangle overlapping the lower left of the page
Rough fix: Add clipping to SwRootFrame::PaintSwFrame where DrawObjects are painted as Heaven/Hell layers usiing PaintLayer. That works, will add patch. But is not a good fix since it only fixes one plave where PaintLayer is used. It *could* be added to all places where PaintLayer is used, but that means to figure out the correct ClipRegion/Rectangle in all places, too. There *must* be a more general difference between true == comphelper::LibreOfficeKit::isTiledPainting() between LO paint and AV paint, debugging for it...
Created attachment 188727 [details] Possible but rough fix. Works, but not recommended.
Looks like I found it after some debugging. In ObjectContactOfPageView::DoProcessDisplay someone changed (seven years ago) to ignore the given RedrawArea if comphelper::LibreOfficeKit::isActive(). Using and setting that RedrawArea is what does the visual clipping against e.g. PageBounds in Writer paint. Adding that again.
Armin Le Grand (allotropia) committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/34387332173782498acd4998c7c665d04ebc3c7d tdf#153102: use given RedrawArea in DoProcessDisplay It will be available in 24.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.
Armin Le Grand (allotropia) committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/142e8c023575e2aabc7f60110137da85e5a06770 tdf#153102: use given RedrawArea in DoProcessDisplay It will be available in 7.6.1. 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.
Fix verified n a current Android Viewer build, thanks! Version: 24.2.0.0.alpha0+ Build ID: eef0c5d4d45b