Kaydet (Commit) 2d3a1d2a authored tarafından Noel Grandin's avatar Noel Grandin

svtools: sal_Bool->bool

Change-Id: I6c57a52b4fc3ecb993af4526fefcca352ad269b5
üst bdd2df77
......@@ -52,7 +52,7 @@ private:
ScrollBar aVScroll; // the scrollbars
ScrollBar aHScroll;
ScrollBarBox aCornerWin; // window in the bottom right corner
sal_Bool bScrolling:1, // user controlled scrolling
bool bScrolling:1, // user controlled scrolling
bHandleDragging:1, // scroll window while dragging
bHCenter:1,
bVCenter:1;
......
......@@ -56,8 +56,8 @@ private:
HeaderBar aHeaderBar;
long nOldPos;
sal_uInt16 nHeaderItemId;
sal_Bool bPaintFlag;
sal_Bool bSortDirection;
bool bPaintFlag;
bool bSortDirection;
sal_uInt16 nSortCol;
DECL_LINK( StartDragHdl, HeaderBar* );
......@@ -100,20 +100,20 @@ public:
void ShowTable();
void HideTable();
sal_Bool IsVisible() const;
bool IsVisible() const;
void EnableTable();
void DisableTable();
sal_Bool IsEnabled() const;
bool IsEnabled() const;
sal_uInt16 GetSelectedCol();
void SortByCol(sal_uInt16,sal_Bool bDir=sal_True);
sal_Bool GetSortDirection(){ return bSortDirection;}
void SortByCol(sal_uInt16, bool bDir=true);
bool GetSortDirection(){ return bSortDirection;}
sal_uInt16 GetSortedCol(){ return nSortCol;}
SvLBoxItem* GetEntryAtPos( SvTreeListEntry* pEntry, sal_uInt16 nPos ) const;
CommandEvent GetCommandEvent()const;
inline sal_Bool IsFocusOnCellEnabled() const { return IsCellFocusEnabled(); }
inline bool IsFocusOnCellEnabled() const { return IsCellFocusEnabled(); }
void SetCommandHdl( const Link& rLink ) { aCommandLink = rLink; }
const Link& GetCommandHdl() const { return aCommandLink; }
......
......@@ -117,7 +117,7 @@ class SVT_DLLPUBLIC StatusbarController :
void execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
void execute( const OUString& aCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
sal_Bool m_bInitialized : 1,
bool m_bInitialized : 1,
m_bDisposed : 1;
unsigned short m_nID;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
......
......@@ -60,7 +60,7 @@ namespace svt
/** extracts a string from the system clipboard given
@return <TRUE/> if the extraction was successful, i.e. if the clipboard contained a string content
*/
SVT_DLLPUBLIC static sal_Bool PasteString( OUString& _rContent, Window* _pWindow = NULL );
SVT_DLLPUBLIC static bool PasteString( OUString& _rContent, Window* _pWindow = NULL );
/** starts dragging a simple string
*/
......
......@@ -48,11 +48,11 @@ private:
long nWidth;
long nHeight;
SvLBoxButtonData_Impl* pImpl;
sal_Bool bDataOk;
bool bDataOk;
SvButtonState eState;
SVT_DLLPRIVATE void SetWidthAndHeight();
SVT_DLLPRIVATE void InitData( sal_Bool bImagesFromDefault,
SVT_DLLPRIVATE void InitData( bool bImagesFromDefault,
bool _bRadioBtn, const Control* pControlForSettings = NULL );
public:
// include creating default images (CheckBox or RadioButton)
......@@ -66,7 +66,7 @@ public:
long Height();
void SetLink( const Link& rLink) { aLink=rLink; }
const Link& GetLink() const { return aLink; }
sal_Bool IsRadio();
bool IsRadio();
// weil Buttons nicht von LinkHdl abgeleitet sind
void CallLink();
......@@ -85,7 +85,7 @@ public:
void SetDefaultImages( const Control* pControlForSettings = NULL );
// set images acording to the color scheeme of the Control
// pControlForSettings == NULL: settings are taken from Application
sal_Bool HasDefaultImages( void ) const;
bool HasDefaultImages( void ) const;
};
// **********************************************************************
......@@ -154,20 +154,20 @@ public:
virtual ~SvLBoxButton();
virtual void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* );
virtual sal_uInt16 GetType() const;
virtual sal_Bool ClickHdl(SvTreeListBox* pView, SvTreeListEntry* );
virtual bool ClickHdl(SvTreeListBox* pView, SvTreeListEntry* );
virtual void Paint(
const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
virtual SvLBoxItem* Create() const;
virtual void Clone( SvLBoxItem* pSource );
sal_uInt16 GetButtonFlags() const { return nItemFlags; }
sal_Bool IsStateChecked() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_CHECKED)!=0; }
sal_Bool IsStateUnchecked() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_UNCHECKED)!=0; }
sal_Bool IsStateTristate() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_TRISTATE)!=0; }
sal_Bool IsStateHilighted() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_HILIGHTED)!=0; }
bool IsStateChecked() const { return (nItemFlags & SV_ITEMSTATE_CHECKED)!=0; }
bool IsStateUnchecked() const { return (nItemFlags & SV_ITEMSTATE_UNCHECKED)!=0; }
bool IsStateTristate() const { return (nItemFlags & SV_ITEMSTATE_TRISTATE)!=0; }
bool IsStateHilighted() const { return (nItemFlags & SV_ITEMSTATE_HILIGHTED)!=0; }
void SetStateChecked();
void SetStateUnchecked();
void SetStateTristate();
void SetStateHilighted( sal_Bool bHilight );
void SetStateHilighted( bool bHilight );
void SetStateInvisible();
SvLBoxButtonKind GetKind() const { return eKind; }
......@@ -195,7 +195,7 @@ inline void SvLBoxButton::SetStateTristate()
nItemFlags &= SV_STATE_MASK;
nItemFlags |= SV_ITEMSTATE_TRISTATE;
}
inline void SvLBoxButton::SetStateHilighted( sal_Bool bHilight )
inline void SvLBoxButton::SetStateHilighted( bool bHilight )
{
if ( bHilight )
nItemFlags |= SV_ITEMSTATE_HILIGHTED;
......@@ -222,7 +222,7 @@ public:
virtual void Clone( SvLBoxItem* pSource );
sal_Bool SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 );
bool SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 );
void GetModeImages( Image& _rBitmap1, Image& _rBitmap2 ) const;
inline void SetBitmap1( const Image& _rImage );
......@@ -231,28 +231,28 @@ public:
inline const Image& GetBitmap2( ) const;
private:
Image& implGetImageStore( sal_Bool _bFirst );
Image& implGetImageStore( bool _bFirst );
};
inline void SvLBoxContextBmp::SetBitmap1( const Image& _rImage )
{
implGetImageStore( sal_True ) = _rImage;
implGetImageStore( true ) = _rImage;
}
inline void SvLBoxContextBmp::SetBitmap2( const Image& _rImage )
{
implGetImageStore( sal_False ) = _rImage;
implGetImageStore( false ) = _rImage;
}
inline const Image& SvLBoxContextBmp::GetBitmap1( ) const
{
Image& rImage = const_cast< SvLBoxContextBmp* >( this )->implGetImageStore( sal_True );
Image& rImage = const_cast< SvLBoxContextBmp* >( this )->implGetImageStore( true );
return rImage;
}
inline const Image& SvLBoxContextBmp::GetBitmap2( ) const
{
Image& rImage = const_cast< SvLBoxContextBmp* >( this )->implGetImageStore( sal_False );
Image& rImage = const_cast< SvLBoxContextBmp* >( this )->implGetImageStore( false );
return rImage;
}
......
......@@ -32,8 +32,8 @@ public:
~ExtMultiLineEdit();
// methods of TextView
void InsertText( const OUString& rNew, sal_Bool bSelect = sal_False );
void SetAutoScroll( sal_Bool bAutoScroll );
void InsertText( const OUString& rNew, bool bSelect = false );
void SetAutoScroll( bool bAutoScroll );
// methods of TextEngine
void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd );
......
......@@ -93,13 +93,13 @@ SvSimpleTable::SvSimpleTable(SvSimpleTableContainer& rParent, WinBits nBits):
m_rParentTableContainer(rParent),
aHeaderBar(&rParent,WB_BUTTONSTYLE | WB_BORDER | WB_TABSTOP),
nHeaderItemId(1),
bPaintFlag(sal_True)
bPaintFlag(true)
{
m_rParentTableContainer.SetTable(this);
bSortDirection=sal_True;
nSortCol=0xFFFF;
nOldPos=0;
bSortDirection = true;
nSortCol = 0xFFFF;
nOldPos = 0;
aHeaderBar.SetStartDragHdl(LINK( this, SvSimpleTable, StartDragHdl));
aHeaderBar.SetDragHdl(LINK( this, SvSimpleTable, DragHdl));
......@@ -206,8 +206,9 @@ void SvSimpleTable::Paint( const Rectangle& rRect )
nPos= static_cast< sal_uInt16 >( GetTab(i) );
}
}
bPaintFlag=sal_True;
bPaintFlag = true;
}
void SvSimpleTable::InsertHeaderEntry(const OUString& rText,
sal_uInt16 nCol, HeaderBarItemBits nBits)
{
......@@ -244,7 +245,7 @@ void SvSimpleTable::HideTable()
m_rParentTableContainer.Hide();
}
sal_Bool SvSimpleTable::IsVisible() const
bool SvSimpleTable::IsVisible() const
{
return m_rParentTableContainer.IsVisible();
}
......@@ -259,7 +260,7 @@ void SvSimpleTable::DisableTable()
m_rParentTableContainer.Disable();
}
sal_Bool SvSimpleTable::IsEnabled() const
bool SvSimpleTable::IsEnabled() const
{
return m_rParentTableContainer.IsEnabled();
}
......@@ -269,7 +270,7 @@ sal_uInt16 SvSimpleTable::GetSelectedCol()
return (aHeaderBar.GetCurItemId()-1);
}
void SvSimpleTable::SortByCol(sal_uInt16 nCol,sal_Bool bDir)
void SvSimpleTable::SortByCol(sal_uInt16 nCol, bool bDir)
{
bSortDirection=bDir;
if(nSortCol!=0xFFFF)
......@@ -362,7 +363,7 @@ void SvSimpleTable::HBarEndDrag()
nPos = nNewSize;
}
}
bPaintFlag=sal_False;
bPaintFlag = false;
Invalidate();
Update();
}
......
......@@ -29,19 +29,19 @@
struct SvLBoxButtonData_Impl
{
SvTreeListEntry* pEntry;
sal_Bool bDefaultImages;
sal_Bool bShowRadioButton;
bool bDefaultImages;
bool bShowRadioButton;
SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( sal_False ), bShowRadioButton( sal_False ) {}
SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( false ), bShowRadioButton( false ) {}
};
void SvLBoxButtonData::InitData( sal_Bool bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
void SvLBoxButtonData::InitData( bool bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
{
pImpl = new SvLBoxButtonData_Impl;
bDataOk = sal_False;
bDataOk = false;
eState = SV_BUTTON_UNCHECKED;
pImpl->bDefaultImages = bImagesFromDefault;
pImpl->bShowRadioButton = ( _bRadioBtn != false );
......@@ -52,14 +52,12 @@ void SvLBoxButtonData::InitData( sal_Bool bImagesFromDefault, bool _bRadioBtn, c
SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings )
{
InitData( sal_True, false, pControlForSettings );
InitData( true, false, pControlForSettings );
}
SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings, bool _bRadioBtn )
{
InitData( sal_True, _bRadioBtn, pControlForSettings );
InitData( true, _bRadioBtn, pControlForSettings );
}
SvLBoxButtonData::~SvLBoxButtonData()
......@@ -105,7 +103,7 @@ void SvLBoxButtonData::SetWidthAndHeight()
Size aSize = aBmps[0].GetSizePixel();
nWidth = aSize.Width();
nHeight = aSize.Height();
bDataOk = sal_True;
bDataOk = true;
}
......@@ -165,12 +163,12 @@ void SvLBoxButtonData::SetDefaultImages( const Control* pCtrl )
}
}
sal_Bool SvLBoxButtonData::HasDefaultImages( void ) const
bool SvLBoxButtonData::HasDefaultImages( void ) const
{
return pImpl->bDefaultImages;
}
sal_Bool SvLBoxButtonData::IsRadio() {
bool SvLBoxButtonData::IsRadio() {
return pImpl->bShowRadioButton;
}
......@@ -331,7 +329,7 @@ sal_uInt16 SvLBoxButton::GetType() const
return SV_ITEM_ID_LBOXBUTTON;
}
sal_Bool SvLBoxButton::ClickHdl( SvTreeListBox*, SvTreeListEntry* pEntry )
bool SvLBoxButton::ClickHdl( SvTreeListBox*, SvTreeListEntry* pEntry )
{
if ( CheckModification() )
{
......@@ -342,7 +340,7 @@ sal_Bool SvLBoxButton::ClickHdl( SvTreeListBox*, SvTreeListEntry* pEntry )
pData->StoreButtonState( pEntry, nItemFlags );
pData->CallLink();
}
return sal_False;
return false;
}
void SvLBoxButton::Paint(
......@@ -355,7 +353,7 @@ void SvLBoxButton::Paint(
rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
//Native drawing
sal_Bool bNativeOK = sal_False;
bool bNativeOK = false;
ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX;
if ( nIndex != SV_BMP_STATICIMAGE && rDev.IsNativeControlSupported( eCtrlType, PART_ENTIRE_CONTROL) )
......@@ -492,16 +490,15 @@ sal_uInt16 SvLBoxContextBmp::GetType() const
return SV_ITEM_ID_LBOXCONTEXTBMP;
}
sal_Bool SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 )
bool SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 )
{
sal_Bool bSuccess = sal_True;
bool bSuccess = true;
m_pImpl->m_aImage1 = _rBitmap1;
m_pImpl->m_aImage2 = _rBitmap2;
return bSuccess;
}
Image& SvLBoxContextBmp::implGetImageStore( sal_Bool _bFirst )
Image& SvLBoxContextBmp::implGetImageStore( bool _bFirst )
{
// OJ: #i27071# wrong mode so we just return the normal images
......@@ -524,7 +521,7 @@ void SvLBoxContextBmp::Paint(
// get the image.
const Image& rImage = implGetImageStore(pView->IsExpanded() != m_pImpl->m_bExpanded);
sal_Bool _bSemiTransparent = pEntry && ( 0 != ( SV_ENTRYFLAG_SEMITRANSPARENT & pEntry->GetFlags( ) ) );
bool _bSemiTransparent = pEntry && ( 0 != ( SV_ENTRYFLAG_SEMITRANSPARENT & pEntry->GetFlags( ) ) );
// draw
sal_uInt16 nStyle = _rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
if ( _bSemiTransparent )
......
......@@ -24,10 +24,10 @@
void ScrollableWindow::ImpInitialize( ScrollableWindowFlags nFlags )
{
bHandleDragging = (sal_Bool) ( nFlags & SCRWIN_THUMBDRAGGING );
bHandleDragging = (bool) ( nFlags & SCRWIN_THUMBDRAGGING );
bVCenter = (nFlags & SCRWIN_VCENTER) == SCRWIN_VCENTER;
bHCenter = (nFlags & SCRWIN_HCENTER) == SCRWIN_HCENTER;
bScrolling = sal_False;
bScrolling = false;
// set the handlers for the scrollbars
aVScroll.SetScrollHdl( LINK(this, ScrollableWindow, ScrollHdl) );
......@@ -109,7 +109,7 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll )
{
// notify the start of scrolling, if not already scrolling
if ( !bScrolling )
StartScroll(), bScrolling = sal_True;
StartScroll(), bScrolling = true;
// get the delta in logic coordinates
Size aDelta( PixelToLogic( Size( aHScroll.GetDelta(), aVScroll.GetDelta() ) ) );
......@@ -124,7 +124,7 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll )
}
// notify the end of scrolling
bScrolling = sal_False;
bScrolling = false;
EndScroll( aDelta.Width(), aDelta.Height() );
return 0;
}
......@@ -135,7 +135,7 @@ IMPL_LINK( ScrollableWindow, ScrollHdl, ScrollBar *, pScroll )
{
// notify the start of scrolling, if not already scrolling
if ( !bScrolling )
StartScroll(), bScrolling = sal_True;
StartScroll(), bScrolling = true;
if ( bHandleDragging )
{
......@@ -159,25 +159,27 @@ void ScrollableWindow::Resize()
// determine the size of the output-area and if we need scrollbars
const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize();
sal_Bool bVVisible = sal_False; // by default no vertical-ScrollBar
sal_Bool bHVisible = sal_False; // by default no horizontal-ScrollBar
sal_Bool bChanged; // determines if a visiblility was changed
bool bVVisible = false; // by default no vertical-ScrollBar
bool bHVisible = false; // by default no horizontal-ScrollBar
bool bChanged; // determines if a visiblility was changed
do
{
bChanged = sal_False;
bChanged = false;
// does we need a vertical ScrollBar
if ( aOutPixSz.Width() < aTotPixSz.Width() && !bHVisible )
{ bHVisible = sal_True;
{
bHVisible = true;
aOutPixSz.Height() -= nScrSize;
bChanged = sal_True;
bChanged = true;
}
// does we need a horizontal ScrollBar
if ( aOutPixSz.Height() < aTotPixSz.Height() && !bVVisible )
{ bVVisible = sal_True;
{
bVVisible = true;
aOutPixSz.Width() -= nScrSize;
bChanged = sal_True;
bChanged = true;
}
}
......
......@@ -39,12 +39,12 @@ ExtMultiLineEdit::~ExtMultiLineEdit()
{
}
void ExtMultiLineEdit::InsertText( const OUString& rNew, sal_Bool )
void ExtMultiLineEdit::InsertText( const OUString& rNew, bool )
{
GetTextView()->InsertText( rNew, false );
}
void ExtMultiLineEdit::SetAutoScroll( sal_Bool bAutoScroll )
void ExtMultiLineEdit::SetAutoScroll( bool bAutoScroll )
{
GetTextView()->SetAutoScroll( bAutoScroll );
}
......
......@@ -65,7 +65,7 @@ namespace svt
}
sal_Bool OStringTransfer::PasteString( OUString& _rContent, Window* _pWindow )
bool OStringTransfer::PasteString( OUString& _rContent, Window* _pWindow )
{
TransferableDataHelper aClipboardData = TransferableDataHelper::CreateFromSystemClipboard( _pWindow );
......@@ -79,13 +79,13 @@ namespace svt
if (SOT_FORMAT_STRING == aSearch->mnSotId)
{
OUString sContent;
sal_Bool bSuccess = aClipboardData.GetString( SOT_FORMAT_STRING, sContent );
bool bSuccess = aClipboardData.GetString( SOT_FORMAT_STRING, sContent );
_rContent = sContent;
return bSuccess;
}
}
return sal_False;
return false;
}
......
......@@ -51,8 +51,8 @@ StatusbarController::StatusbarController(
const OUString& aCommandURL,
unsigned short nID ) :
OWeakObject()
, m_bInitialized( sal_False )
, m_bDisposed( sal_False )
, m_bInitialized( false )
, m_bDisposed( false )
, m_nID( nID )
, m_xFrame( xFrame )
, m_xContext( rxContext )
......@@ -63,8 +63,8 @@ StatusbarController::StatusbarController(
StatusbarController::StatusbarController() :
OWeakObject()
, m_bInitialized( sal_False )
, m_bDisposed( sal_False )
, m_bInitialized( false )
, m_bDisposed( false )
, m_nID( 0 )
, m_aListenerContainer( m_aMutex )
{
......@@ -137,7 +137,7 @@ throw ( Exception, RuntimeException, std::exception )
if ( !bInitialized )
{
SolarMutexGuard aSolarMutexGuard;
m_bInitialized = sal_True;
m_bInitialized = true;
PropertyValue aPropValue;
for ( int i = 0; i < aArguments.getLength(); i++ )
......@@ -230,7 +230,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception)
m_xParentWindow.clear();
m_xStatusbarItem.clear();
m_bDisposed = sal_True;
m_bDisposed = true;
}
void SAL_CALL StatusbarController::addEventListener( const Reference< XEventListener >& xListener )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment