Apache OpenOffice (AOO) Bugzilla – Issue 103568
Export file picker's file type suggestions inconsistent
Last modified: 2017-05-20 09:26:22 UTC
The export file picker (File, Export...) does not remember its last chosen file type. Strangely, the behavior is different, if the document has been saved before and has a valid filename. In Draw, the file picker remembers the last known file type, if the document has not been saved (UntitledX). If the document has been saved, the file type is always pct. In Writer, the first case always returned XHTML, the second always tex.
A Quick test with an existing document and "Ooo 3.1.0 WIN XP multilingual version English UI activated [OOO310m11 (Build 9399)]" seems to show that I can confirm at least some of the the reported effects with OOo dialogs. Steps to reproduce with DRAW: 1. Open new DRAW document (Menu 'File -> New -> Drawing' 2. Menu 'File -> Export - "TIFF" -> select folder <Enter> "Untitled 1.tif" will be created 3. Menu 'File -> Export - "TIFF" Export Dialog opens expected: export file type "TIFF" preselected, you see "Untitled 1.tif" in export folder if you change to that folder actual: as expected 4. Close dialog 11. Save document as "mytestfile.odg" in an other folder 12. Menu 'File -> Export - "TIFF" as expected, export dialog opens and suggests to export document to current folder (as expected), but (unexpectedly) PNG is preselected as file type 13. select 'file type "TIFF" -> <Export>' and export to "mytestfile.TIFF" 14. Menu 'File -> Export (dialog will open) expected: current folder and file type "TIFF" should be pereselected (see step 3) actual: file type "PNG" is suggested Now some tests concerning WRITER 21. Open new WRITER document (menu 'File -> New -> Text Document') Document "Untitled 1" will be created 22. Menu 'File -> Export - "MediaWiki (.txt)" -> select folder -> <Export> "Untitled 1.txt" will be created as expected. Pls note that file type "PDF" has been preselected 23. Menu 'File -> Export Export Dialog opens, expected: export file type "MediaWiki (.txt)" preselected, you see "Untitled 1.txt" in export folder if you change to that folder actual: file type "XHTML" is preselected 24. Close dialog 31. Save document as "mytestfile.odt" in an other test folder 32. Menu 'File -> Export - "MediaWiki (.txt)" as expected, export dialog opens and suggests to export document to current folder (as expected), but (unexpectedly) PDF is preselected as file type (instead of "XHTML" as per step 23 or "MediaWiki (.txt)" as per step 3 I will check soon whether DUP of NEW @hennerdrewes: Please contribute information concerning your settings (OOo- / OS dialogs?).
I tested with Vista system dialogs. The step-by-step description of rainerbielefeld almost exactly matches the observed effects on Vista, except that the preselected file types differ in some cases. Because of this I think we can safely assume, that the cause for this is not in the file picker implementation itself.
Created attachment 63694 [details] patch for fixing the behavior for saved files
The attached patch solves the described problem for saved draw documents. For writer documents, a writer export context is missing in fsx2::FileDialogHelper::Context. Therefore, in writer the last used export filter cannot be saved. @cd: Can you have a look at the patch?
cd->hennerdrewes: Thanks for your patch. I will check it as soon as possible and provide feedback.
cd: Confirm issue.
cd->mav: You are more familiar with guisaveas.cxx. Please check the patch from Henner.
The used in the patch check looks to be hacky. I would strongly recommend to check the following condition instead of dialog flags value. ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )
cd->hennerdrewes: Could you please check the proposed solution by mav. Mav is the code owner and he doesn't accept your current patch. Therefore I need a revised patch from you.
@cd: Please replace the expression (aDialogFlags != SFXWB_EXPORT) with the suggested expression by mav. The functionality of the patch won't be affected by the change.
cd->hennerdrewes: Thanks for your feedback. I will apply the patch to CWS filepicker03.
cd: Set target to OOo 3.2 and resolution to fixed.
cd: Checked in correct version of the fix.
cd->tm: Please verify.
checked and verified in cws filepicker03 -> OK !