summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/runtime/methods.cxx8
-rw-r--r--basic/source/runtime/runtime.cxx2
-rw-r--r--basic/source/sbx/sbxdate.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx18
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx6
-rw-r--r--cui/source/options/optupdt.cxx4
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--editeng/source/items/flditem.cxx4
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx2
-rw-r--r--extensions/source/propctrlr/usercontrol.cxx26
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx28
-rw-r--r--include/svl/zforlist.hxx25
-rw-r--r--include/svl/zformat.hxx8
-rw-r--r--sc/source/core/data/clipcontext.cxx2
-rw-r--r--sc/source/core/data/column.cxx2
-rw-r--r--sc/source/core/data/column3.cxx14
-rw-r--r--sc/source/core/data/dbdocutl.cxx10
-rw-r--r--sc/source/core/data/dociter.cxx10
-rw-r--r--sc/source/core/data/documen4.cxx8
-rw-r--r--sc/source/core/data/document.cxx6
-rw-r--r--sc/source/core/data/dpcache.cxx4
-rw-r--r--sc/source/core/data/dpobject.cxx10
-rw-r--r--sc/source/core/data/dputil.cxx4
-rw-r--r--sc/source/core/data/formulacell.cxx20
-rw-r--r--sc/source/core/data/stlsheet.cxx2
-rw-r--r--sc/source/core/data/table3.cxx6
-rw-r--r--sc/source/core/data/table4.cxx2
-rw-r--r--sc/source/core/tool/chartpos.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx6
-rw-r--r--sc/source/core/tool/interpr1.cxx72
-rw-r--r--sc/source/core/tool/interpr2.cxx56
-rw-r--r--sc/source/core/tool/interpr4.cxx54
-rw-r--r--sc/source/core/tool/interpr5.cxx64
-rw-r--r--sc/source/core/tool/interpr6.cxx18
-rw-r--r--sc/source/core/tool/scmatrix.cxx4
-rw-r--r--sc/source/filter/dif/difimp.cxx2
-rw-r--r--sc/source/filter/excel/xelink.cxx2
-rw-r--r--sc/source/filter/excel/xepivot.cxx4
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
-rw-r--r--sc/source/filter/excel/xetable.cxx18
-rw-r--r--sc/source/filter/excel/xipivot.cxx6
-rw-r--r--sc/source/filter/excel/xistyle.cxx2
-rw-r--r--sc/source/filter/lotus/tool.cxx42
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx2
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx2
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx8
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx10
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx10
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx8
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx4
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx8
-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
-rw-r--r--svl/qa/unit/svl.cxx4
-rw-r--r--svl/source/numbers/numfmuno.cxx6
-rw-r--r--svl/source/numbers/zforfind.cxx250
-rw-r--r--svl/source/numbers/zforlist.cxx180
-rw-r--r--svl/source/numbers/zformat.cxx72
-rw-r--r--svl/source/numbers/zforscan.cxx180
-rw-r--r--svtools/source/control/fmtfield.cxx8
-rw-r--r--svx/source/items/numfmtsh.cxx98
-rw-r--r--sw/inc/cellatr.hxx2
-rw-r--r--sw/source/core/doc/docsort.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx2
-rw-r--r--sw/source/core/edit/edtab.cxx2
-rw-r--r--sw/source/core/fields/cellfml.cxx6
-rw-r--r--sw/source/core/fields/fldbas.cxx6
-rw-r--r--sw/source/core/table/swtable.cxx22
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx4
-rw-r--r--sw/source/filter/html/htmlfld.cxx4
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx22
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx2
-rw-r--r--sw/source/filter/xml/xmltble.cxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx4
-rw-r--r--sw/source/ui/fldui/flddinf.cxx16
-rw-r--r--sw/source/ui/fldui/flddok.cxx6
-rw-r--r--sw/source/ui/fldui/fldvar.cxx4
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx6
-rw-r--r--sw/source/uibase/shells/tabsh.cxx14
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx48
-rw-r--r--uui/source/iahndl-ssl.cxx4
-rw-r--r--xmloff/source/style/xmlnumfe.cxx62
-rw-r--r--xmloff/source/style/xmlnumfi.cxx2
93 files changed, 946 insertions, 963 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index a86a74383ee6..713611c245d4 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2159,9 +2159,9 @@ RTLFUNC(DateValue)
nType = aFormatter.GetType( nIndex );
}
- if(bSuccess && (nType==NUMBERFORMAT_DATE || nType==NUMBERFORMAT_DATETIME))
+ if(bSuccess && (nType==css::util::NumberFormat::DATE || nType==css::util::NumberFormat::DATETIME))
{
- if ( nType == NUMBERFORMAT_DATETIME )
+ if ( nType == css::util::NumberFormat::DATETIME )
{
// cut time
if ( fResult > 0.0 )
@@ -2212,9 +2212,9 @@ RTLFUNC(TimeValue)
bool bSuccess = pFormatter->IsNumberFormat( rPar.Get(1)->GetOUString(),
nIndex, fResult );
short nType = pFormatter->GetType(nIndex);
- if(bSuccess && (nType==NUMBERFORMAT_TIME||nType==NUMBERFORMAT_DATETIME))
+ if(bSuccess && (nType==css::util::NumberFormat::TIME||nType==css::util::NumberFormat::DATETIME))
{
- if ( nType == NUMBERFORMAT_DATETIME )
+ if ( nType == css::util::NumberFormat::DATETIME )
{
// cut days
fResult = fmod( fResult, 1 );
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 21d1cb809d99..0334521a0f7d 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -417,7 +417,7 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter,
rpNumberFormatter = new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType );
sal_Int32 nCheckPos = 0; short nType;
- rnStdTimeIdx = rpNumberFormatter->GetStandardFormat( NUMBERFORMAT_TIME, eLangType );
+ rnStdTimeIdx = rpNumberFormatter->GetStandardFormat( css::util::NumberFormat::TIME, eLangType );
// the formatter's standard templates have only got a two-digit date
// -> registering an own format
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 5f0bcca909fc..7b5df4957353 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -134,8 +134,8 @@ double ImpGetDate( const SbxValues* p )
if ( bSuccess )
{
short nType_ = pFormatter->GetType( nIndex );
- if(!(nType_ & ( NUMBERFORMAT_DATETIME | NUMBERFORMAT_DATE |
- NUMBERFORMAT_TIME | NUMBERFORMAT_DEFINED )))
+ if(!(nType_ & ( css::util::NumberFormat::DATETIME | css::util::NumberFormat::DATE |
+ css::util::NumberFormat::TIME | css::util::NumberFormat::DEFINED )))
{
bSuccess = false;
}
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index 6b22257cfb08..bb92e78c095d 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -393,11 +393,11 @@ int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
bool bDateAxis = chart2::AxisType::DATE == m_nAxisType;
sal_uInt32 nMinMaxOriginFmt = m_pFmtFldMax->GetFormatKey();
- if ((pNumFormatter->GetType(nMinMaxOriginFmt) &~ NUMBERFORMAT_DEFINED) == NUMBERFORMAT_TEXT)
+ if ((pNumFormatter->GetType(nMinMaxOriginFmt) & ~css::util::NumberFormat::DEFINED) == css::util::NumberFormat::TEXT)
nMinMaxOriginFmt = 0;
// numberformat_text cause numbers to fail being numbers... Shouldn't happen, but can.
sal_uInt32 nStepFmt = m_pFmtFldStepMain->GetFormatKey();
- if ((pNumFormatter->GetType(nStepFmt) &~NUMBERFORMAT_DEFINED) == NUMBERFORMAT_TEXT)
+ if ((pNumFormatter->GetType(nStepFmt) & ~css::util::NumberFormat::DEFINED) == css::util::NumberFormat::TEXT)
nStepFmt = 0;
Control* pControl = NULL;
@@ -536,7 +536,7 @@ void ScaleTabPage::SetNumFormat()
if( pNumFormatter )
{
short eType = pNumFormatter->GetType( nFmt );
- if( eType == NUMBERFORMAT_DATE )
+ if( eType == css::util::NumberFormat::DATE )
{
// for intervals use standard format for dates (so you can enter a number of days)
const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt );
@@ -545,23 +545,23 @@ void ScaleTabPage::SetNumFormat()
else
nFmt = pNumFormatter->GetStandardIndex();
}
- else if( eType == NUMBERFORMAT_DATETIME )
+ else if( eType == css::util::NumberFormat::DATETIME )
{
// for intervals use time format for date times
const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt );
if( pFormat )
- nFmt = pNumFormatter->GetStandardFormat( NUMBERFORMAT_TIME, pFormat->GetLanguage() );
+ nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::TIME, pFormat->GetLanguage() );
else
- nFmt = pNumFormatter->GetStandardFormat( NUMBERFORMAT_TIME );
+ nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::TIME );
}
- if( chart2::AxisType::DATE == m_nAxisType && ( eType != NUMBERFORMAT_DATE && eType != NUMBERFORMAT_DATETIME) )
+ if( chart2::AxisType::DATE == m_nAxisType && ( eType != css::util::NumberFormat::DATE && eType != css::util::NumberFormat::DATETIME) )
{
const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt );
if( pFormat )
- nFmt = pNumFormatter->GetStandardFormat( NUMBERFORMAT_DATE, pFormat->GetLanguage() );
+ nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::DATE, pFormat->GetLanguage() );
else
- nFmt = pNumFormatter->GetStandardFormat( NUMBERFORMAT_DATE );
+ nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::DATE );
m_pFmtFldMax->SetFormatKey( nFmt );
m_pFmtFldMin->SetFormatKey( nFmt );
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index b1335b91aa9c..7ca90d61c0bd 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -353,15 +353,15 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,
{
switch (comphelper::getNumberFormatType(m_xNumberFormatter,nIndex))
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
io_nType = DataType::DATE;
o_sTypeName = "DATE";
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
io_nType = DataType::TIMESTAMP;
o_sTypeName = "TIMESTAMP";
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
io_nType = DataType::TIME;
o_sTypeName = "TIME";
break;
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 3a7c6715b2dc..e44e76006484 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -123,11 +123,11 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
SvNumberFormatter *pNumberFormatter = new SvNumberFormatter( ::comphelper::getProcessComponentContext(), eUILang );
Color* pColor = NULL;
Date* pNullDate = pNumberFormatter->GetNullDate();
- sal_uInt32 nFormat = pNumberFormatter->GetStandardFormat( NUMBERFORMAT_DATE, eUILang );
+ sal_uInt32 nFormat = pNumberFormatter->GetStandardFormat( css::util::NumberFormat::DATE, eUILang );
pNumberFormatter->GetOutputString( aDate - *pNullDate, nFormat, aDateStr, &pColor );
- nFormat = pNumberFormatter->GetStandardFormat( NUMBERFORMAT_TIME, eUILang );
+ nFormat = pNumberFormatter->GetStandardFormat( css::util::NumberFormat::TIME, eUILang );
pNumberFormatter->GetOutputString( aTime.GetTimeInDays(), nFormat, aTimeStr, &pColor );
delete pColor;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index ed5fb08aa3a5..f83050cfb427 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -838,7 +838,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent,
pFormatDescriptor->Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, true));
if (!_pFormatter->IsTextFormat(_nFormatKey))
// text fields can only have text formats
- _nFormatKey = _pFormatter->GetStandardFormat(NUMBERFORMAT_TEXT,_pParent->GetSettings().GetLanguageTag().getLanguageType());
+ _nFormatKey = _pFormatter->GetStandardFormat(css::util::NumberFormat::TEXT,_pParent->GetSettings().GetLanguageTag().getLanguageType());
}
pFormatDescriptor->Put(SfxUInt32Item(SBA_DEF_FMTVALUE, _nFormatKey));
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 9155c27ef3aa..7371b6cadc2c 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -499,7 +499,7 @@ OUString SvxDateField::GetFormatted( Date& aDate, SvxDateFormat eFormat, SvNumbe
nFormatKey = rFormatter.GetFormatIndex( NF_DATE_SYS_NNNNDMMMMYYYY, eLang );
break;
default:
- nFormatKey = rFormatter.GetStandardFormat( NUMBERFORMAT_DATE, eLang );
+ nFormatKey = rFormatter.GetStandardFormat( css::util::NumberFormat::DATE, eLang );
}
double fDiffDate = aDate - *(rFormatter.GetNullDate());
@@ -915,7 +915,7 @@ OUString SvxExtTimeField::GetFormatted( tools::Time& aTime, SvxTimeFormat eForma
break;
case SVXTIMEFORMAT_STANDARD:
default:
- nFormatKey = rFormatter.GetStandardFormat( NUMBERFORMAT_TIME, eLang );
+ nFormatKey = rFormatter.GetStandardFormat( css::util::NumberFormat::TIME, eLang );
}
double fFracTime = aTime.GetTimeInDays();
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index cb542967eef0..bb789216efac 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -261,7 +261,7 @@ namespace pcr
getTypedControlWindow()->SetFormatter( getTypedControlWindow()->StandardFormatter() );
SvNumberFormatter* pFormatter = getTypedControlWindow()->GetFormatter();
- sal_uLong nStandardDateTimeFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATETIME, eSysLanguage );
+ sal_uLong nStandardDateTimeFormat = pFormatter->GetStandardFormat( css::util::NumberFormat::DATETIME, eSysLanguage );
getTypedControlWindow()->SetFormatKey( nStandardDateTimeFormat );
}
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index 783e43c84a49..0c42e18dee02 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -118,17 +118,17 @@ namespace pcr
double OFormatSampleControl::getPreviewValue( const SvNumberformat& i_rEntry )
{
double nValue = 1234.56789;
- switch ( i_rEntry.GetType() & ~NUMBERFORMAT_DEFINED )
+ switch ( i_rEntry.GetType() & ~css::util::NumberFormat::DEFINED )
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
{
Date aCurrentDate( Date::SYSTEM );
static ::com::sun::star::util::Date STANDARD_DB_DATE(30,12,1899);
nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(static_cast<sal_Int32>(aCurrentDate.GetDate())),STANDARD_DB_DATE);
}
break;
- case NUMBERFORMAT_TIME:
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::TIME:
+ case css::util::NumberFormat::DATETIME:
{
tools::Time aCurrentTime( tools::Time::SYSTEM );
nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime()));
@@ -225,18 +225,18 @@ namespace pcr
DBG_ASSERT( pEntry, "OFormattedNumericControl::SetFormatDescription: invalid format key!" );
if ( pEntry )
{
- switch (pEntry->GetType() & ~NUMBERFORMAT_DEFINED)
+ switch (pEntry->GetType() & ~css::util::NumberFormat::DEFINED)
{
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_CURRENCY:
- case NUMBERFORMAT_SCIENTIFIC:
- case NUMBERFORMAT_FRACTION:
- case NUMBERFORMAT_PERCENT:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::CURRENCY:
+ case css::util::NumberFormat::SCIENTIFIC:
+ case css::util::NumberFormat::FRACTION:
+ case css::util::NumberFormat::PERCENT:
m_nLastDecimalDigits = getTypedControlWindow()->GetDecimalDigits();
break;
- case NUMBERFORMAT_DATETIME:
- case NUMBERFORMAT_DATE:
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::DATETIME:
+ case css::util::NumberFormat::DATE:
+ case css::util::NumberFormat::TIME:
m_nLastDecimalDigits = 7;
break;
default:
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 98bec75ac22b..f81a97bc0821 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -83,15 +83,15 @@ short lcl_GetRetFormat( OpCode eOpCode )
case ocIsEven:
case ocIsOdd:
case ocExact:
- return NUMBERFORMAT_LOGICAL;
+ return css::util::NumberFormat::LOGICAL;
case ocGetActDate:
case ocGetDate:
case ocEasterSunday :
- return NUMBERFORMAT_DATE;
+ return css::util::NumberFormat::DATE;
case ocGetActTime:
- return NUMBERFORMAT_DATETIME;
+ return css::util::NumberFormat::DATETIME;
case ocGetTime:
- return NUMBERFORMAT_TIME;
+ return css::util::NumberFormat::TIME;
case ocNPV:
case ocPV:
case ocSYD:
@@ -105,7 +105,7 @@ short lcl_GetRetFormat( OpCode eOpCode )
case ocPpmt:
case ocCumIpmt:
case ocCumPrinc:
- return NUMBERFORMAT_CURRENCY;
+ return css::util::NumberFormat::CURRENCY;
case ocRate:
case ocIRR:
case ocMIRR:
@@ -113,9 +113,9 @@ short lcl_GetRetFormat( OpCode eOpCode )
case ocEffective:
case ocNominal:
case ocPercentSign:
- return NUMBERFORMAT_PERCENT;
+ return css::util::NumberFormat::PERCENT;
default:
- return NUMBERFORMAT_NUMBER;
+ return css::util::NumberFormat::NUMBER;
}
}
@@ -532,7 +532,7 @@ FormulaCompiler::FormulaCompiler( FormulaTokenArray& rArr )
pStack( NULL ),
eLastOp( ocPush ),
nRecursion( 0 ),
- nNumFmt( NUMBERFORMAT_UNDEFINED ),
+ nNumFmt( css::util::NumberFormat::UNDEFINED ),
pc( 0 ),
meGrammar( formula::FormulaGrammar::GRAM_UNSPECIFIED ),
bAutoCorrect( false ),
@@ -550,7 +550,7 @@ FormulaCompiler::FormulaCompiler()
pStack( NULL ),
eLastOp( ocPush ),
nRecursion(0),
- nNumFmt( NUMBERFORMAT_UNDEFINED ),
+ nNumFmt( css::util::NumberFormat::UNDEFINED ),
pc( 0 ),
meGrammar( formula::FormulaGrammar::GRAM_UNSPECIFIED ),
bAutoCorrect( false ),
@@ -1174,7 +1174,7 @@ void FormulaCompiler::Factor()
}
else
{
- if( nNumFmt == NUMBERFORMAT_UNDEFINED )
+ if( nNumFmt == css::util::NumberFormat::UNDEFINED )
nNumFmt = lcl_GetRetFormat( eOp );
if ( IsOpCodeVolatile( eOp) )
@@ -1238,8 +1238,8 @@ void FormulaCompiler::Factor()
{
pFacToken = mpToken;
eOp = NextToken();
- if( nNumFmt == NUMBERFORMAT_UNDEFINED && eOp == ocNot )
- nNumFmt = NUMBERFORMAT_LOGICAL;
+ if( nNumFmt == css::util::NumberFormat::UNDEFINED && eOp == ocNot )
+ nNumFmt = css::util::NumberFormat::LOGICAL;
if (eOp == ocOpen)
{
NextToken();
@@ -1688,8 +1688,8 @@ bool FormulaCompiler::CompileTokenArray()
if ( bWasForced )
pArr->SetRecalcModeForced();
}
- if( nNumFmt == NUMBERFORMAT_UNDEFINED )
- nNumFmt = NUMBERFORMAT_NUMBER;
+ if( nNumFmt == css::util::NumberFormat::UNDEFINED )
+ nNumFmt = css::util::NumberFormat::NUMBER;
return glSubTotal;
}
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 4683f1d9bbdc..f9a116b26f70 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -26,6 +26,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/i18n/NumberFormatCode.hpp>
+#include <com/sun/star/util/NumberFormat.hpp>
#include <unotools/localedatawrapper.hxx>
#include <unotools/numberformatcodewrapper.hxx>
#include <tools/link.hxx>
@@ -53,24 +54,6 @@ namespace com { namespace sun { namespace star {
#define SV_COUNTRY_LANGUAGE_OFFSET 10000 // Max count of formats per country/language
#define SV_MAX_ANZ_STANDARD_FORMATE 100 // Max count of builtin default formats per CL
-// Format types
-#ifndef NUMBERFORMAT_ALL
-// also defined in com/sun/star/util/NumberFormat.hpp
-//! => put in single .idl file and include here
-#define NUMBERFORMAT_ALL 0x000 /// Just for Output of total list, not a real format type
-#define NUMBERFORMAT_DEFINED 0x001 /// Format defined by user
-#define NUMBERFORMAT_DATE 0x002 /// Number as date
-#define NUMBERFORMAT_TIME 0x004 /// Number as time
-#define NUMBERFORMAT_CURRENCY 0x008 /// Number as currency
-#define NUMBERFORMAT_NUMBER 0x010 /// Any "normal" number format
-#define NUMBERFORMAT_SCIENTIFIC 0x020 /// Number as scientific
-#define NUMBERFORMAT_FRACTION 0x040 /// Number as fraction
-#define NUMBERFORMAT_PERCENT 0x080 /// Number as percent
-#define NUMBERFORMAT_TEXT 0x100 /// Text format
-#define NUMBERFORMAT_DATETIME 0x006 /// Number as date and time
-#define NUMBERFORMAT_LOGICAL 0x400 /// Number as boolean value
-#define NUMBERFORMAT_UNDEFINED 0x800 /// Format undefined yet in analyzing
-#endif
#define NUMBERFORMAT_ENTRY_NOT_FOUND (sal_uInt32)(0xffffffff) /// MAX_ULONG
@@ -597,8 +580,8 @@ public:
sal_uInt16 GetStandardPrec();
/// Return whether zero suppression is switched on
bool GetNoZero();
- /** Get the type of a format (or NUMBERFORMAT_UNDEFINED if no entry),
- but with NUMBERFORMAT_DEFINED masked out */
+ /** Get the type of a format (or css::util::NumberFormat::UNDEFINED if no entry),
+ but with css::util::NumberFormat::DEFINED masked out */
short GetType(sal_uInt32 nFIndex);
/// As the name says
@@ -720,7 +703,7 @@ public:
sal_uInt16 GetCurrencyFormatStrings( NfWSStringsDtor&, const NfCurrencyEntry&,
bool bBank ) const;
- /** Whether nFormat is of type NUMBERFORMAT_CURRENCY and the format code
+ /** Whether nFormat is of type css::util::NumberFormat::CURRENCY and the format code
contains a new SYMBOLTYPE_CURRENCY and if so which one [$xxx-nnn].
If ppEntry is not NULL and exactly one entry is found, a [$xxx-nnn] is
returned, even if the format code only contains [$xxx] !
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 631a20b58ffd..e6d4bf908561 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -179,7 +179,7 @@ public:
~SvNumberformat();
- /// Get type of format, may include NUMBERFORMAT_DEFINED bit
+ /// Get type of format, may include css::util::NumberFormat::DEFINED bit
short GetType() const { return eType; }
void SetType(const short eSetType) { eType = eSetType; }
@@ -215,12 +215,12 @@ public:
bool GetOutputString( const OUString& sString, OUString& OutString, Color** ppColor );
// True if type text
- bool IsTextFormat() const { return (eType & NUMBERFORMAT_TEXT) != 0; }
+ bool IsTextFormat() const { return (eType & css::util::NumberFormat::TEXT) != 0; }
// True if 4th subformat present
bool HasTextFormat() const
{
return (NumFor[3].GetCount() > 0) ||
- (NumFor[3].Info().eScannedType == NUMBERFORMAT_TEXT);
+ (NumFor[3].Info().eScannedType == css::util::NumberFormat::TEXT);
}
void GetFormatSpecialInfo(bool& bThousand,
@@ -316,7 +316,7 @@ public:
bool bQuoteSymbol );
// If a new SYMBOLTYPE_CURRENCY is contained if the format is of type
- // NUMBERFORMAT_CURRENCY, and if so the symbol xxx and the extension nnn
+ // css::util::NumberFormat::CURRENCY, and if so the symbol xxx and the extension nnn
// of [$xxx-nnn] are returned
bool GetNewCurrencySymbol( OUString& rSymbol, OUString& rExtension ) const;
diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx
index 654bad7e1e9d..9988a483c3fe 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ b/sc/source/core/data/clipcontext.cxx
@@ -323,7 +323,7 @@ bool CopyFromClipContext::isDateCell( const ScColumn& rCol, SCROW nRow ) const
{
sal_uLong nNumIndex = static_cast<const SfxUInt32Item*>(rCol.GetAttr(nRow, ATTR_VALUE_FORMAT))->GetValue();
short nType = mpClipDoc->GetFormatTable()->GetType(nNumIndex);
- return (nType == NUMBERFORMAT_DATE) || (nType == NUMBERFORMAT_TIME) || (nType == NUMBERFORMAT_DATETIME);
+ return (nType == css::util::NumberFormat::DATE) || (nType == css::util::NumberFormat::TIME) || (nType == css::util::NumberFormat::DATETIME);
}
CopyToClipContext::CopyToClipContext(
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 111b2549ee27..ab7cd69c17d5 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1225,7 +1225,7 @@ bool canCopyValue(const ScDocument& rDoc, const ScAddress& rPos, InsertDeleteFla
{
sal_uInt32 nNumIndex = static_cast<const SfxUInt32Item*>(rDoc.GetAttr(rPos, ATTR_VALUE_FORMAT))->GetValue();
short nType = rDoc.GetFormatTable()->GetType(nNumIndex);
- 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))
return ((nFlags & IDF_DATETIME) != IDF_NONE);
return (nFlags & IDF_VALUE) != IDF_NONE;
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index b8c99c54fe59..4c0bf2a51249 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1588,7 +1588,7 @@ namespace {
void applyTextNumFormat( ScColumn& rCol, SCROW nRow, SvNumberFormatter* pFormatter )
{
- sal_uInt32 nFormat = pFormatter->GetStandardFormat(NUMBERFORMAT_TEXT);
+ sal_uInt32 nFormat = pFormatter->GetStandardFormat(css::util::NumberFormat::TEXT);
ScPatternAttr aNewAttrs(rCol.GetDoc().GetPool());
SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
@@ -1620,7 +1620,7 @@ bool ScColumn::ParseString(
nIndex = nOldIndex = GetNumberFormat( nRow );
if ( rString.getLength() > 1
- && aParam.mpNumFormatter->GetType(nIndex) != NUMBERFORMAT_TEXT )
+ && aParam.mpNumFormatter->GetType(nIndex) != css::util::NumberFormat::TEXT )
cFirstChar = rString[0];
else
cFirstChar = 0; // Text
@@ -1690,9 +1690,9 @@ bool ScColumn::ParseString(
bool bOverwrite = false;
if ( pOldFormat )
{
- short nOldType = pOldFormat->GetType() & ~NUMBERFORMAT_DEFINED;
- if ( nOldType == NUMBERFORMAT_NUMBER || nOldType == NUMBERFORMAT_DATE ||
- nOldType == NUMBERFORMAT_TIME || nOldType == NUMBERFORMAT_LOGICAL )
+ short nOldType = pOldFormat->GetType() & ~css::util::NumberFormat::DEFINED;
+ if ( nOldType == css::util::NumberFormat::NUMBER || nOldType == css::util::NumberFormat::DATE ||
+ nOldType == css::util::NumberFormat::TIME || nOldType == css::util::NumberFormat::LOGICAL )
{
if ( nOldIndex == aParam.mpNumFormatter->GetStandardFormat(
nOldType, pOldFormat->GetLanguage() ) )
@@ -1701,7 +1701,7 @@ bool ScColumn::ParseString(
}
}
}
- if ( !bOverwrite && aParam.mpNumFormatter->GetType( nIndex ) == NUMBERFORMAT_LOGICAL )
+ if ( !bOverwrite && aParam.mpNumFormatter->GetType( nIndex ) == css::util::NumberFormat::LOGICAL )
{
bOverwrite = true; // overwrite anything if boolean was detected
}
@@ -2013,7 +2013,7 @@ class FilterEntriesHandler
short nType = pFormatter->GetType(nFormat);
bool bDate = false;
- if ((nType & NUMBERFORMAT_DATE) && !(nType & NUMBERFORMAT_TIME))
+ if ((nType & css::util::NumberFormat::DATE) && !(nType & css::util::NumberFormat::TIME))
{
// special case for date values. Disregard the time
// element if the number format is of date type.
diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx
index 5d51fe813dfa..caf30c8446f8 100644
--- a/sc/source/core/data/dbdocutl.cxx
+++ b/sc/source/core/data/dbdocutl.cxx
@@ -56,7 +56,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
case sdbc::DataType::BOOLEAN:
//TODO: use language from doc (here, date/time and currency)?
nFormatIndex = pDoc->GetFormatTable()->GetStandardFormat(
- NUMBERFORMAT_LOGICAL, ScGlobal::eLnge );
+ css::util::NumberFormat::LOGICAL, ScGlobal::eLnge );
nVal = (xRow->getBoolean(nRowPos) ? 1 : 0);
bEmptyFlag = ( nVal == 0.0 ) && xRow->wasNull();
bValue = true;
@@ -88,7 +88,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
{
SvNumberFormatter* pFormTable = pDoc->GetFormatTable();
nFormatIndex = pFormTable->GetStandardFormat(
- NUMBERFORMAT_DATE, ScGlobal::eLnge );
+ css::util::NumberFormat::DATE, ScGlobal::eLnge );
util::Date aDate = xRow->getDate(nRowPos);
nVal = Date( aDate.Day, aDate.Month, aDate.Year ) -
@@ -102,7 +102,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
{
SvNumberFormatter* pFormTable = pDoc->GetFormatTable();
nFormatIndex = pFormTable->GetStandardFormat(
- NUMBERFORMAT_TIME, ScGlobal::eLnge );
+ css::util::NumberFormat::TIME, ScGlobal::eLnge );
util::Time aTime = xRow->getTime(nRowPos);
nVal = aTime.Hours / static_cast<double>(::tools::Time::hourPerDay) +
@@ -118,7 +118,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
{
SvNumberFormatter* pFormTable = pDoc->GetFormatTable();
nFormatIndex = pFormTable->GetStandardFormat(
- NUMBERFORMAT_DATETIME, ScGlobal::eLnge );
+ css::util::NumberFormat::DATETIME, ScGlobal::eLnge );
util::DateTime aStamp = xRow->getTimestamp(nRowPos);
nVal = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) -
@@ -150,7 +150,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
if ( bValue && bCurrency )
nFormatIndex = pDoc->GetFormatTable()->GetStandardFormat(
- NUMBERFORMAT_CURRENCY, ScGlobal::eLnge );
+ css::util::NumberFormat::CURRENCY, ScGlobal::eLnge );
ScAddress aPos(nCol, nRow, nTab);
if (bEmptyFlag)
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 168f9294c223..77cf69379ea9 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -109,7 +109,7 @@ ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
, mnTab(0)
, nAttrEndRow(0)
, mnSubTotalFlags(nSubTotalFlags)
- , nNumFmtType(NUMBERFORMAT_UNDEFINED)
+ , nNumFmtType(css::util::NumberFormat::UNDEFINED)
, bNumValid(false)
, bCalcAsShown(pDocument->GetDocOptions().IsCalcAsShown())
, bTextAsZero(bTextZero)
@@ -253,7 +253,7 @@ bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
{
rErr = 0;
rValue = 0.0;
- nNumFmtType = NUMBERFORMAT_NUMBER;
+ nNumFmtType = css::util::NumberFormat::NUMBER;
nNumFmtIndex = 0;
bNumValid = true;
return true;
@@ -427,7 +427,7 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
nAttrEndRow, pNewAttrArray, nRow, mpDoc );
rValue.mfValue = mpDoc->RoundValueAsShown( rValue.mfValue, nNumFormat );
}
- nNumFmtType = NUMBERFORMAT_NUMBER;
+ nNumFmtType = css::util::NumberFormat::NUMBER;
nNumFmtIndex = 0;
rValue.mnError = 0;
return true; // Found it!
@@ -2109,7 +2109,7 @@ ScHorizontalValueIterator::ScHorizontalValueIterator( ScDocument* pDocument,
pDoc( pDocument ),
nNumFmtIndex(0),
nEndTab( rRange.aEnd.Tab() ),
- nNumFmtType( NUMBERFORMAT_UNDEFINED ),
+ nNumFmtType( css::util::NumberFormat::UNDEFINED ),
bNumValid( false ),
bCalcAsShown( pDocument->GetDocOptions().IsCalcAsShown() ),
bTextAsZero( bTextZero )
@@ -2204,7 +2204,7 @@ bool ScHorizontalValueIterator::GetNext( double& rValue, sal_uInt16& rErr )
{
rErr = 0;
rValue = 0.0;
- nNumFmtType = NUMBERFORMAT_NUMBER;
+ nNumFmtType = css::util::NumberFormat::NUMBER;
nNumFmtIndex = 0;
bNumValid = true;
bFound = true;
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 01667c30e653..6d0c89d8cab5 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -655,8 +655,8 @@ bool ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
double ScDocument::RoundValueAsShown( double fVal, sal_uInt32 nFormat ) const
{
short nType;
- if ( (nType = GetFormatTable()->GetType( nFormat )) != NUMBERFORMAT_DATE
- && nType != NUMBERFORMAT_TIME && nType != NUMBERFORMAT_DATETIME )
+ if ( (nType = GetFormatTable()->GetType( nFormat )) != css::util::NumberFormat::DATE
+ && nType != css::util::NumberFormat::TIME && nType != css::util::NumberFormat::DATETIME )
{
short nPrecision;
if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0)
@@ -664,10 +664,10 @@ double ScDocument::RoundValueAsShown( double fVal, sal_uInt32 nFormat ) const
nPrecision = (short)GetFormatTable()->GetFormatPrecision( nFormat );
switch ( nType )
{
- case NUMBERFORMAT_PERCENT: // 0.41% == 0.0041
+ case css::util::NumberFormat::PERCENT: // 0.41% == 0.0041
nPrecision += 2;
break;
- case NUMBERFORMAT_SCIENTIFIC: // 1.23e-3 == 0.00123
+ case css::util::NumberFormat::SCIENTIFIC: // 1.23e-3 == 0.00123
{
if ( fVal > 0.0 )
nPrecision = sal::static_int_cast<short>( nPrecision - (short)floor( log10( fVal ) ) );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 9e099efc3aa8..e964f2a625af 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3412,7 +3412,7 @@ sal_uInt16 ScDocument::GetStringForFormula( const ScAddress& rPos, OUString& rSt
{
double fVal = pFCell->GetValue();
sal_uInt32 nIndex = pFormatter->GetStandardFormat(
- NUMBERFORMAT_NUMBER,
+ css::util::NumberFormat::NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, aStr);
}
@@ -3424,7 +3424,7 @@ sal_uInt16 ScDocument::GetStringForFormula( const ScAddress& rPos, OUString& rSt
{
double fVal = aCell.mfValue;
sal_uInt32 nIndex = pFormatter->GetStandardFormat(
- NUMBERFORMAT_NUMBER,
+ css::util::NumberFormat::NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, aStr);
}
@@ -3541,7 +3541,7 @@ void ScDocument::GetNumberFormatInfo( short& nType, sal_uLong& nIndex,
}
else
{
- nType = NUMBERFORMAT_UNDEFINED;
+ nType = css::util::NumberFormat::UNDEFINED;
nIndex = 0;
}
}
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index c6e81621e78c..77a28480969e 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -415,7 +415,7 @@ bool ScDPCache::InitFromDataBase(DBConnector& rDB)
SCROW nRow = 0;
do
{
- short nFormatType = NUMBERFORMAT_UNDEFINED;
+ short nFormatType = css::util::NumberFormat::UNDEFINED;
aData.SetEmpty();
rDB.getValue(nCol, aData, nFormatType);
aBuckets.push_back(Bucket(aData, 0, nRow));
@@ -884,7 +884,7 @@ bool ScDPCache::IsDateDimension( long nDim ) const
return false;
short eType = pFormatter->GetType(maFields[nDim].mnNumFormat);
- return (eType == NUMBERFORMAT_DATE) || (eType == NUMBERFORMAT_DATETIME);
+ return (eType == css::util::NumberFormat::DATE) || (eType == css::util::NumberFormat::DATETIME);
}
long ScDPCache::GetDimMemberCount(long nDim) const
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index ed402a2f968c..5e9fd6893839 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -173,7 +173,7 @@ OUString DBConnector::getColumnLabel(long nCol) const
void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) const
{
- rNumType = NUMBERFORMAT_NUMBER;
+ rNumType = css::util::NumberFormat::NUMBER;
sal_Int32 nType = mxMetaData->getColumnType(nCol+1);
try
@@ -184,7 +184,7 @@ void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) cons
case sdbc::DataType::BIT:
case sdbc::DataType::BOOLEAN:
{
- rNumType = NUMBERFORMAT_LOGICAL;
+ rNumType = css::util::NumberFormat::LOGICAL;
fValue = mxRow->getBoolean(nCol+1) ? 1 : 0;
rData.SetValue(fValue);
break;
@@ -206,7 +206,7 @@ void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) cons
}
case sdbc::DataType::DATE:
{
- rNumType = NUMBERFORMAT_DATE;
+ rNumType = css::util::NumberFormat::DATE;
util::Date aDate = mxRow->getDate(nCol+1);
fValue = Date(aDate.Day, aDate.Month, aDate.Year) - maNullDate;
@@ -215,7 +215,7 @@ void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) cons
}
case sdbc::DataType::TIME:
{
- rNumType = NUMBERFORMAT_TIME;
+ rNumType = css::util::NumberFormat::TIME;
util::Time aTime = mxRow->getTime(nCol+1);
fValue = aTime.Hours / static_cast<double>(::tools::Time::hourPerDay) +
@@ -227,7 +227,7 @@ void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) cons
}
case sdbc::DataType::TIMESTAMP:
{
- rNumType = NUMBERFORMAT_DATETIME;
+ rNumType = css::util::NumberFormat::DATETIME;
util::DateTime aStamp = mxRow->getTimestamp(nCol+1);
fValue = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - maNullDate ) +
diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx
index c8a18e9e2827..9e857cc0c848 100644
--- a/sc/source/core/data/dputil.cxx
+++ b/sc/source/core/data/dputil.cxx
@@ -39,7 +39,7 @@ OUString getTwoDigitString(sal_Int32 nValue)
void appendDateStr(OUStringBuffer& rBuffer, double fValue, SvNumberFormatter* pFormatter)
{
- sal_uLong nFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATE, ScGlobal::eLnge );
+ sal_uLong nFormat = pFormatter->GetStandardFormat( css::util::NumberFormat::DATE, ScGlobal::eLnge );
OUString aString;
pFormatter->GetInputLineString(fValue, nFormat, aString);
rBuffer.append(aString);
@@ -195,7 +195,7 @@ namespace {
void lcl_AppendDateStr( OUStringBuffer& rBuffer, double fValue, SvNumberFormatter* pFormatter )
{
- sal_uLong nFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATE, ScGlobal::eLnge );
+ sal_uLong nFormat = pFormatter->GetStandardFormat( css::util::NumberFormat::DATE, ScGlobal::eLnge );
OUString aString;
pFormatter->GetInputLineString( fValue, nFormat, aString );
rBuffer.append( aString );
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 2d3522d5dacd..d4bba7d6bfd4 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -454,7 +454,7 @@ ScFormulaCellGroup::ScFormulaCellGroup() :
mpCompiledFormula(NULL),
mpTopCell(NULL),
mnLength(0),
- mnFormatType(NUMBERFORMAT_NUMBER),
+ mnFormatType(css::util::NumberFormat::NUMBER),
mbInvariant(false),
mbSubTotal(false),
meCalcState(sc::GroupCalcEnabled),
@@ -595,7 +595,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos ) :
pPreviousTrack(0),
pNextTrack(0),
nSeenInIteration(0),
- nFormatType(NUMBERFORMAT_NUMBER),
+ nFormatType(css::util::NumberFormat::NUMBER),
cMatrixFlag(MM_NONE),
bDirty(false),
bChanged(false),
@@ -625,7 +625,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
pPreviousTrack(0),
pNextTrack(0),
nSeenInIteration(0),
- nFormatType ( NUMBERFORMAT_NUMBER ),
+ nFormatType ( css::util::NumberFormat::NUMBER ),
cMatrixFlag ( cMatInd ),
bDirty( true ), // -> Because of the use of the Auto Pilot Function was: cMatInd != 0
bChanged( false ),
@@ -659,7 +659,7 @@ ScFormulaCell::ScFormulaCell(
pPreviousTrack(0),
pNextTrack(0),
nSeenInIteration(0),
- nFormatType ( NUMBERFORMAT_NUMBER ),
+ nFormatType ( css::util::NumberFormat::NUMBER ),
cMatrixFlag ( cMatInd ),
bDirty( true ),
bChanged( false ),
@@ -708,7 +708,7 @@ ScFormulaCell::ScFormulaCell(
pPreviousTrack(0),
pNextTrack(0),
nSeenInIteration(0),
- nFormatType ( NUMBERFORMAT_NUMBER ),
+ nFormatType ( css::util::NumberFormat::NUMBER ),
cMatrixFlag ( cMatInd ),
bDirty( true ),
bChanged( false ),
@@ -1795,7 +1795,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
sal_Int32 nFormatIndex = p->GetRetFormatIndex();
// don't set text format as hard format
- if(nFormatType == NUMBERFORMAT_TEXT)
+ if(nFormatType == css::util::NumberFormat::TEXT)
nFormatIndex = 0;
else if((nFormatIndex % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
nFormatIndex = ScGlobal::GetStandardFormat(*pDocument->GetFormatTable(),
@@ -1880,9 +1880,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// Precision as shown?
if ( aResult.IsValue() && !p->GetError()
&& pDocument->GetDocOptions().IsCalcAsShown()
- && nFormatType != NUMBERFORMAT_DATE
- && nFormatType != NUMBERFORMAT_TIME
- && nFormatType != NUMBERFORMAT_DATETIME )
+ && nFormatType != css::util::NumberFormat::DATE
+ && nFormatType != css::util::NumberFormat::TIME
+ && nFormatType != css::util::NumberFormat::DATETIME )
{
sal_uLong nFormat = pDocument->GetNumberFormat( aPos );
aResult.SetDouble( pDocument->RoundValueAsShown(
@@ -2298,7 +2298,7 @@ void ScFormulaCell::GetURLResult( OUString& rURL, OUString& rCellText )
sal_uLong nCellFormat = pDocument->GetNumberFormat( aPos );
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
- sal_uLong nURLFormat = ScGlobal::GetStandardFormat( *pFormatter, nCellFormat, NUMBERFORMAT_NUMBER);
+ sal_uLong nURLFormat = ScGlobal::GetStandardFormat( *pFormatter, nCellFormat, css::util::NumberFormat::NUMBER);
if ( IsValue() )
{
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 30f397a22f89..116371a1d931 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -228,7 +228,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
ScDocument* pDoc = static_cast<ScStyleSheetPool&>(GetPool()).GetDocument();
if ( pDoc )
{
- sal_uLong nNumFmt = pDoc->GetFormatTable()->GetStandardFormat( NUMBERFORMAT_CURRENCY,ScGlobal::eLnge );
+ sal_uLong nNumFmt = pDoc->GetFormatTable()->GetStandardFormat( css::util::NumberFormat::CURRENCY,ScGlobal::eLnge );
pSet->Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumFmt ) );
}
}
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 22528bdd9455..a482546251ee 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2337,12 +2337,12 @@ public:
{
short nNumFmtType = pEntry->GetType();
/* NOTE: Omitting the check for absence of
- * NUMBERFORMAT_TIME would include also date+time formatted
+ * css::util::NumberFormat::TIME would include also date+time formatted
* values of the same day. That may be desired in some
* cases, querying all time values of a day, but confusing
* in other cases. A user can always setup a standard
* filter query for x >= date AND x < date+1 */
- if ((nNumFmtType & NUMBERFORMAT_DATE) && !(nNumFmtType & NUMBERFORMAT_TIME))
+ if ((nNumFmtType & css::util::NumberFormat::DATE) && !(nNumFmtType & css::util::NumberFormat::TIME))
{
// The format is of date type. Strip off the time
// element.
@@ -2871,7 +2871,7 @@ public:
if (pEntry)
{
short nNumFmtType = pEntry->GetType();
- if (!((nNumFmtType & NUMBERFORMAT_DATE) && !(nNumFmtType & NUMBERFORMAT_TIME)))
+ if (!((nNumFmtType & css::util::NumberFormat::DATE) && !(nNumFmtType & css::util::NumberFormat::TIME)))
rItem.meType = ScQueryEntry::ByValue; // not a date only
}
else
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 1fc988431db9..e3952bc1cabe 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -227,7 +227,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (eCellType == CELLTYPE_VALUE)
{
sal_uInt32 nFormat = static_cast<const SfxUInt32Item*>(GetAttr(nCol,nRow,ATTR_VALUE_FORMAT))->GetValue();
- bool bDate = ( pDocument->GetFormatTable()->GetType(nFormat) == NUMBERFORMAT_DATE );
+ bool bDate = ( pDocument->GetFormatTable()->GetType(nFormat) == css::util::NumberFormat::DATE );
if (bDate)
{
if (nCount > 1)
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 8debf6b063e5..494fd43e0abf 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -34,7 +34,7 @@ namespace
//treat dates like text #i25706#
sal_uInt32 nNumberFormat = pDocument->GetNumberFormat( ScAddress( nCol, nRow, nTab ) );
short nType = pDocument->GetFormatTable()->GetType(nNumberFormat);
- bool bIsDate = (nType & NUMBERFORMAT_DATE);
+ bool bIsDate = (nType & css::util::NumberFormat::DATE);
bReturn = !bIsDate;
}
return bReturn;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 926e56b24c65..84611ee9284f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2553,10 +2553,10 @@ bool ScCompiler::IsValue( const OUString& rSym )
// to serial, because the serial would be wrong if null-date changed.
// Usually it wouldn't be accepted anyway because the date separator
// clashed with other separators or operators.
- if (nType & (NUMBERFORMAT_TIME | NUMBERFORMAT_DATE))
+ if (nType & (css::util::NumberFormat::TIME | css::util::NumberFormat::DATE))
return false;
- if (nType == NUMBERFORMAT_LOGICAL)
+ if (nType == css::util::NumberFormat::LOGICAL)
{
const sal_Unicode* p = aFormula.getStr() + nSrcPos;
while( *p == ' ' )
@@ -2565,7 +2565,7 @@ bool ScCompiler::IsValue( const OUString& rSym )
return false; // Boolean function instead.
}
- if( nType == NUMBERFORMAT_TEXT )
+ if( nType == css::util::NumberFormat::TEXT )
// HACK: number too big!
SetError( errIllegalArgument );
maRawToken.SetDouble( fVal );
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 12f77a6c7d62..a5ac375482f8 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -195,7 +195,7 @@ void ScInterpreter::ScIfJump()
}
else
{ // no parameter given for THEN
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
PushInt(1);
aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
}
@@ -208,7 +208,7 @@ void ScInterpreter::ScIfJump()
}
else
{ // no parameter given for ELSE
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
PushInt(0);
aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
}
@@ -888,7 +888,7 @@ double ScInterpreter::Compare()
}
if( nGlobalError )
return 0;
- nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nCurFmtType = nFuncFmtType = css::util::NumberFormat::LOGICAL;
return sc::CompareFunc(aComp.maCells[0], aComp.maCells[1], aComp.mbIgnoreCase);
}
@@ -958,7 +958,7 @@ sc::RangeMatrix ScInterpreter::CompareMat( ScQueryOp eOp, sc::CompareOptions* pO
if (nGlobalError)
{
- nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nCurFmtType = nFuncFmtType = css::util::NumberFormat::LOGICAL;
return aRes;
}
@@ -1049,7 +1049,7 @@ sc::RangeMatrix ScInterpreter::CompareMat( ScQueryOp eOp, sc::CompareOptions* pO
return aRes;
}
- nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nCurFmtType = nFuncFmtType = css::util::NumberFormat::LOGICAL;
return aRes;
}
@@ -1179,7 +1179,7 @@ void ScInterpreter::ScGreaterEqual()
void ScInterpreter::ScAnd()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
short nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
@@ -1278,7 +1278,7 @@ void ScInterpreter::ScAnd()
void ScInterpreter::ScOr()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
short nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
@@ -1379,7 +1379,7 @@ void ScInterpreter::ScOr()
void ScInterpreter::ScXor()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
short nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
@@ -1523,7 +1523,7 @@ void ScInterpreter::ScNeg()
void ScInterpreter::ScPercentSign()
{
- nFuncFmtType = NUMBERFORMAT_PERCENT;
+ nFuncFmtType = css::util::NumberFormat::PERCENT;
const FormulaToken* pSaveCur = pCur;
sal_uInt8 nSavePar = cPar;
PushInt( 100 );
@@ -1537,7 +1537,7 @@ void ScInterpreter::ScPercentSign()
void ScInterpreter::ScNot()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
switch ( GetStackType() )
{
case svMatrix :
@@ -1678,13 +1678,13 @@ void ScInterpreter::ScRandom()
void ScInterpreter::ScTrue()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
PushInt(1);
}
void ScInterpreter::ScFalse()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
PushInt(0);
}
@@ -1827,7 +1827,7 @@ void ScInterpreter::ScSqrt()
void ScInterpreter::ScIsEmpty()
{
short nRes = 0;
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
switch ( GetRawStackType() )
{
case svEmptyCell:
@@ -1881,7 +1881,7 @@ void ScInterpreter::ScIsEmpty()
bool ScInterpreter::IsString()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
bool nRes = false;
switch ( GetRawStackType() )
{
@@ -1968,7 +1968,7 @@ void ScInterpreter::ScIsLogical()
if (aCell.hasNumeric())
{
sal_uLong nFormat = GetCellNumberFormat(aAdr, aCell);
- nRes = (pFormatter->GetType(nFormat) == NUMBERFORMAT_LOGICAL);
+ nRes = (pFormatter->GetType(nFormat) == css::util::NumberFormat::LOGICAL);
}
}
}
@@ -1980,9 +1980,9 @@ void ScInterpreter::ScIsLogical()
default:
PopError();
if ( !nGlobalError )
- nRes = ( nCurFmtType == NUMBERFORMAT_LOGICAL );
+ nRes = ( nCurFmtType == css::util::NumberFormat::LOGICAL );
}
- nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nCurFmtType = nFuncFmtType = css::util::NumberFormat::LOGICAL;
nGlobalError = 0;
PushInt( int(nRes) );
}
@@ -2013,7 +2013,7 @@ void ScInterpreter::ScType()
case CELLTYPE_VALUE :
{
sal_uLong nFormat = GetCellNumberFormat(aAdr, aCell);
- if (pFormatter->GetType(nFormat) == NUMBERFORMAT_LOGICAL)
+ if (pFormatter->GetType(nFormat) == css::util::NumberFormat::LOGICAL)
nType = 4;
else
nType = 1;
@@ -2086,10 +2086,10 @@ void getFormatString(SvNumberFormatter* pFormatter, sal_uLong nFormat, OUString&
switch( pFormatter->GetType( nFormat ) )
{
- case NUMBERFORMAT_NUMBER: if(bThousand) rFmtStr = ","; else rFmtStr = "F"; break;
- case NUMBERFORMAT_CURRENCY: rFmtStr = "C"; break;
- case NUMBERFORMAT_SCIENTIFIC: rFmtStr = "S"; break;
- case NUMBERFORMAT_PERCENT: rFmtStr = "P"; break;
+ case css::util::NumberFormat::NUMBER: if(bThousand) rFmtStr = ","; else rFmtStr = "F"; break;
+ case css::util::NumberFormat::CURRENCY: rFmtStr = "C"; break;
+ case css::util::NumberFormat::SCIENTIFIC: rFmtStr = "S"; break;
+ case css::util::NumberFormat::PERCENT: rFmtStr = "P"; break;
default:
{
bAppendPrec = false;
@@ -2458,7 +2458,7 @@ void ScInterpreter::ScCellExternal()
void ScInterpreter::ScIsRef()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
bool nRes = false;
switch ( GetStackType() )
{
@@ -2494,7 +2494,7 @@ void ScInterpreter::ScIsRef()
void ScInterpreter::ScIsValue()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
bool nRes = false;
switch ( GetRawStackType() )
{
@@ -2557,7 +2557,7 @@ void ScInterpreter::ScIsValue()
void ScInterpreter::ScIsFormula()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
bool nRes = false;
switch ( GetStackType() )
{
@@ -2611,7 +2611,7 @@ void ScInterpreter::ScFormula()
void ScInterpreter::ScIsNV()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
bool nRes = false;
switch ( GetStackType() )
{
@@ -2659,7 +2659,7 @@ void ScInterpreter::ScIsNV()
void ScInterpreter::ScIsErr()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
bool nRes = false;
switch ( GetStackType() )
{
@@ -2713,7 +2713,7 @@ void ScInterpreter::ScIsErr()
void ScInterpreter::ScIsError()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
bool nRes = false;
switch ( GetStackType() )
{
@@ -2764,7 +2764,7 @@ void ScInterpreter::ScIsError()
bool ScInterpreter::IsEven()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
bool nRes = false;
double fVal = 0.0;
switch ( GetStackType() )
@@ -3333,7 +3333,7 @@ void ScInterpreter::ScMin( bool bTextAsZero )
{
nVal = GetDouble();
if (nMin > nVal) nMin = nVal;
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
}
break;
case svSingleRef :
@@ -3381,7 +3381,7 @@ void ScInterpreter::ScMin( bool bTextAsZero )
ScMatrixRef pMat = GetMatrix();
if (pMat)
{
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
nVal = pMat->GetMinValue(bTextAsZero);
if (nMin > nVal)
nMin = nVal;
@@ -3429,7 +3429,7 @@ void ScInterpreter::ScMax( bool bTextAsZero )
{
nVal = GetDouble();
if (nMax < nVal) nMax = nVal;
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
}
break;
case svSingleRef :
@@ -3477,7 +3477,7 @@ void ScInterpreter::ScMax( bool bTextAsZero )
ScMatrixRef pMat = GetMatrix();
if (pMat)
{
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
nVal = pMat->GetMaxValue(bTextAsZero);
if (nMax < nVal)
nMax = nVal;
@@ -7650,7 +7650,7 @@ void ScInterpreter::ScCurrency()
if ( fDec < 0.0 )
fDec = 0.0;
sal_uLong nIndex = pFormatter->GetStandardFormat(
- NUMBERFORMAT_CURRENCY,
+ css::util::NumberFormat::CURRENCY,
ScGlobal::eLnge);
if ( (sal_uInt16) fDec != pFormatter->GetFormatPrecision( nIndex ) )
{
@@ -7740,7 +7740,7 @@ void ScInterpreter::ScFixed()
if (fDec < 0.0)
fDec = 0.0;
sal_uLong nIndex = pFormatter->GetStandardFormat(
- NUMBERFORMAT_NUMBER,
+ css::util::NumberFormat::NUMBER,
ScGlobal::eLnge);
OUString sFormatString = pFormatter->GenerateFormat(
nIndex,
@@ -7786,7 +7786,7 @@ void ScInterpreter::ScFind()
void ScInterpreter::ScExact()
{
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
if ( MustHaveParamCount( GetByte(), 2 ) )
{
svl::SharedString s1 = GetString();
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 1114444fabdc..94b227f98808 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -97,7 +97,7 @@ double ScInterpreter::GetDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int1
void ScInterpreter::ScGetActDate()
{
- nFuncFmtType = NUMBERFORMAT_DATE;
+ nFuncFmtType = css::util::NumberFormat::DATE;
Date aActDate( Date::SYSTEM );
long nDiff = aActDate - *(pFormatter->GetNullDate());
PushDouble((double) nDiff);
@@ -105,7 +105,7 @@ void ScInterpreter::ScGetActDate()
void ScInterpreter::ScGetActTime()
{
- nFuncFmtType = NUMBERFORMAT_DATETIME;
+ nFuncFmtType = css::util::NumberFormat::DATETIME;
Date aActDate( Date::SYSTEM );
long nDiff = aActDate - *(pFormatter->GetNullDate());
tools::Time aActTime( tools::Time::SYSTEM );
@@ -169,7 +169,7 @@ void ScInterpreter::ScGetDateValue()
if (pFormatter->IsNumberFormat(aInputString, nFIndex, fVal))
{
short eType = pFormatter->GetType(nFIndex);
- if (eType == NUMBERFORMAT_DATE || eType == NUMBERFORMAT_DATETIME)
+ if (eType == css::util::NumberFormat::DATE || eType == css::util::NumberFormat::DATETIME)
PushDouble(::rtl::math::approxFloor(fVal));
else
PushIllegalArgument();
@@ -219,7 +219,7 @@ void ScInterpreter::ScGetWeekOfYear()
void ScInterpreter::ScEasterSunday()
{
- nFuncFmtType = NUMBERFORMAT_DATE;
+ nFuncFmtType = css::util::NumberFormat::DATE;
if ( MustHaveParamCount( GetByte(), 1 ) )
{
sal_Int16 nDay, nMonth, nYear;
@@ -378,7 +378,7 @@ void ScInterpreter::ScWorkday_MS()
sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 4 ) )
{
- nFuncFmtType = NUMBERFORMAT_DATE;
+ nFuncFmtType = css::util::NumberFormat::DATE;
vector<double> nSortArray;
bool bWeekendMask[ 7 ];
OUString aWeekendDays;
@@ -436,7 +436,7 @@ void ScInterpreter::ScWorkday_MS()
void ScInterpreter::ScGetDate()
{
- nFuncFmtType = NUMBERFORMAT_DATE;
+ nFuncFmtType = css::util::NumberFormat::DATE;
if ( MustHaveParamCount( GetByte(), 3 ) )
{
sal_Int16 nDay = (sal_Int16) ::rtl::math::approxFloor(GetDouble());
@@ -453,7 +453,7 @@ void ScInterpreter::ScGetDate()
void ScInterpreter::ScGetTime()
{
- nFuncFmtType = NUMBERFORMAT_TIME;
+ nFuncFmtType = css::util::NumberFormat::TIME;
if ( MustHaveParamCount( GetByte(), 3 ) )
{
double nSec = GetDouble();
@@ -725,7 +725,7 @@ void ScInterpreter::ScGetTimeValue()
if (pFormatter->IsNumberFormat(aInputString, nFIndex, fVal))
{
short eType = pFormatter->GetType(nFIndex);
- if (eType == NUMBERFORMAT_TIME || eType == NUMBERFORMAT_DATETIME)
+ if (eType == css::util::NumberFormat::TIME || eType == css::util::NumberFormat::DATETIME)
{
double fDateVal = rtl::math::approxFloor(fVal);
double fTimeVal = fVal - fDateVal;
@@ -959,7 +959,7 @@ void ScInterpreter::ScLog10()
void ScInterpreter::ScNPV()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
short nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 31 ) )
{
@@ -1027,7 +1027,7 @@ void ScInterpreter::ScNPV()
void ScInterpreter::ScIRR()
{
double fEstimated;
- nFuncFmtType = NUMBERFORMAT_PERCENT;
+ nFuncFmtType = css::util::NumberFormat::PERCENT;
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 2 ) )
return;
@@ -1092,7 +1092,7 @@ void ScInterpreter::ScIRR()
void ScInterpreter::ScMIRR()
{ // range_of_values ; rate_invest ; rate_reinvest
- nFuncFmtType = NUMBERFORMAT_PERCENT;
+ nFuncFmtType = css::util::NumberFormat::PERCENT;
if( MustHaveParamCount( GetByte(), 3 ) )
{
double fRate1_reinvest = GetDouble() + 1;
@@ -1175,7 +1175,7 @@ double ScInterpreter::ScGetBw(double fInterest, double fZzr, double fRmz,
void ScInterpreter::ScPV()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
double nRmz, nZzr, nInterest, nZw = 0, nFlag = 0;
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
@@ -1192,7 +1192,7 @@ void ScInterpreter::ScPV()
void ScInterpreter::ScSYD()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
if ( MustHaveParamCount( GetByte(), 4 ) )
{
double nZr = GetDouble();
@@ -1233,7 +1233,7 @@ double ScInterpreter::ScGetGDA(double fValue, double fRest, double fTimeLength,
void ScInterpreter::ScDDB()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 4, 5 ) )
{
@@ -1256,7 +1256,7 @@ void ScInterpreter::ScDDB()
void ScInterpreter::ScDB()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 5 ) )
return ;
@@ -1350,7 +1350,7 @@ inline double DblMin( double a, double b )
void ScInterpreter::ScVDB()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 5, 7 ) )
{
@@ -1436,7 +1436,7 @@ void ScInterpreter::ScDuration()
void ScInterpreter::ScSLN()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
if ( MustHaveParamCount( GetByte(), 3 ) )
{
double nTimeLength = GetDouble();
@@ -1467,7 +1467,7 @@ double ScInterpreter::ScGetRmz(double fRate, double fNper, double fPv,
void ScInterpreter::ScPMT()
{
double nInterest, nZzr, nBw, nZw = 0, nFlag = 0;
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
@@ -1483,7 +1483,7 @@ void ScInterpreter::ScPMT()
void ScInterpreter::ScRRI()
{
- nFuncFmtType = NUMBERFORMAT_PERCENT;
+ nFuncFmtType = css::util::NumberFormat::PERCENT;
if ( MustHaveParamCount( GetByte(), 3 ) )
{
double nValueInFuture = GetDouble();
@@ -1513,7 +1513,7 @@ double ScInterpreter::ScGetZw(double fInterest, double fZzr, double fRmz,
void ScInterpreter::ScFV()
{
double nInterest, nZzr, nRmz, nBw = 0, nFlag = 0;
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
@@ -1653,7 +1653,7 @@ void ScInterpreter::ScRate()
double fFv = 0, fPayType = 0, fGuess = 0.1, fOrigGuess = 0.1;
bool bValid = true;
bool bDefaultGuess = true;
- nFuncFmtType = NUMBERFORMAT_PERCENT;
+ nFuncFmtType = css::util::NumberFormat::PERCENT;
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 6 ) )
return;
@@ -1714,7 +1714,7 @@ double ScInterpreter::ScGetCompoundInterest(double fInterest, double fZr, double
{
fRmz = ScGetRmz(fInterest, fZzr, fBw, fZw, fF); // fuer kapz auch bei fZr == 1
double fCompoundInterest;
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
if (fZr == 1.0)
{
if (fF > 0.0)
@@ -1735,7 +1735,7 @@ double ScInterpreter::ScGetCompoundInterest(double fInterest, double fZr, double
void ScInterpreter::ScIpmt()
{
double nInterest, nZr, nZzr, nBw, nZw = 0, nFlag = 0;
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 6 ) )
return;
@@ -1759,7 +1759,7 @@ void ScInterpreter::ScIpmt()
void ScInterpreter::ScPpmt()
{
double nInterest, nZr, nZzr, nBw, nZw = 0, nFlag = 0;
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 6 ) )
return;
@@ -1783,7 +1783,7 @@ void ScInterpreter::ScPpmt()
void ScInterpreter::ScCumIpmt()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
if ( MustHaveParamCount( GetByte(), 6 ) )
{
double fInterest, fZzr, fBw, fStart, fEnd, fF;
@@ -1823,7 +1823,7 @@ void ScInterpreter::ScCumIpmt()
void ScInterpreter::ScCumPrinc()
{
- nFuncFmtType = NUMBERFORMAT_CURRENCY;
+ nFuncFmtType = css::util::NumberFormat::CURRENCY;
if ( MustHaveParamCount( GetByte(), 6 ) )
{
double fInterest, fZzr, fBw, fStart, fEnd, fF;
@@ -1864,7 +1864,7 @@ void ScInterpreter::ScCumPrinc()
void ScInterpreter::ScEffective()
{
- nFuncFmtType = NUMBERFORMAT_PERCENT;
+ nFuncFmtType = css::util::NumberFormat::PERCENT;
if ( MustHaveParamCount( GetByte(), 2 ) )
{
double fPeriods = GetDouble();
@@ -1881,7 +1881,7 @@ void ScInterpreter::ScEffective()
void ScInterpreter::ScNominal()
{
- nFuncFmtType = NUMBERFORMAT_PERCENT;
+ nFuncFmtType = css::util::NumberFormat::PERCENT;
if ( MustHaveParamCount( GetByte(), 2 ) )
{
double fPeriods = GetDouble();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index c6eff6be2a1d..b4c72e46075f 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -326,7 +326,7 @@ double ScInterpreter::ConvertStringToValue( const OUString& rStr )
sal_Int32 nUnit[done] = {0,0,0,0,0,0,0};
const sal_Int32 nLimit[done] = {0,12,31,0,59,59,0};
State eState = (bDate ? month : minute);
- nCurFmtType = (bDate ? NUMBERFORMAT_DATE : NUMBERFORMAT_TIME);
+ nCurFmtType = (bDate ? css::util::NumberFormat::DATE : css::util::NumberFormat::TIME);
nUnit[eState-1] = aStr.copy( 0, nParseEnd).toInt32();
const sal_Unicode* pLastStart = p;
// Ensure there's no preceding sign. Negative dates
@@ -341,7 +341,7 @@ double ScInterpreter::ConvertStringToValue( const OUString& rStr )
while (p < pStop && !nGlobalError && eState < blank)
{
if (eState == minute)
- nCurFmtType |= NUMBERFORMAT_TIME;
+ nCurFmtType |= css::util::NumberFormat::TIME;
if (rtl::isAsciiDigit(*p))
{
// Maximum 2 digits per unit, except fractions.
@@ -544,7 +544,7 @@ void ScInterpreter::GetCellString( svl::SharedString& rStr, ScRefCellValue& rCel
{
double fVal = pFCell->GetValue();
sal_uLong nIndex = pFormatter->GetStandardFormat(
- NUMBERFORMAT_NUMBER,
+ css::util::NumberFormat::NUMBER,
ScGlobal::eLnge);
OUString aStr;
pFormatter->GetInputLineString(fVal, nIndex, aStr);
@@ -558,7 +558,7 @@ void ScInterpreter::GetCellString( svl::SharedString& rStr, ScRefCellValue& rCel
{
double fVal = rCell.mfValue;
sal_uLong nIndex = pFormatter->GetStandardFormat(
- NUMBERFORMAT_NUMBER,
+ css::util::NumberFormat::NUMBER,
ScGlobal::eLnge);
OUString aStr;
pFormatter->GetInputLineString(fVal, nIndex, aStr);
@@ -883,7 +883,7 @@ void ScInterpreter::PushWithoutError( FormulaToken& r )
SetError( errStackOverflow );
else
{
- nCurFmtType = NUMBERFORMAT_UNDEFINED;
+ nCurFmtType = css::util::NumberFormat::UNDEFINED;
r.IncRef();
if( sp >= maxsp )
maxsp = sp + 1;
@@ -994,7 +994,7 @@ void ScInterpreter::PushCellResultToken( bool bDisplayEmptyAsString,
{
PushError( nErr);
if (pRetTypeExpr)
- *pRetTypeExpr = NUMBERFORMAT_UNDEFINED;
+ *pRetTypeExpr = css::util::NumberFormat::UNDEFINED;
if (pRetIndexExpr)
*pRetIndexExpr = 0;
}
@@ -1004,7 +1004,7 @@ void ScInterpreter::PushCellResultToken( bool bDisplayEmptyAsString,
GetCellString( aRes, aCell);
PushString( aRes);
if (pRetTypeExpr)
- *pRetTypeExpr = NUMBERFORMAT_TEXT;
+ *pRetTypeExpr = css::util::NumberFormat::TEXT;
if (pRetIndexExpr)
*pRetIndexExpr = 0;
}
@@ -1060,7 +1060,7 @@ FormulaTokenRef ScInterpreter::PopToken()
double ScInterpreter::PopDouble()
{
- nCurFmtType = NUMBERFORMAT_NUMBER;
+ nCurFmtType = css::util::NumberFormat::NUMBER;
nCurFmtIndex = 0;
if( sp )
{
@@ -1087,7 +1087,7 @@ double ScInterpreter::PopDouble()
svl::SharedString ScInterpreter::PopString()
{
- nCurFmtType = NUMBERFORMAT_TEXT;
+ nCurFmtType = css::util::NumberFormat::TEXT;
nCurFmtIndex = 0;
if( sp )
{
@@ -1850,7 +1850,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
{ // result of empty FALSE jump path
FormulaTokenRef xRes = new FormulaDoubleToken( 0.0);
PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
- rRetTypeExpr = NUMBERFORMAT_LOGICAL;
+ rRetTypeExpr = css::util::NumberFormat::LOGICAL;
}
else if ( xMat->IsEmptyResult( 0, 0))
{ // empty formula result
@@ -1867,7 +1867,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
svl::SharedString aStr( nMatVal.GetString());
FormulaTokenRef xRes = new FormulaStringToken( aStr);
PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
- rRetTypeExpr = NUMBERFORMAT_TEXT;
+ rRetTypeExpr = css::util::NumberFormat::TEXT;
}
}
else
@@ -1879,8 +1879,8 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
else
xRes = new FormulaDoubleToken( nMatVal.fVal);
PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
- if ( rRetTypeExpr != NUMBERFORMAT_LOGICAL )
- rRetTypeExpr = NUMBERFORMAT_NUMBER;
+ if ( rRetTypeExpr != css::util::NumberFormat::LOGICAL )
+ rRetTypeExpr = css::util::NumberFormat::NUMBER;
}
rRetIndexExpr = 0;
xMat->SetErrorInterpreter( NULL);
@@ -2283,7 +2283,7 @@ svl::SharedString ScInterpreter::GetString()
{
double fVal = PopDouble();
sal_uLong nIndex = pFormatter->GetStandardFormat(
- NUMBERFORMAT_NUMBER,
+ css::util::NumberFormat::NUMBER,
ScGlobal::eLnge);
OUString aStr;
pFormatter->GetInputLineString(fVal, nIndex, aStr);
@@ -3793,7 +3793,7 @@ double applyImplicitIntersection(const sc::RangeMatrix& rMat, const ScAddress& r
StackVar ScInterpreter::Interpret()
{
- short nRetTypeExpr = NUMBERFORMAT_UNDEFINED;
+ short nRetTypeExpr = css::util::NumberFormat::UNDEFINED;
sal_uLong nRetIndexExpr = 0;
sal_uInt16 nErrorFunction = 0;
sal_uInt16 nErrorFunctionCount = 0;
@@ -3801,8 +3801,8 @@ StackVar ScInterpreter::Interpret()
nGlobalError = 0;
nStackBase = sp = maxsp = 0;
- nRetFmtType = NUMBERFORMAT_UNDEFINED;
- nFuncFmtType = NUMBERFORMAT_UNDEFINED;
+ nRetFmtType = css::util::NumberFormat::UNDEFINED;
+ nFuncFmtType = css::util::NumberFormat::UNDEFINED;
nFuncFmtIndex = nCurFmtIndex = nRetFmtIndex = 0;
xResult = NULL;
pJumpMatrix = NULL;
@@ -3846,7 +3846,7 @@ StackVar ScInterpreter::Interpret()
nCurFmtType = nRetTypeExpr;
nCurFmtIndex = nRetIndexExpr;
// default function's format, others are set if needed
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
nFuncFmtIndex = 0;
if ( eOp == ocIf || eOp == ocChoose || eOp == ocIfError || eOp == ocIfNA )
@@ -4268,7 +4268,7 @@ StackVar ScInterpreter::Interpret()
case ocBitLshift : ScBitLshift(); break;
case ocTTT : ScTTT(); break;
case ocDebugVar : ScDebugVar(); break;
- case ocNone : nFuncFmtType = NUMBERFORMAT_UNDEFINED; break;
+ case ocNone : nFuncFmtType = css::util::NumberFormat::UNDEFINED; break;
default : PushError( errUnknownOpCode); break;
}
@@ -4289,11 +4289,11 @@ StackVar ScInterpreter::Interpret()
pStack[sp-1]));
// outer function determines format of an expression
- if ( nFuncFmtType != NUMBERFORMAT_UNDEFINED )
+ if ( nFuncFmtType != css::util::NumberFormat::UNDEFINED )
{
nRetTypeExpr = nFuncFmtType;
// inherit the format index only for currency formats
- nRetIndexExpr = ( nFuncFmtType == NUMBERFORMAT_CURRENCY ?
+ nRetIndexExpr = ( nFuncFmtType == css::util::NumberFormat::CURRENCY ?
nFuncFmtIndex : 0 );
}
}
@@ -4392,14 +4392,14 @@ StackVar ScInterpreter::Interpret()
nGlobalError = pCur->GetError();
break;
case svDouble :
- if ( nFuncFmtType == NUMBERFORMAT_UNDEFINED )
+ if ( nFuncFmtType == css::util::NumberFormat::UNDEFINED )
{
- nRetTypeExpr = NUMBERFORMAT_NUMBER;
+ nRetTypeExpr = css::util::NumberFormat::NUMBER;
nRetIndexExpr = 0;
}
break;
case svString :
- nRetTypeExpr = NUMBERFORMAT_TEXT;
+ nRetTypeExpr = css::util::NumberFormat::TEXT;
nRetIndexExpr = 0;
break;
case svSingleRef :
@@ -4485,18 +4485,18 @@ StackVar ScInterpreter::Interpret()
else
SetError( errNoCode);
- if( nRetTypeExpr != NUMBERFORMAT_UNDEFINED )
+ if( nRetTypeExpr != css::util::NumberFormat::UNDEFINED )
{
nRetFmtType = nRetTypeExpr;
nRetFmtIndex = nRetIndexExpr;
}
- else if( nFuncFmtType != NUMBERFORMAT_UNDEFINED )
+ else if( nFuncFmtType != css::util::NumberFormat::UNDEFINED )
{
nRetFmtType = nFuncFmtType;
nRetFmtIndex = nFuncFmtIndex;
}
else
- nRetFmtType = NUMBERFORMAT_NUMBER;
+ nRetFmtType = css::util::NumberFormat::NUMBER;
if (nGlobalError && GetStackType() != svError )
PushError( nGlobalError);
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index e6ca13816579..38863a0b31c4 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -1160,25 +1160,25 @@ ScMatrixRef ScInterpreter::MatConcat(const ScMatrixRef& pMat1, const ScMatrixRef
// for DATE, TIME, DATETIME
static void lcl_GetDiffDateTimeFmtType( short& nFuncFmt, short nFmt1, short nFmt2 )
{
- if ( nFmt1 != NUMBERFORMAT_UNDEFINED || nFmt2 != NUMBERFORMAT_UNDEFINED )
+ if ( nFmt1 != css::util::NumberFormat::UNDEFINED || nFmt2 != css::util::NumberFormat::UNDEFINED )
{
if ( nFmt1 == nFmt2 )
{
- if ( nFmt1 == NUMBERFORMAT_TIME || nFmt1 == NUMBERFORMAT_DATETIME )
- nFuncFmt = NUMBERFORMAT_TIME; // times result in time
+ if ( nFmt1 == css::util::NumberFormat::TIME || nFmt1 == css::util::NumberFormat::DATETIME )
+ nFuncFmt = css::util::NumberFormat::TIME; // times result in time
// else: nothing special, number (date - date := days)
}
- else if ( nFmt1 == NUMBERFORMAT_UNDEFINED )
+ else if ( nFmt1 == css::util::NumberFormat::UNDEFINED )
nFuncFmt = nFmt2; // e.g. date + days := date
- else if ( nFmt2 == NUMBERFORMAT_UNDEFINED )
+ else if ( nFmt2 == css::util::NumberFormat::UNDEFINED )
nFuncFmt = nFmt1;
else
{
- if ( nFmt1 == NUMBERFORMAT_DATE || nFmt2 == NUMBERFORMAT_DATE ||
- nFmt1 == NUMBERFORMAT_DATETIME || nFmt2 == NUMBERFORMAT_DATETIME )
+ if ( nFmt1 == css::util::NumberFormat::DATE || nFmt2 == css::util::NumberFormat::DATE ||
+ nFmt1 == css::util::NumberFormat::DATETIME || nFmt2 == css::util::NumberFormat::DATETIME )
{
- if ( nFmt1 == NUMBERFORMAT_TIME || nFmt2 == NUMBERFORMAT_TIME )
- nFuncFmt = NUMBERFORMAT_DATETIME; // date + time
+ if ( nFmt1 == css::util::NumberFormat::TIME || nFmt2 == css::util::NumberFormat::TIME )
+ nFuncFmt = css::util::NumberFormat::DATETIME; // date + time
}
}
}
@@ -1199,7 +1199,7 @@ void ScInterpreter::CalculateAddSub(bool _bSub)
ScMatrixRef pMat2 = NULL;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmt1, nFmt2;
- nFmt1 = nFmt2 = NUMBERFORMAT_UNDEFINED;
+ nFmt1 = nFmt2 = css::util::NumberFormat::UNDEFINED;
short nFmtCurrencyType = nCurFmtType;
sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
short nFmtPercentType = nCurFmtType;
@@ -1210,17 +1210,17 @@ void ScInterpreter::CalculateAddSub(bool _bSub)
fVal2 = GetDouble();
switch ( nCurFmtType )
{
- case NUMBERFORMAT_DATE :
- case NUMBERFORMAT_TIME :
- case NUMBERFORMAT_DATETIME :
+ case css::util::NumberFormat::DATE :
+ case css::util::NumberFormat::TIME :
+ case css::util::NumberFormat::DATETIME :
nFmt2 = nCurFmtType;
break;
- case NUMBERFORMAT_CURRENCY :
+ case css::util::NumberFormat::CURRENCY :
nFmtCurrencyType = nCurFmtType;
nFmtCurrencyIndex = nCurFmtIndex;
break;
- case NUMBERFORMAT_PERCENT :
- nFmtPercentType = NUMBERFORMAT_PERCENT;
+ case css::util::NumberFormat::PERCENT :
+ nFmtPercentType = css::util::NumberFormat::PERCENT;
break;
}
}
@@ -1231,17 +1231,17 @@ void ScInterpreter::CalculateAddSub(bool _bSub)
fVal1 = GetDouble();
switch ( nCurFmtType )
{
- case NUMBERFORMAT_DATE :
- case NUMBERFORMAT_TIME :
- case NUMBERFORMAT_DATETIME :
+ case css::util::NumberFormat::DATE :
+ case css::util::NumberFormat::TIME :
+ case css::util::NumberFormat::DATETIME :
nFmt1 = nCurFmtType;
break;
- case NUMBERFORMAT_CURRENCY :
+ case css::util::NumberFormat::CURRENCY :
nFmtCurrencyType = nCurFmtType;
nFmtCurrencyIndex = nCurFmtIndex;
break;
- case NUMBERFORMAT_PERCENT :
- nFmtPercentType = NUMBERFORMAT_PERCENT;
+ case css::util::NumberFormat::PERCENT :
+ nFmtPercentType = css::util::NumberFormat::PERCENT;
break;
}
}
@@ -1308,7 +1308,7 @@ void ScInterpreter::CalculateAddSub(bool _bSub)
PushDouble( ::rtl::math::approxSub( fVal1, fVal2 ) );
else
PushDouble( ::rtl::math::approxAdd( fVal1, fVal2 ) );
- if ( nFmtCurrencyType == NUMBERFORMAT_CURRENCY )
+ if ( nFmtCurrencyType == css::util::NumberFormat::CURRENCY )
{
nFuncFmtType = nFmtCurrencyType;
nFuncFmtIndex = nFmtCurrencyIndex;
@@ -1316,8 +1316,8 @@ void ScInterpreter::CalculateAddSub(bool _bSub)
else
{
lcl_GetDiffDateTimeFmtType( nFuncFmtType, nFmt1, nFmt2 );
- if ( nFmtPercentType == NUMBERFORMAT_PERCENT && nFuncFmtType == NUMBERFORMAT_NUMBER )
- nFuncFmtType = NUMBERFORMAT_PERCENT;
+ if ( nFmtPercentType == css::util::NumberFormat::PERCENT && nFuncFmtType == css::util::NumberFormat::NUMBER )
+ nFuncFmtType = css::util::NumberFormat::PERCENT;
}
}
@@ -1433,7 +1433,7 @@ void ScInterpreter::ScMul()
fVal2 = GetDouble();
switch ( nCurFmtType )
{
- case NUMBERFORMAT_CURRENCY :
+ case css::util::NumberFormat::CURRENCY :
nFmtCurrencyType = nCurFmtType;
nFmtCurrencyIndex = nCurFmtIndex;
break;
@@ -1446,7 +1446,7 @@ void ScInterpreter::ScMul()
fVal1 = GetDouble();
switch ( nCurFmtType )
{
- case NUMBERFORMAT_CURRENCY :
+ case css::util::NumberFormat::CURRENCY :
nFmtCurrencyType = nCurFmtType;
nFmtCurrencyIndex = nCurFmtIndex;
break;
@@ -1489,7 +1489,7 @@ void ScInterpreter::ScMul()
}
else
PushDouble(fVal1 * fVal2);
- if ( nFmtCurrencyType == NUMBERFORMAT_CURRENCY )
+ if ( nFmtCurrencyType == css::util::NumberFormat::CURRENCY )
{
nFuncFmtType = nFmtCurrencyType;
nFuncFmtIndex = nFmtCurrencyIndex;
@@ -1503,7 +1503,7 @@ void ScInterpreter::ScDiv()
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
- short nFmtCurrencyType2 = NUMBERFORMAT_UNDEFINED;
+ short nFmtCurrencyType2 = css::util::NumberFormat::UNDEFINED;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
else
@@ -1519,7 +1519,7 @@ void ScInterpreter::ScDiv()
fVal1 = GetDouble();
switch ( nCurFmtType )
{
- case NUMBERFORMAT_CURRENCY :
+ case css::util::NumberFormat::CURRENCY :
nFmtCurrencyType = nCurFmtType;
nFmtCurrencyIndex = nCurFmtIndex;
break;
@@ -1578,7 +1578,7 @@ void ScInterpreter::ScDiv()
{
PushDouble( div( fVal1, fVal2) );
}
- if ( nFmtCurrencyType == NUMBERFORMAT_CURRENCY && nFmtCurrencyType2 != NUMBERFORMAT_CURRENCY )
+ if ( nFmtCurrencyType == css::util::NumberFormat::CURRENCY && nFmtCurrencyType2 != css::util::NumberFormat::CURRENCY )
{ // even USD/USD is not USD
nFuncFmtType = nFmtCurrencyType;
nFuncFmtIndex = nFmtCurrencyIndex;
@@ -3220,7 +3220,7 @@ void ScInterpreter::ScMatRef()
{
if (ScMatrix::IsEmptyPathType( nMatValType))
{ // result of empty false jump path
- nFuncFmtType = NUMBERFORMAT_LOGICAL;
+ nFuncFmtType = css::util::NumberFormat::LOGICAL;
PushInt(0);
}
else if (ScMatrix::IsEmptyType( nMatValType))
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 92a6ed3cbb18..b3daedd17b7d 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -357,7 +357,7 @@ void IterateMatrix(
return;
// TODO fdo73148 take mnSubTotalFlags into account
- rFuncFmtType = NUMBERFORMAT_NUMBER;
+ rFuncFmtType = css::util::NumberFormat::NUMBER;
switch (eFunc)
{
case ifAVERAGE:
@@ -490,7 +490,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
case ifPRODUCT: fRes *= fVal; break;
default: ; // nothing
}
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
break;
case svExternalSingleRef:
{
@@ -801,8 +801,8 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
}
// Bei Summen etc. macht ein bool-Ergebnis keinen Sinn
// und Anzahl ist immer Number (#38345#)
- if( eFunc == ifCOUNT || nFuncFmtType == NUMBERFORMAT_LOGICAL )
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ if( eFunc == ifCOUNT || nFuncFmtType == css::util::NumberFormat::LOGICAL )
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
return fRes;
}
@@ -837,7 +837,7 @@ void ScInterpreter::ScSum()
case svDouble :
fVal = GetDouble();
fRes += fVal;
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
break;
case svExternalSingleRef:
{
@@ -938,8 +938,8 @@ void ScInterpreter::ScSum()
}
}
- if (nFuncFmtType == NUMBERFORMAT_LOGICAL)
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ if (nFuncFmtType == css::util::NumberFormat::LOGICAL)
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
PushDouble(fRes);
}
@@ -989,7 +989,7 @@ void ScInterpreter::ScCount()
case svDouble :
GetDouble();
nCount++;
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
break;
case svExternalSingleRef:
{
@@ -1103,7 +1103,7 @@ void ScInterpreter::ScCount()
}
}
- nFuncFmtType = NUMBERFORMAT_NUMBER;
+ nFuncFmtType = css::util::NumberFormat::NUMBER;
PushDouble(nCount);
}
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 998f56203be7..8273f44c5adc 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -595,7 +595,7 @@ svl::SharedString ScMatrixImpl::GetString( SvNumberFormatter& rFormatter, SCSIZE
return svl::SharedString::getEmptyString();
// result of empty FALSE jump path
- sal_uLong nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_LOGICAL,
+ sal_uLong nKey = rFormatter.GetStandardFormat( css::util::NumberFormat::LOGICAL,
ScGlobal::eLnge);
OUString aStr;
Color* pColor = NULL;
@@ -617,7 +617,7 @@ svl::SharedString ScMatrixImpl::GetString( SvNumberFormatter& rFormatter, SCSIZE
return ScGlobal::GetErrorString( nError);
}
- sal_uLong nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_NUMBER,
+ sal_uLong nKey = rFormatter.GetStandardFormat( css::util::NumberFormat::NUMBER,
ScGlobal::eLnge);
OUString aStr;
rFormatter.GetInputLineString( fVal, nKey, aStr);
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index f98e050f3357..6efb11abba75 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -948,7 +948,7 @@ void DifAttrCache::Apply( ScDocument& rDoc, SCTAB nTab )
{
pPatt.reset(new ScPatternAttr( rDoc.GetPool() ));
pPatt->GetItemSet().Put( SfxUInt32Item( ATTR_VALUE_FORMAT,
- rDoc.GetFormatTable()->GetStandardFormat( NUMBERFORMAT_LOGICAL ) ) );
+ rDoc.GetFormatTable()->GetStandardFormat( css::util::NumberFormat::LOGICAL ) ) );
}
ppCols[ nCol ]->Apply( rDoc, nCol, nTab, *pPatt );
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 5ac4d841b161..521d2b668bec 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1355,7 +1355,7 @@ bool XclExpXct::BuildCrnList( XclExpCrnList& rCrnRecs )
if( xToken.get() ) switch( xToken->GetType() )
{
case svDouble:
- bValid = (rFormatter.GetType( nScNumFmt ) == NUMBERFORMAT_LOGICAL) ?
+ bValid = (rFormatter.GetType( nScNumFmt ) == css::util::NumberFormat::LOGICAL) ?
rCrnRecs.InsertValue( nScCol, nScRow, Any( xToken->GetDouble() != 0 ) ) :
rCrnRecs.InsertValue( nScCol, nScRow, Any( xToken->GetDouble() ) );
break;
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 4b2c13d164cc..5078d319501b 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -343,9 +343,9 @@ void XclExpPCField::InitStandardField( const ScRange& rRange )
{
double fValue = rDoc.GetValue( aPos );
short nFmtType = rFormatter.GetType( rDoc.GetNumberFormat( aPos ) );
- if( nFmtType == NUMBERFORMAT_LOGICAL )
+ if( nFmtType == css::util::NumberFormat::LOGICAL )
InsertOrigBoolItem( fValue != 0 );
- else if( nFmtType & NUMBERFORMAT_DATETIME )
+ else if( nFmtType & css::util::NumberFormat::DATETIME )
InsertOrigDateTimeItem( GetDateTimeFromDouble( ::std::max( fValue, 0.0 ) ) );
else
InsertOrigDoubleItem( fValue );
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index fcea194a773e..f4cf4cf63d92 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1290,7 +1290,7 @@ OUString GetNumberFormatCode(XclRoot& rRoot, const sal_uInt16 nScNumFmt, SvNumbe
if( const SvNumberformat* pEntry = rRoot.GetFormatter().GetEntry( nScNumFmt ) )
{
- if( pEntry->GetType() == NUMBERFORMAT_LOGICAL )
+ if( pEntry->GetType() == css::util::NumberFormat::LOGICAL )
{
// build Boolean number format
Color* pColor = 0;
@@ -1306,7 +1306,7 @@ OUString GetNumberFormatCode(XclRoot& rRoot, const sal_uInt16 nScNumFmt, SvNumbe
if( eLang != LANGUAGE_ENGLISH_US )
{
sal_Int32 nCheckPos;
- short nType = NUMBERFORMAT_DEFINED;
+ short nType = css::util::NumberFormat::DEFINED;
sal_uInt32 nKey;
OUString aTemp( pEntry->GetFormatstring() );
xFormatter->PutandConvertEntry( aTemp, nCheckPos, nType, nKey, eLang, LANGUAGE_ENGLISH_US );
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 25130af401bc..ba1d24a4e0d0 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -828,19 +828,19 @@ XclExpFormulaCell::XclExpFormulaCell(
/* #i8640# Don't set text format, if we have string results. */
short nFormatType = mrScFmlaCell.GetFormatType();
if( ((nScNumFmt % SV_COUNTRY_LANGUAGE_OFFSET) == 0) &&
- (nFormatType != NUMBERFORMAT_LOGICAL) &&
- (nFormatType != NUMBERFORMAT_TEXT) )
+ (nFormatType != css::util::NumberFormat::LOGICAL) &&
+ (nFormatType != css::util::NumberFormat::TEXT) )
nAltScNumFmt = nScNumFmt;
/* If cell number format is Boolean and automatic formula
format is Boolean don't write that ugly special format. */
- else if( (nFormatType == NUMBERFORMAT_LOGICAL) &&
- (rFormatter.GetType( nScNumFmt ) == NUMBERFORMAT_LOGICAL) )
+ else if( (nFormatType == css::util::NumberFormat::LOGICAL) &&
+ (rFormatter.GetType( nScNumFmt ) == css::util::NumberFormat::LOGICAL) )
nAltScNumFmt = rNumFmtBfr.GetStandardFormat();
// #i41420# find script type according to result type (always latin for numeric results)
sal_Int16 nScript = ApiScriptType::LATIN;
bool bForceLineBreak = false;
- if( nFormatType == NUMBERFORMAT_TEXT )
+ if( nFormatType == css::util::NumberFormat::TEXT )
{
OUString aResult = mrScFmlaCell.GetString().getString();
bForceLineBreak = mrScFmlaCell.IsMultilineResult();
@@ -981,14 +981,14 @@ void XclExpFormulaCell::WriteContents( XclExpStream& rStrm )
// result of the formula
switch( mrScFmlaCell.GetFormatType() )
{
- case NUMBERFORMAT_NUMBER:
+ case css::util::NumberFormat::NUMBER:
{
// either value or error code
rStrm << mrScFmlaCell.GetValue();
}
break;
- case NUMBERFORMAT_TEXT:
+ case css::util::NumberFormat::TEXT:
{
OUString aResult = mrScFmlaCell.GetString().getString();
if( !aResult.isEmpty() || (rStrm.GetRoot().GetBiff() <= EXC_BIFF5) )
@@ -1002,7 +1002,7 @@ void XclExpFormulaCell::WriteContents( XclExpStream& rStrm )
}
break;
- case NUMBERFORMAT_LOGICAL:
+ case css::util::NumberFormat::LOGICAL:
{
sal_uInt8 nXclValue = (mrScFmlaCell.GetValue() == 0.0) ? 0 : 1;
rStrm << EXC_FORMULA_RES_BOOL << sal_uInt8( 0 )
@@ -2389,7 +2389,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
if( pPattern && ((fValue == 0.0) || (fValue == 1.0)) )
{
sal_uLong nScNumFmt = GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong );
- if( rFormatter.GetType( nScNumFmt ) == NUMBERFORMAT_LOGICAL )
+ if( rFormatter.GetType( nScNumFmt ) == css::util::NumberFormat::LOGICAL )
xCell.reset( new XclExpBooleanCell(
GetRoot(), aXclPos, pPattern, nMergeBaseXFId, fValue != 0.0 ) );
}
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 39f2e876e094..7b5dd249ad70 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -101,15 +101,15 @@ void XclImpPCItem::WriteToSource( XclImpRoot& rRoot, const ScAddress& rScPos ) c
else if( const sal_Int16* pnValue = GetInteger() )
rDoc.setNumericCell(rScPos, *pnValue);
else if( const bool* pbValue = GetBool() )
- lclSetValue( rRoot, rScPos, *pbValue ? 1.0 : 0.0, NUMBERFORMAT_LOGICAL );
+ lclSetValue( rRoot, rScPos, *pbValue ? 1.0 : 0.0, css::util::NumberFormat::LOGICAL );
else if( const DateTime* pDateTime = GetDateTime() )
{
// set number format date, time, or date/time, depending on the value
double fValue = rRoot.GetDoubleFromDateTime( *pDateTime );
double fInt = 0.0;
double fFrac = modf( fValue, &fInt );
- short nFormatType = ((fFrac == 0.0) && (fInt != 0.0)) ? NUMBERFORMAT_DATE :
- ((fInt == 0.0) ? NUMBERFORMAT_TIME : NUMBERFORMAT_DATETIME);
+ short nFormatType = ((fFrac == 0.0) && (fInt != 0.0)) ? css::util::NumberFormat::DATE :
+ ((fInt == 0.0) ? css::util::NumberFormat::TIME : css::util::NumberFormat::DATETIME);
lclSetValue( rRoot, rScPos, fValue, nFormatType );
}
else if( const sal_uInt16* pnError = GetError() )
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 5a3196ac2e46..56d99366658e 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -694,7 +694,7 @@ void XclImpNumFmtBuffer::CreateScFormats()
// insert/convert the Excel number format
sal_Int32 nCheckPos;
- short nType = NUMBERFORMAT_DEFINED;
+ short nType = css::util::NumberFormat::DEFINED;
sal_uInt32 nKey;
if( !rNumFmt.maFormat.isEmpty() )
{
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index 4bb66551ee63..65759ae78262 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -174,7 +174,7 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
sal_uInt8 nL, nH; // Low-/High-Nibble
sal_uInt8 nForm = nFormat;
OUString aFormString;
- sal_Int16 eType = NUMBERFORMAT_ALL;
+ sal_Int16 eType = css::util::NumberFormat::ALL;
sal_uInt32 nIndex1;
sal_uInt32 nHandle;
NfIndexTableOffset eIndexTableOffset = NF_NUMERIC_START;
@@ -193,49 +193,49 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
case 0x00: // fixed-point number
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_NUMBER, eLanguage );
+ css::util::NumberFormat::NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1);
break;
case 0x01: // scientific notation
//fExponent;nL;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_SCIENTIFIC, eLanguage );
+ css::util::NumberFormat::SCIENTIFIC, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1);
break;
case 0x02: // currency
//fMoney;nL;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_CURRENCY, eLanguage );
+ css::util::NumberFormat::CURRENCY, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1);
break;
case 0x03: // percentage
//fPercent;nL;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_PERCENT, eLanguage );
+ css::util::NumberFormat::PERCENT, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1);
break;
case 0x04: // Decimal
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_NUMBER, eLanguage );
+ css::util::NumberFormat::NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, true, false, nL, 1);
break;
case 0x05: // unspecified
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_NUMBER, eLanguage );
+ css::util::NumberFormat::NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1);
break;
case 0x06: // unspecified
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_NUMBER, eLanguage );
+ css::util::NumberFormat::NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1);
nIndex1 = 0;
@@ -246,74 +246,74 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
case 0x00: // +/-
//fStandard;nSt;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_NUMBER, eLanguage );
+ css::util::NumberFormat::NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, true, nSt, 1);
break;
case 0x01: // general Format
//fStandard;nSt;
nIndex1 = pFormTable->GetStandardFormat(
- NUMBERFORMAT_NUMBER, eLanguage );
+ css::util::NumberFormat::NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nSt, 1);
break;
case 0x02: // Date: Day, Month, Year
//fDate;dfDayMonthYearLong;
- eType = NUMBERFORMAT_DATE;
+ eType = css::util::NumberFormat::DATE;
eIndexTableOffset = NF_DATE_SYS_DDMMYYYY;
break;
case 0x03: // Date: Day, Month
//fDate;dfDayMonthLong;
- eType = NUMBERFORMAT_DATE;
+ eType = css::util::NumberFormat::DATE;
aFormString = pFormTable->GetKeyword( eLanguage, NF_KEY_DD);
aFormString += pFormTable->GetDateSep(); // matches last eLanguage
aFormString += pFormTable->GetKeyword( eLanguage, NF_KEY_MMMM);
break;
case 0x04: // Date: Month, Year
//fDate;dfMonthYearLong;
- eType = NUMBERFORMAT_DATE;
+ eType = css::util::NumberFormat::DATE;
aFormString = pFormTable->GetKeyword( eLanguage, NF_KEY_MM);
aFormString += pFormTable->GetDateSep(); // matches last eLanguage
aFormString += pFormTable->GetKeyword( eLanguage, NF_KEY_YYYY);
break;
case 0x05: // Text formats
//fString;nSt;
- eType = NUMBERFORMAT_TEXT;
+ eType = css::util::NumberFormat::TEXT;
eIndexTableOffset = NF_TEXT;
break;
case 0x06: // hidden
//wFlag |= paHideAll;bSetFormat = sal_False;
- eType = NUMBERFORMAT_NUMBER;
+ eType = css::util::NumberFormat::NUMBER;
aFormString = "\"\"";
break;
case 0x07: // Time: hour, min, sec
//fTime;tfHourMinSec24;
- eType = NUMBERFORMAT_TIME;
+ eType = css::util::NumberFormat::TIME;
eIndexTableOffset = NF_TIME_HHMMSS;
break;
case 0x08: // Time: hour, min
//fTime;tfHourMin24;
- eType = NUMBERFORMAT_TIME;
+ eType = css::util::NumberFormat::TIME;
eIndexTableOffset = NF_TIME_HHMM;
break;
case 0x09: // Date, intern sal_Int32 1
//fDate;dfDayMonthYearLong;
- eType = NUMBERFORMAT_DATE;
+ eType = css::util::NumberFormat::DATE;
eIndexTableOffset = NF_DATE_SYS_DDMMYYYY;
break;
case 0x0A: // Date, intern sal_Int32 2
//fDate;dfDayMonthYearLong;
- eType = NUMBERFORMAT_DATE;
+ eType = css::util::NumberFormat::DATE;
eIndexTableOffset = NF_DATE_SYS_DDMMYYYY;
break;
case 0x0B: // Time, intern sal_Int32 1
//fTime;tfHourMinSec24;
- eType = NUMBERFORMAT_TIME;
+ eType = css::util::NumberFormat::TIME;
eIndexTableOffset = NF_TIME_HHMMSS;
break;
case 0x0C: // Time, intern sal_Int32 2
//fTime;tfHourMinSec24;
- eType = NUMBERFORMAT_TIME;
+ eType = css::util::NumberFormat::TIME;
eIndexTableOffset = NF_TIME_HHMMSS;
break;
case 0x0F: // Default
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 11335684946c..9a11ae51dae4 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -347,7 +347,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
{
sal_uInt32 nNumFmt = static_cast<const SfxUInt32Item*>(pNumFmt)->GetValue();
sal_uInt16 nType = pFormatter->GetType(nNumFmt);
- if (nType == NUMBERFORMAT_TEXT)
+ if (nType == css::util::NumberFormat::TEXT)
// Format is set to Text.
bTextFormat = true;
}
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 9fcd029722b2..0c4be44d4dd9 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -262,7 +262,7 @@ void XclImpChangeTrack::ReadCell(
{
rCell.meType = CELLTYPE_VALUE;
rCell.mfValue = fValue;
- rFormat = GetFormatter().GetStandardFormat( NUMBERFORMAT_LOGICAL, ScGlobal::eLnge );
+ rFormat = GetFormatter().GetStandardFormat( css::util::NumberFormat::LOGICAL, ScGlobal::eLnge );
}
}
break;
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 6b123383c386..91788a6b030e 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -240,11 +240,11 @@ void ScChangeTrackingExportHelper::SetValueAttributes(const double& fValue, cons
if (rExport.GetDocument() && rExport.GetDocument()->GetFormatTable()->IsNumberFormat(sValue, nIndex, fTempValue))
{
sal_uInt16 nType = rExport.GetDocument()->GetFormatTable()->GetType(nIndex);
- if ((nType & NUMBERFORMAT_DEFINED) == NUMBERFORMAT_DEFINED)
- nType -= NUMBERFORMAT_DEFINED;
+ if ((nType & css::util::NumberFormat::DEFINED) == css::util::NumberFormat::DEFINED)
+ nType -= css::util::NumberFormat::DEFINED;
switch(nType)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
{
if ( rExport.GetMM100UnitConverter().setNullDate(rExport.GetModel()) )
{
@@ -256,7 +256,7 @@ void ScChangeTrackingExportHelper::SetValueAttributes(const double& fValue, cons
}
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
{
rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_TIME);
OUStringBuffer sBuffer;
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 3703f6230a29..33c601679266 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -65,13 +65,13 @@ const ScCellValue& ScMyCellInfo::CreateCell( ScDocument* pDoc )
maCell.mpFormula->SetMatColsRows(static_cast<SCCOL>(nMatrixCols), static_cast<SCROW>(nMatrixRows));
}
- if ((nType == NUMBERFORMAT_DATE || nType == NUMBERFORMAT_TIME) && sInputString.isEmpty())
+ if ((nType == css::util::NumberFormat::DATE || nType == css::util::NumberFormat::TIME) && sInputString.isEmpty())
{
sal_uInt32 nFormat(0);
- if (nType == NUMBERFORMAT_DATE)
- nFormat = pDoc->GetFormatTable()->GetStandardFormat( NUMBERFORMAT_DATE, ScGlobal::eLnge );
- else if (nType == NUMBERFORMAT_TIME)
- nFormat = pDoc->GetFormatTable()->GetStandardFormat( NUMBERFORMAT_TIME, ScGlobal::eLnge );
+ if (nType == css::util::NumberFormat::DATE)
+ nFormat = pDoc->GetFormatTable()->GetStandardFormat( css::util::NumberFormat::DATE, ScGlobal::eLnge );
+ else if (nType == css::util::NumberFormat::TIME)
+ nFormat = pDoc->GetFormatTable()->GetStandardFormat( css::util::NumberFormat::TIME, ScGlobal::eLnge );
pDoc->GetFormatTable()->GetInputLineString(fValue, nFormat, sInputString);
}
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index dfa5a69310bd..2232a1f592ad 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -728,7 +728,7 @@ ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext( ScXMLImport&
nMatrixCols(0),
nMatrixRows(0),
eGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT),
- nType(NUMBERFORMAT_ALL),
+ nType(css::util::NumberFormat::ALL),
nMatrixFlag(MM_NONE),
bBigRange(false),
bContainsCell(false)
@@ -1114,12 +1114,12 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport,
bString = false;
else if (IsXMLToken(sValue, XML_DATE))
{
- rType = NUMBERFORMAT_DATE;
+ rType = css::util::NumberFormat::DATE;
bString = false;
}
else if (IsXMLToken(sValue, XML_TIME))
{
- rType = NUMBERFORMAT_TIME;
+ rType = css::util::NumberFormat::TIME;
bString = false;
}
}
@@ -1246,7 +1246,7 @@ void ScXMLChangeCellContext::EndElement()
mrOldCell.meType = CELLTYPE_VALUE;
mrOldCell.mfValue = fValue;
}
- if (rType == NUMBERFORMAT_DATE || rType == NUMBERFORMAT_TIME)
+ if (rType == css::util::NumberFormat::DATE || rType == css::util::NumberFormat::TIME)
rInputString = sText;
}
}
@@ -1267,7 +1267,7 @@ ScXMLPreviousContext::ScXMLPreviousContext( ScXMLImport& rImport,
nMatrixCols(0),
nMatrixRows(0),
eGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT),
- nType(NUMBERFORMAT_ALL),
+ nType(css::util::NumberFormat::ALL),
nMatrixFlag(MM_NONE)
{
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 180c8643b5b9..a9564a977173 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1897,7 +1897,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
if ( SfxItemState::SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, true, &pItem ) )
{
sal_uLong nFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
- bCellHasPercentFormat = ( NUMBERFORMAT_PERCENT ==
+ bCellHasPercentFormat = ( css::util::NumberFormat::PERCENT ==
rDoc.GetFormatTable()->GetType( nFormat ) );
}
else
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index d98b3e25413b..5de6d53668fd 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -278,7 +278,7 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
{
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
pFormatter->GetInputLineString(rItem.mfVal,
- pFormatter->GetStandardFormat( NUMBERFORMAT_DATE), aValStr);
+ pFormatter->GetStandardFormat( css::util::NumberFormat::DATE), aValStr);
}
}
else
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index d89701b1f40d..12260b602ba4 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -622,16 +622,16 @@ void lcl_GetColumnTypes(
rDoc.GetNumberFormat( nCol, nFirstDataRow, nTab, nFormat );
switch ( pNumFmt->GetType( nFormat ) )
{
- case NUMBERFORMAT_LOGICAL :
+ case css::util::NumberFormat::LOGICAL :
nDbType = sdbc::DataType::BIT;
nFieldLen = 1;
break;
- case NUMBERFORMAT_DATE :
+ case css::util::NumberFormat::DATE :
nDbType = sdbc::DataType::DATE;
nFieldLen = 8;
break;
- case NUMBERFORMAT_TIME :
- case NUMBERFORMAT_DATETIME :
+ case css::util::NumberFormat::TIME :
+ case css::util::NumberFormat::DATETIME :
nDbType = sdbc::DataType::VARCHAR;
break;
default:
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index b91ab287aafc..3ab529a85051 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -477,7 +477,7 @@ ScExternalRefCache::TableName::TableName(const OUString& rUpper, const OUString&
}
ScExternalRefCache::CellFormat::CellFormat() :
- mbIsSet(false), mnType(NUMBERFORMAT_ALL), mnIndex(0)
+ mbIsSet(false), mnType(css::util::NumberFormat::ALL), mnIndex(0)
{
}
@@ -2090,7 +2090,7 @@ void ScExternalRefManager::fillCellFormat(sal_uLong nFmtIndex, ScExternalRefCach
return;
short nFmtType = mpDoc->GetFormatTable()->GetType(nFmtIndex);
- if (nFmtType != NUMBERFORMAT_UNDEFINED)
+ if (nFmtType != css::util::NumberFormat::UNDEFINED)
{
pFmt->mbIsSet = true;
pFmt->mnIndex = nFmtIndex;
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 8ca7598589ec..ec70334d183a 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -949,7 +949,7 @@ static bool lcl_PutString(
if (pFormatter->IsNumberFormat(rStr, nIndex, fDummy))
{
// Set the format of this cell to Text.
- sal_uInt32 nFormat = pFormatter->GetStandardFormat(NUMBERFORMAT_TEXT);
+ sal_uInt32 nFormat = pFormatter->GetStandardFormat(css::util::NumberFormat::TEXT);
ScPatternAttr aNewAttrs(pDoc->GetPool());
SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat) );
@@ -1172,7 +1172,7 @@ static bool lcl_PutString(
pDoc->GetLanguage( eLatin, eCjk, eCtl );
LanguageType eDocLang = eLatin; //! which language for date formats?
- short nType = (nFound > 3 ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE);
+ short nType = (nFound > 3 ? css::util::NumberFormat::DATETIME : css::util::NumberFormat::DATE);
sal_uLong nFormat = pDocFormatter->GetStandardFormat( nType, eDocLang );
// maybe there is a special format including seconds or milliseconds
if (nFound > 5)
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 546083aed0fb..752314e43f15 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1377,7 +1377,7 @@ static OUString lcl_GetInputString( ScDocument& rDoc, const ScAddress& rPos, boo
{
// if the string starts with a "'", add another one because setFormula
// strips one (like text input, except for "text" number formats)
- if ( bEnglish || ( pFormatter->GetType(nNumFmt) != NUMBERFORMAT_TEXT ) )
+ if ( bEnglish || ( pFormatter->GetType(nNumFmt) != css::util::NumberFormat::TEXT ) )
aTempString = "'" + aTempString;
}
aVal = aTempString;
@@ -3577,8 +3577,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
sal_uLong nIndex = (sal_uLong)static_cast<const SfxUInt32Item*>(rDoc.GetAttr(
aIter.GetPos(), ATTR_VALUE_FORMAT))->GetValue();
short nTyp = rDoc.GetFormatTable()->GetType(nIndex);
- if ((nTyp == NUMBERFORMAT_DATE) || (nTyp == NUMBERFORMAT_TIME) ||
- (nTyp == NUMBERFORMAT_DATETIME))
+ if ((nTyp == css::util::NumberFormat::DATE) || (nTyp == css::util::NumberFormat::TIME) ||
+ (nTyp == css::util::NumberFormat::DATETIME))
{
if ( nContentFlags & sheet::CellFlags::DATETIME )
bAdd = true;
@@ -6224,7 +6224,7 @@ void ScCellObj::InputEnglishString( const OUString& rText )
ScDocument& rDoc = pDocSh->GetDocument();
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
sal_uInt32 nOldFormat = rDoc.GetNumberFormat( aCellPos );
- if (pFormatter->GetType(nOldFormat) == NUMBERFORMAT_TEXT)
+ if (pFormatter->GetType(nOldFormat) == css::util::NumberFormat::TEXT)
{
SetString_Impl(aString, false, false); // text cell
return;
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;
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index b65460d82763..d1da378b0faf 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -264,7 +264,7 @@ void Test::testNumberFormat()
}
sal_Int32 nPos;
- short nType = NUMBERFORMAT_DEFINED;
+ short nType = css::util::NumberFormat::DEFINED;
sal_uInt32 nKey;
OUString aCode;
// Thai date format (implicit locale).
@@ -1011,7 +1011,7 @@ void Test::checkDateInput( SvNumberFormatter& rFormatter, const char* pTimezone,
bool bVal = rFormatter.IsNumberFormat( aDate, nIndex, fVal);
CPPUNIT_ASSERT_MESSAGE("Date not recognized.", bVal);
CPPUNIT_ASSERT_MESSAGE("Format parsed is not date.",
- ((rFormatter.GetType(nIndex) & NUMBERFORMAT_DATE) == NUMBERFORMAT_DATE));
+ (rFormatter.GetType(nIndex) & css::util::NumberFormat::DATE));
OUString aOutString;
Color *pColor;
rFormatter.GetOutputString( fVal, nIndex, aOutString, &pColor);
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index d53d8a2ec130..15e10a764760 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -601,7 +601,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getStandardFormat( sal_Int16 nType, const
LanguageType eLang = lcl_GetLanguage( nLocale );
// Mask out "defined" bit, so type from an existing number format
// can directly be used for getStandardFormat
- nType &= ~NUMBERFORMAT_DEFINED;
+ nType &= ~css::util::NumberFormat::DEFINED;
nRet = pFormatter->GetStandardFormat(nType, eLang);
}
else
@@ -756,7 +756,7 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const OUString& aProperty
}
else if (aPropertyName == PROPERTYNAME_USERDEF)
{
- sal_Bool bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+ sal_Bool bUserDef = ( ( pFormat->GetType() & css::util::NumberFormat::DEFINED ) != 0 );
aRet.setValue( &bUserDef, getBooleanCppuType() );
}
else if (aPropertyName == PROPERTYNAME_DECIMALS)
@@ -868,7 +868,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue
OUString aComment = pFormat->GetComment();
sal_Bool bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
//! Pass through SvNumberformat Member bStandard?
- sal_Bool bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+ sal_Bool bUserDef = ( ( pFormat->GetType() & css::util::NumberFormat::DEFINED ) != 0 );
bool bThousand, bRed;
sal_uInt16 nDecimals, nLeading;
pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 5011fe805fd4..c5e1e87bee24 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -79,8 +79,8 @@ ImpSvNumberInputScan::ImpSvNumberInputScan( SvNumberFormatter* pFormatterP )
bTextInitialized( false ),
bScanGenitiveMonths( false ),
bScanPartitiveMonths( false ),
- eScannedType( NUMBERFORMAT_UNDEFINED ),
- eSetType( NUMBERFORMAT_UNDEFINED )
+ eScannedType( css::util::NumberFormat::UNDEFINED ),
+ eSetType( css::util::NumberFormat::UNDEFINED )
{
pFormatter = pFormatterP;
pNullDate = new Date(30,12,1899);
@@ -117,7 +117,7 @@ void ImpSvNumberInputScan::Reset()
nAnzStrings = 0;
nAnzNums = 0;
nThousand = 0;
- eScannedType = NUMBERFORMAT_UNDEFINED;
+ eScannedType = css::util::NumberFormat::UNDEFINED;
nAmPm = 0;
nPosThousandString = 0;
nLogical = 0;
@@ -1489,7 +1489,7 @@ bool ImpSvNumberInputScan::GetDateRef( double& fDays, sal_uInt16& nCounter,
using namespace ::com::sun::star::i18n;
NfEvalDateFormat eEDF;
int nFormatOrder;
- if ( pFormat && ((pFormat->GetType() & NUMBERFORMAT_DATE) == NUMBERFORMAT_DATE) )
+ if ( pFormat && (pFormat->GetType() & css::util::NumberFormat::DATE) )
{
eEDF = pFormatter->GetEvalDateFormat();
switch ( eEDF )
@@ -2079,7 +2079,7 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
}
else if ( GetCurrency(rString, nPos, pFormat) ) // currency (DM 1)?
{
- eScannedType = NUMBERFORMAT_CURRENCY; // !!! it IS currency !!!
+ eScannedType = css::util::NumberFormat::CURRENCY; // !!! it IS currency !!!
SkipBlanks(rString, nPos);
if (nSign == 0) // no sign yet
{
@@ -2103,7 +2103,7 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
{
if (nPos < rString.getLength()) // Jan1 without separator is not a date
{
- eScannedType = NUMBERFORMAT_DATE; // !!! it IS a date !!!
+ eScannedType = css::util::NumberFormat::DATE; // !!! it IS a date !!!
nMonth = nTempMonth;
nMonthPos = 1; // month at the beginning
if ( nMonth < 0 )
@@ -2123,7 +2123,7 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
if ( nDayOfWeek )
{
// day of week is just parsed away
- eScannedType = NUMBERFORMAT_DATE; // !!! it IS a date !!!
+ eScannedType = css::util::NumberFormat::DATE; // !!! it IS a date !!!
if ( nPos < rString.getLength() )
{
if ( nDayOfWeek < 0 )
@@ -2226,15 +2226,15 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
if (bDecSepInDateSeps || // . also date separator
SkipDatePatternSeparator( nStringPos, nPos))
{
- if ( eScannedType != NUMBERFORMAT_UNDEFINED &&
- eScannedType != NUMBERFORMAT_DATE &&
- eScannedType != NUMBERFORMAT_DATETIME) // already another type
+ if ( eScannedType != css::util::NumberFormat::UNDEFINED &&
+ eScannedType != css::util::NumberFormat::DATE &&
+ eScannedType != css::util::NumberFormat::DATETIME) // already another type
{
return MatchedReturn();
}
- if (eScannedType == NUMBERFORMAT_UNDEFINED)
+ if (eScannedType == css::util::NumberFormat::UNDEFINED)
{
- eScannedType = NUMBERFORMAT_DATE; // !!! it IS a date
+ eScannedType = css::util::NumberFormat::DATE; // !!! it IS a date
}
SkipBlanks(rString, nPos);
}
@@ -2249,7 +2249,7 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
SkipBlanks(rString, nPos);
}
}
- else if ( ((eScannedType & NUMBERFORMAT_TIME) == NUMBERFORMAT_TIME) &&
+ else if ( (eScannedType & css::util::NumberFormat::TIME) &&
GetTime100SecSep( rString, nPos ) )
{ // hundredth seconds separator
if ( nDecPos )
@@ -2262,13 +2262,13 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
if (SkipChar('/', rString, nPos)) // fraction?
{
- if ( eScannedType != NUMBERFORMAT_UNDEFINED && // already another type
- eScannedType != NUMBERFORMAT_DATE) // except date
+ if ( eScannedType != css::util::NumberFormat::UNDEFINED && // already another type
+ eScannedType != css::util::NumberFormat::DATE) // except date
{
return MatchedReturn(); // => jan/31/1994
}
- else if (eScannedType != NUMBERFORMAT_DATE && // analyzed no date until now
- ( eSetType == NUMBERFORMAT_FRACTION || // and preset was fraction
+ else if (eScannedType != css::util::NumberFormat::DATE && // analyzed no date until now
+ ( eSetType == css::util::NumberFormat::FRACTION || // and preset was fraction
(nAnzNums == 3 && // or 3 numbers
(nStringPos == 3 || // and 3rd string particle
(nStringPos == 4 && nSign))))) // or 4th if signed
@@ -2276,8 +2276,8 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
SkipBlanks(rString, nPos);
if (nPos == rString.getLength())
{
- eScannedType = NUMBERFORMAT_FRACTION; // !!! it IS a fraction (so far)
- if (eSetType == NUMBERFORMAT_FRACTION &&
+ eScannedType = css::util::NumberFormat::FRACTION; // !!! it IS a fraction (so far)
+ if (eSetType == css::util::NumberFormat::FRACTION &&
nAnzNums == 2 &&
(nStringPos == 1 || // for 4/5
(nStringPos == 2 && nSign))) // or signed -4/5
@@ -2294,8 +2294,8 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
if (GetThousandSep(rString, nPos, nStringPos)) // 1,000
{
- if ( eScannedType != NUMBERFORMAT_UNDEFINED && // already another type
- eScannedType != NUMBERFORMAT_CURRENCY) // except currency
+ if ( eScannedType != css::util::NumberFormat::UNDEFINED && // already another type
+ eScannedType != css::util::NumberFormat::CURRENCY) // except currency
{
return MatchedReturn();
}
@@ -2313,13 +2313,13 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
if (bDate || ((MayBeIso8601() || MayBeMonthDate()) && // 1999-12-31 31-Dec-1999
SkipChar( '-', rString, nPos)))
{
- if ( eScannedType != NUMBERFORMAT_UNDEFINED && // already another type
- eScannedType != NUMBERFORMAT_DATE) // except date
+ if ( eScannedType != css::util::NumberFormat::UNDEFINED && // already another type
+ eScannedType != css::util::NumberFormat::DATE) // except date
{
return MatchedReturn();
}
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_DATE; // !!! it IS a date
+ eScannedType = css::util::NumberFormat::DATE; // !!! it IS a date
short nTmpMonth = GetMonth(rString, nPos); // 10. Jan 94
if (nMonth && nTmpMonth) // month dup
{
@@ -2350,14 +2350,14 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
{
return MatchedReturn();
}
- if ( eScannedType != NUMBERFORMAT_UNDEFINED && // already another type
- eScannedType != NUMBERFORMAT_DATE) // except date
+ if ( eScannedType != css::util::NumberFormat::UNDEFINED && // already another type
+ eScannedType != css::util::NumberFormat::DATE) // except date
{
return MatchedReturn();
}
if (nMonthStart > 0 && nPos < rString.getLength()) // 10Jan or Jan94 without separator are not dates
{
- eScannedType = NUMBERFORMAT_DATE; // !!! it IS a date
+ eScannedType = css::util::NumberFormat::DATE; // !!! it IS a date
nMonth = nTempMonth;
nMonthPos = 2; // month in the middle
if ( nMonth < 0 )
@@ -2376,14 +2376,14 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
if ( SkipChar('E', rString, nPos) || // 10E, 10e, 10,Ee
SkipChar('e', rString, nPos) )
{
- if (eScannedType != NUMBERFORMAT_UNDEFINED) // already another type
+ if (eScannedType != css::util::NumberFormat::UNDEFINED) // already another type
{
return MatchedReturn();
}
else
{
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_SCIENTIFIC; // !!! it IS scientific
+ eScannedType = css::util::NumberFormat::SCIENTIFIC; // !!! it IS scientific
if ( nThousand+2 == nAnzNums && nDecPos == 2 ) // special case 1.E2
{
nDecPos = 3; // 1,100.E2 1,100,100.E3
@@ -2400,12 +2400,12 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
{
if (bDecSepInDateSeps) // . also date sep
{
- if ( eScannedType != NUMBERFORMAT_DATE && // already another type than date
- eScannedType != NUMBERFORMAT_DATETIME) // or date time
+ if ( eScannedType != css::util::NumberFormat::DATE && // already another type than date
+ eScannedType != css::util::NumberFormat::DATETIME) // or date time
{
return MatchedReturn();
}
- if (eScannedType == NUMBERFORMAT_DATE)
+ if (eScannedType == css::util::NumberFormat::DATE)
{
nDecPos = 0; // reset for time transition
}
@@ -2415,22 +2415,22 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
return MatchedReturn();
}
}
- if ((eScannedType == NUMBERFORMAT_DATE || // already date type
- eScannedType == NUMBERFORMAT_DATETIME) && // or date time
+ if ((eScannedType == css::util::NumberFormat::DATE || // already date type
+ eScannedType == css::util::NumberFormat::DATETIME) && // or date time
nAnzNums > 3) // and more than 3 numbers? (31.Dez.94 8:23)
{
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_DATETIME; // !!! it IS date with time
+ eScannedType = css::util::NumberFormat::DATETIME; // !!! it IS date with time
}
- else if ( eScannedType != NUMBERFORMAT_UNDEFINED && // already another type
- eScannedType != NUMBERFORMAT_TIME) // except time
+ else if ( eScannedType != css::util::NumberFormat::UNDEFINED && // already another type
+ eScannedType != css::util::NumberFormat::TIME) // except time
{
return MatchedReturn();
}
else
{
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_TIME; // !!! it IS a time
+ eScannedType = css::util::NumberFormat::TIME; // !!! it IS a time
}
if ( !nTimePos )
{
@@ -2442,7 +2442,7 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
{
switch (eScannedType)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
if (nMonthPos == 1 && pLoc->getLongDateFormat() == MDY)
{
// #68232# recognize long date separators like ", " in "September 5, 1999"
@@ -2464,12 +2464,12 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
// here if the locale's separator is not ':' so it couldn't
// be detected above in the time block.
if (nAnzNums >= 5)
- eScannedType = NUMBERFORMAT_DATETIME;
+ eScannedType = css::util::NumberFormat::DATETIME;
++nPos;
}
}
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
if (nPos == 0 && rString.getLength() == 1 && MayBeIso8601())
{
if (nStringPos == 9 && rString[0] == ':')
@@ -2563,15 +2563,15 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
if (bDecSepInDateSeps || // . also date separator
SkipDatePatternSeparator( nAnzStrings-1, nPos))
{
- if ( eScannedType != NUMBERFORMAT_UNDEFINED &&
- eScannedType != NUMBERFORMAT_DATE &&
- eScannedType != NUMBERFORMAT_DATETIME) // already another type
+ if ( eScannedType != css::util::NumberFormat::UNDEFINED &&
+ eScannedType != css::util::NumberFormat::DATE &&
+ eScannedType != css::util::NumberFormat::DATETIME) // already another type
{
return MatchedReturn();
}
- if (eScannedType == NUMBERFORMAT_UNDEFINED)
+ if (eScannedType == css::util::NumberFormat::UNDEFINED)
{
- eScannedType = NUMBERFORMAT_DATE; // !!! it IS a date
+ eScannedType = css::util::NumberFormat::DATE; // !!! it IS a date
}
SkipBlanks(rString, nPos);
}
@@ -2589,7 +2589,7 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
bool bSignDetectedHere = false;
if ( nSign == 0 && // conflict - not signed
- eScannedType != NUMBERFORMAT_DATE) // and not date
+ eScannedType != css::util::NumberFormat::DATE) // and not date
//!? catch time too?
{ // not signed yet
nSign = GetSign(rString, nPos); // 1- DM
@@ -2612,14 +2612,14 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
if ( GetCurrency(rString, nPos, pFormat) ) // currency symbol?
{
- if (eScannedType != NUMBERFORMAT_UNDEFINED) // currency dup
+ if (eScannedType != css::util::NumberFormat::UNDEFINED) // currency dup
{
return MatchedReturn();
}
else
{
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_CURRENCY;
+ eScannedType = css::util::NumberFormat::CURRENCY;
} // behind currency a '-' is allowed
if (nSign == 0) // not signed yet
{
@@ -2630,7 +2630,7 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
return MatchedReturn();
}
}
- if ( nNegCheck && eScannedType == NUMBERFORMAT_CURRENCY &&
+ if ( nNegCheck && eScannedType == css::util::NumberFormat::CURRENCY &&
SkipChar(')', rString, nPos) )
{
nNegCheck = 0; // ')' skipped
@@ -2640,12 +2640,12 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
if ( SkipChar('%', rString, nPos) ) // 1%
{
- if (eScannedType != NUMBERFORMAT_UNDEFINED) // already another type
+ if (eScannedType != css::util::NumberFormat::UNDEFINED) // already another type
{
return MatchedReturn();
}
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_PERCENT;
+ eScannedType = css::util::NumberFormat::PERCENT;
}
const LocaleDataWrapper* pLoc = pFormatter->GetLocaleData();
@@ -2656,20 +2656,20 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
{
return MatchedReturn();
}
- if (eScannedType == NUMBERFORMAT_DATE && nAnzNums > 2) // 31.Dez.94 8:
+ if (eScannedType == css::util::NumberFormat::DATE && nAnzNums > 2) // 31.Dez.94 8:
{
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_DATETIME;
+ eScannedType = css::util::NumberFormat::DATETIME;
}
- else if (eScannedType != NUMBERFORMAT_UNDEFINED &&
- eScannedType != NUMBERFORMAT_TIME) // already another type
+ else if (eScannedType != css::util::NumberFormat::UNDEFINED &&
+ eScannedType != css::util::NumberFormat::TIME) // already another type
{
return MatchedReturn();
}
else
{
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_TIME;
+ eScannedType = css::util::NumberFormat::TIME;
}
if ( !nTimePos )
{
@@ -2690,15 +2690,15 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
if (bDate || ((MayBeIso8601() || MayBeMonthDate())
&& SkipChar( '-', rString, nPos)))
{
- if (eScannedType != NUMBERFORMAT_UNDEFINED &&
- eScannedType != NUMBERFORMAT_DATE) // already another type
+ if (eScannedType != css::util::NumberFormat::UNDEFINED &&
+ eScannedType != css::util::NumberFormat::DATE) // already another type
{
return MatchedReturn();
}
else
{
SkipBlanks(rString, nPos);
- eScannedType = NUMBERFORMAT_DATE;
+ eScannedType = css::util::NumberFormat::DATE;
}
short nTmpMonth = GetMonth(rString, nPos); // 10. Jan
if (nMonth && nTmpMonth) // month dup
@@ -2725,14 +2725,14 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
{
return MatchedReturn();
}
- if (eScannedType != NUMBERFORMAT_UNDEFINED &&
- eScannedType != NUMBERFORMAT_DATE) // already another type
+ if (eScannedType != css::util::NumberFormat::UNDEFINED &&
+ eScannedType != css::util::NumberFormat::DATE) // already another type
{
return MatchedReturn();
}
if (nMonthStart > 0) // 10Jan without separator is not a date
{
- eScannedType = NUMBERFORMAT_DATE;
+ eScannedType = css::util::NumberFormat::DATE;
nMonth = nTempMonth;
nMonthPos = 3; // month at end
if ( nMonth < 0 )
@@ -2750,9 +2750,9 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
sal_Int32 nOrigPos = nPos;
if (GetTimeAmPm(rString, nPos))
{
- if (eScannedType != NUMBERFORMAT_UNDEFINED &&
- eScannedType != NUMBERFORMAT_TIME &&
- eScannedType != NUMBERFORMAT_DATETIME) // already another type
+ if (eScannedType != css::util::NumberFormat::UNDEFINED &&
+ eScannedType != css::util::NumberFormat::TIME &&
+ eScannedType != css::util::NumberFormat::DATETIME) // already another type
{
return MatchedReturn();
}
@@ -2760,16 +2760,16 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
{
// If not already scanned as time, 6.78am does not result in 6
// seconds and 78 hundredths in the morning. Keep as suffix.
- if (eScannedType != NUMBERFORMAT_TIME && nDecPos == 2 && nAnzNums == 2)
+ if (eScannedType != css::util::NumberFormat::TIME && nDecPos == 2 && nAnzNums == 2)
{
nPos = nOrigPos; // rewind am/pm
}
else
{
SkipBlanks(rString, nPos);
- if ( eScannedType != NUMBERFORMAT_DATETIME )
+ if ( eScannedType != css::util::NumberFormat::DATETIME )
{
- eScannedType = NUMBERFORMAT_TIME;
+ eScannedType = css::util::NumberFormat::TIME;
}
}
}
@@ -2777,7 +2777,7 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
if ( nNegCheck && SkipChar(')', rString, nPos) )
{
- if (eScannedType == NUMBERFORMAT_CURRENCY) // only if currency
+ if (eScannedType == css::util::NumberFormat::CURRENCY) // only if currency
{
nNegCheck = 0; // skip ')'
SkipBlanks(rString, nPos);
@@ -2789,8 +2789,8 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
}
if ( nPos < rString.getLength() &&
- (eScannedType == NUMBERFORMAT_DATE ||
- eScannedType == NUMBERFORMAT_DATETIME) )
+ (eScannedType == css::util::NumberFormat::DATE ||
+ eScannedType == css::util::NumberFormat::DATETIME) )
{
// day of week is just parsed away
sal_Int32 nOldPos = nPos;
@@ -2822,7 +2822,7 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
}
#if NF_RECOGNIZE_ISO8601_TIMEZONES
- if (nPos == 0 && eScannedType == NUMBERFORMAT_DATETIME &&
+ if (nPos == 0 && eScannedType == css::util::NumberFormat::DATETIME &&
rString.getLength() == 1 && rString[ 0 ] == (sal_Unicode)'Z' && MayBeIso8601())
{
// ISO 8601 timezone UTC yyyy-mm-ddThh:mmZ
@@ -2978,7 +2978,7 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
nLogical = GetLogical( rStrArray );
if ( nLogical )
{
- eScannedType = NUMBERFORMAT_LOGICAL; // !!! it's a BOOLEAN
+ eScannedType = css::util::NumberFormat::LOGICAL; // !!! it's a BOOLEAN
nMatchedAllStrings &= ~nMatchedVirgin;
return true;
}
@@ -3002,12 +3002,12 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
// nAnzStrings >= 1
if (GetNextNumber(i,j)) // i=1,0
{ // Number at start
- if (eSetType == NUMBERFORMAT_FRACTION) // Fraction 1 = 1/1
+ if (eSetType == css::util::NumberFormat::FRACTION) // Fraction 1 = 1/1
{
if (i >= nAnzStrings || // no end string nor decimal separator
sStrArray[i] == pFormatter->GetNumDecimalSep())
{
- eScannedType = NUMBERFORMAT_FRACTION;
+ eScannedType = css::util::NumberFormat::FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
return true;
}
@@ -3022,16 +3022,16 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
i++; // next symbol, i=1
}
GetNextNumber(i,j); // i=1,2
- if (eSetType == NUMBERFORMAT_FRACTION) // Fraction -1 = -1/1
+ if (eSetType == css::util::NumberFormat::FRACTION) // Fraction -1 = -1/1
{
if (nSign && !nNegCheck && // Sign +, -
- eScannedType == NUMBERFORMAT_UNDEFINED && // not date or currency
+ eScannedType == css::util::NumberFormat::UNDEFINED && // not date or currency
nDecPos == 0 && // no previous decimal separator
(i >= nAnzStrings || // no end string nor decimal separator
sStrArray[i] == pFormatter->GetNumDecimalSep())
)
{
- eScannedType = NUMBERFORMAT_FRACTION;
+ eScannedType = css::util::NumberFormat::FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
return true;
}
@@ -3060,14 +3060,14 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
{
return false;
}
- if (eSetType == NUMBERFORMAT_FRACTION) // -1,200. as fraction
+ if (eSetType == css::util::NumberFormat::FRACTION) // -1,200. as fraction
{
if (!nNegCheck && // no sign '('
- eScannedType == NUMBERFORMAT_UNDEFINED &&
+ eScannedType == css::util::NumberFormat::UNDEFINED &&
(nDecPos == 0 || nDecPos == 3) // no decimal separator or at end
)
{
- eScannedType = NUMBERFORMAT_FRACTION;
+ eScannedType = css::util::NumberFormat::FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
return true;
}
@@ -3093,7 +3093,7 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
return false;
}
i++; // i=2,3
- if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at end
+ if (eScannedType == css::util::NumberFormat::SCIENTIFIC) // E only at end
{
return false;
}
@@ -3108,19 +3108,19 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
{
return false;
}
- if (eSetType == NUMBERFORMAT_FRACTION) // -1,200,100. as fraction
+ if (eSetType == css::util::NumberFormat::FRACTION) // -1,200,100. as fraction
{
if (!nNegCheck && // no sign '('
- eScannedType == NUMBERFORMAT_UNDEFINED &&
+ eScannedType == css::util::NumberFormat::UNDEFINED &&
(nDecPos == 0 || nDecPos == 3) // no decimal separator or at end
)
{
- eScannedType = NUMBERFORMAT_FRACTION;
+ eScannedType = css::util::NumberFormat::FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
return true;
}
}
- if ( eScannedType == NUMBERFORMAT_FRACTION && nDecPos )
+ if ( eScannedType == css::util::NumberFormat::FRACTION && nDecPos )
{
return false; // #36857# not a real fraction
}
@@ -3147,7 +3147,7 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
// but leave one number.
{ // Loop over group separators
nThOld = nThousand;
- if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at end
+ if (eScannedType == css::util::NumberFormat::SCIENTIFIC) // E only at end
{
return false;
}
@@ -3159,13 +3159,13 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
i++;
}
}
- if (eScannedType == NUMBERFORMAT_DATE || // long date or
- eScannedType == NUMBERFORMAT_TIME || // long time or
- eScannedType == NUMBERFORMAT_UNDEFINED) // long number
+ if (eScannedType == css::util::NumberFormat::DATE || // long date or
+ eScannedType == css::util::NumberFormat::TIME || // long time or
+ eScannedType == css::util::NumberFormat::UNDEFINED) // long number
{
for (sal_uInt16 k = j; k < nAnzNums-1; k++)
{
- if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at endd
+ if (eScannedType == css::util::NumberFormat::SCIENTIFIC) // E only at endd
{
return false;
}
@@ -3182,26 +3182,26 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
{
return false;
}
- if (eSetType == NUMBERFORMAT_FRACTION) // -1,200,100. as fraction
+ if (eSetType == css::util::NumberFormat::FRACTION) // -1,200,100. as fraction
{
if (!nNegCheck && // no sign '('
- eScannedType == NUMBERFORMAT_UNDEFINED &&
+ eScannedType == css::util::NumberFormat::UNDEFINED &&
(nDecPos == 0 || nDecPos == 3) // no decimal separator or at end
)
{
- eScannedType = NUMBERFORMAT_FRACTION;
+ eScannedType = css::util::NumberFormat::FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
return true;
}
}
- if ( eScannedType == NUMBERFORMAT_FRACTION && nDecPos )
+ if ( eScannedType == css::util::NumberFormat::FRACTION && nDecPos )
{
return false; // #36857# not a real fraction
}
break;
}
- if (eScannedType == NUMBERFORMAT_UNDEFINED)
+ if (eScannedType == css::util::NumberFormat::UNDEFINED)
{
nMatchedAllStrings &= ~nMatchedVirgin;
// did match including nMatchedUsedAsReturn
@@ -3225,11 +3225,11 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, /
}
else
{
- eScannedType = NUMBERFORMAT_NUMBER;
+ eScannedType = css::util::NumberFormat::NUMBER;
// everything else should have been recognized by now
}
}
- else if ( eScannedType == NUMBERFORMAT_DATE )
+ else if ( eScannedType == css::util::NumberFormat::DATE )
{
// the very relaxed date input checks may interfere with a preset format
nMatchedAllStrings &= ~nMatchedVirgin;
@@ -3421,8 +3421,8 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
if (res)
{
if ( nNegCheck || // ')' not found for '('
- (nSign && (eScannedType == NUMBERFORMAT_DATE ||
- eScannedType == NUMBERFORMAT_DATETIME))) // signed date/datetime
+ (nSign && (eScannedType == css::util::NumberFormat::DATE ||
+ eScannedType == css::util::NumberFormat::DATETIME))) // signed date/datetime
{
res = false;
}
@@ -3430,9 +3430,9 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
{ // check count of partial number strings
switch (eScannedType)
{
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_CURRENCY:
- case NUMBERFORMAT_NUMBER:
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::CURRENCY:
+ case css::util::NumberFormat::NUMBER:
if (nDecPos == 1) // .05
{
// matched MidStrings function like group separators
@@ -3471,7 +3471,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
}
break;
- case NUMBERFORMAT_SCIENTIFIC: // 1.0e-2
+ case css::util::NumberFormat::SCIENTIFIC: // 1.0e-2
if (nDecPos == 1) // .05
{
if (nAnzNums != 2)
@@ -3495,7 +3495,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
}
break;
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
if (nMonth)
{ // month name and numbers
if (nAnzNums > 2)
@@ -3524,7 +3524,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
if (nDecPos)
{ // hundredth seconds included
if (nAnzNums > 4)
@@ -3541,7 +3541,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
}
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
if (nMonth)
{ // month name and numbers
if (nDecPos)
@@ -3594,7 +3594,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
{ // we finally have a number
switch (eScannedType)
{
- case NUMBERFORMAT_LOGICAL:
+ case css::util::NumberFormat::LOGICAL:
if (nLogical == 1)
{
fOutNumber = 1.0; // True
@@ -3609,11 +3609,11 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
}
break;
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_CURRENCY:
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_SCIENTIFIC:
- case NUMBERFORMAT_DEFINED: // if no category detected handle as number
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::CURRENCY:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::SCIENTIFIC:
+ case css::util::NumberFormat::DEFINED: // if no category detected handle as number
if ( nDecPos == 1 ) // . at start
{
sResString.append("0.");
@@ -3626,7 +3626,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
if ( nDecPos == 2 && k < nAnzNums ) // . somewhere
{
sResString.append('.');
- sal_uInt16 nStop = (eScannedType == NUMBERFORMAT_SCIENTIFIC ?
+ sal_uInt16 nStop = (eScannedType == css::util::NumberFormat::SCIENTIFIC ?
nAnzNums-1 : nAnzNums);
for ( ; k < nStop; k++)
{
@@ -3634,7 +3634,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
}
}
- if (eScannedType != NUMBERFORMAT_SCIENTIFIC)
+ if (eScannedType != css::util::NumberFormat::SCIENTIFIC)
{
fOutNumber = StringToDouble(sResString.makeStringAndClear());
}
@@ -3650,7 +3650,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
fOutNumber = ::rtl::math::stringToDouble( sResString.makeStringAndClear(), '.', ',', &eStatus, NULL );
if ( eStatus == rtl_math_ConversionStatus_OutOfRange )
{
- F_Type = NUMBERFORMAT_TEXT; // overflow/underflow -> Text
+ F_Type = css::util::NumberFormat::TEXT; // overflow/underflow -> Text
if (nESign == -1)
{
fOutNumber = 0.0;
@@ -3679,13 +3679,13 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
fOutNumber = -fOutNumber;
}
- if (eScannedType == NUMBERFORMAT_PERCENT)
+ if (eScannedType == css::util::NumberFormat::PERCENT)
{
fOutNumber/= 100.0;
}
break;
- case NUMBERFORMAT_FRACTION:
+ case css::util::NumberFormat::FRACTION:
if (nAnzNums == 1)
{
fOutNumber = StringToDouble(sStrArray[nNums[0]]);
@@ -3757,7 +3757,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
res = GetTimeRef(fOutNumber, 0, nAnzNums);
if ( nSign < 0 )
{
@@ -3765,11 +3765,11 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
}
break;
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
res = GetDateRef( fOutNumber, k, pFormat );
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
res = GetDateRef( fOutNumber, k, pFormat );
if ( res )
{
@@ -3790,13 +3790,13 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
{
if (fOutNumber < -DBL_MAX) // -1.7E308
{
- F_Type = NUMBERFORMAT_TEXT;
+ F_Type = css::util::NumberFormat::TEXT;
fOutNumber = -DBL_MAX;
return true;
}
else if (fOutNumber > DBL_MAX) // 1.7E308
{
- F_Type = NUMBERFORMAT_TEXT;
+ F_Type = css::util::NumberFormat::TEXT;
fOutNumber = DBL_MAX;
return true;
}
@@ -3804,7 +3804,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
if (res == false)
{
- eScannedType = NUMBERFORMAT_TEXT;
+ eScannedType = css::util::NumberFormat::TEXT;
fOutNumber = 0.0;
}
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 2d42ee50ea4e..e18281254f07 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -427,13 +427,13 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
else
{
short eCheckType = pNewEntry->GetType();
- if ( eCheckType != NUMBERFORMAT_UNDEFINED )
+ if ( eCheckType != css::util::NumberFormat::UNDEFINED )
{
- pNewEntry->SetType( eCheckType | NUMBERFORMAT_DEFINED );
+ pNewEntry->SetType( eCheckType | css::util::NumberFormat::DEFINED );
}
else
{
- pNewEntry->SetType( NUMBERFORMAT_DEFINED );
+ pNewEntry->SetType( css::util::NumberFormat::DEFINED );
}
if ( !aFTable.insert( make_pair( nKey, pNewEntry) ).second )
@@ -522,15 +522,15 @@ bool SvNumberFormatter::PutEntry(OUString& rString,
if (nCheckPos == 0) // Format ok
{ // Type comparison:
short eCheckType = p_Entry->GetType();
- if ( eCheckType != NUMBERFORMAT_UNDEFINED)
+ if ( eCheckType != css::util::NumberFormat::UNDEFINED)
{
- p_Entry->SetType(eCheckType | NUMBERFORMAT_DEFINED);
+ p_Entry->SetType(eCheckType | css::util::NumberFormat::DEFINED);
nType = eCheckType;
}
else
{
- p_Entry->SetType(NUMBERFORMAT_DEFINED);
- nType = NUMBERFORMAT_DEFINED;
+ p_Entry->SetType(css::util::NumberFormat::DEFINED);
+ nType = css::util::NumberFormat::DEFINED;
}
sal_uInt32 CLOffset = ImpGenerateCL(eLge); // create new standard formats if necessary
@@ -664,7 +664,7 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( OUString & rString,
rType = GetType( nKey);
// Convert any (!) old "automatic" currency format to new fixed currency
// default format.
- if ((rType & NUMBERFORMAT_CURRENCY) != 0)
+ if ((rType & css::util::NumberFormat::CURRENCY) != 0)
{
const SvNumberformat* pFormat = GetEntry( nKey);
if (!pFormat->HasNewCurrency())
@@ -674,7 +674,7 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( OUString & rString,
DeleteEntry( nKey); // don't leave trails of rubbish
rNewInserted = false;
}
- nKey = GetStandardFormat( NUMBERFORMAT_CURRENCY, eLnge);
+ nKey = GetStandardFormat( css::util::NumberFormat::CURRENCY, eLnge);
}
}
return nKey;
@@ -778,7 +778,7 @@ SvNumberFormatTable& SvNumberFormatter::GetFirstEntryTable(
LanguageType& rLnge)
{
short eTypetmp = eType;
- if (eType == NUMBERFORMAT_ALL) // empty cell or don't care
+ if (eType == css::util::NumberFormat::ALL) // empty cell or don't care
{
rLnge = IniLnge;
}
@@ -788,22 +788,22 @@ SvNumberFormatTable& SvNumberFormatter::GetFirstEntryTable(
if (!pFormat)
{
rLnge = IniLnge;
- eType = NUMBERFORMAT_ALL;
+ eType = css::util::NumberFormat::ALL;
eTypetmp = eType;
}
else
{
rLnge = pFormat->GetLanguage();
- eType = pFormat->GetType()&~NUMBERFORMAT_DEFINED;
+ eType = pFormat->GetType()&~css::util::NumberFormat::DEFINED;
if (eType == 0)
{
- eType = NUMBERFORMAT_DEFINED;
+ eType = css::util::NumberFormat::DEFINED;
eTypetmp = eType;
}
- else if (eType == NUMBERFORMAT_DATETIME)
+ else if (eType == css::util::NumberFormat::DATETIME)
{
eTypetmp = eType;
- eType = NUMBERFORMAT_DATE;
+ eType = css::util::NumberFormat::DATE;
}
else
{
@@ -906,7 +906,7 @@ SvNumberFormatTable& SvNumberFormatter::GetEntryTable(
SvNumberFormatTable::iterator it = aFTable.find( CLOffset);
- if (eType == NUMBERFORMAT_ALL)
+ if (eType == css::util::NumberFormat::ALL)
{
while (it != aFTable.end() && it->second->GetLanguage() == ActLnge)
{ // copy all entries to output table
@@ -944,21 +944,21 @@ bool SvNumberFormatter::IsNumberFormat(const OUString& sString,
if (!pFormat)
{
ChangeIntl(IniLnge);
- FType = NUMBERFORMAT_NUMBER;
+ FType = css::util::NumberFormat::NUMBER;
}
else
{
- FType = pFormat->GetType() &~NUMBERFORMAT_DEFINED;
+ FType = pFormat->GetType() &~css::util::NumberFormat::DEFINED;
if (FType == 0)
{
- FType = NUMBERFORMAT_DEFINED;
+ FType = css::util::NumberFormat::DEFINED;
}
ChangeIntl(pFormat->GetLanguage());
}
bool res;
short RType = FType;
- if (RType == NUMBERFORMAT_TEXT)
+ if (RType == css::util::NumberFormat::TEXT)
{
res = false; // type text preset => no conversion to number
}
@@ -970,7 +970,7 @@ bool SvNumberFormatter::IsNumberFormat(const OUString& sString,
{
switch ( RType )
{
- case NUMBERFORMAT_DATE :
+ case css::util::NumberFormat::DATE :
// Preserve ISO 8601 input.
if (pStringScanner->CanForceToIso8601( DMY))
{
@@ -981,7 +981,7 @@ bool SvNumberFormatter::IsNumberFormat(const OUString& sString,
F_Index = GetStandardFormat( RType, ActLnge );
}
break;
- case NUMBERFORMAT_TIME :
+ case css::util::NumberFormat::TIME :
if ( pStringScanner->GetDecPos() )
{
// 100th seconds
@@ -1022,7 +1022,7 @@ bool SvNumberFormatter::IsCompatible(short eOldType,
{
return true;
}
- else if (eOldType == NUMBERFORMAT_DEFINED)
+ else if (eOldType == css::util::NumberFormat::DEFINED)
{
return true;
}
@@ -1030,43 +1030,43 @@ bool SvNumberFormatter::IsCompatible(short eOldType,
{
switch (eNewType)
{
- case NUMBERFORMAT_NUMBER:
+ case css::util::NumberFormat::NUMBER:
switch (eOldType)
{
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_CURRENCY:
- case NUMBERFORMAT_SCIENTIFIC:
- case NUMBERFORMAT_FRACTION:
-// case NUMBERFORMAT_LOGICAL:
- case NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::CURRENCY:
+ case css::util::NumberFormat::SCIENTIFIC:
+ case css::util::NumberFormat::FRACTION:
+// case css::util::NumberFormat::LOGICAL:
+ case css::util::NumberFormat::DEFINED:
return true;
default:
return false;
}
break;
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
switch (eOldType)
{
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
return true;
default:
return false;
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
switch (eOldType)
{
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
return true;
default:
return false;
}
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
switch (eOldType)
{
- case NUMBERFORMAT_TIME:
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::TIME:
+ case css::util::NumberFormat::DATE:
return true;
default:
return false;
@@ -1085,19 +1085,19 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType )
sal_uInt32 nSearch;
switch( nType )
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
nSearch = CLOffset + ZF_STANDARD_DATE;
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
nSearch = CLOffset + ZF_STANDARD_TIME;
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
nSearch = CLOffset + ZF_STANDARD_DATETIME;
break;
- case NUMBERFORMAT_PERCENT:
+ case css::util::NumberFormat::PERCENT:
nSearch = CLOffset + ZF_STANDARD_PERCENT;
break;
- case NUMBERFORMAT_SCIENTIFIC:
+ case css::util::NumberFormat::SCIENTIFIC:
nSearch = CLOffset + ZF_STANDARD_SCIENTIFIC;
break;
default:
@@ -1117,7 +1117,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType )
{
const SvNumberformat* pEntry = it2->second;
if ( pEntry->IsStandard() && ((pEntry->GetType() &
- ~NUMBERFORMAT_DEFINED) == nType) )
+ ~css::util::NumberFormat::DEFINED) == nType) )
{
nDefaultFormat = nKey;
break; // while
@@ -1129,19 +1129,19 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType )
{ // none found, use old fixed standards
switch( nType )
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
nDefaultFormat = CLOffset + ZF_STANDARD_DATE;
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
nDefaultFormat = CLOffset + ZF_STANDARD_TIME+1;
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
nDefaultFormat = CLOffset + ZF_STANDARD_DATETIME;
break;
- case NUMBERFORMAT_PERCENT:
+ case css::util::NumberFormat::PERCENT:
nDefaultFormat = CLOffset + ZF_STANDARD_PERCENT+1;
break;
- case NUMBERFORMAT_SCIENTIFIC:
+ case css::util::NumberFormat::SCIENTIFIC:
nDefaultFormat = CLOffset + ZF_STANDARD_SCIENTIFIC;
break;
default:
@@ -1163,24 +1163,24 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( short eType, LanguageType eLnge
sal_uInt32 CLOffset = ImpGenerateCL(eLnge);
switch(eType)
{
- case NUMBERFORMAT_CURRENCY:
+ case css::util::NumberFormat::CURRENCY:
return ( eLnge == LANGUAGE_SYSTEM ) ? ImpGetDefaultSystemCurrencyFormat() : ImpGetDefaultCurrencyFormat();
- case NUMBERFORMAT_DATE:
- case NUMBERFORMAT_TIME:
- case NUMBERFORMAT_DATETIME:
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_SCIENTIFIC:
+ case css::util::NumberFormat::DATE:
+ case css::util::NumberFormat::TIME:
+ case css::util::NumberFormat::DATETIME:
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::SCIENTIFIC:
return ImpGetDefaultFormat( eType );
- case NUMBERFORMAT_FRACTION:
+ case css::util::NumberFormat::FRACTION:
return CLOffset + ZF_STANDARD_FRACTION;
- case NUMBERFORMAT_LOGICAL:
+ case css::util::NumberFormat::LOGICAL:
return CLOffset + ZF_STANDARD_LOGICAL;
- case NUMBERFORMAT_TEXT:
+ case css::util::NumberFormat::TEXT:
return CLOffset + ZF_STANDARD_TEXT;
- case NUMBERFORMAT_ALL:
- case NUMBERFORMAT_DEFINED:
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_UNDEFINED:
+ case css::util::NumberFormat::ALL:
+ case css::util::NumberFormat::DEFINED:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::UNDEFINED:
default:
return CLOffset + ZF_STANDARD;
}
@@ -1213,7 +1213,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( double fNumber, sal_uInt32 nFIn
switch( eType )
{
- case NUMBERFORMAT_TIME :
+ case css::util::NumberFormat::TIME :
{
bool bSign;
if ( fNumber < 0.0 )
@@ -1252,7 +1252,7 @@ sal_uInt32 SvNumberFormatter::GetEditFormat( double fNumber, sal_uInt32 nFIndex,
switch ( eType )
{
// #61619# always edit using 4-digit year
- case NUMBERFORMAT_DATE :
+ case css::util::NumberFormat::DATE :
if (rtl::math::approxFloor( fNumber) != fNumber)
nKey = GetFormatIndex( NF_DATETIME_SYS_DDMMYYYY_HHMMSS, eLang );
// fdo#34977 preserve time when editing even if only date was
@@ -1273,7 +1273,7 @@ sal_uInt32 SvNumberFormatter::GetEditFormat( double fNumber, sal_uInt32 nFIndex,
nKey = GetFormatIndex( NF_DATE_SYS_DDMMYYYY, eLang );
}
break;
- case NUMBERFORMAT_TIME :
+ case css::util::NumberFormat::TIME :
if (fNumber < 0.0 || fNumber >= 1.0)
{
/* XXX NOTE: this is a purely arbitrary value within the limits
@@ -1290,7 +1290,7 @@ sal_uInt32 SvNumberFormatter::GetEditFormat( double fNumber, sal_uInt32 nFIndex,
else
nKey = GetStandardFormat( fNumber, nFIndex, eType, eLang );
break;
- case NUMBERFORMAT_DATETIME :
+ case css::util::NumberFormat::DATETIME :
nKey = GetFormatIndex( NF_DATETIME_SYS_DDMMYYYY_HHMMSS, eLang );
/* FIXME: in case an ISO 8601 format was used, editing should
* also use such. Unfortunately we have no builtin combined
@@ -1316,23 +1316,23 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
LanguageType eLang = pFormat->GetLanguage();
ChangeIntl( eLang );
- short eType = pFormat->GetType() & ~NUMBERFORMAT_DEFINED;
+ short eType = pFormat->GetType() & ~css::util::NumberFormat::DEFINED;
if (eType == 0)
{
- eType = NUMBERFORMAT_DEFINED;
+ eType = css::util::NumberFormat::DEFINED;
}
sal_uInt16 nOldPrec = pFormatScanner->GetStandardPrec();
bool bPrecChanged = false;
- if (eType == NUMBERFORMAT_NUMBER ||
- eType == NUMBERFORMAT_PERCENT ||
- eType == NUMBERFORMAT_CURRENCY ||
- eType == NUMBERFORMAT_SCIENTIFIC ||
- eType == NUMBERFORMAT_FRACTION)
+ if (eType == css::util::NumberFormat::NUMBER ||
+ eType == css::util::NumberFormat::PERCENT ||
+ eType == css::util::NumberFormat::CURRENCY ||
+ eType == css::util::NumberFormat::SCIENTIFIC ||
+ eType == css::util::NumberFormat::FRACTION)
{
- if (eType != NUMBERFORMAT_PERCENT) // special treatment of % later
+ if (eType != css::util::NumberFormat::PERCENT) // special treatment of % later
{
- eType = NUMBERFORMAT_NUMBER;
+ eType = css::util::NumberFormat::NUMBER;
}
ChangeStandardPrec(INPUTSTRING_PRECISION);
bPrecChanged = true;
@@ -1345,7 +1345,7 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
}
if (pFormat)
{
- if ( eType == NUMBERFORMAT_TIME && pFormat->GetFormatPrecision() )
+ if ( eType == css::util::NumberFormat::TIME && pFormat->GetFormatPrecision() )
{
ChangeStandardPrec(INPUTSTRING_PRECISION);
bPrecChanged = true;
@@ -2098,12 +2098,12 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
if (pStdFormat)
{
// This is _the_ standard format.
- if (LocaleDataWrapper::areChecksEnabled() && pStdFormat->GetType() != NUMBERFORMAT_NUMBER)
+ if (LocaleDataWrapper::areChecksEnabled() && pStdFormat->GetType() != css::util::NumberFormat::NUMBER)
{
LocaleDataWrapper::outputCheckMessage( xLocaleData->
appendLocaleInfo( "SvNumberFormatter::ImpGenerateFormats: General format not NUMBER"));
}
- pStdFormat->SetType( NUMBERFORMAT_NUMBER );
+ pStdFormat->SetType( css::util::NumberFormat::NUMBER );
pStdFormat->SetStandard();
pStdFormat->SetLastInsertKey( SV_MAX_ANZ_STANDARD_FORMATE );
}
@@ -2122,7 +2122,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
pNewFormat = new SvNumberformat( aFormatCode, pFormatScanner,
pStringScanner, nCheckPos, ActLnge );
- pNewFormat->SetType(NUMBERFORMAT_LOGICAL);
+ pNewFormat->SetType(css::util::NumberFormat::LOGICAL);
pNewFormat->SetStandard();
if ( !aFTable.insert(make_pair(
CLOffset + SetIndexTable( NF_BOOLEAN, ZF_STANDARD_LOGICAL ),
@@ -2136,7 +2136,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
aFormatCode = "@";
pNewFormat = new SvNumberformat( aFormatCode, pFormatScanner,
pStringScanner, nCheckPos, ActLnge );
- pNewFormat->SetType(NUMBERFORMAT_TEXT);
+ pNewFormat->SetType(css::util::NumberFormat::TEXT);
pNewFormat->SetStandard();
if ( !aFTable.insert(make_pair(
CLOffset + SetIndexTable( NF_TEXT, ZF_STANDARD_TEXT ),
@@ -2648,11 +2648,11 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
sString.append(GetNumDecimalSep());
padToLength(sString, sString.getLength() + nPrecision, '0');
}
- if (eType == NUMBERFORMAT_PERCENT)
+ if (eType == css::util::NumberFormat::PERCENT)
{
sString.append('%');
}
- else if (eType == NUMBERFORMAT_SCIENTIFIC)
+ else if (eType == css::util::NumberFormat::SCIENTIFIC)
{
OUStringBuffer sOldFormatString = pFormat->GetFormatstring();
sal_Int32 nIndexE = sOldFormatString.indexOf('E');
@@ -2665,7 +2665,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
sString.append( sOldFormatString.copy(nIndexE) );
}
}
- else if (eType == NUMBERFORMAT_CURRENCY)
+ else if (eType == css::util::NumberFormat::CURRENCY)
{
OUStringBuffer sNegStr(sString);
OUString aCurr;
@@ -2716,10 +2716,10 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
}
sString.append(sNegStr.makeStringAndClear());
}
- if (eType != NUMBERFORMAT_CURRENCY)
+ if (eType != css::util::NumberFormat::CURRENCY)
{
bool insertBrackets = false;
- if ( eType != NUMBERFORMAT_UNDEFINED)
+ if ( eType != css::util::NumberFormat::UNDEFINED)
{
insertBrackets = pFormat->IsNegativeInBracket();
}
@@ -2774,7 +2774,7 @@ bool SvNumberFormatter::IsUserDefined(const OUString& sStr,
return true;
}
SvNumberformat* pEntry = GetFormatEntry( nKey );
- if ( pEntry && ((pEntry->GetType() & NUMBERFORMAT_DEFINED) != 0) )
+ if ( pEntry && ((pEntry->GetType() & css::util::NumberFormat::DEFINED) != 0) )
{
return true;
}
@@ -2798,7 +2798,7 @@ sal_uInt32 SvNumberFormatter::GetStandardIndex(LanguageType eLnge)
{
eLnge = IniLnge;
}
- return GetStandardFormat(NUMBERFORMAT_NUMBER, eLnge);
+ return GetStandardFormat(css::util::NumberFormat::NUMBER, eLnge);
}
short SvNumberFormatter::GetType(sal_uInt32 nFIndex)
@@ -2807,14 +2807,14 @@ short SvNumberFormatter::GetType(sal_uInt32 nFIndex)
SvNumberformat* pFormat = GetFormatEntry( nFIndex );
if (!pFormat)
{
- eType = NUMBERFORMAT_UNDEFINED;
+ eType = css::util::NumberFormat::UNDEFINED;
}
else
{
- eType = pFormat->GetType() &~NUMBERFORMAT_DEFINED;
+ eType = pFormat->GetType() &~css::util::NumberFormat::DEFINED;
if (eType == 0)
{
- eType = NUMBERFORMAT_DEFINED;
+ eType = css::util::NumberFormat::DEFINED;
}
}
return eType;
@@ -3211,7 +3211,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
while ( it2 != aFTable.end() && (nKey = it2->first) >= CLOffset && nKey < nStopKey )
{
const SvNumberformat* pEntry = it2->second;
- if ( pEntry->IsStandard() && (pEntry->GetType() & NUMBERFORMAT_CURRENCY) )
+ if ( pEntry->IsStandard() && (pEntry->GetType() & css::util::NumberFormat::CURRENCY) )
{
nDefaultCurrencyFormat = nKey;
break; // while
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 70721e3f9078..e27348479985 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -334,7 +334,7 @@ ImpSvNumFor::ImpSvNumFor()
nAnzStrings = 0;
aI.nTypeArray = NULL;
aI.sStrArray = NULL;
- aI.eScannedType = NUMBERFORMAT_UNDEFINED;
+ aI.eScannedType = css::util::NumberFormat::UNDEFINED;
aI.bThousand = false;
aI.nThousand = 0;
aI.nCntPre = 0;
@@ -624,7 +624,7 @@ SvNumberformat::SvNumberformat(OUString& rString,
fLimit2 = 0.0;
eOp1 = NUMBERFORMAT_OP_NO;
eOp2 = NUMBERFORMAT_OP_NO;
- eType = NUMBERFORMAT_DEFINED;
+ eType = css::util::NumberFormat::DEFINED;
bool bCancel = false;
bool bCondition = false;
@@ -671,10 +671,10 @@ SvNumberformat::SvNumberformat(OUString& rString,
sal_Int32 nAnzChars = ImpGetNumber(sBuff, nPos, sStr);
if (nAnzChars > 0)
{
- short F_Type = NUMBERFORMAT_UNDEFINED;
+ short F_Type = css::util::NumberFormat::UNDEFINED;
if (!pISc->IsNumberFormat(sStr,F_Type,fNumber) ||
- ( F_Type != NUMBERFORMAT_NUMBER &&
- F_Type != NUMBERFORMAT_SCIENTIFIC) )
+ ( F_Type != css::util::NumberFormat::NUMBER &&
+ F_Type != css::util::NumberFormat::SCIENTIFIC) )
{
fNumber = 0.0;
nPos = nPos - nAnzChars;
@@ -951,11 +951,11 @@ SvNumberformat::SvNumberformat(OUString& rString,
}
else if (nIndex == 3)
{ // #77026# Everything recognized IS text
- NumFor[nIndex].Info().eScannedType = NUMBERFORMAT_TEXT;
+ NumFor[nIndex].Info().eScannedType = css::util::NumberFormat::TEXT;
}
else if ( (short) NumFor[nIndex].Info().eScannedType != eType)
{
- eType = NUMBERFORMAT_DEFINED;
+ eType = css::util::NumberFormat::DEFINED;
}
}
else
@@ -995,13 +995,13 @@ SvNumberformat::SvNumberformat(OUString& rString,
{
// #83510# A 4th subformat explicitly specified to be empty
// hides any text. Need the type here for HasTextFormat()
- NumFor[3].Info().eScannedType = NUMBERFORMAT_TEXT;
+ NumFor[3].Info().eScannedType = css::util::NumberFormat::TEXT;
}
bCancel = true;
}
if ( NumFor[nIndex].GetNatNum().IsSet() )
{
- NumFor[nIndex].SetNatNumDate( (NumFor[nIndex].Info().eScannedType & NUMBERFORMAT_DATE) != 0 );
+ NumFor[nIndex].SetNatNumDate( (NumFor[nIndex].Info().eScannedType & css::util::NumberFormat::DATE) != 0 );
}
}
@@ -1778,7 +1778,7 @@ void SvNumberformat::ImpGetOutputStdToPrecision(double& rNumber, OUString& rOutS
void SvNumberformat::ImpGetOutputInputLine(double fNumber, OUString& OutString)
{
bool bModified = false;
- if ( (eType & NUMBERFORMAT_PERCENT) && (fabs(fNumber) < _D_MAX_D_BY_100))
+ if ( (eType & css::util::NumberFormat::PERCENT) && (fabs(fNumber) < _D_MAX_D_BY_100))
{
if (fNumber == 0.0)
{
@@ -1800,7 +1800,7 @@ void SvNumberformat::ImpGetOutputInputLine(double fNumber, OUString& OutString)
rtl_math_DecimalPlaces_Max,
GetFormatter().GetNumDecimalSep()[0], true );
- if ( eType & NUMBERFORMAT_PERCENT && bModified)
+ if ( eType & css::util::NumberFormat::PERCENT && bModified)
{
OutString += "%";
}
@@ -1862,7 +1862,7 @@ bool SvNumberformat::GetOutputString(const OUString& sString,
{
OUStringBuffer sOutBuff;
sal_uInt16 nIx;
- if (eType & NUMBERFORMAT_TEXT)
+ if (eType & css::util::NumberFormat::TEXT)
{
nIx = 0;
}
@@ -1878,7 +1878,7 @@ bool SvNumberformat::GetOutputString(const OUString& sString,
*ppColor = NumFor[nIx].GetColor();
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
bool bRes = false;
- if (rInfo.eScannedType == NUMBERFORMAT_TEXT)
+ if (rInfo.eScannedType == css::util::NumberFormat::TEXT)
{
const sal_uInt16 nAnz = NumFor[nIx].GetCount();
for (sal_uInt16 i = 0; i < nAnz; i++)
@@ -2015,7 +2015,7 @@ bool SvNumberformat::GetOutputString(double fNumber, sal_uInt16 nCharCount, OUSt
{
using namespace std;
- if (eType != NUMBERFORMAT_NUMBER)
+ if (eType != css::util::NumberFormat::NUMBER)
{
return false;
}
@@ -2069,7 +2069,7 @@ bool SvNumberformat::GetOutputString(double fNumber,
OUStringBuffer sBuff;
OutString.clear();
*ppColor = NULL; // No color change
- if (eType & NUMBERFORMAT_LOGICAL)
+ if (eType & css::util::NumberFormat::LOGICAL)
{
if (fNumber)
{
@@ -2081,7 +2081,7 @@ bool SvNumberformat::GetOutputString(double fNumber,
}
return false;
}
- if (eType & NUMBERFORMAT_TEXT)
+ if (eType & css::util::NumberFormat::TEXT)
{
ImpGetOutputStandard(fNumber, sBuff);
OutString = sBuff.makeStringAndClear();
@@ -2097,7 +2097,7 @@ bool SvNumberformat::GetOutputString(double fNumber,
}
switch (eType)
{
- case NUMBERFORMAT_NUMBER: // Standard number format
+ case css::util::NumberFormat::NUMBER: // Standard number format
if (rScan.GetStandardPrec() == SvNumberFormatter::UNLIMITED_PRECISION)
{
bool bSign = ::rtl::math::isSignBitSet(fNumber);
@@ -2142,15 +2142,15 @@ bool SvNumberformat::GetOutputString(double fNumber,
ImpGetOutputStandard(fNumber, sBuff);
bHadStandard = true;
break;
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
bRes |= ImpGetDateOutput(fNumber, 0, sBuff);
bHadStandard = true;
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
bRes |= ImpGetTimeOutput(fNumber, 0, sBuff);
bHadStandard = true;
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
bRes |= ImpGetDateTimeOutput(fNumber, 0, sBuff);
bHadStandard = true;
break;
@@ -2185,7 +2185,7 @@ bool SvNumberformat::GetOutputString(double fNumber,
*ppColor = NumFor[nIx].GetColor();
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
const sal_uInt16 nAnz = NumFor[nIx].GetCount();
- if (nAnz == 0 && rInfo.eScannedType == NUMBERFORMAT_UNDEFINED)
+ if (nAnz == 0 && rInfo.eScannedType == css::util::NumberFormat::UNDEFINED)
{
return false; // Empty => nothing
}
@@ -2197,8 +2197,8 @@ bool SvNumberformat::GetOutputString(double fNumber,
}
switch (rInfo.eScannedType)
{
- case NUMBERFORMAT_TEXT:
- case NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::TEXT:
+ case css::util::NumberFormat::DEFINED:
for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
@@ -2228,24 +2228,24 @@ bool SvNumberformat::GetOutputString(double fNumber,
}
}
break;
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
bRes |= ImpGetDateOutput(fNumber, nIx, sBuff);
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
bRes |= ImpGetTimeOutput(fNumber, nIx, sBuff);
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
bRes |= ImpGetDateTimeOutput(fNumber, nIx, sBuff);
break;
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_CURRENCY:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::CURRENCY:
bRes |= ImpGetNumberOutput(fNumber, nIx, sBuff);
break;
- case NUMBERFORMAT_FRACTION:
+ case css::util::NumberFormat::FRACTION:
bRes |= ImpGetFractionOutput(fNumber, nIx, sBuff);
break;
- case NUMBERFORMAT_SCIENTIFIC:
+ case css::util::NumberFormat::SCIENTIFIC:
bRes |= ImpGetScientificOutput(fNumber, nIx, sBuff);
break;
}
@@ -3192,7 +3192,7 @@ void SvNumberformat::ImpAppendEraG( OUStringBuffer& OutString,
bool SvNumberformat::ImpIsIso8601( const ImpSvNumFor& rNumFor )
{
bool bIsIso = false;
- if ((eType & NUMBERFORMAT_DATE) == NUMBERFORMAT_DATE)
+ if ((eType & css::util::NumberFormat::DATE) == css::util::NumberFormat::DATE)
{
enum State
{
@@ -3846,7 +3846,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber,
}
}
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
- if (rInfo.eScannedType == NUMBERFORMAT_PERCENT)
+ if (rInfo.eScannedType == css::util::NumberFormat::PERCENT)
{
if (fNumber < _D_MAX_D_BY_100)
{
@@ -4366,7 +4366,7 @@ void SvNumberformat::GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType,
rScannedType = rInfo.eScannedType;
bThousand = rInfo.bThousand;
nPrecision = rInfo.nCntPost;
- if (bStandard && rInfo.eScannedType == NUMBERFORMAT_NUMBER)
+ if (bStandard && rInfo.eScannedType == css::util::NumberFormat::NUMBER)
{
// StandardFormat
nAnzLeading = 1;
@@ -4541,7 +4541,7 @@ bool SvNumberformat::HasPositiveBracketPlaceholder() const
DateFormat SvNumberformat::GetDateOrder() const
{
- if ( (eType & NUMBERFORMAT_DATE) == NUMBERFORMAT_DATE )
+ if ( (eType & css::util::NumberFormat::DATE) == css::util::NumberFormat::DATE )
{
short const * const pType = NumFor[0].Info().nTypeArray;
sal_uInt16 nAnz = NumFor[0].GetCount();
@@ -4578,7 +4578,7 @@ DateFormat SvNumberformat::GetDateOrder() const
sal_uInt32 SvNumberformat::GetExactDateOrder() const
{
sal_uInt32 nRet = 0;
- if ( (eType & NUMBERFORMAT_DATE) != NUMBERFORMAT_DATE )
+ if ( (eType & css::util::NumberFormat::DATE) != css::util::NumberFormat::DATE )
{
SAL_WARN( "svl.numbers", "SvNumberformat::GetExactDateOrder: no date" );
return nRet;
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 582c23356b7b..04c8d177c5df 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1089,7 +1089,7 @@ void ImpSvNumberformatScan::Reset()
{
nAnzStrings = 0;
nAnzResStrings = 0;
- eScannedType = NUMBERFORMAT_UNDEFINED;
+ eScannedType = css::util::NumberFormat::UNDEFINED;
nRepPos = 0;
bExp = false;
bThousand = false;
@@ -1137,7 +1137,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
switch (nTypeArray[i])
{
case NF_KEY_E: // E
- eNewType = NUMBERFORMAT_SCIENTIFIC;
+ eNewType = css::util::NumberFormat::SCIENTIFIC;
break;
case NF_KEY_AMPM: // AM,A,PM,P
case NF_KEY_AP:
@@ -1145,7 +1145,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
case NF_KEY_HH: // HH
case NF_KEY_S: // S
case NF_KEY_SS: // SS
- eNewType = NUMBERFORMAT_TIME;
+ eNewType = css::util::NumberFormat::TIME;
break;
case NF_KEY_M: // M
case NF_KEY_MM: // MM
@@ -1159,12 +1159,12 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
nIndexNex == NF_KEY_SS || // SS
cChar == '[' ) // [M
{
- eNewType = NUMBERFORMAT_TIME;
+ eNewType = css::util::NumberFormat::TIME;
nTypeArray[i] -= 2; // 6 -> 4, 7 -> 5
}
else
{
- eNewType = NUMBERFORMAT_DATE;
+ eNewType = css::util::NumberFormat::DATE;
}
break;
case NF_KEY_MMM: // MMM
@@ -1191,17 +1191,17 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
case NF_KEY_GGG : // GGG
case NF_KEY_R : // R
case NF_KEY_RR : // RR
- eNewType = NUMBERFORMAT_DATE;
+ eNewType = css::util::NumberFormat::DATE;
break;
case NF_KEY_CCC: // CCC
- eNewType = NUMBERFORMAT_CURRENCY;
+ eNewType = css::util::NumberFormat::CURRENCY;
break;
case NF_KEY_GENERAL: // Standard
- eNewType = NUMBERFORMAT_NUMBER;
+ eNewType = css::util::NumberFormat::NUMBER;
bHaveGeneral = true;
break;
default:
- eNewType = NUMBERFORMAT_UNDEFINED;
+ eNewType = css::util::NumberFormat::UNDEFINED;
break;
}
}
@@ -1211,15 +1211,15 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
{
case '#':
case '?':
- eNewType = NUMBERFORMAT_NUMBER;
+ eNewType = css::util::NumberFormat::NUMBER;
break;
case '0':
- if ( (eScannedType & NUMBERFORMAT_TIME) == NUMBERFORMAT_TIME )
+ if ( (eScannedType & css::util::NumberFormat::TIME) == css::util::NumberFormat::TIME )
{
if ( Is100SecZero( i, bDecSep ) )
{
bDecSep = true; // subsequent 0's
- eNewType = NUMBERFORMAT_TIME;
+ eNewType = css::util::NumberFormat::TIME;
}
else
{
@@ -1228,28 +1228,28 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
}
else
{
- eNewType = NUMBERFORMAT_NUMBER;
+ eNewType = css::util::NumberFormat::NUMBER;
}
break;
case '%':
- eNewType = NUMBERFORMAT_PERCENT;
+ eNewType = css::util::NumberFormat::PERCENT;
break;
case '/':
- eNewType = NUMBERFORMAT_FRACTION;
+ eNewType = css::util::NumberFormat::FRACTION;
break;
case '[':
if ( i < nAnzStrings-1 &&
nTypeArray[i+1] == NF_SYMBOLTYPE_STRING &&
sStrArray[i+1][0] == '$' )
{
- eNewType = NUMBERFORMAT_CURRENCY;
+ eNewType = css::util::NumberFormat::CURRENCY;
bMatchBracket = true;
}
else if ( i < nAnzStrings-1 &&
nTypeArray[i+1] == NF_SYMBOLTYPE_STRING &&
sStrArray[i+1][0] == '~' )
{
- eNewType = NUMBERFORMAT_DATE;
+ eNewType = css::util::NumberFormat::DATE;
bMatchBracket = true;
}
else
@@ -1261,7 +1261,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
nIndexNex == NF_KEY_MM || // MM
nIndexNex == NF_KEY_S || // S
nIndexNex == NF_KEY_SS ) // SS
- eNewType = NUMBERFORMAT_TIME;
+ eNewType = css::util::NumberFormat::TIME;
else
{
return nPos; // Error
@@ -1269,44 +1269,44 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
}
break;
case '@':
- eNewType = NUMBERFORMAT_TEXT;
+ eNewType = css::util::NumberFormat::TEXT;
break;
default:
if (pLoc->getTime100SecSep().equals(sStrArray[i]))
{
bDecSep = true; // for SS,0
}
- eNewType = NUMBERFORMAT_UNDEFINED;
+ eNewType = css::util::NumberFormat::UNDEFINED;
break;
}
}
- if (eScannedType == NUMBERFORMAT_UNDEFINED)
+ if (eScannedType == css::util::NumberFormat::UNDEFINED)
{
eScannedType = eNewType;
}
- else if (eScannedType == NUMBERFORMAT_TEXT || eNewType == NUMBERFORMAT_TEXT)
+ else if (eScannedType == css::util::NumberFormat::TEXT || eNewType == css::util::NumberFormat::TEXT)
{
- eScannedType = NUMBERFORMAT_TEXT; // Text always remains text
+ eScannedType = css::util::NumberFormat::TEXT; // Text always remains text
}
- else if (eNewType == NUMBERFORMAT_UNDEFINED)
+ else if (eNewType == css::util::NumberFormat::UNDEFINED)
{ // Remains as is
}
else if (eScannedType != eNewType)
{
switch (eScannedType)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
switch (eNewType)
{
- case NUMBERFORMAT_TIME:
- eScannedType = NUMBERFORMAT_DATETIME;
+ case css::util::NumberFormat::TIME:
+ eScannedType = css::util::NumberFormat::DATETIME;
break;
- case NUMBERFORMAT_FRACTION: // DD/MM
+ case css::util::NumberFormat::FRACTION: // DD/MM
break;
default:
if (nCurrPos >= 0)
{
- eScannedType = NUMBERFORMAT_UNDEFINED;
+ eScannedType = css::util::NumberFormat::UNDEFINED;
}
else if ( sStrArray[i] != OUString(pFormatter->GetDateSep()) )
{
@@ -1314,18 +1314,18 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
}
}
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
switch (eNewType)
{
- case NUMBERFORMAT_DATE:
- eScannedType = NUMBERFORMAT_DATETIME;
+ case css::util::NumberFormat::DATE:
+ eScannedType = css::util::NumberFormat::DATETIME;
break;
- case NUMBERFORMAT_FRACTION: // MM/SS
+ case css::util::NumberFormat::FRACTION: // MM/SS
break;
default:
if (nCurrPos >= 0)
{
- eScannedType = NUMBERFORMAT_UNDEFINED;
+ eScannedType = css::util::NumberFormat::UNDEFINED;
}
else if (!pLoc->getTimeSep().equals(sStrArray[i]))
{
@@ -1334,18 +1334,18 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
break;
}
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
switch (eNewType)
{
- case NUMBERFORMAT_TIME:
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::TIME:
+ case css::util::NumberFormat::DATE:
break;
- case NUMBERFORMAT_FRACTION: // DD/MM
+ case css::util::NumberFormat::FRACTION: // DD/MM
break;
default:
if (nCurrPos >= 0)
{
- eScannedType = NUMBERFORMAT_UNDEFINED;
+ eScannedType = css::util::NumberFormat::UNDEFINED;
}
else if ( OUString(pFormatter->GetDateSep()) != sStrArray[i] &&
!pLoc->getTimeSep().equals(sStrArray[i]) )
@@ -1354,37 +1354,37 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
}
}
break;
- case NUMBERFORMAT_PERCENT:
+ case css::util::NumberFormat::PERCENT:
switch (eNewType)
{
- case NUMBERFORMAT_NUMBER: // Only number to percent
+ case css::util::NumberFormat::NUMBER: // Only number to percent
break;
default:
return nPos;
}
break;
- case NUMBERFORMAT_SCIENTIFIC:
+ case css::util::NumberFormat::SCIENTIFIC:
switch (eNewType)
{
- case NUMBERFORMAT_NUMBER: // Only number to E
+ case css::util::NumberFormat::NUMBER: // Only number to E
break;
default:
return nPos;
}
break;
- case NUMBERFORMAT_NUMBER:
+ case css::util::NumberFormat::NUMBER:
switch (eNewType)
{
- case NUMBERFORMAT_SCIENTIFIC:
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_FRACTION:
- case NUMBERFORMAT_CURRENCY:
+ case css::util::NumberFormat::SCIENTIFIC:
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::FRACTION:
+ case css::util::NumberFormat::CURRENCY:
eScannedType = eNewType;
break;
default:
if (nCurrPos >= 0)
{
- eScannedType = NUMBERFORMAT_UNDEFINED;
+ eScannedType = css::util::NumberFormat::UNDEFINED;
}
else
{
@@ -1392,10 +1392,10 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
}
}
break;
- case NUMBERFORMAT_FRACTION:
+ case css::util::NumberFormat::FRACTION:
switch (eNewType)
{
- case NUMBERFORMAT_NUMBER: // Only number to fraction
+ case css::util::NumberFormat::NUMBER: // Only number to fraction
break;
default:
return nPos;
@@ -1431,15 +1431,15 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
SkipStrings(i, nPos);
}
- if ((eScannedType == NUMBERFORMAT_NUMBER ||
- eScannedType == NUMBERFORMAT_UNDEFINED) &&
+ if ((eScannedType == css::util::NumberFormat::NUMBER ||
+ eScannedType == css::util::NumberFormat::UNDEFINED) &&
nCurrPos >= 0 && !bHaveGeneral)
{
- eScannedType = NUMBERFORMAT_CURRENCY; // old "automatic" currency
+ eScannedType = css::util::NumberFormat::CURRENCY; // old "automatic" currency
}
- if (eScannedType == NUMBERFORMAT_UNDEFINED)
+ if (eScannedType == css::util::NumberFormat::UNDEFINED)
{
- eScannedType = NUMBERFORMAT_DEFINED;
+ eScannedType = css::util::NumberFormat::DEFINED;
}
return 0; // All is fine
}
@@ -1567,8 +1567,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
switch (eScannedType)
{
- case NUMBERFORMAT_TEXT:
- case NUMBERFORMAT_DEFINED:
+ case css::util::NumberFormat::TEXT:
+ case css::util::NumberFormat::DEFINED:
while (i < nAnzStrings)
{
switch (nTypeArray[i])
@@ -1591,16 +1591,16 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
} // of while
break;
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_PERCENT:
- case NUMBERFORMAT_CURRENCY:
- case NUMBERFORMAT_SCIENTIFIC:
- case NUMBERFORMAT_FRACTION:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::PERCENT:
+ case css::util::NumberFormat::CURRENCY:
+ case css::util::NumberFormat::SCIENTIFIC:
+ case css::util::NumberFormat::FRACTION:
while (i < nAnzStrings)
{
// TODO: rechecking eScannedType is unnecessary.
- // This switch-case is for eScannedType == NUMBERFORMAT_FRACTION anyway
- if (eScannedType == NUMBERFORMAT_FRACTION && // special case
+ // This switch-case is for eScannedType == css::util::NumberFormat::FRACTION anyway
+ if (eScannedType == css::util::NumberFormat::FRACTION && // special case
nTypeArray[i] == NF_SYMBOLTYPE_DEL && // # ### #/#
StringEqualsChar( sOldThousandSep, ' ' ) && // e.g. France or Sweden
StringEqualsChar( sStrArray[i], ' ' ) &&
@@ -1629,7 +1629,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
else if (nTypeArray[i] == NF_SYMBOLTYPE_STRING || // No Strings or
nTypeArray[i] > 0) // Keywords
{
- if (eScannedType == NUMBERFORMAT_SCIENTIFIC &&
+ if (eScannedType == css::util::NumberFormat::SCIENTIFIC &&
nTypeArray[i] == NF_KEY_E) // E+
{
if (bExp) // Double
@@ -1649,7 +1649,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
nCounter = 0;
nTypeArray[i] = NF_SYMBOLTYPE_EXP;
}
- else if (eScannedType == NUMBERFORMAT_FRACTION &&
+ else if (eScannedType == css::util::NumberFormat::FRACTION &&
sStrArray[i][0] == ' ')
{
if (!bBlank && !bFrac) // Not double or after a /
@@ -1696,7 +1696,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
nCounter = nCntPre;
}
// don't artificially increment nCntPre for forced denominator
- if ( ( eScannedType != NUMBERFORMAT_FRACTION ) && (!nCntPre) )
+ if ( ( eScannedType != css::util::NumberFormat::FRACTION ) && (!nCntPre) )
{
nCntPre++;
}
@@ -1774,7 +1774,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
// currency formats the last dash will be
// interpreted literally as a minus sign.
// Has to be this ugly. Period.
- if ( eScannedType == NUMBERFORMAT_CURRENCY
+ if ( eScannedType == css::util::NumberFormat::CURRENCY
&& rStr.getLength() >= 2 &&
(i == nAnzStrings-1 ||
sStrArray[i+1][0] != '-') )
@@ -1971,7 +1971,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
else // . without meaning
{
if (cSaved == ' ' &&
- eScannedType == NUMBERFORMAT_FRACTION &&
+ eScannedType == css::util::NumberFormat::FRACTION &&
StringEqualsChar( sStrArray[i], ' ' ) )
{
if (!bBlank && !bFrac) // no dups
@@ -2005,7 +2005,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
}
break;
case '/':
- if (eScannedType == NUMBERFORMAT_FRACTION)
+ if (eScannedType == css::util::NumberFormat::FRACTION)
{
if ( i == 0 ||
(nTypeArray[i-1] != NF_SYMBOLTYPE_DIGIT &&
@@ -2035,7 +2035,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
}
break;
case '[' :
- if ( eScannedType == NUMBERFORMAT_CURRENCY &&
+ if ( eScannedType == css::util::NumberFormat::CURRENCY &&
i < nAnzStrings-1 &&
nTypeArray[i+1] == NF_SYMBOLTYPE_STRING &&
sStrArray[i+1][0] == '$' )
@@ -2101,7 +2101,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
}
break;
default: // Other Dels
- if (eScannedType == NUMBERFORMAT_PERCENT && cHere == '%')
+ if (eScannedType == css::util::NumberFormat::PERCENT && cHere == '%')
{
nTypeArray[i] = NF_SYMBOLTYPE_PERCENT;
}
@@ -2121,7 +2121,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
i++;
}
} // of while
- if (eScannedType == NUMBERFORMAT_FRACTION)
+ if (eScannedType == css::util::NumberFormat::FRACTION)
{
if (bFrac)
{
@@ -2228,8 +2228,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
}
}
}
- break; // of NUMBERFORMAT_NUMBER
- case NUMBERFORMAT_DATE:
+ break; // of css::util::NumberFormat::NUMBER
+ case css::util::NumberFormat::DATE:
while (i < nAnzStrings)
{
int nCalRet;
@@ -2306,8 +2306,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
break;
}
} // of while
- break; // of NUMBERFORMAT_DATE
- case NUMBERFORMAT_TIME:
+ break; // of css::util::NumberFormat::DATE
+ case css::util::NumberFormat::TIME:
while (i < nAnzStrings)
{
sal_Unicode cChar;
@@ -2447,8 +2447,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
{
nCntExp = 1; // Remembers AM/PM
}
- break; // of NUMBERFORMAT_TIME
- case NUMBERFORMAT_DATETIME:
+ break; // of css::util::NumberFormat::TIME
+ case css::util::NumberFormat::DATETIME:
while (i < nAnzStrings)
{
int nCalRet;
@@ -2612,16 +2612,16 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
{
nCntExp = 1; // Remembers AM/PM
}
- break; // of NUMBERFORMAT_DATETIME
+ break; // of css::util::NumberFormat::DATETIME
default:
break;
}
- if (eScannedType == NUMBERFORMAT_SCIENTIFIC &&
+ if (eScannedType == css::util::NumberFormat::SCIENTIFIC &&
(nCntPre + nCntPost == 0 || nCntExp == 0))
{
return nPos;
}
- else if (eScannedType == NUMBERFORMAT_FRACTION && (nCntExp > 8 || nCntExp == 0))
+ else if (eScannedType == css::util::NumberFormat::FRACTION && (nCntExp > 8 || nCntExp == 0))
{
return nPos;
}
@@ -2638,7 +2638,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
if ( nTypeArray[i] == NF_SYMBOLTYPE_STRING &&
sStrArray[i][0] != '\"' )
{
- if ( bConvertSystemToSystem && eScannedType == NUMBERFORMAT_CURRENCY )
+ if ( bConvertSystemToSystem && eScannedType == css::util::NumberFormat::CURRENCY )
{
// don't stringize automatic currency, will be converted
if ( sStrArray[i] == sOldCurSymbol )
@@ -2718,7 +2718,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
case ' ':
case '.':
case '/':
- if (((eScannedType & NUMBERFORMAT_DATE) == 0) &&
+ if (((eScannedType & css::util::NumberFormat::DATE) == 0) &&
(StringEqualsChar( pFormatter->GetNumThousandSep(), c) ||
StringEqualsChar( pFormatter->GetNumDecimalSep(), c) ||
(c == ' ' &&
@@ -2727,18 +2727,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
{
rString += sStrArray[i];
}
- else if ((eScannedType & NUMBERFORMAT_DATE) &&
+ else if ((eScannedType & css::util::NumberFormat::DATE) &&
StringEqualsChar( pFormatter->GetDateSep(), c))
{
rString += sStrArray[i];
}
- else if ((eScannedType & NUMBERFORMAT_TIME) &&
+ else if ((eScannedType & css::util::NumberFormat::TIME) &&
(StringEqualsChar( pLoc->getTimeSep(), c) ||
StringEqualsChar( pLoc->getTime100SecSep(), c)))
{
rString += sStrArray[i];
}
- else if (eScannedType & NUMBERFORMAT_FRACTION)
+ else if (eScannedType & css::util::NumberFormat::FRACTION)
{
rString += sStrArray[i];
}
@@ -2758,7 +2758,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
if ( RemoveQuotes( sStrArray[i] ) > 0 )
{
// update currency up to quoted string
- if ( eScannedType == NUMBERFORMAT_CURRENCY )
+ if ( eScannedType == css::util::NumberFormat::CURRENCY )
{
// dM -> DM or DM -> $ in old automatic
// currency formats, oh my ..., why did we ever introduce them?
@@ -2801,7 +2801,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
{
i--; // enter switch on next symbol again
}
- if ( eScannedType == NUMBERFORMAT_CURRENCY && nStringPos < rString.getLength() )
+ if ( eScannedType == css::util::NumberFormat::CURRENCY && nStringPos < rString.getLength() )
{
// same as above, since last RemoveQuotes
OUString aTmp( pChrCls->uppercase( sStrArray[iPos], nArrPos,
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 37533abc9a51..a3dec60d20a6 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -576,7 +576,7 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, bool bResetForm
// get the Office's locale and translate
LanguageType eSysLanguage = SvtSysLocale().GetLanguageTag().getLanguageType( false);
// get the standard numeric format for this language
- m_nFormatKey = m_pFormatter->GetStandardFormat( NUMBERFORMAT_NUMBER, eSysLanguage );
+ m_nFormatKey = m_pFormatter->GetStandardFormat( css::util::NumberFormat::NUMBER, eSysLanguage );
}
else
m_nFormatKey = 0;
@@ -928,17 +928,17 @@ bool FormattedField::ImplGetValue(double& dNewVal)
nFormatKey = 0;
// special treatment for percentage formatting
- if (ImplGetFormatter()->GetType(m_nFormatKey) == NUMBERFORMAT_PERCENT)
+ if (ImplGetFormatter()->GetType(m_nFormatKey) == css::util::NumberFormat::PERCENT)
{
// the language of our format
LanguageType eLanguage = m_pFormatter->GetEntry(m_nFormatKey)->GetLanguage();
// the default number format for this language
- sal_uLong nStandardNumericFormat = m_pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, eLanguage);
+ sal_uLong nStandardNumericFormat = m_pFormatter->GetStandardFormat(css::util::NumberFormat::NUMBER, eLanguage);
sal_uInt32 nTempFormat = nStandardNumericFormat;
double dTemp;
if (m_pFormatter->IsNumberFormat(sText, nTempFormat, dTemp) &&
- NUMBERFORMAT_NUMBER == m_pFormatter->GetType(nTempFormat))
+ css::util::NumberFormat::NUMBER == m_pFormatter->GetType(nTempFormat))
// the string is equivalent to a number formatted one (has no % sign) -> append it
sText += "%";
// (with this, a input of '3' becomes '3%', which then by the formatter is translated
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index dda14b3fe287..133adfa71a1b 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -71,7 +71,7 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
, eValType ( eNumValType )
, bUndoAddList ( true )
, nCurFormatKey ( nFormatKey )
- , nCurCategory (NUMBERFORMAT_ALL)
+ , nCurCategory (css::util::NumberFormat::ALL)
, eCurLanguage (LANGUAGE_NONE)
, pCurCurrencyEntry(NULL)
, bBankingSymbol (false)
@@ -104,7 +104,7 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
, eValType ( eNumValType )
, bUndoAddList ( true )
, nCurFormatKey ( nFormatKey )
- , nCurCategory (NUMBERFORMAT_ALL)
+ , nCurCategory (css::util::NumberFormat::ALL)
, eCurLanguage (LANGUAGE_NONE)
, pCurCurrencyEntry(NULL)
, bBankingSymbol (false)
@@ -184,7 +184,7 @@ void SvxNumberFormatShell::CategoryChanged( sal_uInt16 nCatLbPos,
nCurFormatKey,
eCurLanguage ) );
// reinitialize currency if category newly entered
- if ( nCurCategory == NUMBERFORMAT_CURRENCY && nOldCategory != nCurCategory )
+ if ( nCurCategory == css::util::NumberFormat::CURRENCY && nOldCategory != nCurCategory )
pCurCurrencyEntry = NULL;
rFmtSelPos = FillEntryList_Impl( rFmtEntries );
}
@@ -216,7 +216,7 @@ void SvxNumberFormatShell::FormatChanged( sal_uInt16 nFmtLbPos,
{
GetPreviewString_Impl( rPreviewStr, rpFontColor );
}
- else if( nCurCategory == NUMBERFORMAT_CURRENCY )
+ else if( nCurCategory == css::util::NumberFormat::CURRENCY )
{
if( static_cast<size_t>(nFmtLbPos) < aCurrencyFormatList.size() )
{
@@ -431,7 +431,7 @@ void SvxNumberFormatShell::MakePreviewString( const OUString& rFormatStr,
// #50441# if a string was set in addition to the value, use it for text formats
bool bUseText = ( eValType == SVX_VALUE_TYPE_STRING ||
- ( !aValStr.isEmpty() && ( pFormatter->GetType(nExistingFormat) & NUMBERFORMAT_TEXT ) ) );
+ ( !aValStr.isEmpty() && ( pFormatter->GetType(nExistingFormat) & css::util::NumberFormat::TEXT ) ) );
if ( bUseText )
{
pFormatter->GetOutputString( aValStr, nExistingFormat,
@@ -520,7 +520,7 @@ void SvxNumberFormatShell::GetInitSettings( sal_uInt16& nCatLbPos,
if ( (eValType == SVX_VALUE_TYPE_UNDEFINED) && (nCurFormatKey == 0) )
PosToCategory_Impl( CAT_ALL, nCurCategory ); // Kategorie = Alle
else
- nCurCategory = NUMBERFORMAT_UNDEFINED; // Kategorie = Undefiniert
+ nCurCategory = css::util::NumberFormat::UNDEFINED; // Kategorie = Undefiniert
pCurFmtTable = &(pFormatter->GetFirstEntryTable( nCurCategory,
nCurFormatKey,
@@ -554,7 +554,7 @@ short SvxNumberFormatShell::FillEntryList_Impl( std::vector<OUString>& rList )
aCurEntryList.clear();
- if(nCurCategory==NUMBERFORMAT_ALL)
+ if(nCurCategory==css::util::NumberFormat::ALL)
{
FillEListWithStd_Impl(rList,CAT_NUMBER,nSelPos);
FillEListWithStd_Impl(rList,CAT_PERCENT,nSelPos);
@@ -671,7 +671,7 @@ short SvxNumberFormatShell::FillEListWithFormats_Impl( std::vector<OUString>& rL
if(pNumEntry==NULL) continue;
- nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ nMyCat=pNumEntry->GetType() & ~css::util::NumberFormat::DEFINED;
aStrComment=pNumEntry->GetComment();
CategoryToPos_Impl(nMyCat,nMyType);
aNewFormNInfo= pNumEntry->GetFormatstring();
@@ -709,7 +709,7 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl( std::vector<OUString>& r
pNumEntry = pFormatter->GetEntry(nNFEntry);
if(pNumEntry!=NULL)
{
- nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ nMyCat=pNumEntry->GetType() & ~css::util::NumberFormat::DEFINED;
aStrComment=pNumEntry->GetComment();
CategoryToPos_Impl(nMyCat,nMyType);
aNewFormNInfo= pNumEntry->GetFormatstring();
@@ -746,9 +746,9 @@ short SvxNumberFormatShell::FillEListWithCurrency_Impl( std::vector<OUString>& r
if( (!bFlag && pCurCurrencyEntry==NULL) ||
(bFlag && pTmpCurrencyEntry==NULL && rSymbol.isEmpty()) ||
- (nCurCategory==NUMBERFORMAT_ALL))
+ (nCurCategory==css::util::NumberFormat::ALL))
{
- if ( nCurCategory == NUMBERFORMAT_ALL )
+ if ( nCurCategory == css::util::NumberFormat::ALL )
FillEListWithUserCurrencys(rList,nSelPos);
nSelPos=FillEListWithSysCurrencys(rList,nSelPos);
}
@@ -794,7 +794,7 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<OUString>& rL
if(pNumEntry==NULL) continue;
- nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ nMyCat=pNumEntry->GetType() & ~css::util::NumberFormat::DEFINED;
aStrComment=pNumEntry->GetComment();
CategoryToPos_Impl(nMyCat,nMyType);
aNewFormNInfo= pNumEntry->GetFormatstring();
@@ -808,7 +808,7 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<OUString>& rL
aCurEntryList.push_back( nNFEntry );
}
- if(nCurCategory!=NUMBERFORMAT_ALL)
+ if(nCurCategory!=css::util::NumberFormat::ALL)
{
SvNumberFormatTable::iterator it = pCurFmtTable->begin();
@@ -833,9 +833,9 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<OUString>& rL
bUserNewCurrency=(pTmpCurrencyEntry!=NULL);
}
- if(!bUserNewCurrency &&(pNumEntry->GetType() & NUMBERFORMAT_DEFINED))
+ if(!bUserNewCurrency &&(pNumEntry->GetType() & css::util::NumberFormat::DEFINED))
{
- nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ nMyCat=pNumEntry->GetType() & ~css::util::NumberFormat::DEFINED;
aStrComment=pNumEntry->GetComment();
CategoryToPos_Impl(nMyCat,nMyType);
aNewFormNInfo= pNumEntry->GetFormatstring();
@@ -919,10 +919,10 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<OUString>& r
if ( !IsRemoved_Impl( nKey ) )
{
- if( pNumEntry->GetType() & NUMBERFORMAT_DEFINED ||
+ if( pNumEntry->GetType() & css::util::NumberFormat::DEFINED ||
pNumEntry->IsAdditionalBuiltin() )
{
- nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ nMyCat=pNumEntry->GetType() & ~css::util::NumberFormat::DEFINED;
aStrComment = pNumEntry->GetComment();
CategoryToPos_Impl(nMyCat,nMyType);
aNewFormNInfo = pNumEntry->GetFormatstring();
@@ -967,7 +967,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<OUString>& r
NfWSStringsDtor aWSStringsDtor;
sal_uInt16 nDefault;
- if ( pTmpCurrencyEntry && nCurCategory != NUMBERFORMAT_ALL )
+ if ( pTmpCurrencyEntry && nCurCategory != css::util::NumberFormat::ALL )
{
nDefault = pFormatter->GetCurrencyFormatStrings(
aWSStringsDtor, *pTmpCurrencyEntry, bTmpBanking );
@@ -977,7 +977,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<OUString>& r
}
else
nDefault = 0;
- if ( !bTmpBanking && nCurCategory != NUMBERFORMAT_ALL )
+ if ( !bTmpBanking && nCurCategory != css::util::NumberFormat::ALL )
{ // append formats for all currencies defined in the current I18N locale
const NfCurrencyTable& rCurrencyTable = SvNumberFormatter::GetTheCurrencyTable();
sal_uInt16 nCurrCount = rCurrencyTable.size();
@@ -1038,7 +1038,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<OUString>& r
nSelPos = i;
}
- if ( nSelPos == SELPOS_NONE && nCurCategory != NUMBERFORMAT_ALL )
+ if ( nSelPos == SELPOS_NONE && nCurCategory != css::util::NumberFormat::ALL )
nSelPos = nDefault;
return nSelPos;
@@ -1062,7 +1062,7 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl( std::vector<OUString>& rList,
short nMyCat = SELPOS_NONE;
bool bAdditional = (nPrivCat != CAT_USERDEFINED &&
- nCurCategory != NUMBERFORMAT_ALL);
+ nCurCategory != css::util::NumberFormat::ALL);
SvNumberFormatTable::iterator it = pCurFmtTable->begin();
while ( it != pCurFmtTable->end() )
@@ -1072,10 +1072,10 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl( std::vector<OUString>& rList,
if ( !IsRemoved_Impl( nKey ) )
{
- if( (pNumEntry->GetType() & NUMBERFORMAT_DEFINED) ||
+ if( (pNumEntry->GetType() & css::util::NumberFormat::DEFINED) ||
(bAdditional && pNumEntry->IsAdditionalBuiltin()) )
{
- nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ nMyCat=pNumEntry->GetType() & ~css::util::NumberFormat::DEFINED;
aStrComment=pNumEntry->GetComment();
CategoryToPos_Impl(nMyCat,nMyType);
aNewFormNInfo= pNumEntry->GetFormatstring();
@@ -1109,7 +1109,7 @@ void SvxNumberFormatShell::GetPreviewString_Impl( OUString& rString, Color*& rpC
// #50441# if a string was set in addition to the value, use it for text formats
bool bUseText = ( eValType == SVX_VALUE_TYPE_STRING ||
- ( !aValStr.isEmpty() && ( pFormatter->GetType(nCurFormatKey) & NUMBERFORMAT_TEXT ) ) );
+ ( !aValStr.isEmpty() && ( pFormatter->GetType(nCurFormatKey) & css::util::NumberFormat::TEXT ) ) );
if ( bUseText )
{
@@ -1155,18 +1155,18 @@ void SvxNumberFormatShell::PosToCategory_Impl(sal_uInt16 nPos, short& rCategory)
// Kategorie ::com::sun::star::form-Positionen abbilden (->Resource)
switch ( nPos )
{
- case CAT_USERDEFINED: rCategory = NUMBERFORMAT_DEFINED; break;
- case CAT_NUMBER: rCategory = NUMBERFORMAT_NUMBER; break;
- case CAT_PERCENT: rCategory = NUMBERFORMAT_PERCENT; break;
- case CAT_CURRENCY: rCategory = NUMBERFORMAT_CURRENCY; break;
- case CAT_DATE: rCategory = NUMBERFORMAT_DATE; break;
- case CAT_TIME: rCategory = NUMBERFORMAT_TIME; break;
- case CAT_SCIENTIFIC: rCategory = NUMBERFORMAT_SCIENTIFIC; break;
- case CAT_FRACTION: rCategory = NUMBERFORMAT_FRACTION; break;
- case CAT_BOOLEAN: rCategory = NUMBERFORMAT_LOGICAL; break;
- case CAT_TEXT: rCategory = NUMBERFORMAT_TEXT; break;
+ case CAT_USERDEFINED: rCategory = css::util::NumberFormat::DEFINED; break;
+ case CAT_NUMBER: rCategory = css::util::NumberFormat::NUMBER; break;
+ case CAT_PERCENT: rCategory = css::util::NumberFormat::PERCENT; break;
+ case CAT_CURRENCY: rCategory = css::util::NumberFormat::CURRENCY; break;
+ case CAT_DATE: rCategory = css::util::NumberFormat::DATE; break;
+ case CAT_TIME: rCategory = css::util::NumberFormat::TIME; break;
+ case CAT_SCIENTIFIC: rCategory = css::util::NumberFormat::SCIENTIFIC; break;
+ case CAT_FRACTION: rCategory = css::util::NumberFormat::FRACTION; break;
+ case CAT_BOOLEAN: rCategory = css::util::NumberFormat::LOGICAL; break;
+ case CAT_TEXT: rCategory = css::util::NumberFormat::TEXT; break;
case CAT_ALL:
- default: rCategory = NUMBERFORMAT_ALL; break;
+ default: rCategory = css::util::NumberFormat::ALL; break;
}
}
@@ -1175,18 +1175,18 @@ void SvxNumberFormatShell::CategoryToPos_Impl(short nCategory, sal_uInt16& rPos)
// Kategorie auf ::com::sun::star::form-Positionen abbilden (->Resource)
switch ( nCategory )
{
- case NUMBERFORMAT_DEFINED: rPos = CAT_USERDEFINED; break;
- case NUMBERFORMAT_NUMBER: rPos = CAT_NUMBER; break;
- case NUMBERFORMAT_PERCENT: rPos = CAT_PERCENT; break;
- case NUMBERFORMAT_CURRENCY: rPos = CAT_CURRENCY; break;
- case NUMBERFORMAT_DATETIME:
- case NUMBERFORMAT_DATE: rPos = CAT_DATE; break;
- case NUMBERFORMAT_TIME: rPos = CAT_TIME; break;
- case NUMBERFORMAT_SCIENTIFIC: rPos = CAT_SCIENTIFIC; break;
- case NUMBERFORMAT_FRACTION: rPos = CAT_FRACTION; break;
- case NUMBERFORMAT_LOGICAL: rPos = CAT_BOOLEAN; break;
- case NUMBERFORMAT_TEXT: rPos = CAT_TEXT; break;
- case NUMBERFORMAT_ALL:
+ case css::util::NumberFormat::DEFINED: rPos = CAT_USERDEFINED; break;
+ case css::util::NumberFormat::NUMBER: rPos = CAT_NUMBER; break;
+ case css::util::NumberFormat::PERCENT: rPos = CAT_PERCENT; break;
+ case css::util::NumberFormat::CURRENCY: rPos = CAT_CURRENCY; break;
+ case css::util::NumberFormat::DATETIME:
+ case css::util::NumberFormat::DATE: rPos = CAT_DATE; break;
+ case css::util::NumberFormat::TIME: rPos = CAT_TIME; break;
+ case css::util::NumberFormat::SCIENTIFIC: rPos = CAT_SCIENTIFIC; break;
+ case css::util::NumberFormat::FRACTION: rPos = CAT_FRACTION; break;
+ case css::util::NumberFormat::LOGICAL: rPos = CAT_BOOLEAN; break;
+ case css::util::NumberFormat::TEXT: rPos = CAT_TEXT; break;
+ case css::util::NumberFormat::ALL:
default: rPos = CAT_ALL;
}
}
@@ -1263,7 +1263,7 @@ short SvxNumberFormatShell::GetCategory4Entry(short nEntry) const
sal_uInt16 nMyCat,nMyType;
if(pNumEntry!=NULL)
{
- nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ nMyCat=pNumEntry->GetType() & ~css::util::NumberFormat::DEFINED;
CategoryToPos_Impl(nMyCat,nMyType);
return (short) nMyType;
@@ -1295,7 +1295,7 @@ bool SvxNumberFormatShell::GetUserDefined4Entry(short nEntry)
if(pNumEntry!=NULL)
{
- if((pNumEntry->GetType() & NUMBERFORMAT_DEFINED)>0)
+ if((pNumEntry->GetType() & css::util::NumberFormat::DEFINED)>0)
{
return true;
}
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index b343a8b32dc0..6f398f1a84e4 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -32,7 +32,7 @@ class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item
{
bool bAuto; ///< automatically given flag
public:
- SwTblBoxNumFormat( sal_uInt32 nFormat = NUMBERFORMAT_TEXT,
+ SwTblBoxNumFormat( sal_uInt32 nFormat = css::util::NumberFormat::TEXT,
bool bAuto = false );
// "pure virtual methods" of SfxPoolItem
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 93569859569c..ac07c64090e5 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -277,7 +277,7 @@ double SwSortBoxElement::GetValue( sal_uInt16 nKey ) const
if( pFndBox )
{
const SwFmt *pFmt = pFndBox->GetBox()->GetFrmFmt();
- if (pFmt->GetTblBoxNumFmt().GetValue() & NUMBERFORMAT_TEXT)
+ if (pFmt->GetTblBoxNumFmt().GetValue() & css::util::NumberFormat::TEXT)
nVal = SwSortElement::GetValue( nKey );
else
nVal = pFmt->GetTblBoxValue().GetValue();
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index fa262dea4cde..4ec9266a3459 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -4024,7 +4024,7 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, bool bCallUpdate )
SvNumberFormatter* pNumFmtr = GetNumberFormatter();
short nFmtType = pNumFmtr->GetType( nFmtIdx );
- if( nFmtType == pNumFmtr->GetType( nOldNumFmt ) || NUMBERFORMAT_NUMBER == nFmtType )
+ if( nFmtType == pNumFmtr->GetType( nOldNumFmt ) || css::util::NumberFormat::NUMBER == nFmtType )
{
// Current and specified NumFormat match
// -> keep old Format
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index fd08d961e02c..d747c3c1ce73 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -393,7 +393,7 @@ bool SwEditShell::IsTableBoxTextFormat() const
{
nFmt = static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue();
return GetDoc()->GetNumberFormatter()->IsTextFormat( nFmt ) ||
- NUMBERFORMAT_TEXT == nFmt;
+ css::util::NumberFormat::TEXT == nFmt;
}
sal_uLong nNd = pBox->IsValidNumTxtNd();
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 2262c396bd0c..7b18c5322c84 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -217,15 +217,15 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
SvNumberFormatter* pNumFmtr = pDoc->GetNumberFormatter();
- if( NUMBERFORMAT_TEXT == nFmtIndex )
+ if( css::util::NumberFormat::TEXT == nFmtIndex )
nFmtIndex = 0;
// JP 22.04.98: Bug 49659 - special treatment for percentages
else if( !sTxt.isEmpty() &&
- NUMBERFORMAT_PERCENT == pNumFmtr->GetType( nFmtIndex ))
+ css::util::NumberFormat::PERCENT == pNumFmtr->GetType( nFmtIndex ))
{
sal_uInt32 nTmpFmt = 0;
if( pNumFmtr->IsNumberFormat( sTxt, nTmpFmt, aNum ) &&
- NUMBERFORMAT_NUMBER == pNumFmtr->GetType( nTmpFmt ))
+ css::util::NumberFormat::NUMBER == pNumFmtr->GetType( nTmpFmt ))
sTxt += OUString('%');
}
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index f9114ac9ca43..0cf94f3ba6be 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -462,7 +462,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
if( nFmt < SV_COUNTRY_LANGUAGE_OFFSET && LANGUAGE_SYSTEM != nFmtLng )
{
- short nType = NUMBERFORMAT_DEFINED;
+ short nType = css::util::NumberFormat::DEFINED;
sal_Int32 nDummy;
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
@@ -579,7 +579,7 @@ sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt
if (nNewFormat == nFmt)
{
// probably user-defined format
- short nType = NUMBERFORMAT_DEFINED;
+ short nType = css::util::NumberFormat::DEFINED;
sal_Int32 nDummy;
OUString sFmt(pEntry->GetFormatstring());
@@ -622,7 +622,7 @@ void SwValueField::SetLanguage( sal_uInt16 nLng )
if( nNewFormat == GetFormat() )
{
// probably user-defined format
- short nType = NUMBERFORMAT_DEFINED;
+ short nType = css::util::NumberFormat::DEFINED;
sal_Int32 nDummy;
OUString sFmt( pEntry->GetFormatstring() );
pFormatter->PutandConvertEntry( sFmt, nDummy, nType,
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 2f275d2a406a..d74817ae8b24 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2088,7 +2088,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
const SfxPoolItem* pItem;
Color* pCol = 0;
- if( NUMBERFORMAT_TEXT != nFmt )
+ if( css::util::NumberFormat::TEXT != nFmt )
{
// special text format:
OUString sTmp;
@@ -2174,7 +2174,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
const SwTblBoxNumFormat *pNewFmt = 0;
const SwTblBoxFormula *pNewFml = 0;
const SwTblBoxValue *pNewVal = 0;
- sal_uLong nOldFmt = NUMBERFORMAT_TEXT;
+ sal_uLong nOldFmt = css::util::NumberFormat::TEXT;
switch( pNew ? pNew->Which() : 0 )
{
@@ -2240,14 +2240,14 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
// is it newer or has the current been removed?
if( pNewVal )
{
- if( NUMBERFORMAT_TEXT != nNewFmt )
+ if( css::util::NumberFormat::TEXT != nNewFmt )
{
if( SfxItemState::SET == GetItemState( RES_BOXATR_VALUE, false ))
- nOldFmt = NUMBERFORMAT_TEXT;
+ nOldFmt = css::util::NumberFormat::TEXT;
else
- nNewFmt = NUMBERFORMAT_TEXT;
+ nNewFmt = css::util::NumberFormat::TEXT;
}
- else if( NUMBERFORMAT_TEXT == nNewFmt )
+ else if( css::util::NumberFormat::TEXT == nNewFmt )
nOldFmt = 0;
}
@@ -2263,7 +2263,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
// - align top for vertical alignment, if BOTTOM is set
SvNumberFormatter* pNumFmtr = GetDoc()->GetNumberFormatter();
bool bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) ||
- NUMBERFORMAT_TEXT == nNewFmt;
+ css::util::NumberFormat::TEXT == nNewFmt;
if( (!bNewIsTxtFmt && nOldFmt != nNewFmt) || pNewFml )
{
@@ -2289,14 +2289,14 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
// JP 22.04.98: Bug 49659 -
// Special casing for percent
bool bIsNumFmt = false;
- if( NUMBERFORMAT_PERCENT ==
+ if( css::util::NumberFormat::PERCENT ==
pNumFmtr->GetType( nNewFmt ))
{
sal_uInt32 nTmpFmt = 0;
if( pNumFmtr->IsNumberFormat(
aTxt, nTmpFmt, fVal ))
{
- if( NUMBERFORMAT_NUMBER ==
+ if( css::util::NumberFormat::NUMBER ==
pNumFmtr->GetType( nTmpFmt ))
aTxt += "%";
@@ -2390,11 +2390,11 @@ bool SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
{
rFmtIndex = static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue();
// Special casing for percent
- if( !rIsEmptyTxtNd && NUMBERFORMAT_PERCENT == pNumFmtr->GetType( rFmtIndex ))
+ if( !rIsEmptyTxtNd && css::util::NumberFormat::PERCENT == pNumFmtr->GetType( rFmtIndex ))
{
sal_uInt32 nTmpFmt = 0;
if( pNumFmtr->IsNumberFormat( aTxt, nTmpFmt, rNum ) &&
- NUMBERFORMAT_NUMBER == pNumFmtr->GetType( nTmpFmt ))
+ css::util::NumberFormat::NUMBER == pNumFmtr->GetType( nTmpFmt ))
aTxt += "%";
}
}
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 8b16c9cec956..6e169d4e2818 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1599,7 +1599,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const Date aDateDiff( pField->GetDate() -
*pNumFormatter->GetNullDate() );
const sal_uLong nFormat =
- pNumFormatter->GetStandardFormat( NUMBERFORMAT_DATE, pField->GetLanguage() );
+ pNumFormatter->GetStandardFormat( css::util::NumberFormat::DATE, pField->GetLanguage() );
OUString sDate;
Color* pColor;
pNumFormatter->GetOutputString( aDateDiff.GetDate(), nFormat, sDate, &pColor );
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 1e83bd01a1ed..aab5ca98ff96 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2149,7 +2149,7 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox,
: SwUndo(UNDO_TBLNUMFMT)
, pBoxSet(0)
, pHistory(0)
- , nFmtIdx(NUMBERFORMAT_TEXT)
+ , nFmtIdx(css::util::NumberFormat::TEXT)
, nNewFmtIdx(0)
, fNum(0.0)
, fNewNum(0.0)
@@ -2358,7 +2358,7 @@ void SwUndoTblNumFmt::RedoImpl(::sw::UndoRedoContext & rContext)
RedlineModeInternGuard aGuard( rDoc, nsRedlineMode_t::REDLINE_NONE, nsRedlineMode_t::REDLINE_IGNORE );
pBoxFmt->SetFmtAttr( aBoxSet );
}
- else if( NUMBERFORMAT_TEXT != nFmtIdx )
+ else if( css::util::NumberFormat::TEXT != nFmtIdx )
{
SfxItemSet aBoxSet( rDoc.GetAttrPool(),
RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index bdd055d7289c..b8b16faa481f 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -719,7 +719,7 @@ void sw_setString( SwXCell &rCell, const OUString &rTxt,
pBoxFmt->ResetFmtAttr( RES_BOXATR_FORMULA );
pBoxFmt->ResetFmtAttr( RES_BOXATR_VALUE );
if (!bKeepNumberFmt)
- pBoxFmt->SetFmtAttr( SwTblBoxNumFormat(NUMBERFORMAT_TEXT) );
+ pBoxFmt->SetFmtAttr( SwTblBoxNumFormat(css::util::NumberFormat::TEXT) );
pBoxFmt->UnlockModify();
}
rCell.SwXText::setString(rTxt);
@@ -757,7 +757,7 @@ void sw_setValue( SwXCell &rCell, double nVal )
// - the current number format is not even a valid number formatter number format, but rather Writer's own 'special' text number format
if(SfxItemState::SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
|| pDoc->GetNumberFormatter()->IsTextFormat(static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue())
- || static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue() == NUMBERFORMAT_TEXT)
+ || static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue() == css::util::NumberFormat::TEXT)
{
aSet.Put(SwTblBoxNumFormat(0));
}
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 0ded359451b4..cd05e23afeee 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -389,8 +389,8 @@ void SwHTMLParser::NewField()
short nFmtType = pFormatter->GetType( nNumFmt );
switch( nFmtType )
{
- case NUMBERFORMAT_DATE: nSub = DATEFLD; break;
- case NUMBERFORMAT_TIME: nSub = TIMEFLD; break;
+ case css::util::NumberFormat::DATE: nSub = DATEFLD; break;
+ case css::util::NumberFormat::TIME: nSub = TIMEFLD; break;
}
if( nSub )
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index eee2364a8d7c..92d32d0e6a25 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -887,7 +887,7 @@ namespace sw
{
// tell the Formatter about the new entry
sal_Int32 nCheckPos = 0;
- short nType = NUMBERFORMAT_DEFINED;
+ short nType = css::util::NumberFormat::DEFINED;
sal_uInt32 nKey = 0;
SwapQuotesInField(rParams);
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 0517499c3443..9e028e25cba9 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -451,7 +451,7 @@ short SwWW8ImplReader::GetTimeDatePara(OUString& rStr, sal_uInt32& rFormat,
sParams = "[~hijri]" + sParams;
sal_Int32 nCheckPos = 0;
- short nType = NUMBERFORMAT_DEFINED;
+ short nType = css::util::NumberFormat::DEFINED;
rFormat = 0;
OUString sTemp(sParams);
@@ -459,13 +459,13 @@ short SwWW8ImplReader::GetTimeDatePara(OUString& rStr, sal_uInt32& rFormat,
LANGUAGE_ENGLISH_US, rLang);
sParams = sTemp;
- return bHasTime ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE;
+ return bHasTime ? css::util::NumberFormat::DATETIME : css::util::NumberFormat::DATE;
}
sal_uLong nFmtIdx =
sw::ms::MSDateTimeFormatToSwFormat(sParams, pFormatter, rLang, bHijri,
GetFib().lid);
- short nNumFmtType = NUMBERFORMAT_UNDEFINED;
+ short nNumFmtType = css::util::NumberFormat::UNDEFINED;
if (nFmtIdx)
nNumFmtType = pFormatter->GetType(nFmtIdx);
rFormat = nFmtIdx;
@@ -1596,13 +1596,13 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, OUString& rStr )
short nDT = GetTimeDatePara(rStr, nFormat, nLang, pF->nId);
switch (nDT)
{
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
nReg = DI_SUB_DATE;
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
nReg = DI_SUB_TIME;
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
nReg = DI_SUB_DATE;
break;
default:
@@ -1696,30 +1696,30 @@ eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, OUString& rStr )
sal_uInt16 nLang(0);
short nDT = GetTimeDatePara(rStr, nFormat, nLang, ww::eDATE, bHijri);
- if( NUMBERFORMAT_UNDEFINED == nDT ) // no D/T-Formatstring
+ if( css::util::NumberFormat::UNDEFINED == nDT ) // no D/T-Formatstring
{
if (32 == pF->nId)
{
- nDT = NUMBERFORMAT_TIME;
+ nDT = css::util::NumberFormat::TIME;
nFormat = rDoc.GetNumberFormatter()->GetFormatIndex(
NF_TIME_START, LANGUAGE_SYSTEM );
}
else
{
- nDT = NUMBERFORMAT_DATE;
+ nDT = css::util::NumberFormat::DATE;
nFormat = rDoc.GetNumberFormatter()->GetFormatIndex(
NF_DATE_START, LANGUAGE_SYSTEM );
}
}
- if (nDT & NUMBERFORMAT_DATE)
+ if (nDT & css::util::NumberFormat::DATE)
{
SwDateTimeField aFld(static_cast<SwDateTimeFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_DATETIMEFLD )), DATEFLD, nFormat);
ForceFieldLanguage(aFld, nLang);
rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
}
- else if (nDT == NUMBERFORMAT_TIME)
+ else if (nDT == css::util::NumberFormat::TIME)
{
SwDateTimeField aFld(static_cast<SwDateTimeFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_DATETIMEFLD)), TIMEFLD, nFormat);
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index 634da16cf838..ec0594b0f402 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -111,7 +111,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
sal_Int32 nFormat = (sal_Int32)
static_cast<const SwTblBoxNumFormat *>(pItem)->GetValue();
- if ( (nFormat != -1) && (nFormat != NUMBERFORMAT_TEXT) )
+ if ( (nFormat != -1) && (nFormat != css::util::NumberFormat::TEXT) )
{
// if we have a format, register and then export
// (Careful: here we assume that data styles will be
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index b1db68f5f91c..27eb9c49534f 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -797,7 +797,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox,
Any aAny = xCellPropertySet->getPropertyValue(sNumberFormat);
aAny >>= nNumberFormat;
- if (NUMBERFORMAT_TEXT == nNumberFormat)
+ if (css::util::NumberFormat::TEXT == nNumberFormat)
{
// text format
AddAttribute( XML_NAMESPACE_OFFICE,
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index dc7caf05b44e..4bfa2db530d4 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1095,7 +1095,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
aTblSet.ClearItem( RES_BOXATR_VALUE );
else
{
- if(rNumFmtr.GetType(aNumFmt.GetValue()) & NUMBERFORMAT_DATE)
+ if(rNumFmtr.GetType(aNumFmt.GetValue()) & css::util::NumberFormat::DATE)
{
::Date aStandard(1,1,1900);
if (*rNumFmtr.GetNullDate() != aStandard)
@@ -1323,7 +1323,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
DBL_MAX != nValue )
{
Color* pCol;
- if(rNumFmtr.GetType(pDBCol->DB_ColumnData.nFormat) & NUMBERFORMAT_DATE)
+ if(rNumFmtr.GetType(pDBCol->DB_ColumnData.nFormat) & css::util::NumberFormat::DATE)
{
::Date aStandard(1,1,1900);
if (*rNumFmtr.GetNullDate() != aStandard)
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index f531becfa996..1655f570b768 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -253,15 +253,15 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
const uno::Type& rValueType = aVal.getValueType();
if( rValueType == ::cppu::UnoType<util::DateTime>::get())
{
- nNewType = NUMBERFORMAT_DATETIME;
+ nNewType = css::util::NumberFormat::DATETIME;
}
else if( rValueType == ::cppu::UnoType<util::Date>::get())
{
- nNewType = NUMBERFORMAT_DATE;
+ nNewType = css::util::NumberFormat::DATE;
}
else if( rValueType == ::cppu::UnoType<util::Time>::get())
{
- nNewType = NUMBERFORMAT_TIME;
+ nNewType = css::util::NumberFormat::TIME;
}
}
catch( const uno::Exception& )
@@ -292,12 +292,12 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
break;
case DI_SUB_DATE:
- nNewType = NUMBERFORMAT_DATE;
+ nNewType = css::util::NumberFormat::DATE;
bOneArea = true;
break;
case DI_SUB_TIME:
- nNewType = NUMBERFORMAT_TIME;
+ nNewType = css::util::NumberFormat::TIME;
bOneArea = true;
break;
}
@@ -329,16 +329,16 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
nOldSubType &= ~DI_SUB_FIXED;
if (nOldSubType == nSubType)
{
- if (!nFormat && (nNewType == NUMBERFORMAT_DATE || nNewType == NUMBERFORMAT_TIME))
+ if (!nFormat && (nNewType == css::util::NumberFormat::DATE || nNewType == css::util::NumberFormat::TIME))
{
SwWrtShell *pSh = GetWrtShell();
if(pSh)
{
SvNumberFormatter* pFormatter = pSh->GetNumberFormatter();
LanguageType eLang = m_pFormatLB->GetCurLanguage();
- if (nNewType == NUMBERFORMAT_DATE)
+ if (nNewType == css::util::NumberFormat::DATE)
nFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eLang);
- else if (nNewType == NUMBERFORMAT_TIME)
+ else if (nNewType == css::util::NumberFormat::TIME)
nFormat = pFormatter->GetFormatIndex( NF_TIME_HHMM, eLang);
}
}
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index db9632e2ed16..ea3ec74a5bb9 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -312,7 +312,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
case TYP_DATEFLD:
bFormat = bNumFmt = bOneArea = bOffset = true;
- nFmtType = NUMBERFORMAT_DATE;
+ nFmtType = css::util::NumberFormat::DATE;
m_pDateFT->Show();
@@ -326,7 +326,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
case TYP_TIMEFLD:
bFormat = bNumFmt = bOneArea = bOffset = true;
- nFmtType = NUMBERFORMAT_TIME;
+ nFmtType = css::util::NumberFormat::TIME;
m_pTimeFT->Show();
@@ -392,7 +392,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
{
m_pNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
- if (m_pNumFormatLB->GetFormatType() == (NUMBERFORMAT_DATE|NUMBERFORMAT_TIME))
+ if (m_pNumFormatLB->GetFormatType() == (css::util::NumberFormat::DATE|css::util::NumberFormat::TIME))
{
// always set Format-Type because otherwise when date/time formats are combined,
// both formats would be displayed at the same time
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 526618ed7836..e0b3dd614975 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -710,7 +710,7 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
}
else if (nTypeId == TYP_GETFLD || nTypeId == TYP_FORMELFLD)
{
- m_pNumFormatLB->SetFormatType(NUMBERFORMAT_NUMBER);
+ m_pNumFormatLB->SetFormatType(css::util::NumberFormat::NUMBER);
}
}
else
@@ -718,7 +718,7 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
if (nOldNumFormat && nOldNumFormat != ULONG_MAX)
m_pNumFormatLB->SetDefFormat(nOldNumFormat);
else
- m_pNumFormatLB->SetFormatType(NUMBERFORMAT_NUMBER);
+ m_pNumFormatLB->SetFormatType(css::util::NumberFormat::NUMBER);
}
}
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 7337c66d58fa..cfbdeae88759 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1675,7 +1675,7 @@ sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberF
fValue += (double)nNumFmtTime / 86400.0;
- nDefFormat = (nTypeId == TYP_DATEFLD) ? NUMBERFORMAT_DATE : NUMBERFORMAT_TIME;
+ nDefFormat = (nTypeId == TYP_DATEFLD) ? css::util::NumberFormat::DATE : css::util::NumberFormat::TIME;
}
break;
@@ -1683,12 +1683,12 @@ sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberF
if (bIsText)
{
fValue = 0.0;
- nDefFormat = NUMBERFORMAT_TEXT;
+ nDefFormat = css::util::NumberFormat::TEXT;
}
else
{
fValue = 0.0;
- nDefFormat = NUMBERFORMAT_ALL;
+ nDefFormat = css::util::NumberFormat::ALL;
}
break;
}
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index ecb1dbc56654..6d7c51c88b2d 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -1435,15 +1435,15 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
}
}
break;
- case FN_NUMBER_STANDARD: nFmtType = NUMBERFORMAT_NUMBER; break;
- case FN_NUMBER_SCIENTIFIC: nFmtType = NUMBERFORMAT_SCIENTIFIC; break;
- case FN_NUMBER_DATE: nFmtType = NUMBERFORMAT_DATE; break;
- case FN_NUMBER_TIME: nFmtType = NUMBERFORMAT_TIME; break;
- case FN_NUMBER_CURRENCY: nFmtType = NUMBERFORMAT_CURRENCY; break;
- case FN_NUMBER_PERCENT: nFmtType = NUMBERFORMAT_PERCENT; break;
+ case FN_NUMBER_STANDARD: nFmtType = css::util::NumberFormat::NUMBER; break;
+ case FN_NUMBER_SCIENTIFIC: nFmtType = css::util::NumberFormat::SCIENTIFIC; break;
+ case FN_NUMBER_DATE: nFmtType = css::util::NumberFormat::DATE; break;
+ case FN_NUMBER_TIME: nFmtType = css::util::NumberFormat::TIME; break;
+ case FN_NUMBER_CURRENCY: nFmtType = css::util::NumberFormat::CURRENCY; break;
+ case FN_NUMBER_PERCENT: nFmtType = css::util::NumberFormat::PERCENT; break;
case FN_NUMBER_TWODEC: // #.##0,00
- nFmtType = NUMBERFORMAT_NUMBER;
+ nFmtType = css::util::NumberFormat::NUMBER;
nOffset = NF_NUMBER_1000DEC2;
break;
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index fc1b7d5c2990..c4411af5eccb 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -65,7 +65,7 @@ NumFormatListBox::NumFormatListBox(vcl::Window* pWin, WinBits nStyle) :
bShowLanguageControl(false),
bUseAutomaticLanguage(true)
{
- Init(NUMBERFORMAT_NUMBER, true);
+ Init(css::util::NumberFormat::NUMBER, true);
}
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeNumFormatListBox(vcl::Window *pParent, VclBuilder::stringmap &rMap)
@@ -145,57 +145,57 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
switch( nFormatType )
{
- case NUMBERFORMAT_NUMBER:
+ case css::util::NumberFormat::NUMBER:
eOffsetStart=NF_NUMBER_START;
eOffsetEnd=NF_NUMBER_END;
break;
- case NUMBERFORMAT_PERCENT:
+ case css::util::NumberFormat::PERCENT:
eOffsetStart=NF_PERCENT_START;
eOffsetEnd=NF_PERCENT_END;
break;
- case NUMBERFORMAT_CURRENCY:
+ case css::util::NumberFormat::CURRENCY:
eOffsetStart=NF_CURRENCY_START;
eOffsetEnd=NF_CURRENCY_END;
break;
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATETIME:
eOffsetStart=NF_DATE_START;
eOffsetEnd=NF_TIME_END;
break;
- case NUMBERFORMAT_DATE:
+ case css::util::NumberFormat::DATE:
eOffsetStart=NF_DATE_START;
eOffsetEnd=NF_DATE_END;
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
eOffsetStart=NF_TIME_START;
eOffsetEnd=NF_TIME_END;
break;
- case NUMBERFORMAT_SCIENTIFIC:
+ case css::util::NumberFormat::SCIENTIFIC:
eOffsetStart=NF_SCIENTIFIC_START;
eOffsetEnd=NF_SCIENTIFIC_END;
break;
- case NUMBERFORMAT_FRACTION:
+ case css::util::NumberFormat::FRACTION:
eOffsetStart=NF_FRACTION_START;
eOffsetEnd=NF_FRACTION_END;
break;
- case NUMBERFORMAT_LOGICAL:
+ case css::util::NumberFormat::LOGICAL:
eOffsetStart=NF_BOOLEAN;
eOffsetEnd=NF_BOOLEAN;
break;
- case NUMBERFORMAT_TEXT:
+ case css::util::NumberFormat::TEXT:
eOffsetStart=NF_TEXT;
eOffsetEnd=NF_TEXT;
break;
- case NUMBERFORMAT_ALL:
+ case css::util::NumberFormat::ALL:
eOffsetStart=NF_NUMERIC_START;
eOffsetEnd = NfIndexTableOffset( NF_INDEX_TABLE_ENTRIES - 1 );
break;
@@ -228,11 +228,11 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
if( nFormat == pFormatter->GetFormatIndex( NF_NUMBER_STANDARD,
eCurLanguage )
|| ((SvNumberformat*)pFmt)->GetOutputString( fVal, sValue, &pCol )
- || nFormatType == NUMBERFORMAT_UNDEFINED )
+ || nFormatType == css::util::NumberFormat::UNDEFINED )
{
sValue = pFmt->GetFormatstring();
}
- else if( nFormatType == NUMBERFORMAT_TEXT )
+ else if( nFormatType == css::util::NumberFormat::TEXT )
{
pFormatter->GetOutputString( "\"ABC\"", nFormat, sValue, &pCol);
}
@@ -306,7 +306,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
OUString sValue;
Color* pCol = 0;
- if (nType == NUMBERFORMAT_TEXT)
+ if (nType == css::util::NumberFormat::TEXT)
{
pFormatter->GetOutputString("\"ABC\"", nDefFmt, sValue, &pCol);
}
@@ -387,7 +387,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
aCoreSet.Put( SvxNumberInfoItem( pFormatter, fValue,
SID_ATTR_NUMBERFORMAT_INFO ) );
- if( (NUMBERFORMAT_DATE | NUMBERFORMAT_TIME) & nCurrFormatType )
+ if( (css::util::NumberFormat::DATE | css::util::NumberFormat::TIME) & nCurrFormatType )
aCoreSet.Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, bOneArea));
aCoreSet.Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_NOLANGUAGE, !bShowLanguageControl));
@@ -444,29 +444,29 @@ double NumFormatListBox::GetDefValue(const short nFormatType) const
switch (nFormatType)
{
- case NUMBERFORMAT_DATE:
- case NUMBERFORMAT_DATE|NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::DATE:
+ case css::util::NumberFormat::DATE|css::util::NumberFormat::TIME:
fDefValue = SVX_NUMVAL_DATE;
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
fDefValue = SVX_NUMVAL_TIME;
break;
- case NUMBERFORMAT_TEXT:
- case NUMBERFORMAT_UNDEFINED:
+ case css::util::NumberFormat::TEXT:
+ case css::util::NumberFormat::UNDEFINED:
fDefValue = 0;
break;
- case NUMBERFORMAT_CURRENCY:
+ case css::util::NumberFormat::CURRENCY:
fDefValue = SVX_NUMVAL_CURRENCY;
break;
- case NUMBERFORMAT_PERCENT:
+ case css::util::NumberFormat::PERCENT:
fDefValue = SVX_NUMVAL_PERCENT;
break;
- case NUMBERFORMAT_LOGICAL:
+ case css::util::NumberFormat::LOGICAL:
fDefValue = SVX_NUMVAL_BOOLEAN;
break;
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index a03b840dd8ee..47969699e0de 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -122,12 +122,12 @@ getLocalizedDatTimeStr(
Color* pColor = NULL;
Date* pNullDate = pNumberFormatter->GetNullDate();
sal_uInt32 nFormat
- = pNumberFormatter->GetStandardFormat( NUMBERFORMAT_DATE, eUILang );
+ = pNumberFormatter->GetStandardFormat( css::util::NumberFormat::DATE, eUILang );
pNumberFormatter->GetOutputString( aDate - *pNullDate, nFormat, aTmpStr, &pColor );
aDateTimeStr = aTmpStr + " ";
- nFormat = pNumberFormatter->GetStandardFormat( NUMBERFORMAT_TIME, eUILang );
+ nFormat = pNumberFormatter->GetStandardFormat( css::util::NumberFormat::TIME, eUILang );
pNumberFormatter->GetOutputString(
aTime.GetTimeInDays(), nFormat, aTmpStr, &pColor );
aDateTimeStr += aTmpStr;
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index af92a11d154f..4689e51ea787 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -959,20 +959,20 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
sal_uInt16 nPrecision = 0;
sal_uInt16 nLeading = 0;
rFormat.GetNumForInfo( nPart, nFmtType, bThousand, nPrecision, nLeading);
- nFmtType &= ~NUMBERFORMAT_DEFINED;
+ nFmtType &= ~css::util::NumberFormat::DEFINED;
// special treatment of builtin formats that aren't detected by normal parsing
// (the same formats that get the type set in SvNumberFormatter::ImpGenerateFormats)
if ( eBuiltIn == NF_NUMBER_STANDARD )
- nFmtType = NUMBERFORMAT_NUMBER;
+ nFmtType = css::util::NumberFormat::NUMBER;
else if ( eBuiltIn == NF_BOOLEAN )
- nFmtType = NUMBERFORMAT_LOGICAL;
+ nFmtType = css::util::NumberFormat::LOGICAL;
else if ( eBuiltIn == NF_TEXT )
- nFmtType = NUMBERFORMAT_TEXT;
+ nFmtType = css::util::NumberFormat::TEXT;
// #101606# An empty subformat is a valid number-style resulting in an
// empty display string for the condition of the subformat.
- if ( nFmtType == NUMBERFORMAT_UNDEFINED && rFormat.GetNumForType( nPart,
+ if ( nFmtType == css::util::NumberFormat::UNDEFINED && rFormat.GetNumForType( nPart,
0, false ) == 0 )
nFmtType = 0;
@@ -982,35 +982,35 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// type is 0 if a format contains no recognized elements
// (like text only) - this is handled as a number-style.
case 0:
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_SCIENTIFIC:
- case NUMBERFORMAT_FRACTION:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::SCIENTIFIC:
+ case css::util::NumberFormat::FRACTION:
eType = XML_NUMBER_STYLE;
break;
- case NUMBERFORMAT_PERCENT:
+ case css::util::NumberFormat::PERCENT:
eType = XML_PERCENTAGE_STYLE;
break;
- case NUMBERFORMAT_CURRENCY:
+ case css::util::NumberFormat::CURRENCY:
eType = XML_CURRENCY_STYLE;
break;
- case NUMBERFORMAT_DATE:
- case NUMBERFORMAT_DATETIME:
+ case css::util::NumberFormat::DATE:
+ case css::util::NumberFormat::DATETIME:
eType = XML_DATE_STYLE;
break;
- case NUMBERFORMAT_TIME:
+ case css::util::NumberFormat::TIME:
eType = XML_TIME_STYLE;
break;
- case NUMBERFORMAT_TEXT:
+ case css::util::NumberFormat::TEXT:
eType = XML_TEXT_STYLE;
break;
- case NUMBERFORMAT_LOGICAL:
+ case css::util::NumberFormat::LOGICAL:
eType = XML_BOOLEAN_STYLE;
break;
}
DBG_ASSERT( eType != XML_TOKEN_INVALID, "unknown format type" );
OUString sAttrValue;
- bool bUserDef = ( ( rFormat.GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+ bool bUserDef = ( rFormat.GetType() & css::util::NumberFormat::DEFINED );
// common attributes for format
@@ -1055,14 +1055,14 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
bool bLongSysDate = ( eBuiltIn == NF_DATE_SYSTEM_LONG );
// check if the format definition matches the key
- if ( bAutoOrder && ( nFmtType == NUMBERFORMAT_DATE || nFmtType == NUMBERFORMAT_DATETIME ) &&
+ if ( bAutoOrder && ( nFmtType == css::util::NumberFormat::DATE || nFmtType == css::util::NumberFormat::DATETIME ) &&
!lcl_IsDefaultDateFormat( rFormat, bSystemDate, eBuiltIn ) )
{
bAutoOrder = bSystemDate = bLongSysDate = false; // don't write automatic-order attribute then
}
if ( bAutoOrder &&
- ( nFmtType == NUMBERFORMAT_CURRENCY || nFmtType == NUMBERFORMAT_DATE || nFmtType == NUMBERFORMAT_DATETIME ) )
+ ( nFmtType == css::util::NumberFormat::CURRENCY || nFmtType == css::util::NumberFormat::DATE || nFmtType == css::util::NumberFormat::DATETIME ) )
{
// #85109# format type must be checked to avoid dtd errors if
// locale data contains other format types at the built-in positions
@@ -1072,7 +1072,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
}
if ( bSystemDate && bAutoOrder &&
- ( nFmtType == NUMBERFORMAT_DATE || nFmtType == NUMBERFORMAT_DATETIME ) )
+ ( nFmtType == css::util::NumberFormat::DATE || nFmtType == css::util::NumberFormat::DATETIME ) )
{
// #85109# format type must be checked to avoid dtd errors if
// locale data contains other format types at the built-in positions
@@ -1084,7 +1084,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// overflow for time formats as in [hh]:mm
// controlled by bThousand from number format info
// default for truncate-on-overflow is true
- if ( nFmtType == NUMBERFORMAT_TIME && bThousand )
+ if ( nFmtType == css::util::NumberFormat::TIME && bThousand )
{
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TRUNCATE_ON_OVERFLOW,
XML_FALSE );
@@ -1214,9 +1214,9 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// collect strings for embedded-text (must be known before number element is written)
- bool bAllowEmbedded = ( nFmtType == 0 || nFmtType == NUMBERFORMAT_NUMBER ||
- nFmtType == NUMBERFORMAT_CURRENCY ||
- nFmtType == NUMBERFORMAT_PERCENT );
+ bool bAllowEmbedded = ( nFmtType == 0 || nFmtType == css::util::NumberFormat::NUMBER ||
+ nFmtType == css::util::NumberFormat::CURRENCY ||
+ nFmtType == css::util::NumberFormat::PERCENT );
if ( bAllowEmbedded )
{
sal_Int32 nDigitsPassed = 0;
@@ -1301,7 +1301,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// text is written as embedded-text child of the number,
// don't create a text element
}
- else if ( nFmtType == NUMBERFORMAT_CURRENCY && !bCurrFound && !bCurrencyWritten )
+ else if ( nFmtType == css::util::NumberFormat::CURRENCY && !bCurrFound && !bCurrencyWritten )
{
// automatic currency symbol is implemented as part of
// normal text -> search for the symbol
@@ -1365,9 +1365,9 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// for type 0 (not recognized as a special type),
// write a "normal" number
case 0:
- case NUMBERFORMAT_NUMBER:
- case NUMBERFORMAT_CURRENCY:
- case NUMBERFORMAT_PERCENT:
+ case css::util::NumberFormat::NUMBER:
+ case css::util::NumberFormat::CURRENCY:
+ case css::util::NumberFormat::PERCENT:
{
// decimals
// only some built-in formats have automatic decimals
@@ -1397,14 +1397,14 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
bAnyContent = true;
}
break;
- case NUMBERFORMAT_SCIENTIFIC:
+ case css::util::NumberFormat::SCIENTIFIC:
// #i43959# for scientific numbers, count all integer symbols ("0" and "#")
// as integer digits: use nIntegerSymbols instead of nLeading
// (use of '#' to select multiples in exponent might be added later)
WriteScientificElement_Impl( nPrecision, nIntegerSymbols, bThousand, nExpDigits );
bAnyContent = true;
break;
- case NUMBERFORMAT_FRACTION:
+ case css::util::NumberFormat::FRACTION:
{
sal_Int32 nInteger = nLeading;
if ( pElemStr && (*pElemStr)[0] == '?' )
@@ -1692,7 +1692,7 @@ void SvXMLNumFmtExport::Export( bool bIsAutoStyle )
sal_uInt32 nDefaultIndex = 0;
SvNumberFormatTable& rTable = pFormatter->GetEntryTable(
- NUMBERFORMAT_DEFINED, nDefaultIndex, nLang );
+ css::util::NumberFormat::DEFINED, nDefaultIndex, nLang );
SvNumberFormatTable::iterator it2 = rTable.begin();
while (it2 != rTable.end())
{
@@ -1700,7 +1700,7 @@ void SvXMLNumFmtExport::Export( bool bIsAutoStyle )
pFormat = it2->second;
if (!pUsedList->IsUsed(nKey))
{
- DBG_ASSERT((pFormat->GetType() & NUMBERFORMAT_DEFINED) != 0, "a not user defined numberformat found");
+ DBG_ASSERT((pFormat->GetType() & css::util::NumberFormat::DEFINED), "a not user defined numberformat found");
// user-defined and used formats are exported
ExportFormat_Impl( *pFormat, nKey );
// if it is a user-defined Format it will be added else nothing will happen
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 71b982284fde..14d8bf3a5c90 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -460,7 +460,7 @@ void SvXMLNumImpData::RemoveVolatileFormats()
if ( pObj->bRemoveAfterUse )
{
const SvNumberformat* pFormat = pFormatter->GetEntry(pObj->nKey);
- if (pFormat && (pFormat->GetType() & NUMBERFORMAT_DEFINED))
+ if (pFormat && (pFormat->GetType() & css::util::NumberFormat::DEFINED))
pFormatter->DeleteEntry( pObj->nKey );
}
}