summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx5
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx4
-rw-r--r--sw/source/ui/fldui/fldref.cxx4
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx7
-rw-r--r--sw/source/ui/misc/bookmark.cxx4
-rw-r--r--sw/source/ui/vba/vbafind.cxx8
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.cxx4
-rw-r--r--sw/source/ui/vba/vbaselection.cxx8
-rw-r--r--sw/source/ui/vba/vbatables.cxx4
10 files changed, 13 insertions, 37 deletions
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 8ccffebdccff..df2f530b7c88 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -369,10 +369,7 @@ bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl(
nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL,
pItems );
- if ( !pItem )
- return false;
-
- return true;
+ return pItem != nullptr;
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index af25e2d3b878..16c6a6c9069a 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -155,9 +155,7 @@ void SwMailMergeAddressBlockPage::ActivatePage()
bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
- if ( ::svt::WizardTypes::eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() )
- return false;
- return true;
+ return ::svt::WizardTypes::eTravelForward != _eReason || m_pWizard->GetConfigItem().GetResultSet().is();
}
IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, void)
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 0d4f83961459..38664a2a285a 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -736,9 +736,7 @@ bool SwFieldRefPage::MatchSubstring( const OUString& rListString, const OUString
return true;
OUString aListString = rListString.toAsciiLowerCase();
OUString aSubstr = rSubstr.toAsciiLowerCase();
- if(aListString.indexOf(aSubstr) >= 0)
- return true;
- return false;
+ return aListString.indexOf(aSubstr) >= 0;
}
sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId)
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 88f3ecbbea36..602227c588a3 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -861,7 +861,7 @@ void SwColumnPage::UpdateCols()
const bool bEdit = !m_pAutoWidthBox->IsChecked();
if ( m_nCols > nVisCols )
{
- bEnableBtns = true && !m_bHtmlMode;
+ bEnableBtns = !m_bHtmlMode;
bEnable12 = bEnable3 = bEdit;
}
else if( bEdit )
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index abb17ee90f7a..d8e4b1d18831 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -522,11 +522,8 @@ bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName)
const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(
rName, SwGetPoolIdFromName::TxtColl);
- if(nId != USHRT_MAX &&
- ! rSh.GetTextCollFromPool(nId)->IsAssignedToListLevelOfOutlineStyle())
- return true;
-
- return false;
+ return nId != USHRT_MAX &&
+ ! rSh.GetTextCollFromPool(nId)->IsAssignedToListLevelOfOutlineStyle();
}
class SwIndexTreeLB : public SvSimpleTable
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 95b4fea7fbd0..4a52dd50f184 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -265,9 +265,7 @@ bool SwInsertBookmarkDlg::HaveBookmarksChanged()
}
}
// less bookmarks then expected
- if (aListIter != aTableBookmarks.end())
- return true;
- return false;
+ return aListIter != aTableBookmarks.end();
}
void SwInsertBookmarkDlg::PopulateTable()
diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx
index 3556673b0b9a..2620b441f365 100644
--- a/sw/source/ui/vba/vbafind.cxx
+++ b/sw/source/ui/vba/vbafind.cxx
@@ -45,17 +45,13 @@ SwVbaFind::~SwVbaFind()
bool SwVbaFind::InRange( const uno::Reference< text::XTextRange >& xCurrentRange )
{
uno::Reference< text::XTextRangeCompare > xTRC( mxTextRange->getText(), uno::UNO_QUERY_THROW );
- if( xTRC->compareRegionStarts( mxTextRange, xCurrentRange ) >= 0 && xTRC->compareRegionEnds( mxTextRange, xCurrentRange ) <= 0 )
- return true;
- return false;
+ return xTRC->compareRegionStarts( mxTextRange, xCurrentRange ) >= 0 && xTRC->compareRegionEnds( mxTextRange, xCurrentRange ) <= 0;
}
bool SwVbaFind::InEqualRange( const uno::Reference< text::XTextRange >& xCurrentRange )
{
uno::Reference< text::XTextRangeCompare > xTRC( mxTextRange->getText(), uno::UNO_QUERY_THROW );
- if( xTRC->compareRegionStarts( mxTextRange, xCurrentRange ) == 0 && xTRC->compareRegionEnds( mxTextRange, xCurrentRange ) == 0 )
- return true;
- return false;
+ return xTRC->compareRegionStarts( mxTextRange, xCurrentRange ) == 0 && xTRC->compareRegionEnds( mxTextRange, xCurrentRange ) == 0;
}
void SwVbaFind::SetReplaceWith( const OUString& rText )
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
index 3c873b2769cb..62a75141612a 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
@@ -43,9 +43,7 @@ bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< text::XText >& xT
{
uno::Reference< lang::XServiceInfo > xServiceInfo( xText, uno::UNO_QUERY_THROW );
OUString aImplName = xServiceInfo->getImplementationName();
- if ( aImplName == "SwXHeadFootText" )
- return true;
- return false;
+ return aImplName == "SwXHeadFootText";
}
bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xModel )
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index b3334a13766c..22c38459060d 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -956,9 +956,7 @@ uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable()
bool SwVbaSelection::IsInTable()
{
uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
- if( xTextTable.is() )
- return true;
- return false;
+ return xTextTable.is();
}
bool SwVbaSelection::HasSelection()
@@ -966,9 +964,7 @@ bool SwVbaSelection::HasSelection()
uno::Reference< text::XTextRange > xStart = mxTextViewCursor->getStart();
uno::Reference< text::XTextRange > xEnd = mxTextViewCursor->getEnd();
uno::Reference< text::XTextRangeCompare > xTRC( mxTextViewCursor->getText(), uno::UNO_QUERY_THROW );
- if( xTRC->compareRegionStarts( xStart, xEnd ) == 0 && xTRC->compareRegionEnds( xStart, xEnd ) == 0 )
- return false;
- return true;
+ return xTRC->compareRegionStarts( xStart, xEnd ) != 0 || xTRC->compareRegionEnds( xStart, xEnd ) != 0;
}
void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName )
diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx
index 545f99fc4c1b..932e416d460e 100644
--- a/sw/source/ui/vba/vbatables.cxx
+++ b/sw/source/ui/vba/vbatables.cxx
@@ -55,9 +55,7 @@ static bool lcl_isInHeaderFooter( const uno::Reference< text::XTextTable >& xTab
uno::Reference< text::XText > xText = xTextContent->getAnchor()->getText();
uno::Reference< lang::XServiceInfo > xServiceInfo( xText, uno::UNO_QUERY_THROW );
OUString aImplName = xServiceInfo->getImplementationName();
- if ( aImplName == "SwXHeadFootText" )
- return true;
- return false;
+ return aImplName == "SwXHeadFootText";
}
typedef std::vector< uno::Reference< text::XTextTable > > XTextTableVec;