From 9a8cc22f88b1274b2f254c6f6adf1ad76b8304dd Mon Sep 17 00:00:00 2001 From: Krisztian Pinter Date: Tue, 19 Feb 2013 21:45:07 +0100 Subject: RTL_CONSTASCII_USTRINGPARAM removals Change-Id: I389c863f7ea83071a3d3b43a33f505e9e1ce7d16 Reviewed-on: https://gerrit.libreoffice.org/2285 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- filter/source/config/cache/macros.hxx | 4 +- filter/source/flash/impswfdialog.cxx | 20 ++++---- filter/source/graphicfilter/epbm/epbm.cxx | 2 +- filter/source/graphicfilter/epgm/epgm.cxx | 2 +- filter/source/graphicfilter/eppm/eppm.cxx | 2 +- filter/source/graphicfilter/icgm/cgm.cxx | 2 +- filter/source/graphicfilter/ieps/ieps.cxx | 78 ++++++++++++------------------- 7 files changed, 46 insertions(+), 64 deletions(-) diff --git a/filter/source/config/cache/macros.hxx b/filter/source/config/cache/macros.hxx index a308f1fadb22..4c7c84a9bfc2 100644 --- a/filter/source/config/cache/macros.hxx +++ b/filter/source/config/cache/macros.hxx @@ -33,10 +33,10 @@ #endif #define _FILTER_CONFIG_FROM_ASCII_(ASCII_STRING) \ - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ASCII_STRING)) + OUString(ASCII_STRING) #define _FILTER_CONFIG_TO_ASCII_(UNICODE_STRING) \ - ::rtl::OUStringToOString(UNICODE_STRING, RTL_TEXTENCODING_UTF8).getStr() + OUStringToOString(UNICODE_STRING, RTL_TEXTENCODING_UTF8).getStr() #define _FILTER_CONFIG_LOG_(TEXT) #define _FILTER_CONFIG_LOG_1_(FORMAT, ARG1) diff --git a/filter/source/flash/impswfdialog.cxx b/filter/source/flash/impswfdialog.cxx index 05f0677e22ac..18f74ec5c054 100644 --- a/filter/source/flash/impswfdialog.cxx +++ b/filter/source/flash/impswfdialog.cxx @@ -52,9 +52,9 @@ ImpSWFDialog::ImpSWFDialog( Window* pParent, ResMgr& rResMgr, Sequence< Property maBtnOK( this, ResId( BTN_OK, rResMgr ) ), maBtnCancel( this, ResId( BTN_CANCEL, rResMgr ) ), maBtnHelp( this, ResId( BTN_HELP, rResMgr ) ), - maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Flash/Export/" ) ), &rFilterData ) + maConfigItem( "Office.Common/Filter/Flash/Export/", &rFilterData ) { - const sal_uLong nCompressMode = maConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), 75 ); + const sal_uLong nCompressMode = maConfigItem.ReadInt32( "CompressMode", 75 ); maNumFldQuality.SetValue( nCompressMode ); maCheckExportAll.Check(); @@ -85,14 +85,14 @@ ImpSWFDialog::~ImpSWFDialog() Sequence< PropertyValue > ImpSWFDialog::GetFilterData() { sal_Int32 nCompressMode = (sal_Int32)maNumFldQuality.GetValue(); - maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), nCompressMode ); - maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportAll" ) ), maCheckExportAll.IsChecked() ); - maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBackgrounds" ) ), maCheckExportBackgrounds.IsChecked() ); - maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBackgroundObjects" ) ), maCheckExportBackgroundObjects.IsChecked() ); - maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportSlideContents" ) ), maCheckExportSlideContents.IsChecked() ); - maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportSound" ) ), maCheckExportSound.IsChecked() ); - maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportOLEAsJPEG" ) ), maCheckExportOLEAsJPEG.IsChecked() ); - maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportMultipleFiles" ) ), maCheckExportMultipleFiles.IsChecked() ); + maConfigItem.WriteInt32( "CompressMode" , nCompressMode ); + maConfigItem.WriteBool( "ExportAll", maCheckExportAll.IsChecked() ); + maConfigItem.WriteBool( "ExportBackgrounds", maCheckExportBackgrounds.IsChecked() ); + maConfigItem.WriteBool( "ExportBackgroundObjects", maCheckExportBackgroundObjects.IsChecked() ); + maConfigItem.WriteBool( "ExportSlideContents", maCheckExportSlideContents.IsChecked() ); + maConfigItem.WriteBool( "ExportSound", maCheckExportSound.IsChecked() ); + maConfigItem.WriteBool( "ExportOLEAsJPEG", maCheckExportOLEAsJPEG.IsChecked() ); + maConfigItem.WriteBool( "ExportMultipleFiles", maCheckExportMultipleFiles.IsChecked() ); Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() ); diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx index 3f867bd6f3dd..a4efe851836f 100644 --- a/filter/source/graphicfilter/epbm/epbm.cxx +++ b/filter/source/graphicfilter/epbm/epbm.cxx @@ -74,7 +74,7 @@ sal_Bool PBMWriter::WritePBM( const Graphic& rGraphic, FilterConfigItem* pFilter { if ( pFilterConfigItem ) { - mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); + mnMode = pFilterConfigItem->ReadInt32( "FileFormat", 0 ); xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); if ( xStatusIndicator.is() ) diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx index ef402a3cc4c6..77aa72d52d04 100644 --- a/filter/source/graphicfilter/epgm/epgm.cxx +++ b/filter/source/graphicfilter/epgm/epgm.cxx @@ -74,7 +74,7 @@ sal_Bool PGMWriter::WritePGM( const Graphic& rGraphic, FilterConfigItem* pFilter { if ( pFilterConfigItem ) { - mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); + mnMode = pFilterConfigItem->ReadInt32( "FileFormat", 0 ); xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); if ( xStatusIndicator.is() ) diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx index 469097e727e6..3e0fbb9181c4 100644 --- a/filter/source/graphicfilter/eppm/eppm.cxx +++ b/filter/source/graphicfilter/eppm/eppm.cxx @@ -74,7 +74,7 @@ sal_Bool PPMWriter::WritePPM( const Graphic& rGraphic, FilterConfigItem* pFilter { if ( pFilterConfigItem ) { - mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); + mnMode = pFilterConfigItem->ReadInt32( "FileFormat", 0 ); xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); if ( xStatusIndicator.is() ) diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx index c8dd2c0632ad..7f38566ca714 100644 --- a/filter/source/graphicfilter/icgm/cgm.cxx +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -797,7 +797,7 @@ ImportCGM( String& rFileName, uno::Reference< frame::XModel > & rXModel, sal_uIn aXStatInd = *(uno::Reference< task::XStatusIndicator > *)pProgressBar; bProgressBar = aXStatInd.is(); if ( bProgressBar ) - aXStatInd->start( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CGM Import" )), nInSize ); + aXStatInd->start( "CGM Import" , nInSize ); #endif while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() ) diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 931f5b7fa1a8..a8d01eafe134 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -146,7 +146,7 @@ static void MakeAsMeta(Graphic &rGraphic) rGraphic = aMtf; } -static oslProcessError runProcessWithPathSearch(const rtl::OUString &rProgName, +static oslProcessError runProcessWithPathSearch(const OUString &rProgName, rtl_uString* pArgs[], sal_uInt32 nArgs, oslProcess *pProcess, oslFileHandle *pIn, oslFileHandle *pOut, oslFileHandle *pErr) { @@ -166,8 +166,8 @@ static oslProcessError runProcessWithPathSearch(const rtl::OUString &rProgName, * PATH. * */ - rtl::OUString url; - rtl::OUString path(reinterpret_cast(_wgetenv(L"PATH"))); + OUString url; + OUString path(reinterpret_cast(_wgetenv(L"PATH"))); oslFileError err = osl_searchFileURL(rProgName.pData, path.pData, &url.pData); if (err != osl_File_E_None) @@ -192,15 +192,11 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r { TempFile aTemp; aTemp.EnableKillingFile(); - rtl::OUString fileName = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pstoedit" EXESUFFIX)); - rtl::OUString arg1 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-f")); - rtl::OUString arg2 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("emf:-OO")); - rtl::OUString arg3 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")); - rtl::OUString output; + OUString fileName("pstoedit" EXESUFFIX); + OUString arg1("-f"); + OUString arg2("emf:-OO"); + OUString arg3("-"); + OUString output; osl::FileBase::getSystemPathFromFileURL(aTemp.GetName(), output); rtl_uString *args[] = { @@ -227,8 +223,8 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r rtl::ByteSequence seq; if (osl_File_E_None == osl_readLine(pOut, (sal_Sequence **)&seq)) { - rtl::OString line( (const sal_Char *) seq.getConstArray(), seq.getLength() ); - if (line.indexOf(rtl::OString("Unsupported output format")) == 0) + OString line( (const sal_Char *) seq.getConstArray(), seq.getLength() ); + if (line.indexOf(OString("Unsupported output format")) == 0) bEMFSupported=false; } osl_closeFile(pOut); @@ -246,7 +242,7 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r } static bool RenderAsPNGThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, - Graphic &rGraphic, rtl::OUString &rProgName, rtl_uString *pArgs[], size_t nArgs) + Graphic &rGraphic, OUString &rProgName, rtl_uString *pArgs[], size_t nArgs) { oslProcess aProcess; oslFileHandle pIn = NULL; @@ -293,17 +289,16 @@ static bool RenderAsPNGThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRea static bool RenderAsPNGThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic) { - rtl::OUString fileName = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("convert" EXESUFFIX)); + OUString fileName("convert" EXESUFFIX); // density in pixel/inch - rtl::OUString arg1 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-density")); + OUString arg1("-density"); // since the preview is also used for PDF-Export & printing on non-PS-printers, // use some better quality - 300x300 should allow some resizing as well - rtl::OUString arg2 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("300x300")); + OUString arg2("300x300"); // read eps from STDIN - rtl::OUString arg3 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("eps:-")); + OUString arg3("eps:-"); // write png to STDOUT - rtl::OUString arg4 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("png:-")); + OUString arg4("png:-"); rtl_uString *args[] = { arg1.pData, arg2.pData, arg3.pData, arg4.pData @@ -316,34 +311,21 @@ static bool RenderAsPNGThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic) { #ifdef WNT - rtl::OUString fileName = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gswin32c" EXESUFFIX)); + OUString fileName("gswin32c" EXESUFFIX); #else - rtl::OUString fileName = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gs" EXESUFFIX)); + OUString fileName("gs" EXESUFFIX); #endif - rtl::OUString arg1 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-q")); - rtl::OUString arg2 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dBATCH")); - rtl::OUString arg3 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dNOPAUSE")); - rtl::OUString arg4 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dPARANOIDSAFER")); - rtl::OUString arg5 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dEPSCrop")); - rtl::OUString arg6 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dTextAlphaBits=4")); - rtl::OUString arg7 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dGraphicsAlphaBits=4")); - rtl::OUString arg8 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-r300x300")); - rtl::OUString arg9 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-sDEVICE=png256")); - rtl::OUString arg10 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-sOutputFile=-")); - rtl::OUString arg11 = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")); + OUString arg1("-q"); + OUString arg2("-dBATCH"); + OUString arg3("-dNOPAUSE"); + OUString arg4("-dPARANOIDSAFER"); + OUString arg5("-dEPSCrop"); + OUString arg6("-dTextAlphaBits=4"); + OUString arg7("-dGraphicsAlphaBits=4"); + OUString arg8("-r300x300"); + OUString arg9("-sDEVICE=png256"); + OUString arg10("-sOutputFile=-"); + OUString arg11("-"); rtl_uString *args[] = { arg1.pData, arg2.pData, arg3.pData, arg4.pData, arg5.pData, @@ -367,7 +349,7 @@ static bool RenderAsPNG(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32 nOrigPos, sal_uInt32 nPSSize, sal_uInt32 nPosWMF, sal_uInt32 nSizeWMF, sal_uInt32 nPosTIFF, sal_uInt32 nSizeTIFF ) { - rtl::OString aComment(RTL_CONSTASCII_STRINGPARAM("EPSReplacementGraphic")); + OString aComment("EPSReplacementGraphic"); if ( nSizeWMF || nSizeTIFF ) { SvMemoryStream aReplacement( nSizeWMF + nSizeTIFF + 28 ); -- cgit