[Libreoffice-commits] core.git: 33 commits - accessibility/source avmedia/source basctl/source basic/source chart2/source comphelper/source compilerplugins/clang connectivity/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source forms/source formula/source fpicker/source framework/source sc/qa sc/source sd/qa sd/source sfx2/source solenv/CompilerTest_compilerplugins_clang.mk starmath/source svl/source svtools/source svx/source sw/source toolkit/source ucb/source unotools/source vcl/source writerfilter/source xmloff/source xmlsecurity/source

Stephan Bergmann sbergman at redhat.com
Fri May 19 15:20:36 UTC 2017


 accessibility/source/extended/accessiblelistboxentry.cxx          |    4 
 accessibility/source/standard/vclxaccessiblebutton.cxx            |    2 
 avmedia/source/framework/MediaControlBase.cxx                     |   18 +--
 avmedia/source/framework/mediacontrol.cxx                         |    8 -
 avmedia/source/framework/mediaplayer.cxx                          |    2 
 basctl/source/basicide/baside2b.cxx                               |    4 
 basic/source/classes/sb.cxx                                       |    2 
 basic/source/classes/sbunoobj.cxx                                 |    2 
 basic/source/classes/sbxmod.cxx                                   |    2 
 chart2/source/controller/dialogs/DataBrowser.cxx                  |    8 -
 chart2/source/controller/dialogs/ObjectNameProvider.cxx           |    6 -
 chart2/source/controller/dialogs/tp_DataSource.cxx                |    6 -
 chart2/source/tools/CharacterProperties.cxx                       |   12 +-
 comphelper/source/officeinstdir/officeinstallationdirectories.cxx |   24 ++--
 compilerplugins/clang/stringcopy.cxx                              |   53 ++++++++++
 compilerplugins/clang/test/stringcopy.cxx                         |   23 ++++
 connectivity/source/drivers/file/FDatabaseMetaData.cxx            |    2 
 cui/source/customize/cfg.cxx                                      |   10 -
 cui/source/dialogs/cuifmsearch.cxx                                |    6 -
 cui/source/dialogs/cuigaldlg.cxx                                  |    4 
 cui/source/dialogs/hldocntp.cxx                                   |    2 
 cui/source/dialogs/hltpbase.cxx                                   |    6 -
 cui/source/dialogs/scriptdlg.cxx                                  |   10 -
 cui/source/options/connpooloptions.cxx                            |    6 -
 cui/source/options/optjava.cxx                                    |    2 
 cui/source/options/personalization.cxx                            |    2 
 cui/source/options/treeopt.cxx                                    |    2 
 cui/source/tabpages/autocdlg.cxx                                  |    4 
 cui/source/tabpages/numfmt.cxx                                    |    2 
 dbaccess/source/ui/browser/unodatbr.cxx                           |    2 
 dbaccess/source/ui/control/FieldDescControl.cxx                   |    4 
 dbaccess/source/ui/dlg/DbAdminImpl.cxx                            |    6 -
 dbaccess/source/ui/dlg/UserAdmin.cxx                              |    4 
 dbaccess/source/ui/misc/WTypeSelect.cxx                           |    4 
 dbaccess/source/ui/misc/indexcollection.cxx                       |    2 
 dbaccess/source/ui/querydesign/QTableWindow.cxx                   |    2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx             |    6 -
 dbaccess/source/ui/relationdesign/RTableConnectionData.cxx        |    2 
 desktop/source/app/dispatchwatcher.cxx                            |    2 
 desktop/source/pkgchk/unopkg/unopkg_app.cxx                       |    2 
 editeng/source/accessibility/AccessibleEditableTextPara.cxx       |    2 
 editeng/source/items/paraitem.cxx                                 |    2 
 editeng/source/misc/SvXMLAutoCorrectExport.cxx                    |    4 
 editeng/source/misc/acorrcfg.cxx                                  |    4 
 extensions/source/dbpilots/listcombowizard.cxx                    |    6 -
 extensions/source/dbpilots/optiongrouplayouter.cxx                |    6 -
 extensions/source/propctrlr/fontdialog.cxx                        |    4 
 extensions/source/propctrlr/formcomponenthandler.cxx              |    2 
 extensions/source/propctrlr/standardcontrol.cxx                   |    2 
 extensions/source/resource/oooresourceloader.cxx                  |    2 
 filter/source/msfilter/eschesdo.cxx                               |    2 
 filter/source/msfilter/msoleexp.cxx                               |    2 
 filter/source/svg/svgexport.cxx                                   |    2 
 forms/source/component/ImageControl.cxx                           |    2 
 formula/source/core/api/FormulaCompiler.cxx                       |    2 
 fpicker/source/office/OfficeControlAccess.cxx                     |    4 
 fpicker/source/office/iodlg.cxx                                   |    6 -
 framework/source/fwi/helper/mischelper.cxx                        |    6 -
 framework/source/layoutmanager/toolbarlayoutmanager.cxx           |    2 
 framework/source/recording/dispatchrecorder.cxx                   |    2 
 framework/source/uielement/notebookbarmenucontroller.cxx          |    2 
 sc/qa/extras/macros-test.cxx                                      |    2 
 sc/source/core/data/documen5.cxx                                  |   10 -
 sc/source/core/data/documen8.cxx                                  |    6 -
 sc/source/core/data/dpobject.cxx                                  |   10 -
 sc/source/core/data/dptabres.cxx                                  |    2 
 sc/source/core/tool/compiler.cxx                                  |    2 
 sc/source/filter/excel/xehelper.cxx                               |    2 
 sc/source/filter/xml/XMLExportDataPilot.cxx                       |    2 
 sc/source/filter/xml/xmlexprt.cxx                                 |    4 
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx               |    8 -
 sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx        |    2 
 sc/source/ui/condformat/condformatdlgentry.cxx                    |    2 
 sc/source/ui/dbgui/scuiasciiopt.cxx                               |    2 
 sc/source/ui/docshell/docfunc.cxx                                 |    4 
 sc/source/ui/docshell/docsh.cxx                                   |    6 -
 sc/source/ui/docshell/docsh4.cxx                                  |    2 
 sc/source/ui/docshell/docsh8.cxx                                  |    2 
 sc/source/ui/docshell/documentlinkmgr.cxx                         |    6 -
 sc/source/ui/drawfunc/fuins2.cxx                                  |    2 
 sc/source/ui/drawfunc/mediash.cxx                                 |    2 
 sc/source/ui/miscdlgs/warnbox.cxx                                 |    2 
 sc/source/ui/undo/undocell.cxx                                    |    4 
 sc/source/ui/undo/undotab.cxx                                     |    2 
 sc/source/ui/unoobj/PivotTableDataSequence.cxx                    |    2 
 sc/source/ui/unoobj/appluno.cxx                                   |    4 
 sc/source/ui/unoobj/cellsuno.cxx                                  |   14 +-
 sc/source/ui/unoobj/confuno.cxx                                   |    2 
 sc/source/ui/unoobj/styleuno.cxx                                  |    2 
 sc/source/ui/unoobj/tokenuno.cxx                                  |    2 
 sc/source/ui/view/tabvwsh3.cxx                                    |    4 
 sc/source/ui/view/viewfun5.cxx                                    |    4 
 sd/qa/unit/import-tests.cxx                                       |    2 
 sd/source/core/drawdoc3.cxx                                       |    2 
 sd/source/core/stlfamily.cxx                                      |    2 
 sd/source/filter/html/pubdlg.cxx                                  |   16 +--
 sd/source/filter/ppt/pptin.cxx                                    |    2 
 sd/source/filter/xml/sdxmlwrp.cxx                                 |    2 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx                             |   14 +-
 sd/source/ui/dlg/custsdlg.cxx                                     |    2 
 sd/source/ui/remotecontrol/Server.cxx                             |    2 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx                       |    2 
 sd/source/ui/unoidl/unolayer.cxx                                  |    4 
 sd/source/ui/unoidl/unoobj.cxx                                    |    6 -
 sfx2/source/appl/appopen.cxx                                      |    2 
 sfx2/source/appl/appuno.cxx                                       |    4 
 sfx2/source/appl/newhelp.cxx                                      |   10 -
 sfx2/source/appl/sfxpicklist.cxx                                  |    2 
 sfx2/source/appl/shutdownicon.cxx                                 |    2 
 sfx2/source/bastyp/fltfnc.cxx                                     |    4 
 sfx2/source/control/emojicontrol.cxx                              |    2 
 sfx2/source/control/unoctitm.cxx                                  |    2 
 sfx2/source/doc/printhelper.cxx                                   |    6 -
 sfx2/source/doc/sfxbasemodel.cxx                                  |    2 
 sfx2/source/view/frmload.cxx                                      |    6 -
 sfx2/source/view/viewprn.cxx                                      |    4 
 solenv/CompilerTest_compilerplugins_clang.mk                      |    1 
 starmath/source/accessibility.cxx                                 |    2 
 starmath/source/cfgitem.cxx                                       |    2 
 starmath/source/document.cxx                                      |    2 
 starmath/source/parse.cxx                                         |    2 
 starmath/source/unomodel.cxx                                      |    4 
 starmath/source/view.cxx                                          |    2 
 svl/source/items/ctypeitm.cxx                                     |    2 
 svl/source/numbers/numfmuno.cxx                                   |    6 -
 svl/source/numbers/zforscan.cxx                                   |    4 
 svtools/source/brwbox/brwbox3.cxx                                 |    2 
 svtools/source/contnr/svtabbx.cxx                                 |    4 
 svtools/source/control/inettbc.cxx                                |    2 
 svtools/source/dialogs/PlaceEditDialog.cxx                        |    2 
 svtools/source/dialogs/wizardmachine.cxx                          |    2 
 svtools/source/misc/imagemgr.cxx                                  |    2 
 svtools/source/misc/transfer.cxx                                  |    2 
 svtools/source/uno/unoiface.cxx                                   |    4 
 svx/source/accessibility/DescriptionGenerator.cxx                 |    8 -
 svx/source/accessibility/ShapeTypeHandler.cxx                     |    2 
 svx/source/fmcomp/gridcell.cxx                                    |    4 
 svx/source/form/fmvwimp.cxx                                       |    8 -
 svx/source/items/grfitem.cxx                                      |    8 -
 svx/source/sidebar/nbdtmg.cxx                                     |    4 
 svx/source/svdraw/svdomedia.cxx                                   |    2 
 svx/source/tbxctrls/tbcontrl.cxx                                  |    2 
 svx/source/unodraw/unoshap2.cxx                                   |    2 
 svx/source/unogallery/unogalitem.cxx                              |    6 -
 svx/source/xoutdev/xattr2.cxx                                     |    2 
 sw/source/core/access/acchyperlink.cxx                            |    4 
 sw/source/core/crsr/annotationmark.cxx                            |    2 
 sw/source/core/fields/docufld.cxx                                 |    2 
 sw/source/core/fields/expfld.cxx                                  |    2 
 sw/source/core/fields/fldbas.cxx                                  |    2 
 sw/source/core/fields/reffld.cxx                                  |    2 
 sw/source/core/fields/tblcalc.cxx                                 |    2 
 sw/source/core/swg/SwXMLBlockExport.cxx                           |   10 -
 sw/source/filter/html/htmlform.cxx                                |   10 -
 sw/source/filter/html/htmlplug.cxx                                |    2 
 sw/source/filter/writer/writer.cxx                                |    2 
 sw/source/filter/ww8/docxattributeoutput.cxx                      |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx                       |   10 -
 sw/source/filter/ww8/wrtww8.cxx                                   |   10 -
 sw/source/filter/ww8/wrtww8.hxx                                   |    2 
 sw/source/filter/ww8/ww8par3.cxx                                  |    4 
 sw/source/filter/xml/xmltexti.cxx                                 |    8 -
 sw/source/ui/dialog/macassgn.cxx                                  |   26 ++--
 sw/source/ui/envelp/label1.cxx                                    |    2 
 sw/source/uibase/app/docsh.cxx                                    |    2 
 sw/source/uibase/config/modcfg.cxx                                |    6 -
 sw/source/uibase/dbui/dbmgr.cxx                                   |    2 
 sw/source/uibase/envelp/labelcfg.cxx                              |    2 
 sw/source/uibase/misc/swruler.cxx                                 |    2 
 sw/source/uibase/shells/drformsh.cxx                              |    2 
 sw/source/uibase/shells/textsh.cxx                                |    4 
 sw/source/uibase/shells/textsh1.cxx                               |    6 -
 sw/source/uibase/uiview/viewling.cxx                              |    6 -
 sw/source/uibase/uno/SwXDocumentSettings.cxx                      |    4 
 sw/source/uibase/utlui/attrdesc.cxx                               |   10 -
 sw/source/uibase/wrtsh/wrtsh1.cxx                                 |    4 
 toolkit/source/awt/vclxwindows.cxx                                |    8 -
 toolkit/source/controls/formattedcontrol.cxx                      |    2 
 ucb/source/core/ucbcmds.cxx                                       |    2 
 ucb/source/core/ucbstore.cxx                                      |    2 
 ucb/source/ucp/webdav-neon/NeonSession.cxx                        |    2 
 ucb/source/ucp/webdav-neon/webdavcontent.cxx                      |    4 
 unotools/source/config/optionsdlg.cxx                             |    4 
 unotools/source/ucbhelper/xtempfile.cxx                           |    4 
 vcl/source/control/ctrl.cxx                                       |    2 
 vcl/source/control/field.cxx                                      |    2 
 vcl/source/control/field2.cxx                                     |    2 
 vcl/source/filter/graphicfilter.cxx                               |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                                 |    2 
 vcl/source/gdi/print3.cxx                                         |    2 
 vcl/source/window/toolbox2.cxx                                    |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                 |    2 
 xmloff/source/meta/xmlversion.cxx                                 |    6 -
 xmloff/source/style/xmlnumfi.cxx                                  |    2 
 xmloff/source/text/txtparae.cxx                                   |    8 -
 xmlsecurity/source/helper/xsecctl.cxx                             |    2 
 196 files changed, 473 insertions(+), 396 deletions(-)

