summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-20 09:58:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-20 12:06:40 +0100
commit81099135677ac6997473ca01a297c32025c58662 (patch)
treee30d5e1d30e588af37a373da935faa8225ed209d /filter
parent8c023fd645c8b83637ffcde4055886b2e4f94393 (diff)
ditch last (?) uses of UniString::UniString(sal_Unicode, ...)
Change-Id: Ie04a3465100d2f013f34168aaf136a20cd2f7e0d
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx10
-rw-r--r--filter/source/msfilter/svdfppt.cxx13
2 files changed, 11 insertions, 12 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 865bcfd0a131..fbcc445f9f54 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3728,7 +3728,7 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const
rOutliner.SetVertical( pText->IsVerticalWriting() );
sal_uInt16 nParaIndex = 0;
- sal_uInt32 nParaSize;
+ sal_Int32 nParaSize;
const sal_Unicode* pCurrent, *pBuf = rText.GetBuffer();
const sal_Unicode* pEnd = rText.GetBuffer() + rText.Len();
@@ -3752,12 +3752,12 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const
break;
}
else
- nParaSize++;
+ ++nParaSize;
}
ESelection aSelection( nParaIndex, 0, nParaIndex, 0 );
- String aParagraph( pCurrent, (sal_uInt16)nParaSize );
- if ( !nParaIndex && !aParagraph.Len() ) // SJ: we are crashing if the first paragraph is empty ?
- aParagraph += (sal_Unicode)' '; // otherwise these two lines can be removed.
+ rtl::OUString aParagraph( pCurrent, nParaSize );
+ if ( !nParaIndex && aParagraph.isEmpty() ) // SJ: we are crashing if the first paragraph is empty ?
+ aParagraph += rtl::OUString(' '); // otherwise these two lines can be removed.
rOutliner.Insert( aParagraph, nParaIndex, 0 );
rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index d4988a0d9164..5575ef4debe1 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -442,7 +442,7 @@ SvStream& operator>>( SvStream& rIn, PptFontEntityAtom& rAtom )
cData[ i ] = ( nTemp >> 8 ) | ( nTemp << 8 );
#endif
}
- rAtom.aName = String( cData, i );
+ rAtom.aName = rtl::OUString(cData, i);
OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
rAtom.bAvailable = pDev->IsFontAvailable( rAtom.aName );
aHd.SeekToEndOfRecord( rIn );
@@ -2217,14 +2217,14 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
{
PPTPortionObj* pPortion;
sal_Unicode* pParaText = new sal_Unicode[ nTextSize ];
- sal_uInt32 nCurrentIndex = 0;
+ sal_Int32 nCurrentIndex = 0;
for ( pPortion = pPara->First(); pPortion; pPortion = pPara->Next() )
{
if ( pPortion->mpFieldItem )
pParaText[ nCurrentIndex++ ] = ' ';
else
{
- sal_uInt32 nCharacters = pPortion->Count();
+ sal_Int32 nCharacters = pPortion->Count();
const sal_Unicode* pSource = pPortion->maString.GetBuffer();
sal_Unicode* pDest = pParaText + nCurrentIndex;
@@ -2233,9 +2233,8 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
PptFontEntityAtom* pFontEnityAtom = GetFontEnityAtom( nFont );
if ( pFontEnityAtom && ( pFontEnityAtom->eCharSet == RTL_TEXTENCODING_SYMBOL ) )
{
- sal_uInt32 i;
sal_Unicode nUnicode;
- for ( i = 0; i < nCharacters; i++ )
+ for (sal_Int32 i = 0; i < nCharacters; i++ )
{
nUnicode = pSource[ i ];
if ( ! ( nUnicode & 0xff00 ) )
@@ -2253,7 +2252,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
ESelection aSelection( nParaIndex, 0, nParaIndex, 0 );
rOutliner.Insert( String(), nParaIndex, pPara->pParaSet->mnDepth );
- rOutliner.QuickInsertText( String( pParaText, (sal_uInt16)nCurrentIndex ), aSelection );
+ rOutliner.QuickInsertText( rtl::OUString(pParaText, nCurrentIndex), aSelection );
rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() );
if ( pS )
rOutliner.SetStyleSheet( nParaIndex, pS );
@@ -5054,7 +5053,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
}
}
if ( i )
- aString = String( pBuf, (sal_uInt16)i );
+ aString = rtl::OUString(pBuf, i);
delete[] pBuf;
}
else if( aTextHd.nRecType == PPT_PST_TextBytesAtom )