diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-11-24 21:43:25 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-11-24 22:52:21 +0100 |
commit | 9d63592d530e9ad5ab2d6aee0aba5bc0c117aae3 (patch) | |
tree | 2dd1efe038cd76ec62201873af4287939a1398f8 /sd | |
parent | b9448acf3ce4c1c850a691fc33686fd5165b94d9 (diff) |
cppcheck: performing init in init list (sc/scripting/sd)
Change-Id: I8bd4c1b7b551a96ecd5a2b50fbfdf225567175f6
Reviewed-on: https://gerrit.libreoffice.org/83621
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/uimpress.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/grouptable.hxx | 10 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-text.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/eppt/text.hxx | 6 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 18 | ||||
-rw-r--r-- | sd/source/filter/ppt/propread.cxx | 3 |
6 files changed, 22 insertions, 25 deletions
diff --git a/sd/qa/unit/uimpress.cxx b/sd/qa/unit/uimpress.cxx index 74678dc7d920..cd9a98296ad2 100644 --- a/sd/qa/unit/uimpress.cxx +++ b/sd/qa/unit/uimpress.cxx @@ -50,8 +50,8 @@ private: }; Test::Test() + : m_xContext(cppu::defaultBootstrap_InitialComponentContext()) { - m_xContext = cppu::defaultBootstrap_InitialComponentContext(); uno::Reference<lang::XMultiComponentFactory> xFactory(m_xContext->getServiceManager()); uno::Reference<lang::XMultiServiceFactory> xSM(xFactory, uno::UNO_QUERY_THROW); diff --git a/sd/source/filter/eppt/grouptable.hxx b/sd/source/filter/eppt/grouptable.hxx index d792072479cb..a88201e195ee 100644 --- a/sd/source/filter/eppt/grouptable.hxx +++ b/sd/source/filter/eppt/grouptable.hxx @@ -31,16 +31,16 @@ struct GroupEntry css::uno::Reference< css::container::XIndexAccess > mXIndexAccess; explicit GroupEntry( css::uno::Reference< css::container::XIndexAccess > const & rIndex ) + : mnCurrentPos(0), + mnCount(mXIndexAccess->getCount()), + mXIndexAccess(rIndex) { - mXIndexAccess = rIndex; - mnCount =mXIndexAccess->getCount(); - mnCurrentPos = 0; }; explicit GroupEntry( sal_uInt32 nCount ) + : mnCurrentPos(0), + mnCount(nCount) { - mnCount = nCount; - mnCurrentPos = 0; }; }; diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index f3b3393c32d8..10ed9d3b69eb 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -1260,11 +1260,11 @@ struct ImplTextObj }; ImplTextObj::ImplTextObj( int nInstance ) - : maList() + : mnTextSize(0), + mnInstance(nInstance), + maList(), + mbHasExtendedBullets(false) { - mnTextSize = 0; - mnInstance = nInstance; - mbHasExtendedBullets = false; } TextObj::TextObj( css::uno::Reference< css::text::XSimpleText > const & rXTextRef, diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx index 4f32412d35e3..4b9c85d9c9fd 100644 --- a/sd/source/filter/eppt/text.hxx +++ b/sd/source/filter/eppt/text.hxx @@ -105,10 +105,10 @@ struct FieldEntry OUString aFieldUrl; FieldEntry( sal_uInt32 nType, sal_uInt32 nStart, sal_uInt32 nEnd ) + : nFieldType(nType), + nFieldStartPos(nStart), + nFieldEndPos(nEnd) { - nFieldType = nType; - nFieldStartPos = nStart; - nFieldEndPos = nEnd; } }; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 77189e3d543d..b140e930749f 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -177,14 +177,14 @@ OUString HtmlState::Flush() // c'tor with default color for the page HtmlState::HtmlState( Color aDefColor ) + : mbColor(false), + mbWeight(false), + mbItalic(false), + mbUnderline(false), + mbStrike(false), + mbLink(false), + maDefColor(aDefColor) { - mbColor = false; - mbWeight = false; - mbItalic = false; - mbUnderline = false; - mbLink = false; - mbStrike = false; - maDefColor = aDefColor; } // enables/disables bold print @@ -3097,10 +3097,8 @@ OUString HtmlExport::GetButtonName( int nButton ) return OUString::createFromAscii(pButtonNames[nButton]); } -EasyFile::EasyFile() +EasyFile::EasyFile() : bOpen(false) { - pOStm = nullptr; - bOpen = false; } EasyFile::~EasyFile() diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index 71472b2f9515..ab80510d07b8 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -208,9 +208,8 @@ Section::Section( const Section& rSection ) maEntries.push_back(std::make_unique<PropEntry>(*rEntry)); } -Section::Section( const sal_uInt8* pFMTID ) +Section::Section( const sal_uInt8* pFMTID ) : mnTextEnc(RTL_TEXTENCODING_MS_1252) { - mnTextEnc = RTL_TEXTENCODING_MS_1252; for ( int i = 0; i < 16; i++ ) aFMTID[ i ] = pFMTID[ i ]; } |