Kaydet (Commit) 9a8cc22f authored tarafından Krisztian Pinter's avatar Krisztian Pinter Kaydeden (comit) Michael Stahl

RTL_CONSTASCII_USTRINGPARAM removals

Change-Id: I389c863f7ea83071a3d3b43a33f505e9e1ce7d16
Reviewed-on: https://gerrit.libreoffice.org/2285Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 1a5c8273
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
#endif #endif
#define _FILTER_CONFIG_FROM_ASCII_(ASCII_STRING) \ #define _FILTER_CONFIG_FROM_ASCII_(ASCII_STRING) \
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ASCII_STRING)) OUString(ASCII_STRING)
#define _FILTER_CONFIG_TO_ASCII_(UNICODE_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_(TEXT)
#define _FILTER_CONFIG_LOG_1_(FORMAT, ARG1) #define _FILTER_CONFIG_LOG_1_(FORMAT, ARG1)
......
...@@ -52,9 +52,9 @@ ImpSWFDialog::ImpSWFDialog( Window* pParent, ResMgr& rResMgr, Sequence< Property ...@@ -52,9 +52,9 @@ ImpSWFDialog::ImpSWFDialog( Window* pParent, ResMgr& rResMgr, Sequence< Property
maBtnOK( this, ResId( BTN_OK, rResMgr ) ), maBtnOK( this, ResId( BTN_OK, rResMgr ) ),
maBtnCancel( this, ResId( BTN_CANCEL, rResMgr ) ), maBtnCancel( this, ResId( BTN_CANCEL, rResMgr ) ),
maBtnHelp( this, ResId( BTN_HELP, 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 ); maNumFldQuality.SetValue( nCompressMode );
maCheckExportAll.Check(); maCheckExportAll.Check();
...@@ -85,14 +85,14 @@ ImpSWFDialog::~ImpSWFDialog() ...@@ -85,14 +85,14 @@ ImpSWFDialog::~ImpSWFDialog()
Sequence< PropertyValue > ImpSWFDialog::GetFilterData() Sequence< PropertyValue > ImpSWFDialog::GetFilterData()
{ {
sal_Int32 nCompressMode = (sal_Int32)maNumFldQuality.GetValue(); sal_Int32 nCompressMode = (sal_Int32)maNumFldQuality.GetValue();
maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), nCompressMode ); maConfigItem.WriteInt32( "CompressMode" , nCompressMode );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportAll" ) ), maCheckExportAll.IsChecked() ); maConfigItem.WriteBool( "ExportAll", maCheckExportAll.IsChecked() );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBackgrounds" ) ), maCheckExportBackgrounds.IsChecked() ); maConfigItem.WriteBool( "ExportBackgrounds", maCheckExportBackgrounds.IsChecked() );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBackgroundObjects" ) ), maCheckExportBackgroundObjects.IsChecked() ); maConfigItem.WriteBool( "ExportBackgroundObjects", maCheckExportBackgroundObjects.IsChecked() );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportSlideContents" ) ), maCheckExportSlideContents.IsChecked() ); maConfigItem.WriteBool( "ExportSlideContents", maCheckExportSlideContents.IsChecked() );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportSound" ) ), maCheckExportSound.IsChecked() ); maConfigItem.WriteBool( "ExportSound", maCheckExportSound.IsChecked() );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportOLEAsJPEG" ) ), maCheckExportOLEAsJPEG.IsChecked() ); maConfigItem.WriteBool( "ExportOLEAsJPEG", maCheckExportOLEAsJPEG.IsChecked() );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportMultipleFiles" ) ), maCheckExportMultipleFiles.IsChecked() ); maConfigItem.WriteBool( "ExportMultipleFiles", maCheckExportMultipleFiles.IsChecked() );
Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() ); Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() );
......
...@@ -74,7 +74,7 @@ sal_Bool PBMWriter::WritePBM( const Graphic& rGraphic, FilterConfigItem* pFilter ...@@ -74,7 +74,7 @@ sal_Bool PBMWriter::WritePBM( const Graphic& rGraphic, FilterConfigItem* pFilter
{ {
if ( pFilterConfigItem ) if ( pFilterConfigItem )
{ {
mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); mnMode = pFilterConfigItem->ReadInt32( "FileFormat", 0 );
xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
if ( xStatusIndicator.is() ) if ( xStatusIndicator.is() )
......
...@@ -74,7 +74,7 @@ sal_Bool PGMWriter::WritePGM( const Graphic& rGraphic, FilterConfigItem* pFilter ...@@ -74,7 +74,7 @@ sal_Bool PGMWriter::WritePGM( const Graphic& rGraphic, FilterConfigItem* pFilter
{ {
if ( pFilterConfigItem ) if ( pFilterConfigItem )
{ {
mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); mnMode = pFilterConfigItem->ReadInt32( "FileFormat", 0 );
xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
if ( xStatusIndicator.is() ) if ( xStatusIndicator.is() )
......
...@@ -74,7 +74,7 @@ sal_Bool PPMWriter::WritePPM( const Graphic& rGraphic, FilterConfigItem* pFilter ...@@ -74,7 +74,7 @@ sal_Bool PPMWriter::WritePPM( const Graphic& rGraphic, FilterConfigItem* pFilter
{ {
if ( pFilterConfigItem ) if ( pFilterConfigItem )
{ {
mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); mnMode = pFilterConfigItem->ReadInt32( "FileFormat", 0 );
xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
if ( xStatusIndicator.is() ) if ( xStatusIndicator.is() )
......
...@@ -797,7 +797,7 @@ ImportCGM( String& rFileName, uno::Reference< frame::XModel > & rXModel, sal_uIn ...@@ -797,7 +797,7 @@ ImportCGM( String& rFileName, uno::Reference< frame::XModel > & rXModel, sal_uIn
aXStatInd = *(uno::Reference< task::XStatusIndicator > *)pProgressBar; aXStatInd = *(uno::Reference< task::XStatusIndicator > *)pProgressBar;
bProgressBar = aXStatInd.is(); bProgressBar = aXStatInd.is();
if ( bProgressBar ) if ( bProgressBar )
aXStatInd->start( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CGM Import" )), nInSize ); aXStatInd->start( "CGM Import" , nInSize );
#endif #endif
while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() ) while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() )
......
...@@ -146,7 +146,7 @@ static void MakeAsMeta(Graphic &rGraphic) ...@@ -146,7 +146,7 @@ static void MakeAsMeta(Graphic &rGraphic)
rGraphic = aMtf; rGraphic = aMtf;
} }
static oslProcessError runProcessWithPathSearch(const rtl::OUString &rProgName, static oslProcessError runProcessWithPathSearch(const OUString &rProgName,
rtl_uString* pArgs[], sal_uInt32 nArgs, oslProcess *pProcess, rtl_uString* pArgs[], sal_uInt32 nArgs, oslProcess *pProcess,
oslFileHandle *pIn, oslFileHandle *pOut, oslFileHandle *pErr) oslFileHandle *pIn, oslFileHandle *pOut, oslFileHandle *pErr)
{ {
...@@ -166,8 +166,8 @@ static oslProcessError runProcessWithPathSearch(const rtl::OUString &rProgName, ...@@ -166,8 +166,8 @@ static oslProcessError runProcessWithPathSearch(const rtl::OUString &rProgName,
* PATH. * PATH.
* *
*/ */
rtl::OUString url; OUString url;
rtl::OUString path(reinterpret_cast<const sal_Unicode*>(_wgetenv(L"PATH"))); OUString path(reinterpret_cast<const sal_Unicode*>(_wgetenv(L"PATH")));
oslFileError err = osl_searchFileURL(rProgName.pData, path.pData, &url.pData); oslFileError err = osl_searchFileURL(rProgName.pData, path.pData, &url.pData);
if (err != osl_File_E_None) if (err != osl_File_E_None)
...@@ -192,15 +192,11 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r ...@@ -192,15 +192,11 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
{ {
TempFile aTemp; TempFile aTemp;
aTemp.EnableKillingFile(); aTemp.EnableKillingFile();
rtl::OUString fileName = OUString fileName("pstoedit" EXESUFFIX);
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pstoedit" EXESUFFIX)); OUString arg1("-f");
rtl::OUString arg1 = OUString arg2("emf:-OO");
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-f")); OUString arg3("-");
rtl::OUString arg2 = OUString output;
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("emf:-OO"));
rtl::OUString arg3 =
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
rtl::OUString output;
osl::FileBase::getSystemPathFromFileURL(aTemp.GetName(), output); osl::FileBase::getSystemPathFromFileURL(aTemp.GetName(), output);
rtl_uString *args[] = rtl_uString *args[] =
{ {
...@@ -227,8 +223,8 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r ...@@ -227,8 +223,8 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
rtl::ByteSequence seq; rtl::ByteSequence seq;
if (osl_File_E_None == osl_readLine(pOut, (sal_Sequence **)&seq)) if (osl_File_E_None == osl_readLine(pOut, (sal_Sequence **)&seq))
{ {
rtl::OString line( (const sal_Char *) seq.getConstArray(), seq.getLength() ); OString line( (const sal_Char *) seq.getConstArray(), seq.getLength() );
if (line.indexOf(rtl::OString("Unsupported output format")) == 0) if (line.indexOf(OString("Unsupported output format")) == 0)
bEMFSupported=false; bEMFSupported=false;
} }
osl_closeFile(pOut); osl_closeFile(pOut);
...@@ -246,7 +242,7 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r ...@@ -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, 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; oslProcess aProcess;
oslFileHandle pIn = NULL; oslFileHandle pIn = NULL;
...@@ -293,17 +289,16 @@ static bool RenderAsPNGThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRea ...@@ -293,17 +289,16 @@ static bool RenderAsPNGThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRea
static bool RenderAsPNGThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, static bool RenderAsPNGThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
Graphic &rGraphic) Graphic &rGraphic)
{ {
rtl::OUString fileName = OUString fileName("convert" EXESUFFIX);
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("convert" EXESUFFIX));
// density in pixel/inch // 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, // 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 // 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 // read eps from STDIN
rtl::OUString arg3 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("eps:-")); OUString arg3("eps:-");
// write png to STDOUT // write png to STDOUT
rtl::OUString arg4 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("png:-")); OUString arg4("png:-");
rtl_uString *args[] = rtl_uString *args[] =
{ {
arg1.pData, arg2.pData, arg3.pData, arg4.pData arg1.pData, arg2.pData, arg3.pData, arg4.pData
...@@ -316,34 +311,21 @@ static bool RenderAsPNGThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, ...@@ -316,34 +311,21 @@ static bool RenderAsPNGThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
Graphic &rGraphic) Graphic &rGraphic)
{ {
#ifdef WNT #ifdef WNT
rtl::OUString fileName = OUString fileName("gswin32c" EXESUFFIX);
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gswin32c" EXESUFFIX));
#else #else
rtl::OUString fileName = OUString fileName("gs" EXESUFFIX);
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gs" EXESUFFIX));
#endif #endif
rtl::OUString arg1 = OUString arg1("-q");
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-q")); OUString arg2("-dBATCH");
rtl::OUString arg2 = OUString arg3("-dNOPAUSE");
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dBATCH")); OUString arg4("-dPARANOIDSAFER");
rtl::OUString arg3 = OUString arg5("-dEPSCrop");
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dNOPAUSE")); OUString arg6("-dTextAlphaBits=4");
rtl::OUString arg4 = OUString arg7("-dGraphicsAlphaBits=4");
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dPARANOIDSAFER")); OUString arg8("-r300x300");
rtl::OUString arg5 = OUString arg9("-sDEVICE=png256");
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dEPSCrop")); OUString arg10("-sOutputFile=-");
rtl::OUString arg6 = OUString arg11("-");
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("-"));
rtl_uString *args[] = rtl_uString *args[] =
{ {
arg1.pData, arg2.pData, arg3.pData, arg4.pData, arg5.pData, 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 ...@@ -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, void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32 nOrigPos, sal_uInt32 nPSSize,
sal_uInt32 nPosWMF, sal_uInt32 nSizeWMF, sal_uInt32 nPosTIFF, sal_uInt32 nSizeTIFF ) 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 ) if ( nSizeWMF || nSizeTIFF )
{ {
SvMemoryStream aReplacement( nSizeWMF + nSizeTIFF + 28 ); SvMemoryStream aReplacement( nSizeWMF + nSizeTIFF + 28 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment