From b7d30cb50ede0752f1ee194655f925c77e06879a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 8 May 2014 11:42:56 +0200 Subject: svtools: sal_Bool->bool Change-Id: Idd9a3ccf0eb6d14cec158daa17a6b2da625f7ffa --- svtools/source/brwbox/brwbox1.cxx | 2 +- svtools/source/brwbox/brwbox2.cxx | 4 +- svtools/source/brwbox/datwin.cxx | 18 +- svtools/source/brwbox/datwin.hxx | 30 +- svtools/source/config/accessibilityoptions.cxx | 18 +- svtools/source/config/apearcfg.cxx | 2 +- svtools/source/config/extcolorcfg.cxx | 56 +-- svtools/source/config/helpopt.cxx | 2 +- svtools/source/config/itemholder2.cxx | 4 +- svtools/source/config/menuoptions.cxx | 4 +- svtools/source/contnr/contentenumeration.cxx | 18 +- svtools/source/contnr/contentenumeration.hxx | 36 +- svtools/source/contnr/fileview.cxx | 14 +- svtools/source/contnr/imivctl.hxx | 166 +++---- svtools/source/contnr/imivctl1.cxx | 536 ++++++++++----------- svtools/source/contnr/imivctl2.cxx | 32 +- svtools/source/contnr/templwin.cxx | 44 +- svtools/source/contnr/templwin.hxx | 32 +- svtools/source/control/toolbarmenu.cxx | 4 +- svtools/source/control/toolbarmenuimp.hxx | 2 +- svtools/source/control/valueacc.cxx | 14 +- svtools/source/control/valueimp.hxx | 4 +- svtools/source/dialogs/ServerDetailsControls.cxx | 6 +- svtools/source/dialogs/addresstemplate.cxx | 40 +- svtools/source/dialogs/mcvmath.hxx | 4 +- svtools/source/dialogs/roadmapwizard.cxx | 6 +- svtools/source/edit/editsyntaxhighlighter.cxx | 2 +- svtools/source/filter/SvFilterOptionsDialog.cxx | 6 +- svtools/source/filter/exportdialog.cxx | 28 +- svtools/source/filter/exportdialog.hxx | 14 +- svtools/source/graphic/descriptor.cxx | 6 +- svtools/source/graphic/grfcache.cxx | 52 +- svtools/source/graphic/grfcache.hxx | 16 +- svtools/source/graphic/provider.cxx | 2 +- svtools/source/hatchwindow/documentcloser.cxx | 6 +- svtools/source/hatchwindow/ipwin.cxx | 22 +- svtools/source/hatchwindow/ipwin.hxx | 10 +- svtools/source/inc/unoiface.hxx | 8 +- svtools/source/misc/acceleratorexecute.cxx | 12 +- svtools/source/misc/ehdl.cxx | 4 +- svtools/source/misc/embedhlp.cxx | 18 +- svtools/source/misc/embedtransfer.cxx | 4 +- svtools/source/misc/openfiledroptargetlistener.cxx | 6 +- svtools/source/misc/transfer.cxx | 2 +- svtools/source/svrtf/svparser.cxx | 14 +- svtools/source/uno/addrtempuno.cxx | 6 +- svtools/source/uno/generictoolboxcontroller.cxx | 6 +- svtools/source/uno/popupmenucontrollerbase.cxx | 2 +- svtools/source/uno/svtxgridcontrol.cxx | 18 +- svtools/source/uno/toolboxcontroller.cxx | 6 +- svtools/source/uno/treecontrolpeer.cxx | 12 +- svtools/source/uno/treecontrolpeer.hxx | 4 +- svtools/source/uno/unoevent.cxx | 22 +- svtools/source/uno/unoiface.cxx | 38 +- svtools/source/uno/unoimap.cxx | 10 +- svtools/source/uno/wizard/wizardshell.cxx | 2 +- svtools/source/uno/wizard/wizardshell.hxx | 12 +- 57 files changed, 734 insertions(+), 734 deletions(-) (limited to 'svtools/source') diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 051ce1a17394..d529c49c11f8 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -338,7 +338,7 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, bool bFreeze ) return; // doesn't the state change? - if ( (*pCols)[ nItemPos ]->IsFrozen() == (bFreeze ? 1 : 0) ) + if ( (*pCols)[ nItemPos ]->IsFrozen() == bFreeze ) return; // remark the column selection diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index ef7bcd41c779..33e4935b5dd2 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -676,7 +676,7 @@ void BrowseBox::Paint( const Rectangle& rRect ) { ButtonFrame aButtonFrame( Point( nX, 0 ), Size( pCol->Width()-1, GetTitleHeight()-1 ), - pCol->Title(), sal_False, sal_False, !IsEnabled()); + pCol->Title(), false, false, !IsEnabled()); aButtonFrame.Draw( *this ); DrawLine( Point( nX + pCol->Width() - 1, 0 ), Point( nX + pCol->Width() - 1, GetTitleHeight()-1 ) ); @@ -810,7 +810,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, { ButtonFrame aButtonFrame( aRealPos, Size( pFirstCol->Width()-1, nTitleHeight-1 ), - pFirstCol->Title(), sal_False, sal_False, !IsEnabled()); + pFirstCol->Title(), false, false, !IsEnabled()); aButtonFrame.Draw( *pDev ); pDev->Push( PUSH_LINECOLOR ); diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index a85d104d6715..3a4b87107a17 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -64,7 +64,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) OUString aVal = rDev.GetEllipsisString(aText,aInnerRect.GetWidth() - 2*MIN_COLUMNWIDTH); Font aFont( rDev.GetFont() ); - sal_Bool bOldTransp = aFont.IsTransparent(); + bool bOldTransp = aFont.IsTransparent(); if ( !bOldTransp ) { aFont.SetTransparent( true ); @@ -109,7 +109,7 @@ BrowserColumn::BrowserColumn( sal_uInt16 nItemId, const class Image &rImage, _nWidth( nWidthPixel ), _aImage( rImage ), _aTitle( rTitle ), - _bFrozen( sal_False ) + _bFrozen( false ) { double n = (double)_nWidth; n *= (double)rCurrentZoom.GetDenominator(); @@ -140,7 +140,7 @@ void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos { // paint handle column ButtonFrame( rPos, Size( Width()-1, rBox.GetDataRowHeight()-1 ), - "", sal_False, bCurs, false ).Draw( rDev ); + "", false, bCurs, false ).Draw( rDev ); Color aOldLineColor = rDev.GetLineColor(); rDev.SetLineColor( Color( COL_BLACK ) ); rDev.DrawLine( @@ -243,7 +243,7 @@ void BrowserDataWin::LeaveUpdateLock() void InitSettings_Impl( Window *pWin, - sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) + bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings(); @@ -290,9 +290,9 @@ void BrowserDataWin::DataChanged( const DataChangedEvent& rDCEvt ) { if( !bOwnDataChangedHdl ) { - InitSettings_Impl( this, sal_True, sal_True, sal_True ); + InitSettings_Impl( this, true, true, true ); Invalidate(); - InitSettings_Impl( GetParent(), sal_True, sal_True, sal_True ); + InitSettings_Impl( GetParent(), true, true, true ); GetParent()->Invalidate(); GetParent()->Resize(); } @@ -437,7 +437,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) -sal_Bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) +bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) { if ( ! ( GetParent()->IsInteractiveRowHeightEnabled() && ( _rEvent.GetRow() >= 0 ) @@ -445,7 +445,7 @@ sal_Bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent && ( _rEvent.GetColumnId() == BrowseBox::HandleColumnId ) ) ) - return sal_False; + return false; long nDividerDistance = GetParent()->GetDataRowHeight() - ( _rEvent.GetPosPixel().Y() % GetParent()->GetDataRowHeight() ); return ( nDividerDistance <= 4 ); @@ -668,7 +668,7 @@ BrowserExecuteDropEvent::BrowserExecuteDropEvent( BrowserDataWin *pWindow, const -void BrowserDataWin::SetUpdateMode( sal_Bool bMode ) +void BrowserDataWin::SetUpdateMode( bool bMode ) { DBG_ASSERT( !bUpdateMode || aInvalidRegion.empty(), "invalid region not empty" ); if ( (bool) bMode == bUpdateMode ) diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index 04a912a518fd..7a62677434c1 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -40,16 +40,16 @@ class ButtonFrame Rectangle aRect; Rectangle aInnerRect; OUString aText; - sal_Bool bPressed; - sal_Bool bCurs; - sal_Bool m_bDrawDisabled; + bool bPressed; + bool bCurs; + bool m_bDrawDisabled; public: ButtonFrame( const Point& rPt, const Size& rSz, const OUString &rText, - sal_Bool bPress, - sal_Bool bCursor, - sal_Bool _bDrawDisabled) + bool bPress, + bool bCursor, + bool _bDrawDisabled) :aRect( rPt, rSz ) ,aInnerRect( Point( aRect.Left()+1, aRect.Top()+1 ), Size( aRect.GetWidth()-2, aRect.GetHeight()-2 ) ) @@ -67,12 +67,12 @@ public: class BrowserColumn { - sal_uInt16 _nId; - sal_uLong _nOriginalWidth; - sal_uLong _nWidth; + sal_uInt16 _nId; + sal_uLong _nOriginalWidth; + sal_uLong _nWidth; Image _aImage; OUString _aTitle; - sal_Bool _bFrozen; + bool _bFrozen; public: BrowserColumn( sal_uInt16 nItemId, const Image &rImage, @@ -85,8 +85,8 @@ public: Image& GetImage() { return _aImage; } OUString& Title() { return _aTitle; } - sal_Bool IsFrozen() const { return _bFrozen; } - void Freeze( sal_Bool bFreeze = sal_True ) { _bFrozen = bFreeze; } + bool IsFrozen() const { return _bFrozen; } + void Freeze( bool bFreeze = true ) { _bFrozen = bFreeze; } virtual void Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos, sal_Bool bCurs ); @@ -165,7 +165,7 @@ public: { return (BrowseBox*) Window::GetParent(); } const OUString& GetRealRowCount() const { return aRealRowCount; } - void SetUpdateMode( sal_Bool bMode ); + void SetUpdateMode( bool bMode ); bool GetUpdateMode() const { return bUpdateMode; } void EnterUpdateLock() { ++nUpdateLock; } void LeaveUpdateLock(); @@ -178,7 +178,7 @@ public: protected: void StartRowDividerDrag( const Point& _rStartPos ); - sal_Bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ); + bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ); }; @@ -215,7 +215,7 @@ public: void InitSettings_Impl( Window *pWin, - sal_Bool bFont = sal_True, sal_Bool bForeground = sal_True, sal_Bool bBackground = sal_True ); + bool bFont = true, bool bForeground = true, bool bBackground = true ); diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index 45779996415d..5f9407e3ce78 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -144,7 +144,7 @@ SvtAccessibilityOptions_Impl::~SvtAccessibilityOptions_Impl() bool SvtAccessibilityOptions_Impl::GetAutoDetectSystemHC() { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_True; + bool bRet = true; try { @@ -162,7 +162,7 @@ bool SvtAccessibilityOptions_Impl::GetAutoDetectSystemHC() bool SvtAccessibilityOptions_Impl::GetIsForPagePreviews() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_True; + bool bRet = true; try { @@ -179,7 +179,7 @@ bool SvtAccessibilityOptions_Impl::GetIsForPagePreviews() const bool SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_True; + bool bRet = true; try { @@ -197,7 +197,7 @@ bool SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_True; + bool bRet = true; try { @@ -215,7 +215,7 @@ bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedText() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_True; + bool bRet = true; try { @@ -233,7 +233,7 @@ bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedText() const bool SvtAccessibilityOptions_Impl::GetIsAutomaticFontColor() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_False; + bool bRet = false; try { @@ -251,7 +251,7 @@ bool SvtAccessibilityOptions_Impl::GetIsAutomaticFontColor() const bool SvtAccessibilityOptions_Impl::GetIsSystemFont() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_True; + bool bRet = true; try { @@ -287,7 +287,7 @@ sal_Int16 SvtAccessibilityOptions_Impl::GetHelpTipSeconds() const bool SvtAccessibilityOptions_Impl::IsSelectionInReadonly() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_False; + bool bRet = false; try { @@ -359,7 +359,7 @@ sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const bool SvtAccessibilityOptions_Impl::GetPreviewUsesCheckeredBackground() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - sal_Bool bRet = sal_False; + bool bRet = false; try { diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index 3c2a70e15c63..89f5a0e956c6 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -168,7 +168,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // SetStandard...Styles() resets the UseSystemUIFonts flag, // but we don't want to change it now, so save the flag before ... - sal_Bool bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts(); + bool bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts(); hAppStyle.SetStandardStyles(); // and set it here hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts ); diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index 770452dd4f29..a7f0ed205a8e 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -68,23 +68,23 @@ class ExtendedColorConfig_Impl : public utl::ConfigItem, public SfxBroadcaster TDisplayNames m_aComponentDisplayNames; ::std::vector m_aConfigValuesPos; - sal_Bool m_bEditMode; - OUString m_sLoadedScheme; - sal_Bool m_bIsBroadcastEnabled; - static sal_Bool m_bLockBroadcast; - static sal_Bool m_bBroadcastWhenUnlocked; + bool m_bEditMode; + OUString m_sLoadedScheme; + bool m_bIsBroadcastEnabled; + static bool m_bLockBroadcast; + static bool m_bBroadcastWhenUnlocked; uno::Sequence< OUString> GetPropertyNames(const OUString& rScheme); void FillComponentColors(uno::Sequence < OUString >& _rComponents,const TDisplayNames& _rDisplayNames); public: - ExtendedColorConfig_Impl(sal_Bool bEditMode = sal_False); + ExtendedColorConfig_Impl(bool bEditMode = false); virtual ~ExtendedColorConfig_Impl(); void Load(const OUString& rScheme); void CommitCurrentSchemeName(); //changes the name of the current scheme but doesn't load it! void SetCurrentSchemeName(const OUString& rSchemeName) {m_sLoadedScheme = rSchemeName;} - sal_Bool ExistsScheme(const OUString& _sSchemeName); + bool ExistsScheme(const OUString& _sSchemeName); virtual void Commit() SAL_OVERRIDE; virtual void Notify( const uno::Sequence& aPropertyNames) SAL_OVERRIDE; @@ -116,15 +116,15 @@ public: void SetColorConfigValue(const OUString& _sName, const ExtendedColorConfigValue& rValue ); - sal_Bool AddScheme(const OUString& rNode); - sal_Bool RemoveScheme(const OUString& rNode); + bool AddScheme(const OUString& rNode); + bool RemoveScheme(const OUString& rNode); void SetModified(){ConfigItem::SetModified();} void ClearModified(){ConfigItem::ClearModified();} void SettingsChanged(); static void DisableBroadcast(); static void EnableBroadcast(); - static sal_Bool IsEnableBroadcast(); + static bool IsEnableBroadcast(); static void LockBroadcast(); static void UnlockBroadcast(); @@ -192,12 +192,12 @@ OUString ExtendedColorConfig_Impl::GetComponentName(sal_uInt32 _nPos) const return sRet; } -sal_Bool ExtendedColorConfig_Impl::m_bLockBroadcast = sal_False; -sal_Bool ExtendedColorConfig_Impl::m_bBroadcastWhenUnlocked = sal_False; -ExtendedColorConfig_Impl::ExtendedColorConfig_Impl(sal_Bool bEditMode) : +bool ExtendedColorConfig_Impl::m_bLockBroadcast = false; +bool ExtendedColorConfig_Impl::m_bBroadcastWhenUnlocked = false; +ExtendedColorConfig_Impl::ExtendedColorConfig_Impl(bool bEditMode) : ConfigItem(OUString("Office.ExtendedColorScheme")), m_bEditMode(bEditMode), - m_bIsBroadcastEnabled(sal_True) + m_bIsBroadcastEnabled(true) { if(!m_bEditMode) { @@ -221,18 +221,18 @@ ExtendedColorConfig_Impl::~ExtendedColorConfig_Impl() void ExtendedColorConfig_Impl::DisableBroadcast() { if ( ExtendedColorConfig::m_pImpl ) - ExtendedColorConfig::m_pImpl->m_bIsBroadcastEnabled = sal_False; + ExtendedColorConfig::m_pImpl->m_bIsBroadcastEnabled = false; } void ExtendedColorConfig_Impl::EnableBroadcast() { if ( ExtendedColorConfig::m_pImpl ) - ExtendedColorConfig::m_pImpl->m_bIsBroadcastEnabled = sal_True; + ExtendedColorConfig::m_pImpl->m_bIsBroadcastEnabled = true; } -sal_Bool ExtendedColorConfig_Impl::IsEnableBroadcast() +bool ExtendedColorConfig_Impl::IsEnableBroadcast() { - return ExtendedColorConfig::m_pImpl ? ExtendedColorConfig::m_pImpl->m_bIsBroadcastEnabled : sal_False; + return ExtendedColorConfig::m_pImpl && ExtendedColorConfig::m_pImpl->m_bIsBroadcastEnabled; } void lcl_addString(uno::Sequence < OUString >& _rSeq,const OUString& _sAdd) @@ -305,7 +305,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme) OUString sBase("ExtendedColorScheme/ColorSchemes/"); sBase += sScheme; - sal_Bool bFound = ExistsScheme(sScheme); + bool bFound = ExistsScheme(sScheme); if ( bFound ) { aComponentNames = GetPropertyNames(sBase); @@ -406,7 +406,7 @@ void ExtendedColorConfig_Impl::Notify( const uno::Sequence& /*rProp if(m_bLockBroadcast) { - m_bBroadcastWhenUnlocked = sal_True; + m_bBroadcastWhenUnlocked = true; } else Broadcast(SfxSimpleHint(SFX_HINT_COLORS_CHANGED)); @@ -468,7 +468,7 @@ void ExtendedColorConfig_Impl::CommitCurrentSchemeName() PutProperties(aCurrent, aCurrentVal); } -sal_Bool ExtendedColorConfig_Impl::ExistsScheme(const OUString& _sSchemeName) +bool ExtendedColorConfig_Impl::ExistsScheme(const OUString& _sSchemeName) { OUString sBase("ExtendedColorScheme/ColorSchemes"); @@ -493,18 +493,18 @@ void ExtendedColorConfig_Impl::SetColorConfigValue(const OUString& _sName, const } } -sal_Bool ExtendedColorConfig_Impl::AddScheme(const OUString& rScheme) +bool ExtendedColorConfig_Impl::AddScheme(const OUString& rScheme) { if(ConfigItem::AddNode(OUString("ExtendedColorScheme/ColorSchemes"), rScheme)) { m_sLoadedScheme = rScheme; Commit(); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool ExtendedColorConfig_Impl::RemoveScheme(const OUString& rScheme) +bool ExtendedColorConfig_Impl::RemoveScheme(const OUString& rScheme) { uno::Sequence< OUString > aElements(1); aElements.getArray()[0] = rScheme; @@ -520,7 +520,7 @@ void ExtendedColorConfig_Impl::SettingsChanged() void ExtendedColorConfig_Impl::LockBroadcast() { - m_bLockBroadcast = sal_True; + m_bLockBroadcast = true; } void ExtendedColorConfig_Impl::UnlockBroadcast() @@ -532,12 +532,12 @@ void ExtendedColorConfig_Impl::UnlockBroadcast() { if ( ExtendedColorConfig::m_pImpl->IsEnableBroadcast() ) { - m_bBroadcastWhenUnlocked = sal_False; + m_bBroadcastWhenUnlocked = false; ExtendedColorConfig::m_pImpl->Broadcast(SfxSimpleHint(SFX_HINT_COLORS_CHANGED)); } } } - m_bLockBroadcast = sal_False; + m_bLockBroadcast = false; } IMPL_LINK( ExtendedColorConfig_Impl, DataChangedEventListener, VclWindowEvent*, pEvent ) diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index e58d7076d5ea..9f133082b14f 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -160,7 +160,7 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames) #endif if ( pValues[nProp].hasValue() ) { - sal_Bool bTmp = sal_Bool(); + bool bTmp; OUString aTmpStr; sal_Int32 nTmpInt = 0; if ( pValues[nProp] >>= bTmp ) diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx index 451853a718fe..deaf609ff136 100644 --- a/svtools/source/config/itemholder2.cxx +++ b/svtools/source/config/itemholder2.cxx @@ -57,10 +57,10 @@ ItemHolder2::ItemHolder2() #ifdef DBG_UTIL catch(const css::uno::Exception& rEx) { - static sal_Bool bMessage = sal_True; + static bool bMessage = true; if(bMessage) { - bMessage = sal_False; + bMessage = false; OString sMsg("CreateInstance with arguments exception: "); sMsg += OString(rEx.Message.getStr(), rEx.Message.getLength(), diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index 507c48695b01..5c7359b8dfce 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -328,12 +328,12 @@ void SvtMenuOptions_Impl::Commit() break; //Output cache of current setting as possibly modified by System Theme for older version case PROPERTYHANDLE_SHOWICONSINMENUES : { - sal_Bool bValue = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus()); + bool bValue = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus(); seqValues[nProperty] <<= bValue; } break; case PROPERTYHANDLE_SYSTEMICONSINMENUES : { - sal_Bool bValue = (m_eMenuIcons == TRISTATE_INDET ? sal_True : sal_False) ; + bool bValue = m_eMenuIcons == TRISTATE_INDET; seqValues[nProperty] <<= bValue; } break; diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index a4fd0912b682..ce17a5ea039f 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -212,14 +212,14 @@ namespace svt bool bCancelled = false; while ( !bCancelled && xResultSet->next() ) { - sal_Bool bIsHidden = xRow->getBoolean( ROW_IS_HIDDEN ); + bool bIsHidden = xRow->getBoolean( ROW_IS_HIDDEN ); // don't show hidden files if ( !bIsHidden || xRow->wasNull() ) { pData = NULL; aDT = xRow->getTimestamp( ROW_DATE_MOD ); - sal_Bool bContainsDate = !xRow->wasNull(); + bool bContainsDate = !xRow->wasNull(); if ( !bContainsDate ) { aDT = xRow->getTimestamp( ROW_DATE_CREATE ); @@ -228,7 +228,7 @@ namespace svt OUString aContentURL = xContentAccess->queryContentIdentifierString(); OUString aTargetURL = xRow->getString( ROW_TARGET_URL ); - sal_Bool bHasTargetURL = !xRow->wasNull() && !aTargetURL.isEmpty(); + bool bHasTargetURL = !xRow->wasNull() && !aTargetURL.isEmpty(); OUString sRealURL = bHasTargetURL ? aTargetURL : aContentURL; @@ -286,7 +286,7 @@ namespace svt if( m_pTranslator ) { OUString sNewTitle; - sal_Bool bTranslated = sal_False; + bool bTranslated = false; if ( pData->mbIsFolder ) bTranslated = m_pTranslator->GetTranslation( pData->GetTitle(), sNewTitle ); @@ -352,7 +352,7 @@ namespace svt - sal_Bool FileViewContentEnumerator::URLOnBlackList ( const OUString& sRealURL ) + bool FileViewContentEnumerator::URLOnBlackList ( const OUString& sRealURL ) { OUString entryName = sRealURL.copy( sRealURL.lastIndexOf( '/' ) + 1 ); @@ -366,9 +366,9 @@ namespace svt } - sal_Bool FileViewContentEnumerator::implGetDocTitle( const OUString& _rTargetURL, OUString& _rRet ) const + bool FileViewContentEnumerator::implGetDocTitle( const OUString& _rTargetURL, OUString& _rRet ) const { - sal_Bool bRet = sal_False; + bool bRet = false; try { @@ -381,7 +381,7 @@ namespace svt assert(m_xDocProps.is()); if (!m_xDocProps.is()) - return sal_False; + return false; m_xDocProps->loadFromMedium(_rTargetURL, Sequence()); @@ -389,7 +389,7 @@ namespace svt if (!sTitle.isEmpty()) { _rRet = sTitle; - bRet = sal_True; + bRet = true; } } catch ( const Exception& ) diff --git a/svtools/source/contnr/contentenumeration.hxx b/svtools/source/contnr/contentenumeration.hxx index ca881c960f85..a5f76e672b8c 100644 --- a/svtools/source/contnr/contentenumeration.hxx +++ b/svtools/source/contnr/contentenumeration.hxx @@ -49,15 +49,15 @@ namespace svt OUString maTargetURL; OUString maImageURL; OUString maDisplayText; - DateTime maModDate; - Image maImage; - sal_Int64 maSize; - sal_Bool mbIsFolder; - sal_Bool mbIsVolume; - sal_Bool mbIsRemote; - sal_Bool mbIsRemoveable; - sal_Bool mbIsFloppy; - sal_Bool mbIsCompactDisc; + DateTime maModDate; + Image maImage; + sal_Int64 maSize; + bool mbIsFolder; + bool mbIsVolume; + bool mbIsRemote; + bool mbIsRemoveable; + bool mbIsFloppy; + bool mbIsCompactDisc; inline SortingData_Impl(); inline const OUString& GetTitle() const; @@ -73,12 +73,12 @@ namespace svt inline SortingData_Impl::SortingData_Impl() : maModDate ( DateTime::EMPTY ), maSize ( 0 ), - mbIsFolder ( sal_False ), - mbIsVolume ( sal_False ), - mbIsRemote ( sal_False ), - mbIsRemoveable ( sal_False ), - mbIsFloppy ( sal_False ), - mbIsCompactDisc ( sal_False ) + mbIsFolder ( false ), + mbIsVolume ( false ), + mbIsRemote ( false ), + mbIsRemoveable ( false ), + mbIsFloppy ( false ), + mbIsCompactDisc ( false ) { } @@ -120,7 +120,7 @@ namespace svt class IContentTitleTranslation { public: - virtual sal_Bool GetTranslation( const OUString& _rOriginalName, OUString& _rTranslatedName ) const = 0; + virtual bool GetTranslation( const OUString& _rOriginalName, OUString& _rTranslatedName ) const = 0; protected: ~IContentTitleTranslation() {} @@ -201,7 +201,7 @@ namespace svt ::com::sun::star::uno::Sequence< OUString > m_rBlackList; - sal_Bool URLOnBlackList ( const OUString& sRealURL ); + bool URLOnBlackList ( const OUString& sRealURL ); public: /** constructs an enumerator instance @@ -258,7 +258,7 @@ namespace svt virtual void execute() SAL_OVERRIDE; private: - sal_Bool implGetDocTitle( const OUString& _rTargetURL, OUString& _rRet ) const; + bool implGetDocTitle( const OUString& _rTargetURL, OUString& _rRet ) const; }; diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 26bfd369bec7..d7ee71b719fa 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -394,7 +394,7 @@ public: virtual ~NameTranslator_Impl(); // IContentTitleTranslation - virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const SAL_OVERRIDE; + virtual bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const SAL_OVERRIDE; void SetActualFolder( const INetURLObject& rActualFolder ); const OUString* GetTransTableFileName() const; @@ -1078,7 +1078,7 @@ bool ViewTabListBox_Impl::Kill( const OUString& rContent ) try { ::ucbhelper::Content aCnt( rContent, mxCmdEnv, comphelper::getProcessComponentContext() ); - aCnt.executeCommand( OUString( "delete" ), makeAny( sal_Bool( sal_True ) ) ); + aCnt.executeCommand( OUString( "delete" ), makeAny( true ) ); } catch( ::com::sun::star::ucb::CommandAbortedException const & ) { @@ -1624,9 +1624,9 @@ void NameTranslator_Impl::SetActualFolder( const INetURLObject& rActualFolder ) mpActFolder = new NameTranslationList( rActualFolder ); } -sal_Bool NameTranslator_Impl::GetTranslation( const OUString& rOrg, OUString& rTrans ) const +bool NameTranslator_Impl::GetTranslation( const OUString& rOrg, OUString& rTrans ) const { - sal_Bool bRet = sal_False; + bool bRet = false; if( mpActFolder ) { @@ -1634,7 +1634,7 @@ sal_Bool NameTranslator_Impl::GetTranslation( const OUString& rOrg, OUString& rT if( pTrans ) { rTrans = *pTrans; - bRet = sal_True; + bRet = true; } } @@ -2407,8 +2407,8 @@ OUString SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& SortingData_Impl* pData = new SortingData_Impl; pData->SetNewTitle( rTitle ); - pData->maSize = 0; - pData->mbIsFolder = sal_True; + pData->maSize = 0; + pData->mbIsFolder = true; pData->maTargetURL = rURL; ::svtools::VolumeInfo aVolInfo; diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index 13a1c3e2ec11..24c3bdd12d40 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -47,7 +47,7 @@ class IcnGridMap_Impl; #define F_VER_SBARSIZE_WITH_HBAR 0x0001 #define F_HOR_SBARSIZE_WITH_VBAR 0x0002 -#define F_PAINTED 0x0004 // sal_True after first paint +#define F_PAINTED 0x0004 // true after first paint #define F_ADD_MODE 0x0008 #define F_SELECTING_RECT 0x0020 #define F_DOWN_CTRL 0x0080 @@ -93,11 +93,11 @@ enum IcnViewFieldType struct LocalFocus { - sal_Bool bOn; + bool bOn; Rectangle aRect; Color aPenColor; - LocalFocus() { bOn = sal_False; } + LocalFocus() { bOn = false; } }; @@ -157,7 +157,7 @@ class SvxIconChoiceCtrl_Impl friend class EntryList_Impl; friend class IcnGridMap_Impl; - sal_Bool bChooseWithCursor; + bool bChooseWithCursor; EntryList_Impl aEntries; ScrollBar aVerSBar; ScrollBar aHorSBar; @@ -192,7 +192,7 @@ class SvxIconChoiceCtrl_Impl ImplSVEvent * nUserEventAdjustScrBars; ImplSVEvent * nUserEventShowCursor; SvxIconChoiceCtrlEntry* pCurHighlightFrame; - sal_Bool bHighlightFramePressed; + bool bHighlightFramePressed; SvxIconChoiceCtrlEntry* pHead; // top left entry SvxIconChoiceCtrlEntry* pCursor; SvxIconChoiceCtrlEntry* pPrevDropTarget; @@ -211,13 +211,13 @@ class SvxIconChoiceCtrl_Impl SelectionMode eSelectionMode; sal_uLong nSelectionCount; SvxIconChoiceCtrlPositionMode ePositionMode; - sal_Bool bBoundRectsDirty; - sal_Bool bUpdateMode; - sal_Bool bEntryEditingEnabled; + bool bBoundRectsDirty; + bool bUpdateMode; + bool bEntryEditingEnabled; - void ShowCursor( sal_Bool bShow ); + void ShowCursor( bool bShow ); - void ImpArrange( sal_Bool bKeepPredecessors = sal_False ); + void ImpArrange( bool bKeepPredecessors = false ); void AdjustVirtSize( const Rectangle& ); void ResetVirtSize(); void CheckScrollBars(); @@ -232,7 +232,7 @@ class SvxIconChoiceCtrl_Impl DECL_LINK( VisRectChangedHdl, void* ); DECL_LINK( CallSelectHdlHdl, void* ); - void AdjustScrollBars( sal_Bool bVirtSizeGrowedOnly = sal_False); + void AdjustScrollBars( bool bVirtSizeGrowedOnly = false); void PositionScrollBars( long nRealWidth, long nRealHeight ); long GetScrollBarPageSize( long nVisibleRange ) const { @@ -242,14 +242,14 @@ class SvxIconChoiceCtrl_Impl { return nMaxBoundHeight / 2; } - sal_Bool HandleScrollCommand( const CommandEvent& rCmd ); + bool HandleScrollCommand( const CommandEvent& rCmd ); void ToDocPos( Point& rPosPixel ) { rPosPixel -= pView->GetMapMode().GetOrigin(); } void InitScrollBarBox(); void ToggleSelection( SvxIconChoiceCtrlEntry* ); - void DeselectAllBut( SvxIconChoiceCtrlEntry*, sal_Bool bPaintSync=sal_False ); + void DeselectAllBut( SvxIconChoiceCtrlEntry*, bool bPaintSync = false ); void Center( SvxIconChoiceCtrlEntry* pEntry ) const; void StopEditTimer() { aEditTimer.Stop(); } void StartEditTimer() { aEditTimer.Start(); } @@ -258,14 +258,14 @@ class SvxIconChoiceCtrl_Impl void SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, - sal_Bool bAdd = sal_True, + bool bAdd = true, std::vector* pOtherRects = 0 ); void SelectRange( SvxIconChoiceCtrlEntry* pStart, SvxIconChoiceCtrlEntry* pEnd, - sal_Bool bAdd = sal_True + bool bAdd = true ); void AddSelectedRect( const Rectangle& ); @@ -289,35 +289,35 @@ class SvxIconChoiceCtrl_Impl void InitPredecessors(); void ClearPredecessors(); - sal_Bool CheckVerScrollBar(); - sal_Bool CheckHorScrollBar(); + bool CheckVerScrollBar(); + bool CheckHorScrollBar(); void CancelUserEvents(); void EntrySelected( SvxIconChoiceCtrlEntry* pEntry, - sal_Bool bSelect, - sal_Bool bSyncPaint + bool bSelect, + bool bSyncPaint ); void RepaintEntries( sal_uInt16 nEntryFlagsMask ); void SetListPositions(); void SetDefaultTextSize(); - sal_Bool IsAutoArrange() const + bool IsAutoArrange() const { - return (sal_Bool)(ePositionMode == IcnViewPositionModeAutoArrange); + return (ePositionMode == IcnViewPositionModeAutoArrange); } - sal_Bool IsAutoAdjust() const + bool IsAutoAdjust() const { - return (sal_Bool)(ePositionMode == IcnViewPositionModeAutoAdjust); + return (ePositionMode == IcnViewPositionModeAutoAdjust); } void DocRectChanged() { aDocRectChangedTimer.Start(); } void VisRectChanged() { aVisRectChangedTimer.Start(); } - void SetOrigin( const Point&, sal_Bool bDoNotUpdateWallpaper = sal_False ); + void SetOrigin( const Point&, bool bDoNotUpdateWallpaper = false ); DECL_LINK(TextEditEndedHdl, void *); void ShowFocus ( Rectangle& rRect ); void DrawFocusRect ( OutputDevice* pOut ); - sal_Bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const; + bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const; public: @@ -329,57 +329,57 @@ public: SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle ); ~SvxIconChoiceCtrl_Impl(); - sal_Bool SetChoiceWithCursor ( sal_Bool bDo = sal_True ) { sal_Bool bOld=bChooseWithCursor; bChooseWithCursor = bDo; return bOld; } - void Clear( sal_Bool bInCtor = sal_False ); + bool SetChoiceWithCursor ( bool bDo = true ) { bool bOld = bChooseWithCursor; bChooseWithCursor = bDo; return bOld; } + void Clear( bool bInCtor = false ); void SetStyle( WinBits nWinStyle ); WinBits GetStyle() const { return nWinBits; } void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos, const Point* pPos=0 ); void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = NULL ); void FontModified(); - void SelectAll( sal_Bool bSelect = sal_True, sal_Bool bPaint = sal_True ); + void SelectAll( bool bSelect = true, bool bPaint = true ); void SelectEntry( SvxIconChoiceCtrlEntry*, - sal_Bool bSelect, - sal_Bool bCallHdl = sal_True, - sal_Bool bAddToSelection = sal_False, - sal_Bool bSyncPaint = sal_False + bool bSelect, + bool bCallHdl = true, + bool bAddToSelection = false, + bool bSyncPaint = false ); void Paint( const Rectangle& rRect ); - sal_Bool MouseButtonDown( const MouseEvent& ); - sal_Bool MouseButtonUp( const MouseEvent& ); - sal_Bool MouseMove( const MouseEvent&); - sal_Bool RequestHelp( const HelpEvent& rHEvt ); + bool MouseButtonDown( const MouseEvent& ); + bool MouseButtonUp( const MouseEvent& ); + bool MouseMove( const MouseEvent&); + bool RequestHelp( const HelpEvent& rHEvt ); void SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor, SvxIconChoiceCtrlEntry* pNewCursor, - sal_Bool bMod1, - sal_Bool bShift, - sal_Bool bPaintSync = sal_False + bool bMod1, + bool bShift, + bool bPaintSync = false ); - sal_Bool KeyInput( const KeyEvent& ); + bool KeyInput( const KeyEvent& ); void Resize(); void GetFocus(); void LoseFocus(); - void SetUpdateMode( sal_Bool bUpdate ); - sal_Bool GetUpdateMode() const { return bUpdateMode; } + void SetUpdateMode( bool bUpdate ); + bool GetUpdateMode() const { return bUpdateMode; } void PaintEntry( SvxIconChoiceCtrlEntry* pEntry, - sal_Bool bIsBackgroundPainted=sal_False + bool bIsBackgroundPainted=false ); void PaintEntry( SvxIconChoiceCtrlEntry*, const Point&, OutputDevice* pOut = 0, - sal_Bool bIsBackgroundPainted = sal_False + bool bIsBackgroundPainted = false ); void PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* ); void SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, - sal_Bool bAdjustRow = sal_False, - sal_Bool bCheckScrollBars = sal_False, - sal_Bool bKeepGridMap = sal_False + bool bAdjustRow = false, + bool bCheckScrollBars = false, + bool bKeepGridMap = false ); void InvalidateEntry( SvxIconChoiceCtrlEntry* ); @@ -389,18 +389,18 @@ public: SvxIconChoiceCtrlEntry* GetCurEntry() const { return pCursor; } void SetCursor( SvxIconChoiceCtrlEntry*, - // sal_True == carry selection when single-selecting - sal_Bool bSyncSingleSelection = sal_True, - sal_Bool bShowFocusAsync = sal_False + // true == carry selection when single-selecting + bool bSyncSingleSelection = true, + bool bShowFocusAsync = false ); - SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, sal_Bool bHit = sal_False ); + SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false ); Point GetEntryPos( SvxIconChoiceCtrlEntry* ); - void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound = sal_True ); + void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound = true ); void Arrange( - sal_Bool bKeepPredecessors = sal_False, + bool bKeepPredecessors = false, long nSetMaxVirtWidth =0, long nSetMaxVirtHeight =0 ); @@ -410,7 +410,7 @@ public: Rectangle CalcTextRect( SvxIconChoiceCtrlEntry*, const Point* pPos = 0, - sal_Bool bForInplaceEdit = sal_False, + bool bForInplaceEdit = false, const OUString* pStr = 0 ); @@ -429,18 +429,18 @@ public: void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; - bBoundRectsDirty = sal_True; + bBoundRectsDirty = true; } - sal_Bool IsBoundingRectValid( const Rectangle& rRect ) const { return (sal_Bool)( rRect.Right() != LONG_MAX ); } + bool IsBoundingRectValid( const Rectangle& rRect ) const { return ( rRect.Right() != LONG_MAX ); } void PaintEmphasis( const Rectangle& rRect1, const Rectangle& rRect2, - sal_Bool bSelected, - sal_Bool bDropTarget, - sal_Bool bCursored, + bool bSelected, + bool bDropTarget, + bool bCursored, OutputDevice* pOut, - sal_Bool bIsBackgroundPainted = sal_False + bool bIsBackgroundPainted = false ); void PaintItem( @@ -453,17 +453,17 @@ public: ::vcl::ControlLayoutData* _pLayoutData = NULL ); - // recalculates all BoundingRects if bMustRecalcBoundingRects == sal_True + // recalculates all BoundingRects if bMustRecalcBoundingRects == true void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); } // recalculates all invalidated BoundingRects - void ShowTargetEmphasis( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bShow ); + void ShowTargetEmphasis( SvxIconChoiceCtrlEntry* pEntry, bool bShow ); void Command( const CommandEvent& rCEvt ); void ToTop( SvxIconChoiceCtrlEntry* ); sal_uLong GetSelectionCount() const; void SetGrid( const Size& ); Size GetMinGrid() const; - void Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar = sal_False ); + void Scroll( long nDeltaX, long nDeltaY, bool bScrollBar = false ); const Size& GetItemSize( SvxIconChoiceCtrlEntry*, IcnViewFieldType ) const; void HideDDIcon(); @@ -479,11 +479,11 @@ public: std::vector* pOtherRects = 0 ); - sal_Bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ); + bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ); void MakeVisible( const Rectangle& rDocPos, - sal_Bool bInScrollBarEvent=sal_False, - sal_Bool bCallRectChangedHdl = sal_True + bool bInScrollBarEvent=false, + bool bCallRectChangedHdl = true ); void AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart = 0 ); @@ -493,11 +493,11 @@ public: SvxIconChoiceCtrlEntry* pEntry = 0 ); #endif - void EnableEntryEditing( sal_Bool bEnable ) { bEntryEditingEnabled = bEnable; } - sal_Bool IsEntryEditingEnabled() const { return bEntryEditingEnabled; } - sal_Bool IsEntryEditing() const { return (sal_Bool)(pCurEditedEntry!=0); } + void EnableEntryEditing( bool bEnable ) { bEntryEditingEnabled = bEnable; } + bool IsEntryEditingEnabled() const { return bEntryEditingEnabled; } + bool IsEntryEditing() const { return (pCurEditedEntry!=0); } void EditEntry( SvxIconChoiceCtrlEntry* pEntry ); - void StopEntryEditing( sal_Bool bCancel ); + void StopEntryEditing( bool bCancel ); size_t GetEntryCount() const { return aEntries.size(); } SvxIconChoiceCtrlEntry* GetEntry( size_t nPos ) { @@ -514,8 +514,8 @@ public: SvxIconChoiceCtrlTextMode GetEntryTextModeSmart( const SvxIconChoiceCtrlEntry* pEntry ) const; void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; } SelectionMode GetSelectionMode() const { return eSelectionMode; } - sal_Bool AreEntriesMoved() const { return (sal_Bool)((nFlags & F_MOVED_ENTRIES)!=0); } - void SetEntriesMoved( sal_Bool bMoved ) + bool AreEntriesMoved() const { return ((nFlags & F_MOVED_ENTRIES) != 0); } + void SetEntriesMoved( bool bMoved ) { if( bMoved ) nFlags |= F_MOVED_ENTRIES; @@ -527,7 +527,7 @@ public: void InitSettings(); Rectangle GetOutputRect() const; - sal_Bool ArePredecessorsSet() const { return (sal_Bool)(pHead != 0); } + bool ArePredecessorsSet() const { return (pHead != 0); } SvxIconChoiceCtrlEntry* GetPredecessorHead() const { return pHead; } void SetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry* pPredecessor); // only delivers valid results when in AutoArrange mode! @@ -544,13 +544,13 @@ public: void SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry, - sal_Bool bKeepHighlightFlags=sal_False + bool bKeepHighlightFlags = false ); void HideEntryHighlightFrame(); void DrawHighlightFrame( OutputDevice* pOut, const Rectangle& rBmpRect, - sal_Bool bHide + bool bHide ); void StopSelectTimer() { aCallSelectHdlTimer.Stop(); } @@ -608,9 +608,9 @@ public: void Clear(); // for Cursortravelling etc. - SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, sal_Bool bRight ); - SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown ); - SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown ); + SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, bool bRight ); + SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, bool bDown ); + SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, bool bDown ); // Creates a list of entries for every row (height = nGridDY) sorted by // BoundRect.Left(). A list may be empty. The lists become the property of @@ -629,7 +629,7 @@ class IcnGridMap_Impl { Rectangle _aLastOccupiedGrid; SvxIconChoiceCtrl_Impl* _pView; - sal_Bool* _pGridMap; + bool * _pGridMap; sal_uInt16 _nGridCols, _nGridRows; void Expand(); @@ -644,12 +644,12 @@ public: void Clear(); - GridId GetGrid( const Point& rDocPos, sal_Bool* pbClipped = 0 ); + GridId GetGrid( const Point& rDocPos, bool* pbClipped = 0 ); GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY ); - GridId GetUnoccupiedGrid( sal_Bool bOccupyFound=sal_True ); + GridId GetUnoccupiedGrid( bool bOccupyFound=true ); - void OccupyGrids( const SvxIconChoiceCtrlEntry*, sal_Bool bOccupy = sal_True ); - void OccupyGrid( GridId nId, sal_Bool bOccupy = sal_True ) + void OccupyGrids( const SvxIconChoiceCtrlEntry*, bool bOccupy = true ); + void OccupyGrid( GridId nId, bool bOccupy = true ) { DBG_ASSERT(!_pGridMap || nId<(sal_uLong)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId"); if(_pGridMap && nId < (sal_uLong)(_nGridCols *_nGridRows) ) diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 347c79c9cb35..0205159b7f40 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -50,7 +50,7 @@ #define EVENTID_SHOW_CURSOR ((void*)1) #define EVENTID_ADJUST_SCROLLBARS ((void*)2) -static sal_Bool bEndScrollInvalidate = sal_True; +static bool bEndScrollInvalidate = true; class IcnViewEdit_Impl : public MultiLineEdit { @@ -58,9 +58,9 @@ class IcnViewEdit_Impl : public MultiLineEdit Accelerator aAccReturn; Accelerator aAccEscape; Timer aTimer; - sal_Bool bCanceled; - sal_Bool bAlreadyInCallback; - sal_Bool bGrabFocus; + bool bCanceled; + bool bAlreadyInCallback; + bool bGrabFocus; void CallCallBackHdl_Impl(); DECL_LINK(Timeout_Impl, void *); @@ -79,9 +79,9 @@ public: virtual ~IcnViewEdit_Impl(); virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - sal_Bool EditingCanceled() const { return bCanceled; } - void StopEditing( sal_Bool bCancel = sal_False ); - sal_Bool IsGrabFocus() const { return bGrabFocus; } + bool EditingCanceled() const { return bCanceled; } + void StopEditing( bool bCancel = false ); + bool IsGrabFocus() const { return bGrabFocus; } }; SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( @@ -95,7 +95,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( aImageSize( 32, 32 ), pColumns( 0 ) { - bChooseWithCursor=sal_False; + bChooseWithCursor = false; pEntryPaintDev = 0; pCurEditedEntry = 0; pCurHighlightFrame = 0; @@ -105,9 +105,9 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( pHdlEntry = 0; pHead = NULL; pCursor = NULL; - bUpdateMode = sal_True; - bEntryEditingEnabled = sal_False; - bHighlightFramePressed = sal_False; + bUpdateMode = true; + bEntryEditingEnabled = false; + bHighlightFramePressed = false; eSelectionMode = MULTIPLE_SELECTION; pView = pCurView; pZOrderList = new SvxIconChoiceCtrlEntryList_impl(); @@ -147,7 +147,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( aVisRectChangedTimer.SetTimeout( 50 ); aVisRectChangedTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,VisRectChangedHdl)); - Clear( sal_True ); + Clear( true ); SetGrid( Size(100, 70) ); } @@ -170,15 +170,15 @@ SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl() ClearColumnList(); } -void SvxIconChoiceCtrl_Impl::Clear( sal_Bool bInCtor ) +void SvxIconChoiceCtrl_Impl::Clear( bool bInCtor ) { - StopEntryEditing( sal_True ); + StopEntryEditing( true ); nSelectionCount = 0; pCurHighlightFrame = 0; StopEditTimer(); CancelUserEvents(); - ShowCursor( sal_False ); - bBoundRectsDirty = sal_False; + ShowCursor( false ); + bBoundRectsDirty = false; nMaxBoundHeight = 0; nFlags &= ~(F_PAINTED | F_MOVED_ENTRIES); @@ -232,19 +232,19 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle ) IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar ) { - StopEntryEditing( sal_True ); + StopEntryEditing( true ); // arrow up: delta=-1; arrow down: delta=+1 - Scroll( 0, pScrollBar->GetDelta(), sal_True ); - bEndScrollInvalidate = sal_True; + Scroll( 0, pScrollBar->GetDelta(), true ); + bEndScrollInvalidate = true; return 0; } IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl, ScrollBar*, pScrollBar ) { - StopEntryEditing( sal_True ); + StopEntryEditing( true ); // arrow left: delta=-1; arrow right: delta=+1 - Scroll( pScrollBar->GetDelta(), 0, sal_True ); - bEndScrollInvalidate = sal_True; + Scroll( pScrollBar->GetDelta(), 0, true ); + bEndScrollInvalidate = true; return 0; } @@ -266,8 +266,8 @@ void SvxIconChoiceCtrl_Impl::FontModified() DELETEZ(pDDTempDev); DELETEZ(pEntryPaintDev); SetDefaultTextSize(); - ShowCursor( sal_False ); - ShowCursor( sal_True ); + ShowCursor( false ); + ShowCursor( true ); } void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t nPos, @@ -286,13 +286,13 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t { Size aSize( CalcBoundingSize( pEntry ) ); SetBoundingRect_Impl( pEntry, *pPos, aSize ); - SetEntryPos( pEntry, *pPos, sal_False, sal_True, sal_True /*keep grid map*/ ); + SetEntryPos( pEntry, *pPos, false, true, true /*keep grid map*/ ); pEntry->nFlags |= ICNVIEW_FLAG_POS_MOVED; - SetEntriesMoved( sal_True ); + SetEntriesMoved( true ); } else { - // If the UpdateMode is sal_True, don't set all bounding rectangles to + // If the UpdateMode is true, don't set all bounding rectangles to // 'to be checked', but only the bounding rectangle of the new entry. // Thus, don't call InvalidateBoundingRect! pEntry->aRect.Right() = LONG_MAX; @@ -363,8 +363,8 @@ void SvxIconChoiceCtrl_Impl::SetListPositions() nFlags |= F_ENTRYLISTPOS_VALID; } -void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect, - sal_Bool bCallHdl, sal_Bool bAdd, sal_Bool bSyncPaint ) +void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, bool bSelect, + bool bCallHdl, bool bAdd, bool bSyncPaint ) { if( eSelectionMode == NO_SELECTION ) return; @@ -374,11 +374,11 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bo if ( 0 == ( nFlags & F_CLEARING_SELECTION ) ) { nFlags |= F_CLEARING_SELECTION; - DeselectAllBut( pEntry, sal_True ); + DeselectAllBut( pEntry, true ); nFlags &= ~F_CLEARING_SELECTION; } } - if( (pEntry->IsSelected() ? 1 : 0) != bSelect ) + if( pEntry->IsSelected() != bSelect ) { pHdlEntry = pEntry; sal_uInt16 nEntryFlags = pEntry->GetFlags(); @@ -402,8 +402,8 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bo } } -void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect, - sal_Bool bSyncPaint ) +void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, bool bSelect, + bool bSyncPaint ) { // When using SingleSelection, make sure that the cursor is always placed // over the (only) selected entry. (But only if a cursor exists.) @@ -422,7 +422,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_ if( bUpdateMode ) { if( pEntry == pCursor ) - ShowCursor( sal_False ); + ShowCursor( false ); if( pView->IsTracking() && (bSelect || !pView->HasBackground()) ) // always synchronous when tracking PaintEntry( pEntry ); else if( bSyncPaint ) // synchronous & with a virtual OutDev! @@ -432,7 +432,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_ pView->Invalidate( CalcFocusRect( pEntry ) ); } if( pEntry == pCursor ) - ShowCursor( sal_True ); + ShowCursor( true ); } // #i101012# emit vcl event LISTBOX_SELECT only in case that the given entry is selected. @@ -560,7 +560,7 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors() } } -void SvxIconChoiceCtrl_Impl::Arrange( sal_Bool bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight ) +void SvxIconChoiceCtrl_Impl::Arrange( bool bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight ) { if ( nSetMaxVirtWidth != 0 ) nMaxVirtWidth = nSetMaxVirtWidth; @@ -575,23 +575,23 @@ void SvxIconChoiceCtrl_Impl::Arrange( sal_Bool bKeepPredecessors, long nSetMaxVi ImpArrange( bKeepPredecessors ); } -void SvxIconChoiceCtrl_Impl::ImpArrange( sal_Bool bKeepPredecessors ) +void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors ) { static Point aEmptyPoint; - sal_Bool bOldUpdate = bUpdateMode; + bool bOldUpdate = bUpdateMode; Rectangle aCurOutputArea( GetOutputRect() ); if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint ) - bUpdateMode = sal_False; + bUpdateMode = false; aAutoArrangeTimer.Stop(); nFlags &= ~F_MOVED_ENTRIES; nFlags |= F_ARRANGING; StopEditTimer(); - ShowCursor( sal_False ); + ShowCursor( false ); ResetVirtSize(); if( !bKeepPredecessors ) ClearPredecessors(); - bBoundRectsDirty = sal_False; + bBoundRectsDirty = false; SetOrigin( Point() ); VisRectChanged(); RecalcAllBoundingRectsSmart(); @@ -604,12 +604,12 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( sal_Bool bKeepPredecessors ) MakeVisible( aCurOutputArea ); SetUpdateMode( bOldUpdate ); } - ShowCursor( sal_True ); + ShowCursor( true ); } void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect ) { - bEndScrollInvalidate = sal_False; + bEndScrollInvalidate = false; #if defined(OV_DRAWGRID) Color aOldColor ( pView->GetLineColor() ); @@ -658,14 +658,14 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect ) if( !pCursor ) { // set cursor to item with focus-flag - sal_Bool bfound = sal_False; + bool bfound = false; for ( sal_uLong i = 0; i < pView->GetEntryCount() && !bfound; i++) { SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry ( i ); if( pEntry->IsFocused() ) { pCursor = pEntry; - bfound=sal_True; + bfound = true; } } @@ -681,11 +681,11 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect ) if( !nCount ) return; - sal_Bool bResetClipRegion = sal_False; + bool bResetClipRegion = false; if( !pView->IsClipRegion() ) { Region const aOutputArea( GetOutputRect() ); - bResetClipRegion = sal_True; + bResetClipRegion = true; pView->SetClipRegion( aOutputArea ); } @@ -699,7 +699,7 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect ) const Rectangle& rBoundRect = GetEntryBoundRect( pEntry ); if( rRect.IsOver( rBoundRect ) ) { - PaintEntry( pEntry, rBoundRect.TopLeft(), pView, sal_True ); + PaintEntry( pEntry, rBoundRect.TopLeft(), pView, true ); // set entries to Top if they are being repainted pPaintedEntries->push_back( pEntry ); } @@ -729,11 +729,11 @@ void SvxIconChoiceCtrl_Impl::RepaintEntries( sal_uInt16 nEntryFlagsMask ) if( !nCount ) return; - sal_Bool bResetClipRegion = sal_False; + bool bResetClipRegion = false; Rectangle aOutRect( GetOutputRect() ); if( !pView->IsClipRegion() ) { - bResetClipRegion = sal_True; + bResetClipRegion = true; pView->SetClipRegion(Region(aOutRect)); } for( size_t nCur = 0; nCur < nCount; nCur++ ) @@ -758,28 +758,28 @@ void SvxIconChoiceCtrl_Impl::InitScrollBarBox() aScrBarBox.SetPosPixel( Point(aSize.Width()-nVerSBarWidth+1, aSize.Height()-nHorSBarHeight+1)); } -sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) +bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) { - sal_Bool bHandled = sal_True; - bHighlightFramePressed = sal_False; + bool bHandled = true; + bHighlightFramePressed = false; StopEditTimer(); - sal_Bool bGotFocus = (sal_Bool)(!pView->HasFocus() && !(nWinBits & WB_NOPOINTERFOCUS)); + bool bGotFocus = (!pView->HasFocus() && !(nWinBits & WB_NOPOINTERFOCUS)); if( !(nWinBits & WB_NOPOINTERFOCUS) ) pView->GrabFocus(); Point aDocPos( rMEvt.GetPosPixel() ); if(aDocPos.X()>=aOutputSize.Width() || aDocPos.Y()>=aOutputSize.Height()) - return sal_False; + return false; ToDocPos( aDocPos ); - SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True ); + SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, true ); if( pEntry ) - MakeEntryVisible( pEntry, sal_False ); + MakeEntryVisible( pEntry, false ); if( rMEvt.IsShift() && eSelectionMode != SINGLE_SELECTION ) { if( pEntry ) - SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), sal_True); - return sal_True; + SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), true); + return true; } if( pAnchor && (rMEvt.IsShift() || rMEvt.IsMod1())) // keyboard selection? @@ -810,7 +810,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) if( !pEntry && !(nWinBits & WB_NODRAGSELECTION)) pView->StartTracking( STARTTRACK_SCROLLREPEAT ); - return sal_True; + return true; } else { @@ -832,17 +832,17 @@ sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) pView->StartTracking( STARTTRACK_SCROLLREPEAT ); } else - bHandled = sal_False; + bHandled = false; return bHandled; } } - sal_Bool bSelected = pEntry->IsSelected(); - sal_Bool bEditingEnabled = IsEntryEditingEnabled(); + bool bSelected = pEntry->IsSelected(); + bool bEditingEnabled = IsEntryEditingEnabled(); if( rMEvt.GetClicks() == 2 ) { DeselectAllBut( pEntry ); - SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True ); + SelectEntry( pEntry, true, true, false, true ); pHdlEntry = pEntry; pView->ClickIcon(); } @@ -873,8 +873,8 @@ sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) if( rMEvt.IsLeft() && (nWinBits & WB_HIGHLIGHTFRAME) ) { pCurHighlightFrame = 0; // force repaint of frame - bHighlightFramePressed = sal_True; - SetEntryHighlightFrame( pEntry, sal_True ); + bHighlightFramePressed = true; + SetEntryHighlightFrame( pEntry, true ); } } else @@ -883,9 +883,9 @@ sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) { if( !bSelected ) { - DeselectAllBut( pEntry, sal_True /* paint synchronously */ ); + DeselectAllBut( pEntry, true /* paint synchronously */ ); SetCursor( pEntry ); - SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True ); + SelectEntry( pEntry, true, true, false, true ); } else { @@ -905,13 +905,13 @@ sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) return bHandled; } -sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt ) +bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; if( rMEvt.IsRight() && (nFlags & (F_DOWN_CTRL | F_DOWN_DESELECT) )) { nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT); - bHandled = sal_True; + bHandled = true; } Point aDocPos( rMEvt.GetPosPixel() ); @@ -924,81 +924,81 @@ sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt ) // Ctrl & MultiSelection ToggleSelection( pDocEntry ); SetCursor( pDocEntry ); - bHandled = sal_True; + bHandled = true; } else if( nFlags & F_DOWN_DESELECT ) { DeselectAllBut( pDocEntry ); SetCursor( pDocEntry ); - SelectEntry( pDocEntry, sal_True, sal_True, sal_False, sal_True ); - bHandled = sal_True; + SelectEntry( pDocEntry, true, true, false, true ); + bHandled = true; } } nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT); if( nFlags & F_START_EDITTIMER_IN_MOUSEUP ) { - bHandled = sal_True; + bHandled = true; StartEditTimer(); nFlags &= ~F_START_EDITTIMER_IN_MOUSEUP; } if((nWinBits & WB_HIGHLIGHTFRAME) && bHighlightFramePressed && pCurHighlightFrame) { - bHandled = sal_True; + bHandled = true; SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame; pCurHighlightFrame = 0; // force repaint of frame - bHighlightFramePressed = sal_False; - SetEntryHighlightFrame( pEntry, sal_True ); + bHighlightFramePressed = false; + SetEntryHighlightFrame( pEntry, true ); pHdlEntry = pCurHighlightFrame; pView->ClickIcon(); // set focus on Icon SvxIconChoiceCtrlEntry* pOldCursor = pCursor; - SetCursor_Impl( pOldCursor, pHdlEntry, sal_False, sal_False, sal_True ); + SetCursor_Impl( pOldCursor, pHdlEntry, false, false, true ); pHdlEntry = 0; } return bHandled; } -sal_Bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt ) +bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt ) { const Point aDocPos( pView->PixelToLogic(rMEvt.GetPosPixel()) ); if( pView->IsTracking() ) - return sal_False; + return false; else if( nWinBits & WB_HIGHLIGHTFRAME ) { - SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True ); + SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, true ); SetEntryHighlightFrame( pEntry ); } else - return sal_False; - return sal_True; + return false; + return true; } void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor, - SvxIconChoiceCtrlEntry* pNewCursor, sal_Bool bMod1, sal_Bool bShift, sal_Bool bPaintSync ) + SvxIconChoiceCtrlEntry* pNewCursor, bool bMod1, bool bShift, bool bPaintSync ) { if( pNewCursor ) { SvxIconChoiceCtrlEntry* pFilterEntry = 0; - sal_Bool bDeselectAll = sal_False; + bool bDeselectAll = false; if( eSelectionMode != SINGLE_SELECTION ) { if( !bMod1 && !bShift ) - bDeselectAll = sal_True; + bDeselectAll = true; else if( bShift && !bMod1 && !pAnchor ) { - bDeselectAll = sal_True; + bDeselectAll = true; pFilterEntry = pOldCursor; } } if( bDeselectAll ) DeselectAllBut( pFilterEntry, bPaintSync ); - ShowCursor( sal_False ); + ShowCursor( false ); MakeEntryVisible( pNewCursor ); SetCursor( pNewCursor ); if( bMod1 && !bShift ) @@ -1020,18 +1020,18 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor, } else { - SelectEntry( pCursor, sal_True, sal_True, sal_False, bPaintSync ); + SelectEntry( pCursor, true, true, false, bPaintSync ); aCurSelectionRect = GetEntryBoundRect( pCursor ); CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor ); } } } -sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) +bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) { StopEditTimer(); - sal_Bool bMod2 = rKEvt.GetKeyCode().IsMod2(); + bool bMod2 = rKEvt.GetKeyCode().IsMod2(); sal_Unicode cChar = rKEvt.GetCharCode(); sal_uLong nPos = (sal_uLong)-1; if ( bMod2 && cChar && IsMnemonicChar( cChar, nPos ) ) @@ -1040,22 +1040,22 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SvxIconChoiceCtrlEntry* pNewCursor = GetEntry( nPos ); SvxIconChoiceCtrlEntry* pOldCursor = pCursor; if ( pNewCursor != pOldCursor ) - SetCursor_Impl( pOldCursor, pNewCursor, sal_False, sal_False, sal_False ); - return sal_True; + SetCursor_Impl( pOldCursor, pNewCursor, false, false, false ); + return true; } if ( bMod2 ) // no actions with - return sal_False; + return false; - sal_Bool bKeyUsed = sal_True; - sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1(); - sal_Bool bShift = rKEvt.GetKeyCode().IsShift(); + bool bKeyUsed = true; + bool bMod1 = rKEvt.GetKeyCode().IsMod1(); + bool bShift = rKEvt.GetKeyCode().IsShift(); if( eSelectionMode == SINGLE_SELECTION || eSelectionMode == NO_SELECTION) { - bShift = sal_False; - bMod1 = sal_False; + bShift = false; + bMod1 = false; } if( bMod1 ) @@ -1073,10 +1073,10 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) { MakeEntryVisible( pCursor ); if( nCode == KEY_UP ) - pNewCursor = pImpCursor->GoUpDown(pCursor,sal_False); + pNewCursor = pImpCursor->GoUpDown(pCursor,false); else - pNewCursor = pImpCursor->GoPageUpDown(pCursor,sal_False); - SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True ); + pNewCursor = pImpCursor->GoPageUpDown(pCursor,false); + SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if( !pNewCursor ) { Rectangle aRect( GetEntryBoundRect( pCursor ) ); @@ -1103,10 +1103,10 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) if( pCursor ) { if( nCode == KEY_DOWN ) - pNewCursor=pImpCursor->GoUpDown( pCursor,sal_True ); + pNewCursor=pImpCursor->GoUpDown( pCursor,true ); else - pNewCursor=pImpCursor->GoPageUpDown( pCursor,sal_True ); - SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True ); + pNewCursor=pImpCursor->GoPageUpDown( pCursor,true ); + SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if ( bChooseWithCursor && pNewCursor != NULL) { @@ -1121,8 +1121,8 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) case KEY_RIGHT: if( pCursor ) { - pNewCursor=pImpCursor->GoLeftRight(pCursor,sal_True ); - SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True ); + pNewCursor=pImpCursor->GoLeftRight(pCursor,true ); + SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); } break; @@ -1130,8 +1130,8 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) if( pCursor ) { MakeEntryVisible( pCursor ); - pNewCursor = pImpCursor->GoLeftRight(pCursor,sal_False ); - SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True ); + pNewCursor = pImpCursor->GoLeftRight(pCursor,false ); + SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if( !pNewCursor ) { Rectangle aRect( GetEntryBoundRect(pCursor)); @@ -1149,7 +1149,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) if( !bMod1 && !bShift ) EditTimeoutHdl( 0 ); else - bKeyUsed = sal_False; + bKeyUsed = false; break; case KEY_F8: @@ -1161,7 +1161,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) nFlags |= F_ADD_MODE; } else - bKeyUsed = sal_False; + bKeyUsed = false; break; case KEY_SPACE: @@ -1169,12 +1169,12 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) { if( !bMod1 ) { - //SelectAll( sal_False ); + //SelectAll( false ); SetNoSelection(); ClearSelectedRectList(); // click Icon with spacebar - SetEntryHighlightFrame( GetCurEntry(), sal_True ); + SetEntryHighlightFrame( GetCurEntry(), true ); pView->ClickIcon(); pHdlEntry = pCurHighlightFrame; pCurHighlightFrame=0; @@ -1203,9 +1203,9 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) case KEY_DIVIDE : case KEY_A: if( bMod1 && (eSelectionMode != SINGLE_SELECTION)) - SelectAll( sal_True ); + SelectAll( true ); else - bKeyUsed = sal_False; + bKeyUsed = false; break; case KEY_SUBTRACT: @@ -1213,7 +1213,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) if( bMod1 ) SetNoSelection(); else - bKeyUsed = sal_False; + bKeyUsed = false; break; case KEY_RETURN: @@ -1223,14 +1223,14 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) /*pView->*/EditEntry( pCursor ); } else - bKeyUsed = sal_False; + bKeyUsed = false; break; case KEY_END: if( pCursor ) { pNewCursor = aEntries[ aEntries.size() - 1 ]; - SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True ); + SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); } break; @@ -1238,12 +1238,12 @@ sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) if( pCursor ) { pNewCursor = aEntries[ 0 ]; - SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True ); + SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); } break; default: - bKeyUsed = sal_False; + bKeyUsed = false; } return bKeyUsed; @@ -1269,7 +1269,7 @@ void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeig aVerSBar.SetPosPixel( aPos ); } -void SvxIconChoiceCtrl_Impl::AdjustScrollBars( sal_Bool ) +void SvxIconChoiceCtrl_Impl::AdjustScrollBars( bool ) { Rectangle aOldOutRect( GetOutputRect() ); long nVirtHeight = aVirtOutputSize.Height(); @@ -1296,10 +1296,10 @@ void SvxIconChoiceCtrl_Impl::AdjustScrollBars( sal_Bool ) else nVisibleHeight = nRealHeight; - sal_Bool bVerSBar = ( nWinBits & WB_VSCROLL ) != 0; - sal_Bool bHorSBar = ( nWinBits & WB_HSCROLL ) != 0; - sal_Bool bNoVerSBar = ( nWinBits & WB_NOVSCROLL ) != 0; - sal_Bool bNoHorSBar = ( nWinBits & WB_NOHSCROLL ) != 0; + bool bVerSBar = ( nWinBits & WB_VSCROLL ) != 0; + bool bHorSBar = ( nWinBits & WB_HSCROLL ) != 0; + bool bNoVerSBar = ( nWinBits & WB_NOVSCROLL ) != 0; + bool bNoHorSBar = ( nWinBits & WB_NOHSCROLL ) != 0; sal_uInt16 nResult = 0; if( nVirtHeight ) @@ -1439,10 +1439,10 @@ void SvxIconChoiceCtrl_Impl::Resize() VisRectChanged(); } -sal_Bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar() +bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar() { if( !pZOrderList || !aHorSBar.IsVisible() ) - return sal_False; + return false; const MapMode& rMapMode = pView->GetMapMode(); Point aOrigin( rMapMode.GetOrigin() ); if(!( nWinBits & WB_HSCROLL) && !aOrigin.X() ) @@ -1455,7 +1455,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar() SvxIconChoiceCtrlEntry* pEntry = (*pZOrderList)[ nCur ]; long nRight = GetEntryBoundRect(pEntry).Right(); if( nRight > nWidth ) - return sal_False; + return false; if( nRight > nMostRight ) nMostRight = nRight; } @@ -1472,15 +1472,15 @@ sal_Bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar() aSize.Height() += nHorSBarHeight; aVerSBar.SetSizePixel( aSize ); } - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar() +bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar() { if( !pZOrderList || !aVerSBar.IsVisible() ) - return sal_False; + return false; const MapMode& rMapMode = pView->GetMapMode(); Point aOrigin( rMapMode.GetOrigin() ); if(!( nWinBits & WB_VSCROLL) && !aOrigin.Y() ) @@ -1493,7 +1493,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar() SvxIconChoiceCtrlEntry* pEntry = (*pZOrderList)[ nCur ]; long nBottom = GetEntryBoundRect(pEntry).Bottom(); if( nBottom > nHeight ) - return sal_False; + return false; if( nBottom > nDeepest ) nDeepest = nBottom; } @@ -1510,9 +1510,9 @@ sal_Bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar() aSize.Width() += nVerSBarWidth; aHorSBar.SetSizePixel( aSize ); } - return sal_True; + return true; } - return sal_False; + return false; } @@ -1535,7 +1535,7 @@ void SvxIconChoiceCtrl_Impl::GetFocus() if( pCursor ) { pCursor->SetFlags( ICNVIEW_FLAG_FOCUSED ); - ShowCursor( sal_True ); + ShowCursor( true ); } } @@ -1544,7 +1544,7 @@ void SvxIconChoiceCtrl_Impl::LoseFocus() StopEditTimer(); if( pCursor ) pCursor->ClearFlags( ICNVIEW_FLAG_FOCUSED ); - ShowCursor( sal_False ); + ShowCursor( false ); // HideFocus (); // pView->Invalidate ( aFocus.aRect ); @@ -1552,7 +1552,7 @@ void SvxIconChoiceCtrl_Impl::LoseFocus() RepaintEntries( ICNVIEW_FLAG_SELECTED ); } -void SvxIconChoiceCtrl_Impl::SetUpdateMode( sal_Bool bUpdate ) +void SvxIconChoiceCtrl_Impl::SetUpdateMode( bool bUpdate ) { if( bUpdate != bUpdateMode ) { @@ -1567,7 +1567,7 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( sal_Bool bUpdate ) } } -void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bIsBackgroundPainted ) +void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, bool bIsBackgroundPainted ) { Point aPos( GetEntryPos( pEntry ) ); PaintEntry( pEntry, aPos, 0, bIsBackgroundPainted ); @@ -1576,8 +1576,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Boo // priorities of the emphasis: bDropTarget => bCursored => bSelected void SvxIconChoiceCtrl_Impl::PaintEmphasis( const Rectangle& rTextRect, const Rectangle& rImageRect, - sal_Bool bSelected, sal_Bool bDropTarget, sal_Bool bCursored, OutputDevice* pOut, - sal_Bool bIsBackgroundPainted ) + bool bSelected, bool bDropTarget, bool bCursored, OutputDevice* pOut, + bool bIsBackgroundPainted ) { static Color aTransparent( COL_TRANSPARENT ); @@ -1587,14 +1587,14 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis( const StyleSettings& rSettings = pOut->GetSettings().GetStyleSettings(); Color aOldFillColor( pOut->GetFillColor() ); - sal_Bool bSolidTextRect = sal_False; - sal_Bool bSolidImageRect = sal_False; + bool bSolidTextRect = false; + bool bSolidImageRect = false; if( bDropTarget && ( eSelectionMode != NO_SELECTION ) ) { pOut->SetFillColor( rSettings.GetHighlightColor() ); - bSolidTextRect = sal_True; - bSolidImageRect = sal_True; + bSolidTextRect = true; + bSolidImageRect = true; } else { @@ -1607,7 +1607,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis( const Color& rFillColor = pView->GetFont().GetFillColor(); pOut->SetFillColor( rFillColor ); if( rFillColor != aTransparent ) - bSolidTextRect = sal_True; + bSolidTextRect = true; } } } @@ -1742,19 +1742,19 @@ void SvxIconChoiceCtrl_Impl::PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* pEntr void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, - OutputDevice* pOut, sal_Bool bIsBackgroundPainted ) + OutputDevice* pOut, bool bIsBackgroundPainted ) { if( !pOut ) pOut = pView; - sal_Bool bSelected = sal_False; + bool bSelected = false; if( eSelectionMode != NO_SELECTION ) bSelected = pEntry->IsSelected(); - sal_Bool bCursored = pEntry->IsCursored(); - sal_Bool bDropTarget = pEntry->IsDropTarget(); - sal_Bool bNoEmphasis = pEntry->IsBlockingEmphasis(); + bool bCursored = pEntry->IsCursored(); + bool bDropTarget = pEntry->IsDropTarget(); + bool bNoEmphasis = pEntry->IsBlockingEmphasis(); Font aTempFont( pOut->GetFont() ); @@ -1767,17 +1767,17 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P */ OUString aEntryText( pView->GetEntryText( pEntry, false ) ); - Rectangle aTextRect( CalcTextRect(pEntry,&rPos,sal_False,&aEntryText)); + Rectangle aTextRect( CalcTextRect(pEntry,&rPos,false,&aEntryText)); Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos ) ); - sal_Bool bShowSelection = + bool bShowSelection = ( ( ( bSelected && !bCursored ) || bDropTarget ) && !bNoEmphasis && ( eSelectionMode != NO_SELECTION ) ); - sal_Bool bActiveSelection = ( 0 != ( nWinBits & WB_NOHIDESELECTION ) ) || pView->HasFocus(); + bool bActiveSelection = ( 0 != ( nWinBits & WB_NOHIDESELECTION ) ) || pView->HasFocus(); if ( bShowSelection ) { @@ -1807,18 +1807,18 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P pOut->SetFillColor( ); } - sal_Bool bResetClipRegion = sal_False; + bool bResetClipRegion = false; if( !pView->IsClipRegion() && (aVerSBar.IsVisible() || aHorSBar.IsVisible()) ) { Rectangle aOutputArea( GetOutputRect() ); if( aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect) ) { pView->SetClipRegion(Region(aOutputArea)); - bResetClipRegion = sal_True; + bResetClipRegion = true; } } - sal_Bool bLargeIconMode = WB_ICON == ( nWinBits & (VIEWMODE_MASK) ); + bool bLargeIconMode = WB_ICON == ( nWinBits & (VIEWMODE_MASK) ); sal_uInt16 nBmpPaintFlags = PAINTFLAG_VER_CENTERED; if ( bLargeIconMode ) nBmpPaintFlags |= PAINTFLAG_HOR_CENTERED; @@ -1838,7 +1838,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P // draw highlight frame if( pEntry == pCurHighlightFrame && !bNoEmphasis ) - DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), sal_False ); + DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), false ); pOut->SetFont( aTempFont ); if( bResetClipRegion ) @@ -1846,15 +1846,15 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P } void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, - sal_Bool bAdjustAtGrid, sal_Bool bCheckScrollBars, sal_Bool bKeepGridMap ) + bool bAdjustAtGrid, bool bCheckScrollBars, bool bKeepGridMap ) { - ShowCursor( sal_False ); + ShowCursor( false ); Rectangle aBoundRect( GetEntryBoundRect( pEntry )); pView->Invalidate( aBoundRect ); ToTop( pEntry ); if( !IsAutoArrange() ) { - sal_Bool bAdjustVirtSize = sal_False; + bool bAdjustVirtSize = false; if( rPos != aBoundRect.TopLeft() ) { Point aGridOffs( @@ -1865,7 +1865,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const aBoundRect.SetPos( rPos ); pEntry->aRect = aBoundRect; pEntry->aGridRect.SetPos( rPos + aGridOffs ); - bAdjustVirtSize = sal_True; + bAdjustVirtSize = true; } if( bAdjustAtGrid ) { @@ -1883,7 +1883,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point aNewPos( AdjustAtGrid( aCenterRect, rBoundRect ) ); Rectangle aNewBoundRect( aNewPos, pEntry->aRect.GetSize()); AdjustVirtSize( aNewBoundRect ); - bAdjustVirtSize = sal_False; + bAdjustVirtSize = false; } AdjustEntryAtGrid( pEntry ); ToTop( pEntry ); @@ -1903,7 +1903,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const SetEntryPredecessor( pEntry, pPrev ); aAutoArrangeTimer.Start(); } - ShowCursor( sal_True ); + ShowCursor( true ); } void SvxIconChoiceCtrl_Impl::SetNoSelection() @@ -1912,12 +1912,12 @@ void SvxIconChoiceCtrl_Impl::SetNoSelection() if( !(nFlags & F_CLEARING_SELECTION )) { nFlags |= F_CLEARING_SELECTION; - DeselectAllBut( 0, sal_True ); + DeselectAllBut( 0, true ); nFlags &= ~F_CLEARING_SELECTION; } } -SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, sal_Bool bHit ) +SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, bool bHit ) { CheckBoundingRects(); // search through z-order list from the end @@ -1953,7 +1953,7 @@ Point SvxIconChoiceCtrl_Impl::GetEntryPos( SvxIconChoiceCtrlEntry* pEntry ) return pEntry->aRect.TopLeft(); } -void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound ) +void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound ) { if ( bBound ) { @@ -2007,7 +2007,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c } Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, - const Point* pEntryPos, sal_Bool bEdit, const OUString* pStr ) + const Point* pEntryPos, bool bEdit, const OUString* pStr ) { OUString aEntryText; if( !pStr ) @@ -2177,7 +2177,7 @@ void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry ) return; } Size aSize( CalcBoundingSize( pEntry ) ); - Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid(sal_True)).TopLeft()); + Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid(true)).TopLeft()); SetBoundingRect_Impl( pEntry, aPos, aSize ); } @@ -2192,33 +2192,33 @@ void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntr } -void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSyncSingleSelection, - sal_Bool bShowFocusAsync ) +void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, bool bSyncSingleSelection, + bool bShowFocusAsync ) { if( pEntry == pCursor ) { if( pCursor && eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection && !pCursor->IsSelected() ) - SelectEntry( pCursor, sal_True, sal_True ); + SelectEntry( pCursor, true, true ); return; } - ShowCursor( sal_False ); + ShowCursor( false ); SvxIconChoiceCtrlEntry* pOldCursor = pCursor; pCursor = pEntry; if( pOldCursor ) { pOldCursor->ClearFlags( ICNVIEW_FLAG_FOCUSED ); if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection ) - SelectEntry( pOldCursor, sal_False, sal_True ); // deselect old cursor + SelectEntry( pOldCursor, false, true ); // deselect old cursor } if( pCursor ) { ToTop( pCursor ); pCursor->SetFlags( ICNVIEW_FLAG_FOCUSED ); if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection ) - SelectEntry( pCursor, sal_True, sal_True ); + SelectEntry( pCursor, true, true ); if( !bShowFocusAsync ) - ShowCursor( sal_True ); + ShowCursor( true ); else { if( !nUserEventShowCursor ) @@ -2230,7 +2230,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, sal_Bool } -void SvxIconChoiceCtrl_Impl::ShowCursor( sal_Bool bShow ) +void SvxIconChoiceCtrl_Impl::ShowCursor( bool bShow ) { if( !pCursor || !bShow || !pView->HasFocus() ) { @@ -2260,16 +2260,16 @@ void SvxIconChoiceCtrl_Impl::ImpHideDDIcon() } } -sal_Bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd ) +bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd ) { Rectangle aDocRect( GetDocumentRect() ); Rectangle aVisRect( GetVisibleRect() ); if( aVisRect.IsInside( aDocRect )) - return sal_False; + return false; Size aDocSize( aDocRect.GetSize() ); Size aVisSize( aVisRect.GetSize() ); - sal_Bool bHor = aDocSize.Width() > aVisSize.Width(); - sal_Bool bVer = aDocSize.Height() > aVisSize.Height(); + bool bHor = aDocSize.Width() > aVisSize.Width(); + bool bVer = aDocSize.Height() > aVisSize.Height(); long nScrollDX = 0, nScrollDY = 0; @@ -2286,7 +2286,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd ) if( nScrollFlags ) { pView->StartAutoScroll( nScrollFlags ); - return sal_True; + return true; } } break; @@ -2331,9 +2331,9 @@ sal_Bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd ) aVisRect.Left() -= nScrollDX; aVisRect.Right() -= nScrollDX; MakeVisible( aVisRect ); - return sal_True; + return true; } - return sal_False; + return false; } @@ -2383,10 +2383,10 @@ void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const // rRect: area of the document (in document coordinates) that we want to make // visible -// bScrBar == sal_True: rectangle was calculated because of a scrollbar event +// bScrBar == true: rectangle was calculated because of a scrollbar event -void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, sal_Bool bScrBar, - sal_Bool bCallRectChangedHdl ) +void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, bool bScrBar, + bool bCallRectChangedHdl ) { Rectangle aVirtRect( rRect ); ClipAtVirtOutRect( aVirtRect ); @@ -2432,14 +2432,14 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, sal_Bool bScrB { HideDDIcon(); pView->Update(); - ShowCursor( sal_False ); + ShowCursor( false ); } // invert origin for SV (so we can scroll/paint using document coordinates) aOrigin *= -1; SetOrigin( aOrigin ); - sal_Bool bScrollable = pView->GetBackground().IsScrollable(); + bool bScrollable = pView->GetBackground().IsScrollable(); if( pView->HasBackground() && !bScrollable ) { Rectangle aRect( GetOutputRect()); @@ -2471,7 +2471,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, sal_Bool bScrB } if( GetUpdateMode() ) - ShowCursor( sal_True ); + ShowCursor( true ); // check if we still need scrollbars CheckScrollBars(); @@ -2495,16 +2495,16 @@ sal_uLong SvxIconChoiceCtrl_Impl::GetSelectionCount() const void SvxIconChoiceCtrl_Impl::ToggleSelection( SvxIconChoiceCtrlEntry* pEntry ) { - sal_Bool bSel; + bool bSel; if( pEntry->IsSelected() ) - bSel = sal_False; + bSel = false; else - bSel = sal_True; - SelectEntry( pEntry, bSel, sal_True, sal_True ); + bSel = true; + SelectEntry( pEntry, bSel, true, true ); } void SvxIconChoiceCtrl_Impl::DeselectAllBut( SvxIconChoiceCtrlEntry* pThisEntryNot, - sal_Bool bPaintSync ) + bool bPaintSync ) { ClearSelectedRectList(); @@ -2515,7 +2515,7 @@ void SvxIconChoiceCtrl_Impl::DeselectAllBut( SvxIconChoiceCtrlEntry* pThisEntryN { SvxIconChoiceCtrlEntry* pEntry = aEntries[ nCur ]; if( pEntry != pThisEntryNot && pEntry->IsSelected() ) - SelectEntry( pEntry, sal_False, sal_True, sal_True, bPaintSync ); + SelectEntry( pEntry, false, true, true, bPaintSync ); } pAnchor = 0; nFlags &= (~F_ADD_MODE); @@ -2650,7 +2650,7 @@ void SvxIconChoiceCtrl_Impl::Center( SvxIconChoiceCtrlEntry* pEntry ) const // The deltas are the offsets by which the view is moved on the document. // left, up: offsets < 0 // right, down: offsets > 0 -void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar ) +void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY, bool bScrollBar ) { const MapMode& rMapMode = pView->GetMapMode(); Point aOrigin( rMapMode.GetOrigin() ); @@ -2696,7 +2696,7 @@ static Rectangle GetHotSpot( const Rectangle& rRect ) } void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, - sal_Bool bAdd, std::vector* pOtherRects ) + bool bAdd, std::vector* pOtherRects ) { DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr"); Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); @@ -2712,7 +2712,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, return; // set flag, so ToTop won't be called in Select - sal_Bool bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? sal_True : sal_False; + bool bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? true : false; nFlags |= F_SELECTING_RECT; CheckBoundingRects(); @@ -2723,10 +2723,10 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, aRect.Justify(); bool bCalcOverlap = (bAdd && pOtherRects && !pOtherRects->empty()); - sal_Bool bResetClipRegion = sal_False; + bool bResetClipRegion = false; if( !pView->IsClipRegion() ) { - bResetClipRegion = sal_True; + bResetClipRegion = true; pView->SetClipRegion(Region(GetOutputRect())); } @@ -2737,28 +2737,28 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, if( !IsBoundingRectValid( pEntry->aRect )) FindBoundingRect( pEntry ); Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) ); - sal_Bool bSelected = pEntry->IsSelected(); + bool bSelected = pEntry->IsSelected(); - sal_Bool bOverlaps; + bool bOverlaps; if( bCalcOverlap ) bOverlaps = IsOver( pOtherRects, aBoundRect ); else - bOverlaps = sal_False; - sal_Bool bOver = aRect.IsOver( aBoundRect ); + bOverlaps = false; + bool bOver = aRect.IsOver( aBoundRect ); if( bOver && !bOverlaps ) { // is inside the new selection rectangle and outside of any old one // => select if( !bSelected ) - SelectEntry( pEntry, sal_True, sal_True, sal_True ); + SelectEntry( pEntry, true, true, true ); } else if( !bAdd ) { // is outside of the selection rectangle // => deselect if( bSelected ) - SelectEntry( pEntry, sal_False, sal_True, sal_True ); + SelectEntry( pEntry, false, true, true ); } else if( bAdd && bOverlaps ) { @@ -2777,19 +2777,19 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, { // deselect intersection between old rectangles and current rectangle if( bSelected ) - SelectEntry( pEntry, sal_False, sal_True, sal_True ); + SelectEntry( pEntry, false, true, true ); } else { // select entry of an old rectangle if( !bSelected ) - SelectEntry( pEntry, sal_True, sal_True, sal_True ); + SelectEntry( pEntry, true, true, true ); } } else if( !bOver && bSelected ) { // this entry is completely outside the rectangle => deselect it - SelectEntry( pEntry, sal_False, sal_True, sal_True ); + SelectEntry( pEntry, false, true, true ); } } @@ -2804,7 +2804,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, void SvxIconChoiceCtrl_Impl::SelectRange( SvxIconChoiceCtrlEntry* pStart, SvxIconChoiceCtrlEntry* pEnd, - sal_Bool bAdd ) + bool bAdd ) { sal_uLong nFront = GetEntryListPos( pStart ); sal_uLong nBack = GetEntryListPos( pEnd ); @@ -2821,7 +2821,7 @@ void SvxIconChoiceCtrl_Impl::SelectRange( { pEntry = GetEntry( i ); if( pEntry->IsSelected() ) - SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True ); + SelectEntry( pEntry, false, true, true, true ); } } @@ -2830,7 +2830,7 @@ void SvxIconChoiceCtrl_Impl::SelectRange( { pEntry = GetEntry( i ); if( ! pEntry->IsSelected() ) - SelectEntry( pEntry, sal_True, sal_True, sal_True, sal_True ); + SelectEntry( pEntry, true, true, true, true ); } if ( ! bAdd ) @@ -2842,7 +2842,7 @@ void SvxIconChoiceCtrl_Impl::SelectRange( { pEntry = GetEntry( i ); if( pEntry->IsSelected() ) - SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True ); + SelectEntry( pEntry, false, true, true, true ); } } } @@ -2907,12 +2907,12 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, DocRectChangedHdl) return 0; } -sal_Bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) +bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) { Rectangle aRect( CalcTextRect( pEntry )); if( aRect.IsInside( rDocPos ) ) - return sal_True; - return sal_False; + return true; + return false; } IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, EditTimeoutHdl) @@ -2953,18 +2953,18 @@ void SvxIconChoiceCtrl_Impl::AdjustAtGrid( const SvxIconChoiceCtrlEntryPtrVec& r if( rRow.empty() ) return; - sal_Bool bGo; + bool bGo; if( !pStart ) - bGo = sal_True; + bGo = true; else - bGo = sal_False; + bGo = false; long nCurRight = 0; for( sal_uInt16 nCur = 0; nCur < rRow.size(); nCur++ ) { SvxIconChoiceCtrlEntry* pCur = rRow[ nCur ]; if( !bGo && pCur == pStart ) - bGo = sal_True; + bGo = true; // SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pCur); // Decisive (for our eye) is the bitmap, else, the entry might jump too @@ -3029,7 +3029,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, if( eTextMode == IcnShowTextDontKnow ) eTextMode = IcnShowTextShort; eTextMode = eMode; - Arrange( sal_True ); + Arrange( true ); } } else @@ -3070,7 +3070,7 @@ void SvxIconChoiceCtrl_Impl::ShowFocus ( Rectangle& rRect ) else aPenColor.SetColor( COL_WHITE ); - aFocus.bOn = sal_True; + aFocus.bOn = true; aFocus.aPenColor = aPenColor; aFocus.aRect = rRect; } @@ -3092,16 +3092,16 @@ void SvxIconChoiceCtrl_Impl::DrawFocusRect ( OutputDevice* pOut ) pOut->DrawPolyLine ( aPolygon, aLineInfo ); } -sal_Bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const +bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const { - sal_Bool bRet = sal_False; + bool bRet = false; const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); size_t nEntryCount = GetEntryCount(); for ( size_t i = 0; i < nEntryCount; ++i ) { if ( rI18nHelper.MatchMnemonic( GetEntry( i )->GetText(), cChar ) ) { - bRet = sal_True; + bRet = true; rPos = i; break; } @@ -3123,7 +3123,7 @@ IMPL_LINK(SvxIconChoiceCtrl_Impl, UserEventHdl, void*, nId ) else if( nId == EVENTID_SHOW_CURSOR ) { nUserEventShowCursor = 0; - ShowCursor( sal_True ); + ShowCursor( true ); } return 0; } @@ -3145,12 +3145,12 @@ void SvxIconChoiceCtrl_Impl::CancelUserEvents() void SvxIconChoiceCtrl_Impl::InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry ) { if( pEntry == pCursor ) - ShowCursor( sal_False ); + ShowCursor( false ); pView->Invalidate( pEntry->aRect ); Center( pEntry ); pView->Invalidate( pEntry->aRect ); if( pEntry == pCursor ) - ShowCursor( sal_True ); + ShowCursor( true ); } void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) @@ -3159,13 +3159,13 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) if( !pEntry ) return; - StopEntryEditing( sal_True ); + StopEntryEditing( true ); DELETEZ(pEdit); SetNoSelection(); pCurEditedEntry = pEntry; OUString aEntryText( pView->GetEntryText( pEntry, true ) ); - Rectangle aRect( CalcTextRect( pEntry, 0, sal_True, &aEntryText ) ); + Rectangle aRect( CalcTextRect( pEntry, 0, true, &aEntryText ) ); MakeVisible( aRect ); Point aPos( aRect.TopLeft() ); aPos = pView->GetPixelPos( aPos ); @@ -3206,7 +3206,7 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, TextEditEndedHdl) if( pView->EditedEntry( pCurEditedEntry, aText, pEdit->EditingCanceled() ) ) InvalidateEntry( pCurEditedEntry ); if( !GetSelectionCount() ) - SelectEntry( pCurEditedEntry, sal_True ); + SelectEntry( pCurEditedEntry, true ); pEdit->Hide(); if( pEdit->IsGrabFocus() ) @@ -3217,7 +3217,7 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, TextEditEndedHdl) return 0; } -void SvxIconChoiceCtrl_Impl::StopEntryEditing( sal_Bool bCancel ) +void SvxIconChoiceCtrl_Impl::StopEntryEditing( bool bCancel ) { if( pEdit ) pEdit->StopEditing( bCancel ); @@ -3268,15 +3268,15 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( sal_uLong return 0; } -void SvxIconChoiceCtrl_Impl::SelectAll( sal_Bool bSelect, sal_Bool bPaint ) +void SvxIconChoiceCtrl_Impl::SelectAll( bool bSelect, bool bPaint ) { - bPaint = sal_True; + bPaint = true; size_t nCount = aEntries.size(); for( size_t nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = aEntries[ nCur ]; - SelectEntry( pEntry, bSelect, sal_True, sal_True, bPaint ); + SelectEntry( pEntry, bSelect, true, true, bPaint ); } nFlags &= (~F_ADD_MODE); pAnchor = 0; @@ -3286,9 +3286,9 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo const Size& rSize, const OUString& rData, const Link& rNotifyEditEnd ) : MultiLineEdit( pParent, (pParent->GetStyle() & WB_ICON) ? WB_CENTER : WB_LEFT), aCallBackHdl( rNotifyEditEnd ), - bCanceled( sal_False ), - bAlreadyInCallback( sal_False ), - bGrabFocus( sal_False ) + bCanceled( false ), + bAlreadyInCallback( false ), + bGrabFocus( false ) { Font aFont( pParent->GetPointFont() ); aFont.SetTransparent( false ); @@ -3331,7 +3331,7 @@ void IcnViewEdit_Impl::CallCallBackHdl_Impl() aTimer.Stop(); if ( !bAlreadyInCallback ) { - bAlreadyInCallback = sal_True; + bAlreadyInCallback = true; GetpApp()->RemoveAccel( &aAccReturn ); GetpApp()->RemoveAccel( &aAccEscape ); Hide(); @@ -3347,16 +3347,16 @@ IMPL_LINK_NOARG(IcnViewEdit_Impl, Timeout_Impl) IMPL_LINK( IcnViewEdit_Impl, ReturnHdl_Impl, Accelerator*, EMPTYARG ) { - bCanceled = sal_False; - bGrabFocus = sal_True; + bCanceled = false; + bGrabFocus = true; CallCallBackHdl_Impl(); return 1; } IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG ) { - bCanceled = sal_True; - bGrabFocus = sal_True; + bCanceled = true; + bGrabFocus = true; CallCallBackHdl_Impl(); return 1; } @@ -3369,14 +3369,14 @@ void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt ) switch ( nCode ) { case KEY_ESCAPE: - bCanceled = sal_True; - bGrabFocus = sal_True; + bCanceled = true; + bGrabFocus = true; CallCallBackHdl_Impl(); break; case KEY_RETURN: - bCanceled = sal_False; - bGrabFocus = sal_True; + bCanceled = false; + bGrabFocus = true; CallCallBackHdl_Impl(); break; @@ -3392,7 +3392,7 @@ bool IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt ) if ( !bAlreadyInCallback && ((!Application::GetFocusWindow()) || !IsChild(Application::GetFocusWindow()))) { - bCanceled = sal_False; + bCanceled = false; aTimer.SetTimeout(10); aTimer.SetTimeoutHdl(LINK(this,IcnViewEdit_Impl,Timeout_Impl)); aTimer.Start(); @@ -3401,7 +3401,7 @@ bool IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt ) return false; } -void IcnViewEdit_Impl::StopEditing( sal_Bool bCancel ) +void IcnViewEdit_Impl::StopEditing( bool bCancel ) { if ( !bAlreadyInCallback ) { @@ -3556,16 +3556,16 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry if( !pPredecessor && pHead == pEntry ) return; // is already the first one - sal_Bool bSetHead = sal_False; + bool bSetHead = false; if( !pPredecessor ) { - bSetHead = sal_True; + bSetHead = true; pPredecessor = pHead->pblink; } if( pEntry == pHead ) { pHead = pHead->pflink; - bSetHead = sal_False; + bSetHead = false; } if( pEntry != pPredecessor ) { @@ -3626,23 +3626,23 @@ sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const return nGrid; } -sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) +bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) { if ( !(rHEvt.GetMode() & HELPMODE_QUICK ) ) - return sal_False; + return false; Point aPos( pView->ScreenToOutputPixel(rHEvt.GetMousePosPixel() ) ); aPos -= pView->GetMapMode().GetOrigin(); - SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, sal_True ); + SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, true ); if ( !pEntry ) - return sal_False; + return false; OUString sQuickHelpText = pEntry->GetQuickHelpText(); OUString aEntryText( pView->GetEntryText( pEntry, false ) ); - Rectangle aTextRect( CalcTextRect( pEntry, 0, sal_False, &aEntryText ) ); + Rectangle aTextRect( CalcTextRect( pEntry, 0, false, &aEntryText ) ); if ( ( !aTextRect.IsInside( aPos ) || aEntryText.isEmpty() ) && sQuickHelpText.isEmpty() ) - return sal_False; + return false; Rectangle aOptTextRect( aTextRect ); aOptTextRect.Bottom() = LONG_MAX; @@ -3667,7 +3667,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) Help::ShowQuickHelp( (Window*)pView, aOptTextRect, sHelpText, QUICKHELP_LEFT | QUICKHELP_VCENTER ); } - return sal_True; + return true; } void SvxIconChoiceCtrl_Impl::ClearColumnList() @@ -3707,7 +3707,7 @@ const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 } void SvxIconChoiceCtrl_Impl::DrawHighlightFrame( - OutputDevice* pOut, const Rectangle& rBmpRect, sal_Bool bHide ) + OutputDevice* pOut, const Rectangle& rBmpRect, bool bHide ) { Rectangle aBmpRect( rBmpRect ); long nBorder = 2; @@ -3733,20 +3733,20 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame( } void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry, - sal_Bool bKeepHighlightFlags ) + bool bKeepHighlightFlags ) { if( pEntry == pCurHighlightFrame ) return; if( !bKeepHighlightFlags ) - bHighlightFramePressed = sal_False; + bHighlightFramePressed = false; HideEntryHighlightFrame(); pCurHighlightFrame = pEntry; if( pEntry ) { Rectangle aBmpRect( CalcFocusRect(pEntry) ); - DrawHighlightFrame( pView, aBmpRect, sal_False ); + DrawHighlightFrame( pView, aBmpRect, false ); } } @@ -3758,7 +3758,7 @@ void SvxIconChoiceCtrl_Impl::HideEntryHighlightFrame() SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame; pCurHighlightFrame = 0; Rectangle aBmpRect( CalcFocusRect(pEntry) ); - DrawHighlightFrame( pView, aBmpRect, sal_True ); + DrawHighlightFrame( pView, aBmpRect, true ); } void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* ) @@ -3789,14 +3789,14 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, CallSelectHdlHdl) return 0; } -void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, sal_Bool bDoNotUpdateWallpaper ) +void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, bool bDoNotUpdateWallpaper ) { MapMode aMapMode( pView->GetMapMode() ); aMapMode.SetOrigin( rPos ); pView->SetMapMode( aMapMode ); if( !bDoNotUpdateWallpaper ) { - sal_Bool bScrollable = pView->GetBackground().IsScrollable(); + bool bScrollable = pView->GetBackground().IsScrollable(); if( pView->HasBackground() && !bScrollable ) { Rectangle aRect( GetOutputRect()); diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index 6e0a31a80332..dda5d4eeb38b 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -289,7 +289,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL a,b,c : 2nd, 3rd, 4th searched rectangle */ -SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bRight ) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, bool bRight ) { SvxIconChoiceCtrlEntry* pResult; pCurEntry = pCtrlEntry; @@ -337,7 +337,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt return 0; } -SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, sal_Bool bDown) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, bool bDown) { if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) ) { @@ -397,7 +397,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS return 0; } -SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bDown) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, bool bDown) { if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) ) { @@ -557,9 +557,9 @@ void IcnGridMap_Impl::Expand() else nNewGridCols += 50; - sal_Bool* pNewGridMap = new sal_Bool[nNewGridRows*nNewGridCols]; - memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(sal_Bool) ); - memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(sal_Bool) ); + bool* pNewGridMap = new bool[nNewGridRows*nNewGridCols]; + memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(bool) ); + memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(bool) ); delete[] _pGridMap; _pGridMap = pNewGridMap; _nGridRows = nNewGridRows; @@ -578,7 +578,7 @@ void IcnGridMap_Impl::Create_Impl() else _nGridCols += 50; - _pGridMap = new sal_Bool[ _nGridRows * _nGridCols]; + _pGridMap = new bool[ _nGridRows * _nGridCols]; memset( (void*)_pGridMap, 0, _nGridRows * _nGridCols ); const size_t nCount = _pView->aEntries.size(); @@ -637,7 +637,7 @@ GridId IcnGridMap_Impl::GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY ) return nGridY + ( nGridX * _nGridRows ); } -GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, sal_Bool* pbClipped ) +GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, bool* pbClipped ) { Create(); @@ -647,16 +647,16 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, sal_Bool* pbClipped ) nY -= TBOFFS_WINBORDER; nX /= _pView->nGridDX; nY /= _pView->nGridDY; - sal_Bool bClipped = sal_False; + bool bClipped = false; if( nX >= _nGridCols ) { nX = _nGridCols - 1; - bClipped = sal_True; + bClipped = true; } if( nY >= _nGridRows ) { nY = _nGridRows - 1; - bClipped = sal_True; + bClipped = true; } GridId nId = GetGrid( (sal_uInt16)nX, (sal_uInt16)nY ); if( pbClipped ) @@ -678,11 +678,11 @@ Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) nTop + _pView->nGridDY ); } -GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound ) +GridId IcnGridMap_Impl::GetUnoccupiedGrid( bool bOccupyFound ) { Create(); sal_uLong nStart = 0; - sal_Bool bExpanded = sal_False; + bool bExpanded = false; while( true ) { @@ -692,14 +692,14 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound ) if( !_pGridMap[ nCur ] ) { if( bOccupyFound ) - _pGridMap[ nCur ] = sal_True; + _pGridMap[ nCur ] = true; return (GridId)nCur; } } DBG_ASSERT(!bExpanded,"ExpandGrid failed"); if( bExpanded ) return 0; // prevent never ending loop - bExpanded = sal_True; + bExpanded = true; Expand(); nStart = nCount; } @@ -708,7 +708,7 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound ) // An entry only means that there's a GridRect lying under its center. This // variant is much faster than allocating via the bounding rectangle but can // lead to small overlaps. -void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, sal_Bool bOccupy ) +void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, bool bOccupy ) { if( !_pGridMap || !_pView->IsBoundingRectValid( pEntry->aRect )) return; diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 8f50356e71a0..030394b02314 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -352,7 +352,7 @@ long SvtIconWindow_Impl::CalcHeight() const return nHeight; } -sal_Bool SvtIconWindow_Impl::IsRootURL( const OUString& rURL ) const +bool SvtIconWindow_Impl::IsRootURL( const OUString& rURL ) const { return rURL == aNewDocumentRootURL || rURL == aTemplateRootURL || @@ -412,7 +412,7 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( SvtTemplateWindow* pParent ) : rParent ( *pParent ), aFileView ( this, SvtResId( CTRL_FILEVIEW ), FILEVIEW_SHOW_NONE | FILEVIEW_SHOW_ONLYTITLE ), - bIsTemplateFolder ( sal_False ) + bIsTemplateFolder ( false ) { aFileView.SetStyle( aFileView.GetStyle() | WB_DIALOGCONTROL | WB_TABSTOP ); @@ -543,7 +543,7 @@ void SvtFileViewWindow_Impl::OpenFolder( const OUString& rURL ) aNewFolderLink.Call( this ); } -sal_Bool SvtFileViewWindow_Impl::HasPreviousLevel( OUString& rURL ) const +bool SvtFileViewWindow_Impl::HasPreviousLevel( OUString& rURL ) const { INetURLObject aViewObj( aFileView.GetViewURL() ); INetURLObject aRootObj( aCurrentRootURL ); @@ -666,7 +666,7 @@ void SvtFrameWindow_Impl::Resize() pEmptyWin->SetSizePixel( aWinSize ); } -void SvtFrameWindow_Impl::OpenFile( const OUString& rURL, sal_Bool bPreview, sal_Bool bIsTemplate, sal_Bool bAsTemplate ) +void SvtFrameWindow_Impl::OpenFile( const OUString& rURL, bool bPreview, bool bIsTemplate, bool bAsTemplate ) { if ( bPreview ) aCurrentURL = rURL; @@ -775,13 +775,13 @@ void SvtFrameWindow_Impl::OpenFile( const OUString& rURL, sal_Bool bPreview, sal } } -void SvtFrameWindow_Impl::ToggleView( sal_Bool bDI ) +void SvtFrameWindow_Impl::ToggleView( bool bDI ) { bDocInfo = bDI; // view is set properly in OpenFile() - OpenFile( aCurrentURL, sal_True, sal_False, sal_False ); + OpenFile( aCurrentURL, true, false, false ); } // class SvtTemplateWindow ----------------------------------------------- @@ -902,7 +902,7 @@ IMPL_LINK_NOARG(SvtTemplateWindow , FileDblClickHdl_Impl) IMPL_LINK_NOARG(SvtTemplateWindow , NewFolderHdl_Impl) { - pFrameWin->OpenFile( "", sal_True, sal_False, sal_False ); + pFrameWin->OpenFile( "", true, false, false ); aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, false ); OUString sURL = pFileWin->GetFolderURL(); @@ -919,14 +919,14 @@ IMPL_LINK_NOARG(SvtTemplateWindow , TimeoutHdl_Impl) { aSelectHdl.Call( this ); OUString sURL = pFileWin->GetSelectedFile(); - sal_Bool bIsNewDoc = ( pIconWin->GetSelectEntryPos() == ICON_POS_NEWDOC ); - sal_Bool bIsFile = ( !sURL.isEmpty() && !::utl::UCBContentHelper::IsFolder( sURL ) && + bool bIsNewDoc = ( pIconWin->GetSelectEntryPos() == ICON_POS_NEWDOC ); + bool bIsFile = ( !sURL.isEmpty() && !::utl::UCBContentHelper::IsFolder( sURL ) && INetURLObject( sURL ).GetProtocol() != INET_PROT_PRIVATE && !bIsNewDoc ); aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, bIsFile ); aFrameWinTB.EnableItem( TI_DOCTEMPLATE_PREVIEW, !bIsNewDoc ); if ( bIsFile ) - pFrameWin->OpenFile( sURL, sal_True, sal_False, sal_False ); + pFrameWin->OpenFile( sURL, true, false, false ); else if ( bIsNewDoc && aFrameWinTB.IsItemChecked( TI_DOCTEMPLATE_PREVIEW ) ) { aFrameWinTB.CheckItem( TI_DOCTEMPLATE_DOCINFO ); @@ -978,7 +978,7 @@ void SvtTemplateWindow::PrintFile( const OUString& rURL ) void SvtTemplateWindow::AppendHistoryURL( const OUString& rURL, sal_uLong nGroup ) { - sal_Bool bInsert = sal_True; + bool bInsert = true; if ( !pHistoryList ) pHistoryList = new HistoryList_Impl; else if ( pHistoryList->size() > 0 ) @@ -1060,7 +1060,7 @@ void SvtTemplateWindow::InitToolBoxes() aSize.Height() += 4; aFrameWinTB.SetPosSizePixel( Point( pFrameWin->GetPosPixel().X() + 2, 2 ), aSize ); - sal_Bool bFlat = ( SvtMiscOptions().GetToolboxStyle() == TOOLBOX_STYLE_FLAT ); + bool bFlat = ( SvtMiscOptions().GetToolboxStyle() == TOOLBOX_STYLE_FLAT ); if ( bFlat ) { aFileViewTB.SetOutStyle( TOOLBOX_STYLE_FLAT ); @@ -1081,7 +1081,7 @@ void SvtTemplateWindow::InitToolBoxes() void SvtTemplateWindow::InitToolBoxImages() { SvtMiscOptions aMiscOpt; - sal_Bool bLarge = aMiscOpt.AreCurrentSymbolsLarge(); + bool bLarge = aMiscOpt.AreCurrentSymbolsLarge(); aFileViewTB.SetItemImage( TI_DOCTEMPLATE_BACK, Image( SvtResId( bLarge ? IMG_SVT_DOCTEMPLATE_BACK_LARGE @@ -1193,20 +1193,20 @@ OUString SvtTemplateWindow::GetSelectedFile() const -sal_Bool SvtTemplateWindow::IsFileSelected() const +bool SvtTemplateWindow::IsFileSelected() const { OUString aURL = pFileWin->GetSelectedFile(); - sal_Bool bRet = ( !aURL.isEmpty() && !::utl::UCBContentHelper::IsFolder( aURL ) ); + bool bRet = ( !aURL.isEmpty() && !::utl::UCBContentHelper::IsFolder( aURL ) ); return bRet; } -void SvtTemplateWindow::OpenFile( sal_Bool bNotAsTemplate ) +void SvtTemplateWindow::OpenFile( bool bNotAsTemplate ) { OUString aURL = pFileWin->GetSelectedFile(); if ( !aURL.isEmpty() && !::utl::UCBContentHelper::IsFolder( aURL ) ) - pFrameWin->OpenFile( aURL, sal_False, pFileWin->IsTemplateFolder(), !bNotAsTemplate ); + pFrameWin->OpenFile( aURL, false, pFileWin->IsTemplateFolder(), !bNotAsTemplate ); } @@ -1232,7 +1232,7 @@ OUString SvtTemplateWindow::GetFolderURL() const -void SvtTemplateWindow::SetFocus( sal_Bool bIconWin ) +void SvtTemplateWindow::SetFocus( bool bIconWin ) { if ( bIconWin ) pIconWin->SetFocus(); @@ -1255,7 +1255,7 @@ void SvtTemplateWindow::SetPrevLevelButtonState( const OUString& rURL ) // and on the root of all (file:/// -> count == 0) INetURLObject aObj( rURL ); sal_Int32 nCount = aObj.getSegmentCount(); - sal_Bool bEnable = + bool bEnable = ( nCount > 0 && ( !pIconWin->IsRootURL( rURL ) || rURL == pIconWin->GetMyDocumentsRootURL() ) ); aFileViewTB.EnableItem( TI_DOCTEMPLATE_PREV, bEnable ); @@ -1380,12 +1380,12 @@ struct SvtTmplDlg_Impl SvtTemplateWindow* pWin; OUString aTitle; Timer aUpdateTimer; - sal_Bool bSelectNoOpen; + bool bSelectNoOpen; uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs; - SvtTmplDlg_Impl( Window* pParent ) : pWin( new SvtTemplateWindow( pParent ) ) ,bSelectNoOpen( sal_False ) {} + SvtTmplDlg_Impl( Window* pParent ) : pWin( new SvtTemplateWindow( pParent ) ) ,bSelectNoOpen( false ) {} ~SvtTmplDlg_Impl() { delete pWin; } }; @@ -1649,7 +1649,7 @@ IMPL_LINK_NOARG(SvtDocumentTemplateDialog, PackageHdl_Impl) IMPL_LINK ( SvtDocumentTemplateDialog, UpdateHdl_Impl, Timer*, _pEventSource ) { - pImpl->pWin->SetFocus( sal_False ); + pImpl->pWin->SetFocus( false ); Reference< XDocumentTemplates > xTemplates( frame::DocumentTemplates::create(::comphelper::getProcessComponentContext()) ); if ( _pEventSource ) { // it was no direct call, which means it was triggered by the timer, which means we alread checked the necessity diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx index c759e3270f99..368bc894ad75 100644 --- a/svtools/source/contnr/templwin.hxx +++ b/svtools/source/contnr/templwin.hxx @@ -89,11 +89,11 @@ public: sal_uLong GetSelectEntryPos() const; void SetFocus(); long CalcHeight() const; - sal_Bool IsRootURL( const OUString& rURL ) const; + bool IsRootURL( const OUString& rURL ) const; sal_uLong GetRootPos( const OUString& rURL ) const; void UpdateIcons(); - inline sal_Bool ProcessKeyEvent( const KeyEvent& rKEvt ); + inline bool ProcessKeyEvent( const KeyEvent& rKEvt ); inline const OUString& GetTemplateRootURL() const { return aTemplateRootURL; } inline const OUString& GetMyDocumentsRootURL() const { return aMyDocumentsRootURL; } @@ -102,9 +102,9 @@ public: void SelectFolder(sal_Int32 nFolderPos); }; -inline sal_Bool SvtIconWindow_Impl::ProcessKeyEvent( const KeyEvent& rKEvt ) +inline bool SvtIconWindow_Impl::ProcessKeyEvent( const KeyEvent& rKEvt ) { - return ( rKEvt.GetKeyCode().IsMod2() ? aIconCtrl.DoKeyInput( rKEvt ) : sal_False ); + return rKEvt.GetKeyCode().IsMod2() && aIconCtrl.DoKeyInput( rKEvt ); } // class SvtFileViewWindow_Impl ------------------------------------------ @@ -122,7 +122,7 @@ private: OUString aMyDocumentsURL; OUString aSamplesFolderURL; - sal_Bool bIsTemplateFolder; + bool bIsTemplateFolder; ::com::sun::star::uno::Sequence< OUString > GetNewDocContents() const; @@ -136,7 +136,7 @@ public: inline void SetSelectHdl( const Link& rLink ) { aFileView.SetSelectHdl( rLink ); } inline void SetDoubleClickHdl( const Link& rLink ) { aFileView.SetDoubleClickHdl( rLink ); } inline void SetNewFolderHdl( const Link& rLink ) { aNewFolderLink = rLink; } - inline sal_Bool IsTemplateFolder() const { return bIsTemplateFolder; } + inline bool IsTemplateFolder() const { return bIsTemplateFolder; } inline OUString GetFolderURL() const { return aFolderURL; } inline OUString GetRootURL() const { return aCurrentRootURL; } inline void OpenRoot( const OUString& rRootURL ) @@ -146,7 +146,7 @@ public: OUString GetSelectedFile() const; void OpenFolder( const OUString& rURL ); - sal_Bool HasPreviousLevel( OUString& rURL ) const; + bool HasPreviousLevel( OUString& rURL ) const; OUString GetFolderTitle() const; void SetFocus(); }; @@ -178,8 +178,8 @@ private: ::com::sun::star::lang::Locale aLocale; SvtDocInfoTable_Impl aInfoTable; OUString aCurrentURL; - OUString m_aOpenURL; - sal_Bool bDocInfo; + OUString m_aOpenURL; + bool bDocInfo; void ShowDocInfo( const OUString& rURL ); void ViewEditWin(); @@ -199,8 +199,8 @@ public: virtual void Resize() SAL_OVERRIDE; - void OpenFile( const OUString& rURL, sal_Bool bPreview, sal_Bool bIsTemplate, sal_Bool bAsTemplate ); - void ToggleView( sal_Bool bDocInfo ); + void OpenFile( const OUString& rURL, bool bPreview, bool bIsTemplate, bool bAsTemplate ); + void ToggleView( bool bDocInfo ); }; // class SvtTemplateWindow ----------------------------------------------- @@ -259,17 +259,17 @@ public: inline void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickHdl = rLink; } inline void SetNewFolderHdl( const Link& rLink ) { aNewFolderHdl = rLink; } inline void SetSendFocusHdl( const Link& rLink ) { aSendFocusHdl = rLink; } - inline sal_Bool IsTemplateFolderOpen() const { return pFileWin->IsTemplateFolder(); } - inline sal_Bool HasIconWinFocus() const { return pIconWin->HasChildPathFocus(); } + inline bool IsTemplateFolderOpen() const { return pFileWin->IsTemplateFolder(); } + inline bool HasIconWinFocus() const { return pIconWin->HasChildPathFocus(); } void ReadViewSettings( ); void WriteViewSettings( ); - sal_Bool IsFileSelected() const; + bool IsFileSelected() const; OUString GetSelectedFile() const; - void OpenFile( sal_Bool bNotAsTemplate ); + void OpenFile( bool bNotAsTemplate ); OUString GetFolderTitle() const; OUString GetFolderURL() const; - void SetFocus( sal_Bool bIconWin ); + void SetFocus( bool bIconWin ); void OpenTemplateRoot(); void SetPrevLevelButtonState( const OUString& rURL ); // sets state (enable/disable) for previous level button void ClearHistory(); diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index d73fe8f3fe3b..cd1bc2857ce9 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -334,7 +334,7 @@ void ToolbarMenu_Impl::selectAccessibleChild( sal_Int32 nChildIndex ) throw (Ind -sal_Bool ToolbarMenu_Impl::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) +bool ToolbarMenu_Impl::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { const int nEntryCount = maEntryVector.size(); for( int nEntry = 0; nEntry < nEntryCount; nEntry++ ) @@ -1285,7 +1285,7 @@ void ToolbarMenu::KeyInput( const KeyEvent& rKEvent ) static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight ) { - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx index 53ce583569f2..235f1f4ce617 100644 --- a/svtools/source/control/toolbarmenuimp.hxx +++ b/svtools/source/control/toolbarmenuimp.hxx @@ -300,7 +300,7 @@ struct ToolbarMenu_Impl ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getAccessibleChild( Control* pControl, sal_Int32 childIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); void selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - sal_Bool isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + bool isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); void clearAccessibleSelection(); ToolbarMenuEntry* implGetEntry( int nEntry ) const; diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 03be8a29bc60..f0d7ede91cc7 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -237,14 +237,14 @@ sal_Int32 SAL_CALL ValueSetAcc::getAccessibleIndexInParent() if( pParent ) { - sal_Bool bFound = sal_False; + bool bFound = false; for( sal_uInt16 i = 0, nCount = pParent->GetChildCount(); ( i < nCount ) && !bFound; i++ ) { if( pParent->GetChild( i ) == mpParent ) { nRet = i; - bFound = sal_True; + bFound = true; } } } @@ -392,12 +392,12 @@ void SAL_CALL ValueSetAcc::addAccessibleEventListener( const uno::Reference< acc if( rxListener.is() ) { ::std::vector< uno::Reference< accessibility::XAccessibleEventListener > >::const_iterator aIter = mxEventListeners.begin(); - sal_Bool bFound = sal_False; + bool bFound = false; while( !bFound && ( aIter != mxEventListeners.end() ) ) { if( *aIter == rxListener ) - bFound = sal_True; + bFound = true; else ++aIter; } @@ -592,7 +592,7 @@ sal_Bool SAL_CALL ValueSetAcc::isAccessibleChildSelected( sal_Int32 nChildIndex ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex)); - sal_Bool bRet = sal_False; + bool bRet = false; if (pItem != NULL) bRet = mpParent->IsItemSelected( pItem->mnId ); @@ -1058,12 +1058,12 @@ void SAL_CALL ValueItemAcc::addAccessibleEventListener( const uno::Reference< ac if( rxListener.is() ) { ::std::vector< uno::Reference< accessibility::XAccessibleEventListener > >::const_iterator aIter = mxEventListeners.begin(); - sal_Bool bFound = sal_False; + bool bFound = false; while( !bFound && ( aIter != mxEventListeners.end() ) ) { if( *aIter == rxListener ) - bFound = sal_True; + bFound = true; else ++aIter; } diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index e0c8633eff07..c6e2a644a69e 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -84,7 +84,7 @@ public: virtual ~ValueSetAcc(); void FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue ); - sal_Bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } + bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } static ValueSetAcc* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxData ) throw(); @@ -222,7 +222,7 @@ public: void ParentDestroyed(); void FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue ); - sal_Bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } + bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } static ValueItemAcc* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxData ) throw(); diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index 7300d4fc92d5..4bc907c1efba 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -171,10 +171,10 @@ bool DavDetailsContainer::verifyScheme( const OUString& rScheme ) IMPL_LINK( DavDetailsContainer, ToggledDavsHdl, CheckBox*, pCheckBox ) { // Change default port if needed - sal_Bool bCheckedDavs = pCheckBox->IsChecked(); - if ( m_pEDPort->GetValue() == 80 && bCheckedDavs == sal_True) + bool bCheckedDavs = pCheckBox->IsChecked(); + if ( m_pEDPort->GetValue() == 80 && bCheckedDavs ) m_pEDPort->SetValue( 443 ); - else if ( m_pEDPort->GetValue() == 443 && bCheckedDavs == sal_False ) + else if ( m_pEDPort->GetValue() == 443 && bCheckedDavs == false ) m_pEDPort->SetValue( 80 ); OUString sScheme( "http" ); diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index cd6cc732e568..1524eda16c3b 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -104,7 +104,7 @@ namespace svt virtual OUString getCommand() const = 0; /// checks whether or not there is an assignment for a given logical field - virtual sal_Bool hasFieldAssignment(const OUString& _rLogicalName) = 0; + virtual bool hasFieldAssignment(const OUString& _rLogicalName) = 0; /// retrieves the assignment for a given logical field virtual OUString getFieldAssignment(const OUString& _rLogicalName) = 0; @@ -143,9 +143,9 @@ public: virtual OUString getDatasourceName() const SAL_OVERRIDE; virtual OUString getCommand() const SAL_OVERRIDE; - virtual sal_Bool hasFieldAssignment(const OUString& _rLogicalName) SAL_OVERRIDE; + virtual bool hasFieldAssignment(const OUString& _rLogicalName) SAL_OVERRIDE; virtual OUString getFieldAssignment(const OUString& _rLogicalName) SAL_OVERRIDE; - virtual void setFieldAssignment(const OUString& _rLogicalName, const OUString& _rAssignment) SAL_OVERRIDE; + virtual void setFieldAssignment(const OUString& _rLogicalName, const OUString& _rAssignment) SAL_OVERRIDE; virtual void setDatasourceName(const OUString& _rName) SAL_OVERRIDE; virtual void setCommand(const OUString& _rCommand) SAL_OVERRIDE; @@ -206,7 +206,7 @@ public: } - sal_Bool AssigmentTransientData::hasFieldAssignment(const OUString& _rLogicalName) + bool AssigmentTransientData::hasFieldAssignment(const OUString& _rLogicalName) { MapString2String::const_iterator aPos = m_aAliases.find( _rLogicalName ); return ( m_aAliases.end() != aPos ) @@ -272,9 +272,9 @@ public: virtual OUString getDatasourceName() const SAL_OVERRIDE; virtual OUString getCommand() const SAL_OVERRIDE; - virtual sal_Bool hasFieldAssignment(const OUString& _rLogicalName) SAL_OVERRIDE; + virtual bool hasFieldAssignment(const OUString& _rLogicalName) SAL_OVERRIDE; virtual OUString getFieldAssignment(const OUString& _rLogicalName) SAL_OVERRIDE; - virtual void setFieldAssignment(const OUString& _rLogicalName, const OUString& _rAssignment) SAL_OVERRIDE; + virtual void setFieldAssignment(const OUString& _rLogicalName, const OUString& _rAssignment) SAL_OVERRIDE; virtual void setDatasourceName(const OUString& _rName) SAL_OVERRIDE; virtual void setCommand(const OUString& _rCommand) SAL_OVERRIDE; @@ -311,7 +311,7 @@ void AssignmentPersistentData::Commit() } - sal_Bool AssignmentPersistentData::hasFieldAssignment(const OUString& _rLogicalName) + bool AssignmentPersistentData::hasFieldAssignment(const OUString& _rLogicalName) { return (m_aStoredFields.end() != m_aStoredFields.find(_rLogicalName)); } @@ -402,7 +402,7 @@ void AssignmentPersistentData::Commit() // just set the new value #ifdef DBG_UTIL - sal_Bool bSuccess = + bool bSuccess = #endif SetSetProperties(sDescriptionNodePath, aNewFieldDescription); DBG_ASSERT(bSuccess, "AssignmentPersistentData::setFieldAssignment: could not commit the changes a field!"); @@ -460,9 +460,9 @@ void AssignmentPersistentData::Commit() /// the index within m_pFields of the last visible list box. This is redundant, it could be extracted from other members sal_Int32 nLastVisibleListIndex; /// indicates that we've an odd field number. This member is for efficiency only, it's redundant. - sal_Bool bOddFieldNumber : 1; + bool bOddFieldNumber : 1; /// indicates that we're working with the real persistent configuration - sal_Bool bWorkingPersistent : 1; + bool bWorkingPersistent : 1; /// the strings to use as labels for the field selection listboxes StringArray aFieldLabels; @@ -477,8 +477,8 @@ void AssignmentPersistentData::Commit() AddressBookSourceDialogData( ) :nFieldScrollPos(0) ,nLastVisibleListIndex(0) - ,bOddFieldNumber(sal_False) - ,bWorkingPersistent( sal_True ) + ,bOddFieldNumber(false) + ,bWorkingPersistent( true ) ,pConfigData( new AssignmentPersistentData ) { } @@ -489,8 +489,8 @@ void AssignmentPersistentData::Commit() :m_xTransientDataSource( _rxTransientDS ) ,nFieldScrollPos(0) ,nLastVisibleListIndex(0) - ,bOddFieldNumber(sal_False) - ,bWorkingPersistent( sal_False ) + ,bOddFieldNumber(false) + ,bWorkingPersistent( false ) ,pConfigData( new AssigmentTransientData( m_xTransientDataSource, _rDataSourceName, _rTableName, _rFields ) ) { } @@ -866,7 +866,7 @@ void AssignmentPersistentData::Commit() return; } - sal_Bool bKnowOldTable = sal_False; + bool bKnowOldTable = false; // fill the table list const OUString* pTableNames = aTableNames.getConstArray(); const OUString* pEnd = pTableNames + aTableNames.getLength(); @@ -874,7 +874,7 @@ void AssignmentPersistentData::Commit() { m_pTable->InsertEntry(*pTableNames); if (0 == pTableNames->compareTo(sOldTable)) - bKnowOldTable = sal_True; + bKnowOldTable = true; } // set the old table, if the new data source knows a table with this name, too. Else reset the tables edit field. @@ -1038,7 +1038,7 @@ void AssignmentPersistentData::Commit() // (If sometimes we support an arbitrary number of field assignments, we would have to care for // an invisible left hand side column, too. But right now, the left hand side controls are always // visible) - sal_Bool bHideRightColumn = pRightColumnLabel->isEmpty(); + bool bHideRightColumn = pRightColumnLabel->isEmpty(); (*pRightLabelControl)->Show(!bHideRightColumn); (*pRightListControl)->Show(!bHideRightColumn); // the new selections of the listboxes @@ -1231,9 +1231,9 @@ void AssignmentPersistentData::Commit() { const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode(); - sal_Bool bShift = pKeyEvent->GetKeyCode().IsShift(); - sal_Bool bCtrl = pKeyEvent->GetKeyCode().IsMod1(); - sal_Bool bAlt = pKeyEvent->GetKeyCode().IsMod2(); + bool bShift = pKeyEvent->GetKeyCode().IsShift(); + bool bCtrl = pKeyEvent->GetKeyCode().IsMod1(); + bool bAlt = pKeyEvent->GetKeyCode().IsMod2(); if (KEY_TAB == nCode) { // somebody pressed the tab key diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx index 4fc2c8d0c654..a6a1079abed4 100644 --- a/svtools/source/dialogs/mcvmath.hxx +++ b/svtools/source/dialogs/mcvmath.hxx @@ -89,8 +89,8 @@ public: void DivBig( const Fix& a ) { x=((x< ( const Fix& a, const Fix& b ) { return a.x > b.x; } - friend sal_Bool operator< ( const Fix& a, const Fix& b ) { return a.x < b.x; } + friend bool operator> ( const Fix& a, const Fix& b ) { return a.x > b.x; } + friend bool operator< ( const Fix& a, const Fix& b ) { return a.x < b.x; } operator long() const { return (x+FIX_ADD) >> FIX_POST; } operator double() const { return double(x)/(1<bActivePathIsDefinite ) { for ( Paths::const_iterator aPathPos = m_pImpl->aPaths.begin(); @@ -351,7 +351,7 @@ namespace svt // the path conflicts with our new path -> don't activate the // *complete* new path, but only up to the step which is unambiguous nUpperStepBoundary = nDivergenceIndex; - bIncompletePath = sal_True; + bIncompletePath = true; } } @@ -538,7 +538,7 @@ namespace svt return 0L; } - sal_Bool bResult = sal_True; + bool bResult = true; if ( nNewIndex > nCurrentIndex ) { bResult = skipUntil( (WizardState)nCurItemId ); diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index 94030456e41b..0042d8e50d8d 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -166,7 +166,7 @@ void MultiLineEditSyntaxHighlight::UpdateData() { // syntax highlighting // this must be possible improved by using notifychange correctly - sal_Bool bTempModified = GetTextEngine()->IsModified(); + bool bTempModified = GetTextEngine()->IsModified(); for (unsigned int nLine=0; nLine < GetTextEngine()->GetParagraphCount(); nLine++) { OUString aLine( GetTextEngine()->GetText( nLine ) ); diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index ecce9fa2616d..6f5715d3f909 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -71,7 +71,7 @@ class SvFilterOptionsDialog : public cppu::WeakImplHelper5 OUString maDialogTitle; FieldUnit meFieldUnit; - sal_Bool mbExportSelection; + bool mbExportSelection; public: @@ -117,7 +117,7 @@ public: SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< uno::XComponentContext >& rxContext ) : mxContext ( rxContext ), meFieldUnit ( FUNIT_CM ), - mbExportSelection ( sal_False ) + mbExportSelection ( false ) { } @@ -255,7 +255,7 @@ sal_Int16 SvFilterOptionsDialog::execute() aFltCallDlgPara.pResMgr = pResMgr; aFltCallDlgPara.aFilterExt = aGraphicFilter.GetExportFormatShortName( nFormat ); - sal_Bool bIsPixelFormat( aGraphicFilter.IsExportPixelFormat( nFormat ) ); + bool bIsPixelFormat( aGraphicFilter.IsExportPixelFormat( nFormat ) ); if ( ExportDialog( aFltCallDlgPara, mxContext, mxSourceDocument, mbExportSelection, bIsPixelFormat ).Execute() == RET_OK ) nRet = ui::dialogs::ExecutableDialogResults::OK; diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 6fcd02b0e510..813256e2d1bb 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -174,7 +174,7 @@ static basegfx::B2DRange GetShapeRangeForXShape( const uno::Reference< drawing:: return aShapeRange; } -uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpdateConfig ) +uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( bool bUpdateConfig ) { if ( bUpdateConfig ) { @@ -329,7 +329,7 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpd } uno::Sequence< beans::PropertyValue > aRet( pFilterOptions->GetFilterData() ); - if ( bUpdateConfig == sal_False ) + if ( bUpdateConfig == false ) delete pFilterOptions; return aRet; } @@ -425,9 +425,9 @@ void ExportDialog::GetGraphicSource() } } -sal_Bool ExportDialog::GetGraphicStream() +bool ExportDialog::GetGraphicStream() { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !IsTempExportAvailable() ) { @@ -436,14 +436,14 @@ sal_Bool ExportDialog::GetGraphicStream() return bRet; } - sal_Bool bRecreateOutputStream = mpTempStream->Tell() == 0; + bool bRecreateOutputStream = mpTempStream->Tell() == 0; static uno::Sequence< beans::PropertyValue > aOldFilterData; - uno::Sequence< beans::PropertyValue > aNewFilterData( GetFilterData( sal_False ) ); + uno::Sequence< beans::PropertyValue > aNewFilterData( GetFilterData( false ) ); if ( aOldFilterData != aNewFilterData ) { aOldFilterData = aNewFilterData; - bRecreateOutputStream = sal_True; + bRecreateOutputStream = true; } try { @@ -478,7 +478,7 @@ sal_Bool ExportDialog::GetGraphicStream() { xGraphicExporter->setSourceDocument( xSourceDoc ); xGraphicExporter->filter( aDescriptor ); - bRet = sal_True; + bRet = true; if ( mnFormat == FORMAT_JPG ) { @@ -489,7 +489,7 @@ sal_Bool ExportDialog::GetGraphicStream() } } else - bRet = sal_True; + bRet = true; } catch( uno::Exception& ) { @@ -548,7 +548,7 @@ sal_uInt32 ExportDialog::GetRawFileSize() const // checks if the source dimension/resolution is not too big // to determine the exact graphic output size and preview for jpg -sal_Bool ExportDialog::IsTempExportAvailable() const +bool ExportDialog::IsTempExportAvailable() const { return GetRawFileSize() < static_cast< sal_uInt32 >( mnMaxFilesizeForRealtimePreview ); } @@ -556,7 +556,7 @@ sal_Bool ExportDialog::IsTempExportAvailable() const ExportDialog::ExportDialog(FltCallDialogParameter& rPara, const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, - sal_Bool bExportSelection, sal_Bool bIsPixelFormat) + bool bExportSelection, bool bIsPixelFormat) : ModalDialog(rPara.pWindow, "GraphicExportDialog", "svt/ui/graphicexport.ui") , mrFltCallPara(rPara) , mxContext(rxContext) @@ -580,7 +580,7 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara, , maOriginalSize(awt::Size(0, 0)) , mbIsPixelFormat(bIsPixelFormat) , mbExportSelection(bExportSelection) - , mbPreserveAspectRatio(sal_True) + , mbPreserveAspectRatio(true) { get(mpMfSizeX, "widthmf-nospin"); get(mpMfSizeY, "heightmf-nospin"); @@ -974,7 +974,7 @@ void ExportDialog::updateControls() // EPS if ( mpRbEPSLevel1->IsVisible() ) { - sal_Bool bEnabled = !mpRbEPSLevel1->IsChecked(); + bool bEnabled = !mpRbEPSLevel1->IsChecked(); mpRbEPSColorFormat1->Enable( bEnabled ); mpRbEPSColorFormat2->Enable( bEnabled ); mpRbEPSCompressionLZW->Enable( bEnabled ); @@ -1094,7 +1094,7 @@ IMPL_LINK_NOARG(ExportDialog, OK) // writing config parameter - mrFltCallPara.aFilterData = GetFilterData( sal_True ); + mrFltCallPara.aFilterData = GetFilterData( true ); EndDialog( RET_OK ); return 0; diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx index 75a827e3cd0c..d7cb0f71a595 100644 --- a/svtools/source/filter/exportdialog.hxx +++ b/svtools/source/filter/exportdialog.hxx @@ -127,9 +127,9 @@ private: com::sun::star::awt::Size maSize; // for vector graphics it always contains the logical size in 1/100mm - sal_Bool mbIsPixelFormat; - sal_Bool mbExportSelection; - sal_Bool mbPreserveAspectRatio; + bool mbIsPixelFormat; + bool mbExportSelection; + bool mbPreserveAspectRatio; sal_Int32 mnInitialResolutionUnit; @@ -160,13 +160,13 @@ private: void updateControls(); void GetGraphicSource(); - sal_Bool GetGraphicStream(); + bool GetGraphicStream(); Bitmap GetGraphicBitmap( SvStream& rStream ); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > - GetFilterData( sal_Bool bUpdateConfig ); + GetFilterData( bool bUpdateConfig ); sal_uInt32 GetRawFileSize() const; - sal_Bool IsTempExportAvailable() const; + bool IsTempExportAvailable() const; com::sun::star::awt::Size GetOriginalSize(); @@ -177,7 +177,7 @@ public: ExportDialog( FltCallDialogParameter& rPara, const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, - sal_Bool bExportSelection, sal_Bool bIsExportVectorFormat ); + bool bExportSelection, bool bIsExportVectorFormat ); virtual ~ExportDialog(); }; diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 799902ca2624..9bad92e5ecd1 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -443,19 +443,19 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** case( UNOGRAPHIC_TRANSPARENT ): { - *pValues <<= static_cast< sal_Bool >( mpGraphic ? mpGraphic->IsTransparent() : mbTransparent ); + *pValues <<= mpGraphic ? mpGraphic->IsTransparent() : mbTransparent; } break; case( UNOGRAPHIC_ALPHA ): { - *pValues <<= static_cast< sal_Bool >( mpGraphic ? mpGraphic->IsAlpha() : mbAlpha ); + *pValues <<= mpGraphic ? mpGraphic->IsAlpha() : mbAlpha; } break; case( UNOGRAPHIC_ANIMATED ): { - *pValues <<= static_cast< sal_Bool >( mpGraphic ? mpGraphic->IsAnimated() : mbAnimated ); + *pValues <<= mpGraphic ? mpGraphic->IsAnimated() : mbAnimated; } break; } diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 03dbf565680c..26d766af354c 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -52,14 +52,14 @@ public: GraphicID( const GraphicObject& rObj ); ~GraphicID() {} - sal_Bool operator==( const GraphicID& rID ) const + bool operator==( const GraphicID& rID ) const { return( rID.mnID1 == mnID1 && rID.mnID2 == mnID2 && rID.mnID3 == mnID3 && rID.mnID4 == mnID4 ); } OString GetIDString() const; - sal_Bool IsEmpty() const { return( 0 == mnID4 ); } + bool IsEmpty() const { return( 0 == mnID4 ); } }; GraphicID::GraphicID( const GraphicObject& rObj ) @@ -452,7 +452,7 @@ public: void SetReleaseTime( const ::salhelper::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; } const ::salhelper::TTimeValue& GetReleaseTime() const { return maReleaseTime; } - sal_Bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, + bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const { // #i46805# Additional match @@ -846,7 +846,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject* pCopyObj ) { - sal_Bool bInserted = sal_False; + bool bInserted = false; if( !rObj.IsSwappedOut() && ( pID @@ -869,7 +869,7 @@ void GraphicCache::AddGraphicObject( if( (*it)->HasGraphicObjectReference( *pCopyObj ) ) { (*it)->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = sal_True; + bInserted = true; } else { @@ -913,14 +913,14 @@ void GraphicCache::AddGraphicObject( if( rID.GetIDString() == *pID ) { (*jt)->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = sal_True; + bInserted = true; } } if( !bInserted ) { maGraphicCache.push_back( new GraphicCacheEntry( rObj ) ); - bInserted = sal_True; + bInserted = true; } } } @@ -929,7 +929,7 @@ void GraphicCache::AddGraphicObject( if( rEntryID == *apID ) { (*it)->AddGraphicObjectReference( rObj, rSubstitute ); - bInserted = sal_True; + bInserted = true; } } @@ -991,12 +991,12 @@ void GraphicCache::GraphicObjectWasSwappedOut( const GraphicObject& rObj ) pEntry->GraphicObjectWasSwappedOut( rObj ); } -sal_Bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) +bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) { GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj ); if( !pEntry ) - return sal_False; + return false; return pEntry->FillSwappedGraphicObject( rObj, rSubstitute ); } @@ -1025,9 +1025,9 @@ void GraphicCache::SetMaxDisplayCacheSize( sal_uLong nNewCacheSize ) ImplFreeDisplayCacheSpace( GetUsedDisplayCacheSize() - GetMaxDisplayCacheSize() ); } -void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached ) +void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, bool bDestroyGreaterCached ) { - const sal_Bool bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) ); + const bool bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) ); mnMaxObjDisplaySize = std::min( nNewMaxObjSize, mnMaxDisplaySize ); @@ -1069,20 +1069,20 @@ void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds ) } } -sal_Bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { return( GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ) <= GetMaxObjDisplayCacheSize() ); } -sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { const Point aPtPixel( pOut->LogicToPixel( rPt ) ); const Size aSzPixel( pOut->LogicToPixel( rSz ) ); const GraphicCacheEntry* pCacheEntry = ( (GraphicCache*) this )->ImplGetCacheEntry( rObj ); - sal_Bool bFound = sal_False; + bool bFound = false; if( pCacheEntry ) { @@ -1090,7 +1090,7 @@ sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, c !bFound && ( it != maDisplayCache.end() ); ++it ) { if( (*it)->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) ) - bFound = sal_True; + bFound = true; } } @@ -1115,12 +1115,12 @@ OString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const return aRet; } -sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const BitmapEx& rBmpEx ) { const sal_uLong nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ); - sal_Bool bRet = sal_False; + bool bRet = false; if( nNeededSize <= GetMaxObjDisplayCacheSize() ) { @@ -1141,18 +1141,18 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r maDisplayCache.push_back( pNewEntry ); mnUsedDisplaySize += pNewEntry->GetCacheSize(); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const GDIMetaFile& rMtf ) { const sal_uLong nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ); - sal_Bool bRet = sal_False; + bool bRet = false; if( nNeededSize <= GetMaxObjDisplayCacheSize() ) { @@ -1173,13 +1173,13 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r maDisplayCache.push_back( pNewEntry ); mnUsedDisplaySize += pNewEntry->GetCacheSize(); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) { const Point aPtPixel( pOut->LogicToPixel( rPt ) ); @@ -1187,7 +1187,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt const GraphicCacheEntry* pCacheEntry = ImplGetCacheEntry( rObj ); GraphicDisplayCacheEntry* pDisplayCacheEntry = NULL; GraphicDisplayCacheEntryList::iterator it = maDisplayCache.begin(); - sal_Bool bRet = sal_False; + bool bRet = false; while( !bRet && it != maDisplayCache.end() ) { @@ -1207,7 +1207,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt } pDisplayCacheEntry->SetReleaseTime( aReleaseTime ); - bRet = sal_True; + bRet = true; } else ++it; @@ -1219,7 +1219,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt return bRet; } -sal_Bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) +bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) { sal_uLong nFreedSize = 0UL; diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx index 1569f0c0e726..ddb6f6b4eb4c 100644 --- a/svtools/source/graphic/grfcache.hxx +++ b/svtools/source/graphic/grfcache.hxx @@ -47,7 +47,7 @@ private: sal_uLong mnMaxObjDisplaySize; sal_uLong mnUsedDisplaySize; - sal_Bool ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ); + bool ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ); GraphicCacheEntry* ImplGetCacheEntry( const GraphicObject& rObj ); @@ -74,7 +74,7 @@ public: void ReleaseGraphicObject( const GraphicObject& rObj ); void GraphicObjectWasSwappedOut( const GraphicObject& rObj ); - sal_Bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ); + bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ); void GraphicObjectWasSwappedIn( const GraphicObject& rObj ); OString GetUniqueID( const GraphicObject& rObj ) const; @@ -86,7 +86,7 @@ public: void SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, - sal_Bool bDestroyGreaterCached = sal_False + bool bDestroyGreaterCached = false ); sal_uLong GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; } @@ -97,7 +97,7 @@ public: void SetCacheTimeout( sal_uLong nTimeoutSeconds ); sal_uLong GetCacheTimeout() const { return mnReleaseTimeoutSeconds; } - sal_Bool IsDisplayCacheable( + bool IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -105,7 +105,7 @@ public: const GraphicAttr& rAttr ) const; - sal_Bool IsInDisplayCache( + bool IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -113,7 +113,7 @@ public: const GraphicAttr& rAttr ) const; - sal_Bool CreateDisplayCacheObj( + bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -122,7 +122,7 @@ public: const BitmapEx& rBmpEx ); - sal_Bool CreateDisplayCacheObj( + bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -131,7 +131,7 @@ public: const GDIMetaFile& rMtf ); - sal_Bool DrawDisplayCacheObj( + bool DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 0a4d36b8d7ea..9ad16f7b7bcc 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -593,7 +593,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal sal_Int32 nImageResolution = 0; awt::Size aLogicalSize( 0, 0 ); text::GraphicCrop aCropLogic( 0, 0, 0, 0 ); - sal_Bool bRemoveCropArea = sal_True; + bool bRemoveCropArea = true; for( sal_Int32 i = 0; i < rFilterData.getLength(); ++i ) { diff --git a/svtools/source/hatchwindow/documentcloser.cxx b/svtools/source/hatchwindow/documentcloser.cxx index 4b6f5d759c0a..9e64a3dec7f1 100644 --- a/svtools/source/hatchwindow/documentcloser.cxx +++ b/svtools/source/hatchwindow/documentcloser.cxx @@ -51,7 +51,7 @@ class ODocumentCloser : public ::cppu::WeakImplHelper2< ::com::sun::star::lang:: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; ::cppu::OInterfaceContainerHelper* m_pListenersContainer; // list of listeners - sal_Bool m_bDisposed; + bool m_bDisposed; public: ODocumentCloser(const css::uno::Sequence< css::uno::Any >& aArguments); @@ -147,7 +147,7 @@ IMPL_STATIC_LINK( MainThreadFrameCloserRequest, worker, MainThreadFrameCloserReq ODocumentCloser::ODocumentCloser(const css::uno::Sequence< css::uno::Any >& aArguments) : m_pListenersContainer( NULL ) -, m_bDisposed( sal_False ) +, m_bDisposed( false ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_refCount ) @@ -199,7 +199,7 @@ void SAL_CALL ODocumentCloser::dispose() MainThreadFrameCloserRequest::Start( pCloser ); } - m_bDisposed = sal_True; + m_bDisposed = true; } diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index ee7ba35e401f..812601a13dff 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -34,7 +34,7 @@ SvResizeHelper::SvResizeHelper() : aBorder( 5, 5 ) , nGrab( -1 ) - , bResizeable( sal_True ) + , bResizeable( true ) { } @@ -151,7 +151,7 @@ void SvResizeHelper::InvalidateBorder( Window * pWin ) |* |* Description *************************************************************************/ -sal_Bool SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos ) +bool SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos ) { if( -1 == nGrab ) { @@ -160,10 +160,10 @@ sal_Bool SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos ) { aSelPos = rPos; // store start position pWin->CaptureMouse(); - return sal_True; + return true; } } - return sal_False; + return false; } /************************************************************************* @@ -421,7 +421,7 @@ void SvResizeHelper::ValidateRect( Rectangle & rValidate ) const |* |* Description *************************************************************************/ -sal_Bool SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos, +bool SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos, Rectangle & rOutPosSize ) { if( -1 != nGrab ) @@ -431,9 +431,9 @@ sal_Bool SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos, nGrab = -1; pWin->ReleaseMouse(); pWin->HideTracking(); - return sal_True; + return true; } - return sal_False; + return false; } /************************************************************************* @@ -463,7 +463,7 @@ SvResizeWindow::SvResizeWindow ) : Window( pParent, WB_CLIPCHILDREN ) , m_nMoveGrab( -1 ) - , m_bActive( sal_False ) + , m_bActive( false ) , m_pWrapper( pWrapper ) { OSL_ENSURE( pParent != NULL && pWrapper != NULL, "Wrong initialization of hatch window!\n" ); @@ -621,7 +621,7 @@ bool SvResizeWindow::PreNotify( NotifyEvent& rEvt ) { if ( rEvt.GetType() == EVENT_GETFOCUS && !m_bActive ) { - m_bActive = sal_True; + m_bActive = true; m_pWrapper->Activated(); } @@ -632,10 +632,10 @@ bool SvResizeWindow::Notify( NotifyEvent& rEvt ) { if ( rEvt.GetType() == EVENT_LOSEFOCUS && m_bActive ) { - sal_Bool bHasFocus = HasChildPathFocus(true); + bool bHasFocus = HasChildPathFocus(true); if ( !bHasFocus ) { - m_bActive = sal_False; + m_bActive = false; m_pWrapper->Deactivated(); } } diff --git a/svtools/source/hatchwindow/ipwin.hxx b/svtools/source/hatchwindow/ipwin.hxx index 357030c0ae0f..f3e9dde7137c 100644 --- a/svtools/source/hatchwindow/ipwin.hxx +++ b/svtools/source/hatchwindow/ipwin.hxx @@ -31,11 +31,11 @@ class SvResizeHelper Rectangle aOuter; short nGrab; // -1 no Grab, 0 - 7, 8 = Move, see FillHandle... Point aSelPos; - sal_Bool bResizeable; + bool bResizeable; public: SvResizeHelper(); - void SetResizeable( sal_Bool b ) { bResizeable = b; } + void SetResizeable( bool b ) { bResizeable = b; } short GetGrab() const { return nGrab; } void SetBorderPixel( const Size & rBorderP ) { aBorder = rBorderP; } @@ -59,12 +59,12 @@ public: void FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const; void Draw( OutputDevice * ); void InvalidateBorder( Window * ); - sal_Bool SelectBegin( Window *, const Point & rPos ); + bool SelectBegin( Window *, const Point & rPos ); short SelectMove( Window * pWin, const Point & rPos ); Point GetTrackPosPixel( const Rectangle & rRect ) const; Rectangle GetTrackRectPixel( const Point & rTrackPos ) const; void ValidateRect( Rectangle & rValidate ) const; - sal_Bool SelectRelease( Window *, const Point & rPos, Rectangle & rOutPosSize ); + bool SelectRelease( Window *, const Point & rPos, Rectangle & rOutPosSize ); void Release( Window * pWin ); }; @@ -76,7 +76,7 @@ class SvResizeWindow : public Window Pointer m_aOldPointer; short m_nMoveGrab; // last pointer type SvResizeHelper m_aResizer; - sal_Bool m_bActive; + bool m_bActive; VCLXHatchWindow* m_pWrapper; public: diff --git a/svtools/source/inc/unoiface.hxx b/svtools/source/inc/unoiface.hxx index 0378cd716d30..b920a7485d82 100644 --- a/svtools/source/inc/unoiface.hxx +++ b/svtools/source/inc/unoiface.hxx @@ -172,7 +172,7 @@ class SVTXFormattedField : public VCLXSpinField { protected: SvNumberFormatsSupplierObj* m_pCurrentSupplier; - sal_Bool bIsStandardSupplier; + bool bIsStandardSupplier; sal_Int32 nKeyToSetDelayed; @@ -195,8 +195,8 @@ protected: void SetValue(const ::com::sun::star::uno::Any& rValue); ::com::sun::star::uno::Any GetValue(); - void SetTreatAsNumber(sal_Bool bSet); - sal_Bool GetTreatAsNumber(); + void SetTreatAsNumber(bool bSet); + bool GetTreatAsNumber(); void SetDefaultValue(const ::com::sun::star::uno::Any& rValue); ::com::sun::star::uno::Any GetDefaultValue(); @@ -229,7 +229,7 @@ namespace svt struct RMItemData { - sal_Bool b_Enabled; + bool b_Enabled; sal_Int32 n_ID; OUString Label; }; diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 3cb104a029dd..83348b1a779b 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -116,7 +116,7 @@ void AcceleratorExecute::init(const css::uno::Reference< css::uno::XComponentCon // specify our internal dispatch provider // frame or desktop?! => document or global config. - sal_Bool bDesktopIsUsed = sal_False; + bool bDesktopIsUsed = false; m_xDispatcher = css::uno::Reference< css::frame::XDispatchProvider >(xEnv, css::uno::UNO_QUERY); if (!m_xDispatcher.is()) { @@ -129,7 +129,7 @@ void AcceleratorExecute::init(const css::uno::Reference< css::uno::XComponentCon aLock.reset(); m_xDispatcher = xDispatcher; - bDesktopIsUsed = sal_True; + bDesktopIsUsed = true; } aLock.clear(); @@ -232,10 +232,10 @@ css::awt::KeyEvent AcceleratorExecute::st_VCLKey2AWTKey(const KeyCode& aVCLKey) KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey) { - sal_Bool bShift = ((aAWTKey.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT ); - sal_Bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 ); - sal_Bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 ); - sal_Bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 ); + bool bShift = ((aAWTKey.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT ); + bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 ); + bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 ); + bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 ); sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode; return KeyCode(nKey, bShift, bMod1, bMod2, bMod3); diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 1f650c94b58c..7f91b93a7d2b 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -261,8 +261,8 @@ struct ErrorResource_Impl : private Resource ~ErrorResource_Impl() { FreeResource(); } - operator ResString(){ return ResString( aResId ); } - operator sal_Bool(){return IsAvailableRes(aResId.SetRT(RSC_STRING));} + operator ResString() { return ResString( aResId ); } + operator bool() { return IsAvailableRes(aResId.SetRT(RSC_STRING)); } }; diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index d4fe3e1edcd1..a6715e3b5bf1 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -839,7 +839,7 @@ OUString EmbeddedObjectRef::GetChartType() uno::Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY_THROW ); uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems()); // IA2 CWS. Unused: int nCoordinateCount = aCooSysSeq.getLength(); - sal_Bool bGetChartType = sal_False; + bool bGetChartType = false; for( sal_Int32 nCooSysIdx=0; nCooSysIdx xCTCnt( aCooSysSeq[nCooSysIdx], uno::UNO_QUERY_THROW ); @@ -855,12 +855,12 @@ OUString EmbeddedObjectRef::GetChartType() if (strChartType == "com.sun.star.chart2.AreaChartType") { Style += "Areas"; - bGetChartType = sal_True; + bGetChartType = true; } else if (strChartType == "com.sun.star.chart2.BarChartType") { Style += "Bars"; - bGetChartType = sal_True; + bGetChartType = true; } else if (strChartType == "com.sun.star.chart2.ColumnChartType") { @@ -874,34 +874,34 @@ OUString EmbeddedObjectRef::GetChartType() Style += "Bars"; else Style += "Columns"; - bGetChartType = sal_True; + bGetChartType = true; } } } else if (strChartType == "com.sun.star.chart2.LineChartType") { Style += "Lines"; - bGetChartType = sal_True; + bGetChartType = true; } else if (strChartType == "com.sun.star.chart2.ScatterChartType") { Style += "XY Chart"; - bGetChartType = sal_True; + bGetChartType = true; } else if (strChartType == "com.sun.star.chart2.PieChartType") { Style += "Pies"; - bGetChartType = sal_True; + bGetChartType = true; } else if (strChartType == "com.sun.star.chart2.NetChartType") { Style += "Radar"; - bGetChartType = sal_True; + bGetChartType = true; } else if (strChartType == "com.sun.star.chart2.CandleStickChartType") { Style += "Candle Stick Chart"; - bGetChartType = sal_True; + bGetChartType = true; } if (bGetChartType) return Style; diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index a87191c12e45..aa2375ba5317 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -107,14 +107,14 @@ bool SvEmbedTransferHelper::GetData( const ::com::sun::star::datatransfer::DataF uno::Reference < embed::XStorage > xStg = comphelper::OStorageHelper::GetTemporaryStorage(); OUString aName( "Dummy" ); SvStream* pStream = NULL; - sal_Bool bDeleteStream = sal_False; + bool bDeleteStream = false; uno::Sequence < beans::PropertyValue > aEmpty; xPers->storeToEntry( xStg, aName, aEmpty, aEmpty ); if ( xStg->isStreamElement( aName ) ) { uno::Reference < io::XStream > xStm = xStg->cloneStreamElement( aName ); pStream = utl::UcbStreamHelper::CreateStream( xStm ); - bDeleteStream = sal_True; + bDeleteStream = true; } else { diff --git a/svtools/source/misc/openfiledroptargetlistener.cxx b/svtools/source/misc/openfiledroptargetlistener.cxx index 655c8ed1e2c5..e50cb0b35293 100644 --- a/svtools/source/misc/openfiledroptargetlistener.cxx +++ b/svtools/source/misc/openfiledroptargetlistener.cxx @@ -74,7 +74,7 @@ void SAL_CALL OpenFileDropTargetListener::drop( const css::datatransfer::dnd::Dr if ( css::datatransfer::dnd::DNDConstants::ACTION_NONE != nAction ) { TransferableDataHelper aHelper( dtde.Transferable ); - sal_Bool bFormatFound = sal_False; + bool bFormatFound = false; FileList aFileList; // at first check filelist format @@ -83,7 +83,7 @@ void SAL_CALL OpenFileDropTargetListener::drop( const css::datatransfer::dnd::Dr sal_uLong i, nCount = aFileList.Count(); for ( i = 0; i < nCount; ++i ) implts_OpenFile( aFileList.GetFile(i) ); - bFormatFound = sal_True; + bFormatFound = true; } // then, if necessary, the file format @@ -132,7 +132,7 @@ void SAL_CALL OpenFileDropTargetListener::dragOver( const css::datatransfer::dnd { try { - sal_Bool bAccept = ( implts_IsDropFormatSupported( SOT_FORMAT_FILE ) || + bool bAccept = ( implts_IsDropFormatSupported( SOT_FORMAT_FILE ) || implts_IsDropFormatSupported( SOT_FORMAT_FILE_LIST ) ); if ( !bAccept ) diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 5f651b2056dc..d9b358622db2 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -449,7 +449,7 @@ Sequence< DataFlavor > SAL_CALL TransferableHelper::getTransferDataFlavors() thr sal_Bool SAL_CALL TransferableHelper::isDataFlavorSupported( const DataFlavor& rFlavor ) throw( RuntimeException, std::exception ) { const SolarMutexGuard aGuard; - sal_Bool bRet = sal_False; + bool bRet = false; try { diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index 670b5b123faf..890060df069e 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -32,7 +32,7 @@ struct SvParser_Impl sal_uLong nlLineNr; // actual line number sal_uLong nlLinePos; // actual column number long nTokenValue; // extra value (RTF) - sal_Bool bTokenHasValue; // indicates whether nTokenValue is valid + bool bTokenHasValue; // indicates whether nTokenValue is valid int nToken; // actual Token sal_Unicode nNextCh; // actual character int nSaveToken; // the token from Continue @@ -154,11 +154,11 @@ sal_Unicode SvParser::GetNextChar() // When reading muliple bytes, we don't have to care about the file // position when we run inti the pending state. The file position is // maintained by SaveState/RestoreState. - sal_Bool bErr; + bool bErr; if( bSwitchToUCS2 && 0 == rInput.Tell() ) { unsigned char c1, c2; - sal_Bool bSeekBack = sal_True; + bool bSeekBack = true; rInput.ReadUChar( c1 ); bErr = rInput.IsEof() || rInput.GetError(); @@ -540,7 +540,7 @@ void SvParser::BuildWhichTbl( std::vector &rWhichMap, if( *pWhichIds ) { aNewRange[0] = aNewRange[1] = *pWhichIds; - sal_Bool bIns = sal_True; + bool bIns = true; // search position for ( sal_uInt16 nOfs = 0; rWhichMap[nOfs]; nOfs += 2 ) @@ -549,14 +549,14 @@ void SvParser::BuildWhichTbl( std::vector &rWhichMap, { // new range before rWhichMap.insert( rWhichMap.begin() + nOfs, aNewRange, aNewRange + 2 ); - bIns = sal_False; + bIns = false; break; } else if( *pWhichIds == rWhichMap[nOfs] - 1 ) { // extend range downwards rWhichMap[nOfs] = *pWhichIds; - bIns = sal_False; + bIns = false; break; } else if( *pWhichIds == rWhichMap[nOfs+1] + 1 ) @@ -571,7 +571,7 @@ void SvParser::BuildWhichTbl( std::vector &rWhichMap, else // extend range upwards rWhichMap[nOfs+1] = *pWhichIds; - bIns = sal_False; + bIns = false; break; } } diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index e5137c468cf7..e8f86818dbac 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -180,7 +180,7 @@ namespace { if (aVal.Name.equalsAscii("DataSource")) { #if OSL_DEBUG_LEVEL > 0 - sal_Bool bSuccess = + bool bSuccess = #endif aVal.Value >>= m_xDataSource; OSL_ENSURE( bSuccess, "OAddressBookSourceDialogUno::implInitialize: invalid type for DataSource!" ); @@ -190,7 +190,7 @@ namespace { if (aVal.Name.equalsAscii("DataSourceName")) { #if OSL_DEBUG_LEVEL > 0 - sal_Bool bSuccess = + bool bSuccess = #endif aVal.Value >>= m_sDataSourceName; OSL_ENSURE( bSuccess, "OAddressBookSourceDialogUno::implInitialize: invalid type for DataSourceName!" ); @@ -200,7 +200,7 @@ namespace { if (aVal.Name.equalsAscii("Command")) { #if OSL_DEBUG_LEVEL > 0 - sal_Bool bSuccess = + bool bSuccess = #endif aVal.Value >>= m_sTable; OSL_ENSURE( bSuccess, "OAddressBookSourceDialogUno::implInitialize: invalid type for Command!" ); diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx index 9b827bba1b15..b77a309afb37 100644 --- a/svtools/source/uno/generictoolboxcontroller.cxx +++ b/svtools/source/uno/generictoolboxcontroller.cxx @@ -141,9 +141,9 @@ throw ( RuntimeException, std::exception ) nItemBits &= ~TIB_CHECKABLE; TriState eTri = TRISTATE_FALSE; - sal_Bool bValue = sal_Bool(); - OUString aStrValue; - ItemStatus aItemState; + bool bValue; + OUString aStrValue; + ItemStatus aItemState; if ( Event.State >>= bValue ) { diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index e56fb60f67e4..7256b330a18e 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -312,7 +312,7 @@ void SAL_CALL PopupMenuControllerBase::initialize( const Sequence< Any >& aArgum { osl::MutexGuard aLock( m_aMutex ); - sal_Bool bInitalized( m_bInitialized ); + bool bInitalized( m_bInitialized ); if ( !bInitalized ) { PropertyValue aPropValue; diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index e9c3f157501b..dda1e9492687 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -242,7 +242,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal break; } - sal_Bool bUseGridLines = sal_False; + bool bUseGridLines = false; OSL_VERIFY( aValue >>= bUseGridLines ); pGridRenderer->useGridLines( bUseGridLines ); pTable->Invalidate(); @@ -304,7 +304,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal } case BASEPROPERTY_HSCROLL: { - sal_Bool bHScroll = true; + bool bHScroll = true; if( aValue >>= bHScroll ) m_pTableModel->setHorizontalScrollbarVisibility( bHScroll ? ScrollbarShowAlways : ScrollbarShowSmart ); break; @@ -312,7 +312,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal case BASEPROPERTY_VSCROLL: { - sal_Bool bVScroll = true; + bool bVScroll = true; if( aValue >>= bVScroll ) { m_pTableModel->setVerticalScrollbarVisibility( bVScroll ? ScrollbarShowAlways : ScrollbarShowSmart ); @@ -322,7 +322,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal case BASEPROPERTY_GRID_SHOWROWHEADER: { - sal_Bool rowHeader = true; + bool rowHeader = true; if( aValue >>= rowHeader ) { m_pTableModel->setRowHeaders(rowHeader); @@ -391,7 +391,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: { - sal_Bool colHeader = true; + bool colHeader = true; if( aValue >>= colHeader ) { m_pTableModel->setColumnHeaders(colHeader); @@ -497,11 +497,11 @@ Any SVTXGridControl::getProperty( const OUString& PropertyName ) throw(RuntimeEx } case BASEPROPERTY_GRID_SHOWROWHEADER: - aPropertyValue <<= sal_Bool( m_pTableModel->hasRowHeaders() ); + aPropertyValue <<= m_pTableModel->hasRowHeaders(); break; case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: - aPropertyValue <<= sal_Bool( m_pTableModel->hasColumnHeaders() ); + aPropertyValue <<= m_pTableModel->hasColumnHeaders(); break; case BASEPROPERTY_GRID_DATAMODEL: @@ -514,14 +514,14 @@ Any SVTXGridControl::getProperty( const OUString& PropertyName ) throw(RuntimeEx case BASEPROPERTY_HSCROLL: { - sal_Bool const bHasScrollbar = ( m_pTableModel->getHorizontalScrollbarVisibility() != ScrollbarShowNever ); + bool const bHasScrollbar = ( m_pTableModel->getHorizontalScrollbarVisibility() != ScrollbarShowNever ); aPropertyValue <<= bHasScrollbar; break; } case BASEPROPERTY_VSCROLL: { - sal_Bool const bHasScrollbar = ( m_pTableModel->getVerticalScrollbarVisibility() != ScrollbarShowNever ); + bool const bHasScrollbar = ( m_pTableModel->getVerticalScrollbarVisibility() != ScrollbarShowNever ); aPropertyValue <<= bHasScrollbar; break; } diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index f25166d4ee5e..da94dd0439a1 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -741,9 +741,9 @@ sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( com::sun::star::u { case TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE: { - sal_Bool aNewValue(sal_False); + bool aNewValue(false); aValue >>= aNewValue; - if (aNewValue != (m_bSupportVisible ? 1 : 0)) + if (aNewValue != m_bSupportVisible) { aConvertedValue <<= aNewValue; aOldValue <<= m_bSupportVisible; @@ -763,7 +763,7 @@ throw( com::sun::star::uno::Exception, std::exception) OPropertyContainer::setFastPropertyValue_NoBroadcast(nHandle, aValue); if (TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE == nHandle) { - sal_Bool rValue(sal_False); + bool rValue(false); if (( aValue >>= rValue ) && m_bInitialized) this->setSupportVisibleProperty( rValue ); } diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index e203d8767851..e49d0da9235c 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -1282,7 +1282,7 @@ void TreeControlPeer::setProperty( const OUString& PropertyName, const Any& aVal { case BASEPROPERTY_HIDEINACTIVESELECTION: { - sal_Bool bEnabled = sal_False; + bool bEnabled = false; if ( aValue >>= bEnabled ) { WinBits nStyle = rTree.GetStyle(); @@ -1327,7 +1327,7 @@ void TreeControlPeer::setProperty( const OUString& PropertyName, const Any& aVal } case BASEPROPERTY_TREE_EDITABLE: { - sal_Bool bEnabled = false; + bool bEnabled = false; if( aValue >>= bEnabled ) rTree.EnableInplaceEditing( bEnabled ? sal_True : sal_False ); break; @@ -1336,7 +1336,7 @@ void TreeControlPeer::setProperty( const OUString& PropertyName, const Any& aVal break; // @todo case BASEPROPERTY_TREE_ROOTDISPLAYED: { - sal_Bool bDisplayed = false; + bool bDisplayed = false; if( (aValue >>= bDisplayed) && ( bDisplayed != mbIsRootDisplayed) ) { onChangeRootDisplayed(bDisplayed); @@ -1345,7 +1345,7 @@ void TreeControlPeer::setProperty( const OUString& PropertyName, const Any& aVal } case BASEPROPERTY_TREE_SHOWSHANDLES: { - sal_Bool bEnabled = false; + bool bEnabled = false; if( aValue >>= bEnabled ) { WinBits nBits = rTree.GetStyle() & (~WB_HASLINES); @@ -1358,7 +1358,7 @@ void TreeControlPeer::setProperty( const OUString& PropertyName, const Any& aVal } case BASEPROPERTY_TREE_SHOWSROOTHANDLES: { - sal_Bool bEnabled = false; + bool bEnabled = false; if( aValue >>= bEnabled ) { WinBits nBits = rTree.GetStyle() & (~WB_HASLINESATROOT); @@ -1422,7 +1422,7 @@ Any TreeControlPeer::getProperty( const OUString& PropertyName ) throw(RuntimeEx return VCLXWindow::getProperty( PropertyName ); } -void TreeControlPeer::onChangeRootDisplayed( sal_Bool bIsRootDisplayed ) +void TreeControlPeer::onChangeRootDisplayed( bool bIsRootDisplayed ) { if( mbIsRootDisplayed == bIsRootDisplayed ) return; diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx index 7e5b3201943b..617be2d205d7 100644 --- a/svtools/source/uno/treecontrolpeer.hxx +++ b/svtools/source/uno/treecontrolpeer.hxx @@ -146,7 +146,7 @@ private: bool onExpanding( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, bool bExpanding ); void onExpanded( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, bool bExpanding ); - void onChangeRootDisplayed( sal_Bool bIsRootDisplayed ); + void onChangeRootDisplayed( bool bIsRootDisplayed ); void addEntry( UnoTreeListEntry* pEntry ); void removeEntry( UnoTreeListEntry* pEntry ); @@ -158,7 +158,7 @@ private: TreeSelectionListenerMultiplexer maSelectionListeners; TreeExpansionListenerMultiplexer maTreeExpansionListeners; TreeEditListenerMultiplexer maTreeEditListeners; - sal_Bool mbIsRootDisplayed; + bool mbIsRootDisplayed; UnoTreeListBoxImpl* mpTreeImpl; sal_Int32 mnEditLock; OUString msDefaultCollapsedGraphicURL; diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 79c9c2b8cff2..627ea8f87f6d 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -182,7 +182,7 @@ sal_uInt16 SvBaseEventDescriptor::getMacroID(const OUString& rName) const void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny, const SvxMacro& rMacro) { - sal_Bool bRetValueOK = sal_False; // do we have a ret value? + bool bRetValueOK = false; // do we have a ret value? if (rMacro.HasMacro()) { @@ -218,7 +218,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny, aSequence[2] = aLibValue; rAny <<= aSequence; - bRetValueOK = sal_True; + bRetValueOK = true; break; } case EXTENDED_STYPE: @@ -243,7 +243,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny, aSequence[1] = aNameValue; rAny <<= aSequence; - bRetValueOK = sal_True; + bRetValueOK = true; break; } case JAVASCRIPT: @@ -267,7 +267,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny, aSequence[0] = aKindValue; rAny <<= aSequence; - bRetValueOK = sal_True; + bRetValueOK = true; } } @@ -282,8 +282,8 @@ void SvBaseEventDescriptor::getMacroFromAny( rAny >>= aSequence; // process ... - sal_Bool bTypeOK = sal_False; - sal_Bool bNone = sal_False; // true if EventType=="None" + bool bTypeOK = false; + bool bNone = false; // true if EventType=="None" enum ScriptType eType = EXTENDED_STYPE; OUString sScriptVal; OUString sMacroVal; @@ -299,22 +299,22 @@ void SvBaseEventDescriptor::getMacroFromAny( if (sTmp.equals(sStarBasic)) { eType = STARBASIC; - bTypeOK = sal_True; + bTypeOK = true; } else if (sTmp.equals(sJavaScript)) { eType = JAVASCRIPT; - bTypeOK = sal_True; + bTypeOK = true; } else if (sTmp.equals(sScript)) { eType = EXTENDED_STYPE; - bTypeOK = sal_True; + bTypeOK = true; } else if (sTmp.equals(sNone)) { - bNone = sal_True; - bTypeOK = sal_True; + bNone = true; + bTypeOK = true; } // else: unknown script type } diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index 3dcaaf65bfad..0b9f0366fbc8 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -42,7 +42,7 @@ namespace { - static void lcl_setWinBits( Window* _pWindow, WinBits _nBits, sal_Bool _bSet ) + static void lcl_setWinBits( Window* _pWindow, WinBits _nBits, bool _bSet ) { WinBits nStyle = _pWindow->GetStyle(); if ( _bSet ) @@ -433,7 +433,7 @@ void VCLXMultiLineEdit::setProperty( const OUString& PropertyName, const ::com:: case BASEPROPERTY_READONLY: { - sal_Bool b = sal_Bool(); + bool b; if ( Value >>= b ) pMultiLineEdit->SetReadOnly( b ); } @@ -447,7 +447,7 @@ void VCLXMultiLineEdit::setProperty( const OUString& PropertyName, const ::com:: break; case BASEPROPERTY_HIDEINACTIVESELECTION: { - sal_Bool b = sal_Bool(); + bool b; if ( Value >>= b ) { pMultiLineEdit->EnableFocusSelectionHide( b ); @@ -574,7 +574,7 @@ void SAL_CALL VCLXFileControl::setProperty( const OUString& PropertyName, const { case BASEPROPERTY_HIDEINACTIVESELECTION: { - sal_Bool bValue( sal_False ); + bool bValue; OSL_VERIFY( Value >>= bValue ); lcl_setWinBits( pControl, WB_NOHIDESELECTION, !bValue ); @@ -807,7 +807,7 @@ void VCLXFileControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) SVTXFormattedField::SVTXFormattedField() :m_pCurrentSupplier(NULL) - ,bIsStandardSupplier(sal_True) + ,bIsStandardSupplier(true) ,nKeyToSetDelayed(-1) { } @@ -843,7 +843,7 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const ::com: { case BASEPROPERTY_ENFORCE_FORMAT: { - sal_Bool bEnable( sal_True ); + bool bEnable( true ); if ( Value >>= bEnable ) pField->EnableNotANumber( !bEnable ); } @@ -865,7 +865,7 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const ::com: case BASEPROPERTY_TREATASNUMBER: { - sal_Bool b = sal_Bool(); + bool b; if ( Value >>= b ) SetTreatAsNumber(b); } @@ -935,7 +935,7 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const ::com: break; case BASEPROPERTY_NUMSHOWTHOUSANDSEP: { - sal_Bool b = sal_Bool(); + bool b; if ( Value >>= b ) pField->SetThousandsSep( b ); } @@ -1213,17 +1213,17 @@ void SVTXFormattedField::SetDefaultValue(const ::com::sun::star::uno::Any& rValu } -sal_Bool SVTXFormattedField::GetTreatAsNumber() +bool SVTXFormattedField::GetTreatAsNumber() { FormattedField* pField = GetFormattedField(); if (pField) return pField->TreatingAsNumber(); - return sal_True; + return true; } -void SVTXFormattedField::SetTreatAsNumber(sal_Bool bSet) +void SVTXFormattedField::SetTreatAsNumber(bool bSet) { FormattedField* pField = GetFormattedField(); if (pField) @@ -1303,13 +1303,13 @@ void SVTXFormattedField::setFormatsSupplier(const ::com::sun::star::uno::Referen if (pField) { pNew = new SvNumberFormatsSupplierObj(pField->StandardFormatter()); - bIsStandardSupplier = sal_True; + bIsStandardSupplier = true; } } else { pNew = SvNumberFormatsSupplierObj::getImplementation(xSupplier); - bIsStandardSupplier = sal_False; + bIsStandardSupplier = false; } if (!pNew) @@ -1456,7 +1456,7 @@ void SVTXRoadmap::propertyChange( const ::com::sun::star::beans::PropertyChangeE OUString sPropertyName = evt.PropertyName; if ( sPropertyName == "Enabled" ) { - sal_Bool bEnable = false; + bool bEnable = false; evt.NewValue >>= bEnable; pField->EnableRoadmapItem( (RoadmapTypes::ItemId)nID , bEnable ); } @@ -1506,7 +1506,7 @@ RMItemData SVTXRoadmap::GetRMItemData( const ::com::sun::star::container::Contai } else { - aCurRMItemData.b_Enabled = sal_False; + aCurRMItemData.b_Enabled = false; aCurRMItemData.n_ID = 0; } return aCurRMItemData; @@ -1565,7 +1565,7 @@ void SVTXRoadmap::setProperty( const OUString& PropertyName, const ::com::sun::s { case BASEPROPERTY_COMPLETE: { - sal_Bool b = false; + bool b = false; Value >>= b; pField->SetRoadmapComplete( b); } @@ -1573,7 +1573,7 @@ void SVTXRoadmap::setProperty( const OUString& PropertyName, const ::com::sun::s case BASEPROPERTY_ACTIVATED: { - sal_Bool b = false; + bool b = false; Value >>= b; pField->SetRoadmapInteractive( b); } @@ -2003,7 +2003,7 @@ void SVTXCurrencyField::setProperty( const OUString& PropertyName, const ::com:: break; case BASEPROPERTY_CURSYM_POSITION: { - sal_Bool b = false; + bool b = false; Value >>= b; pField->setPrependCurrSym(b); } @@ -2233,7 +2233,7 @@ void VCLXProgressBar::setProperty( const OUString& PropertyName, const ::com::su Window* pWindow = GetWindow(); if ( pWindow ) { - sal_Bool bVoid = Value.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_VOID; + bool bVoid = Value.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_VOID; if ( bVoid ) { diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 7302d7daa933..19ecf56323fc 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -114,7 +114,7 @@ private: OUString maDesc; OUString maTarget; OUString maName; - sal_Bool mbIsActive; + bool mbIsActive; awt::Rectangle maBoundary; awt::Point maCenter; sal_Int32 mnRadius; @@ -412,7 +412,7 @@ OUString SAL_CALL SvUnoImageMapObject::getImplementationName() throw(RuntimeExce void SvUnoImageMapObject::_setPropertyValues( const PropertyMapEntry** ppEntries, const Any* pValues ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) { - sal_Bool bOk = sal_False; + bool bOk = false; while( *ppEntries ) { @@ -526,7 +526,7 @@ public: SvUnoImageMap( const ImageMap& rMap, const SvEventDescription* pSupportedMacroItems ); virtual ~SvUnoImageMap(); - sal_Bool fillImageMap( ImageMap& rMap ) const; + bool fillImageMap( ImageMap& rMap ) const; SvUnoImageMapObject* getObject( const Any& aElement ) const throw( IllegalArgumentException ); UNO3_GETIMPLEMENTATION_DECL( SvUnoImageMap ) @@ -712,7 +712,7 @@ Sequence< OUString > SAL_CALL SvUnoImageMap::getSupportedServiceNames( ) return Sequence< OUString >( &aSN, 1 ); } -sal_Bool SvUnoImageMap::fillImageMap( ImageMap& rMap ) const +bool SvUnoImageMap::fillImageMap( ImageMap& rMap ) const { rMap.ClearImageMap(); @@ -729,7 +729,7 @@ sal_Bool SvUnoImageMap::fillImageMap( ImageMap& rMap ) const ++aIter; } - return sal_True; + return true; } diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 35b00e6f12f0..c8e9a409b272 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -182,7 +182,7 @@ namespace svt { namespace uno } - void WizardShell::enablePage( const sal_Int16 i_nPageID, const sal_Bool i_bEnable ) + void WizardShell::enablePage( const sal_Int16 i_nPageID, const bool i_bEnable ) { enableState( impl_pageIdToState( i_nPageID ), i_bEnable ); } diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index 07a33aefe91a..9d2bc6b85212 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -66,18 +66,18 @@ namespace svt { namespace uno static sal_Int16 convertCommitReasonToTravelType( const CommitPageReason i_eReason ); // operations - sal_Bool advanceTo( const sal_Int16 i_nPageId ) + bool advanceTo( const sal_Int16 i_nPageId ) { return skipUntil( impl_pageIdToState( i_nPageId ) ); } - sal_Bool goBackTo( const sal_Int16 i_nPageId ) + bool goBackTo( const sal_Int16 i_nPageId ) { return skipBackwardUntil( impl_pageIdToState( i_nPageId ) ); } - sal_Bool travelNext() { return WizardShell_Base::travelNext(); } - sal_Bool travelPrevious() { return WizardShell_Base::travelPrevious(); } + bool travelNext() { return WizardShell_Base::travelNext(); } + bool travelPrevious() { return WizardShell_Base::travelPrevious(); } - void activatePath( const sal_Int16 i_nPathID, const sal_Bool i_bFinal ) + void activatePath( const sal_Int16 i_nPathID, const bool i_bFinal ) { WizardShell_Base::activatePath( PathId( i_nPathID ), i_bFinal ); } @@ -90,7 +90,7 @@ namespace svt { namespace uno return impl_stateToPageId( getCurrentState() ); } - void enablePage( const sal_Int16 i_PageID, const sal_Bool i_Enable ); + void enablePage( const sal_Int16 i_PageID, const bool i_Enable ); bool knowsPage( const sal_Int16 i_nPageID ) const { -- cgit