summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-25 09:49:59 +0200
committerNoel Grandin <noel@peralex.com>2015-02-25 10:34:27 +0200
commit2f928b2d0982af44b3d45f1d3c8919c0b0655b4f (patch)
tree36468544d70101f2fc3a49a59b2f9d40df10e61f /sc/source/ui/view
parent3e475e574ee7ac8753bf50732f62bea5d36791a5 (diff)
remove NUMBERFORMAT_ constants
.. in favour of just using the underlying constants from css::util::NumberFormat Change-Id: I0c6b128b66c91b268f5ae300f9c17c7792df5e99
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/cellsh1.cxx8
-rw-r--r--sc/source/ui/view/cellsh2.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx138
-rw-r--r--sc/source/ui/view/viewfun6.cxx52
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
6 files changed, 104 insertions, 104 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 72d072e39265..c2968bdd10d6 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -628,7 +628,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
{
short nPrivType = pPrivEntry->GetType();
- if ( ( nPrivType & NUMBERFORMAT_DATE)>0)
+ if ( ( nPrivType & css::util::NumberFormat::DATE)>0)
{
eFillCmd=FILL_DATE;
}
@@ -770,7 +770,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
rReq.AppendItem( SfxStringItem( FN_PARAM_2, aPara ) );
- sal_uLong nFormatKey = pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER,
+ sal_uLong nFormatKey = pFormatter->GetStandardFormat(css::util::NumberFormat::NUMBER,
ScGlobal::eLnge );
pFormatter->GetOutputString( fIncVal, nFormatKey, aPara, &pColor );
@@ -1679,11 +1679,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
break;
case SID_INSERT_CURRENT_DATE:
pTabViewShell->InsertCurrentTime(
- NUMBERFORMAT_DATE, ScGlobal::GetRscString(STR_UNDO_INSERT_CURRENT_DATE));
+ css::util::NumberFormat::DATE, ScGlobal::GetRscString(STR_UNDO_INSERT_CURRENT_DATE));
break;
case SID_INSERT_CURRENT_TIME:
pTabViewShell->InsertCurrentTime(
- NUMBERFORMAT_TIME, ScGlobal::GetRscString(STR_UNDO_INSERT_CURRENT_TIME));
+ css::util::NumberFormat::TIME, ScGlobal::GetRscString(STR_UNDO_INSERT_CURRENT_TIME));
break;
case SID_SPELL_DIALOG:
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 29ddff4e69b2..187e5291d59e 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -815,8 +815,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
sal_uLong nNumFmt = 0;
if ( eMode == SC_VALID_DATE || eMode == SC_VALID_TIME )
{
- short nType = ( eMode == SC_VALID_DATE ) ? NUMBERFORMAT_DATE
- : NUMBERFORMAT_TIME;
+ short nType = ( eMode == SC_VALID_DATE ) ? css::util::NumberFormat::DATE
+ : css::util::NumberFormat::TIME;
nNumFmt = pDoc->GetFormatTable()->GetStandardFormat(
nType, ScGlobal::eLnge );
}
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 7f1d88b2e4e8..e05dab480b3e 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -827,7 +827,7 @@ bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
sal_uLong nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr(
nSelCol, nSelRow, nSelTab, ATTR_VALUE_FORMAT))->GetValue();
short nType = pDoc->GetFormatTable()->GetType(nIndex);
- if ( nType == NUMBERFORMAT_DATE || nType == NUMBERFORMAT_TIME || nType == NUMBERFORMAT_DATETIME )
+ if ( nType == css::util::NumberFormat::DATE || nType == css::util::NumberFormat::TIME || nType == css::util::NumberFormat::DATETIME )
{
bFound = true;
// use currently selected value for automatic limits
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 48a4a27022a6..842fdcea5f43 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1021,56 +1021,56 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
switch ( nSlot )
{
case SID_NUMBER_TWODEC:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER, 4 ); // Standard+4 = #.##0,00
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER, 4 ); // Standard+4 = #.##0,00
rReq.Done();
break;
case SID_NUMBER_SCIENTIFIC:
- if ((nType & NUMBERFORMAT_SCIENTIFIC))
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER );
+ if ((nType & css::util::NumberFormat::SCIENTIFIC))
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
else
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_SCIENTIFIC );
- aSet.Put( SfxBoolItem(nSlot, !(nType & NUMBERFORMAT_SCIENTIFIC)) );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::SCIENTIFIC );
+ aSet.Put( SfxBoolItem(nSlot, !(nType & css::util::NumberFormat::SCIENTIFIC)) );
rBindings.Invalidate( nSlot );
rReq.Done();
break;
case SID_NUMBER_DATE:
- if ((nType & NUMBERFORMAT_DATE))
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER );
+ if ((nType & css::util::NumberFormat::DATE))
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
else
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_DATE );
- aSet.Put( SfxBoolItem(nSlot, !(nType & NUMBERFORMAT_DATE)) );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::DATE );
+ aSet.Put( SfxBoolItem(nSlot, !(nType & css::util::NumberFormat::DATE)) );
rBindings.Invalidate( nSlot );
rReq.Done();
break;
case SID_NUMBER_TIME:
- if ((nType & NUMBERFORMAT_TIME))
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER );
+ if ((nType & css::util::NumberFormat::TIME))
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
else
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_TIME );
- aSet.Put( SfxBoolItem(nSlot, !(nType & NUMBERFORMAT_TIME)) );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::TIME );
+ aSet.Put( SfxBoolItem(nSlot, !(nType & css::util::NumberFormat::TIME)) );
rBindings.Invalidate( nSlot );
rReq.Done();
break;
case SID_NUMBER_CURRENCY:
- if ((nType & NUMBERFORMAT_CURRENCY))
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER );
+ if ((nType & css::util::NumberFormat::CURRENCY))
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
else
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_CURRENCY );
- aSet.Put( SfxBoolItem(nSlot, !(nType & NUMBERFORMAT_CURRENCY)) );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::CURRENCY );
+ aSet.Put( SfxBoolItem(nSlot, !(nType & css::util::NumberFormat::CURRENCY)) );
rBindings.Invalidate( nSlot );
rReq.Done();
break;
case SID_NUMBER_PERCENT:
- if ((nType & NUMBERFORMAT_PERCENT))
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER );
+ if ((nType & css::util::NumberFormat::PERCENT))
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
else
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_PERCENT );
- aSet.Put( SfxBoolItem(nSlot, !(nType & NUMBERFORMAT_PERCENT)) );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::PERCENT );
+ aSet.Put( SfxBoolItem(nSlot, !(nType & css::util::NumberFormat::PERCENT)) );
rBindings.Invalidate( nSlot );
rReq.Done();
break;
case SID_NUMBER_STANDARD:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
rReq.Done();
break;
case SID_NUMBER_INCDEC:
@@ -1116,15 +1116,15 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
//In sidebar, users can fire SID_NUMBER_FORMAT command by operating the related UI controls before they are disable
switch(eType)
{
- case NUMBERFORMAT_ALL:
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_NUMBER| NUMBERFORMAT_DEFINED:
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_PERCENT| NUMBERFORMAT_DEFINED:
- case NUMBERFORMAT_CURRENCY:
- case NUMBERFORMAT_CURRENCY|NUMBERFORMAT_DEFINED:
- case NUMBERFORMAT_SCIENTIFIC:
- case NUMBERFORMAT_SCIENTIFIC|NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::ALL:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::NUMBER| css::util::NumberFormat::DEFINED:
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::PERCENT| css::util::NumberFormat::DEFINED:
+ case css::util::NumberFormat::CURRENCY:
+ case css::util::NumberFormat::CURRENCY|css::util::NumberFormat::DEFINED:
+ case css::util::NumberFormat::SCIENTIFIC:
+ case css::util::NumberFormat::SCIENTIFIC|css::util::NumberFormat::DEFINED:
eType = 0;
break;
default:
@@ -1208,34 +1208,34 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
switch(nFormat)
{
case 0:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER); //Modify
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER); //Modify
break;
case 1:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER, 2 ); //Modify
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER, 2 ); //Modify
break;
case 2:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_PERCENT );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::PERCENT );
break;
case 3:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_CURRENCY );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::CURRENCY );
break;
case 4:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_DATE );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::DATE );
break;
case 5:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_TIME );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::TIME );
break;
case 6:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_SCIENTIFIC );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::SCIENTIFIC );
break;
case 7:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_FRACTION );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::FRACTION );
break;
case 8:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_LOGICAL );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::LOGICAL );
break;
case 9:
- pTabViewShell->SetNumberFormat( NUMBERFORMAT_TEXT );
+ pTabViewShell->SetNumberFormat( css::util::NumberFormat::TEXT );
break;
default:
;
@@ -2466,8 +2466,8 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
switch(aFormatCode)
{
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_NUMBER| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::NUMBER| css::util::NumberFormat::DEFINED:
//use format code and standard format code to judge whether it is General,
//if (nNumberFormat == nStandardNumberFormat)
if (bStandard)
@@ -2475,39 +2475,39 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
else
aFormatCode = 1;
break;
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_PERCENT| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::PERCENT| css::util::NumberFormat::DEFINED:
aFormatCode = 2;
break;
- case NUMBERFORMAT_CURRENCY:
- case NUMBERFORMAT_CURRENCY| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::CURRENCY:
+ case css::util::NumberFormat::CURRENCY| css::util::NumberFormat::DEFINED:
aFormatCode = 3;
break;
- case NUMBERFORMAT_DATE:
- case NUMBERFORMAT_DATE| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::DATE:
+ case css::util::NumberFormat::DATE| css::util::NumberFormat::DEFINED:
//Add
- case NUMBERFORMAT_DATETIME:
- case NUMBERFORMAT_DATETIME | NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::DATETIME:
+ case css::util::NumberFormat::DATETIME | css::util::NumberFormat::DEFINED:
aFormatCode = 4;
break;
- case NUMBERFORMAT_TIME:
- case NUMBERFORMAT_TIME| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::TIME:
+ case css::util::NumberFormat::TIME| css::util::NumberFormat::DEFINED:
aFormatCode = 5;
break;
- case NUMBERFORMAT_SCIENTIFIC:
- case NUMBERFORMAT_SCIENTIFIC| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::SCIENTIFIC:
+ case css::util::NumberFormat::SCIENTIFIC| css::util::NumberFormat::DEFINED:
aFormatCode = 6;
break;
- case NUMBERFORMAT_FRACTION:
- case NUMBERFORMAT_FRACTION| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::FRACTION:
+ case css::util::NumberFormat::FRACTION| css::util::NumberFormat::DEFINED:
aFormatCode = 7;
break;
- case NUMBERFORMAT_LOGICAL:
- case NUMBERFORMAT_LOGICAL| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::LOGICAL:
+ case css::util::NumberFormat::LOGICAL| css::util::NumberFormat::DEFINED:
aFormatCode = 8;
break;
- case NUMBERFORMAT_TEXT:
- case NUMBERFORMAT_TEXT| NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::TEXT:
+ case css::util::NumberFormat::TEXT| css::util::NumberFormat::DEFINED:
aFormatCode = 9;
break;
default:
@@ -2526,19 +2526,19 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
}
break;
case SID_NUMBER_SCIENTIFIC:
- rSet.Put( SfxBoolItem(nWhich, (nType & NUMBERFORMAT_SCIENTIFIC)) );
+ rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::SCIENTIFIC)) );
break;
case SID_NUMBER_DATE:
- rSet.Put( SfxBoolItem(nWhich, (nType & NUMBERFORMAT_DATE)) );
+ rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::DATE)) );
break;
case SID_NUMBER_CURRENCY:
- rSet.Put( SfxBoolItem(nWhich, (nType & NUMBERFORMAT_CURRENCY)) );
+ rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::CURRENCY)) );
break;
case SID_NUMBER_PERCENT:
- rSet.Put( SfxBoolItem(nWhich, (nType & NUMBERFORMAT_PERCENT)) );
+ rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::PERCENT)) );
break;
case SID_NUMBER_TIME:
- rSet.Put( SfxBoolItem(nWhich, (nType & NUMBERFORMAT_TIME)) );
+ rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::TIME)) );
break;
}
nWhich = aIter.NextWhich();
@@ -2694,7 +2694,7 @@ void ScFormatShell::StateFormatPaintbrush( SfxItemSet& rSet )
short ScFormatShell::GetCurrentNumberFormatType()
{
- short nType = NUMBERFORMAT_ALL;
+ short nType = css::util::NumberFormat::ALL;
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData aMark(GetViewData()->GetMarkData());
const SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
@@ -2714,7 +2714,7 @@ short ScFormatShell::GetCurrentNumberFormatType()
if (!pArray)
return nType;
- short nComboType = NUMBERFORMAT_ALL;
+ short nComboType = css::util::NumberFormat::ALL;
bool bFirstItem = true;
for (SCCOL nCol = aRange.aStart.Col(); nCol <= aRange.aEnd.Col(); ++nCol)
{
@@ -2741,7 +2741,7 @@ short ScFormatShell::GetCurrentNumberFormatType()
}
else if (nComboType != nThisType)
// mixed number format type.
- return NUMBERFORMAT_ALL;
+ return css::util::NumberFormat::ALL;
}
}
nType = nComboType;
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 6842fbc4048d..20db7b000d52 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -268,7 +268,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
const SvNumberformat* pCurNumFormatEntry = pFormatter->GetEntry(nCurNumFormat);
const short nCurNumFormatType = (pCurNumFormatEntry ?
- (pCurNumFormatEntry->GetType() & ~NUMBERFORMAT_DEFINED) : NUMBERFORMAT_UNDEFINED);
+ (pCurNumFormatEntry->GetType() & ~css::util::NumberFormat::DEFINED) : css::util::NumberFormat::UNDEFINED);
if (bInputMode)
{
@@ -276,31 +276,31 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
sal_uInt32 nFormat = 0;
switch (nReqFmt)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
{
Date aActDate( Date::SYSTEM );
fVal = aActDate - *pFormatter->GetNullDate();
- if (nCurNumFormatType == NUMBERFORMAT_DATE)
+ if (nCurNumFormatType == css::util::NumberFormat::DATE)
nFormat = nCurNumFormat;
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
{
tools::Time aActTime( tools::Time::SYSTEM );
fVal = aActTime.GetTimeInDays();
- if (nCurNumFormatType == NUMBERFORMAT_TIME)
+ if (nCurNumFormatType == css::util::NumberFormat::TIME)
nFormat = nCurNumFormat;
}
break;
default:
assert(!"unhandled current date/time request");
- nReqFmt = NUMBERFORMAT_DATETIME;
+ nReqFmt = css::util::NumberFormat::DATETIME;
// fallthru
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
{
DateTime aActDateTime( DateTime::SYSTEM );
fVal = aActDateTime - DateTime( *pFormatter->GetNullDate());
- if (nCurNumFormatType == NUMBERFORMAT_DATETIME)
+ if (nCurNumFormatType == css::util::NumberFormat::DATETIME)
nFormat = nCurNumFormat;
}
break;
@@ -334,17 +334,17 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
// Combine requested date/time stamp with existing cell time/date, if any.
switch (nReqFmt)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
switch (nCurNumFormatType)
{
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
// An empty cell formatted as time (or 00:00 time) shall
// not result in the current date with 00:00 time, but only
// in current date.
if (fCell != 0.0)
- nReqFmt = NUMBERFORMAT_DATETIME;
+ nReqFmt = css::util::NumberFormat::DATETIME;
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
{
// Force to only date if the existing date+time is the
// current date. This way inserting current date twice
@@ -358,20 +358,20 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
break;
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
switch (nCurNumFormatType)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
// An empty cell formatted as date shall not result in the
// null date and current time, but only in current time.
if (fCell != 0.0)
- nReqFmt = NUMBERFORMAT_DATETIME;
+ nReqFmt = css::util::NumberFormat::DATETIME;
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
// Requesting current time on an empty date+time cell
// inserts both current date+time.
if (fCell == 0.0)
- nReqFmt = NUMBERFORMAT_DATETIME;
+ nReqFmt = css::util::NumberFormat::DATETIME;
else
{
// Add current time to an existing date+time where time is
@@ -379,7 +379,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
double fDate = rtl::math::approxFloor( fCell);
double fTime = fCell - fDate;
if (fTime == 0.0 && fDate == (Date( Date::SYSTEM) - *pFormatter->GetNullDate()))
- nReqFmt = NUMBERFORMAT_DATETIME;
+ nReqFmt = css::util::NumberFormat::DATETIME;
else
bForceReqFmt = true;
}
@@ -388,37 +388,37 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
break;
default:
assert(!"unhandled current date/time request");
- nReqFmt = NUMBERFORMAT_DATETIME;
+ nReqFmt = css::util::NumberFormat::DATETIME;
// fallthru
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
break;
}
double fVal = 0.0;
switch (nReqFmt)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
{
Date aActDate( Date::SYSTEM );
fVal = aActDate - *pFormatter->GetNullDate();
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
{
tools::Time aActTime( tools::Time::SYSTEM );
fVal = aActTime.GetTimeInDays();
}
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
switch (nCurNumFormatType)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
{
double fDate = rtl::math::approxFloor( fCell);
tools::Time aActTime( tools::Time::SYSTEM );
fVal = fDate + aActTime.GetTimeInDays();
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
{
double fTime = fCell - rtl::math::approxFloor( fCell);
Date aActDate( Date::SYSTEM );
@@ -445,7 +445,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
// Set the new cell format only when it differs from the current cell
// format type. Preserve a date+time format unless we force a format
// through.
- if (bForceReqFmt || (nReqFmt != nCurNumFormatType && nCurNumFormatType != NUMBERFORMAT_DATETIME))
+ if (bForceReqFmt || (nReqFmt != nCurNumFormatType && nCurNumFormatType != css::util::NumberFormat::DATETIME))
SetNumberFormat(nReqFmt);
else
rViewData.UpdateInputHandler(); // update input bar with new value
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index d213846bb96a..9e0e1f9ee2e1 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -513,7 +513,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
aPos.SetTab( i );
sal_uLong nIndex = (sal_uLong) static_cast<const SfxUInt32Item*>( pDoc->GetAttr(
nCol, nRow, i, ATTR_VALUE_FORMAT ))->GetValue();
- if ( pFormatter->GetType( nIndex ) == NUMBERFORMAT_TEXT ||
+ if ( pFormatter->GetType( nIndex ) == css::util::NumberFormat::TEXT ||
( ( rString[0] == '+' || rString[0] == '-' ) && nError && rString == aFormula ) )
{
if ( pData )
@@ -2504,7 +2504,7 @@ void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement )
short nOldType = pOldEntry->GetType();
if ( 0 == ( nOldType & (
- NUMBERFORMAT_NUMBER | NUMBERFORMAT_CURRENCY | NUMBERFORMAT_PERCENT | NUMBERFORMAT_SCIENTIFIC ) ) )
+ css::util::NumberFormat::NUMBER | css::util::NumberFormat::CURRENCY | css::util::NumberFormat::PERCENT | css::util::NumberFormat::SCIENTIFIC ) ) )
{
// date, time, fraction, logical, text can not be changed
bError = true;