Hello, I noticed this in http://opengrok.libreoffice.org/xref/core/sc/source/core/tool/autoform.cxx#640 649 // do not insert empty CJK font 650 const SvxFontItem& rCJKFont = rField.GetCJKFont(); 651 if (!rCJKFont.GetStyleName().isEmpty()) 652 { 653 rItemSet.Put( rCJKFont ); 654 rItemSet.Put( rField.GetCJKHeight() ); 655 rItemSet.Put( rField.GetCJKWeight() ); 656 rItemSet.Put( rField.GetCJKPosture() ); 657 } 658 else 659 { 660 rItemSet.Put( rField.GetHeight(), ATTR_CJK_FONT_HEIGHT ); 661 rItemSet.Put( rField.GetWeight(), ATTR_CJK_FONT_WEIGHT ); 662 rItemSet.Put( rField.GetPosture(), ATTR_CJK_FONT_POSTURE ); 663 } 664 // do not insert empty CTL font 665 const SvxFontItem& rCTLFont = rField.GetCTLFont(); 666 if (rCTLFont.GetStyleName().isEmpty()) 667 { 668 rItemSet.Put( rCTLFont ); 669 rItemSet.Put( rField.GetCTLHeight() ); 670 rItemSet.Put( rField.GetCTLWeight() ); 671 rItemSet.Put( rField.GetCTLPosture() ); 672 } 673 else 674 { 675 rItemSet.Put( rField.GetHeight(), ATTR_CTL_FONT_HEIGHT ); 676 rItemSet.Put( rField.GetWeight(), ATTR_CTL_FONT_WEIGHT ); 677 rItemSet.Put( rField.GetPosture(), ATTR_CTL_FONT_POSTURE ); 678 }
So 1) a) if CJK font exists, we use its attributes b) if not, we want initialize CJK attributes with field attributes 2) a) if CTL font exists, we use its attributes b) if not, we want initialize CTL attributes with field attributes But shouldn't line 666 be: if (!rCTLFont.GetStyleName().isEmpty()) ? Julien -- View this message in context: http://nabble.documentfoundation.org/Trying-to-understand-a-part-of-autoform-cxx-sc-module-tp4102616.html Sent from the Dev mailing list archive at Nabble.com. _______________________________________________ LibreOffice mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice
