Week #5 - GSoC Weekly Report - 100 Paper Cuts
GSoC progress for week #5.
Get rid of Writer-Images
- Bug: tdf#34438 (Image-Group) - [feature request, FORMATTING] group selection does not work with raster images.
Last week I shared a blog post of my research on this bug here and this week I posted a comment about my 2-week research on the bug page of tdf#34438 here, and Regina Henschel replied with a comment here (thanks for the reply):
[…] So from my point of view we should get rid of Writer-images. But that is a long way. […] So to get rid of Writer-images it would be necessary to implement the services, which are provided by Writer-images for Draw-images too …
So, the last decision is: get rid of writer-images. Convert them into drawing objects, but also implement the writer-images’ services/attributes to drawing-images.
Prevent jump to top of the comment view / Writer-comments
- Bug: tdf#91519: Jump of document canvas view to the top of the comment disrupts editing of long comments.
- Commit: https://gerrit.libreoffice.org/c/core/+/118638 (waiting for review)
In Writer, there are 3 issues about comment section:
-
comment section scrolls to top of its view when clicking inside a comment view.
-
clicking inside a comment view, scrolls the view to old cursor location automatically (if old cursor out of the visible area).
-
comment section scrolls automatically to the old selected text (if it’s out of visible area) when clicking inside the Writer canvas view.
Another annoying issue: multi-selection (after a certain changes in the code)
Technical Details
- Fix for “autoscroll to old cursor location”
GetOutlinerView()->ShowCursor();
has a default value true
if no argument passed in. I realized that this line causes the autoscroll to the old cursor location, and setting it to false
solved the issue.
- Fix for “jumping to the top of comment view”
Just remove unnecessary const bool bLockView = mrView.GetWrtShell().IsViewLocked();
line, set .LockView( bLockView );
to .LockView( true );
because we activating SetActiveSidebarWin
here, it should be true
and this fixes the jumping to the top of comment view issue with:
- Fix for “scrolling automatically to the old selected text”
Steps to reproduce: (in comments section)
- select text (2-3 words for example)
- scroll selected text to unvisible area (up or down)
- click into the writer document canvas
Result: comment writing area scrolls to unvisible selected text(s) (it becomes visible)
Expected result: don’t scroll to the selected area, just make it unmarked.
ShowCursor( bGotoCursor );
causes the jumping when deactivating the comment canvas (when clicking into writer document canvas).
Just made it to:
if (HasSelection()) ShowCursor( bGotoCursor );
and it’s solved.
- When typing, current view have to jump to typing location
After the certain changes in the code, I realized that the writer document canvas doesn’t jump to typing location. After a long process of debugging in the code base, found that comment section LockView doesn’t set to false:
Before the mrSidebarWin.LockView();
, I created a new method in sw/source/uibase/docvw/AnnotationWin2.cxx
to have access LockView()
:
***
Summary of week #5
- We decided that we should get rid of writer-images and convert them into the drawing objects without losing the services of writer-images
- Sent a patch about tdf#91519: https://gerrit.libreoffice.org/c/core/+/118638
Next Week TO-DO
- Work on tdf#51665: Support diagonal borders in TABLEs
- Update the UI for diagonal borders