diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-24 09:42:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-25 14:32:53 +0200 |
commit | f5864e8ff4958268b50b15bc4c60c3d0fcfe20d9 (patch) | |
tree | be313acab5cc630c26ef0266ac363a51b62a8226 | |
parent | 514d33fa3a409681be93bed3fb33f940a5549d88 (diff) |
svtools: sal_Bool->bool
Change-Id: Ia0280d3d4f2d5b8a93a37a93847951391e928028
-rw-r--r-- | chart2/source/controller/dialogs/dlg_CreationWizard.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 | ||||
-rw-r--r-- | include/svtools/roadmap.hxx | 20 | ||||
-rw-r--r-- | include/svtools/roadmapwizard.hxx | 2 | ||||
-rw-r--r-- | include/svtools/rtfout.hxx | 4 | ||||
-rw-r--r-- | include/svtools/ruler.hxx | 44 | ||||
-rw-r--r-- | svtools/source/control/roadmap.cxx | 62 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 163 | ||||
-rw-r--r-- | svtools/source/dialogs/roadmapwizard.cxx | 2 | ||||
-rw-r--r-- | svtools/source/svrtf/rtfout.cxx | 4 |
10 files changed, 153 insertions, 152 deletions
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index 55e9ce63c1ad..d0b745dd134c 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -88,7 +88,7 @@ CreationWizard::CreationWizard( Window* pParent, const uno::Reference< frame::XM , WZS_INVALID_STATE ); this->SetRoadmapHelpId( HID_SCH_WIZARD_ROADMAP ); - this->SetRoadmapInteractive( sal_True ); + this->SetRoadmapInteractive( true ); Size aAdditionalRoadmapSize( LogicToPixel( Size( 85, 0 ), MAP_APPFONT ) ); Size aSize( this->GetSizePixel() ); aSize.Width() += aAdditionalRoadmapSize.Width(); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 7e18dfd73a05..2816b9fa9bb7 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -181,7 +181,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent m_pCancel->SetHelpId(HID_DBWIZ_CANCEL); m_pFinish->SetHelpId(HID_DBWIZ_FINISH); m_pHelp->SetUniqueId(UID_DBWIZ_HELP); - SetRoadmapInteractive( sal_True ); + SetRoadmapInteractive( true ); ActivatePage(); } diff --git a/include/svtools/roadmap.hxx b/include/svtools/roadmap.hxx index 154a392f7215..2a7b0e44cff4 100644 --- a/include/svtools/roadmap.hxx +++ b/include/svtools/roadmap.hxx @@ -59,28 +59,28 @@ namespace svt ORoadmap( Window* _pParent, WinBits _nWinStyle = 0 ); ~ORoadmap( ); - void SetRoadmapBitmap( const BitmapEx& maBitmap, sal_Bool _bInvalidate = sal_True ); + void SetRoadmapBitmap( const BitmapEx& maBitmap, bool _bInvalidate = true ); - void EnableRoadmapItem( ItemId _nItemId, sal_Bool _bEnable, ItemIndex _nStartIndex = 0 ); + void EnableRoadmapItem( ItemId _nItemId, bool _bEnable, ItemIndex _nStartIndex = 0 ); void ChangeRoadmapItemLabel( ItemId _nID, const OUString& sLabel, ItemIndex _nStartIndex = 0 ); void ChangeRoadmapItemID( ItemId _nID, ItemId _NewID, ItemIndex _nStartIndex = 0 ); - void SetRoadmapInteractive( sal_Bool _bInteractive ); - sal_Bool IsRoadmapInteractive(); + void SetRoadmapInteractive( bool _bInteractive ); + bool IsRoadmapInteractive(); - void SetRoadmapComplete( sal_Bool _bComplete ); - sal_Bool IsRoadmapComplete() const; + void SetRoadmapComplete( bool _bComplete ); + bool IsRoadmapComplete() const; ItemIndex GetItemCount() const; ItemId GetItemID( ItemIndex _nIndex ) const; - void InsertRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, sal_Bool _bEnabled = sal_True ); - void ReplaceRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, sal_Bool _bEnabled ); + void InsertRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, bool _bEnabled = true ); + void ReplaceRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, bool _bEnabled ); void DeleteRoadmapItem( ItemIndex _nIndex ); ItemId GetCurrentRoadmapItemID() const; - sal_Bool SelectRoadmapItemByID( ItemId _nItemID ); + bool SelectRoadmapItemByID( ItemId _nItemID ); void SetItemSelectHdl( const Link& _rHdl ); Link GetItemSelectHdl( ) const; @@ -110,7 +110,7 @@ namespace svt ItemId GetNextAvailableItemId( ItemIndex _NewIndex ); ItemId GetPreviousAvailableItemId( ItemIndex _NewIndex ); RoadmapItem* GetByPointer(Window* pWindow); - RoadmapItem* InsertHyperLabel( ItemIndex _Index, const OUString& _aStr, ItemId _RMID, sal_Bool _bEnabled = sal_True ); + RoadmapItem* InsertHyperLabel( ItemIndex _Index, const OUString& _aStr, ItemId _RMID, bool _bEnabled = true ); void UpdatefollowingHyperLabels( ItemIndex _Index ); }; diff --git a/include/svtools/roadmapwizard.hxx b/include/svtools/roadmapwizard.hxx index 03ec7696618d..f8165a1204f9 100644 --- a/include/svtools/roadmapwizard.hxx +++ b/include/svtools/roadmapwizard.hxx @@ -81,7 +81,7 @@ namespace svt void SetRoadmapHelpId( const OString& _rId ); - void SetRoadmapInteractive( sal_Bool _bInteractive ); + void SetRoadmapInteractive( bool _bInteractive ); virtual void Resize(); virtual void StateChanged( StateChangedType nStateChange ); diff --git a/include/svtools/rtfout.hxx b/include/svtools/rtfout.hxx index 42c0a7a8ede0..504a6482542a 100644 --- a/include/svtools/rtfout.hxx +++ b/include/svtools/rtfout.hxx @@ -36,10 +36,10 @@ public: static SvStream& Out_Char( SvStream&, sal_Unicode cChar, int *pUCMode, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - sal_Bool bWriteHelpFile = sal_False ); + bool bWriteHelpFile = false ); static SvStream& Out_String( SvStream&, const rtl::OUString&, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - sal_Bool bWriteHelpFile = sal_False ); + bool bWriteHelpFile = false ); static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen ); }; diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 8301316d9cf5..1924153b3d55 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -645,13 +645,13 @@ private: MapUnit meSourceUnit; FieldUnit meUnit; Fraction maZoom; - sal_Bool mbCalc; - sal_Bool mbFormat; - sal_Bool mbDrag; - sal_Bool mbDragDelete; - sal_Bool mbDragCanceled; - sal_Bool mbAutoWinWidth; - sal_Bool mbActive; + bool mbCalc; + bool mbFormat; + bool mbDrag; + bool mbDragDelete; + bool mbDragCanceled; + bool mbAutoWinWidth; + bool mbActive; sal_uInt8 mnUpdateFlags; RulerSelection maHoverSelection; @@ -681,22 +681,22 @@ private: using Window::ImplInit; SVT_DLLPRIVATE void ImplInit( WinBits nWinBits ); - SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SVT_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SVT_DLLPRIVATE void ImplCalc(); SVT_DLLPRIVATE void ImplFormat(); - SVT_DLLPRIVATE void ImplInitExtraField( sal_Bool bUpdate ); - SVT_DLLPRIVATE void ImplInvertLines( sal_Bool bErase = sal_False ); + SVT_DLLPRIVATE void ImplInitExtraField( bool bUpdate ); + SVT_DLLPRIVATE void ImplInvertLines( bool bErase = false ); SVT_DLLPRIVATE void ImplDraw(); - SVT_DLLPRIVATE void ImplDrawExtra( sal_Bool bPaint = sal_False ); - SVT_DLLPRIVATE void ImplUpdate( sal_Bool bMustCalc = sal_False ); + SVT_DLLPRIVATE void ImplDrawExtra( bool bPaint = false ); + SVT_DLLPRIVATE void ImplUpdate( bool bMustCalc = false ); using Window::ImplHitTest; - SVT_DLLPRIVATE sal_Bool ImplHitTest( const Point& rPosition, + SVT_DLLPRIVATE bool ImplHitTest( const Point& rPosition, RulerSelection* pHitTest, - sal_Bool bRequiredStyle = sal_False, + bool bRequiredStyle = false, sal_uInt16 nRequiredStyle = 0 ) const; - SVT_DLLPRIVATE sal_Bool ImplDocHitTest( const Point& rPos, RulerType eDragType, RulerSelection* pHitTest ) const; - SVT_DLLPRIVATE sal_Bool ImplStartDrag( RulerSelection* pHitTest, sal_uInt16 nModifier ); + SVT_DLLPRIVATE bool ImplDocHitTest( const Point& rPos, RulerType eDragType, RulerSelection* pHitTest ) const; + SVT_DLLPRIVATE bool ImplStartDrag( RulerSelection* pHitTest, sal_uInt16 nModifier ); SVT_DLLPRIVATE void ImplDrag( const Point& rPos ); SVT_DLLPRIVATE void ImplEndDrag(); @@ -732,7 +732,7 @@ public: void Activate(); void Deactivate(); - sal_Bool IsActive() const { return mbActive; } + bool IsActive() const { return mbActive; } void SetWinPos( long nOff = 0, long nWidth = 0 ); long GetWinOffset() const { return mnWinOff; } @@ -757,17 +757,17 @@ public: sal_uInt16 GetExtraClicks() const { return mnExtraClicks; } sal_uInt16 GetExtraModifier() const { return mnExtraModifier; } - sal_Bool StartDocDrag( const MouseEvent& rMEvt, + bool StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType = RULER_TYPE_DONTKNOW ); RulerType GetDragType() const { return meDragType; } long GetDragPos() const { return mnDragPos; } sal_uInt16 GetDragAryPos() const { return mnDragAryPos; } sal_uInt16 GetDragSize() const { return mnDragSize; } - sal_Bool IsDragDelete() const { return mbDragDelete; } - sal_Bool IsDragCanceled() const { return mbDragCanceled; } + bool IsDragDelete() const { return mbDragDelete; } + bool IsDragCanceled() const { return mbDragCanceled; } sal_uInt16 GetDragScroll() const { return mnDragScroll; } sal_uInt16 GetDragModifier() const { return mnDragModifier; } - sal_Bool IsDrag() const { return mbDrag; } + bool IsDrag() const { return mbDrag; } void CancelDrag(); long GetClickPos() const { return mnDragPos; } RulerType GetClickType() const { return meDragType; } @@ -816,7 +816,7 @@ public: void SetExtraDownHdl( const Link& rLink ) { maExtraDownHdl = rLink; } const Link& GetExtraDownHdl() const { return maExtraDownHdl; } - void SetTextRTL(sal_Bool bRTL); + void SetTextRTL(bool bRTL); bool GetTextRTL(); void SetCharWidth( long nWidth ) { mnCharWidth = nWidth ; } void SetLineHeight( long nHeight ) { mnLineHeight = nHeight ; } diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index e10e89a256fd..dc31903800ac 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -98,11 +98,11 @@ namespace svt void SetPosition( RoadmapItem* OldHyperLabel ); void ToggleBackgroundColor( const Color& _rGBColor ); - void SetInteractive( sal_Bool _bInteractive ); + void SetInteractive( bool _bInteractive ); void SetClickHdl( const Link& rLink ); - void Enable( sal_Bool bEnable = sal_True); - sal_Bool IsEnabled() const; + void Enable( bool bEnable = true); + bool IsEnabled() const; void GrabFocus(); bool Contains( const Window* _pWindow ) const; @@ -125,16 +125,16 @@ namespace svt BitmapEx m_aPicture; HL_Vector m_aRoadmapSteps; ItemId m_iCurItemID; - sal_Bool m_bInteractive; - sal_Bool m_bComplete; + bool m_bInteractive; + bool m_bComplete; Size m_aItemSizePixel; public: RoadmapImpl( const ORoadmap& _rAntiImpl ) :m_rAntiImpl( _rAntiImpl ) ,m_iCurItemID( -1 ) - ,m_bInteractive( sal_True ) - ,m_bComplete( sal_True ) + ,m_bInteractive( true ) + ,m_bComplete( true ) ,InCompleteHyperLabel ( NULL ) { } @@ -153,11 +153,11 @@ namespace svt void setCurItemID( ItemId i ) {m_iCurItemID = i; } ItemId getCurItemID() const { return m_iCurItemID; } - void setInteractive(const sal_Bool _bInteractive) {m_bInteractive = _bInteractive; } - sal_Bool isInteractive() const { return m_bInteractive; }; + void setInteractive(const bool _bInteractive) {m_bInteractive = _bInteractive; } + bool isInteractive() const { return m_bInteractive; }; - void setComplete(const sal_Bool _bComplete) {m_bComplete = _bComplete; } - sal_Bool isComplete() const { return m_bComplete; }; + void setComplete(const bool _bComplete) {m_bComplete = _bComplete; } + bool isComplete() const { return m_bComplete; }; void setPicture( const BitmapEx& _rPic ) { m_aPicture = _rPic; } const BitmapEx& getPicture( ) const { return m_aPicture; } @@ -212,7 +212,7 @@ namespace svt SetBackground( Wallpaper( rStyleSettings.GetFieldColor() ) ); m_pImpl->InCompleteHyperLabel = NULL; m_pImpl->setCurItemID(-1 ); - m_pImpl->setComplete( sal_True ); + m_pImpl->setComplete( true ); // Roadmap control should be reachable as one unit with a Tab key // the next Tab key should spring out of the control. @@ -264,7 +264,7 @@ namespace svt - RoadmapItem* ORoadmap::InsertHyperLabel( ItemIndex _Index, const OUString& _sLabel, ItemId _RMID, sal_Bool _bEnabled) + RoadmapItem* ORoadmap::InsertHyperLabel( ItemIndex _Index, const OUString& _sLabel, ItemId _RMID, bool _bEnabled) { if ( m_pImpl->getItemCount() == 0 ) m_pImpl->initItemSize(); @@ -280,7 +280,7 @@ namespace svt } else { - pItem->SetInteractive( sal_False ); + pItem->SetInteractive( false ); } pItem->SetPosition( pOldItem ); pItem->Update( _Index, _sLabel ); @@ -293,7 +293,7 @@ namespace svt } - void ORoadmap::SetRoadmapBitmap( const BitmapEx& _rBmp, sal_Bool _bInvalidate ) + void ORoadmap::SetRoadmapBitmap( const BitmapEx& _rBmp, bool _bInvalidate ) { m_pImpl->setPicture( _rBmp ); if ( _bInvalidate ) @@ -301,7 +301,7 @@ namespace svt } - void ORoadmap::SetRoadmapInteractive( sal_Bool _bInteractive ) + void ORoadmap::SetRoadmapInteractive( bool _bInteractive ) { m_pImpl->setInteractive( _bInteractive ); @@ -316,15 +316,15 @@ namespace svt } - sal_Bool ORoadmap::IsRoadmapInteractive() + bool ORoadmap::IsRoadmapInteractive() { return m_pImpl->isInteractive(); } - void ORoadmap::SetRoadmapComplete( sal_Bool _bComplete ) + void ORoadmap::SetRoadmapComplete( bool _bComplete ) { - sal_Bool bWasComplete = m_pImpl->isComplete(); + bool bWasComplete = m_pImpl->isComplete(); m_pImpl->setComplete( _bComplete ); if ( _bComplete ) { @@ -365,7 +365,7 @@ namespace svt } - void ORoadmap::ReplaceRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _RMID, sal_Bool _bEnabled ) + void ORoadmap::ReplaceRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _RMID, bool _bEnabled ) { RoadmapItem* pItem = GetByIndex( _Index); if ( pItem != NULL ) @@ -392,7 +392,7 @@ namespace svt } - void ORoadmap::InsertRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, sal_Bool _bEnabled ) + void ORoadmap::InsertRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, bool _bEnabled ) { InsertHyperLabel( _Index, _RoadmapItem, _nUniqueId, _bEnabled ); // Todo: YPos is superfluous, if items are always appended @@ -410,13 +410,13 @@ namespace svt } - sal_Bool ORoadmap::IsRoadmapComplete( ) const + bool ORoadmap::IsRoadmapComplete( ) const { return m_pImpl->isComplete(); } - void ORoadmap::EnableRoadmapItem( ItemId _nItemId, sal_Bool _bEnable, ItemIndex _nStartIndex ) + void ORoadmap::EnableRoadmapItem( ItemId _nItemId, bool _bEnable, ItemIndex _nStartIndex ) { RoadmapItem* pItem = GetByID( _nItemId, _nStartIndex ); if ( pItem != NULL ) @@ -564,7 +564,7 @@ namespace svt } - sal_Bool ORoadmap::SelectRoadmapItemByID( ItemId _nNewID ) + bool ORoadmap::SelectRoadmapItemByID( ItemId _nNewID ) { DeselectOldRoadmapItems(); RoadmapItem* pItem = GetByID( _nNewID ); @@ -579,10 +579,10 @@ namespace svt m_pImpl->setCurItemID(_nNewID); Select(); - return sal_True; + return true; } } - return sal_False; + return false; } @@ -676,9 +676,9 @@ namespace svt } - IMPL_LINK(ORoadmap, ImplClickHdl, HyperLabel*, _CurHyperLabel) + IMPL_LINK(ORoadmap, ImplClickHdl, HyperLabel*, _CurHyperLabel) { - return SelectRoadmapItemByID( _CurHyperLabel->GetID() ); + return SelectRoadmapItemByID( _CurHyperLabel->GetID() ) ? 1 : 0; } @@ -732,7 +732,7 @@ namespace svt } - void RoadmapItem::SetInteractive( sal_Bool _bInteractive ) + void RoadmapItem::SetInteractive( bool _bInteractive ) { if ( mpDescription ) mpDescription->SetInteractive(_bInteractive); @@ -802,14 +802,14 @@ namespace svt } - void RoadmapItem::Enable( sal_Bool _bEnable) + void RoadmapItem::Enable( bool _bEnable) { mpID->Enable(_bEnable); mpDescription->Enable(_bEnable); } - sal_Bool RoadmapItem::IsEnabled() const + bool RoadmapItem::IsEnabled() const { return mpID->IsEnabled(); } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 6fbea325da8e..cf59983e3d59 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -240,13 +240,13 @@ void Ruler::ImplInit( WinBits nWinBits ) mnExtraModifier = 0; // Modifier key at click in extra field mnCharWidth = 371; mnLineHeight = 551; - mbCalc = sal_True; // Should recalculate page width - mbFormat = sal_True; // Should redraw - mbDrag = sal_False; // Currently at dragging - mbDragDelete = sal_False; // Has mouse left the dragging area - mbDragCanceled = sal_False; // Dragging cancelled? - mbAutoWinWidth = sal_True; // EditWinWidth == RulerWidth - mbActive = sal_True; // Is ruler active + mbCalc = true; // Should recalculate page width + mbFormat = true; // Should redraw + mbDrag = false; // Currently at dragging + mbDragDelete = false; // Has mouse left the dragging area + mbDragCanceled = false; // Dragging cancelled? + mbAutoWinWidth = true; // EditWinWidth == RulerWidth + mbActive = true; // Is ruler active mnUpdateFlags = 0; // What needs to be updated mpData = mpSaveData; // Pointer to normal data meExtraType = RULER_EXTRA_DONTKNOW; // What is in extra field @@ -265,7 +265,7 @@ void Ruler::ImplInit( WinBits nWinBits ) mnBorderWidth = 0; // Settings - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); // Setup the default size Rectangle aRect; @@ -364,7 +364,7 @@ void Ruler::ImplVDrawText( long nX, long nY, const OUString& rText, long nMin, l } } -void Ruler::ImplInvertLines( sal_Bool bErase ) +void Ruler::ImplInvertLines( bool bErase ) { // Position lines if ( !mpData->pLines.empty() && @@ -991,7 +991,7 @@ void Ruler::ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom ) } } -void Ruler::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void Ruler::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1080,7 +1080,7 @@ void Ruler::ImplCalc() mpData->nRulWidth = mnHeight-nRulWinOff; } - mbCalc = sal_False; + mbCalc = false; } void Ruler::ImplFormat() @@ -1244,10 +1244,10 @@ void Ruler::ImplFormat() if ( !mpData->pTabs.empty() ) ImplDrawTabs( nVirLeft, nP2, nVirTop-1, nVirBottom+1 ); - mbFormat = sal_False; + mbFormat = false; } -void Ruler::ImplInitExtraField( sal_Bool bUpdate ) +void Ruler::ImplInitExtraField( bool bUpdate ) { Size aWinSize = GetOutputSizePixel(); @@ -1291,8 +1291,8 @@ void Ruler::ImplInitExtraField( sal_Bool bUpdate ) if ( bUpdate ) { - mbCalc = sal_True; - mbFormat = sal_True; + mbCalc = true; + mbFormat = true; Invalidate(); } } @@ -1324,11 +1324,11 @@ void Ruler::ImplDraw() DrawOutDev( aOffPos, aVirDevSize, Point(), aVirDevSize, maVirDev ); // redraw positionlines - ImplInvertLines( sal_True ); + ImplInvertLines( true ); } } -void Ruler::ImplDrawExtra( sal_Bool bPaint ) +void Ruler::ImplDrawExtra( bool bPaint ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); Rectangle aRect = maExtraRect; @@ -1393,7 +1393,7 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint ) } } -void Ruler::ImplUpdate( sal_Bool bMustCalc ) +void Ruler::ImplUpdate( bool bMustCalc ) { // clear lines in this place so they aren't considered at recalculation if ( !mbFormat ) @@ -1401,8 +1401,8 @@ void Ruler::ImplUpdate( sal_Bool bMustCalc ) // set flags if ( bMustCalc ) - mbCalc = sal_True; - mbFormat = sal_True; + mbCalc = true; + mbFormat = true; // abort if we are dragging as drag-handler will update the ruler after drag is finished if ( mbDrag ) @@ -1417,8 +1417,8 @@ void Ruler::ImplUpdate( sal_Bool bMustCalc ) } } -sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, - sal_Bool bRequireStyle, sal_uInt16 nRequiredStyle ) const +bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, + bool bRequireStyle, sal_uInt16 nRequiredStyle ) const { sal_Int32 i; sal_uInt16 nStyle; @@ -1429,10 +1429,10 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, long n2; if ( !mbActive ) - return sal_False; + return false; // determine positions - sal_Bool bIsHori = 0 != (mnWinStyle & WB_HORZ); + bool bIsHori = 0 != (mnWinStyle & WB_HORZ); if ( bIsHori ) { nX = rPos.X(); @@ -1468,7 +1468,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, { pHitTest->nPos = 0; pHitTest->eType = RULER_TYPE_OUTSIDE; - return sal_False; + return false; } nX -= mpData->nNullVirOff; @@ -1514,7 +1514,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, { pHitTest->eType = RULER_TYPE_TAB; pHitTest->nAryPos = i; - return sal_True; + return true; } } } @@ -1555,7 +1555,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, { pHitTest->eType = RULER_TYPE_INDENT; pHitTest->nAryPos = i-1; - return sal_True; + return true; } } } @@ -1566,7 +1566,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, { pHitTest->nPos = 0; pHitTest->eType = RULER_TYPE_OUTSIDE; - return sal_False; + return false; } // test the borders @@ -1639,7 +1639,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, } } - return sal_True; + return true; } } } @@ -1654,7 +1654,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, { pHitTest->eType = RULER_TYPE_MARGIN1; pHitTest->bSize = true; - return sal_True; + return true; } } if ( (mpData->nMargin2Style & (RULER_MARGIN_SIZEABLE | RULER_STYLE_INVISIBLE)) == RULER_MARGIN_SIZEABLE ) @@ -1664,7 +1664,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, { pHitTest->eType = RULER_TYPE_MARGIN2; pHitTest->bSize = true; - return sal_True; + return true; } } @@ -1709,26 +1709,26 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, { pHitTest->eType = RULER_TYPE_TAB; pHitTest->nAryPos = i; - return sal_True; + return true; } } } } } - return sal_False; + return false; } -sal_Bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, +bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, RulerSelection* pHitTest ) const { Point aPos = rPos; - sal_Bool bRequiredStyle = sal_False; + bool bRequiredStyle = false; sal_uInt16 nRequiredStyle = 0; if (eDragType == RULER_TYPE_INDENT) { - bRequiredStyle = sal_True; + bRequiredStyle = true; nRequiredStyle = RULER_INDENT_BOTTOM; } @@ -1747,7 +1747,7 @@ sal_Bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) ) { if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) ) - return sal_True; + return true; } } @@ -1763,7 +1763,7 @@ sal_Bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) ) { if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) ) - return sal_True; + return true; } } @@ -1778,21 +1778,21 @@ sal_Bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, if ( ImplHitTest( aPos, pHitTest ) ) { if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) ) - return sal_True; + return true; } } pHitTest->eType = RULER_TYPE_DONTKNOW; - return sal_False; + return false; } -sal_Bool Ruler::ImplStartDrag( RulerSelection* pHitTest, sal_uInt16 nModifier ) +bool Ruler::ImplStartDrag( RulerSelection* pHitTest, sal_uInt16 nModifier ) { // don't trigger drag if a border that was clicked can not be changed if ( (pHitTest->eType == RULER_TYPE_BORDER) && !pHitTest->bSize && !pHitTest->bSizeBar ) - return sal_False; + return false; // Set drag data meDragType = pHitTest->eType; @@ -1808,10 +1808,10 @@ sal_Bool Ruler::ImplStartDrag( RulerSelection* pHitTest, sal_uInt16 nModifier ) { // if the handler allows dragging, initialize dragging ImplInvertLines(); - mbDrag = sal_True; + mbDrag = true; mnStartDragPos = mnDragPos; StartTracking(); - return sal_True; + return true; } else { @@ -1824,7 +1824,7 @@ sal_Bool Ruler::ImplStartDrag( RulerSelection* pHitTest, sal_uInt16 nModifier ) mpData = mpSaveData; } - return sal_False; + return false; } void Ruler::ImplDrag( const Point& rPos ) @@ -1861,18 +1861,18 @@ void Ruler::ImplDrag( const Point& rPos ) nX -= mpData->nNullVirOff; // if upper or left from ruler, then consider old values - mbDragDelete = sal_False; + mbDragDelete = false; if ( nY < 0 ) { if ( !mbDragCanceled ) { // reset the data - mbDragCanceled = sal_True; + mbDragCanceled = true; ImplRulerData aTempData; aTempData = *mpDragData; *mpDragData = *mpSaveData; - mbCalc = sal_True; - mbFormat = sal_True; + mbCalc = true; + mbFormat = true; // call handler mnDragPos = mnStartDragPos; @@ -1887,11 +1887,11 @@ void Ruler::ImplDrag( const Point& rPos ) } else { - mbDragCanceled = sal_False; + mbDragCanceled = false; // +2, so the tabs are not cleared too quickly if ( nY > nOutHeight + 2 ) - mbDragDelete = sal_True; + mbDragDelete = true; mnDragPos = nX; @@ -1915,7 +1915,7 @@ void Ruler::ImplEndDrag() *mpSaveData = *mpDragData; mpData = mpSaveData; - mbDrag = sal_False; + mbDrag = false; // call handler EndDrag(); @@ -1925,8 +1925,8 @@ void Ruler::ImplEndDrag() mnDragPos = 0; mnDragAryPos = 0; mnDragSize = 0; - mbDragCanceled = sal_False; - mbDragDelete = sal_False; + mbDragCanceled = false; + mbDragDelete = false; mnDragModifier = 0; mnDragScroll = 0; mnStartDragPos = 0; @@ -2086,8 +2086,8 @@ void Ruler::Tracking( const TrackingEvent& rTEvt ) // reset the old state at cancel if ( rTEvt.IsTrackingCanceled() ) { - mbDragCanceled = sal_True; - mbFormat = sal_True; + mbDragCanceled = true; + mbFormat = true; } ImplEndDrag(); @@ -2102,7 +2102,7 @@ void Ruler::Paint( const Rectangle& ) // consider extra field if ( mnWinStyle & WB_EXTRAFIELD ) - ImplDrawExtra( sal_True ); + ImplDrawExtra( true ); } void Ruler::Resize() @@ -2126,7 +2126,7 @@ void Ruler::Resize() } // clear lines - sal_Bool bVisible = IsReallyVisible(); + bool bVisible = IsReallyVisible(); if ( bVisible && !mpData->pLines.empty() ) { ImplInvertLines(); @@ -2134,22 +2134,22 @@ void Ruler::Resize() if ( !mnUpdateEvtId ) mnUpdateEvtId = Application::PostUserEvent( LINK( this, Ruler, ImplUpdateHdl ), NULL ); } - mbFormat = sal_True; + mbFormat = true; // recalculate some values if the height/width changes // extra field should always be updated ImplInitExtraField( mpData->bTextRTL ); if ( nNewHeight ) { - mbCalc = sal_True; + mbCalc = true; mnVirHeight = nNewHeight - mnBorderWidth - (RULER_OFF*2); } else { if ( mpData->bAutoPageWidth ) - ImplUpdate( sal_True ); + ImplUpdate( true ); else if ( mbAutoWinWidth ) - mbCalc = sal_True; + mbCalc = true; } // clear part of the border @@ -2205,17 +2205,17 @@ void Ruler::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -2230,8 +2230,8 @@ void Ruler::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - mbFormat = sal_True; - ImplInitSettings( sal_True, sal_True, sal_True ); + mbFormat = true; + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -2271,7 +2271,7 @@ void Ruler::ExtraDown() void Ruler::Activate() { - mbActive = sal_True; + mbActive = true; // update positionlies - draw is delayed mnUpdateFlags |= RULER_UPDATE_LINES; @@ -2284,10 +2284,10 @@ void Ruler::Deactivate() // clear positionlines ImplInvertLines(); - mbActive = sal_False; + mbActive = false; } -sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) +bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) { if ( !mbDrag ) { @@ -2345,11 +2345,11 @@ sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) mnDragPos = 0; mnDragAryPos = 0; - return sal_True; + return true; } } - return sal_False; + return false; } void Ruler::CancelDrag() @@ -2384,13 +2384,13 @@ void Ruler::SetWinPos( long nNewOff, long nNewWidth ) { // should widths be automatically calculated if ( !nNewWidth ) - mbAutoWinWidth = sal_True; + mbAutoWinWidth = true; else - mbAutoWinWidth = sal_False; + mbAutoWinWidth = false; mnWinOff = nNewOff; mnWinWidth = nNewWidth; - ImplUpdate( sal_True ); + ImplUpdate( true ); } void Ruler::SetPagePos( long nNewOff, long nNewWidth ) @@ -2407,7 +2407,7 @@ void Ruler::SetPagePos( long nNewOff, long nNewWidth ) mpData->nPageOff = nNewOff; mpData->nPageWidth = nNewWidth; - ImplUpdate( sal_True ); + ImplUpdate( true ); } void Ruler::SetBorderPos( long nOff ) @@ -2494,7 +2494,7 @@ void Ruler::SetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle ) meExtraType = eNewExtraType; mnExtraStyle = nStyle; if ( IsReallyVisible() && IsUpdateMode() ) - ImplDrawExtra( sal_False ); + ImplDrawExtra( false ); } } @@ -2731,7 +2731,7 @@ void Ruler::SetStyle( WinBits nStyle ) if ( mnWinStyle != nStyle ) { mnWinStyle = nStyle; - ImplInitExtraField( sal_True ); + ImplInitExtraField( true ); } } @@ -2747,13 +2747,14 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Color &rFillColor, const Point ImplDrawRulerTab( pDevice, aPos, nTabStyle, nStyle ); pDevice->Pop(); } -void Ruler::SetTextRTL(sal_Bool bRTL) + +void Ruler::SetTextRTL(bool bRTL) { if(mpData->bTextRTL != (bool) bRTL) { mpData->bTextRTL = bRTL; if ( IsReallyVisible() && IsUpdateMode() ) - ImplInitExtraField( sal_True ); + ImplInitExtraField( true ); } } @@ -2795,7 +2796,7 @@ RulerUnitData Ruler::GetCurrentRulerUnit() const void Ruler::DrawTicks() { - mbFormat = sal_True; + mbFormat = true; Paint(Rectangle()); } diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 8c28d064071c..8fad417ff008 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -219,7 +219,7 @@ namespace svt } - void RoadmapWizard::SetRoadmapInteractive( sal_Bool _bInteractive ) + void RoadmapWizard::SetRoadmapInteractive( bool _bInteractive ) { m_pImpl->pRoadmap->SetRoadmapInteractive( _bInteractive ); } diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx index 12839ed064cf..d95259520263 100644 --- a/svtools/source/svrtf/rtfout.cxx +++ b/svtools/source/svrtf/rtfout.cxx @@ -25,7 +25,7 @@ #include <svtools/rtfout.hxx> SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c, - int *pUCMode, rtl_TextEncoding eDestEnc, sal_Bool bWriteHelpFile) + int *pUCMode, rtl_TextEncoding eDestEnc, bool bWriteHelpFile) { const sal_Char* pStr = 0; switch (c) @@ -148,7 +148,7 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c, } SvStream& RTFOutFuncs::Out_String( SvStream& rStream, const OUString& rStr, - rtl_TextEncoding eDestEnc, sal_Bool bWriteHelpFile) + rtl_TextEncoding eDestEnc, bool bWriteHelpFile) { int nUCMode = 1; for (sal_Int32 n = 0; n < rStr.getLength(); ++n) |