XubString->OUString

Change-Id: Ic8b191dfb0d14e129dc804aeb4ac14c732e72e6b
This commit is contained in:
Caolán McNamara
2012-09-12 23:24:07 +01:00
parent 44aa7df623
commit c20ba023c7
9 changed files with 73 additions and 75 deletions

View File

@@ -2154,7 +2154,7 @@ inline bool lcl_FormatHasNegColor( const SvNumberformat* pFormat )
inline bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat ) inline bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat )
{ {
return pFormat && (pFormat->GetFormatstring().Search( '(' ) != STRING_NOTFOUND); return pFormat && (pFormat->GetFormatstring().indexOf('(') != -1);
} }
namespace { namespace {

View File

@@ -242,9 +242,9 @@ class SVL_DLLPUBLIC NfCurrencyEntry
private: private:
// nDecimalFormat := 0, 1, 2 // nDecimalFormat := 0, 1, 2
// #,##0 or #,##0.00 or #,##0.-- are assigned // #,##0 or #,##0.00 or #,##0.-- is returned
SVL_DLLPRIVATE void Impl_BuildFormatStringNumChars( String&, SVL_DLLPRIVATE OUString Impl_BuildFormatStringNumChars(
const LocaleDataWrapper&, sal_uInt16 nDecimalFormat ) const; const LocaleDataWrapper&, sal_uInt16 nDecimalFormat) const;
public: public:
@@ -268,10 +268,10 @@ public:
sal_Unicode GetZeroChar() const { return cZeroChar; } sal_Unicode GetZeroChar() const { return cZeroChar; }
/** [$DM-407] (bBank==false) or [$DEM] (bBank==true) /** [$DM-407] (bBank==false) or [$DEM] (bBank==true)
is assigned to rStr, if bBank==false and is returned. If bBank==false and
bWithoutExtension==true only [$DM] */ bWithoutExtension==true only [$DM] */
void BuildSymbolString( String& rStr, bool bBank, OUString BuildSymbolString(bool bBank,
bool bWithoutExtension = false ) const; bool bWithoutExtension = false) const;
/** #,##0.00 [$DM-407] is assigned to rStr, separators /** #,##0.00 [$DM-407] is assigned to rStr, separators
from rLoc, incl. minus sign but without [RED] */ from rLoc, incl. minus sign but without [RED] */
@@ -870,7 +870,7 @@ private:
// Test whether format code already exists, then return index key, // Test whether format code already exists, then return index key,
// otherwise NUMBERFORMAT_ENTRY_NOT_FOUND // otherwise NUMBERFORMAT_ENTRY_NOT_FOUND
SVL_DLLPRIVATE sal_uInt32 ImpIsEntry( const String& rString, SVL_DLLPRIVATE sal_uInt32 ImpIsEntry( const OUString& rString,
sal_uInt32 CLOffset, sal_uInt32 CLOffset,
LanguageType eLnge ); LanguageType eLnge );

View File

@@ -221,7 +221,7 @@ public:
LanguageType GetLanguage() const { return maLocale.meLanguage;} LanguageType GetLanguage() const { return maLocale.meLanguage;}
const String& GetFormatstring() const { return sFormatstring; } const OUString& GetFormatstring() const { return sFormatstring; }
// Build a format string of application defined keywords // Build a format string of application defined keywords
String GetMappedFormatstring( const NfKeywordTable& rKeywords, String GetMappedFormatstring( const NfKeywordTable& rKeywords,
@@ -458,7 +458,7 @@ public:
private: private:
ImpSvNumFor NumFor[4]; // Array for the 4 subformats ImpSvNumFor NumFor[4]; // Array for the 4 subformats
String sFormatstring; // The format code string OUString sFormatstring; // The format code string
String sComment; // Comment, since number formatter version 6 String sComment; // Comment, since number formatter version 6
double fLimit1; // Value for first condition double fLimit1; // Value for first condition
double fLimit2; // Value for second condition double fLimit2; // Value for second condition

View File

@@ -856,7 +856,7 @@ sal_uInt32 SvNumberFormatter::ImpGetCLOffset(LanguageType eLnge) const
return nOffset; return nOffset;
} }
sal_uInt32 SvNumberFormatter::ImpIsEntry(const String& rString, sal_uInt32 SvNumberFormatter::ImpIsEntry(const OUString& rString,
sal_uInt32 nCLOffset, sal_uInt32 nCLOffset,
LanguageType eLnge) LanguageType eLnge)
{ {
@@ -3322,7 +3322,7 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
*ppEntry = pFoundEntry; *ppEntry = pFoundEntry;
if ( pBank ) if ( pBank )
*pBank = bFoundBank; *pBank = bFoundBank;
pFoundEntry->BuildSymbolString( rStr, bFoundBank ); rStr = pFoundEntry->BuildSymbolString(bFoundBank);
} }
} }
if ( !rStr.Len() ) if ( !rStr.Len() )
@@ -3778,50 +3778,53 @@ bool NfCurrencyEntry::operator==( const NfCurrencyEntry& r ) const
; ;
} }
void NfCurrencyEntry::BuildSymbolString( String& rStr, bool bBank, OUString NfCurrencyEntry::BuildSymbolString(bool bBank,
bool bWithoutExtension ) const bool bWithoutExtension) const
{ {
rStr = '['; OUStringBuffer aBuf("[$");
rStr += '$'; if (bBank)
if ( bBank ) aBuf.append(aBankSymbol);
rStr += aBankSymbol;
else else
{ {
if ( aSymbol.Search( '-' ) != STRING_NOTFOUND || aSymbol.Search( ']' ) != STRING_NOTFOUND ) if ( aSymbol.Search( '-' ) != STRING_NOTFOUND || aSymbol.Search( ']' ) != STRING_NOTFOUND )
{ {
rStr += '"'; aBuf.append('"').append(aSymbol).append('"');
rStr += aSymbol;
rStr += '"';
} }
else else
rStr += aSymbol; {
aBuf.append(aSymbol);
}
if ( !bWithoutExtension && eLanguage != LANGUAGE_DONTKNOW && eLanguage != LANGUAGE_SYSTEM ) if ( !bWithoutExtension && eLanguage != LANGUAGE_DONTKNOW && eLanguage != LANGUAGE_SYSTEM )
{ {
rStr += '-'; sal_Int32 nLang = static_cast<sal_Int32>(eLanguage);
rStr += String::CreateFromInt32( sal_Int32( eLanguage ), 16 ).ToUpperAscii(); aBuf.append('-').append(
OUString::valueOf(nLang, 16).toAsciiUpperCase());
} }
} }
rStr += ']'; aBuf.append(']');
return aBuf.makeStringAndClear();
} }
OUString NfCurrencyEntry::Impl_BuildFormatStringNumChars(
void NfCurrencyEntry::Impl_BuildFormatStringNumChars( String& rStr, const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat) const
const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{ {
rStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "###0" ) ); OUStringBuffer aBuf;
rStr.Insert( rLoc.getNumThousandSep(), 1 ); aBuf.append('#').append(rLoc.getNumThousandSep()).append("##0");
if ( nDecimalFormat && nDigits ) if (nDecimalFormat && nDigits)
{ {
rStr += rLoc.getNumDecimalSep(); aBuf.append(rLoc.getNumDecimalSep());
rStr.Expand( rStr.Len() + nDigits, (nDecimalFormat == 2 ? '-' : cZeroChar) ); sal_Unicode cDecimalChar = nDecimalFormat == 2 ? '-' : cZeroChar;
for (sal_uInt16 i = 0; i < nDigits; ++i)
aBuf.append(cDecimalChar);
} }
return aBuf.makeStringAndClear();
} }
void NfCurrencyEntry::BuildPositiveFormatString( String& rStr, bool bBank, void NfCurrencyEntry::BuildPositiveFormatString( String& rStr, bool bBank,
const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{ {
Impl_BuildFormatStringNumChars( rStr, rLoc, nDecimalFormat ); rStr = Impl_BuildFormatStringNumChars(rLoc, nDecimalFormat);
sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat( sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
rLoc.getCurrPositiveFormat(), nPositiveFormat, bBank ); rLoc.getCurrPositiveFormat(), nPositiveFormat, bBank );
CompletePositiveFormatString( rStr, bBank, nPosiForm ); CompletePositiveFormatString( rStr, bBank, nPosiForm );
@@ -3831,7 +3834,7 @@ void NfCurrencyEntry::BuildPositiveFormatString( String& rStr, bool bBank,
void NfCurrencyEntry::BuildNegativeFormatString( String& rStr, bool bBank, void NfCurrencyEntry::BuildNegativeFormatString( String& rStr, bool bBank,
const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{ {
Impl_BuildFormatStringNumChars( rStr, rLoc, nDecimalFormat ); rStr = Impl_BuildFormatStringNumChars(rLoc, nDecimalFormat);
sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat( sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
rLoc.getCurrNegativeFormat(), nNegativeFormat, bBank ); rLoc.getCurrNegativeFormat(), nNegativeFormat, bBank );
CompleteNegativeFormatString( rStr, bBank, nNegaForm ); CompleteNegativeFormatString( rStr, bBank, nNegaForm );
@@ -3841,8 +3844,7 @@ void NfCurrencyEntry::BuildNegativeFormatString( String& rStr, bool bBank,
void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, bool bBank, void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, bool bBank,
sal_uInt16 nPosiForm ) const sal_uInt16 nPosiForm ) const
{ {
String aSymStr; String aSymStr = BuildSymbolString(bBank);
BuildSymbolString( aSymStr, bBank );
NfCurrencyEntry::CompletePositiveFormatString( rStr, aSymStr, nPosiForm ); NfCurrencyEntry::CompletePositiveFormatString( rStr, aSymStr, nPosiForm );
} }
@@ -3850,8 +3852,7 @@ void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, bool bBank,
void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, bool bBank, void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, bool bBank,
sal_uInt16 nNegaForm ) const sal_uInt16 nNegaForm ) const
{ {
String aSymStr; String aSymStr = BuildSymbolString(bBank);
BuildSymbolString( aSymStr, bBank );
NfCurrencyEntry::CompleteNegativeFormatString( rStr, aSymStr, nNegaForm ); NfCurrencyEntry::CompleteNegativeFormatString( rStr, aSymStr, nNegaForm );
} }

View File

@@ -125,7 +125,7 @@ public:
void GetColor() const; void GetColor() const;
void SetTextValue(const XubString& rText); void SetTextValue(const OUString& rText);
// der String wird in ein double umgewandelt (durch den Formatter) und anschliessen in SetValue gesteckt // der String wird in ein double umgewandelt (durch den Formatter) und anschliessen in SetValue gesteckt
sal_Bool IsEmptyFieldEnabled() const { return m_bEnableEmptyField; } sal_Bool IsEmptyFieldEnabled() const { return m_bEnableEmptyField; }
@@ -159,8 +159,8 @@ public:
// Das hier gelieferte Objekt wird allerdings zwischen allen Instanzen der Klasse geteilt (aus Zeit- und Platzgruenden), // Das hier gelieferte Objekt wird allerdings zwischen allen Instanzen der Klasse geteilt (aus Zeit- und Platzgruenden),
// also ist etwas Vorsicht angebracht ... // also ist etwas Vorsicht angebracht ...
void GetFormat(XubString& rFormatString, LanguageType& eLang) const; OUString GetFormat(LanguageType& eLang) const;
sal_Bool SetFormat(const XubString& rFormatString, LanguageType eLang); sal_Bool SetFormat(const OUString& rFormatString, LanguageType eLang);
// sal_False, wenn der FormatString nicht gesetzt werden konnte (also wahrscheinlich ungueltig ist) // sal_False, wenn der FormatString nicht gesetzt werden konnte (also wahrscheinlich ungueltig ist)
sal_Bool IsStrictFormat() const { return m_bStrictFormat; } sal_Bool IsStrictFormat() const { return m_bStrictFormat; }
@@ -196,10 +196,10 @@ public:
einfach den Text formatiert ausgeben ... einfach den Text formatiert ausgeben ...
(der Text wird einfach nur durch den Formatter gejagt und dann gesetzt) (der Text wird einfach nur durch den Formatter gejagt und dann gesetzt)
*/ */
void SetTextFormatted(const XubString& rText); void SetTextFormatted(const OUString& rText);
String GetTextValue() const; String GetTextValue() const;
void SetDefaultText(const XubString& rDefault) { m_sDefaultText = rDefault; } void SetDefaultText(const OUString& rDefault) { m_sDefaultText = rDefault; }
String GetDefaultText() const { return m_sDefaultText; } String GetDefaultText() const { return m_sDefaultText; }
// die bei der letzten Ausgabe-Operation vom Formatter gelieferte Farbe (Ausgabe-Operationen werden getriggert durch // die bei der letzten Ausgabe-Operation vom Formatter gelieferte Farbe (Ausgabe-Operationen werden getriggert durch
@@ -248,7 +248,7 @@ protected:
virtual void Modify(); virtual void Modify();
// CheckText ueberschreiben fuer Ueberpruefung zur Eingabezeit // CheckText ueberschreiben fuer Ueberpruefung zur Eingabezeit
virtual sal_Bool CheckText(const XubString&) const { return sal_True; } virtual sal_Bool CheckText(const OUString&) const { return sal_True; }
// any aspect of the current format has changed // any aspect of the current format has changed
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat); virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
@@ -291,7 +291,7 @@ public:
virtual ~DoubleNumericField(); virtual ~DoubleNumericField();
protected: protected:
virtual sal_Bool CheckText(const XubString& sText) const; virtual sal_Bool CheckText(const OUString& sText) const;
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat); virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
void ResetConformanceTester(); void ResetConformanceTester();

View File

@@ -113,7 +113,7 @@ FontList; FontNameMenu; FontSizeBox
class SVT_DLLPUBLIC FontNameMenu : public PopupMenu class SVT_DLLPUBLIC FontNameMenu : public PopupMenu
{ {
private: private:
XubString maCurName; OUString maCurName;
Link maSelectHdl; Link maSelectHdl;
Link maHighlightHdl; Link maHighlightHdl;
@@ -126,8 +126,8 @@ public:
void Fill( const FontList* pList ); void Fill( const FontList* pList );
void SetCurName( const XubString& rName ); void SetCurName( const OUString& rName );
const XubString& GetCurName() const { return maCurName; } const OUString& GetCurName() const { return maCurName; }
void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
const Link& GetSelectHdl() const { return maSelectHdl; } const Link& GetSelectHdl() const { return maSelectHdl; }

View File

@@ -395,7 +395,7 @@ void FormattedField::SetText( const XubString& rStr, const Selection& rNewSelect
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void FormattedField::SetTextFormatted(const XubString& rStr) void FormattedField::SetTextFormatted(const OUString& rStr)
{ {
DBG_CHKTHIS(FormattedField, NULL); DBG_CHKTHIS(FormattedField, NULL);
@@ -628,9 +628,8 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bReset
} }
else else
{ {
XubString sOldFormat;
LanguageType aOldLang; LanguageType aOldLang;
GetFormat(sOldFormat, aOldLang); OUString sOldFormat = GetFormat(aOldLang);
sal_uInt32 nDestKey = pFormatter->TestNewString(sOldFormat); sal_uInt32 nDestKey = pFormatter->TestNewString(sOldFormat);
if (nDestKey == NUMBERFORMAT_ENTRY_NOT_FOUND) if (nDestKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
@@ -652,17 +651,19 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bReset
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void FormattedField::GetFormat(XubString& rFormatString, LanguageType& eLang) const OUString FormattedField::GetFormat(LanguageType& eLang) const
{ {
DBG_CHKTHIS(FormattedField, NULL); DBG_CHKTHIS(FormattedField, NULL);
const SvNumberformat* pFormatEntry = ImplGetFormatter()->GetEntry(m_nFormatKey); const SvNumberformat* pFormatEntry = ImplGetFormatter()->GetEntry(m_nFormatKey);
DBG_ASSERT(pFormatEntry != NULL, "FormattedField::GetFormat: no number format for the given format key."); DBG_ASSERT(pFormatEntry != NULL, "FormattedField::GetFormat: no number format for the given format key.");
rFormatString = pFormatEntry ? pFormatEntry->GetFormatstring() : XubString(); OUString sFormatString = pFormatEntry ? pFormatEntry->GetFormatstring() : OUString();
eLang = pFormatEntry ? pFormatEntry->GetLanguage() : LANGUAGE_DONTKNOW; eLang = pFormatEntry ? pFormatEntry->GetLanguage() : LANGUAGE_DONTKNOW;
return sFormatString;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
sal_Bool FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang) sal_Bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType eLang)
{ {
DBG_CHKTHIS(FormattedField, NULL); DBG_CHKTHIS(FormattedField, NULL);
sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang); sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang);
@@ -709,8 +710,7 @@ void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator)
// we need the language for the following // we need the language for the following
LanguageType eLang; LanguageType eLang;
String sFmtDescription; String sFmtDescription = GetFormat(eLang);
GetFormat(sFmtDescription, eLang);
// generate a new format ... // generate a new format ...
ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading); ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading);
@@ -753,8 +753,7 @@ void FormattedField::SetDecimalDigits(sal_uInt16 _nPrecision)
// we need the language for the following // we need the language for the following
LanguageType eLang; LanguageType eLang;
String sFmtDescription; String sFmtDescription = GetFormat(eLang);
GetFormat(sFmtDescription, eLang);
// generate a new format ... // generate a new format ...
ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, bThousand, IsRed, _nPrecision, nAnzLeading); ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, bThousand, IsRed, _nPrecision, nAnzLeading);
@@ -913,7 +912,7 @@ void FormattedField::SetMaxValue(double dMax)
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void FormattedField::SetTextValue(const XubString& rText) void FormattedField::SetTextValue(const OUString& rText)
{ {
DBG_CHKTHIS(FormattedField, NULL); DBG_CHKTHIS(FormattedField, NULL);
SetText(rText); SetText(rText);
@@ -1126,7 +1125,7 @@ void DoubleNumericField::FormatChanged(FORMAT_CHANGE_TYPE nWhat)
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
sal_Bool DoubleNumericField::CheckText(const XubString& sText) const sal_Bool DoubleNumericField::CheckText(const OUString& sText) const
{ {
// We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't // We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't
// recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10") // recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10")
@@ -1230,9 +1229,8 @@ void DoubleCurrencyField::setPrependCurrSym(sal_Bool _bPrepend)
void DoubleCurrencyField::UpdateCurrencyFormat() void DoubleCurrencyField::UpdateCurrencyFormat()
{ {
// the old settings // the old settings
XubString sOldFormat;
LanguageType eLanguage; LanguageType eLanguage;
GetFormat(sOldFormat, eLanguage); GetFormat(eLanguage);
sal_Bool bThSep = GetThousandsSep(); sal_Bool bThSep = GetThousandsSep();
sal_uInt16 nDigits = GetDecimalDigits(); sal_uInt16 nDigits = GetDecimalDigits();

View File

@@ -58,7 +58,7 @@ void FontNameMenu::Select()
void FontNameMenu::Highlight() void FontNameMenu::Highlight()
{ {
XubString aTempName = maCurName; OUString aTempName = maCurName;
maCurName = GetItemText( GetCurItemId() ); maCurName = GetItemText( GetCurItemId() );
maHighlightHdl.Call( this ); maHighlightHdl.Call( this );
maCurName = aTempName; maCurName = aTempName;
@@ -84,7 +84,7 @@ void FontNameMenu::Fill( const FontList* pList )
sal_uInt16 j = GetItemCount(); sal_uInt16 j = GetItemCount();
while ( j ) while ( j )
{ {
XubString aText = GetItemText( GetItemId( j-1 ) ); OUString aText = GetItemText( GetItemId( j-1 ) );
if ( rI18nHelper.CompareString( rName, aText ) > 0 ) if ( rI18nHelper.CompareString( rName, aText ) > 0 )
break; break;
j--; j--;
@@ -97,7 +97,7 @@ void FontNameMenu::Fill( const FontList* pList )
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void FontNameMenu::SetCurName( const XubString& rName ) void FontNameMenu::SetCurName(const OUString& rName)
{ {
maCurName = rName; maCurName = rName;
@@ -111,7 +111,7 @@ void FontNameMenu::SetCurName( const XubString& rName )
if ( IsItemChecked( nItemId ) ) if ( IsItemChecked( nItemId ) )
nChecked = nItemId; nChecked = nItemId;
XubString aText = GetItemText( nItemId ); OUString aText = GetItemText( nItemId );
if ( aText == maCurName ) if ( aText == maCurName )
{ {
CheckItem( nItemId, sal_True ); CheckItem( nItemId, sal_True );
@@ -240,8 +240,8 @@ void FontSizeMenu::SetCurHeight( long nHeight )
{ {
mnCurHeight = nHeight; mnCurHeight = nHeight;
// check menue item // check menu item
XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False ); OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False );
sal_uInt16 nChecked = 0; sal_uInt16 nChecked = 0;
sal_uInt16 nItemCount = GetItemCount(); sal_uInt16 nItemCount = GetItemCount();
for( sal_uInt16 i = 0; i < nItemCount; i++ ) for( sal_uInt16 i = 0; i < nItemCount; i++ )

View File

@@ -940,9 +940,9 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
if(pTmpCurrencyEntry!=NULL) if(pTmpCurrencyEntry!=NULL)
{ {
pTmpCurrencyEntry->BuildSymbolString(rSymbol,false); rSymbol = pTmpCurrencyEntry->BuildSymbolString(false);
pTmpCurrencyEntry->BuildSymbolString(rBankSymbol,true); rBankSymbol = pTmpCurrencyEntry->BuildSymbolString(true);
pTmpCurrencyEntry->BuildSymbolString(rShortSymbol,bTmpBanking,true); rShortSymbol = pTmpCurrencyEntry->BuildSymbolString(bTmpBanking,true);
} }
SvNumberFormatTable::iterator it = pCurFmtTable->begin(); SvNumberFormatTable::iterator it = pCurFmtTable->begin();
@@ -1722,9 +1722,8 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyTableEntry( const String& rFmtStrin
for(sal_uInt16 i=0;i<nCount;i++) for(sal_uInt16 i=0;i<nCount;i++)
{ {
const NfCurrencyEntry* pTmpCurrencyEntry=&rCurrencyTable[i]; const NfCurrencyEntry* pTmpCurrencyEntry=&rCurrencyTable[i];
XubString _aSymbol, aBankSymbol; OUString _aSymbol = pTmpCurrencyEntry->BuildSymbolString(false);
pTmpCurrencyEntry->BuildSymbolString(_aSymbol,false); OUString aBankSymbol = pTmpCurrencyEntry->BuildSymbolString(true);
pTmpCurrencyEntry->BuildSymbolString(aBankSymbol,true);
if(rFmtString.Search(_aSymbol)!=STRING_NOTFOUND) if(rFmtString.Search(_aSymbol)!=STRING_NOTFOUND)
{ {