Bug 93634 - getDisplayDirectory returns an empty string for Windows filepicker
Summary: getDisplayDirectory returns an empty string for Windows filepicker
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other Windows (All)
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:5.1.0 target:5.0.3
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-24 20:40 UTC by Regina Henschel
Modified: 2016-10-25 19:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Macro with getDisplayDirectory (717 bytes, text/plain)
2015-08-24 20:40 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2015-08-24 20:40:26 UTC
Created attachment 118131 [details]
Macro with getDisplayDirectory

Set LibreOffice to use its own filepicker dialog for Open/Save.
Run the attached macro "ExamineFileDialog".
Notice you get directory name and file name, each surrounded with | character.

Now set LibreOffice to use Windows filepicker dialog.
Run the macro again.
Notice, that the directory name is empty.

It makes no difference whether you use oFileDialog.DisplayDirectory or oFileDialog.getDisplayDirectory or oFileDialog.getDisplayDirectory().

This is likely on old bug, inherit from OOo, but I do not find a bug report.

This bug affects the use of HelpAuthoring.oxt on Windows.
Comment 1 Regina Henschel 2015-08-29 18:42:13 UTC
The error is in file core\fpicker\source\win32\filepicker\VistaFilePicker.cxx; method VistaFilePicker::getDisplayDirectory(); line#249
-    const OUString sDirectory = rRequest->getArgumentOrDefault(PROP_FILENAME, OUString());
+    const OUString sDirectory = rRequest->getArgumentOrDefault(PROP_DIRECTORY, OUString());

patch is waiting in https://gerrit.libreoffice.org/#/c/18127/
Comment 2 Oliver Brinzing 2015-09-02 06:38:21 UTC
.
Comment 3 Commit Notification 2015-09-03 08:21:17 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8775593bcc543b3d7021e20736f42fa13035870d

tdf#93634 repair getDisplayDirectory for Windows filepicker

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 raal 2015-09-08 12:53:19 UTC
(In reply to Commit Notification from comment #3)
> Regina Henschel committed a patch related to this issue.
> It has been pushed to "master":
> 

Setting as RESOLVED FIXED
Comment 5 Commit Notification 2015-09-11 09:44:46 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a023cd66e74a96aec52d891508cd757292513401&h=libreoffice-5-0

tdf#93634 repair getDisplayDirectory for Windows filepicker

It will be available in 5.0.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.