[Libreoffice-commits] core.git: codemaker/source l10ntools/source oox/source sw/source

Arnaud Versini arnaud.versini at gmail.com
Sun Jun 4 13:13:38 UTC 2017


 codemaker/source/cppumaker/cppuoptions.cxx |   12 ++++++------
 codemaker/source/javamaker/javaoptions.cxx |    6 +++---
 l10ntools/source/xrmmerge.cxx              |   18 +++++++++---------
 oox/source/export/drawingml.cxx            |    2 +-
 sw/source/filter/ww8/docxsdrexport.cxx     |    2 +-
 5 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit c4ac732d8132b36b3817e65d2651599ebe16a7f2
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Sun Jun 4 13:52:35 2017 +0200

    Remove usage of OString("")
    
    Change-Id: I0874f81c35573048d05b3842806daa0db67f7887
    Reviewed-on: https://gerrit.libreoffice.org/38386
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index c0b578c197ac..2a15f3497283 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -98,7 +98,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
                         throw IllegalArgument(tmp);
                     }
 
-                    m_options["-nD"] = OString("");
+                    m_options["-nD"] = OString();
                     break;
                 case 'T':
                     if (av[i][2] == '\0')
@@ -152,7 +152,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
                         OString tmp("'-L' could not be combined with '-C' or '-CS' option");
                         throw IllegalArgument(tmp);
                     }
-                    m_options["-L"] = OString("");
+                    m_options["-L"] = OString();
                     break;
                 case 'C':
                     if (av[i][2] == 'S')
@@ -173,7 +173,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
                             OString tmp("'-CS' could not be combined with '-L' or '-C' option");
                             throw IllegalArgument(tmp);
                         }
-                        m_options["-CS"] = OString("");
+                        m_options["-CS"] = OString();
                         break;
                     }
                     else if (av[i][2] != '\0')
@@ -192,7 +192,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
                         OString tmp("'-C' could not be combined with '-L' or '-CS' option");
                         throw IllegalArgument(tmp);
                     }
-                    m_options["-C"] = OString("");
+                    m_options["-C"] = OString();
                     break;
                 case 'G':
                     if (av[i][2] == 'c')
@@ -208,7 +208,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
                             throw IllegalArgument(tmp);
                         }
 
-                        m_options["-Gc"] = OString("");
+                        m_options["-Gc"] = OString();
                         break;
                     }
                     else if (av[i][2] != '\0')
@@ -222,7 +222,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
                         throw IllegalArgument(tmp);
                     }
 
-                    m_options["-G"] = OString("");
+                    m_options["-G"] = OString();
                     break;
                 case 'X': // support for eXtra type rdbs
                 {
diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx
index 510fedc4b4b3..cffc74451ac7 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -91,7 +91,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool bCmdFile)
                         throw IllegalArgument(tmp);
                     }
 
-                    m_options["-nD"] = OString("");
+                    m_options["-nD"] = OString();
                     break;
                 case 'T':
                     if (av[i][2] == '\0')
@@ -139,7 +139,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool bCmdFile)
                             throw IllegalArgument(tmp);
                         }
 
-                        m_options["-Gc"] = OString("");
+                        m_options["-Gc"] = OString();
                         break;
                     } else if (av[i][2] != '\0')
                     {
@@ -152,7 +152,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool bCmdFile)
                         throw IllegalArgument(tmp);
                     }
 
-                    m_options["-G"] = OString("");
+                    m_options["-G"] = OString();
                     break;
                 case 'X': // support for eXtra type rdbs
                 {
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 98c17e68d65e..7596f6585a22 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -167,7 +167,7 @@ void XRMResParser::Execute( int nToken, char * pToken )
                     sGID = sNewGID;
                 }
                 bText = true;
-                sCurrentText = "";
+                sCurrentText = OString();
                 sCurrentOpenTag = rToken;
                 Output( rToken );
             }
@@ -181,8 +181,8 @@ void XRMResParser::Execute( int nToken, char * pToken )
                 Output( sCurrentText );
                 EndOfText( sCurrentOpenTag, sCurrentCloseTag );
                 bText = false;
-                rToken = OString("");
-                sCurrentText  = OString("");
+                rToken = OString();
+                sCurrentText  = OString();
         }
         break;
 
@@ -200,7 +200,7 @@ void XRMResParser::Execute( int nToken, char * pToken )
                 if (bDisplayName) {
                     sGID = OString("dispname");
                     bText = true;
-                    sCurrentText = "";
+                    sCurrentText = OString();
                     sCurrentOpenTag = rToken;
                     Output( rToken );
                 }
@@ -216,8 +216,8 @@ void XRMResParser::Execute( int nToken, char * pToken )
                     Output( sCurrentText );
                     EndOfText( sCurrentOpenTag, sCurrentCloseTag );
                     bText = false;
-                    rToken = OString("");
-                    sCurrentText  = OString("");
+                    rToken = OString();
+                    sCurrentText  = OString();
                 }
         }
         break;
@@ -238,13 +238,13 @@ void XRMResParser::Execute( int nToken, char * pToken )
                     sResourceType = OString ( "description" );
                     sLangAttribute = OString ( "lang" );
                     sCurrentOpenTag = rToken;
-                    sCurrentText  = OString("");
+                    sCurrentText  = OString();
                     Output( rToken );
                     WorkOnDesc( sCurrentOpenTag, sCurrentText );
                     sCurrentCloseTag = rToken;
                     Output( sCurrentText );
-                    rToken = OString("");
-                    sCurrentText  = OString("");
+                    rToken = OString();
+                    sCurrentText  = OString();
                 }
             }
         break;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 88fac6520b0b..ad3685869f9e 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2278,7 +2278,7 @@ void DrawingML::WritePresetShape( const char* pShape , std::vector< std::pair<sa
         mpFS->startElementNS( XML_a, XML_avLst, FSEND );
         for(auto iter = rAvList.begin() ; iter != rAvList.end() ; ++iter)
         {
-            OString sName = OString("adj") + ( ( iter->first > 0 ) ? OString::number(iter->first) : OString("") );
+            OString sName = OString("adj") + ( ( iter->first > 0 ) ? OString::number(iter->first) : OString() );
             OString sFmla = OString("val ") + OString::number( iter->second );
 
             mpFS->singleElementNS( XML_a, XML_gd,
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index ee3b0ae1476c..d79278d929f8 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -978,7 +978,7 @@ OString lcl_ConvertTransparency(const Color& rColor)
         return OString::number(nTransparencyPercent * oox::drawingml::PER_PERCENT);
     }
     else
-        return OString("");
+        return OString();
 }
 
 void DocxSdrExport::writeDMLEffectLst(const SwFrameFormat& rFrameFormat)


More information about the Libreoffice-commits mailing list