diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-11-25 21:45:18 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-11-26 18:33:22 +0100 |
commit | 08ce9a9293523c2b49e3beda62c0eb0f75be2745 (patch) | |
tree | 00f36387152fa1bb3c1387c147e6e2b9d70a67e9 /sw | |
parent | 83ad0fe65f97e879ed65a72b789a86028caec1f2 (diff) |
cppcheck: performing init in init list (sw/vcl/xmloff)
Change-Id: I8e6c77847e1c2ec386c27c34b75160f4a44da2fe
Reviewed-on: https://gerrit.libreoffice.org/83717
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/swcrsr.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/doc/tblafmt.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/layout/flycnt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 84 | ||||
-rw-r--r-- | sw/source/core/text/itratr.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/text/porexp.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/pormulti.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf2.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 77 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8struc.hxx | 84 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexpit.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbapalette.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbatabstops.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 2 |
18 files changed, 136 insertions, 178 deletions
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 611430d7113b..1075f2fa0fb6 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -67,9 +67,8 @@ struct PercentHdl bool bBack, bNodeIdx; PercentHdl( sal_uLong nStt, sal_uLong nEnd, SwDocShell* pSh ) - : pDSh(pSh), bBack(false), bNodeIdx(false) + : pDSh(pSh), nActPos(nStt), bBack(false), bNodeIdx(false) { - nActPos = nStt; if( ( bBack = (nStt > nEnd )) ) { sal_uLong n = nStt; nStt = nEnd; nEnd = n; diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 765154b3e862..d0ec125537e6 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -139,9 +139,8 @@ namespace class WriterSpecificAutoFormatBlock { public: - explicit WriterSpecificAutoFormatBlock(SvStream &rStream) : _rStream(rStream) + explicit WriterSpecificAutoFormatBlock(SvStream &rStream) : _rStream(rStream), _whereToWriteEndOfBlock(BeginSwBlock(rStream)) { - _whereToWriteEndOfBlock = BeginSwBlock(rStream); } ~WriterSpecificAutoFormatBlock() diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 262357d8d2a2..cee06bf16a3e 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -549,7 +549,7 @@ class SwDistance { public: SwTwips nMain, nSub; - SwDistance() { nMain = nSub = 0; } + SwDistance() : nMain(0), nSub(0) { } bool operator<( const SwDistance& rTwo ) const { return nMain < rTwo.nMain || ( nMain == rTwo.nMain && nSub && rTwo.nSub && nSub < rTwo.nSub ); } diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index c1aacf8c8bf1..697a9e9b0cd0 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1521,50 +1521,48 @@ SwTextFormatInfo::SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrame *pF * and the bMulti and bFirstMulti-flag has to be set correctly. */ SwTextFormatInfo::SwTextFormatInfo( const SwTextFormatInfo& rInf, - SwLineLayout& rLay, SwTwips nActWidth ) : SwTextPaintInfo( rInf ), - m_bTabOverflow( false ) + SwLineLayout& rLay, SwTwips nActWidth ) : + SwTextPaintInfo( rInf ), + m_pRoot(&rLay), + m_pLast(&rLay), + m_pFly(nullptr), + m_pUnderflow(nullptr), + m_pRest(nullptr), + m_pLastTab(nullptr), + m_nSoftHyphPos(TextFrameIndex(0)), + m_nLineStart(rInf.GetIdx()), + m_nUnderScorePos(TextFrameIndex(COMPLETE_STRING)), + m_nLeft(rInf.m_nLeft), + m_nRight(rInf.m_nRight), + m_nFirst(rInf.m_nLeft), + m_nRealWidth(sal_uInt16(nActWidth)), + m_nWidth(m_nRealWidth), + m_nLineHeight(0), + m_nLineNetHeight(0), + m_nForcedLeftMargin(0), + m_bFull(false), + m_bFootnoteDone(true), + m_bErgoDone(true), + m_bNumDone(true), + m_bArrowDone(true), + m_bStop(false), + m_bNewLine(true), + m_bShift(false), + m_bUnderflow(false), + m_bInterHyph(false), + m_bAutoHyph(false), + m_bDropInit(false), + m_bQuick(rInf.m_bQuick), + m_bNoEndHyph(false), + m_bNoMidHyph(false), + m_bIgnoreFly(false), + m_bFakeLineStart(false), + m_bTabOverflow( false ), + m_bTestFormat(rInf.m_bTestFormat), + m_cTabDecimal(0), + m_cHookChar(0), + m_nMaxHyph(0) { - m_pRoot = &rLay; - m_pLast = &rLay; - m_pFly = nullptr; - m_pUnderflow = nullptr; - m_pRest = nullptr; - m_pLastTab = nullptr; - - m_nSoftHyphPos = TextFrameIndex(0); - m_nUnderScorePos = TextFrameIndex(COMPLETE_STRING); - m_nLineStart = rInf.GetIdx(); - m_nLeft = rInf.m_nLeft; - m_nRight = rInf.m_nRight; - m_nFirst = rInf.m_nLeft; - m_nRealWidth = sal_uInt16(nActWidth); - m_nWidth = m_nRealWidth; - m_nLineHeight = 0; - m_nLineNetHeight = 0; - m_nForcedLeftMargin = 0; - - m_bFull = false; - m_bFootnoteDone = true; - m_bErgoDone = true; - m_bNumDone = true; - m_bArrowDone = true; - m_bStop = false; - m_bNewLine = true; - m_bShift = false; - m_bUnderflow = false; - m_bInterHyph = false; - m_bAutoHyph = false; - m_bDropInit = false; - m_bQuick = rInf.m_bQuick; - m_bNoEndHyph = false; - m_bNoMidHyph = false; - m_bIgnoreFly = false; - m_bFakeLineStart = false; - - m_cTabDecimal = 0; - m_cHookChar = 0; - m_nMaxHyph = 0; - m_bTestFormat = rInf.m_bTestFormat; SetMulti( true ); SetFirstMulti( rInf.IsFirstMulti() ); } diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index fd433adc724c..9ec429195bf5 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -796,8 +796,9 @@ public: long nWordAdd; sal_Int32 nNoLineBreak; SwMinMaxArgs( OutputDevice* pOutI, SwViewShell const * pShI, sal_uLong& rMinI, sal_uLong &rAbsI ) - : pOut( pOutI ), pSh( pShI ), rMin( rMinI ), rAbsMin( rAbsI ) - { nRowWidth = nWordWidth = nWordAdd = 0; nNoLineBreak = COMPLETE_STRING; } + : pOut( pOutI ), pSh( pShI ), rMin( rMinI ), rAbsMin( rAbsI ), nRowWidth(0), + nWordWidth(0), nWordAdd(0), nNoLineBreak(COMPLETE_STRING) + { } void Minimum( long nNew ) const { if( static_cast<long>(rMin) < nNew ) rMin = nNew; } void NewWord() { nWordAdd = nWordWidth = 0; } }; diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx index 979516ffdafe..6ab851ad3b2b 100644 --- a/sw/source/core/text/porexp.hxx +++ b/sw/source/core/text/porexp.hxx @@ -43,7 +43,7 @@ class SwBlankPortion : public SwExpandPortion public: SwBlankPortion( sal_Unicode cCh, bool bMult = false ) : m_cChar( cCh ), m_bMulti( bMult ) - { m_cChar = cCh; SetLen(TextFrameIndex(1)); SetWhichPor( PortionType::Blank ); } + { SetLen(TextFrameIndex(1)); SetWhichPor( PortionType::Blank ); } virtual SwLinePortion *Compress() override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index d2486329cbc0..c2c0cbed33e8 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -2499,11 +2499,11 @@ SwTextCursorSave::SwTextCursorSave( SwTextCursor* pCursor, sal_uInt16& nX, TextFrameIndex const nCurrStart, long nSpaceAdd ) + : pTextCursor(pCursor), + pCurr(pCursor->m_pCurr), + nStart(pCursor->m_nStart) { - pTextCursor = pCursor; - nStart = pCursor->m_nStart; pCursor->m_nStart = nCurrStart; - pCurr = pCursor->m_pCurr; pCursor->m_pCurr = &pMulti->GetRoot(); while( pCursor->Y() + pCursor->GetLineHeight() < nY && pCursor->Next() ) diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 12153fb74c4d..a857534e5803 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2775,25 +2775,23 @@ public: }; SectionSaveStruct::SectionSaveStruct( SwHTMLParser& rParser ) : - m_nBaseFontStMinSave(0), m_nFontStMinSave(0), m_nFontStHeadStartSave(0), - m_nDefListDeepSave(0), m_nContextStMinSave(0), m_nContextStAttrMinSave(0) + m_nBaseFontStMinSave(rParser.m_nBaseFontStMin), + m_nFontStMinSave(rParser.m_nFontStMin), + m_nFontStHeadStartSave(rParser.m_nFontStHeadStart), + m_nDefListDeepSave(rParser.m_nDefListDeep), + m_nContextStMinSave(rParser.m_nContextStMin), + m_nContextStAttrMinSave(rParser.m_nContextStAttrMin) { // Freeze font stacks - m_nBaseFontStMinSave = rParser.m_nBaseFontStMin; rParser.m_nBaseFontStMin = rParser.m_aBaseFontStack.size(); - m_nFontStMinSave = rParser.m_nFontStMin; - m_nFontStHeadStartSave = rParser.m_nFontStHeadStart; rParser.m_nFontStMin = rParser.m_aFontStack.size(); // Freeze context stack - m_nContextStMinSave = rParser.m_nContextStMin; - m_nContextStAttrMinSave = rParser.m_nContextStAttrMin; rParser.m_nContextStMin = rParser.m_aContexts.size(); rParser.m_nContextStAttrMin = rParser.m_nContextStMin; // And remember a few counters - m_nDefListDeepSave = rParser.m_nDefListDeep; rParser.m_nDefListDeep = 0; } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index e0b08a639602..7a9b8e1c3450 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1969,13 +1969,12 @@ WW8_Annotation::WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart, WW8_Annotation::WW8_Annotation(const SwRedlineData* pRedline) : mpRichText(nullptr), - maDateTime( DateTime::EMPTY ), + msSimpleText(pRedline->GetComment()), + msOwner(SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor())), + maDateTime(pRedline->GetTimeStamp()), m_nRangeStart(0), m_nRangeEnd(0) { - msSimpleText = pRedline->GetComment(); - msOwner = SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor()); - maDateTime = pRedline->GetTimeStamp(); } bool WW8_Annotation::HasRange() const diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index bf755c606808..5ed779dcd069 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -816,10 +816,10 @@ const SfxPoolItem& MSWordExportBase::GetItem(sal_uInt16 nWhich) const } WW8_WrPlc1::WW8_WrPlc1( sal_uInt16 nStructSz ) - : nStructSiz( nStructSz ) + : pData( new sal_uInt8[ 16 * nStructSz ] ), + nDataLen(16 * nStructSz), + nStructSiz( nStructSz ) { - nDataLen = 16 * nStructSz; - pData.reset( new sal_uInt8[ nDataLen ] ); } WW8_WrPlc1::~WW8_WrPlc1() diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 20f613bad670..e0a723aa4f64 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -295,15 +295,15 @@ struct WW8PicDesc }; WW8PicDesc::WW8PicDesc( const WW8_PIC& rPic ) + : nCL(rPic.dxaCropLeft), + nCR(rPic.dxaCropRight), + nCT(rPic.dyaCropTop), + nCB(rPic.dyaCropBottom) { //See #i21190# before fiddling with this method long nOriWidth = rPic.dxaGoal; //Size in 1/100 mm before crop long nOriHeight = rPic.dyaGoal; - nCL = rPic.dxaCropLeft; - nCR = rPic.dxaCropRight; - nCT = rPic.dyaCropTop; - nCB = rPic.dyaCropBottom; long nCurrentWidth = nOriWidth - (nCL + nCR); // Size after crop long nCurrentHeight = nOriHeight - (nCT + nCB); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 3321da254e37..f9d3a5df580b 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -367,9 +367,9 @@ class BasicProjImportHelper SwDocShell& mrDocShell; uno::Reference< uno::XComponentContext > mxCtx; public: - explicit BasicProjImportHelper( SwDocShell& rShell ) : mrDocShell( rShell ) + explicit BasicProjImportHelper( SwDocShell& rShell ) : mrDocShell( rShell ), + mxCtx(comphelper::getProcessComponentContext()) { - mxCtx = comphelper::getProcessComponentContext(); } bool import( const uno::Reference< io::XInputStream >& rxIn ); OUString getProjectName() const; diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 4e522698dede..5d4d403ec341 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4897,11 +4897,11 @@ sal_uInt16 WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const WW8PLCFMan::WW8PLCFMan(const WW8ScannerBase* pBase, ManTypes nType, long nStartCp, bool bDoingDrawTextBox) : maSprmParser(*pBase->m_pWw8Fib), + m_nLineEnd(WW8_CP_MAX), mbDoingDrawTextBox(bDoingDrawTextBox) { m_pWwFib = pBase->m_pWw8Fib; - m_nLineEnd = WW8_CP_MAX; m_nManType = nType; if( MAN_MAINTEXT == nType ) @@ -6212,7 +6212,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset): } WW8Fib::WW8Fib(sal_uInt8 nVer, bool bDot): - m_fDot(false), m_fGlsy(false), m_fComplex(false), m_fHasPic(false), m_cQuickSaves(0), + m_nVersion(nVer), m_fDot(false), m_fGlsy(false), m_fComplex(false), m_fHasPic(false), m_cQuickSaves(0), m_fEncrypted(false), m_fWhichTableStm(false), m_fReadOnlyRecommended(false), m_fWriteReservation(false), m_fExtChar(false), m_fFarEast(false), m_fObfuscated(false), m_fMac(false), m_fEmptySpecial(false), m_fLoadOverridePage(false), m_fFuturesavedUndo(false), @@ -6220,7 +6220,6 @@ WW8Fib::WW8Fib(sal_uInt8 nVer, bool bDot): // in C++20 with P06831R1 "Default member initializers for bit-fields (revision 1)", the // above bit-field member initializations can be moved to the class definition { - m_nVersion = nVer; if (8 == nVer) { m_fcMin = 0x800; @@ -7808,21 +7807,22 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize): } WW8Dop::WW8Dop(): - fFacingPages(false), fWidowControl(false), fPMHMainDoc(false), grfSuppression(0), fpc(0), - grpfIhdt(0), rncFootnote(0), nFootnote(0), fOutlineDirtySave(false), fOnlyMacPics(false), - fOnlyWinPics(false), fLabelDoc(false), fHyphCapitals(false), fAutoHyphen(false), - fFormNoFields(false), fLinkStyles(false), fRevMarking(false), fBackup(false), - fExactCWords(false), fPagHidden(false), fPagResults(false), fLockAtn(false), - fMirrorMargins(false), fReadOnlyRecommended(false), fDfltTrueType(false), - fPagSuppressTopSpacing(false), fProtEnabled(false), fDispFormFieldSel(false), fRMView(false), - fRMPrint(false), fWriteReservation(false), fLockRev(false), fEmbedFonts(false), + fFacingPages(false), fWidowControl(true), fPMHMainDoc(false), grfSuppression(0), fpc(1), + grpfIhdt(0), rncFootnote(0), nFootnote(1), fOutlineDirtySave(true), fOnlyMacPics(false), + fOnlyWinPics(false), fLabelDoc(false), fHyphCapitals(true), fAutoHyphen(false), + fFormNoFields(false), fLinkStyles(false), fRevMarking(false), fBackup(true), + fExactCWords(false), fPagHidden(true), fPagResults(true), fLockAtn(false), + fMirrorMargins(false), fReadOnlyRecommended(false), fDfltTrueType(true), + fPagSuppressTopSpacing(false), fProtEnabled(false), fDispFormFieldSel(false), fRMView(true), + fRMPrint(true), fWriteReservation(false), fLockRev(false), fEmbedFonts(false), copts_fNoTabForInd(false), copts_fNoSpaceRaiseLower(false), copts_fSupressSpbfAfterPgBrk(false), copts_fWrapTrailSpaces(false), copts_fMapPrintTextColor(false), copts_fNoColumnBalance(false), copts_fConvMailMergeEsc(false), copts_fSupressTopSpacing(false), copts_fOrigWordTableRules(false), copts_fTransparentMetafiles(false), copts_fShowBreaksInFrames(false), copts_fSwapBordersFacingPgs(false), copts_fExpShRtn(false), - rncEdn(0), nEdn(0), epc(0), fPrintFormData(false), fSaveFormData(false), fShadeFormData(false), - fWCFootnoteEdn(false), wvkSaved(0), wScaleSaved(0), zkSaved(0), fRotateFontW6(false), + dxaTab(0x2d0), dxaHotZ(0x168), nRevision(1), + rncEdn(0), nEdn(1), epc(3), fPrintFormData(false), fSaveFormData(false), fShadeFormData(true), + fWCFootnoteEdn(false), wvkSaved(2), wScaleSaved(100), zkSaved(0), fRotateFontW6(false), iGutterPos(false), fNoTabForInd(false), fNoSpaceRaiseLower(false), fSupressSpbfAfterPageBreak(false), fWrapTrailSpaces(false), fMapPrintTextColor(false), fNoColumnBalance(false), fConvMailMergeEsc(false), fSupressTopSpacing(false), @@ -7830,14 +7830,15 @@ WW8Dop::WW8Dop(): fSwapBordersFacingPgs(false), fCompatibilityOptions_Unknown1_13(false), fExpShRtn(false), fCompatibilityOptions_Unknown1_15(false), fCompatibilityOptions_Unknown1_16(false), fSuppressTopSpacingMac5(false), fTruncDxaExpand(false), fPrintBodyBeforeHdr(false), - fNoLeading(false), fCompatibilityOptions_Unknown1_21(false), fMWSmallCaps(false), + fNoLeading(true), fCompatibilityOptions_Unknown1_21(false), fMWSmallCaps(false), fCompatibilityOptions_Unknown1_23(false), fCompatibilityOptions_Unknown1_24(false), fCompatibilityOptions_Unknown1_25(false), fCompatibilityOptions_Unknown1_26(false), fCompatibilityOptions_Unknown1_27(false), fCompatibilityOptions_Unknown1_28(false), fCompatibilityOptions_Unknown1_29(false), fCompatibilityOptions_Unknown1_30(false), - fCompatibilityOptions_Unknown1_31(false), fUsePrinterMetrics(false), lvl(0), fHtmlDoc(false), - fSnapBorder(false), fIncludeHeader(false), fIncludeFooter(false), fForcePageSizePag(false), + fCompatibilityOptions_Unknown1_31(false), fUsePrinterMetrics(true), lvl(9), fHtmlDoc(false), + fSnapBorder(false), fIncludeHeader(true), fIncludeFooter(true), fForcePageSizePag(false), fMinFontSizePag(false), fHaveVersions(false), fAutoVersion(false), + cChWS(0), cChWSFootnoteEdn(0), cDBC(0), cDBCFootnoteEdn(0), nfcEdnRef(2), fCompatibilityOptions_Unknown2_1(false), fCompatibilityOptions_Unknown2_2(false), fDontUseHTMLAutoSpacing(false), fCompatibilityOptions_Unknown2_4(false), fCompatibilityOptions_Unknown2_5(false), fCompatibilityOptions_Unknown2_6(false), @@ -7857,55 +7858,19 @@ WW8Dop::WW8Dop(): fUnknown3(0), fUseBackGroundInAllmodes(false), fDoNotEmbedSystemFont(false), fWordCompat(false), fLiveRecover(false), fEmbedFactoids(false), fFactoidXML(false), fFactoidAllDone(false), fFolioPrint(false), fReverseFolio(false), iTextLineEnding(0), fHideFcc(false), - fAcetateShowMarkup(false), fAcetateShowAtn(false), fAcetateShowInsDel(false), + fAcetateShowMarkup(false), fAcetateShowAtn(true), fAcetateShowInsDel(false), fAcetateShowProps(false) // in C++20 with P06831R1 "Default member initializers for bit-fields (revision 1)", the // above bit-field member initializations can be moved to the class definition { - fWidowControl = true; - fpc = 1; - nFootnote = 1; - fOutlineDirtySave = true; - fHyphCapitals = true; - fBackup = true; - fPagHidden = true; - fPagResults = true; - fDfltTrueType = true; - /* Writer acts like this all the time at the moment, ideally we need an option for these two as well to import word docs that are not like this by default */ - fNoLeading = true; - fUsePrinterMetrics = true; - - fRMView = true; - fRMPrint = true; - dxaTab = 0x2d0; - dxaHotZ = 0x168; - nRevision = 1; - nEdn = 1; - - epc = 3; - nfcEdnRef = 2; - fShadeFormData = true; - - wvkSaved = 2; - wScaleSaved = 100; - zkSaved = 0; - - lvl = 9; - fIncludeHeader = true; - fIncludeFooter = true; - - cChWS = /**!!**/ 0; - cChWSFootnoteEdn = /**!!**/ 0; - - cDBC = /**!!**/ 0; - cDBCFootnoteEdn = /**!!**/ 0; - - fAcetateShowAtn = true; + // put in initialization list + // fNoLeading = true; + //fUsePrinterMetrics = true; } void WW8Dop::SetCompatibilityOptions(sal_uInt32 a32Bit) diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx index 3a65cb33c915..dc9a2e403f56 100644 --- a/sw/source/filter/ww8/ww8struc.hxx +++ b/sw/source/filter/ww8/ww8struc.hxx @@ -102,49 +102,49 @@ struct Word2CHPX sal_uInt32 fcPic; Word2CHPX() + : fBold(0), + fItalic(0), + fRMarkDel(0), + fOutline(0), + fFieldVanish(0), + fSmallCaps(0), + fCaps(0), + fVanish(0), + fRMark(0), + fSpec(0), + fStrike(0), + fObj(0), + fBoldBi(0), + fItalicBi(0), + fBiDi(0), + fDiacUSico(0), + fsIco(0), + fsFtc(0), + fsHps(0), + fsKul(0), + fsPos(0), + fsSpace(0), + fsLid(0), + fsIcoBi(0), + fsFtcBi(0), + fsHpsBi(0), + fsLidBi(0), + + ftc(0), + hps(0), + qpsSpace(0), + fSysVanish(0), + fNumRun(0), + ico(0), + kul(0), + hpsPos(0), + icoBi(0), + lid(0), + ftcBi(0), + hpsBi(0), + lidBi(0), + fcPic(0) { - fBold = 0; - fItalic = 0; - fRMarkDel = 0; - fOutline = 0; - fFieldVanish = 0; - fSmallCaps = 0; - fCaps = 0; - fVanish = 0; - fRMark = 0; - fSpec = 0; - fStrike = 0; - fObj = 0; - fBoldBi = 0; - fItalicBi = 0; - fBiDi = 0; - fDiacUSico = 0; - fsIco = 0; - fsFtc = 0; - fsHps = 0; - fsKul = 0; - fsPos = 0; - fsSpace = 0; - fsLid = 0; - fsIcoBi = 0; - fsFtcBi = 0; - fsHpsBi = 0; - fsLidBi = 0; - - ftc = 0; - hps = 0; - qpsSpace = 0; - fSysVanish = 0; - fNumRun = 0; - ico = 0; - kul = 0; - hpsPos = 0; - icoBi = 0; - lid = 0; - ftcBi = 0; - hpsBi = 0; - lidBi = 0; - fcPic = 0; } }; diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 2c2391081b96..7c1b29df5aa1 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -285,8 +285,8 @@ const SfxPoolItem* SvXMLExportItemMapper::GetItem( const SfxItemSet& rSet, } SvXMLExportItemMapper::SvXMLExportItemMapper( SvXMLItemMapEntriesRef rMapEntries ) + : mrMapEntries(std::move(rMapEntries)) { - mrMapEntries = std::move(rMapEntries); } SvXMLExportItemMapper::~SvXMLExportItemMapper() diff --git a/sw/source/ui/vba/vbapalette.cxx b/sw/source/ui/vba/vbapalette.cxx index d86235859b23..ad67525d7be2 100644 --- a/sw/source/ui/vba/vbapalette.cxx +++ b/sw/source/ui/vba/vbapalette.cxx @@ -87,8 +87,8 @@ public: } VbaPalette::VbaPalette() + : mxPalette(new DefaultPalette()) { - mxPalette = new DefaultPalette(); } diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx index 567ee1234a4f..0c902a18d40a 100644 --- a/sw/source/ui/vba/vbatabstops.cxx +++ b/sw/source/ui/vba/vbatabstops.cxx @@ -79,9 +79,8 @@ private: public: /// @throws css::uno::RuntimeException - TabStopCollectionHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps ): mxParent( xParent ), mxContext( xContext ) + TabStopCollectionHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps ): mxParent( xParent ), mxContext( xContext ), mnTabStops(lcl_getTabStops( xParaProps ).getLength()) { - mnTabStops = lcl_getTabStops( xParaProps ).getLength(); } virtual sal_Int32 SAL_CALL getCount( ) override diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 615c1288052b..2e97300932b1 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -752,8 +752,8 @@ void SwView::Replace() } SwSearchOptions::SwSearchOptions( SwWrtShell const * pSh, bool bBackward ) + : eStart(SwDocPositions::Curr) { - eStart = SwDocPositions::Curr; if( bBackward ) { eEnd = SwDocPositions::Start; |