summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2013-02-10 21:13:43 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2013-02-10 21:45:52 +0900
commita79b72059bf522fab1dc78383a71b2818f6866b8 (patch)
treeb98b22e6b89d37fb6c0b0e14375b373d36e9d9c0 /sw
parent5f2cfb8dc537bd99399ba3942d0f685b6db6841b (diff)
sal_Bool to bool
Change-Id: Iaada35250bdc7bc9393d2cfdceb8171aaafad9ee
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/misc/docfnote.cxx16
-rw-r--r--sw/source/ui/misc/glosbib.cxx10
-rw-r--r--sw/source/ui/misc/glosdoc.cxx14
-rw-r--r--sw/source/ui/misc/glossary.cxx16
-rw-r--r--sw/source/ui/misc/impfnote.hxx6
-rw-r--r--sw/source/ui/misc/insfnote.cxx2
-rw-r--r--sw/source/ui/misc/num.cxx10
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx6
-rw-r--r--sw/source/ui/misc/outline.cxx6
9 files changed, 43 insertions, 43 deletions
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 9e3bad20c79a..70741dd77068 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -77,14 +77,14 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn )
//----------------------------------------------------------------------
-SwEndNoteOptionPage::SwEndNoteOptionPage(Window *pParent, sal_Bool bEN,
+SwEndNoteOptionPage::SwEndNoteOptionPage(Window *pParent, bool bEN,
const SfxItemSet &rSet)
: SfxTabPage(pParent,
bEN ? OString("EndnotePage") : OString("FootnotePage"),
bEN ? OUString("modules/swriter/ui/endnotepage.ui") : OUString("modules/swriter/ui/footnotepage.ui"),
rSet)
, pSh(0)
- , bPosDoc(sal_False)
+ , bPosDoc(false)
, bEndNote(bEN)
{
get(m_pNumViewBox, "numberinglb");
@@ -131,7 +131,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
if ( bEndNote )
{
- bPosDoc = sal_True;
+ bPosDoc = true;
}
else
{
@@ -148,7 +148,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
m_pPosChapterBox->Check();
m_pNumCountBox->RemoveEntry(aNumPage);
m_pNumCountBox->RemoveEntry(aNumChapter);
- bPosDoc = sal_True;
+ bPosDoc = true;
}
// reference tests
m_pContEdit->SetText(rInf.aQuoVadis);
@@ -229,7 +229,7 @@ SwEndNoteOptionPage::~SwEndNoteOptionPage()
SfxTabPage *SwEndNoteOptionPage::Create( Window *pParent, const SfxItemSet &rSet )
{
- return new SwEndNoteOptionPage( pParent, sal_True, rSet );
+ return new SwEndNoteOptionPage( pParent, true, rSet );
}
/*------------------------------------------------------------------------
@@ -290,7 +290,7 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell )
IMPL_LINK_NOARG(SwEndNoteOptionPage, PosPageHdl)
{
const SwFtnNum eNum = (const SwFtnNum)GetNumbering();
- bPosDoc = sal_False;
+ bPosDoc = false;
if(LISTBOX_ENTRY_NOTFOUND == m_pNumCountBox->GetEntryPos(aNumPage))
{
m_pNumCountBox->InsertEntry(aNumPage, FTNNUM_PAGE);
@@ -328,7 +328,7 @@ IMPL_LINK_NOARG_INLINE_START(SwEndNoteOptionPage, PosChapterHdl)
if ( !bPosDoc )
SelectNumbering(FTNNUM_DOC);
- bPosDoc = sal_True;
+ bPosDoc = true;
m_pNumCountBox->RemoveEntry(aNumPage);
m_pNumCountBox->RemoveEntry(aNumChapter);
m_pPageTemplLbl->Enable();
@@ -410,7 +410,7 @@ sal_Bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
}
SwFootNoteOptionPage::SwFootNoteOptionPage( Window *pParent, const SfxItemSet &rSet ) :
- SwEndNoteOptionPage( pParent, sal_False, rSet )
+ SwEndNoteOptionPage( pParent, false, rSet )
{
}
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 41ece7dd6814..e27f84e80ed8 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -191,7 +191,7 @@ IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG )
GlosBibUserData* pUserData = (GlosBibUserData*)pFirstEntry->GetUserData();
String sEntry(pUserData->sGroupName);
String sName(m_pNameED->GetText());
- sal_Bool bExists = sal_False;
+ bool bExists = false;
sal_uLong nPos = m_pGroupTLB->GetEntryPos(sName, 0);
if( 0xffffffff > nPos)
{
@@ -298,7 +298,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl)
OSL_ENSURE(!pGlosHdl->FindGroupName(sNewName), "group already available!");
// if the name to be renamed is among the new ones - replace
- sal_Bool bDone = sal_False;
+ bool bDone = false;
for (OUVector_t::iterator it(m_InsertedArr.begin());
it != m_InsertedArr.end(); ++it)
{
@@ -306,7 +306,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl)
{
m_InsertedArr.erase(it);
m_InsertedArr.push_back(sNewName);
- bDone = sal_True;
+ bDone = true;
break;
}
}
@@ -342,7 +342,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl)
sal_Bool bEnableDel = sal_False;
sal_uLong nCaseReadonly =
(sal_uLong)m_pPathLB->GetEntryData(m_pPathLB->GetSelectEntryPos());
- sal_Bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
+ bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
if(!sEntry.Len() || bDirReadonly)
bEnableNew = sal_False;
@@ -358,7 +358,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl)
String sTemp = m_pGroupTLB->GetEntryText( i, 0 );
nCaseReadonly = (sal_uLong)m_pPathLB->GetEntryData(
m_pPathLB->GetEntryPos(m_pGroupTLB->GetEntryText(i,1)));
- sal_Bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
+ bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
if( !bCase && rSCmp.isEqual( sTemp, sEntry ))
{
diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index 13cab3ad3150..0659eea07e93 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -64,7 +64,7 @@ static String lcl_CheckFileName( const String& rNewFilePath,
}
sRet = comphelper::string::strip(sRet, ' ');
- sal_Bool bOk = sal_False;
+ bool bOk = false;
if( sRet.Len() )
{
String sTmpDir(rNewFilePath);
@@ -334,7 +334,7 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate )
if (bCreate || bExist)
{
pTmp = new SwTextBlocks( sFileURL );
- sal_Bool bOk = sal_True;
+ bool bOk = true;
if( pTmp->GetError() )
{
ErrorHandler::HandleError( pTmp->GetError() );
@@ -399,19 +399,19 @@ SwGlossaries::SwGlossaries()
/* --------------------------------------------------
* #61050# double paths cause irritation - get rid of it
* --------------------------------------------------*/
-static sal_Bool lcl_FindSameEntry(const std::vector<String*>& rDirArr, const String& rEntryURL)
+static bool lcl_FindSameEntry(const std::vector<String*>& rDirArr, const String& rEntryURL)
{
for(std::vector<String*>::const_iterator it(rDirArr.begin()); it != rDirArr.end(); ++it)
if( **it == rEntryURL )
- return sal_True;
- return sal_False;
+ return true;
+ return false;
}
void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
{
SvtPathOptions aPathOpt;
String aNewPath( aPathOpt.GetAutoTextPath() );
- sal_Bool bPathChanged = m_aPath != aNewPath;
+ bool bPathChanged = m_aPath != aNewPath;
if (bFull || bPathChanged)
{
m_aPath = aNewPath;
@@ -544,7 +544,7 @@ String SwGlossaries::GetCompleteGroupName( const rtl::OUString& GroupName )
String sGroup(GroupName);
String sGroupName(sGroup.GetToken(0, GLOS_DELIM));
String sPath = sGroup.GetToken(1, GLOS_DELIM);
- sal_Bool bPathLen = sPath.Len() > 0;
+ bool bPathLen = sPath.Len() > 0;
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
String sGrpName = GetGroupName(i);
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index ab833ed5d7c2..ab65355f83fd 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -105,11 +105,11 @@ struct GroupUserData
{
String sGroupName;
sal_uInt16 nPathIdx;
- sal_Bool bReadonly;
+ bool bReadonly;
GroupUserData()
: nPathIdx(0),
- bReadonly(sal_False) {}
+ bReadonly(false) {}
};
/*------------------------------------------------------------------------
@@ -353,7 +353,7 @@ SvTreeListEntry* SwGlossaryDlg::DoesBlockExist(const String& rBlock,
IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
{
String aName(m_pNameED->GetText());
- sal_Bool bNameED = pEdit == m_pNameED;
+ bool bNameED = pEdit == m_pNameED;
if( !aName.Len() )
{
if(bNameED)
@@ -364,7 +364,7 @@ IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
String sShortSearch;
if(!bNameED)
sShortSearch = pEdit->GetText();
- sal_Bool bNotFound = !DoesBlockExist(aName, sShortSearch);
+ bool bNotFound = !DoesBlockExist(aName, sShortSearch);
if(bNameED)
{
// did the text get in to the Listbbox in the Edit with a click?
@@ -407,9 +407,9 @@ IMPL_LINK( SwGlossaryDlg, EnableHdl, Menu *, pMn )
SvTreeListEntry* pEntry = m_pCategoryBox->FirstSelected();
const String aEditText(m_pNameED->GetText());
- const sal_Bool bHasEntry = aEditText.Len() && !m_pShortNameEdit->GetText().isEmpty();
- const sal_Bool bExists = 0 != DoesBlockExist(aEditText, m_pShortNameEdit->GetText());
- const sal_Bool bIsGroup = pEntry && !m_pCategoryBox->GetParent(pEntry);
+ const bool bHasEntry = aEditText.Len() && !m_pShortNameEdit->GetText().isEmpty();
+ const bool bExists = 0 != DoesBlockExist(aEditText, m_pShortNameEdit->GetText());
+ const bool bIsGroup = pEntry && !m_pCategoryBox->GetParent(pEntry);
pMn->EnableItem("new", bSelection && bHasEntry && !bExists);
pMn->EnableItem("newtext", bSelection && bHasEntry && !bExists);
pMn->EnableItem("copy", bExists && !bIsGroup);
@@ -613,7 +613,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
SvtPathOptions aPathOpt;
String sGlosPath( aPathOpt.GetAutoTextPath() );
sal_uInt16 nPaths = comphelper::string::getTokenCount(sGlosPath, ';');
- sal_Bool bIsWritable = sal_False;
+ bool bIsWritable = false;
for(sal_uInt16 nPath = 0; nPath < nPaths; nPath++)
{
String sPath = URIHelper::SmartRel2Abs(
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index 1249a900ed6d..037b6cb806ba 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -56,8 +56,8 @@ class SwEndNoteOptionPage : public SfxTabPage
String aNumPage;
String aNumChapter;
SwWrtShell *pSh;
- sal_Bool bPosDoc;
- sal_Bool bEndNote;
+ bool bPosDoc;
+ bool bEndNote;
inline void SelectNumbering(int eNum);
int GetNumbering() const;
@@ -68,7 +68,7 @@ class SwEndNoteOptionPage : public SfxTabPage
public:
- SwEndNoteOptionPage( Window *pParent, sal_Bool bEndNote,
+ SwEndNoteOptionPage( Window *pParent, bool bEndNote,
const SfxItemSet &rSet );
~SwEndNoteOptionPage();
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 34df6450650c..ad8327e06c15 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -245,7 +245,7 @@ void SwInsFootNoteDlg::Init()
}
m_pNumberCharEdit->SetFont(aFont);
- sal_Bool bNumChar = sNumStr.Len() != 0;
+ bool bNumChar = sNumStr.Len() != 0;
m_pNumberCharEdit->SetText(sNumStr);
m_pNumberCharBtn->Check(bNumChar);
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index c3bbaa60a01b..8b49d3a08ad7 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -694,14 +694,14 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
{
sal_Bool bOn = pBox->IsChecked();
- sal_Bool bSingleSelection = m_pLevelLB->GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
- sal_Bool bSetValue = sal_False;
+ bool bSingleSelection = m_pLevelLB->GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
+ bool bSetValue = false;
long nValue = 0;
if(bOn || bSingleSelection)
{
sal_uInt16 nMask = 1;
- sal_Bool bFirst = sal_True;
- bSetValue = sal_True;
+ bool bFirst = true;
+ bSetValue = true;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
@@ -715,7 +715,7 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
}
else
bSetValue = nValue == rNumFmt.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace();
- bFirst = sal_False;
+ bFirst = false;
}
nMask <<= 1;
}
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 13445525ea8f..8c2618bc4654 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -98,7 +98,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
for(sal_uInt16 i = 0; i < rNames.Count(); i++)
{
long nValue = rNames.GetValue(i);
- sal_Bool bInsert = sal_True;
+ bool bInsert = true;
sal_uInt16 nPos = LISTBOX_APPEND;
switch(nValue)
{
@@ -113,14 +113,14 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
if (nValue > style::NumberingType::CHARS_LOWER_LETTER_N)
{
// Insert only if offered by i18n framework per configuration.
- bInsert = sal_False;
+ bInsert = false;
if (pTypes)
{
for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++)
{
if (pTypes[nType] == nValue)
{
- bInsert = sal_True;
+ bInsert = true;
break; // for
}
}
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 503802599c67..3f41278dba46 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -716,7 +716,7 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFmtHdl)
{
String sEntry = m_pCharFmtLB->GetSelectEntry();
sal_uInt16 nMask = 1;
- sal_Bool bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
+ bool bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
SwCharFmt* pFmt = 0;
if(!bFormatNone)
{
@@ -855,8 +855,8 @@ SfxTabPage* SwOutlineSettingsTabPage::Create( Window* pParent,
void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
{
- sal_Bool bIsNull = m_pStartEdit->GetValue() == 0;
- sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
+ bool bIsNull = m_pStartEdit->GetValue() == 0;
+ bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType ||
SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType;
m_pStartEdit->SetMin(bNoZeroAllowed ? 1 : 0);