Apache OpenOffice (AOO) Bugzilla – Issue 119555
[From Symphony]font size of Fontwork changes from 96 to 36 after save as new .doc file
Last modified: 2012-06-19 06:57:43 UTC
Created attachment 77767 [details] fontwork 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
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.
The font size attribute can be exported in method <EscherPropertyContainer::CreateCustomShapeProperties(..)> 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); } } ----------------------------------------------------------------
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 8,9,10,12,14,16,18,20,24,28,32,36,40,44,48,54,60,66,72,80,96
Great! Thanks for finding the problem and for the patch, it was applied as revision 1348861.
verified in trunk build r1350879
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.