diff options
author | Ricardo Montania <ricardo@linuxafundo.com.br> | 2013-05-06 11:12:34 -0300 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-05-09 11:22:49 +0000 |
commit | 9a9110b7d9e158386cd8b60867555fc0065902d1 (patch) | |
tree | 372531b2b02558a622f5e115664ac768d147f943 /filter | |
parent | b4d9ed143471659ef0905379c5ebd60ee711c1e4 (diff) |
Drop String.AppendAscii from filter
Change-Id: I73f61b9a20297b6b704aca52b1fc9efac563a224
Reviewed-on: https://gerrit.libreoffice.org/3799
Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com>
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 17 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 16 |
2 files changed, 13 insertions, 20 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 31ad87042009..e3bf1173bc10 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -404,7 +404,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) ); aVDev.DrawRect( aRect ); - String aString; + OUString aString; int nLen; sal_uInt8* pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%Title:", nBytesRead - 32, 8 ); if ( pDest ) @@ -416,9 +416,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0; if ( strcmp( (const char*)pDest, "none" ) != 0 ) { - aString.AppendAscii( " Title:" ); - aString.AppendAscii( (char*)pDest ); - aString.AppendAscii( "\n" ); + aString += " Title:" + OUString::createFromAscii( (char*)pDest ) + "\n"; } pDest[ nLen ] = aOldValue; } @@ -430,9 +428,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, pDest++; nLen = ImplGetLen( pDest, 32 ); sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0; - aString.AppendAscii( " Creator:" ); - aString.AppendAscii( (char*)pDest ); - aString.AppendAscii( "\n" ); + aString += " Creator:" + OUString::createFromAscii( (char*)pDest ) + "\n"; pDest[ nLen ] = aOldValue; } pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%CreationDate:", nBytesRead - 32, 15 ); @@ -445,9 +441,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0; if ( strcmp( (const char*)pDest, "none" ) != 0 ) { - aString.AppendAscii( " CreationDate:" ); - aString.AppendAscii( (char*)pDest ); - aString.AppendAscii( "\n" ); + aString += " CreationDate:" + OUString::createFromAscii( (char*)pDest ) + "\n"; } pDest[ nLen ] = aOldValue; } @@ -459,8 +453,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, long nNumber = ImplGetNumber( &pDest, nCount ); if ( nCount && ( (sal_uInt32)nNumber < 10 ) ) { - aString.AppendAscii( " LanguageLevel:" ); - aString.Append( OUString::valueOf( nNumber ) ); + aString += " LanguageLevel:" + OUString::valueOf( nNumber ); } } aVDev.DrawText( aRect, aString, TEXT_DRAW_CLIP | TEXT_DRAW_MULTILINE ); diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index c6e26487dbad..23eea9744b24 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -400,20 +400,20 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue // getting the string for the creator - String aCreator; + OUString aCreator; Reference< XServiceInfo > xInfo( mxSrcDoc, UNO_QUERY ); if ( xInfo.is() ) { if ( xInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ) ) - aCreator.AppendAscii( "Impress" ); + aCreator += "Impress"; else if ( xInfo->supportsService( "com.sun.star.drawing.DrawingDocument" ) ) - aCreator.AppendAscii( "Draw" ); + aCreator += "Draw"; else if ( xInfo->supportsService( "com.sun.star.text.TextDocument" ) ) - aCreator.AppendAscii( "Writer" ); + aCreator += "Writer"; else if ( xInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) - aCreator.AppendAscii( "Calc" ); + aCreator += "Calc"; else if ( xInfo->supportsService( "com.sun.star.formula.FormulaProperties" ) ) - aCreator.AppendAscii( "Math" ); + aCreator += "Math"; } Reference< document::XDocumentPropertiesSupplier > xDocumentPropsSupplier( mxSrcDoc, UNO_QUERY ); @@ -846,7 +846,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue OUString sShowOnlineLayout( "ShowOnlineLayout" ); uno::Reference< beans::XPropertySet > xViewProperties; - if ( aCreator.EqualsAscii( "Writer" ) ) + if ( aCreator.equalsAscii( "Writer" ) ) { //i92835 if Writer is in web layout mode this has to be switched to normal view and back to web view in the end try @@ -867,7 +867,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue const sal_Int32 nPageCount = xRenderable->getRendererCount( aSelection, aRenderOptions ); - if ( mbExportNotesPages && aCreator.EqualsAscii( "Impress" ) ) + if ( mbExportNotesPages && aCreator.equalsAscii( "Impress" ) ) { uno::Reference< drawing::XShapes > xShapes; // sj: do not allow to export notes when if ( ! ( aSelection >>= xShapes ) ) // exporting a selection -> todo: in the dialog |