Issue 68685 - Set Default Filename for New Document
Summary: Set Default Filename for New Document
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: OOo 2.0.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2006-08-16 16:39 UTC by mypersonal
Modified: 2017-05-20 10:48 UTC (History)
8 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

Patch (4.12 KB, patch)
2006-08-16 16:42 UTC, mypersonal
no flags Details | Diff
Document of the patch (150.61 KB, application/vnd.oasis.opendocument.text)
2006-08-16 16:43 UTC, mypersonal
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mypersonal 2006-08-16 16:39:41 UTC
When we save a newly created document in OpenOffice, there is no default
filename and leave filename as blank.

While MS Office use the first several characters(seems as first 47 characters)
as the default filename.

Many user would like to use title of document as it's filename, this means the
first several characters are mostly the same as filename. So it is convenient to
set the first several characters as default filename.

This patch is used to automatically set default filename for newly created document.
Comment 1 mypersonal 2006-08-16 16:42:20 UTC
Created attachment 38559 [details]
Comment 2 mypersonal 2006-08-16 16:43:30 UTC
Created attachment 38560 [details]
Document of the patch
Comment 3 mmeeks 2006-08-16 17:08:34 UTC
confirm / set milestones etc.
Comment 4 stp 2006-08-16 17:25:59 UTC
See also issue 5206
Comment 5 Olaf Felka 2006-08-17 08:59:25 UTC
This is an ehancement of the existing feature and has to be discussed. The MS
Office behaviour isn't just very helpfull for me.
Comment 6 jianhuajiao 2006-08-24 11:37:35 UTC
I have patched it using ooo-build on SLED10. 
     1. It can't set default name when I using OOo under KDE enviroment.
     2. The patch check first 50 charactors of text in writer file. it too long
and not smart.If we want set the default file name, we should give a more
suitable file name. using heading or a suitable length at begin of text or do
nothing(for example, 12345). that I means is that the default file name should
have some meaning. it should be a smart work. if we just using first 50
charactors like the patch do, it's nosense.
Comment 7 stx123 2006-08-27 06:58:26 UTC
Olaf, you are right that this patch might need some more discussion.
But let's foster this discussion by inviting the interested people instead of
burying the PATCH as FEATURE with the owner requirements.
Frank, Carsten, do you have suggestions how we should move forward with the patch?
Comment 8 Olaf Felka 2006-08-28 08:29:03 UTC
I didn't 'bury' this issue, I've just used the common issue handling. If you
think that 'requiremts' is a graveyard we should rethink the task handling for
features. Otherwise we get a first- and secondclass issue handling 
Comment 9 Mathias_Bauer 2006-08-28 09:33:57 UTC
As the code for the patch is maintained by Mikhail I assign the issue to him.
But besides that I have some objections against the patch. I don't have
objections about the feature in general, on the contrary, a useful suggestion
for the filename of "untitled" documents would be nice.

OTOH the way how such name proposal should be done depends on the application.
Having this implemented in sfx2 seems to be the wrong approach. So we either
should have an API for this or a property maintained by the application code.
IMHO a possible property shouldn't be the "title" (as in case of MS Word), a
title should always be set explicitly.

A remark to the implementation in case of text documents: if text starts with a
headline that would be a natural choice for a file name proposal, this is
different if the text starts with regular text. 

In any case we should clarify if our different file dialog implementations are
able to preselect the proposed file name so that in case this proposal is
rejected by the user he can just type over it (and doesn't need to erase it before).
Comment 10 mikhail.voytenko 2006-08-28 10:49:42 UTC
The patch sets the name in a hacky way, the dialog should not know about the
document. The logic generating the proposed document name is implemented outside
of dialog, and it should be just extended for new documents.

Currently the UNO API based solution suggested by MBA seems to be the best way.
The only exception is database document, since it is not sfx2-based and has own
implementation of the proposed filename generation.
BTW, the preselection of the proposed file names by both dialogs is already used
while storing and seems to work well.

I am changing the issue type to enchancement.
Comment 11 Marcus 2017-05-20 10:48:04 UTC
Reset assigne to the default "".