summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-01-21 14:32:09 +0100
committerMichael Stahl <mstahl@redhat.com>2013-01-21 20:48:35 +0000
commite3f11c10d8cc759d01afa4b8fd8bd98c81a03119 (patch)
tree36191c6d90da559009161a1199d1176cf6a2bbba /vcl
parent87f9d7da00857c649784a7d9eca046bf6e71ae3c (diff)
Changed SetText() / GetText() to take/return OUString
replaced lots of Len() with isEmpty() Change-Id: I6b82d48245ee2a0782e05a326f7934e9357227d0 Reviewed-on: https://gerrit.libreoffice.org/1795 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/helpwin.hxx2
-rw-r--r--vcl/inc/vcl/combobox.hxx4
-rw-r--r--vcl/inc/vcl/ctrl.hxx4
-rw-r--r--vcl/inc/vcl/edit.hxx6
-rw-r--r--vcl/inc/vcl/fixedhyper.hxx2
-rw-r--r--vcl/inc/vcl/longcurr.hxx2
-rw-r--r--vcl/inc/vcl/menu.hxx6
-rw-r--r--vcl/inc/vcl/morebtn.hxx6
-rw-r--r--vcl/inc/vcl/status.hxx2
-rw-r--r--vcl/inc/vcl/texteng.hxx2
-rw-r--r--vcl/inc/vcl/toolbox.hxx2
-rw-r--r--vcl/inc/vcl/vclmedit.hxx8
-rw-r--r--vcl/inc/vcl/window.hxx6
-rw-r--r--vcl/source/app/help.cxx2
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/control/combobox.cxx6
-rw-r--r--vcl/source/control/ctrl.cxx6
-rw-r--r--vcl/source/control/edit.cxx8
-rw-r--r--vcl/source/control/field.cxx20
-rw-r--r--vcl/source/control/field2.cxx28
-rw-r--r--vcl/source/control/fixedhyper.cxx2
-rw-r--r--vcl/source/control/longcurr.cxx2
-rw-r--r--vcl/source/control/morebtn.cxx4
-rw-r--r--vcl/source/edit/texteng.cxx8
-rw-r--r--vcl/source/edit/vclmedit.cxx14
-rw-r--r--vcl/source/window/floatwin.cxx2
-rw-r--r--vcl/source/window/msgbox.cxx8
-rw-r--r--vcl/source/window/status.cxx2
-rw-r--r--vcl/source/window/toolbox2.cxx4
-rw-r--r--vcl/source/window/window.cxx8
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx4
31 files changed, 95 insertions, 95 deletions
diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx
index 63f91dde34ee..6923c2bedc95 100644
--- a/vcl/inc/helpwin.hxx
+++ b/vcl/inc/helpwin.hxx
@@ -48,7 +48,7 @@ protected:
DECL_LINK( TimerHdl, Timer* );
virtual void Paint( const Rectangle& );
virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual String GetText() const;
+ virtual OUString GetText() const;
void ImplShow();
public:
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx
index d0364105afb6..499479778160 100644
--- a/vcl/inc/vcl/combobox.hxx
+++ b/vcl/inc/vcl/combobox.hxx
@@ -123,8 +123,8 @@ public:
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 bd178f05657c..03ddcdce8b4d 100644
--- a/vcl/inc/vcl/ctrl.hxx
+++ b/vcl/inc/vcl/ctrl.hxx
@@ -136,9 +136,9 @@ public:
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 10d3fe44a160..73b35850faa1 100644
--- a/vcl/inc/vcl/edit.hxx
+++ b/vcl/inc/vcl/edit.hxx
@@ -206,9 +206,9 @@ public:
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 1d609f006641..b43e4bd7fd6e 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 a0388d72b8b6..e80ed7019f74 100644
--- a/vcl/inc/vcl/longcurr.hxx
+++ b/vcl/inc/vcl/longcurr.hxx
@@ -70,7 +70,7 @@ public:
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 6d7b967b85b3..4f4b2581c641 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -137,7 +137,7 @@ private:
VclEventListeners maEventListeners;
VclEventListeners maChildEventListeners;
- XubString aTitleText; // PopupMenu text
+ OUString aTitleText; // PopupMenu text
sal_uLong nEventId;
sal_uInt16 mnHighlightedItemPos; // for native menus: keeps track of the highlighted item
@@ -482,8 +482,8 @@ public:
PopupMenu( const ResId& rResId );
~PopupMenu();
- void SetText( const XubString& rTitle ) { aTitleText = rTitle; }
- const XubString& GetText() const { return aTitleText; }
+ void SetText( const OUString& rTitle ) { aTitleText = rTitle; }
+ const OUString& 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 bdfd99f28540..71722650651c 100644
--- a/vcl/inc/vcl/morebtn.hxx
+++ b/vcl/inc/vcl/morebtn.hxx
@@ -66,10 +66,10 @@ public:
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 512e0c54f107..70ea7d65a62a 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -168,7 +168,7 @@ public:
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/texteng.hxx b/vcl/inc/vcl/texteng.hxx
index 414192fed956..e5f45822a33c 100644
--- a/vcl/inc/vcl/texteng.hxx
+++ b/vcl/inc/vcl/texteng.hxx
@@ -223,7 +223,7 @@ public:
TextEngine();
~TextEngine();
- void SetText( const String& rStr );
+ void SetText( const OUString& rStr );
String GetText( LineEnd aSeparator = LINEEND_LF ) const;
String GetText( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const;
String GetTextLines( LineEnd aSeparator = LINEEND_LF ) const;
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 54ad3f6670b8..b15af093c3d4 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -569,7 +569,7 @@ public:
// 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 111135065115..748f761550ea 100644
--- a/vcl/inc/vcl/vclmedit.hxx
+++ b/vcl/inc/vcl/vclmedit.hxx
@@ -93,11 +93,11 @@ public:
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 8b902aaaf311..bdb588583c0c 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -908,12 +908,12 @@ public:
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/app/help.cxx b/vcl/source/app/help.cxx
index f9241dd128c9..b172eb46f699 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -530,7 +530,7 @@ void HelpTextWindow::RequestHelp( const HelpEvent& /*rHEvt*/ )
// -----------------------------------------------------------------------
-XubString HelpTextWindow::GetText() const
+OUString HelpTextWindow::GetText() const
{
return maHelpText;
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index d99c6cc64129..6f0ad62f5e78 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -977,7 +977,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
break;
}
- sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
+ sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && GetText().isEmpty() );
if( bDropDown && (aCtrlType == CTRL_COMBOBOX || aCtrlType == CTRL_LISTBOX ) )
{
@@ -1557,7 +1557,7 @@ long PushButton::PreNotify( NotifyEvent& rNEvt )
break;
}
- sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
+ sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && GetText().isEmpty() );
if( bDropDown && GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) &&
!GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN) )
@@ -1689,7 +1689,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
}
else if ( IsImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) )
aSize = GetModeImage().GetSizePixel();
- if ( PushButton::GetText().Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
sal_uLong nDrawFlags = 0;
Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
@@ -3631,7 +3631,7 @@ void CheckBox::Resize()
void CheckBox::GetFocus()
{
- if ( !GetText().Len() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ if ( GetText().isEmpty() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
// increase button size to have space for focus rect
// checkboxes without text will draw focusrect around the check
@@ -3664,7 +3664,7 @@ void CheckBox::LoseFocus()
HideFocus();
Button::LoseFocus();
- if ( !GetText().Len() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ if ( GetText().isEmpty() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
// decrease button size again (see GetFocus())
// checkboxes without text will draw focusrect around the check
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 75f4e307e5e4..673001d46de9 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -606,7 +606,7 @@ void ComboBox::Resize()
{
mpSubEdit->SetSizePixel( Size( aOutSz.Width(), mnDDHeight ) );
mpImplLB->setPosSizePixel( 0, mnDDHeight, aOutSz.Width(), aOutSz.Height() - mnDDHeight );
- if ( GetText().Len() )
+ if ( !GetText().isEmpty() )
ImplUpdateFloatSelection();
}
@@ -824,7 +824,7 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
// -----------------------------------------------------------------------
-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 )
// -----------------------------------------------------------------------
-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 4da8279add86..845aba829795 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -131,7 +131,7 @@ bool Control::HasLayoutData() const
// -----------------------------------------------------------------------
-void Control::SetText( const String& rStr )
+void Control::SetText( const OUString& rStr )
{
ImplClearLayoutData();
Window::SetText( rStr );
@@ -271,11 +271,11 @@ long Control::ToRelativeLineIndex( long nIndex ) const
// -----------------------------------------------------------------------
-String Control::GetDisplayText() const
+OUString Control::GetDisplayText() const
{
if( !HasLayoutData() )
FillLayoutData();
- return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->m_aDisplayText : GetText();
+ return mpControlData->mpLayoutData ? OUString(mpControlData->mpLayoutData->m_aDisplayText) : GetText();
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 3e177d09a184..14765a54bb00 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2813,7 +2813,7 @@ void Edit::Undo()
// -----------------------------------------------------------------------
-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 )
// -----------------------------------------------------------------------
-void Edit::SetText( const XubString& rStr, const Selection& rSelection )
+void Edit::SetText( const OUString& rStr, const Selection& rSelection )
{
if ( mpSubEdit )
mpSubEdit->SetText( rStr, rSelection );
@@ -2836,7 +2836,7 @@ void Edit::SetText( const XubString& rStr, const Selection& rSelection )
// -----------------------------------------------------------------------
-XubString Edit::GetText() const
+OUString Edit::GetText() const
{
if ( mpSubEdit )
return mpSubEdit->GetText();
@@ -2853,7 +2853,7 @@ void Edit::SetPlaceholderText( const OUString& rStr )
else if ( maPlaceholderText != rStr )
{
maPlaceholderText = rStr;
- if ( GetText().Len() == 0 )
+ if ( GetText().isEmpty() )
Invalidate();
}
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 8d0a3403a5e9..387acea494a9 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -425,7 +425,7 @@ void FormatterBase::SetEmptyFieldValue()
sal_Bool FormatterBase::IsEmptyFieldValue() const
{
- return (!mpField || !mpField->GetText().Len());
+ return (!mpField || mpField->GetText().isEmpty());
}
// -----------------------------------------------------------------------
@@ -688,7 +688,7 @@ void NumericFormatter::Reformat()
if ( !GetField() )
return;
- if ( !GetField()->GetText().Len() && ImplGetEmptyFieldValue() )
+ if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
XubString aStr;
@@ -756,9 +756,9 @@ void NumericFormatter::ImplNewFieldValue( sal_Int64 nNewValue )
Selection aSelection = GetField()->GetSelection();
aSelection.Justify();
- XubString aText = GetField()->GetText();
+ OUString aText = GetField()->GetText();
// leave it as is if selected until end
- if ( (xub_StrLen)aSelection.Max() == aText.Len() )
+ if ( (sal_Int32)aSelection.Max() == aText.getLength() )
{
if ( !aSelection.Len() )
aSelection.Min() = SELECTION_MAX;
@@ -858,7 +858,7 @@ long NumericField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -1016,7 +1016,7 @@ long NumericBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -1833,7 +1833,7 @@ long MetricField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -1959,7 +1959,7 @@ long MetricBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -2245,7 +2245,7 @@ long CurrencyField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -2347,7 +2347,7 @@ long CurrencyBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 4193b1416d2a..c56a42a62ba6 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -889,7 +889,7 @@ long PatternField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -949,7 +949,7 @@ long PatternBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -1744,10 +1744,10 @@ void DateFormatter::ImplNewFieldValue( const Date& rDate )
{
Selection aSelection = GetField()->GetSelection();
aSelection.Justify();
- XubString aText = GetField()->GetText();
+ OUString aText = GetField()->GetText();
// If selected until the end then keep it that way
- if ( (xub_StrLen)aSelection.Max() == aText.Len() )
+ if ( (sal_Int32)aSelection.Max() == aText.getLength() )
{
if ( !aSelection.Len() )
aSelection.Min() = SELECTION_MAX;
@@ -1817,7 +1817,7 @@ sal_Bool DateFormatter::IsEmptyDate() const
if ( GetField() && MustBeReformatted() && IsEmptyFieldValueEnabled() )
{
- if ( !GetField()->GetText().Len() )
+ if ( GetField()->GetText().isEmpty() )
{
bEmpty = sal_True;
}
@@ -1837,7 +1837,7 @@ void DateFormatter::Reformat()
if ( !GetField() )
return;
- if ( !GetField()->GetText().Len() && ImplGetEmptyFieldValue() )
+ if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
XubString aStr;
@@ -1979,7 +1979,7 @@ long DateField::Notify( NotifyEvent& rNEvt )
// !!! We should find out why dates are treated differently than other fields (see
// also bug: 52384)
- sal_Bool bTextLen = GetText().Len() != 0;
+ sal_Bool bTextLen = !GetText().isEmpty();
if ( bTextLen || !IsEmptyFieldValueEnabled() )
{
if ( !ImplAllowMalformedInput() )
@@ -2113,7 +2113,7 @@ long DateBox::Notify( NotifyEvent& rNEvt )
{
if ( MustBeReformatted() )
{
- sal_Bool bTextLen = GetText().Len() != 0;
+ sal_Bool bTextLen = !GetText().isEmpty();
if ( bTextLen || !IsEmptyFieldValueEnabled() )
Reformat();
else if ( !bTextLen && IsEmptyFieldValueEnabled() )
@@ -2706,10 +2706,10 @@ void TimeFormatter::ImplNewFieldValue( const Time& rTime )
{
Selection aSelection = GetField()->GetSelection();
aSelection.Justify();
- XubString aText = GetField()->GetText();
+ OUString aText = GetField()->GetText();
// If selected until the end then keep it that way
- if ( (xub_StrLen)aSelection.Max() == aText.Len() )
+ if ( (sal_Int32)aSelection.Max() == aText.getLength() )
{
if ( !aSelection.Len() )
aSelection.Min() = SELECTION_MAX;
@@ -2829,7 +2829,7 @@ void TimeFormatter::Reformat()
if ( !GetField() )
return;
- if ( !GetField()->GetText().Len() && ImplGetEmptyFieldValue() )
+ if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
XubString aStr;
@@ -2930,7 +2930,7 @@ long TimeField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
{
if ( !ImplAllowMalformedInput() )
Reformat();
@@ -3051,7 +3051,7 @@ void TimeField::SetExtFormat( ExtTimeFieldFormat eFormat )
default: OSL_FAIL( "ExtTimeFieldFormat unknown!" );
}
- if ( GetField() && GetField()->GetText().Len() )
+ if ( GetField() && !GetField()->GetText().isEmpty() )
SetUserTime( GetTime() );
ReformatAll();
}
@@ -3093,7 +3093,7 @@ long TimeBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 9bfd0b880b70..78ad694d2c10 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -115,7 +115,7 @@ OUString FixedHyperlink::GetURL() const
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/longcurr.cxx b/vcl/source/control/longcurr.cxx
index e9a8330217a9..d84b404bec59 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -413,7 +413,7 @@ void LongCurrencyFormatter::Reformat()
if ( !GetField() )
return;
- if ( !GetField()->GetText().Len() && ImplGetEmptyFieldValue() )
+ if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
XubString aStr;
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 6109045f3426..337bdc6d7519 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -206,14 +206,14 @@ void MoreButton::AddWindow( Window* pWindow )
// -----------------------------------------------------------------------
-void MoreButton::SetText( const XubString& rText )
+void MoreButton::SetText( const OUString& rText )
{
PushButton::SetText( rText );
}
// -----------------------------------------------------------------------
-XubString MoreButton::GetText() const
+OUString MoreButton::GetText() const
{
return PushButton::GetText();
}
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index cf7fcc785955..2bd7234ab926 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -445,7 +445,7 @@ void TextEngine::ImpRemoveText()
ResetUndo();
}
-void TextEngine::SetText( const XubString& rText )
+void TextEngine::SetText( const OUString& rText )
{
ImpRemoveText();
@@ -457,7 +457,7 @@ void TextEngine::SetText( const XubString& rText )
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 @@ void TextEngine::SetText( const XubString& rText )
// 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 23109d612ada..7bcde9360b2b 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -128,8 +128,8 @@ public:
void Copy();
void Paste();
- void SetText( const String& rStr );
- String GetText() const;
+ void SetText( const OUString& rStr );
+ OUString GetText() const;
String GetText( LineEnd aSeparator ) const;
String GetTextLines( LineEnd aSeparator ) const;
@@ -491,7 +491,7 @@ void ImpVclMEdit::Paste()
mpTextWindow->GetTextView()->Paste();
}
-void ImpVclMEdit::SetText( const String& rStr )
+void ImpVclMEdit::SetText( const OUString& rStr )
{
sal_Bool bWasModified = mpTextWindow->GetTextEngine()->IsModified();
mpTextWindow->GetTextEngine()->SetText( rStr );
@@ -505,7 +505,7 @@ void ImpVclMEdit::SetText( const String& rStr )
ImpUpdateSrollBarVis( nWinStyle );
}
-String ImpVclMEdit::GetText() const
+OUString ImpVclMEdit::GetText() const
{
return mpTextWindow->GetTextEngine()->GetText();
}
@@ -1161,17 +1161,17 @@ void VclMultiLineEdit::Paste()
pImpVclMEdit->Paste();
}
-void VclMultiLineEdit::SetText( const String& rStr )
+void VclMultiLineEdit::SetText( const OUString& rStr )
{
pImpVclMEdit->SetText( rStr );
}
-String VclMultiLineEdit::GetText() const
+OUString VclMultiLineEdit::GetText() const
{
return pImpVclMEdit->GetText();
}
-String VclMultiLineEdit::GetText( LineEnd aSeparator ) const
+OUString VclMultiLineEdit::GetText( LineEnd aSeparator ) const
{
return pImpVclMEdit->GetText( aSeparator );
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 4ca8573707a1..92ce3175b682 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -656,7 +656,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags )
// remove title
mnOldTitle = mnTitle;
- if ( ( mpWindowImpl->mnStyle & WB_POPUP ) && GetText().Len() )
+ if ( ( mpWindowImpl->mnStyle & WB_POPUP ) && !GetText().isEmpty() )
SetTitleType( FLOATWIN_TITLE_POPUP );
else if ( nFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF )
SetTitleType( FLOATWIN_TITLE_TEAROFF );
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 6aca66e50320..c7d0e3680c09 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -437,7 +437,7 @@ Size MessBox::GetOptimalSize() const
void InfoBox::ImplInitInfoBoxData()
{
// Default Text is the display title from the application
- if ( !GetText().Len() )
+ if ( GetText().isEmpty() )
SetText( Application::GetDisplayName() );
SetImage( InfoBox::GetStandardImage() );
@@ -472,7 +472,7 @@ Image InfoBox::GetStandardImage()
void WarningBox::ImplInitWarningBoxData()
{
// Default Text is the display title from the application
- if ( !GetText().Len() )
+ if ( GetText().isEmpty() )
SetText( Application::GetDisplayName() );
SetImage( WarningBox::GetStandardImage() );
@@ -517,7 +517,7 @@ Image WarningBox::GetStandardImage()
void ErrorBox::ImplInitErrorBoxData()
{
// Default Text is the display title from the application
- if ( !GetText().Len() )
+ if ( GetText().isEmpty() )
SetText( Application::GetDisplayName() );
SetImage( ErrorBox::GetStandardImage() );
@@ -562,7 +562,7 @@ Image ErrorBox::GetStandardImage()
void QueryBox::ImplInitQueryBoxData()
{
// Default Text is the display title from the application
- if ( !GetText().Len() )
+ if ( GetText().isEmpty() )
SetText( Application::GetDisplayName() );
SetImage( QueryBox::GetStandardImage() );
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index dbd9edda3f0c..fca03519c4ff 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1366,7 +1366,7 @@ void StatusBar::EndProgressMode()
// -----------------------------------------------------------------------
-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/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 19399da16f22..081f524d0d34 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1820,11 +1820,11 @@ void ToolBox::ImplFillLayoutData() const
// -----------------------------------------------------------------------
-String ToolBox::GetDisplayText() const
+OUString ToolBox::GetDisplayText() const
{
if( ! mpData->m_pLayoutData )
ImplFillLayoutData();
- return mpData->m_pLayoutData ? mpData->m_pLayoutData->m_aDisplayText : String();
+ return mpData->m_pLayoutData ? OUString(mpData->m_pLayoutData->m_aDisplayText) : OUString();
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index ac33c4565c60..90db221142ec 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -7833,9 +7833,9 @@ void Window::SetCursor( Cursor* pCursor )
// -----------------------------------------------------------------------
-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 );
@@ -7866,7 +7866,7 @@ void Window::SetText( const XubString& rStr )
// -----------------------------------------------------------------------
-String Window::GetText() const
+OUString Window::GetText() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7875,7 +7875,7 @@ String Window::GetText() const
// -----------------------------------------------------------------------
-String Window::GetDisplayText() const
+OUString Window::GetDisplayText() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index d932c5d7d22c..53fa8c270ef2 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -281,7 +281,7 @@ IMPL_LINK_NOARG(XIMStatusWindow, DelayedShowHdl)
void XIMStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason )
{
- if( bShow && ! m_aStatusText.GetText().Len() )
+ if( bShow && m_aStatusText.GetText().isEmpty() )
bShow = false;
m_bDelayedShow = bShow;
@@ -342,7 +342,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
m_bShow( true ),
m_bOn( bOn )
{
- SetText( String( RTL_CONSTASCII_USTRINGPARAM( "IME Status" ) ) );
+ SetText( OUString( "IME Status" ) );
layout();