New commits:
commit b6778e921f72ca0ef49b4e18f3f990a397b9c491
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:20:05 2017 +0200

    loplugin:stringcopy
    
    Change-Id: Ib04ef019996888166c25ad140b7c718a173a782a

diff --git a/compilerplugins/clang/stringcopy.cxx b/compilerplugins/clang/stringcopy.cxx
new file mode 100644
index 000000000000..64783f5a67d9
--- /dev/null
+++ b/compilerplugins/clang/stringcopy.cxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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 "check.hxx"
+#include "plugin.hxx"
+
+namespace {
+
+class Visitor final:
+    public RecursiveASTVisitor<Visitor>, public loplugin::Plugin
+{
+public:
+    explicit Visitor(InstantiationData const & data): Plugin(data) {}
+
+    bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr) {
+        if (ignoreLocation(expr)) {
+            return true;
+        }
+        auto const t1 = expr->getTypeAsWritten();
+        auto const t2 = expr->getSubExprAsWritten()->getType();
+        if ((t1.getCanonicalType().getTypePtr()
+             != t2.getCanonicalType().getTypePtr())
+            || !(loplugin::TypeCheck(t1).Class("OUString").Namespace("rtl")
+                 .GlobalNamespace()))
+        {
+            return true;
+        }
+        report(
+            DiagnosticsEngine::Warning,
+            "redundant copy construction from %0 to %1", expr->getExprLoc())
+            << t2 << t1 << expr->getSourceRange();
+        return true;
+    }
+
+private:
+    void run() override {
+        if (compiler.getLangOpts().CPlusPlus) {
+            TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+        }
+    }
+};
+
+static loplugin::Plugin::Registration<Visitor> reg("stringcopy");
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/stringcopy.cxx b/compilerplugins/clang/test/stringcopy.cxx
new file mode 100644
index 000000000000..c801b7096f74
--- /dev/null
+++ b/compilerplugins/clang/test/stringcopy.cxx
@@ -0,0 +1,23 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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 "sal/config.h"
+
+#include "rtl/ustring.hxx"
+
+int main() {
+    OUString s;
+    (void) OUString(s); // expected-error {{redundant copy construction from 'rtl::OUString' to 'rtl::OUString' [loplugin:stringcopy]}}
+    using T1 = OUString;
+    (void) T1(s); // expected-error {{redundant copy construction from 'rtl::OUString' to 'T1' (aka 'rtl::OUString') [loplugin:stringcopy]}}
+    using T2 = OUString const;
+    (void) T2(s); // expected-error {{redundant copy construction from 'rtl::OUString' to 'T2' (aka 'const rtl::OUString') [loplugin:stringcopy]}}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk
index a4de36ee090a..dd8951325e50 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
     compilerplugins/clang/test/salbool \
     compilerplugins/clang/test/salunicodeliteral \
     compilerplugins/clang/test/stringconstant \
+    compilerplugins/clang/test/stringcopy \
     compilerplugins/clang/test/unnecessaryoverride-dtor \
     compilerplugins/clang/test/unoany \
     compilerplugins/clang/test/vclwidgets \
commit 0e4a884b818f6fcb4b1f5809cfd5f4487021ea88
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:19:40 2017 +0200

    loplugin:stringcopy: accessibility
    
    Change-Id: I8f6d1ed2b59ca4257884151b69edbbb556497378

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 4f635be0cbac..0f471650ca41 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -822,8 +822,8 @@ namespace accessibility
         {
             if( pEntry->HasChildren() || pEntry->HasChildrenOnDemand() )
                 return getListBox()->IsExpanded( pEntry ) ?
-                OUString(TK_RES_STRING(STR_SVT_ACC_ACTION_COLLAPSE)) :
-                OUString(TK_RES_STRING(STR_SVT_ACC_ACTION_EXPAND));
+                TK_RES_STRING(STR_SVT_ACC_ACTION_COLLAPSE) :
+                TK_RES_STRING(STR_SVT_ACC_ACTION_EXPAND);
             return OUString();
 
         }
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index 5a16d8e50be6..2bfa5611d2d3 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -149,7 +149,7 @@ OUString VCLXAccessibleButton::getAccessibleName(  )
         if ( nLength == 3 )
         {
             // it's a browse button
-            aName = OUString( TK_RES_STRING( RID_STR_ACC_NAME_BROWSEBUTTON ) );
+            aName = TK_RES_STRING( RID_STR_ACC_NAME_BROWSEBUTTON );
         }
         else
         {
commit 7de64a40b1d8a5bfd82c68db63dd6f088f6ff344
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:19:31 2017 +0200

    loplugin:stringcopy: avmedia
    
    Change-Id: Ie7716d05d6e98a8aa2a96f26ceb4dcd3b77b1ad3

diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx
index c4174f0304d4..2aa829dc735f 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -97,27 +97,27 @@ void MediaControlBase::UpdateTimeSlider( MediaItem aMediaItem )
 
 void MediaControlBase::InitializeWidgets()
 {
-    mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, GetImage(AVMEDIA_TOOLBOXITEM_PLAY), OUString( AvmResId( AVMEDIA_STR_PLAY ) ), ToolBoxItemBits::CHECKABLE );
+    mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, GetImage(AVMEDIA_TOOLBOXITEM_PLAY), AvmResId( AVMEDIA_STR_PLAY ), ToolBoxItemBits::CHECKABLE );
     mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_PLAY, HID_AVMEDIA_TOOLBOXITEM_PLAY );
 
-    mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, GetImage(AVMEDIA_TOOLBOXITEM_PAUSE), OUString( AvmResId( AVMEDIA_STR_PAUSE ) ), ToolBoxItemBits::CHECKABLE );
+    mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, GetImage(AVMEDIA_TOOLBOXITEM_PAUSE), AvmResId( AVMEDIA_STR_PAUSE ), ToolBoxItemBits::CHECKABLE );
     mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_PAUSE, HID_AVMEDIA_TOOLBOXITEM_PAUSE );
 
-    mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_STOP, GetImage(AVMEDIA_TOOLBOXITEM_STOP), OUString( AvmResId( AVMEDIA_STR_STOP ) ), ToolBoxItemBits::CHECKABLE );
+    mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_STOP, GetImage(AVMEDIA_TOOLBOXITEM_STOP), AvmResId( AVMEDIA_STR_STOP ), ToolBoxItemBits::CHECKABLE );
     mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_STOP, HID_AVMEDIA_TOOLBOXITEM_STOP );
 
     mpPlayToolBox->InsertSeparator();
 
-    mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_LOOP, GetImage(AVMEDIA_TOOLBOXITEM_LOOP), OUString( AvmResId( AVMEDIA_STR_LOOP ) ) );
+    mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_LOOP, GetImage(AVMEDIA_TOOLBOXITEM_LOOP), AvmResId( AVMEDIA_STR_LOOP ) );
     mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_LOOP, HID_AVMEDIA_TOOLBOXITEM_LOOP );
 
-    mpMuteToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_MUTE, GetImage(AVMEDIA_TOOLBOXITEM_MUTE), OUString( AvmResId( AVMEDIA_STR_MUTE ) ) );
+    mpMuteToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_MUTE, GetImage(AVMEDIA_TOOLBOXITEM_MUTE), AvmResId( AVMEDIA_STR_MUTE ) );
     mpMuteToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_MUTE, HID_AVMEDIA_TOOLBOXITEM_MUTE );
 
-    mpZoomListBox->InsertEntry( OUString( AvmResId( AVMEDIA_STR_ZOOM_50 ) ), AVMEDIA_ZOOMLEVEL_50 );
-    mpZoomListBox->InsertEntry( OUString( AvmResId( AVMEDIA_STR_ZOOM_100 ) ), AVMEDIA_ZOOMLEVEL_100 );
-    mpZoomListBox->InsertEntry( OUString( AvmResId( AVMEDIA_STR_ZOOM_200 ) ), AVMEDIA_ZOOMLEVEL_200 );
-    mpZoomListBox->InsertEntry( OUString( AvmResId( AVMEDIA_STR_ZOOM_FIT ) ), AVMEDIA_ZOOMLEVEL_FIT );
+    mpZoomListBox->InsertEntry( AvmResId( AVMEDIA_STR_ZOOM_50 ), AVMEDIA_ZOOMLEVEL_50 );
+    mpZoomListBox->InsertEntry( AvmResId( AVMEDIA_STR_ZOOM_100 ), AVMEDIA_ZOOMLEVEL_100 );
+    mpZoomListBox->InsertEntry( AvmResId( AVMEDIA_STR_ZOOM_200 ), AVMEDIA_ZOOMLEVEL_200 );
+    mpZoomListBox->InsertEntry( AvmResId( AVMEDIA_STR_ZOOM_FIT ), AVMEDIA_ZOOMLEVEL_FIT );
     mpZoomListBox->SetHelpId( HID_AVMEDIA_ZOOMLISTBOX );
 
     const OUString aTimeText( " 00:00:00/00:00:00 " );
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index be6528b44e8b..44d9ce7ce030 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -89,7 +89,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
     mpZoomListBox->SetSizePixel( Size( mpTimeEdit->GetSizePixel().Width(), 260 ) );
     mpZoomListBox->SetSelectHdl( LINK( this, MediaControl, implZoomSelectHdl ) );
 
-    mpZoomToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_ZOOM, OUString( AvmResId( AVMEDIA_STR_ZOOM ) ) );
+    mpZoomToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_ZOOM, AvmResId( AVMEDIA_STR_ZOOM ) );
     mpZoomToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_ZOOM, HID_AVMEDIA_ZOOMLISTBOX );
 
     mpZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, mpZoomListBox );
@@ -123,9 +123,9 @@ void MediaControl::InitializeWidgets()
 {
     if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE )
     {
-        mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, GetImage(AVMEDIA_TOOLBOXITEM_OPEN), OUString( AvmResId( AVMEDIA_STR_OPEN ) ) );
+        mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, GetImage(AVMEDIA_TOOLBOXITEM_OPEN), AvmResId( AVMEDIA_STR_OPEN ) );
         mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_OPEN, HID_AVMEDIA_TOOLBOXITEM_OPEN );
-        mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_INSERT, GetImage(AVMEDIA_TOOLBOXITEM_INSERT), OUString( AvmResId( AVMEDIA_STR_INSERT ) ) );
+        mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_INSERT, GetImage(AVMEDIA_TOOLBOXITEM_INSERT), AvmResId( AVMEDIA_STR_INSERT ) );
         mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_INSERT, HID_AVMEDIA_TOOLBOXITEM_INSERT );
         mpPlayToolBox->InsertSeparator();
     }
