[Libreoffice-bugs] [Bug 118102] New: desktop LO can't insert or open Android file over MTP or PTP

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Jun 10 22:54:58 UTC 2018


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

            Bug ID: 118102
           Summary: desktop LO can't insert or open Android file over MTP
                    or PTP
           Product: LibreOffice
           Version: 6.0.4.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: info at skierpage.com

I connected my phone over USB and tried to insert a simple JPG image from it
into LibreOffice Writer, but got an alert with a gray lightbulb "Unknown image
format".

I quickly realized that every file operation over MTP fails, e.g.
* Insert > Image... in LibreOffice Calc displays a large dialog for a
split-second, then redisplays the Insert Image file chooser.
* File > Open... a text file silently fails in both applications.
I did limited testing of the older PTP "transfer pictures" protocol, and that
seems to fail as well.

Steps to reproduce:
1. Plug in your Android phone (mine is a Pixel 2 running Android 8.1.0) over
USB
2. Dismiss Windows' various prompts what to do with the newly-attached device.
3. Find the USB notification on the phone and change the USB connection to MTP.
On my phone it's drag windowshade to expose notifications, tap "USB for power",
change Use USB to > "Transfer files" (i.e. MTP).
4. Start LibreOffice Writer, and choose Insert > File
5. In the Insert Image dialog, navigate to an image on the phone (on my phone
an image saved in Firefox appears in This PC\Pixel 2\Internal shared
storage\Download) and click [Open]

Repeat steps 4 and 5 for other LO applications and file access.

Expected results:
>From minimal fix to best:
0. Document this limitation somewhere, e.g.
   You cannot open or insert files from a device connected over USB, such as a
phone. Neither the Media Transfer Protocol ("transfer files") nor Picture
Transfer Protocol ("transfer photos") works. Workaround: copy the file to a
local storage location and open, insert, and save the file from there.

1. Don't silently fail or show a wrong dialog such as "Unknown image format",
instead display a relevant error. Even something internal like "Vfs stat err
inode of file=0xf000 blah blah" would be better than wrong or nothing.
2. Don't even attempt to open files over unsupported protocol. Gray out the
folder or files, display "Can't open files over MTP", etc.
3. Support inserting or opening files over MTP. Other programs like Firefox,
Notepad, Paint, etc. can all open these files.

Interestingly, Notepad's titlebar shows the file as "<ORIGINAL FILENAME>[1].txt
(Read Only)" and Paint shows as "<ORIGINAL FILENAME>[1].jpg"; the [1] suggests
these programs can tell the original file path is special. Meanwhile Firefox's
location bar suggests it's working on a local copy of the file, in my case
file:///C:/Users/spage/AppData/Local/Microsoft/Windows/INetCache/IE/7NFG4Q49/<ORIGINAL
FILENAME>.ext.
FWIW I couldn't save to MTP from these applications or from LibreOffice, they
all show a Save As alert "<FILENAME>.<EXT> File not found. Check the file name
and try again."

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180610/025aa1e7/attachment.html>


More information about the Libreoffice-bugs mailing list