summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-22 14:58:57 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-22 15:00:54 +0100
commitbbd9668d5f70d8ff00a7b10915e7a16ceadb8443 (patch)
tree4e65b4d58e6a4298219b1909f524b710677606d9 /sw/source/ui
parent4eda1a0293a869bf804056f1e9e04c984c69454d (diff)
bool improvements (related to mixing bool/sal_Bool in &=, |=, ^=)
Change-Id: I9869d9709f28b68ef7b518527175589d80644668
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/config/optpage.cxx6
-rw-r--r--sw/source/ui/fldui/flddb.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx6
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx12
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx12
-rw-r--r--sw/source/ui/misc/redlndlg.cxx4
-rw-r--r--sw/source/ui/shells/drawsh.cxx2
-rw-r--r--sw/source/ui/shells/drwbassh.cxx2
-rw-r--r--sw/source/ui/shells/tabsh.cxx2
-rw-r--r--sw/source/ui/shells/textsh.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx2
-rw-r--r--sw/source/ui/wrtsh/select.cxx2
14 files changed, 30 insertions, 30 deletions
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index d7efd5391f70..3f76347d0999 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1356,13 +1356,13 @@ sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
eMode = FILL_SPACE;
aOpt.SetMode( eMode );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
const SfxPoolItem* pItem = 0;
if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )
|| ((SwShadowCursorItem&)*pItem) != aOpt )
{
rSet.Put( aOpt );
- bRet = sal_True;
+ bRet = true;
}
if (m_pWrtShell) {
@@ -1374,7 +1374,7 @@ sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
if( m_pCrsrInProtCB->IsChecked() != m_pCrsrInProtCB->GetSavedValue())
{
rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, m_pCrsrInProtCB->IsChecked()));
- bRet |= sal_True;
+ bRet = true;
}
const SwDocDisplayItem* pOldAttr = (const SwDocDisplayItem*)
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index f47713474fcd..4dc390a91686 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -391,7 +391,7 @@ IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB )
void SwFldDBPage::CheckInsert()
{
- sal_Bool bInsert = sal_True;
+ bool bInsert = true;
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
SvTreeListEntry* pEntry = m_pDatabaseTLB->GetCurEntry();
@@ -406,7 +406,7 @@ void SwFldDBPage::CheckInsert()
bInsert &= pEntry != 0;
}
else
- bInsert = sal_False;
+ bInsert = false;
if (nTypeId == TYP_DBNUMSETFLD)
{
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 7679f6a4c230..63c489b9f5b3 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1024,7 +1024,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
--------------------------------------------------------------------*/
sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
SwWrtShell* pSh = bFormat ? ::GetActiveWrtShell()
: getFrmDlgParentShell();
OSL_ENSURE( pSh , "shell not found");
@@ -1059,7 +1059,7 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
aHoriOrient.SetRelationOrient( eRel );
aHoriOrient.SetPosToggle(m_pMirrorPagesCB->IsChecked());
- sal_Bool bMod = m_pAtHorzPosED->GetText() != m_pAtHorzPosED->GetSavedValue();
+ bool bMod = m_pAtHorzPosED->GetText() != m_pAtHorzPosED->GetSavedValue();
bMod |= m_pMirrorPagesCB->GetState() != m_pMirrorPagesCB->GetSavedValue();
if ( eHOri == text::HoriOrientation::NONE &&
@@ -3019,7 +3019,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if (pNameED->GetText() != pNameED->GetSavedValue())
bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, pNameED->GetText()));
if (pAltNameED->GetText() != pAltNameED->GetSavedValue())
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index a48715008a83..c32f02b598f2 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -270,7 +270,7 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
--------------------------------------------------------------------*/
sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
- sal_Bool bModified = sal_False;
+ bool bModified = false;
const SfxPoolItem* pOldItem;
const SwFmtSurround& rOldSur = (const SwFmtSurround&)GetItemSet().Get(RES_SURROUND);
@@ -313,7 +313,7 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aSur != *pOldItem )
{
rSet.Put(aSur);
- bModified = sal_True;
+ bModified = true;
}
if (!bDrawMode)
@@ -322,7 +322,7 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aOp != *pOldItem )
{
rSet.Put(aOp);
- bModified = sal_True;
+ bModified = true;
}
}
@@ -339,7 +339,7 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aUL != *pOldItem )
{
rSet.Put( aUL, RES_UL_SPACE );
- bModified = sal_True;
+ bModified = true;
}
}
@@ -356,7 +356,7 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aLR != *pOldItem )
{
rSet.Put(aLR, RES_LR_SPACE);
- bModified = sal_True;
+ bModified = true;
}
}
@@ -599,7 +599,7 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
IMPL_LINK( SwWrapTabPage, WrapTypeHdl, RadioButton *, pBtn )
{
- sal_Bool bWrapThrough = (pBtn == m_pWrapThroughRB);
+ bool bWrapThrough = (pBtn == m_pWrapThroughRB);
m_pWrapTransparentCB->Enable( bWrapThrough && !bHtmlMode );
bWrapThrough |= ( nAnchorId == FLY_AS_CHAR );
m_pWrapOutlineCB->Enable( !bWrapThrough && pBtn != m_pNoWrapRB);
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 22d7f7004eb2..dec1c52727c7 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -368,7 +368,7 @@ IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
//ShortNameEdit
if(!bNotFound)
{
- sal_Bool bEnable = !bNotFound;
+ bool bEnable = !bNotFound;
bEnable &= !bIsDocReadOnly;
m_pInsertBtn->Enable(bEnable);
}
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 6cde196f6737..8c019a245d06 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -443,12 +443,12 @@ void SwOutlineSettingsTabPage::Update()
m_pCollBox->Enable(USHRT_MAX != nActLevel);
if(USHRT_MAX == nActLevel)
{
- sal_Bool bSamePrefix = sal_True;
- sal_Bool bSameSuffix = sal_True;
- sal_Bool bSameType = sal_True;
- sal_Bool bSameComplete = sal_True;
- sal_Bool bSameStart = sal_True;
- sal_Bool bSameCharFmt = sal_True;
+ bool bSamePrefix = true;
+ bool bSameSuffix = true;
+ bool bSameType = true;
+ bool bSameComplete = true;
+ bool bSameStart = true;
+ bool bSameCharFmt = true;
const SwNumFmt* aNumFmtArr[MAXLEVEL];
const SwCharFmt* pFirstFmt = 0;
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 8a119663082f..a54e192f6139 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -259,7 +259,7 @@ void SwRedlineAcceptDlg::InitAuthors()
bOnlyFormatedRedlines = sal_True;
bHasReadonlySel = sal_False;
- sal_Bool bIsNotFormated = sal_False;
+ bool bIsNotFormated = false;
sal_uInt16 i;
// determine authors
@@ -924,7 +924,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl)
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
aSelectTimer.Stop();
- sal_Bool bIsNotFormated = sal_False;
+ bool bIsNotFormated = false;
bool bSel = false;
//#98883# don't select redlines while the dialog is not focussed
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index c3d31208af54..307789139a97 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -281,7 +281,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
- sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Check the parent
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index ecee1ed97b29..e4f7c781658c 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -645,7 +645,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
- sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Look in the parent
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 4152393812ab..1ad2ad926407 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -278,7 +278,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
pItem = 0;
- sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
+ bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index efc5ae3a32b8..d2bbceef4606 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -475,7 +475,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_FRAME_INTERACT:
{
sal_uInt16 nCols = 1;
- sal_Bool bModifier1 = rReq.GetModifier() == KEY_MOD1;
+ bool bModifier1 = rReq.GetModifier() == KEY_MOD1;
if(pArgs)
{
if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot &&
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 46901353c322..8e191e5f6429 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1349,7 +1349,7 @@ SfxTabPage* SwTextFlowPage::Create( Window* pParent,
sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
- sal_Bool bModified = sal_False;
+ bool bModified = false;
// Repeat Heading
if(m_pHeadLineCB->IsChecked() != m_pHeadLineCB->GetSavedValue() ||
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 108f9d32763c..f383d23ca07b 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -141,7 +141,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
const SfxPoolItem* pItem = 0;
bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
- sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
+ bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index d18ffdad6f88..56660aa03052 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -147,7 +147,7 @@ long SwWrtShell::SelAll()
pEndPos = new SwPosition( *pTmpCrsr->GetMark() );
}
Push();
- sal_Bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
+ bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
SwapPam();
bIsFullSel &= !MoveSection( fnSectionCurr, fnSectionEnd);
Pop(sal_False);