@@ -170,7 +170,7 @@ const Size& MediaControl::getMinSizePixel() const
 
 void MediaControl::UpdateURLField(MediaItem tempItem)
 {
-    const OUString aURL( OUString(AvmResId(AVMEDIA_MEDIA_PATH)) + ":  " + tempItem.getURL() ) ;
+    const OUString aURL( AvmResId(AVMEDIA_MEDIA_PATH) + ":  " + tempItem.getURL() ) ;
     mpMediaPath->SetText(aURL);
     mpMediaPath->SetUpdateMode( false );
     mpMediaPath->SetSizePixel( Size( mpMediaPath->GetTextWidth( aURL ) + 8, mpPlayToolBox->GetSizePixel().Height() ) );
diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx
index 0a0c86f88c8c..a2e18fe50116 100644
--- a/avmedia/source/framework/mediaplayer.cxx
+++ b/avmedia/source/framework/mediaplayer.cxx
@@ -57,7 +57,7 @@ MediaFloater::MediaFloater( SfxBindings* _pBindings, SfxChildWindow* pCW, vcl::W
 
     SetPosSizePixel( Point( 0, 0 ), aSize );
     SetMinOutputSizePixel( aSize );
-    SetText( OUString( AvmResId( AVMEDIA_STR_MEDIAPLAYER ) ) );
+    SetText( AvmResId( AVMEDIA_STR_MEDIAPLAYER ) );
     mpMediaWindow->show();
 }
 
commit e0bfdd109a13d2faa2b6c00071b96de978c91a8d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:19:22 2017 +0200

    loplugin:stringcopy: basctl
    
    Change-Id: I81e5cb61e1f09cdc8d07efc2fd07e6ba79fdc488

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 3a9d1d4bc405..369f7790bb5f 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2929,7 +2929,7 @@ std::vector< OUString > UnoTypeCodeCompletetor::GetXIdlClassMethods() const
         {
             for(sal_Int32 l = 0; l < aMethods.getLength(); ++l)
             {
-                aRetVect.push_back( OUString(aMethods[l]->getName()) );
+                aRetVect.push_back( aMethods[l]->getName() );
             }
         }
     }
@@ -2946,7 +2946,7 @@ std::vector< OUString > UnoTypeCodeCompletetor::GetXIdlClassFields() const
         {
             for(sal_Int32 l = 0; l < aFields.getLength(); ++l)
             {
-                aRetVect.push_back( OUString(aFields[l]->getName()) );
+                aRetVect.push_back( aFields[l]->getName() );
             }
         }
     }
commit f0fddb1d2de41373b938bb8a94b914c145fdcd48
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:19:14 2017 +0200

    loplugin:stringcopy: basic
    
    Change-Id: I39d8ae76be2794d5e7b5a9979d7211823c995c2c

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 913d94967aad..ecbf1525beea 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1684,7 +1684,7 @@ bool StarBASIC::RTError( SbError code, const OUString& rMsg, sal_Int32 l, sal_In
         if ( SbiRuntime::isVBAEnabled() && ( code == ERRCODE_BASIC_COMPAT ) )
         {
             OUString aTmp = "\'" + OUString::number(SbxErrObject::getUnoErrObject()->getNumber()) +
-                            "\'\n" + OUString(!GetSbData()->aErrMsg.isEmpty() ? GetSbData()->aErrMsg : rMsg);
+                            "\'\n" + (!GetSbData()->aErrMsg.isEmpty() ? GetSbData()->aErrMsg : rMsg);
             code = (SbError)*new StringErrorInfo( code, aTmp );
         }
         else
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index c35f96425659..50528d4d1be3 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4685,7 +4685,7 @@ TypeClass StructRefInfo::getTypeClass() const
 
 SbUnoStructRefObject::SbUnoStructRefObject( const OUString& aName_, const StructRefInfo& rMemberInfo ) :  SbxObject( aName_ ), maMemberInfo( rMemberInfo ), mbMemberCacheInit( false )
 {
-   SetClassName( OUString( maMemberInfo.getTypeName() ) );
+   SetClassName( maMemberInfo.getTypeName() );
 }
 
 SbUnoStructRefObject::~SbUnoStructRefObject()
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index f5b63ce1a669..5222e6c9be90 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2642,7 +2642,7 @@ void SbUserFormModule::InitObject()
             aArgs[ 0 ] = uno::Any();
             aArgs[ 1 ] <<= m_xDialog;
             aArgs[ 2 ] <<= m_xModel;
-            aArgs[ 3 ] <<= OUString( GetParent()->GetName() );
+            aArgs[ 3 ] <<= GetParent()->GetName();
             pDocObject = new SbUnoObject( GetName(), uno::Any( xVBAFactory->createInstanceWithArguments( "ooo.vba.msforms.UserForm", aArgs  ) ) );
 
             uno::Reference< lang::XComponent > xComponent( m_xDialog, uno::UNO_QUERY_THROW );
commit 6f62aab8a9451ee7dee61c589178fa696a7b51e7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:19:00 2017 +0200

    loplugin:stringcopy: chart2
    
    Change-Id: Ia7cfa9b56646c83ead491d419aba5bd8d9306fe4

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 25e9c04246e8..2e83401aa76d 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -615,11 +615,11 @@ void DataBrowser::RenewTable()
             spHeader->SetColor( Color( nColor ));
         spHeader->SetChartType( aIt->m_xChartType, aIt->m_bSwapXAndYAxis );
         spHeader->SetSeriesName(
-            OUString( DataSeriesHelper::getDataSeriesLabel(
+            DataSeriesHelper::getDataSeriesLabel(
                         aIt->m_xDataSeries,
                         (aIt->m_xChartType.is() ?
                          aIt->m_xChartType->getRoleOfSequenceForSeriesLabel() :
-                         OUString("values-y")))));
+                         OUString("values-y"))));
         // index is 1-based, as 0 is for the column that contains the row-numbers
         spHeader->SetRange( aIt->m_nStartColumn + 1, aIt->m_nEndColumn + 1 );
         spHeader->SetGetFocusHdl( aFocusLink );
@@ -638,7 +638,7 @@ OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
 {
     OSL_ASSERT( m_apDataBrowserModel.get());
     if( nColumnId > 0 )
-        return OUString( m_apDataBrowserModel->getRoleOfColumn( nColumnId - 1 ));
+        return m_apDataBrowserModel->getRoleOfColumn( nColumnId - 1 );
     return OUString();
 }
 
@@ -1377,7 +1377,7 @@ IMPL_LINK( DataBrowser, SeriesHeaderChanged, impl::SeriesHeaderEdit*, pEdit, voi
                     Reference< container::XIndexReplace > xIndexReplace( xLabeledSeq->getLabel(), uno::UNO_QUERY );
                     if( xIndexReplace.is())
                         xIndexReplace->replaceByIndex(
-                            0, uno::Any( OUString( pEdit->GetText())));
+                            0, uno::Any( pEdit->GetText()));
                 }
             }
         }
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 7ceef646bceb..009e81dc53eb 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -488,9 +488,9 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
     {
         if( bVerbose )
         {
-            aRet= OUString(SchResId(STR_TIP_DATAPOINT_INDEX)) + "\n"
-                + OUString(SchResId(STR_TIP_DATASERIES)) + "\n"
-                + OUString(SchResId(STR_TIP_DATAPOINT_VALUES));
+            aRet= SchResId(STR_TIP_DATAPOINT_INDEX) + "\n"
+                + SchResId(STR_TIP_DATASERIES) + "\n"
+                + SchResId(STR_TIP_DATAPOINT_VALUES);
         }
         else
             aRet=SchResId(STR_TIP_DATAPOINT);
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index d69b1156bb23..c7bc939a0e07 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -58,8 +58,8 @@ OUString lcl_GetRoleLBEntry(
 {
     OUStringBuffer aEntry( rRole );
     aEntry.append( "\t" );
-    aEntry.append( OUString(
-        ::chart::DialogModel::ConvertRoleFromInternalToUI( rRole )) );
+    aEntry.append(
+        ::chart::DialogModel::ConvertRoleFromInternalToUI( rRole ) );
     aEntry.append( "\t" );
     aEntry.append( rRange );
 
@@ -595,7 +595,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, void)
         if( nIndex != -1 )
         {
             aUIStr = aUIStr.replaceAt( nIndex, aReplacement.getLength(),
-                                       OUString( m_pLB_SERIES->GetEntryText( pEntry )));
+                                       m_pLB_SERIES->GetEntryText( pEntry ));
         }
 
         lcl_enableRangeChoosing( true, m_pParentDialog );
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 663f3b9c96a2..2ca115e9f5a8 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -410,8 +410,8 @@ void CharacterProperties::AddDefaultsToMap(
     nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CTL, false), COMPLEX);
     vcl::Font aFontCTL = OutputDevice::GetDefaultFont( DefaultFontType::CTL_SPREADSHEET, nLang, GetDefaultFontFlags::OnlyOne );
 
-    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetFamilyName() ) );
-    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, OUString(aFont.GetStyleName()) );
+    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, aFont.GetFamilyName() );
+    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, aFont.GetStyleName() );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_FAMILY, sal_Int16(aFont.GetFamilyType()) );//awt::FontFamily::SWISS
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_CHAR_SET, sal_Int16(aFont.GetCharSet()) );//use awt::CharSet::DONTKNOW instead of SYSTEM to avoid assertion issue 50249
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_PITCH, sal_Int16(aFont.GetPitch()) );//awt::FontPitch::VARIABLE
@@ -440,8 +440,8 @@ void CharacterProperties::AddDefaultsToMap(
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_WEIGHT, awt::FontWeight::NORMAL );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_POSTURE, awt::FontSlant_NONE );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_LOCALE, aDefaultLocale_CJK );
-    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, OUString( aFontCJK.GetFamilyName() ) );
-    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_STYLE_NAME, OUString(aFontCJK.GetStyleName()) );
+    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, aFontCJK.GetFamilyName() );
+    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_STYLE_NAME, aFontCJK.GetStyleName() );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_FAMILY, sal_Int16(aFontCJK.GetFamilyType()) );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_CHAR_SET, sal_Int16(aFontCJK.GetCharSet()) );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_PITCH, sal_Int16(aFontCJK.GetPitch()) );
@@ -451,8 +451,8 @@ void CharacterProperties::AddDefaultsToMap(
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_WEIGHT, awt::FontWeight::NORMAL );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_POSTURE, awt::FontSlant_NONE );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_LOCALE, aDefaultLocale_CTL );
-    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, OUString( aFontCTL.GetFamilyName() ) );
-    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_STYLE_NAME, OUString(aFontCTL.GetStyleName()) );
+    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, aFontCTL.GetFamilyName() );
+    ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_STYLE_NAME, aFontCTL.GetStyleName() );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_FAMILY, sal_Int16(aFontCTL.GetFamilyType()) );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_CHAR_SET, sal_Int16(aFontCTL.GetCharSet()) );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_PITCH, sal_Int16(aFontCTL.GetPitch()) );
commit bb134f41f0abc7151712b115acb5eb2295b91b3b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:53 2017 +0200

    loplugin:stringcopy: comphelper
    
    Change-Id: Icb7d43c95ee5d53fdf6b1cdb92953df8488d1ef1

diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index 6d6e1de7cf19..48295a494841 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -102,7 +102,7 @@ OUString SAL_CALL
 OfficeInstallationDirectories::getOfficeInstallationDirectoryURL()
 {
     initDirs();
-    return OUString( *m_pOfficeBrandDir );
+    return *m_pOfficeBrandDir;
 }
 
 
@@ -111,7 +111,7 @@ OUString SAL_CALL
 OfficeInstallationDirectories::getOfficeUserDataDirectoryURL()
 {
     initDirs();
-    return OUString( *m_pUserDir );
+    return *m_pUserDir;
 }
 
 
@@ -130,24 +130,24 @@ OfficeInstallationDirectories::makeRelocatableURL( const OUString& URL )
         sal_Int32 nIndex = aCanonicalURL.indexOf( *m_pOfficeBrandDir );
         if ( nIndex  != -1 )
         {
-            return OUString(
+            return
                 aCanonicalURL.replaceAt( nIndex,
                                          m_pOfficeBrandDir->getLength(),
-                                         m_aOfficeBrandDirMacro ) );
+                                         m_aOfficeBrandDirMacro );
         }
         else
         {
             nIndex = aCanonicalURL.indexOf( *m_pUserDir );
             if ( nIndex  != -1 )
             {
-                return OUString(
+                return
                     aCanonicalURL.replaceAt( nIndex,
                                              m_pUserDir->getLength(),
-                                             m_aUserDirMacro ) );
+                                             m_aUserDirMacro );
             }
         }
     }
-    return OUString( URL );
+    return URL;
 }
 
 
@@ -162,10 +162,10 @@ OfficeInstallationDirectories::makeAbsoluteURL( const OUString& URL )
         {
             initDirs();
 
-            return OUString(
+            return
                 URL.replaceAt( nIndex,
                                m_aOfficeBrandDirMacro.getLength(),
-                               *m_pOfficeBrandDir ) );
+                               *m_pOfficeBrandDir );
         }
         else
         {
@@ -174,14 +174,14 @@ OfficeInstallationDirectories::makeAbsoluteURL( const OUString& URL )
             {
                 initDirs();
 
-                return OUString(
+                return
                     URL.replaceAt( nIndex,
                                    m_aUserDirMacro.getLength(),
-                                   *m_pUserDir ) );
+                                   *m_pUserDir );
             }
         }
     }
-    return OUString( URL );
+    return URL;
 }
 
 
commit c7d1236640cd282f95b97f1f966b63c7f2cfef9d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:46 2017 +0200

    loplugin:stringcopy: connectivity
    
    Change-Id: I2309a6b943323e42df8bb2b4c971c1388539ead4

diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 05f2fc499154..8ba8cbac269d 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -281,7 +281,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
                     sal_Unicode nChar = aURL.getBase()[0];
                     if( match(tableNamePattern,aURL.getBase(),'\0') && ( !bCheckEnabled || nChar < '0' || nChar > '9' ) )
                     {
-                        aRow.push_back(new ORowSetValueDecorator(OUString(aURL.getBase())));
+                        aRow.push_back(new ORowSetValueDecorator(aURL.getBase()));
                         bNewRow = true;
                     }
                     break;
commit 1649c76401009574aeba725365186c102e86130d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:38 2017 +0200

    loplugin:stringcopy: cui
    
    Change-Id: I5166036e4173292c9a7291a1a846e661fbbcd010

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c28e5f4528fb..b70d6c57faf4 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -571,7 +571,7 @@ ConvertSvxConfigEntry( const SvxConfigEntry* pEntry )
     uno::Sequence< beans::PropertyValue > aPropSeq( 3 );
 
     aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
-    aPropSeq[0].Value <<= OUString( pEntry->GetCommand() );
+    aPropSeq[0].Value <<= pEntry->GetCommand();
 
     aPropSeq[1].Name = ITEM_DESCRIPTOR_TYPE;
     aPropSeq[1].Value <<= css::ui::ItemType::DEFAULT;
@@ -586,7 +586,7 @@ ConvertSvxConfigEntry( const SvxConfigEntry* pEntry )
     }
     else
     {
-        aPropSeq[2].Value <<= OUString( pEntry->GetName() );
+        aPropSeq[2].Value <<= pEntry->GetName();
     }
 
     return aPropSeq;
@@ -598,7 +598,7 @@ ConvertToolbarEntry( const SvxConfigEntry* pEntry )
     uno::Sequence< beans::PropertyValue > aPropSeq( 4 );
 
     aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
-    aPropSeq[0].Value <<= OUString( pEntry->GetCommand() );
+    aPropSeq[0].Value <<= pEntry->GetCommand();
 
     aPropSeq[1].Name = ITEM_DESCRIPTOR_TYPE;
     aPropSeq[1].Value <<= css::ui::ItemType::DEFAULT;
@@ -613,7 +613,7 @@ ConvertToolbarEntry( const SvxConfigEntry* pEntry )
     }
     else
     {
-        aPropSeq[2].Value <<= OUString( pEntry->GetName() );
+        aPropSeq[2].Value <<= pEntry->GetName();
     }
 
     aPropSeq[3].Name = ITEM_DESCRIPTOR_ISVISIBLE;
@@ -5270,7 +5270,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem(
     {
         sal_uInt16 nId = pTbSymbol->GetItemId( n );
 
-        if ( OUString( pTbSymbol->GetItemText( nId ) ) == aURL )
+        if ( pTbSymbol->GetItemText( nId ) == aURL )
         {
             try
             {
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index e88feb3fafcf..fabefa73844d 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -247,7 +247,7 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni
         RID_STR_SEARCH_WHOLE
     };
     for (unsigned short nResId : nResIds)
-        m_plbPosition->InsertEntry( OUString( CuiResId( nResId ) ) );
+        m_plbPosition->InsertEntry( CuiResId( nResId ) );
     m_plbPosition->SelectEntryPos(MATCHING_ANYWHERE);
 
     // the field listbox
@@ -438,7 +438,7 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox&, rBox, void)
     // direction -> pass on and reset the checkbox-text for StartOver
     else if (&rBox == m_pcbBackwards)
     {
-        m_pcbStartOver->SetText( OUString( CuiResId( bChecked ? RID_STR_FROM_BOTTOM : RID_STR_FROM_TOP ) ) );
+        m_pcbStartOver->SetText( CuiResId( bChecked ? RID_STR_FROM_BOTTOM : RID_STR_FROM_TOP ) );
         m_pSearchEngine->SetDirection(!bChecked);
     }
     // similarity-search or regular expression
@@ -762,7 +762,7 @@ void FmSearchDialog::LoadParams()
     // that way the data is handed on to the SearchEngine and all dependent settings are done
 
     // current field
-    sal_Int32 nInitialField = m_plbField->GetEntryPos( OUString( aParams.sSingleSearchField ) );
+    sal_Int32 nInitialField = m_plbField->GetEntryPos( aParams.sSingleSearchField );
     if (nInitialField == LISTBOX_ENTRY_NOTFOUND)
         nInitialField = 0;
     m_plbField->SelectEntryPos(nInitialField);
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 273363e384cd..4015db7bc5e5 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -748,7 +748,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData )
     m_pCbbFileType->EnableDDAutoWidth( false );
     m_pLbxFound->SetDoubleClickHdl(LINK(this, TPGalleryThemeProperties, DClickFoundHdl));
     m_pLbxFound->SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFoundHdl));
-    m_pLbxFound->InsertEntry(OUString(CuiResId(RID_SVXSTR_GALLERY_NOFILES)));
+    m_pLbxFound->InsertEntry(CuiResId(RID_SVXSTR_GALLERY_NOFILES));
     m_pLbxFound->Show();
 
     FillFilterList();
@@ -1182,7 +1182,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, EndSearchProgressHdl, Dialog&, void)
   }
   else
   {
-      m_pLbxFound->InsertEntry( OUString( CuiResId( RID_SVXSTR_GALLERY_NOFILES ) ) );
+      m_pLbxFound->InsertEntry( CuiResId( RID_SVXSTR_GALLERY_NOFILES ) );
       m_pBtnTakeAll->Disable();
       m_pCbxPreview->Disable();
       bEntriesFound = false;
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index d37c5991ce80..4be3c5269964 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -432,7 +432,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl, Button*, void)
         INetURLObject   aURL( aStrURL, INetProtocol::File );
         OUString        aStrName;
         if( bHandleFileName )
-            aStrName = bZeroPath? aTempStrURL : OUString(aURL.getName());
+            aStrName = bZeroPath? aTempStrURL : aURL.getName();
 
         m_pCbbPath->SetBaseURL( xFolderPicker->getDirectory() );
         OUString          aStrTmp( xFolderPicker->getDirectory() );
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 15e43da019e7..8dac3b062fbb 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -340,13 +340,13 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, Button*, void)
         SfxMacroTabPage *pMacroPage = static_cast<SfxMacroTabPage*>( aDlg->GetTabPage() );
 
         if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseOverObject )
-            pMacroPage->AddEvent( OUString( CuiResId(RID_SVXSTR_HYPDLG_MACROACT1) ),
+            pMacroPage->AddEvent( CuiResId(RID_SVXSTR_HYPDLG_MACROACT1),
                                   SFX_EVENT_MOUSEOVER_OBJECT );
         if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseClickObject )
-            pMacroPage->AddEvent( OUString( CuiResId(RID_SVXSTR_HYPDLG_MACROACT2) ),
+            pMacroPage->AddEvent( CuiResId(RID_SVXSTR_HYPDLG_MACROACT2),
                                   SFX_EVENT_MOUSECLICK_OBJECT);
         if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseOutObject )
-            pMacroPage->AddEvent( OUString( CuiResId(RID_SVXSTR_HYPDLG_MACROACT3) ),
+            pMacroPage->AddEvent( CuiResId(RID_SVXSTR_HYPDLG_MACROACT3),
                                   SFX_EVENT_MOUSEOUT_OBJECT);
 
         if ( bIsInputEnabled )
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index bc625d315003..a880d40ec975 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -1227,12 +1227,12 @@ OUString FormatErrorString(
 
     if ( !type.isEmpty() )
     {
-        result += "\n\n" + OUString(CuiResId(RID_SVXSTR_ERROR_TYPE_LABEL)) + " " + type;
+        result += "\n\n" + CuiResId(RID_SVXSTR_ERROR_TYPE_LABEL) + " " + type;
     }
 
     if ( !message.isEmpty() )
     {
-        result += "\n\n" + OUString(CuiResId(RID_SVXSTR_ERROR_MESSAGE_LABEL)) + " " + message;
+        result += "\n\n" + CuiResId(RID_SVXSTR_ERROR_MESSAGE_LABEL) + " " + message;
     }
 
     return result;
@@ -1344,8 +1344,8 @@ OUString GetErrorMessage(
     }
     if ( sError.errorType == provider::ScriptFrameworkErrorType::NOTSUPPORTED )
     {
-        message = OUString(
-            CuiResId(  RID_SVXSTR_ERROR_LANG_NOT_SUPPORTED ) );
+        message =
+            CuiResId(  RID_SVXSTR_ERROR_LANG_NOT_SUPPORTED );
         message = ReplaceString(message, "%LANGUAGENAME", language );
 
     }
@@ -1440,7 +1440,7 @@ IMPL_STATIC_LINK( SvxScriptErrorDialog, ShowDialog, void*, p, void )
     }
     else
     {
-        message = OUString( CuiResId( RID_SVXSTR_ERROR_TITLE ) );
+        message = CuiResId( RID_SVXSTR_ERROR_TITLE );
     }
 
     ScopedVclPtrInstance<MessageDialog> pBox( nullptr, message, VclMessageType::Warning );
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index 5e8d53471b15..850a05d8d2c2 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -128,11 +128,11 @@ namespace offapp
         EditBrowseBox::Init();
 
         Size aColWidth = LogicToPixel(Size(160, 0), MapUnit::MapAppFont);
-        InsertDataColumn(1, OUString(CuiResId(RID_SVXSTR_DRIVER_NAME)), aColWidth.Width());
+        InsertDataColumn(1, CuiResId(RID_SVXSTR_DRIVER_NAME), aColWidth.Width());
         aColWidth = LogicToPixel(Size(30, 0), MapUnit::MapAppFont);
-        InsertDataColumn(2, OUString(CuiResId(RID_SVXSTR_POOLED_FLAG)), aColWidth.Width());
+        InsertDataColumn(2, CuiResId(RID_SVXSTR_POOLED_FLAG), aColWidth.Width());
         aColWidth = LogicToPixel(Size(60, 0), MapUnit::MapAppFont);
-        InsertDataColumn(3, OUString(CuiResId(RID_SVXSTR_POOL_TIMEOUT)), aColWidth.Width());
+        InsertDataColumn(3, CuiResId(RID_SVXSTR_POOL_TIMEOUT), aColWidth.Width());
             // Attention: the resource of the string is local to the resource of the enclosing dialog!
     }
 
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 292558a6365d..93e38013d35c 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -465,7 +465,7 @@ void SvxJavaOptionsPage::AddJRE( JavaInfo const * _pInfo )
     if ( ( _pInfo->nFeatures & JFW_FEATURE_ACCESSBRIDGE ) == JFW_FEATURE_ACCESSBRIDGE )
         sEntry.append(m_sAccessibilityText);
     SvTreeListEntry* pEntry = m_pJavaList->InsertEntry(sEntry.makeStringAndClear());
-    INetURLObject aLocObj( OUString( _pInfo->sLocation ) );
+    INetURLObject aLocObj( _pInfo->sLocation );
     OUString* pLocation = new OUString( aLocObj.getFSysPath( FSysStyle::Detect ) );
     pEntry->SetUserData( pLocation );
 #else
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index fa4d7f452072..66f663d68fb4 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -209,7 +209,7 @@ IMPL_LINK( SelectPersonaDialog, SelectPersona, Button*, pButton, void )
                 // get the persona name from the setting variable to show in the progress.
                 sal_Int32 nNameIndex = m_aSelectedPersona.indexOf( ';' );
                 OUString aName = m_aSelectedPersona.copy( 0, nNameIndex );
-                OUString aProgress = OUString(CuiResId(RID_SVXSTR_SELECTEDPERSONA)) + aName;
+                OUString aProgress = CuiResId(RID_SVXSTR_SELECTEDPERSONA) + aName;
                 SetProgress( aProgress );
             }
             break;
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index e0b799b73da8..96ac53d0f283 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -125,7 +125,7 @@ static char const VIEWOPT_DATANAME[] = "page data";
 
 static inline void SetViewOptUserItem( SvtViewOptions& rOpt, const OUString& rData )
 {
-    rOpt.SetUserItem( VIEWOPT_DATANAME, Any( OUString( rData ) ) );
+    rOpt.SetUserItem( VIEWOPT_DATANAME, Any( rData ) );
 }
 
 static inline OUString GetViewOptUserItem( const SvtViewOptions& rOpt )
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 758859897bf9..4353d654d5f9 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1613,10 +1613,10 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(bool bFromReset,
 
         sal_Int32 i;
         for(i = 0; i < m_pAbbrevLB->GetEntryCount(); i++)
-            pArrays->aAbbrevStrings.push_back(OUString(m_pAbbrevLB->GetEntry(i)));
+            pArrays->aAbbrevStrings.push_back(m_pAbbrevLB->GetEntry(i));
 
         for(i = 0; i < m_pDoubleCapsLB->GetEntryCount(); i++)
-            pArrays->aDoubleCapsStrings.push_back(OUString(m_pDoubleCapsLB->GetEntry(i)));
+            pArrays->aDoubleCapsStrings.push_back(m_pDoubleCapsLB->GetEntry(i));
     }
     m_pDoubleCapsLB->Clear();
     m_pAbbrevLB->Clear();
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 8e7944d5c625..ba67fc85c0c4 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1410,7 +1410,7 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB)
                         SetCategory(nCatLbSelPos );
 
                     FillFormatListBox_Impl( aEntryList );
