Issue 119555

Summary: [From Symphony]font size of Fontwork changes from 96 to 36 after save as new .doc file
Product: Writer Reporter: louqle <louqingle>
Component: save-exportAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: binbjguo, hdu, zjchencdl
Version: 3.4.0   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
patch for issue 119555 zjchencdl: review?

Description louqle 2012-05-30 05:47:53 UTC
Created attachment 77767 [details]

1. open FontWork_Size.doc in aoo 3.4 then save as another .doc file
2. open the new .doc file by MS word
3. Double click the fontwork, then check the value on the "Size" drop down list.

It should be 96 but currently it's 36
Comment 1 zjchen 2012-06-11 02:46:18 UTC
After investigation, I figured out the problem is that the font size property of font work doesn't export to new saved .doc file,  thus the font size would be the default value 36.
Comment 2 zjchen 2012-06-11 08:11:50 UTC
The font size attribute can be exported in method
Here is the export implement

if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "CharHeight" ) ), sal_True ) )
    float fCharHeight = 0.0;
    if ( aAny >>= fCharHeight )
        sal_Int32 nTextSize = static_cast< sal_Int32 > ( fCharHeight * 65536 );
        AddOpt(ESCHER_Prop_gtextSize, nTextSize);
Comment 3 zjchen 2012-06-11 11:33:01 UTC
Created attachment 78235 [details]
patch for issue 119555

I have tested with sample files for export doc and odt.
notice that the there is a font size gap between AOO and MS WORD.
AOO has 30 kinds of fontwork font size, while MS WORD has 21 totally.
If change the font size to those not include in MS Word, the .doc file can be opened correctly in AOO, but the size cannot be seen in MS Word. 

AOO Font Size 6,7,8,9,10,10.5,11,12,13,14,15,16,18,20,22,24,26,28,32,36,40,44,48,54,60,66,72,80,88,90
MS WORD Font Size
Comment 4 2012-06-11 14:23:21 UTC
Great! Thanks for finding the problem and for the patch, it was applied as revision 1348861.
Comment 5 louqle 2012-06-18 03:25:11 UTC
verified in trunk build r1350879
Comment 6 binguo 2012-06-19 06:57:43 UTC
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.