[Libreoffice-commits] core.git: starmath/source

Takeshi Abe tabe at fixedpoint.jp
Tue Mar 22 12:43:29 UTC 2016


 starmath/source/cfgitem.cxx |   44 ++++++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 20 deletions(-)

New commits:
commit 011e65c93053c88eb752e50ef47c69872608cbcd
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Mar 22 18:25:28 2016 +0900

    starmath: Use initialization list for some ctors
    
    Change-Id: I51b5df153574a2dfba96106a6268ccdf9715934d
    Reviewed-on: https://gerrit.libreoffice.org/23423
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 75b2c63..f4faecc 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;
 }
 
 


More information about the Libreoffice-commits mailing list