diff options
192 files changed, 924 insertions, 709 deletions
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 268308ab13c1..9523597721bd 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -24,6 +24,7 @@ #include <basic/sberrors.hxx> #include <i18nlangtag/lang.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <rtl/character.hxx> diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 77e1d26e4fe5..d02129f9f980 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -72,6 +72,7 @@ #include <com/sun/star/util/SearchAlgorithms2.hpp> #include <i18nutil/searchopt.hxx> #include <unotools/textsearch.hxx> +#include <svl/numformat.hxx> diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index b20b3fce3775..36595e53ca5e 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -52,6 +52,7 @@ #include <sal/log.hxx> #include <eventatt.hxx> #include <rtl/math.h> +#include <svl/numformat.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 7a246247e903..e88065225793 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -46,6 +46,7 @@ #include <rtl/ustrbuf.hxx> #include <rtl/character.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <i18nutil/searchopt.hxx> diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index 07947bffe313..5ebf52b69af6 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -20,6 +20,7 @@ #include <rtl/math.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <tools/color.hxx> #include <i18nlangtag/lang.h> diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 08f43ab475fa..a017b66744a9 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -45,6 +45,7 @@ #include <rtl/character.hxx> #include <rtl/math.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index e5e9be3b99a5..828bc883b2d3 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -37,6 +37,7 @@ #include <vcl/virdev.hxx> #include <o3tl/safeint.hxx> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <com/sun/star/chart2/XChartDocument.hpp> diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index 8fc5e63ee2be..baa75ef7cb4f 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/chart2/MovingAverageType.hpp> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <svl/zforlist.hxx> #include <vcl/formatter.hxx> diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index e605b17c9891..6c7effde6707 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -29,6 +29,7 @@ #include <svx/chrtitem.hxx> #include <svl/eitem.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <vcl/formatter.hxx> #include <vcl/weld.hxx> #include <svl/zformat.hxx> diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index c6aea8b186d9..ab846502f29f 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -39,6 +39,7 @@ #include <comphelper/propertysequence.hxx> #include <cppuhelper/supportsservice.hxx> +#include <svl/numformat.hxx> #include <svl/numuno.hxx> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/XInitialization.hpp> diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 3fbb442cccd8..ae6766aecaef 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -50,6 +50,7 @@ #include <unotools/saveopt.hxx> #include <rtl/math.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> diff --git a/chart2/source/tools/NumberFormatterWrapper.cxx b/chart2/source/tools/NumberFormatterWrapper.cxx index ef40617b07dd..e6bc55d0556f 100644 --- a/chart2/source/tools/NumberFormatterWrapper.cxx +++ b/chart2/source/tools/NumberFormatterWrapper.cxx @@ -18,6 +18,7 @@ */ #include <NumberFormatterWrapper.hxx> +#include <svl/numformat.hxx> #include <svl/numuno.hxx> #include <svl/zforlist.hxx> #include <tools/color.hxx> diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 6c35426bce6d..12b973380b89 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/currencytable.hxx> #include <svtools/langhelp.hxx> diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 19ea53f44d23..f6351edda30d 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -19,6 +19,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include "optupdt.hxx" #include <comphelper/processfactory.hxx> diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index cc24fe114c63..5a30538f641f 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/awt/FontDescriptor.hpp> #include <WCopyTable.hxx> #include <unotools/syslocale.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <connectivity/dbexception.hxx> #include <connectivity/FValue.hxx> diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 5caf0fb4e32d..2f60f2c33421 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -64,6 +64,7 @@ #include <svx/svxids.hrc> #include <sal/log.hxx> +#include <svl/numformat.hxx> #include <svl/itempool.hxx> #include <helpids.h> #include <svl/itemset.hxx> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index ee0e6f05bb25..024a65c6c9b1 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -115,6 +115,7 @@ #include <sfx2/DocumentSigner.hxx> #include <sfx2/sidebar/SidebarDockingWindow.hxx> #include <sfx2/sidebar/SidebarController.hxx> +#include <svl/numformat.hxx> #include <svx/dialmgr.hxx> #include <svx/strings.hrc> #include <svx/svdview.hxx> diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index dcb70605e8b6..72a411a56e29 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -19,6 +19,7 @@ #include <osl/file.hxx> #include <vcl/metaact.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <tools/urlobj.hxx> diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index abbb5d418dc6..c8731c9bf450 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -90,6 +90,7 @@ #include <svl/filenotation.hxx> #include <svl/intitem.hxx> #include <svl/itemset.hxx> +#include <svl/numformat.hxx> #include <unotools/moduleoptions.hxx> #include <svl/numuno.hxx> #include <svl/urihelper.hxx> diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 345162ecffa0..8cccb48e84b5 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -24,6 +24,7 @@ #include <vcl/GraphicObject.hxx> #include <vcl/event.hxx> #include <tools/debug.hxx> +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <connectivity/dbconversion.hxx> #include "modulepcr.hxx" diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index e1d2fcba2376..0f8e751bd9e0 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -47,6 +47,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <i18nlangtag/lang.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <tools/debug.hxx> #include <tools/urlobj.hxx> diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 74e6aaf08e01..bb4eb3b27228 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -27,6 +27,7 @@ #include <connectivity/dbtools.hxx> #include <connectivity/dbconversion.hxx> #include <o3tl/any.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/numuno.hxx> #include <vcl/keycodes.hxx> diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 6f332f7112e0..6301a99435fc 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -28,6 +28,7 @@ #include <com/sun/star/util/Duration.hpp> #include <com/sun/star/document/CmisProperty.hpp> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <svl/zforlist.hxx> #include <svtools/ctrlbox.hxx> diff --git a/include/svl/numformat.hxx b/include/svl/numformat.hxx new file mode 100644 index 000000000000..3256adf881b5 --- /dev/null +++ b/include/svl/numformat.hxx @@ -0,0 +1,733 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include <svl/svldllapi.h> +#include <com/sun/star/i18n/XNumberFormatCode.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <i18nlangtag/lang.h> +#include <tools/link.hxx> +#include <svl/zforlist.hxx> + +class SvNumberFormatterRegistry_Impl; +class NfCurrencyTable; + +class SVL_DLLPUBLIC SvNumberFormatter +{ + friend class SvNumberFormatterRegistry_Impl; + +public: + /** + * We can't technically have an "infinite" value, so we use an arbitrary + * upper precision threshold to represent the "unlimited" precision. + */ + static const sal_uInt16 UNLIMITED_PRECISION; + + /** + * Precision suitable for numbers displayed in input bar, for instance + * Calc's formula input bar. + */ + static const sal_uInt16 INPUTSTRING_PRECISION; + + /// Preferred ctor with service manager and language/country enum + SvNumberFormatter(const css::uno::Reference<css::uno::XComponentContext>& rxContext, + LanguageType eLang); + + ~SvNumberFormatter(); + + /// Set CallBack to ColorTable + void SetColorLink(const Link<sal_uInt16, Color*>& rColorTableCallBack); + /// Do the CallBack to ColorTable + Color* GetUserDefColor(sal_uInt16 nIndex); + + /// Change language/country, also input and format scanner + void ChangeIntl(LanguageType eLnge); + /// Change the reference null date + void ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear); + /// Change standard precision + void ChangeStandardPrec(short nPrec); + /// Set zero value suppression + void SetNoZero(bool bNZ); + + /** The language with which the formatter was initialized (system setting), + NOT the current language after a ChangeIntl() */ + LanguageType GetLanguage() const; + + // Determine whether two format types are input compatible or not + static bool IsCompatible(SvNumFormatType eOldType, SvNumFormatType eNewType); + + /** Get table of formats of a specific type of a locale. A format FIndex is + tested whether it has the type and locale requested, if it doesn't + match FIndex returns the default format for the type/locale. If no + specific format is to be selected FIndex may be initialized to 0. */ + SvNumberFormatTable& GetEntryTable(SvNumFormatType eType, sal_uInt32& FIndex, + LanguageType eLnge); + + /** Get table of formats of a specific type of a language/country. + FIndex returns the default format of that type. + If the language/country was never touched before new entries are generated */ + SvNumberFormatTable& ChangeCL(SvNumFormatType eType, sal_uInt32& FIndex, LanguageType eLnge); + + /** Get table of formats of the same type as FIndex; eType and rLnge are + set accordingly. An unknown format is set to Standard/General */ + SvNumberFormatTable& GetFirstEntryTable(SvNumFormatType& eType, sal_uInt32& FIndex, + LanguageType& rLnge); + + /// Delete an entry including the format it is referring to + void DeleteEntry(sal_uInt32 nKey); + + /** Create new entry of a format code string for language/country. + @return + <TRUE/> if string new and ok and inserted. + <FALSE/> if string already exists or an unresolvable parse error + occurred, in which case nCheckPos is the error position within rString. + If the error occurs at position 0 or rString is empty nCheckPos + will be 1, so an error in the string is always indicated by + nCheckPos not being zero. + The content of the rString variable can be changed and corrected + by the method. + nType contains the type of the format. + nKey contains the index key of the format. + */ + bool PutEntry(OUString& rString, sal_Int32& nCheckPos, SvNumFormatType& nType, sal_uInt32& nKey, + LanguageType eLnge = LANGUAGE_DONTKNOW, bool bReplaceBooleanEquivalent = true); + + /** Same as <method>PutEntry</method> but the format code string is + considered to be of language/country eLnge and is converted to + language/country eNewLnge */ + bool PutandConvertEntry(OUString& rString, sal_Int32& nCheckPos, SvNumFormatType& nType, + sal_uInt32& nKey, LanguageType eLnge, LanguageType eNewLnge, + bool bConvertDateOrder, bool bReplaceBooleanEquivalent = true); + + /** Same as <method>PutandConvertEntry</method> but the format code string + is considered to be of the System language/country eLnge and is + converted to another System language/country eNewLnge. In this case + the automatic currency is converted too. */ + bool PutandConvertEntrySystem(OUString& rString, sal_Int32& nCheckPos, SvNumFormatType& nType, + sal_uInt32& nKey, LanguageType eLnge, LanguageType eNewLnge); + + /** Similar to <method>PutEntry</method> and + <method>PutandConvertEntry</method> or + <method>PutandConvertEntrySystem</method>, the format code string + passed is considered to be of language/country eLnge. If + eLnge==LANGUAGE_SYSTEM the format code has to match eSysLnge, and if + eSysLnge is not the current application locale the format code is + converted to the current locale. Additionally, if the format code + represents an old "automatic" currency format, it is converted to the + new default currency format of the eLnge locale. The rString format + code passed as an argument may get adapted in case eLnge was used (or + is LANGUAGE_SYSTEM and eSysLnge is identical); in case it wasn't the + method works on a copy instead, otherwise the resulting string would + not match eSysLnge anymore. + + <p> This method was introduced to handle the legacy currency formats of + the "autotbl.fmt" file used by Calc and Writer and convert them to + fixed currency codes of the actual currency. Note that in the case of + legacy currency formats no special attribution is converted, only the + default currency format of the locale is chosen, and that new fixed + currency codes are of course not converted to other currencies. The + method may also be used as a general method taking, converting and + inserting almost arbitrary format codes. To insert or use, for example, + the default currency format code matching the current locale, the + method could be called with<br/> + + <code> + GetIndexPuttingAndConverting( "0 $", LANGUAGE_SYSTEM, LANGUAGE_ENGLISH_US, ...); + </code> + + @return + The index key of the resulting number format. If the format code + was empty, could not be converted or has errors, the eLnge locale's + standard number format is chosen instead. The index key is + guaranteed to represent some valid number format. If + rNewInserted==false and rCheckPos>0 the format code has errors + and/or could not be converted. + */ + sal_uInt32 GetIndexPuttingAndConverting(OUString& rString, LanguageType eLnge, + LanguageType eSysLnge, SvNumFormatType& rType, + bool& rNewInserted, sal_Int32& rCheckPos); + + /** Create a format code string using format nIndex as a template and + applying other settings (passed from the dialog) */ + OUString GenerateFormat(sal_uInt32 nIndex, LanguageType eLnge = LANGUAGE_DONTKNOW, + bool bThousand = false, bool IsRed = false, sal_uInt16 nPrecision = 0, + sal_uInt16 nLeadingCnt = 1); + + /** Analyze an input string + @return + <TRUE/> if input is a number or is matching a format F_Index + F_Index is set to a matching format if number, the value is + returned in fOutNumber + <FALSE/> if input is not a number + */ + bool IsNumberFormat(const OUString& sString, sal_uInt32& F_Index, double& fOutNumber, + SvNumInputOptions eInputOptions = SvNumInputOptions::NONE); + + /// Format a number according to a format index, return string and color + void GetOutputString(const double& fOutNumber, sal_uInt32 nFIndex, OUString& sOutString, + const Color** ppColor, bool bUseStarFormat = false); + + /** Format a string according to a format index, return string and color. + Formats only if the format code is of type text or the 4th subcode + of a format code is specified, otherwise sOutString will be == "" */ + void GetOutputString(const OUString& sString, sal_uInt32 nFIndex, OUString& sOutString, + const Color** ppColor, bool bUseStarFormat = false); + + /** Format a number according to the standard default format matching + the given format index. rOutString will be the real cell string (e.g. + a number rounded by the cell format, which rounded value is used + in the filtering condition now), instead of the EditFormat string + (e.g a not rounded value, which is visible during editing).*/ + void GetInputLineString(const double& fOutNumber, sal_uInt32 nFIndex, OUString& rOutString, + bool bFiltering = false); + + /** Format a number according to a format code string to be scanned. + @return + <FALSE/> if format code contains an error + <TRUE/> else, in which case the string and color are returned. + */ + bool GetPreviewString(const OUString& sFormatString, double fPreviewNumber, + OUString& sOutString, const Color** ppColor, LanguageType eLnge, + bool bUseStarFormat = false); + + /** Same as <method>GetPreviewString</method> but the format code string + may be either language/country eLnge or en_US english US */ + bool GetPreviewStringGuess(const OUString& sFormatString, double fPreviewNumber, + OUString& sOutString, const Color** ppColor, + LanguageType eLnge = LANGUAGE_DONTKNOW); + + /** Format a string according to a format code string to be scanned. + @return + <FALSE/> if format code contains an error + <TRUE/> else, in which case the string and color are returned. + */ + bool GetPreviewString(const OUString& sFormatString, const OUString& sPreviewString, + OUString& sOutString, const Color** ppColor, + LanguageType eLnge = LANGUAGE_DONTKNOW); + + /** Test whether the format code string is already present in container + @return + NUMBERFORMAT_ENTRY_NOT_FOUND if not found, else the format index. + */ + sal_uInt32 TestNewString(const OUString& sFormatString, LanguageType eLnge = LANGUAGE_DONTKNOW); + + /// Whether format index nFIndex is of type text or not + bool IsTextFormat(sal_uInt32 nFIndex) const; + + /// Get additional info of a format index, e.g. for dialog box + void GetFormatSpecialInfo(sal_uInt32 nFormat, bool& bThousand, bool& IsRed, + sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt); + + /// Count of decimals + sal_uInt16 GetFormatPrecision(sal_uInt32 nFormat) const; + + /// Count of integer digits + sal_uInt16 GetFormatIntegerDigits(sal_uInt32 nFormat) const; + + /** Get additional info of a format code string, e.g. for dialog box. + Uses a temporary parse, if possible use only if format code is not + present in container yet, otherwise ineffective. + @return + 0 if format code string parsed without errors, otherwise error + position (like nCheckPos on <method>PutEntry</method>) + */ + sal_uInt32 GetFormatSpecialInfo(const OUString&, bool& bThousand, bool& IsRed, + sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt, + LanguageType eLnge = LANGUAGE_DONTKNOW); + + /// Get return string for Calc CELL() function, "G", "D1", ... + OUString GetCalcCellReturn(sal_uInt32 nFormat) const; + + /// Check if format code string may be deleted by user + bool IsUserDefined(std::u16string_view sStr, LanguageType eLnge = LANGUAGE_DONTKNOW); + + /** Return the format index of the format code string for language/country, + or NUMBERFORMAT_ENTRY_NOT_FOUND */ + sal_uInt32 GetEntryKey(std::u16string_view sStr, LanguageType eLnge = LANGUAGE_DONTKNOW); + + /// Return the format for a format index + const SvNumberformat* GetEntry(sal_uInt32 nKey) const; + + /// Obtain substituted GetFormatEntry(), i.e. system formats. + const SvNumberformat* GetSubstitutedEntry(sal_uInt32 nKey, sal_uInt32& o_rNewKey) const; + + /// Return the format index of the standard default number format for language/country + sal_uInt32 GetStandardIndex(LanguageType eLnge = LANGUAGE_DONTKNOW); + + /// Return the format index of the default format of a type for language/country + sal_uInt32 GetStandardFormat(SvNumFormatType eType, LanguageType eLnge = LANGUAGE_DONTKNOW); + + /** Return the format index of the default format of a type for language/country. + Maybe not the default format but a special builtin format, e.g. for + NF_TIME_HH_MMSS00, if that format is passed in nFIndex. */ + sal_uInt32 GetStandardFormat(sal_uInt32 nFIndex, SvNumFormatType eType, LanguageType eLnge); + + /** Return the format index of the default format of a type for language/country. + Maybe not the default format but a special builtin format, e.g. for + NF_TIME_HH_MMSS00, or NF_TIME_HH_MMSS if fNumber >= 1.0 */ + sal_uInt32 GetStandardFormat(double fNumber, sal_uInt32 nFIndex, SvNumFormatType eType, + LanguageType eLnge); + + /// Whether nFIndex is a special builtin format + bool IsSpecialStandardFormat(sal_uInt32 nFIndex, LanguageType eLnge); + + /** Return a time format that best matches fNumber. */ + sal_uInt32 GetTimeFormat(double fNumber, LanguageType eLnge, bool bForceDuration); + + /** Return a format and type that best matches the value of fNumber if + fNumber is assumed to be a date, time or datetime value, but unknown + which. Originally introduced for Chart databrowser editor, probably + should not be used otherwise. */ + sal_uInt32 GuessDateTimeFormat(SvNumFormatType& rType, double fNumber, LanguageType eLnge); + + /** Return the corresponding edit format of a format. */ + sal_uInt32 GetEditFormat(double fNumber, sal_uInt32 nFIndex, SvNumFormatType eType, + LanguageType eLnge, SvNumberformat const* pFormat); + + /// Return the reference date + const Date& GetNullDate() const; + /// Return the standard decimal precision + sal_uInt16 GetStandardPrec() const; + /// Return whether zero suppression is switched on + bool GetNoZero() const; + /** Get the type of a format (or css::util::NumberFormat::UNDEFINED if no entry), + but with css::util::NumberFormat::DEFINED masked out */ + SvNumFormatType GetType(sal_uInt32 nFIndex) const; + + /// As the name says + void ClearMergeTable(); + /// Merge in all new entries from rNewTable and return a table of resulting new format indices + SvNumberFormatterIndexTable* MergeFormatter(SvNumberFormatter& rNewTable); + + /// Whether a merge table is present or not + bool HasMergeFormatTable() const; + /// Return the new format index for an old format index, if a merge table exists + sal_uInt32 GetMergeFormatIndex(sal_uInt32 nOldFmt) const; + + /** Convert the ugly old tools' Table type bloated with new'ed sal_uInt32 + entries merge table to ::std::map with old index key and new index key. + @ATTENTION! Also clears the old table using ClearMergeTable() */ + SvNumberFormatterMergeMap ConvertMergeTableToMap(); + + /** Return the format index of a builtin format for a specific language/country. + If nFormat is not a builtin format nFormat is returned. */ + sal_uInt32 GetFormatForLanguageIfBuiltIn(sal_uInt32 nFormat, + LanguageType eLnge = LANGUAGE_DONTKNOW); + + /** Return the format index for a builtin format of a specific language + @see NfIndexTableOffset + */ + sal_uInt32 GetFormatIndex(NfIndexTableOffset, LanguageType eLnge = LANGUAGE_DONTKNOW); + + /** Return enum index of a format index of a builtin format, + NF_INDEX_TABLE_ENTRIES if it's not a builtin format. + @see NfIndexTableOffset + */ + NfIndexTableOffset GetIndexTableOffset(sal_uInt32 nFormat) const; + + /** Set evaluation type and order of input date strings + @see NfEvalDateFormat + */ + void SetEvalDateFormat(NfEvalDateFormat eEDF); + NfEvalDateFormat GetEvalDateFormat() const; + + /** Set TwoDigitYearStart, how the input string scanner handles a two digit year. + Default from VCL: 1930, 30-99 19xx, 00-29 20xx + + <p> Historically (prior to src513e) it was a two digit number determining + until which number the string scanner recognizes a year to be 20xx, + default <= 29 is used by SFX/OfaMiscCfg. + The name Year2000 is kept although the actual functionality is now a + TwoDigitYearStart which might be in any century. + */ + void SetYear2000(sal_uInt16 nVal); + sal_uInt16 GetYear2000() const; + static sal_uInt16 GetYear2000Default(); + + sal_uInt16 ExpandTwoDigitYear(sal_uInt16 nYear) const; + static sal_uInt16 ExpandTwoDigitYear(sal_uInt16 nYear, sal_uInt16 nTwoDigitYearStart); + + /// Return the decimal separator matching the locale of the given format + OUString GetFormatDecimalSep(sal_uInt32 nFormat) const; + + /// Return the decimal separator matching the given locale / LanguageType. + OUString GetLangDecimalSep(LanguageType nLang) const; + + static void resetTheCurrencyTable(); + + /// Return a NfCurrencyTable with pointers to <type>NfCurrencyEntry</type> entries + static const NfCurrencyTable& GetTheCurrencyTable(); + + /** Searches, according to the default locale currency, an entry of the + CurrencyTable which is <bold>not</bold> the first (LANGUAGE_SYSTEM) entry. + @return + <NULL/> if not found + else pointer to NfCurrencyEntry + */ + static const NfCurrencyEntry* MatchSystemCurrency(); + + /** Return a NfCurrencyEntry matching a language/country. + If language/country is LANGUAGE_SYSTEM a <method>MatchSystemCurrency</method> + call is tried to get an entry. If that fails or the corresponding + language/country is not present the entry for LANGUAGE_SYSTEM is returned. + */ + static const NfCurrencyEntry& GetCurrencyEntry(LanguageType); + + /** Return a NfCurrencyEntry pointer matching a language/country + and currency abbreviation (AKA banking symbol). + This method is meant for the configuration of the default currency. + @return + <NULL/> if not found + else pointer to NfCurrencyEntry + */ + static const NfCurrencyEntry* GetCurrencyEntry(std::u16string_view rAbbrev, LanguageType eLang); + + /** Return a NfCurrencyEntry pointer matching the symbol + combination of a LegacyOnly currency. Note that this means only that + the currency matching both symbols was once used in the Office, but is + not offered in dialogs anymore. It doesn't even mean that the currency + symbol combination is valid, since the reason for removing it may have + been just that. #i61657# + @return + A matching entry, or else <NULL/>. + */ + static const NfCurrencyEntry* GetLegacyOnlyCurrencyEntry(std::u16string_view rSymbol, + std::u16string_view rAbbrev); + + /** Set the default system currency. The combination of abbreviation and + language must match an existent element of theCurrencyTable. If not, + the SYSTEM (current locale) entry becomes the default. + This method is meant for the configuration of the default currency. + */ + static void SetDefaultSystemCurrency(std::u16string_view rAbbrev, LanguageType eLang); + + /** Get all standard formats for a specific currency, formats are + appended to the NfWSStringsDtor list. + @param bBank + <TRUE/>: generate only format strings with currency abbreviation + <FALSE/>: mixed format strings + @return + position of default format + */ + sal_uInt16 GetCurrencyFormatStrings(NfWSStringsDtor&, const NfCurrencyEntry&, bool bBank) const; + + /** Whether nFormat is of type css::util::NumberFormat::CURRENCY and the format code + contains a new SYMBOLTYPE_CURRENCY and if so which one [$xxx-nnn]. + If ppEntry is not NULL and exactly one entry is found, a [$xxx-nnn] is + returned, even if the format code only contains [$xxx] ! + */ + bool GetNewCurrencySymbolString(sal_uInt32 nFormat, OUString& rSymbol, + const NfCurrencyEntry** ppEntry, bool* pBank = nullptr) const; + + /** Look up the corresponding NfCurrencyEntry matching + rSymbol (may be CurrencySymbol or CurrencyAbbreviation) and possibly + a rExtension (being yyy of [$xxx-yyy]) or a given language/country + value. Tries to match a rSymbol with rExtension first, then with + eFormatLanguage, then rSymbol only. This is because a currency entry + might have been constructed using I18N locale data where a used locale + of a currency format code must not necessarily match the locale of + the locale data itself, e.g. [$HK$-40C] (being "zh_HK" locale) in + zh_CN locale data. Here the rExtension would have the value 0x40c but + eFormatLanguage of the number format would have the value of zh_CN + locale, the value with which the corresponding CurrencyEntry is + constructed. + + @param bFoundBank + Only used for output. + If the return value is not <NULL/> this value is set to <TRUE/> if + the matching entry was found by comparing rSymbol against the + CurrencyAbbreviation (AKA BankSymbol). + If the return value is <NULL/> the value of bFoundBank is undefined. + @param rSymbol + Currency symbol, preferably obtained of a format by a call to + <method>SvNumberformat::GetNewCurrencySymbol()</method> + @param rExtension + Currency extension, preferably obtained of a format by a call to + <method>SvNumberformat::GetNewCurrencySymbol()</method> + @param eFormatLanguage + The language/country value of the format of which rSymbol and + rExtension are obtained (<method>SvNumberformat::GetLanguage()</method>). + @param bOnlyStringLanguage + If <TRUE/> only entries with language/country of rExtension are + checked, no match on eFormatLanguage. If rExtension is empty all + entries are checked. + @return + The matching entry if unique (in which case bFoundBank is set), + else <NULL/>. + */ + static const NfCurrencyEntry* GetCurrencyEntry(bool& bFoundBank, std::u16string_view rSymbol, + const OUString& rExtension, + LanguageType eFormatLanguage, + bool bOnlyStringLanguage = false); + + /// Get compatibility ("automatic" old style) currency from I18N locale data + void GetCompatibilityCurrency(OUString& rSymbol, OUString& rAbbrev) const; + + /// Fill rList with the language/country codes that have been allocated + void GetUsedLanguages(std::vector<LanguageType>& rList); + + /// Fill a NfKeywordIndex table with keywords of a language/country + void FillKeywordTable(NfKeywordTable& rKeywords, LanguageType eLang); + + /** Fill a NfKeywordIndex table with keywords usable in Excel export with + GetFormatStringForExcel() or SvNumberformat::GetMappedFormatstring() */ + void FillKeywordTableForExcel(NfKeywordTable& rKeywords); + + /** Return a format code string suitable for Excel export. + + @param rTempFormatter + SvNumberFormatter to use if a non-en-US format code needs to be + converted and put, should not be the same formatter to not + pollute the entries of this one here. + */ + OUString GetFormatStringForExcel(sal_uInt32 nKey, const NfKeywordTable& rKeywords, + SvNumberFormatter& rTempFormatter) const; + + /** Return a keyword for a language/country and NfKeywordIndex + for XML import, to generate number format strings. */ + OUString GetKeyword(LanguageType eLnge, sal_uInt16 nIndex); + + /** Return the GENERAL keyword in proper case ("General") for a + language/country, used in XML import */ + OUString GetStandardName(LanguageType eLnge); + + /** Check if a specific locale has supported locale data. */ + static bool IsLocaleInstalled(LanguageType eLang); + + /** Obtain NfKeywordTable used with a format, possibly localized. + + XXX NOTE: the content (actual keywords) is only valid as long as the + locale context of the associated ImpSvNumberformatScan instance does + not change to a locale with different keywords, which may happen + anytime with a call (implicit or explicit) to + SvNumberFormatter::ChangeIntl(). If needed longer, copy-create another + NfKeywordTable instance or copy individual elements. + + If the format specified with nKey does not exist, the content of the + NfKeywordTable matches the locale with which the SvNumberFormatter + instance was created and initialized. + + This function preliminary exists for unit tests and otherwise is + pretty much useless. + */ + const NfKeywordTable& GetKeywords(sal_uInt32 nKey); + + /** Access for unit tests. */ + const NfKeywordTable& GetEnglishKeywords() const; + + /** Access for unit tests. */ + const std::vector<Color>& GetStandardColors() const; + + /** Access for unit tests. */ + size_t GetMaxDefaultColors() const; + + struct InputScannerPrivateAccess + { + friend class ImpSvNumberInputScan; + + private: + InputScannerPrivateAccess() {} + }; + /** Access for input scanner to temporarily (!) switch locales. */ + OnDemandLocaleDataWrapper& GetOnDemandLocaleDataWrapper(const InputScannerPrivateAccess&) + { + return xLocaleData; + } + +private: + mutable ::osl::Mutex m_aMutex; + css::uno::Reference<css::uno::XComponentContext> m_xContext; + LanguageTag maLanguageTag; + std::map<sal_uInt32, std::unique_ptr<SvNumberformat>> + aFTable; // Table of format keys to format entries + typedef std::map<sal_uInt32, sal_uInt32> DefaultFormatKeysMap; + DefaultFormatKeysMap aDefaultFormatKeys; // Table of default standard to format keys + std::unique_ptr<SvNumberFormatTable> pFormatTable; // For the UI dialog + std::unique_ptr<SvNumberFormatterIndexTable> + pMergeTable; // List of indices for merging two formatters + std::unique_ptr<CharClass> pCharClass; // CharacterClassification + OnDemandLocaleDataWrapper xLocaleData; // LocaleData switched between SYSTEM, ENGLISH and other + OnDemandTransliterationWrapper xTransliteration; // Transliteration loaded on demand + OnDemandCalendarWrapper xCalendar; // Calendar loaded on demand + OnDemandNativeNumberWrapper xNatNum; // Native number service loaded on demand + std::unique_ptr<ImpSvNumberInputScan> pStringScanner; // Input string scanner + std::unique_ptr<ImpSvNumberformatScan> pFormatScanner; // Format code string scanner + Link<sal_uInt16, Color*> aColorLink; // User defined color table CallBack + sal_uInt32 MaxCLOffset; // Max language/country offset used + sal_uInt32 nDefaultSystemCurrencyFormat; // NewCurrency matching SYSTEM locale + LanguageType IniLnge; // Initialized setting language/country + LanguageType ActLnge; // Current setting language/country + NfEvalDateFormat eEvalDateFormat; // DateFormat evaluation + bool bNoZero; // Zero value suppression + + // cached locale data items needed almost any time + OUString aDecimalSep; + OUString aDecimalSepAlt; + OUString aThousandSep; + OUString aDateSep; + + SVL_DLLPRIVATE static volatile bool bCurrencyTableInitialized; + SVL_DLLPRIVATE static sal_uInt16 nSystemCurrencyPosition; + SVL_DLLPRIVATE static SvNumberFormatterRegistry_Impl* pFormatterRegistry; + + // get the registry, create one if none exists + SVL_DLLPRIVATE static SvNumberFormatterRegistry_Impl& GetFormatterRegistry(); + + // called by ctors + SVL_DLLPRIVATE void ImpConstruct(LanguageType eLang); + + // Generate builtin formats provided by i18n behind CLOffset, + // if bNoAdditionalFormats==false also generate additional i18n formats. + SVL_DLLPRIVATE void ImpGenerateFormats(sal_uInt32 CLOffset, bool bNoAdditionalFormats); + + // Generate additional formats provided by i18n + SVL_DLLPRIVATE void ImpGenerateAdditionalFormats( + sal_uInt32 CLOffset, + css::uno::Reference<css::i18n::XNumberFormatCode> const& rNumberFormatCode, + bool bAfterChangingSystemCL); + + SVL_DLLPRIVATE SvNumberformat* ImpInsertFormat(const css::i18n::NumberFormatCode& rCode, + sal_uInt32 nPos, + bool bAfterChangingSystemCL = false, + sal_Int16 nOrgIndex = 0); + + // Return CLOffset or (MaxCLOffset + SV_COUNTRY_LANGUAGE_OFFSET) if new language/country + SVL_DLLPRIVATE sal_uInt32 ImpGetCLOffset(LanguageType eLnge) const; + + // Test whether format code already exists, then return index key, + // otherwise NUMBERFORMAT_ENTRY_NOT_FOUND + SVL_DLLPRIVATE sal_uInt32 ImpIsEntry(std::u16string_view rString, sal_uInt32 CLOffset, + LanguageType eLnge); + + // Create builtin formats for language/country if necessary, return CLOffset + SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL(LanguageType eLnge); + + // Create theCurrencyTable with all <type>NfCurrencyEntry</type> + SVL_DLLPRIVATE static void ImpInitCurrencyTable(); + + // Return the format index of the currency format of the system locale. + // Format is created if not already present. + SVL_DLLPRIVATE sal_uInt32 ImpGetDefaultSystemCurrencyFormat(); + + // Return the format index of the currency format of the current locale. + // Format is created if not already present. + SVL_DLLPRIVATE sal_uInt32 ImpGetDefaultCurrencyFormat(); + + // Return the default format for a given type and current locale. + // May ONLY be called from within GetStandardFormat(). + SVL_DLLPRIVATE sal_uInt32 ImpGetDefaultFormat(SvNumFormatType nType); + + // Return the index in a sequence of format codes matching an enum of + // NfIndexTableOffset. If not found 0 is returned. If the sequence doesn't + // contain any format code elements a default element is created and inserted. + SVL_DLLPRIVATE sal_Int32 ImpGetFormatCodeIndex( + css::uno::Sequence<css::i18n::NumberFormatCode>& rSeq, const NfIndexTableOffset nTabOff); + + // Adjust a sequence of format codes to contain only one (THE) default + // instead of multiple defaults for short/medium/long types. + // If there is no medium but a short and a long default the long is taken. + // Non-PRODUCT version may check locale data for matching defaults in one + // FormatElement group. + SVL_DLLPRIVATE void ImpAdjustFormatCodeDefault(css::i18n::NumberFormatCode* pFormatArr, + sal_Int32 nCount); + + // Obtain the format entry for a given key index. + SVL_DLLPRIVATE SvNumberformat* GetFormatEntry(sal_uInt32 nKey); + SVL_DLLPRIVATE const SvNumberformat* GetFormatEntry(sal_uInt32 nKey) const; + + // used as a loop body inside of GetNewCurrencySymbolString() and GetCurrencyEntry() + static bool ImpLookupCurrencyEntryLoopBody(const NfCurrencyEntry*& pFoundEntry, + bool& bFoundBank, const NfCurrencyEntry* pData, + sal_uInt16 nPos, std::u16string_view rSymbol); + + // link to be set at <method>SvtSysLocaleOptions::SetCurrencyChangeLink()</method> + DECL_DLLPRIVATE_STATIC_LINK(SvNumberFormatter, CurrencyChangeLink, LinkParamNone*, void); + + // return position of a special character + sal_Int32 ImpPosToken(const OUStringBuffer& sFormat, sal_Unicode token, + sal_Int32 nStartPos = 0) const; + + // Substitute a format during GetFormatEntry(), i.e. system formats. + SvNumberformat* ImpSubstituteEntry(SvNumberformat* pFormat, sal_uInt32* o_pRealKey = nullptr); + + // own mutex, may also be used by internal class SvNumberFormatterRegistry_Impl + static ::osl::Mutex& GetGlobalMutex(); + ::osl::Mutex& GetInstanceMutex() const { return m_aMutex; } + +public: + // called by SvNumberFormatterRegistry_Impl::Notify if the default system currency changes + void ResetDefaultSystemCurrency(); + + // Called by SvNumberFormatterRegistry_Impl::Notify if the system locale's + // date acceptance patterns change. + void InvalidateDateAcceptancePatterns(); + + // Replace the SYSTEM language/country format codes. Called upon change of + // the user configurable locale. + // Old compatibility codes are replaced, user defined are converted, and + // new format codes are appended. + void ReplaceSystemCL(LanguageType eOldLanguage); + + const css::uno::Reference<css::uno::XComponentContext>& GetComponentContext() const; + + //! The following method is not to be used from outside but must be + //! public for the InputScanner. + // return the current FormatScanner + const ImpSvNumberformatScan* GetFormatScanner() const; + + //! The following methods are not to be used from outside but must be + //! public for the InputScanner and FormatScanner. + + // return current (!) Locale + const LanguageTag& GetLanguageTag() const; + + // return corresponding Transliteration wrapper + const ::utl::TransliterationWrapper* GetTransliteration() const; + + // return the corresponding CharacterClassification wrapper + const CharClass* GetCharClass() const; + + // return the corresponding LocaleData wrapper + const LocaleDataWrapper* GetLocaleData() const; + + // return the corresponding Calendar wrapper + CalendarWrapper* GetCalendar() const; + + // return the corresponding NativeNumberSupplier wrapper + const NativeNumberWrapper* GetNatNum() const; + + // cached locale data items + + // return the corresponding decimal separator + const OUString& GetNumDecimalSep() const; + + // return the corresponding decimal separator alternative + const OUString& GetNumDecimalSepAlt() const; + + // return the corresponding group (AKA thousand) separator + const OUString& GetNumThousandSep() const; + + // return the corresponding date separator + const OUString& GetDateSep() const; + + // checks for decimal separator and optional alternative + bool IsDecimalSep(std::u16string_view rStr) const; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index f6227f0cd6bc..9445f10a006b 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -381,714 +381,6 @@ namespace o3tl { template<> struct typed_flags<SvNumInputOptions> : is_typed_flags<SvNumInputOptions, 0x0001> {}; } -class SvNumberFormatterRegistry_Impl; -class NfCurrencyTable; - -class SVL_DLLPUBLIC SvNumberFormatter -{ - friend class SvNumberFormatterRegistry_Impl; -public: - /** - * We can't technically have an "infinite" value, so we use an arbitrary - * upper precision threshold to represent the "unlimited" precision. - */ - static const sal_uInt16 UNLIMITED_PRECISION; - - /** - * Precision suitable for numbers displayed in input bar, for instance - * Calc's formula input bar. - */ - static const sal_uInt16 INPUTSTRING_PRECISION; - - /// Preferred ctor with service manager and language/country enum - SvNumberFormatter( - const css::uno::Reference< css::uno::XComponentContext >& rxContext, - LanguageType eLang - ); - - ~SvNumberFormatter(); - - /// Set CallBack to ColorTable - void SetColorLink( const Link<sal_uInt16,Color*>& rColorTableCallBack ); - /// Do the CallBack to ColorTable - Color* GetUserDefColor(sal_uInt16 nIndex); - - /// Change language/country, also input and format scanner - void ChangeIntl( LanguageType eLnge ); - /// Change the reference null date - void ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear); - /// Change standard precision - void ChangeStandardPrec(short nPrec); - /// Set zero value suppression - void SetNoZero(bool bNZ); - - /** The language with which the formatter was initialized (system setting), - NOT the current language after a ChangeIntl() */ - LanguageType GetLanguage() const; - - // Determine whether two format types are input compatible or not - static bool IsCompatible(SvNumFormatType eOldType, SvNumFormatType eNewType); - - /** Get table of formats of a specific type of a locale. A format FIndex is - tested whether it has the type and locale requested, if it doesn't - match FIndex returns the default format for the type/locale. If no - specific format is to be selected FIndex may be initialized to 0. */ - SvNumberFormatTable& GetEntryTable(SvNumFormatType eType, - sal_uInt32& FIndex, - LanguageType eLnge); - - /** Get table of formats of a specific type of a language/country. - FIndex returns the default format of that type. - If the language/country was never touched before new entries are generated */ - SvNumberFormatTable& ChangeCL(SvNumFormatType eType, - sal_uInt32& FIndex, - LanguageType eLnge); - - /** Get table of formats of the same type as FIndex; eType and rLnge are - set accordingly. An unknown format is set to Standard/General */ - SvNumberFormatTable& GetFirstEntryTable(SvNumFormatType& eType, - sal_uInt32& FIndex, - LanguageType& rLnge); - - /// Delete an entry including the format it is referring to - void DeleteEntry(sal_uInt32 nKey); - - /** Create new entry of a format code string for language/country. - @return - <TRUE/> if string new and ok and inserted. - <FALSE/> if string already exists or an unresolvable parse error - occurred, in which case nCheckPos is the error position within rString. - If the error occurs at position 0 or rString is empty nCheckPos - will be 1, so an error in the string is always indicated by - nCheckPos not being zero. - The content of the rString variable can be changed and corrected - by the method. - nType contains the type of the format. - nKey contains the index key of the format. - */ - bool PutEntry( OUString& rString, sal_Int32& nCheckPos, SvNumFormatType& nType, sal_uInt32& nKey, - LanguageType eLnge = LANGUAGE_DONTKNOW, bool bReplaceBooleanEquivalent = true ); - - /** Same as <method>PutEntry</method> but the format code string is - considered to be of language/country eLnge and is converted to - language/country eNewLnge */ - bool PutandConvertEntry( OUString& rString, sal_Int32& nCheckPos, - SvNumFormatType& nType, sal_uInt32& nKey, - LanguageType eLnge, LanguageType eNewLnge, - bool bConvertDateOrder, bool bReplaceBooleanEquivalent = true ); - - /** Same as <method>PutandConvertEntry</method> but the format code string - is considered to be of the System language/country eLnge and is - converted to another System language/country eNewLnge. In this case - the automatic currency is converted too. */ - bool PutandConvertEntrySystem( OUString& rString, sal_Int32& nCheckPos, - SvNumFormatType& nType, sal_uInt32& nKey, - LanguageType eLnge, LanguageType eNewLnge ); - - /** Similar to <method>PutEntry</method> and - <method>PutandConvertEntry</method> or - <method>PutandConvertEntrySystem</method>, the format code string - passed is considered to be of language/country eLnge. If - eLnge==LANGUAGE_SYSTEM the format code has to match eSysLnge, and if - eSysLnge is not the current application locale the format code is - converted to the current locale. Additionally, if the format code - represents an old "automatic" currency format, it is converted to the - new default currency format of the eLnge locale. The rString format - code passed as an argument may get adapted in case eLnge was used (or - is LANGUAGE_SYSTEM and eSysLnge is identical); in case it wasn't the - method works on a copy instead, otherwise the resulting string would - not match eSysLnge anymore. - - <p> This method was introduced to handle the legacy currency formats of - the "autotbl.fmt" file used by Calc and Writer and convert them to - fixed currency codes of the actual currency. Note that in the case of - legacy currency formats no special attribution is converted, only the - default currency format of the locale is chosen, and that new fixed - currency codes are of course not converted to other currencies. The - method may also be used as a general method taking, converting and - inserting almost arbitrary format codes. To insert or use, for example, - the default currency format code matching the current locale, the - method could be called with<br/> - - <code> - GetIndexPuttingAndConverting( "0 $", LANGUAGE_SYSTEM, LANGUAGE_ENGLISH_US, ...); - </code> - - @return - The index key of the resulting number format. If the format code - was empty, could not be converted or has errors, the eLnge locale's - standard number format is chosen instead. The index key is - guaranteed to represent some valid number format. If - rNewInserted==false and rCheckPos>0 the format code has errors - and/or could not be converted. - */ - sal_uInt32 GetIndexPuttingAndConverting( OUString & rString, LanguageType eLnge, - LanguageType eSysLnge, SvNumFormatType & rType, - bool & rNewInserted, sal_Int32 & rCheckPos ); - - /** Create a format code string using format nIndex as a template and - applying other settings (passed from the dialog) */ - OUString GenerateFormat(sal_uInt32 nIndex, - LanguageType eLnge = LANGUAGE_DONTKNOW, - bool bThousand = false, bool IsRed = false, - sal_uInt16 nPrecision = 0, sal_uInt16 nLeadingCnt = 1); - - /** Analyze an input string - @return - <TRUE/> if input is a number or is matching a format F_Index - F_Index is set to a matching format if number, the value is - returned in fOutNumber - <FALSE/> if input is not a number - */ - bool IsNumberFormat( const OUString& sString, sal_uInt32& F_Index, double& fOutNumber, - SvNumInputOptions eInputOptions = SvNumInputOptions::NONE ); - - /// Format a number according to a format index, return string and color - void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex, - OUString& sOutString, const Color** ppColor, bool bUseStarFormat = false ); - - /** Format a string according to a format index, return string and color. - Formats only if the format code is of type text or the 4th subcode - of a format code is specified, otherwise sOutString will be == "" */ - void GetOutputString( const OUString& sString, sal_uInt32 nFIndex, - OUString& sOutString, const Color** ppColor, bool bUseStarFormat = false ); - - /** Format a number according to the standard default format matching - the given format index. rOutString will be the real cell string (e.g. - a number rounded by the cell format, which rounded value is used - in the filtering condition now), instead of the EditFormat string - (e.g a not rounded value, which is visible during editing).*/ - void GetInputLineString( const double& fOutNumber, - sal_uInt32 nFIndex, OUString& rOutString, bool bFiltering = false ); - - /** Format a number according to a format code string to be scanned. - @return - <FALSE/> if format code contains an error - <TRUE/> else, in which case the string and color are returned. - */ - bool GetPreviewString(const OUString& sFormatString, - double fPreviewNumber, - OUString& sOutString, - const Color** ppColor, - LanguageType eLnge, - bool bUseStarFormat = false ); - - /** Same as <method>GetPreviewString</method> but the format code string - may be either language/country eLnge or en_US english US */ - bool GetPreviewStringGuess( const OUString& sFormatString, double fPreviewNumber, - OUString& sOutString, const Color** ppColor, - LanguageType eLnge = LANGUAGE_DONTKNOW ); - - /** Format a string according to a format code string to be scanned. - @return - <FALSE/> if format code contains an error - <TRUE/> else, in which case the string and color are returned. - */ - bool GetPreviewString( const OUString& sFormatString, const OUString& sPreviewString, - OUString& sOutString, const Color** ppColor, - LanguageType eLnge = LANGUAGE_DONTKNOW ); - - /** Test whether the format code string is already present in container - @return - NUMBERFORMAT_ENTRY_NOT_FOUND if not found, else the format index. - */ - sal_uInt32 TestNewString( const OUString& sFormatString, - LanguageType eLnge = LANGUAGE_DONTKNOW ); - - /// Whether format index nFIndex is of type text or not - bool IsTextFormat(sal_uInt32 nFIndex) const; - - /// Get additional info of a format index, e.g. for dialog box - void GetFormatSpecialInfo(sal_uInt32 nFormat, bool& bThousand, bool& IsRed, - sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt); - - /// Count of decimals - sal_uInt16 GetFormatPrecision( sal_uInt32 nFormat ) const; - - /// Count of integer digits - sal_uInt16 GetFormatIntegerDigits( sal_uInt32 nFormat ) const; - - /** Get additional info of a format code string, e.g. for dialog box. - Uses a temporary parse, if possible use only if format code is not - present in container yet, otherwise ineffective. - @return - 0 if format code string parsed without errors, otherwise error - position (like nCheckPos on <method>PutEntry</method>) - */ - sal_uInt32 GetFormatSpecialInfo( const OUString&, bool& bThousand, bool& IsRed, - sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt, - LanguageType eLnge = LANGUAGE_DONTKNOW ); - - /// Get return string for Calc CELL() function, "G", "D1", ... - OUString GetCalcCellReturn( sal_uInt32 nFormat ) const; - - /// Check if format code string may be deleted by user - bool IsUserDefined( std::u16string_view sStr, LanguageType eLnge = LANGUAGE_DONTKNOW ); - - /** Return the format index of the format code string for language/country, - or NUMBERFORMAT_ENTRY_NOT_FOUND */ - sal_uInt32 GetEntryKey( std::u16string_view sStr, LanguageType eLnge = LANGUAGE_DONTKNOW ); - - /// Return the format for a format index - const SvNumberformat* GetEntry( sal_uInt32 nKey ) const; - - /// Obtain substituted GetFormatEntry(), i.e. system formats. - const SvNumberformat* GetSubstitutedEntry( sal_uInt32 nKey, sal_uInt32 & o_rNewKey ) const; - - /// Return the format index of the standard default number format for language/country - sal_uInt32 GetStandardIndex(LanguageType eLnge = LANGUAGE_DONTKNOW); - - /// Return the format index of the default format of a type for language/country - sal_uInt32 GetStandardFormat(SvNumFormatType eType, LanguageType eLnge = LANGUAGE_DONTKNOW); - - /** Return the format index of the default format of a type for language/country. - Maybe not the default format but a special builtin format, e.g. for - NF_TIME_HH_MMSS00, if that format is passed in nFIndex. */ - sal_uInt32 GetStandardFormat( sal_uInt32 nFIndex, SvNumFormatType eType, LanguageType eLnge ); - - /** Return the format index of the default format of a type for language/country. - Maybe not the default format but a special builtin format, e.g. for - NF_TIME_HH_MMSS00, or NF_TIME_HH_MMSS if fNumber >= 1.0 */ - sal_uInt32 GetStandardFormat( double fNumber, sal_uInt32 nFIndex, SvNumFormatType eType, - LanguageType eLnge ); - - /// Whether nFIndex is a special builtin format - bool IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge ); - - /** Return a time format that best matches fNumber. */ - sal_uInt32 GetTimeFormat( double fNumber, LanguageType eLnge, bool bForceDuration ); - - /** Return a format and type that best matches the value of fNumber if - fNumber is assumed to be a date, time or datetime value, but unknown - which. Originally introduced for Chart databrowser editor, probably - should not be used otherwise. */ - sal_uInt32 GuessDateTimeFormat( SvNumFormatType& rType, double fNumber, LanguageType eLnge ); - - /** Return the corresponding edit format of a format. */ - sal_uInt32 GetEditFormat( double fNumber, sal_uInt32 nFIndex, SvNumFormatType eType, - LanguageType eLnge, SvNumberformat const * pFormat ); - - /// Return the reference date - const Date& GetNullDate() const; - /// Return the standard decimal precision - sal_uInt16 GetStandardPrec() const; - /// Return whether zero suppression is switched on - bool GetNoZero() const; - /** Get the type of a format (or css::util::NumberFormat::UNDEFINED if no entry), - but with css::util::NumberFormat::DEFINED masked out */ - SvNumFormatType GetType(sal_uInt32 nFIndex) const; - - /// As the name says - void ClearMergeTable(); - /// Merge in all new entries from rNewTable and return a table of resulting new format indices - SvNumberFormatterIndexTable* MergeFormatter(SvNumberFormatter& rNewTable); - - /// Whether a merge table is present or not - bool HasMergeFormatTable() const; - /// Return the new format index for an old format index, if a merge table exists - sal_uInt32 GetMergeFormatIndex( sal_uInt32 nOldFmt ) const; - - /** Convert the ugly old tools' Table type bloated with new'ed sal_uInt32 - entries merge table to ::std::map with old index key and new index key. - @ATTENTION! Also clears the old table using ClearMergeTable() */ - SvNumberFormatterMergeMap ConvertMergeTableToMap(); - - /** Return the format index of a builtin format for a specific language/country. - If nFormat is not a builtin format nFormat is returned. */ - sal_uInt32 GetFormatForLanguageIfBuiltIn( sal_uInt32 nFormat, - LanguageType eLnge = LANGUAGE_DONTKNOW ); - - /** Return the format index for a builtin format of a specific language - @see NfIndexTableOffset - */ - sal_uInt32 GetFormatIndex( NfIndexTableOffset, LanguageType eLnge = LANGUAGE_DONTKNOW ); - - /** Return enum index of a format index of a builtin format, - NF_INDEX_TABLE_ENTRIES if it's not a builtin format. - @see NfIndexTableOffset - */ - NfIndexTableOffset GetIndexTableOffset( sal_uInt32 nFormat ) const; - - /** Set evaluation type and order of input date strings - @see NfEvalDateFormat - */ - void SetEvalDateFormat( NfEvalDateFormat eEDF ); - NfEvalDateFormat GetEvalDateFormat() const; - - /** Set TwoDigitYearStart, how the input string scanner handles a two digit year. - Default from VCL: 1930, 30-99 19xx, 00-29 20xx - - <p> Historically (prior to src513e) it was a two digit number determining - until which number the string scanner recognizes a year to be 20xx, - default <= 29 is used by SFX/OfaMiscCfg. - The name Year2000 is kept although the actual functionality is now a - TwoDigitYearStart which might be in any century. - */ - void SetYear2000( sal_uInt16 nVal ); - sal_uInt16 GetYear2000() const; - static sal_uInt16 GetYear2000Default(); - - sal_uInt16 ExpandTwoDigitYear( sal_uInt16 nYear ) const; - static sal_uInt16 ExpandTwoDigitYear( sal_uInt16 nYear, sal_uInt16 nTwoDigitYearStart ); - - /// Return the decimal separator matching the locale of the given format - OUString GetFormatDecimalSep( sal_uInt32 nFormat ) const; - - /// Return the decimal separator matching the given locale / LanguageType. - OUString GetLangDecimalSep( LanguageType nLang ) const; - - static void resetTheCurrencyTable(); - - /// Return a NfCurrencyTable with pointers to <type>NfCurrencyEntry</type> entries - static const NfCurrencyTable& GetTheCurrencyTable(); - - /** Searches, according to the default locale currency, an entry of the - CurrencyTable which is <bold>not</bold> the first (LANGUAGE_SYSTEM) entry. - @return - <NULL/> if not found - else pointer to NfCurrencyEntry - */ - static const NfCurrencyEntry* MatchSystemCurrency(); - - /** Return a NfCurrencyEntry matching a language/country. - If language/country is LANGUAGE_SYSTEM a <method>MatchSystemCurrency</method> - call is tried to get an entry. If that fails or the corresponding - language/country is not present the entry for LANGUAGE_SYSTEM is returned. - */ - static const NfCurrencyEntry& GetCurrencyEntry( LanguageType ); - - /** Return a NfCurrencyEntry pointer matching a language/country - and currency abbreviation (AKA banking symbol). - This method is meant for the configuration of the default currency. - @return - <NULL/> if not found - else pointer to NfCurrencyEntry - */ - static const NfCurrencyEntry* GetCurrencyEntry( std::u16string_view rAbbrev, - LanguageType eLang ); - - /** Return a NfCurrencyEntry pointer matching the symbol - combination of a LegacyOnly currency. Note that this means only that - the currency matching both symbols was once used in the Office, but is - not offered in dialogs anymore. It doesn't even mean that the currency - symbol combination is valid, since the reason for removing it may have - been just that. #i61657# - @return - A matching entry, or else <NULL/>. - */ - static const NfCurrencyEntry* GetLegacyOnlyCurrencyEntry( std::u16string_view rSymbol, std::u16string_view rAbbrev ); - - /** Set the default system currency. The combination of abbreviation and - language must match an existent element of theCurrencyTable. If not, - the SYSTEM (current locale) entry becomes the default. - This method is meant for the configuration of the default currency. - */ - static void SetDefaultSystemCurrency( std::u16string_view rAbbrev, LanguageType eLang ); - - /** Get all standard formats for a specific currency, formats are - appended to the NfWSStringsDtor list. - @param bBank - <TRUE/>: generate only format strings with currency abbreviation - <FALSE/>: mixed format strings - @return - position of default format - */ - sal_uInt16 GetCurrencyFormatStrings( NfWSStringsDtor&, const NfCurrencyEntry&, - bool bBank ) const; - - /** Whether nFormat is of type css::util::NumberFormat::CURRENCY and the format code - contains a new SYMBOLTYPE_CURRENCY and if so which one [$xxx-nnn]. - If ppEntry is not NULL and exactly one entry is found, a [$xxx-nnn] is - returned, even if the format code only contains [$xxx] ! - */ - bool GetNewCurrencySymbolString( sal_uInt32 nFormat, OUString& rSymbol, - const NfCurrencyEntry** ppEntry, - bool* pBank = nullptr ) const; - - /** Look up the corresponding NfCurrencyEntry matching - rSymbol (may be CurrencySymbol or CurrencyAbbreviation) and possibly - a rExtension (being yyy of [$xxx-yyy]) or a given language/country - value. Tries to match a rSymbol with rExtension first, then with - eFormatLanguage, then rSymbol only. This is because a currency entry - might have been constructed using I18N locale data where a used locale - of a currency format code must not necessarily match the locale of - the locale data itself, e.g. [$HK$-40C] (being "zh_HK" locale) in - zh_CN locale data. Here the rExtension would have the value 0x40c but - eFormatLanguage of the number format would have the value of zh_CN - locale, the value with which the corresponding CurrencyEntry is - constructed. - - @param bFoundBank - Only used for output. - If the return value is not <NULL/> this value is set to <TRUE/> if - the matching entry was found by comparing rSymbol against the - CurrencyAbbreviation (AKA BankSymbol). - If the return value is <NULL/> the value of bFoundBank is undefined. - @param rSymbol - Currency symbol, preferably obtained of a format by a call to - <method>SvNumberformat::GetNewCurrencySymbol()</method> - @param rExtension - Currency extension, preferably obtained of a format by a call to - <method>SvNumberformat::GetNewCurrencySymbol()</method> - @param eFormatLanguage - The language/country value of the format of which rSymbol and - rExtension are obtained (<method>SvNumberformat::GetLanguage()</method>). - @param bOnlyStringLanguage - If <TRUE/> only entries with language/country of rExtension are - checked, no match on eFormatLanguage. If rExtension is empty all - entries are checked. - @return - The matching entry if unique (in which case bFoundBank is set), - else <NULL/>. - */ - static const NfCurrencyEntry* GetCurrencyEntry( bool & bFoundBank, - std::u16string_view rSymbol, - const OUString& rExtension, - LanguageType eFormatLanguage, - bool bOnlyStringLanguage = false ); - - /// Get compatibility ("automatic" old style) currency from I18N locale data - void GetCompatibilityCurrency( OUString& rSymbol, OUString& rAbbrev ) const; - - /// Fill rList with the language/country codes that have been allocated - void GetUsedLanguages( std::vector<LanguageType>& rList ); - - /// Fill a NfKeywordIndex table with keywords of a language/country - void FillKeywordTable( NfKeywordTable& rKeywords, LanguageType eLang ); - - /** Fill a NfKeywordIndex table with keywords usable in Excel export with - GetFormatStringForExcel() or SvNumberformat::GetMappedFormatstring() */ - void FillKeywordTableForExcel( NfKeywordTable& rKeywords ); - - /** Return a format code string suitable for Excel export. - - @param rTempFormatter - SvNumberFormatter to use if a non-en-US format code needs to be - converted and put, should not be the same formatter to not - pollute the entries of this one here. - */ - OUString GetFormatStringForExcel( sal_uInt32 nKey, const NfKeywordTable& rKeywords, - SvNumberFormatter& rTempFormatter ) const; - - /** Return a keyword for a language/country and NfKeywordIndex - for XML import, to generate number format strings. */ - OUString GetKeyword( LanguageType eLnge, sal_uInt16 nIndex ); - - /** Return the GENERAL keyword in proper case ("General") for a - language/country, used in XML import */ - OUString GetStandardName( LanguageType eLnge ); - - /** Check if a specific locale has supported locale data. */ - static bool IsLocaleInstalled( LanguageType eLang ); - - /** Obtain NfKeywordTable used with a format, possibly localized. - - XXX NOTE: the content (actual keywords) is only valid as long as the - locale context of the associated ImpSvNumberformatScan instance does - not change to a locale with different keywords, which may happen - anytime with a call (implicit or explicit) to - SvNumberFormatter::ChangeIntl(). If needed longer, copy-create another - NfKeywordTable instance or copy individual elements. - - If the format specified with nKey does not exist, the content of the - NfKeywordTable matches the locale with which the SvNumberFormatter - instance was created and initialized. - - This function preliminary exists for unit tests and otherwise is - pretty much useless. - */ - const NfKeywordTable & GetKeywords( sal_uInt32 nKey ); - - /** Access for unit tests. */ - const NfKeywordTable & GetEnglishKeywords() const; - - /** Access for unit tests. */ - const std::vector<Color> & GetStandardColors() const; - - /** Access for unit tests. */ - size_t GetMaxDefaultColors() const; - - struct InputScannerPrivateAccess { friend class ImpSvNumberInputScan; private: InputScannerPrivateAccess() {} }; - /** Access for input scanner to temporarily (!) switch locales. */ - OnDemandLocaleDataWrapper& GetOnDemandLocaleDataWrapper( const InputScannerPrivateAccess& ) { return xLocaleData; } - -private: - mutable ::osl::Mutex m_aMutex; - css::uno::Reference< css::uno::XComponentContext > m_xContext; - LanguageTag maLanguageTag; - std::map<sal_uInt32, std::unique_ptr<SvNumberformat>> aFTable; // Table of format keys to format entries - typedef std::map<sal_uInt32, sal_uInt32> DefaultFormatKeysMap; - DefaultFormatKeysMap aDefaultFormatKeys; // Table of default standard to format keys - std::unique_ptr<SvNumberFormatTable> pFormatTable; // For the UI dialog - std::unique_ptr<SvNumberFormatterIndexTable> pMergeTable; // List of indices for merging two formatters - std::unique_ptr<CharClass> pCharClass; // CharacterClassification - OnDemandLocaleDataWrapper xLocaleData; // LocaleData switched between SYSTEM, ENGLISH and other - OnDemandTransliterationWrapper xTransliteration; // Transliteration loaded on demand - OnDemandCalendarWrapper xCalendar; // Calendar loaded on demand - OnDemandNativeNumberWrapper xNatNum; // Native number service loaded on demand - std::unique_ptr<ImpSvNumberInputScan> pStringScanner; // Input string scanner - std::unique_ptr<ImpSvNumberformatScan> pFormatScanner; // Format code string scanner - Link<sal_uInt16,Color*> aColorLink; // User defined color table CallBack - sal_uInt32 MaxCLOffset; // Max language/country offset used - sal_uInt32 nDefaultSystemCurrencyFormat; // NewCurrency matching SYSTEM locale - LanguageType IniLnge; // Initialized setting language/country - LanguageType ActLnge; // Current setting language/country - NfEvalDateFormat eEvalDateFormat; // DateFormat evaluation - bool bNoZero; // Zero value suppression - - // cached locale data items needed almost any time - OUString aDecimalSep; - OUString aDecimalSepAlt; - OUString aThousandSep; - OUString aDateSep; - - SVL_DLLPRIVATE static volatile bool bCurrencyTableInitialized; - SVL_DLLPRIVATE static sal_uInt16 nSystemCurrencyPosition; - SVL_DLLPRIVATE static SvNumberFormatterRegistry_Impl* pFormatterRegistry; - - // get the registry, create one if none exists - SVL_DLLPRIVATE static SvNumberFormatterRegistry_Impl& GetFormatterRegistry(); - - // called by ctors - SVL_DLLPRIVATE void ImpConstruct( LanguageType eLang ); - - // Generate builtin formats provided by i18n behind CLOffset, - // if bNoAdditionalFormats==false also generate additional i18n formats. - SVL_DLLPRIVATE void ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditionalFormats ); - - // Generate additional formats provided by i18n - SVL_DLLPRIVATE void ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, - css::uno::Reference< css::i18n::XNumberFormatCode > const & rNumberFormatCode, - bool bAfterChangingSystemCL ); - - SVL_DLLPRIVATE SvNumberformat* ImpInsertFormat( const css::i18n::NumberFormatCode& rCode, - sal_uInt32 nPos, - bool bAfterChangingSystemCL = false, - sal_Int16 nOrgIndex = 0 ); - - // Return CLOffset or (MaxCLOffset + SV_COUNTRY_LANGUAGE_OFFSET) if new language/country - SVL_DLLPRIVATE sal_uInt32 ImpGetCLOffset(LanguageType eLnge) const; - - // Test whether format code already exists, then return index key, - // otherwise NUMBERFORMAT_ENTRY_NOT_FOUND - SVL_DLLPRIVATE sal_uInt32 ImpIsEntry( std::u16string_view rString, - sal_uInt32 CLOffset, - LanguageType eLnge ); - - // Create builtin formats for language/country if necessary, return CLOffset - SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge ); - - // Create theCurrencyTable with all <type>NfCurrencyEntry</type> - SVL_DLLPRIVATE static void ImpInitCurrencyTable(); - - // Return the format index of the currency format of the system locale. - // Format is created if not already present. - SVL_DLLPRIVATE sal_uInt32 ImpGetDefaultSystemCurrencyFormat(); - - // Return the format index of the currency format of the current locale. - // Format is created if not already present. - SVL_DLLPRIVATE sal_uInt32 ImpGetDefaultCurrencyFormat(); - - // Return the default format for a given type and current locale. - // May ONLY be called from within GetStandardFormat(). - SVL_DLLPRIVATE sal_uInt32 ImpGetDefaultFormat( SvNumFormatType nType ); - - // Return the index in a sequence of format codes matching an enum of - // NfIndexTableOffset. If not found 0 is returned. If the sequence doesn't - // contain any format code elements a default element is created and inserted. - SVL_DLLPRIVATE sal_Int32 ImpGetFormatCodeIndex( css::uno::Sequence< css::i18n::NumberFormatCode >& rSeq, - const NfIndexTableOffset nTabOff ); - - // Adjust a sequence of format codes to contain only one (THE) default - // instead of multiple defaults for short/medium/long types. - // If there is no medium but a short and a long default the long is taken. - // Non-PRODUCT version may check locale data for matching defaults in one - // FormatElement group. - SVL_DLLPRIVATE void ImpAdjustFormatCodeDefault( css::i18n::NumberFormatCode * pFormatArr, - sal_Int32 nCount ); - - // Obtain the format entry for a given key index. - SVL_DLLPRIVATE SvNumberformat* GetFormatEntry( sal_uInt32 nKey ); - SVL_DLLPRIVATE const SvNumberformat* GetFormatEntry( sal_uInt32 nKey ) const; - - // used as a loop body inside of GetNewCurrencySymbolString() and GetCurrencyEntry() - static bool ImpLookupCurrencyEntryLoopBody( - const NfCurrencyEntry*& pFoundEntry, bool& bFoundBank, const NfCurrencyEntry* pData, - sal_uInt16 nPos, std::u16string_view rSymbol ); - - // link to be set at <method>SvtSysLocaleOptions::SetCurrencyChangeLink()</method> - DECL_DLLPRIVATE_STATIC_LINK( SvNumberFormatter, CurrencyChangeLink, LinkParamNone*, void ); - - // return position of a special character - sal_Int32 ImpPosToken ( const OUStringBuffer & sFormat, sal_Unicode token, sal_Int32 nStartPos = 0 ) const; - - // Substitute a format during GetFormatEntry(), i.e. system formats. - SvNumberformat* ImpSubstituteEntry( SvNumberformat* pFormat, sal_uInt32 * o_pRealKey = nullptr ); - - // own mutex, may also be used by internal class SvNumberFormatterRegistry_Impl - static ::osl::Mutex& GetGlobalMutex(); - ::osl::Mutex& GetInstanceMutex() const { return m_aMutex; } - -public: - - // called by SvNumberFormatterRegistry_Impl::Notify if the default system currency changes - void ResetDefaultSystemCurrency(); - - // Called by SvNumberFormatterRegistry_Impl::Notify if the system locale's - // date acceptance patterns change. - void InvalidateDateAcceptancePatterns(); - - // Replace the SYSTEM language/country format codes. Called upon change of - // the user configurable locale. - // Old compatibility codes are replaced, user defined are converted, and - // new format codes are appended. - void ReplaceSystemCL( LanguageType eOldLanguage ); - - const css::uno::Reference<css::uno::XComponentContext>& GetComponentContext() const; - - //! The following method is not to be used from outside but must be - //! public for the InputScanner. - // return the current FormatScanner - const ImpSvNumberformatScan* GetFormatScanner() const; - - //! The following methods are not to be used from outside but must be - //! public for the InputScanner and FormatScanner. - - // return current (!) Locale - const LanguageTag& GetLanguageTag() const; - - // return corresponding Transliteration wrapper - const ::utl::TransliterationWrapper* GetTransliteration() const; - - // return the corresponding CharacterClassification wrapper - const CharClass* GetCharClass() const; - - // return the corresponding LocaleData wrapper - const LocaleDataWrapper* GetLocaleData() const; - - // return the corresponding Calendar wrapper - CalendarWrapper* GetCalendar() const; - - // return the corresponding NativeNumberSupplier wrapper - const NativeNumberWrapper* GetNatNum() const; - - // cached locale data items - - // return the corresponding decimal separator - const OUString& GetNumDecimalSep() const; - - // return the corresponding decimal separator alternative - const OUString& GetNumDecimalSepAlt() const; - - // return the corresponding group (AKA thousand) separator - const OUString& GetNumThousandSep() const; - - // return the corresponding date separator - const OUString& GetDateSep() const; - - // checks for decimal separator and optional alternative - bool IsDecimalSep( std::u16string_view rStr ) const; -}; #endif // INCLUDED_SVL_ZFORLIST_HXX diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index 976488257218..3fdee06d99dc 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -34,6 +34,7 @@ class Color; class ImpSvNumberformatScan; // format code string scanner class ImpSvNumberInputScan; // input string scanner +class SvNumberFormatter; enum SvNumberformatLimitOps { diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx index 1beaaf35e9b3..ce74d8e5b457 100644 --- a/include/svx/numfmtsh.hxx +++ b/include/svx/numfmtsh.hxx @@ -28,6 +28,7 @@ #include <vector> class Color; +class SvNumberFormatter; enum class SvxNumberValueType { diff --git a/oox/inc/drawingml/chart/datasourcecontext.hxx b/oox/inc/drawingml/chart/datasourcecontext.hxx index 8c893c1973a8..8ce8469cc3cb 100644 --- a/oox/inc/drawingml/chart/datasourcecontext.hxx +++ b/oox/inc/drawingml/chart/datasourcecontext.hxx @@ -24,6 +24,8 @@ #include <drawingml/chart/chartcontextbase.hxx> #include <svl/zforlist.hxx> +class SvNumberFormatter; + namespace oox::drawingml::chart { diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx b/oox/source/drawingml/chart/datasourcecontext.cxx index e9f2f3b189f6..eac776e107d9 100644 --- a/oox/source/drawingml/chart/datasourcecontext.cxx +++ b/oox/source/drawingml/chart/datasourcecontext.cxx @@ -25,6 +25,7 @@ #include <oox/helper/attributelist.hxx> #include <oox/token/namespaces.hxx> #include <oox/token/tokens.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <osl/diagnose.h> diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index dfebc8bf061a..dc122a4e97da 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -97,6 +97,7 @@ #include <xmloff/SchXMLSeriesHelper.hxx> #include "ColorPropertySet.hxx" +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/numuno.hxx> #include <tools/diagnose_ex.h> diff --git a/sc/qa/unit/datatransformation_test.cxx b/sc/qa/unit/datatransformation_test.cxx index 0cec07fb0742..37fc1a0f3711 100644 --- a/sc/qa/unit/datatransformation_test.cxx +++ b/sc/qa/unit/datatransformation_test.cxx @@ -13,6 +13,7 @@ #include <document.hxx> #include <datatransformation.hxx> #include <scdll.hxx> +#include <svl/numformat.hxx> #include <tools/time.hxx> class ScDataTransformationTest : public ScBootstrapFixture diff --git a/sc/qa/unit/subsequent_export-test2.cxx b/sc/qa/unit/subsequent_export-test2.cxx index 6ee07223a824..05f102cd1f38 100644 --- a/sc/qa/unit/subsequent_export-test2.cxx +++ b/sc/qa/unit/subsequent_export-test2.cxx @@ -69,6 +69,7 @@ #include <unotools/syslocaleoptions.hxx> #include <tools/datetime.hxx> #include <tools/fldunit.hxx> +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <test/xmltesttools.hxx> diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 16e3ced78ce7..c98f6ca0a439 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -20,6 +20,7 @@ #include <vcl/svapp.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/docfile.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <svl/zformat.hxx> #include <svx/svdograf.hxx> diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 18dec103b552..f8ddc85a01a4 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -81,6 +81,7 @@ #include <svx/svdocirc.hxx> #include <svx/svdopath.hxx> #include <svx/svdocapt.hxx> +#include <svl/numformat.hxx> #include <svl/srchitem.hxx> #include <svl/sharedstringpool.hxx> #include <tools/UnitConversion.hxx> diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx index f0e5db210fbd..0d336940fece 100644 --- a/sc/source/core/data/clipcontext.cxx +++ b/sc/source/core/data/clipcontext.cxx @@ -18,6 +18,7 @@ #include <clipparam.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <formula/errorcodes.hxx> #include <refdata.hxx> diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 5c8ed516deca..4bd91f60f3a0 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -44,6 +44,7 @@ #include <drwlayer.hxx> #include <mtvelements.hxx> +#include <svl/numformat.hxx> #include <svl/poolcach.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstringpool.hxx> diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index d434239e0502..e3f8284d5061 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -53,6 +53,7 @@ #include <svx/rotmodit.hxx> #include <editeng/unolingu.hxx> #include <editeng/justifyitem.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/broadcast.hxx> #include <vcl/outdev.hxx> diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 8faa97d2a050..1fee310edffa 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -54,6 +54,7 @@ #include <rtl/tencinfo.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/sharedstringpool.hxx> diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 11e74fa258db..0bede8f8b336 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -18,6 +18,7 @@ */ #include <scitems.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <rtl/math.hxx> #include <sal/log.hxx> diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx index d2fd0b8db01a..db45170978fe 100644 --- a/sc/source/core/data/dbdocutl.cxx +++ b/sc/source/core/data/dbdocutl.cxx @@ -20,6 +20,7 @@ #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/XRow.hpp> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <dbdocutl.hxx> diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 7f85c52493cc..8b2020d196e0 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <global.hxx> diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index 50bbb874481f..951a02700ec6 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <formula/token.hxx> diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index d1a799a74778..419b1145cc4d 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -33,6 +33,7 @@ #include <sfx2/viewsh.hxx> #include <svl/flagitem.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/ctloptions.hxx> diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 8d446382eaac..a691a9dd6315 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -26,6 +26,7 @@ #include <svx/svditer.hxx> #include <sfx2/objsh.hxx> #include <sfx2/docfile.hxx> +#include <svl/numformat.hxx> #include <svl/poolcach.hxx> #include <svl/zforlist.hxx> #include <unotools/charclass.hxx> diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 441f8e798c2a..ebe284e928bf 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -38,6 +38,7 @@ #include <unotools/textsearch.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/collatorwrapper.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <o3tl/safeint.hxx> #include <osl/diagnose.h> diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index ec80ec3d664b..ccd940183ca7 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <osl/diagnose.h> #include <rtl/math.hxx> diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index b2b5b4681306..a379011e62fe 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -26,6 +26,7 @@ #include <osl/diagnose.h> #include <rtl/math.hxx> +#include <svl/numformat.hxx> #include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp> diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index ea0929f5a18d..c64c7c465aa4 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -69,6 +69,7 @@ #include <comphelper/string.hxx> #include <comphelper/types.hxx> #include <sal/macros.h> +#include <svl/numformat.hxx> #include <rtl/math.hxx> #include <tools/diagnose_ex.h> #include <svl/zforlist.hxx> diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 36060b282d0c..bda05c4c03ca 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/charclass.hxx> diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx index 07794c6c3a5d..3fdb43eddf9b 100644 --- a/sc/source/core/data/dputil.cxx +++ b/sc/source/core/data/dputil.cxx @@ -17,6 +17,7 @@ #include <comphelper/string.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/calendarwrapper.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <rtl/math.hxx> #include <osl/diagnose.h> diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 3eef76bf3550..72bff251acca 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -54,6 +54,7 @@ #include <tools/cpuid.hxx> #include <formula/errorcodes.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <formulagroup.hxx> #include <listenercontext.hxx> #include <types.hxx> diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 60f66f6fd97d..3286794b2b88 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -31,6 +31,7 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index 87c13da7a616..356379dc3f1f 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -22,6 +22,7 @@ #include <unotools/configmgr.hxx> #include <unotools/pathoptions.hxx> #include <tools/urlobj.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <formula/errorcodes.hxx> #include <sal/log.hxx> diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 5ce565a98257..795f8671522f 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -46,6 +46,7 @@ #include <editeng/wrlmitem.hxx> #include <editeng/justifyitem.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <vcl/outdev.hxx> #include <tools/fract.hxx> diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx index bf495c06c337..6ed855fc7a51 100644 --- a/sc/source/core/data/poolhelp.cxx +++ b/sc/source/core/data/poolhelp.cxx @@ -18,6 +18,7 @@ */ #include <comphelper/processfactory.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <editeng/editeng.hxx> diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx index 883e222173ce..2880cd5be67f 100644 --- a/sc/source/core/data/stlsheet.cxx +++ b/sc/source/core/data/stlsheet.cxx @@ -33,6 +33,7 @@ #include <editeng/xmlcnitm.hxx> #include <svl/itempool.hxx> #include <svl/itemset.hxx> +#include <svl/numformat.hxx> #include <svl/hint.hxx> #include <o3tl/unit_conversion.hxx> #include <attrib.hxx> diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index b3af3c17ec73..7db5edad1662 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -22,6 +22,7 @@ #include <editeng/brushitem.hxx> #include <editeng/colritem.hxx> #include <unotools/textsearch.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <unotools/charclass.hxx> diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 0f1f7193fe59..442b6e8e9036 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -23,6 +23,7 @@ #include <editeng/editeng.hxx> #include <editeng/eeitem.hxx> #include <editeng/escapementitem.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <vcl/keycodes.hxx> #include <rtl/math.hxx> diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index d467db7ccf0f..2fe2fa211e85 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -31,6 +31,7 @@ #include <basic/sberrors.hxx> #include <basic/sbx.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstringpool.hxx> #include <vcl/svapp.hxx> diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx index c61207d60678..7a6b9eb38bbe 100644 --- a/sc/source/core/tool/cellform.cxx +++ b/sc/source/core/tool/cellform.cxx @@ -19,6 +19,7 @@ #include <cellform.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstring.hxx> diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx index aee7df6583b6..6ba4a4609f6b 100644 --- a/sc/source/core/tool/chartpos.cxx +++ b/sc/source/core/tool/chartpos.cxx @@ -20,6 +20,7 @@ #include <chartpos.hxx> #include <document.hxx> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <memory> diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index 24da3d93cc3a..b3a1a64e8653 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -36,6 +36,7 @@ #include <refupdat.hxx> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <sfx2/objsh.hxx> #include <unotools/useroptions.hxx> diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 434bd157bd4c..006c1555ad9f 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -27,6 +27,7 @@ #include <sfx2/objsh.hxx> #include <basic/sbmeth.hxx> #include <basic/sbstar.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstringpool.hxx> #include <sal/log.hxx> diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 2678a4823beb..bce5a5ac14e1 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -23,6 +23,7 @@ #include <sot/exchange.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/bindings.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstringpool.hxx> diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx index 2b54cd2a52d1..c3071946d2d1 100644 --- a/sc/source/core/tool/docoptio.cxx +++ b/sc/source/core/tool/docoptio.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <tools/UnitConversion.hxx> #include <osl/diagnose.h> diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 3dd1b70e20f8..f61f870aa4d7 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -29,6 +29,7 @@ #include <editeng/justifyitem.hxx> #include <editeng/editobj.hxx> #include <vcl/outdev.hxx> +#include <svl/numformat.hxx> #include <svl/inethist.hxx> #include <sfx2/objsh.hxx> #include <osl/diagnose.h> diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 63493b9c09c7..d3b7b8055084 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -26,6 +26,7 @@ #include <o3tl/temporary.hxx> #include <osl/thread.h> #include <unotools/textsearch.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <tools/urlobj.hxx> diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index f4d906a7d8c1..6525f2a6784b 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -25,6 +25,7 @@ #include <sfx2/bindings.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/objsh.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <sal/macros.h> #include <osl/diagnose.h> diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 0afa2778b825..d47c0d3a1e65 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -31,6 +31,7 @@ #include <basic/sbx.hxx> #include <basic/sbxobj.hxx> #include <basic/sbuno.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstringpool.hxx> #include <unotools/charclass.hxx> diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx index 64bb3d1d8a8e..690660acce5f 100644 --- a/sc/source/core/tool/interpr8.cxx +++ b/sc/source/core/tool/interpr8.cxx @@ -14,6 +14,7 @@ #include <comphelper/random.hxx> #include <formula/token.hxx> #include <sal/log.hxx> +#include <svl/numformat.hxx> #include <cmath> #include <memory> diff --git a/sc/source/core/tool/interpretercontext.cxx b/sc/source/core/tool/interpretercontext.cxx index ce02ea28d52c..b3ece9266f0d 100644 --- a/sc/source/core/tool/interpretercontext.cxx +++ b/sc/source/core/tool/interpretercontext.cxx @@ -18,6 +18,7 @@ */ #include <interpretercontext.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <document.hxx> diff --git a/sc/source/core/tool/numformat.cxx b/sc/source/core/tool/numformat.cxx index 4a5403a7185e..88890800da8a 100644 --- a/sc/source/core/tool/numformat.cxx +++ b/sc/source/core/tool/numformat.cxx @@ -22,6 +22,7 @@ #include <document.hxx> #include <comphelper/processfactory.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/languageoptions.hxx> diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index 705811f10e66..10d51a342e70 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -23,6 +23,7 @@ #include <scmatrix.hxx> #include <svl/sharedstringpool.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <osl/diagnose.h> diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx index 54a6c6943074..c4e8cc77d942 100644 --- a/sc/source/core/tool/rangeseq.cxx +++ b/sc/source/core/tool/rangeseq.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <rtl/math.hxx> #include <o3tl/float_int_conversion.hxx> diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index c1009a10217b..9b1d44313013 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -27,6 +27,7 @@ #include <matrixoperators.hxx> #include <math.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstring.hxx> #include <rtl/math.hxx> diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx index 1a96df899b69..7532d720e57a 100644 --- a/sc/source/core/tool/stringutil.cxx +++ b/sc/source/core/tool/stringutil.cxx @@ -18,6 +18,7 @@ */ #include <stringutil.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <rtl/ustrbuf.hxx> diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx index dec49451be22..f6fb26cba18d 100644 --- a/sc/source/core/tool/zforauto.cxx +++ b/sc/source/core/tool/zforauto.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <vcl/svapp.hxx> diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index a640ebfba70a..5f7178b9fe8a 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <tools/stream.hxx> #include <osl/diagnose.h> diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index 8ce820bb2389..71c62bd86190 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -22,6 +22,7 @@ #include <map> #include <filter/msfilter/countryid.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <sal/log.hxx> #include <sax/fastattribs.hxx> diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 988ec3fbf65e..e23677e55d10 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -27,6 +27,7 @@ #include <o3tl/safeint.hxx> #include <sfx2/docfile.hxx> #include <svx/svxids.hrc> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/configmgr.hxx> #include <sal/log.hxx> diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx index afd2c2c52bf2..ef922401f3c0 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -24,6 +24,7 @@ #include <oox/token/namespaces.hxx> #include <oox/token/relationship.hxx> #include <unotools/collatorwrapper.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <sal/log.hxx> #include <document.hxx> diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx index 53a95144b3fc..179999836511 100644 --- a/sc/source/filter/excel/xepivot.cxx +++ b/sc/source/filter/excel/xepivot.cxx @@ -46,6 +46,7 @@ #include <xelink.hxx> #include <dputil.hxx> #include <generalfunction.hxx> +#include <svl/numformat.hxx> using namespace ::oox; diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index c4cdce34ad45..9eff53bc43ed 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -26,6 +26,7 @@ #include <oox/token/namespaces.hxx> #include <sax/tools/converter.hxx> #include <sax/fastattribs.hxx> +#include <svl/numformat.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp> diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index df4afbaf5eca..1382fa444ff4 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -54,6 +54,7 @@ #include <oox/token/tokens.hxx> #include <oox/token/namespaces.hxx> #include <oox/token/relationship.hxx> +#include <svl/numformat.hxx> using namespace ::com::sun::star; using namespace oox; diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 32b6f4220370..64d86665f882 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/i18n/ScriptType.hpp> #include <scitems.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <tools/UnitConversion.hxx> #include <editeng/flditem.hxx> diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index 165401da9d04..d2e40e83ebe0 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -27,6 +27,7 @@ #include <tools/datetime.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <sal/log.hxx> #include <sot/storage.hxx> #include <unotools/configmgr.hxx> diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 995219fc710a..ed9fd066d723 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -76,6 +76,7 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/frame/XModel.hpp> +#include <svl/numformat.hxx> using ::std::vector; using namespace ::com::sun::star; diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 8d0b494b7806..338320d67c00 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -28,6 +28,7 @@ #include <comphelper/servicehelper.hxx> #include <sot/storage.hxx> #include <vcl/svapp.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <svl/languageoptions.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index e0b8c07458a5..246d1b844e0f 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -29,6 +29,7 @@ #include <sal/macros.h> #include <sal/log.hxx> #include <rtl/tencinfo.h> +#include <svl/numformat.hxx> #include <svtools/colorcfg.hxx> #include <vcl/unohelp.hxx> #include <editeng/svxfont.hxx> diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 774de028c1da..7ffda1ca00cd 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -37,6 +37,7 @@ #include <editeng/boxitem.hxx> #include <editeng/justifyitem.hxx> #include <sfx2/objsh.hxx> +#include <svl/numformat.hxx> #include <svl/intitem.hxx> #include <vcl/graphicfilter.hxx> #include <svtools/parhtml.hxx> diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index c57e37f422b0..a38a7286385e 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -19,6 +19,7 @@ #include <scitems.hxx> #include <editeng/justifyitem.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <sal/log.hxx> diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index eaf960f9e9e2..a219fdfcbcd1 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -38,6 +38,7 @@ #include <rtl/ustrbuf.hxx> #include <svl/intitem.hxx> #include <svl/itemset.hxx> +#include <svl/numformat.hxx> #include <oox/helper/binaryinputstream.hxx> #include <oox/helper/attributelist.hxx> #include <oox/token/tokens.hxx> diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index b996449c8218..4212182d6c6a 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -39,6 +39,7 @@ #include <editeng/justifyitem.hxx> #include <svl/sharedstringpool.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/intitem.hxx> #include <com/sun/star/task/XStatusIndicator.hpp> diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 4a3f29dfb849..1b8b7e01a930 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -29,6 +29,7 @@ #include <svx/svdpage.hxx> #include <svtools/htmlcfg.hxx> #include <sfx2/sfxhtml.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <vcl/virdev.hxx> #include <vcl/svapp.hxx> diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx index 74b60da2208b..1e8678bb8a51 100644 --- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx @@ -19,6 +19,7 @@ #include <XclImpChangeTrack.hxx> #include <sot/storage.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstringpool.hxx> #include <sal/log.hxx> diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx index 772d59a9d65f..b5e83269dcdc 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx @@ -32,6 +32,7 @@ #include <xmloff/namespacemap.hxx> #include <xmloff/xmluconv.hxx> #include <sax/tools/converter.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstring.hxx> #include <sal/log.hxx> diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx index aabe42f6d4ce..888dec30baad 100644 --- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx @@ -23,6 +23,7 @@ #include <rangeutl.hxx> #include <tools/datetime.hxx> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <sax/tools/converter.hxx> diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index cf346c63cd15..7ec86ddb125b 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -59,6 +59,7 @@ #include <xmloff/xmlnamespace.hxx> #include <xmloff/prstylei.hxx> #include <xmloff/xmlimppr.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svx/svdocapt.hxx> #include <editeng/eeitem.hxx> diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 4b3f155aec27..db44d246a1a6 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -110,6 +110,7 @@ #include <tools/color.hxx> #include <rtl/math.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svx/unoshape.hxx> #include <comphelper/base64.hxx> diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 75ba5e24dcd7..dc9582ed3f88 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -21,6 +21,7 @@ #include <sal/log.hxx> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <xmloff/namespacemap.hxx> diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 1dea0d05109e..08812324f9aa 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -45,6 +45,7 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/docfile.hxx> #include <sfx2/printer.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/charclass.hxx> diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 4a6c0dea209c..b5dfc71cf24b 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -33,6 +33,7 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <tools/json_writer.hxx> #include <sfx2/viewsh.hxx> +#include <svl/numformat.hxx> #include <vcl/jsdialog/executor.hxx> #include <document.hxx> diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index e74507776e25..920fee3c0813 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -12,6 +12,7 @@ #include <document.hxx> +#include <svl/numformat.hxx> #include <svx/colorbox.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 9eb310528063..af01abcaa316 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -22,6 +22,7 @@ #include <sfx2/frame.hxx> #include <svl/stritem.hxx> #include <svl/intitem.hxx> +#include <svl/numformat.hxx> #include <svx/colorbox.hxx> #include <vcl/svapp.hxx> #include <formula/token.hxx> diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx index 7e9d51fdc004..22861b8e4ccd 100644 --- a/sc/source/ui/dataprovider/datatransformation.cxx +++ b/sc/source/ui/dataprovider/datatransformation.cxx @@ -12,6 +12,7 @@ #include <document.hxx> #include <rtl/math.hxx> #include <cmath> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/charclass.hxx> diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index f9be8368edf8..ef093efcb326 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -36,6 +36,7 @@ #include <filtdlg.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> +#include <svl/numformat.hxx> #include <svl/sharedstringpool.hxx> #include <limits> diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 97f685fe1591..9d7a5170fade 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -32,6 +32,7 @@ #include <sfx2/app.hxx> #include <sfx2/docfile.hxx> #include <sfx2/printer.hxx> +#include <svl/numformat.hxx> #include <svx/pageitem.hxx> #include <svx/postattr.hxx> #include <svx/svxids.hrc> diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index bbb66c2b9ce5..d7a9ffe397ba 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -22,6 +22,7 @@ #include <vcl/errinf.hxx> #include <tools/urlobj.hxx> #include <svl/converter.hxx> +#include <svl/numformat.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/propertysequence.hxx> #include <comphelper/types.hxx> diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index f7e3822b77d7..ad827825076c 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -44,6 +44,7 @@ #include <sfx2/fcontnr.hxx> #include <sfx2/objsh.hxx> #include <svl/itemset.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <svl/urihelper.hxx> #include <svl/sharedstringpool.hxx> diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 380bd875fadc..f64cf4b0e5e8 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -61,6 +61,7 @@ #include <vcl/svapp.hxx> #include <vcl/weld.hxx> #include <editeng/editobj.hxx> +#include <svl/numformat.hxx> #include <memory> #include <string_view> diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 93f51d2c91d2..8d9ea4b89689 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -22,6 +22,7 @@ #include <sfx2/dispatch.hxx> #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/stritem.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 23f77ee76cab..7246a4009426 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -31,6 +31,7 @@ #include <editeng/udlnitem.hxx> #include <editeng/wghtitem.hxx> #include <o3tl/unit_conversion.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svtools/scriptedtext.hxx> #include <svx/framelink.hxx> diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index 8fd45f501b1f..2d1f0fd56ddb 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -19,6 +19,7 @@ #undef SC_DLLIMPLEMENTATION +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 445c43ab7aba..5630307d3329 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -19,6 +19,7 @@ #include <rangelst.hxx> #include <sfx2/bindings.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <vcl/commandinfoprovider.hxx> #include <vcl/weld.hxx> diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index b6ffca11ea75..b4ffef9a067c 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -19,6 +19,7 @@ #include <scitems.hxx> #include <sfx2/dispatch.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index 92570ea9653f..4a491a1c5419 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -21,6 +21,7 @@ #include <vcl/svapp.hxx> #include <vcl/weld.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <globstr.hrc> diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 6e829f2568eb..ac318b487d43 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -32,6 +32,7 @@ #include <editeng/unoipset.hxx> #include <editeng/langitem.hxx> #include <sfx2/linkmgr.hxx> +#include <svl/numformat.hxx> #include <svl/srchitem.hxx> #include <svl/sharedstringpool.hxx> #include <svx/unomid.hxx> diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 3d1b05256578..bc9b48c9ff67 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -46,6 +46,7 @@ #include <formula/opcode.hxx> #include <o3tl/safeint.hxx> +#include <svl/numformat.hxx> #include <svl/sharedstring.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 12a9bc44e949..5a1d8b355d12 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -20,6 +20,7 @@ #include <datauno.hxx> #include <svl/hint.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/sharedstringpool.hxx> #include <vcl/svapp.hxx> diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 3ad29af9e515..e6f0eb1661ad 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -34,6 +34,7 @@ #include <vcl/svapp.hxx> #include <svl/itempool.hxx> #include <svl/itemset.hxx> +#include <svl/numformat.hxx> #include <svl/intitem.hxx> #include <svl/zformat.hxx> #include <tools/fract.hxx> diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 972fe5675f54..98ef8b4cbab0 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -29,6 +29,7 @@ #include <comphelper/lok.hxx> #include <comphelper/propertysequence.hxx> #include <svl/stritem.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <sfx2/dispatch.hxx> diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 241477511629..e59b4aefa754 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -26,6 +26,7 @@ #include <sfx2/request.hxx> #include <basic/sbxcore.hxx> #include <svl/whiter.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/stritem.hxx> #include <svl/visitem.hxx> diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 31a922ff0613..94102611fdfd 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -21,6 +21,7 @@ #include <scitems.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <sfx2/app.hxx> #include <unotools/collatorwrapper.hxx> diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index c7f2d58352f3..fd0007c4e3ff 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -33,6 +33,7 @@ #include <svl/whiter.hxx> #include <svl/stritem.hxx> +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <svl/languageoptions.hxx> #include <svl/cjkoptions.hxx> diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index bb7a860140f3..8dcd9b3b5f60 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -44,6 +44,7 @@ #include <editeng/wghtitem.hxx> #include <editeng/wrlmitem.hxx> #include <formula/errorcodes.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <vcl/svapp.hxx> diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index 668e10aae8f3..70d88753b752 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -37,6 +37,7 @@ #include <uiitems.hxx> #include <hints.hxx> #include <cellvalue.hxx> +#include <svl/numformat.hxx> #include <svl/sharedstring.hxx> void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index a3f06eb69e63..8a47fc8ff94b 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -28,6 +28,7 @@ #include <sfx2/sidebar/Sidebar.hxx> #include <sfx2/viewfrm.hxx> #include <svl/ilstitem.hxx> +#include <svl/numformat.hxx> #include <svl/int64item.hxx> #include <svl/srchitem.hxx> #include <svl/srchdefs.hxx> diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 88291959d9d7..cc0362c058e8 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -32,6 +32,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/objitem.hxx> #include <sfx2/viewfrm.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <svl/zforlist.hxx> #include <svx/srchdlg.hxx> diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index 98de38058b5b..9e066efff637 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -22,6 +22,7 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <svl/stritem.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <vcl/uitest/logger.hxx> diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 31e36774d187..dec4209f75a7 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -29,6 +29,7 @@ #include <editeng/justifyitem.hxx> #include <o3tl/unit_conversion.hxx> #include <sfx2/bindings.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <vcl/svapp.hxx> diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index 73b01b282e32..2711bcc04fe0 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -23,6 +23,7 @@ #include <tools/urlobj.hxx> #include <vcl/virdev.hxx> #include <vcl/svapp.hxx> +#include <svl/numformat.hxx> #include <svl/intitem.hxx> #include <sfx2/msg.hxx> #include <sfx2/objface.hxx> diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index 2e7cd46f6c30..9805fed0aa0f 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -25,6 +25,7 @@ #include <sfx2/event.hxx> #include <openflag.hxx> +#include <svl/numformat.hxx> #include <svtools/htmlkywd.hxx> #include <svtools/htmltokn.h> #include <vcl/imap.hxx> diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 878631e7142e..c9bcbc8806b7 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -27,6 +27,7 @@ #include <math.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/sharedstringpool.hxx> diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index 426663233b98..ffb139870cdb 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -31,6 +31,7 @@ #include <cppuhelper/supportsservice.hxx> #include "numfmuno.hxx" +#include <svl/numformat.hxx> #include <svl/numuno.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx index 30001d02966a..5ba51f69c746 100644 --- a/svl/source/numbers/supservs.cxx +++ b/svl/source/numbers/supservs.cxx @@ -24,6 +24,7 @@ #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/weak.hxx> #include <i18nlangtag/languagetag.hxx> +#include <svl/numformat.hxx> #include <tools/debug.hxx> #include <osl/mutex.hxx> #include <osl/diagnose.h> diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx index 3f0cea902991..4e6f7d1454ea 100644 --- a/svl/source/numbers/zforscan.hxx +++ b/svl/source/numbers/zforscan.hxx @@ -23,6 +23,7 @@ #include <rtl/ustring.hxx> #include <svl/nfkeytab.hxx> #include <svl/nfsymbol.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <tools/color.hxx> #include <tools/date.hxx> diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 13b9eca57f64..5687da6c2b23 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -18,6 +18,7 @@ */ +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <svl/macitem.hxx> #include <vcl/svapp.hxx> diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 4fb6d1d7f983..afa6504f1c32 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -54,6 +54,7 @@ #include <connectivity/formattedcolumnvalue.hxx> #include <i18nlangtag/lang.h> #include <o3tl/safeint.hxx> +#include <svl/numformat.hxx> #include <svl/numuno.hxx> #include <svl/zforlist.hxx> #include <svx/dialmgr.hxx> diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index b38317f5c579..6ea63332191c 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -22,6 +22,7 @@ #include <tools/debug.hxx> #include <i18nlangtag/mslangid.hxx> #include <o3tl/safeint.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/currencytable.hxx> diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index e7d1bcc356e7..2bd7d5fb2e0d 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -22,6 +22,7 @@ #include <comphelper/configurationlistener.hxx> #include <comphelper/propertysequence.hxx> #include <tools/color.hxx> +#include <svl/numformat.hxx> #include <svl/poolitem.hxx> #include <svl/itemset.hxx> #include <vcl/commandinfoprovider.hxx> diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 19d3d92bcb40..d5b2968dce43 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -40,6 +40,7 @@ #include <osl/diagnose.h> #include <rtl/math.hxx> #include <shellres.hxx> +#include <svl/numformat.hxx> #include <svl/languageoptions.hxx> #include <svl/zforlist.hxx> #include <swmodule.hxx> diff --git a/sw/source/core/crsr/DateFormFieldButton.cxx b/sw/source/core/crsr/DateFormFieldButton.cxx index 5a1bb75f7733..0cc1268bb7e1 100644 --- a/sw/source/core/crsr/DateFormFieldButton.cxx +++ b/sw/source/core/crsr/DateFormFieldButton.cxx @@ -11,6 +11,7 @@ #include <edtwin.hxx> #include <bookmrk.hxx> #include <tools/date.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <vcl/svapp.hxx> diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 2178d0009273..be89d780671e 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -35,6 +35,7 @@ #include <comphelper/random.hxx> #include <comphelper/anytostring.hxx> #include <sal/log.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <edtwin.hxx> #include <DateFormFieldButton.hxx> diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index dd39a58237c3..1dfa48bc8c8e 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -20,6 +20,7 @@ #include <libxml/xmlwriter.h> #include <hintids.hxx> #include <svl/itemiter.hxx> +#include <svl/numformat.hxx> #include <editeng/tstpitem.hxx> #include <editeng/lrspitem.hxx> #include <editeng/formatbreakitem.hxx> diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index e4b0a23040c3..953dbfa4e749 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -43,6 +43,7 @@ #include <sfx2/linkmgr.hxx> #include <editeng/ulspitem.hxx> #include <editeng/lrspitem.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/lingucfg.hxx> #include <svx/svdpage.hxx> diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index ffde46e7db9e..1c927f6a30c1 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -45,6 +45,7 @@ #include <redline.hxx> #include <node2lay.hxx> #include <frameformats.hxx> +#include <svl/numformat.hxx> #include <set> #include <utility> diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 4a624c61cb63..37a78e017f20 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -20,6 +20,7 @@ #include <comphelper/fileformat.h> #include <tools/stream.hxx> #include <sfx2/docfile.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <unotools/configmgr.hxx> diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index c305bf91c438..e5b4c8f8095a 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -20,6 +20,7 @@ #include <hintids.hxx> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <frmfmt.hxx> #include <doc.hxx> diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 48ac3ea7fbc5..55a1d32ec661 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -20,6 +20,7 @@ #include <memory> #include <com/sun/star/text/HoriOrientation.hpp> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <hintids.hxx> #include <editeng/lrspitem.hxx> diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 91bb99d696b6..5865b34661ce 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -31,6 +31,7 @@ #include <frameformats.hxx> #include <vector> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #ifdef DBG_UTIL diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index d74a2638fde3..6d833b9835fa 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -88,6 +88,7 @@ #include <fntcache.hxx> #include <frameformats.hxx> #include <o3tl/numeric.hxx> +#include <svl/numformat.hxx> #include <tools/datetimeutils.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index f2270aa731af..5a2db8a5753d 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/linguistic2/XHyphenator.hpp> #include <com/sun/star/linguistic2/XHyphenatedWord.hpp> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <editeng/acorrcfg.hxx> diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 03e951e2509c..b5d5cb3a4532 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -40,6 +40,7 @@ #include <swddetbl.hxx> #include <mdiexp.hxx> #include <itabenum.hxx> +#include <svl/numformat.hxx> #include <vcl/uitest/logger.hxx> #include <vcl/uitest/eventdescription.hxx> diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 0e3a9617ffc1..4357f26805a8 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -46,6 +46,7 @@ #include <comphelper/string.hxx> #include <o3tl/safeint.hxx> #include <osl/diagnose.h> +#include <svl/numformat.hxx> namespace { diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index cb849d8f6230..d32efeaec2df 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -20,6 +20,7 @@ #include <float.h> #include <o3tl/any.hxx> #include <osl/diagnose.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <com/sun/star/sdbc/DataType.hpp> #include <fmtfld.hxx> diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 85f4bb6515f4..7c703fcbffa1 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -38,6 +38,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> #include <tools/urlobj.hxx> +#include <svl/numformat.hxx> #include <svl/urihelper.hxx> #include <unotools/useroptions.hxx> #include <unotools/syslocale.hxx> diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index cf3a41460ba3..0281c7d45acb 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -24,6 +24,7 @@ #include <libxml/xmlwriter.h> #include <rtl/math.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <o3tl/enumarray.hxx> diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx index df3d15aafc49..99d1ca45e728 100644 --- a/sw/source/core/fields/flddat.cxx +++ b/sw/source/core/fields/flddat.cxx @@ -22,6 +22,7 @@ #include <o3tl/any.hxx> #include <o3tl/temporary.hxx> #include <tools/datetime.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <com/sun/star/util/DateTime.hpp> #include <doc.hxx> diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx index fb1a7f8dc2f2..d9ff1ff6311f 100644 --- a/sw/source/core/fields/usrfld.cxx +++ b/sw/source/core/fields/usrfld.cxx @@ -23,6 +23,7 @@ #include <o3tl/any.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/charclass.hxx> diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 3d595e2d614d..ad10eccc7d92 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -57,6 +57,7 @@ #include <redline.hxx> #include <vector> #include <calbck.hxx> +#include <svl/numformat.hxx> #ifdef DBG_UTIL #define CHECK_TABLE(t) (t).CheckConsistency(); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 639171e1dd37..c81b41f35b75 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -33,6 +33,7 @@ #include <editeng/langitem.hxx> #include <tools/urlobj.hxx> #include <svl/languageoptions.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <swatrset.hxx> #include <frmatr.hxx> diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 4ebbedcf72f2..ccc815c01e9d 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -27,6 +27,7 @@ #include <svl/style.hxx> #include <svl/itemiter.hxx> #include <svl/listener.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svx/pageitem.hxx> diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 6bb794009ff5..03b5a88c81ef 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -80,6 +80,7 @@ #include <unotextrange.hxx> #include <unotextcursor.hxx> #include <unoparagraph.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <editeng/formatbreakitem.hxx> #include <editeng/shaditem.hxx> diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index 92163ba4ec0c..001e8bca5dd5 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -24,6 +24,7 @@ #include <docsh.hxx> #include <IDocumentFieldsAccess.hxx> #include <svtools/htmltokn.h> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/useroptions.hxx> #include <fmtfld.hxx> diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index ec1c6a03702f..5b81d63bf145 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -32,6 +32,7 @@ #include <unotools/configmgr.hxx> #include <svtools/htmltokn.h> #include <svtools/htmlkywd.hxx> +#include <svl/numformat.hxx> #include <svl/urihelper.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index ce38776ac52d..2e47db39fe5e 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -27,6 +27,7 @@ #include <rtl/tencinfo.h> #include <sal/log.hxx> +#include <svl/numformat.hxx> #include <unicode/ubidi.h> #include <tools/tenccvt.hxx> diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 825e70cd4356..ab73216a78aa 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -31,6 +31,7 @@ #include <vcl/settings.hxx> #include <sal/log.hxx> +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <svl/itemiter.hxx> #include <svl/whiter.hxx> diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 1431a3becf87..b9cc9d24c700 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -33,6 +33,7 @@ #include <svl/cintitem.hxx> #include <svl/lngmisc.hxx> #include <svl/urihelper.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <sfx2/linkmgr.hxx> diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 8d0d2f5dcabb..32f9c1ea5c63 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -28,6 +28,7 @@ #include <o3tl/safeint.hxx> #include <sal/log.hxx> #include <svl/itemset.hxx> +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <sax/tools/converter.hxx> #include <unotools/configmgr.hxx> diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 52eae95f3b85..058571c2cdcd 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -37,6 +37,7 @@ #include <comphelper/sequence.hxx> #include <comphelper/types.hxx> #include <svl/numuno.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <tools/diagnose_ex.h> #include <vcl/mnemonic.hxx> diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index b3038f5b9a5b..9c5567e0ae7e 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -80,6 +80,7 @@ #include <optload.hxx> #include <optpage.hxx> #include <swuiidxmrk.hxx> +#include <svl/numformat.hxx> #include <svx/dialogs.hrc> #include <mailmergewizard.hxx> #include <mailconfigpage.hxx> diff --git a/sw/source/ui/fldui/DateFormFieldDialog.cxx b/sw/source/ui/fldui/DateFormFieldDialog.cxx index 25197845fef2..24461c47d6b2 100644 --- a/sw/source/ui/fldui/DateFormFieldDialog.cxx +++ b/sw/source/ui/fldui/DateFormFieldDialog.cxx @@ -10,6 +10,7 @@ #include <DateFormFieldDialog.hxx> #include <IMark.hxx> #include <xmloff/odffields.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <doc.hxx> diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 35d4b5a00ae4..eb00d587fffd 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -19,6 +19,7 @@ #include <sfx2/frame.hxx> #include <sfx2/sfxsids.hrc> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 9fcc33c77ac9..fba96e93cb4a 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -24,6 +24,7 @@ #include "flddok.hxx" #include <swmodule.hxx> #include <wrtsh.hxx> +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #define USER_DATA_VERSION_1 "1" diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 9cf9602cdade..bc3078ceb574 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -31,6 +31,7 @@ #include "fldvar.hxx" #include "flddinf.hxx" #include <calc.hxx> +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <strings.hrc> diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 80029f5535c1..cf5b011d02f8 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -24,6 +24,7 @@ #include <vcl/svapp.hxx> #include <vcl/syswin.hxx> #include <vcl/jobset.hxx> +#include <svl/numformat.hxx> #include <svl/whiter.hxx> #include <svl/zforlist.hxx> #include <svl/eitem.hxx> diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index f1cad9f7cb52..9197e6bea4f3 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -50,6 +50,7 @@ #include <dbconfig.hxx> #include <unotools/tempfile.hxx> #include <unotools/pathoptions.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/stritem.hxx> #include <sfx2/docfile.hxx> diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 99ac9ec5b577..4b7c1b0efde6 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -21,6 +21,7 @@ #include <cmdid.h> #include <hintids.hxx> +#include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <com/sun/star/text/DefaultNumberingProvider.hpp> #include <com/sun/star/text/XDefaultNumberingProvider.hpp> diff --git a/sw/source/uibase/inc/autoformatpreview.hxx b/sw/source/uibase/inc/autoformatpreview.hxx index f9825bc91951..04b5846b5c33 100644 --- a/sw/source/uibase/inc/autoformatpreview.hxx +++ b/sw/source/uibase/inc/autoformatpreview.hxx @@ -22,6 +22,7 @@ #include <com/sun/star/i18n/XBreakIterator.hpp> #include <sal/types.h> #include <svx/framelinkarray.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <tools/gen.hxx> #include <rtl/ustring.hxx> diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 9ea9d2de13c3..ec69568dad7b 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -18,6 +18,7 @@ */ #include <hintids.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/stritem.hxx> #include <svl/whiter.hxx> diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 184fe96e5d8f..52aee7fc4f5c 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -25,6 +25,7 @@ #include <sfx2/lnkbase.hxx> #include <txtfld.hxx> #include <svl/itempool.hxx> +#include <svl/numformat.hxx> #include <tools/lineend.hxx> #include <svl/whiter.hxx> #include <svl/eitem.hxx> diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 18fa9b846b62..02b51f45b050 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -27,6 +27,7 @@ #include <i18nutil/unicode.hxx> #include <i18nlangtag/languagetag.hxx> #include <svtools/langtab.hxx> +#include <svl/numformat.hxx> #include <svl/slstitm.hxx> #include <svl/stritem.hxx> #include <sfx2/htmlmode.hxx> diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 911a4b201982..6ec5ec882c4c 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -51,6 +51,7 @@ #include <rootfrm.hxx> #include <svl/stritem.hxx> #include <unotxdoc.hxx> +#include <svl/numformat.hxx> #include <svl/numuno.hxx> #include <fldbas.hxx> #include <unomap.hxx> diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index 6df9efe5a855..f24c5150cc2d 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -18,6 +18,7 @@ */ #include <i18nlangtag/lang.h> +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <svl/eitem.hxx> #include <svx/svxids.hrc> diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 02bd6b8799e8..a8535b0fd258 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -67,6 +67,7 @@ #include <helper/msgbox.hxx> #include <helper/tkresmgr.hxx> #include "vclxwindows_internal.hxx" +#include <svl/numformat.hxx> using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx index b0bdbb98eb38..ac7560aa4935 100644 --- a/uui/source/iahndl-ssl.cxx +++ b/uui/source/iahndl-ssl.cxx @@ -31,6 +31,7 @@ #include <comphelper/lok.hxx> #include <comphelper/sequence.hxx> #include <com/sun/star/uno/Sequence.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/resmgr.hxx> #include <vcl/svapp.hxx> diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx index a4dbf93688d3..db8989ac2fe3 100644 --- a/vcl/source/app/weldutils.cxx +++ b/vcl/source/app/weldutils.cxx @@ -10,6 +10,7 @@ #include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <comphelper/processfactory.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <vcl/builderpage.hxx> diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index d73e2d8900c4..5490ae34c6d5 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -41,6 +41,7 @@ #include <unotools/localedatawrapper.hxx> #include <unotools/calendarwrapper.hxx> #include <unotools/charclass.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> using namespace ::com::sun::star; diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx index 4c818c0d4d8c..326ba7f7ef3e 100644 --- a/vcl/source/control/fmtfield.cxx +++ b/vcl/source/control/fmtfield.cxx @@ -38,6 +38,7 @@ #include <rtl/math.hxx> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> +#include <svl/numformat.hxx> #include <osl/diagnose.h> #include <tools/json_writer.hxx> diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index aa1520fe7047..77f5877a2442 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -45,6 +45,7 @@ #include <xmloff/xmlprcon.hxx> #include <xmloff/families.hxx> #include <com/sun/star/container/XNameContainer.hpp> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include "layerimp.hxx" #include <xmloff/XMLGraphicsDefaultStyle.hxx> diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 38c4d42d2986..2695a84fa38b 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -19,6 +19,7 @@ #include <comphelper/sequence.hxx> #include <comphelper/string.hxx> +#include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/numuno.hxx> diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index f7cabc5fa29f..863a9f55d2cb 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -18,7 +18,7 @@ */ #include <svl/zforlist.hxx> - +#include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <svl/numuno.hxx> #include <i18nlangtag/languagetag.hxx> |