Hello, I asked at #libreoffice-dev if we have to see some special
condition to change sal_Bool to bool and so on, unanswered.
Sending for review.
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 9305e18..8420ebe 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -69,10 +69,10 @@ using namespace ::com::sun::star;
struct ImplColorListData
{
Color aColor;
- sal_Bool bColor;
+ bool bColor;
- ImplColorListData() : aColor( COL_BLACK ) { bColor = sal_False; }
- ImplColorListData( const Color& rColor ) : aColor( rColor ) { bColor = sal_True; }
+ ImplColorListData() : aColor( COL_BLACK ) { bColor = false; }
+ ImplColorListData( const Color& rColor ) : aColor( rColor ) { bColor = true; }
};
// -----------------------------------------------------------------------
@@ -84,7 +84,7 @@ void ColorListBox::ImplInit()
aImageSize.Height() = GetTextHeight();
aImageSize.Height() -= 2;
- EnableUserDraw( sal_True );
+ EnableUserDraw( true );
SetUserItemSize( aImageSize );
}
@@ -269,13 +269,13 @@ void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt )
rUDEvt.GetDevice()->SetLineColor( rUDEvt.GetDevice()->GetTextColor() );
rUDEvt.GetDevice()->DrawRect( Rectangle( aPos, aImageSize ) );
rUDEvt.GetDevice()->Pop();
- ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_False );
+ ListBox::DrawEntry( rUDEvt, false, true, false );
}
else
- ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_True );
+ ListBox::DrawEntry( rUDEvt, false, true, true );
}
else
- ListBox::DrawEntry( rUDEvt, sal_True, sal_True, sal_False );
+ ListBox::DrawEntry( rUDEvt, true, true, false );
}
// =======================================================================
@@ -733,7 +733,7 @@ sal_uInt16 LineListBox::GetStylePos( sal_uInt16 nListPos, long nWidth )
}
-void LineListBox::SelectEntry( sal_uInt16 nStyle, sal_Bool bSelect )
+void LineListBox::SelectEntry( sal_uInt16 nStyle, bool bSelect )
{
sal_uInt16 nPos = GetEntryPos( nStyle );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -853,9 +853,9 @@ sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const
// -----------------------------------------------------------------------
-sal_Bool LineListBox::UpdatePaintLineColor( void )
+bool LineListBox::UpdatePaintLineColor( void )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
Color aNewCol( rSettings.GetWindowColor().IsDark()?
rSettings.GetLabelTextColor() : aColor );
@@ -869,7 +869,7 @@ sal_Bool LineListBox::UpdatePaintLineColor( void )
void LineListBox::UpdateEntries( long nOldWidth )
{
- SetUpdateMode( sal_False );
+ SetUpdateMode( false );
UpdatePaintLineColor( );
@@ -908,7 +908,7 @@ void LineListBox::UpdateEntries( long nOldWidth )
n++;
}
- SetUpdateMode( sal_True );
+ SetUpdateMode( true );
Invalidate();
}
@@ -984,8 +984,8 @@ FontNameBox::FontNameBox( Window* pParent, WinBits nWinStyle ) :
{
InitBitmaps();
mpFontList = NULL;
- mbWYSIWYG = sal_False;
- mbSymbols = sal_False;
+ mbWYSIWYG = false;
+ mbSymbols = false;
}
// -------------------------------------------------------------------
@@ -995,8 +995,8 @@ FontNameBox::FontNameBox( Window* pParent, const ResId& rResId ) :
{
InitBitmaps();
mpFontList = NULL;
- mbWYSIWYG = sal_False;
- mbSymbols = sal_False;
+ mbWYSIWYG = false;
+ mbSymbols = false;
}
// -------------------------------------------------------------------
@@ -1079,7 +1079,7 @@ void FontNameBox::Fill( const FontList* pList )
// -------------------------------------------------------------------
-void FontNameBox::EnableWYSIWYG( sal_Bool bEnable )
+void FontNameBox::EnableWYSIWYG( bool bEnable )
{
if ( bEnable != mbWYSIWYG )
{
@@ -1091,7 +1091,7 @@ void FontNameBox::EnableWYSIWYG( sal_Bool bEnable )
// -------------------------------------------------------------------
-void FontNameBox::EnableSymbols( sal_Bool bEnable )
+void FontNameBox::EnableSymbols( bool bEnable )
{
if ( bEnable != mbSymbols )
{
@@ -2210,11 +2210,11 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
}
rUDEvt.GetDevice()->SetFont( aOldFont );
- DrawEntry( rUDEvt, sal_False, sal_False); // draw seperator
+ DrawEntry( rUDEvt, false, false); // draw seperator
}
else
{
- DrawEntry( rUDEvt, sal_True, sal_True );
+ DrawEntry( rUDEvt, true, true );
}
}
@@ -2306,11 +2306,11 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
FontWeight eLastWeight = WEIGHT_DONTKNOW;
FontItalic eLastItalic = ITALIC_NONE;
FontWidth eLastWidth = WIDTH_DONTKNOW;
- sal_Bool bNormal = sal_False;
- sal_Bool bItalic = sal_False;
- sal_Bool bBold = sal_False;
- sal_Bool bBoldItalic = sal_False;
- sal_Bool bInsert = sal_False;
+ bool bNormal = false;
+ bool bItalic = false;
+ bool bBold = false;
+ bool bBoldItalic = false;
+ bool bInsert = false;
FontInfo aInfo;
while ( hFontInfo )
{
@@ -2330,16 +2330,16 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
if ( eWeight <= WEIGHT_NORMAL )
{
if ( eItalic != ITALIC_NONE )
- bItalic = sal_True;
+ bItalic = true;
else
- bNormal = sal_True;
+ bNormal = true;
}
else
{
if ( eItalic != ITALIC_NONE )
- bBoldItalic = sal_True;
+ bBoldItalic = true;
else
- bBold = sal_True;
+ bBold = true;
}
// For wrong StyleNames we replace this with the correct once
@@ -2373,11 +2373,11 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
}
if ( !bItalic && (aStyleText == pList->GetItalicStr()) )
- bItalic = sal_True;
+ bItalic = true;
else if ( !bBold && (aStyleText == pList->GetBoldStr()) )
- bBold = sal_True;
+ bBold = true;
else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) )
- bBoldItalic = sal_True;
+ bBoldItalic = true;
hFontInfo = pList->GetNextFontInfo( hFontInfo );
}
@@ -2456,15 +2456,15 @@ FontSizeBox::~FontSizeBox()
void FontSizeBox::ImplInit()
{
- EnableAutocomplete( sal_False );
+ EnableAutocomplete( false );
- bRelativeMode = sal_False;
- bPtRelative = sal_False;
- bRelative = sal_False;
- bStdSize = sal_False;
+ bRelativeMode = false;
+ bPtRelative = false;
+ bRelative = false;
+ bStdSize = false;
pFontList = NULL;
- SetShowTrailingZeros( sal_False );
+ SetShowTrailingZeros( false );
SetDecimalDigits( 1 );
SetMin( 20 );
SetMax( 9999 );
@@ -2500,24 +2500,24 @@ void FontSizeBox::Modify()
XubString aStr = GetText();
aStr.EraseLeadingChars();
- sal_Bool bNewMode = bRelative;
- sal_Bool bOldPtRelMode = bPtRelative;
+ bool bNewMode = bRelative;
+ bool bOldPtRelMode = bPtRelative;
if ( bRelative )
{
- bPtRelative = sal_False;
+ bPtRelative = false;
const xub_Unicode* pStr = aStr.GetBuffer();
while ( *pStr )
{
if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') )
{
if ( ('-' == *pStr || '+' == *pStr) && !bPtRelative )
- bPtRelative = sal_True;
+ bPtRelative = true;
else if ( bPtRelative && 'p' == *pStr && 't' == *++pStr )
;
else
{
- bNewMode = sal_False;
+ bNewMode = false;
break;
}
}
@@ -2528,14 +2528,14 @@ void FontSizeBox::Modify()
{
if ( STRING_NOTFOUND != aStr.Search( '%' ) )
{
- bNewMode = sal_True;
- bPtRelative = sal_False;
+ bNewMode = true;
+ bPtRelative = false;
}
if ( '-' == aStr.GetChar( 0 ) || '+' == aStr.GetChar( 0 ) )
{
- bNewMode = sal_True;
- bPtRelative = sal_True;
+ bNewMode = true;
+ bPtRelative = true;
}
}
@@ -2576,10 +2576,10 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
// for standard sizes we don't need to bother
if ( bStdSize && GetEntryCount() && aFontSizeNames.IsEmpty() )
return;
- bStdSize = sal_True;
+ bStdSize = true;
}
else
- bStdSize = sal_False;
+ bStdSize = false;
Selection aSelection = GetSelection();
XubString aStr = GetText();
@@ -2638,7 +2638,7 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
void FontSizeBox::EnableRelativeMode( sal_uInt16 nMin, sal_uInt16 nMax, sal_uInt16 nStep )
{
- bRelativeMode = sal_True;
+ bRelativeMode = true;
nRelMin = nMin;
nRelMax = nMax;
nRelStep = nStep;
@@ -2649,7 +2649,7 @@ void FontSizeBox::EnableRelativeMode( sal_uInt16 nMin, sal_uInt16 nMax,
sal_uInt
void FontSizeBox::EnablePtRelativeMode( short nMin, short nMax, short nStep )
{
- bRelativeMode = sal_True;
+ bRelativeMode = true;
nPtRelMin = nMin;
nPtRelMax = nMax;
nPtRelStep = nStep;
@@ -2658,7 +2658,7 @@ void FontSizeBox::EnablePtRelativeMode( short nMin, short nMax, short nStep )
// -----------------------------------------------------------------------
-void FontSizeBox::SetRelative( sal_Bool bNewRelative )
+void FontSizeBox::SetRelative( bool bNewRelative )
{
if ( bRelativeMode )
{
@@ -2668,8 +2668,8 @@ void FontSizeBox::SetRelative( sal_Bool bNewRelative )
if ( bNewRelative )
{
- bRelative = sal_True;
- bStdSize = sal_False;
+ bRelative = true;
+ bStdSize = false;
if ( bPtRelative )
{
@@ -2707,7 +2707,7 @@ void FontSizeBox::SetRelative( sal_Bool bNewRelative )
}
else
{
- bRelative = bPtRelative = sal_False;
+ bRelative = bPtRelative = false;
SetDecimalDigits( 1 );
SetMin( 20 );
SetMax( 9999 );
@@ -2747,7 +2747,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue, FieldUnit eInUnit )
mnLastValue = nTempValue;
SetText( aName );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( sal_False );
+ SetEmptyFieldValueData( false );
return;
}
}
Context
- [Libreoffice] [PATCH] sal_{Bool,True,False} to bool, true, false. · Kayo Hamid
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.