[Libreoffice-commits] core.git: codemaker/source comphelper/source compilerplugins/clang extensions/source filter/source idlc/inc include/tools jvmfwk/source pyuno/source reportdesign/source sal/osl s

2021-04-21 Thread Noel Grandin (via logerrit)
 codemaker/source/cppumaker/cppuoptions.cxx   |   20 -
 codemaker/source/javamaker/javaoptions.cxx   |   12 ++---
 comphelper/source/misc/storagehelper.cxx |2 
 compilerplugins/clang/stringadd.cxx  |   15 +--
 compilerplugins/clang/test/stringadd.cxx |9 ++--
 extensions/source/update/check/updatecheckconfig.cxx |2 
 filter/source/msfilter/rtfutil.cxx   |2 
 idlc/inc/astsequence.hxx |2 
 include/tools/diagnose_ex.h  |8 +--
 jvmfwk/source/fwkbase.cxx|2 
 pyuno/source/module/pyuno_module.cxx |8 +--
 pyuno/source/module/pyuno_type.cxx   |2 
 reportdesign/source/core/misc/reportformula.cxx  |2 
 sal/osl/unx/file_misc.cxx|2 
 sal/osl/unx/pipe.cxx |4 -
 sal/qa/osl/file/osl_File.cxx |2 
 sc/qa/unit/subsequent_export-test.cxx|6 +-
 sc/qa/unit/ucalc_formula.cxx |6 +-
 sc/source/core/data/segmenttree.cxx  |4 -
 sc/source/filter/qpro/qproform.cxx   |2 
 sc/source/ui/vba/vbaeventshelper.cxx |8 +--
 sd/qa/unit/export-tests.cxx  |8 +--
 sdext/source/pdfimport/test/pdfunzip.cxx |4 -
 sfx2/source/control/msg.cxx  |2 
 sfx2/source/statbar/stbitem.cxx  |2 
 sfx2/source/view/lokhelper.cxx   |4 -
 shell/source/unix/exec/shellexec.cxx |2 
 svl/qa/unit/svl.cxx  |6 +-
 sw/qa/extras/globalfilter/globalfilter.cxx   |   39 +--
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx   |2 
 sw/qa/extras/uiwriter/uiwriter.cxx   |2 
 sw/qa/extras/uiwriter/uiwriter2.cxx  |4 -
 sw/qa/extras/ww8export/ww8export2.cxx|2 
 sw/qa/unit/swmodeltestbase.cxx   |4 -
 sw/source/core/crsr/bookmrk.cxx  |2 
 sw/source/core/fields/reffld.cxx |2 
 sw/source/filter/html/css1atr.cxx|2 
 sw/source/filter/html/htmlatr.cxx|4 -
 sw/source/filter/html/htmlforw.cxx   |8 +--
 sw/source/filter/html/htmlnumwriter.cxx  |2 
 sw/source/filter/html/wrthtml.cxx|5 --
 sw/source/uibase/wrtsh/wrtsh1.cxx|2 
 test/source/xmltesttools.cxx |   26 ++--
 unotest/source/cpp/macros_test.cxx   |2 
 vbahelper/source/vbahelper/vbacommandbarhelper.cxx   |2 
 vcl/qa/cppunit/complextext.cxx   |2 
 vcl/qt5/Qt5Instance.cxx  |4 -
 vcl/skia/salbmp.cxx  |8 +--
 vcl/unx/generic/fontmanager/fontconfig.cxx   |2 
 vcl/unx/generic/fontmanager/helper.cxx   |2 
 vcl/unx/generic/printer/printerinfomanager.cxx   |2 
 xmloff/source/text/txtfldi.cxx   |2 
 xmloff/source/text/txtvfldi.cxx  |4 -
 53 files changed, 146 insertions(+), 138 deletions(-)

New commits:
commit 7049328fb2d656d8454d4f704ad75d057e766c0b
Author: Noel Grandin 
AuthorDate: Tue Apr 20 21:07:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 21 13:15:32 2021 +0200

loplugin:stringadd replace OUStringLiteral temporaries with OUString::Concat

Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/codemaker/source/cppumaker/cppuoptions.cxx 
b/codemaker/source/cppumaker/cppuoptions.cxx
index 90f16fdd3332..43376278b285 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -76,7 +76,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool 
bCmdFile)
 OString tmp("'-O', please check");
 if (i <= ac - 1)
 {
-tmp += OStringLiteral(" your input '") + 
av[i+1] + "'";
+tmp += OString::Concat(" your input '") + 
av[i+1] + "'";
 }
 
 throw IllegalArgument(tmp);
