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

--- Comment #8 from Patrick (volunteer) <[email protected]> ---
So I did some debugging to see if I could figure out why reconversion doesn't
work in LibreOffice. What I found is that I was finally able to get it to work
with attachment #200943 and the following debug patch.

The following debug patch is hardcoded to match the text in attachment #200943
so it isn't a solution but does highlight what would need to be done to fix
this bug. Basically, the native "glue" code needs to be wired up to get a
native copy of whatever the selected text currently is in the LibreOffice
application code.

Not sure when I'll have time to figure out how to do that, but leaving this
debug patch here so that I don't forget what I've found:

diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 7ea26a3d4fad..07408d5fa976 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -2305,7 +2305,8 @@ - (NSRange)selectedRange
     // NSNotFound, -[NSResponder interpretKeyEvents:] will not call
     // [self firstRectForCharacterRange:actualRange:] and will not display the
     // special character input method popup.
-    return ( mSelectedRange.location == NSNotFound ? NSMakeRange( 0, 0 ) :
mSelectedRange );
+    // Hardcoded selected range as 4 characters for testing tdf#128600
+    return ( mSelectedRange.location == NSNotFound ? NSMakeRange( 0, 4 ) :
mSelectedRange );
 }

 - (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange
replacementRange:(NSRange)replacementRange
@@ -2446,7 +2447,8 @@ - (NSAttributedString
*)attributedSubstringForProposedRange:(NSRange)aRange actu
     (void) actualRange;

     // FIXME - Implement
-    return nil;
+    // Hardcoded selected string as for testing tdf#128600
+    return [[[NSAttributedString alloc] initWithString: @"オフィス"] autorelease];
 }

 - (NSUInteger)characterIndexForPoint:(NSPoint)thePoint

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to