LibreOffice Module svx (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SvxNumberFormatShell Class Reference

#include <numfmtsh.hxx>

Collaboration diagram for SvxNumberFormatShell:
[legend]

Public Member Functions

 SvxNumberFormatShell (SvNumberFormatter *pNumFormatter, sal_uInt32 nFormatKey, SvxNumberValueType eNumValType, const OUString &rNumStr)
 
 SvxNumberFormatShell (SvNumberFormatter *pNumFormatter, sal_uInt32 nFormatKey, SvxNumberValueType eNumValType, double nNumVal, const OUString *pNumStr)
 
 ~SvxNumberFormatShell ()
 
void GetInitSettings (sal_uInt16 &nCatLbPos, LanguageType &rLangType, sal_uInt16 &nFmtLbSelPos, std::vector< OUString > &rFmtEntries, OUString &rPrevString, const Color *&rpPrevColor)
 
void CategoryChanged (sal_uInt16 nCatLbPos, short &rFmtSelPos, std::vector< OUString > &rFmtEntries)
 
void LanguageChanged (LanguageType eLangType, short &rFmtSelPos, std::vector< OUString > &rFmtEntries)
 
void FormatChanged (sal_uInt16 nFmtLbPos, OUString &rPreviewStr, const Color *&rpFontColor)
 
bool AddFormat (OUString &rFormat, sal_Int32 &rErrPos, sal_uInt16 &rCatLbSelPos, short &rFmtSelPos, std::vector< OUString > &rFmtEntries)
 
void RemoveFormat (std::u16string_view rFormat, sal_uInt16 &rCatLbSelPos, short &rFmtSelPos, std::vector< OUString > &rFmtEntries)
 
void MakeFormat (OUString &rFormat, bool bThousand, bool bNegRed, sal_uInt16 nPrecision, sal_uInt16 nLeadingZeroes, sal_uInt16 nCurrencyEntryPos)
 
void GetOptions (const OUString &rFormat, bool &rThousand, bool &rNegRed, sal_uInt16 &rPrecision, sal_uInt16 &rLeadingZeroes, sal_uInt16 &rCatLbPos)
 
sal_uInt16 GetFormatIntegerDigits (std::u16string_view rFormat) const
 
bool IsNatNum12 (std::u16string_view rFormat) const
 
void MakePreviewString (const OUString &rFormatStr, OUString &rPreviewStr, const Color *&rpFontColor)
 
void MakePrevStringFromVal (const OUString &rFormatStr, OUString &rPreviewStr, const Color *&rpFontColor, double nValue)
 
bool IsUserDefined (const OUString &rFmtString)
 
bool IsTmpCurrencyFormat (const OUString &rFmtString)
 
bool FindEntry (const OUString &rFmtString, sal_uInt32 *pAt=nullptr)
 
void ValidateNewEntries ()
 
std::vector< sal_uInt32 > const & GetUpdateData () const
 
void SetCurNumFmtKey (sal_uInt32 nNew)
 
sal_uInt32 GetCurNumFmtKey () const
 
LanguageType GetCurLanguage () const
 
OUString GetStandardName () const
 Returns the name of Standard, General, ... for the current language. More...
 
OUString GetComment4Entry (short nEntry)
 
short GetCategory4Entry (short nEntry) const
 
bool GetUserDefined4Entry (short nEntry)
 
OUString GetFormat4Entry (short nEntry)
 
void SetComment4Entry (short nEntry, const OUString &aCommentString)
 
void SetCurrencySymbol (sal_uInt32 nPos)
 
sal_uInt32 GetCurrencySymbol () const
 
sal_uInt16 FindCurrencyFormat (const OUString &rFmtString)
 
sal_uInt16 FindCurrencyFormat (const NfCurrencyEntry *pTmpCurrencyEntry, bool bTmpBanking)
 
void SetCurCurrencyEntry (NfCurrencyEntry *)
 
short GetListPos4Entry (sal_uInt32 nIdx, std::u16string_view rFmtString)
 
void GetCurrencySymbols (std::vector< OUString > &rList, sal_uInt16 *pPos)
 
sal_uInt16 FindCurrencyTableEntry (const OUString &rFmtString, bool &bTestBanking)
 
bool IsInTable (sal_uInt16 nPos, bool bTmpBanking, std::u16string_view rFmtString) const
 
void SetUseStarFormat (bool bUse)
 

Static Public Member Functions

static SvxNumberFormatShellCreate (SvNumberFormatter *pNumFormatter, sal_uInt32 nFormatKey, SvxNumberValueType eNumValType, const OUString &rNumStr)
 
static SvxNumberFormatShellCreate (SvNumberFormatter *pNumFormatter, sal_uInt32 nFormatKey, SvxNumberValueType eNumValType, double nNumVal, const OUString *pNumStr)
 

Private Member Functions

SVX_DLLPRIVATE short FillEntryList_Impl (std::vector< OUString > &rList)
 
SVX_DLLPRIVATE void FillEListWithStd_Impl (std::vector< OUString > &rList, SvNumFormatType eCategory, short &Pos, bool bSuppressDuplicates=false)
 
SVX_DLLPRIVATE short FillEListWithFormats_Impl (std::vector< OUString > &rList, short nSelPos, NfIndexTableOffset eOffsetStart, NfIndexTableOffset eOffsetEnd, bool bSuppressDuplicates)
 
SVX_DLLPRIVATE short FillEListWithDateTime_Impl (std::vector< OUString > &rList, short nSelPos, bool bSuppressDuplicates)
 
SVX_DLLPRIVATE void FillEListWithOneFormat_Impl (std::vector< OUString > &rList, short &nSelPos, bool bSuppressDuplicates, NfIndexTableOffset nOffset, bool bSuppressIsoDateTime)
 
SVX_DLLPRIVATE short FillEListWithCurrency_Impl (std::vector< OUString > &rList, short nSelPos)
 
SVX_DLLPRIVATE short FillEListWithSysCurrencys (std::vector< OUString > &rList, short nSelPos)
 
SVX_DLLPRIVATE short FillEListWithUserCurrencys (std::vector< OUString > &rList, short nSelPos)
 
SVX_DLLPRIVATE short FillEListWithUsD_Impl (std::vector< OUString > &rList, SvNumFormatType eCategory, short Pos)
 
SVX_DLLPRIVATE bool IsEssentialFormat_Impl (SvNumFormatType eType, sal_uInt32 nKey)
 
SVX_DLLPRIVATE::std::vector< sal_uInt32 >::iterator GetRemoved_Impl (size_t nKey)
 
SVX_DLLPRIVATE bool IsRemoved_Impl (size_t nKey)
 
SVX_DLLPRIVATE::std::vector< sal_uInt32 >::iterator GetAdded_Impl (size_t nKey)
 
SVX_DLLPRIVATE void GetPreviewString_Impl (OUString &rString, const Color *&rpColor)
 

Static Private Member Functions

static SVX_DLLPRIVATE void PosToCategory_Impl (sal_uInt16 nPos, SvNumFormatType &rCategory)
 
static SVX_DLLPRIVATE void CategoryToPos_Impl (SvNumFormatType nCategory, sal_uInt16 &rPos)
 

Private Attributes

SvNumberFormatterpFormatter
 
SvNumberFormatTablepCurFmtTable
 
SvxNumberValueType eValType
 
OUString aValStr
 
double nValNum
 
bool bUndoAddList
 
std::vector< sal_uInt32 > aAddList
 
std::vector< sal_uInt32 > aDelList
 
std::vector< sal_uInt32 > aCurEntryList
 
sal_uInt32 nCurFormatKey
 
SvNumFormatType nCurCategory
 
LanguageType eCurLanguage
 
std::vector< sal_uInt16 > aCurCurrencyList
 
NfCurrencyEntry * pCurCurrencyEntry
 
bool bBankingSymbol
 
sal_uInt32 nCurCurrencyEntryPos
 
std::vector< OUString > aCurrencyFormatList
 
bool bUseStarFormat
 
bool bIsDefaultValNum
 

Detailed Description

Definition at line 61 of file numfmtsh.hxx.

Constructor & Destructor Documentation

◆ SvxNumberFormatShell() [1/2]

SvxNumberFormatShell::SvxNumberFormatShell ( SvNumberFormatter pNumFormatter,
sal_uInt32  nFormatKey,
SvxNumberValueType  eNumValType,
const OUString &  rNumStr 
)

◆ SvxNumberFormatShell() [2/2]

SvxNumberFormatShell::SvxNumberFormatShell ( SvNumberFormatter pNumFormatter,
sal_uInt32  nFormatKey,
SvxNumberValueType  eNumValType,
double  nNumVal,
const OUString *  pNumStr 
)

Definition at line 116 of file numfmtsh.cxx.

References ALL, aValStr, bIsDefaultValNum, eValType, LANGUAGE_NONE, Number, nValNum, String, and Undefined.

◆ ~SvxNumberFormatShell()

SvxNumberFormatShell::~SvxNumberFormatShell ( )

Definition at line 151 of file numfmtsh.cxx.

References aAddList, bUndoAddList, SvNumberFormatter::DeleteEntry(), and pFormatter.

Member Function Documentation

◆ AddFormat()

bool SvxNumberFormatShell::AddFormat ( OUString &  rFormat,
sal_Int32 &  rErrPos,
sal_uInt16 &  rCatLbSelPos,
short &  rFmtSelPos,
std::vector< OUString > &  rFmtEntries 
)

◆ CategoryChanged()

void SvxNumberFormatShell::CategoryChanged ( sal_uInt16  nCatLbPos,
short &  rFmtSelPos,
std::vector< OUString > &  rFmtEntries 
)

◆ CategoryToPos_Impl()

void SvxNumberFormatShell::CategoryToPos_Impl ( SvNumFormatType  nCategory,
sal_uInt16 &  rPos 
)
staticprivate

◆ Create() [1/2]

SvxNumberFormatShell * SvxNumberFormatShell::Create ( SvNumberFormatter pNumFormatter,
sal_uInt32  nFormatKey,
SvxNumberValueType  eNumValType,
const OUString &  rNumStr 
)
static

Definition at line 66 of file numfmtsh.cxx.

References SvxNumberFormatShell().

◆ Create() [2/2]

SvxNumberFormatShell * SvxNumberFormatShell::Create ( SvNumberFormatter pNumFormatter,
sal_uInt32  nFormatKey,
SvxNumberValueType  eNumValType,
double  nNumVal,
const OUString *  pNumStr 
)
static

Definition at line 74 of file numfmtsh.cxx.

References SvxNumberFormatShell().

◆ FillEListWithCurrency_Impl()

short SvxNumberFormatShell::FillEListWithCurrency_Impl ( std::vector< OUString > &  rList,
short  nSelPos 
)
private

◆ FillEListWithDateTime_Impl()

short SvxNumberFormatShell::FillEListWithDateTime_Impl ( std::vector< OUString > &  rList,
short  nSelPos,
bool  bSuppressDuplicates 
)
private

◆ FillEListWithFormats_Impl()

short SvxNumberFormatShell::FillEListWithFormats_Impl ( std::vector< OUString > &  rList,
short  nSelPos,
NfIndexTableOffset  eOffsetStart,
NfIndexTableOffset  eOffsetEnd,
bool  bSuppressDuplicates 
)
private

Definition at line 632 of file numfmtsh.cxx.

References FillEListWithOneFormat_Impl(), and nIndex.

Referenced by FillEListWithDateTime_Impl(), and FillEListWithStd_Impl().

◆ FillEListWithOneFormat_Impl()

void SvxNumberFormatShell::FillEListWithOneFormat_Impl ( std::vector< OUString > &  rList,
short &  nSelPos,
bool  bSuppressDuplicates,
NfIndexTableOffset  nOffset,
bool  bSuppressIsoDateTime 
)
private

◆ FillEListWithStd_Impl()

void SvxNumberFormatShell::FillEListWithStd_Impl ( std::vector< OUString > &  rList,
SvNumFormatType  eCategory,
short &  Pos,
bool  bSuppressDuplicates = false 
)
private

◆ FillEListWithSysCurrencys()

short SvxNumberFormatShell::FillEListWithSysCurrencys ( std::vector< OUString > &  rList,
short  nSelPos 
)
private

◆ FillEListWithUsD_Impl()

short SvxNumberFormatShell::FillEListWithUsD_Impl ( std::vector< OUString > &  rList,
SvNumFormatType  eCategory,
short  Pos 
)
private

◆ FillEListWithUserCurrencys()

short SvxNumberFormatShell::FillEListWithUserCurrencys ( std::vector< OUString > &  rList,
short  nSelPos 
)
private

◆ FillEntryList_Impl()

short SvxNumberFormatShell::FillEntryList_Impl ( std::vector< OUString > &  rList)
private

◆ FindCurrencyFormat() [1/2]

sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat ( const NfCurrencyEntry *  pTmpCurrencyEntry,
bool  bTmpBanking 
)

◆ FindCurrencyFormat() [2/2]

sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat ( const OUString &  rFmtString)

◆ FindCurrencyTableEntry()

sal_uInt16 SvxNumberFormatShell::FindCurrencyTableEntry ( const OUString &  rFmtString,
bool &  bTestBanking 
)

◆ FindEntry()

bool SvxNumberFormatShell::FindEntry ( const OUString &  rFmtString,
sal_uInt32 *  pAt = nullptr 
)

◆ FormatChanged()

void SvxNumberFormatShell::FormatChanged ( sal_uInt16  nFmtLbPos,
OUString &  rPreviewStr,
const Color *&  rpFontColor 
)

◆ GetAdded_Impl()

std::vector< sal_uInt32 >::iterator SvxNumberFormatShell::GetAdded_Impl ( size_t  nKey)
private

Definition at line 1119 of file numfmtsh.cxx.

References aAddList.

Referenced by AddFormat(), and RemoveFormat().

◆ GetCategory4Entry()

short SvxNumberFormatShell::GetCategory4Entry ( short  nEntry) const

◆ GetComment4Entry()

OUString SvxNumberFormatShell::GetComment4Entry ( short  nEntry)

◆ GetCurLanguage()

LanguageType SvxNumberFormatShell::GetCurLanguage ( ) const
inline

Definition at line 156 of file numfmtsh.hxx.

◆ GetCurNumFmtKey()

sal_uInt32 SvxNumberFormatShell::GetCurNumFmtKey ( ) const
inline

Definition at line 155 of file numfmtsh.hxx.

◆ GetCurrencySymbol()

sal_uInt32 SvxNumberFormatShell::GetCurrencySymbol ( ) const
inline

Definition at line 169 of file numfmtsh.hxx.

◆ GetCurrencySymbols()

void SvxNumberFormatShell::GetCurrencySymbols ( std::vector< OUString > &  rList,
sal_uInt16 *  pPos 
)

◆ GetFormat4Entry()

OUString SvxNumberFormatShell::GetFormat4Entry ( short  nEntry)

◆ GetFormatIntegerDigits()

sal_uInt16 SvxNumberFormatShell::GetFormatIntegerDigits ( std::u16string_view  rFormat) const

◆ GetInitSettings()

void SvxNumberFormatShell::GetInitSettings ( sal_uInt16 &  nCatLbPos,
LanguageType rLangType,
sal_uInt16 &  nFmtLbSelPos,
std::vector< OUString > &  rFmtEntries,
OUString &  rPrevString,
const Color *&  rpPrevColor 
)

◆ GetListPos4Entry()

short SvxNumberFormatShell::GetListPos4Entry ( sal_uInt32  nIdx,
std::u16string_view  rFmtString 
)

◆ GetOptions()

void SvxNumberFormatShell::GetOptions ( const OUString &  rFormat,
bool &  rThousand,
bool &  rNegRed,
sal_uInt16 &  rPrecision,
sal_uInt16 &  rLeadingZeroes,
sal_uInt16 &  rCatLbPos 
)

◆ GetPreviewString_Impl()

void SvxNumberFormatShell::GetPreviewString_Impl ( OUString &  rString,
const Color *&  rpColor 
)
private

◆ GetRemoved_Impl()

std::vector< sal_uInt32 >::iterator SvxNumberFormatShell::GetRemoved_Impl ( size_t  nKey)
private

Definition at line 1109 of file numfmtsh.cxx.

References aDelList.

Referenced by AddFormat(), and IsRemoved_Impl().

◆ GetStandardName()

OUString SvxNumberFormatShell::GetStandardName ( ) const

Returns the name of Standard, General, ... for the current language.

Definition at line 1389 of file numfmtsh.cxx.

References eCurLanguage, SvNumberFormatter::GetStandardName(), and pFormatter.

◆ GetUpdateData()

std::vector< sal_uInt32 > const & SvxNumberFormatShell::GetUpdateData ( ) const

Definition at line 171 of file numfmtsh.cxx.

References aDelList.

◆ GetUserDefined4Entry()

bool SvxNumberFormatShell::GetUserDefined4Entry ( short  nEntry)

◆ IsEssentialFormat_Impl()

bool SvxNumberFormatShell::IsEssentialFormat_Impl ( SvNumFormatType  eType,
sal_uInt32  nKey 
)
private

◆ IsInTable()

bool SvxNumberFormatShell::IsInTable ( sal_uInt16  nPos,
bool  bTmpBanking,
std::u16string_view  rFmtString 
) const

◆ IsNatNum12()

bool SvxNumberFormatShell::IsNatNum12 ( std::u16string_view  rFormat) const

◆ IsRemoved_Impl()

bool SvxNumberFormatShell::IsRemoved_Impl ( size_t  nKey)
private

◆ IsTmpCurrencyFormat()

bool SvxNumberFormatShell::IsTmpCurrencyFormat ( const OUString &  rFmtString)

Definition at line 1460 of file numfmtsh.cxx.

References FindEntry(), and NUMBERFORMAT_ENTRY_NEW_CURRENCY.

◆ IsUserDefined()

bool SvxNumberFormatShell::IsUserDefined ( const OUString &  rFmtString)

◆ LanguageChanged()

void SvxNumberFormatShell::LanguageChanged ( LanguageType  eLangType,
short &  rFmtSelPos,
std::vector< OUString > &  rFmtEntries 
)

◆ MakeFormat()

void SvxNumberFormatShell::MakeFormat ( OUString &  rFormat,
bool  bThousand,
bool  bNegRed,
sal_uInt16  nPrecision,
sal_uInt16  nLeadingZeroes,
sal_uInt16  nCurrencyEntryPos 
)

◆ MakePreviewString()

void SvxNumberFormatShell::MakePreviewString ( const OUString &  rFormatStr,
OUString &  rPreviewStr,
const Color *&  rpFontColor 
)

◆ MakePrevStringFromVal()

void SvxNumberFormatShell::MakePrevStringFromVal ( const OUString &  rFormatStr,
OUString &  rPreviewStr,
const Color *&  rpFontColor,
double  nValue 
)

Definition at line 1215 of file numfmtsh.cxx.

References eCurLanguage, SvNumberFormatter::GetPreviewString(), nValue, and pFormatter.

Referenced by FormatChanged().

◆ PosToCategory_Impl()

void SvxNumberFormatShell::PosToCategory_Impl ( sal_uInt16  nPos,
SvNumFormatType rCategory 
)
staticprivate

◆ RemoveFormat()

void SvxNumberFormatShell::RemoveFormat ( std::u16string_view  rFormat,
sal_uInt16 &  rCatLbSelPos,
short &  rFmtSelPos,
std::vector< OUString > &  rFmtEntries 
)

◆ SetComment4Entry()

void SvxNumberFormatShell::SetComment4Entry ( short  nEntry,
const OUString &  aCommentString 
)

◆ SetCurCurrencyEntry()

void SvxNumberFormatShell::SetCurCurrencyEntry ( NfCurrencyEntry *  pCEntry)

Definition at line 1455 of file numfmtsh.cxx.

References pCurCurrencyEntry.

◆ SetCurNumFmtKey()

void SvxNumberFormatShell::SetCurNumFmtKey ( sal_uInt32  nNew)
inline

Definition at line 154 of file numfmtsh.hxx.

◆ SetCurrencySymbol()

void SvxNumberFormatShell::SetCurrencySymbol ( sal_uInt32  nPos)

◆ SetUseStarFormat()

void SvxNumberFormatShell::SetUseStarFormat ( bool  bUse)
inline

Definition at line 181 of file numfmtsh.hxx.

◆ ValidateNewEntries()

void SvxNumberFormatShell::ValidateNewEntries ( )
inline

Definition at line 151 of file numfmtsh.hxx.

Member Data Documentation

◆ aAddList

std::vector<sal_uInt32> SvxNumberFormatShell::aAddList
private

Definition at line 189 of file numfmtsh.hxx.

Referenced by AddFormat(), GetAdded_Impl(), RemoveFormat(), and ~SvxNumberFormatShell().

◆ aCurCurrencyList

std::vector<sal_uInt16> SvxNumberFormatShell::aCurCurrencyList
private

Definition at line 195 of file numfmtsh.hxx.

Referenced by FindCurrencyFormat(), GetCurrencySymbols(), and SetCurrencySymbol().

◆ aCurEntryList

std::vector<sal_uInt32> SvxNumberFormatShell::aCurEntryList
private

◆ aCurrencyFormatList

std::vector<OUString> SvxNumberFormatShell::aCurrencyFormatList
private

◆ aDelList

std::vector<sal_uInt32> SvxNumberFormatShell::aDelList
private

Definition at line 190 of file numfmtsh.hxx.

Referenced by AddFormat(), GetRemoved_Impl(), GetUpdateData(), IsRemoved_Impl(), and RemoveFormat().

◆ aValStr

OUString SvxNumberFormatShell::aValStr
private

Definition at line 186 of file numfmtsh.hxx.

Referenced by GetPreviewString_Impl(), MakePreviewString(), and SvxNumberFormatShell().

◆ bBankingSymbol

bool SvxNumberFormatShell::bBankingSymbol
private

Definition at line 197 of file numfmtsh.hxx.

Referenced by FillEListWithUserCurrencys(), and SetCurrencySymbol().

◆ bIsDefaultValNum

bool SvxNumberFormatShell::bIsDefaultValNum
private

Definition at line 201 of file numfmtsh.hxx.

Referenced by MakePreviewString(), and SvxNumberFormatShell().

◆ bUndoAddList

bool SvxNumberFormatShell::bUndoAddList
private

Definition at line 188 of file numfmtsh.hxx.

Referenced by ~SvxNumberFormatShell().

◆ bUseStarFormat

bool SvxNumberFormatShell::bUseStarFormat
private

Definition at line 200 of file numfmtsh.hxx.

Referenced by GetPreviewString_Impl(), and MakePreviewString().

◆ eCurLanguage

LanguageType SvxNumberFormatShell::eCurLanguage
private

◆ eValType

SvxNumberValueType SvxNumberFormatShell::eValType
private

◆ nCurCategory

SvNumFormatType SvxNumberFormatShell::nCurCategory
private

◆ nCurCurrencyEntryPos

sal_uInt32 SvxNumberFormatShell::nCurCurrencyEntryPos
private

◆ nCurFormatKey

sal_uInt32 SvxNumberFormatShell::nCurFormatKey
private

◆ nValNum

double SvxNumberFormatShell::nValNum
private

◆ pCurCurrencyEntry

NfCurrencyEntry* SvxNumberFormatShell::pCurCurrencyEntry
private

◆ pCurFmtTable

SvNumberFormatTable* SvxNumberFormatShell::pCurFmtTable
private

◆ pFormatter

SvNumberFormatter* SvxNumberFormatShell::pFormatter
private

The documentation for this class was generated from the following files: