diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-08 13:56:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-10 11:21:00 +0100 |
commit | 9f40107620316fd04e1fe3669ed7c3a5c2b62eb3 (patch) | |
tree | b03eab82b776167361590667251deabaee3873e9 /sw/source/core | |
parent | 12b584e4a9695a7516f239cd33950656212ed0c8 (diff) |
loplugin:indentation in sw
Change-Id: I4936284bff568b6bb47e5df3821f4ddd78260e92
Reviewed-on: https://gerrit.libreoffice.org/67568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core')
76 files changed, 226 insertions, 211 deletions
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index fe54ec1cd747..30adb4744335 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -133,7 +133,7 @@ void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) cons if (aValidateIt != mChildren.end()) { - OSL_ENSURE((*aValidateIt)->mpParent == this, "wrong parent"); + OSL_ENSURE((*aValidateIt)->mpParent == this, "wrong parent"); tSwNumberTreeChildren::const_iterator aIt = mItLastValid; @@ -406,7 +406,7 @@ void SwNumberTreeNode::MoveChildren(SwNumberTreeNode * pDest) mItLastValid = mChildren.end(); } - OSL_ENSURE(mChildren.empty(), "MoveChildren failed!"); + OSL_ENSURE(mChildren.empty(), "MoveChildren failed!"); #ifdef DBG_UTIL IsSane(false); diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index a00a8d04d465..ac2bb5a8c83c 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2908,7 +2908,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde if (nRet == -1) throw lang::IndexOutOfBoundsException(); - return nRet; + return nRet; } // #i71360#, #i108125# - adjustments for change tracking text markup diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 03fc575e9064..d1cfb08c29c6 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -752,7 +752,7 @@ uno::Any SwAccessibleTable::queryInterface( const uno::Type& rType ) if ( rType == cppu::UnoType<XAccessibleTable>::get() ) { uno::Reference<XAccessibleTable> xThis( this ); - aRet <<= xThis; + aRet <<= xThis; } else if ( rType == cppu::UnoType<XAccessibleSelection>::get() ) { diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index 6abbbb51faea..705c49accd79 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -241,10 +241,10 @@ SwCacheObj *SwCache::Get( const void *pOwner, const sal_uInt16 nIndex, } #ifdef DBG_UTIL - if ( pRet ) - ++m_nGetSuccess; - else - ++m_nGetFail; + if ( pRet ) + ++m_nGetSuccess; + else + ++m_nGetFail; #endif return pRet; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 01d046185e61..f99e4a7c2978 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1913,11 +1913,11 @@ bool SwContentAtPos::IsInRTLText()const SwTextFrame* pTmpFrame = aIter.First(); while( pTmpFrame ) { - if ( !pTmpFrame->IsFollow()) - { - bRet = pTmpFrame->IsRightToLeft(); - break; - } + if ( !pTmpFrame->IsFollow()) + { + bRet = pTmpFrame->IsRightToLeft(); + break; + } pTmpFrame = aIter.Next(); } } diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index bb6b5d34fa38..c115c9b359b9 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -571,12 +571,12 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTextAttr& rAttr ) { *pCmp = *pArrPtr; nFound++; + } + pArrPtr->nWhich = 0; + if( !--nStackCnt ) + break; } - pArrPtr->nWhich = 0; - if( !--nStackCnt ) - break; } - } bool bContinue = false; if( SfxItemState::DONTCARE == eState ) diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 669a2d4f7f00..cd58106998bc 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1844,7 +1844,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, // Move cursor to non-covered cell: const SwTableNode* pTableNd = pTableBoxStartNode->FindTableNode(); pTableBox = & pTableBox->FindStartOfRowSpan( pTableNd->GetTable() ); - SwNodeIndex& rPtIdx = GetPoint()->nNode; + SwNodeIndex& rPtIdx = GetPoint()->nNode; SwNodeIndex aNewIdx( *pTableBox->GetSttNd() ); rPtIdx = aNewIdx; diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx index e0f913357f4b..9f411c82424a 100644 --- a/sw/source/core/doc/DocumentDeviceManager.cxx +++ b/sw/source/core/doc/DocumentDeviceManager.cxx @@ -72,7 +72,7 @@ void DocumentDeviceManager::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDe { if ( bDeleteOld ) mpPrt.disposeAndClear(); - mpPrt = pP; + mpPrt = pP; // our printer should always use TWIP. Don't rely on this being set in SwViewShell::InitPrt, there // are situations where this isn't called. #i108712# diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index be8979dc7107..25894d35ff02 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -487,33 +487,33 @@ Hash::Hash( sal_uLong nSize ) : nCount(1) { -static const sal_uLong primes[] = -{ - 509, - 1021, - 2039, - 4093, - 8191, - 16381, - 32749, - 65521, - 131071, - 262139, - 524287, - 1048573, - 2097143, - 4194301, - 8388593, - 16777213, - 33554393, - 67108859, /* Preposterously large . . . */ - 134217689, - 268435399, - 536870909, - 1073741789, - 2147483647, - 0 -}; + static const sal_uLong primes[] = + { + 509, + 1021, + 2039, + 4093, + 8191, + 16381, + 32749, + 65521, + 131071, + 262139, + 524287, + 1048573, + 2097143, + 4194301, + 8388593, + 16777213, + 33554393, + 67108859, /* Preposterously large . . . */ + 134217689, + 268435399, + 536870909, + 1073741789, + 2147483647, + 0 + }; int i; pDataArr.reset( new HashData[ nSize ] ); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index a0af3db35e37..396fbc042f40 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -268,7 +268,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos, if( pNoTextNode ) { // Set size - Size aSize( pNoTextNode->GetTwipSize() ); + Size aSize( pNoTextNode->GetTwipSize() ); if( MINFLY > aSize.Width() ) aSize.setWidth( DEF_FLY_WIDTH ); aFormatSize.SetWidth( aSize.Width() ); @@ -346,7 +346,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection( RndStdIds eAnchorType, pNewTextNd->SetAttr(*pItem); } - pFormat = MakeFlySection_( *pAnchorPos, *pNewTextNd, + pFormat = MakeFlySection_( *pAnchorPos, *pNewTextNd, eAnchorType, pFlySet, pFrameFormat ); } return pFormat; @@ -1091,7 +1091,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable pNewSet->Put( pOldFormat->GetAnchor() ); // The new one should be variable in its height! - Size aSz( rSdrObj.GetCurrentBoundRect().GetSize() ); + Size aSz( rSdrObj.GetCurrentBoundRect().GetSize() ); SwFormatFrameSize aFrameSize( ATT_MIN_SIZE, aSz.Width(), aSz.Height() ); pNewSet->Put( aFrameSize ); diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index d17b8202d699..e3c9a6b5b116 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -426,8 +426,8 @@ SwDoc::~SwDoc() // Release the BaseLinks { - ::sfx2::SvLinkSources aTemp(getIDocumentLinksAdministration().GetLinkManager().GetServers()); - for( const auto& rpLinkSrc : aTemp ) + ::sfx2::SvLinkSources aTemp(getIDocumentLinksAdministration().GetLinkManager().GetServers()); + for( const auto& rpLinkSrc : aTemp ) rpLinkSrc->Closed(); if( !getIDocumentLinksAdministration().GetLinkManager().GetLinks().empty() ) @@ -1147,12 +1147,12 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu aIndexBefore--; #ifdef DBG_UTIL - SAL_INFO( "sw.docappend", "CopyRange In: " << CNTNT_DOC( this ) ); + SAL_INFO( "sw.docappend", "CopyRange In: " << CNTNT_DOC( this ) ); #endif rSource.getIDocumentContentOperations().CopyRange( aCpyPam, rInsPos, /*bCopyAll=*/true, /*bCheckPos=*/true ); // Note: aCpyPam is invalid now #ifdef DBG_UTIL - SAL_INFO( "sw.docappend", "CopyRange Out: " << CNTNT_DOC( this ) ); + SAL_INFO( "sw.docappend", "CopyRange Out: " << CNTNT_DOC( this ) ); #endif ++aIndexBefore; @@ -1204,16 +1204,16 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu } #ifdef DBG_UTIL - SAL_INFO( "sw.docappend", "Idx Del " << CNTNT_IDX( aDelIdx ) ); - SAL_INFO( "sw.docappend", "Idx Fix " << CNTNT_IDX( aFixupIdx ) ); + SAL_INFO( "sw.docappend", "Idx Del " << CNTNT_IDX( aDelIdx ) ); + SAL_INFO( "sw.docappend", "Idx Fix " << CNTNT_IDX( aFixupIdx ) ); #endif // just update the original instead of overwriting SwFormatPageDesc *aDesc = static_cast< SwFormatPageDesc* >( pNewItem.get() ); #ifdef DBG_UTIL -if ( aDesc->GetPageDesc() ) - SAL_INFO( "sw.docappend", "PD Update " << aDesc->GetPageDesc()->GetName() ); -else - SAL_INFO( "sw.docappend", "PD New" ); + if ( aDesc->GetPageDesc() ) + SAL_INFO( "sw.docappend", "PD Update " << aDesc->GetPageDesc()->GetName() ); + else + SAL_INFO( "sw.docappend", "PD New" ); #endif if ( nStartPageNumber ) aDesc->SetNumOffset( nStartPageNumber ); @@ -1225,7 +1225,7 @@ else pFormat->SetFormatAttr( *aDesc ); #ifdef DBG_UTIL - SAL_INFO( "sw.docappend", "Idx " << CNTNT_IDX( aDelIdx ) ); + SAL_INFO( "sw.docappend", "Idx " << CNTNT_IDX( aDelIdx ) ); #endif iDelNodes++; } @@ -1241,7 +1241,7 @@ else pTargetShell->SttEndDoc( false ); aDelIdx -= iDelNodes - 1; #ifdef DBG_UTIL - SAL_INFO( "sw.docappend", "iDelNodes: " << iDelNodes + SAL_INFO( "sw.docappend", "iDelNodes: " << iDelNodes << " Idx: " << aDelIdx.GetNode().GetIndex() << " EOE: " << GetNodes().GetEndOfExtras().GetIndex() ); #endif diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 2f2d879cbec8..f248472ecce2 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -509,7 +509,7 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam, SwOutlineNodes::difference_type pNd = aSttRg.GetNode().EndOfSectionNode(); if( pNd->GetIndex() >= aEndRg.GetIndex() ) break; - --aSttRg; + --aSttRg; } ++aSttRg; diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 6cd984599a04..7db3cadc81d5 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -181,7 +181,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry ) { // Point must be the startposition, Mark is optional the end position SwPosition* pPos = rPam.GetPoint(); - const SwTextNode* pTNd = pPos->nNode.GetNode().GetTextNode(); + const SwTextNode* pTNd = pPos->nNode.GetNode().GetTextNode(); OUString const& rText = pTNd->GetText(); sal_Int32 nStart = pPos->nContent.GetIndex(); sal_Int32 nEnd = rText.getLength(); diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 7d53274c94cf..e418d4ccbfb1 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -353,7 +353,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, if( !GetFootnoteIdxs().empty() && pAttr ) { sal_uInt16 nVal = pAttr->Get( RES_FTN_AT_TXTEND ).GetValue(); - if( ( FTNEND_ATTXTEND_OWNNUMSEQ == nVal || + if( ( FTNEND_ATTXTEND_OWNNUMSEQ == nVal || FTNEND_ATTXTEND_OWNNUMANDFMT == nVal ) || ( FTNEND_ATTXTEND_OWNNUMSEQ == ( nVal = pAttr->Get( RES_END_AT_TXTEND ).GetValue() ) || FTNEND_ATTXTEND_OWNNUMANDFMT == nVal )) diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 2a0f97fe71a2..81994cd4bae0 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2862,7 +2862,7 @@ void SwDoc::SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rO std::make_unique<SwUndoAttrTable>( *rTab.GetTableNode(), true )); } rTab.SetTabCols( rNew, rOld, pStart, bCurRowOnly ); - ::ClearFEShellTabCols(*this, nullptr); + ::ClearFEShellTabCols(*this, nullptr); SwClearFntCacheTextGlyphs(); getIDocumentState().SetModified(); } diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 1a37235190a9..6d2d83902c85 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -278,16 +278,16 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) pDestShell->GetCursor()->DeleteMark(); } #if OSL_DEBUG_LEVEL > 0 -// check if the indices are registered in the correct nodes -{ - for(SwPaM& rCmp : pDestShell->GetCursor()->GetRingContainer()) + // check if the indices are registered in the correct nodes { - OSL_ENSURE( rCmp.GetPoint()->nContent.GetIdxReg() - == rCmp.GetContentNode(), "Point in wrong Node" ); - OSL_ENSURE( rCmp.GetMark()->nContent.GetIdxReg() - == rCmp.GetContentNode(false), "Mark in wrong Node" ); + for(SwPaM& rCmp : pDestShell->GetCursor()->GetRingContainer()) + { + OSL_ENSURE( rCmp.GetPoint()->nContent.GetIdxReg() + == rCmp.GetContentNode(), "Point in wrong Node" ); + OSL_ENSURE( rCmp.GetMark()->nContent.GetIdxReg() + == rCmp.GetContentNode(false), "Mark in wrong Node" ); + } } -} #endif // close Undo container here diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 7dd875749d8f..2d4389b34722 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -815,7 +815,7 @@ void SwEditShell::SetNumberingRestart() if (nListLevel >= MAXLEVEL) nListLevel = MAXLEVEL - 1; - bIsNodeNum = pTextNd->GetNum()->GetNumber() == + bIsNodeNum = pTextNd->GetNum()->GetNumber() == pNumRule->Get( static_cast<sal_uInt16>(nListLevel) ).GetStart(); } if (bIsNodeNum) diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 030fc4223edf..d976285292ae 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -451,7 +451,7 @@ uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) return aHyphRet; const bool bAuto = IsAuto(); - uno::Reference< XHyphenatedWord > xHyphWord; + uno::Reference< XHyphenatedWord > xHyphWord; bool bGoOn = false; do { SwPaM *pCursor; @@ -884,13 +884,13 @@ void SwEditShell::HandleCorrectionError(const OUString& aText, SwPosition aPos, uno::Reference< XSpellAlternatives > SwEditShell::GetCorrection( const Point* pPt, SwRect& rSelectRect ) { - uno::Reference< XSpellAlternatives > xSpellAlt; + uno::Reference< XSpellAlternatives > xSpellAlt; if( IsTableMode() ) return nullptr; SwPaM* pCursor = GetCursor(); SwPosition aPos( *pCursor->GetPoint() ); - Point aPt( *pPt ); + Point aPt( *pPt ); SwCursorMoveState eTmpState( MV_SETONLYTEXT ); SwTextNode *pNode = nullptr; SwWrongList *pWrong = nullptr; diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 8ec298bcba51..9e6a1a731260 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -409,7 +409,7 @@ void SwEditShell::DoSpecialInsert() SwPosition aInsertPos( aInsertIndex ); // insert a new text node, and set the cursor - GetDoc()->getIDocumentContentOperations().AppendTextNode( aInsertPos ); + GetDoc()->getIDocumentContentOperations().AppendTextNode( aInsertPos ); *pCursorPos = aInsertPos; // call AttrChangeNotify for the UI diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 1b2504f15660..cb93ce2a9f43 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -494,7 +494,7 @@ OUString SwAuthorityField::ConditionalExpandAuthIdentifier( { sal_IntPtr & rnTempSequencePos(pLayout && pLayout->IsHideRedlines() ? m_nTempSequencePosRLHidden : m_nTempSequencePos); - if(!pAuthType->GetDoc()->getIDocumentFieldsAccess().IsExpFieldsLocked()) + if(!pAuthType->GetDoc()->getIDocumentFieldsAccess().IsExpFieldsLocked()) rnTempSequencePos = pAuthType->GetSequencePos(m_xAuthEntry.get(), pLayout); if (0 <= rnTempSequencePos) sRet += OUString::number(rnTempSequencePos); @@ -520,7 +520,7 @@ OUString SwAuthorityField::ExpandCitation(ToxAuthorityField eField, { sal_IntPtr & rnTempSequencePos(pLayout && pLayout->IsHideRedlines() ? m_nTempSequencePosRLHidden : m_nTempSequencePos); - if(!pAuthType->GetDoc()->getIDocumentFieldsAccess().IsExpFieldsLocked()) + if(!pAuthType->GetDoc()->getIDocumentFieldsAccess().IsExpFieldsLocked()) rnTempSequencePos = pAuthType->GetSequencePos(m_xAuthEntry.get(), pLayout); if (0 <= rnTempSequencePos) sRet += OUString::number(rnTempSequencePos); diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 1578d471d322..0cd8e57e9f5a 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -247,7 +247,7 @@ bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const break; case FIELD_PROP_SUBTYPE: { - text::PageNumberType eType; + text::PageNumberType eType; eType = text::PageNumberType_CURRENT; if(m_nSubType == PG_PREV) eType = text::PageNumberType_PREV; @@ -914,7 +914,7 @@ OUString SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat, uno::Reference < script::XTypeConverter > xConverter( script::Converter::create(comphelper::getProcessComponentContext()) ); uno::Any aNew; - aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING ); + aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING ); aNew >>= sVal; } catch (uno::Exception&) {} diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index d3787483c85b..87cd67994835 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -1176,7 +1176,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const case FIELD_PROP_SUBTYPE: { sal_Int16 nRet = 0; - nRet = lcl_SubTypeToAPI(GetSubType() & 0xff); + nRet = lcl_SubTypeToAPI(GetSubType() & 0xff); rAny <<= nRet; } break; diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 222feb56728e..d2137e355557 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -663,10 +663,10 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr ) lcl_formatReferenceLanguage(rText, false, GetLanguage(), m_sSetReferenceLanguage); } }; - // sw_redlinehide: currently only one of these layouts will exist, - // so the getLayoutFrame will use the same frame in both cases - func(m_sText, pLayout); - func(m_sTextRLHidden, pLayoutRLHidden); + // sw_redlinehide: currently only one of these layouts will exist, + // so the getLayoutFrame will use the same frame in both cases + func(m_sText, pLayout); + func(m_sTextRLHidden, pLayoutRLHidden); } break; @@ -689,8 +689,8 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr ) lcl_formatReferenceLanguage(rText, false, GetLanguage(), m_sSetReferenceLanguage); } }; - func(m_sText, pLayout); - func(m_sTextRLHidden, pLayoutRLHidden); + func(m_sText, pLayout); + func(m_sTextRLHidden, pLayoutRLHidden); } break; diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index b50b93f27a25..b08cbf4fb2fd 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -470,7 +470,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, // If there are table formulas in the area, then display the table first // so that the table formula can calculate a new value first // (individual boxes in the area are retrieved via the layout) - SwFieldType* pTableFieldTyp = pDestShell->GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::Table ); + SwFieldType* pTableFieldTyp = pDestShell->GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::Table ); if( IsFrameSelected() ) { diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 8729c84d8646..ec7f590123aa 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -406,8 +406,8 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos ) } else { - const SwFrame *pAnch = pFly->GetAnchorFrame(); - Point aOrient( pAnch->getFrameArea().Pos() ); + const SwFrame *pAnch = pFly->GetAnchorFrame(); + Point aOrient( pAnch->getFrameArea().Pos() ); if ( pFly->IsFlyInContentFrame() ) aOrient.setX(rAbsPos.getX()); @@ -892,12 +892,14 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrameFormat* pFormat = nullptr; SET_CURR_SHELL( this ); StartAllAction(); + { for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { pFormat = GetDoc()->getIDocumentContentOperations().InsertEmbObject( rPaM, xObj, pFlyAttrSet ); OSL_ENSURE(pFormat, "IDocumentContentOperations::InsertEmbObject failed."); } + } EndAllAction(); if( pFormat ) @@ -1301,7 +1303,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // SwWrtShell::CalcAndSetScale() if ( rRect.SSize() != pFly->getFramePrintArea().SSize() && !bSizeProt ) { - Size aSz( rRect.SSize() ); + Size aSz( rRect.SSize() ); //JP 28.02.2001: Task 74707 - ask for fly in fly with automatic size diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 126c95074b9e..368aab4f67f5 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2696,7 +2696,8 @@ void SwFEShell::SetObjAttr( const SfxItemSet& rSet ) SET_CURR_SHELL( this ); if ( !rSet.Count() ) - { OSL_ENSURE( false, "SetObjAttr, empty set." ); + { + OSL_ENSURE( false, "SetObjAttr, empty set." ); return; } diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx index a2ac38c150a6..2368fdbbea51 100644 --- a/sw/source/core/graphic/grfatr.cxx +++ b/sw/source/core/graphic/grfatr.cxx @@ -51,14 +51,14 @@ static bool lcl_IsHoriOnEvenPages(MirrorGraph nEnum, bool bToggle) { bool bEnum = nEnum == MirrorGraph::Vertical || nEnum == MirrorGraph::Both; - return bEnum != bToggle; + return bEnum != bToggle; } static bool lcl_IsHoriOnOddPages(MirrorGraph nEnum) { bool bEnum = nEnum == MirrorGraph::Vertical || nEnum == MirrorGraph::Both; - return bEnum; + return bEnum; } bool SwMirrorGrf::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 8e087c038b28..c944fb2178a1 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -157,7 +157,7 @@ static void lcl_DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat ) if( pShell ) { pShell->ParkCursor( aIdx ); - aIdx = nEnd-1; + aIdx = nEnd-1; } } ++aIdx; @@ -2375,7 +2375,7 @@ bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) case MID_GRID_STANDARD_MODE: { bool bStandard = *o3tl::doAccess<bool>(rVal); - SetSquaredMode( !bStandard ); + SetSquaredMode( !bStandard ); break; } default: diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 2f6c2b495dc5..3ed0dede61f5 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -341,11 +341,11 @@ const SwLayoutFrame *SwFrame::ImplGetNextLayoutLeaf( bool bFwd ) const } } - // If I could not go down or forward, I'll have to go up - bGoingUp = !bGoingFwdOrBwd && !bGoingDown; + // If I could not go down or forward, I'll have to go up + bGoingUp = !bGoingFwdOrBwd && !bGoingDown; - pFrame = p; - p = lcl_GetLower( pFrame, true ); + pFrame = p; + p = lcl_GetLower( pFrame, true ); } while( ( p && !p->IsFlowFrame() ) || pFrame == this || diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 0042265acc2b..39d369d1b38b 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -739,7 +739,7 @@ SwTabFrame* SwTabFrame::FindMaster( bool bFirstMaster ) const return pTab; } - pTab = aIter.Next(); + pTab = aIter.Next(); } OSL_FAIL( "Follow is lost in Space." ); diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 2bbbab22b2a5..7f5ac35034ef 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -572,7 +572,8 @@ void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling ) // If the predecessor is the master and/or the successor is the Follow, // then take their content and destroy them. if ( GetPrev() && GetPrev() == GetMaster() ) - { OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetPrev()->GetLower() ), + { + OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetPrev()->GetLower() ), "Footnote without content?" ); SwFlowFrame::CastFlowFrame( GetPrev()->GetLower())-> MoveSubTree( this, GetLower() ); @@ -581,7 +582,8 @@ void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling ) SwFrame::DestroyFrame(pDel); } if ( GetNext() && GetNext() == GetFollow() ) - { OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetNext()->GetLower() ), + { + OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetNext()->GetLower() ), "Footnote without content?" ); SwFlowFrame::CastFlowFrame( GetNext()->GetLower() )->MoveSubTree( this ); SwFrame *pDel = GetNext(); @@ -1130,8 +1132,8 @@ void SwFootnoteBossFrame::ResetFootnote( const SwFootnoteFrame *pCheck ) SwFrame* pFrame = aIter.First(); while( pFrame ) { - if( pFrame->getRootFrame() == pCheck->getRootFrame() ) - { + if( pFrame->getRootFrame() == pCheck->getRootFrame() ) + { SwFrame *pTmp = pFrame->GetUpper(); while ( pTmp && !pTmp->IsFootnoteFrame() ) pTmp = pTmp->GetUpper(); @@ -1255,7 +1257,8 @@ void SwFootnoteBossFrame::InsertFootnote( SwFootnoteFrame* pNew ) // index is after the index of the newly inserted, to place the new one correctly pSibling = static_cast<SwFootnoteFrame*>(pParent->Lower()); if ( !pSibling ) - { OSL_ENSURE( false, "Could not find space for footnote."); + { + OSL_ENSURE( false, "Could not find space for footnote."); return; } nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() ); @@ -1832,7 +1835,8 @@ void SwFootnoteBossFrame::CollectFootnotes_( const SwContentFrame* _pRef, } while( !pNxtFootnote && pBoss ); } else if( !pNxtFootnote->GetAttr()->GetFootnote().IsEndNote() ) - { OSL_ENSURE( !pNxtFootnote->GetMaster(), "_CollectFootnote: Master expected" ); + { + OSL_ENSURE( !pNxtFootnote->GetMaster(), "_CollectFootnote: Master expected" ); while ( pNxtFootnote->GetMaster() ) pNxtFootnote = pNxtFootnote->GetMaster(); } @@ -2045,7 +2049,8 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b } } else - { OSL_ENSURE( !pFootnote->GetMaster() && !pFootnote->GetFollow(), + { + OSL_ENSURE( !pFootnote->GetMaster() && !pFootnote->GetFollow(), "DelFootnote and Master/Follow?" ); SwFrame::DestroyFrame(pFootnote); // #i21478# diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index 4d0c56241183..7c44bc31b57d 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -269,7 +269,7 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) static_cast<SwTextFrame*>(pFrame)->IsJoinLocked(), "<SwHeadFootFrame::FormatSize(..)> - text frame invalid and not locked." ); - if ( pFrame->IsTextFrame() && pFrame->isFrameAreaDefinitionValid() ) + if ( pFrame->IsTextFrame() && pFrame->isFrameAreaDefinitionValid() ) { if ( !SwObjectFormatter::FormatObjsAtFrame( *pFrame, *(pFrame->FindPageFrame()) ) ) diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx index 27acb33779cb..dbb5757bbd1b 100644 --- a/sw/source/core/layout/layouter.cxx +++ b/sw/source/core/layout/layouter.cxx @@ -91,7 +91,8 @@ void SwEndnoter::CollectEndnote( SwFootnoteFrame* pFootnote ) } while ( pCnt ); } else - { OSL_ENSURE( pNxt->Lower() && pNxt->Lower()->IsSctFrame(), + { + OSL_ENSURE( pNxt->Lower() && pNxt->Lower()->IsSctFrame(), "Endnote without content?" ); pNxt->Cut(); SwFrame::DestroyFrame(pNxt); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 213ce01e7797..b3fc9e8843b3 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3340,9 +3340,10 @@ void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect cons if ( pFrame->IsRetouche() ) { if ( pFrame->IsRetoucheFrame() && bWin && !pFrame->GetNext() ) - { if ( !pPage ) + { + if ( !pPage ) pPage = FindPageFrame(); - pFrame->Retouch( pPage, rRect ); + pFrame->Retouch( pPage, rRect ); } pFrame->ResetRetouche(); } @@ -6281,7 +6282,7 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP // background transparency have to be considered // Set missing 5th parameter to the default value GRFNUM_NO // - see declaration in /core/inc/frmtool.hxx. - ::DrawGraphic( + ::DrawGraphic( pItem, pOut, aOrigBackRect, @@ -7387,7 +7388,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) ::SetOutDevAndWin( pSh, pOld, pWin, nZoom ); // #i92711# end Pre/PostPaint encapsulation when pOut is back and content is painted - pSh->DLPostPaint2(true); + pSh->DLPostPaint2(true); aMet.Stop(); aMet.Move( -pFly->getFrameArea().Left(), -pFly->getFrameArea().Top() ); diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 6cd503bce7e7..39bf62082c18 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -962,7 +962,7 @@ static SwFootnoteFrame* lcl_FindEndnote( SwSectionFrame* &rpSect, bool &rbEmpty, SwSectionFrame* pSect = rbEmpty ? rpSect->GetFollow() : rpSect; while( pSect ) { - OSL_ENSURE( (pSect->Lower() && pSect->Lower()->IsColumnFrame()) || pSect->GetUpper()->IsFootnoteFrame(), + OSL_ENSURE( (pSect->Lower() && pSect->Lower()->IsColumnFrame()) || pSect->GetUpper()->IsFootnoteFrame(), "InsertEndnotes: Where's my column?" ); // i73332: Columned section in endnote diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 3d0a64b4c92d..b662513534e3 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -3785,7 +3785,7 @@ long CalcHeightWithFlys( const SwFrame *pFrame ) if ( pMaster ) { - pObjs = static_cast<const SwTextFrame*>(pTmp)->FindMaster()->GetDrawObjs(); + pObjs = static_cast<const SwTextFrame*>(pTmp)->FindMaster()->GetDrawObjs(); bIsFollow = true; } } diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index fc7efacafae9..bc1951343c73 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -782,7 +782,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart, nX = nPrtLeft; else { - const long nPrtRight = bRTL ? + const long nPrtRight = bRTL ? aRectFnSet.GetPrtLeft(*pTable) : aRectFnSet.GetPrtRight(*pTable); if ( bRTL != (nX > nPrtRight) ) @@ -866,7 +866,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart, //The flow leads from one table to the next. The X-value //needs to be corrected by the amount of the offset of //the tables - if ( pTable && + if ( pTable && !pTab->GetUpper()->IsInTab() && !pTable->GetUpper()->IsInTab() ) nX += pTab->getFrameArea().Left() - pTable->getFrameArea().Left(); @@ -2581,8 +2581,8 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) else { SwNodeIndex idx( nodes.GetEndOfContent()); - if( SwContentNode* last = SwNodes::GoPrevious( &idx )) - inSelection = *pEndPos == SwPosition( *last, last->Len()); + if( SwContentNode* last = SwNodes::GoPrevious( &idx )) + inSelection = *pEndPos == SwPosition( *last, last->Len()); } } if( inSelection ) diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx index 389a2154cd24..ccc7f6744776 100644 --- a/sw/source/core/layout/virtoutp.cxx +++ b/sw/source/core/layout/virtoutp.cxx @@ -120,11 +120,11 @@ void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, bool bOn ) Flush(); #ifdef DBG_UTIL - if( pShell->GetViewOptions()->IsTest3() ) - { - ++nCount; - return; - } + if( pShell->GetViewOptions()->IsTest3() ) + { + ++nCount; + return; + } #endif bOn = bOn && !nCount && rRect.HasArea() && pShell->GetWin(); diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 07f6d7c496d7..6e1e2256d45e 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -265,7 +265,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() rAnchorFrame.SwitchHorizontalToVertical( aAnchorPos ); // #i44347# - keep last object rectangle at anchored object - OSL_ENSURE( dynamic_cast<const SwAnchoredDrawObject*>( &GetAnchoredObj() ) != nullptr, + OSL_ENSURE( dynamic_cast<const SwAnchoredDrawObject*>( &GetAnchoredObj() ) != nullptr, "<SwAsCharAnchoredObjectPosition::CalcPosition()> - wrong type of anchored object." ); SwAnchoredDrawObject& rAnchoredDrawObj = static_cast<SwAnchoredDrawObject&>( GetAnchoredObj() ); diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index ee11c90fc626..a41bcc7497b5 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -870,8 +870,8 @@ void SwOLEObj::SetNode( SwOLENode* pNode ) if (!p->GetEmbeddedObjectContainer().InsertEmbeddedObject( m_xOLERef.GetObject(), aObjName ) ) { OSL_FAIL( "InsertObject failed" ); - if ( xChild.is() ) - xChild->setParent( nullptr ); + if ( xChild.is() ) + xChild->setParent( nullptr ); } else m_xOLERef.AssignToContainer( &p->GetEmbeddedObjectContainer(), aObjName ); @@ -971,11 +971,11 @@ bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > const & xO return false; bool bRet = true; - sal_Int32 nState = xObj.is() ? xObj->getCurrentState() : embed::EmbedStates::LOADED; - bool bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING ); + sal_Int32 nState = xObj.is() ? xObj->getCurrentState() : embed::EmbedStates::LOADED; + bool bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING ); sal_Int64 nMiscStatus = xObj->getStatus( nAspect ); - if( nState != embed::EmbedStates::LOADED && !pDoc->IsInDtor() && !bIsActive && + if( nState != embed::EmbedStates::LOADED && !pDoc->IsInDtor() && !bIsActive && embed::EmbedMisc::MS_EMBED_ALWAYSRUN != ( nMiscStatus & embed::EmbedMisc::MS_EMBED_ALWAYSRUN ) && embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY != ( nMiscStatus & embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY ) ) { diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx index 8a26d2f0780c..a95b5100ec93 100644 --- a/sw/source/core/para/paratr.cxx +++ b/sw/source/core/para/paratr.cxx @@ -118,7 +118,7 @@ bool SwFormatDrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const case MID_DROPCAP_DISTANCE : rVal <<= static_cast<sal_Int16>(convertTwipToMm100(m_nDistance)); break; case MID_DROPCAP_FORMAT: { - style::DropCapFormat aDrop; + style::DropCapFormat aDrop; aDrop.Lines = m_nLines ; aDrop.Count = m_nChars ; aDrop.Distance = convertTwipToMm100(m_nDistance); diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index 91a9e385063e..1f59982bb6f2 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -359,10 +359,10 @@ ErrCode SwXMLTextBlocks::PutBlockText( const OUString& rShort, uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY ); xSet->setPropertyValue("MediaType", Any(OUString( "text/xml" )) ); uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream(); - uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY); - xSrc->setOutputStream(xOut); + uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY); + xSrc->setOutputStream(xOut); - uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter, + uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter, uno::UNO_QUERY); rtl::Reference<SwXMLTextBlockExport> xExp( new SwXMLTextBlockExport( xContext, *this, GetXMLToken ( XML_UNFORMATTED_TEXT ), xHandler) ); diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index d04f2b053205..e093c6c5badc 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -350,7 +350,7 @@ void SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l ) { // Set the new entry in the list before we do that! aNew = GetAppCharClass().uppercase( aNew ); - nErr = pImp->Rename( n, aNew, aLong ); + nErr = pImp->Rename( n, aNew, aLong ); if( !nErr ) { bool bOnlyText = pImp->m_aNames[ n ]->bIsOnlyText; diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 290c69867b47..94cdbf02368c 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1848,7 +1848,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if( pFirst->GetTextField() && pFirst->IsFieldInDoc() ) { const SwTextNode* pTNd = pFirst->GetTextField()->GetpTextNode(); - OSL_ENSURE( nullptr != pTNd, "Enhanced pdf export - text node is missing" ); + OSL_ENSURE( nullptr != pTNd, "Enhanced pdf export - text node is missing" ); // 1. Check if the whole paragraph is hidden // 2. Move to the field diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index ecae4e4a8385..9130208cc7c2 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -165,11 +165,11 @@ const SfxPoolItem* GetItem( const SwTextAttr& rAttr, sal_uInt16 nWhich ) const SfxItemSet* pSet = CharFormat::GetItemSet( rAttr.GetAttr() ); if ( !pSet ) return nullptr; - bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which(); - const SfxPoolItem* pItem; - bool bRet = SfxItemState::SET == pSet->GetItemState( nWhich, bInParent, &pItem ); + bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which(); + const SfxPoolItem* pItem; + bool bRet = SfxItemState::SET == pSet->GetItemState( nWhich, bInParent, &pItem ); - return bRet ? pItem : nullptr; + return bRet ? pItem : nullptr; } return ( nWhich == rAttr.Which() ) ? &rAttr.GetAttr() : nullptr; diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 3217fa2fab8e..da5ce0f8e036 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -934,7 +934,7 @@ bool SwTextFrame::CalcPreps() const SwCharRange aFollowRg(GetFollow()->GetOfst(), TextFrameIndex(1)); pPara->GetReformat() += aFollowRg; // We should continue! - bRet = false; + bRet = false; } } } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index aeac33ab9da0..ccfe63c147ca 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -83,8 +83,10 @@ public: SwFont* GetFont() const { return m_pFnt.get(); } void IncLineNr() { ++m_nLineNr; } bool HasNumber() { return !( m_nLineNr % m_rLineInf.GetCountBy() ); } - bool HasDivider() { if( !m_nDivider ) return false; - return !(m_nLineNr % m_rLineInf.GetDividerCountBy()); } + bool HasDivider() { + if( !m_nDivider ) return false; + return !(m_nLineNr % m_rLineInf.GetDividerCountBy()); + } void PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed ); void PaintRedline( SwTwips nY, long nMax ); diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index 880773f4e69b..14517379fc9a 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -227,8 +227,8 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwT nSpaceAdd = nGluePortionWidth / sal_Int32(nGluePortion); bAddSpaceChanged = true; - } - if( nKashidasDropped ) + } + if( nKashidasDropped ) rSI.MarkKashidasInvalid( nKashidasDropped, nIdx, nNext - nIdx ); } if ( bAddSpaceChanged ) @@ -642,9 +642,9 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent ) } nLen = nLen + pPos->GetLen(); pPos = pPos->GetNextPortion(); - } + } - if( ! bTabCompat && ! bMultiTab && SvxAdjust::Right == GetAdjust() ) + if( ! bTabCompat && ! bMultiTab && SvxAdjust::Right == GetAdjust() ) // portions are moved to the right if possible pLeft->AdjustRight( pCurrent ); } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index be10f475fe06..1512d2991a32 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1126,19 +1126,19 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) } } - // 10. Decimal tab portion at the beginning of each line in table cells - if ( !pPor && !m_pCurr->GetNextPortion() && + // 10. Decimal tab portion at the beginning of each line in table cells + if ( !pPor && !m_pCurr->GetNextPortion() && GetTextFrame()->IsInTab() && GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::TAB_COMPAT)) - { - pPor = NewTabPortion( rInf, true ); - } + { + pPor = NewTabPortion( rInf, true ); + } - // 11. suffix of meta-field - if (!pPor) - { - pPor = TryNewNoLengthPortion(rInf); - } + // 11. suffix of meta-field + if (!pPor) + { + pPor = TryNewNoLengthPortion(rInf); + } return pPor; } diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index dcbea78f30e2..7f863a0bbfb0 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -169,8 +169,8 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, { if( pPorIter->InTabGrp() ) { - const SwTabPortion* pTabPor = static_cast<SwTabPortion*>(pPorIter); - const SwTwips nTabPos = nTmpLeft + pTabPor->GetTabPos(); + const SwTabPortion* pTabPor = static_cast<SwTabPortion*>(pPorIter); + const SwTwips nTabPos = nTmpLeft + pTabPor->GetTabPos(); if( nMaxRight < nTabPos ) { nMaxRight = rPaint.Right(); diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 26ecefa20d5b..011490cc3568 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -1270,7 +1270,7 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode, if ( !isTransparentChar ( cCh) ) cPrevCh = cCh; - ++nIdx; + ++nIdx; } // end of current word if ( -1 != nKashidaPos ) diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx index 4dc4b671e966..e34ff7333d40 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -156,7 +156,8 @@ void SwLinePortion::Truncate_() { SwLinePortion *pPos = mpNextPortion; do - { OSL_ENSURE( pPos != this, "SwLinePortion::Truncate: loop" ); + { + OSL_ENSURE( pPos != this, "SwLinePortion::Truncate: loop" ); SwLinePortion *pLast = pPos; pPos = pPos->GetNextPortion(); pLast->SetNextPortion( nullptr ); diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index af73cf028aad..f456084f673c 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -2164,7 +2164,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, m_pCurr = pOldCurr; m_nStart = nOldStart; - SetPropFont( 0 ); + SetPropFont( 0 ); rMulti.SetLen( rMulti.GetRoot().GetLen() + ( rMulti.GetRoot().GetNext() ? rMulti.GetRoot().GetNext()->GetLen() : TextFrameIndex(0) ) ); diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 1f70727abd51..8ea644532112 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -123,7 +123,7 @@ SwKernPortion::SwKernPortion( SwLinePortion &rPortion, short nKrn, SetWhichPor( PortionType::Kern ); if( nKern > 0 ) Width( nKern ); - rPortion.Insert( this ); + rPortion.Insert( this ); } SwKernPortion::SwKernPortion( const SwLinePortion& rPortion ) : diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index e40d66855612..a6535c853e59 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -409,7 +409,7 @@ bool SwTextFly::IsAnyFrame() const bool SwTextFly::IsAnyObj( const SwRect &rRect ) const { - OSL_ENSURE( bOn, "SwTextFly::IsAnyObj: Who's knocking?" ); + OSL_ENSURE( bOn, "SwTextFly::IsAnyObj: Who's knocking?" ); SwRect aRect( rRect ); if ( aRect.IsEmpty() ) diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index c9bc349b06d0..e9e7046e66fd 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -629,8 +629,8 @@ void SwTextFrame::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDea if( !pSrcFrame ) { SwFootnoteFrame *pNew = new SwFootnoteFrame(pDoc->GetDfltFrameFormat(),this,this,pFootnote); - SwNodeIndex aIdx( *pFootnote->GetStartNode(), 1 ); - ::InsertCnt_( pNew, pDoc, aIdx.GetIndex() ); + SwNodeIndex aIdx( *pFootnote->GetStartNode(), 1 ); + ::InsertCnt_( pNew, pDoc, aIdx.GetIndex() ); pDoc->getIDocumentLayoutAccess().GetLayouter()->CollectEndnote( pNew ); } else if( pSrcFrame != this ) diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx index 07349b199dab..38f095cd1996 100644 --- a/sw/source/core/txtnode/SwGrammarContact.cxx +++ b/sw/source/core/txtnode/SwGrammarContact.cxx @@ -122,7 +122,7 @@ SwGrammarMarkUp* SwGrammarContact::getGrammarCheck( SwTextNode& rTextNode, bool mpProxyList->SetInvalid( 0, COMPLETE_STRING ); } } - mbFinished = false; + mbFinished = false; } pRet = mpProxyList.get(); } diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 3550c1d1ddea..73f6fb4b78ca 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -541,7 +541,7 @@ SwFormatMeta::SwFormatMeta( std::shared_ptr< ::sw::Meta > const & i_pMeta, , m_pMeta( i_pMeta ) , m_pTextAttr( nullptr ) { - OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich), + OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich), "ERROR: SwFormatMeta: invalid which id!"); OSL_ENSURE(m_pMeta, "SwFormatMeta: no Meta ?"); // DO NOT call m_pMeta->SetFormatMeta(this) here; only from SetTextAttr! diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 953d47106094..8cdcf5478392 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -628,8 +628,10 @@ void SwFntObj::GuessLeading( const SwViewShell& pWin->SetMapMode( aOldMap ); } else -#endif m_nGuessedLeading = 0; +#else + m_nGuessedLeading = 0; +#endif } // Set the font at the given output device; for screens it may be diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 115171009dea..785aac960606 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2717,7 +2717,7 @@ void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount, continue; } - assert(!( (nHintStart < nEndIdx) && (*pHtEndIdx > nEndIdx) + assert(!( (nHintStart < nEndIdx) && (*pHtEndIdx > nEndIdx) && pHt->HasDummyChar() ) // next line: deleting exactly dummy char: DeleteAttributes || ((nHintStart == nStartIdx) && (nHintStart + 1 == nEndIdx))); @@ -3714,7 +3714,7 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, SwTextAttr *const pHint = GetTextAttrForCharAt( nPos ); if (pHint) { - assert(!( pHint->GetEnd() && pHint->HasDummyChar() + assert(!( pHint->GetEnd() && pHint->HasDummyChar() && (pHint->GetStart() < nEndPos) && (*pHint->GetEnd() > nEndPos) )); // "deleting left-overlapped attribute with CH_TXTATR" diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 2fe6bf53c462..a30ee18233b3 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -545,7 +545,7 @@ SwpHints::TryInsertNesting( SwTextNode & rNode, SwTextAttrNesting & rNewHint ) } else { - assert((nOtherStart < nNewStart) || (nNewEnd < nOtherEnd)); + assert((nOtherStart < nNewStart) || (nNewEnd < nOtherEnd)); // scenario: there is a RUBY, and contained within that a META; // now a RUBY is inserted within the META => the existing RUBY is split: // here it is not possible to simply insert the left/right fragment @@ -930,7 +930,7 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint, { Insert( pNewAttr ); // if ( bDestroyHint ) - NoteInHistory( pNewAttr, true ); + NoteInHistory( pNewAttr, true ); } if ( !bNoLengthAttribute ) @@ -1455,7 +1455,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) } break; - case RES_TXTATR_FIELD: + case RES_TXTATR_FIELD: { // trigger notification for relevant fields, like HiddenParaFields if (FieldCanHideParaWeight( diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 0ae45509fed4..c19b6cf0242d 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -215,7 +215,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext) OUString aTmpStr(aDelStr[n]); OUString const ins( pTextNd->InsertText(aTmpStr, rIdx) ); assert(ins.getLength() == 1); // cannot fail - (void) ins; + (void) ins; rIdx -= 2; pTextNd->EraseText( rIdx, 1 ); rIdx += 2; diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 626088d63ca9..1b5dc8e359cf 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -87,8 +87,8 @@ SwUndoInsSection::SwUndoInsSection( rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() )); SetRedlineFlags( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() ); } - m_pRedlineSaveData.reset( new SwRedlineSaveDatas ); - if( !FillSaveData( rPam, *m_pRedlineSaveData, false )) + m_pRedlineSaveData.reset( new SwRedlineSaveDatas ); + if( !FillSaveData( rPam, *m_pRedlineSaveData, false )) m_pRedlineSaveData.reset( nullptr ); if( !rPam.HasMark() ) diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index c96c5918ef33..2335150d7eac 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1936,7 +1936,7 @@ void SwUndoTableMerge::UndoImpl(::sw::UndoRedoContext & rContext) SwTableBox *pBox, *pCpyBox = pTableNd->GetTable().GetTabSortBoxes()[0]; SwTableBoxes& rLnBoxes = pCpyBox->GetUpper()->GetTabBoxes(); -CHECKTABLE(pTableNd->GetTable()) + CHECKTABLE(pTableNd->GetTable()) SwSelBoxes aSelBoxes; SwTextFormatColl* pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD ); @@ -1953,7 +1953,7 @@ CHECKTABLE(pTableNd->GetTable()) aSelBoxes.insert( pBox ); } -CHECKTABLE(pTableNd->GetTable()) + CHECKTABLE(pTableNd->GetTable()) SwChartDataProvider *pPCD = rDoc.getIDocumentChartDataProviderAccess().GetChartDataProvider(); // 2. deleted the inserted boxes @@ -2035,7 +2035,7 @@ CHECKTABLE(pTableNd->GetTable()) rDoc.getIDocumentContentOperations().DeleteSection( rDoc.GetNodes()[ nIdx ] ); } } -CHECKTABLE(pTableNd->GetTable()) + CHECKTABLE(pTableNd->GetTable()) pSaveTable->CreateNew( pTableNd->GetTable(), true, false ); @@ -2054,7 +2054,7 @@ CHECKTABLE(pTableNd->GetTable()) pPam->SetMark(); pPam->DeleteMark(); -CHECKTABLE(pTableNd->GetTable()) + CHECKTABLE(pTableNd->GetTable()) ClearFEShellTabCols(rDoc, nullptr); } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 7a4432c285ff..cca92c4c458e 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -578,14 +578,14 @@ SwXServiceProvider::MakeInstance(SwServiceType nObjectType, SwDoc & rDoc) case SwServiceType::VbaProjectNameProvider : #if HAVE_FEATURE_SCRIPTING { - uno::Reference< container::XNameContainer > xProjProv = rDoc.GetVBATemplateToProjectCache(); - if (!xProjProv.is() && rDoc.GetDocShell() + uno::Reference< container::XNameContainer > xProjProv = rDoc.GetVBATemplateToProjectCache(); + if (!xProjProv.is() && rDoc.GetDocShell() && ooo::vba::isAlienWordDoc(*rDoc.GetDocShell())) - { - xProjProv = new SwVbaProjectNameProvider; - rDoc.SetVBATemplateToProjectCache(xProjProv); - } - xRet = xProjProv; + { + xProjProv = new SwVbaProjectNameProvider; + rDoc.SetVBATemplateToProjectCache(xProjProv); + } + xRet = xProjProv; } #endif break; diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index bfe1e1d86f64..1e9f868f1fb1 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1106,7 +1106,7 @@ bool DocInsertStringSplitCR( { bool bOK = true; - const SwInsertFlags nInsertFlags = + const SwInsertFlags nInsertFlags = bForceExpandHints ? ( SwInsertFlags::FORCEHINTEXPAND | SwInsertFlags::EMPTYEXPAND) : SwInsertFlags::EMPTYEXPAND; diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 03c556a5422c..f5100e240f50 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2224,10 +2224,10 @@ awt::Point SAL_CALL SwXShape::getPosition() // #i53320# - relative position of group member and // top group object is always given in horizontal left-to-right layout. awt::Point aOffset( 0, 0 ); - { - aOffset.X = ( aMemberObjRect.Left() - aGroupObjRect.Left() ); - aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() ); - } + { + aOffset.X = ( aMemberObjRect.Left() - aGroupObjRect.Left() ); + aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() ); + } aOffset.X = convertTwipToMm100(aOffset.X); aOffset.Y = convertTwipToMm100(aOffset.Y); aPos.X += aOffset.X; diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 064da6df7ebc..17421871019a 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1893,7 +1893,7 @@ void SAL_CALL SwXTextField::attach( m_pImpl->m_pProps->sPar2, nType, m_pImpl->m_pProps->nFormat)); - static_cast<SwTableField*>(xField.get())->ChgExpStr(m_pImpl->m_pProps->sPar1); + static_cast<SwTableField*>(xField.get())->ChgExpStr(m_pImpl->m_pProps->sPar1); } break; default: OSL_FAIL("What kind of type is that?"); @@ -2226,7 +2226,7 @@ SwXTextField::setPropertyValue( case FIELD_PROP_USHORT1: case FIELD_PROP_USHORT2: { - sal_Int16 nVal = 0; + sal_Int16 nVal = 0; rValue >>= nVal; if( FIELD_PROP_USHORT1 == pEntry->nWID) m_pImpl->m_pProps->nUSHORT1 = nVal; diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 02845dc8dd1c..b05453370191 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1006,13 +1006,13 @@ bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItem { rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *pStyle ) ); const ::SfxItemSet *pItemSet = &xStyle->GetItemSet(); - bRet = FillBaseProperties( rSet, *pItemSet, rSizeFound ); + bRet = FillBaseProperties( rSet, *pItemSet, rSizeFound ); lcl_FillCol ( rSet, *pItemSet, pColumns ); } else { const ::SfxItemSet *pItemSet = &pDoc->getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_FRAME )->GetAttrSet(); - bRet = FillBaseProperties( rSet, *pItemSet, rSizeFound ); + bRet = FillBaseProperties( rSet, *pItemSet, rSizeFound ); lcl_FillCol ( rSet, *pItemSet, pColumns ); } const ::uno::Any* pEdit; @@ -1994,7 +1994,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) if(FN_UNO_ANCHOR_TYPES == pEntry->nWID) { uno::Sequence<text::TextContentAnchorType> aTypes(5); - text::TextContentAnchorType* pArray = aTypes.getArray(); + text::TextContentAnchorType* pArray = aTypes.getArray(); pArray[0] = text::TextContentAnchorType_AT_PARAGRAPH; pArray[1] = text::TextContentAnchorType_AS_CHARACTER; pArray[2] = text::TextContentAnchorType_AT_PAGE; @@ -2077,7 +2077,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) { OUString sFltName; SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), nullptr, &sFltName ); - aAny <<= sFltName; + aAny <<= sFltName; } else if( FN_UNO_GRAPHIC_URL == pEntry->nWID ) { diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index fca31f8ce66c..703be071d4b7 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -1191,7 +1191,7 @@ static void lcl_ExportAnnotationStarts( SwXTextPortion* pPortion = new SwXTextPortion( pUnoCursor, xParent, PORTION_ANNOTATION ); - pPortion->SetTextField( pPtr->mxAnnotationField ); + pPortion->SetTextField( pPtr->mxAnnotationField ); rPortions.emplace_back(pPortion); aIter = rAnnotationStartArr.erase(aIter); diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 942829b0944d..216bfd1f2916 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1422,7 +1422,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat //BulletFont if(pFont) { - awt::FontDescriptor aDesc; + awt::FontDescriptor aDesc; SvxUnoFontDescriptor::ConvertFromFont( *pFont, aDesc ); aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_BULLET_FONT, aDesc)); } @@ -2369,7 +2369,7 @@ void SwXTextColumns::setColumnCount(sal_Int16 nColumns) throw uno::RuntimeException(); m_bIsAutomaticWidth = true; m_aTextColumns.realloc(nColumns); - TextColumn* pCols = m_aTextColumns.getArray(); + TextColumn* pCols = m_aTextColumns.getArray(); m_nReference = USHRT_MAX; sal_Int32 nWidth = m_nReference / nColumns; sal_Int32 nDiff = m_nReference - nWidth * nColumns; diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index cea9fcff9b7e..dd409f7529ca 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1371,7 +1371,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno: { sal_Int32 nHeight = 0; aValue >>= nHeight; - Size aSz(aFrameSize.GetSize()); + Size aSz(aFrameSize.GetSize()); aSz.setHeight( convertMm100ToTwip(nHeight) ); aFrameSize.SetSize(aSz); } diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index bb6d8f770ee1..38bb11c72da6 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -304,7 +304,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum, return false; bool bWinSizeValid = _rPxWinSize.Width() != 0 && _rPxWinSize.Height() != 0; - OSL_ENSURE( bWinSizeValid, "no window size - no prepare of preview paint"); + OSL_ENSURE( bWinSizeValid, "no window size - no prepare of preview paint"); if ( !bWinSizeValid ) return false; diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 7379d879b6c2..7e0022f53c2b 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -69,7 +69,7 @@ void SwViewShellImp::Init( const SwViewOption *pNewOpt ) const Size aFSize ( rSz.Width() ? rSz.Width() /std::max(short(1),pNewOpt->GetDivisionX()):0, rSz.Height()? rSz.Height()/std::max(short(1),pNewOpt->GetDivisionY()):0); - m_pDrawView->SetGridFine( aFSize ); + m_pDrawView->SetGridFine( aFSize ); Fraction aSnGrWdtX(rSz.Width(), pNewOpt->GetDivisionX() + 1); Fraction aSnGrWdtY(rSz.Height(), pNewOpt->GetDivisionY() + 1); m_pDrawView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY ); diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 96fd2a7308fe..bab2ea90b4f3 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2247,8 +2247,8 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt ) Fraction aSnGrWdtY(rSz.Height(), rOpt.GetDivisionY() + 1); pDView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY ); - // set handle size to 9 pixels, always - pDView->SetMarkHdlSizePixel(9); + // set handle size to 9 pixels, always + pDView->SetMarkHdlSizePixel(9); } bool bOnlineSpellChgd = mpOpt->IsOnlineSpell() != rOpt.IsOnlineSpell(); diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index 5b386da0da16..5f967ea514fd 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -49,7 +49,7 @@ void SwViewShell::Init( const SwViewOption *pNewOpt ) // We play it safe: Remove old font information whenever the printer // resolution or the zoom factor changes. For that, Init() and Reformat() // are the most secure places. - pFntCache->Flush( ); + pFntCache->Flush( ); // ViewOptions are created dynamically |