diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-11-24 10:43:47 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-11-24 14:14:20 +0100 |
commit | 0be61adb0771a9bc0386b6e8d90e4bffd8dfa0e7 (patch) | |
tree | 991a018b9ba73a494e4376e64f7aebcb8aa58c40 /editeng | |
parent | 4582222a3ade99584514a86dbaddf0c80f7e7196 (diff) |
cppcheck: performing init in init list (dbaccess/desktop/dtrans/e.)
Change-Id: I7909df04a550a4fa843a70d20b5192231c3f175e
Reviewed-on: https://gerrit.libreoffice.org/83600
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 37 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 12 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 37 | ||||
-rw-r--r-- | editeng/source/outliner/outlundo.cxx | 14 |
4 files changed, 41 insertions, 59 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 98cc989ef6b9..348d74bf41ff 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -66,26 +66,25 @@ static void lcl_AllignToPixel( Point& rPoint, OutputDevice const * pOutDev, shor // class ImpEditView ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindow ) : - aOutArea( Point(), pEng->GetPaperSize() ) + pEditView(pView), + mpViewShell(nullptr), + mpOtherShell(nullptr), + pEditEngine(pEng), + pOutWin(pWindow), + nInvMore(1), + nControl(EVControlBits::AUTOSCROLL | EVControlBits::ENABLEPASTE), + nTravelXPos(TRAVEL_X_DONTKNOW), + nExtraCursorFlags(GetCursorFlags::NONE), + nCursorBidiLevel(CURSOR_BIDILEVEL_DONTKNOW), + nScrollDiffX(0), + bReadOnly(false), + bClickedInSelection(false), + bActiveDragAndDropListener(false), + aOutArea( Point(), pEng->GetPaperSize() ), + eSelectionMode(EESelectionMode::Std), + eAnchorMode(EEAnchorMode::TopLeft), + mpEditViewCallbacks(nullptr) { - pEditView = pView; - pEditEngine = pEng; - pOutWin = pWindow; - mpViewShell = nullptr; - mpOtherShell = nullptr; - nScrollDiffX = 0; - nExtraCursorFlags = GetCursorFlags::NONE; - nCursorBidiLevel = CURSOR_BIDILEVEL_DONTKNOW; - bReadOnly = false; - bClickedInSelection = false; - eSelectionMode = EESelectionMode::Std; - eAnchorMode = EEAnchorMode::TopLeft; - mpEditViewCallbacks = nullptr; - nInvMore = 1; - nTravelXPos = TRAVEL_X_DONTKNOW; - nControl = EVControlBits::AUTOSCROLL | EVControlBits::ENABLEPASTE; - bActiveDragAndDropListener = false; - aEditSelection.Min() = pEng->GetEditDoc().GetStartPaM(); aEditSelection.Max() = pEng->GetEditDoc().GetEndPaM(); diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 26c9d25961fa..6980e39d0824 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -134,10 +134,10 @@ struct DragAndDropInfo bool bDragAccepted : 1; DragAndDropInfo() + : nSensibleRange(0), nCursorWidth(0), nOutlinerDropDest(0), pBackground(nullptr), + pField(nullptr), bVisCursor(false), bDroppedInMe(false), bStarterOfDD(false), + bHasValidData(false), bUndoAction(false), bOutlinerMode(false), bDragAccepted(false) { - pBackground = nullptr; bVisCursor = false; bDroppedInMe = false; bStarterOfDD = false; - bHasValidData = false; bUndoAction = false; bOutlinerMode = false; - nSensibleRange = 0; nCursorWidth = 0; pField = nullptr; nOutlinerDropDest = 0; bDragAccepted = false; } ~DragAndDropInfo() { @@ -174,8 +174,8 @@ struct SpellInfo bool bMultipleDoc; svx::SpellPortions aLastSpellPortions; SpellContentSelections aLastSpellContentSelections; - SpellInfo() - { bSpellToEnd = true; eState = EESpellState::Ok; bMultipleDoc = false; } + SpellInfo() : eState(EESpellState::Ok), bSpellToEnd(true), bMultipleDoc(false) + { } }; // used for text conversion @@ -195,7 +195,7 @@ struct FormatterFontMetric sal_uInt16 nMaxAscent; sal_uInt16 nMaxDescent; - FormatterFontMetric() { nMaxAscent = 0; nMaxDescent = 0; /* nMinLeading = 0xFFFF; */ } + FormatterFontMetric() : nMaxAscent(0), nMaxDescent(0) { /* nMinLeading = 0xFFFF; */ } sal_uInt16 GetHeight() const { return nMaxAscent+nMaxDescent; } }; diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index c65dc164ea4a..3d040c00435d 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -95,7 +95,21 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : aMinAutoPaperSize( 0x0, 0x0 ), aMaxAutoPaperSize( 0x7FFFFFFF, 0x7FFFFFFF ), aEditDoc( pItemPool ), + pEditEngine(pEE), + pActiveView(nullptr), + pStylePool(nullptr), + pTextObjectPool(nullptr), + pUndoManager(nullptr), aWordDelimiters(" .,;:-`'?!_=\"{}()[]"), + maBackgroundColor(COL_AUTO), + nStretchX(100), + nStretchY(100), + nAsianCompressionMode(CharCompressType::NONE), + eDefaultHorizontalTextDirection(EEHorizontalTextDirection::Default), + nBigTextObjectStart(20), + eDefLanguage(LANGUAGE_DONTKNOW), + nCurTextHeight(0), + nCurTextHeightNTP(0), bKernAsianPunctuation(false), bAddExtLeading(false), bIsFormatting(false), @@ -113,29 +127,6 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : mbReplaceLeadingSingleQuotationMark(true), mbNbspRunNext(false) { - pEditEngine = pEE; - pActiveView = nullptr; - pConvInfo = nullptr; - pTextObjectPool = nullptr; - pStylePool = nullptr; - pUndoManager = nullptr; - pUndoMarkSelection = nullptr; - - nCurTextHeight = 0; - nCurTextHeightNTP = 0; - nBigTextObjectStart = 20; - - nStretchX = 100; - nStretchY = 100; - - eDefLanguage = LANGUAGE_DONTKNOW; - maBackgroundColor = COL_AUTO; - - nAsianCompressionMode = CharCompressType::NONE; - - eDefaultHorizontalTextDirection = EEHorizontalTextDirection::Default; - - aStatus.GetControlWord() = EEControlBits::USECHARATTRIBS | EEControlBits::DOIDLEFORMAT | EEControlBits::PASTESPECIAL | EEControlBits::UNDOATTRIBS | EEControlBits::ALLOWBIGOBJS | EEControlBits::RTFSTYLESHEETS | diff --git a/editeng/source/outliner/outlundo.cxx b/editeng/source/outliner/outlundo.cxx index 32f8302f8dd5..65f390f62487 100644 --- a/editeng/source/outliner/outlundo.cxx +++ b/editeng/source/outliner/outlundo.cxx @@ -37,11 +37,8 @@ OutlinerUndoBase::OutlinerUndoBase( sal_uInt16 _nId, Outliner* pOutliner ) } OutlinerUndoChangeParaFlags::OutlinerUndoChangeParaFlags( Outliner* pOutliner, sal_Int32 nPara, ParaFlag nOldFlags, ParaFlag nNewFlags ) -: OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ) +: OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ), mnPara(nPara), mnOldFlags(nOldFlags), mnNewFlags(nNewFlags) { - mnPara = nPara; - mnOldFlags = nOldFlags; - mnNewFlags = nNewFlags; } void OutlinerUndoChangeParaFlags::Undo() @@ -99,11 +96,8 @@ void OutlinerUndoChangeParaNumberingRestart::ImplApplyData( const ParaRestartDat } OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, sal_Int32 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ) - : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ) + : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ), mnPara(nPara), mnOldDepth(nOldDepth), mnNewDepth(nNewDepth) { - mnPara = nPara; - mnOldDepth = nOldDepth; - mnNewDepth = nNewDepth; } void OutlinerUndoChangeDepth::Undo() @@ -137,11 +131,9 @@ void OutlinerUndoCheckPara::Redo() } OLUndoExpand::OLUndoExpand(Outliner* pOut, sal_uInt16 _nId ) - : EditUndo( _nId, nullptr ) + : EditUndo( _nId, nullptr ), pOutliner(pOut), nCount(0) { DBG_ASSERT(pOut,"Undo:No Outliner"); - pOutliner = pOut; - nCount = 0; } |