19 #ifndef INCLUDED_SVX_NUMFMTSH_HXX
20 #define INCLUDED_SVX_NUMFMTSH_HXX
42 #define CAT_USERDEFINED 1
45 #define CAT_CURRENCY 4
48 #define CAT_SCIENTIFIC 7
49 #define CAT_FRACTION 8
53 #define SELPOS_NONE -1
55 #define NUMBERFORMAT_ENTRY_NEW_CURRENCY NUMBERFORMAT_ENTRY_NOT_FOUND-1
62 sal_uInt32 nFormatKey,
64 const OUString& rNumStr );
67 sal_uInt32 nFormatKey,
70 const OUString* pNumStr );
76 sal_uInt32 nFormatKey,
78 const OUString& rNumStr );
81 sal_uInt32 nFormatKey,
84 const OUString* pNumStr );
87 void GetInitSettings( sal_uInt16& nCatLbPos,
89 sal_uInt16& nFmtLbSelPos,
90 std::vector<OUString>& rFmtEntries,
91 OUString& rPrevString,
92 const Color*& rpPrevColor );
94 void CategoryChanged( sal_uInt16 nCatLbPos,
96 std::vector<OUString>& rFmtEntries );
100 std::vector<OUString>& rFmtEntries );
102 void FormatChanged( sal_uInt16 nFmtLbPos,
103 OUString& rPreviewStr,
104 const Color*& rpFontColor );
106 bool AddFormat( OUString& rFormat,
108 sal_uInt16& rCatLbSelPos,
110 std::vector<OUString>& rFmtEntries );
112 void RemoveFormat( std::u16string_view rFormat,
113 sal_uInt16& rCatLbSelPos,
115 std::vector<OUString>& rFmtEntries );
117 void MakeFormat( OUString& rFormat,
120 sal_uInt16 nPrecision,
121 sal_uInt16 nLeadingZeroes,
122 sal_uInt16 nCurrencyEntryPos);
124 void GetOptions(
const OUString& rFormat,
127 sal_uInt16& rPrecision,
128 sal_uInt16& rLeadingZeroes,
129 sal_uInt16& rCatLbPos );
131 sal_uInt16 GetFormatIntegerDigits( std::u16string_view rFormat )
const;
133 void MakePreviewString(
const OUString& rFormatStr,
134 OUString& rPreviewStr,
135 const Color*& rpFontColor );
137 void MakePrevStringFromVal(
const OUString& rFormatStr,
138 OUString& rPreviewStr,
139 const Color*& rpFontColor,
142 bool IsUserDefined(
const OUString& rFmtString );
143 bool IsTmpCurrencyFormat(
const OUString& rFmtString );
144 bool FindEntry(
const OUString& rFmtString, sal_uInt32* pAt =
nullptr );
147 std::vector<sal_uInt32>
const & GetUpdateData()
const;
155 OUString GetStandardName()
const;
157 OUString GetComment4Entry(
short nEntry);
158 short GetCategory4Entry(
short nEntry)
const;
159 bool GetUserDefined4Entry(
short nEntry);
160 OUString GetFormat4Entry(
short nEntry);
161 void SetComment4Entry(
short nEntry,
const OUString& aCommentString);
163 void SetCurrencySymbol(sal_uInt32 nPos);
165 sal_uInt16 FindCurrencyFormat(
const OUString& rFmtString );
166 sal_uInt16 FindCurrencyFormat(
const NfCurrencyEntry* pTmpCurrencyEntry,
bool bTmpBanking);
167 void SetCurCurrencyEntry(NfCurrencyEntry*);
168 short GetListPos4Entry( sal_uInt32 nIdx, std::u16string_view rFmtString );
170 void GetCurrencySymbols(std::vector<OUString>& rList, sal_uInt16* pPos );
172 sal_uInt16 FindCurrencyTableEntry(
const OUString& rFmtString,
bool &bTestBanking );
173 bool IsInTable(sal_uInt16 nPos,
bool bTmpBanking,
174 std::u16string_view rFmtString)
const;
198 SVX_DLLPRIVATE short FillEntryList_Impl( std::vector<OUString>& rList );
200 bool bSuppressDuplicates =
false );
201 SVX_DLLPRIVATE short FillEListWithFormats_Impl( std::vector<OUString>& rList,
short nSelPos,
204 bool bSuppressDuplicates );
205 SVX_DLLPRIVATE short FillEListWithDateTime_Impl( std::vector<OUString>& rList,
short nSelPos,
206 bool bSuppressDuplicates );
207 SVX_DLLPRIVATE void FillEListWithOneFormat_Impl( std::vector<OUString>& rList,
short & nSelPos,
209 bool bSuppressIsoDateTime );
210 SVX_DLLPRIVATE short FillEListWithCurrency_Impl( std::vector<OUString>& rList,
short nSelPos);
211 SVX_DLLPRIVATE short FillEListWithSysCurrencys( std::vector<OUString>& rList,
short nSelPos);
212 SVX_DLLPRIVATE short FillEListWithUserCurrencys( std::vector<OUString>& rList,
short nSelPos);
217 SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetRemoved_Impl(
size_t nKey );
219 SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetAdded_Impl(
size_t nKey );
222 const Color*& rpColor );
std::unordered_map< sal_uInt32, SvNumberformat * > SvNumberFormatTable