https://bugs.documentfoundation.org/show_bug.cgi?id=120290

--- Comment #7 from Justin L <[email protected]> ---
Created attachment 148844
  --> https://bugs.documentfoundation.org/attachment.cgi?id=148844&action=edit
comment.odt: cursor not placed at end of the line - doesn't depend on
selection, but just on the anchor position.

When determining the width of the line, the comment anchor is considered to be
two spaces wide.
sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut )
{    return sal_uInt16(pOut->GetTextWidth("  "));  }

When the anchor is near the end of the line, this fake space can be larger than
the fullstop width, and so it thinks that it has found the correct location for
the cursor.

This hack fixes the bug... itrcrsr.cxx SwTextCursor::GetCursorOfst()
        if ( pPor->IsPostItsPortion() )
+       {
            nWidth30 = 30 +  pPor->GetViewWidth( GetInfo() ) / 2;
+           if ( nX && nWidth30 > nX )
+               nWidth30 = nX-1;
+       }

This "if it is a comment portion" section was added by
https://cgit.freedesktop.org/libreoffice/core/commit/?id=dca044e9572144c1ba9ce423b10f7a5456837cda

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to