diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/fields/expfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/porfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/fmtatr2.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/txatritr.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/unmove.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoidx.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unosect.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/unosett.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/view/pagepreviewlayout.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/AnnotationWin2.cxx | 2 |
19 files changed, 32 insertions, 32 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 8d36a0e9e6f7..af7a56200564 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2130,7 +2130,7 @@ void SwCursorShell::Push() // fdo#60513: if we have a table cursor, copy that; else copy current. // This seems to work because UpdateCursor() will fix this up on Pop(), // then MakeBoxSels() will re-create the current m_pCurrentCursor cell ring. - SwShellCursor *const pCurrent((m_pTableCursor) ? m_pTableCursor : m_pCurrentCursor); + SwShellCursor *const pCurrent(m_pTableCursor ? m_pTableCursor : m_pCurrentCursor); m_pStackCursor = new SwShellCursor( *this, *pCurrent->GetPoint(), pCurrent->GetPtPos(), m_pStackCursor ); @@ -2935,7 +2935,7 @@ size_t SwCursorShell::UpdateTableSelBoxes() { GetLayout()->MakeTableCursors( *m_pTableCursor ); } - return (m_pTableCursor) ? m_pTableCursor->GetSelectedBoxesCount() : 0; + return m_pTableCursor ? m_pTableCursor->GetSelectedBoxesCount() : 0; } /// show the current selected "object" diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 87cd67994835..228f4cb762ad 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -855,7 +855,7 @@ OUString SwSetExpField::GetFieldName() const { SwFieldTypesEnum const nStrType( (IsSequenceField()) ? TYP_SEQFLD - : (mbInput) + : mbInput ? TYP_SETINPFLD : TYP_SETFLD ); diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 1a9ad99b908c..e2a482e870dc 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -359,7 +359,7 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) // The char is held in the first position // Unconditionally after format! - SetLen( (m_bNoLength) ? TextFrameIndex(0) : nFollow ); + SetLen( m_bNoLength ? TextFrameIndex(0) : nFollow ); if( nRest ) { diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 73f6fb4b78ca..c909871b4dba 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -647,7 +647,7 @@ Meta::~Meta() SwTextMeta * Meta::GetTextAttr() const { - return (m_pFormat) ? m_pFormat->GetTextAttr() : nullptr; + return m_pFormat ? m_pFormat->GetTextAttr() : nullptr; } diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx index f8cbb075b8ad..3fd45de385ff 100644 --- a/sw/source/core/txtnode/txatritr.cxx +++ b/sw/source/core/txtnode/txatritr.cxx @@ -57,7 +57,7 @@ SwScriptIterator::SwScriptIterator( } } - m_nChgPos = (bForward) + m_nChgPos = bForward ? g_pBreakIt->GetBreakIter()->endOfScript( m_rText, nStt, nCurScript) : g_pBreakIt->GetBreakIter()->beginOfScript( diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 812bc5763fb2..f7c307c4c18f 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -2294,7 +2294,7 @@ void SwTextNode::SetWrongDirty(WrongState eNew) const auto SwTextNode::GetWrongDirty() const -> WrongState { - return (m_pParaIdleData_Impl) ? m_pParaIdleData_Impl->eWrongDirty : WrongState::DONE; + return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->eWrongDirty : WrongState::DONE; } bool SwTextNode::IsWrongDirty() const diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index cc762dd3e31f..a8f99653961a 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -224,7 +224,7 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext) static_cast<SwTextNode*>(pCNd)->ClearSwpHintsArr( false ); // first delete all attributes at InsertPos - const bool bSuccess = pDoc->getIDocumentContentOperations().MoveRange( aPam, aPos, (m_bMoveRedlines) + const bool bSuccess = pDoc->getIDocumentContentOperations().MoveRange( aPam, aPos, m_bMoveRedlines ? SwMoveFlags::REDLINES : SwMoveFlags::DEFAULT ); if (!bSuccess) @@ -288,7 +288,7 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext) { // only a move with SwRange SwNodeRange aRg( rNds, nSttNode, rNds, nEndNode ); - rDoc.getIDocumentContentOperations().MoveNodeRange( aRg, aIdx, (m_bMoveRedlines) + rDoc.getIDocumentContentOperations().MoveNodeRange( aRg, aIdx, m_bMoveRedlines ? SwMoveFlags::REDLINES : SwMoveFlags::DEFAULT ); } diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index de2b67a7da37..445142d6af86 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -337,7 +337,7 @@ public: , m_eTOXType(eType) , m_bIsDescriptor(nullptr == pBaseSection) , m_pDoc(&rDoc) - , m_pProps((m_bIsDescriptor) + , m_pProps(m_bIsDescriptor ? new SwDocIndexDescriptorProperties_Impl(rDoc.GetTOXType(eType, 0)) : nullptr) { @@ -351,7 +351,7 @@ public: SwTOXBase & GetTOXSectionOrThrow() const { SwSectionFormat *const pSectionFormat(GetSectionFormat()); - SwTOXBase *const pTOXSection( (m_bIsDescriptor) + SwTOXBase *const pTOXSection( m_bIsDescriptor ? &m_pProps->GetTOXBase() : (pSectionFormat ? static_cast<SwTOXBaseSection*>(pSectionFormat->GetSection()) @@ -367,7 +367,7 @@ public: sal_Int32 GetFormMax() const { SwTOXBase & rSection( GetTOXSectionOrThrow() ); - return (m_bIsDescriptor) + return m_bIsDescriptor ? SwForm::GetFormMaxLevel(m_eTOXType) : rSection.GetTOXForm().GetFormMax(); } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index d6d0a25d9bb2..c98db9a1aaff 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -668,7 +668,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() SwPosition* pStart = rUnoCursor.Start(); const sal_Int32 nFirstContent = - (m_bFirstParagraph) ? m_nFirstParaStart : -1; + m_bFirstParagraph ? m_nFirstParaStart : -1; const sal_Int32 nLastContent = (m_nEndIndex == pStart->nNode.GetIndex()) ? m_nLastParaEnd : -1; diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 47380a275dd9..2a2869a1717c 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -972,7 +972,7 @@ SwXTextSection::Impl::GetPropertyValues_Impl( { case WID_SECT_CONDITION: { - const OUString uTmp( (m_bIsDescriptor) + const OUString uTmp( m_bIsDescriptor ? m_pProps->m_sCondition : pSect->GetCondition()); pRet[nProperty] <<= uTmp; @@ -1049,28 +1049,28 @@ SwXTextSection::Impl::GetPropertyValues_Impl( break; case WID_SECT_VISIBLE : { - const bool bTemp = (m_bIsDescriptor) + const bool bTemp = m_bIsDescriptor ? !m_pProps->m_bHidden : !pSect->IsHidden(); pRet[nProperty] <<= bTemp; } break; case WID_SECT_CURRENTLY_VISIBLE: { - const bool bTemp = (m_bIsDescriptor) + const bool bTemp = m_bIsDescriptor ? !m_pProps->m_bCondHidden : !pSect->IsCondHidden(); pRet[nProperty] <<= bTemp; } break; case WID_SECT_PROTECTED: { - const bool bTemp = (m_bIsDescriptor) + const bool bTemp = m_bIsDescriptor ? m_pProps->m_bProtect : pSect->IsProtect(); pRet[nProperty] <<= bTemp; } break; case WID_SECT_EDIT_IN_READONLY: { - const bool bTemp = (m_bIsDescriptor) + const bool bTemp = m_bIsDescriptor ? m_pProps->m_bEditInReadonly : pSect->IsEditInReadonly(); pRet[nProperty] <<= bTemp; } @@ -1151,7 +1151,7 @@ SwXTextSection::Impl::GetPropertyValues_Impl( break; case WID_SECT_PASSWORD: { - pRet[nProperty] <<= (m_bIsDescriptor) + pRet[nProperty] <<= m_bIsDescriptor ? m_pProps->m_Password : pSect->GetPassword(); } break; diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 2dffb00e7492..08e2787b4f9e 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1302,7 +1302,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex( SwStyleNameMapper::FillProgName(sValue, aUString, SwGetPoolIdFromName::TxtColl); } - return GetPropertiesForNumFormat(rFormat, CharStyleName, (m_pDocShell) ? & aUString : nullptr); + return GetPropertiesForNumFormat(rFormat, CharStyleName, m_pDocShell ? & aUString : nullptr); } diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 38bb11c72da6..3a3ba81eb601 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -597,7 +597,7 @@ void SwPagePreviewLayout::CalcPreviewPages() /// check whether RTL interface or not if(!AllSettings::GetLayoutRTL()) aCurrPaintOffset.AdjustX(mnColWidth ); - else aCurrPaintOffset.AdjustX( -(mnColWidth) ); + else aCurrPaintOffset.AdjustX( -mnColWidth ); ++nCurrCol; continue; } @@ -623,7 +623,7 @@ void SwPagePreviewLayout::CalcPreviewPages() /// check whether RTL interface or not if(!AllSettings::GetLayoutRTL()) aCurrPaintOffset.AdjustX(mnColWidth ); - else aCurrPaintOffset.AdjustX( -(mnColWidth) ); + else aCurrPaintOffset.AdjustX( -mnColWidth ); ++nCurrCol; if ( nCurrCol > mnCols ) { diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 054e7aed7f91..c036df0955a8 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -4576,14 +4576,14 @@ void WW8RStyle::Import() rtl_TextEncoding SwWW8StyInf::GetCharSet() const { - if ((m_pFormat) && (m_pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Horizontal_RL_TB)) + if (m_pFormat && (m_pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Horizontal_RL_TB)) return m_eRTLFontSrcCharSet; return m_eLTRFontSrcCharSet; } rtl_TextEncoding SwWW8StyInf::GetCJKCharSet() const { - if ((m_pFormat) && (m_pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Horizontal_RL_TB)) + if (m_pFormat && (m_pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Horizontal_RL_TB)) return m_eRTLFontSrcCharSet; return m_eCJKFontSrcCharSet; } diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 1b747d1c5b95..c2708708bd41 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -969,7 +969,7 @@ void WW8PLCFx_PCDAttrs::advance() WW8_CP WW8PLCFx_PCDAttrs::Where() { - return ( pPcd ) ? pPcd->Where() : WW8_CP_MAX; + return pPcd ? pPcd->Where() : WW8_CP_MAX; } void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p) @@ -4286,7 +4286,7 @@ void WW8PLCFx_Book::SetIdx(sal_uInt32 nI) sal_uInt32 WW8PLCFx_Book::GetIdx2() const { - return nIMax ? ( pBook[1]->GetIdx() | ( ( nIsEnd ) ? 0x80000000 : 0 ) ) : 0; + return nIMax ? ( pBook[1]->GetIdx() | ( nIsEnd ? 0x80000000 : 0 ) ) : 0; } void WW8PLCFx_Book::SetIdx2(sal_uInt32 nI) @@ -4363,7 +4363,7 @@ void WW8PLCFx_Book::advance() if (nPairFor == pBook[1]->GetIdx()) nIsEnd = 0; else - nIsEnd = ( nIsEnd ) ? 0 : 1; + nIsEnd = nIsEnd ? 0 : 1; } } } diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index b0ba35346da4..3a109542791a 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -774,7 +774,7 @@ public: virtual void advance() override; const OUString* GetName() const; WW8_CP GetStartPos() const - { return ( nIsEnd ) ? WW8_CP_MAX : pBook[0]->Where(); } + { return nIsEnd ? WW8_CP_MAX : pBook[0]->Where(); } long GetLen() const; bool GetIsEnd() const { return nIsEnd != 0; } long GetHandle() const; diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 885abd80a5e5..2ea89d1cfe64 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -222,7 +222,7 @@ public: bool IsCovered() const { return mbCovered; } bool HasStringValue() const { return m_bHasStringValue; } OUString const* GetStringValue() const { - return (m_bHasStringValue) ? &m_StringValue : nullptr; + return m_bHasStringValue ? &m_StringValue : nullptr; } const SwStartNode *GetStartNode() const { return pStartNode; } diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index f3693cb6735d..c8512fac27f2 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -241,7 +241,7 @@ void SwEndNoteOptionPage::SelectNumbering(SwFootnoteNum const eNum) SwFootnoteNum SwEndNoteOptionPage::GetNumbering() const { const int nPos = m_xNumCountBox->get_active(); - return static_cast<SwFootnoteNum>((bPosDoc) ? nPos + 2 : nPos); + return static_cast<SwFootnoteNum>(bPosDoc ? nPos + 2 : nPos); } void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell ) diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 13e662feed3b..053209651f01 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -370,7 +370,7 @@ bool SwDocShell::Save() SetError(nErr ? nErr : nVBWarning); SfxViewFrame *const pFrame = - (m_pWrtShell) ? m_pWrtShell->GetView().GetViewFrame() : nullptr; + m_pWrtShell ? m_pWrtShell->GetView().GetViewFrame() : nullptr; if( pFrame ) { pFrame->GetBindings().SetState(SfxBoolItem(SID_DOC_MODIFIED, false)); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 978482343e81..075c3c5c247a 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1469,7 +1469,7 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem ) const bool bAnchorChanged = mpAnchorFrame != rSidebarItem.maLayoutInfo.mpAnchorFrame; if ( bAnchorChanged ) { - mrMgr.DisconnectSidebarWinFromFrame( *(mpAnchorFrame), *this ); + mrMgr.DisconnectSidebarWinFromFrame( *mpAnchorFrame, *this ); } mrSidebarItem = rSidebarItem; |