summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-20 11:53:43 +0200
committerNoel Grandin <noel@peralex.com>2014-03-24 08:12:09 +0200
commit9604eb87581ae7d8714fb69cf56a0442c4740100 (patch)
tree64af14bb768b28167743563c8d6704cb558d4f44 /svtools
parentf661ac03e049844fd529fb6ff02e628b32cac650 (diff)
svtools: sal_Bool->bool
Change-Id: I8f171f7f61ea06a79183e9bf9b15b8c35c98cc9b
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/fontsubstconfig.cxx2
-rw-r--r--svtools/source/contnr/fileview.cxx190
-rw-r--r--svtools/source/contnr/templwin.cxx6
-rw-r--r--svtools/source/control/filectrl.cxx2
-rw-r--r--svtools/source/control/fmtfield.cxx133
-rw-r--r--svtools/source/uno/framestatuslistener.cxx6
-rw-r--r--svtools/source/uno/unoiface.cxx6
7 files changed, 171 insertions, 174 deletions
diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx
index 4d97c9bdeaa2..57f3a2183f9e 100644
--- a/svtools/source/config/fontsubstconfig.cxx
+++ b/svtools/source/config/fontsubstconfig.cxx
@@ -49,7 +49,7 @@ struct SvtFontSubstConfig_Impl
SvtFontSubstConfig::SvtFontSubstConfig() :
ConfigItem(OUString("Office.Common/Font/Substitution")),
- bIsEnabled(sal_False),
+ bIsEnabled(false),
pImpl(new SvtFontSubstConfig_Impl)
{
Sequence<OUString> aNames(1);
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index be9c77ed6c4f..4986350c8a61 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -178,18 +178,18 @@ private:
OUString msFolder;
OUString msFile;
sal_uInt32 mnSearchIndex;
- sal_Bool mbResizeDisabled : 1;
- sal_Bool mbAutoResize : 1;
- sal_Bool mbEnableDelete : 1;
- sal_Bool mbEnableRename : 1;
+ bool mbResizeDisabled : 1;
+ bool mbAutoResize : 1;
+ bool mbEnableDelete : 1;
+ bool mbEnableRename : 1;
bool mbShowHeader;
void DeleteEntries();
void DoQuickSearch( const sal_Unicode& rChar );
- sal_Bool Kill( const OUString& rURL );
+ bool Kill( const OUString& rURL );
protected:
- virtual sal_Bool DoubleClickHdl();
+ virtual sal_Bool DoubleClickHdl();
virtual OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos ) const;
public:
@@ -198,15 +198,15 @@ public:
virtual void Resize();
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText );
+ virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText );
void ClearAll();
HeaderBar* GetHeaderBar() const { return mpHeaderBar; }
- void EnableAutoResize() { mbAutoResize = sal_True; }
- void EnableDelete( sal_Bool bEnable ) { mbEnableDelete = bEnable; }
- void EnableRename( sal_Bool bEnable ) { mbEnableRename = bEnable; }
- sal_Bool IsDeleteOrContextMenuEnabled() { return mbEnableDelete || IsContextMenuHandlingEnabled(); }
+ void EnableAutoResize() { mbAutoResize = true; }
+ void EnableDelete( bool bEnable ) { mbEnableDelete = bEnable; }
+ void EnableRename( bool bEnable ) { mbEnableRename = bEnable; }
+ bool IsDeleteOrContextMenuEnabled() { return mbEnableDelete || IsContextMenuHandlingEnabled(); }
Reference< XCommandEnvironment > GetCommandEnvironment() const { return mxCmdEnv; }
@@ -427,7 +427,7 @@ public:
virtual ~NameTranslator_Impl();
// IContentTitleTranslation
- virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const;
+ virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const;
void SetActualFolder( const INetURLObject& rActualFolder );
const OUString* GetTransTableFileName() const;
@@ -463,11 +463,11 @@ public:
ViewTabListBox_Impl* mpView;
NameTranslator_Impl* mpNameTrans;
sal_uInt16 mnSortColumn;
- sal_Bool mbAscending : 1;
- sal_Bool mbOnlyFolder : 1;
- sal_Bool mbReplaceNames : 1; // translate folder names or display doc-title instead of file name
+ bool mbAscending : 1;
+ bool mbOnlyFolder : 1;
+ bool mbReplaceNames : 1; // translate folder names or display doc-title instead of file name
sal_Int16 mnSuspendSelectCallback : 1;
- sal_Bool mbIsFirstResort : 1;
+ bool mbIsFirstResort : 1;
IntlWrapper aIntlWrapper;
@@ -480,7 +480,7 @@ public:
SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv,
sal_Int16 nFlags,
- sal_Bool bOnlyFolder );
+ bool bOnlyFolder );
virtual ~SvtFileView_Impl();
void Clear();
@@ -512,18 +512,18 @@ public:
sal_uLong GetEntryPos( const OUString& rURL );
- inline void EnableContextMenu( sal_Bool bEnable );
- inline void EnableDelete( sal_Bool bEnable );
+ inline void EnableContextMenu( bool bEnable );
+ inline void EnableDelete( bool bEnable );
- void Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending );
- sal_Bool SearchNextEntry( sal_uInt32 &nIndex,
+ void Resort_Impl( sal_Int16 nColumn, bool bAscending );
+ bool SearchNextEntry( sal_uInt32 &nIndex,
const OUString& rTitle,
- sal_Bool bWrapAround );
+ bool bWrapAround );
- inline sal_Bool EnableNameReplacing( sal_Bool bEnable = sal_True ); // returns false, if action wasn't possible
+ inline bool EnableNameReplacing( bool bEnable = true ); // returns false, if action wasn't possible
void SetActualFolder( const INetURLObject& rActualFolder );
- sal_Bool GetDocTitle( const OUString& rTargetURL, OUString& rDocTitle ) const;
+ bool GetDocTitle( const OUString& rTargetURL, OUString& rDocTitle ) const;
void SetSelectHandler( const Link& _rHdl );
@@ -544,25 +544,25 @@ protected:
virtual void onTimeout( CallbackTimer* _pInstigator );
};
-inline void SvtFileView_Impl::EnableContextMenu( sal_Bool bEnable )
+inline void SvtFileView_Impl::EnableContextMenu( bool bEnable )
{
mpView->EnableContextMenuHandling( bEnable );
if( bEnable )
- mbReplaceNames = sal_False;
+ mbReplaceNames = false;
}
-inline void SvtFileView_Impl::EnableDelete( sal_Bool bEnable )
+inline void SvtFileView_Impl::EnableDelete( bool bEnable )
{
mpView->EnableDelete( bEnable );
if( bEnable )
- mbReplaceNames = sal_False;
+ mbReplaceNames = false;
}
-inline sal_Bool SvtFileView_Impl::EnableNameReplacing( sal_Bool bEnable )
+inline bool SvtFileView_Impl::EnableNameReplacing( bool bEnable )
{
mpView->EnableRename( bEnable );
- sal_Bool bRet;
+ bool bRet;
if( mpView->IsDeleteOrContextMenuEnabled() )
{
DBG_ASSERT( !mbReplaceNames, "SvtFileView_Impl::EnableNameReplacing(): state should be not possible!" );
@@ -571,7 +571,7 @@ inline sal_Bool SvtFileView_Impl::EnableNameReplacing( sal_Bool bEnable )
else
{
mbReplaceNames = bEnable;
- bRet = sal_True;
+ bRet = true;
}
return bRet;
@@ -643,10 +643,10 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin,
msFolder ( SVT_RESSTR(STR_SVT_ACC_DESC_FOLDER) ),
msFile ( SVT_RESSTR(STR_SVT_ACC_DESC_FILE) ),
mnSearchIndex ( 0 ),
- mbResizeDisabled ( sal_False ),
- mbAutoResize ( sal_False ),
- mbEnableDelete ( sal_False ),
- mbEnableRename ( sal_True ),
+ mbResizeDisabled ( false ),
+ mbAutoResize ( false ),
+ mbEnableDelete ( false ),
+ mbEnableRename ( true ),
mbShowHeader ( (nFlags & FILEVIEW_SHOW_NONE) == 0 )
{
Size aBoxSize = pParentWin->GetSizePixel();
@@ -739,10 +739,10 @@ void ViewTabListBox_Impl::Resize()
if ( mbAutoResize )
{
- mbResizeDisabled = sal_True;
+ mbResizeDisabled = true;
SetPosSizePixel( Point( 0, aBarSize.Height() ),
Size( aBoxSize.Width(), aBoxSize.Height() - aBarSize.Height() ) );
- mbResizeDisabled = sal_False;
+ mbResizeDisabled = false;
}
}
@@ -969,7 +969,7 @@ void ViewTabListBox_Impl::DeleteEntries()
sal_Bool ViewTabListBox_Impl::EditedEntry( SvTreeListEntry* pEntry,
const OUString& rNewText )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
OUString aURL;
SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData();
@@ -1016,7 +1016,7 @@ sal_Bool ViewTabListBox_Impl::EditedEntry( SvTreeListEntry* pEntry,
pEntry->SetUserData( pData );
- bRet = sal_True;
+ bRet = true;
}
}
catch( Exception const & )
@@ -1038,14 +1038,14 @@ void ViewTabListBox_Impl::DoQuickSearch( const sal_Unicode& rChar )
maQuickSearchText += OUString(rChar).toAsciiLowerCase();
- sal_Bool bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, sal_False );
+ bool bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, false );
if ( !bFound && ( aLastText.getLength() == 1 ) &&
( aLastText == OUString(rChar) ) )
{
mnSearchIndex = aLastPos + 1;
maQuickSearchText = aLastText;
- bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, sal_True );
+ bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, true );
}
if ( bFound )
@@ -1106,9 +1106,9 @@ OUString ViewTabListBox_Impl::GetAccessibleObjectDescription( ::svt::AccessibleB
}
-sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent )
+bool ViewTabListBox_Impl::Kill( const OUString& rContent )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
try
{
@@ -1118,12 +1118,12 @@ sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent )
catch( ::com::sun::star::ucb::CommandAbortedException const & )
{
DBG_WARNING( "CommandAbortedException" );
- bRet = sal_False;
+ bRet = false;
}
catch( Exception const & )
{
DBG_WARNING( "Any other exception" );
- bRet = sal_False;
+ bRet = false;
}
return bRet;
@@ -1137,7 +1137,7 @@ sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent )
SvtFileView::SvtFileView( Window* pParent, const ResId& rResId,
- sal_Bool bOnlyFolder, sal_Bool bMultiSelection ) :
+ bool bOnlyFolder, bool bMultiSelection ) :
Control( pParent, rResId )
{
@@ -1215,7 +1215,7 @@ void SvtFileView::CreatedFolder( const OUString& rUrl, const OUString& rNewFolde
{
OUString sEntry = mpImp->FolderInserted( rUrl, rNewFolder );
SvTreeListEntry* pEntry = mpImp->mpView->InsertEntry( sEntry, mpImp->maFolderImage, mpImp->maFolderImage );
- SvtContentEntry* pUserData = new SvtContentEntry( rUrl, sal_True );
+ SvtContentEntry* pUserData = new SvtContentEntry( rUrl, true );
pEntry->SetUserData( pUserData );
mpImp->mpView->MakeVisible( pEntry );
}
@@ -1235,9 +1235,9 @@ FileViewResult SvtFileView::PreviousLevel( const FileViewAsyncAction* pAsyncDesc
-sal_Bool SvtFileView::GetParentURL( OUString& rParentURL ) const
+bool SvtFileView::GetParentURL( OUString& rParentURL ) const
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
try
{
::ucbhelper::Content aCnt( mpImp->maViewURL, mpImp->mxCmdEnv, comphelper::getProcessComponentContext() );
@@ -1292,7 +1292,7 @@ void SvtFileView::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
}
-sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, const OUString& rFilter )
+bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, const OUString& rFilter )
{
WaitObject aWaitCursor( this );
@@ -1301,7 +1301,7 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com:
FileViewResult eResult = mpImp->GetFolderContent_Impl( FolderDescriptor( aContent ), NULL );
OSL_ENSURE( eResult != eStillRunning, "SvtFileView::Initialize: this was expected to be synchronous!" );
if ( eResult != eSuccess )
- return sal_False;
+ return false;
mpImp->FilterFolderContent_Impl( rFilter );
@@ -1310,7 +1310,7 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com:
mpImp->OpenFolder_Impl();
mpImp->maOpenDoneLink.Call( this );
- return sal_True;
+ return true;
}
@@ -1356,7 +1356,7 @@ FileViewResult SvtFileView::Initialize(
-sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents )
+bool SvtFileView::Initialize( const Sequence< OUString >& aContents )
{
WaitObject aWaitCursor( this );
@@ -1372,7 +1372,7 @@ sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents )
mpImp->maOpenDoneLink.Call( this );
- return sal_True;
+ return true;
}
@@ -1472,18 +1472,18 @@ void SvtFileView::SetOpenDoneHdl( const Link& rHdl )
}
-void SvtFileView::EnableContextMenu( sal_Bool bEnable )
+void SvtFileView::EnableContextMenu( bool bEnable )
{
mpImp->EnableContextMenu( bEnable );
}
-void SvtFileView::EnableDelete( sal_Bool bEnable )
+void SvtFileView::EnableDelete( bool bEnable )
{
mpImp->EnableDelete( bEnable );
}
-void SvtFileView::EnableNameReplacing( sal_Bool bEnable )
+void SvtFileView::EnableNameReplacing( bool bEnable )
{
mpImp->EnableNameReplacing( bEnable );
}
@@ -1519,7 +1519,7 @@ IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar )
nBits = pBar->GetItemBits( nItemID );
- sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
if ( bUp )
{
@@ -1569,7 +1569,7 @@ OUString SvtFileView::GetConfigString() const
sRet += OUString::number( mpImp->mnSortColumn );
sRet += ";";
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
- sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
sRet += bUp ? OUString("1") : OUString("0");
sRet += ";";
@@ -1595,7 +1595,7 @@ void SvtFileView::SetConfigString( const OUString& rCfgStr )
sal_Int32 nIdx = 0;
mpImp->mnSortColumn = (sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32();
- sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32();
+ bool bUp = (bool)(sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32();
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
if ( bUp )
@@ -1685,7 +1685,7 @@ const OUString* NameTranslator_Impl::GetTransTableFileName() const
// class SvtFileView_Impl
-SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv, sal_Int16 nFlags, sal_Bool bOnlyFolder )
+SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv, sal_Int16 nFlags, bool bOnlyFolder )
:mpAntiImpl ( pAntiImpl )
,m_eAsyncActionResult ( ::svt::ERROR )
@@ -1693,11 +1693,11 @@ SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommand
,m_bAsyncActionCancelled ( false )
,mpNameTrans ( NULL )
,mnSortColumn ( COLUMN_TITLE )
- ,mbAscending ( sal_True )
+ ,mbAscending ( true )
,mbOnlyFolder ( bOnlyFolder )
- ,mbReplaceNames ( sal_False )
+ ,mbReplaceNames ( false )
,mnSuspendSelectCallback ( 0 )
- ,mbIsFirstResort ( sal_True )
+ ,mbIsFirstResort ( true )
,aIntlWrapper ( Application::GetSettings().GetLanguageTag() )
,maFolderImage ( SvtResId( IMG_SVT_FOLDER ) )
,mxCmdEnv ( xEnv )
@@ -1858,7 +1858,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter )
{
- sal_Bool bHideTransFile = mbReplaceNames && mpNameTrans;
+ bool bHideTransFile = mbReplaceNames && mpNameTrans;
OUString sHideEntry;
if( bHideTransFile )
@@ -1870,7 +1870,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter )
sHideEntry = sHideEntry.toAsciiUpperCase();
}
else
- bHideTransFile = sal_False;
+ bHideTransFile = false;
}
if ( !bHideTransFile &&
@@ -1908,10 +1908,10 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter )
// normalize the content title (we always match case-insensitive)
// 91872 - 11.09.2001 - frank.schoenheit@sun.com
sCompareString = (*aContentLoop)->GetFileName(); // filter works on file name, not on title!
- sal_Bool bDelete;
+ bool bDelete;
if( bHideTransFile && sCompareString == sHideEntry )
- bDelete = sal_True;
+ bDelete = true;
else
{
// search for the first filter which matches
@@ -2247,7 +2247,7 @@ void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList )
}
-void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending )
+void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, bool bAscending )
{
::osl::MutexGuard aGuard( maMutex );
@@ -2282,30 +2282,30 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending )
}
}
else
- mbIsFirstResort = sal_False;
+ mbIsFirstResort = false;
}
-static sal_Bool gbAscending = sal_True;
+static bool gbAscending = true;
static sal_Int16 gnColumn = COLUMN_TITLE;
static const CollatorWrapper* pCollatorWrapper = NULL;
/* this functions returns true, if aOne is less then aTwo
*/
-sal_Bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl* const aTwo )
+bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl* const aTwo )
{
DBG_ASSERT( pCollatorWrapper, "*CompareSortingData_Impl(): Can't work this way!" );
- sal_Int32 nComp;
- sal_Bool bRet = sal_False;
- sal_Bool bEqual = sal_False;
+ sal_Int32 nComp;
+ bool bRet = false;
+ bool bEqual = false;
if ( aOne->mbIsFolder != aTwo->mbIsFolder )
{
if ( aOne->mbIsFolder )
- bRet = sal_True;
+ bRet = true;
else
- bRet = sal_False;
+ bRet = false;
// !!! pb: #100376# folder always on top
if ( !gbAscending )
@@ -2323,47 +2323,47 @@ sal_Bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl
nComp = pCollatorWrapper->compareString( aOne->GetTitle(), aTwo->GetTitle() );
if ( nComp < 0 )
- bRet = sal_True;
+ bRet = true;
else if ( nComp > 0 )
- bRet = sal_False;
+ bRet = false;
else
- bEqual = sal_True;
+ bEqual = true;
break;
case COLUMN_TYPE:
nComp = pCollatorWrapper->compareString( aOne->maType, aTwo->maType );
if ( nComp < 0 )
- bRet = sal_True;
+ bRet = true;
else if ( nComp > 0 )
- bRet = sal_False;
+ bRet = false;
else
- bEqual = sal_True;
+ bEqual = true;
break;
case COLUMN_SIZE:
if ( aOne->maSize < aTwo->maSize )
- bRet = sal_True;
+ bRet = true;
else if ( aOne->maSize > aTwo->maSize )
- bRet = sal_False;
+ bRet = false;
else
- bEqual = sal_True;
+ bEqual = true;
break;
case COLUMN_DATE:
if ( aOne->maModDate < aTwo->maModDate )
- bRet = sal_True;
+ bRet = true;
else if ( aOne->maModDate > aTwo->maModDate )
- bRet = sal_False;
+ bRet = false;
else
- bEqual = sal_True;
+ bEqual = true;
break;
default:
DBG_WARNING( "CompareSortingData_Impl: Compare unknown type!" );
- bRet = sal_False;
+ bRet = false;
}
}
// when the two elements are equal, we must not return sal_True (which would
// happen if we just return ! ( a < b ) when not sorting ascending )
if ( bEqual )
- return sal_False;
+ return false;
return gbAscending ? bRet : !bRet;
}
@@ -2494,7 +2494,7 @@ sal_uLong SvtFileView_Impl::GetEntryPos( const OUString& rURL )
}
-sal_Bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& rTitle, sal_Bool bWrapAround )
+bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& rTitle, bool bWrapAround )
{
::osl::MutexGuard aGuard( maMutex );
@@ -2504,7 +2504,7 @@ sal_Bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString&
{
SortingData_Impl* pData = maContent[ nIndex ];
if ( rTitle.compareTo( pData->GetLowerTitle(), rTitle.getLength() ) == 0 )
- return sal_True;
+ return true;
nIndex += 1;
}
@@ -2515,12 +2515,12 @@ sal_Bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString&
{
SortingData_Impl* pData = maContent[ nIndex ];
if ( rTitle.compareTo( pData->GetLowerTitle(), rTitle.getLength() ) == 0 )
- return sal_True;
+ return true;
nIndex += 1;
}
}
- return sal_False;
+ return false;
}
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 9349a3fce4e8..5032b0c5a09a 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -419,8 +419,8 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( SvtTemplateWindow* pParent ) :
aFileView.SetHelpId( HID_TEMPLATEDLG_FILEVIEW );
aFileView.Show();
aFileView.EnableAutoResize();
- aFileView.EnableContextMenu( sal_False );
- aFileView.EnableDelete( sal_False );
+ aFileView.EnableContextMenu( false );
+ aFileView.EnableDelete( false );
}
SvtFileViewWindow_Impl::~SvtFileViewWindow_Impl()
@@ -530,7 +530,7 @@ void SvtFileViewWindow_Impl::OpenFolder( const OUString& rURL )
if ( INetURLObject( rURL ).GetProtocol() == INET_PROT_PRIVATE )
{
- aFileView.EnableNameReplacing( sal_False );
+ aFileView.EnableNameReplacing( false );
aFileView.Initialize( GetNewDocContents() );
}
else
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 8155673e5d2b..2fd68d6e04bf 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -43,7 +43,7 @@ FileControl::FileControl( Window* pParent, WinBits nStyle, FileControlMode nFlag
mnInternalFlags( FILECTRL_ORIGINALBUTTONTEXT )
{
maButton.SetClickHdl( LINK( this, FileControl, ButtonHdl ) );
- mbOpenDlg = sal_True;
+ mbOpenDlg = true;
maButton.Show();
maEdit.Show();
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 2d2d125b7e7a..e31bc1187ee4 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -82,10 +82,10 @@ namespace validation
public:
NumberValidator( const sal_Unicode _cThSep, const sal_Unicode _cDecSep );
- sal_Bool isValidNumericFragment( const OUString& _rText );
+ bool isValidNumericFragment( const OUString& _rText );
private:
- sal_Bool implValidateNormalized( const OUString& _rText );
+ bool implValidateNormalized( const OUString& _rText );
};
static void lcl_insertStopTransition( StateTransitions& _rRow )
@@ -212,7 +212,7 @@ namespace validation
}
}
- sal_Bool NumberValidator::implValidateNormalized( const OUString& _rText )
+ bool NumberValidator::implValidateNormalized( const OUString& _rText )
{
const sal_Unicode* pCheckPos = _rText.getStr();
State eCurrentState = START;
@@ -251,11 +251,11 @@ namespace validation
return ( END == eCurrentState );
}
- sal_Bool NumberValidator::isValidNumericFragment( const OUString& _rText )
+ bool NumberValidator::isValidNumericFragment( const OUString& _rText )
{
if ( _rText.isEmpty() )
// empty strings are always allowed
- return sal_True;
+ return true;
// normalize the string
OUString sNormalized( "_" );
@@ -297,31 +297,28 @@ FormattedField::StaticFormatter::~StaticFormatter()
}
-#define INIT_MEMBERS() \
- m_aLastSelection(0,0) \
- ,m_dMinValue(0) \
- ,m_dMaxValue(0) \
- ,m_bHasMin(sal_False) \
- ,m_bHasMax(sal_False) \
- ,m_bStrictFormat(sal_True) \
- ,m_bValueDirty(sal_True) \
- ,m_bEnableEmptyField(sal_True) \
- ,m_bAutoColor(sal_False) \
- ,m_bEnableNaN(sal_False) \
- ,m_dCurrentValue(0) \
- ,m_dDefaultValue(0) \
- ,m_nFormatKey(0) \
- ,m_pFormatter(NULL) \
- ,m_dSpinSize(1) \
- ,m_dSpinFirst(-1000000) \
- ,m_dSpinLast(1000000) \
- ,m_bTreatAsNumber(sal_True) \
- ,m_pLastOutputColor(NULL) \
- ,m_bUseInputStringForFormatting(false)
-
FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey)
:SpinField(pParent, nStyle)
- ,INIT_MEMBERS()
+ ,m_aLastSelection(0,0)
+ ,m_dMinValue(0)
+ ,m_dMaxValue(0)
+ ,m_bHasMin(false)
+ ,m_bHasMax(false)
+ ,m_bStrictFormat(true)
+ ,m_bValueDirty(true)
+ ,m_bEnableEmptyField(true)
+ ,m_bAutoColor(false)
+ ,m_bEnableNaN(false)
+ ,m_dCurrentValue(0)
+ ,m_dDefaultValue(0)
+ ,m_nFormatKey(0)
+ ,m_pFormatter(NULL)
+ ,m_dSpinSize(1)
+ ,m_dSpinFirst(-1000000)
+ ,m_dSpinLast(1000000)
+ ,m_bTreatAsNumber(true)
+ ,m_pLastOutputColor(NULL)
+ ,m_bUseInputStringForFormatting(false)
{
if (pInitialFormatter)
@@ -345,14 +342,14 @@ void FormattedField::SetText(const OUString& rStr)
{
SpinField::SetText(rStr);
- m_bValueDirty = sal_True;
+ m_bValueDirty = true;
}
void FormattedField::SetText( const OUString& rStr, const Selection& rNewSelection )
{
SpinField::SetText( rStr, rNewSelection );
- m_bValueDirty = sal_True;
+ m_bValueDirty = true;
}
void FormattedField::SetTextFormatted(const OUString& rStr)
@@ -414,7 +411,7 @@ void FormattedField::SetTextFormatted(const OUString& rStr)
else
aNewSel = aSel; // don't use the justified version
SpinField::SetText(sFormatted, aNewSel);
- m_bValueDirty = sal_False;
+ m_bValueDirty = false;
}
OUString FormattedField::GetTextValue() const
@@ -422,12 +419,12 @@ OUString FormattedField::GetTextValue() const
if (m_bValueDirty)
{
((FormattedField*)this)->m_sCurrentTextValue = GetText();
- ((FormattedField*)this)->m_bValueDirty = sal_False;
+ ((FormattedField*)this)->m_bValueDirty = false;
}
return m_sCurrentTextValue;
}
-void FormattedField::EnableNotANumber( sal_Bool _bEnable )
+void FormattedField::EnableNotANumber( bool _bEnable )
{
if ( m_bEnableNaN == _bEnable )
return;
@@ -435,7 +432,7 @@ void FormattedField::EnableNotANumber( sal_Bool _bEnable )
m_bEnableNaN = _bEnable;
}
-void FormattedField::SetAutoColor(sal_Bool _bAutomatic)
+void FormattedField::SetAutoColor(bool _bAutomatic)
{
if (_bAutomatic == m_bAutoColor)
return;
@@ -456,7 +453,7 @@ void FormattedField::impl_Modify(bool makeValueDirty)
if (!IsStrictFormat())
{
if(makeValueDirty)
- m_bValueDirty = sal_True;
+ m_bValueDirty = true;
SpinField::Modify();
return;
}
@@ -467,7 +464,7 @@ void FormattedField::impl_Modify(bool makeValueDirty)
m_sLastValidText = sCheck;
m_aLastSelection = GetSelection();
if(makeValueDirty)
- m_bValueDirty = sal_True;
+ m_bValueDirty = true;
}
else
{
@@ -530,7 +527,7 @@ void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel)
SpinField::SetText(rNew, aSel);
}
- m_bValueDirty = sal_True; // not always necessary, but better re-evaluate for safety reasons
+ m_bValueDirty = true; // not always necessary, but better re-evaluate for safety reasons
}
bool FormattedField::PreNotify(NotifyEvent& rNEvt)
@@ -544,7 +541,7 @@ void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey)
{
m_nFormatKey = nFormatKey;
- sal_Bool bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0);
+ bool bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0);
if (bNeedFormatter)
{
ImplGetFormatter(); // this creates a standard formatter
@@ -561,12 +558,12 @@ void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey)
void FormattedField::SetFormatKey(sal_uLong nFormatKey)
{
- sal_Bool bNoFormatter = (m_pFormatter == NULL);
+ bool bNoFormatter = (m_pFormatter == NULL);
ImplSetFormatKey(nFormatKey);
FormatChanged((bNoFormatter && (m_pFormatter != NULL)) ? FCT_FORMATTER : FCT_KEYONLY);
}
-void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bResetFormat)
+void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, bool bResetFormat)
{
if (bResetFormat)
@@ -618,7 +615,7 @@ OUString FormattedField::GetFormat(LanguageType& eLang) const
return sFormatString;
}
-sal_Bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType eLang)
+bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType eLang)
{
sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang);
if (nNewKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
@@ -627,16 +624,16 @@ sal_Bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType e
short nType;
OUString rFormat(rFormatString);
if (!ImplGetFormatter()->PutEntry(rFormat, nCheckPos, nType, nNewKey, eLang))
- return sal_False;
+ return false;
DBG_ASSERT(nNewKey != NUMBERFORMAT_ENTRY_NOT_FOUND, "FormattedField::SetFormatString : PutEntry returned an invalid key !");
}
if (nNewKey != m_nFormatKey)
SetFormatKey(nNewKey);
- return sal_True;
+ return true;
}
-sal_Bool FormattedField::GetThousandsSep() const
+bool FormattedField::GetThousandsSep() const
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::GetThousandsSep : Are you sure what you are doing when setting the precision of a text format?");
@@ -648,7 +645,7 @@ sal_Bool FormattedField::GetThousandsSep() const
return bThousand;
}
-void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator)
+void FormattedField::SetThousandsSep(bool _bUseSeparator)
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::SetThousandsSep : Are you sure what you are doing when setting the precision of a text format?");
@@ -756,7 +753,7 @@ void FormattedField::ReFormat()
double dValue = GetValue();
if ( m_bEnableNaN && ::rtl::math::isNan( dValue ) )
return;
- ImplSetValue( dValue, sal_True );
+ ImplSetValue( dValue, true );
}
else
SetTextFormatted(GetTextValue());
@@ -810,7 +807,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt)
{
if (TreatingAsNumber())
{
- ImplSetValue(m_dCurrentValue, sal_True);
+ ImplSetValue(m_dCurrentValue, true);
Modify();
}
else
@@ -821,7 +818,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt)
else
SetTextFormatted(m_sDefaultText);
}
- m_bValueDirty = sal_False;
+ m_bValueDirty = false;
}
}
else
@@ -838,7 +835,7 @@ void FormattedField::SetMinValue(double dMin)
DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMinValue : only to be used in numeric mode !");
m_dMinValue = dMin;
- m_bHasMin = sal_True;
+ m_bHasMin = true;
// for checking the current value at the new border -> ImplSetValue
ReFormat();
}
@@ -848,7 +845,7 @@ void FormattedField::SetMaxValue(double dMax)
DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMaxValue : only to be used in numeric mode !");
m_dMaxValue = dMax;
- m_bHasMax = sal_True;
+ m_bHasMax = true;
// for checking the current value at the new border -> ImplSetValue
ReFormat();
}
@@ -859,17 +856,17 @@ void FormattedField::SetTextValue(const OUString& rText)
ReFormat();
}
-void FormattedField::EnableEmptyField(sal_Bool bEnable)
+void FormattedField::EnableEmptyField(bool bEnable)
{
if (bEnable == m_bEnableEmptyField)
return;
m_bEnableEmptyField = bEnable;
if (!m_bEnableEmptyField && GetText().isEmpty())
- ImplSetValue(m_dCurrentValue, sal_True);
+ ImplSetValue(m_dCurrentValue, true);
}
-void FormattedField::ImplSetValue(double dVal, sal_Bool bForce)
+void FormattedField::ImplSetValue(double dVal, bool bForce)
{
if (m_bHasMin && (dVal<m_dMinValue))
@@ -881,7 +878,7 @@ void FormattedField::ImplSetValue(double dVal, sal_Bool bForce)
DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplSetValue : can't set a value without a formatter !");
- m_bValueDirty = sal_False;
+ m_bValueDirty = false;
m_dCurrentValue = dVal;
OUString sNewText;
@@ -906,21 +903,21 @@ void FormattedField::ImplSetValue(double dVal, sal_Bool bForce)
}
ImplSetTextImpl(sNewText, NULL);
- m_bValueDirty = sal_False;
+ m_bValueDirty = false;
DBG_ASSERT(CheckText(sNewText), "FormattedField::ImplSetValue : formatted string doesn't match the criteria !");
}
-sal_Bool FormattedField::ImplGetValue(double& dNewVal)
+bool FormattedField::ImplGetValue(double& dNewVal)
{
dNewVal = m_dCurrentValue;
if (!m_bValueDirty)
- return sal_True;
+ return true;
dNewVal = m_dDefaultValue;
OUString sText(GetText());
if (sText.isEmpty())
- return sal_True;
+ return true;
DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplGetValue : can't give you a current value without a formatter !");
@@ -949,13 +946,13 @@ sal_Bool FormattedField::ImplGetValue(double& dNewVal)
// which equals 300 percent.
}
if (!ImplGetFormatter()->IsNumberFormat(sText, nFormatKey, dNewVal))
- return sal_False;
+ return false;
if (m_bHasMin && (dNewVal<m_dMinValue))
dNewVal = m_dMinValue;
if (m_bHasMax && (dNewVal>m_dMaxValue))
dNewVal = m_dMaxValue;
- return sal_True;
+ return true;
}
void FormattedField::SetValue(double dVal)
@@ -974,7 +971,7 @@ double FormattedField::GetValue()
m_dCurrentValue = m_dDefaultValue;
}
- m_bValueDirty = sal_False;
+ m_bValueDirty = false;
return m_dCurrentValue;
}
@@ -1042,7 +1039,7 @@ void DoubleNumericField::FormatChanged(FORMAT_CHANGE_TYPE nWhat)
FormattedField::FormatChanged(nWhat);
}
-sal_Bool DoubleNumericField::CheckText(const OUString& sText) const
+bool DoubleNumericField::CheckText(const OUString& sText) const
{
// We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't
// recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10")
@@ -1076,9 +1073,9 @@ void DoubleNumericField::ResetConformanceTester()
DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle)
:FormattedField(pParent, nStyle)
- ,m_bChangingFormat(sal_False)
+ ,m_bChangingFormat(false)
{
- m_bPrependCurrSym = sal_False;
+ m_bPrependCurrSym = false;
// initialize with a system currency format
m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol();
@@ -1122,7 +1119,7 @@ void DoubleCurrencyField::setCurrencySymbol(const OUString& rSymbol)
FormatChanged(FCT_CURRENCY_SYMBOL);
}
-void DoubleCurrencyField::setPrependCurrSym(sal_Bool _bPrepend)
+void DoubleCurrencyField::setPrependCurrSym(bool _bPrepend)
{
if (m_bPrependCurrSym == _bPrepend)
return;
@@ -1137,7 +1134,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
// the old settings
LanguageType eLanguage;
GetFormat(eLanguage);
- sal_Bool bThSep = GetThousandsSep();
+ bool bThSep = GetThousandsSep();
sal_uInt16 nDigits = GetDecimalDigits();
// build a new format string with the base class' and my own settings
@@ -1202,9 +1199,9 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
}
// set this new basic format
- m_bChangingFormat = sal_True;
+ m_bChangingFormat = true;
SetFormat(sNewFormat.makeStringAndClear(), eLanguage);
- m_bChangingFormat = sal_False;
+ m_bChangingFormat = false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx
index 242f212f772f..cdbcf2c56a1a 100644
--- a/svtools/source/uno/framestatuslistener.cxx
+++ b/svtools/source/uno/framestatuslistener.cxx
@@ -40,8 +40,8 @@ FrameStatusListener::FrameStatusListener(
const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& xFrame ) :
OWeakObject()
- , m_bInitialized( sal_True )
- , m_bDisposed( sal_False )
+ , m_bInitialized( true )
+ , m_bDisposed( false )
, m_xFrame( xFrame )
, m_xContext( rxContext )
{
@@ -111,7 +111,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception)
++pIter;
}
- m_bDisposed = sal_True;
+ m_bDisposed = true;
}
void SAL_CALL FrameStatusListener::addEventListener( const Reference< XEventListener >& )
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index d37b052387eb..675ffd5f281e 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -827,7 +827,7 @@ void SVTXFormattedField::SetWindow( Window* _pWindow )
{
VCLXSpinField::SetWindow(_pWindow);
if (GetFormattedField())
- GetFormattedField()->SetAutoColor(sal_True);
+ GetFormattedField()->SetAutoColor(true);
}
@@ -1191,7 +1191,7 @@ void SVTXFormattedField::SetDefaultValue(const ::com::sun::star::uno::Any& rValu
}
break;
default:
- pField->EnableEmptyField(sal_True);
+ pField->EnableEmptyField(true);
// nur noch void erlaubt
break;
}
@@ -1323,7 +1323,7 @@ void SVTXFormattedField::setFormatsSupplier(const ::com::sun::star::uno::Referen
{
// save the actual value
::com::sun::star::uno::Any aCurrent = GetValue();
- pField->SetFormatter(m_pCurrentSupplier->GetNumberFormatter(), sal_False);
+ pField->SetFormatter(m_pCurrentSupplier->GetNumberFormatter(), false);
if (nKeyToSetDelayed != -1)
{
pField->SetFormatKey(nKeyToSetDelayed);