-                    if(m_pEdComment->GetText()!=OUString(m_pLbCategory->GetEntry(1)))
+                    if(m_pEdComment->GetText()!=m_pLbCategory->GetEntry(1))
                     {
                         pNumFmtShell->SetComment4Entry(nFmtLbSelPos,
                                                     m_pEdComment->GetText());
commit 5de6294a94d2acd6b4cdf57c55dcbdbbf9e5e522
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:33 2017 +0200

    loplugin:stringcopy: dbaccess
    
    Change-Id: I7d9c876a57b4390d1f5d86ae4d9a3f703c56f0c8

diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index c57cea8ab205..46f0fd82c972 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1114,7 +1114,7 @@ OUString SbaTableQueryBrowser::getDataSourceAccessor( SvTreeListEntry* _pDataSou
     DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( _pDataSourceEntry->GetUserData() );
     OSL_ENSURE( pData, "SbaTableQueryBrowser::getDataSourceAccessor: invalid entry data!" );
     OSL_ENSURE( pData->eType == etDatasource, "SbaTableQueryBrowser::getDataSourceAccessor: entry does not denote a data source!" );
-    return !pData->sAccessor.isEmpty() ? OUString(pData->sAccessor) : GetEntryText( _pDataSourceEntry );
+    return !pData->sAccessor.isEmpty() ? pData->sAccessor : GetEntryText( _pDataSourceEntry );
 }
 
 SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSource, const OUString& _rCommand, sal_Int32 _nCommandType,
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 545d491c30fa..f8ef35fb9650 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1302,7 +1302,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
             else
                 pBoolDefault->SelectEntry(sDef);
 
-            pFieldDescr->SetControlDefault(makeAny(OUString(BoolStringPersistent(pBoolDefault->GetSelectEntry()))));
+            pFieldDescr->SetControlDefault(makeAny(BoolStringPersistent(pBoolDefault->GetSelectEntry())));
         }
         else if(pBoolDefault->GetEntryCount() < 3)
         {
@@ -1346,7 +1346,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
 
     if(m_pType)
     {
-        sal_Int32 nPos = pFieldType.get() ? m_pType->GetEntryPos(OUString(pFieldDescr->getTypeInfo()->aUIName)) : LISTBOX_ENTRY_NOTFOUND;
+        sal_Int32 nPos = pFieldType.get() ? m_pType->GetEntryPos(pFieldDescr->getTypeInfo()->aUIName) : LISTBOX_ENTRY_NOTFOUND;
         if(nPos == LISTBOX_ENTRY_NOTFOUND)
         {
             const OTypeInfoMap* pMap = getTypeInfo();
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 744e5afb3269..0f4016b8883a 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -225,7 +225,7 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal
     if (pUser && pUser->GetValue().getLength())
         aReturn.push_back(
             PropertyValue(  "user", 0,
-                            makeAny(OUString(pUser->GetValue())), PropertyState_DIRECT_VALUE));
+                            makeAny(pUser->GetValue()), PropertyState_DIRECT_VALUE));
 
     // check if the connection type requires a password
     if (hasAuthentication(*m_pItemSetHelper->getOutputSet()))
@@ -269,7 +269,7 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal
             aRequest.HasRealm   = aRequest.HasAccount = false;
             // aRequest.Realm
             aRequest.HasUserName = pUser != nullptr;
-            aRequest.UserName    = pUser ? OUString(pUser->GetValue()) : OUString();
+            aRequest.UserName    = pUser ? pUser->GetValue() : OUString();
             aRequest.HasPassword = true;
             //aRequest.Password
             aRequest.HasAccount  = false;
@@ -675,7 +675,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r
             {
                 if ( sUrlProp == aDirect->second )
                 {
-                    Any aValue(makeAny(OUString(getConnectionURL())));
+                    Any aValue(makeAny(getConnectionURL()));
                     //  aValue <<= OUString();
                     lcl_putProperty(_rxDest, aDirect->second,aValue);
                 }
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 1a3d791364a4..0ebc917a1db7 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -218,8 +218,8 @@ IMPL_LINK( OUserAdmin, UserHdl, Button *, pButton, void )
                 Reference<XPropertySet> xNewUser = xUserFactory->createDataDescriptor();
                 if(xNewUser.is())
                 {
-                    xNewUser->setPropertyValue(PROPERTY_NAME,makeAny(OUString(aPwdDlg->GetUser())));
-                    xNewUser->setPropertyValue(PROPERTY_PASSWORD,makeAny(OUString(aPwdDlg->GetPassword())));
+                    xNewUser->setPropertyValue(PROPERTY_NAME,makeAny(aPwdDlg->GetUser()));
+                    xNewUser->setPropertyValue(PROPERTY_PASSWORD,makeAny(aPwdDlg->GetPassword()));
                     Reference<XAppend> xAppend(m_xUsers,UNO_QUERY);
                     if(xAppend.is())
                         xAppend->appendByDescriptor(xNewUser);
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index b0512911f518..b8dbea3c9fcc 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -98,7 +98,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
 
     OFieldDescription* pCurFieldDescr = getCurrentFieldDescData();
 
-    const sal_Int32 nPos = pListBox->GetEntryPos( OUString( pCurFieldDescr->GetName() ) );
+    const sal_Int32 nPos = pListBox->GetEntryPos( pCurFieldDescr->GetName() );
     pCurFieldDescr = static_cast< OFieldDescription* >( pListBox->GetEntryData( nPos ) );
     OSL_ENSURE( pCurFieldDescr, "OWizTypeSelectControl::CellModified: Columnname/type not found in the listbox!" );
     if ( !pCurFieldDescr )
@@ -133,7 +133,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
 
                 }
                 else
-                    bDoubleName =  ((pListBox->GetEntryPos(OUString(sNewName)) != LISTBOX_ENTRY_NOTFOUND)
+                    bDoubleName =  ((pListBox->GetEntryPos(sNewName) != LISTBOX_ENTRY_NOTFOUND)
                                     || ( pWiz->shouldCreatePrimaryKey()
                                         &&  pWiz->getPrimaryKeyName() == sNewName) );
 
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index 96e70108a69c..27d08b99903b 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -160,7 +160,7 @@ namespace dbaui
                 if (xColDescriptor.is())
                 {
                     xColDescriptor->setPropertyValue("IsAscending", css::uno::makeAny(aFieldLoop->bSortAscending));
-                    xColDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(OUString(aFieldLoop->sFieldName)));
+                    xColDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(aFieldLoop->sFieldName));
                     xAppendCols->appendByDescriptor(xColDescriptor);
                 }
             }
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index c56735f87538..c45b2f11a33a 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -153,7 +153,7 @@ bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFieldDes
 
             while (pEntry)
             {
-                if (bCase(strFieldName,OUString(m_xListBox->GetEntryText(pEntry))))
+                if (bCase(strFieldName,m_xListBox->GetEntryText(pEntry)))
                 {
                     OTableFieldInfo* pInf = static_cast<OTableFieldInfo*>(pEntry->GetUserData());
                     assert(pInf && "OQueryTableWindow::ExistsField : field doesn't have FieldInfo !");
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 7058f2d7caf2..b89c7f585ed1 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2627,8 +2627,8 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry)
                 OSL_ENSURE(!_pEntry->isNumeric(),"Not allowed to combine group by and numeric values!");
                 m_pFunctionCell->SelectEntry(m_pFunctionCell->GetEntry(m_pFunctionCell->GetEntryCount() - 1));
             }
-            else if ( m_pFunctionCell->GetEntryPos(OUString(_pEntry->GetFunction())) != COMBOBOX_ENTRY_NOTFOUND )
-                m_pFunctionCell->SelectEntry(OUString(_pEntry->GetFunction()));
+            else if ( m_pFunctionCell->GetEntryPos(_pEntry->GetFunction()) != COMBOBOX_ENTRY_NOTFOUND )
+                m_pFunctionCell->SelectEntry(_pEntry->GetFunction());
             else
                 m_pFunctionCell->SelectEntryPos(0);
 
@@ -2644,7 +2644,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry)
             if ( !bCountRemoved && m_pFunctionCell->GetEntryCount() < 2)
                 m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(2, ';')); // 2 -> COUNT
 
-            if(m_pFunctionCell->GetEntryPos(OUString(_pEntry->GetFunction())) != COMBOBOX_ENTRY_NOTFOUND)
+            if(m_pFunctionCell->GetEntryPos(_pEntry->GetFunction()) != COMBOBOX_ENTRY_NOTFOUND)
                 m_pFunctionCell->SelectEntry(_pEntry->GetFunction());
             else
                 m_pFunctionCell->SelectEntryPos(0);
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index ac94df09495e..1cdcc075e11d 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -272,7 +272,7 @@ bool ORelationTableConnectionData::Update()
 
         xKey->setPropertyValue(PROPERTY_NAME,makeAny(sKeyName));
         xKey->setPropertyValue(PROPERTY_TYPE,makeAny(KeyType::FOREIGN));
-        xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,makeAny(OUString(getReferencedTable()->GetTableName())));
+        xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,makeAny(getReferencedTable()->GetTableName()));
         xKey->setPropertyValue(PROPERTY_UPDATERULE, makeAny(GetUpdateRules()));
         xKey->setPropertyValue(PROPERTY_DELETERULE, makeAny(GetDeleteRules()));
     }
commit d2846c46624d3996b98a3810b083452f49400cb4
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:26 2017 +0200

    loplugin:stringcopy: desktop
    
    Change-Id: Ic27d5296dc6854a27f4848dc9047feef90cb6ff7

diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 6b439f50ad4f..b23627748edf 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -632,7 +632,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
                             // create the printer
                             Sequence < PropertyValue > aPrinterArgs( 1 );
                             aPrinterArgs[0].Name = "Name";
-                            aPrinterArgs[0].Value <<= OUString( aDispatchRequest.aPrinterName );
+                            aPrinterArgs[0].Value <<= aDispatchRequest.aPrinterName;
                             xDoc->setPrinter( aPrinterArgs );
                         }
 
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 31a93cecea8a..b50374694e41 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -598,7 +598,7 @@ extern "C" int unopkg_main()
         Any exc( ::cppu::getCaughtException() );
 
         dp_misc::writeConsoleError("\nERROR: " +
-            OUString(option_verbose ? e.Message + "\nException details: \n" +
+            (option_verbose ? e.Message + "\nException details: \n" +
             ::comphelper::anyToString(exc) : e.Message) + "\n");
     }
     if (!bNoOtherErrorMsg)
commit c556c65d7179a7aabe6553f2c9fc4f573d39355e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:20 2017 +0200

    loplugin:stringcopy: editeng
    
    Change-Id: I3d5b7673b2403bf670d85fa3c65f67aefcea48ff

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 99d605788a80..e7840ce52cf3 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -758,7 +758,7 @@ namespace accessibility
             }
         }
 
-        return OUString( sStr ) + aLine;
+        return sStr + aLine;
     }
 
     OUString SAL_CALL AccessibleEditableTextPara::getAccessibleName()
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index b9e4a7e4ec3a..71db51db0178 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -1204,7 +1204,7 @@ bool SvxPageModelItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) co
     switch ( nMemberId )
     {
         case MID_AUTO: rVal <<= bAuto; break;
-        case MID_NAME: rVal <<= OUString( GetValue() ); break;
+        case MID_NAME: rVal <<= GetValue(); break;
         default: OSL_FAIL("Wrong MemberId!"); return false;
     }
 
diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.cxx b/editeng/source/misc/SvXMLAutoCorrectExport.cxx
index 841805b1a102..28a7b8505e76 100644
--- a/editeng/source/misc/SvXMLAutoCorrectExport.cxx
+++ b/editeng/source/misc/SvXMLAutoCorrectExport.cxx
@@ -58,10 +58,10 @@ sal_uInt32 SvXMLAutoCorrectExport::exportDoc(enum XMLTokenEnum /*eClass*/)
 
             AddAttribute( XML_NAMESPACE_BLOCKLIST,
                           XML_ABBREVIATED_NAME,
-                          OUString(p->GetShort()));
+                          p->GetShort());
             AddAttribute( XML_NAMESPACE_BLOCKLIST,
                           XML_NAME,
-                          OUString(p->IsTextOnly() ? p->GetLong() : p->GetShort()));
+                          p->IsTextOnly() ? p->GetLong() : p->GetShort());
 
             SvXMLElementExport aBlock( *this, XML_NAMESPACE_BLOCKLIST, XML_BLOCK, true, true);
         }
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index f9dd4cd3ec70..3f8df4907ed5 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -529,7 +529,7 @@ void SvxSwAutoCorrCfg::ImplCommit()
             // "Format/Option/ChangeToBullets/Enable"
          css::uno::Any(sal_Int32(rSwFlags.cBullet)),
             // "Format/Option/ChangeToBullets/SpecialCharacter/Char"
