19 #ifndef INCLUDED_SVX_NUMFMTSH_HXX
20 #define INCLUDED_SVX_NUMFMTSH_HXX
41 #define CAT_USERDEFINED 1
44 #define CAT_CURRENCY 4
47 #define CAT_SCIENTIFIC 7
48 #define CAT_FRACTION 8
52 #define SELPOS_NONE -1
54 #define NUMBERFORMAT_ENTRY_NEW_CURRENCY NUMBERFORMAT_ENTRY_NOT_FOUND-1
61 sal_uInt32 nFormatKey,
63 const OUString& rNumStr );
66 sal_uInt32 nFormatKey,
69 const OUString* pNumStr );
75 sal_uInt32 nFormatKey,
77 const OUString& rNumStr );
80 sal_uInt32 nFormatKey,
83 const OUString* pNumStr );
86 void GetInitSettings( sal_uInt16& nCatLbPos,
88 sal_uInt16& nFmtLbSelPos,
89 std::vector<OUString>& rFmtEntries,
90 OUString& rPrevString,
91 const Color*& rpPrevColor );
93 void CategoryChanged( sal_uInt16 nCatLbPos,
95 std::vector<OUString>& rFmtEntries );
99 std::vector<OUString>& rFmtEntries );
101 void FormatChanged( sal_uInt16 nFmtLbPos,
102 OUString& rPreviewStr,
103 const Color*& rpFontColor );
105 bool AddFormat( OUString& rFormat,
107 sal_uInt16& rCatLbSelPos,
109 std::vector<OUString>& rFmtEntries );
111 void RemoveFormat( std::u16string_view rFormat,
112 sal_uInt16& rCatLbSelPos,
114 std::vector<OUString>& rFmtEntries );
116 void MakeFormat( OUString& rFormat,
119 sal_uInt16 nPrecision,
120 sal_uInt16 nLeadingZeroes,
121 sal_uInt16 nCurrencyEntryPos);
123 void GetOptions(
const OUString& rFormat,
126 sal_uInt16& rPrecision,
127 sal_uInt16& rLeadingZeroes,
128 sal_uInt16& rCatLbPos );
130 sal_uInt16 GetFormatIntegerDigits( std::u16string_view rFormat )
const;
132 void MakePreviewString(
const OUString& rFormatStr,
133 OUString& rPreviewStr,
134 const Color*& rpFontColor );
136 void MakePrevStringFromVal(
const OUString& rFormatStr,
137 OUString& rPreviewStr,
138 const Color*& rpFontColor,
141 bool IsUserDefined(
const OUString& rFmtString );
142 bool IsTmpCurrencyFormat(
const OUString& rFmtString );
143 bool FindEntry(
const OUString& rFmtString, sal_uInt32* pAt =
nullptr );
146 std::vector<sal_uInt32>
const & GetUpdateData()
const;
154 OUString GetStandardName()
const;
156 OUString GetComment4Entry(
short nEntry);
157 short GetCategory4Entry(
short nEntry)
const;
158 bool GetUserDefined4Entry(
short nEntry);
159 OUString GetFormat4Entry(
short nEntry);
160 void SetComment4Entry(
short nEntry,
const OUString& aCommentString);
162 void SetCurrencySymbol(sal_uInt32 nPos);
164 sal_uInt16 FindCurrencyFormat(
const OUString& rFmtString );
165 sal_uInt16 FindCurrencyFormat(
const NfCurrencyEntry* pTmpCurrencyEntry,
bool bTmpBanking);
166 void SetCurCurrencyEntry(NfCurrencyEntry*);
167 short GetListPos4Entry( sal_uInt32 nIdx, std::u16string_view rFmtString );
169 void GetCurrencySymbols(std::vector<OUString>& rList, sal_uInt16* pPos );
171 sal_uInt16 FindCurrencyTableEntry(
const OUString& rFmtString,
bool &bTestBanking );
172 bool IsInTable(sal_uInt16 nPos,
bool bTmpBanking,
173 std::u16string_view rFmtString);
197 SVX_DLLPRIVATE short FillEntryList_Impl( std::vector<OUString>& rList );
199 bool bSuppressDuplicates =
false );
200 SVX_DLLPRIVATE short FillEListWithFormats_Impl( std::vector<OUString>& rList,
short nSelPos,
203 bool bSuppressDuplicates );
204 SVX_DLLPRIVATE short FillEListWithDateTime_Impl( std::vector<OUString>& rList,
short nSelPos,
205 bool bSuppressDuplicates );
206 SVX_DLLPRIVATE void FillEListWithOneFormat_Impl( std::vector<OUString>& rList,
short & nSelPos,
208 bool bSuppressIsoDateTime );
209 SVX_DLLPRIVATE short FillEListWithCurrency_Impl( std::vector<OUString>& rList,
short nSelPos);
210 SVX_DLLPRIVATE short FillEListWithSysCurrencys( std::vector<OUString>& rList,
short nSelPos);
211 SVX_DLLPRIVATE short FillEListWithUserCurrencys( std::vector<OUString>& rList,
short nSelPos);
216 SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetRemoved_Impl(
size_t nKey );
218 SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetAdded_Impl(
size_t nKey );
221 const Color*& rpColor );
std::map< sal_uInt32, SvNumberformat * > SvNumberFormatTable