Skip to content

Commit eb0f855

Browse files
committed
editeng: Use appropriate OUString functions on string constants
Change-Id: Iab879390c18a3ce2c5bfc49548ca273ce0b907da
1 parent 0f867ad commit eb0f855

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

editeng/qa/unit/core-test.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ class TestAutoCorrDoc : public SvxAutoCorrDoc
291291
{
292292
m_rText = m_rText.replaceAt(rSttPos, nEndPos, pFnd->GetLong());
293293
if( pPara )
294-
*pPara = "";//&pCurNode->GetString();
294+
pPara->clear(); // =&pCurNode->GetString();
295295
return true;
296296
}
297297

editeng/source/accessibility/AccessibleEditableTextPara.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ namespace accessibility
861861
uno::Sequence< OUString >* pSeq = new uno::Sequence< OUString >( 21 );
862862
OUString* pStrings = pSeq->getArray();
863863
sal_Int32 i = 0;
864-
#define STR(x) pStrings[i++] = OUString(x)
864+
#define STR(x) pStrings[i++] = x
865865
STR("CharColor");
866866
STR("CharContoured");
867867
STR("CharEmphasis");

editeng/source/editeng/editview.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
773773
// implementation here by providing an additional parameter.
774774
Sequence< PropertyValue > aPropVals(1);
775775
PropertyValue &rVal = aPropVals.getArray()[0];
776-
rVal.Name = OUString( UPN_MAX_NUMBER_OF_SUGGESTIONS );
776+
rVal.Name = UPN_MAX_NUMBER_OF_SUGGESTIONS;
777777
rVal.Value <<= (sal_Int16) 7;
778778

779779
// Are there any replace suggestions?

editeng/source/items/frmitems.cxx

+6-6
Original file line numberDiff line numberDiff line change
@@ -3658,7 +3658,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
36583658
}
36593659
else if( sLink.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) )
36603660
{
3661-
maStrLink = "";
3661+
maStrLink.clear();
36623662
OString sId(OUStringToOString(sLink.copy( sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1 ),
36633663
RTL_TEXTENCODING_ASCII_US));
36643664
GraphicObject *pOldGrfObj = pImpl->pGraphicObject;
@@ -3750,8 +3750,8 @@ SvxBrushItem& SvxBrushItem::operator=( const SvxBrushItem& rItem )
37503750
eGraphicPos = rItem.eGraphicPos;
37513751

37523752
DELETEZ( pImpl->pGraphicObject );
3753-
maStrLink = "";
3754-
maStrFilter = "";
3753+
maStrLink.clear();
3754+
maStrFilter.clear();
37553755

37563756
if ( GPOS_NONE != eGraphicPos )
37573757
{
@@ -3942,8 +3942,8 @@ void SvxBrushItem::SetGraphicPos( SvxGraphicPosition eNew )
39423942
if ( GPOS_NONE == eGraphicPos )
39433943
{
39443944
DELETEZ( pImpl->pGraphicObject );
3945-
maStrLink = "";
3946-
maStrFilter = "";
3945+
maStrLink.clear();
3946+
maStrFilter.clear();
39473947
}
39483948
else
39493949
{
@@ -4003,7 +4003,7 @@ void SvxBrushItem::SetGraphicObject( const GraphicObject& rNewObj )
40034003
void SvxBrushItem::SetGraphicLink( const OUString& rNew )
40044004
{
40054005
if ( rNew.isEmpty() )
4006-
maStrLink = "";
4006+
maStrLink.clear();
40074007
else
40084008
{
40094009
maStrLink = rNew;

editeng/source/rtf/svxrtf.cxx

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ SvParserState SvxRTFParser::CallParser()
138138
bNewGroup = false;
139139
nDfltFont = 0;
140140

141-
sBaseURL = "";
141+
sBaseURL.clear();
142142

143143
// generate the correct WhichId table from the set WhichIds.
144144
BuildWhichTbl();
@@ -575,8 +575,8 @@ void SvxRTFParser::ReadFontTable()
575575
aFontTbl.insert( nInsFontNo, pFont );
576576
pFont = new vcl::Font();
577577
pFont->SetCharSet( nSystemChar );
578-
sAltNm = "";
579-
sFntNm = "";
578+
sAltNm.clear();
579+
sFntNm.clear();
580580
}
581581
}
582582
// the last one we have to delete manually
@@ -600,7 +600,7 @@ void SvxRTFParser::ReadOLEData()
600600

601601
OUString& SvxRTFParser::GetTextToEndGroup( OUString& rStr )
602602
{
603-
rStr = "";
603+
rStr.clear();
604604
int _nOpenBrakets = 1, nToken; // the first was already detected earlier!!
605605

606606
while( _nOpenBrakets && IsParserWorking() )

0 commit comments

Comments
 (0)