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, 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, Color *&rpFontColor)
 
bool AddFormat (OUString &rFormat, sal_Int32 &rErrPos, sal_uInt16 &rCatLbSelPos, short &rFmtSelPos, std::vector< OUString > &rFmtEntries)
 
void RemoveFormat (const OUString &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 (const OUString &rFormat) const
 
void MakePreviewString (const OUString &rFormatStr, OUString &rPreviewStr, Color *&rpFontColor)
 
void MakePrevStringFromVal (const OUString &rFormatStr, OUString &rPreviewStr, 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, ... 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, const OUString &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, OUString const &rFmtString)
 
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 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, 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 const 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
 
NfCurrencyEntrypCurCurrencyEntry
 
bool bBankingSymbol
 
sal_uInt32 nCurCurrencyEntryPos
 
std::vector< OUString > aCurrencyFormatList
 
bool bUseStarFormat
 
bool bIsDefaultValNum
 

Detailed Description

Definition at line 57 of file numfmtsh.hxx.

Constructor & Destructor Documentation

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

Definition at line 115 of file numfmtsh.cxx.

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

SvxNumberFormatShell::~SvxNumberFormatShell ( )

Definition at line 150 of file numfmtsh.cxx.

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

Member Function Documentation

bool SvxNumberFormatShell::AddFormat ( OUString &  rFormat,
sal_Int32 &  rErrPos,
sal_uInt16 &  rCatLbSelPos,
short &  rFmtSelPos,
std::vector< OUString > &  rFmtEntries 
)
void SvxNumberFormatShell::CategoryChanged ( sal_uInt16  nCatLbPos,
short &  rFmtSelPos,
std::vector< OUString > &  rFmtEntries 
)
void SvxNumberFormatShell::CategoryToPos_Impl ( SvNumFormatType  nCategory,
sal_uInt16 &  rPos 
)
staticprivate
SvxNumberFormatShell * SvxNumberFormatShell::Create ( SvNumberFormatter pNumFormatter,
sal_uInt32  nFormatKey,
SvxNumberValueType  eNumValType,
const OUString &  rNumStr 
)
static

Definition at line 65 of file numfmtsh.cxx.

References SvxNumberFormatShell().

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

Definition at line 73 of file numfmtsh.cxx.

References SvxNumberFormatShell().

short SvxNumberFormatShell::FillEListWithCurrency_Impl ( std::vector< OUString > &  rList,
short  nSelPos 
)
private
short SvxNumberFormatShell::FillEListWithDateTime_Impl ( std::vector< OUString > &  rList,
short  nSelPos,
bool  bSuppressDuplicates 
)
private
short SvxNumberFormatShell::FillEListWithFormats_Impl ( std::vector< OUString > &  rList,
short  nSelPos,
NfIndexTableOffset  eOffsetStart,
NfIndexTableOffset  eOffsetEnd,
bool  bSuppressDuplicates 
)
private
void SvxNumberFormatShell::FillEListWithStd_Impl ( std::vector< OUString > &  rList,
SvNumFormatType  eCategory,
short &  Pos,
bool  bSuppressDuplicates = false 
)
private
short SvxNumberFormatShell::FillEListWithSysCurrencys ( std::vector< OUString > &  rList,
short  nSelPos 
)
private
short SvxNumberFormatShell::FillEListWithUsD_Impl ( std::vector< OUString > &  rList,
SvNumFormatType  eCategory,
short  Pos 
)
private
short SvxNumberFormatShell::FillEListWithUserCurrencys ( std::vector< OUString > &  rList,
short  nSelPos 
)
private
short SvxNumberFormatShell::FillEntryList_Impl ( std::vector< OUString > &  rList)
private
sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat ( const OUString &  rFmtString)
sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat ( const NfCurrencyEntry pTmpCurrencyEntry,
bool  bTmpBanking 
)
sal_uInt16 SvxNumberFormatShell::FindCurrencyTableEntry ( const OUString &  rFmtString,
bool &  bTestBanking 
)
bool SvxNumberFormatShell::FindEntry ( const OUString &  rFmtString,
sal_uInt32 *  pAt = nullptr 
)
void SvxNumberFormatShell::FormatChanged ( sal_uInt16  nFmtLbPos,
OUString &  rPreviewStr,
Color *&  rpFontColor 
)
std::vector< sal_uInt32 >::iterator SvxNumberFormatShell::GetAdded_Impl ( size_t  nKey)
private

Definition at line 1102 of file numfmtsh.cxx.

References aAddList.

Referenced by AddFormat(), and RemoveFormat().

short SvxNumberFormatShell::GetCategory4Entry ( short  nEntry) const
OUString SvxNumberFormatShell::GetComment4Entry ( short  nEntry)
LanguageType SvxNumberFormatShell::GetCurLanguage ( ) const
inline

Definition at line 150 of file numfmtsh.hxx.

sal_uInt32 SvxNumberFormatShell::GetCurNumFmtKey ( ) const
inline

Definition at line 149 of file numfmtsh.hxx.

sal_uInt32 SvxNumberFormatShell::GetCurrencySymbol ( ) const
inline

Definition at line 163 of file numfmtsh.hxx.

void SvxNumberFormatShell::GetCurrencySymbols ( std::vector< OUString > &  rList,
sal_uInt16 *  pPos 
)
OUString SvxNumberFormatShell::GetFormat4Entry ( short  nEntry)
sal_uInt16 SvxNumberFormatShell::GetFormatIntegerDigits ( const OUString &  rFormat) const
void SvxNumberFormatShell::GetInitSettings ( sal_uInt16 &  nCatLbPos,
LanguageType rLangType,
sal_uInt16 &  nFmtLbSelPos,
std::vector< OUString > &  rFmtEntries,
OUString &  rPrevString,
Color *&  rpPrevColor 
)
short SvxNumberFormatShell::GetListPos4Entry ( sal_uInt32  nIdx,
const OUString &  rFmtString 
)
void SvxNumberFormatShell::GetOptions ( const OUString &  rFormat,
bool &  rThousand,
bool &  rNegRed,
sal_uInt16 &  rPrecision,
sal_uInt16 &  rLeadingZeroes,
sal_uInt16 &  rCatLbPos 
)
void SvxNumberFormatShell::GetPreviewString_Impl ( OUString &  rString,
Color *&  rpColor 
)
private
std::vector< sal_uInt32 >::iterator SvxNumberFormatShell::GetRemoved_Impl ( size_t  nKey)
private

Definition at line 1092 of file numfmtsh.cxx.

References aDelList.

Referenced by AddFormat(), and IsRemoved_Impl().

OUString SvxNumberFormatShell::GetStandardName ( ) const

Returns the name of Standard, General, ...

for the current language.

Definition at line 1369 of file numfmtsh.cxx.

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

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

Definition at line 170 of file numfmtsh.cxx.

References aDelList.

bool SvxNumberFormatShell::GetUserDefined4Entry ( short  nEntry)
bool SvxNumberFormatShell::IsEssentialFormat_Impl ( SvNumFormatType  eType,
sal_uInt32  nKey 
)
private
bool SvxNumberFormatShell::IsInTable ( sal_uInt16  nPos,
bool  bTmpBanking,
OUString const &  rFmtString 
)
bool SvxNumberFormatShell::IsRemoved_Impl ( size_t  nKey)
private
bool SvxNumberFormatShell::IsTmpCurrencyFormat ( const OUString &  rFmtString)

Definition at line 1440 of file numfmtsh.cxx.

References FindEntry(), and NUMBERFORMAT_ENTRY_NEW_CURRENCY.

bool SvxNumberFormatShell::IsUserDefined ( const OUString &  rFmtString)
void SvxNumberFormatShell::LanguageChanged ( LanguageType  eLangType,
short &  rFmtSelPos,
std::vector< OUString > &  rFmtEntries 
)
void SvxNumberFormatShell::MakeFormat ( OUString &  rFormat,
bool  bThousand,
bool  bNegRed,
sal_uInt16  nPrecision,
sal_uInt16  nLeadingZeroes,
sal_uInt16  nCurrencyEntryPos 
)
void SvxNumberFormatShell::MakePreviewString ( const OUString &  rFormatStr,
OUString &  rPreviewStr,
Color *&  rpFontColor 
)
void SvxNumberFormatShell::MakePrevStringFromVal ( const OUString &  rFormatStr,
OUString &  rPreviewStr,
Color *&  rpFontColor,
double  nValue 
)

Definition at line 1198 of file numfmtsh.cxx.

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

Referenced by FormatChanged().

void SvxNumberFormatShell::PosToCategory_Impl ( sal_uInt16  nPos,
SvNumFormatType rCategory 
)
staticprivate
void SvxNumberFormatShell::RemoveFormat ( const OUString &  rFormat,
sal_uInt16 &  rCatLbSelPos,
short &  rFmtSelPos,
std::vector< OUString > &  rFmtEntries 
)
void SvxNumberFormatShell::SetComment4Entry ( short  nEntry,
const OUString &  aCommentString 
)
void SvxNumberFormatShell::SetCurCurrencyEntry ( NfCurrencyEntry pCEntry)

Definition at line 1435 of file numfmtsh.cxx.

References pCurCurrencyEntry.

void SvxNumberFormatShell::SetCurNumFmtKey ( sal_uInt32  nNew)
inline

Definition at line 148 of file numfmtsh.hxx.

void SvxNumberFormatShell::SetCurrencySymbol ( sal_uInt32  nPos)
void SvxNumberFormatShell::SetUseStarFormat ( bool  bUse)
inline

Definition at line 175 of file numfmtsh.hxx.

void SvxNumberFormatShell::ValidateNewEntries ( )
inline

Definition at line 145 of file numfmtsh.hxx.

Member Data Documentation

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

Definition at line 183 of file numfmtsh.hxx.

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

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

Definition at line 189 of file numfmtsh.hxx.

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

std::vector<sal_uInt32> SvxNumberFormatShell::aCurEntryList
private
std::vector<OUString> SvxNumberFormatShell::aCurrencyFormatList
private
std::vector<sal_uInt32> SvxNumberFormatShell::aDelList
private

Definition at line 184 of file numfmtsh.hxx.

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

OUString SvxNumberFormatShell::aValStr
private

Definition at line 180 of file numfmtsh.hxx.

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

bool SvxNumberFormatShell::bBankingSymbol
private

Definition at line 191 of file numfmtsh.hxx.

Referenced by FillEListWithUserCurrencys(), and SetCurrencySymbol().

bool SvxNumberFormatShell::bIsDefaultValNum
private

Definition at line 195 of file numfmtsh.hxx.

Referenced by MakePreviewString(), and SvxNumberFormatShell().

bool SvxNumberFormatShell::bUndoAddList
private

Definition at line 182 of file numfmtsh.hxx.

Referenced by ~SvxNumberFormatShell().

bool SvxNumberFormatShell::bUseStarFormat
private

Definition at line 194 of file numfmtsh.hxx.

Referenced by GetPreviewString_Impl(), and MakePreviewString().

LanguageType SvxNumberFormatShell::eCurLanguage
private
SvxNumberValueType const SvxNumberFormatShell::eValType
private
SvNumFormatType SvxNumberFormatShell::nCurCategory
private
sal_uInt32 SvxNumberFormatShell::nCurCurrencyEntryPos
private
sal_uInt32 SvxNumberFormatShell::nCurFormatKey
private
double SvxNumberFormatShell::nValNum
private
NfCurrencyEntry* SvxNumberFormatShell::pCurCurrencyEntry
private
SvNumberFormatTable* SvxNumberFormatShell::pCurFmtTable
private
SvNumberFormatter* SvxNumberFormatShell::pFormatter
private

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