diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-11-24 16:36:16 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-11-24 20:00:38 +0100 |
commit | 17c3d827e12d9ca99b869132f23ba212b11f909a (patch) | |
tree | f9e9b6ae7ba07cf0d935a9fcb8c74add48b44fd4 | |
parent | 3e1f0c060f02db4515b2dc705bda17ee068d51b4 (diff) |
cppcheck: performing init in init list (filter/fpicker/framework)
Change-Id: I7b602d17949f75c32dfe87acb92498111812ac32
Reviewed-on: https://gerrit.libreoffice.org/83612
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | filter/source/graphicfilter/egif/giflzwc.cxx | 5 | ||||
-rw-r--r-- | filter/source/graphicfilter/ios2met/ios2met.cxx | 3 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/office/fileview.hxx | 3 | ||||
-rw-r--r-- | fpicker/source/win32/VistaFilePickerImpl.cxx | 2 | ||||
-rw-r--r-- | framework/source/fwe/dispatch/interaction.cxx | 3 | ||||
-rw-r--r-- | framework/source/uiconfiguration/uicategorydescription.cxx | 8 | ||||
-rw-r--r-- | framework/source/uiconfiguration/windowstateconfiguration.cxx | 9 | ||||
-rw-r--r-- | framework/source/uielement/uicommanddescription.cxx | 12 |
9 files changed, 16 insertions, 31 deletions
diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx index 3dc595a0923b..f61f31dac2c5 100644 --- a/filter/source/graphicfilter/egif/giflzwc.cxx +++ b/filter/source/graphicfilter/egif/giflzwc.cxx @@ -71,11 +71,8 @@ inline void GIFImageDataOutputStream::WriteBits( sal_uInt16 nCode, sal_uInt16 nC GIFImageDataOutputStream::GIFImageDataOutputStream( SvStream & rGIF, sal_uInt8 nLZWDataSize ) : - rStream(rGIF) + rStream(rGIF), nBlockBufSize(0), nBitsBuf(0), nBitsBufSize(0) { - nBlockBufSize = 0; - nBitsBufSize = 0; - nBitsBuf = 0; rStream.WriteUChar( nLZWDataSize ); } diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 1ec1754d0d71..00ef5a9355b6 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -429,7 +429,7 @@ public: OS2METReader::OS2METReader() : ErrorCode(0) , pOS2MET(nullptr) - , pVirDev(nullptr) + , pVirDev(VclPtr<VirtualDevice>::Create()) , aBoundingRect() , aCalcBndRect() , aGlobMapMode() @@ -445,7 +445,6 @@ OS2METReader::OS2METReader() , aAttr() , pAttrStack(nullptr) { - pVirDev = VclPtr<VirtualDevice>::Create(); pVirDev->EnableOutput(false); } diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index ca4a2368bd9d..4393e4e0c1a6 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1690,10 +1690,10 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport mrCurrentState( maContextHandler.getCurrentState() ), maAttributeWriter( rExport, rFontExport, mrCurrentState ), maTextWriter( rExport, maAttributeWriter ), + mpVDev(VclPtr<VirtualDevice>::Create()), mbClipAttrChanged( false ), mbIsPlaceholderShape( false ) { - mpVDev = VclPtr<VirtualDevice>::Create(); mpVDev->EnableOutput( false ); maTargetMapMode = MapMode(MapUnit::Map100thMM); maTextWriter.setVirtualDevice( mpVDev, maTargetMapMode ); diff --git a/fpicker/source/office/fileview.hxx b/fpicker/source/office/fileview.hxx index 4c2a8f60af58..dfd669d9f396 100644 --- a/fpicker/source/office/fileview.hxx +++ b/fpicker/source/office/fileview.hxx @@ -54,9 +54,8 @@ struct FileViewAsyncAction sal_uInt32 nMaxTimeout; /// maximum time to wait for a result, in milliseconds, until eTimeout is returned Link<void*,void> aFinishHandler; /// the handler to be called when the action is finished. Called in every case, no matter of the result - FileViewAsyncAction() + FileViewAsyncAction() : nMinTimeout(0), nMaxTimeout (0) { - nMinTimeout = nMaxTimeout = 0; } }; diff --git a/fpicker/source/win32/VistaFilePickerImpl.cxx b/fpicker/source/win32/VistaFilePickerImpl.cxx index 1899f6addfc9..ba20ef75e64f 100644 --- a/fpicker/source/win32/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/VistaFilePickerImpl.cxx @@ -187,10 +187,10 @@ VistaFilePickerImpl::VistaFilePickerImpl() , m_iEventHandler(new VistaFilePickerEventHandler(this)) , m_bInExecute (false) , m_bWasExecuted (false) + , m_hParentWindow(choose_parent_window()) , m_sDirectory () , m_sFilename () { - m_hParentWindow = choose_parent_window(); } diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx index ef851093e70e..01411804fb8b 100644 --- a/framework/source/fwe/dispatch/interaction.cxx +++ b/framework/source/fwe/dispatch/interaction.cxx @@ -194,9 +194,8 @@ class InteractionRequest_Impl : public ::cppu::WeakImplHelper< css::task::XInter public: InteractionRequest_Impl( const css::uno::Any& aRequest, const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > >& lContinuations ) + : m_aRequest(aRequest), m_lContinuations(lContinuations) { - m_aRequest = aRequest; - m_lContinuations = lContinuations; } virtual uno::Any SAL_CALL getRequest() override; diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx index 5acec278f5e3..2c27f0403914 100644 --- a/framework/source/uiconfiguration/uicategorydescription.cxx +++ b/framework/source/uiconfiguration/uicategorydescription.cxx @@ -96,16 +96,14 @@ class ConfigurationAccess_UICategory : public ::cppu::WeakImplHelper<XNameAccess // XInterface, XTypeProvider ConfigurationAccess_UICategory::ConfigurationAccess_UICategory( const OUString& aModuleName, const Reference< XNameAccess >& rGenericUICategories, const Reference< XComponentContext >& rxContext ) : - m_aConfigCategoryAccess( "/org.openoffice.Office.UI." ), + // Create configuration hierarchical access name + m_aConfigCategoryAccess( "/org.openoffice.Office.UI." + aModuleName + "/Commands/Categories"), m_aPropUIName( "Name" ), m_xGenericUICategories( rGenericUICategories ), + m_xConfigProvider(theDefaultProvider::get( rxContext )), m_bConfigAccessInitialized( false ), m_bCacheFilled( false ) { - // Create configuration hierarchical access name - m_aConfigCategoryAccess += aModuleName + "/Commands/Categories"; - - m_xConfigProvider = theDefaultProvider::get( rxContext ); } ConfigurationAccess_UICategory::~ConfigurationAccess_UICategory() diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 2b75292c3a12..fe3697162a0e 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -214,15 +214,12 @@ class ConfigurationAccess_WindowState : public ::cppu::WeakImplHelper< XNameCon }; ConfigurationAccess_WindowState::ConfigurationAccess_WindowState( const OUString& aModuleName, const Reference< XComponentContext >& rxContext ) : - m_aConfigWindowAccess( "/org.openoffice.Office.UI." ), + // Create configuration hierarchical access name + m_aConfigWindowAccess( "/org.openoffice.Office.UI." + aModuleName + "/UIElements/States"), + m_xConfigProvider(theDefaultProvider::get( rxContext )), m_bConfigAccessInitialized( false ), m_bModified( false ) { - // Create configuration hierarchical access name - m_aConfigWindowAccess += aModuleName - + "/UIElements/States"; - m_xConfigProvider = theDefaultProvider::get( rxContext ); - // Initialize access array with property names. sal_Int32 n = 0; while ( CONFIGURATION_PROPERTIES[n] ) diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 85c97cee559d..76a2f03391c1 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -153,20 +153,16 @@ class ConfigurationAccess_UICommand : // Order is necessary for right initializa // XInterface, XTypeProvider ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( const OUString& aModuleName, const Reference< XNameAccess >& rGenericUICommands, const Reference< XComponentContext>& rxContext ) : - m_aConfigCmdAccess( CONFIGURATION_ROOT_ACCESS ), - m_aConfigPopupAccess( CONFIGURATION_ROOT_ACCESS ), + // Create configuration hierarchical access name + m_aConfigCmdAccess( CONFIGURATION_ROOT_ACCESS + aModuleName + "/UserInterface/Commands"), + m_aConfigPopupAccess( CONFIGURATION_ROOT_ACCESS + aModuleName + "/UserInterface/Popups"), m_aPropProperties( "Properties" ), m_xGenericUICommands( rGenericUICommands ), + m_xConfigProvider( theDefaultProvider::get( rxContext ) ), m_bConfigAccessInitialized( false ), m_bCacheFilled( false ), m_bGenericDataRetrieved( false ) { - // Create configuration hierarchical access name - m_aConfigCmdAccess += aModuleName + "/UserInterface/Commands"; - - m_xConfigProvider = theDefaultProvider::get( rxContext ); - - m_aConfigPopupAccess += aModuleName + "/UserInterface/Popups"; } ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand() |