summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-25 09:49:59 +0200
committerNoel Grandin <noel@peralex.com>2015-02-25 10:34:27 +0200
commit2f928b2d0982af44b3d45f1d3c8919c0b0655b4f (patch)
tree36468544d70101f2fc3a49a59b2f9d40df10e61f /sw
parent3e475e574ee7ac8753bf50732f62bea5d36791a5 (diff)
remove NUMBERFORMAT_ constants
.. in favour of just using the underlying constants from css::util::NumberFormat Change-Id: I0c6b128b66c91b268f5ae300f9c17c7792df5e99
Diffstat (limited to 'sw')
-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
22 files changed, 91 insertions, 91 deletions
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;