Issue 103568 - Export file picker's file type suggestions inconsistent
Summary: Export file picker's file type suggestions inconsistent
Status: CLOSED FIXED
Alias: None
Product: ui
Classification: Code
Component: ui (show other issues)
Version: DEV300m50
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: OOo 3.2
Assignee: thorsten.martens
QA Contact: issues@ui
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2009-07-15 13:02 UTC by hennerdrewes
Modified: 2017-05-20 09:26 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch for fixing the behavior for saved files (646 bytes, patch)
2009-07-23 07:48 UTC, hennerdrewes
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description hennerdrewes 2009-07-15 13:02:27 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.
Comment 1 Rainer Bielefeld 2009-07-17 07:12:19 UTC
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?). 
Comment 2 hennerdrewes 2009-07-17 08:58:05 UTC
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.
Comment 3 hennerdrewes 2009-07-23 07:48:43 UTC
Created attachment 63694 [details]
patch for fixing the behavior for saved files
Comment 4 hennerdrewes 2009-07-23 07:56:08 UTC
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?
Comment 5 carsten.driesner 2009-07-23 08:03:01 UTC
cd->hennerdrewes: Thanks for your patch. I will check it as soon as possible and
provide feedback.
Comment 6 carsten.driesner 2009-07-23 12:41:50 UTC
cd: Confirm issue.
Comment 7 carsten.driesner 2009-07-23 12:44:27 UTC
cd->mav: You are more familiar with guisaveas.cxx. Please check the patch from
Henner.
Comment 8 mikhail.voytenko 2009-07-29 14:52:32 UTC
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 )
Comment 9 carsten.driesner 2009-07-31 08:40:10 UTC
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.
Comment 10 hennerdrewes 2009-07-31 08:54:29 UTC
@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.

Comment 11 carsten.driesner 2009-07-31 09:09:43 UTC
cd->hennerdrewes: Thanks for your feedback. I will apply the patch to CWS
filepicker03.
Comment 12 carsten.driesner 2009-08-03 14:24:11 UTC
cd: Set target to OOo 3.2 and resolution to fixed.
Comment 13 carsten.driesner 2009-08-27 12:46:58 UTC
cd: Checked in correct version of the fix.
Comment 14 carsten.driesner 2009-09-02 09:13:21 UTC
cd->tm: Please verify.
Comment 15 thorsten.martens 2009-09-03 07:58:44 UTC
checked and verified in cws filepicker03 -> OK !