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.
Context
- Trying to understand a part of autoform.cxx (sc module) · julien2412
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.