[Libreoffice-commits] core.git: filter/source

Noel Grandin noel.grandin at collabora.co.uk
Mon May 29 10:57:50 UTC 2017


 filter/source/flash/swfexporter.hxx |   10 ----------
 filter/source/flash/swffilter.cxx   |   16 ++++++++--------
 2 files changed, 8 insertions(+), 18 deletions(-)

New commits:
commit 649228f932321c2c5784fbf7b0df84712fde55a0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon May 29 08:51:12 2017 +0200

    remove STR and VAL methods
    
    not very useful
    
    Change-Id: I9c53c2901fb56a303a1b15d0ad508eb5e22d0cd0
    Reviewed-on: https://gerrit.libreoffice.org/38126
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/filter/source/flash/swfexporter.hxx b/filter/source/flash/swfexporter.hxx
index bc383a23e041..144f237588fd 100644
--- a/filter/source/flash/swfexporter.hxx
+++ b/filter/source/flash/swfexporter.hxx
@@ -33,16 +33,6 @@ typedef ::std::map<BitmapChecksum, sal_uInt16> ChecksumCache;
 
 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 {
 
 class Writer;
diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index 9abcebe1fcc2..4c8f8a5654d1 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -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 filename = STR("slide") + VAL(nPage+1) + STR(suffix) + STR(".swf");
-    OUString fullpath = sPath + STR("/") + filename;
+    OUString filename = "slide" + OUString::number(nPage+1) + OUString::createFromAscii(suffix) + ".swf";
+    OUString fullpath = sPath + "/" + filename;
 
     // AS: If suffix is "o" then the last parameter is true (for exporting objects).
     Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY);
@@ -198,9 +198,9 @@ OUString exportBackground(FlashExporter &aFlashExporter, const Reference< XDrawP
     {
         osl_removeFile(fullpath.pData);
         if ( 0xffff == nCached )
-            return STR("NULL");
+            return OUString("NULL");
         else
-            return STR("slide") + VAL(nCached+1) + STR(suffix) + STR(".swf");
+            return "slide" + OUString::number(nCached+1) + OUString::createFromAscii(suffix) + ".swf";
     }
 
     return filename;
@@ -352,12 +352,12 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
 
     OUString fullpath, swfdirpath, backgroundfilename, objectsfilename;
 
-    swfdirpath = sPath + STR("/") + sPresentationName + STR(".sxi-swf-files");
+    swfdirpath = sPath + "/" + sPresentationName + ".sxi-swf-files";
 
     oslFileError err;
     err = osl_createDirectory( swfdirpath.pData );
 
-    fullpath = swfdirpath + STR("/backgroundconfig.txt");
+    fullpath = swfdirpath + "/backgroundconfig.txt";
 
     oslFileHandle aBackgroundConfig( nullptr );
 
@@ -410,7 +410,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
 
         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);
             bool ret = aFlashExporter.exportSlides( xDrawPage, xOutputStreamWrap );
@@ -425,7 +425,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
         //  slide used.
         if (bExportAll)
         {
-            OUString temp = backgroundfilename + STR("|") + objectsfilename;
+            OUString temp = backgroundfilename + "|" + objectsfilename;
             OString ASCIItemp(temp.getStr(), temp.getLength(), RTL_TEXTENCODING_ASCII_US);
 
             sal_uInt64 bytesWritten;


More information about the Libreoffice-commits mailing list