summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-09-12 23:24:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-17 10:46:27 +0100
commitc20ba023c738c0c76a07c94cb43c0a6d06f12374 (patch)
treee35855ce7fd3c777a4b12fe6356dc9c46ec99ddb /svtools
parent44aa7df623e7cc113fd81f84e4a0d3de786f311f (diff)
XubString->OUString
Change-Id: Ic8b191dfb0d14e129dc804aeb4ac14c732e72e6b
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/fmtfield.hxx14
-rw-r--r--svtools/inc/svtools/stdmenu.hxx6
-rw-r--r--svtools/source/control/fmtfield.cxx26
-rw-r--r--svtools/source/control/stdmenu.cxx12
4 files changed, 28 insertions, 30 deletions
diff --git a/svtools/inc/svtools/fmtfield.hxx b/svtools/inc/svtools/fmtfield.hxx
index d4fd75a23797..2bef4f3f26aa 100644
--- a/svtools/inc/svtools/fmtfield.hxx
+++ b/svtools/inc/svtools/fmtfield.hxx
@@ -125,7 +125,7 @@ public:
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
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),
// also ist etwas Vorsicht angebracht ...
- void GetFormat(XubString& rFormatString, LanguageType& eLang) const;
- sal_Bool SetFormat(const XubString& rFormatString, LanguageType eLang);
+ OUString GetFormat(LanguageType& eLang) const;
+ sal_Bool SetFormat(const OUString& rFormatString, LanguageType eLang);
// sal_False, wenn der FormatString nicht gesetzt werden konnte (also wahrscheinlich ungueltig ist)
sal_Bool IsStrictFormat() const { return m_bStrictFormat; }
@@ -196,10 +196,10 @@ public:
einfach den Text formatiert ausgeben ...
(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;
- void SetDefaultText(const XubString& rDefault) { m_sDefaultText = rDefault; }
+ void SetDefaultText(const OUString& rDefault) { m_sDefaultText = rDefault; }
String GetDefaultText() const { return m_sDefaultText; }
// die bei der letzten Ausgabe-Operation vom Formatter gelieferte Farbe (Ausgabe-Operationen werden getriggert durch
@@ -248,7 +248,7 @@ protected:
virtual void Modify();
// 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
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
@@ -291,7 +291,7 @@ public:
virtual ~DoubleNumericField();
protected:
- virtual sal_Bool CheckText(const XubString& sText) const;
+ virtual sal_Bool CheckText(const OUString& sText) const;
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
void ResetConformanceTester();
diff --git a/svtools/inc/svtools/stdmenu.hxx b/svtools/inc/svtools/stdmenu.hxx
index 59d584c31879..3a936b057aad 100644
--- a/svtools/inc/svtools/stdmenu.hxx
+++ b/svtools/inc/svtools/stdmenu.hxx
@@ -113,7 +113,7 @@ FontList; FontNameMenu; FontSizeBox
class SVT_DLLPUBLIC FontNameMenu : public PopupMenu
{
private:
- XubString maCurName;
+ OUString maCurName;
Link maSelectHdl;
Link maHighlightHdl;
@@ -126,8 +126,8 @@ public:
void Fill( const FontList* pList );
- void SetCurName( const XubString& rName );
- const XubString& GetCurName() const { return maCurName; }
+ void SetCurName( const OUString& rName );
+ const OUString& GetCurName() const { return maCurName; }
void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
const Link& GetSelectHdl() const { return maSelectHdl; }
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index c59b1a57dcde..d4a4c5bfd649 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -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);
@@ -628,9 +628,8 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bReset
}
else
{
- XubString sOldFormat;
LanguageType aOldLang;
- GetFormat(sOldFormat, aOldLang);
+ OUString sOldFormat = GetFormat(aOldLang);
sal_uInt32 nDestKey = pFormatter->TestNewString(sOldFormat);
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);
const SvNumberformat* pFormatEntry = ImplGetFormatter()->GetEntry(m_nFormatKey);
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;
+
+ return sFormatString;
}
//------------------------------------------------------------------------------
-sal_Bool FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang)
+sal_Bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType eLang)
{
DBG_CHKTHIS(FormattedField, NULL);
sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang);
@@ -709,8 +710,7 @@ void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator)
// we need the language for the following
LanguageType eLang;
- String sFmtDescription;
- GetFormat(sFmtDescription, eLang);
+ String sFmtDescription = GetFormat(eLang);
// generate a new format ...
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
LanguageType eLang;
- String sFmtDescription;
- GetFormat(sFmtDescription, eLang);
+ String sFmtDescription = GetFormat(eLang);
// generate a new format ...
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);
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
// 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()
{
// the old settings
- XubString sOldFormat;
LanguageType eLanguage;
- GetFormat(sOldFormat, eLanguage);
+ GetFormat(eLanguage);
sal_Bool bThSep = GetThousandsSep();
sal_uInt16 nDigits = GetDecimalDigits();
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index 8bfe4b4135ae..51af872507f1 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -58,7 +58,7 @@ void FontNameMenu::Select()
void FontNameMenu::Highlight()
{
- XubString aTempName = maCurName;
+ OUString aTempName = maCurName;
maCurName = GetItemText( GetCurItemId() );
maHighlightHdl.Call( this );
maCurName = aTempName;
@@ -84,7 +84,7 @@ void FontNameMenu::Fill( const FontList* pList )
sal_uInt16 j = GetItemCount();
while ( j )
{
- XubString aText = GetItemText( GetItemId( j-1 ) );
+ OUString aText = GetItemText( GetItemId( j-1 ) );
if ( rI18nHelper.CompareString( rName, aText ) > 0 )
break;
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;
@@ -111,7 +111,7 @@ void FontNameMenu::SetCurName( const XubString& rName )
if ( IsItemChecked( nItemId ) )
nChecked = nItemId;
- XubString aText = GetItemText( nItemId );
+ OUString aText = GetItemText( nItemId );
if ( aText == maCurName )
{
CheckItem( nItemId, sal_True );
@@ -240,8 +240,8 @@ void FontSizeMenu::SetCurHeight( long nHeight )
{
mnCurHeight = nHeight;
- // check menue item
- XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False );
+ // check menu item
+ OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False );
sal_uInt16 nChecked = 0;
sal_uInt16 nItemCount = GetItemCount();
for( sal_uInt16 i = 0; i < nItemCount; i++ )