summaryrefslogtreecommitdiff
path: root/svtools/source/control/stdmenu.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/control/stdmenu.cxx')
-rwxr-xr-xsvtools/source/control/stdmenu.cxx100
1 files changed, 50 insertions, 50 deletions
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index 9df32d74fc59..94c15a8604d2 100755
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -76,13 +76,13 @@ void FontNameMenu::Fill( const FontList* pList )
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
// more than 100 fonts reduces the speed of opening the menu.
// So only the first 100 fonts will be displayed.
- USHORT nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< USHORT >(100) );
- for ( USHORT i = 0; i < nFontCount; i++ )
+ sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) );
+ for ( sal_uInt16 i = 0; i < nFontCount; i++ )
{
const XubString& rName = pList->GetFontName( i ).GetName();
// sort with the I18nHelper
- USHORT j = GetItemCount();
+ sal_uInt16 j = GetItemCount();
while ( j )
{
XubString aText = GetItemText( GetItemId( j-1 ) );
@@ -103,11 +103,11 @@ void FontNameMenu::SetCurName( const XubString& rName )
maCurName = rName;
// Menueintrag checken
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( IsItemChecked( nItemId ) )
nChecked = nItemId;
@@ -115,13 +115,13 @@ void FontNameMenu::SetCurName( const XubString& rName )
XubString aText = GetItemText( nItemId );
if ( aText == maCurName )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}
// ========================================================================
@@ -141,7 +141,7 @@ FontStyleMenu::~FontStyleMenu()
void FontStyleMenu::Select()
{
- USHORT nCurId = GetCurItemId();
+ sal_uInt16 nCurId = GetCurItemId();
if ( (nCurId >= FONTSTYLEMENU_FIRSTID) && (nCurId <= FONTSTYLEMENU_LASTID) )
{
@@ -156,7 +156,7 @@ void FontStyleMenu::Select()
void FontStyleMenu::Highlight()
{
- USHORT nCurId = GetCurItemId();
+ sal_uInt16 nCurId = GetCurItemId();
if ( (nCurId >= FONTSTYLEMENU_FIRSTID) && (nCurId <= FONTSTYLEMENU_LASTID) )
{
@@ -171,22 +171,22 @@ void FontStyleMenu::Highlight()
// -----------------------------------------------------------------------
-BOOL FontStyleMenu::ImplIsAlreadyInserted( const XubString& rStyleName, USHORT nCount )
+sal_Bool FontStyleMenu::ImplIsAlreadyInserted( const XubString& rStyleName, sal_uInt16 nCount )
{
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
if ( GetItemText( i+FONTSTYLEMENU_FIRSTID ) == rStyleName )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
{
- USHORT nItemId = GetItemId( 0 );
+ sal_uInt16 nItemId = GetItemId( 0 );
while ( (nItemId >= FONTSTYLEMENU_FIRSTID) &&
(nItemId <= FONTSTYLEMENU_LASTID) )
{
@@ -199,16 +199,16 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
if ( hFontInfo )
{
XubString aStyleText;
- USHORT nPos = 0;
- USHORT nId = FONTSTYLEMENU_FIRSTID;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nId = FONTSTYLEMENU_FIRSTID;
FontWeight eLastWeight = WEIGHT_DONTKNOW;
FontItalic eLastItalic = ITALIC_NONE;
FontWidth eLastWidth = WIDTH_DONTKNOW;
- BOOL bNormal = FALSE;
- BOOL bItalic = FALSE;
- BOOL bBold = FALSE;
- BOOL bBoldItalic = FALSE;
- BOOL bInsert = FALSE;
+ 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;
FontInfo aInfo;
while ( hFontInfo )
{
@@ -233,16 +233,16 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
if ( eWeight <= WEIGHT_NORMAL )
{
if ( eItalic != ITALIC_NONE )
- bItalic = TRUE;
+ bItalic = sal_True;
else
- bNormal = TRUE;
+ bNormal = sal_True;
}
else
{
if ( eItalic != ITALIC_NONE )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
else
- bBold = TRUE;
+ bBold = sal_True;
}
// For wrong StyleNames we replace this with the correct once
@@ -276,11 +276,11 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
}
if ( !bItalic && (aStyleText == pList->GetItalicStr()) )
- bItalic = TRUE;
+ bItalic = sal_True;
else if ( !bBold && (aStyleText == pList->GetBoldStr()) )
- bBold = TRUE;
+ bBold = sal_True;
else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
hFontInfo = pList->GetNextFontInfo( hFontInfo );
}
@@ -345,11 +345,11 @@ void FontStyleMenu::SetCurStyle( const XubString& rStyle )
maCurStyle = rStyle;
// Menueintrag checken
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( (nItemId < FONTSTYLEMENU_FIRSTID) ||
(nItemId > FONTSTYLEMENU_LASTID) )
@@ -361,13 +361,13 @@ void FontStyleMenu::SetCurStyle( const XubString& rStyle )
XubString aText = GetItemText( nItemId );
if ( aText == maCurStyle )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}
// ========================================================================
@@ -391,7 +391,7 @@ FontSizeMenu::~FontSizeMenu()
void FontSizeMenu::Select()
{
- const USHORT nCurItemId = GetCurItemId();
+ const sal_uInt16 nCurItemId = GetCurItemId();
mnCurHeight = mpHeightAry[ nCurItemId - 1 ];
maSelectHdl.Call( this );
}
@@ -401,7 +401,7 @@ void FontSizeMenu::Select()
void FontSizeMenu::Highlight()
{
const long nTempHeight = mnCurHeight;
- const USHORT nCurItemId = GetCurItemId();
+ const sal_uInt16 nCurItemId = GetCurItemId();
if ( !nCurItemId )
mnCurHeight = 0;
else
@@ -425,11 +425,11 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
const long* pTempAry;
const long* pAry = pList->GetSizeAry( rInfo );
- USHORT nSizeCount = 0;
+ sal_uInt16 nSizeCount = 0;
while ( pAry[nSizeCount] )
nSizeCount++;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
// first insert font size names (for simplified/traditional chinese)
FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguage() );
@@ -439,8 +439,8 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
if ( pAry == pList->GetStdSizeAry() )
{
// for scalable fonts all font size names
- ULONG nCount = aFontSizeNames.Count();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = aFontSizeNames.Count();
+ for( sal_uLong i = 0; i < nCount; i++ )
{
String aSizeName = aFontSizeNames.GetIndexName( i );
long nSize = aFontSizeNames.GetIndexSize( i );
@@ -474,7 +474,7 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
{
mpHeightAry[nPos] = *pTempAry;
nPos++; // Id is nPos+1
- InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, TRUE, FALSE ), MIB_RADIOCHECK | MIB_AUTOCHECK );
+ InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK );
pTempAry++;
}
@@ -488,16 +488,16 @@ void FontSizeMenu::SetCurHeight( long nHeight )
mnCurHeight = nHeight;
// check menue item
- XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE );
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False );
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( mpHeightAry[i] == nHeight )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
@@ -506,5 +506,5 @@ void FontSizeMenu::SetCurHeight( long nHeight )
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}