@@ -92,7 +92,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool 
bCmdFile)
 case 'n':
 if (av[i][2] != 'D' || av[i][3] != '\0')
 {
-OString tmp = OStringLiteral("'-nD', please check your 
input '") + av[i] + "'";
+OString tmp = OString::Concat("'-nD', ple

[Libreoffice-commits] core.git: codemaker/source comphelper/source compilerplugins/clang cppu/source filter/source formula/source idlc/source io/source lotuswordpro/source sal/qa sc/source sfx2/source

2019-10-28 Thread Noel Grandin (via logerrit)
 codemaker/source/cppumaker/cppuoptions.cxx  |4 
 codemaker/source/javamaker/javaoptions.cxx  |4 
 comphelper/source/misc/backupfilehelper.cxx |3 
 compilerplugins/clang/stringadd.cxx |   59 ++---
 compilerplugins/clang/test/stringadd.cxx|   16 +-
 cppu/source/uno/EnvStack.cxx|3 
 filter/source/msfilter/msdffimp.cxx |4 
 formula/source/ui/dlg/funcutl.cxx   |3 
 idlc/source/options.cxx |7 -
 io/source/acceptor/acc_socket.cxx   |8 -
 io/source/connector/ctr_socket.cxx  |8 -
 lotuswordpro/source/filter/lwptblformula.cxx|6 
 lotuswordpro/source/filter/xfilter/xfdrawpath.cxx   |6 
 lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx|6 
 lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx   |6 
 sal/qa/osl/file/osl_File.cxx|   18 +-
 sc/source/ui/unoobj/cellvaluebinding.cxx|6 
 sfx2/source/control/request.cxx |4 
 sot/source/sdstor/ucbstorage.cxx|   10 -
 svl/qa/unit/svl.cxx |4 
 svx/source/dialog/hexcolorcontrol.cxx   |3 
 svx/source/form/fmcontrollayout.cxx |4 
 svx/source/form/fmtextcontrolshell.cxx  |6 
 svx/source/gallery2/galtheme.cxx|4 
 svx/source/svdraw/svdmrkv.cxx   |   17 +-
 sw/qa/extras/layout/layout.cxx  |7 -
 sw/qa/extras/rtfexport/rtfexport2.cxx   |3 
 sw/source/core/doc/dbgoutsw.cxx |   75 +---
 sw/source/filter/html/htmlnumwriter.cxx |3 
 sw/source/filter/xml/xmltexte.cxx   |3 
 sw/source/uibase/dbui/dbmgr.cxx |   22 +--
 ucb/source/ucp/ftp/ftpurl.cxx   |6 
 writerfilter/source/dmapper/OLEHandler.cxx  |3 
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx|   10 -
 xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx |3 
 xmloff/source/draw/sdxmlexp.cxx |4 
 36 files changed, 177 insertions(+), 181 deletions(-)

New commits:
commit bc539bd3c04964471af6b5ca54264215c8995696
Author: Noel Grandin 
AuthorDate: Mon Oct 28 10:35:49 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 28 12:07:54 2019 +0100

loplugin:stringadd improve detection

if one side of the expression is a compile-time-constant, we don't need
to worry about side-effects on the other side

Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b
Reviewed-on: https://gerrit.libreoffice.org/81589
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/codemaker/source/cppumaker/cppuoptions.cxx 
b/codemaker/source/cppumaker/cppuoptions.cxx
index 05c941b2c68a..90f16fdd3332 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -311,8 +311,8 @@ OString CppuOptions::prepareHelp()
 "-nD= no dependent types are generated.\n"
 "-G = generate only target files which does not exists.\n"
 "-Gc= generate only target files which content will be 
changed.\n"
-"-X   = extra types which will not be taken into account for 
generation.\n\n";
-help += prepareVersion();
+"-X   = extra types which will not be taken into account for 
generation.\n\n" +
+prepareVersion();
 
 return help;
 }
diff --git a/codemaker/source/javamaker/javaoptions.cxx 
b/codemaker/source/javamaker/javaoptions.cxx
index 795d1bbf8955..31e43414c68c 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -234,8 +234,8 @@ OString JavaOptions::prepareHelp()
 "-nD= no dependent types are generated.\n"
 "-G = generate only target files which does not exists.\n"
 "-Gc= generate only target files which content will be 
changed.\n"
-"-X   = extra types which will not be taken into account for 
generation.\n\n";
-help += prepareVersion();
+"-X   = extra types which will not be taken into account for 
generation.\n\n" +
+prepareVersion();
 
 return help;
 }
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index 749b9896cb0b..5421f1510ba4 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1702,8 +1702,7 @@ namespace comphelper
 

[Libreoffice-commits] core.git: codemaker/source comphelper/source

2019-02-08 Thread Libreoffice Gerrit user
 codemaker/source/javamaker/javaoptions.cxx  |7 -
 comphelper/source/container/embeddedobjectcontainer.cxx |6 -
 comphelper/source/misc/accessiblewrapper.cxx|2 
 comphelper/source/misc/instancelocker.cxx   |2 
 comphelper/source/misc/numberedcollection.cxx   |   66 
 comphelper/source/misc/sequenceashashmap.cxx|6 -
 comphelper/source/property/propertystatecontainer.cxx   |6 -
 comphelper/source/property/propstate.cxx|3 
 8 files changed, 50 insertions(+), 48 deletions(-)

New commits:
commit 3b9dcfee6492474398011755a92d77320a226604
Author: Noel Grandin 
AuthorDate: Fri Feb 8 09:30:19 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 8 10:01:40 2019 +0100

loplugin:indentation in codemaker..comphelper

Change-Id: I8dee6245cfa1f7998591b31a3752bbbae13f499d
Reviewed-on: https://gerrit.libreoffice.org/67527
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/codemaker/source/javamaker/javaoptions.cxx 
b/codemaker/source/javamaker/javaoptions.cxx
index 612b3d6b2d97..2d583e51ac3f 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -86,8 +86,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool 
bCmdFile)
 case 'n':
 if (av[i][2] != 'D' || av[i][3] != '\0')
 {
-OString tmp("'-nD', please check");
-tmp += " your input '" + OString(av[i]) + "'";
+OString tmp("'-nD', please check your input '" + 
OString(av[i]) + "'");
 throw IllegalArgument(tmp);
 }
 
