[PATCH] Replace [Uni|Xub]String with OUString in vcl, svtools, toolkit
Christina Roßmanith (via_Code_Review)
gerrit at gerrit.libreoffice.org
Sun Jan 13 12:27:52 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1667
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/67/1667/1
Replace [Uni|Xub]String with OUString in vcl,svtools,toolkit
Change-Id: I9e6cd6cd6726a1377b46fea773fe5c16aa26ba70
---
M svtools/inc/svtools/editsyntaxhighlighter.hxx
M svtools/inc/svtools/filectrl.hxx
M svtools/inc/svtools/fmtfield.hxx
M svtools/source/brwbox/ebbcontrols.cxx
M svtools/source/contnr/DocumentInfoPreview.cxx
M svtools/source/control/filectrl.cxx
M svtools/source/control/fmtfield.cxx
M svtools/source/control/inettbc.cxx
M svtools/source/control/tabbar.cxx
M svtools/source/dialogs/addresstemplate.cxx
M svtools/source/dialogs/wizardmachine.cxx
M svtools/source/edit/editsyntaxhighlighter.cxx
M svtools/source/uno/unoiface.cxx
M toolkit/source/awt/vclxwindows.cxx
M vcl/inc/vcl/button.hxx
M vcl/inc/vcl/combobox.hxx
M vcl/inc/vcl/ctrl.hxx
M vcl/inc/vcl/edit.hxx
M vcl/inc/vcl/fixedhyper.hxx
M vcl/inc/vcl/longcurr.hxx
M vcl/inc/vcl/menu.hxx
M vcl/inc/vcl/morebtn.hxx
M vcl/inc/vcl/status.hxx
M vcl/inc/vcl/svapp.hxx
M vcl/inc/vcl/texteng.hxx
M vcl/inc/vcl/toolbox.hxx
M vcl/inc/vcl/vclmedit.hxx
M vcl/inc/vcl/window.hxx
M vcl/source/control/button.cxx
M vcl/source/control/combobox.cxx
M vcl/source/control/ctrl.cxx
M vcl/source/control/edit.cxx
M vcl/source/control/fixedhyper.cxx
M vcl/source/control/morebtn.cxx
M vcl/source/edit/texteng.cxx
M vcl/source/edit/vclmedit.cxx
M vcl/source/window/status.cxx
M vcl/source/window/window.cxx
38 files changed, 97 insertions(+), 98 deletions(-)
diff --git a/svtools/inc/svtools/editsyntaxhighlighter.hxx b/svtools/inc/svtools/editsyntaxhighlighter.hxx
index 4648511..7f81ae6 100644
--- a/svtools/inc/svtools/editsyntaxhighlighter.hxx
+++ b/svtools/inc/svtools/editsyntaxhighlighter.hxx
@@ -44,8 +44,8 @@
~MultiLineEditSyntaxHighlight();
virtual void UpdateData();
- virtual void SetText(const String& rNewText);
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection )
+ virtual void SetText(const OUString& rNewText);
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection )
{ SetText( rStr ); SetSelection( rNewSelection ); }
Color GetColorValue(TokenTypes aToken);
diff --git a/svtools/inc/svtools/filectrl.hxx b/svtools/inc/svtools/filectrl.hxx
index d1b1eee..c7fdd42 100644
--- a/svtools/inc/svtools/filectrl.hxx
+++ b/svtools/inc/svtools/filectrl.hxx
@@ -75,8 +75,8 @@
void SetOpenDialog( sal_Bool bOpen ) { mbOpenDlg = bOpen; }
sal_Bool IsOpenDialog() const { return mbOpenDlg; }
- void SetText( const XubString& rStr );
- XubString GetText() const;
+ void SetText( const OUString& rStr );
+ OUString GetText() const;
rtl::OUString GetSelectedText() const { return maEdit.GetSelected(); }
void SetSelection( const Selection& rSelection ) { maEdit.SetSelection( rSelection ); }
diff --git a/svtools/inc/svtools/fmtfield.hxx b/svtools/inc/svtools/fmtfield.hxx
index 368f54a..b7cbc16 100644
--- a/svtools/inc/svtools/fmtfield.hxx
+++ b/svtools/inc/svtools/fmtfield.hxx
@@ -179,8 +179,8 @@
void TreatAsNumber(sal_Bool bDoSo) { m_bTreatAsNumber = bDoSo; }
public:
- virtual void SetText( const XubString& rStr );
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
+ virtual void SetText( const OUString& rStr );
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection );
// die folgenden Methoden sind interesant, wenn m_bTreatAsNumber auf sal_False sitzt
/** nehmen wir mal an, irgendjemand will das ganze schoene double-Handling gar nicht haben, sondern
@@ -244,7 +244,7 @@
// any aspect of the current format has changed
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
- void ImplSetTextImpl(const XubString& rNew, Selection* pNewSel);
+ void ImplSetTextImpl(const OUString& rNew, Selection* pNewSel);
void ImplSetValue(double dValue, sal_Bool bForce);
sal_Bool ImplGetValue(double& dNewVal);
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 718eb67..fa081b7 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -98,7 +98,7 @@
case KEY_RIGHT:
{
Selection aSel = rBox.GetSelection();
- return !aSel && aSel.Max() == rBox.GetText().Len();
+ return !aSel && aSel.Max() == rBox.GetText().getLength();
}
case KEY_HOME:
case KEY_LEFT:
@@ -129,7 +129,7 @@
//------------------------------------------------------------------
sal_Bool ComboBoxCellController::IsModified() const
{
- return GetComboBox().GetSavedValue() != GetComboBox().GetText();
+ return OUString(GetComboBox().GetSavedValue()) != GetComboBox().GetText();
}
//------------------------------------------------------------------
@@ -488,7 +488,7 @@
case KEY_RIGHT:
{
Selection aSel = GetSpinWindow().GetSelection();
- bResult = !aSel && aSel.Max() == GetSpinWindow().GetText().Len();
+ bResult = !aSel && aSel.Max() == GetSpinWindow().GetText().getLength();
} break;
case KEY_HOME:
case KEY_LEFT:
diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx
index aa7783b..2cf6ae1 100644
--- a/svtools/source/contnr/DocumentInfoPreview.cxx
+++ b/svtools/source/contnr/DocumentInfoPreview.cxx
@@ -126,10 +126,10 @@
void ODocumentInfoPreview::insertEntry(
rtl::OUString const & title, rtl::OUString const & value)
{
- if (m_pEditWin.GetText().Len() != 0) {
+ if (m_pEditWin.GetText().getLength() != 0) {
m_pEditWin.InsertText(rtl::OUString("\n\n"));
}
- rtl::OUString caption(title + rtl::OUString(":\n"));
+ rtl::OUString caption(title + ":\n");
m_pEditWin.InsertText(caption);
m_pEditWin.SetAttrib(
TextAttribFontWeight(WEIGHT_BOLD), m_pEditWin.GetParagraphCount() - 2,
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 0de2f57..1365975 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -79,7 +79,7 @@
// -----------------------------------------------------------------------
-void FileControl::SetText( const XubString& rStr )
+void FileControl::SetText( const OUString& rStr )
{
maEdit.SetText( rStr );
if ( mnFlags & FILECTRL_RESIZEBUTTONBYPATHLEN )
@@ -88,7 +88,7 @@
// -----------------------------------------------------------------------
-XubString FileControl::GetText() const
+OUString FileControl::GetText() const
{
return maEdit.GetText();
}
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 181bc71..b8b6774 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -368,7 +368,7 @@
}
//------------------------------------------------------------------------------
-void FormattedField::SetText(const XubString& rStr)
+void FormattedField::SetText(const OUString& rStr)
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -377,7 +377,7 @@
}
//------------------------------------------------------------------------------
-void FormattedField::SetText( const XubString& rStr, const Selection& rNewSelection )
+void FormattedField::SetText( const OUString& rStr, const Selection& rNewSelection )
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -397,7 +397,7 @@
m_sCurrentTextValue = rStr;
- String sFormatted;
+ OUString sFormatted;
double dNumber = 0.0;
// IsNumberFormat changes the format key parameter
sal_uInt32 nTempFormatKey = static_cast< sal_uInt32 >( m_nFormatKey );
@@ -419,8 +419,8 @@
Selection aSel(GetSelection());
Selection aNewSel(aSel);
aNewSel.Justify();
- sal_uInt16 nNewLen = sFormatted.Len();
- sal_uInt16 nCurrentLen = GetText().Len();
+ sal_Int32 nNewLen = sFormatted.getLength();
+ sal_Int32 nCurrentLen = GetText().getLength();
if ((nNewLen > nCurrentLen) && (aNewSel.Max() == nCurrentLen))
{ // the new text is longer and the cursor was behind the last char (of the old text)
if (aNewSel.Min() == 0)
@@ -514,7 +514,7 @@
}
//------------------------------------------------------------------------------
-void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
+void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel)
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -533,8 +533,8 @@
Selection aSel(GetSelection());
aSel.Justify();
- sal_uInt16 nNewLen = rNew.Len();
- sal_uInt16 nCurrentLen = GetText().Len();
+ sal_Int32 nNewLen = rNew.getLength();
+ sal_Int32 nCurrentLen = GetText().getLength();
if ((nNewLen > nCurrentLen) && (aSel.Max() == nCurrentLen))
{ // new new text is longer and the cursor is behind the last char
@@ -782,7 +782,7 @@
void FormattedField::Commit()
{
// remember the old text
- String sOld( GetText() );
+ OUString sOld( GetText() );
// do the reformat
ReFormat();
@@ -799,7 +799,7 @@
//------------------------------------------------------------------------------
void FormattedField::ReFormat()
{
- if (!IsEmptyFieldEnabled() || GetText().Len())
+ if (!IsEmptyFieldEnabled() || !GetText().isEmpty())
{
if (TreatingAsNumber())
{
@@ -856,7 +856,7 @@
if (rNEvt.GetType() == EVENT_LOSEFOCUS)
{
// Sonderbehandlung fuer leere Texte
- if (GetText().Len() == 0)
+ if (GetText().isEmpty())
{
if (!IsEmptyFieldEnabled())
{
@@ -925,7 +925,7 @@
return;
m_bEnableEmptyField = bEnable;
- if (!m_bEnableEmptyField && GetText().Len()==0)
+ if (!m_bEnableEmptyField && GetText().isEmpty())
ImplSetValue(m_dCurrentValue, sal_True);
}
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 6c0ce2a..3773605 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -907,7 +907,7 @@
}
KeyCode aCode( rKey.GetCode() );
- if ( aCode == KEY_RETURN && GetText().Len() )
+ if ( aCode == KEY_RETURN && !GetText().isEmpty() )
{
// wait for completion of matching thread
::osl::MutexGuard aGuard( theSvtMatchContextMutex::get() );
@@ -943,7 +943,7 @@
ClearModifyFlag();
return bHandled;
}
- else if ( aCode == KEY_RETURN && !GetText().Len() && GetOpenHdl().IsSet() )
+ else if ( aCode == KEY_RETURN && GetText().isEmpty() && GetOpenHdl().IsSet() )
{
// for file dialog
bAutoCompleteMode = sal_False;
@@ -1000,7 +1000,7 @@
Selection aSelection( GetSelection() );
sal_uInt16 nLen = (sal_uInt16)aSelection.Min();
GetSubEdit()->KeyInput( rEvent );
- SetSelection( Selection( nLen, GetText().Len() ) );
+ SetSelection( Selection( nLen, GetText().getLength() ) );
return sal_True;
}
@@ -1008,7 +1008,7 @@
{
// set the selection so a key stroke will overwrite
// the placeholder rather than edit it
- SetSelection( Selection( 0, GetText().Len() ) );
+ SetSelection( Selection( 0, GetText().getLength() ) );
}
}
@@ -1039,7 +1039,7 @@
}
else if ( EVENT_LOSEFOCUS == rEvt.GetType() )
{
- if( !GetText().Len() )
+ if( GetText().isEmpty() )
ClearModifyFlag();
if ( pCtx.is() )
{
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 4438779a..046cf5f 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -2356,7 +2356,7 @@
mpEdit->SetControlForeground( aForegroundColor );
mpEdit->SetControlBackground( aBackgroundColor );
mpEdit->GrabFocus();
- mpEdit->SetSelection( Selection( 0, mpEdit->GetText().Len() ) );
+ mpEdit->SetSelection( Selection( 0, mpEdit->GetText().getLength() ) );
mpEdit->Show();
return sal_True;
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 3d85f3e..b42d81b 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -1175,7 +1175,7 @@
// -------------------------------------------------------------------
IMPL_LINK(AddressBookSourceDialog, OnComboLoseFocus, ComboBox*, _pBox)
{
- if (_pBox->GetSavedValue() != _pBox->GetText())
+ if (OUString(_pBox->GetSavedValue()) != _pBox->GetText())
{
if (_pBox == &m_aDatasource)
resetTables();
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index 9ffc5f0..b6b90cd 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -227,14 +227,13 @@
//---------------------------------------------------------------------
void OWizardMachine::implUpdateTitle()
{
- String sCompleteTitle(m_pImpl->sTitleBase);
+ OUString sCompleteTitle(m_pImpl->sTitleBase);
// append the page title
TabPage* pCurrentPage = GetPage(getCurrentState());
- if ( pCurrentPage && pCurrentPage->GetText().Len() )
+ if ( pCurrentPage && !pCurrentPage->GetText().isEmpty() )
{
- sCompleteTitle += rtl::OUString(" - ");
- sCompleteTitle += pCurrentPage->GetText();
+ sCompleteTitle += rtl::OUString(" - ") + pCurrentPage->GetText();
}
SetText(sCompleteTitle);
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index 6485311..af68d05 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -42,7 +42,7 @@
{
}
-void MultiLineEditSyntaxHighlight::SetText(const String& rNewText)
+void MultiLineEditSyntaxHighlight::SetText(const OUString& rNewText)
{
MultiLineEdit::SetText(rNewText);
UpdateData();
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 91885b2..49edf88 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -1246,7 +1246,7 @@
}
else
{
- if (pField->GetText().Len()) // empty wird erst mal standardmaessig als void nach draussen gereicht
+ if (!pField->GetText().isEmpty()) // empty wird erst mal standardmaessig als void nach draussen gereicht
aReturn <<= pField->GetValue();
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 3c97f1d..1163e5d 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -461,7 +461,7 @@
{
Size aMinSz = pButton->CalcMinimumSize();
// no text, thus image
- if ( !pButton->GetText().Len() )
+ if ( pButton->GetText().isEmpty() )
{
if ( aSz.Width() < aMinSz.Width() )
aSz.Width() = aMinSz.Width();
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 46be285..a1bced9 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -71,7 +71,7 @@
void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
const Link& GetClickHdl() const { return maClickHdl; }
- static XubString GetStandardText( StandardButtonType eButton );
+ static OUString GetStandardText( StandardButtonType eButton );
static XubString GetStandardHelpText( StandardButtonType eButton );
sal_Bool SetModeImage( const Image& rImage );
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx
index 72478c5..23fc3c5 100644
--- a/vcl/inc/vcl/combobox.hxx
+++ b/vcl/inc/vcl/combobox.hxx
@@ -123,8 +123,8 @@
void EnableDDAutoWidth( sal_Bool b );
- void SetText( const XubString& rStr );
- void SetText( const XubString& rStr, const Selection& rNewSelection );
+ void SetText( const OUString& rStr );
+ void SetText( const OUString& rStr, const Selection& rNewSelection );
sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = COMBOBOX_APPEND );
sal_uInt16 InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos = COMBOBOX_APPEND );
diff --git a/vcl/inc/vcl/ctrl.hxx b/vcl/inc/vcl/ctrl.hxx
index 6820386..7879082 100644
--- a/vcl/inc/vcl/ctrl.hxx
+++ b/vcl/inc/vcl/ctrl.hxx
@@ -136,9 +136,9 @@
virtual void DataChanged( const DataChangedEvent& rDCEvt );
// invalidates layout data
- virtual void SetText( const String& rStr );
+ virtual void SetText( const OUString& rStr );
// gets the displayed text
- virtual String GetDisplayText() const;
+ virtual OUString GetDisplayText() const;
// returns the bounding box for the character at index nIndex (in control coordinates)
Rectangle GetCharacterBounds( long nIndex ) const;
// returns the character index for corresponding to rPoint (in control coordinates)
diff --git a/vcl/inc/vcl/edit.hxx b/vcl/inc/vcl/edit.hxx
index 3957f69..2ef6a72 100644
--- a/vcl/inc/vcl/edit.hxx
+++ b/vcl/inc/vcl/edit.hxx
@@ -206,9 +206,9 @@
virtual void Paste();
void Undo();
- virtual void SetText( const XubString& rStr );
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
- virtual XubString GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection );
+ virtual OUString GetText() const;
virtual void SetPlaceholderText( const OUString& rStr );
virtual OUString GetPlaceholderText() const;
diff --git a/vcl/inc/vcl/fixedhyper.hxx b/vcl/inc/vcl/fixedhyper.hxx
index 1d609f0..b43e4bd 100644
--- a/vcl/inc/vcl/fixedhyper.hxx
+++ b/vcl/inc/vcl/fixedhyper.hxx
@@ -119,7 +119,7 @@
OUString GetURL() const;
/** sets new text and recalculates the text length. */
- virtual void SetText(const String& rNewDescription);
+ virtual void SetText(const OUString& rNewDescription);
};
#endif
diff --git a/vcl/inc/vcl/longcurr.hxx b/vcl/inc/vcl/longcurr.hxx
index a0388d7..e80ed70 100644
--- a/vcl/inc/vcl/longcurr.hxx
+++ b/vcl/inc/vcl/longcurr.hxx
@@ -70,7 +70,7 @@
void SetValue( BigInt nNewValue );
void SetUserValue( BigInt nNewValue );
BigInt GetValue() const;
- sal_Bool IsEmptyValue() const { return !GetField()->GetText().Len(); }
+ sal_Bool IsEmptyValue() const { return GetField()->GetText().isEmpty(); }
BigInt GetCorrectedValue() const { return mnCorrectedValue; }
};
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 6d7b967..4716ef9 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -482,8 +482,8 @@
PopupMenu( const ResId& rResId );
~PopupMenu();
- void SetText( const XubString& rTitle ) { aTitleText = rTitle; }
- const XubString& GetText() const { return aTitleText; }
+ void SetText( const String& rTitle ) { aTitleText = rTitle; }
+ const String& GetText() const { return aTitleText; }
sal_uInt16 Execute( Window* pWindow, const Point& rPopupPos );
sal_uInt16 Execute( Window* pWindow, const Rectangle& rRect, sal_uInt16 nFlags = 0 );
diff --git a/vcl/inc/vcl/morebtn.hxx b/vcl/inc/vcl/morebtn.hxx
index bdfd99f..7172265 100644
--- a/vcl/inc/vcl/morebtn.hxx
+++ b/vcl/inc/vcl/morebtn.hxx
@@ -66,10 +66,10 @@
using PushButton::SetState;
void SetState( sal_Bool bNewState = sal_True );
- sal_Bool GetState() const { return mbState; }
+ sal_Bool GetState() const { return mbState; }
- void SetText( const XubString& rNewText );
- XubString GetText() const;
+ void SetText( const OUString& rNewText );
+ OUString GetText() const;
void SetMoreText( const XubString& rNewText );
void SetLessText( const XubString& rNewText );
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 512e0c5..70ea7d6 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -168,7 +168,7 @@
void EndProgressMode();
sal_Bool IsProgressMode() const { return mbProgressMode; }
- void SetText( const XubString& rText );
+ void SetText( const OUString& rText );
void SetHelpText( const XubString& rText )
{ Window::SetHelpText( rText ); }
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index 48b87d15..a0e4cf8 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -177,12 +177,12 @@
virtual void InitFinished();
virtual void DeInit();
- static sal_uInt16 GetCommandLineParamCount();
- static XubString GetCommandLineParam( sal_uInt16 nParam );
- static const XubString& GetAppFileName();
+ static sal_uInt16 GetCommandLineParamCount();
+ static OUString GetCommandLineParam( sal_uInt16 nParam );
+ static const OUString& GetAppFileName();
virtual sal_uInt16 Exception( sal_uInt16 nError );
- static void Abort( const XubString& rErrorText );
+ static void Abort( const OUString& rErrorText );
static void Execute();
static void Quit();
@@ -264,14 +264,14 @@
static Window* GetTopWindow( long nIndex );
static Window* GetActiveTopWindow();
- static void SetAppName( const String& rUniqueName );
- static String GetAppName();
+ static void SetAppName( const OUString& rUniqueName );
+ static OUString GetAppName();
static bool LoadBrandBitmap (const char* pName, BitmapEx &rBitmap);
static bool LoadBrandSVG( const char *pName, BitmapEx &rBitmap );
// default name of the application for message dialogs and printing
- static void SetDisplayName( const UniString& rDisplayName );
- static UniString GetDisplayName();
+ static void SetDisplayName( const OUString& rDisplayName );
+ static OUString GetDisplayName();
static unsigned int GetScreenCount();
@@ -346,8 +346,8 @@
static bool IsHeadlessModeRequested();
///< check command line arguments for --headless
- static void ShowNativeErrorBox(const String& sTitle ,
- const String& sMessage);
+ static void ShowNativeErrorBox(const OUString& sTitle ,
+ const OUString& sMessage);
// IME Status Window Control:
diff --git a/vcl/inc/vcl/texteng.hxx b/vcl/inc/vcl/texteng.hxx
index 414192f..f07119c 100644
--- a/vcl/inc/vcl/texteng.hxx
+++ b/vcl/inc/vcl/texteng.hxx
@@ -223,9 +223,9 @@
TextEngine();
~TextEngine();
- void SetText( const String& rStr );
- String GetText( LineEnd aSeparator = LINEEND_LF ) const;
- String GetText( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const;
+ void SetText( const OUString& rStr );
+ OUString GetText( LineEnd aSeparator = LINEEND_LF ) const;
+ OUString GetText( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const;
String GetTextLines( LineEnd aSeparator = LINEEND_LF ) const;
void ReplaceText(const TextSelection& rSel, const String& rText);
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 54ad3f6..b15af09 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -569,7 +569,7 @@
// accessibility helpers
// gets the displayed text
- String GetDisplayText() const;
+ OUString GetDisplayText() const;
// returns the bounding box for the character at index nIndex
// where nIndex is relative to the starting index of the item
// with id nItemId (in coordinates of the displaying window)
diff --git a/vcl/inc/vcl/vclmedit.hxx b/vcl/inc/vcl/vclmedit.hxx
index 1111350..748f761 100644
--- a/vcl/inc/vcl/vclmedit.hxx
+++ b/vcl/inc/vcl/vclmedit.hxx
@@ -93,11 +93,11 @@
virtual void Copy();
virtual void Paste();
- virtual void SetText( const XubString& rStr );
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection )
+ virtual void SetText( const OUString& rStr );
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection )
{ SetText( rStr ); SetSelection( rNewSelection ); }
- String GetText() const;
- String GetText( LineEnd aSeparator ) const;
+ OUString GetText() const;
+ OUString GetText( LineEnd aSeparator ) const;
String GetTextLines( LineEnd aSeparator ) const;
void SetRightToLeft( sal_Bool bRightToLeft );
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index f0ceb9a..fc498d6 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -916,12 +916,12 @@
sal_Bool IsZoom() const;
long CalcZoom( long n ) const;
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
// return the actual text displayed
// this may have e.g. accellerators removed or portions
// replaced by ellipsis
- virtual String GetDisplayText() const;
+ virtual OUString GetDisplayText() const;
// gets the visible background color. for transparent windows
// this may be the parent's background color; for controls
// this may be a child's background color (e.g. ListBox)
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 2fef91c..d2eb80c 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -112,7 +112,7 @@
// -----------------------------------------------------------------------
-XubString Button::GetStandardText( StandardButtonType eButton )
+OUString Button::GetStandardText( StandardButtonType eButton )
{
static struct
{
@@ -156,7 +156,7 @@
rtl::OString aT( aResIdAry[(sal_uInt16)eButton].pDefText );
aText = rtl::OStringToOUString(aT, RTL_TEXTENCODING_ASCII_US);
}
- return aText;
+ return OUString(aText);
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 8d6acc9..e1cb0a0 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -358,8 +358,8 @@
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- XubString aText = mpImplLB->GetEntryList()->GetEntryText( nPos );
- Selection aSelection( aText.Len(), aStartText.Len() );
+ OUString aText = mpImplLB->GetEntryList()->GetEntryText( nPos );
+ Selection aSelection( aText.getLength(), aStartText.Len() );
pEdit->SetText( aText, aSelection );
}
}
@@ -824,7 +824,7 @@
// -----------------------------------------------------------------------
-void ComboBox::SetText( const XubString& rStr )
+void ComboBox::SetText( const OUString& rStr )
{
ImplCallEventListeners( VCLEVENT_COMBOBOX_SETTEXT );
@@ -834,7 +834,7 @@
// -----------------------------------------------------------------------
-void ComboBox::SetText( const XubString& rStr, const Selection& rNewSelection )
+void ComboBox::SetText( const OUString& rStr, const Selection& rNewSelection )
{
ImplCallEventListeners( VCLEVENT_COMBOBOX_SETTEXT );
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 8e2dd41..76ac220 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -131,7 +131,7 @@
// -----------------------------------------------------------------------
-void Control::SetText( const String& rStr )
+void Control::SetText( const OUString& rStr )
{
ImplClearLayoutData();
Window::SetText( rStr );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 2a46c3a..c2f50ac 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2813,7 +2813,7 @@
// -----------------------------------------------------------------------
-void Edit::SetText( const XubString& rStr )
+void Edit::SetText( const OUString& rStr )
{
if ( mpSubEdit )
mpSubEdit->SetText( rStr ); // not directly ImplSetText if SetText overloaded
@@ -2826,7 +2826,7 @@
// -----------------------------------------------------------------------
-void Edit::SetText( const XubString& rStr, const Selection& rSelection )
+void Edit::SetText( const OUString& rStr, const Selection& rSelection )
{
if ( mpSubEdit )
mpSubEdit->SetText( rStr, rSelection );
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 9bfd0b8..78ad694 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -115,7 +115,7 @@
return m_sURL;
}
-void FixedHyperlink::SetText(const String& rNewDescription)
+void FixedHyperlink::SetText(const OUString& rNewDescription)
{
FixedText::SetText(rNewDescription);
m_nTextLen = GetCtrlTextWidth(GetText());
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 5373b9f5..337bdc6 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -206,7 +206,7 @@
// -----------------------------------------------------------------------
-void MoreButton::SetText( const XubString& rText )
+void MoreButton::SetText( const OUString& rText )
{
PushButton::SetText( rText );
}
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index cf7fcc7..274b106 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -259,7 +259,7 @@
ImpInsertText( rSel, rText );
}
-String TextEngine::GetText( LineEnd aSeparator ) const
+OUString TextEngine::GetText( LineEnd aSeparator ) const
{
return mpDoc->GetText( static_getLineEndText( aSeparator ) );
}
@@ -400,7 +400,7 @@
ImpParagraphInserted( 0 );
}
-String TextEngine::GetText( const TextSelection& rSel, LineEnd aSeparator ) const
+OUString TextEngine::GetText( const TextSelection& rSel, LineEnd aSeparator ) const
{
String aText;
@@ -445,7 +445,7 @@
ResetUndo();
}
-void TextEngine::SetText( const XubString& rText )
+void TextEngine::SetText( const OUString& rText )
{
ImpRemoveText();
@@ -457,7 +457,7 @@
TextSelection aEmptySel( aStartPaM, aStartPaM );
TextPaM aPaM = aStartPaM;
- if ( rText.Len() )
+ if ( !rText.isEmpty() )
aPaM = ImpInsertText( aEmptySel, rText );
for ( sal_uInt16 nView = 0; nView < mpViews->size(); nView++ )
@@ -467,11 +467,11 @@
// Wenn kein Text, dann auch Kein Format&Update
// => Der Text bleibt stehen.
- if ( !rText.Len() && GetUpdateMode() )
+ if ( rText.isEmpty() && GetUpdateMode() )
pView->Invalidate();
}
- if( !rText.Len() ) // sonst muss spaeter noch invalidiert werden, !bFormatted reicht.
+ if( rText.isEmpty() ) // sonst muss spaeter noch invalidiert werden, !bFormatted reicht.
mnCurTextHeight = 0;
FormatAndUpdate();
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index b467dd0..7e7c0fa 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -1161,7 +1161,7 @@
pImpVclMEdit->Paste();
}
-void VclMultiLineEdit::SetText( const String& rStr )
+void VclMultiLineEdit::SetText( const OUString& rStr )
{
pImpVclMEdit->SetText( rStr );
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index dbd9edd..fca0351 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1366,7 +1366,7 @@
// -----------------------------------------------------------------------
-void StatusBar::SetText( const XubString& rText )
+void StatusBar::SetText( const OUString& rText )
{
if ( (!mbVisibleItems || (GetStyle() & WB_RIGHT)) && !mbProgressMode &&
IsReallyVisible() && IsUpdateMode() )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 16a1549..379c339 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -7855,9 +7855,9 @@
// -----------------------------------------------------------------------
-void Window::SetText( const XubString& rStr )
+void Window::SetText( const OUString& rStr )
{
- if (rStr == mpWindowImpl->maText)
+ if (rStr == OUString(mpWindowImpl->maText))
return;
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
--
To view, visit https://gerrit.libreoffice.org/1667
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e6cd6cd6726a1377b46fea773fe5c16aa26ba70
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christina Roßmanith <ChrRossmanith at web.de>
More information about the LibreOffice
mailing list