diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-13 17:27:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-09-17 09:05:13 +0200 |
commit | ed53efd9dba377a47765e2633163ca8714c81390 (patch) | |
tree | 06a0195d1f23d3e6046a988c2c175d92766c2068 | |
parent | 9d2016516b384e79fc0a80639ea4ae8356e5d98a (diff) |
convert remains of filter module from String to OUString
Change-Id: I87b1d2d944ba2b6e2e42adb2c948fff85ec021e1
21 files changed, 142 insertions, 145 deletions
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx index 3e5e364f83b8..85c18b4f9081 100644 --- a/filter/source/flash/swfexporter.cxx +++ b/filter/source/flash/swfexporter.cxx @@ -681,7 +681,7 @@ bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile Graphic aGraphic; GraphicFilter aFilter(false); - aFilter.ImportGraphic( aGraphic, String(aFile.GetURL()), *aFile.GetStream( STREAM_READ ) ); + aFilter.ImportGraphic( aGraphic, aFile.GetURL(), *aFile.GetStream( STREAM_READ ) ); BitmapEx rBitmapEx( aGraphic.GetBitmap(), Color(255,255,255) ); Rectangle clipRect; diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx index 43c65e71d004..57774aab33a9 100644 --- a/filter/source/graphic/GraphicExportFilter.cxx +++ b/filter/source/graphic/GraphicExportFilter.cxx @@ -126,7 +126,7 @@ sal_Bool SAL_CALL GraphicExportFilter::filter( const Sequence<PropertyValue>& rD SvMemoryStream aMemStream; const GraphicConversionParameters aParameters(aTargetSizePixel, true, true); - const sal_uInt16 nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), String(), aMemStream, nFilterFormat, &aFilterData ); + const sal_uInt16 nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), OUString(), aMemStream, nFilterFormat, &aFilterData ); if ( nResult == GRFILTER_OK ) { diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index 780e5e4bf222..3e2ad216e0f3 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -104,7 +104,7 @@ struct METChrSet { struct METChrSet * pSucc; sal_uInt8 nSet; - String aName; + OUString aName; FontWeight eWeight; }; @@ -214,7 +214,7 @@ private: void METFullArc(Point aCenter, double fMultiplier); void METPartialArcAtCurPos(Point aCenter, double fMultiplier, double fStartAngle, double fSweepAngle); - void METChrStr(Point aPt, String aStr); + void METChrStr(Point aPt, OUString aStr); void METSetArcParams(sal_Int32 nP, sal_Int32 nQ, sal_Int32 nR, sal_Int32 nS); void METSetColor(Color aColor); void METSetBackgroundColor(Color aColor); @@ -1357,7 +1357,7 @@ void METWriter::METPartialArcAtCurPos(Point aCenter, double fMultiplier, } -void METWriter::METChrStr( Point aPt, String aUniStr ) +void METWriter::METChrStr( Point aPt, OUString aUniStr ) { OString aStr(OUStringToOString(aUniStr, osl_getThreadTextEncoding())); @@ -1855,7 +1855,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) METSetChrCellSize(aGDIFont.GetSize()); METSetChrAngle(aGDIFont.GetOrientation()); METSetChrSet(FindChrSet(aGDIFont)); - METChrStr(aPt, String(pA->GetText(),pA->GetIndex(),pA->GetLen())); + METChrStr(aPt, pA->GetText().copy(pA->GetIndex(),pA->GetLen())); } break; @@ -1863,7 +1863,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) { const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA; sal_uInt16 i; - String aStr; + OUString aStr; Polygon aPolyDummy(1); short nOrientation; Point aPt( pA->GetPoint() ); @@ -1889,7 +1889,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) { Point aPt2; - for( i=0; i < aStr.Len(); i++ ) + for( i=0; i < aStr.getLength(); i++ ) { aPt2 = aPt; if ( i > 0 ) @@ -1902,7 +1902,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) aPt2 = aPolyDummy.GetPoint( 0 ); } } - METChrStr( aPt2, OUString( aStr.GetChar( i ) ) ); + METChrStr( aPt2, OUString( aStr[ i ] ) ); } } else @@ -1917,7 +1917,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) sal_uInt16 i; sal_Int32* pDXAry; sal_Int32 nNormSize; - String aStr; + OUString aStr; Polygon aPolyDummy(1); short nOrientation; Point aPt( pA->GetPoint() ); @@ -1940,10 +1940,10 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) METSetChrAngle( nOrientation = aGDIFont.GetOrientation() ); METSetChrSet(FindChrSet(aGDIFont)); aStr=String(pA->GetText(),pA->GetIndex(),pA->GetLen()); - pDXAry=new sal_Int32[aStr.Len()]; + pDXAry = new sal_Int32[aStr.getLength()]; nNormSize = aVDev.GetTextArray( aStr, pDXAry ); - for ( i = 0; i < aStr.Len(); i++ ) + for ( i = 0; i < aStr.getLength(); i++ ) { aPt2 = aPt; if ( i > 0 ) @@ -1956,7 +1956,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) aPt2 = aPolyDummy.GetPoint( 0 ); } } - METChrStr( aPt2, OUString( aStr.GetChar( i ) ) ); + METChrStr( aPt2, OUString( aStr[ i ] ) ); } delete[] pDXAry; diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 60419f7c78e6..b0a19bb0c2da 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -93,7 +93,7 @@ private: Color aDstBkCol; sal_Bool bDstBkColValid; Point aDstPenPosition; sal_Bool bDstPenPositionValid; Point aDstTextPosition; sal_Bool bDstTextPositionValid; - String aDstFontName; sal_uInt16 nDstFontNameId; sal_Bool bDstFontNameValid; + OUString aDstFontName; sal_uInt16 nDstFontNameId; sal_Bool bDstFontNameValid; sal_uLong nNumberOfActions; // number of actions in the GDIMetafile sal_uLong nNumberOfBitmaps; // number of bitmaps @@ -117,7 +117,7 @@ private: void WritePoint(const Point & rPoint); void WriteSize(const Size & rSize); void WriteRGBColor(const Color & rColor); - void WriteString( const String & rString ); + void WriteString( const OUString & rString ); void WriteRectangle(const Rectangle & rRect); void WritePolygon(const Polygon & rPoly); void WriteArcAngles(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); @@ -137,7 +137,7 @@ private: void WriteOpcode_RGBBkCol(const Color & rColor); void WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt); void WriteOpcode_LineFrom(const Point & rNewPt); - void WriteOpcode_Text(const Point & rPoint, const String& rString, sal_Bool bDelta); + void WriteOpcode_Text(const Point & rPoint, const OUString& rString, sal_Bool bDelta); void WriteOpcode_FontName(const Font & rFont); void WriteOpcode_ClipRect( const Rectangle& rRect ); void WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & rRect); @@ -158,7 +158,7 @@ private: void SetAttrForFrame(); void SetAttrForText(); - void WriteTextArray(Point & rPoint, const String& rString, const sal_Int32 * pDXAry); + void WriteTextArray(Point & rPoint, const OUString& rString, const sal_Int32 * pDXAry); void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); void WriteOpcodes(const GDIMetaFile & rMTF); @@ -308,7 +308,7 @@ void PictWriter::WriteRGBColor(const Color & rColor) *pPict << nR << nG << nB; } -void PictWriter::WriteString( const String & rString ) +void PictWriter::WriteString( const OUString & rString ) { OString aString(OUStringToOString(rString, osl_getThreadTextEncoding())); sal_Int32 nLen = aString.getLength(); @@ -643,7 +643,7 @@ void PictWriter::WriteOpcode_LineFrom(const Point & rNewPt) } -void PictWriter::WriteOpcode_Text(const Point & rPoint, const String& rString, sal_Bool bDelta) +void PictWriter::WriteOpcode_Text(const Point & rPoint, const OUString& rString, sal_Bool bDelta) { Point aPoint = OutputDevice::LogicToLogic( rPoint, aSrcMapMode, @@ -1315,10 +1315,8 @@ void PictWriter::SetAttrForText() } -void PictWriter::WriteTextArray(Point & rPoint, const String& rString, const sal_Int32 * pDXAry) +void PictWriter::WriteTextArray(Point & rPoint, const OUString& rString, const sal_Int32 * pDXAry) { - sal_uInt16 i,nLen; - sal_Unicode c; sal_Bool bDelta; Point aPt; @@ -1327,10 +1325,10 @@ void PictWriter::WriteTextArray(Point & rPoint, const String& rString, const sal else { bDelta = sal_False; - nLen = rString.Len(); - for ( i = 0; i < nLen; i++ ) + sal_Int32 nLen = rString.getLength(); + for ( sal_Int32 i = 0; i < nLen; i++ ) { - c = rString.GetChar( i ); + sal_Unicode c = rString[ i ]; if ( c && ( c != 0x20 ) ) { aPt = rPoint; @@ -1723,7 +1721,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) } SetAttrForText(); - String aStr( pA->GetText(),pA->GetIndex(),pA->GetLen() ); + OUString aStr = pA->GetText().copy( pA->GetIndex(),pA->GetLen() ); WriteOpcode_Text( aPt, aStr, sal_False ); } break; @@ -1743,7 +1741,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) aPt.Y()-=(long)aVirDev.GetFontMetric(aSrcFont).GetDescent(); } SetAttrForText(); - String aStr( pA->GetText(),pA->GetIndex(),pA->GetLen() ); + OUString aStr = pA->GetText().copy( pA->GetIndex(),pA->GetLen() ); WriteTextArray( aPt, aStr, pA->GetDXArray() ); break; } @@ -1752,9 +1750,9 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) { const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pMA; Point aPt( pA->GetPoint() ); - String aStr( pA->GetText(),pA->GetIndex(),pA->GetLen() ); + OUString aStr = pA->GetText().copy( pA->GetIndex(),pA->GetLen() ); VirtualDevice aVirDev; - sal_Int32* pDXAry = new sal_Int32[ aStr.Len() ]; + sal_Int32* pDXAry = new sal_Int32[ aStr.getLength() ]; sal_Int32 nNormSize( aVirDev.GetTextArray( aStr,pDXAry ) ); sal_uInt16 i; @@ -1766,7 +1764,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) aPt.Y()-=(long)aVirDev.GetFontMetric(aSrcFont).GetDescent(); } - for ( i = 0; i < aStr.Len() - 1; i++ ) + for ( i = 0; i < aStr.getLength() - 1; i++ ) pDXAry[ i ] = pDXAry[ i ] * ( (long)pA->GetWidth() ) / nNormSize; SetAttrForText(); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index fcd7d3a74b9a..3a7701572673 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -61,7 +61,7 @@ struct ChrSet { struct ChrSet * pSucc; sal_uInt8 nSet; - String aName; + OUString aName; FontWeight eWeight; }; @@ -208,7 +208,7 @@ private: void ImplSetClipRegion( Region& rRegion ); void ImplBmp( Bitmap*, Bitmap*, const Point &, double nWidth, double nHeight ); - void ImplText( const String& rUniString, const Point& rPos, const sal_Int32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev ); + void ImplText( const OUString& rUniString, const Point& rPos, const sal_Int32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev ); void ImplSetAttrForText( const Point & rPoint ); void ImplWriteCharacter( sal_Char ); void ImplWriteString( const OString&, VirtualDevice& rVDev, const sal_Int32* pDXArry = NULL, sal_Bool bStretch = sal_False ); @@ -759,8 +759,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) { const MetaTextAction * pA = (const MetaTextAction*) pMA; - String aUniStr( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - Point aPoint( pA->GetPoint() ); + OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); + Point aPoint( pA->GetPoint() ); ImplText( aUniStr, aPoint, NULL, 0, rVDev ); } @@ -775,8 +775,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case META_STRETCHTEXT_ACTION : { const MetaStretchTextAction* pA = (const MetaStretchTextAction*)pMA; - String aUniStr( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - Point aPoint( pA->GetPoint() ); + OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); + Point aPoint( pA->GetPoint() ); ImplText( aUniStr, aPoint, NULL, pA->GetWidth(), rVDev ); } @@ -785,8 +785,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case META_TEXTARRAY_ACTION: { const MetaTextArrayAction* pA = (const MetaTextArrayAction*)pMA; - String aUniStr( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - Point aPoint( pA->GetPoint() ); + OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); + Point aPoint( pA->GetPoint() ); ImplText( aUniStr, aPoint, pA->GetDXArray(), 0, rVDev ); } @@ -2085,10 +2085,9 @@ void PSWriter::ImplWriteString( const OString& rString, VirtualDevice& rVDev, co // ------------------------------------------------------------------------ -void PSWriter::ImplText( const String& rUniString, const Point& rPos, const sal_Int32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev ) +void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const sal_Int32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev ) { - sal_uInt16 nLen = rUniString.Len(); - if ( !nLen ) + if ( rUniString.isEmpty() ) return; if ( mnTextMode == 0 ) // using glpyh outlines { diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 7c57223477fd..274a912e4f1d 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -857,7 +857,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha uno::Any aFirstQuery( maXShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0) )); if( aFirstQuery >>= xText ) { - String aStr( OUString::createFromAscii( pString ) ); + OUString aStr( OUString::createFromAscii( pString ) ); uno::Reference< text::XTextCursor > aXTextCursor( xText->createTextCursor() ); { @@ -922,7 +922,7 @@ void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFla uno::Any aFirstQuery( aShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0)) ); if( aFirstQuery >>= xText ) { - String aStr( OUString::createFromAscii( pString ) ); + OUString aStr( OUString::createFromAscii( pString ) ); uno::Reference< text::XTextCursor > aXTextCursor( xText->createTextCursor() ); if ( aXTextCursor.is() ) diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 5724115dd776..5ec8e34059d9 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -973,7 +973,7 @@ void OS2METReader::ReadChrStr(sal_Bool bGivenPos, sal_Bool bMove, sal_Bool bExtr for (i=0; i<nLen; i++) *pOS2MET >> pChr[i]; pChr[nLen] = 0; - String aStr( (const sal_Char*)pChr, osl_getThreadTextEncoding() ); + OUString aStr( (const sal_Char*)pChr, strlen(pChr), osl_getThreadTextEncoding() ); SetRasterOp(aAttr.eChrMix); if (pVirDev->GetFont()!=aFont) pVirDev->SetFont(aFont); @@ -2240,9 +2240,9 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize) pOS2MET->SeekRel(1); pOS2MET->Read( &str, 32 ); str[ 32 ] = 0; - String aStr( (const sal_Char*)str, osl_getThreadTextEncoding() ); - if ( aStr.CompareIgnoreCaseToAscii( "Helv" ) == COMPARE_EQUAL ) - aStr = OUString("Helvetica"); + OUString aStr( (const sal_Char*)str, strlen(str), osl_getThreadTextEncoding() ); + if ( aStr.compareToIgnoreAsciiCase( "Helv" ) == 0 ) + aStr = "Helvetica"; pF->aFont.SetName( aStr ); break; } diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 9acd4c96be2f..c69dc01328de 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -686,7 +686,7 @@ sal_uLong PictReader::ReadAndDrawText() while ( nLen > 0 && ( (unsigned char)sText[ nLen - 1 ] ) < 32 ) nLen--; sText[ nLen ] = 0; - String aString( (const sal_Char*)&sText, aActFont.GetCharSet()); + OUString aString( (const sal_Char*)&sText, strlen(sText), aActFont.GetCharSet()); pVirDev->DrawText( Point( aTextPosition.X(), aTextPosition.Y() ), aString ); return nDataLen; } @@ -1484,7 +1484,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) *pPict >> nByteLen; nLen=((sal_uInt16)nByteLen)&0x00ff; pPict->Read( &sFName, nLen ); sFName[ nLen ] = 0; - String aString( (const sal_Char*)&sFName, osl_getThreadTextEncoding() ); + OUString aString( (const sal_Char*)&sFName, strlen(sFName), osl_getThreadTextEncoding() ); aActFont.SetName( aString ); eActMethod=PDM_UNDEFINED; break; diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 425fb43413a5..c214b8145149 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -204,7 +204,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ::cppu::any2bool( rObj.GetUsrAny() ) ) || rObj.GetType() == "drawing.Measure" ) { - rObj.SetType( String("drawing.dontknow")); + rObj.SetType("drawing.dontknow"); } const ::com::sun::star::awt::Size aSize100thmm( rObj.GetShapeRef()->getSize() ); @@ -1140,7 +1140,7 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx ) static const xub_StrLen nPrefix = sizeof(aPrefix)-1; // detect name first to make below test (is group) work - mType = String( mXShape->getShapeType() ); + mType = OUString( mXShape->getShapeType() ); mType = mType.copy( nPrefix ); // strip "com.sun.star." sal_Int32 nPos = mType.indexOf( "Shape" ); mType = mType.replaceAt( nPos, 5, "" ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 56ade5f14032..c869d1e2684f 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2820,7 +2820,7 @@ void DffPropertyReader::ImportGradientColor( SfxItemSet& aSet,MSO_FillType eMSO_ //Intensity has been merged into color. So here just set is as 100 aGrad.SetStartIntens( 100 ); aGrad.SetEndIntens( 100 ); - aSet.Put( XFillGradientItem( String(), aGrad ) ); + aSet.Put( XFillGradientItem( OUString(), aGrad ) ); //Construct tranparency item. This item can coodinate with both solid and gradient. if ( dTrans < 1.0 || dBackTrans < 1.0 ) { @@ -2830,7 +2830,7 @@ void DffPropertyReader::ImportGradientColor( SfxItemSet& aSet,MSO_FillType eMSO_ aCol2 = Color(nEndCol, nEndCol, nEndCol); XGradient aGrad2( aCol2 , aCol1 , eGrad, nAngle, nFocusX, nFocusY ); - aSet.Put( XFillFloatTransparenceItem( String(), aGrad2 ) ); + aSet.Put( XFillFloatTransparenceItem( OUString(), aGrad2 ) ); } } @@ -3527,7 +3527,7 @@ void SvxMSDffManager::ReadObjText( SvStream& rStream, SdrObject* pObj ) { bool bUniCode = ( aHd.nRecType == DFF_PST_TextCharsAtom ); sal_uInt32 nBytes = aHd.nRecLen; - String aStr = MSDFFReadZString( rStream, nBytes, bUniCode ); + OUString aStr = MSDFFReadZString( rStream, nBytes, bUniCode ); ReadObjText( aStr, pObj ); } break; diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx index 20439f50d7c0..4c21c3a18ff9 100644 --- a/filter/source/msfilter/rtfutil.cxx +++ b/filter/source/msfilter/rtfutil.cxx @@ -132,13 +132,13 @@ OString OutString(const OUString &rStr, rtl_TextEncoding eDestEnc, bool bUnicode } /// Checks if lossless conversion of the string to eDestEnc is possible or not. -static bool TryOutString(const String &rStr, rtl_TextEncoding eDestEnc) +static bool TryOutString(const OUString &rStr, rtl_TextEncoding eDestEnc) { int nUCMode = 1; - for (xub_StrLen n = 0; n < rStr.Len(); ++n) + for (sal_Int32 n = 0; n < rStr.getLength(); ++n) { bool bRet; - OutChar(rStr.GetChar(n), &nUCMode, eDestEnc, &bRet); + OutChar(rStr[n], &nUCMode, eDestEnc, &bRet); if (!bRet) return false; } diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index f8a0f42d35e0..3a346a826c19 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1825,14 +1825,14 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, xObjStor->SetClass( SvGlobalName( aId.n1, aId.n2, aId.n3, aId.n4, aId.n5, aId.n6, aId.n7, aId.n8, aId.n9, aId.n10, aId.n11 ), pObjStor->GetFormat(), pObjStor->GetUserName() ); } - SotStorageStreamRef xSrcTst = xObjStor->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "\1Ole" ) ) ); + SotStorageStreamRef xSrcTst = xObjStor->OpenSotStream( "\1Ole" ); if ( xSrcTst.Is() ) { sal_uInt8 aTestA[ 10 ]; sal_Bool bGetItAsOle = ( sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) ); if ( !bGetItAsOle ) { // maybe there is a contentsstream in here - xSrcTst = xObjStor->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Contents" ) ), STREAM_READWRITE | STREAM_NOCREATE ); + xSrcTst = xObjStor->OpenSotStream( "Contents", STREAM_READWRITE | STREAM_NOCREATE ); bGetItAsOle = ( xSrcTst.Is() && sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) ); } if ( bGetItAsOle ) @@ -1988,11 +1988,11 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt if ( xSource.Is() && xDest.Is() ) { // is this a visual basic storage ? - SotStorageRef xSubStorage = xSource->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM( "VBA" ) ), + SotStorageRef xSubStorage = xSource->OpenSotStorage( "VBA", STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYALL ); if( xSubStorage.Is() && ( SVSTREAM_OK == xSubStorage->GetError() ) ) { - SotStorageRef xMacros = xDest->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM( "MACROS" ) ) ); + SotStorageRef xMacros = xDest->OpenSotStorage( "MACROS" ); if ( xMacros.Is() ) { SvStorageInfoList aList; @@ -2014,10 +2014,10 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt SotStorageRef xVBA = SotStorage::OpenOLEStorage( xDoc, SvxImportMSVBasic::GetMSBasicStorageName() ); if ( xVBA.Is() && ( xVBA->GetError() == SVSTREAM_OK ) ) { - SotStorageRef xSubVBA = xVBA->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Overhead" ) ) ); + SotStorageRef xSubVBA = xVBA->OpenSotStorage( "_MS_VBA_Overhead" ); if ( xSubVBA.Is() && ( xSubVBA->GetError() == SVSTREAM_OK ) ) { - SotStorageStreamRef xOriginal = xSubVBA->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Overhead2" ) ) ); + SotStorageStreamRef xOriginal = xSubVBA->OpenSotStream( "_MS_VBA_Overhead2" ); if ( xOriginal.Is() && ( xOriginal->GetError() == SVSTREAM_OK ) ) { if ( nPersistPtr && ( nPersistPtr < nPersistPtrAnz ) ) @@ -2249,7 +2249,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* SfxStyleSheet* pS = ( ppStyleSheetAry ) ? ppStyleSheetAry[ pPara->pParaSet->mnDepth ] : pSheet; ESelection aSelection( nParaIndex, 0, nParaIndex, 0 ); - rOutliner.Insert( String(), nParaIndex, pPara->pParaSet->mnDepth ); + rOutliner.Insert( OUString(), nParaIndex, pPara->pParaSet->mnDepth ); rOutliner.QuickInsertText( OUString(pParaText, nCurrentIndex), aSelection ); rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() ); if ( pS ) @@ -2370,11 +2370,11 @@ sal_Bool SdrPowerPointImport::SeekToContentOfProgTag( sal_Int32 nVersion, SvStre sal_uInt32 i = rContentHd.nRecLen >> 1; if ( i > n ) { - String aPre = read_uInt16s_ToOUString(rSt, n); + OUString aPre = read_uInt16s_ToOUString(rSt, n); n = (sal_uInt16)( i - 6 ); - String aSuf = read_uInt16s_ToOUString(rSt, n); - sal_Int32 nV = aSuf.ToInt32(); - if ( ( nV == nVersion ) && ( aPre == String( RTL_CONSTASCII_USTRINGPARAM( "___PPT" ) ) ) ) + OUString aSuf = read_uInt16s_ToOUString(rSt, n); + sal_Int32 nV = aSuf.toInt32(); + if ( ( nV == nVersion ) && ( aPre == "___PPT" ) ) { rContentHd.SeekToEndOfRecord( rSt ); rSt >> rContentHd; @@ -2997,7 +2997,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage DffObjData aObjData( aEscherObjectHd, Rectangle( 0, 0, 28000, 21000 ), 0 ); ApplyAttributes( rStCtrl, *pSet, aObjData ); Color aColor( MSO_CLR_ToColor( nColor ) ); - pSet->Put( XFillColorItem( String(), aColor ) ); + pSet->Put( XFillColorItem( OUString(), aColor ) ); } } } @@ -3429,83 +3429,83 @@ sal_Bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rM case 0 : { rNumberFormat.SetNumberingType( SVX_NUM_CHARS_LOWER_LETTER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ); + rNumberFormat.SetSuffix( "." ); } break; case 1 : { rNumberFormat.SetNumberingType( SVX_NUM_CHARS_UPPER_LETTER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ); + rNumberFormat.SetSuffix( "." ); } break; case 2 : { rNumberFormat.SetNumberingType( SVX_NUM_ARABIC ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); + rNumberFormat.SetSuffix( ")" ); } break; case 3 : { rNumberFormat.SetNumberingType( SVX_NUM_ARABIC ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ); + rNumberFormat.SetSuffix( "." ); } break; case 4 : { rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_LOWER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); - rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) ); + rNumberFormat.SetSuffix( ")" ); + rNumberFormat.SetPrefix( "(" ); } break; case 5 : { rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_LOWER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); + rNumberFormat.SetSuffix( ")" ); } break; case 6 : { rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_LOWER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ); + rNumberFormat.SetSuffix( "." ); } break; case 7 : { rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_UPPER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ); + rNumberFormat.SetSuffix( "." ); } break; case 8 : { rNumberFormat.SetNumberingType( SVX_NUM_CHARS_LOWER_LETTER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); - rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) ); + rNumberFormat.SetSuffix( ")" ); + rNumberFormat.SetPrefix( "(" ); } break; case 9 : { rNumberFormat.SetNumberingType( SVX_NUM_CHARS_LOWER_LETTER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); + rNumberFormat.SetSuffix( ")" ); } break; case 10 : { rNumberFormat.SetNumberingType( SVX_NUM_CHARS_UPPER_LETTER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); - rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) ); + rNumberFormat.SetSuffix( ")" ); + rNumberFormat.SetPrefix( "(" ); } break; case 11 : { rNumberFormat.SetNumberingType( SVX_NUM_CHARS_UPPER_LETTER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); + rNumberFormat.SetSuffix( ")" ); } break; case 12 : { rNumberFormat.SetNumberingType( SVX_NUM_ARABIC ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); - rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) ); + rNumberFormat.SetSuffix( ")" ); + rNumberFormat.SetPrefix( "(" ); } break; case 13 : @@ -3516,14 +3516,14 @@ sal_Bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rM case 14 : { rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_UPPER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); - rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) ); + rNumberFormat.SetSuffix( ")" ); + rNumberFormat.SetPrefix( "(" ); } break; case 15 : { rNumberFormat.SetNumberingType( SVX_NUM_ROMAN_UPPER ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) ); + rNumberFormat.SetSuffix( ")" ); } break; case 16: // Simplified Chinese. @@ -3534,7 +3534,7 @@ sal_Bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rM case 17: // Simplified Chinese with single-byte period. { rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_UPPER_ZH ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ); + rNumberFormat.SetSuffix( "." ); } break; case 18: // Double byte circle numbers. @@ -3552,7 +3552,7 @@ sal_Bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rM case 22: // Traditional Chinese with single-byte period. { rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_UPPER_ZH_TW ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ); + rNumberFormat.SetSuffix( "." ); } break; case 26: // Japanese/Korean. @@ -3563,7 +3563,7 @@ sal_Bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rM case 27: // Japanese/Korean with single-byte period. { rNumberFormat.SetNumberingType( SVX_NUM_NUMBER_LOWER_ZH ); - rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ); + rNumberFormat.SetSuffix( "." ); } break; case 28: // Double-byte Arabic numbers. @@ -5299,7 +5299,7 @@ struct FieldEntry sal_uInt32 nFieldType; sal_uInt32 nFieldStartPos; sal_uInt32 nFieldEndPos; - String aFieldUrl; + OUString aFieldUrl; FieldEntry( sal_uInt32 nType, sal_uInt32 nStart, sal_uInt32 nEnd ) { @@ -5507,9 +5507,9 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s if ( pFontEnityAtom ) { rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, - String(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO_CJK ) ); + OUString(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO_CJK ) ); rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, - String(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO_CTL ) ); + OUString(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO_CTL ) ); } } } @@ -5518,13 +5518,13 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nVal ); if ( pFontEnityAtom ) { - rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, String(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO ) ); + rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, OUString(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO ) ); // #i119475# bullet font info for CJK and CTL if ( RTL_TEXTENCODING_SYMBOL == pFontEnityAtom->eCharSet ) { - rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, String(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO_CJK ) ); - rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, String(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO_CTL ) ); + rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, OUString(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO_CJK ) ); + rSet.Put( SvxFontItem( pFontEnityAtom->eFamily, pFontEnityAtom->aName, OUString(), pFontEnityAtom->ePitch, pFontEnityAtom->eCharSet, EE_CHAR_FONTINFO_CTL ) ); } } } @@ -6706,7 +6706,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport { sal_Unicode n; xub_StrLen nLen; - String aStr; + OUString aStr; bool inquote = sal_False; for (nLen = 0, n = 0; nLen < 64; nLen++) { @@ -6730,7 +6730,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport } else { - aStr += n; + aStr += OUString(n); } } } @@ -6780,7 +6780,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport aTarget += "#"; aTarget += pHyperlink->aConvSubString; } - pEntry->pField1 = new SvxFieldItem( SvxURLField( aTarget, String(), SVXURLFORMAT_REPR ), EE_FEATURE_FIELD ); + pEntry->pField1 = new SvxFieldItem( SvxURLField( aTarget, OUString(), SVXURLFORMAT_REPR ), EE_FEATURE_FIELD ); } } break; @@ -7317,7 +7317,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) { case XFILL_SOLID : { - static const OUString sFillColor( String( RTL_CONSTASCII_USTRINGPARAM( "FillColor" ) ) ); + static const OUString sFillColor( "FillColor" ); eFS = com::sun::star::drawing::FillStyle_SOLID; Color aFillColor( ((XFillColorItem&)pObj->GetMergedItem( XATTR_FILLCOLOR )).GetColorValue() ); sal_Int32 nFillColor( aFillColor.GetColor() ); @@ -7341,7 +7341,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) aGradient.EndIntensity = aXGradient.GetEndIntens(); aGradient.StepCount = aXGradient.GetSteps(); - static const OUString sFillGradient( String( RTL_CONSTASCII_USTRINGPARAM( "FillGradient" ) ) ); + static const OUString sFillGradient( "FillGradient" ); xPropSet->setPropertyValue( sFillGradient, Any( aGradient ) ); } break; @@ -7375,12 +7375,12 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) break; } - static const OUString sFillStyle( String( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" ) ) ); + static const OUString sFillStyle( "FillStyle" ); xPropSet->setPropertyValue( sFillStyle, Any( eFS ) ); if ( eFillStyle != XFILL_NONE ) { sal_Int16 nFillTransparence( ( (const XFillTransparenceItem&)pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() ); - static const OUString sFillTransparence( String( RTL_CONSTASCII_USTRINGPARAM( "FillTransparence" ) ) ); + static const OUString sFillTransparence( "FillTransparence" ); xPropSet->setPropertyValue( sFillTransparence, Any( nFillTransparence ) ); } } @@ -7419,10 +7419,10 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl std::vector< sal_Int32 >::const_iterator aIter( vPositions.begin() ); while( aIter != vPositions.end() ) { - static const OUString sTopBorder( String( RTL_CONSTASCII_USTRINGPARAM( "TopBorder" ) ) ); - static const OUString sBottomBorder( String( RTL_CONSTASCII_USTRINGPARAM( "BottomBorder" ) ) ); - static const OUString sLeftBorder( String( RTL_CONSTASCII_USTRINGPARAM( "LeftBorder" ) ) ); - static const OUString sRightBorder( String( RTL_CONSTASCII_USTRINGPARAM( "RightBorder" ) ) ); + static const OUString sTopBorder( "TopBorder" ); + static const OUString sBottomBorder( "BottomBorder" ); + static const OUString sLeftBorder( "LeftBorder" ); + static const OUString sRightBorder( "RightBorder" ); static const OUString sDiagonalTLBR( "DiagonalTLBR" ); static const OUString sDiagonalBLTR( "DiagonalBLTR" ); diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 3f7a9a4dede8..54e40ab32aa6 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -1469,30 +1469,30 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r { case vcl::PDFWriter::Warning_Transparency_Omitted_PDFA: { - sal_uInt16 nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_PDFA_SHORT ) ), + sal_uInt16 nPos = maErrors.InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_PDFA_SHORT ) ), aWarnImg ); - maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_PDFA ) ) ); + maErrors.SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_PDFA ) ) ); } break; case vcl::PDFWriter::Warning_Transparency_Omitted_PDF13: { - sal_uInt16 nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_VERSION_SHORT ) ), + sal_uInt16 nPos = maErrors.InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_VERSION_SHORT ) ), aWarnImg ); - maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_VERSION ) ) ); + maErrors.SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_VERSION ) ) ); } break; case vcl::PDFWriter::Warning_FormAction_Omitted_PDFA: { - sal_uInt16 nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_FORMACTION_PDFA_SHORT ) ), + sal_uInt16 nPos = maErrors.InsertEntry( OUString( PDFFilterResId( STR_WARN_FORMACTION_PDFA_SHORT ) ), aWarnImg ); - maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_FORMACTION_PDFA ) ) ); + maErrors.SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_FORMACTION_PDFA ) ) ); } break; case vcl::PDFWriter::Warning_Transparency_Converted: { - sal_uInt16 nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED_SHORT ) ), + sal_uInt16 nPos = maErrors.InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_CONVERTED_SHORT ) ), aWarnImg ); - maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) ); + maErrors.SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) ); } break; default: @@ -1505,8 +1505,8 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r if( maErrors.GetEntryCount() > 0 ) { maErrors.SelectEntryPos( 0 ); - String* pStr = reinterpret_cast<String*>(maErrors.GetEntryData( 0 )); - maExplanation.SetText( pStr ? *pStr : String() ); + OUString* pStr = reinterpret_cast<OUString*>(maErrors.GetEntryData( 0 )); + maExplanation.SetText( pStr ? *pStr : OUString() ); } // adjust layout @@ -1542,13 +1542,13 @@ ImplErrorDialog::~ImplErrorDialog() { // free strings again for( sal_uInt16 n = 0; n < maErrors.GetEntryCount(); n++ ) - delete (String*)maErrors.GetEntryData( n ); + delete (OUString*)maErrors.GetEntryData( n ); } IMPL_LINK_NOARG(ImplErrorDialog, SelectHdl) { - String* pStr = reinterpret_cast<String*>(maErrors.GetEntryData( maErrors.GetSelectEntryPos() )); - maExplanation.SetText( pStr ? *pStr : String() ); + OUString* pStr = reinterpret_cast<OUString*>(maErrors.GetEntryData( maErrors.GetSelectEntryPos() )); + maExplanation.SetText( pStr ? *pStr : OUString() ); return 0; } diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 1f7fc5be9b56..3cc481ead20c 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -883,7 +883,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue sal_Int32 nTotalPageCount = aRangeEnum.size(); if ( bSecondPassForImpressNotes ) nTotalPageCount *= 2; - mxStatusIndicator->start( String( ResId( PDF_PROGRESS_BAR, *pResMgr ) ), nTotalPageCount ); + mxStatusIndicator->start( OUString( ResId( PDF_PROGRESS_BAR, *pResMgr ) ), nTotalPageCount ); delete pResMgr; } } diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx index fc9c2c73d16b..7e7c5b93a29a 100644 --- a/filter/source/svg/impsvgdialog.cxx +++ b/filter/source/svg/impsvgdialog.cxx @@ -44,25 +44,25 @@ ImpSVGDialog::ImpSVGDialog( Window* pParent/*, ResMgr& rResMgr*/, Sequence< Prop maBTOK( this, WB_DEF_OK ), maBTCancel( this ), maBTHelp( this ), - maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( SVG_EXPORTFILTER_CONFIGPATH ) ), &rFilterData ), + maConfigItem( SVG_EXPORTFILTER_CONFIGPATH, &rFilterData ), mbOldNativeDecoration( sal_False ) { - SetText( String( RTL_CONSTASCII_USTRINGPARAM( "SVG Export Options" ) ) ); + SetText( "SVG Export Options" ); SetOutputSizePixel( Size( implMap( *this, 177 ), implMap( *this, 77 ) ) ); - maFI.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Export" ) ) ); + maFI.SetText( "Export" ); maFI.SetPosSizePixel( Point( implMap( *this, 6 ), implMap( *this, 3 ) ), Size( implMap( *this, 165 ), implMap( *this, 8 ) ) ); - maCBTinyProfile.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Use SVG Tiny profile" ) ) ); + maCBTinyProfile.SetText( "Use SVG Tiny profile" ); maCBTinyProfile.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 14 ) ), Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); - maCBEmbedFonts.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Embed fonts" ) ) ); + maCBEmbedFonts.SetText( "Embed fonts" ); maCBEmbedFonts.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 27 ) ), Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); - maCBUseNativeDecoration.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Use SVG native text decoration" ) ) ); + maCBUseNativeDecoration.SetText( "Use SVG native text decoration" ); maCBUseNativeDecoration.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 41 ) ), Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); diff --git a/filter/source/svg/svgdialog.cxx b/filter/source/svg/svgdialog.cxx index 54563856b143..7a5afb9f17d3 100644 --- a/filter/source/svg/svgdialog.cxx +++ b/filter/source/svg/svgdialog.cxx @@ -212,7 +212,7 @@ Sequence< PropertyValue > SAL_CALL SVGDialog::getPropertyValues() if( i == nCount ) { maMediaDescriptor.realloc( ++nCount ); - maMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( SVG_FILTER_DATA_NAME ) ); + maMediaDescriptor[ i ].Name = SVG_FILTER_DATA_NAME; } maMediaDescriptor[ i ].Value <<= maFilterData; diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 8e6d2933da48..96f342336800 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -2128,7 +2128,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) if( eDateFormat ) { - String sDate; + OUString sDate; LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() ); SvNumberFormatter * pNumberFormatter = new SvNumberFormatter( ::comphelper::getProcessComponentContext(), LANGUAGE_SYSTEM ); // We always collect the characters obtained by using the SVXDATEFORMAT_B (as: 13.02.1996) diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index c061bfb3c475..2ce7bb0a767b 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -101,7 +101,7 @@ void SVGFontExport::implCollectGlyphs() case( META_TEXT_ACTION ): { const MetaTextAction* pA = (const MetaTextAction*) pAction; - aText = String( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); } break; @@ -115,14 +115,14 @@ void SVGFontExport::implCollectGlyphs() case( META_TEXTARRAY_ACTION ): { const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; - aText = String( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); } break; case( META_STRETCHTEXT_ACTION ): { const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction; - aText = String( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); } break; diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 2e44f4beb655..0611a64988a9 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -727,12 +727,12 @@ void SVGTextWriter::addFontAttributes( sal_Bool bIsTextContainer ) if( maCurrentFont != maParentFont ) { - const String& rsCurFontName = maCurrentFont.GetName(); + const OUString& rsCurFontName = maCurrentFont.GetName(); long int nCurFontSize = maCurrentFont.GetHeight(); FontItalic eCurFontItalic = maCurrentFont.GetItalic(); FontWeight eCurFontWeight = maCurrentFont.GetWeight(); - const String& rsParFontName = maParentFont.GetName(); + const OUString& rsParFontName = maParentFont.GetName(); long int nParFontSize = maParentFont.GetHeight(); FontItalic eParFontItalic = maParentFont.GetItalic(); FontWeight eParFontWeight = maParentFont.GetWeight(); @@ -3386,9 +3386,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( nWriteFlags & SVGWRITER_WRITE_TEXT ) { const MetaTextAction* pA = (const MetaTextAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + const OUString aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); - if( aText.Len() ) + if( !aText.isEmpty() ) { if( mrExport.IsUsePositionedCharacters() ) { @@ -3433,9 +3433,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( nWriteFlags & SVGWRITER_WRITE_TEXT ) { const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + const OUString aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); - if( aText.Len() ) + if( !aText.isEmpty() ) { if( mrExport.IsUsePositionedCharacters() ) { @@ -3457,9 +3457,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( nWriteFlags & SVGWRITER_WRITE_TEXT ) { const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + const OUString aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); - if( aText.Len() ) + if( !aText.isEmpty() ) { if( mrExport.IsUsePositionedCharacters() ) { diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 3a9a92a6afec..4754ddc5299f 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1228,7 +1228,7 @@ void XMLFilterSettingsDialog::initFilterList() application_info_impl::application_info_impl( const sal_Char * pDocumentService, ResId& rUINameRes, const sal_Char * mpXMLImporter, const sal_Char * mpXMLExporter ) : maDocumentService( pDocumentService, strlen( pDocumentService ), RTL_TEXTENCODING_ASCII_US ), - maDocumentUIName( String( rUINameRes ) ), + maDocumentUIName( OUString( rUINameRes ) ), maXMLImporter( mpXMLImporter, strlen( mpXMLImporter ), RTL_TEXTENCODING_ASCII_US ), maXMLExporter( mpXMLExporter, strlen( mpXMLExporter ), RTL_TEXTENCODING_ASCII_US ) { diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 405017f65a0d..568def0c97b0 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -261,8 +261,8 @@ void XMLFilterTestDialog::initDialog() if( NULL == m_pFilterInfo ) return; - String aTitle( m_sDialogTitle ); - aTitle.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM("%s") ), m_pFilterInfo->maFilterName ); + OUString aTitle( m_sDialogTitle ); + aTitle = aTitle.replaceFirst( "%s", m_pFilterInfo->maFilterName ); SetText( aTitle ); bool bImport = (m_pFilterInfo->maFlags & 1) == 1; |