summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-22 11:31:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-22 11:39:21 +0100
commit7cb3e55bf03c49608e2b54b5d90eddd423a0f891 (patch)
treeebf890a12be682f3f39dc4c7973b3288fad161f9 /sw/source/ui
parent747ba6295d22c2e65be984cd750f240dc106482b (diff)
bool improvements
Change-Id: Ib65a1e987ad6511e90fd66a36c0105593a1df27c
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/swmodul1.cxx6
-rw-r--r--sw/source/ui/config/optcomp.cxx22
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx2
-rw-r--r--sw/source/ui/inc/mmconfigitem.hxx2
-rw-r--r--sw/source/ui/inc/wrtsh.hxx2
-rw-r--r--sw/source/ui/misc/num.cxx2
-rw-r--r--sw/source/ui/table/chartins.cxx2
-rw-r--r--sw/source/ui/vba/vbacolumns.cxx2
-rw-r--r--sw/source/ui/vba/vbalistgalleries.cxx2
-rw-r--r--sw/source/ui/vba/vbalistlevels.cxx2
-rw-r--r--sw/source/ui/vba/vbalisttemplates.cxx2
-rw-r--r--sw/source/ui/vba/vbarows.cxx2
-rw-r--r--sw/source/ui/vba/vbaselection.cxx2
13 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index dfaf2892d369..73fe0a1beb80 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -207,7 +207,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
pPref->SetIdle(sal_True);
}
-void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
+void SwModule::ApplyUserMetric( FieldUnit eMetric, bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -243,7 +243,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
}
}
-void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb )
+void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -279,7 +279,7 @@ void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bo
}
//set the usrpref 's char unit attribute and set rulers unit as char if the "apply char unit" is checked
-void SwModule::ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb)
+void SwModule::ApplyUserCharUnit(sal_Bool bApplyChar, bool bWeb)
{
SwMasterUsrPref* pPref;
if(bWeb)
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index f793df09265b..7adb09ef5e08 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -375,17 +375,17 @@ sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
{
const IDocumentSettingAccess& rIDocumentSettingAccess = *m_pWrtShell->getIDocumentSettingAccess();
nRet = convertBools2Ulong_Impl(
- rIDocumentSettingAccess.get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) == sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::PARA_SPACE_MAX) != sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES) != sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::TAB_COMPAT) == sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::ADD_EXT_LEADING) == sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::OLD_LINE_SPACING) != sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS) != sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS) != sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) != sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) != sal_False,
- rIDocumentSettingAccess.get(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK) != sal_True );
+ !rIDocumentSettingAccess.get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE),
+ rIDocumentSettingAccess.get(IDocumentSettingAccess::PARA_SPACE_MAX),
+ rIDocumentSettingAccess.get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES),
+ !rIDocumentSettingAccess.get(IDocumentSettingAccess::TAB_COMPAT),
+ !rIDocumentSettingAccess.get(IDocumentSettingAccess::ADD_EXT_LEADING),
+ rIDocumentSettingAccess.get(IDocumentSettingAccess::OLD_LINE_SPACING),
+ rIDocumentSettingAccess.get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS),
+ rIDocumentSettingAccess.get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS),
+ rIDocumentSettingAccess.get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING),
+ rIDocumentSettingAccess.get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION),
+ !rIDocumentSettingAccess.get(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK) );
}
return nRet;
}
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index 89b15ee271e8..05fa5155ae9a 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -778,7 +778,7 @@ const Sequence< OUString> SwMailMergeConfigItem::GetAddressBlocks() const
return m_pImpl->GetAddressBlocks();
}
-sal_Bool SwMailMergeConfigItem::IsAddressBlock()const
+bool SwMailMergeConfigItem::IsAddressBlock()const
{
return m_pImpl->bIsAddressBlock && IsOutputToLetter();
}
diff --git a/sw/source/ui/inc/mmconfigitem.hxx b/sw/source/ui/inc/mmconfigitem.hxx
index c07612ddf547..b5c751d3ae70 100644
--- a/sw/source/ui/inc/mmconfigitem.hxx
+++ b/sw/source/ui/inc/mmconfigitem.hxx
@@ -124,7 +124,7 @@ public:
sal_Bool IsOutputToLetter()const;
void SetOutputToLetter(sal_Bool bSet);
- sal_Bool IsAddressBlock()const;
+ bool IsAddressBlock()const;
void SetAddressBlock(sal_Bool bSet);
sal_Bool IsHideEmptyParagraphs() const;
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 894e9f560fc4..2b6dfd72248c 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -141,7 +141,7 @@ public:
void EnterBlockMode();
void LeaveBlockMode();
bool ToggleBlockMode();
- sal_Bool IsBlockMode() const { return bBlockMode; }
+ bool IsBlockMode() const { return bBlockMode; }
void SetInsMode( sal_Bool bOn = sal_True );
void ToggleInsMode() { SetInsMode( !bIns ); }
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 50e958a5aa94..3744ef49c836 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -355,7 +355,7 @@ void SwNumPositionTabPage::InitControls()
m_pIndentAtMF->SetText(aEmptyOUStr);
}
- if(sal_True == bSetDistEmpty)
+ if(bSetDistEmpty)
m_pDistBorderMF->SetText(aEmptyOUStr);
bInInintControl = sal_False;
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index a2654e21a1eb..eb9cb6c32ff9 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -165,7 +165,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
}
SwFlyFrmFmt *pFlyFrmFmt = 0;
- xChartModel.set( SwTableFUNC( &rWrtShell, sal_False ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt ));
+ xChartModel.set( SwTableFUNC( &rWrtShell, sal_False ).InsertChart( xDataProvider, xDataProvider.is(), aRangeString, &pFlyFrmFmt ));
//open wizard
//@todo get context from writer if that has one
diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx
index 5bcf49b8b1d0..3344c8891e72 100644
--- a/sw/source/ui/vba/vbacolumns.cxx
+++ b/sw/source/ui/vba/vbacolumns.cxx
@@ -100,7 +100,7 @@ void SAL_CALL SwVbaColumns::Select( ) throw (uno::RuntimeException)
uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
{
sal_Int32 nIndex = 0;
- if( ( Index1 >>= nIndex ) == sal_True )
+ if( ( Index1 >>= nIndex ) )
{
if( nIndex <= 0 || nIndex > getCount() )
{
diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx
index ecb8852c84ca..87ea07c6a46a 100644
--- a/sw/source/ui/vba/vbalistgalleries.cxx
+++ b/sw/source/ui/vba/vbalistgalleries.cxx
@@ -55,7 +55,7 @@ SwVbaListGalleries::SwVbaListGalleries( const uno::Reference< XHelperInterface >
uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
{
sal_Int32 nIndex = 0;
- if( ( Index1 >>= nIndex ) == sal_True )
+ if( ( Index1 >>= nIndex ) )
{
if( nIndex == word::WdListGalleryType::wdBulletGallery
|| nIndex == word::WdListGalleryType::wdNumberGallery
diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx
index 9c2822f34fce..016d561214a5 100644
--- a/sw/source/ui/vba/vbalistlevels.cxx
+++ b/sw/source/ui/vba/vbalistlevels.cxx
@@ -60,7 +60,7 @@ SwVbaListLevels::SwVbaListLevels( const uno::Reference< XHelperInterface >& xPar
uno::Any SAL_CALL SwVbaListLevels::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
{
sal_Int32 nIndex = 0;
- if( ( Index1 >>= nIndex ) == sal_False )
+ if( !( Index1 >>= nIndex ) )
throw uno::RuntimeException();
if( nIndex <=0 || nIndex > getCount() )
throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() );
diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx
index 00f3ee22bca3..d3ec908467b6 100644
--- a/sw/source/ui/vba/vbalisttemplates.cxx
+++ b/sw/source/ui/vba/vbalisttemplates.cxx
@@ -54,7 +54,7 @@ SwVbaListTemplates::SwVbaListTemplates( const uno::Reference< XHelperInterface >
uno::Any SAL_CALL SwVbaListTemplates::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
{
sal_Int32 nIndex = 0;
- if( ( Index1 >>= nIndex ) == sal_False )
+ if( !( Index1 >>= nIndex ) )
throw uno::RuntimeException();
if( nIndex <=0 || nIndex > getCount() )
throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() );
diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx
index 9f728d6068b1..b87d19ed0196 100644
--- a/sw/source/ui/vba/vbarows.cxx
+++ b/sw/source/ui/vba/vbarows.cxx
@@ -319,7 +319,7 @@ void SAL_CALL SwVbaRows::Select( ) throw (uno::RuntimeException)
uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
{
sal_Int32 nIndex = 0;
- if( ( Index1 >>= nIndex ) == sal_True )
+ if( ( Index1 >>= nIndex ) )
{
if( nIndex <= 0 || nIndex > getCount() )
{
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 676baf762c9f..3a10c07e9749 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -555,7 +555,7 @@ SwVbaSelection::TypeBackspace() throw ( uno::RuntimeException )
uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _what, const uno::Any& _which, const uno::Any& _count, const uno::Any& _name ) throw (uno::RuntimeException)
{
sal_Int32 nWhat = 0;
- if( ( _what >>= nWhat ) != sal_True )
+ if( !( _what >>= nWhat ) )
DebugHelper::exception(SbERR_BAD_ARGUMENT, OUString());
switch( nWhat )
{