diff options
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 10 | ||||
-rw-r--r-- | include/svx/numfmtsh.hxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh5.cxx | 18 | ||||
-rw-r--r-- | svx/source/items/numfmtsh.cxx | 18 | ||||
-rw-r--r-- | svx/source/items/numinf.cxx | 10 |
5 files changed, 32 insertions, 32 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 51b918742d6d..d37ed270e8bd 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -412,7 +412,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) sal_uInt16 nFmtLbSelPos = 0; LanguageType eLangType = LANGUAGE_DONTKNOW; std::vector<OUString> aFmtEntryList; - SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED; + SvxNumberValueType eValType = SvxNumberValueType::Undefined; double nValDouble = 0; OUString aValString; @@ -501,15 +501,15 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) switch ( eValType ) { - case SVX_VALUE_TYPE_STRING: + case SvxNumberValueType::String: aValString = pNumItem->GetValueString(); break; - case SVX_VALUE_TYPE_NUMBER: + case SvxNumberValueType::Number: // #50441# string may be set in addition to the value aValString = pNumItem->GetValueString(); nValDouble = pNumItem->GetValueDouble(); break; - case SVX_VALUE_TYPE_UNDEFINED: + case SvxNumberValueType::Undefined: default: break; } @@ -521,7 +521,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) : ULONG_MAX; // == DONT_KNOW - if ( eValType == SVX_VALUE_TYPE_STRING ) + if ( eValType == SvxNumberValueType::String ) pNumFmtShell =SvxNumberFormatShell::Create( pNumItem->GetNumberFormatter(), (pValFmtAttr) ? nInitFormat : 0L, diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx index 7e0d8cc224a7..da2b07b61644 100644 --- a/include/svx/numfmtsh.hxx +++ b/include/svx/numfmtsh.hxx @@ -30,11 +30,11 @@ class Color; -enum SvxNumberValueType +enum class SvxNumberValueType { - SVX_VALUE_TYPE_UNDEFINED = 0, - SVX_VALUE_TYPE_NUMBER, - SVX_VALUE_TYPE_STRING + Undefined, + Number, + String }; // sort order of the category ListBox entries in the TabPage diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index 9772bd7ca215..42888b69358e 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -309,7 +309,7 @@ SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, ScViewD // NumberInfo-Item konstruieren: - SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED; + SvxNumberValueType eValType = SvxNumberValueType::Undefined; double nCellValue = 0; OUString aCellString; @@ -320,14 +320,14 @@ SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, ScViewD case CELLTYPE_VALUE: { nCellValue = aCell.mfValue; - eValType = SVX_VALUE_TYPE_NUMBER; + eValType = SvxNumberValueType::Number; } break; case CELLTYPE_STRING: { aCellString = aCell.mpString->getString(); - eValType = SVX_VALUE_TYPE_STRING; + eValType = SvxNumberValueType::String; } break; @@ -336,36 +336,36 @@ SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, ScViewD if (aCell.mpFormula->IsValue()) { nCellValue = aCell.mpFormula->GetValue(); - eValType = SVX_VALUE_TYPE_NUMBER; + eValType = SvxNumberValueType::Number; } else { nCellValue = 0; - eValType = SVX_VALUE_TYPE_UNDEFINED; + eValType = SvxNumberValueType::Undefined; } } break; default: nCellValue = 0; - eValType = SVX_VALUE_TYPE_UNDEFINED; + eValType = SvxNumberValueType::Undefined; } switch ( eValType ) { - case SVX_VALUE_TYPE_STRING: + case SvxNumberValueType::String: return new SvxNumberInfoItem( pDoc->GetFormatTable(), aCellString, SID_ATTR_NUMBERFORMAT_INFO ); - case SVX_VALUE_TYPE_NUMBER: + case SvxNumberValueType::Number: return new SvxNumberInfoItem( pDoc->GetFormatTable(), nCellValue, SID_ATTR_NUMBERFORMAT_INFO ); - case SVX_VALUE_TYPE_UNDEFINED: + case SvxNumberValueType::Undefined: default: ; } diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index f27f8c587143..dd539826e546 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -103,16 +103,16 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter, switch ( eValType ) { - case SVX_VALUE_TYPE_STRING: + case SvxNumberValueType::String: aValStr = rNumStr; break; - case SVX_VALUE_TYPE_NUMBER: + case SvxNumberValueType::Number: if ( pFormatter ) { nValNum = GetDefaultValNum( pFormatter->GetType( nCurFormatKey ) ); } SAL_FALLTHROUGH; - case SVX_VALUE_TYPE_UNDEFINED: + case SvxNumberValueType::Undefined: default: aValStr.clear(); } @@ -144,11 +144,11 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter, switch ( eValType ) { - case SVX_VALUE_TYPE_NUMBER: + case SvxNumberValueType::Number: nValNum = nNumVal; break; - case SVX_VALUE_TYPE_STRING: - case SVX_VALUE_TYPE_UNDEFINED: + case SvxNumberValueType::String: + case SvxNumberValueType::Undefined: default: nValNum = SVX_NUMVAL_STANDARD; bIsDefaultValNum = true; @@ -454,7 +454,7 @@ void SvxNumberFormatShell::MakePreviewString( const OUString& rFormatStr, // format exists // #50441# if a string was set in addition to the value, use it for text formats - bool bUseText = ( eValType == SVX_VALUE_TYPE_STRING || + bool bUseText = ( eValType == SvxNumberValueType::String || ( !aValStr.isEmpty() && ( pFormatter->GetType(nExistingFormat) & css::util::NumberFormat::TEXT ) ) ); if ( bUseText ) { @@ -539,7 +539,7 @@ void SvxNumberFormatShell::GetInitSettings( sal_uInt16& nCatLbPos, short nSelPos = SELPOS_NONE; // Sonderbehandlung fuer undefiniertes Zahlenformat: - if ( (eValType == SVX_VALUE_TYPE_UNDEFINED) && (nCurFormatKey == 0) ) + if ( (eValType == SvxNumberValueType::Undefined) && (nCurFormatKey == 0) ) PosToCategory_Impl( CAT_ALL, nCurCategory ); // Kategorie = Alle else nCurCategory = css::util::NumberFormat::UNDEFINED; // Kategorie = Undefiniert @@ -1116,7 +1116,7 @@ void SvxNumberFormatShell::GetPreviewString_Impl( OUString& rString, Color*& rpC rpColor = nullptr; // #50441# if a string was set in addition to the value, use it for text formats - bool bUseText = ( eValType == SVX_VALUE_TYPE_STRING || + bool bUseText = ( eValType == SvxNumberValueType::String || ( !aValStr.isEmpty() && ( pFormatter->GetType(nCurFormatKey) & css::util::NumberFormat::TEXT ) ) ); if ( bUseText ) diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx index 18f7e65d1583..680493be871d 100644 --- a/svx/source/items/numinf.cxx +++ b/svx/source/items/numinf.cxx @@ -32,7 +32,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( const sal_uInt16 nId ) : - INIT( nullptr, SVX_VALUE_TYPE_UNDEFINED, 0, "" ) + INIT( nullptr, SvxNumberValueType::Undefined, 0, "" ) { } @@ -41,7 +41,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( const sal_uInt16 nId ) : SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const sal_uInt16 nId ) : - INIT( pNumFormatter, SVX_VALUE_TYPE_UNDEFINED, 0, "" ) + INIT( pNumFormatter, SvxNumberValueType::Undefined, 0, "" ) { } @@ -50,7 +50,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const OUString& rVal, const sal_uInt16 nId ) : - INIT( pNumFormatter, SVX_VALUE_TYPE_STRING, 0, rVal ) + INIT( pNumFormatter, SvxNumberValueType::String, 0, rVal ) { } @@ -59,7 +59,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const double& rVal, const sal_uInt16 nId ) : - INIT( pNumFormatter, SVX_VALUE_TYPE_NUMBER, rVal, "" ) + INIT( pNumFormatter, SvxNumberValueType::Number, rVal, "" ) { } @@ -69,7 +69,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const double& rVal, const OUString& rValueStr, const sal_uInt16 nId ) : - INIT( pNumFormatter, SVX_VALUE_TYPE_NUMBER, rVal, rValueStr ) + INIT( pNumFormatter, SvxNumberValueType::Number, rVal, rValueStr ) { } |