summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-12-04 22:56:51 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-12-27 16:51:26 +0100
commit7d8919d2d54767d1e34d67129c9e4ae62a1707f3 (patch)
tree44349d6091f832c3b778cf4035b77bbf3adae837
parentfb46f61c51872ea85fb3d9f08cc44235bc8c2703 (diff)
sal_uLong/sal_uIntPtr for ScNumFormatAbbrev
Change-Id: I45f2a43fe4295e44691ab00c93af3fca41b1dcfa
-rw-r--r--basic/source/runtime/methods1.cxx2
-rw-r--r--sc/inc/zforauto.hxx6
-rw-r--r--sc/source/core/data/dputil.cxx2
-rw-r--r--sc/source/core/tool/zforauto.cxx6
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sw/source/filter/html/htmlfld.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx21
9 files changed, 22 insertions, 23 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 48ef752330af..1f386376a7fc 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -2539,7 +2539,7 @@ RTLFUNC(FormatDateTime)
}
LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType();
- sal_uIntPtr nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType );
+ const sal_uInt32 nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType );
Color* pCol;
pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol );
diff --git a/sc/inc/zforauto.hxx b/sc/inc/zforauto.hxx
index fe72450dc7f3..956daf108340 100644
--- a/sc/inc/zforauto.hxx
+++ b/sc/inc/zforauto.hxx
@@ -34,11 +34,11 @@ class ScNumFormatAbbrev
public:
ScNumFormatAbbrev();
ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat);
- ScNumFormatAbbrev(sal_uLong nFormat, SvNumberFormatter& rFormatter);
+ ScNumFormatAbbrev(sal_uInt32 nFormat, SvNumberFormatter& rFormatter);
void Load( SvStream& rStream, rtl_TextEncoding eByteStrSet ); // loading of the numberformats
void Save( SvStream& rStream, rtl_TextEncoding eByteStrSet ) const; // saving of the numberformats
- void PutFormatIndex(sal_uLong nFormat, SvNumberFormatter& rFormatter);
- sal_uLong GetFormatIndex( SvNumberFormatter& rFormatter);
+ void PutFormatIndex(sal_uInt32 nFormat, SvNumberFormatter& rFormatter);
+ sal_uInt32 GetFormatIndex( SvNumberFormatter& rFormatter);
inline bool operator==(const ScNumFormatAbbrev& rNumFormat) const
{
return ((sFormatstring == rNumFormat.sFormatstring)
diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx
index bdf59eebe3a6..93d79ed15a58 100644
--- a/sc/source/core/data/dputil.cxx
+++ b/sc/source/core/data/dputil.cxx
@@ -123,7 +123,7 @@ OUString ScDPUtil::getDateGroupName(
Date aNullDate = *pFormatter->GetNullDate();
long nDays = aDate - aNullDate;
- sal_uLong nFormat = pFormatter->GetFormatIndex(NF_DATE_SYS_DDMMM, ScGlobal::eLnge);
+ const sal_uInt32 nFormat = pFormatter->GetFormatIndex(NF_DATE_SYS_DDMMM, ScGlobal::eLnge);
Color* pColor;
OUString aStr;
pFormatter->GetOutputString(nDays, nFormat, aStr, &pColor);
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index bafd40bf4c32..e428cab8413d 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -39,7 +39,7 @@ ScNumFormatAbbrev::ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat) :
{
}
-ScNumFormatAbbrev::ScNumFormatAbbrev(sal_uLong nFormat,
+ScNumFormatAbbrev::ScNumFormatAbbrev(sal_uInt32 nFormat,
SvNumberFormatter& rFormatter)
{
PutFormatIndex(nFormat, rFormatter);
@@ -62,7 +62,7 @@ void ScNumFormatAbbrev::Save( SvStream& rStream, rtl_TextEncoding eByteStrSet )
rStream.WriteUInt16( eSysLnge ).WriteUInt16( eLnge );
}
-void ScNumFormatAbbrev::PutFormatIndex(sal_uLong nFormat,
+void ScNumFormatAbbrev::PutFormatIndex(sal_uInt32 nFormat,
SvNumberFormatter& rFormatter)
{
const SvNumberformat* pFormat = rFormatter.GetEntry(nFormat);
@@ -81,7 +81,7 @@ void ScNumFormatAbbrev::PutFormatIndex(sal_uLong nFormat,
}
}
-sal_uLong ScNumFormatAbbrev::GetFormatIndex( SvNumberFormatter& rFormatter)
+sal_uInt32 ScNumFormatAbbrev::GetFormatIndex( SvNumberFormatter& rFormatter)
{
short nType;
bool bNewInserted;
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 8dd2cc9e2767..7a911868a2a2 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -194,7 +194,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
OUString cellString;
bool bNumFormat = pCurData->GetIncludeValueFormat();
- sal_uLong nNum;
+ sal_uInt32 nNum;
double nVal;
Color* pDummy = nullptr;
sal_uInt16 nIndex = static_cast<sal_uInt16>(maArray.GetCellIndex(nCol, nRow, mbRTL));
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index b4930b16ceaa..b98e0d829bf1 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -323,7 +323,7 @@ void SwHTMLParser::NewField()
case RES_DATEFLD:
case RES_TIMEFLD:
{
- sal_uLong nNumFormat = 0;
+ sal_uInt32 nNumFormat = 0;
sal_Int64 nTime = tools::Time( tools::Time::SYSTEM ).GetTime();
sal_Int32 nDate = Date( Date::SYSTEM ).GetDate();
sal_uInt16 nSub = 0;
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 05a109bd381a..d04418b3b0d6 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -408,7 +408,7 @@ OUString GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, sal_uInt16
//Get the system date in the correct final language layout, convert to
//a known language and modify the 2 digit year part to be 4 digit, and
//convert back to the correct language layout.
- sal_uLong nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
+ const sal_uInt32 nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
SvNumberformat aFormat = const_cast<SvNumberformat &>
(*(pFormatter->GetEntry(nIndex)));
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index b768d058a69f..588a0e922dd2 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -802,7 +802,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
else
{
SvNumberFormatter* pFormatter = rWrtSh.GetNumberFormatter();
- sal_uLong nSysNumFormat = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
+ const sal_uInt32 nSysNumFormat = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
SwInsertField_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, OUString(), sFormula, nSysNumFormat);
aFieldMgr.InsertField(aData);
}
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index c41d255eb6a4..dc7d5eb4a118 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -212,21 +212,20 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
const SvNumberformat* pFormat;
sal_Int32 i = 0;
- sal_uLong nFormat;
Color* pCol;
double fVal = GetDefValue( nFormatType );
OUString sValue;
- sal_uLong nSysNumFormat = pFormatter->GetFormatIndex(
+ const sal_uInt32 nSysNumFormat = pFormatter->GetFormatIndex(
NF_NUMBER_SYSTEM, eCurLanguage );
- sal_uLong nSysShortDateFormat = pFormatter->GetFormatIndex(
+ const sal_uInt32 nSysShortDateFormat = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_SHORT, eCurLanguage );
- sal_uLong nSysLongDateFormat = pFormatter->GetFormatIndex(
+ const sal_uInt32 nSysLongDateFormat = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_LONG, eCurLanguage );
for( long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex )
{
- nFormat = pFormatter->GetFormatIndex(
+ const sal_uInt32 nFormat = pFormatter->GetFormatIndex(
(NfIndexTableOffset)nIndex, eCurLanguage );
pFormat = pFormatter->GetEntry( nFormat );
@@ -324,15 +323,15 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefaultFormat)
while (reinterpret_cast<sal_uLong>(GetEntryData(nPos)) == ULONG_MAX)
nPos++;
- sal_uLong nSysNumFormat = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
- sal_uLong nSysShortDateFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
- sal_uLong nSysLongDateFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
+ const sal_uInt32 nSysNumFormat = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
+ const sal_uInt32 nSysShortDateFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
+ const sal_uInt32 nSysLongDateFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
bool bSysLang = false;
if( eCurLanguage == GetAppLanguage() )
bSysLang = true;
- sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFormat, LANGUAGE_SYSTEM );
- sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFormat, LANGUAGE_SYSTEM );
- sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFormat, LANGUAGE_SYSTEM );
+ const sal_uInt32 nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFormat, LANGUAGE_SYSTEM );
+ const sal_uInt32 nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFormat, LANGUAGE_SYSTEM );
+ const sal_uInt32 nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFormat, LANGUAGE_SYSTEM );
if (
nDefaultFormat == nSysNumFormat ||