@@ -189,8 +188,8 @@ bool JavaOptions::initOptions(int ac, char* av[], bool 
bCmdFile)
 if (av[i][0] == '@')
 {
 FILE* cmdFile = fopen(av[i]+1, "r");
-  if( cmdFile == nullptr )
-  {
+if( cmdFile == nullptr )
+{
 fprintf(stderr, "%s", prepareHelp().getStr());
 ret = false;
 } else
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx 
b/comphelper/source/container/embeddedobjectcontainer.cxx
index 81e5064f34e2..c2e61bcc6f72 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -614,7 +614,7 @@ uno::Reference < embed::XEmbeddedObject > 
EmbeddedObjectContainer::InsertEmbedde
 pImpl->mxStorage, rNewName, aMedium, aObjDescr ), 
uno::UNO_QUERY );
 uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY 
);
 
-   OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != 
embed::EmbedStates::LOADED,
+OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != 
embed::EmbedStates::LOADED,
 "A freshly create object should be running always!" );
 
 // possible optimization: store later!
@@ -646,7 +646,7 @@ uno::Reference < embed::XEmbeddedObject > 
EmbeddedObjectContainer::InsertEmbedde
 
 uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY 
);
 
-   OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != 
embed::EmbedStates::LOADED,
+OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != 
embed::EmbedStates::LOADED,
 "A freshly create object should be running always!" );
 
 // possible optimization: store later!
@@ -791,7 +791,7 @@ uno::Reference < embed::XEmbeddedObject > 
EmbeddedObjectContainer::CopyAndGetEmb
 }
 }
 
-   if ( xResult.is() )
+if ( xResult.is() )
 AddEmbeddedObject( xResult, rName );
 }
 catch (const uno::Exception&)
