summaryrefslogtreecommitdiff
path: root/sw/source/ui/utlui/numfmtlb.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/utlui/numfmtlb.cxx')
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx80
1 files changed, 40 insertions, 40 deletions
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index b059c12a4a50..03b3d58ec5a7 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -71,17 +71,17 @@ using namespace ::com::sun::star::lang;
--------------------------------------------------------------------*/
NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
- short nFormatType, ULONG nDefFmt,
- BOOL bUsrFmts ) :
+ short nFormatType, sal_uLong nDefFmt,
+ sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (0),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
@@ -92,16 +92,16 @@ NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
const ResId& rResId, short nFormatType,
- ULONG nDefFmt, BOOL bUsrFmts ) :
+ sal_uLong nDefFmt, sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (pView),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
@@ -110,7 +110,7 @@ NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
*
* --------------------------------------------------*/
-void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
+void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts)
{
SwView *pView = GetView();
@@ -119,7 +119,7 @@ void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
else
eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
- if (bUsrFmts == FALSE)
+ if (bUsrFmts == sal_False)
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pOwnFormatter = new SvNumberFormatter(xMSF, eCurLanguage);
@@ -242,17 +242,17 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
}
const SvNumberformat* pFmt;
- USHORT nPos, i = 0;
- ULONG nFormat;
+ sal_uInt16 nPos, i = 0;
+ sal_uLong nFormat;
Color* pCol;
double fVal = GetDefValue( nFormatType );
String sValue;
- ULONG nSysNumFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex(
NF_NUMBER_SYSTEM, eCurLanguage );
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_SHORT, eCurLanguage );
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_LONG, eCurLanguage );
for( long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex )
@@ -302,7 +302,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
Beschreibung:
--------------------------------------------------------------------*/
-void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
+void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
{
if (nDefFmt == ULONG_MAX)
{
@@ -327,11 +327,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
SetFormatType(nType);
- ULONG nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
- for (USHORT i = 0; i < GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < GetEntryCount(); i++)
{
- if (nFormat == (ULONG)GetEntryData(i))
+ if (nFormat == (sal_uLong)GetEntryData(i))
{
SelectEntryPos(i);
nStdEntry = i;
@@ -353,20 +353,20 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
else
pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol);
- USHORT nPos = 0;
- while ((ULONG)GetEntryData(nPos) == ULONG_MAX)
+ sal_uInt16 nPos = 0;
+ while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX)
nPos++;
//
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
- BOOL bSysLang = FALSE;
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
+ sal_Bool bSysLang = sal_False;
if( eCurLanguage == GetAppLanguage() )
- bSysLang = TRUE;
- ULONG nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
- ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
- ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
+ bSysLang = sal_True;
+ sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
+ sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
+ sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
if (
nDefFmt == nSysNumFmt ||
@@ -395,11 +395,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
Beschreibung:
--------------------------------------------------------------------*/
-ULONG NumFormatListBox::GetFormat() const
+sal_uLong NumFormatListBox::GetFormat() const
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
- return (ULONG)GetEntryData(nPos);
+ return (sal_uLong)GetEntryData(nPos);
}
/*--------------------------------------------------------------------
@@ -408,7 +408,7 @@ ULONG NumFormatListBox::GetFormat() const
IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
- USHORT nPos = pBox->GetSelectEntryPos();
+ sal_uInt16 nPos = pBox->GetSelectEntryPos();
String sDefine(SW_RES( STR_DEFINE_NUMBERFORMAT ));
SwView *pView = GetView();
@@ -428,7 +428,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
double fValue = GetDefValue( nCurrFormatType);
- ULONG nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, nFormat ));
aCoreSet.Put( SvxNumberInfoItem( pFormatter, fValue,
@@ -457,15 +457,15 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)pItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
pFormatter->DeleteEntry( pDelArr[i] );
}
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
if( SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pItem ))
{
- UINT32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
+ sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
// oj #105473# change order of calls
const SvNumberformat* pFmt = pFormatter->GetEntry(nNumberFormat);
if( pFmt )
@@ -474,7 +474,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
SetDefFormat(nNumberFormat);
}
if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_ADD_AUTO, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_ADD_AUTO, sal_False, &pItem ))
{
bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue();
}
@@ -507,7 +507,7 @@ double NumFormatListBox::GetDefValue(const short nFormatType) const
break;
/* {
String sValue("31.8.1997 16:57:34");
- ULONG nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
+ sal_uLong nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
pFormatter->IsNumberFormat( sValue, nFormat, fDefValue );
}
break;*/