Kaydet (Commit) 649228f9 authored tarafından Noel Grandin's avatar Noel Grandin

remove STR and VAL methods

not very useful

Change-Id: I9c53c2901fb56a303a1b15d0ad508eb5e22d0cd0
Reviewed-on: https://gerrit.libreoffice.org/38126Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 63577383
...@@ -33,16 +33,6 @@ typedef ::std::map<BitmapChecksum, sal_uInt16> ChecksumCache; ...@@ -33,16 +33,6 @@ typedef ::std::map<BitmapChecksum, sal_uInt16> ChecksumCache;
class GDIMetaFile; class GDIMetaFile;
inline OUString STR(const sal_Char * in)
{
return OUString::createFromAscii(in);
}
inline OUString VAL(sal_Int32 in)
{
return OUString::number(in);
}
namespace swf { namespace swf {
class Writer; class Writer;
......
...@@ -185,8 +185,8 @@ FlashExportFilter::FlashExportFilter(const Reference< XComponentContext > &rxCon ...@@ -185,8 +185,8 @@ FlashExportFilter::FlashExportFilter(const Reference< XComponentContext > &rxCon
OUString exportBackground(FlashExporter &aFlashExporter, const Reference< XDrawPage >& xDrawPage, const OUString& sPath, sal_uInt32 nPage, const char* suffix) OUString exportBackground(FlashExporter &aFlashExporter, const Reference< XDrawPage >& xDrawPage, const OUString& sPath, sal_uInt32 nPage, const char* suffix)
{ {
OUString filename = STR("slide") + VAL(nPage+1) + STR(suffix) + STR(".swf"); OUString filename = "slide" + OUString::number(nPage+1) + OUString::createFromAscii(suffix) + ".swf";
OUString fullpath = sPath + STR("/") + filename; OUString fullpath = sPath + "/" + filename;
// AS: If suffix is "o" then the last parameter is true (for exporting objects). // AS: If suffix is "o" then the last parameter is true (for exporting objects).
Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY); Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY);
...@@ -198,9 +198,9 @@ OUString exportBackground(FlashExporter &aFlashExporter, const Reference< XDrawP ...@@ -198,9 +198,9 @@ OUString exportBackground(FlashExporter &aFlashExporter, const Reference< XDrawP
{ {
osl_removeFile(fullpath.pData); osl_removeFile(fullpath.pData);
if ( 0xffff == nCached ) if ( 0xffff == nCached )
return STR("NULL"); return OUString("NULL");
else else
return STR("slide") + VAL(nCached+1) + STR(suffix) + STR(".swf"); return "slide" + OUString::number(nCached+1) + OUString::createFromAscii(suffix) + ".swf";
} }
return filename; return filename;
...@@ -352,12 +352,12 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a ...@@ -352,12 +352,12 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
OUString fullpath, swfdirpath, backgroundfilename, objectsfilename; OUString fullpath, swfdirpath, backgroundfilename, objectsfilename;
swfdirpath = sPath + STR("/") + sPresentationName + STR(".sxi-swf-files"); swfdirpath = sPath + "/" + sPresentationName + ".sxi-swf-files";
oslFileError err; oslFileError err;
err = osl_createDirectory( swfdirpath.pData ); err = osl_createDirectory( swfdirpath.pData );
fullpath = swfdirpath + STR("/backgroundconfig.txt"); fullpath = swfdirpath + "/backgroundconfig.txt";
oslFileHandle aBackgroundConfig( nullptr ); oslFileHandle aBackgroundConfig( nullptr );
...@@ -410,7 +410,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a ...@@ -410,7 +410,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
if (bExportAll || findPropertyValue<bool>(aFilterData, "ExportSlideContents", true)) if (bExportAll || findPropertyValue<bool>(aFilterData, "ExportSlideContents", true))
{ {
fullpath = swfdirpath + STR("/slide") + VAL(nPage+1) + STR("p.swf"); fullpath = swfdirpath + "/slide"+ OUString::number(nPage+1) + "p.swf";
Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY); Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY);
bool ret = aFlashExporter.exportSlides( xDrawPage, xOutputStreamWrap ); bool ret = aFlashExporter.exportSlides( xDrawPage, xOutputStreamWrap );
...@@ -425,7 +425,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a ...@@ -425,7 +425,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
// slide used. // slide used.
if (bExportAll) if (bExportAll)
{ {
OUString temp = backgroundfilename + STR("|") + objectsfilename; OUString temp = backgroundfilename + "|" + objectsfilename;
OString ASCIItemp(temp.getStr(), temp.getLength(), RTL_TEXTENCODING_ASCII_US); OString ASCIItemp(temp.getStr(), temp.getLength(), RTL_TEXTENCODING_ASCII_US);
sal_uInt64 bytesWritten; sal_uInt64 bytesWritten;
......
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