diff --git a/comphelper/source/misc/accessiblewrapper.cxx 
b/comphelper/source/misc/accessiblewrapper.cxx
index b28b2a240e56..9736b031f618 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -242,7 +242,7 @@ namespace comphelper
 #if OSL_DEBUG_LEVEL > 0
 if ( m_aChildrenMap.end() == aDisposedPos )
 {
-   OSL_FAIL( "OWrappedAccessibleChildrenManager::disposing: where 
did this come from?" );
+OSL_FAIL( "OWrappedAccessibleChildrenManager::disposing: where did 
this come from?" );
 // helper for diagnostics
 Reference< XAccessible > xOwningAccessible( m_aOwningAccessible );
 Reference< XAccessibleContext > xContext;
diff --git a/comphelper/source/misc/instancelocker.cxx 
b/comphelper/source/misc/instancelocker.cxx
index 61b6338b67ca..43991cec43b1 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -68,7 +68,7 @@ void SAL_CALL OInstanceLocker::dispose()
 if ( m_bDisposed )

[Libreoffice-commits] core.git: codemaker/source comphelper/source compilerplugins/clang jurt/source solenv/CompilerTest_compilerplugins_clang.mk soltools/cpp soltools/mkdepend

2017-08-14 Thread Noel Grandin
 codemaker/source/cppumaker/cppuoptions.cxx  |2 
 codemaker/source/javamaker/javaoptions.cxx  |2 
 comphelper/source/misc/backupfilehelper.cxx |8 
 compilerplugins/clang/droplong.cxx  |  123 
++
 compilerplugins/clang/test/droplong.cxx |   20 +
 jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c |2 
 solenv/CompilerTest_compilerplugins_clang.mk|1 
 soltools/cpp/_eval.c|6 
 soltools/mkdepend/def.h |2 
 9 files changed, 155 insertions(+), 11 deletions(-)

New commits:
commit 0c3bd1d482ece1f2217cc87069179161f6a5bb56
Author: Noel Grandin 
Date:   Mon Aug 14 08:28:13 2017 +0200

new loplugin:droplong

The types 'long' and 'unsigned long' are different sizes on different
platforms, making them wholy unsuitable for portable code.
And when I mean different sizes, I mean 64bit Linux and 64bit Windows
have different bit sizes.

Change-Id: Id4d8cd709bf71a3f85ed6515fae2b0a21ae8c25d
Reviewed-on: https://gerrit.libreoffice.org/41130
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/codemaker/source/cppumaker/cppuoptions.cxx 
b/codemaker/source/cppumaker/cppuoptions.cxx
index d6f31e89aeee..b399de19147e 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -278,7 +278,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool 
bCmdFile)
 
 ret = initOptions(rargc, rargv, bCmdFile);
 
-for (long j=0; j < rargc; j++)
+for (int j=0; j < rargc; j++)
 {
 free(rargv[j]);
 }
diff --git a/codemaker/source/javamaker/javaoptions.cxx 
b/codemaker/source/javamaker/javaoptions.cxx
index a09107a99b53..08c5a7f4dbf8 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -208,7 +208,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool 
bCmdFile)
 
 ret = initOptions(rargc, rargv, bCmdFile);
 
-for (long j=0; j < rargc; j++)
+for (int j=0; j < rargc; j++)
 {
 free(rargv[j]);
 }
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index ebf93aeb8282..abc8579a542b 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -654,9 +654,9 @@ namespace
 
 if (aList.is())
 {
-const long nLength(aList->getLength());
+const sal_Int32 nLength(aList->getLength());
 
-for (long a(0); a < nLength; a++)
+for (sal_Int32 a(0); a < nLength; a++)
 {
 const uno::Reference< xml::dom::XElement > 
aChild(aList->item(a), uno::UNO_QUERY);
 
@@ -765,9 +765,9 @@ namespace
 
 if (aList.is())
 {
-const long nLength(aList->getLength());
+const sal_Int32 nLength(aList->getLength());
 
-for (long a(0); a < nLength; a++)
+for (sal_Int32 a(0); a < nLength; a++)
 {
 const uno::Reference< xml::dom::XElement > 
aChild(aList->item(a), uno::UNO_QUERY);
 
diff --git a/compilerplugins/clang/droplong.cxx 
b/compilerplugins/clang/droplong.cxx
new file mode 100644
index ..78129e78c323
--- /dev/null
+++ b/compilerplugins/clang/droplong.cxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "plugin.hxx"
+#include "check.hxx"
+
+/**
+The types 'long' and 'unsigned long' are different sizes on different 
platforms, making them wholy unsuitable
+for portable code.
+And when I mean different sizes, I mean 64bit Linux and 64bit Windows have 
different sizes.
+ */
+namespace {
+
+static bool startswith(const std::string& rStr, const char* pSubStr) {
+return rStr.compare(0, strlen(pSubStr), pSubStr) == 0;
+}
+
+class DropLong:
+public RecursiveASTVisitor, public loplugin::Plugin
+{
+public:
+explicit DropLong(InstantiationData const & data): Plugin(data) {}
+
+virtual void run() override
+{
+   

[Libreoffice-commits] core.git: codemaker/source comphelper/source connectivity/source

2017-06-20 Thread Noel Grandin
 codemaker/source/codemaker/global.cxx   |2 
 comphelper/source/container/embeddedobjectcontainer.cxx |3 
 comphelper/source/property/ChainablePropertySet.cxx |4 
 comphelper/source/property/MasterPropertySet.cxx|4 
 comphelper/source/property/opropertybag.cxx |2 
 comphelper/source/streaming/oslfile2streamwrap.cxx  |3 
 connectivity/source/commontools/FValue.cxx  |3 
 connectivity/source/commontools/TIndexColumns.cxx   |3 
 connectivity/source/commontools/TIndexes.cxx|3 
 connectivity/source/drivers/calc/CTable.cxx |3 
 connectivity/source/drivers/dbase/DTable.cxx|3 
 connectivity/source/drivers/firebird/Connection.cxx |3 
 connectivity/source/drivers/firebird/DatabaseMetaData.cxx   |   21 +---
 connectivity/source/drivers/firebird/StatementCommonBase.cxx|3 
 connectivity/source/drivers/hsqldb/HDriver.cxx  |3 
 connectivity/source/drivers/jdbc/CallableStatement.cxx  |   10 -
 connectivity/source/drivers/jdbc/ResultSet.cxx  |   10 -
 connectivity/source/drivers/mork/MDatabaseMetaData.cxx  |   51 
+++---
 connectivity/source/drivers/mork/MStatement.cxx |3 
 connectivity/source/drivers/mysql/YCatalog.cxx  |4 
 connectivity/source/drivers/mysql/YTables.cxx   |2 
 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx |3 
 connectivity/source/drivers/postgresql/pq_tools.cxx |3 
 connectivity/source/drivers/postgresql/pq_xuser.cxx |3 
 24 files changed, 54 insertions(+), 98 deletions(-)

New commits:
commit 8ed77fae3e5e9e5f7409e03d5e4586f428a65c86
Author: Noel Grandin 
Date:   Tue Jun 20 09:26:05 2017 +0200

loplugin:oncevar in codemaker..connectivity

Change-Id: Ia479d9d3d459a699dfc5c1148d01c35e8bc973bd
Reviewed-on: https://gerrit.libreoffice.org/39000
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/codemaker/source/codemaker/global.cxx 
b/codemaker/source/codemaker/global.cxx
index 7f80faec432a..49ce44be7908 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -294,7 +294,7 @@ void FileStream::createTempFile(const OString& sPath)
 
 if (osl_createTempFile(sTmpPath.pData, &m_file, &sTmpName.pData) == 
osl_File_E_None) {
 #ifdef SAL_UNX
-sal_uInt64 uAttr = osl_File_Attribute_OwnWrite |
+sal_uInt64 const uAttr = osl_File_Attribute_OwnWrite |
osl_File_Attribute_OwnRead |
osl_File_Attribute_GrpWrite |
osl_File_Attribute_GrpRead |
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx 
b/comphelper/source/container/embeddedobjectcontainer.cxx
index 89068adafc19..2a045edf863c 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -214,12 +214,11 @@ void EmbeddedObjectContainer::CloseEmbeddedObjects()
 
 OUString EmbeddedObjectContainer::CreateUniqueObjectName()
 {
-OUString aPersistName("Object ");
 OUString aStr;
 sal_Int32 i=1;
 do
 {
-aStr = aPersistName + OUString::number( i++ );
+aStr = "Object " + OUString::number( i++ );
 }
 while( HasEmbeddedObject( aStr ) );
 // TODO/LATER: should we consider deleted objects?
diff --git a/comphelper/source/property/ChainablePropertySet.cxx 
b/comphelper/source/property/ChainablePropertySet.cxx
index c847b393030b..258b6dad0495 100644
--- a/comphelper/source/property/ChainablePropertySet.cxx
+++ b/comphelper/source/property/ChainablePropertySet.cxx
@@ -194,9 +194,7 @@ PropertyState SAL_CALL 
ChainablePropertySet::getPropertyState( const OUString& P
 if( aIter == mxInfo->maMap.end())
 throw UnknownPropertyException( PropertyName, static_cast< 
XPropertySet* >( this ) );
 
-PropertyState aState(PropertyState_AMBIGUOUS_VALUE);
-
-return aState;
+return PropertyState_AMBIGUOUS_VALUE;
 }
 
 Sequence< PropertyState > SAL_CALL ChainablePropertySet::getPropertyStates( 
const Sequence< OUString >& rPropertyNames )
diff --git a/comphelper/source/property/MasterPropertySet.cxx 
b/comphelper/source/property/MasterPropertySet.cxx
index f4df2305e6c6..3f83b12b2be4 100644
--- a/comphelper/source/property/MasterPropertySet.cxx
+++ b/comphelper/source/property/MasterPropertySet.cxx
@@ -322,8 +322,6 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( 
const OUString& Prop
 if( aIter == mxInfo->maMap.end())
 throw UnknownPropertyException( PropertyName, static_cast< 
XPropertySet* >( this ) );
 
-PropertyState aState(PropertyState_AMBIGUOUS_VALUE);
-
 // 0 means it's one of ours !
 if ( (*aIter).second->mnMa