-         css::uno::Any(OUString(rSwFlags.aBulletFont.GetFamilyName())),
+         css::uno::Any(rSwFlags.aBulletFont.GetFamilyName()),
             // "Format/Option/ChangeToBullets/SpecialCharacter/Font"
          css::uno::Any(sal_Int32(rSwFlags.aBulletFont.GetFamilyType())),
             // "Format/Option/ChangeToBullets/SpecialCharacter/FontFamily"
@@ -573,7 +573,7 @@ void SvxSwAutoCorrCfg::ImplCommit()
          css::uno::Any(rSwFlags.bAutoCmpltKeepList), // "Completion/KeepList"
          css::uno::Any(sal_Int32(rSwFlags.cByInputBullet)),
             // "Format/ByInput/ApplyNumbering/SpecialCharacter/Char"
-         css::uno::Any(OUString(rSwFlags.aByInputBulletFont.GetFamilyName())),
+         css::uno::Any(rSwFlags.aByInputBulletFont.GetFamilyName()),
             // "Format/ByInput/ApplyNumbering/SpecialCharacter/Font"
          css::uno::Any(sal_Int32(rSwFlags.aByInputBulletFont.GetFamilyType())),
             // "Format/ByInput/ApplyNumbering/SpecialCharacter/FontFamily"
commit 97d5293ccaf12ceae0c6d7e79b73cd783038c95c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:13 2017 +0200

    loplugin:stringcopy: extensions
    
    Change-Id: I6abf8ec16f39db9226efa7e2c7f82644da100c81

diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index b3bb2e6ffbad..3b8e09a9b9ab 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -181,8 +181,8 @@ namespace dbp
 
                 // build the statement to set as list source
                 OUString sStatement = "SELECT " +
-                    OUString( getSettings().sListContentField ) +  ", " + OUString( getSettings().sLinkedListField ) +
-                    " FROM " + OUString( getSettings().sListContentTable );
+                    getSettings().sListContentField +  ", " + getSettings().sLinkedListField +
+                    " FROM " + getSettings().sListContentTable;
                 Sequence< OUString > aListSource { sStatement };
                 getContext().xObjectModel->setPropertyValue("ListSource", makeAny(aListSource));
             }
@@ -196,7 +196,7 @@ namespace dbp
             }
 
             // the bound field
-            getContext().xObjectModel->setPropertyValue("DataField", makeAny(OUString(getSettings().sLinkedFormField)));
+            getContext().xObjectModel->setPropertyValue("DataField", makeAny(getSettings().sLinkedFormField));
         }
         catch(const Exception&)
         {
diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx
index 266edb89e721..b8c90319b4c9 100644
--- a/extensions/source/dbpilots/optiongrouplayouter.cxx
+++ b/extensions/source/dbpilots/optiongrouplayouter.cxx
@@ -119,9 +119,9 @@ namespace dbp
                 UNO_QUERY);
 
             // the label
-            xRadioModel->setPropertyValue("Label", makeAny(OUString(*aLabelIter)));
+            xRadioModel->setPropertyValue("Label", makeAny(*aLabelIter));
             // the value
-            xRadioModel->setPropertyValue("RefValue", makeAny(OUString(*aValueIter)));
+            xRadioModel->setPropertyValue("RefValue", makeAny(*aValueIter));
 
             // default selection
             if (_rSettings.sDefaultField == *aLabelIter)
@@ -129,7 +129,7 @@ namespace dbp
 
             // the connection to the database field
             if (!_rSettings.sDBField.isEmpty())
-                xRadioModel->setPropertyValue("DataField", makeAny(OUString(_rSettings.sDBField)));
+                xRadioModel->setPropertyValue("DataField", makeAny(_rSettings.sDBField));
 
             // the name for the model
             xRadioModel->setPropertyValue("Name", makeAny(sElementsName));
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 88721feffa37..c393654fbdce 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -313,8 +313,8 @@ namespace pcr
                 const SvxFontItem& rFontItem =
                     static_cast<const SvxFontItem&>(_rSet.Get(CFID_FONT));
 
-                lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_NAME     , makeAny(OUString(rFontItem.GetFamilyName())));
-                lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_STYLENAME, makeAny(OUString(rFontItem.GetStyleName())));
+                lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_NAME     , makeAny(rFontItem.GetFamilyName()));
+                lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_STYLENAME, makeAny(rFontItem.GetStyleName()));
                 lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_FAMILY   , makeAny((sal_Int16)rFontItem.GetFamily()));
                 lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_CHARSET  , makeAny((sal_Int16)rFontItem.GetCharSet()));
             }
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index b3e760c447c5..17282faae69c 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -523,7 +523,7 @@ namespace pcr
                 if ( !xDatabaseContext->hasByName( sControlValue ) )
                 {
                     ::svt::OFileNotation aTransformer(sControlValue);
-                    aPropertyValue <<= OUString( aTransformer.get( ::svt::OFileNotation::N_URL ) );
+                    aPropertyValue <<= aTransformer.get( ::svt::OFileNotation::N_URL );
                 }
             }
         }
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 556435ad829e..4fdecfc2dd67 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -812,7 +812,7 @@ namespace pcr
 
     Any SAL_CALL OComboboxControl::getValue()
     {
-        return makeAny( OUString( getTypedControlWindow()->GetText() ) );
+        return makeAny( getTypedControlWindow()->GetText() );
     }
 
 
diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx
index 4c94aab56856..1f86f1460b5b 100644
--- a/extensions/source/resource/oooresourceloader.cxx
+++ b/extensions/source/resource/oooresourceloader.cxx
@@ -70,7 +70,7 @@ namespace extensions { namespace resource
     {
         OSL_PRECOND( _resourceManager.IsAvailable( getResourceType(), _resourceId ), "StringResourceAccess::getResource: precondition not met!" );
         Any aResource;
-        aResource <<= OUString( _resourceManager.ReadString( _resourceId ) );
+        aResource <<= _resourceManager.ReadString( _resourceId );
         return aResource;
     }
 
commit ca149259eb8bba5c306fd4b174a7eeeb84a3bef7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:07 2017 +0200

    loplugin:stringcopy: filter
    
    Change-Id: Ibaf85db278f27506baf26ff23a40ede888f55ed2

diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index a6dcda3a010c..2ad8980fed1d 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -1139,7 +1139,7 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
     if( mXPropSet.is() )
     {
         // detect name first to make below test (is group) work
-        mType = OUString( mXShape->getShapeType() );
+        mType = mXShape->getShapeType();
         (void)mType.startsWith( "com.sun.star.", &mType );  // strip "com.sun.star."
         (void)mType.endsWith( "Shape", &mType );  // strip "Shape"
 
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index b3bbcd5d7f9b..bbca5e6240e3 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -195,7 +195,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt
             ::uno::Reference < io::XOutputStream > xOut = new ::utl::OOutputStreamWrapper( *pStream );
             aSeq[0].Value <<= xOut;
             aSeq[1].Name = "FilterName";
-            aSeq[1].Value <<= OUString( pExpFilter->GetName() );
+            aSeq[1].Value <<= pExpFilter->GetName();
             uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY );
         try
         {
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 90f472e58724..2f3537539c6b 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2047,7 +2047,7 @@ void SVGFilter::implCreateObjectsFromBackground( const Reference< XDrawPage >& r
     aDescriptor[0].Name = "FilterName";
     aDescriptor[0].Value <<= OUString( "SVM" );
     aDescriptor[1].Name = "URL";
-    aDescriptor[1].Value <<= OUString( aFile.GetURL() );
+    aDescriptor[1].Value <<= aFile.GetURL();
     aDescriptor[2].Name = "ExportOnlyBackground";
     aDescriptor[2].Value <<= true;
 
commit d0a91cf2242ebb37097049021eadb5adda6d183c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:18:02 2017 +0200

    loplugin:stringcopy: forms
    
    Change-Id: Ieab592db5316f343afa9cb0c0452e6c865df5cca

diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index fe677cd82845..33e66450f2f7 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -825,7 +825,7 @@ bool OImageControlControl::implInsertGraphics()
                  xSet->setPropertyValue( PROPERTY_GRAPHIC, makeAny( aGraphic.GetXGraphic() ) );
             }
             else
-                xSet->setPropertyValue( PROPERTY_IMAGE_URL, makeAny( OUString( aDialog.GetPath() ) ) );
+                xSet->setPropertyValue( PROPERTY_IMAGE_URL, makeAny( aDialog.GetPath() ) );
 
             return true;
         }
commit 054c06dc5df1b6178f54e7cb837ebdd50397241c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:17:57 2017 +0200

    loplugin:stringcopy: formula
    
    Change-Id: Ifab711d6081a70480396ac05112b4647206a754d

diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index b626039efed7..ead0e05414b1 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -581,7 +581,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
                 {
                     FormulaOpCodeMapEntry aEntry;
                     aEntry.Name = (*it).first;
-                    aEntry.Token.Data <<= OUString( (*it).second);
+                    aEntry.Token.Data <<= (*it).second;
                     aEntry.Token.OpCode = ocExternal;
                     aVec.push_back( aEntry);
                 }
commit b02848767af071e2ff357e94d4cddf4940f7cc02
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:17:48 2017 +0200

    loplugin:stringcopy: fpicker
    
    Change-Id: Iec08e4ed6241faba9b858e42cb6b55abdcdab3ee

diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index fbecfc328921..9f2f0f70813d 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -416,7 +416,7 @@ namespace svt
                     case LISTBOX_FILTER:
                         if ( ControlActions::GET_SELECTED_ITEM == _nControlAction )
                         {
-                            aRet <<= OUString( m_pFilePickerController->getCurFilter() );
+                            aRet <<= m_pFilePickerController->getCurFilter();
                         }
                         else
                         {
@@ -690,7 +690,7 @@ namespace svt
         switch ( _nProperty )
         {
             case PropFlags::Text:
-                aReturn <<= OUString( _pControl->GetText() );
+                aReturn <<= _pControl->GetText();
                 break;
 
             case PropFlags::Enabled:
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 2f0e5225906e..21195cda7b8f 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1268,7 +1268,7 @@ IMPL_LINK_NOARG ( SvtFileDialog, AddPlacePressed_Hdl, Button*, void )
     INetURLObject aURLObj( _pFileView->GetViewURL() );
     PlacePtr newPlace(
         new Place( aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset),
-                OUString(_pFileView->GetViewURL()), true));
+                _pFileView->GetViewURL(), true));
     pImpl->_pPlaces->AppendPlace(newPlace);
 }
 
