From c9253818ec8252169c20450b41878be459568d95 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 30 Jul 2017 12:16:31 +0200 Subject: loplugin:oncevar extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins Reviewed-by: Noel Grandin --- jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx | 6 ++---- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 3 +-- jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx | 4 +--- jvmfwk/source/fwkbase.cxx | 8 +++----- 4 files changed, 7 insertions(+), 14 deletions(-) (limited to 'jvmfwk') diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx index dee43b6b6d67..4485828a8926 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx @@ -103,7 +103,7 @@ bool GnuInfo::initialize(vector > props) OUString const sJavaHomeProperty("java.home"); OUString const sJavaLibraryPathProperty("java.library.path"); OUString const sGNUHomeProperty("gnu.classpath.home.url"); - OUString sAccessProperty("javax.accessibility.assistive_technologies"); + OUString const sAccessProperty("javax.accessibility.assistive_technologies"); bool bVersion = false; bool bVendor = false; @@ -261,8 +261,6 @@ bool GnuInfo::initialize(vector > props) char const * const * arLDPaths = getLibraryPaths( & size); vector ld_paths = getVectorFromCharArray(arLDPaths, size); - char arSep[]= {SAL_PATHSEPARATOR, 0}; - OUString sPathSep= OUString::createFromAscii(arSep); bool bLdPath = true; int c = 0; for(i_path il = ld_paths.begin(); il != ld_paths.end(); ++il, ++c) @@ -274,7 +272,7 @@ bool GnuInfo::initialize(vector > props) { if(c > 0) - m_sLD_LIBRARY_PATH+= sPathSep; + m_sLD_LIBRARY_PATH+= OUStringLiteral1(SAL_PATHSEPARATOR); m_sLD_LIBRARY_PATH+= usSysPath; } else diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 40ce22e78ea9..457c613f7db6 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -135,8 +135,7 @@ OString getPluginJarPath( if (osl_getSystemPathFromFileURL(sName.pData, & sPath2.pData) == osl_File_E_None) { - char sep[] = {SAL_PATHSEPARATOR, 0}; - sPath = sPath1 + OUString::createFromAscii(sep) + sPath2; + sPath = sPath1 + OUStringLiteral1(SAL_PATHSEPARATOR) + sPath2; } } OSL_ASSERT(!sPath.isEmpty()); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx index 1f7423045bc1..b3e5a4c43de2 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx @@ -153,8 +153,6 @@ bool VendorBase::initialize(vector > props) char const * const * arLDPaths = getLibraryPaths( & size); vector ld_paths = getVectorFromCharArray(arLDPaths, size); - char arSep[]= {SAL_PATHSEPARATOR, 0}; - OUString sPathSep= OUString::createFromAscii(arSep); bool bLdPath = true; int c = 0; for(i_path il = ld_paths.begin(); il != ld_paths.end(); ++il, ++c) @@ -166,7 +164,7 @@ bool VendorBase::initialize(vector > props) { if(c > 0) - m_sLD_LIBRARY_PATH+= sPathSep; + m_sLD_LIBRARY_PATH+= OUStringLiteral1(SAL_PATHSEPARATOR); m_sLD_LIBRARY_PATH+= usSysPath; } else diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index 2c24017f1846..155e07c813da 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -88,8 +88,6 @@ OUString getParamFirstUrl(OUString const & name) VendorSettings::VendorSettings(): m_xmlDocVendorSettingsFileUrl(BootParams::getVendorSettings()) { - OString sMsgExc("[Java framework] Error in constructor " - "VendorSettings::VendorSettings() (fwkbase.cxx)"); //Prepare the xml document and context OString sSettingsPath = getVendorSettingsPath(m_xmlDocVendorSettingsFileUrl); if (sSettingsPath.isEmpty()) @@ -113,7 +111,8 @@ VendorSettings::VendorSettings(): m_xmlPathContextVendorSettings, reinterpret_cast("jf"), reinterpret_cast(NS_JAVA_FRAMEWORK)); if (res == -1) - throw FrameworkException(JFW_E_ERROR, sMsgExc); + throw FrameworkException(JFW_E_ERROR, + "[Java framework] Error in constructor VendorSettings::VendorSettings() (fwkbase.cxx)"); } } @@ -480,8 +479,7 @@ OString makeClassPathOption(OUString const & sUserClassPath) { if (!sUserClassPath.isEmpty()) { - char szSep[] = {SAL_PATHSEPARATOR,0}; - sBufCP.appendAscii(szSep); + sBufCP.append(SAL_PATHSEPARATOR); } sBufCP.append(sAppCP); } -- cgit