diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-12-03 21:46:37 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-12-19 22:08:26 +0100 |
commit | 00bc5a097313fbd003675267be961ad3a152ba42 (patch) | |
tree | de9b9e6981d3c2f262b9391335a067d4898185b6 /include/svl/zformat.hxx | |
parent | b74da08e556b7b001943f0288a61da53791d4dcf (diff) |
wrap scoped enum around css::util::NumberFormat
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa
Reviewed-on: https://gerrit.libreoffice.org/46339
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include/svl/zformat.hxx')
-rw-r--r-- | include/svl/zformat.hxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index 2b4813184c9d..38479dfc6aef 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -46,7 +46,6 @@ enum SvNumberformatLimitOps NUMBERFORMAT_OP_GE = 6 // Operator >= }; - struct ImpSvNumberformatInfo // Struct for FormatInfo { std::vector<OUString> sStrArray; // Array of symbols @@ -55,7 +54,7 @@ struct ImpSvNumberformatInfo // Struct for FormatInfo sal_uInt16 nCntPre; // Count of digits before decimal point sal_uInt16 nCntPost; // Count of digits after decimal point sal_uInt16 nCntExp; // Count of exponent digits, or AM/PM - short eScannedType; // Type determined by scan + SvNumFormatType eScannedType; // Type determined by scan bool bThousand; // Has group (AKA thousand) separator void Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt16 nAnz ); @@ -176,12 +175,12 @@ public: ~SvNumberformat(); /// Get type of format, may include css::util::NumberFormat::DEFINED bit - short GetType() const { return eType; } + SvNumFormatType GetType() const { return eType; } /// Get type of format, does not include css::util::NumberFormat::DEFINED - short GetMaskedType() const { return eType & ~css::util::NumberFormat::DEFINED; } + SvNumFormatType GetMaskedType() const { return eType & ~SvNumFormatType::DEFINED; } - void SetType(const short eSetType) { eType = eSetType; } + void SetType(SvNumFormatType eSetType) { eType = eSetType; } // Standard means the I18N defined standard format of this type void SetStandard() { bStandard = true; } bool IsStandard() const { return bStandard; } @@ -233,12 +232,12 @@ public: void GetOutputString( const OUString& sString, OUString& OutString, Color** ppColor ); // True if type text - bool IsTextFormat() const { return (eType & css::util::NumberFormat::TEXT) != 0; } + bool IsTextFormat() const { return bool(eType & SvNumFormatType::TEXT); } // True if 4th subformat present bool HasTextFormat() const { return (NumFor[3].GetCount() > 0) || - (NumFor[3].Info().eScannedType == css::util::NumberFormat::TEXT); + (NumFor[3].Info().eScannedType == SvNumFormatType::TEXT); } void GetFormatSpecialInfo(bool& bThousand, @@ -318,9 +317,9 @@ public: sal_uInt16 GetNumForNumberElementCount( sal_uInt16 nNumFor ) const; /** Get the scanned type of the specified subformat. */ - short GetNumForInfoScannedType( sal_uInt16 nNumFor ) const + SvNumFormatType GetNumForInfoScannedType( sal_uInt16 nNumFor ) const { - return (nNumFor < 4) ? NumFor[nNumFor].Info().eScannedType : css::util::NumberFormat::UNDEFINED; + return (nNumFor < 4) ? NumFor[nNumFor].Info().eScannedType : SvNumFormatType::UNDEFINED; } // Whether the second subformat code is really for negative numbers @@ -427,7 +426,7 @@ public: void GetConditions( SvNumberformatLimitOps& rOper1, double& rVal1, SvNumberformatLimitOps& rOper2, double& rVal2 ) const; Color* GetColor( sal_uInt16 nNumFor ) const; - void GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType, + void GetNumForInfo( sal_uInt16 nNumFor, SvNumFormatType& rScannedType, bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt ) const; // rAttr.Number not empty if NatNum attributes are to be stored @@ -483,7 +482,7 @@ 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 - short eType; // Type of format + SvNumFormatType 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 |