@@ -1800,8 +1800,8 @@ short SvtFileDialog::PrepareExecute()
         try
         {
             INetURLObject aStdDir( GetStandardDir() );
-            ::ucbhelper::Content aCnt( OUString( aStdDir.GetMainURL(
-                                                    INetURLObject::DecodeMechanism::NONE ) ),
+            ::ucbhelper::Content aCnt( aStdDir.GetMainURL(
+                                                    INetURLObject::DecodeMechanism::NONE ),
                                  Reference< XCommandEnvironment >(),
                                  comphelper::getProcessComponentContext() );
             Sequence< OUString > aProps(2);
commit 309115d8bb8f0c2610d027958dba0dd2e1c06c03
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:17:40 2017 +0200

    loplugin:stringcopy: framework
    
    Change-Id: Id63d99bc5048cfdffc834cf034f078d783ca95dc

diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx
index 5cf7551cbaa8..e3a05db09fe9 100644
--- a/framework/source/fwi/helper/mischelper.cxx
+++ b/framework/source/fwi/helper/mischelper.cxx
@@ -77,7 +77,7 @@ void FillLangItems( std::set< OUString > &rLangItems,
     if( rSystemLanguage != LANGUAGE_DONTKNOW )
     {
         if ( IsScriptTypeMatchingToLanguage( nScriptType, rSystemLanguage ))
-            rLangItems.insert( OUString( SvtLanguageTable::GetLanguageString( rSystemLanguage )) );
+            rLangItems.insert( SvtLanguageTable::GetLanguageString( rSystemLanguage ) );
     }
 
     //3--UI
@@ -85,7 +85,7 @@ void FillLangItems( std::set< OUString > &rLangItems,
     if( rUILanguage != LANGUAGE_DONTKNOW )
     {
         if ( IsScriptTypeMatchingToLanguage( nScriptType, rUILanguage ))
-            rLangItems.insert( OUString( SvtLanguageTable::GetLanguageString( rUILanguage )) );
+            rLangItems.insert( SvtLanguageTable::GetLanguageString( rUILanguage ) );
     }
 
     //4--guessed language
@@ -132,7 +132,7 @@ void FillLangItems( std::set< OUString > &rLangItems,
                     break;
                 const Locale& rLocale=rLocales[i];
                 if( IsScriptTypeMatchingToLanguage( nScriptType, SvtLanguageTable::GetLanguageType( rLocale.Language )))
-                    rLangItems.insert( OUString( rLocale.Language ) );
+                    rLangItems.insert( rLocale.Language );
             }
         }
     }
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 406819db1890..a897906009fb 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1072,7 +1072,7 @@ OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int3
     OUString aNumStr = rI18nHelper.GetNum( nNumber, 0, false, false );
     aAddonGenericTitle = aAddonGenericTitle.replaceFirst( "%num%", aNumStr );
 
-    return OUString( aAddonGenericTitle );
+    return aAddonGenericTitle;
 }
 
 void ToolbarLayoutManager::implts_createAddonsToolBars()
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index b8b9c3f47bd7..160da94acde2 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -42,7 +42,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE_2(
     DispatchRecorder,
     ::cppu::OWeakObject,
     "com.sun.star.frame.DispatchRecorder",
-    OUString("com.sun.star.comp.framework.DispatchRecorder"))
+    "com.sun.star.comp.framework.DispatchRecorder")
 
 DEFINE_INIT_SERVICE(
     DispatchRecorder,
diff --git a/framework/source/uielement/notebookbarmenucontroller.cxx b/framework/source/uielement/notebookbarmenucontroller.cxx
index f5f9401d6227..f29966e3ef64 100644
--- a/framework/source/uielement/notebookbarmenucontroller.cxx
+++ b/framework/source/uielement/notebookbarmenucontroller.cxx
@@ -106,7 +106,7 @@ void NotebookbarMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
 
     const utl::OConfigurationTreeRoot aImplementationsNode(
                                         m_xContext,
-                                        OUString( aPath.makeStringAndClear() ),
+                                        aPath.makeStringAndClear(),
                                         false);
     if ( !aImplementationsNode.isValid() )
         return;
commit dc4704ce1b067b62df0b0cf9cda3c4106d80292c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 19 17:17:29 2017 +0200

    loplugin:stringcopy: sc
    
    Change-Id: Ic6cb5406d20e7e07b8e34514df71adf1c3a4e727

diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 591a7f88c129..84cfa9c396b8 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -311,7 +311,7 @@ void ScMacrosTest::testVba()
         Any aRet;
         Sequence< sal_Int16 > aOutParamIndex;
         Sequence< Any > aOutParam;
-        bool bWorkbooksHandling = OUString( testInfo[i].sFileBaseName ) == "Workbooks." && !sTempDir.isEmpty() ;
+        bool bWorkbooksHandling = testInfo[i].sFileBaseName == "Workbooks." && !sTempDir.isEmpty() ;
 
         if ( bWorkbooksHandling )
         {
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 31eaf827911f..3c72a050ab66 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -240,7 +240,7 @@ uno::Reference< chart2::XChartDocument > ScDocument::GetChartByName( const OUStr
             while (pObject)
             {
                 if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
-                        OUString(static_cast<SdrOle2Obj*>(pObject)->GetPersistName()) == rChartName )
+                        static_cast<SdrOle2Obj*>(pObject)->GetPersistName() == rChartName )
                 {
                     xReturn.set( ScChartHelper::GetChartFromSdrObject( pObject ) );
                     return xReturn;
@@ -305,7 +305,7 @@ void ScDocument::GetOldChartParameters( const OUString& rName,
         while (pObject)
         {
             if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
-                    OUString(static_cast<SdrOle2Obj*>(pObject)->GetPersistName()) == rName )
+                    static_cast<SdrOle2Obj*>(pObject)->GetPersistName() == rName )
             {
                 uno::Reference< chart2::XChartDocument > xChartDoc( ScChartHelper::GetChartFromSdrObject( pObject ) );
                 if ( xChartDoc.is() )
@@ -352,7 +352,7 @@ void ScDocument::UpdateChartArea( const OUString& rChartName,
         while (pObject)
         {
             if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
-                    OUString(static_cast<SdrOle2Obj*>(pObject)->GetPersistName()) == rChartName )
+                    static_cast<SdrOle2Obj*>(pObject)->GetPersistName() == rChartName )
             {
                 uno::Reference< chart2::XChartDocument > xChartDoc( ScChartHelper::GetChartFromSdrObject( pObject ) );
                 uno::Reference< chart2::data::XDataReceiver > xReceiver( xChartDoc, uno::UNO_QUERY );
@@ -587,7 +587,7 @@ void ScDocument::SetChartRangeList( const OUString& rChartName,
         while (pObject)
         {
             if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
-                    OUString(static_cast<SdrOle2Obj*>(pObject)->GetPersistName()) == rChartName )
+                    static_cast<SdrOle2Obj*>(pObject)->GetPersistName() == rChartName )
             {
                 uno::Reference< chart2::XChartDocument > xChartDoc( ScChartHelper::GetChartFromSdrObject( pObject ) );
                 uno::Reference< chart2::data::XDataReceiver > xReceiver( xChartDoc, uno::UNO_QUERY );
@@ -645,7 +645,7 @@ uno::Reference< embed::XEmbeddedObject >
             {
                 SdrOle2Obj * pOleObject ( dynamic_cast< SdrOle2Obj * >( pObject ));
                 if( pOleObject &&
-                    OUString(pOleObject->GetPersistName()) == rName )
+                    pOleObject->GetPersistName() == rName )
                 {
                     return pOleObject->GetObjRef();
                 }
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 418de1e29fa1..9ad00a487c7a 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -918,9 +918,9 @@ ScDdeLink* lclGetDdeLink(
             ::sfx2::SvBaseLink* pLink = rLinks[ nIndex ].get();
             if( ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>( pLink )  )
             {
-                if( (OUString(pDdeLink->GetAppl()) == rAppl) &&
-                    (OUString(pDdeLink->GetTopic()) == rTopic) &&
-                    (OUString(pDdeLink->GetItem()) == rItem) &&
+                if( (pDdeLink->GetAppl() == rAppl) &&
+                    (pDdeLink->GetTopic() == rTopic) &&
+                    (pDdeLink->GetItem() == rItem) &&
                     ((nMode == SC_DDE_IGNOREMODE) || (nMode == pDdeLink->GetMode())) )
                     return pDdeLink;
                 if( pnDdePos ) ++*pnDdePos;
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index e012d727a33d..b6e62a8c04d4 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2862,10 +2862,10 @@ uno::Reference<sheet::XDimensionsSupplier> ScDPObject::CreateSource( const ScDPS
                 //  initialize
                 uno::Sequence<uno::Any> aSeq(4);
                 uno::Any* pArray = aSeq.getArray();
-                pArray[0] <<= OUString( rDesc.aParSource );
-                pArray[1] <<= OUString( rDesc.aParName );
-                pArray[2] <<= OUString( rDesc.aParUser );
-                pArray[3] <<= OUString( rDesc.aParPass );
+                pArray[0] <<= rDesc.aParSource;
+                pArray[1] <<= rDesc.aParName;
+                pArray[2] <<= rDesc.aParUser;
+                pArray[3] <<= rDesc.aParPass;
                 xInit->initialize( aSeq );
             }
             xRet.set( xInterface, uno::UNO_QUERY );
@@ -3295,7 +3295,7 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
     catch ( const sdbc::SQLException& rError )
     {
         //! store error message
-        ScopedVclPtrInstance< InfoBox > aInfoBox( nullptr, OUString(rError.Message) );
+        ScopedVclPtrInstance< InfoBox > aInfoBox( nullptr, rError.Message );
         aInfoBox->Execute();
     }
     catch ( uno::Exception& )
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index d9d4f35a8cd1..f0bb00f03039 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -3460,7 +3460,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
 #if DUMP_PIVOT_TABLE
 void ScDPResultDimension::DumpState( const ScDPResultMember* pRefMember, ScDocument* pDoc, ScAddress& rPos ) const
 {
-    OUString aDimName = bIsDataLayout ? OUString("(data layout)") : OUString(GetName());
+    OUString aDimName = bIsDataLayout ? OUString("(data layout)") : GetName();
     dumpRow("ScDPResultDimension", aDimName, nullptr, pDoc, rPos);
 
     SCROW nStartRow = rPos.Row();
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index b59b215d21d7..8e552a878f81 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -5215,7 +5215,7 @@ void ScCompiler::fillAddInToken(::std::vector< css::sheet::FormulaOpCodeMapEntry
             }
             else
                 aEntry.Name = pFuncData->GetUpperLocal();
-            aEntry.Token.Data <<= OUString( pFuncData->GetOriginalName());
+            aEntry.Token.Data <<= pFuncData->GetOriginalName();
             _rVec.push_back( aEntry);
         }
     }
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 22d3ebb77173..fe01b5c27477 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -735,7 +735,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
                                  (aFontData.mbItalic != aNewData.mbItalic);
                 if( bNewFont || (bNewStyle && pFontList) )
                 {
-                    aParaText = "&\"" + OUString(aNewData.maName);
+                    aParaText = "&\"" + aNewData.maName;
                     if( pFontList )
                     {
                         FontMetric aFontMetric( pFontList->Get(
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 37100699b3b2..515619c697bf 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -462,7 +462,7 @@ void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim)
         rExport.CheckAttrList();
         for (ScDPSaveDimension::MemberList::const_iterator i=rMembers.begin(); i != rMembers.end() ; ++i)
         {
-            rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, OUString((*i)->GetName()));
+            rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, (*i)->GetName());
 
             if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
             {
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index d7e4ef5b8ce6..4d6c02cf7528 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4807,11 +4807,11 @@ void ScXMLExport::GetChangeTrackViewSettings(uno::Sequence<beans::PropertyValue>
                 pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR].Name = "ShowChangesByAuthor";
                 pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR].Value <<= pViewSettings->HasAuthor();
                 pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR_NAME].Name = "ShowChangesByAuthorName";
-                pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR_NAME].Value <<= OUString (pViewSettings->GetTheAuthorToShow());
+                pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR_NAME].Value <<= pViewSettings->GetTheAuthorToShow();
                 pChangeProps[SC_SHOW_CHANGES_BY_COMMENT].Name = "ShowChangesByComment";
                 pChangeProps[SC_SHOW_CHANGES_BY_COMMENT].Value <<= pViewSettings->HasComment();
                 pChangeProps[SC_SHOW_CHANGES_BY_COMMENT_TEXT].Name = "ShowChangesByCommentText";
-                pChangeProps[SC_SHOW_CHANGES_BY_COMMENT_TEXT].Value <<= OUString (pViewSettings->GetTheComment());
+                pChangeProps[SC_SHOW_CHANGES_BY_COMMENT_TEXT].Value <<= pViewSettings->GetTheComment();
                 pChangeProps[SC_SHOW_CHANGES_BY_RANGES].Name = "ShowChangesByRanges";
                 pChangeProps[SC_SHOW_CHANGES_BY_RANGES].Value <<= pViewSettings->HasRange();
                 OUString sRangeList;
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index e4d9bde6616d..ed0fca0877b0 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -741,12 +741,12 @@ void ScAccessibleCsvRuler::SendCaretEvent()
 
 OUString SAL_CALL ScAccessibleCsvRuler::createAccessibleName()
 {
-    return OUString( ScResId( STR_ACC_CSVRULER_NAME ) );
+    return ScResId( STR_ACC_CSVRULER_NAME );
 }
 
 OUString SAL_CALL ScAccessibleCsvRuler::createAccessibleDescription()
 {
-    return OUString( ScResId( STR_ACC_CSVRULER_DESCR ) );
+    return ScResId( STR_ACC_CSVRULER_DESCR );
 }
 
 void ScAccessibleCsvRuler::ensureValidIndex( sal_Int32 nIndex ) const
@@ -1269,12 +1269,12 @@ void ScAccessibleCsvGrid::SendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uI
 
 OUString SAL_CALL ScAccessibleCsvGrid::createAccessibleName()
 {
-    return OUString( ScResId( STR_ACC_CSVGRID_NAME ) );
+    return ScResId( STR_ACC_CSVGRID_NAME );
 }
 
 OUString SAL_CALL ScAccessibleCsvGrid::createAccessibleDescription()
 {
-    return OUString( ScResId( STR_ACC_CSVGRID_DESCR ) );
+    return ScResId( STR_ACC_CSVGRID_DESCR );
 }
 
 void ScAccessibleCsvGrid::ensureValidIndex( sal_Int32 nIndex ) const
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 872593d6bb36..448aad8cfdbd 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -392,7 +392,7 @@ void ScAccessiblePreviewHeaderCell::CreateTextHelper()
         mpTextHelper = new ::accessibility::AccessibleTextHelper(
             o3tl::make_unique<ScAccessibilityEditSource>(
                 o3tl::make_unique<ScAccessiblePreviewHeaderCellTextData>(
-                    mpViewShell, OUString(getAccessibleName()), maCellPos,
+                    mpViewShell, getAccessibleName(), maCellPos,
                     mbColumnHeader, mbRowHeader)));
         mpTextHelper->SetEventSource(this);
     }
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index d52452b6391c..4231d447ba58 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -514,7 +514,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
             {
                 for( sal_Int32 i = 1, n = rLbStyle.GetEntryCount(); i <= n && !bFound; ++i)
                 {
-                    OUString aStyleName = ScGlobal::pCharClass->uppercase(OUString(rLbStyle.GetEntry(i)));
+                    OUString aStyleName = ScGlobal::pCharClass->uppercase(rLbStyle.GetEntry(i));
                     if( i == n )
                     {
                         rLbStyle.InsertEntry(aName);
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index dfc50ffe40dc..4ab94073c79e 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -309,7 +309,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatNa
     load_Separators (sFieldSeparators, sTextSeparators, bMergeDelimiters,
                          bQuotedFieldAsText, bDetectSpecialNum, bFixedWidth, nFromRow, nCharSet, nLanguage, meCall);
     // load from saved settings
-    maFieldSeparators = OUString(sFieldSeparators);
+    maFieldSeparators = sFieldSeparators;
 
     if( bMergeDelimiters && !bIsTSV )
         pCkbAsOnce->Check();
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2e79cf4d5cdf..20f61d069a02 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3873,7 +3873,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi )
         {
             if (!bApi)
             {
-                ScopedVclPtrInstance< InfoBox > aBox( ScDocShell::GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) );
+                ScopedVclPtrInstance< InfoBox > aBox( ScDocShell::GetActiveDialogParent(), ScResId( SCSTR_WRONGPASSWORD ) );
                 aBox->Execute();
             }
             return false;
@@ -3903,7 +3903,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi )
         {
             if (!bApi)
             {
-                ScopedVclPtrInstance< InfoBox > aBox( ScDocShell::GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) );
+                ScopedVclPtrInstance< InfoBox > aBox( ScDocShell::GetActiveDialogParent(), ScResId( SCSTR_WRONGPASSWORD ) );
                 aBox->Execute();
             }
             return false;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 77db8cd073f4..03131b4be5cd 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -186,8 +186,8 @@ void ScDocShell::FillClass( SvGlobalName* pClassName,
     {
         *pClassName     = SvGlobalName( SO3_SC_CLASSID_60 );
         *pFormat        = SotClipboardFormatId::STARCALC_60;
-        *pFullTypeName  = OUString( ScResId( SCSTR_LONG_SCDOC_NAME ) );
-        *pShortTypeName = OUString( ScResId( SCSTR_SHORT_SCDOC_NAME ) );
+        *pFullTypeName  = ScResId( SCSTR_LONG_SCDOC_NAME );
+        *pShortTypeName = ScResId( SCSTR_SHORT_SCDOC_NAME );
     }
     else if ( nFileFormat == SOFFICE_FILEFORMAT_8 )
     {
@@ -871,7 +871,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
                                             // TODO/LATER: More entries from the MediaDescriptor might be interesting for the merge
                                             uno::Sequence< beans::PropertyValue > aValues(1);
                                             aValues[0].Name = "FilterName";
-                                            aValues[0].Value <<= OUString( GetMedium()->GetFilter()->GetFilterName() );
+                                            aValues[0].Value <<= GetMedium()->GetFilter()->GetFilterName();
 
                                             const SfxStringItem* pPasswordItem = SfxItemSet::GetItem<SfxStringItem>(GetMedium()->GetItemSet(), SID_PASSWORD, false);
                                             if ( pPasswordItem && !pPasswordItem->GetValue().isEmpty() )
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 1cd085e0b3aa..1121ce863554 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1183,7 +1183,7 @@ bool ScDocShell::ExecuteChangeProtectionDialog( bool bJustQueryIfProtected )
                 else
                 {
                     ScopedVclPtrInstance<InfoBox> aBox( GetActiveDialogParent(),
-                        OUString( ScResId( SCSTR_WRONGPASSWORD ) ) );
+                        ScResId( SCSTR_WRONGPASSWORD ) );
                     aBox->Execute();
                 }
             }
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 725a8b906649..5ee969c56bc7 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -142,7 +142,7 @@ namespace
 
         uno::Sequence<beans::PropertyValue> aProps(2);
         aProps[0].Name = SC_DBPROP_EXTENSION;
-        aProps[0].Value <<= OUString( aExtension );
+        aProps[0].Value <<= aExtension;
         aProps[1].Name = SC_DBPROP_CHARSET;
         aProps[1].Value <<= aCharSetStr;
 
diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx
index cdabc4674044..e1418d1d3422 100644
--- a/sc/source/ui/docshell/documentlinkmgr.cxx
+++ b/sc/source/ui/docshell/documentlinkmgr.cxx
@@ -210,9 +210,9 @@ void DocumentLinkManager::updateDdeLink( const OUString& rAppl, const OUString&
         if (!pDdeLink)
             continue;
 
-        if ( OUString(pDdeLink->GetAppl()) == rAppl &&
-             OUString(pDdeLink->GetTopic()) == rTopic &&
-             OUString(pDdeLink->GetItem()) == rItem )
+        if ( pDdeLink->GetAppl() == rAppl &&
+             pDdeLink->GetTopic() == rTopic &&
+             pDdeLink->GetItem() == rItem )
         {
             pDdeLink->TryUpdate();
             // Could be multiple (Mode), so continue searching
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 3ac966fc708c..ea4c33c964e1 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -427,7 +427,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
     {
         const SfxPoolItem* pItem;
         if( pReqArgs->HasItem( FN_PARAM_5, &pItem ) )
-            aRangeString = OUString( static_cast<const SfxStringItem*>(pItem)->GetValue());
+            aRangeString = static_cast<const SfxStringItem*>(pItem)->GetValue();
 
         aPositionRange = pViewSh->GetViewData().GetCurPos();
     }
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index d7dedbc3de04..80544989e8a2 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -49,7 +49,7 @@ void ScMediaShell::InitInterface_Impl()
 ScMediaShell::ScMediaShell(ScViewData* pData) :
     ScDrawShell(pData)
 {
-    SetName( OUString( ScResId( SCSTR_MEDIASHELL ) ) );
+    SetName( ScResId( SCSTR_MEDIASHELL ) );
     SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Media));
 }
 
diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx
index 55d473ef9720..20b4bdb6f10a 100644
--- a/sc/source/ui/miscdlgs/warnbox.cxx
+++ b/sc/source/ui/miscdlgs/warnbox.cxx
@@ -25,7 +25,7 @@
 #include "scres.hrc"
 
 ScReplaceWarnBox::ScReplaceWarnBox( vcl::Window* pParent ) :
-    WarningBox( pParent, WB_YES_NO | WB_DEF_YES, OUString( ScResId( STR_REPLCELLSWARN ) ) )
+    WarningBox( pParent, WB_YES_NO | WB_DEF_YES, ScResId( STR_REPLCELLSWARN ) )
 {
     // By default, the check box is ON, and the user needs to un-check it to
     // disable all future warnings.
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 0050bb6eeae3..193420cb3fa7 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -490,7 +490,7 @@ ScUndoPageBreak::~ScUndoPageBreak()
 OUString ScUndoPageBreak::GetComment() const
 {
     //"Column break" | "Row break"  "insert" | "delete"
-    return OUString ( bColumn ?
+    return bColumn ?
         ( bInsert ?
             ScGlobal::GetRscString( STR_UNDO_INSCOLBREAK ) :
             ScGlobal::GetRscString( STR_UNDO_DELCOLBREAK )
@@ -498,7 +498,7 @@ OUString ScUndoPageBreak::GetComment() const
         ( bInsert ?
             ScGlobal::GetRscString( STR_UNDO_INSROWBREAK ) :
             ScGlobal::GetRscString( STR_UNDO_DELROWBREAK )
-        ) );
+        );
 }
 
 void ScUndoPageBreak::DoChange( bool bInsertP ) const
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 9323e066978f..67d7eee929b1 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1441,7 +1441,7 @@ ScUndoRenameObject::~ScUndoRenameObject()
 OUString ScUndoRenameObject::GetComment() const
 {
     //  string resource shared with title for dialog
-    return OUString( ScResId(SCSTR_RENAMEOBJECT) );
+    return ScResId(SCSTR_RENAMEOBJECT);
 }
 
 SdrObject* ScUndoRenameObject::GetObject()
diff --git a/sc/source/ui/unoobj/PivotTableDataSequence.cxx b/sc/source/ui/unoobj/PivotTableDataSequence.cxx
index 812ad94e7046..23b7fd82817b 100644
--- a/sc/source/ui/unoobj/PivotTableDataSequence.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataSequence.cxx
@@ -81,7 +81,7 @@ uno::Sequence<uno::Any> SAL_CALL PivotTableDataSequence::getData()
         if (rItem.m_eType == ValueType::Numeric)
             aSeq[i] <<= double(rItem.m_fValue);
         else if (rItem.m_eType == ValueType::String)
-            aSeq[i] <<= OUString(rItem.m_aString);
+            aSeq[i] <<= rItem.m_aString;
 
         i++;
     }
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 420570abfea3..d37c2cc38710 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -535,11 +535,11 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
 
     pArray[2].Name = SC_UNONAME_NAME;
     if (rDesc.pFuncName)
-        pArray[2].Value <<= OUString( *rDesc.pFuncName );
+        pArray[2].Value <<= *rDesc.pFuncName;
 
     pArray[3].Name = SC_UNONAME_DESCRIPTION;
     if (rDesc.pFuncDesc)
-        pArray[3].Value <<= OUString( *rDesc.pFuncDesc );
+        pArray[3].Value <<= *rDesc.pFuncDesc;
 
     pArray[4].Name = SC_UNONAME_ARGUMENTS;
     if (!rDesc.maDefArgNames.empty() && !rDesc.maDefArgDescs.empty() && rDesc.pDefArgFlags )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 70eb3beb33b0..768696981ee9 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2061,8 +2061,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert
                         aAny <<= false;
                         break;
                     case SC_WID_UNO_CELLSTYL:
-                        aAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
-                                    ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ) );
+                        aAny <<= ScStyleNameConversion::DisplayToProgrammaticName(
+                                    ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para );
                         break;
                     case SC_WID_UNO_TBLBORD:
                     case SC_WID_UNO_TBLBORD2:
@@ -2526,8 +2526,8 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
                         const ScStyleSheet* pStyle = pDocShell->GetDocument().GetSelectionStyle(*GetMarkData());
                         if (pStyle)
                             aStyleName = pStyle->GetName();
-                        rAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
-                                                                aStyleName, SfxStyleFamily::Para ) );
+                        rAny <<= ScStyleNameConversion::DisplayToProgrammaticName(
+                                                                aStyleName, SfxStyleFamily::Para );
                     }
                     break;
                 case SC_WID_UNO_TBLBORD:
@@ -6564,7 +6564,7 @@ void ScCellObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, u
         if ( pEntry->nWID == SC_WID_UNO_FORMLOC )
         {
             // sal_False = lokal
-            rAny <<= OUString( GetInputString_Impl(false) );
+            rAny <<= GetInputString_Impl(false);
         }
         else if ( pEntry->nWID == SC_WID_UNO_FORMRT )
         {
@@ -8298,8 +8298,8 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         }
         else if ( pEntry->nWID == SC_WID_UNO_PAGESTL )
         {
-            rAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
-                                rDoc.GetPageStyle( nTab ), SfxStyleFamily::Page ) );
+            rAny <<= ScStyleNameConversion::DisplayToProgrammaticName(
+                                rDoc.GetPageStyle( nTab ), SfxStyleFamily::Page );
         }
         else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
         {
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index d69751056a65..ea4fa66be20e 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -438,7 +438,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
             // (as in SwXDocumentSettings)
             SfxPrinter* pPrinter = rDoc.GetPrinter( false );
             if (pPrinter)
-                aRet <<= OUString ( pPrinter->GetName());
+                aRet <<= pPrinter->GetName();
             else
                 aRet <<= OUString();
         }
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 530ea3519afa..b4266155f859 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1802,7 +1802,7 @@ uno::Any ScStyleObj::getPropertyValue_Impl( const OUString& aPropertyName )
     {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list