diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-20 11:14:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-24 08:12:09 +0200 |
commit | f661ac03e049844fd529fb6ff02e628b32cac650 (patch) | |
tree | ec4c4c9ac697df5a3645e1d0c7d426d03968d50c /include | |
parent | b1de52241c1c2045ceab4ea3526f51f145be2930 (diff) |
svtools: sal_Bool->bool
Change-Id: I22d8869551f46d2a0607f670f937853f394b6acf
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/editbrowsebox.hxx | 82 | ||||
-rw-r--r-- | include/svtools/editimplementation.hxx | 6 | ||||
-rw-r--r-- | include/svtools/ehdl.hxx | 12 | ||||
-rw-r--r-- | include/svtools/embedtransfer.hxx | 2 | ||||
-rw-r--r-- | include/svtools/extcolorcfg.hxx | 31 | ||||
-rw-r--r-- | include/svx/gridctrl.hxx | 10 |
6 files changed, 72 insertions, 71 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index cf9b388c465f..7f53e86bdb79 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -99,7 +99,7 @@ namespace svt virtual void SetModified(); virtual void ClearModified() = 0; - virtual sal_Bool IsModified() const = 0; + virtual bool IsModified() const = 0; // commit any current changes. Especially, do any reformatting you need (from input formatting // to output formatting) here @@ -111,9 +111,9 @@ namespace svt inline bool isSuspended( ) const { return bSuspended; } protected: - virtual sal_Bool MoveAllowed(const KeyEvent& rEvt) const; + virtual bool MoveAllowed(const KeyEvent& rEvt) const; virtual void SetModifyHdl(const Link& rLink) = 0; - virtual sal_Bool WantMouseEvent() const; + virtual bool WantMouseEvent() const; }; SV_DECL_IMPL_REF(CellController); @@ -131,8 +131,8 @@ namespace svt virtual OUString GetText( LineEnd aSeparator ) const = 0; virtual void SetText( const OUString& _rStr ) = 0; - virtual sal_Bool IsReadOnly() const = 0; - virtual void SetReadOnly( sal_Bool bReadOnly ) = 0; + virtual bool IsReadOnly() const = 0; + virtual void SetReadOnly( bool bReadOnly ) = 0; virtual sal_Int32 GetMaxTextLen() const = 0; virtual void SetMaxTextLen( sal_Int32 _nMaxLen ) = 0; @@ -145,7 +145,7 @@ namespace svt virtual OUString GetSelected( LineEnd aSeparator ) const = 0; virtual void SetModified() = 0; - virtual sal_Bool IsModified() const = 0; + virtual bool IsModified() const = 0; virtual void ClearModified() = 0; virtual void SetModifyHdl( const Link& _rLink ) = 0; }; @@ -167,8 +167,8 @@ namespace svt virtual OUString GetText( LineEnd aSeparator ) const; virtual void SetText( const OUString& _rStr ); - virtual sal_Bool IsReadOnly() const; - virtual void SetReadOnly( sal_Bool bReadOnly ); + virtual bool IsReadOnly() const; + virtual void SetReadOnly( bool bReadOnly ); virtual sal_Int32 GetMaxTextLen() const; virtual void SetMaxTextLen( sal_Int32 _nMaxLen ); @@ -181,7 +181,7 @@ namespace svt virtual OUString GetSelected( LineEnd aSeparator ) const; virtual void SetModified(); - virtual sal_Bool IsModified() const; + virtual bool IsModified() const; virtual void ClearModified(); virtual void SetModifyHdl( const Link& _rLink ); }; @@ -209,7 +209,7 @@ namespace svt virtual void Modify(); private: - sal_Bool dispatchKeyEvent( const KeyEvent& _rEvent ); + bool dispatchKeyEvent( const KeyEvent& _rEvent ); }; @@ -235,7 +235,7 @@ namespace svt class SVT_DLLPUBLIC EditCellController : public CellController { IEditImplementation* m_pEditImplementation; - sal_Bool m_bOwnImplementation; // did we create m_pEditImplementation? + bool m_bOwnImplementation; // did we create m_pEditImplementation? public: TYPEINFO(); @@ -247,11 +247,11 @@ namespace svt IEditImplementation* GetEditImplementation( ) { return m_pEditImplementation; } virtual void SetModified(); - virtual sal_Bool IsModified() const; + virtual bool IsModified() const; virtual void ClearModified(); protected: - virtual sal_Bool MoveAllowed(const KeyEvent& rEvt) const; + virtual bool MoveAllowed(const KeyEvent& rEvt) const; virtual void SetModifyHdl(const Link& rLink); }; @@ -266,11 +266,11 @@ namespace svt SpinField& GetSpinWindow() const {return (SpinField &)GetWindow();} virtual void SetModified(); - virtual sal_Bool IsModified() const; + virtual bool IsModified() const; virtual void ClearModified(); protected: - virtual sal_Bool MoveAllowed(const KeyEvent& rEvt) const; + virtual bool MoveAllowed(const KeyEvent& rEvt) const; virtual void SetModifyHdl(const Link& rLink); }; @@ -318,12 +318,12 @@ namespace svt CheckBoxCellController(CheckBoxControl* pWin):CellController(pWin){} CheckBox& GetCheckBox() const; - virtual sal_Bool IsModified() const; + virtual bool IsModified() const; virtual void ClearModified(); protected: virtual void SetModifyHdl(const Link& rLink); - virtual sal_Bool WantMouseEvent() const; + virtual bool WantMouseEvent() const; }; @@ -351,11 +351,11 @@ namespace svt ComboBoxCellController(ComboBoxControl* pParent); ComboBoxControl& GetComboBox() const {return (ComboBoxControl &)GetWindow();} - virtual sal_Bool IsModified() const; + virtual bool IsModified() const; virtual void ClearModified(); protected: - virtual sal_Bool MoveAllowed(const KeyEvent& rEvt) const; + virtual bool MoveAllowed(const KeyEvent& rEvt) const; virtual void SetModifyHdl(const Link& rLink); }; @@ -384,11 +384,11 @@ namespace svt ListBoxCellController(ListBoxControl* pParent); ListBoxControl& GetListBox() const {return (ListBoxControl &)GetWindow();} - virtual sal_Bool IsModified() const; + virtual bool IsModified() const; virtual void ClearModified(); protected: - virtual sal_Bool MoveAllowed(const KeyEvent& rEvt) const; + virtual bool MoveAllowed(const KeyEvent& rEvt) const; virtual void SetModifyHdl(const Link& rLink); }; @@ -456,19 +456,19 @@ namespace svt class BrowserMouseEventPtr { BrowserMouseEvent* pEvent; - sal_Bool bDown; + bool bDown; public: BrowserMouseEventPtr():pEvent(NULL){} ~BrowserMouseEventPtr(){Clear();} - sal_Bool Is() const {return pEvent != NULL;} - sal_Bool IsDown() const {return bDown;} + bool Is() const {return pEvent != NULL;} + bool IsDown() const {return bDown;} const BrowserMouseEvent* operator->() const {return pEvent;} const BrowserMouseEvent& operator*() const {return *pEvent;} SVT_DLLPUBLIC void Clear(); - void Set(const BrowserMouseEvent* pEvt, sal_Bool bIsDown); + void Set(const BrowserMouseEvent* pEvt, bool bIsDown); } aMouseEvent; CellControllerRef aController, @@ -483,9 +483,9 @@ namespace svt long nEditRow, nOldEditRow; sal_uInt16 nEditCol, nOldEditCol; - sal_Bool bHasFocus : 1; - mutable sal_Bool bPaintStatus : 1; // paint a status (image) in the handle column - sal_Bool bActiveBeforeTracking; + bool bHasFocus : 1; + mutable bool bPaintStatus : 1; // paint a status (image) in the handle column + bool bActiveBeforeTracking; CheckBoxControl* pCheckBoxPaint; @@ -496,7 +496,7 @@ namespace svt protected: BrowserHeader* pHeader; - sal_Bool isGetCellFocusPending() const { return nStartEvent != 0; } + bool isGetCellFocusPending() const { return nStartEvent != 0; } void cancelGetCellFocus() { if (nStartEvent) Application::RemoveUserEvent(nStartEvent); nStartEvent = 0; } void forceGetCellFocus() { cancelGetCellFocus(); LINK(this, EditBrowseBox, StartEditHdl).Call((void*)NULL); } @@ -533,7 +533,7 @@ namespace svt virtual void EndScroll(); // should be used instead of GetFieldRectPixel, 'cause this method here takes into account the borders - Rectangle GetCellRect(long nRow, sal_uInt16 nColId, sal_Bool bRelToBrowser = sal_True) const; + Rectangle GetCellRect(long nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const; virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId); virtual sal_uInt32 GetAutoColumnWidth(sal_uInt16 nColId); @@ -551,17 +551,17 @@ namespace svt // when changing a row: // CursorMoving: cursor is beeing moved, but GetCurRow() still provides the old row - virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol); + virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol); // cursor has been moved virtual void CursorMoved(); virtual void CellModified(); // called whenever a cell has been modified - virtual sal_Bool SaveModified(); // called whenever a cell should be left, and it's content should be saved + virtual bool SaveModified(); // called whenever a cell should be left, and it's content should be saved // return sal_False prevents leaving the cell - virtual sal_Bool SaveRow(); // commit the current row + virtual bool SaveRow(); // commit the current row - virtual sal_Bool IsModified() const {return aController.Is() && aController->IsModified();} + virtual bool IsModified() const {return aController.Is() && aController->IsModified();} virtual CellController* GetController(long nRow, sal_uInt16 nCol); virtual void InitController(CellControllerRef& rController, long nRow, sal_uInt16 nCol); @@ -581,11 +581,11 @@ namespace svt // called whenever (Shift)Tab or Enter is pressed. If true is returned, these keys // result in traveling to the next or to th previous cell - virtual sal_Bool IsTabAllowed(sal_Bool bForward) const; + virtual bool IsTabAllowed(bool bForward) const; virtual bool IsCursorMoveAllowed(long nNewRow, sal_uInt16 nNewColId) const; - void PaintTristate(OutputDevice& rDev, const Rectangle& rRect,const TriState& eState,sal_Bool _bEnabled=sal_True) const; + void PaintTristate(OutputDevice& rDev, const Rectangle& rRect, const TriState& eState, bool _bEnabled=true) const; void AsynchGetFocus(); // secure starting of StartEditHdl @@ -595,7 +595,7 @@ namespace svt EditBrowseBox(Window* pParent, const ResId& rId, sal_Int32 nBrowserFlags = EBBF_NONE, BrowserMode nMode = 0 ); ~EditBrowseBox(); - sal_Bool IsEditing() const {return aController.Is();} + bool IsEditing() const {return aController.Is();} void InvalidateStatusCell(long nRow) {RowModified(nRow, 0);} void InvalidateHandleColumn(); @@ -608,8 +608,8 @@ namespace svt sal_Int32 GetBrowserFlags() const { return m_nBrowserFlags; } void SetBrowserFlags(sal_Int32 nFlags); - virtual void ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus = sal_True); - virtual void DeactivateCell(sal_Bool bUpdate = sal_True); + virtual void ActivateCell(long nRow, sal_uInt16 nCol, bool bSetCellFocus = true); + virtual void DeactivateCell(bool bUpdate = true); // Children --------------------------------------------------------------- /** Creates the accessible object of a data table cell. @@ -660,12 +660,12 @@ namespace svt virtual void PaintField(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const; using Control::ImplInitSettings; - 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 DetermineFocus( const sal_uInt16 _nGetFocusFlags = 0); inline void HideAndDisable(CellControllerRef& rController); inline void EnableAndShow() const; - SVT_DLLPRIVATE void implActivateCellOnMouseEvent(const BrowserMouseEvent& _rEvt, sal_Bool _bUp); + SVT_DLLPRIVATE void implActivateCellOnMouseEvent(const BrowserMouseEvent& _rEvt, bool _bUp); SVT_DLLPRIVATE void impl_construct(); DECL_DLLPRIVATE_LINK(ModifyHdl, void* ); diff --git a/include/svtools/editimplementation.hxx b/include/svtools/editimplementation.hxx index 96eaf50964a0..edf3e8f22369 100644 --- a/include/svtools/editimplementation.hxx +++ b/include/svtools/editimplementation.hxx @@ -66,14 +66,14 @@ void GenericEditImplementation< EDIT >::SetSelection( const Selection& _rSelecti template <class EDIT> -void GenericEditImplementation< EDIT >::SetReadOnly( sal_Bool bReadOnly ) +void GenericEditImplementation< EDIT >::SetReadOnly( bool bReadOnly ) { m_rEdit.SetReadOnly( bReadOnly ); } template <class EDIT> -sal_Bool GenericEditImplementation< EDIT >::IsReadOnly() const +bool GenericEditImplementation< EDIT >::IsReadOnly() const { return m_rEdit.IsReadOnly(); } @@ -122,7 +122,7 @@ void GenericEditImplementation< EDIT >::SetModified() template <class EDIT> -sal_Bool GenericEditImplementation< EDIT >::IsModified() const +bool GenericEditImplementation< EDIT >::IsModified() const { return m_rEdit.IsModified(); } diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx index 402dbc8759de..0f5a4dbae228 100644 --- a/include/svtools/ehdl.hxx +++ b/include/svtools/ehdl.hxx @@ -54,19 +54,19 @@ public: ~SfxErrorHandler(); protected: - virtual sal_Bool GetErrorString(sal_uLong lErrId, OUString &, sal_uInt16&) const; - virtual sal_Bool GetMessageString(sal_uLong lErrId, OUString &, sal_uInt16&) const; + virtual bool GetErrorString(sal_uLong lErrId, OUString &, sal_uInt16&) const; + virtual bool GetMessageString(sal_uLong lErrId, OUString &, sal_uInt16&) const; private: sal_uLong lStart; sal_uLong lEnd; sal_uInt16 nId; - ResMgr *pMgr; - ResMgr *pFreeMgr; + ResMgr *pMgr; + ResMgr *pFreeMgr; - SVT_DLLPRIVATE sal_Bool GetClassString(sal_uLong lErrId, OUString &) const; - virtual bool CreateString( const ErrorInfo *, OUString &, sal_uInt16 &) const; + SVT_DLLPRIVATE bool GetClassString(sal_uLong lErrId, OUString &) const; + virtual bool CreateString( const ErrorInfo *, OUString &, sal_uInt16 &) const; }; #endif diff --git a/include/svtools/embedtransfer.hxx b/include/svtools/embedtransfer.hxx index 2649188d0a80..c30b72078fd1 100644 --- a/include/svtools/embedtransfer.hxx +++ b/include/svtools/embedtransfer.hxx @@ -36,7 +36,7 @@ private: protected: virtual void AddSupportedFormats(); - virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); virtual void ObjectReleased(); public: diff --git a/include/svtools/extcolorcfg.hxx b/include/svtools/extcolorcfg.hxx index cc20bea1a09f..495ced772ffd 100644 --- a/include/svtools/extcolorcfg.hxx +++ b/include/svtools/extcolorcfg.hxx @@ -27,9 +27,10 @@ #include <svl/lstner.hxx> -namespace svtools{ +namespace svtools { class ExtendedColorConfig_Impl; + class ExtendedColorConfigValue { OUString m_sName; @@ -48,14 +49,14 @@ public: ,m_nDefaultColor(_nDefaultColor) {} - inline OUString getName() const { return m_sName; } - inline OUString getDisplayName() const { return m_sDisplayName; } + inline OUString getName() const { return m_sName; } + inline OUString getDisplayName() const { return m_sDisplayName; } inline sal_Int32 getColor() const { return m_nColor; } inline sal_Int32 getDefaultColor() const { return m_nDefaultColor; } - inline void setColor(sal_Int32 _nColor) { m_nColor = _nColor; } + inline void setColor(sal_Int32 _nColor) { m_nColor = _nColor; } - sal_Bool operator !=(const ExtendedColorConfigValue& rCmp) const + bool operator !=(const ExtendedColorConfigValue& rCmp) const { return m_nColor != rCmp.m_nColor;} }; @@ -68,13 +69,13 @@ public: ExtendedColorConfig(); ~ExtendedColorConfig(); - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); // get the configured value ExtendedColorConfigValue GetColorValue(const OUString& _sComponentName,const OUString& _sName)const; sal_Int32 GetComponentCount() const; - OUString GetComponentName(sal_uInt32 _nPos) const; - OUString GetComponentDisplayName(const OUString& _sComponentName) const; + OUString GetComponentName(sal_uInt32 _nPos) const; + OUString GetComponentDisplayName(const OUString& _sComponentName) const; sal_Int32 GetComponentColorCount(const OUString& _sName) const; ExtendedColorConfigValue GetComponentColorConfigValue(const OUString& _sComponentName,sal_uInt32 _nPos) const; }; @@ -82,24 +83,24 @@ public: class SVT_DLLPUBLIC EditableExtendedColorConfig { ExtendedColorConfig_Impl* m_pImpl; - sal_Bool m_bModified; + bool m_bModified; public: EditableExtendedColorConfig(); ~EditableExtendedColorConfig(); - void DeleteScheme(const OUString& rScheme ); - void AddScheme(const OUString& rScheme ); - sal_Bool LoadScheme(const OUString& rScheme ); + void DeleteScheme(const OUString& rScheme ); + void AddScheme(const OUString& rScheme ); + bool LoadScheme(const OUString& rScheme ); void SetCurrentSchemeName(const OUString& rScheme); sal_Int32 GetComponentCount() const; - OUString GetComponentName(sal_uInt32 _nPos) const; + OUString GetComponentName(sal_uInt32 _nPos) const; sal_Int32 GetComponentColorCount(const OUString& _sName) const; ExtendedColorConfigValue GetComponentColorConfigValue(const OUString& _sName,sal_uInt32 _nPos) const; void SetColorValue(const OUString& _sComponentName, const ExtendedColorConfigValue& rValue); void SetModified(); - void ClearModified(){m_bModified = sal_False;} - sal_Bool IsModified()const{return m_bModified;} + void ClearModified() {m_bModified = false;} + bool IsModified() const {return m_bModified;} void Commit(); void DisableBroadcast(); diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index 44b7fc18c362..998abd5e4e00 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -304,7 +304,7 @@ protected: virtual void PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const; virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId) const; virtual RowStatus GetRowStatus(long nRow) const; - virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol); + virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol); virtual void CursorMoved(); virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY); virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId); @@ -318,15 +318,15 @@ protected: virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol); virtual void CellModified(); - virtual sal_Bool SaveModified(); - virtual sal_Bool IsModified() const; + virtual bool SaveModified(); + virtual bool IsModified() const; virtual sal_uInt16 AppendColumn(const OUString& rName, sal_uInt16 nWidth = 0, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = (sal_uInt16)-1); virtual void RemoveColumn(sal_uInt16 nId); virtual DbGridColumn* CreateColumn(sal_uInt16 nId) const; virtual void ColumnMoved(sal_uInt16 nId); - virtual sal_Bool SaveRow(); - virtual sal_Bool IsTabAllowed(sal_Bool bForward) const; + virtual bool SaveRow(); + virtual bool IsTabAllowed(bool bForward) const; /// hide a column virtual void HideColumn(sal_uInt16 nId); |