summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-10 11:37:13 +0200
committerNoel Grandin <noel@peralex.com>2013-09-11 09:45:39 +0200
commitbe5b8202f80046546d855852e9e10cfd8f6fee85 (patch)
treee207c89fd3f75f0a4cbc0e4279c4f10219057073 /editeng
parentd169dd267998ec503a855f7f5232a725596b7d30 (diff)
convert various bits in editeng from String to OUString
Change-Id: If8b0da1e6b6e3f1f0a0f4946c7741fd5aec66aa6
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/outliner/outliner.cxx8
-rw-r--r--editeng/source/outliner/outlvw.cxx8
-rw-r--r--editeng/source/rtf/svxrtf.cxx12
3 files changed, 14 insertions, 14 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 80ef22b4c331..45445c58193a 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -109,7 +109,7 @@ Paragraph* Outliner::Insert(const OUString& rText, sal_Int32 nAbsPos, sal_Int16
ImplBlockInsertionCallbacks( sal_True );
pPara = new Paragraph( nDepth );
pParaList->Insert( pPara, nAbsPos );
- pEditEngine->InsertParagraph( nAbsPos, String() );
+ pEditEngine->InsertParagraph( nAbsPos, OUString() );
DBG_ASSERT(pPara==pParaList->GetParagraph(nAbsPos),"Insert:Failed");
ImplInitDepth( nAbsPos, nDepth, sal_False );
pHdlParagraph = pPara;
@@ -749,8 +749,8 @@ void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet*
if( nDepth < 0 )
nDepth = 0;
- String aNewStyleSheetName( pStyle->GetName() );
- aNewStyleSheetName.Erase( aNewStyleSheetName.Len()-1, 1 );
+ OUString aNewStyleSheetName( pStyle->GetName() );
+ aNewStyleSheetName = aNewStyleSheetName.copy( 0, aNewStyleSheetName.getLength()-1 );
aNewStyleSheetName += OUString::number( nDepth+1 );
SfxStyleSheet* pNewStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( aNewStyleSheetName, pStyle->GetFamily() );
DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
@@ -1522,7 +1522,7 @@ Size Outliner::ImplGetBulletSize( sal_Int32 nPara )
}
else if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
{
- String aBulletText = ImplGetBulletText( nPara );
+ OUString aBulletText = ImplGetBulletText( nPara );
OutputDevice* pRefDev = pEditEngine->GetRefDevice();
Font aBulletFont( ImpCalcBulletFont( nPara ) );
Font aRefFont( pRefDev->GetFont());
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 9e4e87eaaf7e..829087d291da 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -77,7 +77,7 @@ void OutlinerView::Paint( const Rectangle& rRect, OutputDevice* pTargetDevice )
// For the first Paint/KeyInput/Drop an emty Outliner is turned into
// an Outliner with exactly one paragraph.
if( pOwner->bFirstParaIsEmpty )
- pOwner->Insert( String() );
+ pOwner->Insert( OUString() );
pEditView->Paint( rRect, pTargetDevice );
}
@@ -89,7 +89,7 @@ sal_Bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
// For the first Paint/KeyInput/Drop an emty Outliner is turned into
// an Outliner with exactly one paragraph.
if( pOwner->bFirstParaIsEmpty )
- pOwner->Insert( String() );
+ pOwner->Insert( OUString() );
sal_Bool bKeyProcessed = sal_False;
@@ -218,7 +218,7 @@ sal_Bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
SAL_WARN_IF( nTemp < 0, "editeng", "OutlinerView::PostKeyEvent - overflow");
if (nTemp >= 0)
{
- pOwner->Insert( String(),nTemp,pPara->GetDepth());
+ pOwner->Insert( OUString(),nTemp,pPara->GetDepth());
// Position the cursor
ESelection aTmpSel(nTemp,0,nTemp,0);
pEditView->SetSelection( aTmpSel );
@@ -236,7 +236,7 @@ sal_Bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
pOwner->UndoActionStart( OLUNDO_INSERT );
sal_Int32 nTemp = aSel.nEndPara;
nTemp++;
- pOwner->Insert( String(), nTemp, pPara->GetDepth()+1 );
+ pOwner->Insert( OUString(), nTemp, pPara->GetDepth()+1 );
// Position the cursor
ESelection aTmpSel(nTemp,0,nTemp,0);
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 893c2d10ae7e..1f6f744e21b4 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -460,7 +460,7 @@ void SvxRTFParser::ReadFontTable()
int _nOpenBrakets = 1; // the first was already detected earlier!!
Font* pFont = new Font();
short nFontNo(0), nInsFontNo (0);
- String sAltNm, sFntNm;
+ OUString sAltNm, sFntNm;
sal_Bool bIsAltFntNm = sal_False, bCheckNewFont;
CharSet nSystemChar = lcl_GetDefaultTextEncodingForRTF();
@@ -567,18 +567,18 @@ void SvxRTFParser::ReadFontTable()
break;
}
- if( bCheckNewFont && 1 >= _nOpenBrakets && sFntNm.Len() ) // one font is ready
+ if( bCheckNewFont && 1 >= _nOpenBrakets && !sFntNm.isEmpty() ) // one font is ready
{
// All data from the font is available, so off to the table
- if (sAltNm.Len())
- (sFntNm += ';' ) += sAltNm;
+ if (!sAltNm.isEmpty())
+ sFntNm = sFntNm + ";" + sAltNm;
pFont->SetName( sFntNm );
aFontTbl.insert( nInsFontNo, pFont );
pFont = new Font();
pFont->SetCharSet( nSystemChar );
- sAltNm.Erase();
- sFntNm.Erase();
+ sAltNm = "";
+ sFntNm = "";
}
}
// the last one we have to delete manually