Issue 29311 - Use obect's name (or original filename) for the filename inside zip archive
Summary: Use obect's name (or original filename) for the filename inside zip archive
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa, rfe_eval_ok
: 55259 (view as issue list)
Depends on:
Reported: 2004-05-18 14:36 UTC by olo
Modified: 2013-08-07 15:31 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description olo 2004-05-18 14:36:51 UTC
The OpenOffice file format is in fact a ZIP archive with a well-defined
structure, containing various XML documents and separate embedded data.

Pictures are usually PNG or JPEG images placed in Pictures/ subdirectory in the
archive. They receive a random name upon saving, e.g.:


At the same time those graphic objects in the document can get a name specified
by user (Right click on a picture, choose "Graphics...", go to "Options" tab,
type something into the "Name" field.), and the default assigned by OpenOffice
is Graphics1, Graphics2, ... for inserted graphic objects.

This information should be used when generating filenames to put in the ZIP
archive which comprises a file in OpenOffice native document format.

Notice, however, that OpenOffice doesn't enforce uniqueness of those names - so
there should be a mechanism in place which would add some short random or
sequential suffix to a file name when a naming collision is detected.

E.g. if there are 2 pictures named "Photo from meeting 1", the generated file
names could be:


P.S. I'm not sure about the most correct component for this issue, so please
feel free to reassign it if current component isn't optimal.
Comment 1 mci 2004-05-21 09:16:21 UTC
Hi olo,

thanks for using and supporting

I change this to enhancement since this is not a defect...
All graphics inside the document get a name but you want them to get a "human
readable" name...

reassigned to bh
Comment 2 lohmaier 2005-10-09 19:04:37 UTC
issue 55259 requests to keep the existing filename of the object/picture.

This is conflicting with this RFE. One solution would be to use the name of the
object when the user specified one an use the original filename otherwise.

But IMHO this would result in a mess, so I'm personally in favor of keeping the
original filename (with additional identifier if names aren't unique).
Comment 3 lohmaier 2005-10-09 19:05:43 UTC
framework fits better as it would affect all applications.
Comment 4 lohmaier 2005-10-09 19:06:14 UTC
*** Issue 55259 has been marked as a duplicate of this issue. ***
Comment 5 sunwukung 2007-08-22 17:29:44 UTC
There is a very similar problem with frame styles.
You can create a framestyle but when you refer to it in the xml you will still 
need to use the internally generated name.

A framestyle named 'leftpic':
<style:style style:name="fr7" style:family="graphic" style:parent-style-

The framestyle when used:
<draw:frame draw:style-name="fr7" draw:name="leftpic" text:anchor-
type="paragraph" ....

Without any GUI changes as a first step I would find it very useful if Oo 
wouldn't rename upon save the pictures that I inserted manually into the 
Pictures folder with the name I specified. If the picture is already in the 
Pictures folder it couldnt have a duplicate name.