diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-04-29 12:47:39 +0200 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-04-29 11:54:37 +0000 |
commit | aafe8426051eff4394d9421a0f4c83bf9b7c5fdf (patch) | |
tree | e7a52a381473259343f542d501f2a7f3537ec0bf | |
parent | bc43165a473c774f6b9c762c465efe2273b4483a (diff) |
use initialization list
last commit to please cppcheck
m_bCreated in SdPublishingDesign is commented as unused
but is read and written by a raw stream to a 'designs.sod'
so something might break we remove it
Change-Id: Ie8f08a2354e247284e3aafee8097db29bcee8567
Reviewed-on: https://gerrit.libreoffice.org/24490
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
-rw-r--r-- | filter/source/graphicfilter/ipict/ipict.cxx | 11 | ||||
-rw-r--r-- | sd/source/filter/html/pubdlg.cxx | 52 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.hxx | 7 |
3 files changed, 31 insertions, 39 deletions
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 29298b2c1bd1..188595fedc5d 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -38,11 +38,12 @@ namespace PictReaderInternal { class Pattern { public: //! constructor - Pattern() { - isColor = false; isRead = false; - penStyle=PEN_SOLID; brushStyle = BRUSH_SOLID; - nBitCount = 64; - } + Pattern() : penStyle(PEN_SOLID), + brushStyle(BRUSH_SOLID), + nBitCount(64), + isColor(false), + isRead(false) + {} //! reads black/white pattern from SvStream sal_uLong read(SvStream &stream); diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 21617ed5e845..bca3b3d92113 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -132,47 +132,39 @@ public: // load Default-settings SdPublishingDesign::SdPublishingDesign() - : m_bCreated(false) + : m_eMode(PUBLISH_HTML) + , m_eScript(SCRIPT_ASP) + , m_bAutoSlide(true) + , m_nSlideDuration(15) + , m_bEndless(true) + , m_bContentPage(true) + , m_bNotes(true) + , m_nResolution(PUB_LOWRES_WIDTH) + , m_eFormat(FORMAT_PNG) + , m_bSlideSound(true) + , m_bHiddenSlides(false) + , m_bDownload(false) + , m_bCreated(false) + , m_nButtonThema(-1) + , m_bUserAttr(false) + , m_aBackColor(COL_WHITE) + , m_aTextColor(COL_BLACK) + , m_aLinkColor(COL_BLUE) + , m_aVLinkColor(COL_LIGHTGRAY) + , m_aALinkColor(COL_GRAY) + , m_bUseAttribs(true) + , m_bUseColor(true) { - m_eMode = PUBLISH_HTML; - m_bContentPage = true; - m_bNotes = true; - - m_eFormat = FORMAT_PNG; - FilterConfigItem aFilterConfigItem("Office.Common/Filter/Graphic/Export/JPG"); sal_Int32 nCompression = aFilterConfigItem.ReadInt32( KEY_QUALITY, 75 ); m_aCompression = OUString::number(nCompression) + "%"; SvtUserOptions aUserOptions; - - m_nResolution = PUB_LOWRES_WIDTH; m_aAuthor = aUserOptions.GetFirstName(); if (!m_aAuthor.isEmpty() && !aUserOptions.GetLastName().isEmpty()) m_aAuthor += " "; m_aAuthor += aUserOptions.GetLastName(); m_aEMail = aUserOptions.GetEmail(); - m_bDownload = false; - m_nButtonThema = -1; - - m_bUserAttr = false; - m_bUseAttribs = true; - m_bUseColor = true; - - m_aBackColor = COL_WHITE; - m_aTextColor = COL_BLACK; - m_aLinkColor = COL_BLUE; - m_aVLinkColor = COL_LIGHTBLUE; - m_aALinkColor = COL_GRAY; - - m_eScript = SCRIPT_ASP; - - m_bAutoSlide = true; - m_nSlideDuration = 15; - m_bEndless = true; - - m_bSlideSound = true; - m_bHiddenSlides = false; } // Compares the values without paying attention to the name diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index 6b9a25e326c2..51aba435b70a 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -485,10 +485,9 @@ struct GDIObj {} GDIObj(GDIObjectType eT, void* pS) - { - pStyle = pS; - eType = eT; - } + : pStyle(pS) + , eType(eT) + {} void Set(GDIObjectType eT, void* pS) { |