summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-02-06 16:19:18 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-02-06 17:12:24 +0000
commit82e3760855fdb3f549b21fa6d37eb75a2adf31b4 (patch)
tree93251a4bafb7198e1edbb4bab1ff46c2a8108b83 /vcl
parent35df0bd6e3674ea861d06da54f5c016f10cedb18 (diff)
replace (Xub)String with OUString in vcl
Change-Id: I0a44bab196ae239d3bdea75fd2b657bdfa4ecf31 Reviewed-on: https://gerrit.libreoffice.org/2011 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/svdata.hxx2
-rw-r--r--vcl/inc/textlayout.hxx6
-rw-r--r--vcl/inc/vcl/button.hxx2
-rw-r--r--vcl/inc/vcl/controllayout.hxx2
-rw-r--r--vcl/inc/vcl/ctrl.hxx4
-rw-r--r--vcl/inc/vcl/field.hxx28
-rw-r--r--vcl/inc/vcl/outdev.hxx8
-rw-r--r--vcl/source/control/button.cxx38
-rw-r--r--vcl/source/control/ctrl.cxx20
-rw-r--r--vcl/source/control/edit.cxx4
-rw-r--r--vcl/source/control/field.cxx111
-rw-r--r--vcl/source/control/field2.cxx26
-rw-r--r--vcl/source/control/fixed.cxx4
-rw-r--r--vcl/source/control/group.cxx2
-rw-r--r--vcl/source/control/ilstbox.cxx6
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/gdi/outdev3.cxx14
-rw-r--r--vcl/source/gdi/textlayout.cxx14
-rw-r--r--vcl/source/window/menu.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx6
20 files changed, 150 insertions, 153 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index bca3ea7e84c7..b4b59b57bd2a 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -223,7 +223,7 @@ struct ImplSVWinData
// - ImplSVCtrlData -
// ------------------
-typedef std::vector< std::pair< String, FieldUnit > > FieldUnitStringList;
+typedef std::vector< std::pair< OUString, FieldUnit > > FieldUnitStringList;
struct ImplSVCtrlData
{
diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx
index d20ea5f51185..5e95eabd5619 100644
--- a/vcl/inc/textlayout.hxx
+++ b/vcl/inc/textlayout.hxx
@@ -42,7 +42,7 @@ namespace vcl
public:
virtual long GetTextWidth( const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0;
virtual void DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength,
- MetricVector* _pVector, String* _pDisplayText ) = 0;
+ MetricVector* _pVector, OUString* _pDisplayText ) = 0;
virtual bool GetCaretPositions( const XubString& _rText, sal_Int32* _pCaretXArray, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0;
virtual xub_StrLen GetTextBreak( const XubString& _rText, long _nMaxTextWidth, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0;
virtual bool DecomposeTextRectAction() const = 0;
@@ -78,7 +78,7 @@ namespace vcl
xub_StrLen _nStartIndex,
xub_StrLen _nLength,
MetricVector* _pVector,
- String* _pDisplayText
+ OUString* _pDisplayText
);
virtual bool GetCaretPositions(
const XubString& _rText,
@@ -113,7 +113,7 @@ namespace vcl
Rectangle DrawText( const Rectangle& _rRect,
const XubString& _rText, sal_uInt16 _nStyle = 0,
- MetricVector* _pVector = NULL, String* _pDisplayText = NULL );
+ MetricVector* _pVector = NULL, OUString* _pDisplayText = NULL );
private:
ControlTextRenderer(); // never implemented
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 03ba3d6c128b..349f9cc67cbb 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -49,7 +49,7 @@ private:
public:
SAL_DLLPRIVATE sal_uInt16 ImplGetButtonState() const;
SAL_DLLPRIVATE sal_uInt16& ImplGetButtonState();
- SAL_DLLPRIVATE sal_uInt16 ImplGetTextStyle( XubString& rText, WinBits nWinStyle, sal_uLong nDrawFlags );
+ SAL_DLLPRIVATE sal_uInt16 ImplGetTextStyle( OUString& rText, WinBits nWinStyle, sal_uLong nDrawFlags );
SAL_DLLPRIVATE void ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, Size& rSize,
sal_Bool bLayout, sal_uLong nImageSep, sal_uLong nDrawFlags,
sal_uInt16 nTextStyle, Rectangle *pSymbolRect=NULL, bool bAddImageSep = false );
diff --git a/vcl/inc/vcl/controllayout.hxx b/vcl/inc/vcl/controllayout.hxx
index 796120880751..5d1d13355718 100644
--- a/vcl/inc/vcl/controllayout.hxx
+++ b/vcl/inc/vcl/controllayout.hxx
@@ -35,7 +35,7 @@ struct VCL_DLLPUBLIC ControlLayoutData
// contains the string really displayed
// there must be exactly one bounding rectangle in m_aUnicodeBoundRects
// for every character in m_aDisplayText
- String m_aDisplayText;
+ OUString m_aDisplayText;
// the bounding rectangle of every character
// where one character may consist of many glyphs
std::vector< Rectangle > m_aUnicodeBoundRects;
diff --git a/vcl/inc/vcl/ctrl.hxx b/vcl/inc/vcl/ctrl.hxx
index 03ddcdce8b4d..390f416ae142 100644
--- a/vcl/inc/vcl/ctrl.hxx
+++ b/vcl/inc/vcl/ctrl.hxx
@@ -91,8 +91,8 @@ protected:
directly at the target device, or taking the reference device into account) when returning.
*/
void DrawControlText( OutputDevice& _rTargetDevice, Rectangle& _io_rRect,
- const XubString& _rStr, sal_uInt16 _nStyle,
- MetricVector* _pVector, String* _pDisplayText ) const;
+ const OUString& _rStr, sal_uInt16 _nStyle,
+ MetricVector* _pVector, OUString* _pDisplayText ) const;
virtual const Font&
GetCanonicalFont( const StyleSettings& _rStyle ) const;
diff --git a/vcl/inc/vcl/field.hxx b/vcl/inc/vcl/field.hxx
index c37b3067459e..0f47d5f6696f 100644
--- a/vcl/inc/vcl/field.hxx
+++ b/vcl/inc/vcl/field.hxx
@@ -170,7 +170,7 @@ protected:
void FieldLast();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE sal_Bool ImplNumericReformat( const XubString& rStr, double& rValue, XubString& rOutStr );
+ SAL_DLLPRIVATE sal_Bool ImplNumericReformat( const OUString& rStr, double& rValue, OUString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( sal_Int64 nNewValue );
SAL_DLLPRIVATE void ImplSetUserValue( sal_Int64 nNewValue, Selection* pNewSelection = NULL );
@@ -204,7 +204,7 @@ public:
void SetUserValue( sal_Int64 nNewValue );
virtual void SetValue( sal_Int64 nNewValue );
virtual sal_Int64 GetValue() const;
- virtual XubString CreateFieldText( sal_Int64 nValue ) const;
+ virtual OUString CreateFieldText( sal_Int64 nValue ) const;
sal_Bool IsValueModified() const;
sal_Int64 GetCorrectedValue() const { return mnCorrectedValue; }
@@ -222,8 +222,8 @@ private:
SAL_DLLPRIVATE void ImplInit();
protected:
- XubString maCustomUnitText;
- XubString maCurUnitText;
+ OUString maCustomUnitText;
+ OUString maCurUnitText;
sal_Int64 mnBaseValue;
FieldUnit meUnit;
Link maCustomConvertLink;
@@ -232,7 +232,7 @@ protected:
MetricFormatter();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE sal_Bool ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr );
+ SAL_DLLPRIVATE sal_Bool ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr );
public:
~MetricFormatter();
@@ -243,8 +243,8 @@ public:
virtual void SetUnit( FieldUnit meUnit );
FieldUnit GetUnit() const { return meUnit; }
void SetCustomUnitText( const XubString& rStr );
- const XubString& GetCustomUnitText() const { return maCustomUnitText; }
- const XubString& GetCurUnitText() const { return maCurUnitText; }
+ const OUString& GetCustomUnitText() const { return maCustomUnitText; }
+ const OUString& GetCurUnitText() const { return maCurUnitText; }
using NumericFormatter::SetMax;
void SetMax( sal_Int64 nNewMax, FieldUnit eInUnit );
@@ -263,7 +263,7 @@ public:
void SetUserValue( sal_Int64 nNewValue, FieldUnit eInUnit );
virtual sal_Int64 GetValue( FieldUnit eOutUnit ) const;
virtual sal_Int64 GetValue() const;
- virtual XubString CreateFieldText( sal_Int64 nValue ) const;
+ virtual OUString CreateFieldText( sal_Int64 nValue ) const;
using NumericFormatter::GetCorrectedValue;
sal_Int64 GetCorrectedValue( FieldUnit eOutUnit ) const;
@@ -283,7 +283,7 @@ private:
protected:
CurrencyFormatter();
- SAL_DLLPRIVATE sal_Bool ImplCurrencyReformat( const XubString& rStr, XubString& rOutStr );
+ SAL_DLLPRIVATE sal_Bool ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr );
public:
~CurrencyFormatter();
@@ -294,7 +294,7 @@ public:
virtual void SetValue( sal_Int64 nNewValue );
virtual sal_Int64 GetValue() const;
- virtual XubString CreateFieldText( sal_Int64 nValue ) const;
+ virtual OUString CreateFieldText( sal_Int64 nValue ) const;
};
@@ -324,12 +324,12 @@ protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE const Date& ImplGetFieldDate() const { return maFieldDate; }
- SAL_DLLPRIVATE sal_Bool ImplDateReformat( const XubString& rStr, XubString& rOutStr,
+ SAL_DLLPRIVATE sal_Bool ImplDateReformat( const OUString& rStr, OUString& rOutStr,
const AllSettings& rSettings );
SAL_DLLPRIVATE void ImplSetUserDate( const Date& rNewDate,
Selection* pNewSelection = NULL );
- SAL_DLLPRIVATE XubString ImplGetDateAsText( const Date& rDate,
- const AllSettings& rSettings ) const;
+ SAL_DLLPRIVATE OUString ImplGetDateAsText( const Date& rDate,
+ const AllSettings& rSettings ) const;
SAL_DLLPRIVATE void ImplNewFieldValue( const Date& rDate );
CalendarWrapper& GetCalendarWrapper() const;
@@ -419,7 +419,7 @@ protected:
TimeFormatter();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE sal_Bool ImplTimeReformat( const XubString& rStr, XubString& rOutStr );
+ SAL_DLLPRIVATE sal_Bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( const Time& rTime );
SAL_DLLPRIVATE void ImplSetUserTime( const Time& rNewTime, Selection* pNewSelection = NULL );
SAL_DLLPRIVATE sal_Bool ImplAllowMalformedInput() const;
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index ce1e7ec55cca..0eba3a120262 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -394,7 +394,7 @@ public:
static
SAL_DLLPRIVATE void ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
const String& rOrigStr, sal_uInt16 nStyle,
- MetricVector* pVector, String* pDisplayText, ::vcl::ITextLayout& _rLayout );
+ MetricVector* pVector, OUString* pDisplayText, ::vcl::ITextLayout& _rLayout );
SAL_DLLPRIVATE void ImplDrawTextBackground( const SalLayout& );
SAL_DLLPRIVATE void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bWordLine, sal_Bool bUnderlineAbove );
SAL_DLLPRIVATE bool ImplDrawRotateText( SalLayout& );
@@ -575,7 +575,7 @@ public:
void DrawText( const Point& rStartPt, const XubString& rStr,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
- MetricVector* pVector = NULL, String* pDisplayText = NULL );
+ MetricVector* pVector = NULL, OUString* pDisplayText = NULL );
long GetTextWidth( const XubString& rStr, xub_StrLen nIndex = 0,
xub_StrLen nLen = STRING_LEN ) const;
/// Height where any character of the current font fits; in logic coordinates.
@@ -615,7 +615,7 @@ public:
GDIMetaFile& rMtf );
void DrawText( const Rectangle& rRect,
const XubString& rStr, sal_uInt16 nStyle = 0,
- MetricVector* pVector = NULL, String* pDisplayText = NULL,
+ MetricVector* pVector = NULL, OUString* pDisplayText = NULL,
::vcl::ITextLayout* _pTextLayout = NULL );
Rectangle GetTextRect( const Rectangle& rRect,
const XubString& rStr, sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK,
@@ -625,7 +625,7 @@ public:
sal_uInt16 nStyle = TEXT_DRAW_ENDELLIPSIS ) const;
void DrawCtrlText( const Point& rPos, const XubString& rStr,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
- sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC, MetricVector* pVector = NULL, String* pDisplayText = NULL );
+ sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC, MetricVector* pVector = NULL, OUString* pDisplayText = NULL );
long GetCtrlTextWidth( const XubString& rStr, xub_StrLen nIndex = 0,
xub_StrLen nLen = STRING_LEN,
sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC ) const;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index e2f8b76b6cde..a925deda6b53 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -224,7 +224,7 @@ void Button::ImplSetSeparatorX( long nX )
// -----------------------------------------------------------------------
-sal_uInt16 Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
+sal_uInt16 Button::ImplGetTextStyle( OUString& rText, WinBits nWinStyle,
sal_uLong nDrawFlags )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -260,9 +260,9 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
sal_uInt16 nTextStyle, Rectangle *pSymbolRect,
bool bAddImageSep )
{
- XubString aText( GetText() );
+ OUString aText( GetText() );
sal_Bool bDrawImage = HasImage() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOIMAGE );
- sal_Bool bDrawText = aText.Len() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOTEXT );
+ sal_Bool bDrawText = !aText.isEmpty() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOTEXT );
sal_Bool bHasSymbol = pSymbolRect ? sal_True : sal_False;
// No text and no image => nothing to do => return
@@ -272,7 +272,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
WinBits nWinStyle = GetStyle();
Rectangle aOutRect( rPos, rSize );
MetricVector *pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String *pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ OUString *pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
ImageAlign eImageAlign = mpButtonData->meImageAlign;
Size aImageSize = mpButtonData->maImage.GetSizePixel();
@@ -815,9 +815,9 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aInRect = rRect;
Color aColor;
- XubString aText = PushButton::GetText(); // PushButton:: wegen MoreButton
- sal_uInt16 nTextStyle = ImplGetTextStyle( nDrawFlags );
- sal_uInt16 nStyle;
+ OUString aText = PushButton::GetText(); // PushButton:: because of MoreButton
+ sal_uInt16 nTextStyle = ImplGetTextStyle( nDrawFlags );
+ sal_uInt16 nStyle;
if( aInRect.Right() < aInRect.Left() || aInRect.Bottom() < aInRect.Top() )
aInRect.SetEmpty();
@@ -851,7 +851,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF
{
long nSeparatorX = 0;
Rectangle aSymbolRect = aInRect;
- if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ if ( !aText.isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
// calculate symbol size
long nSymbolSize = pDev->GetTextHeight() / 2 + 1;
@@ -2136,10 +2136,10 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
Rectangle& rMouseRect, bool bLayout )
{
WinBits nWinStyle = GetStyle();
- XubString aText( GetText() );
+ OUString aText( GetText() );
Rectangle aRect( rPos, rSize );
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
pDev->Push( PUSH_CLIPREGION );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
@@ -2147,7 +2147,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
// no image radio button
if ( !maImage )
{
- if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
+ if ( ( !aText.isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
{
sal_uInt16 nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
@@ -2224,14 +2224,14 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
}
else
{
- sal_Bool bTopImage = (nWinStyle & WB_TOP) != 0;
+ sal_Bool bTopImage = (nWinStyle & WB_TOP) != 0;
Size aImageSize = maImage.GetSizePixel();
Rectangle aImageRect( rPos, rSize );
long nTextHeight = pDev->GetTextHeight();
long nTextWidth = pDev->GetCtrlTextWidth( aText );
// calculate position and sizes
- if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ if ( !aText.isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
Size aTmpSize( (aImageSize.Width()+8), (aImageSize.Height()+8) );
if ( bTopImage )
@@ -3041,8 +3041,8 @@ Size RadioButton::CalcMinimumSize( long nMaxWidth ) const
nMaxWidth -= aSize.Width();
- XubString aText = GetText();
- if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ OUString aText = GetText();
+ if ( !aText.isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
// subtract what will be added later
nMaxWidth-=2;
@@ -3235,13 +3235,13 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
Rectangle& rMouseRect, bool bLayout )
{
WinBits nWinStyle = GetStyle();
- XubString aText( GetText() );
+ OUString aText( GetText() );
pDev->Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
long nLineY = rPos.Y() + (rSize.Height()-1)/2;
- if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
+ if ( ( !aText.isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
{
sal_uInt16 nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
@@ -3949,8 +3949,8 @@ Size CheckBox::CalcMinimumSize( long nMaxWidth ) const
Size aSize = ImplGetCheckImageSize();
nMaxWidth -= aSize.Width();
- XubString aText = GetText();
- if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ OUString aText = GetText();
+ if ( !aText.isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
// subtract what will be added later
nMaxWidth-=2;
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 845aba829795..c5de9cab7342 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -187,7 +187,7 @@ long Control::GetIndexForPoint( const Point& rPoint ) const
long ControlLayoutData::GetLineCount() const
{
long nLines = m_aLineIndices.size();
- if( nLines == 0 && m_aDisplayText.Len() )
+ if( nLines == 0 && !m_aDisplayText.isEmpty() )
nLines = 1;
return nLines;
}
@@ -205,14 +205,14 @@ Pair ControlLayoutData::GetLineStartEnd( long nLine ) const
if( nLine+1 < nDisplayLines )
aPair.B() = m_aLineIndices[nLine+1]-1;
else
- aPair.B() = m_aDisplayText.Len()-1;
+ aPair.B() = m_aDisplayText.getLength()-1;
}
- else if( nLine == 0 && nDisplayLines == 0 && m_aDisplayText.Len() )
+ else if( nLine == 0 && nDisplayLines == 0 && !m_aDisplayText.isEmpty() )
{
// special case for single line controls so the implementations
// in that case do not have to fill in the line indices
aPair.A() = 0;
- aPair.B() = m_aDisplayText.Len()-1;
+ aPair.B() = m_aDisplayText.getLength()-1;
}
return aPair;
}
@@ -231,7 +231,7 @@ Pair Control::GetLineStartEnd( long nLine ) const
long ControlLayoutData::ToRelativeLineIndex( long nIndex ) const
{
// is the index sensible at all ?
- if( nIndex >= 0 && nIndex < m_aDisplayText.Len() )
+ if( nIndex >= 0 && nIndex < m_aDisplayText.getLength() )
{
int nDisplayLines = m_aLineIndices.size();
// if only 1 line exists, then absolute and relative index are
@@ -334,11 +334,11 @@ void Control::AppendLayoutData( const Control& rSubControl ) const
{
if( !rSubControl.HasLayoutData() )
rSubControl.FillLayoutData();
- if( !rSubControl.HasLayoutData() || !rSubControl.mpControlData->mpLayoutData->m_aDisplayText.Len() )
+ if( !rSubControl.HasLayoutData() || rSubControl.mpControlData->mpLayoutData->m_aDisplayText.isEmpty() )
return;
- long nCurrentIndex = mpControlData->mpLayoutData->m_aDisplayText.Len();
- mpControlData->mpLayoutData->m_aDisplayText.Append( rSubControl.mpControlData->mpLayoutData->m_aDisplayText );
+ long nCurrentIndex = mpControlData->mpLayoutData->m_aDisplayText.getLength();
+ mpControlData->mpLayoutData->m_aDisplayText += rSubControl.mpControlData->mpLayoutData->m_aDisplayText;
int nLines = rSubControl.mpControlData->mpLayoutData->m_aLineIndices.size();
int n;
mpControlData->mpLayoutData->m_aLineIndices.push_back( nCurrentIndex );
@@ -520,8 +520,8 @@ void Control::ImplInitSettings( const sal_Bool _bFont, const sal_Bool _bForegrou
// -----------------------------------------------------------------
-void Control::DrawControlText( OutputDevice& _rTargetDevice, Rectangle& _io_rRect, const XubString& _rStr,
- sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText ) const
+void Control::DrawControlText( OutputDevice& _rTargetDevice, Rectangle& _io_rRect, const OUString& _rStr,
+ sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText ) const
{
#ifdef FS_DEBUG
if ( !_pVector )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 80ed74897b47..69ac949a3864 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -562,7 +562,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
aPos.X() = nPos + mnXOffset + ImplGetExtraOffset();
MetricVector* pVector = &mpControlData->mpLayoutData->m_aUnicodeBoundRects;
- String* pDisplayText = &mpControlData->mpLayoutData->m_aDisplayText;
+ OUString* pDisplayText = &mpControlData->mpLayoutData->m_aDisplayText;
DrawText( aPos, aText, nStart, nEnd - nStart, pVector, pDisplayText );
@@ -1992,7 +1992,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_u
}
}
- XubString aText = ImplGetText();
+ OUString aText = ImplGetText();
long nTextHeight = pDev->GetTextHeight();
long nTextWidth = pDev->GetTextWidth( aText );
long nOnePixel = GetDrawPixel( pDev, 1 );
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 387acea494a9..28b8c8e0193e 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -89,29 +89,28 @@ static sal_Bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
// -----------------------------------------------------------------------
-static sal_Bool ImplNumericGetValue( const XubString& rStr, double& rValue,
+static sal_Bool ImplNumericGetValue( const OUString& rStr, double& rValue,
sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrappper,
sal_Bool bCurrency = sal_False )
{
- XubString aStr = rStr;
- XubString aStr1;
- rtl::OUStringBuffer aStr2;
- sal_Bool bNegative = sal_False;
- xub_StrLen nDecPos;
+ OUString aStr = rStr;
+ rtl::OUStringBuffer aStr1, aStr2;
+ sal_Bool bNegative = sal_False;
+ sal_Int32 nDecPos;
// react on empty string
- if ( !rStr.Len() )
+ if ( rStr.isEmpty() )
return sal_False;
// remove leading and trailing spaces
- aStr = string::strip(aStr, ' ');
+ aStr = aStr.trim();
// find position of decimal point
- nDecPos = aStr.Search( rLocaleDataWrappper.getNumDecimalSep() );
- if ( nDecPos != STRING_NOTFOUND )
+ nDecPos = aStr.indexOf( rLocaleDataWrappper.getNumDecimalSep() );
+ if ( nDecPos >= 0)
{
- aStr1 = aStr.Copy( 0, nDecPos );
- aStr2.append(aStr.Copy(nDecPos+1));
+ aStr1.append(aStr.getStr(), nDecPos);
+ aStr2.append(aStr.getStr()+nDecPos+1);
}
else
aStr1 = aStr;
@@ -119,32 +118,32 @@ static sal_Bool ImplNumericGetValue( const XubString& rStr, double& rValue,
// negative?
if ( bCurrency )
{
- if ( (aStr.GetChar( 0 ) == '(') && (aStr.GetChar( aStr.Len()-1 ) == ')') )
+ if ( aStr[0] == '(' && aStr[aStr.getLength()-1] == ')' )
bNegative = sal_True;
if ( !bNegative )
{
- for (xub_StrLen i=0; i < aStr.Len(); i++ )
+ for (sal_Int32 i=0; i < aStr.getLength(); i++ )
{
- if ( (aStr.GetChar( i ) >= '0') && (aStr.GetChar( i ) <= '9') )
+ if ( (aStr[i] >= '0') && (aStr[i] <= '9') )
break;
- else if ( aStr.GetChar( i ) == '-' )
+ else if ( aStr[i] == '-' )
{
bNegative = sal_True;
break;
}
}
}
- if ( !bNegative && bCurrency && aStr.Len() )
+ if ( !bNegative && bCurrency && !aStr.isEmpty() )
{
sal_uInt16 nFormat = rLocaleDataWrappper.getCurrNegativeFormat();
- if ( (nFormat == 3) || (nFormat == 6) ||
- (nFormat == 7) || (nFormat == 10) )
+ if ( (nFormat == 3) || (nFormat == 6) || // $1- || 1-$
+ (nFormat == 7) || (nFormat == 10) ) // 1$- || 1 $-
{
- for (xub_StrLen i = (xub_StrLen)(aStr.Len()-1); i > 0; i++ )
+ for (sal_Int32 i = aStr.getLength()-1; i > 0; i++ )
{
- if ( (aStr.GetChar( i ) >= '0') && (aStr.GetChar( i ) <= '9') )
+ if ( (aStr[i] >= '0') && (aStr[i] <= '9') )
break;
- else if ( aStr.GetChar( i ) == '-' )
+ else if ( aStr[i] == '-' )
{
bNegative = sal_True;
break;
@@ -155,17 +154,17 @@ static sal_Bool ImplNumericGetValue( const XubString& rStr, double& rValue,
}
else
{
- if ( aStr1.GetChar( 0 ) == '-' )
+ if ( aStr1[0] == '-')
bNegative = sal_True;
}
// remove all unwanted charaters
- for (xub_StrLen i=0; i < aStr1.Len(); )
+ for (sal_Int32 i=0; i < aStr1.getLength(); )
{
- if ( (aStr1.GetChar( i ) >= '0') && (aStr1.GetChar( i ) <= '9') )
+ if ( (aStr1[i] >= '0') && (aStr1[i] <= '9') )
i++;
else
- aStr1.Erase( i, 1 );
+ aStr1.remove( i, 1 );
}
for (sal_Int32 i=0; i < aStr2.getLength(); )
{
@@ -175,13 +174,13 @@ static sal_Bool ImplNumericGetValue( const XubString& rStr, double& rValue,
aStr2.remove(i, 1);
}
- if ( !aStr1.Len() && !aStr2.getLength() )
+ if ( aStr1.isEmpty() && aStr2.isEmpty() )
return sal_False;
- if ( !aStr1.Len() )
- aStr1.Insert( '0' );
+ if ( aStr1.isEmpty() )
+ aStr1 = "0";
if ( bNegative )
- aStr1.Insert( '-', 0 );
+ aStr1 = "-" + aStr1;
// prune and round fraction
bool bRound = false;
@@ -194,8 +193,7 @@ static sal_Bool ImplNumericGetValue( const XubString& rStr, double& rValue,
if (aStr2.getLength() < nDecDigits)
string::padToLength(aStr2, nDecDigits, '0');
- aStr = aStr1;
- aStr += aStr2.makeStringAndClear();
+ aStr = aStr1.makeStringAndClear() + aStr2.makeStringAndClear();
// check range
double nValue = rtl::OUString(aStr).toDouble();
@@ -430,8 +428,8 @@ sal_Bool FormatterBase::IsEmptyFieldValue() const
// -----------------------------------------------------------------------
-sal_Bool NumericFormatter::ImplNumericReformat( const XubString& rStr, double& rValue,
- XubString& rOutStr )
+sal_Bool NumericFormatter::ImplNumericReformat( const OUString& rStr, double& rValue,
+ OUString& rOutStr )
{
if ( !ImplNumericGetValue( rStr, rValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() ) )
return sal_True;
@@ -596,9 +594,9 @@ void NumericFormatter::SetValue( sal_Int64 nNewValue )
// -----------------------------------------------------------------------
-XubString NumericFormatter::CreateFieldText( sal_Int64 nValue ) const
+OUString NumericFormatter::CreateFieldText( sal_Int64 nValue ) const
{
- return ImplGetLocaleDataWrapper().getNum( nValue, GetDecimalDigits(), IsUseThousandSep(), IsShowTrailingZeros() );
+ return OUString(ImplGetLocaleDataWrapper().getNum( nValue, GetDecimalDigits(), IsUseThousandSep(), IsShowTrailingZeros() ));
}
// -----------------------------------------------------------------------
@@ -691,7 +689,7 @@ void NumericFormatter::Reformat()
if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
- XubString aStr;
+ OUString aStr;
// caution: precision loss in double cast
double nTemp = (double)mnLastValue;
sal_Bool bOK = ImplNumericReformat( GetField()->GetText(), nTemp, aStr );
@@ -699,7 +697,7 @@ void NumericFormatter::Reformat()
if ( !bOK )
return;
- if ( aStr.Len() )
+ if ( !aStr.isEmpty() )
ImplSetText( aStr );
else
SetValue( mnLastValue );
@@ -1055,7 +1053,7 @@ void NumericBox::Modify()
void NumericBox::ReformatAll()
{
double nValue;
- XubString aStr;
+ OUString aStr;
SetUpdateMode( sal_False );
sal_uInt16 nEntryCount = GetEntryCount();
for ( sal_uInt16 i=0; i < nEntryCount; i++ )
@@ -1108,7 +1106,7 @@ static rtl::OUString ImplMetricGetUnitText(const rtl::OUString& rStr)
// #104355# support localized mesaurements
-static const String& ImplMetricToString( FieldUnit rUnit )
+static const OUString ImplMetricToString( FieldUnit rUnit )
{
FieldUnitStringList* pList = ImplGetFieldUnits();
if( pList )
@@ -1121,7 +1119,7 @@ static const String& ImplMetricToString( FieldUnit rUnit )
}
}
- return String::EmptyString();
+ return OUString();
}
static FieldUnit ImplStringToMetric(const rtl::OUString &rMetricString)
@@ -1130,11 +1128,11 @@ static FieldUnit ImplStringToMetric(const rtl::OUString &rMetricString)
if( pList )
{
// return FieldUnit
- rtl::OUString aStr(rMetricString.toAsciiLowerCase());
+ OUString aStr(rMetricString.toAsciiLowerCase());
aStr = string::remove(aStr, ' ');
for( FieldUnitStringList::const_iterator it = pList->begin(); it != pList->end(); ++it )
{
- if ( it->first.Equals( aStr ) )
+ if ( it->first == aStr )
return it->second;
}
}
@@ -1437,7 +1435,7 @@ static sal_Bool ImplMetricGetValue( const XubString& rStr, double& rValue, sal_I
// -----------------------------------------------------------------------
-sal_Bool MetricFormatter::ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr )
+sal_Bool MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr )
{
if ( !ImplMetricGetValue( rStr, rValue, mnBaseValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), meUnit ) )
return sal_True;
@@ -1540,9 +1538,9 @@ void MetricFormatter::SetValue( sal_Int64 nNewValue, FieldUnit eInUnit )
// -----------------------------------------------------------------------
-XubString MetricFormatter::CreateFieldText( sal_Int64 nValue ) const
+OUString MetricFormatter::CreateFieldText( sal_Int64 nValue ) const
{
- XubString aStr = NumericFormatter::CreateFieldText( nValue );
+ OUString aStr = NumericFormatter::CreateFieldText( nValue );
if( meUnit == FUNIT_CUSTOM )
aStr += maCustomUnitText;
@@ -1659,11 +1657,11 @@ void MetricFormatter::Reformat()
if ( !GetField() )
return;
- XubString aText = GetField()->GetText();
+ OUString aText = GetField()->GetText();
if ( meUnit == FUNIT_CUSTOM )
maCurUnitText = ImplMetricGetUnitText( aText );
- XubString aStr;
+ OUString aStr;
// caution: precision loss in double cast
double nTemp = (double)mnLastValue;
sal_Bool bOK = ImplMetricReformat( aText, nTemp, aStr );
@@ -1672,7 +1670,7 @@ void MetricFormatter::Reformat()
if ( !bOK )
return;
- if ( aStr.Len() )
+ if ( !aStr.isEmpty() )
{
ImplSetText( aStr );
if ( meUnit == FUNIT_CUSTOM )
@@ -1680,7 +1678,7 @@ void MetricFormatter::Reformat()
}
else
SetValue( mnLastValue );
- maCurUnitText.Erase();
+ maCurUnitText = OUString();
}
// -----------------------------------------------------------------------
@@ -1998,7 +1996,7 @@ void MetricBox::Modify()
void MetricBox::ReformatAll()
{
double nValue;
- XubString aStr;
+ OUString aStr;
SetUpdateMode( sal_False );
sal_uInt16 nEntryCount = GetEntryCount();
for ( sal_uInt16 i=0; i < nEntryCount; i++ )
@@ -2089,8 +2087,7 @@ inline sal_Bool ImplCurrencyGetValue( const XubString& rStr, double& rValue,
// -----------------------------------------------------------------------
-sal_Bool CurrencyFormatter::ImplCurrencyReformat( const XubString& rStr,
- XubString& rOutStr )
+sal_Bool CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr )
{
double nValue;
if ( !ImplNumericGetValue( rStr, nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), sal_True ) )
@@ -2159,7 +2156,7 @@ void CurrencyFormatter::SetValue( sal_Int64 nNewValue )
// -----------------------------------------------------------------------
-XubString CurrencyFormatter::CreateFieldText( sal_Int64 nValue ) const
+OUString CurrencyFormatter::CreateFieldText( sal_Int64 nValue ) const
{
return ImplGetLocaleDataWrapper().getCurr( nValue, GetDecimalDigits(), GetCurrencySymbol(), IsUseThousandSep() );
}
@@ -2192,12 +2189,12 @@ void CurrencyFormatter::Reformat()
if ( !GetField() )
return;
- XubString aStr;
+ OUString aStr;
sal_Bool bOK = ImplCurrencyReformat( GetField()->GetText(), aStr );
if ( !bOK )
return;
- if ( aStr.Len() )
+ if ( !aStr.isEmpty() )
{
ImplSetText( aStr );
// caution: precision loss in double cast
@@ -2385,7 +2382,7 @@ void CurrencyBox::Modify()
void CurrencyBox::ReformatAll()
{
- XubString aStr;
+ OUString aStr;
SetUpdateMode( sal_False );
sal_uInt16 nEntryCount = GetEntryCount();
for ( sal_uInt16 i=0; i < nEntryCount; i++ )
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index c56a42a62ba6..6374b69483ae 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1189,7 +1189,7 @@ static sal_Bool ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFie
// -----------------------------------------------------------------------
-sal_Bool DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr, const AllSettings& rSettings )
+sal_Bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr, const AllSettings& rSettings )
{
Date aDate( 0, 0, 0 );
if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
@@ -1220,8 +1220,8 @@ sal_Bool DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOut
// -----------------------------------------------------------------------
-XubString DateFormatter::ImplGetDateAsText( const Date& rDate,
- const AllSettings& ) const
+OUString DateFormatter::ImplGetDateAsText( const Date& rDate,
+ const AllSettings& ) const
{
sal_Bool bShowCentury = sal_False;
switch ( GetExtDateFormat() )
@@ -1840,12 +1840,12 @@ void DateFormatter::Reformat()
if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
- XubString aStr;
+ OUString aStr;
sal_Bool bOK = ImplDateReformat( GetField()->GetText(), aStr, GetFieldSettings() );
if( !bOK )
return;
- if ( aStr.Len() )
+ if ( !aStr.isEmpty() )
{
ImplSetText( aStr );
ImplDateGetValue( aStr, maLastDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
@@ -2139,7 +2139,7 @@ void DateBox::Modify()
void DateBox::ReformatAll()
{
- XubString aStr;
+ OUString aStr;
SetUpdateMode( sal_False );
sal_uInt16 nEntryCount = GetEntryCount();
for ( sal_uInt16 i=0; i < nEntryCount; i++ )
@@ -2422,7 +2422,7 @@ static sal_Bool ImplTimeGetValue( const XubString& rStr, Time& rTime,
// -----------------------------------------------------------------------
-sal_Bool TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr )
+sal_Bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr )
{
Time aTime( 0, 0, 0 );
if ( !ImplTimeGetValue( rStr, aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() ) )
@@ -2458,11 +2458,11 @@ sal_Bool TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOut
sal_uLong n = aTempTime.GetHour() * 3600L;
n += aTempTime.GetMin() * 60L;
n += aTempTime.GetSec();
- rOutStr = String::CreateFromInt32( n );
+ rOutStr = OUString::number( n );
rOutStr += ImplGetLocaleDataWrapper().getTime100SecSep();
if ( aTempTime.Get100Sec() < 10 )
- rOutStr += '0';
- rOutStr += String::CreateFromInt32( aTempTime.Get100Sec() );
+ rOutStr += "0";
+ rOutStr += OUString::number( aTempTime.Get100Sec() );
}
else if ( mbDuration )
rOutStr = ImplGetLocaleDataWrapper().getDuration( aTempTime, bSecond, b100Sec );
@@ -2832,12 +2832,12 @@ void TimeFormatter::Reformat()
if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
- XubString aStr;
+ OUString aStr;
sal_Bool bOK = ImplTimeReformat( GetField()->GetText(), aStr );
if ( !bOK )
return;
- if ( aStr.Len() )
+ if ( !aStr.isEmpty() )
{
ImplSetText( aStr );
ImplTimeGetValue( aStr, maLastTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() );
@@ -3126,7 +3126,7 @@ void TimeBox::Modify()
void TimeBox::ReformatAll()
{
- XubString aStr;
+ OUString aStr;
SetUpdateMode( sal_False );
sal_uInt16 nEntryCount = GetEntryCount();
for ( sal_uInt16 i=0; i < nEntryCount; i++ )
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index ca7b2e84efde..3c5346d984a3 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -264,7 +264,7 @@ void FixedText::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
nTextStyle |= TEXT_DRAW_MONO;
if( bFillLayout )
- mpControlData->mpLayoutData->m_aDisplayText = String();
+ mpControlData->mpLayoutData->m_aDisplayText = OUString();
Rectangle aRect( Rectangle( aPos, rSize ) );
DrawControlText( *pDev, aRect, aText, nTextStyle,
@@ -599,7 +599,7 @@ void FixedLine::ImplDraw( bool bLayout )
String aText = GetText();
WinBits nWinStyle = GetStyle();
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
DecorationView aDecoView( this );
if ( !aText.Len() )
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 999ccfecad2b..5b345d6b8bdf 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -207,7 +207,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
}
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
DrawControlText( *pDev, aRect, aText, nTextStyle, pVector, pDisplayText );
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index f070206d396e..2425147a13a7 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -1866,7 +1866,7 @@ void ImplListBoxWindow::DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Boo
if( bDrawText )
{
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
XubString aStr( mpEntryList->GetEntryText( nPos ) );
if ( aStr.Len() )
{
@@ -1886,7 +1886,7 @@ void ImplListBoxWindow::DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Boo
}
if( bLayout )
- mpControlData->mpLayoutData->m_aLineIndices.push_back( mpControlData->mpLayoutData->m_aDisplayText.Len() );
+ mpControlData->mpLayoutData->m_aLineIndices.push_back( mpControlData->mpLayoutData->m_aDisplayText.getLength() );
// pb: #106948# explicit mirroring for calc
if ( mbMirroring )
@@ -2942,7 +2942,7 @@ void ImplWin::DrawEntry( sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDraw
}
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
DrawText( aTextRect, maString, nTextStyle, pVector, pDisplayText );
}
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 02ac5337de03..28c81af5813e 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -880,7 +880,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
if( bLayout )
{
int nLine = mpControlData->mpLayoutData->m_aLineIndices.size();
- mpControlData->mpLayoutData->m_aLineIndices.push_back( mpControlData->mpLayoutData->m_aDisplayText.Len() );
+ mpControlData->mpLayoutData->m_aLineIndices.push_back( mpControlData->mpLayoutData->m_aDisplayText.getLength() );
mpTabCtrlData->maLayoutPageIdToLine[ (int)pItem->mnId ] = nLine;
mpTabCtrlData->maLayoutLineToPageId[ nLine ] = (int)pItem->mnId;
mpTabCtrlData->maTabRectangles.push_back( aRect );
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index e5d22a33d3d1..741ddbb03a46 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -5645,7 +5645,7 @@ void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos,
void OutputDevice::DrawText( const Point& rStartPt, const String& rStr,
xub_StrLen nIndex, xub_StrLen nLen,
- MetricVector* pVector, String* pDisplayText
+ MetricVector* pVector, OUString* pDisplayText
)
{
if( mpOutDevData && mpOutDevData->mpRecordLayout )
@@ -5671,7 +5671,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const String& rStr,
aClip.Intersect( Rectangle( Point(), GetOutputSize() ) );
if( mpOutDevData && mpOutDevData->mpRecordLayout )
{
- mpOutDevData->mpRecordLayout->m_aLineIndices.push_back( mpOutDevData->mpRecordLayout->m_aDisplayText.Len() );
+ mpOutDevData->mpRecordLayout->m_aLineIndices.push_back( mpOutDevData->mpRecordLayout->m_aDisplayText.getLength() );
aClip.Intersect( mpOutDevData->maRecordRect );
}
if( ! aClip.IsNull() )
@@ -5698,7 +5698,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const String& rStr,
{
pVector->push_back( *it );
if( pDisplayText )
- pDisplayText->Append( rStr.GetChar( nIndex ) );
+ *pDisplayText += OUString(rStr.GetChar( nIndex ));
bInserted = true;
}
}
@@ -5707,7 +5707,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const String& rStr,
{
GetGlyphBoundRects( rStartPt, rStr, nIndex, nLen, nIndex, *pVector );
if( pDisplayText )
- pDisplayText->Append( rStr.Copy( nIndex, nLen ) );
+ *pDisplayText += rStr.Copy( nIndex, nLen );
}
}
@@ -6453,7 +6453,7 @@ xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth,
void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
const String& rOrigStr, sal_uInt16 nStyle,
- MetricVector* pVector, String* pDisplayText,
+ MetricVector* pVector, OUString* pDisplayText,
::vcl::ITextLayout& _rLayout )
{
Color aOldTextColor;
@@ -6761,7 +6761,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect,
// -----------------------------------------------------------------------
void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, sal_uInt16 nStyle,
- MetricVector* pVector, String* pDisplayText,
+ MetricVector* pVector, OUString* pDisplayText,
::vcl::ITextLayout* _pTextLayout )
{
if( mpOutDevData && mpOutDevData->mpRecordLayout )
@@ -7087,7 +7087,7 @@ String OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, c
void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
xub_StrLen nIndex, xub_StrLen nLen,
- sal_uInt16 nStyle, MetricVector* pVector, String* pDisplayText )
+ sal_uInt16 nStyle, MetricVector* pVector, OUString* pDisplayText )
{
OSL_TRACE( "OutputDevice::DrawCtrlText()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index d6d5b0362e33..81dc881e1f78 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -57,7 +57,7 @@ namespace vcl
//--------------------------------------------------------------------
void DefaultTextLayout::DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex,
- xub_StrLen _nLength, MetricVector* _pVector, String* _pDisplayText )
+ xub_StrLen _nLength, MetricVector* _pVector, OUString* _pDisplayText )
{
m_rTargetDevice.DrawText( _rStartPoint, _rText, _nStartIndex, _nLength, _pVector, _pDisplayText );
}
@@ -92,7 +92,7 @@ namespace vcl
// ITextLayout
virtual long GetTextWidth( const XubString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const;
- virtual void DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength, MetricVector* _pVector, String* _pDisplayText );
+ virtual void DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength, MetricVector* _pVector, OUString* _pDisplayText );
virtual bool GetCaretPositions( const XubString& _rText, sal_Int32* _pCaretXArray, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const;
virtual xub_StrLen GetTextBreak( const XubString& _rText, long _nMaxTextWidth, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const;
virtual bool DecomposeTextRectAction() const;
@@ -100,7 +100,7 @@ namespace vcl
public:
// equivalents to the respective OutputDevice methods, which take the reference device into account
long GetTextArray( const XubString& _rText, sal_Int32* _pDXAry, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const;
- Rectangle DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText );
+ Rectangle DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText );
protected:
void onBeginDrawText()
@@ -230,7 +230,7 @@ namespace vcl
}
//--------------------------------------------------------------------
- void ReferenceDeviceTextLayout::DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength, MetricVector* _pVector, String* _pDisplayText )
+ void ReferenceDeviceTextLayout::DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength, MetricVector* _pVector, OUString* _pDisplayText )
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
return;
@@ -242,7 +242,7 @@ namespace vcl
::std::copy(
aGlyphBounds.begin(), aGlyphBounds.end(),
::std::insert_iterator< MetricVector > ( *_pVector, _pVector->end() ) );
- _pDisplayText->Append( _rText.Copy( _nStartIndex, _nLength ) );
+ *_pDisplayText += _rText.Copy( _nStartIndex, _nLength );
return;
}
@@ -284,7 +284,7 @@ namespace vcl
}
//--------------------------------------------------------------------
- Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText )
+ Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText )
{
if ( !_rText.Len() )
return Rectangle();
@@ -351,7 +351,7 @@ namespace vcl
//--------------------------------------------------------------------
Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle,
- MetricVector* _pVector, String* _pDisplayText )
+ MetricVector* _pVector, OUString* _pDisplayText )
{
return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText );
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index a163041d0c27..64974dc9a30b 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2808,10 +2808,10 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
if ( pData->bIsTemporary )
nStyle |= TEXT_DRAW_DISABLE;
MetricVector* pVector = bLayout ? &mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpLayoutData->m_aDisplayText : NULL;
+ OUString* pDisplayText = bLayout ? &mpLayoutData->m_aDisplayText : NULL;
if( bLayout )
{
- mpLayoutData->m_aLineIndices.push_back( mpLayoutData->m_aDisplayText.Len() );
+ mpLayoutData->m_aLineIndices.push_back( mpLayoutData->m_aDisplayText.getLength() );
mpLayoutData->m_aLineItemIds.push_back( pData->nId );
mpLayoutData->m_aLineItemPositions.push_back( n );
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 69585dc95798..2e7bddf1d908 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3016,7 +3016,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa
ImplToolItem* pItem = &mpData->m_aItems[nPos];
MetricVector* pVector = bLayout ? &mpData->m_pLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : NULL;
+ OUString* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : NULL;
if(!pItem->mbEnabled)
nHighlight = 0;
@@ -3116,7 +3116,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa
bClip = sal_False;
if( bLayout )
{
- mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.Len() );
+ mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.getLength() );
mpData->m_pLayoutData->m_aLineItemIds.push_back( pItem->mnId );
mpData->m_pLayoutData->m_aLineItemPositions.push_back( nPos );
}
@@ -3284,7 +3284,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa
nTextStyle |= TEXT_DRAW_DISABLE;
if( bLayout )
{
- mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.Len() );
+ mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.getLength() );
mpData->m_pLayoutData->m_aLineItemIds.push_back( pItem->mnId );
mpData->m_pLayoutData->m_aLineItemPositions.push_back( nPos );
}