diff options
author | Eike Rathke <erack@redhat.com> | 2014-11-06 21:05:30 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-11-06 21:32:57 +0100 |
commit | 14174aabaa959988fe65c41109c6eafc37f5b2c3 (patch) | |
tree | 25ccf4ae7d8b5e94f60a5ff7ea72b0b818a71c85 | |
parent | b448ee4a3a5a121f3b08a8e946a934d3414a5251 (diff) |
change nNewStandardDefined to bAdditionalBuiltin
and remove SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS
Change-Id: I63f341e74a1eb7172dbb024a5cef66435a46e1df
-rw-r--r-- | include/svl/nfversi.hxx | 1 | ||||
-rw-r--r-- | include/svl/zformat.hxx | 17 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 6 | ||||
-rw-r--r-- | svx/source/items/numfmtsh.cxx | 4 |
5 files changed, 12 insertions, 20 deletions
diff --git a/include/svl/nfversi.hxx b/include/svl/nfversi.hxx index 900444ecb2a7..ceb2dd8c8d6a 100644 --- a/include/svl/nfversi.hxx +++ b/include/svl/nfversi.hxx @@ -21,7 +21,6 @@ #define INCLUDED_SVL_NFVERSI_HXX // file IDs -#define SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS 0x000e #define SV_NUMBERFORMATTER_VERSION 0x000f diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index c2a353c0c34b..aa5e8a5016dd 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -184,23 +184,16 @@ public: ~SvNumberformat(); /// Get type of format, may include NUMBERFORMAT_DEFINED bit - short GetType() const - { return (nNewStandardDefined && - (nNewStandardDefined <= SV_NUMBERFORMATTER_VERSION)) ? - (eType & ~NUMBERFORMAT_DEFINED) : eType; } + short GetType() const { return eType; } void SetType(const short eSetType) { eType = eSetType; } // Standard means the I18N defined standard format of this type void SetStandard() { bStandard = true; } bool IsStandard() const { return bStandard; } - // For versions before version nVer it is UserDefined, for newer versions - // it is builtin. nVer of SV_NUMBERFORMATTER_VERSION_... - void SetNewStandardDefined( sal_uInt16 nVer ) - { nNewStandardDefined = nVer; eType |= NUMBERFORMAT_DEFINED; } - - bool IsAdditionalStandardDefined() const - { return nNewStandardDefined == SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS; } + // If this format is an additional built-in format defined by i18n. + void SetAdditionalBuiltin() { bAdditionalBuiltin = true; } + bool IsAdditionalBuiltin() const { return bAdditionalBuiltin; } LanguageType GetLanguage() const { return maLocale.meLanguage;} @@ -467,8 +460,8 @@ private: LocaleType maLocale; // Language/country of the format, numeral shape and calendar type from Excel. SvNumberformatLimitOps eOp1; // Operator for first condition SvNumberformatLimitOps eOp2; // Operator for second condition - sal_uInt16 nNewStandardDefined; // new builtin formats as of version 6 short eType; // Type of format + bool bAdditionalBuiltin; // If this is an additional built-in format defined by i18n bool bStarFlag; // Take *n format as ESC n bool bStandard; // If this is a default standard format bool bIsUsed; // Flag as used for storing diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 3a92ce92a5e9..8729f2e95487 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2515,7 +2515,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, if ( SvNumberformat* pNewFormat = ImpInsertFormat( pFormatArr[j], nPos+1, bAfterChangingSystemCL, nOrgIndex ) ) { - pNewFormat->SetNewStandardDefined( SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS ); + pNewFormat->SetAdditionalBuiltin(); nPos++; } pFormatArr[j].Index = nOrgIndex; @@ -2546,7 +2546,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, if ( SvNumberformat* pNewFormat = ImpInsertFormat( pFormatArr[j], nPos+1, bAfterChangingSystemCL ) ) { - pNewFormat->SetNewStandardDefined( SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS ); + pNewFormat->SetAdditionalBuiltin(); nPos++; } } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index c6aaa104c73e..8d4e08a53bae 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -473,8 +473,8 @@ SvNumberformat::SvNumberformat( ImpSvNumberformatScan& rSc, LanguageType eLge ) , rScan(rSc) , eOp1(NUMBERFORMAT_OP_NO) , eOp2(NUMBERFORMAT_OP_NO) - , nNewStandardDefined(0) , eType(0) + , bAdditionalBuiltin( false ) , bStarFlag( false ) , bStandard( false ) , bIsUsed( false ) @@ -494,7 +494,7 @@ void SvNumberformat::ImpCopyNumberformat( const SvNumberformat& rFormat ) bStandard = rFormat.bStandard; bIsUsed = rFormat.bIsUsed; sComment = rFormat.sComment; - nNewStandardDefined = rFormat.nNewStandardDefined; + bAdditionalBuiltin = rFormat.bAdditionalBuiltin; // #121103# when copying between documents, get color pointers from own scanner ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : NULL; @@ -610,7 +610,7 @@ SvNumberformat::SvNumberformat(OUString& rString, LanguageType& eLan, bool bStan) : rScan(*pSc) - , nNewStandardDefined(0) + , bAdditionalBuiltin( false ) , bStarFlag( false ) { OUStringBuffer sBuff(rString); diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index e8718fea2fca..4634fac8204d 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -920,7 +920,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<OUString>& r if ( !IsRemoved_Impl( nKey ) ) { if( pNumEntry->GetType() & NUMBERFORMAT_DEFINED || - pNumEntry->IsAdditionalStandardDefined() ) + pNumEntry->IsAdditionalBuiltin() ) { nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED; aStrComment = pNumEntry->GetComment(); @@ -1073,7 +1073,7 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl( std::vector<OUString>& rList, if ( !IsRemoved_Impl( nKey ) ) { if( (pNumEntry->GetType() & NUMBERFORMAT_DEFINED) || - (bAdditional && pNumEntry->IsAdditionalStandardDefined()) ) + (bAdditional && pNumEntry->IsAdditionalBuiltin()) ) { nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED; aStrComment=pNumEntry->GetComment(); |