diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-11-09 22:18:34 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-11-16 16:54:39 +0100 |
commit | a080c8f34d80b8c70764e7bde934f43c2fe4a109 (patch) | |
tree | d8f1437812eeb6cb744762616e54a1a9ed32f3d6 /sw/source/ui | |
parent | 2abe293f085fc66eeaeeae85c9714a41a874cbcd (diff) |
sw: avoid 'condition ? sal_True : sal_False' expressions
Change-Id: Idd6c9f9752659fc5da575e5a3f0ffc15ce5dbe1c
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/chrdlg/drpcps.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/optload.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/wrap.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaselection.cxx | 4 |
6 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index b6cf98bc8bdd..0dd86918c4e3 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -539,7 +539,7 @@ SwDropCapsPage::SwDropCapsPage(vcl::Window *pParent, const SfxItemSet &rSet) SetExchangeSupport(); const sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; + bHtmlMode = (nHtmlMode & HTMLMODE_ON) != 0; // In the template dialog the text is not influenceable m_pTextText->Enable( !bFormat ); diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index f1305b91e3bd..fa84da7ba0fb 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -548,7 +548,7 @@ bool SwCaptionOptPage::FillItemSet( SfxItemSet* ) pModOpt->SetInsWithCaption( bHTMLMode, nCheckCount > 0 ); sal_Int32 nPos = m_pLbCaptionOrder->GetSelectEntryPos(); - pModOpt->SetCaptionOrderNumberingFirst(nPos == 1 ? sal_True : sal_False ); + pModOpt->SetCaptionOrderNumberingFirst(nPos == 1); return bRet; } diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 42530be1dea5..f96c004c1b7f 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -702,7 +702,7 @@ void SwCustomizeAddressBlockDialog::UpdateImageButtons_Impl() m_pLeftIB->Enable(nMove & MOVE_ITEM_LEFT ); m_pRightIB->Enable(nMove & MOVE_ITEM_RIGHT ); m_pDownIB->Enable(nMove & MOVE_ITEM_DOWN); - m_pRemoveFieldIB->Enable(m_pDragED->HasCurrentItem() ? sal_True : sal_False); + m_pRemoveFieldIB->Enable(m_pDragED->HasCurrentItem()); SvTreeListEntry* pEntry = m_pAddressElementsLB->GetCurEntry(); m_pInsertFieldIB->Enable( pEntry && (0 < (sal_Int32)(sal_IntPtr)pEntry->GetUserData() || !m_pFieldCB->GetText().isEmpty())); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index e5f51147198c..ab0f069acca2 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -852,7 +852,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) getFrmDlgParentShell(); nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; + bHtmlMode = (nHtmlMode & HTMLMODE_ON) != 0; FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); m_aWidthED.SetMetric(aMetric); @@ -2381,7 +2381,7 @@ void SwGrfExtPage::Reset(const SfxItemSet *rSet) { const SfxPoolItem* pItem; const sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; + bHtmlMode = (nHtmlMode & HTMLMODE_ON) != 0; if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_GRF_CONNECT, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue() ) @@ -2864,7 +2864,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) { const SfxPoolItem* pItem; sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; + bHtmlMode = (nHtmlMode & HTMLMODE_ON) != 0; if (bHtmlMode) { pProtectFrame->Hide(); diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index 9d0b32a2efe3..1875c49e2de4 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -170,7 +170,7 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet) } nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; + bHtmlMode = (nHtmlMode & HTMLMODE_ON) != 0; FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); SetMetric(*m_pLeftMarginED, aMetric); diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index f2af13a09a08..a8b12eca1566 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -131,7 +131,7 @@ SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) throw sal_Int32 nExtend = word::WdMovementType::wdMove; _unit >>= nUnit; _extend >>= nExtend; - bool bExtend = ( nExtend == word::WdMovementType::wdExtend ) ? sal_True : sal_False; + bool bExtend = nExtend == word::WdMovementType::wdExtend; switch( nUnit ) { @@ -166,7 +166,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( sal_Int32 nExtend = word::WdMovementType::wdMove; _unit >>= nUnit; _extend >>= nExtend; - bool bExtend = ( nExtend == word::WdMovementType::wdExtend ) ? sal_True : sal_False; + bool bExtend = nExtend == word::WdMovementType::wdExtend; switch( nUnit ) { |