diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-03-22 18:25:28 +0900 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-03-22 12:42:57 +0000 |
commit | 011e65c93053c88eb752e50ef47c69872608cbcd (patch) | |
tree | 43b21736837626dcd5f17fc9d34184437d82d4c2 | |
parent | 056be3551279a2e0e4d766e898e93ab500401da6 (diff) |
starmath: Use initialization list for some ctors
Change-Id: I51b5df153574a2dfba96106a6268ccdf9715934d
Reviewed-on: https://gerrit.libreoffice.org/23423
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | starmath/source/cfgitem.cxx | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 75b2c63ce0de..f4faecc409f2 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -133,36 +133,40 @@ struct SmCfgOther SmCfgOther::SmCfgOther() + : ePrintSize(PRINT_SIZE_NORMAL) + , nPrintZoomFactor(100) + , bPrintTitle(true) + , bPrintFormulaText(true) + , bPrintFrame(true) + , bIsSaveOnlyUsedSymbols(true) + , bIsAutoCloseBrackets(true) + , bIgnoreSpacesRight(true) + , bToolboxVisible(true) + , bAutoRedraw(true) + , bFormulaCursor(true) { - ePrintSize = PRINT_SIZE_NORMAL; - nPrintZoomFactor = 100; - bPrintTitle = bPrintFormulaText = - bPrintFrame = bIgnoreSpacesRight = - bToolboxVisible = bAutoRedraw = - bIsAutoCloseBrackets = bFormulaCursor - = bIsSaveOnlyUsedSymbols = true; } SmFontFormat::SmFontFormat() + : aName(FONTNAME_MATH) + , nCharSet(RTL_TEXTENCODING_UNICODE) + , nFamily(FAMILY_DONTKNOW) + , nPitch(PITCH_DONTKNOW) + , nWeight(WEIGHT_DONTKNOW) + , nItalic(ITALIC_NONE) { - aName = FONTNAME_MATH; - nCharSet = RTL_TEXTENCODING_UNICODE; - nFamily = FAMILY_DONTKNOW; - nPitch = PITCH_DONTKNOW; - nWeight = WEIGHT_DONTKNOW; - nItalic = ITALIC_NONE; } SmFontFormat::SmFontFormat( const vcl::Font &rFont ) + : aName(rFont.GetFamilyName()) + , nCharSet(static_cast<sal_Int16>(rFont.GetCharSet())) + , nFamily(static_cast<sal_Int16>(rFont.GetFamilyType())) + , nPitch(static_cast<sal_Int16>(rFont.GetPitch())) + , nWeight(static_cast<sal_Int16>(rFont.GetWeight())) + , nItalic(static_cast<sal_Int16>(rFont.GetItalic())) { - aName = rFont.GetFamilyName(); - nCharSet = static_cast<sal_Int16>(rFont.GetCharSet()); - nFamily = static_cast<sal_Int16>(rFont.GetFamilyType()); - nPitch = static_cast<sal_Int16>(rFont.GetPitch()); - nWeight = static_cast<sal_Int16>(rFont.GetWeight()); - nItalic = static_cast<sal_Int16>(rFont.GetItalic()); } @@ -198,8 +202,8 @@ SmFntFmtListEntry::SmFntFmtListEntry( const OUString &rId, const SmFontFormat &r SmFontFormatList::SmFontFormatList() + : bModified(false) { - bModified = false; } |