Issue 119577

Summary: [From Symphony] The "file name" field change to "file name without extension" in AOO 3.4
Product: Writer Reporter: xiao ting xiao <tingxiaox>
Component: open-importAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: awf.aoo, doneyourself, steve.yin.aoo, tldyzem
Version: 3.4.0   
Target Milestone: 4.1.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
File Name
none
Fix the issue of import file name field with file extension awf.aoo: review-

Description xiao ting xiao 2012-05-30 07:07:36 UTC
Created attachment 77794 [details]
File Name

Steps:

1. Launch MS Office 2010,new a Word document, save it as .docx and reopen, then insert a "file name" field into the docx (Insert-->Text--> Quick Parts).
You can see the file's name was inserted into the file.
2.Launch AOO 3.4,open the attached sample file then check field.

Problem:
The "file name" field change to "file name without extension" one.
Comment 1 Yolanda Zhang Ying 2012-06-18 05:34:45 UTC
The field of File Name display format defined as 4 types as below in AOO:
FULL = 0   //The content of the URL is completely displayed.
PATH = 1   //Only the path of the file is displayed
NAME = 2   //Only the name of the file is displayed
NAME_AND_EXT = 3  //The file name including the file extension is displayed

But in OOXML definition
The field of file name including below field code and type:
\* Caps      //Capitalizes the first letter of each word
\* FirstCap  //Capitalizes the first letter of the first word
\* Lower     //ALl the character is Lower case
\* Upper     //ALl the character is Upper case
\p           //Add the file system's path to the file name

So all the file name will contains file name and file extension.
But we wrong map the file format to the file name without file extension.
Comment 2 Yolanda Zhang Ying 2012-06-18 10:07:13 UTC
Created attachment 78381 [details]
Fix the issue of import file name field with file extension

Root Cause:
Since the different for file name field definition, AOO should import file name field with file name + file extension by default. Otherwise, the extension may lost.

Solution:
Modify the file name field format type.

Other problems:
Since the file name filed has support limitation, so below problem will be remained unfix.
1. if change the text of the field in MS Office 2007/2010 to make the content different with the correct file name content, AOO can not keep the snapshot content for file name field;
2. Some of the format code in OOXML can't be supported by AOO, like:
\* Caps      //Capitalizes the first letter of each word
\* FirstCap  //Capitalizes the first letter of the first word
\* Lower     //ALl the character is Lower case
\* Upper     //ALl the character is Upper case
Comment 3 Yan Ji 2012-06-21 05:58:30 UTC
It can be reproduced in AOO 3.4, change status to "CONFIRMED"
Comment 4 Andre 2012-07-11 09:28:12 UTC
Hm, when I load the attached test document into AOO then the FileName field is not replaced with the filename, with or without the patch.
What am I doing wrong?
Comment 5 Andre 2012-07-27 14:57:40 UTC
Comment on attachment 78381 [details]
Fix the issue of import file name field with file extension

Can not verify the patch.
Comment 6 Yolanda Zhang Ying 2012-08-21 05:26:55 UTC
Thx, Andre

And is there anything unclear any more, and could u help commit this fix. thx!
Comment 7 Yolanda Zhang Ying 2012-09-10 07:33:16 UTC
(In reply to comment #5)
> Comment on attachment 78381 [details]
> Fix the issue of import file name field with file extension
> 
> Can not verify the patch.

Hi, Andre

Is there any problem for this patch, waiting for your response, thx!
Comment 8 SVN Robot 2014-01-02 10:17:35 UTC
"steve_y" committed SVN revision 1554781 into trunk:
Bug 119577 - [From Symphony] The "file name" field change to "file name witho...
Comment 9 Steve Yin 2014-01-02 10:19:06 UTC
Verified the fix patch, it works.
Comment 10 liuping 2014-04-10 03:26:41 UTC
verified on windows7 on AOO410m15(Build:9761)  -  Rev. 1583666
2014-04-01 13:53:14 (Di, 01 Apr 2014)