Kaydet (Commit) 2232781a authored tarafından Laurent Balland-Poirier's avatar Laurent Balland-Poirier Kaydeden (comit) Ivan Timofeev

String to OUString in itemwin.cxx

Change-Id: If82112acaecbdbb05d2499b2c0eaf2066b707571
üst 028a9096
...@@ -301,7 +301,7 @@ void SvxColorBox::Update( const XLineColorItem* pItem ) ...@@ -301,7 +301,7 @@ void SvxColorBox::Update( const XLineColorItem* pItem )
{ {
// fdo#64455 // fdo#64455
::Color aColor = pItem->GetColorValue(); ::Color aColor = pItem->GetColorValue();
String aString( pItem->GetName() ); OUString aString( pItem->GetName() );
SelectEntry(aString); SelectEntry(aString);
if( GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND || if( GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ||
GetSelectEntryColor() != aColor ) GetSelectEntryColor() != aColor )
...@@ -313,20 +313,18 @@ void SvxColorBox::Update( const XLineColorItem* pItem ) ...@@ -313,20 +313,18 @@ void SvxColorBox::Update( const XLineColorItem* pItem )
GetSelectEntryColor() != aColor ) GetSelectEntryColor() != aColor )
{ {
sal_uInt16 nCount = GetEntryCount(); sal_uInt16 nCount = GetEntryCount();
String aTmpStr; OUString aTmpStr;
if( nCount > 0 ) if( nCount > 0 )
{ {
// Last entry gets tested against temporary color // Last entry gets tested against temporary color
aTmpStr = GetEntry( nCount - 1 ); aTmpStr = GetEntry( nCount - 1 );
if( aTmpStr.GetChar(0) == TMP_STR_BEGIN && if( aTmpStr[0] == TMP_STR_BEGIN &&
aTmpStr.GetChar(aTmpStr.Len()-1) == TMP_STR_END ) aTmpStr[aTmpStr.getLength()-1] == TMP_STR_END )
{ {
RemoveEntry( nCount - 1 ); RemoveEntry( nCount - 1 );
} }
} }
aTmpStr = TMP_STR_BEGIN; aTmpStr = OUString(TMP_STR_BEGIN) + aString + OUString(TMP_STR_END);
aTmpStr += aString;
aTmpStr += TMP_STR_END;
sal_uInt16 nPos = InsertEntry( aColor, aTmpStr ); sal_uInt16 nPos = InsertEntry( aColor, aTmpStr );
SelectEntryPos( nPos ); SelectEntryPos( nPos );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment