summaryrefslogtreecommitdiff
path: root/cui/source/options/fontsubs.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options/fontsubs.cxx')
-rw-r--r--cui/source/options/fontsubs.cxx66
1 files changed, 33 insertions, 33 deletions
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 418f8c6009b9..87a150288035 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -84,7 +84,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
aTextColor = aCheckLB.GetTextColor();
- for(USHORT k = 0; k < aNewDelTBX.GetItemCount(); k++)
+ for(sal_uInt16 k = 0; k < aNewDelTBX.GetItemCount(); k++)
aNewDelTBX.SetItemImage(aNewDelTBX.GetItemId(k),
aImageList.GetImage(aNewDelTBX.GetItemId(k)));
@@ -97,7 +97,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
aNewDelTBX.SetPosPixel( aNewPnt );
aCheckLB.SetHelpId(HID_OFA_FONT_SUBST_CLB);
- aCheckLB.SetWindowBits(aCheckLB.GetStyle()|WB_HSCROLL|WB_VSCROLL);
+ aCheckLB.SetStyle(aCheckLB.GetStyle()|WB_HSCROLL|WB_VSCROLL);
aCheckLB.SetSelectionMode(MULTIPLE_SELECTION);
aCheckLB.SortByCol(2);
@@ -144,7 +144,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
pBar->SetItemBits(1, nBits);
pBar->SetItemBits(2, nBits);
- USHORT nHeight;
+ sal_uInt16 nHeight;
for(nHeight = 6; nHeight <= 16; nHeight++)
aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
for(nHeight = 18; nHeight <= 28; nHeight+= 2)
@@ -209,7 +209,7 @@ SfxTabPage* SvxFontSubstTabPage::Create( Window* pParent,
/* */
/*********************************************************************/
-BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SvxFontSubstTabPage::FillItemSet( SfxItemSet& )
{
pConfig->ClearSubstitutions();// remove all entries
@@ -240,7 +240,7 @@ BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& )
sFontName = aFontNameLB.GetSelectEntry();
pSourceViewConfig->SetFontName(sFontName);
- return FALSE;
+ return sal_False;
}
/*********************************************************************/
@@ -250,7 +250,7 @@ BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& )
void SvxFontSubstTabPage::Reset( const SfxItemSet& )
{
- aCheckLB.SetUpdateMode(FALSE);
+ aCheckLB.SetUpdateMode(sal_False);
aCheckLB.Clear();
FontList aFntLst( Application::GetDefaultDevice() );
@@ -273,7 +273,7 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet& )
}
CheckEnable();
- aCheckLB.SetUpdateMode(TRUE);
+ aCheckLB.SetUpdateMode(sal_True);
//fill font name box first
aNonPropFontsOnlyCB.Check(pSourceViewConfig->IsShowProportionalFontsOnly());
@@ -300,7 +300,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin)
SvLBoxEntry* pEntry;
// nCol ist behaemmerterweise die nCol'te Textspalte, werden nicht gezaehlt!
// Daher als Spalte "0".
- ULONG nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0);
+ sal_uLong nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0);
switch (aNewDelTBX.GetCurItemId())
{
@@ -321,7 +321,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin)
pEntry = CreateEntry(sFont1, sFont2);
aCheckLB.Insert(pEntry);
}
- aCheckLB.SelectAll(FALSE);
+ aCheckLB.SelectAll(sal_False);
aCheckLB.Select(pEntry);
}
break;
@@ -356,7 +356,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin)
if (pWin == &aFont1CB)
{
- ULONG nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0);
+ sal_uLong nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0);
if (nPos != 0xffffffff)
{
@@ -364,7 +364,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin)
if (pEntry != aCheckLB.FirstSelected())
{
- aCheckLB.SelectAll(FALSE);
+ aCheckLB.SelectAll(sal_False);
aCheckLB.Select(pEntry);
}
}
@@ -379,12 +379,12 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin)
IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox)
{
String sFontName = aFontNameLB.GetSelectEntry();
- BOOL bNonPropOnly = pBox->IsChecked();
+ sal_Bool bNonPropOnly = pBox->IsChecked();
aFontNameLB.Clear();
FontList aFntLst( Application::GetDefaultDevice() );
aFontNameLB.InsertEntry(sAutomatic);
- USHORT nFontCount = aFntLst.GetFontNameCount();
- for(USHORT nFont = 0; nFont < nFontCount; nFont++)
+ sal_uInt16 nFontCount = aFntLst.GetFontNameCount();
+ for(sal_uInt16 nFont = 0; nFont < nFontCount; nFont++)
{
const FontInfo& rInfo = aFntLst.GetFontName( nFont );
if(!bNonPropOnly || rInfo.GetPitch() == PITCH_FIXED)
@@ -396,11 +396,11 @@ IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox)
void SvxFontSubstTabPage::CheckEnable()
{
- BOOL bEnableAll = aUseTableCB.IsChecked();
+ sal_Bool bEnableAll = aUseTableCB.IsChecked();
if (bEnableAll)
{
- BOOL bApply, bDelete;
+ sal_Bool bApply, bDelete;
SvLBoxEntry* pEntry = aCheckLB.FirstSelected();
@@ -410,15 +410,15 @@ void SvxFontSubstTabPage::CheckEnable()
// Wegen OS/2-Optimierungsfehler (Bug #56267) etwas umstaendlicher:
if (!aFont1CB.GetText().Len() || !aFont2CB.GetText().Len())
- bApply = FALSE;
+ bApply = sal_False;
else if(aFont1CB.GetText() == aFont2CB.GetText())
- bApply = FALSE;
+ bApply = sal_False;
else if(aCheckLB.GetEntryPos(sEntry) != 0xffffffff)
- bApply = FALSE;
+ bApply = sal_False;
else if(pEntry != 0 && aCheckLB.NextSelected(pEntry) != 0)
- bApply = FALSE;
+ bApply = sal_False;
else
- bApply = TRUE;
+ bApply = sal_True;
bDelete = pEntry != 0;
@@ -443,7 +443,7 @@ void SvxFontSubstTabPage::CheckEnable()
aCheckLB.DisableTable();
aCheckLB.SetTextColor(Color(COL_GRAY));
aCheckLB.Invalidate();
- aCheckLB.SelectAll(FALSE);
+ aCheckLB.SelectAll(sal_False);
}
}
aNewDelTBX.Enable(bEnableAll);
@@ -456,7 +456,7 @@ void SvxFontSubstTabPage::CheckEnable()
void SvxFontSubstCheckListBox::SetTabs()
{
SvxSimpleTable::SetTabs();
- USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE;
+ sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE;
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(1);
pTab->nFlags &= ~nAdjust;
@@ -472,8 +472,8 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt )
if(!rKEvt.GetKeyCode().GetModifier() &&
KEY_SPACE == rKEvt.GetKeyCode().GetCode())
{
- ULONG nSelPos = GetModel()->GetAbsPos(GetCurEntry());
- USHORT nCol = GetCurrentTabPos() - 1;
+ sal_uLong nSelPos = GetModel()->GetAbsPos(GetCurEntry());
+ sal_uInt16 nCol = GetCurrentTabPos() - 1;
if ( nCol < 2 )
{
CheckEntryPos( nSelPos, nCol, !IsChecked( nSelPos, nCol ) );
@@ -481,7 +481,7 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt )
}
else
{
- USHORT nCheck = IsChecked(nSelPos, 1) ? 1 : 0;
+ sal_uInt16 nCheck = IsChecked(nSelPos, 1) ? 1 : 0;
if(IsChecked(nSelPos, 0))
nCheck += 2;
nCheck--;
@@ -494,7 +494,7 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt )
SvxSimpleTable::KeyInput(rKEvt);
}
-void SvxFontSubstCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked)
+void SvxFontSubstCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked)
{
if ( nPos < GetEntryCount() )
SetCheckButtonState(
@@ -504,7 +504,7 @@ void SvxFontSubstCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChec
SvButtonState( SV_BUTTON_UNCHECKED ) );
}
-void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, USHORT nCol, BOOL bChecked)
+void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked)
{
if ( pEntry )
SetCheckButtonState(
@@ -514,17 +514,17 @@ void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, USHORT nCol, BOOL
SvButtonState( SV_BUTTON_UNCHECKED ) );
}
-BOOL SvxFontSubstCheckListBox::IsChecked(ULONG nPos, USHORT nCol)
+sal_Bool SvxFontSubstCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol)
{
return GetCheckButtonState( GetEntry(nPos), nCol ) == SV_BUTTON_CHECKED;
}
-BOOL SvxFontSubstCheckListBox::IsChecked(SvLBoxEntry* pEntry, USHORT nCol)
+sal_Bool SvxFontSubstCheckListBox::IsChecked(SvLBoxEntry* pEntry, sal_uInt16 nCol)
{
return GetCheckButtonState( pEntry, nCol ) == SV_BUTTON_CHECKED;
}
-void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol, SvButtonState eState)
+void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol, SvButtonState eState)
{
SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1));
@@ -549,7 +549,7 @@ void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT
}
}
-SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol ) const
+SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const
{
SvButtonState eState = SV_BUTTON_UNCHECKED;
SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1));
@@ -557,7 +557,7 @@ SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry
if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON)
{
- USHORT nButtonFlags = pItem->GetButtonFlags();
+ sal_uInt16 nButtonFlags = pItem->GetButtonFlags();
eState = pCheckButtonData->ConvertToButtonState( nButtonFlags );
}